@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.
@@ -0,0 +1,2 @@
1
+ export * from './ps-record-preview';
2
+ export * from './ps-record-preview-props';
@@ -0,0 +1,2 @@
1
+ export * from './ps-record-preview';
2
+ export * from './ps-record-preview-props';
@@ -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,2 @@
1
+ import type { PsRecordPreviewProps } from './ps-record-preview-props';
2
+ export declare const PsRecordPreview: ({ amount, badge, children, subtitle, title, }: PsRecordPreviewProps) => import("react").JSX.Element;
@@ -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
+ };
@@ -0,0 +1,5 @@
1
+ export declare const PsRecordPreviewConfig: {
2
+ readonly gap: 8;
3
+ readonly padding: 20;
4
+ readonly titleLines: 1;
5
+ };
@@ -0,0 +1,5 @@
1
+ export const PsRecordPreviewConfig = {
2
+ gap: 8,
3
+ padding: 20,
4
+ titleLines: 1,
5
+ };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pallasoft/ps-mobile-components",
3
- "version": "1.8.1",
3
+ "version": "1.10.0",
4
4
  "private": false,
5
5
  "description": "Native iOS (SwiftUI) and Android (Jetpack Compose) Ps components for Pallasoft mobile apps",
6
6
  "main": "./dist/index.js",