@veevarts/design-system 2.0.0-beta.6 → 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 +11264 -5922
- 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/index.d.ts +1 -1
- package/dist/patterns/InstallmentSchedule/types.d.ts +62 -3
- package/dist/patterns/InstallmentSchedule/utils.d.ts +33 -0
- package/dist/patterns/KeyValueChip/KeyValueChip.d.ts +1 -0
- package/dist/patterns/KeyValueRows/KeyValueRows.d.ts +13 -0
- package/dist/patterns/KeyValueRows/index.d.ts +2 -0
- package/dist/patterns/KeyValueRows/styles.d.ts +8 -0
- package/dist/patterns/LineItemRows/LineItemRows.d.ts +17 -0
- package/dist/patterns/LineItemRows/index.d.ts +2 -0
- package/dist/patterns/LineItemRows/styles.d.ts +13 -0
- package/dist/patterns/ListPanel/ListPanel.d.ts +2 -0
- package/dist/patterns/LoadMoreFooter/LoadMoreFooter.d.ts +3 -0
- package/dist/patterns/LoadMoreFooter/index.d.ts +2 -0
- package/dist/patterns/LoadMoreFooter/styles.d.ts +7 -0
- package/dist/patterns/LoadMoreFooter/types.d.ts +10 -0
- package/dist/patterns/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,16 @@
|
|
|
1
|
+
import { RecordCardBody, RecordCardSurface, RecordCardVariant } from './types';
|
|
2
|
+
export declare const recordCardShadow = "shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
3
|
+
export declare const recordCardClass: {
|
|
4
|
+
readonly base: "overflow-hidden rounded-2xl border border-pos-line bg-white";
|
|
5
|
+
readonly title: "m-0 min-w-0 text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere]";
|
|
6
|
+
readonly count: "rounded-full bg-default-100 px-2 py-px text-[0.75rem] font-semibold text-default-600";
|
|
7
|
+
readonly icon: "flex shrink-0 text-default-500 [&_svg]:size-[1.125rem]";
|
|
8
|
+
readonly action: "ml-auto";
|
|
9
|
+
readonly description: "m-0 text-[0.84375rem] leading-[1.55] text-default-500 [&_b]:font-bold [&_b]:tabular-nums [&_b]:text-default-900";
|
|
10
|
+
readonly footer: "flex flex-wrap gap-2";
|
|
11
|
+
readonly footerAfterContent: "mt-[0.875rem]";
|
|
12
|
+
readonly footerAfterDescription: "mt-3";
|
|
13
|
+
};
|
|
14
|
+
export declare const recordCardSurfaceClass: Record<RecordCardSurface, string>;
|
|
15
|
+
export declare const recordCardHeaderClass: Record<RecordCardVariant, string>;
|
|
16
|
+
export declare const recordCardBodyClass: Record<RecordCardVariant, Record<RecordCardBody, string>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type RecordCardVariant = 'section' | 'aside';
|
|
3
|
+
export type RecordCardBody = 'padded' | 'rows' | 'flush' | 'none';
|
|
4
|
+
/** `card` sits on a grey page with the layered shadow; `flat` keeps the border and drops the shadow, for a card inside a modal. */
|
|
5
|
+
export type RecordCardSurface = 'card' | 'flat';
|
|
6
|
+
export interface RecordCardProps {
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
titleAs?: 'h2' | 'h3' | 'h4';
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
count?: ReactNode;
|
|
11
|
+
badge?: ReactNode;
|
|
12
|
+
action?: ReactNode;
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
footer?: ReactNode;
|
|
15
|
+
variant?: RecordCardVariant;
|
|
16
|
+
body?: RecordCardBody;
|
|
17
|
+
surface?: RecordCardSurface;
|
|
18
|
+
/** Merged onto the root, after the chrome (e.g. `break-inside-avoid` in a multi-column host). */
|
|
19
|
+
className?: string;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
'data-testid'?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const RECORD_HEADER_WIDE_REM = 48;
|
|
2
|
+
export declare const recordHeaderClass: {
|
|
3
|
+
readonly base: "mb-4 overflow-hidden rounded-2xl border border-pos-line bg-white shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
4
|
+
readonly band: "flex items-center gap-2.5 border-b border-pos-hair bg-pos-page px-4 py-2.5";
|
|
5
|
+
readonly back: "inline-flex size-[1.625rem] shrink-0 items-center justify-center rounded-[0.625rem] text-default-500 outline-none transition-colors hover:bg-default-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
6
|
+
readonly backIcon: "size-[0.875rem]";
|
|
7
|
+
readonly breadcrumb: "min-w-0 flex-1";
|
|
8
|
+
readonly breadcrumbList: "flex-nowrap gap-[0.375rem]";
|
|
9
|
+
readonly crumbBase: "min-w-0";
|
|
10
|
+
readonly crumb: "whitespace-nowrap text-[0.875rem] text-default-500 data-[disabled=true]:opacity-100 data-[current=true]:overflow-hidden data-[current=true]:font-normal data-[current=true]:text-default-900";
|
|
11
|
+
readonly crumbSeparator: "ms-[0.375rem] px-0 text-default-400 data-[disabled=true]:opacity-100";
|
|
12
|
+
readonly body: "flex flex-wrap gap-5";
|
|
13
|
+
readonly bodyWide: "px-5 pb-5 pt-[1.125rem]";
|
|
14
|
+
readonly bodyNarrow: "p-4";
|
|
15
|
+
readonly identity: "min-w-0 flex-[1_1_18.75rem]";
|
|
16
|
+
readonly title: "m-0 font-semibold tracking-[-.02em] text-default-900 [overflow-wrap:anywhere]";
|
|
17
|
+
readonly titleWide: "text-[1.5rem]";
|
|
18
|
+
readonly titleNarrow: "text-[1.3125rem]";
|
|
19
|
+
readonly meta: "m-0 mt-[0.6875rem] flex list-none flex-col gap-[0.4375rem] p-0";
|
|
20
|
+
readonly metaLine: "flex min-w-0 items-center gap-[0.5625rem] text-[0.84375rem] text-default-700";
|
|
21
|
+
readonly metaIcon: "flex shrink-0 text-default-400 [&_svg]:size-[0.9375rem]";
|
|
22
|
+
readonly metaText: "min-w-0 truncate";
|
|
23
|
+
readonly money: "flex flex-col gap-[0.3125rem]";
|
|
24
|
+
readonly moneyWide: "ml-auto min-w-[12.5rem] flex-none items-end text-right";
|
|
25
|
+
readonly moneyNarrow: "w-full items-start text-left";
|
|
26
|
+
readonly amountLabel: "text-[0.8125rem] text-default-500";
|
|
27
|
+
readonly amount: "whitespace-nowrap font-bold tracking-[-.03em] tabular-nums text-default-900";
|
|
28
|
+
readonly amountWide: "text-[1.9375rem] leading-[1.1]";
|
|
29
|
+
readonly amountNarrow: "text-[1.6875rem] leading-[1.1]";
|
|
30
|
+
readonly amountCaption: "text-[0.8125rem] text-default-500";
|
|
31
|
+
readonly recordId: "text-[0.8125rem] text-default-500";
|
|
32
|
+
readonly chips: "mt-[0.1875rem] flex flex-wrap gap-1.5";
|
|
33
|
+
readonly chipsWide: "justify-end";
|
|
34
|
+
readonly chipsNarrow: "justify-start";
|
|
35
|
+
readonly statItems: "m-0 mt-2.5 flex flex-wrap gap-[1.375rem]";
|
|
36
|
+
readonly stat: "flex flex-col-reverse";
|
|
37
|
+
readonly statWide: "text-right";
|
|
38
|
+
readonly statNarrow: "text-left";
|
|
39
|
+
readonly statValue: "m-0 text-[0.9375rem] font-bold tabular-nums text-default-900";
|
|
40
|
+
readonly statLabel: "mt-0.5 text-[0.75rem] text-default-500";
|
|
41
|
+
readonly statsWide: "px-5 pb-5";
|
|
42
|
+
readonly statsNarrow: "px-4 pb-4";
|
|
43
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
|
+
export interface RecordHeaderStat {
|
|
4
|
+
id?: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
value: ReactNode;
|
|
7
|
+
tone?: RecordTone;
|
|
8
|
+
}
|
|
9
|
+
export interface RecordHeaderProps {
|
|
10
|
+
breadcrumb?: Array<{
|
|
11
|
+
label: string;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
}>;
|
|
14
|
+
onBack?: () => void;
|
|
15
|
+
backLabel: string;
|
|
16
|
+
title: ReactNode;
|
|
17
|
+
meta?: Array<{
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
text: ReactNode;
|
|
20
|
+
}>;
|
|
21
|
+
amountLabel?: string;
|
|
22
|
+
amount?: ReactNode;
|
|
23
|
+
amountCaption?: ReactNode;
|
|
24
|
+
recordId?: ReactNode;
|
|
25
|
+
chips?: ReactNode;
|
|
26
|
+
statItems?: RecordHeaderStat[];
|
|
27
|
+
stats?: ReactNode;
|
|
28
|
+
banner?: ReactNode;
|
|
29
|
+
'data-testid'?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const RECORD_LAYOUT_SPLIT_REM = 50;
|
|
2
|
+
export declare const recordLayoutClass: {
|
|
3
|
+
readonly base: "grid items-start gap-4";
|
|
4
|
+
readonly split: "grid-cols-[minmax(0,1fr)_23.25rem]";
|
|
5
|
+
readonly stacked: "grid-cols-[minmax(0,1fr)]";
|
|
6
|
+
readonly column: "min-w-0";
|
|
7
|
+
readonly aside: "flex min-w-0 flex-col gap-[0.875rem]";
|
|
8
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SignedAmountTone } from '../shared/recordTone';
|
|
3
|
+
export interface RecordTotalsRow {
|
|
4
|
+
id: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
note?: React.ReactNode;
|
|
7
|
+
value: React.ReactNode;
|
|
8
|
+
tone?: SignedAmountTone;
|
|
9
|
+
}
|
|
10
|
+
export interface RecordTotalsProps {
|
|
11
|
+
rows: RecordTotalsRow[];
|
|
12
|
+
total: {
|
|
13
|
+
label: React.ReactNode;
|
|
14
|
+
value: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
memo?: React.ReactNode;
|
|
17
|
+
'data-testid'?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const RecordTotals: React.FC<RecordTotalsProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const RECORD_TOTALS_WIDE_REM = 37.5;
|
|
2
|
+
export declare const recordTotalsClass: {
|
|
3
|
+
readonly base: "mx-5 border-t border-pos-hair pb-[1.125rem] pt-2.5";
|
|
4
|
+
readonly rowWide: "flex items-baseline gap-4";
|
|
5
|
+
readonly rowNarrow: "flex flex-wrap items-baseline gap-x-3";
|
|
6
|
+
readonly labelWide: "shrink-0 grow-0 basis-[11.875rem]";
|
|
7
|
+
readonly labelNarrow: "flex-auto";
|
|
8
|
+
readonly noteWide: "min-w-0 flex-1";
|
|
9
|
+
readonly noteNarrow: "order-3 mt-px basis-full";
|
|
10
|
+
readonly row: "py-2";
|
|
11
|
+
readonly label: "text-[0.875rem] text-default-900";
|
|
12
|
+
readonly note: "text-[0.8125rem] text-default-500";
|
|
13
|
+
readonly value: "ml-auto shrink-0 whitespace-nowrap text-right text-[0.875rem] tabular-nums text-default-900";
|
|
14
|
+
readonly totalRule: "mt-1.5 border-t border-pos-line";
|
|
15
|
+
readonly totalRow: "pt-3";
|
|
16
|
+
readonly totalLabel: "text-[0.9375rem] font-bold text-default-900";
|
|
17
|
+
readonly totalValue: "ml-auto shrink-0 whitespace-nowrap text-right text-[1.0625rem] font-bold tabular-nums text-default-900";
|
|
18
|
+
readonly memo: "mt-2 text-[0.78125rem] leading-[1.6] text-default-500";
|
|
19
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { RefundMethodCards } from './RefundMethodCards';
|
|
2
|
+
export type { RefundMethodCardsProps, RefundMethodCardsLabels, RefundMethodCardsError, RefundMethodView, RefundMethodKind, RefundMethodStatus, RefundMethodOption, RefundMethodAnotherMethod, RefundMethodPaidWith, } from './types';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { RefundMethodKind } from './types';
|
|
3
|
+
export declare const PRIMARY = "hsl(var(--heroui-primary))";
|
|
4
|
+
export declare const refundMethodKindIcon: Record<RefundMethodKind, string>;
|
|
5
|
+
export declare const refundMethodCardsClass: {
|
|
6
|
+
readonly root: "flex flex-col text-default-900";
|
|
7
|
+
readonly banner: "mb-[18px]";
|
|
8
|
+
readonly eyebrowRow: "mb-3 flex min-h-6 items-center justify-between gap-3";
|
|
9
|
+
readonly eyebrow: "text-[11px] font-semibold uppercase tracking-[.08em] text-default-500";
|
|
10
|
+
readonly grid: "grid grid-cols-3 gap-2.5";
|
|
11
|
+
readonly card: "relative flex min-h-[132px] flex-col rounded-[14px] border-[1.5px] bg-white transition-colors";
|
|
12
|
+
readonly focusRing: "outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary";
|
|
13
|
+
readonly toggle: "flex w-full items-center gap-[11px] rounded-[12px] px-[15px] pt-[13px] text-left disabled:cursor-not-allowed";
|
|
14
|
+
readonly toggleUnselected: "flex-1 flex-col items-stretch gap-3 pb-[13px]";
|
|
15
|
+
readonly toggleHeader: "flex w-full items-center gap-[11px]";
|
|
16
|
+
readonly toggleRemovable: "pr-12";
|
|
17
|
+
readonly iconBox: "flex h-[38px] w-[38px] shrink-0 items-center justify-center rounded-[10px]";
|
|
18
|
+
readonly text: "min-w-0 flex-1";
|
|
19
|
+
readonly label: "block truncate text-[15px] font-semibold leading-5";
|
|
20
|
+
readonly subtitle: "block truncate text-xs text-default-500";
|
|
21
|
+
readonly status: "block truncate text-xs font-semibold";
|
|
22
|
+
readonly lowerSlot: "mt-auto flex h-11 w-full items-center rounded-[10px] px-3 text-[13px] font-medium tabular-nums";
|
|
23
|
+
readonly amountSlot: "mt-auto px-[15px] pb-[13px] pt-3";
|
|
24
|
+
readonly amountWrapper: "h-11 min-h-11 rounded-[10px] bg-white shadow-none";
|
|
25
|
+
readonly amountInput: "text-[15px] font-semibold tabular-nums";
|
|
26
|
+
readonly remove: "absolute right-1 top-1 flex h-11 w-11 items-center justify-center rounded-[10px] text-default-500 hover:text-default-900 disabled:cursor-not-allowed";
|
|
27
|
+
readonly badge: "inline-flex h-[22px] shrink-0 items-center whitespace-nowrap rounded-full px-[9px] text-xs font-medium leading-none";
|
|
28
|
+
readonly another: "flex min-h-[132px] w-full flex-col items-start justify-center gap-3 rounded-[14px] border-[1.5px] border-dashed bg-white px-[15px] py-[13px] text-left transition-colors disabled:cursor-not-allowed";
|
|
29
|
+
readonly anotherOpen: "aria-expanded:scale-100";
|
|
30
|
+
readonly menuItem: "py-2";
|
|
31
|
+
};
|
|
32
|
+
type CardTone = 'idle' | 'selected' | 'declined';
|
|
33
|
+
export declare const refundMethodCardStyle: Record<CardTone, CSSProperties>;
|
|
34
|
+
export declare const refundMethodIconStyle: {
|
|
35
|
+
readonly idle: {
|
|
36
|
+
readonly backgroundColor: "hsl(var(--heroui-default-100))";
|
|
37
|
+
readonly color: "hsl(var(--heroui-default-600))";
|
|
38
|
+
};
|
|
39
|
+
readonly selected: {
|
|
40
|
+
readonly backgroundColor: "hsl(var(--heroui-primary))";
|
|
41
|
+
readonly color: "#fff";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const refundMethodLowerSlotStyle: CSSProperties;
|
|
45
|
+
export declare const refundMethodAnotherStyle: CSSProperties;
|
|
46
|
+
export declare const refundMethodStatusStyle: {
|
|
47
|
+
readonly declined: {
|
|
48
|
+
readonly color: "#B62214";
|
|
49
|
+
};
|
|
50
|
+
readonly pending: {
|
|
51
|
+
readonly color: "#854F0B";
|
|
52
|
+
readonly backgroundColor: "#FAEEDA";
|
|
53
|
+
};
|
|
54
|
+
readonly done: {
|
|
55
|
+
readonly color: "#3B6D11";
|
|
56
|
+
readonly backgroundColor: "#EAF3DE";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CurrencyCode, Money } from '../../utils/money';
|
|
2
|
+
export type RefundMethodKind = 'card' | 'cash' | 'check' | 'store_credit' | 'reader' | 'other';
|
|
3
|
+
export type RefundMethodStatus = 'idle' | 'declined' | 'pending' | 'done';
|
|
4
|
+
export interface RefundMethodView {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: RefundMethodKind;
|
|
7
|
+
label: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
/** Most this method can take back; shown as "Up to …" and enforced on the amount input. */
|
|
10
|
+
cap?: Money;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
/** The text the cashier typed, owned by the host. */
|
|
13
|
+
amount?: string;
|
|
14
|
+
status?: RefundMethodStatus;
|
|
15
|
+
statusLabel?: string;
|
|
16
|
+
removable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface RefundMethodOption {
|
|
19
|
+
id: string;
|
|
20
|
+
kind: RefundMethodKind;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
}
|
|
24
|
+
export interface RefundMethodAnotherMethod {
|
|
25
|
+
label: string;
|
|
26
|
+
subtitle: string;
|
|
27
|
+
options: RefundMethodOption[];
|
|
28
|
+
onPick: (optionId: string) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface RefundMethodPaidWith {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
export interface RefundMethodCardsError {
|
|
35
|
+
tone: 'danger' | 'warning';
|
|
36
|
+
title?: string;
|
|
37
|
+
body: string;
|
|
38
|
+
onRetry?: () => void;
|
|
39
|
+
onChooseDifferent: () => void;
|
|
40
|
+
}
|
|
41
|
+
export interface RefundMethodCardsLabels {
|
|
42
|
+
heading?: string;
|
|
43
|
+
/** `{amount}` is replaced with the formatted cap. */
|
|
44
|
+
upTo?: string;
|
|
45
|
+
/** Shown in the lower slot of an unselected method that has no cap. */
|
|
46
|
+
noCap?: string;
|
|
47
|
+
/** Accessible name of the amount input; `{method}` is replaced with the method label. */
|
|
48
|
+
amountFor?: string;
|
|
49
|
+
/** Accessible name of the remove button; `{method}` is replaced with the method label. */
|
|
50
|
+
remove?: string;
|
|
51
|
+
declined?: string;
|
|
52
|
+
pending?: string;
|
|
53
|
+
done?: string;
|
|
54
|
+
retry?: string;
|
|
55
|
+
chooseDifferent?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface RefundMethodCardsProps {
|
|
58
|
+
methods: RefundMethodView[];
|
|
59
|
+
onToggle: (id: string) => void;
|
|
60
|
+
onAmountChange: (id: string, draft: string) => void;
|
|
61
|
+
onAmountBlur?: (id: string) => void;
|
|
62
|
+
onRemove?: (id: string) => void;
|
|
63
|
+
/** Currency of the typed amounts when a method has no cap. Default `'USD'`. */
|
|
64
|
+
currency?: CurrencyCode;
|
|
65
|
+
paidWith?: RefundMethodPaidWith;
|
|
66
|
+
anotherMethod?: RefundMethodAnotherMethod;
|
|
67
|
+
error?: RefundMethodCardsError;
|
|
68
|
+
busy?: boolean;
|
|
69
|
+
labels?: RefundMethodCardsLabels;
|
|
70
|
+
className?: string;
|
|
71
|
+
'data-testid'?: string;
|
|
72
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { RefundProgressStatus } from './types';
|
|
3
|
+
export declare const refundProgressListClass: {
|
|
4
|
+
readonly root: "flex flex-col text-default-900";
|
|
5
|
+
readonly eyebrow: "mb-3 text-[11px] font-semibold uppercase tracking-[.08em] text-default-500";
|
|
6
|
+
readonly list: "flex flex-col gap-2.5";
|
|
7
|
+
readonly row: "flex flex-col gap-3 rounded-[14px] border-[1.5px] px-[15px] py-[13px] transition-colors";
|
|
8
|
+
readonly main: "flex items-center gap-[11px]";
|
|
9
|
+
readonly iconBox: "flex h-[38px] w-[38px] shrink-0 items-center justify-center rounded-[10px]";
|
|
10
|
+
readonly text: "min-w-0 flex-1";
|
|
11
|
+
readonly label: "block truncate text-[15px] font-semibold leading-5";
|
|
12
|
+
readonly note: "block truncate text-xs text-default-500";
|
|
13
|
+
readonly amount: "shrink-0 text-[15px] font-semibold tabular-nums";
|
|
14
|
+
readonly badge: "inline-flex h-[22px] shrink-0 items-center gap-[5px] whitespace-nowrap rounded-full px-[9px] text-xs font-medium leading-none";
|
|
15
|
+
readonly prompt: "flex flex-wrap items-center gap-3 rounded-[10px] px-3 py-2";
|
|
16
|
+
readonly promptText: "min-w-0 flex-1 text-[13px] font-medium";
|
|
17
|
+
readonly action: "h-11 min-w-0 rounded-[12px] px-4 text-[14px] font-semibold";
|
|
18
|
+
};
|
|
19
|
+
export declare const refundProgressRowStyle: {
|
|
20
|
+
readonly idle: {
|
|
21
|
+
readonly borderColor: "#E7E7E9";
|
|
22
|
+
readonly backgroundColor: "#fff";
|
|
23
|
+
};
|
|
24
|
+
readonly active: {
|
|
25
|
+
readonly borderColor: "hsl(var(--heroui-primary))";
|
|
26
|
+
readonly backgroundColor: "hsl(var(--heroui-primary) / 0.05)";
|
|
27
|
+
};
|
|
28
|
+
readonly failed: {
|
|
29
|
+
readonly borderColor: "#B62214";
|
|
30
|
+
readonly backgroundColor: "#FCEBEB";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const refundProgressIconStyle: {
|
|
34
|
+
readonly idle: {
|
|
35
|
+
readonly backgroundColor: "hsl(var(--heroui-default-100))";
|
|
36
|
+
readonly color: "hsl(var(--heroui-default-600))";
|
|
37
|
+
};
|
|
38
|
+
readonly active: {
|
|
39
|
+
readonly backgroundColor: "hsl(var(--heroui-primary))";
|
|
40
|
+
readonly color: "#fff";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const refundProgressPromptStyle: CSSProperties;
|
|
44
|
+
export declare const refundProgressStatusStyle: Record<RefundProgressStatus, CSSProperties>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Money } from '../../utils/money';
|
|
2
|
+
import { RefundMethodKind } from '../RefundMethodCards/types';
|
|
3
|
+
export type RefundProgressStatus = 'queued' | 'processing' | 'waiting_reader' | 'waiting_cash' | 'done' | 'failed';
|
|
4
|
+
export interface RefundProgressAction {
|
|
5
|
+
label: string;
|
|
6
|
+
onPress: () => void;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface RefundProgressPart {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: RefundMethodKind;
|
|
13
|
+
label: string;
|
|
14
|
+
amount: Money;
|
|
15
|
+
status: RefundProgressStatus;
|
|
16
|
+
note?: string;
|
|
17
|
+
/** Instruction for the cashier under the row, e.g. "Give $30.00 from the drawer". */
|
|
18
|
+
prompt?: string;
|
|
19
|
+
action?: RefundProgressAction;
|
|
20
|
+
}
|
|
21
|
+
export interface RefundProgressListLabels {
|
|
22
|
+
heading?: string;
|
|
23
|
+
queued?: string;
|
|
24
|
+
processing?: string;
|
|
25
|
+
waitingReader?: string;
|
|
26
|
+
waitingCash?: string;
|
|
27
|
+
done?: string;
|
|
28
|
+
failed?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RefundProgressListProps {
|
|
31
|
+
parts: RefundProgressPart[];
|
|
32
|
+
/** Highlighted row. Defaults to the first part that is processing or waiting. */
|
|
33
|
+
activeId?: string;
|
|
34
|
+
labels?: RefundProgressListLabels;
|
|
35
|
+
className?: string;
|
|
36
|
+
'data-testid'?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const relatedRecordListClass: {
|
|
2
|
+
readonly base: "overflow-hidden rounded-2xl border border-pos-line bg-white shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
3
|
+
readonly header: "flex flex-wrap items-center gap-2 px-5 pt-4";
|
|
4
|
+
readonly title: "m-0 min-w-0 text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere]";
|
|
5
|
+
readonly count: "rounded-full bg-default-100 px-2 py-px text-[0.75rem] font-semibold text-default-600";
|
|
6
|
+
readonly list: "m-0 list-none p-0";
|
|
7
|
+
readonly item: "border-t border-pos-hair";
|
|
8
|
+
readonly itemFirstHeadless: "border-t-0";
|
|
9
|
+
readonly row: "flex w-full items-center gap-2.5 px-5 py-3 text-left";
|
|
10
|
+
readonly rowInteractive: "cursor-pointer outline-none transition-colors hover:bg-default-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
11
|
+
readonly rowBody: "flex min-w-0 flex-1 flex-col";
|
|
12
|
+
readonly rowHead: "flex min-w-0 flex-wrap items-center gap-2";
|
|
13
|
+
readonly primaryLinked: "min-w-0 text-[0.875rem] font-normal text-primary [overflow-wrap:anywhere]";
|
|
14
|
+
readonly primaryPlain: "min-w-0 text-[0.875rem] font-normal text-default-900 [overflow-wrap:anywhere]";
|
|
15
|
+
readonly secondary: "mt-[0.1875rem] block min-w-0 truncate text-[0.8125rem] text-default-500";
|
|
16
|
+
readonly amount: "max-w-[45%] shrink-0 text-right text-[0.875rem] font-semibold tabular-nums text-default-900 [overflow-wrap:anywhere]";
|
|
17
|
+
readonly empty: "min-w-0 px-5 pb-5 pt-[0.875rem] text-[0.875rem] text-default-500 [overflow-wrap:anywhere]";
|
|
18
|
+
readonly emptyHeadless: "pt-5";
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface RelatedRecordRow {
|
|
3
|
+
id: string;
|
|
4
|
+
primary: ReactNode;
|
|
5
|
+
chip?: ReactNode;
|
|
6
|
+
secondary?: ReactNode;
|
|
7
|
+
amount?: ReactNode;
|
|
8
|
+
amountTone?: 'positive' | 'negative' | 'neutral';
|
|
9
|
+
onSelect?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface RelatedRecordListProps {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
count?: number;
|
|
14
|
+
rows: RelatedRecordRow[];
|
|
15
|
+
emptyContent: ReactNode;
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { ScrollToLatestProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A scroll box that stays on its newest content, like a chat transcript. It
|
|
5
|
+
* follows the bottom until the person scrolls up, then offers a "Jump to
|
|
6
|
+
* newest" button; reaching the bottom again, by scrolling or the button,
|
|
7
|
+
* resumes following. Built on HeroUI's `ScrollShadow`.
|
|
8
|
+
*
|
|
9
|
+
* Only scrolling UP stops the following, so the box's own scrolling (and the
|
|
10
|
+
* browser clamping after content shrinks) never does.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ScrollToLatest({ children, label, followKey, jumpLabel, onFollowChange, threshold, className, classNames, 'data-testid': dataTestId, }: ScrollToLatestProps): JSX.Element;
|
|
13
|
+
export declare namespace ScrollToLatest {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
export default ScrollToLatest;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every slot class of `ScrollToLatest`. The box takes its height from its
|
|
3
|
+
* parent (`h-full` / `flex-1`), so give the parent one.
|
|
4
|
+
*/
|
|
5
|
+
export declare const scrollToLatestClass: {
|
|
6
|
+
readonly base: "relative flex min-h-0 w-full flex-col";
|
|
7
|
+
readonly scroller: "min-h-0 flex-1 overflow-y-auto overscroll-contain rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ai-focus";
|
|
8
|
+
readonly content: "min-w-0";
|
|
9
|
+
readonly jumpBar: "pointer-events-none absolute inset-x-0 bottom-3 flex justify-center";
|
|
10
|
+
readonly jump: "pointer-events-auto border border-divider bg-content1 text-foreground shadow-medium";
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ScrollToLatestClassNames {
|
|
3
|
+
base?: string;
|
|
4
|
+
scroller?: string;
|
|
5
|
+
content?: string;
|
|
6
|
+
jump?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ScrollToLatestProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/** Accessible name of the scrolling region, e.g. "Conversation". */
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* Change it when new content arrives (a message count, the last id). While
|
|
14
|
+
* the person is following the bottom, the box scrolls to it. Growth inside
|
|
15
|
+
* the content (a group expanding) is followed without it.
|
|
16
|
+
*/
|
|
17
|
+
followKey?: unknown;
|
|
18
|
+
/** Text of the button that returns to the bottom. Defaults to "Jump to newest". */
|
|
19
|
+
jumpLabel?: string;
|
|
20
|
+
/** Called when the person stops or starts following the bottom. */
|
|
21
|
+
onFollowChange?: (isFollowing: boolean) => void;
|
|
22
|
+
/** How close to the bottom, in px, still counts as "at the bottom". Defaults to 32. */
|
|
23
|
+
threshold?: number;
|
|
24
|
+
className?: string;
|
|
25
|
+
classNames?: ScrollToLatestClassNames;
|
|
26
|
+
'data-testid'?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { SessionExpiredCardProps } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* What a Salesforce Canvas widget shows once its session is gone. There is no
|
|
5
|
+
* reload button: the Canvas frame is loaded by a POST, so the reload has to
|
|
6
|
+
* come from the Salesforce tab, not from inside the frame.
|
|
7
|
+
* The card is `role="alert"` so the change is announced, and `min-h-52` (208px)
|
|
8
|
+
* keeps it tall enough to be the first height the Salesforce wrapper reveals
|
|
9
|
+
* (its threshold is 200px). Copy comes in as props; the caller owns i18n.
|
|
10
|
+
*/
|
|
11
|
+
export declare function SessionExpiredCard({ testId, title, description }: Readonly<SessionExpiredCardProps>): JSX.Element;
|
|
12
|
+
export declare namespace SessionExpiredCard {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SourceListHandle, SourceListProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The sources behind an assistant's answer, "Sources (n)", grouped by kind
|
|
4
|
+
* and closed by default. A HeroUI `Accordion` with one item; each source is a
|
|
5
|
+
* `SourcePill`.
|
|
6
|
+
*
|
|
7
|
+
* `reveal(id)` (through a ref) opens the list, moves focus to one source and
|
|
8
|
+
* scrolls it into view, so a `CitationMarker` can lead to the source it
|
|
9
|
+
* points at.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SourceList: import('react').ForwardRefExoticComponent<SourceListProps & import('react').RefAttributes<SourceListHandle>>;
|
|
12
|
+
export default SourceList;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Every slot class of `SourceList`. HeroUI semantic colours only. */
|
|
2
|
+
export declare const sourceListClass: {
|
|
3
|
+
readonly base: "w-full px-0";
|
|
4
|
+
readonly item: "shadow-none";
|
|
5
|
+
readonly trigger: "gap-2 py-1.5 motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
6
|
+
readonly title: "text-sm font-medium text-default-700";
|
|
7
|
+
readonly count: "ms-1 tabular-nums text-default-600";
|
|
8
|
+
readonly indicator: "text-default-500";
|
|
9
|
+
readonly content: "pb-2 pt-0";
|
|
10
|
+
readonly groups: "flex flex-col gap-3";
|
|
11
|
+
readonly group: "flex flex-col gap-1.5";
|
|
12
|
+
readonly groupLabel: "m-0 text-xs font-semibold uppercase tracking-wide text-default-600";
|
|
13
|
+
readonly list: "m-0 flex list-none flex-wrap gap-1.5 p-0";
|
|
14
|
+
/**
|
|
15
|
+
* The item takes focus only from `reveal()`, a script focus that follows a
|
|
16
|
+
* mouse click as often as a key, and `:focus-visible` would not match the
|
|
17
|
+
* click. So the ring is on `:focus`: the revealed source is marked either way.
|
|
18
|
+
*/
|
|
19
|
+
readonly listItem: "max-w-full rounded-full outline-none focus:ring-2 focus:ring-ai-focus";
|
|
20
|
+
};
|