@pallasoft/ps-core-components 2.4.0 → 2.6.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-action-tile.d.ts +2 -1
- package/dist/components/ps-action-tile.js +2 -1
- package/dist/components/ps-badge.d.ts +2 -1
- package/dist/components/ps-badge.js +2 -1
- package/dist/components/ps-card.d.ts +2 -1
- package/dist/components/ps-card.js +3 -1
- package/dist/components/ps-list-tile.d.ts +2 -1
- package/dist/components/ps-list-tile.js +3 -1
- package/dist/components/ps-metric-card.d.ts +2 -1
- package/dist/components/ps-metric-card.js +3 -1
- package/dist/components/ps-pill.d.ts +2 -1
- package/dist/components/ps-pill.js +2 -1
- package/dist/components/ps-reflective-app-shell.js +1 -1
- package/dist/components/ps-section-header.js +1 -1
- package/dist/components/ps-skeleton-card.d.ts +4 -0
- package/dist/components/ps-skeleton-card.js +9 -0
- package/dist/components/ps-skeleton-group.d.ts +7 -0
- package/dist/components/ps-skeleton-group.js +6 -0
- package/dist/components/ps-skeleton-list.d.ts +8 -0
- package/dist/components/ps-skeleton-list.js +10 -0
- package/dist/components/ps-skeleton-table.d.ts +7 -0
- package/dist/components/ps-skeleton-table.js +15 -0
- package/dist/components/ps-skeleton-text.d.ts +5 -0
- package/dist/components/ps-skeleton-text.js +12 -0
- package/dist/components/ps-skeleton.d.ts +3 -1
- package/dist/components/ps-skeleton.js +6 -1
- package/dist/constants/ps-skeleton-config.d.ts +3 -0
- package/dist/constants/ps-skeleton-config.js +6 -0
- package/dist/esm/components/ps-action-tile.js +2 -1
- package/dist/esm/components/ps-badge.js +2 -1
- package/dist/esm/components/ps-card.js +3 -1
- package/dist/esm/components/ps-list-tile.js +3 -1
- package/dist/esm/components/ps-metric-card.js +3 -1
- package/dist/esm/components/ps-pill.js +2 -1
- package/dist/esm/components/ps-reflective-app-shell.js +1 -1
- package/dist/esm/components/ps-section-header.js +1 -1
- package/dist/esm/components/ps-skeleton-card.js +5 -0
- package/dist/esm/components/ps-skeleton-group.js +2 -0
- package/dist/esm/components/ps-skeleton-list.js +6 -0
- package/dist/esm/components/ps-skeleton-table.js +11 -0
- package/dist/esm/components/ps-skeleton-text.js +8 -0
- package/dist/esm/components/ps-skeleton.js +6 -1
- package/dist/esm/constants/ps-skeleton-config.js +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/package.json +1 -1
|
@@ -2,7 +2,8 @@ import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
export interface PsActionTileProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
3
|
description?: string;
|
|
4
4
|
icon?: ReactNode;
|
|
5
|
+
isLoading?: boolean;
|
|
5
6
|
label: string;
|
|
6
7
|
variant?: 'default' | 'primary';
|
|
7
8
|
}
|
|
8
|
-
export declare const PsActionTile: ({ className, description, icon, label, type, variant, ...props }: PsActionTileProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const PsActionTile: ({ className, description, icon, isLoading, label, type, variant, ...props }: PsActionTileProps) => import("react").JSX.Element;
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsActionTile = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
6
7
|
const variantClassNames = {
|
|
7
8
|
default: 'ps-action-tile',
|
|
8
9
|
primary: 'ps-action-tile ps-action-tile-primary',
|
|
9
10
|
};
|
|
10
|
-
const PsActionTile = ({ className, description, icon, label, type = 'button', variant = 'default', ...props }) => ((0, jsx_runtime_1.jsxs)("button", { className: ps_design_system_1.PallasoftClassNameService.merge('ps-focus-ring w-full', variantClassNames[variant], className), type: type, ...props, children: [(0, jsx_runtime_1.jsxs)("span", { className: 'min-w-0', children: [(0, jsx_runtime_1.jsx)("span", { className: 'block break-words', children: label }), description ? ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('mt-0.5 block text-xs font-medium leading-5', variant === 'primary' ? 'text-white/75' : 'text-ink/50'), children: description })) : null] }), icon ? ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('flex h-9 w-9 shrink-0 items-center justify-center rounded-lg', variant === 'primary' ? 'bg-white/15 text-white' : 'ps-icon-surface'), children: icon })) : null] }));
|
|
11
|
+
const PsActionTile = ({ className, description, icon, isLoading = false, label, type = 'button', variant = 'default', ...props }) => isLoading ? ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: ps_design_system_1.PallasoftClassNameService.merge('h-16 w-full rounded-ps-card', className), shape: 'block' })) : ((0, jsx_runtime_1.jsxs)("button", { className: ps_design_system_1.PallasoftClassNameService.merge('ps-focus-ring w-full', variantClassNames[variant], className), type: type, ...props, children: [(0, jsx_runtime_1.jsxs)("span", { className: 'min-w-0', children: [(0, jsx_runtime_1.jsx)("span", { className: 'block break-words', children: label }), description ? ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('mt-0.5 block text-xs font-medium leading-5', variant === 'primary' ? 'text-white/75' : 'text-ink/50'), children: description })) : null] }), icon ? ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('flex h-9 w-9 shrink-0 items-center justify-center rounded-lg', variant === 'primary' ? 'bg-white/15 text-white' : 'ps-icon-surface'), children: icon })) : null] }));
|
|
11
12
|
exports.PsActionTile = PsActionTile;
|
|
@@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
export interface PsBadgeProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
className?: string;
|
|
5
|
+
isLoading?: boolean;
|
|
5
6
|
tone?: 'danger' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
6
7
|
}
|
|
7
|
-
export declare const PsBadge: ({ children, className, tone }: PsBadgeProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const PsBadge: ({ children, className, isLoading, tone, }: PsBadgeProps) => import("react").JSX.Element;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsBadge = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
6
7
|
const toneClassNames = {
|
|
7
8
|
danger: 'bg-danger-soft text-danger dark:bg-rose-500/18 dark:text-rose-100',
|
|
8
9
|
neutral: 'bg-slate-100 text-slate-700 dark:bg-white/10 dark:text-slate-100',
|
|
@@ -10,5 +11,5 @@ const toneClassNames = {
|
|
|
10
11
|
success: 'bg-success-soft text-emerald-700 dark:bg-emerald-400/18 dark:text-emerald-50',
|
|
11
12
|
warning: 'bg-warning-soft text-amber-800 dark:bg-amber-400/18 dark:text-amber-50',
|
|
12
13
|
};
|
|
13
|
-
const PsBadge = ({ children, className, tone = 'neutral' }) => ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('inline-flex min-h-7 w-fit items-center justify-center whitespace-nowrap rounded-full px-3 py-0.5 text-center text-xs font-semibold capitalize', toneClassNames[tone], className), children: children }));
|
|
14
|
+
const PsBadge = ({ children, className, isLoading = false, tone = 'neutral', }) => isLoading ? ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: ps_design_system_1.PallasoftClassNameService.merge('h-7 w-20', className), shape: 'block' })) : ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('inline-flex min-h-7 w-fit items-center justify-center whitespace-nowrap rounded-full px-3 py-0.5 text-center text-xs font-semibold capitalize', toneClassNames[tone], className), children: children }));
|
|
14
15
|
exports.PsBadge = PsBadge;
|
|
@@ -4,8 +4,9 @@ export interface PsCardProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
density?: 'compact' | 'normal' | 'spacious';
|
|
6
6
|
eyebrow?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
7
8
|
title?: string;
|
|
8
9
|
trailing?: ReactNode;
|
|
9
10
|
variant?: 'default' | 'elevated' | 'glass' | 'muted';
|
|
10
11
|
}
|
|
11
|
-
export declare const PsCard: ({ children, className, density, eyebrow, title, trailing, variant, }: PsCardProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const PsCard: ({ children, className, density, eyebrow, isLoading, title, trailing, variant, }: PsCardProps) => import("react").JSX.Element;
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsCard = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
7
|
+
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
6
8
|
const densityClassNames = {
|
|
7
9
|
compact: 'p-3',
|
|
8
10
|
normal: 'p-4',
|
|
@@ -14,5 +16,5 @@ const variantClassNames = {
|
|
|
14
16
|
glass: 'ps-glass',
|
|
15
17
|
muted: 'ps-card-muted',
|
|
16
18
|
};
|
|
17
|
-
const PsCard = ({ children, className, density = 'normal', eyebrow, title, trailing, variant = 'default', }) => ((0, jsx_runtime_1.jsxs)("section", { className: ps_design_system_1.PallasoftClassNameService.merge('min-w-0 overflow-hidden rounded-ps-card', variantClassNames[variant], densityClassNames[density], className), children: [title ? ((0, jsx_runtime_1.jsxs)("div", { className: 'mb-3 flex min-w-0 items-start justify-between gap-3', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'min-w-0', children: [eyebrow ? (0, jsx_runtime_1.jsx)("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, (0, jsx_runtime_1.jsx)("h2", { className: 'mt-1 break-words text-base font-bold text-ink', children: title })] }), trailing ? (0, jsx_runtime_1.jsx)("div", { className: 'shrink-0', children: trailing }) : null] })) : null, children] }));
|
|
19
|
+
const PsCard = ({ children, className, density = 'normal', eyebrow, isLoading = false, title, trailing, variant = 'default', }) => isLoading ? ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: ps_design_system_1.PallasoftClassNameService.merge('flex min-w-0 flex-col gap-3 rounded-ps-card', variantClassNames[variant], densityClassNames[density], className), label: title === undefined ? 'Loading' : title, children: [(0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-3 w-32' }), (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-20 w-full', shape: 'block' })] })) : ((0, jsx_runtime_1.jsxs)("section", { className: ps_design_system_1.PallasoftClassNameService.merge('min-w-0 overflow-hidden rounded-ps-card', variantClassNames[variant], densityClassNames[density], className), children: [title ? ((0, jsx_runtime_1.jsxs)("div", { className: 'mb-3 flex min-w-0 items-start justify-between gap-3', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'min-w-0', children: [eyebrow ? (0, jsx_runtime_1.jsx)("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, (0, jsx_runtime_1.jsx)("h2", { className: 'mt-1 break-words text-base font-bold text-ink', children: title })] }), trailing ? (0, jsx_runtime_1.jsx)("div", { className: 'shrink-0', children: trailing }) : null] })) : null, children] }));
|
|
18
20
|
exports.PsCard = PsCard;
|
|
@@ -4,9 +4,10 @@ export interface PsListTileProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
density?: 'compact' | 'normal';
|
|
6
6
|
eyebrow?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
7
8
|
isPrivateTitle?: boolean;
|
|
8
9
|
subtitle?: string;
|
|
9
10
|
title: ReactNode;
|
|
10
11
|
variant?: 'card' | 'row';
|
|
11
12
|
}
|
|
12
|
-
export declare const PsListTile: ({ children, className, density, eyebrow, isPrivateTitle, subtitle, title, variant, }: PsListTileProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const PsListTile: ({ children, className, density, eyebrow, isLoading, isPrivateTitle, subtitle, title, variant, }: PsListTileProps) => import("react").JSX.Element;
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsListTile = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
7
|
+
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
6
8
|
const densityClassNames = {
|
|
7
9
|
compact: 'py-2',
|
|
8
10
|
normal: 'py-2.5',
|
|
@@ -11,5 +13,5 @@ const variantClassNames = {
|
|
|
11
13
|
card: 'ps-surface px-3',
|
|
12
14
|
row: 'border-b border-line/70 px-0 last:border-b-0',
|
|
13
15
|
};
|
|
14
|
-
const PsListTile = ({ children, className, density = 'normal', eyebrow, isPrivateTitle = false, subtitle, title, variant = 'row', }) => ((0, jsx_runtime_1.jsxs)("div", { className: ps_design_system_1.PallasoftClassNameService.merge('min-w-0 overflow-hidden', variantClassNames[variant], densityClassNames[density], className), children: [eyebrow ? (0, jsx_runtime_1.jsx)("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, (0, jsx_runtime_1.jsx)("p", { className: ps_design_system_1.PallasoftClassNameService.merge('break-words text-sm font-semibold text-ink', eyebrow && 'mt-1', isPrivateTitle && 'private-number'), children: title }), subtitle ? ((0, jsx_runtime_1.jsx)("p", { className: 'mt-1 break-words text-sm leading-5 text-slate-500', children: subtitle })) : null, children] }));
|
|
16
|
+
const PsListTile = ({ children, className, density = 'normal', eyebrow, isLoading = false, isPrivateTitle = false, subtitle, title, variant = 'row', }) => isLoading ? ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: ps_design_system_1.PallasoftClassNameService.merge('flex min-w-0 flex-col gap-2', variantClassNames[variant], densityClassNames[density], className), children: [(0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'w-2/3' }), (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-2.5 w-1/3' })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: ps_design_system_1.PallasoftClassNameService.merge('min-w-0 overflow-hidden', variantClassNames[variant], densityClassNames[density], className), children: [eyebrow ? (0, jsx_runtime_1.jsx)("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, (0, jsx_runtime_1.jsx)("p", { className: ps_design_system_1.PallasoftClassNameService.merge('break-words text-sm font-semibold text-ink', eyebrow && 'mt-1', isPrivateTitle && 'private-number'), children: title }), subtitle ? ((0, jsx_runtime_1.jsx)("p", { className: 'mt-1 break-words text-sm leading-5 text-slate-500', children: subtitle })) : null, children] }));
|
|
15
17
|
exports.PsListTile = PsListTile;
|
|
@@ -3,7 +3,8 @@ export interface PsMetricCardProps {
|
|
|
3
3
|
changeLabel?: string;
|
|
4
4
|
className?: string;
|
|
5
5
|
icon?: ReactNode;
|
|
6
|
+
isLoading?: boolean;
|
|
6
7
|
label: string;
|
|
7
8
|
value: ReactNode;
|
|
8
9
|
}
|
|
9
|
-
export declare const PsMetricCard: ({ changeLabel, className, icon, label, value }: PsMetricCardProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const PsMetricCard: ({ changeLabel, className, icon, isLoading, label, value, }: PsMetricCardProps) => import("react").JSX.Element;
|
|
@@ -3,5 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsMetricCard = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
-
const
|
|
6
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
7
|
+
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
8
|
+
const PsMetricCard = ({ changeLabel, className, icon, isLoading = false, label, value, }) => isLoading ? ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: ps_design_system_1.PallasoftClassNameService.merge('ps-metric-card flex min-w-0 flex-col gap-3 p-3.5 sm:p-4', className), label: label, children: [(0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-2.5 w-24' }), (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-6 w-32' })] })) : ((0, jsx_runtime_1.jsx)("section", { className: ps_design_system_1.PallasoftClassNameService.merge('ps-metric-card min-w-0 p-3.5 sm:p-4', className), children: (0, jsx_runtime_1.jsxs)("div", { className: 'flex items-start justify-between gap-3', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'min-w-0', children: [(0, jsx_runtime_1.jsx)("p", { className: 'ps-eyebrow truncate', children: label }), (0, jsx_runtime_1.jsx)("p", { className: 'mt-2 truncate text-2xl font-semibold text-ink', children: value }), changeLabel ? (0, jsx_runtime_1.jsx)("p", { className: 'mt-1 text-sm text-slate-500', children: changeLabel }) : null] }), icon ? ((0, jsx_runtime_1.jsx)("div", { className: 'flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-soft text-primary', children: icon })) : null] }) }));
|
|
7
9
|
exports.PsMetricCard = PsMetricCard;
|
|
@@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
export interface PsPillProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
className?: string;
|
|
5
|
+
isLoading?: boolean;
|
|
5
6
|
tone?: 'danger' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
6
7
|
}
|
|
7
|
-
export declare const PsPill: ({ children, className, tone }: PsPillProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const PsPill: ({ children, className, isLoading, tone, }: PsPillProps) => import("react").JSX.Element;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsPill = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
6
7
|
const toneClassNames = {
|
|
7
8
|
danger: 'bg-rose-50 text-rose-700 ring-rose-100 dark:bg-rose-500/18 dark:text-rose-100 dark:ring-rose-300/22',
|
|
8
9
|
neutral: 'bg-slate-100 text-slate-700 ring-slate-200 dark:bg-white/10 dark:text-slate-100 dark:ring-white/12',
|
|
@@ -10,5 +11,5 @@ const toneClassNames = {
|
|
|
10
11
|
success: 'bg-emerald-50 text-emerald-700 ring-emerald-100 dark:bg-emerald-400/18 dark:text-emerald-50 dark:ring-emerald-200/22',
|
|
11
12
|
warning: 'bg-amber-50 text-amber-800 ring-amber-100 dark:bg-amber-400/18 dark:text-amber-50 dark:ring-amber-200/24',
|
|
12
13
|
};
|
|
13
|
-
const PsPill = ({ children, className, tone = 'neutral' }) => ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('inline-flex min-h-8 min-w-[5.5rem] max-w-full items-center justify-center rounded-full px-5 py-1 text-center text-[0.72rem] font-black capitalize tracking-[0.01em] ring-1 ring-inset', toneClassNames[tone], className), children: (0, jsx_runtime_1.jsx)("span", { className: 'min-w-0 break-words', children: children }) }));
|
|
14
|
+
const PsPill = ({ children, className, isLoading = false, tone = 'neutral', }) => isLoading ? ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: ps_design_system_1.PallasoftClassNameService.merge('h-8 w-24', className), shape: 'block' })) : ((0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('inline-flex min-h-8 min-w-[5.5rem] max-w-full items-center justify-center rounded-full px-5 py-1 text-center text-[0.72rem] font-black capitalize tracking-[0.01em] ring-1 ring-inset', toneClassNames[tone], className), children: (0, jsx_runtime_1.jsx)("span", { className: 'min-w-0 break-words', children: children }) }));
|
|
14
15
|
exports.PsPill = PsPill;
|
|
@@ -12,6 +12,6 @@ const PsReflectiveAppShell = ({ children, className, contentClassName, frameClas
|
|
|
12
12
|
contentRef.current?.scrollTo({ top: 0, left: 0 });
|
|
13
13
|
window.scrollTo({ top: 0, left: 0 });
|
|
14
14
|
}, [scrollResetKey]);
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)("section", { className: ps_design_system_1.PallasoftClassNameService.merge('ps-reflective-frame
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("section", { className: ps_design_system_1.PallasoftClassNameService.merge('ps-reflective-frame h-[100dvh] overflow-hidden text-ink lg:px-3 lg:py-3', className), children: (0, jsx_runtime_1.jsxs)("div", { className: ps_design_system_1.PallasoftClassNameService.merge('ps-liquid-strong mx-auto grid h-full min-h-0 overflow-hidden border-line/70 bg-white/70 backdrop-blur-2xl transition-[grid-template-columns] duration-200 dark:border-white/10 dark:bg-surface/70 md:grid-cols-[var(--ps-sidebar-width)_minmax(0,1fr)] lg:max-w-[1720px] lg:rounded-[1.5rem] lg:border', frameClassName), style: { ['--ps-sidebar-width']: sidebarWidth }, children: [sidebar, (0, jsx_runtime_1.jsxs)("div", { className: 'flex min-h-0 min-w-0 flex-col bg-white/32 dark:bg-white/[0.02]', children: [topbar, (0, jsx_runtime_1.jsx)("main", { ref: contentRef, className: ps_design_system_1.PallasoftClassNameService.merge('ps-scrollbar min-h-0 flex-1 overflow-y-auto px-4 py-5 ps-page-enter sm:px-5 lg:px-6 xl:px-7', contentClassName), children: children })] })] }) }));
|
|
16
16
|
};
|
|
17
17
|
exports.PsReflectiveAppShell = PsReflectiveAppShell;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PsSectionHeader = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const PsSectionHeader = ({ description, eyebrow, leading, title, trailing, }) => ((0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-1 basis-auto flex-col gap-2', children: [leading, eyebrow ? ((0, jsx_runtime_1.jsx)("p", { className: 'text-[0.68rem] font-semibold uppercase tracking-[0.22em] text-ink/50', children: eyebrow })) : null, (0, jsx_runtime_1.jsx)("h1", { className: 'break-words text-xl font-extrabold text-ink sm:text-2xl', children: title }), description ? ((0, jsx_runtime_1.jsx)("p", { className: 'max-w-3xl text-sm leading-6 text-ink/60', children: description })) : null] }), trailing ? (0, jsx_runtime_1.jsx)("div", { className: '
|
|
5
|
+
const PsSectionHeader = ({ description, eyebrow, leading, title, trailing, }) => ((0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-1 basis-auto flex-col gap-2', children: [leading, eyebrow ? ((0, jsx_runtime_1.jsx)("p", { className: 'text-[0.68rem] font-semibold uppercase tracking-[0.22em] text-ink/50', children: eyebrow })) : null, (0, jsx_runtime_1.jsx)("h1", { className: 'break-words text-xl font-extrabold text-ink sm:text-2xl', children: title }), description ? ((0, jsx_runtime_1.jsx)("p", { className: 'max-w-3xl text-sm leading-6 text-ink/60', children: description })) : null] }), trailing ? ((0, jsx_runtime_1.jsx)("div", { className: 'flex w-full shrink-0 items-center justify-end sm:ml-auto sm:w-auto', children: trailing })) : null] }));
|
|
6
6
|
exports.PsSectionHeader = PsSectionHeader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsSkeletonCard = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
7
|
+
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
8
|
+
const PsSkeletonCard = ({ className }) => ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: ps_design_system_1.PallasoftClassNameService.merge('flex flex-col gap-3 rounded-[1.25rem] border border-line bg-surface p-5', className), children: [(0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-2.5 w-24' }), (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-6 w-32' })] }));
|
|
9
|
+
exports.PsSkeletonCard = PsSkeletonCard;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface PsSkeletonGroupProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const PsSkeletonGroup: ({ children, className, label, }: PsSkeletonGroupProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsSkeletonGroup = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const PsSkeletonGroup = ({ children, className, label = 'Loading', }) => ((0, jsx_runtime_1.jsxs)("div", { "aria-busy": 'true', className: className, role: 'status', children: [(0, jsx_runtime_1.jsx)("span", { className: 'sr-only', children: label }), children] }));
|
|
6
|
+
exports.PsSkeletonGroup = PsSkeletonGroup;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface PsSkeletonListProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
hasLeading?: boolean;
|
|
4
|
+
hasTrailing?: boolean;
|
|
5
|
+
rows?: number;
|
|
6
|
+
title?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const PsSkeletonList: ({ className, hasLeading, hasTrailing, rows, title, }: PsSkeletonListProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsSkeletonList = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_config_1 = require("../constants/ps-skeleton-config");
|
|
7
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
8
|
+
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
9
|
+
const PsSkeletonList = ({ className, hasLeading = false, hasTrailing = true, rows = 4, title = false, }) => ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: ps_design_system_1.PallasoftClassNameService.merge('flex flex-col', className), children: [title ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'mx-3 mb-3 h-2.5 w-24' }) : null, Array.from({ length: rows }, (_, index) => ((0, jsx_runtime_1.jsxs)("div", { className: 'flex min-h-11 items-center gap-3 px-3 py-2.5', children: [hasLeading ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { shape: 'circle' }) : null, (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: ps_skeleton_config_1.PsSkeletonConfig.lineWidths[index % ps_skeleton_config_1.PsSkeletonConfig.lineWidths.length] }), hasTrailing ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'ml-auto h-2.5 w-20 shrink-0' }) : null] }, index)))] }));
|
|
10
|
+
exports.PsSkeletonList = PsSkeletonList;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsSkeletonTable = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_config_1 = require("../constants/ps-skeleton-config");
|
|
7
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
8
|
+
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
9
|
+
const PsSkeletonTable = ({ className, columns = 4, hasToolbar = false, rows = 6, }) => {
|
|
10
|
+
const gridTemplateColumns = `minmax(0, 2fr) repeat(${Math.max(columns - 1, 0)}, minmax(0, 1fr))`;
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: ps_design_system_1.PallasoftClassNameService.merge('flex flex-col gap-3', className), children: [hasToolbar ? ((0, jsx_runtime_1.jsxs)("div", { className: 'flex items-center gap-3', children: [(0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'max-w-sm', shape: 'block' }), (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'ml-auto w-24', shape: 'block' })] })) : null, (0, jsx_runtime_1.jsxs)("div", { className: 'overflow-hidden rounded-[1.25rem] border border-line bg-surface', children: [(0, jsx_runtime_1.jsx)("div", { className: 'grid gap-4 bg-mist/70 px-5 py-4', style: { gridTemplateColumns }, children: Array.from({ length: columns }, (_, index) => ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-2.5 w-16' }, index))) }), Array.from({ length: rows }, (_, rowIndex) => ((0, jsx_runtime_1.jsx)("div", { className: 'grid items-center gap-4 border-t border-line px-5 py-4', style: { gridTemplateColumns }, children: Array.from({ length: columns }, (__, columnIndex) => ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: columnIndex === columns - 1 && columns > 1
|
|
12
|
+
? 'ml-auto w-16'
|
|
13
|
+
: ps_skeleton_config_1.PsSkeletonConfig.lineWidths[(rowIndex + columnIndex) % ps_skeleton_config_1.PsSkeletonConfig.lineWidths.length] }, columnIndex))) }, rowIndex)))] })] }));
|
|
14
|
+
};
|
|
15
|
+
exports.PsSkeletonTable = PsSkeletonTable;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsSkeletonText = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_skeleton_config_1 = require("../constants/ps-skeleton-config");
|
|
7
|
+
const ps_skeleton_1 = require("./ps-skeleton");
|
|
8
|
+
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
9
|
+
const PsSkeletonText = ({ className, lines = 3 }) => ((0, jsx_runtime_1.jsx)(ps_skeleton_group_1.PsSkeletonGroup, { className: ps_design_system_1.PallasoftClassNameService.merge('flex flex-col gap-2.5', className), children: Array.from({ length: lines }, (_, index) => ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: index === lines - 1 && lines > 1
|
|
10
|
+
? 'w-2/3'
|
|
11
|
+
: ps_skeleton_config_1.PsSkeletonConfig.lineWidths[index % ps_skeleton_config_1.PsSkeletonConfig.lineWidths.length] }, index))) }));
|
|
12
|
+
exports.PsSkeletonText = PsSkeletonText;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export type PsSkeletonShape = 'block' | 'circle' | 'line';
|
|
1
2
|
export interface PsSkeletonProps {
|
|
2
3
|
className?: string;
|
|
4
|
+
shape?: PsSkeletonShape;
|
|
3
5
|
}
|
|
4
|
-
export declare const PsSkeleton: ({ className }: PsSkeletonProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const PsSkeleton: ({ className, shape }: PsSkeletonProps) => import("react").JSX.Element;
|
|
@@ -3,5 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsSkeleton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
-
const
|
|
6
|
+
const shapeClassNames = {
|
|
7
|
+
block: 'h-11 w-full rounded-ps-control',
|
|
8
|
+
circle: 'h-9 w-9 shrink-0 rounded-full',
|
|
9
|
+
line: 'h-3 w-full rounded-full',
|
|
10
|
+
};
|
|
11
|
+
const PsSkeleton = ({ className, shape = 'line' }) => ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: ps_design_system_1.PallasoftClassNameService.merge('ps-skeleton', shapeClassNames[shape], className) }));
|
|
7
12
|
exports.PsSkeleton = PsSkeleton;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
3
4
|
const variantClassNames = {
|
|
4
5
|
default: 'ps-action-tile',
|
|
5
6
|
primary: 'ps-action-tile ps-action-tile-primary',
|
|
6
7
|
};
|
|
7
|
-
export const PsActionTile = ({ className, description, icon, label, type = 'button', variant = 'default', ...props }) => (_jsxs("button", { className: PallasoftClassNameService.merge('ps-focus-ring w-full', variantClassNames[variant], className), type: type, ...props, children: [_jsxs("span", { className: 'min-w-0', children: [_jsx("span", { className: 'block break-words', children: label }), description ? (_jsx("span", { className: PallasoftClassNameService.merge('mt-0.5 block text-xs font-medium leading-5', variant === 'primary' ? 'text-white/75' : 'text-ink/50'), children: description })) : null] }), icon ? (_jsx("span", { className: PallasoftClassNameService.merge('flex h-9 w-9 shrink-0 items-center justify-center rounded-lg', variant === 'primary' ? 'bg-white/15 text-white' : 'ps-icon-surface'), children: icon })) : null] }));
|
|
8
|
+
export const PsActionTile = ({ className, description, icon, isLoading = false, label, type = 'button', variant = 'default', ...props }) => isLoading ? (_jsx(PsSkeleton, { className: PallasoftClassNameService.merge('h-16 w-full rounded-ps-card', className), shape: 'block' })) : (_jsxs("button", { className: PallasoftClassNameService.merge('ps-focus-ring w-full', variantClassNames[variant], className), type: type, ...props, children: [_jsxs("span", { className: 'min-w-0', children: [_jsx("span", { className: 'block break-words', children: label }), description ? (_jsx("span", { className: PallasoftClassNameService.merge('mt-0.5 block text-xs font-medium leading-5', variant === 'primary' ? 'text-white/75' : 'text-ink/50'), children: description })) : null] }), icon ? (_jsx("span", { className: PallasoftClassNameService.merge('flex h-9 w-9 shrink-0 items-center justify-center rounded-lg', variant === 'primary' ? 'bg-white/15 text-white' : 'ps-icon-surface'), children: icon })) : null] }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
3
4
|
const toneClassNames = {
|
|
4
5
|
danger: 'bg-danger-soft text-danger dark:bg-rose-500/18 dark:text-rose-100',
|
|
5
6
|
neutral: 'bg-slate-100 text-slate-700 dark:bg-white/10 dark:text-slate-100',
|
|
@@ -7,4 +8,4 @@ const toneClassNames = {
|
|
|
7
8
|
success: 'bg-success-soft text-emerald-700 dark:bg-emerald-400/18 dark:text-emerald-50',
|
|
8
9
|
warning: 'bg-warning-soft text-amber-800 dark:bg-amber-400/18 dark:text-amber-50',
|
|
9
10
|
};
|
|
10
|
-
export const PsBadge = ({ children, className, tone = 'neutral' }) => (_jsx("span", { className: PallasoftClassNameService.merge('inline-flex min-h-7 w-fit items-center justify-center whitespace-nowrap rounded-full px-3 py-0.5 text-center text-xs font-semibold capitalize', toneClassNames[tone], className), children: children }));
|
|
11
|
+
export const PsBadge = ({ children, className, isLoading = false, tone = 'neutral', }) => isLoading ? (_jsx(PsSkeleton, { className: PallasoftClassNameService.merge('h-7 w-20', className), shape: 'block' })) : (_jsx("span", { className: PallasoftClassNameService.merge('inline-flex min-h-7 w-fit items-center justify-center whitespace-nowrap rounded-full px-3 py-0.5 text-center text-xs font-semibold capitalize', toneClassNames[tone], className), children: children }));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
4
|
+
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
3
5
|
const densityClassNames = {
|
|
4
6
|
compact: 'p-3',
|
|
5
7
|
normal: 'p-4',
|
|
@@ -11,4 +13,4 @@ const variantClassNames = {
|
|
|
11
13
|
glass: 'ps-glass',
|
|
12
14
|
muted: 'ps-card-muted',
|
|
13
15
|
};
|
|
14
|
-
export const PsCard = ({ children, className, density = 'normal', eyebrow, title, trailing, variant = 'default', }) => (_jsxs("section", { className: PallasoftClassNameService.merge('min-w-0 overflow-hidden rounded-ps-card', variantClassNames[variant], densityClassNames[density], className), children: [title ? (_jsxs("div", { className: 'mb-3 flex min-w-0 items-start justify-between gap-3', children: [_jsxs("div", { className: 'min-w-0', children: [eyebrow ? _jsx("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, _jsx("h2", { className: 'mt-1 break-words text-base font-bold text-ink', children: title })] }), trailing ? _jsx("div", { className: 'shrink-0', children: trailing }) : null] })) : null, children] }));
|
|
16
|
+
export const PsCard = ({ children, className, density = 'normal', eyebrow, isLoading = false, title, trailing, variant = 'default', }) => isLoading ? (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('flex min-w-0 flex-col gap-3 rounded-ps-card', variantClassNames[variant], densityClassNames[density], className), label: title === undefined ? 'Loading' : title, children: [_jsx(PsSkeleton, { className: 'h-3 w-32' }), _jsx(PsSkeleton, { className: 'h-20 w-full', shape: 'block' })] })) : (_jsxs("section", { className: PallasoftClassNameService.merge('min-w-0 overflow-hidden rounded-ps-card', variantClassNames[variant], densityClassNames[density], className), children: [title ? (_jsxs("div", { className: 'mb-3 flex min-w-0 items-start justify-between gap-3', children: [_jsxs("div", { className: 'min-w-0', children: [eyebrow ? _jsx("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, _jsx("h2", { className: 'mt-1 break-words text-base font-bold text-ink', children: title })] }), trailing ? _jsx("div", { className: 'shrink-0', children: trailing }) : null] })) : null, children] }));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
4
|
+
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
3
5
|
const densityClassNames = {
|
|
4
6
|
compact: 'py-2',
|
|
5
7
|
normal: 'py-2.5',
|
|
@@ -8,4 +10,4 @@ const variantClassNames = {
|
|
|
8
10
|
card: 'ps-surface px-3',
|
|
9
11
|
row: 'border-b border-line/70 px-0 last:border-b-0',
|
|
10
12
|
};
|
|
11
|
-
export const PsListTile = ({ children, className, density = 'normal', eyebrow, isPrivateTitle = false, subtitle, title, variant = 'row', }) => (_jsxs("div", { className: PallasoftClassNameService.merge('min-w-0 overflow-hidden', variantClassNames[variant], densityClassNames[density], className), children: [eyebrow ? _jsx("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, _jsx("p", { className: PallasoftClassNameService.merge('break-words text-sm font-semibold text-ink', eyebrow && 'mt-1', isPrivateTitle && 'private-number'), children: title }), subtitle ? (_jsx("p", { className: 'mt-1 break-words text-sm leading-5 text-slate-500', children: subtitle })) : null, children] }));
|
|
13
|
+
export const PsListTile = ({ children, className, density = 'normal', eyebrow, isLoading = false, isPrivateTitle = false, subtitle, title, variant = 'row', }) => isLoading ? (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('flex min-w-0 flex-col gap-2', variantClassNames[variant], densityClassNames[density], className), children: [_jsx(PsSkeleton, { className: 'w-2/3' }), _jsx(PsSkeleton, { className: 'h-2.5 w-1/3' })] })) : (_jsxs("div", { className: PallasoftClassNameService.merge('min-w-0 overflow-hidden', variantClassNames[variant], densityClassNames[density], className), children: [eyebrow ? _jsx("p", { className: 'ps-eyebrow break-words', children: eyebrow }) : null, _jsx("p", { className: PallasoftClassNameService.merge('break-words text-sm font-semibold text-ink', eyebrow && 'mt-1', isPrivateTitle && 'private-number'), children: title }), subtitle ? (_jsx("p", { className: 'mt-1 break-words text-sm leading-5 text-slate-500', children: subtitle })) : null, children] }));
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
4
|
+
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
5
|
+
export const PsMetricCard = ({ changeLabel, className, icon, isLoading = false, label, value, }) => isLoading ? (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('ps-metric-card flex min-w-0 flex-col gap-3 p-3.5 sm:p-4', className), label: label, children: [_jsx(PsSkeleton, { className: 'h-2.5 w-24' }), _jsx(PsSkeleton, { className: 'h-6 w-32' })] })) : (_jsx("section", { className: PallasoftClassNameService.merge('ps-metric-card min-w-0 p-3.5 sm:p-4', className), children: _jsxs("div", { className: 'flex items-start justify-between gap-3', children: [_jsxs("div", { className: 'min-w-0', children: [_jsx("p", { className: 'ps-eyebrow truncate', children: label }), _jsx("p", { className: 'mt-2 truncate text-2xl font-semibold text-ink', children: value }), changeLabel ? _jsx("p", { className: 'mt-1 text-sm text-slate-500', children: changeLabel }) : null] }), icon ? (_jsx("div", { className: 'flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-soft text-primary', children: icon })) : null] }) }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
3
4
|
const toneClassNames = {
|
|
4
5
|
danger: 'bg-rose-50 text-rose-700 ring-rose-100 dark:bg-rose-500/18 dark:text-rose-100 dark:ring-rose-300/22',
|
|
5
6
|
neutral: 'bg-slate-100 text-slate-700 ring-slate-200 dark:bg-white/10 dark:text-slate-100 dark:ring-white/12',
|
|
@@ -7,4 +8,4 @@ const toneClassNames = {
|
|
|
7
8
|
success: 'bg-emerald-50 text-emerald-700 ring-emerald-100 dark:bg-emerald-400/18 dark:text-emerald-50 dark:ring-emerald-200/22',
|
|
8
9
|
warning: 'bg-amber-50 text-amber-800 ring-amber-100 dark:bg-amber-400/18 dark:text-amber-50 dark:ring-amber-200/24',
|
|
9
10
|
};
|
|
10
|
-
export const PsPill = ({ children, className, tone = 'neutral' }) => (_jsx("span", { className: PallasoftClassNameService.merge('inline-flex min-h-8 min-w-[5.5rem] max-w-full items-center justify-center rounded-full px-5 py-1 text-center text-[0.72rem] font-black capitalize tracking-[0.01em] ring-1 ring-inset', toneClassNames[tone], className), children: _jsx("span", { className: 'min-w-0 break-words', children: children }) }));
|
|
11
|
+
export const PsPill = ({ children, className, isLoading = false, tone = 'neutral', }) => isLoading ? (_jsx(PsSkeleton, { className: PallasoftClassNameService.merge('h-8 w-24', className), shape: 'block' })) : (_jsx("span", { className: PallasoftClassNameService.merge('inline-flex min-h-8 min-w-[5.5rem] max-w-full items-center justify-center rounded-full px-5 py-1 text-center text-[0.72rem] font-black capitalize tracking-[0.01em] ring-1 ring-inset', toneClassNames[tone], className), children: _jsx("span", { className: 'min-w-0 break-words', children: children }) }));
|
|
@@ -9,5 +9,5 @@ export const PsReflectiveAppShell = ({ children, className, contentClassName, fr
|
|
|
9
9
|
contentRef.current?.scrollTo({ top: 0, left: 0 });
|
|
10
10
|
window.scrollTo({ top: 0, left: 0 });
|
|
11
11
|
}, [scrollResetKey]);
|
|
12
|
-
return (_jsx("section", { className: PallasoftClassNameService.merge('ps-reflective-frame
|
|
12
|
+
return (_jsx("section", { className: PallasoftClassNameService.merge('ps-reflective-frame h-[100dvh] overflow-hidden text-ink lg:px-3 lg:py-3', className), children: _jsxs("div", { className: PallasoftClassNameService.merge('ps-liquid-strong mx-auto grid h-full min-h-0 overflow-hidden border-line/70 bg-white/70 backdrop-blur-2xl transition-[grid-template-columns] duration-200 dark:border-white/10 dark:bg-surface/70 md:grid-cols-[var(--ps-sidebar-width)_minmax(0,1fr)] lg:max-w-[1720px] lg:rounded-[1.5rem] lg:border', frameClassName), style: { ['--ps-sidebar-width']: sidebarWidth }, children: [sidebar, _jsxs("div", { className: 'flex min-h-0 min-w-0 flex-col bg-white/32 dark:bg-white/[0.02]', children: [topbar, _jsx("main", { ref: contentRef, className: PallasoftClassNameService.merge('ps-scrollbar min-h-0 flex-1 overflow-y-auto px-4 py-5 ps-page-enter sm:px-5 lg:px-6 xl:px-7', contentClassName), children: children })] })] }) }));
|
|
13
13
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const PsSectionHeader = ({ description, eyebrow, leading, title, trailing, }) => (_jsxs("div", { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', children: [_jsxs("div", { className: 'flex min-w-0 flex-1 basis-auto flex-col gap-2', children: [leading, eyebrow ? (_jsx("p", { className: 'text-[0.68rem] font-semibold uppercase tracking-[0.22em] text-ink/50', children: eyebrow })) : null, _jsx("h1", { className: 'break-words text-xl font-extrabold text-ink sm:text-2xl', children: title }), description ? (_jsx("p", { className: 'max-w-3xl text-sm leading-6 text-ink/60', children: description })) : null] }), trailing ? _jsx("div", { className: '
|
|
2
|
+
export const PsSectionHeader = ({ description, eyebrow, leading, title, trailing, }) => (_jsxs("div", { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', children: [_jsxs("div", { className: 'flex min-w-0 flex-1 basis-auto flex-col gap-2', children: [leading, eyebrow ? (_jsx("p", { className: 'text-[0.68rem] font-semibold uppercase tracking-[0.22em] text-ink/50', children: eyebrow })) : null, _jsx("h1", { className: 'break-words text-xl font-extrabold text-ink sm:text-2xl', children: title }), description ? (_jsx("p", { className: 'max-w-3xl text-sm leading-6 text-ink/60', children: description })) : null] }), trailing ? (_jsx("div", { className: 'flex w-full shrink-0 items-center justify-end sm:ml-auto sm:w-auto', children: trailing })) : null] }));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
4
|
+
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
5
|
+
export const PsSkeletonCard = ({ className }) => (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('flex flex-col gap-3 rounded-[1.25rem] border border-line bg-surface p-5', className), children: [_jsx(PsSkeleton, { className: 'h-2.5 w-24' }), _jsx(PsSkeleton, { className: 'h-6 w-32' })] }));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const PsSkeletonGroup = ({ children, className, label = 'Loading', }) => (_jsxs("div", { "aria-busy": 'true', className: className, role: 'status', children: [_jsx("span", { className: 'sr-only', children: label }), children] }));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeletonConfig } from '../constants/ps-skeleton-config';
|
|
4
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
5
|
+
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
6
|
+
export const PsSkeletonList = ({ className, hasLeading = false, hasTrailing = true, rows = 4, title = false, }) => (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('flex flex-col', className), children: [title ? _jsx(PsSkeleton, { className: 'mx-3 mb-3 h-2.5 w-24' }) : null, Array.from({ length: rows }, (_, index) => (_jsxs("div", { className: 'flex min-h-11 items-center gap-3 px-3 py-2.5', children: [hasLeading ? _jsx(PsSkeleton, { shape: 'circle' }) : null, _jsx(PsSkeleton, { className: PsSkeletonConfig.lineWidths[index % PsSkeletonConfig.lineWidths.length] }), hasTrailing ? _jsx(PsSkeleton, { className: 'ml-auto h-2.5 w-20 shrink-0' }) : null] }, index)))] }));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeletonConfig } from '../constants/ps-skeleton-config';
|
|
4
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
5
|
+
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
6
|
+
export const PsSkeletonTable = ({ className, columns = 4, hasToolbar = false, rows = 6, }) => {
|
|
7
|
+
const gridTemplateColumns = `minmax(0, 2fr) repeat(${Math.max(columns - 1, 0)}, minmax(0, 1fr))`;
|
|
8
|
+
return (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('flex flex-col gap-3', className), children: [hasToolbar ? (_jsxs("div", { className: 'flex items-center gap-3', children: [_jsx(PsSkeleton, { className: 'max-w-sm', shape: 'block' }), _jsx(PsSkeleton, { className: 'ml-auto w-24', shape: 'block' })] })) : null, _jsxs("div", { className: 'overflow-hidden rounded-[1.25rem] border border-line bg-surface', children: [_jsx("div", { className: 'grid gap-4 bg-mist/70 px-5 py-4', style: { gridTemplateColumns }, children: Array.from({ length: columns }, (_, index) => (_jsx(PsSkeleton, { className: 'h-2.5 w-16' }, index))) }), Array.from({ length: rows }, (_, rowIndex) => (_jsx("div", { className: 'grid items-center gap-4 border-t border-line px-5 py-4', style: { gridTemplateColumns }, children: Array.from({ length: columns }, (__, columnIndex) => (_jsx(PsSkeleton, { className: columnIndex === columns - 1 && columns > 1
|
|
9
|
+
? 'ml-auto w-16'
|
|
10
|
+
: PsSkeletonConfig.lineWidths[(rowIndex + columnIndex) % PsSkeletonConfig.lineWidths.length] }, columnIndex))) }, rowIndex)))] })] }));
|
|
11
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsSkeletonConfig } from '../constants/ps-skeleton-config';
|
|
4
|
+
import { PsSkeleton } from './ps-skeleton';
|
|
5
|
+
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
6
|
+
export const PsSkeletonText = ({ className, lines = 3 }) => (_jsx(PsSkeletonGroup, { className: PallasoftClassNameService.merge('flex flex-col gap-2.5', className), children: Array.from({ length: lines }, (_, index) => (_jsx(PsSkeleton, { className: index === lines - 1 && lines > 1
|
|
7
|
+
? 'w-2/3'
|
|
8
|
+
: PsSkeletonConfig.lineWidths[index % PsSkeletonConfig.lineWidths.length] }, index))) }));
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
|
|
3
|
+
const shapeClassNames = {
|
|
4
|
+
block: 'h-11 w-full rounded-ps-control',
|
|
5
|
+
circle: 'h-9 w-9 shrink-0 rounded-full',
|
|
6
|
+
line: 'h-3 w-full rounded-full',
|
|
7
|
+
};
|
|
8
|
+
export const PsSkeleton = ({ className, shape = 'line' }) => (_jsx("span", { "aria-hidden": 'true', className: PallasoftClassNameService.merge('ps-skeleton', shapeClassNames[shape], className) }));
|
package/dist/esm/index.js
CHANGED
|
@@ -18,6 +18,11 @@ export * from './components/ps-navigation-progress';
|
|
|
18
18
|
export * from './components/ps-section-header';
|
|
19
19
|
export * from './components/ps-site-header';
|
|
20
20
|
export * from './components/ps-skeleton';
|
|
21
|
+
export * from './components/ps-skeleton-card';
|
|
22
|
+
export * from './components/ps-skeleton-group';
|
|
23
|
+
export * from './components/ps-skeleton-list';
|
|
24
|
+
export * from './components/ps-skeleton-table';
|
|
25
|
+
export * from './components/ps-skeleton-text';
|
|
21
26
|
export * from './components/ps-spinner';
|
|
22
27
|
export * from './components/ps-theme-toggle';
|
|
23
28
|
export * from './components/ps-voice-orb';
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,11 @@ export * from './components/ps-navigation-progress';
|
|
|
18
18
|
export * from './components/ps-section-header';
|
|
19
19
|
export * from './components/ps-site-header';
|
|
20
20
|
export * from './components/ps-skeleton';
|
|
21
|
+
export * from './components/ps-skeleton-card';
|
|
22
|
+
export * from './components/ps-skeleton-group';
|
|
23
|
+
export * from './components/ps-skeleton-list';
|
|
24
|
+
export * from './components/ps-skeleton-table';
|
|
25
|
+
export * from './components/ps-skeleton-text';
|
|
21
26
|
export * from './components/ps-spinner';
|
|
22
27
|
export * from './components/ps-theme-toggle';
|
|
23
28
|
export * from './components/ps-voice-orb';
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,11 @@ __exportStar(require("./components/ps-navigation-progress"), exports);
|
|
|
34
34
|
__exportStar(require("./components/ps-section-header"), exports);
|
|
35
35
|
__exportStar(require("./components/ps-site-header"), exports);
|
|
36
36
|
__exportStar(require("./components/ps-skeleton"), exports);
|
|
37
|
+
__exportStar(require("./components/ps-skeleton-card"), exports);
|
|
38
|
+
__exportStar(require("./components/ps-skeleton-group"), exports);
|
|
39
|
+
__exportStar(require("./components/ps-skeleton-list"), exports);
|
|
40
|
+
__exportStar(require("./components/ps-skeleton-table"), exports);
|
|
41
|
+
__exportStar(require("./components/ps-skeleton-text"), exports);
|
|
37
42
|
__exportStar(require("./components/ps-spinner"), exports);
|
|
38
43
|
__exportStar(require("./components/ps-theme-toggle"), exports);
|
|
39
44
|
__exportStar(require("./components/ps-voice-orb"), exports);
|