@pallasoft/ps-mobile-components 1.8.1 → 1.10.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/components/ps-record-preview/index.d.ts +2 -0
- package/dist/components/ps-record-preview/index.js +2 -0
- package/dist/components/ps-record-preview/ps-record-preview-props.d.ts +14 -0
- package/dist/components/ps-record-preview/ps-record-preview-props.js +1 -0
- package/dist/components/ps-record-preview/ps-record-preview.d.ts +2 -0
- package/dist/components/ps-record-preview/ps-record-preview.js +21 -0
- package/dist/constants/ps-record-preview-config.d.ts +5 -0
- package/dist/constants/ps-record-preview-config.js +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { PsAmountDirection } from '../../services/ps-amount-tone-service';
|
|
3
|
+
import type { PsListRowBadge } from '../ps-list/ps-list-props';
|
|
4
|
+
export interface PsRecordPreviewAmount {
|
|
5
|
+
direction?: PsAmountDirection;
|
|
6
|
+
formatted: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PsRecordPreviewProps {
|
|
9
|
+
amount?: PsRecordPreviewAmount;
|
|
10
|
+
badge?: PsListRowBadge;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { PsRecordPreviewConfig } from '../../constants/ps-record-preview-config';
|
|
4
|
+
import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
|
|
5
|
+
import { PsAmountText } from '../ps-amount-text/ps-amount-text';
|
|
6
|
+
import { PsBadge } from '../ps-badge/ps-badge';
|
|
7
|
+
import { PsText } from '../ps-text/ps-text';
|
|
8
|
+
export const PsRecordPreview = ({ amount, badge, children, subtitle, title, }) => {
|
|
9
|
+
const theme = usePsMobileTheme();
|
|
10
|
+
return (_jsxs(View, { style: {
|
|
11
|
+
backgroundColor: theme.surface,
|
|
12
|
+
flex: 1,
|
|
13
|
+
gap: PsRecordPreviewConfig.gap,
|
|
14
|
+
padding: PsRecordPreviewConfig.padding,
|
|
15
|
+
}, children: [_jsxs(View, { style: {
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
flexDirection: 'row',
|
|
18
|
+
gap: PsRecordPreviewConfig.gap,
|
|
19
|
+
justifyContent: 'space-between',
|
|
20
|
+
}, children: [_jsx(View, { style: { flexShrink: 1 }, children: _jsx(PsText, { numberOfLines: PsRecordPreviewConfig.titleLines, variant: 'heading', children: title }) }), badge === undefined ? null : _jsx(PsBadge, { tone: badge.tone, children: badge.label })] }), amount === undefined ? null : (_jsx(PsAmountText, { direction: amount.direction, formatted: amount.formatted })), subtitle === undefined ? null : _jsx(PsText, { tone: 'muted', children: subtitle }), children] }));
|
|
21
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './components/ps-chart-legend';
|
|
|
12
12
|
export * from './components/ps-chart-skeleton';
|
|
13
13
|
export * from './components/ps-date-field';
|
|
14
14
|
export * from './components/ps-document-preview';
|
|
15
|
+
export * from './components/ps-document-preview-face';
|
|
15
16
|
export * from './components/ps-document-viewer';
|
|
16
17
|
export * from './components/ps-donut-chart';
|
|
17
18
|
export * from './components/ps-waterfall-chart';
|
|
@@ -27,6 +28,7 @@ export * from './components/ps-page-backdrop';
|
|
|
27
28
|
export * from './components/ps-pallasoft-sign-in-button';
|
|
28
29
|
export * from './components/ps-color-swatches';
|
|
29
30
|
export * from './components/ps-count-badge';
|
|
31
|
+
export * from './components/ps-record-preview';
|
|
30
32
|
export * from './components/ps-segmented-control';
|
|
31
33
|
export * from './components/ps-selection-mode';
|
|
32
34
|
export * from './components/ps-tab-bar-provider';
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export * from './components/ps-chart-legend';
|
|
|
12
12
|
export * from './components/ps-chart-skeleton';
|
|
13
13
|
export * from './components/ps-date-field';
|
|
14
14
|
export * from './components/ps-document-preview';
|
|
15
|
+
export * from './components/ps-document-preview-face';
|
|
15
16
|
export * from './components/ps-document-viewer';
|
|
16
17
|
export * from './components/ps-donut-chart';
|
|
17
18
|
export * from './components/ps-waterfall-chart';
|
|
@@ -27,6 +28,7 @@ export * from './components/ps-page-backdrop';
|
|
|
27
28
|
export * from './components/ps-pallasoft-sign-in-button';
|
|
28
29
|
export * from './components/ps-color-swatches';
|
|
29
30
|
export * from './components/ps-count-badge';
|
|
31
|
+
export * from './components/ps-record-preview';
|
|
30
32
|
export * from './components/ps-segmented-control';
|
|
31
33
|
export * from './components/ps-selection-mode';
|
|
32
34
|
export * from './components/ps-tab-bar-provider';
|
package/package.json
CHANGED