@veevarts/design-system 2.6.0 → 2.8.0
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/dist/index.cjs +8 -8
- package/dist/index.js +6630 -5230
- 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 +1 -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 +16 -0
- package/dist/patterns/CardList/types.d.ts +19 -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/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/FilterSelect/FilterSelect.d.ts +3 -0
- package/dist/patterns/FilterSelect/index.d.ts +2 -0
- package/dist/patterns/FilterSelect/styles.d.ts +14 -0
- package/dist/patterns/FilterSelect/types.d.ts +13 -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/PageHeader/PageHeader.d.ts +1 -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 +10 -0
- package/dist/patterns/PillTabs/types.d.ts +13 -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 +15 -0
- package/dist/patterns/RecordCard/types.d.ts +17 -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/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/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/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 +40 -9
- package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +1 -0
- package/dist/patterns/ToolbarButton/ToolbarButton.d.ts +2 -0
- package/dist/patterns/index.d.ts +33 -1
- 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/tailwind/index.cjs +17 -1
- package/dist/tailwind/index.d.ts +39 -0
- package/dist/tailwind/index.mjs +17 -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-classes.d.ts +2 -0
- package/dist/test/root-font-size.d.ts +8 -0
- package/dist/tokens/pos-surface.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const activityTimelineClass: {
|
|
2
|
+
readonly list: "m-0 list-none p-0 pl-0.5";
|
|
3
|
+
readonly event: "flex gap-3.5";
|
|
4
|
+
readonly eventSpaced: "pb-4";
|
|
5
|
+
readonly rail: "flex flex-none flex-col items-center";
|
|
6
|
+
readonly dot: "mt-[0.3125rem] size-2.5 rounded-full";
|
|
7
|
+
readonly connector: "mt-1 w-[1.5px] flex-1 bg-pos-hair";
|
|
8
|
+
readonly body: "min-w-0 flex-1 pb-0.5";
|
|
9
|
+
readonly head: "flex min-w-0 flex-wrap items-baseline gap-x-3";
|
|
10
|
+
readonly title: "min-w-0 text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere]";
|
|
11
|
+
readonly timestamp: "ml-auto min-w-0 max-w-full text-[0.8125rem] tabular-nums text-default-500 [overflow-wrap:anywhere]";
|
|
12
|
+
readonly detail: "mt-[0.1875rem] min-w-0 text-[0.84375rem] leading-[1.5] text-default-500 [overflow-wrap:anywhere]";
|
|
13
|
+
readonly actor: "mt-[0.1875rem] min-w-0 text-[0.78125rem] text-default-500 [overflow-wrap:anywhere]";
|
|
14
|
+
readonly empty: "text-[0.875rem] text-default-500";
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
|
+
export interface ActivityTimelineEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
tone: RecordTone;
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
timestamp: ReactNode;
|
|
8
|
+
detail?: ReactNode;
|
|
9
|
+
actor?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface ActivityTimelineProps {
|
|
12
|
+
events: ActivityTimelineEvent[];
|
|
13
|
+
emptyContent?: ReactNode;
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
}
|
|
@@ -35,6 +35,7 @@ export interface AdminTableProps {
|
|
|
35
35
|
footer?: React.ReactNode;
|
|
36
36
|
/** Accessible name. Required: a table with no name is unnavigable by screen reader. */
|
|
37
37
|
ariaLabel: string;
|
|
38
|
+
variant?: 'default' | 'framed';
|
|
38
39
|
className?: string;
|
|
39
40
|
classNames?: AdminTableClassNames;
|
|
40
41
|
'data-testid'?: string;
|
|
@@ -42,3 +42,9 @@ export declare const adminRowClass = "border-t border-acct-hair transition-color
|
|
|
42
42
|
export declare const adminTableClass = "w-full";
|
|
43
43
|
/** The strip under the table where a pager sits. */
|
|
44
44
|
export declare const adminTableFooterClass = "border-t border-acct-border px-5 py-3.5";
|
|
45
|
+
export declare const adminTableFramedClass: {
|
|
46
|
+
readonly base: "overflow-x-auto";
|
|
47
|
+
readonly th: "h-auto whitespace-nowrap border-b border-pos-hair bg-transparent px-4 py-[0.875rem] text-left text-[0.6875rem] font-semibold uppercase leading-[1.5] tracking-[.055em] text-default-500 first:rounded-none last:rounded-none last:pr-3";
|
|
48
|
+
readonly tr: "border-t border-pos-hair transition-colors duration-[120ms] first:border-t-0 data-[focus-visible=true]:outline-offset-[-2px] [tbody>&]:hover:bg-default-50 [tbody>&]:data-[hover=true]:bg-default-50 motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
49
|
+
readonly td: "h-[3.875rem] px-4 data-[focus-visible=true]:outline-offset-[-2px] py-[0.625rem] align-middle text-[0.875rem] text-default-900 last:pr-3";
|
|
50
|
+
};
|
|
@@ -14,6 +14,7 @@ export interface AdminToolbarProps {
|
|
|
14
14
|
trailing?: React.ReactNode;
|
|
15
15
|
/** Search box width. `'md'` (280px) by default, `'lg'` (360px) for wide tables. */
|
|
16
16
|
searchWidth?: 'md' | 'lg';
|
|
17
|
+
variant?: 'default' | 'framed';
|
|
17
18
|
className?: string;
|
|
18
19
|
'data-testid'?: string;
|
|
19
20
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const amountListClass: {
|
|
2
|
+
readonly base: "w-full";
|
|
3
|
+
readonly list: "m-0 list-none p-0";
|
|
4
|
+
readonly item: "border-t border-pos-hair";
|
|
5
|
+
readonly row: "flex w-full items-start gap-3 px-5 py-3 text-left";
|
|
6
|
+
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";
|
|
7
|
+
readonly dot: "mt-[0.4375rem] size-[0.4375rem] shrink-0 rounded-full";
|
|
8
|
+
readonly body: "flex min-w-0 flex-1 flex-col";
|
|
9
|
+
readonly title: "text-[0.875rem] font-semibold text-default-900 [overflow-wrap:anywhere] [text-wrap:pretty]";
|
|
10
|
+
readonly meta: "mt-1 flex min-w-0 flex-wrap items-center gap-[0.4375rem] text-[0.78125rem] text-default-500";
|
|
11
|
+
readonly reference: "min-w-0 font-normal text-primary [overflow-wrap:anywhere]";
|
|
12
|
+
readonly separator: "text-default-400";
|
|
13
|
+
readonly timestamp: "tabular-nums";
|
|
14
|
+
readonly detail: "mt-[0.1875rem] text-[0.78125rem] text-default-500 [overflow-wrap:anywhere] [text-wrap:pretty]";
|
|
15
|
+
readonly trailing: "max-w-[45%] min-w-min shrink-0 text-right text-[0.90625rem]";
|
|
16
|
+
readonly amount: "whitespace-nowrap text-[0.90625rem] font-bold tabular-nums text-default-900";
|
|
17
|
+
readonly note: "text-[0.78125rem] italic text-default-500 [overflow-wrap:anywhere]";
|
|
18
|
+
readonly footer: "flex items-baseline gap-3 border-t border-pos-line bg-pos-page px-5 py-[0.8125rem]";
|
|
19
|
+
readonly footerLabel: "min-w-0 text-[0.875rem] font-bold text-default-900 [overflow-wrap:anywhere]";
|
|
20
|
+
readonly footerAmount: "ml-auto whitespace-nowrap text-[1rem] font-bold tabular-nums text-default-900";
|
|
21
|
+
readonly footerNote: "border-t border-pos-hair px-5 py-[0.8125rem] text-[0.78125rem] leading-[1.6] text-default-500";
|
|
22
|
+
readonly empty: "px-5 pb-5 pt-[0.875rem] text-[0.875rem] text-default-500";
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
|
+
export interface AmountListRow {
|
|
4
|
+
id: string;
|
|
5
|
+
tone: RecordTone;
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
reference?: ReactNode;
|
|
8
|
+
timestamp?: ReactNode;
|
|
9
|
+
detail?: ReactNode;
|
|
10
|
+
amount?: ReactNode;
|
|
11
|
+
amountTone?: 'positive' | 'negative' | 'neutral';
|
|
12
|
+
note?: ReactNode;
|
|
13
|
+
noteTone?: 'muted' | 'warn';
|
|
14
|
+
}
|
|
15
|
+
export interface AmountListProps {
|
|
16
|
+
rows: AmountListRow[];
|
|
17
|
+
footer?: {
|
|
18
|
+
label: ReactNode;
|
|
19
|
+
amount: ReactNode;
|
|
20
|
+
amountTone?: 'positive' | 'negative' | 'neutral';
|
|
21
|
+
note?: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
emptyContent?: ReactNode;
|
|
24
|
+
onSelect?: (id: string) => void;
|
|
25
|
+
'data-testid'?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const cardListClass: {
|
|
2
|
+
readonly base: "w-full";
|
|
3
|
+
readonly list: "m-0 list-none p-0";
|
|
4
|
+
readonly item: "border-b border-pos-hair last:border-b-0";
|
|
5
|
+
readonly card: "block w-full px-4 py-[0.875rem] text-left";
|
|
6
|
+
readonly cardInteractive: "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";
|
|
7
|
+
readonly headline: "flex items-baseline gap-2.5";
|
|
8
|
+
readonly title: "min-w-0 text-[0.90625rem] font-semibold text-primary [overflow-wrap:anywhere]";
|
|
9
|
+
readonly amount: "ml-auto shrink-0 whitespace-nowrap text-[0.9375rem] font-bold tabular-nums text-default-900";
|
|
10
|
+
readonly chips: "mt-[0.5625rem] flex flex-wrap gap-1.5";
|
|
11
|
+
readonly rows: "mt-[0.5625rem] block";
|
|
12
|
+
readonly row: "flex items-baseline gap-3 py-[0.1875rem] text-[0.8125rem]";
|
|
13
|
+
readonly rowLabel: "shrink-0 text-default-500";
|
|
14
|
+
readonly rowValue: "ml-auto min-w-0 text-right text-default-700 [overflow-wrap:anywhere]";
|
|
15
|
+
readonly skeletonRow: "border-b border-pos-hair p-4 last:border-b-0";
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CardListItem {
|
|
3
|
+
id: string;
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
amount?: ReactNode;
|
|
6
|
+
chips?: ReactNode;
|
|
7
|
+
rows?: Array<{
|
|
8
|
+
label: string;
|
|
9
|
+
value: ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export interface CardListProps {
|
|
13
|
+
items: CardListItem[];
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
onSelect?: (id: string) => void;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
skeletonCount?: number;
|
|
18
|
+
'data-testid'?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type CardStackLayout = 'stack' | 'grid';
|
|
3
|
+
export interface CardStackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
layout?: CardStackLayout;
|
|
5
|
+
'data-testid'?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const CardStack: React.FC<CardStackProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SignedAmountTone } from '../shared/recordTone';
|
|
3
|
+
export type CellTextVariant = 'text' | 'reference' | 'amount';
|
|
4
|
+
export interface CellTextProps {
|
|
5
|
+
variant?: CellTextVariant;
|
|
6
|
+
tone?: SignedAmountTone;
|
|
7
|
+
secondary?: React.ReactNode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const CellText: React.FC<CellTextProps>;
|
|
12
|
+
export interface ChipStackProps {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const ChipStack: React.FC<ChipStackProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CellTextVariant } from './CellText';
|
|
2
|
+
export declare const cellTextClass: {
|
|
3
|
+
readonly base: "whitespace-nowrap text-[0.875rem]";
|
|
4
|
+
readonly secondary: "text-default-500";
|
|
5
|
+
readonly chipStack: "inline-flex flex-col items-start gap-[0.3125rem]";
|
|
6
|
+
};
|
|
7
|
+
export declare const cellTextVariantClass: Record<CellTextVariant, string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const filterSelectClass: {
|
|
2
|
+
readonly base: "relative inline-grid min-w-[10.75rem] grid-cols-[minmax(0,1fr)]";
|
|
3
|
+
readonly baseActive: "max-w-[20rem]";
|
|
4
|
+
readonly cell: "[grid-area:1/1]";
|
|
5
|
+
readonly sizer: "invisible h-0 overflow-hidden whitespace-nowrap border-x-2 border-transparent pl-2 pr-[4.8125rem] text-[0.875rem] font-semibold";
|
|
6
|
+
readonly select: "w-full";
|
|
7
|
+
readonly trigger: "h-[2.375rem] min-h-[2.375rem] rounded-[0.625rem] border-medium border-pos-field bg-white px-2 shadow-none data-[hover=true]:border-default-300 data-[focus=true]:border-primary data-[open=true]:border-primary data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-primary data-[focus-visible=true]:ring-offset-1";
|
|
8
|
+
readonly triggerActive: "!border-acct-rust-border !bg-acct-rust-fill pr-[3.25rem]";
|
|
9
|
+
readonly value: "text-[0.875rem] !text-default-900";
|
|
10
|
+
readonly valueActive: "font-semibold !text-primary-600";
|
|
11
|
+
readonly iconActive: "!text-primary-600";
|
|
12
|
+
readonly clear: "absolute right-[1.875rem] top-1/2 z-20 inline-flex size-[1.25rem] -translate-y-1/2 items-center justify-center rounded-md text-primary-600 outline-none hover:bg-white/70 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary";
|
|
13
|
+
readonly clearIcon: "size-[0.8125rem]";
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FilterSelectOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface FilterSelectProps {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string | null;
|
|
8
|
+
options: FilterSelectOption[];
|
|
9
|
+
onChange: (value: string | null) => void;
|
|
10
|
+
clearLabel: string;
|
|
11
|
+
minWidth?: number;
|
|
12
|
+
'data-testid'?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface KeyValueRow {
|
|
3
|
+
id?: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export type KeyValueRowsDensity = 'regular' | 'compact';
|
|
8
|
+
export interface KeyValueRowsProps {
|
|
9
|
+
rows: KeyValueRow[];
|
|
10
|
+
density?: KeyValueRowsDensity;
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const KeyValueRows: React.FC<KeyValueRowsProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KeyValueRowsDensity } from './KeyValueRows';
|
|
2
|
+
export declare const keyValueRowsClass: {
|
|
3
|
+
readonly list: "m-0 divide-y divide-pos-hair";
|
|
4
|
+
readonly row: "flex items-baseline gap-3";
|
|
5
|
+
readonly label: "min-w-0 text-[0.84375rem] text-default-500";
|
|
6
|
+
readonly value: "m-0 ml-auto flex min-w-0 flex-wrap justify-end gap-[0.3125rem] text-right text-[0.875rem] text-default-900 [overflow-wrap:anywhere]";
|
|
7
|
+
};
|
|
8
|
+
export declare const keyValueRowPadding: Record<KeyValueRowsDensity, string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface LineItemRow {
|
|
3
|
+
id: string;
|
|
4
|
+
name: React.ReactNode;
|
|
5
|
+
details?: React.ReactNode[];
|
|
6
|
+
amount: React.ReactNode;
|
|
7
|
+
originalAmount?: React.ReactNode;
|
|
8
|
+
chip?: React.ReactNode;
|
|
9
|
+
tone?: 'violet';
|
|
10
|
+
}
|
|
11
|
+
export interface LineItemRowsProps {
|
|
12
|
+
items: LineItemRow[];
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
originalAmountLabel?: string;
|
|
15
|
+
'data-testid'?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const LineItemRows: React.FC<LineItemRowsProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const lineItemRowsClass: {
|
|
2
|
+
readonly list: "m-0 list-none p-0";
|
|
3
|
+
readonly row: "flex items-start gap-[0.875rem] border-t border-pos-hair px-5 py-3";
|
|
4
|
+
readonly body: "min-w-0 flex-1";
|
|
5
|
+
readonly name: "text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere] [text-wrap:pretty]";
|
|
6
|
+
readonly details: "mt-[0.3125rem] flex flex-wrap items-center gap-[0.4375rem] text-[0.8125rem] text-default-500";
|
|
7
|
+
readonly separator: "text-default-400";
|
|
8
|
+
readonly detail: "tabular-nums";
|
|
9
|
+
readonly trailing: "flex shrink-0 flex-col items-end gap-1.5 text-right";
|
|
10
|
+
readonly amounts: "inline-flex items-baseline gap-2";
|
|
11
|
+
readonly original: "text-[0.8125rem] tabular-nums text-default-500 line-through";
|
|
12
|
+
readonly amount: "whitespace-nowrap text-[0.9375rem] font-bold tabular-nums text-default-900";
|
|
13
|
+
};
|
|
@@ -38,6 +38,8 @@ export interface ListPanelProps {
|
|
|
38
38
|
emptyContent?: React.ReactNode;
|
|
39
39
|
/** The table/list rendered when none of the async states apply. */
|
|
40
40
|
children?: React.ReactNode;
|
|
41
|
+
toolbar?: React.ReactNode;
|
|
42
|
+
variant?: 'default' | 'framed';
|
|
41
43
|
className?: string;
|
|
42
44
|
classNames?: ListPanelClassNames;
|
|
43
45
|
'data-testid'?: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const loadMoreFooterClass: {
|
|
2
|
+
readonly base: "flex flex-wrap items-center justify-center gap-2.5 border-t border-pos-hair px-5 py-[0.875rem] text-[0.84375rem] text-default-500";
|
|
3
|
+
readonly idle: "w-full";
|
|
4
|
+
readonly sentinel: "h-px w-full";
|
|
5
|
+
readonly spinner: "inline-flex";
|
|
6
|
+
readonly error: "text-pos-danger";
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type LoadMoreStatus = 'idle' | 'loading' | 'error' | 'end';
|
|
2
|
+
export interface LoadMoreFooterProps {
|
|
3
|
+
status: LoadMoreStatus;
|
|
4
|
+
onLoadMore: () => void;
|
|
5
|
+
loadingLabel: string;
|
|
6
|
+
errorLabel: string;
|
|
7
|
+
retryLabel: string;
|
|
8
|
+
endLabel?: string;
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
}
|
|
@@ -26,6 +26,7 @@ export interface PageHeaderProps {
|
|
|
26
26
|
actions?: React.ReactNode;
|
|
27
27
|
/** Heading level for the title element. Default `'h1'`. */
|
|
28
28
|
titleAs?: 'h1' | 'h2' | 'h3';
|
|
29
|
+
variant?: 'default' | 'list';
|
|
29
30
|
className?: string;
|
|
30
31
|
classNames?: PageHeaderClassNames;
|
|
31
32
|
'data-testid'?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DEFAULT_PILL_TABS_ID = "pill-tabs";
|
|
2
|
+
export declare const pillTabId: (key: string, idPrefix?: string) => string;
|
|
3
|
+
export declare const pillTabPanelId: (key: string, idPrefix?: string) => string;
|
|
4
|
+
export declare const pillTabPanelProps: (key: string, idPrefix?: string) => {
|
|
5
|
+
role: "tabpanel";
|
|
6
|
+
id: string;
|
|
7
|
+
'aria-labelledby': string;
|
|
8
|
+
tabIndex: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const pillTabsClass: {
|
|
2
|
+
readonly base: "mb-3.5 w-full";
|
|
3
|
+
readonly tabList: "w-full gap-1 rounded-full border border-pos-line bg-default-100 p-1";
|
|
4
|
+
readonly cursor: "rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,.10)]";
|
|
5
|
+
readonly tab: "h-auto flex-1 px-[0.875rem] py-[0.5625rem] data-[hover-unselected=true]:opacity-100";
|
|
6
|
+
readonly tabStill: "rounded-full data-[selected=true]:bg-white data-[selected=true]:shadow-[0_1px_3px_rgba(0,0,0,.10)]";
|
|
7
|
+
readonly tabContent: "text-[0.84375rem] leading-[1.5] font-normal text-default-600 group-data-[selected=true]:font-semibold group-data-[selected=true]:text-default-900";
|
|
8
|
+
readonly title: "inline-flex items-center gap-[0.4375rem] whitespace-nowrap";
|
|
9
|
+
readonly count: "rounded-full bg-default-200 px-[0.4375rem] py-px text-[0.71875rem] leading-[1.5] font-semibold text-default-600 group-data-[selected=true]:bg-acct-rust-fill group-data-[selected=true]:text-primary-600";
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PillTabItem {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
count?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PillTabsProps {
|
|
7
|
+
items: PillTabItem[];
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (key: string) => void;
|
|
10
|
+
ariaLabel: string;
|
|
11
|
+
idPrefix?: string;
|
|
12
|
+
'data-testid'?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RecordCardBody, 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 shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
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 recordCardHeaderClass: Record<RecordCardVariant, string>;
|
|
15
|
+
export declare const recordCardBodyClass: Record<RecordCardVariant, Record<RecordCardBody, string>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type RecordCardVariant = 'section' | 'aside';
|
|
3
|
+
export type RecordCardBody = 'padded' | 'rows' | 'flush' | 'none';
|
|
4
|
+
export interface RecordCardProps {
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
titleAs?: 'h2' | 'h3' | 'h4';
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
count?: ReactNode;
|
|
9
|
+
badge?: ReactNode;
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
footer?: ReactNode;
|
|
13
|
+
variant?: RecordCardVariant;
|
|
14
|
+
body?: RecordCardBody;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
}
|
|
@@ -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>;
|