@pallasoft/ps-core-components 2.51.0 → 2.52.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-content.js +1 -1
- package/dist/components/ps-detail-list.js +2 -2
- package/dist/components/ps-detail-pane.js +1 -1
- package/dist/components/ps-divider.js +1 -1
- package/dist/components/ps-document-row.js +1 -1
- package/dist/components/ps-empty-state.js +1 -1
- package/dist/components/ps-form-page-skeleton.d.ts +3 -1
- package/dist/components/ps-form-page-skeleton.js +1 -1
- package/dist/components/ps-page-layout.d.ts +3 -1
- package/dist/components/ps-page-layout.js +3 -1
- package/dist/components/ps-page-skeleton.d.ts +3 -1
- package/dist/components/ps-page-skeleton.js +2 -2
- package/dist/components/ps-section-header.js +1 -1
- package/dist/components/ps-split-view.js +5 -0
- package/dist/components/ps-start-highlight-content.d.ts +7 -0
- package/dist/components/ps-start-highlight-content.js +6 -0
- package/dist/components/ps-start-highlight-frame.d.ts +6 -0
- package/dist/components/ps-start-highlight-frame.js +6 -0
- package/dist/components/ps-start-highlight-link.d.ts +10 -0
- package/dist/components/ps-start-highlight-link.js +14 -0
- package/dist/components/ps-start-highlight.js +4 -1
- package/dist/components/ps-start-panel.js +1 -1
- package/dist/components/ps-start-preview.js +1 -1
- package/dist/components/ps-step-list.js +1 -1
- package/dist/components/ps-summary-bar.js +1 -1
- package/dist/components/ps-table-page-skeleton.d.ts +3 -1
- package/dist/components/ps-table-page-skeleton.js +1 -1
- package/dist/constants/ps-empty-value-config.d.ts +1 -1
- package/dist/constants/ps-empty-value-config.js +1 -1
- package/dist/constants/ps-page-width-class-names.d.ts +2 -0
- package/dist/constants/ps-page-width-class-names.js +10 -0
- package/dist/constants/ps-page-width.d.ts +6 -0
- package/dist/constants/ps-page-width.js +10 -0
- package/dist/constants/ps-split-view-config.d.ts +1 -0
- package/dist/constants/ps-split-view-config.js +1 -0
- package/dist/constants/ps-start-highlight-class-name.d.ts +1 -0
- package/dist/constants/ps-start-highlight-class-name.js +4 -0
- package/dist/constants/ps-step-marker-class-names.js +1 -1
- package/dist/esm/components/ps-action-tile-content.js +1 -1
- package/dist/esm/components/ps-detail-list.js +2 -2
- package/dist/esm/components/ps-detail-pane.js +1 -1
- package/dist/esm/components/ps-divider.js +1 -1
- package/dist/esm/components/ps-document-row.js +1 -1
- package/dist/esm/components/ps-empty-state.js +1 -1
- package/dist/esm/components/ps-form-page-skeleton.js +1 -1
- package/dist/esm/components/ps-page-layout.js +3 -1
- package/dist/esm/components/ps-page-skeleton.js +2 -2
- package/dist/esm/components/ps-section-header.js +1 -1
- package/dist/esm/components/ps-split-view.js +5 -0
- package/dist/esm/components/ps-start-highlight-content.js +2 -0
- package/dist/esm/components/ps-start-highlight-frame.js +2 -0
- package/dist/esm/components/ps-start-highlight-link.js +10 -0
- package/dist/esm/components/ps-start-highlight.js +5 -2
- package/dist/esm/components/ps-start-panel.js +1 -1
- package/dist/esm/components/ps-start-preview.js +1 -1
- package/dist/esm/components/ps-step-list.js +1 -1
- package/dist/esm/components/ps-summary-bar.js +1 -1
- package/dist/esm/components/ps-table-page-skeleton.js +1 -1
- package/dist/esm/constants/ps-empty-value-config.js +1 -1
- package/dist/esm/constants/ps-page-width-class-names.js +7 -0
- package/dist/esm/constants/ps-page-width.js +7 -0
- package/dist/esm/constants/ps-split-view-config.js +1 -0
- package/dist/esm/constants/ps-start-highlight-class-name.js +1 -0
- package/dist/esm/constants/ps-step-marker-class-names.js +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/services/ps-page-width-service.js +8 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/services/ps-page-width-service.d.ts +4 -0
- package/dist/services/ps-page-width-service.js +12 -0
- package/package.json +1 -1
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsActionTileContent = 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 PsActionTileContent = ({ description, icon, label, variant, }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { 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-
|
|
6
|
+
const PsActionTileContent = ({ description, icon, label, variant, }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { 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-muted'), 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] }));
|
|
7
7
|
exports.PsActionTileContent = PsActionTileContent;
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const PsDetailList = ({ emptyLabel, items }) => {
|
|
6
6
|
const filled = items.filter((item) => item.value !== null && item.value !== '');
|
|
7
7
|
if (filled.length === 0)
|
|
8
|
-
return (0, jsx_runtime_1.jsx)("p", { className: 'text-sm text-
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("dl", { className: 'grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-x-6 gap-y-3', children: filled.map((item) => ((0, jsx_runtime_1.jsxs)("div", { className: 'min-w-0', children: [(0, jsx_runtime_1.jsx)("dt", { className: 'text-xs font-medium text-
|
|
8
|
+
return (0, jsx_runtime_1.jsx)("p", { className: 'text-sm text-muted', children: emptyLabel });
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)("dl", { className: 'grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-x-6 gap-y-3', children: filled.map((item) => ((0, jsx_runtime_1.jsxs)("div", { className: 'min-w-0', children: [(0, jsx_runtime_1.jsx)("dt", { className: 'text-xs font-medium text-muted', children: item.label }), (0, jsx_runtime_1.jsx)("dd", { className: 'mt-0.5 text-sm break-words whitespace-pre-line text-ink', children: item.value })] }, item.label))) }));
|
|
10
10
|
};
|
|
11
11
|
exports.PsDetailList = PsDetailList;
|
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsDetailPane = 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 PsDetailPane = ({ children, className, footer, footerStart, headerActions, subtitle, title, }) => ((0, jsx_runtime_1.jsxs)("section", { "aria-label": title, className: ps_design_system_1.PallasoftClassNameService.merge('ps-card flex h-full min-h-0 min-w-0 flex-col overflow-hidden rounded-ps-card', className), children: [(0, jsx_runtime_1.jsxs)("header", { className: 'flex shrink-0 items-start justify-between gap-3 border-b border-line/80 px-4 py-3.5 sm:px-5', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-col gap-0.5', children: [(0, jsx_runtime_1.jsx)("h2", { className: 'truncate text-lg font-semibold leading-tight text-ink', children: title }), subtitle ? (0, jsx_runtime_1.jsx)("p", { className: 'truncate text-xs text-
|
|
6
|
+
const PsDetailPane = ({ children, className, footer, footerStart, headerActions, subtitle, title, }) => ((0, jsx_runtime_1.jsxs)("section", { "aria-label": title, className: ps_design_system_1.PallasoftClassNameService.merge('ps-card flex h-full min-h-0 min-w-0 flex-col overflow-hidden rounded-ps-card', className), children: [(0, jsx_runtime_1.jsxs)("header", { className: 'flex shrink-0 items-start justify-between gap-3 border-b border-line/80 px-4 py-3.5 sm:px-5', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-col gap-0.5', children: [(0, jsx_runtime_1.jsx)("h2", { className: 'truncate text-lg font-semibold leading-tight text-ink', children: title }), subtitle ? (0, jsx_runtime_1.jsx)("p", { className: 'truncate text-xs text-muted', children: subtitle }) : null] }), headerActions ? ((0, jsx_runtime_1.jsx)("div", { className: 'flex shrink-0 items-center gap-2', children: headerActions })) : null] }), (0, jsx_runtime_1.jsx)("div", { className: 'ps-scrollbar-hidden min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-5', children: children }), footer || footerStart ? ((0, jsx_runtime_1.jsxs)("footer", { className: 'flex shrink-0 flex-wrap items-center justify-between gap-2 border-t border-line/80 px-4 py-3 sm:px-5', children: [footerStart ? (0, jsx_runtime_1.jsx)("div", { className: 'flex min-w-0 items-center gap-2', children: footerStart }) : null, (0, jsx_runtime_1.jsx)("div", { className: 'ml-auto flex flex-wrap items-center justify-end gap-2', children: footer })] })) : null] }));
|
|
7
7
|
exports.PsDetailPane = PsDetailPane;
|
|
@@ -7,6 +7,6 @@ const PsDivider = ({ className = '', label, orientation = 'horizontal', }) => {
|
|
|
7
7
|
return ((0, jsx_runtime_1.jsx)("div", { "aria-orientation": 'vertical', className: `w-px shrink-0 self-stretch bg-line ${className}`, role: 'separator' }));
|
|
8
8
|
if (!label)
|
|
9
9
|
return ((0, jsx_runtime_1.jsx)("div", { "aria-orientation": 'horizontal', className: `h-px w-full shrink-0 bg-line ${className}`, role: 'separator' }));
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)("div", { "aria-label": label, "aria-orientation": 'horizontal', className: `flex w-full items-center gap-3 ${className}`, role: 'separator', children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'h-px flex-1 bg-line' }), (0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'text-xs text-
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "aria-label": label, "aria-orientation": 'horizontal', className: `flex w-full items-center gap-3 ${className}`, role: 'separator', children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'h-px flex-1 bg-line' }), (0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'text-xs text-muted', children: label }), (0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'h-px flex-1 bg-line' })] }));
|
|
11
11
|
};
|
|
12
12
|
exports.PsDivider = PsDivider;
|
|
@@ -17,6 +17,6 @@ const PsDocumentRow = ({ actions, amount, badges, className, date, isActive = fa
|
|
|
17
17
|
'onPointerEnter': onPrefetch,
|
|
18
18
|
'type': 'button',
|
|
19
19
|
}
|
|
20
|
-
: {}), children: [(0, jsx_runtime_1.jsx)("span", { className: 'row-span-2 flex h-14 w-11 shrink-0 items-center justify-center overflow-hidden rounded-ps-control border border-line/60 bg-mist/40 sm:row-span-1', children: thumbnailSrc ? ((0, jsx_runtime_1.jsx)("img", { alt: thumbnailAlt, className: 'h-full w-full object-cover object-top', decoding: 'async', loading: 'lazy', src: thumbnailSrc })) : (thumbnailFallback) }), (0, jsx_runtime_1.jsxs)("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [(0, jsx_runtime_1.jsx)("span", { className: 'truncate text-sm font-semibold text-ink', children: title }), subtitle ? (0, jsx_runtime_1.jsx)("span", { className: 'truncate text-xs text-
|
|
20
|
+
: {}), children: [(0, jsx_runtime_1.jsx)("span", { className: 'row-span-2 flex h-14 w-11 shrink-0 items-center justify-center overflow-hidden rounded-ps-control border border-line/60 bg-mist/40 sm:row-span-1', children: thumbnailSrc ? ((0, jsx_runtime_1.jsx)("img", { alt: thumbnailAlt, className: 'h-full w-full object-cover object-top', decoding: 'async', loading: 'lazy', src: thumbnailSrc })) : (thumbnailFallback) }), (0, jsx_runtime_1.jsxs)("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [(0, jsx_runtime_1.jsx)("span", { className: 'truncate text-sm font-semibold text-ink', children: title }), subtitle ? (0, jsx_runtime_1.jsx)("span", { className: 'truncate text-xs text-muted', children: subtitle }) : null, badges ? ((0, jsx_runtime_1.jsx)("span", { className: 'flex flex-wrap items-center gap-1.5 pt-1', children: badges })) : null, note ? ((0, jsx_runtime_1.jsx)("span", { className: 'line-clamp-2 break-words pt-0.5 text-xs text-ink/70', children: note })) : null] }), amount || date ? ((0, jsx_runtime_1.jsxs)("span", { className: 'col-start-2 flex items-baseline gap-2 sm:col-start-3 sm:flex-col sm:items-end sm:gap-0.5', children: [amount ? ((0, jsx_runtime_1.jsx)("span", { className: 'text-sm font-semibold tabular-nums text-ink', children: amount })) : null, date ? (0, jsx_runtime_1.jsx)("span", { className: 'text-xs tabular-nums text-muted', children: date }) : null] })) : null] }), actions ? ((0, jsx_runtime_1.jsx)("div", { className: 'flex w-full shrink-0 items-center justify-end gap-2 sm:w-auto', children: actions })) : null] }));
|
|
21
21
|
};
|
|
22
22
|
exports.PsDocumentRow = PsDocumentRow;
|
|
@@ -21,7 +21,7 @@ const PsEmptyState = ({ actions = [], badge, children, className, detail, descri
|
|
|
21
21
|
? 'flex flex-col items-center gap-3'
|
|
22
22
|
: 'flex flex-col gap-5 sm:flex-row sm:items-start', children: [icon ? (0, jsx_runtime_1.jsx)("div", { className: 'ps-icon-surface h-14 w-14', children: icon }) : null, (0, jsx_runtime_1.jsxs)("div", { className: isInline ? 'min-w-0' : 'min-w-0 flex-1', children: [(0, jsx_runtime_1.jsxs)("div", { className: isInline
|
|
23
23
|
? 'flex flex-wrap items-center justify-center gap-2'
|
|
24
|
-
: 'flex flex-wrap items-center gap-2', children: [eyebrow ? ((0, jsx_runtime_1.jsx)("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-primary', children: eyebrow })) : null, eyebrow && badge ? (0, jsx_runtime_1.jsx)("span", { className: 'h-1 w-1 rounded-full bg-line' }) : null, badge ? ((0, jsx_runtime_1.jsx)("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-
|
|
24
|
+
: 'flex flex-wrap items-center gap-2', children: [eyebrow ? ((0, jsx_runtime_1.jsx)("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-primary', children: eyebrow })) : null, eyebrow && badge ? (0, jsx_runtime_1.jsx)("span", { className: 'h-1 w-1 rounded-full bg-line' }) : null, badge ? ((0, jsx_runtime_1.jsx)("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-subtle', children: badge })) : null] }), (0, jsx_runtime_1.jsx)(Heading, { className: isInline
|
|
25
25
|
? 'text-base font-semibold text-ink'
|
|
26
26
|
: 'mt-3 text-3xl font-semibold tracking-tight sm:text-4xl', children: title }), description ? ((0, jsx_runtime_1.jsx)("p", { className: isInline
|
|
27
27
|
? 'mt-1.5 text-sm leading-6 text-ink/60'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PsPageWidth } from '../constants/ps-page-width';
|
|
1
2
|
export interface PsFormPageSkeletonProps {
|
|
2
3
|
hasActions?: boolean;
|
|
3
4
|
hasBackLink?: boolean;
|
|
@@ -5,5 +6,6 @@ export interface PsFormPageSkeletonProps {
|
|
|
5
6
|
loadingLabel: string;
|
|
6
7
|
title?: string;
|
|
7
8
|
variant?: 'bordered' | 'card' | 'plain';
|
|
9
|
+
width?: PsPageWidth;
|
|
8
10
|
}
|
|
9
|
-
export declare const PsFormPageSkeleton: ({ hasActions, hasBackLink, isNarrow, loadingLabel, title, variant, }: PsFormPageSkeletonProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const PsFormPageSkeleton: ({ hasActions, hasBackLink, isNarrow, loadingLabel, title, variant, width, }: PsFormPageSkeletonProps) => import("react").JSX.Element;
|
|
@@ -6,5 +6,5 @@ const ps_page_skeleton_config_1 = require("../constants/ps-page-skeleton-config"
|
|
|
6
6
|
const ps_form_fields_skeleton_1 = require("./ps-form-fields-skeleton");
|
|
7
7
|
const ps_page_skeleton_1 = require("./ps-page-skeleton");
|
|
8
8
|
const ps_section_panel_skeleton_1 = require("./ps-section-panel-skeleton");
|
|
9
|
-
const PsFormPageSkeleton = ({ hasActions = true, hasBackLink = false, isNarrow
|
|
9
|
+
const PsFormPageSkeleton = ({ hasActions = true, hasBackLink = false, isNarrow, loadingLabel, title, variant = 'plain', width, }) => ((0, jsx_runtime_1.jsx)(ps_page_skeleton_1.PsPageSkeleton, { hasActions: hasActions, hasBackLink: hasBackLink, isNarrow: isNarrow, loadingLabel: loadingLabel, title: title, width: width, children: ps_page_skeleton_config_1.PsPageSkeletonConfig.formSections.map((section) => ((0, jsx_runtime_1.jsx)(ps_section_panel_skeleton_1.PsSectionPanelSkeleton, { variant: variant, children: (0, jsx_runtime_1.jsx)(ps_form_fields_skeleton_1.PsFormFieldsSkeleton, {}) }, section))) }));
|
|
10
10
|
exports.PsFormPageSkeleton = PsFormPageSkeleton;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { PsPageWidth } from '../constants/ps-page-width';
|
|
2
3
|
export interface PsPageLayoutProps {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
className?: string;
|
|
5
6
|
isNarrow?: boolean;
|
|
7
|
+
width?: PsPageWidth;
|
|
6
8
|
}
|
|
7
|
-
export declare const PsPageLayout: ({ children, className, isNarrow }: PsPageLayoutProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const PsPageLayout: ({ children, className, isNarrow, width }: PsPageLayoutProps) => import("react").JSX.Element;
|
|
@@ -3,5 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PsPageLayout = 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_page_width_class_names_1 = require("../constants/ps-page-width-class-names");
|
|
7
|
+
const ps_page_width_service_1 = require("../services/ps-page-width-service");
|
|
8
|
+
const PsPageLayout = ({ children, className, isNarrow, width }) => ((0, jsx_runtime_1.jsx)("div", { className: ps_design_system_1.PallasoftClassNameService.merge('w-full px-4 py-5 md:px-6 md:py-6', className), children: (0, jsx_runtime_1.jsx)("div", { className: ps_page_width_class_names_1.PsPageWidthClassNames[ps_page_width_service_1.PsPageWidthService.resolve(width, isNarrow)], children: children }) }));
|
|
7
9
|
exports.PsPageLayout = PsPageLayout;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { PsPageWidth } from '../constants/ps-page-width';
|
|
2
3
|
export interface PsPageSkeletonProps {
|
|
3
4
|
actions?: ReactNode;
|
|
4
5
|
children: ReactNode;
|
|
@@ -7,5 +8,6 @@ export interface PsPageSkeletonProps {
|
|
|
7
8
|
isNarrow?: boolean;
|
|
8
9
|
loadingLabel: string;
|
|
9
10
|
title?: string;
|
|
11
|
+
width?: PsPageWidth;
|
|
10
12
|
}
|
|
11
|
-
export declare const PsPageSkeleton: ({ actions, children, hasActions, hasBackLink, isNarrow, loadingLabel, title, }: PsPageSkeletonProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const PsPageSkeleton: ({ actions, children, hasActions, hasBackLink, isNarrow, loadingLabel, title, width, }: PsPageSkeletonProps) => import("react").JSX.Element;
|
|
@@ -8,8 +8,8 @@ const ps_page_layout_1 = require("./ps-page-layout");
|
|
|
8
8
|
const ps_page_stack_1 = require("./ps-page-stack");
|
|
9
9
|
const ps_section_header_1 = require("./ps-section-header");
|
|
10
10
|
const ps_skeleton_1 = require("./ps-skeleton");
|
|
11
|
-
const PsPageSkeleton = ({ actions, children, hasActions = false, hasBackLink = false, isNarrow
|
|
11
|
+
const PsPageSkeleton = ({ actions, children, hasActions = false, hasBackLink = false, isNarrow, loadingLabel, title, width, }) => {
|
|
12
12
|
const backLink = hasBackLink ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-5 w-32' }) : undefined;
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(ps_page_layout_1.PsPageLayout, { isNarrow: isNarrow, children: (0, jsx_runtime_1.jsxs)(ps_page_stack_1.PsPageStack, { children: [title === undefined ? ((0, jsx_runtime_1.jsx)(ps_section_header_1.PsSectionHeader, { isLoading: true, leading: backLink, title: loadingLabel, trailing: hasActions })) : ((0, jsx_runtime_1.jsx)(ps_page_header_1.PsPageHeader, { actions: actions !== undefined ? (actions) : hasActions ? ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { shape: ps_skeleton_shape_1.PsSkeletonShape.Button })) : undefined, leading: backLink, title: title })), children] }) }));
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(ps_page_layout_1.PsPageLayout, { isNarrow: isNarrow, width: width, children: (0, jsx_runtime_1.jsxs)(ps_page_stack_1.PsPageStack, { children: [title === undefined ? ((0, jsx_runtime_1.jsx)(ps_section_header_1.PsSectionHeader, { isLoading: true, leading: backLink, title: loadingLabel, trailing: hasActions })) : ((0, jsx_runtime_1.jsx)(ps_page_header_1.PsPageHeader, { actions: actions !== undefined ? (actions) : hasActions ? ((0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { shape: ps_skeleton_shape_1.PsSkeletonShape.Button })) : undefined, leading: backLink, title: title })), children] }) }));
|
|
14
14
|
};
|
|
15
15
|
exports.PsPageSkeleton = PsPageSkeleton;
|
|
@@ -5,5 +5,5 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const ps_skeleton_shape_1 = require("../constants/ps-skeleton-shape");
|
|
6
6
|
const ps_skeleton_1 = require("./ps-skeleton");
|
|
7
7
|
const ps_skeleton_group_1 = require("./ps-skeleton-group");
|
|
8
|
-
const PsSectionHeader = ({ description, eyebrow, isLoading = false, leading, title, trailing, }) => isLoading ? ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', label: title, 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)(ps_skeleton_1.PsSkeleton, { className: 'h-2.5 w-24' }) : null, (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-6 w-52' }), description ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-3 w-72' }) : null] }), trailing ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { shape: ps_skeleton_shape_1.PsSkeletonShape.Button }) : null] })) : ((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-
|
|
8
|
+
const PsSectionHeader = ({ description, eyebrow, isLoading = false, leading, title, trailing, }) => isLoading ? ((0, jsx_runtime_1.jsxs)(ps_skeleton_group_1.PsSkeletonGroup, { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', label: title, 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)(ps_skeleton_1.PsSkeleton, { className: 'h-2.5 w-24' }) : null, (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-6 w-52' }), description ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { className: 'h-3 w-72' }) : null] }), trailing ? (0, jsx_runtime_1.jsx)(ps_skeleton_1.PsSkeleton, { shape: ps_skeleton_shape_1.PsSkeletonShape.Button }) : null] })) : ((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-muted', 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] }));
|
|
9
9
|
exports.PsSectionHeader = PsSectionHeader;
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PsSplitView = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_split_view_config_1 = require("../constants/ps-split-view-config");
|
|
5
6
|
const use_ps_fill_height_1 = require("../hooks/use-ps-fill-height");
|
|
7
|
+
const use_ps_media_query_1 = require("../hooks/use-ps-media-query");
|
|
8
|
+
const use_ps_scroll_lock_1 = require("../hooks/use-ps-scroll-lock");
|
|
6
9
|
const PsSplitView = ({ detail, list }) => {
|
|
7
10
|
const isSplit = detail !== null && detail !== undefined && detail !== false;
|
|
8
11
|
const { height, ref } = (0, use_ps_fill_height_1.usePsFillHeight)(isSplit);
|
|
12
|
+
const isWide = (0, use_ps_media_query_1.usePsMediaQuery)(ps_split_view_config_1.PsSplitViewConfig.wideQuery) === true;
|
|
13
|
+
(0, use_ps_scroll_lock_1.usePsScrollLock)(isSplit && isWide);
|
|
9
14
|
if (!isSplit)
|
|
10
15
|
return (0, jsx_runtime_1.jsx)("div", { className: 'min-w-0', children: list });
|
|
11
16
|
return ((0, jsx_runtime_1.jsxs)("div", { className: 'min-w-0 xl:grid xl:h-[var(--ps-split-height,calc(100dvh-14rem))] xl:grid-cols-[minmax(0,1fr)_minmax(26rem,34rem)] xl:gap-4', ref: ref, style: height === null ? undefined : { '--ps-split-height': `${height}px` }, children: [(0, jsx_runtime_1.jsx)("div", { className: 'ps-scrollbar-hidden min-h-0 min-w-0 xl:overflow-y-auto', children: list }), (0, jsx_runtime_1.jsx)("div", { className: 'hidden min-h-0 min-w-0 xl:block', children: detail })] }));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface PsStartHighlightContentProps {
|
|
3
|
+
description: string;
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const PsStartHighlightContent: ({ description, icon, label, }: PsStartHighlightContentProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsStartHighlightContent = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const PsStartHighlightContent = ({ description, icon, label, }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: 'flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary text-white', children: icon }), (0, jsx_runtime_1.jsxs)("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [(0, jsx_runtime_1.jsx)("span", { className: 'truncate text-base font-bold text-ink', title: label, children: label }), (0, jsx_runtime_1.jsx)("span", { className: 'text-sm leading-5 text-ink/60', children: description })] })] }));
|
|
6
|
+
exports.PsStartHighlightContent = PsStartHighlightContent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsStartHighlightFrame = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const PsStartHighlightFrame = ({ children, title }) => ((0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-col gap-2', children: [title === undefined ? null : ((0, jsx_runtime_1.jsx)("span", { className: 'text-xs font-semibold uppercase tracking-wide text-subtle', children: title })), children] }));
|
|
6
|
+
exports.PsStartHighlightFrame = PsStartHighlightFrame;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
+
export interface PsStartHighlightLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
+
description: string;
|
|
4
|
+
href: string;
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
label: string;
|
|
7
|
+
LinkComponent?: ElementType;
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const PsStartHighlightLink: ({ className, description, href, icon, label, LinkComponent, title, ...props }: PsStartHighlightLinkProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsStartHighlightLink = 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_start_highlight_class_name_1 = require("../constants/ps-start-highlight-class-name");
|
|
7
|
+
const ps_start_highlight_content_1 = require("./ps-start-highlight-content");
|
|
8
|
+
const ps_start_highlight_frame_1 = require("./ps-start-highlight-frame");
|
|
9
|
+
const PsStartHighlightLink = ({ className, description, href, icon, label, LinkComponent, title, ...props }) => {
|
|
10
|
+
const linkClassName = ps_design_system_1.PallasoftClassNameService.merge(ps_start_highlight_class_name_1.PsStartHighlightClassName, className);
|
|
11
|
+
const content = (0, jsx_runtime_1.jsx)(ps_start_highlight_content_1.PsStartHighlightContent, { description: description, icon: icon, label: label });
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(ps_start_highlight_frame_1.PsStartHighlightFrame, { title: title, children: LinkComponent ? ((0, jsx_runtime_1.jsx)(LinkComponent, { className: linkClassName, prefetch: 'intent', to: href, ...props, children: content })) : ((0, jsx_runtime_1.jsx)("a", { className: linkClassName, href: href, ...props, children: content })) }));
|
|
13
|
+
};
|
|
14
|
+
exports.PsStartHighlightLink = PsStartHighlightLink;
|
|
@@ -2,5 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PsStartHighlight = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const ps_start_highlight_class_name_1 = require("../constants/ps-start-highlight-class-name");
|
|
6
|
+
const ps_start_highlight_content_1 = require("./ps-start-highlight-content");
|
|
7
|
+
const ps_start_highlight_frame_1 = require("./ps-start-highlight-frame");
|
|
8
|
+
const PsStartHighlight = ({ description, icon, label, onClick, title, }) => ((0, jsx_runtime_1.jsx)(ps_start_highlight_frame_1.PsStartHighlightFrame, { title: title, children: (0, jsx_runtime_1.jsx)("button", { className: ps_start_highlight_class_name_1.PsStartHighlightClassName, onClick: onClick, type: 'button', children: (0, jsx_runtime_1.jsx)(ps_start_highlight_content_1.PsStartHighlightContent, { description: description, icon: icon, label: label }) }) }));
|
|
6
9
|
exports.PsStartHighlight = PsStartHighlight;
|
|
@@ -5,5 +5,5 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const ps_card_1 = require("./ps-card");
|
|
6
6
|
const PsStartPanel = ({ actions, description, highlight, preview, steps, title, }) => ((0, jsx_runtime_1.jsx)(ps_card_1.PsCard, { density: 'spacious', children: (0, jsx_runtime_1.jsxs)("div", { className: preview
|
|
7
7
|
? 'grid items-center gap-10 xl:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]'
|
|
8
|
-
: 'grid items-center gap-10', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-col gap-7', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-col gap-3', children: [(0, jsx_runtime_1.jsx)("h2", { className: 'text-3xl font-extrabold leading-tight text-ink', children: title }), (0, jsx_runtime_1.jsx)("p", { className: 'max-w-md text-sm leading-6 text-ink/60', children: description })] }), highlight, steps === undefined ? null : ((0, jsx_runtime_1.jsx)("ol", { className: 'flex flex-col gap-4', children: steps.map((step, index) => ((0, jsx_runtime_1.jsxs)("li", { className: 'flex items-start gap-4', children: [(0, jsx_runtime_1.jsx)("span", { className: 'flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-line/60 text-sm font-bold text-ink/70', children: index + 1 }), (0, jsx_runtime_1.jsxs)("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [(0, jsx_runtime_1.jsx)("span", { className: 'text-sm font-bold text-ink', children: step.title }), (0, jsx_runtime_1.jsx)("span", { className: 'text-sm leading-5 text-
|
|
8
|
+
: 'grid items-center gap-10', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-col gap-7', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-col gap-3', children: [(0, jsx_runtime_1.jsx)("h2", { className: 'text-3xl font-extrabold leading-tight text-ink', children: title }), (0, jsx_runtime_1.jsx)("p", { className: 'max-w-md text-sm leading-6 text-ink/60', children: description })] }), highlight, steps === undefined ? null : ((0, jsx_runtime_1.jsx)("ol", { className: 'flex flex-col gap-4', children: steps.map((step, index) => ((0, jsx_runtime_1.jsxs)("li", { className: 'flex items-start gap-4', children: [(0, jsx_runtime_1.jsx)("span", { className: 'flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-line/60 text-sm font-bold text-ink/70', children: index + 1 }), (0, jsx_runtime_1.jsxs)("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [(0, jsx_runtime_1.jsx)("span", { className: 'text-sm font-bold text-ink', children: step.title }), (0, jsx_runtime_1.jsx)("span", { className: 'text-sm leading-5 text-muted', children: step.description })] })] }, step.id))) })), actions] }), preview === undefined ? null : (0, jsx_runtime_1.jsx)("div", { className: 'relative hidden xl:block', children: preview })] }) }));
|
|
9
9
|
exports.PsStartPanel = PsStartPanel;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PsStartPreview = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const PsStartPreview = ({ badge, children, note, title }) => ((0, jsx_runtime_1.jsxs)("div", { className: 'rounded-2xl border border-line/60 bg-surface/60 p-5', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'mb-4 flex items-center justify-between', children: [(0, jsx_runtime_1.jsx)("span", { className: 'text-sm font-bold text-ink', children: title }), badge === undefined ? null : ((0, jsx_runtime_1.jsx)("span", { className: 'rounded-ps-control border border-warning/40 px-2.5 py-1 text-xs font-semibold text-warning', children: badge }))] }), (0, jsx_runtime_1.jsx)("ul", { className: 'flex flex-col', children: children }), note === undefined ? null : ((0, jsx_runtime_1.jsx)("p", { className: 'mt-4 border-t border-line/40 pt-4 text-xs leading-5 text-
|
|
5
|
+
const PsStartPreview = ({ badge, children, note, title }) => ((0, jsx_runtime_1.jsxs)("div", { className: 'rounded-2xl border border-line/60 bg-surface/60 p-5', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'mb-4 flex items-center justify-between', children: [(0, jsx_runtime_1.jsx)("span", { className: 'text-sm font-bold text-ink', children: title }), badge === undefined ? null : ((0, jsx_runtime_1.jsx)("span", { className: 'rounded-ps-control border border-warning/40 px-2.5 py-1 text-xs font-semibold text-warning', children: badge }))] }), (0, jsx_runtime_1.jsx)("ul", { className: 'flex flex-col', children: children }), note === undefined ? null : ((0, jsx_runtime_1.jsx)("p", { className: 'mt-4 border-t border-line/40 pt-4 text-xs leading-5 text-subtle', children: note }))] }));
|
|
6
6
|
exports.PsStartPreview = PsStartPreview;
|
|
@@ -5,6 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const ps_step_marker_class_names_1 = require("../constants/ps-step-marker-class-names");
|
|
6
6
|
const ps_step_state_1 = require("../constants/ps-step-state");
|
|
7
7
|
const PsStepList = ({ steps }) => ((0, jsx_runtime_1.jsx)("ol", { className: 'flex flex-col rounded-ps-panel border border-line bg-surface', children: steps.map((step, index) => ((0, jsx_runtime_1.jsxs)("li", { "aria-current": step.state === ps_step_state_1.PsStepState.current ? 'step' : undefined, className: 'relative flex gap-4 border-b border-line/70 px-5 py-4 last:border-0', children: [(0, jsx_runtime_1.jsx)("span", { className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-semibold ${ps_step_marker_class_names_1.PsStepMarkerClassNames[step.state]}`, children: step.state === ps_step_state_1.PsStepState.done ? (0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', children: "\u2713" }) : index + 1 }), (0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-1 flex-col gap-3', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'min-w-0', children: [(0, jsx_runtime_1.jsx)("h3", { className: step.state === ps_step_state_1.PsStepState.upcoming
|
|
8
|
-
? 'text-sm font-semibold text-
|
|
8
|
+
? 'text-sm font-semibold text-muted'
|
|
9
9
|
: 'text-sm font-semibold text-ink', children: step.title }), (0, jsx_runtime_1.jsx)("p", { className: 'mt-0.5 text-sm text-ink/60', children: step.description })] }), step.actions ? ((0, jsx_runtime_1.jsx)("div", { className: 'flex shrink-0 flex-wrap items-center gap-2', children: step.actions })) : null] }), step.content ? (0, jsx_runtime_1.jsx)("div", { className: 'min-w-0', children: step.content }) : null] })] }, step.id))) }));
|
|
10
10
|
exports.PsStepList = PsStepList;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PsSummaryBar = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const PsSummaryBar = ({ items }) => ((0, jsx_runtime_1.jsx)("dl", { className: 'grid grid-cols-2 gap-x-6 gap-y-4 rounded-ps-panel border border-line bg-surface px-5 py-4 sm:flex sm:flex-wrap sm:items-center sm:gap-x-10', children: items.map((item) => ((0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-col gap-1', children: [(0, jsx_runtime_1.jsx)("dt", { className: 'text-xs font-medium uppercase tracking-wide text-
|
|
5
|
+
const PsSummaryBar = ({ items }) => ((0, jsx_runtime_1.jsx)("dl", { className: 'grid grid-cols-2 gap-x-6 gap-y-4 rounded-ps-panel border border-line bg-surface px-5 py-4 sm:flex sm:flex-wrap sm:items-center sm:gap-x-10', children: items.map((item) => ((0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-col gap-1', children: [(0, jsx_runtime_1.jsx)("dt", { className: 'text-xs font-medium uppercase tracking-wide text-muted', children: item.label }), (0, jsx_runtime_1.jsx)("dd", { className: item.emphasis
|
|
6
6
|
? 'truncate text-xl font-semibold tabular-nums text-ink'
|
|
7
7
|
: 'truncate text-sm font-medium text-ink', children: item.value })] }, item.label))) }));
|
|
8
8
|
exports.PsSummaryBar = PsSummaryBar;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { PsPageWidth } from '../constants/ps-page-width';
|
|
1
2
|
export interface PsTablePageSkeletonProps {
|
|
2
3
|
isNarrow?: boolean;
|
|
3
4
|
loadingLabel: string;
|
|
4
5
|
title?: string;
|
|
6
|
+
width?: PsPageWidth;
|
|
5
7
|
}
|
|
6
|
-
export declare const PsTablePageSkeleton: ({ isNarrow, loadingLabel, title, }: PsTablePageSkeletonProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const PsTablePageSkeleton: ({ isNarrow, loadingLabel, title, width, }: PsTablePageSkeletonProps) => import("react").JSX.Element;
|
|
@@ -4,5 +4,5 @@ exports.PsTablePageSkeleton = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ps_page_skeleton_1 = require("./ps-page-skeleton");
|
|
6
6
|
const ps_table_list_skeleton_1 = require("./ps-table-list-skeleton");
|
|
7
|
-
const PsTablePageSkeleton = ({ isNarrow
|
|
7
|
+
const PsTablePageSkeleton = ({ isNarrow, loadingLabel, title, width, }) => ((0, jsx_runtime_1.jsx)(ps_page_skeleton_1.PsPageSkeleton, { hasActions: true, isNarrow: isNarrow, loadingLabel: loadingLabel, title: title, width: width, children: (0, jsx_runtime_1.jsx)(ps_table_list_skeleton_1.PsTableListSkeleton, {}) }));
|
|
8
8
|
exports.PsTablePageSkeleton = PsTablePageSkeleton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsPageWidthClassNames = void 0;
|
|
4
|
+
const ps_page_width_1 = require("./ps-page-width");
|
|
5
|
+
exports.PsPageWidthClassNames = {
|
|
6
|
+
[ps_page_width_1.PsPageWidth.Form]: 'mx-auto flex w-full min-w-0 max-w-7xl flex-col',
|
|
7
|
+
[ps_page_width_1.PsPageWidth.List]: 'flex min-w-0 flex-col',
|
|
8
|
+
[ps_page_width_1.PsPageWidth.Record]: 'flex min-w-0 flex-col',
|
|
9
|
+
[ps_page_width_1.PsPageWidth.Settings]: 'mx-auto flex w-full min-w-0 max-w-7xl flex-col',
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsPageWidth = void 0;
|
|
4
|
+
var PsPageWidth;
|
|
5
|
+
(function (PsPageWidth) {
|
|
6
|
+
PsPageWidth["Form"] = "form";
|
|
7
|
+
PsPageWidth["List"] = "list";
|
|
8
|
+
PsPageWidth["Record"] = "record";
|
|
9
|
+
PsPageWidth["Settings"] = "settings";
|
|
10
|
+
})(PsPageWidth || (exports.PsPageWidth = PsPageWidth = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PsStartHighlightClassName = "ps-focus-ring group flex items-center gap-4 rounded-2xl border border-primary/40 bg-gradient-to-br from-primary/20 via-primary/10 to-transparent p-4 text-left transition-colors hover:border-primary/70";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsStartHighlightClassName = void 0;
|
|
4
|
+
exports.PsStartHighlightClassName = 'ps-focus-ring group flex items-center gap-4 rounded-2xl border border-primary/40 bg-gradient-to-br from-primary/20 via-primary/10 to-transparent p-4 text-left transition-colors hover:border-primary/70';
|
|
@@ -5,5 +5,5 @@ const ps_step_state_1 = require("./ps-step-state");
|
|
|
5
5
|
exports.PsStepMarkerClassNames = {
|
|
6
6
|
[ps_step_state_1.PsStepState.done]: 'border-success bg-success text-white',
|
|
7
7
|
[ps_step_state_1.PsStepState.current]: 'border-primary bg-primary/10 text-primary',
|
|
8
|
-
[ps_step_state_1.PsStepState.upcoming]: 'border-line bg-surface text-
|
|
8
|
+
[ps_step_state_1.PsStepState.upcoming]: 'border-line bg-surface text-subtle',
|
|
9
9
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
export const PsActionTileContent = ({ description, icon, label, variant, }) => (_jsxs(_Fragment, { 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-
|
|
3
|
+
export const PsActionTileContent = ({ description, icon, label, variant, }) => (_jsxs(_Fragment, { 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-muted'), 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] }));
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
export const PsDetailList = ({ emptyLabel, items }) => {
|
|
3
3
|
const filled = items.filter((item) => item.value !== null && item.value !== '');
|
|
4
4
|
if (filled.length === 0)
|
|
5
|
-
return _jsx("p", { className: 'text-sm text-
|
|
6
|
-
return (_jsx("dl", { className: 'grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-x-6 gap-y-3', children: filled.map((item) => (_jsxs("div", { className: 'min-w-0', children: [_jsx("dt", { className: 'text-xs font-medium text-
|
|
5
|
+
return _jsx("p", { className: 'text-sm text-muted', children: emptyLabel });
|
|
6
|
+
return (_jsx("dl", { className: 'grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-x-6 gap-y-3', children: filled.map((item) => (_jsxs("div", { className: 'min-w-0', children: [_jsx("dt", { className: 'text-xs font-medium text-muted', children: item.label }), _jsx("dd", { className: 'mt-0.5 text-sm break-words whitespace-pre-line text-ink', children: item.value })] }, item.label))) }));
|
|
7
7
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
export const PsDetailPane = ({ children, className, footer, footerStart, headerActions, subtitle, title, }) => (_jsxs("section", { "aria-label": title, className: PallasoftClassNameService.merge('ps-card flex h-full min-h-0 min-w-0 flex-col overflow-hidden rounded-ps-card', className), children: [_jsxs("header", { className: 'flex shrink-0 items-start justify-between gap-3 border-b border-line/80 px-4 py-3.5 sm:px-5', children: [_jsxs("div", { className: 'flex min-w-0 flex-col gap-0.5', children: [_jsx("h2", { className: 'truncate text-lg font-semibold leading-tight text-ink', children: title }), subtitle ? _jsx("p", { className: 'truncate text-xs text-
|
|
3
|
+
export const PsDetailPane = ({ children, className, footer, footerStart, headerActions, subtitle, title, }) => (_jsxs("section", { "aria-label": title, className: PallasoftClassNameService.merge('ps-card flex h-full min-h-0 min-w-0 flex-col overflow-hidden rounded-ps-card', className), children: [_jsxs("header", { className: 'flex shrink-0 items-start justify-between gap-3 border-b border-line/80 px-4 py-3.5 sm:px-5', children: [_jsxs("div", { className: 'flex min-w-0 flex-col gap-0.5', children: [_jsx("h2", { className: 'truncate text-lg font-semibold leading-tight text-ink', children: title }), subtitle ? _jsx("p", { className: 'truncate text-xs text-muted', children: subtitle }) : null] }), headerActions ? (_jsx("div", { className: 'flex shrink-0 items-center gap-2', children: headerActions })) : null] }), _jsx("div", { className: 'ps-scrollbar-hidden min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-5', children: children }), footer || footerStart ? (_jsxs("footer", { className: 'flex shrink-0 flex-wrap items-center justify-between gap-2 border-t border-line/80 px-4 py-3 sm:px-5', children: [footerStart ? _jsx("div", { className: 'flex min-w-0 items-center gap-2', children: footerStart }) : null, _jsx("div", { className: 'ml-auto flex flex-wrap items-center justify-end gap-2', children: footer })] })) : null] }));
|
|
@@ -4,5 +4,5 @@ export const PsDivider = ({ className = '', label, orientation = 'horizontal', }
|
|
|
4
4
|
return (_jsx("div", { "aria-orientation": 'vertical', className: `w-px shrink-0 self-stretch bg-line ${className}`, role: 'separator' }));
|
|
5
5
|
if (!label)
|
|
6
6
|
return (_jsx("div", { "aria-orientation": 'horizontal', className: `h-px w-full shrink-0 bg-line ${className}`, role: 'separator' }));
|
|
7
|
-
return (_jsxs("div", { "aria-label": label, "aria-orientation": 'horizontal', className: `flex w-full items-center gap-3 ${className}`, role: 'separator', children: [_jsx("span", { "aria-hidden": 'true', className: 'h-px flex-1 bg-line' }), _jsx("span", { "aria-hidden": 'true', className: 'text-xs text-
|
|
7
|
+
return (_jsxs("div", { "aria-label": label, "aria-orientation": 'horizontal', className: `flex w-full items-center gap-3 ${className}`, role: 'separator', children: [_jsx("span", { "aria-hidden": 'true', className: 'h-px flex-1 bg-line' }), _jsx("span", { "aria-hidden": 'true', className: 'text-xs text-muted', children: label }), _jsx("span", { "aria-hidden": 'true', className: 'h-px flex-1 bg-line' })] }));
|
|
8
8
|
};
|
|
@@ -14,5 +14,5 @@ export const PsDocumentRow = ({ actions, amount, badges, className, date, isActi
|
|
|
14
14
|
'onPointerEnter': onPrefetch,
|
|
15
15
|
'type': 'button',
|
|
16
16
|
}
|
|
17
|
-
: {}), children: [_jsx("span", { className: 'row-span-2 flex h-14 w-11 shrink-0 items-center justify-center overflow-hidden rounded-ps-control border border-line/60 bg-mist/40 sm:row-span-1', children: thumbnailSrc ? (_jsx("img", { alt: thumbnailAlt, className: 'h-full w-full object-cover object-top', decoding: 'async', loading: 'lazy', src: thumbnailSrc })) : (thumbnailFallback) }), _jsxs("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [_jsx("span", { className: 'truncate text-sm font-semibold text-ink', children: title }), subtitle ? _jsx("span", { className: 'truncate text-xs text-
|
|
17
|
+
: {}), children: [_jsx("span", { className: 'row-span-2 flex h-14 w-11 shrink-0 items-center justify-center overflow-hidden rounded-ps-control border border-line/60 bg-mist/40 sm:row-span-1', children: thumbnailSrc ? (_jsx("img", { alt: thumbnailAlt, className: 'h-full w-full object-cover object-top', decoding: 'async', loading: 'lazy', src: thumbnailSrc })) : (thumbnailFallback) }), _jsxs("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [_jsx("span", { className: 'truncate text-sm font-semibold text-ink', children: title }), subtitle ? _jsx("span", { className: 'truncate text-xs text-muted', children: subtitle }) : null, badges ? (_jsx("span", { className: 'flex flex-wrap items-center gap-1.5 pt-1', children: badges })) : null, note ? (_jsx("span", { className: 'line-clamp-2 break-words pt-0.5 text-xs text-ink/70', children: note })) : null] }), amount || date ? (_jsxs("span", { className: 'col-start-2 flex items-baseline gap-2 sm:col-start-3 sm:flex-col sm:items-end sm:gap-0.5', children: [amount ? (_jsx("span", { className: 'text-sm font-semibold tabular-nums text-ink', children: amount })) : null, date ? _jsx("span", { className: 'text-xs tabular-nums text-muted', children: date }) : null] })) : null] }), actions ? (_jsx("div", { className: 'flex w-full shrink-0 items-center justify-end gap-2 sm:w-auto', children: actions })) : null] }));
|
|
18
18
|
};
|
|
@@ -18,7 +18,7 @@ export const PsEmptyState = ({ actions = [], badge, children, className, detail,
|
|
|
18
18
|
? 'flex flex-col items-center gap-3'
|
|
19
19
|
: 'flex flex-col gap-5 sm:flex-row sm:items-start', children: [icon ? _jsx("div", { className: 'ps-icon-surface h-14 w-14', children: icon }) : null, _jsxs("div", { className: isInline ? 'min-w-0' : 'min-w-0 flex-1', children: [_jsxs("div", { className: isInline
|
|
20
20
|
? 'flex flex-wrap items-center justify-center gap-2'
|
|
21
|
-
: 'flex flex-wrap items-center gap-2', children: [eyebrow ? (_jsx("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-primary', children: eyebrow })) : null, eyebrow && badge ? _jsx("span", { className: 'h-1 w-1 rounded-full bg-line' }) : null, badge ? (_jsx("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-
|
|
21
|
+
: 'flex flex-wrap items-center gap-2', children: [eyebrow ? (_jsx("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-primary', children: eyebrow })) : null, eyebrow && badge ? _jsx("span", { className: 'h-1 w-1 rounded-full bg-line' }) : null, badge ? (_jsx("p", { className: 'text-xs font-semibold uppercase tracking-[0.22em] text-subtle', children: badge })) : null] }), _jsx(Heading, { className: isInline
|
|
22
22
|
? 'text-base font-semibold text-ink'
|
|
23
23
|
: 'mt-3 text-3xl font-semibold tracking-tight sm:text-4xl', children: title }), description ? (_jsx("p", { className: isInline
|
|
24
24
|
? 'mt-1.5 text-sm leading-6 text-ink/60'
|
|
@@ -3,4 +3,4 @@ import { PsPageSkeletonConfig } from '../constants/ps-page-skeleton-config.js';
|
|
|
3
3
|
import { PsFormFieldsSkeleton } from './ps-form-fields-skeleton.js';
|
|
4
4
|
import { PsPageSkeleton } from './ps-page-skeleton.js';
|
|
5
5
|
import { PsSectionPanelSkeleton } from './ps-section-panel-skeleton.js';
|
|
6
|
-
export const PsFormPageSkeleton = ({ hasActions = true, hasBackLink = false, isNarrow
|
|
6
|
+
export const PsFormPageSkeleton = ({ hasActions = true, hasBackLink = false, isNarrow, loadingLabel, title, variant = 'plain', width, }) => (_jsx(PsPageSkeleton, { hasActions: hasActions, hasBackLink: hasBackLink, isNarrow: isNarrow, loadingLabel: loadingLabel, title: title, width: width, children: PsPageSkeletonConfig.formSections.map((section) => (_jsx(PsSectionPanelSkeleton, { variant: variant, children: _jsx(PsFormFieldsSkeleton, {}) }, section))) }));
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
|
|
3
|
+
import { PsPageWidthClassNames } from '../constants/ps-page-width-class-names.js';
|
|
4
|
+
import { PsPageWidthService } from '../services/ps-page-width-service.js';
|
|
5
|
+
export const PsPageLayout = ({ children, className, isNarrow, width }) => (_jsx("div", { className: PallasoftClassNameService.merge('w-full px-4 py-5 md:px-6 md:py-6', className), children: _jsx("div", { className: PsPageWidthClassNames[PsPageWidthService.resolve(width, isNarrow)], children: children }) }));
|
|
@@ -5,7 +5,7 @@ import { PsPageLayout } from './ps-page-layout.js';
|
|
|
5
5
|
import { PsPageStack } from './ps-page-stack.js';
|
|
6
6
|
import { PsSectionHeader } from './ps-section-header.js';
|
|
7
7
|
import { PsSkeleton } from './ps-skeleton.js';
|
|
8
|
-
export const PsPageSkeleton = ({ actions, children, hasActions = false, hasBackLink = false, isNarrow
|
|
8
|
+
export const PsPageSkeleton = ({ actions, children, hasActions = false, hasBackLink = false, isNarrow, loadingLabel, title, width, }) => {
|
|
9
9
|
const backLink = hasBackLink ? _jsx(PsSkeleton, { className: 'h-5 w-32' }) : undefined;
|
|
10
|
-
return (_jsx(PsPageLayout, { isNarrow: isNarrow, children: _jsxs(PsPageStack, { children: [title === undefined ? (_jsx(PsSectionHeader, { isLoading: true, leading: backLink, title: loadingLabel, trailing: hasActions })) : (_jsx(PsPageHeader, { actions: actions !== undefined ? (actions) : hasActions ? (_jsx(PsSkeleton, { shape: PsSkeletonShape.Button })) : undefined, leading: backLink, title: title })), children] }) }));
|
|
10
|
+
return (_jsx(PsPageLayout, { isNarrow: isNarrow, width: width, children: _jsxs(PsPageStack, { children: [title === undefined ? (_jsx(PsSectionHeader, { isLoading: true, leading: backLink, title: loadingLabel, trailing: hasActions })) : (_jsx(PsPageHeader, { actions: actions !== undefined ? (actions) : hasActions ? (_jsx(PsSkeleton, { shape: PsSkeletonShape.Button })) : undefined, leading: backLink, title: title })), children] }) }));
|
|
11
11
|
};
|
|
@@ -2,4 +2,4 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
3
3
|
import { PsSkeleton } from './ps-skeleton.js';
|
|
4
4
|
import { PsSkeletonGroup } from './ps-skeleton-group.js';
|
|
5
|
-
export const PsSectionHeader = ({ description, eyebrow, isLoading = false, leading, title, trailing, }) => isLoading ? (_jsxs(PsSkeletonGroup, { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', label: title, children: [_jsxs("div", { className: 'flex min-w-0 flex-1 basis-auto flex-col gap-2', children: [leading, eyebrow ? _jsx(PsSkeleton, { className: 'h-2.5 w-24' }) : null, _jsx(PsSkeleton, { className: 'h-6 w-52' }), description ? _jsx(PsSkeleton, { className: 'h-3 w-72' }) : null] }), trailing ? _jsx(PsSkeleton, { shape: PsSkeletonShape.Button }) : null] })) : (_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-
|
|
5
|
+
export const PsSectionHeader = ({ description, eyebrow, isLoading = false, leading, title, trailing, }) => isLoading ? (_jsxs(PsSkeletonGroup, { className: 'flex flex-wrap items-end justify-between gap-x-4 gap-y-3', label: title, children: [_jsxs("div", { className: 'flex min-w-0 flex-1 basis-auto flex-col gap-2', children: [leading, eyebrow ? _jsx(PsSkeleton, { className: 'h-2.5 w-24' }) : null, _jsx(PsSkeleton, { className: 'h-6 w-52' }), description ? _jsx(PsSkeleton, { className: 'h-3 w-72' }) : null] }), trailing ? _jsx(PsSkeleton, { shape: PsSkeletonShape.Button }) : null] })) : (_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-muted', 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] }));
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PsSplitViewConfig } from '../constants/ps-split-view-config.js';
|
|
2
3
|
import { usePsFillHeight } from '../hooks/use-ps-fill-height.js';
|
|
4
|
+
import { usePsMediaQuery } from '../hooks/use-ps-media-query.js';
|
|
5
|
+
import { usePsScrollLock } from '../hooks/use-ps-scroll-lock.js';
|
|
3
6
|
export const PsSplitView = ({ detail, list }) => {
|
|
4
7
|
const isSplit = detail !== null && detail !== undefined && detail !== false;
|
|
5
8
|
const { height, ref } = usePsFillHeight(isSplit);
|
|
9
|
+
const isWide = usePsMediaQuery(PsSplitViewConfig.wideQuery) === true;
|
|
10
|
+
usePsScrollLock(isSplit && isWide);
|
|
6
11
|
if (!isSplit)
|
|
7
12
|
return _jsx("div", { className: 'min-w-0', children: list });
|
|
8
13
|
return (_jsxs("div", { className: 'min-w-0 xl:grid xl:h-[var(--ps-split-height,calc(100dvh-14rem))] xl:grid-cols-[minmax(0,1fr)_minmax(26rem,34rem)] xl:gap-4', ref: ref, style: height === null ? undefined : { '--ps-split-height': `${height}px` }, children: [_jsx("div", { className: 'ps-scrollbar-hidden min-h-0 min-w-0 xl:overflow-y-auto', children: list }), _jsx("div", { className: 'hidden min-h-0 min-w-0 xl:block', children: detail })] }));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
export const PsStartHighlightContent = ({ description, icon, label, }) => (_jsxs(_Fragment, { children: [_jsx("span", { className: 'flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary text-white', children: icon }), _jsxs("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [_jsx("span", { className: 'truncate text-base font-bold text-ink', title: label, children: label }), _jsx("span", { className: 'text-sm leading-5 text-ink/60', children: description })] })] }));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const PsStartHighlightFrame = ({ children, title }) => (_jsxs("div", { className: 'flex flex-col gap-2', children: [title === undefined ? null : (_jsx("span", { className: 'text-xs font-semibold uppercase tracking-wide text-subtle', children: title })), children] }));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
+
import { PsStartHighlightClassName } from '../constants/ps-start-highlight-class-name.js';
|
|
4
|
+
import { PsStartHighlightContent } from './ps-start-highlight-content.js';
|
|
5
|
+
import { PsStartHighlightFrame } from './ps-start-highlight-frame.js';
|
|
6
|
+
export const PsStartHighlightLink = ({ className, description, href, icon, label, LinkComponent, title, ...props }) => {
|
|
7
|
+
const linkClassName = PallasoftClassNameService.merge(PsStartHighlightClassName, className);
|
|
8
|
+
const content = _jsx(PsStartHighlightContent, { description: description, icon: icon, label: label });
|
|
9
|
+
return (_jsx(PsStartHighlightFrame, { title: title, children: LinkComponent ? (_jsx(LinkComponent, { className: linkClassName, prefetch: 'intent', to: href, ...props, children: content })) : (_jsx("a", { className: linkClassName, href: href, ...props, children: content })) }));
|
|
10
|
+
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PsStartHighlightClassName } from '../constants/ps-start-highlight-class-name.js';
|
|
3
|
+
import { PsStartHighlightContent } from './ps-start-highlight-content.js';
|
|
4
|
+
import { PsStartHighlightFrame } from './ps-start-highlight-frame.js';
|
|
5
|
+
export const PsStartHighlight = ({ description, icon, label, onClick, title, }) => (_jsx(PsStartHighlightFrame, { title: title, children: _jsx("button", { className: PsStartHighlightClassName, onClick: onClick, type: 'button', children: _jsx(PsStartHighlightContent, { description: description, icon: icon, label: label }) }) }));
|
|
@@ -2,4 +2,4 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { PsCard } from './ps-card.js';
|
|
3
3
|
export const PsStartPanel = ({ actions, description, highlight, preview, steps, title, }) => (_jsx(PsCard, { density: 'spacious', children: _jsxs("div", { className: preview
|
|
4
4
|
? 'grid items-center gap-10 xl:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]'
|
|
5
|
-
: 'grid items-center gap-10', children: [_jsxs("div", { className: 'flex flex-col gap-7', children: [_jsxs("div", { className: 'flex flex-col gap-3', children: [_jsx("h2", { className: 'text-3xl font-extrabold leading-tight text-ink', children: title }), _jsx("p", { className: 'max-w-md text-sm leading-6 text-ink/60', children: description })] }), highlight, steps === undefined ? null : (_jsx("ol", { className: 'flex flex-col gap-4', children: steps.map((step, index) => (_jsxs("li", { className: 'flex items-start gap-4', children: [_jsx("span", { className: 'flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-line/60 text-sm font-bold text-ink/70', children: index + 1 }), _jsxs("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [_jsx("span", { className: 'text-sm font-bold text-ink', children: step.title }), _jsx("span", { className: 'text-sm leading-5 text-
|
|
5
|
+
: 'grid items-center gap-10', children: [_jsxs("div", { className: 'flex flex-col gap-7', children: [_jsxs("div", { className: 'flex flex-col gap-3', children: [_jsx("h2", { className: 'text-3xl font-extrabold leading-tight text-ink', children: title }), _jsx("p", { className: 'max-w-md text-sm leading-6 text-ink/60', children: description })] }), highlight, steps === undefined ? null : (_jsx("ol", { className: 'flex flex-col gap-4', children: steps.map((step, index) => (_jsxs("li", { className: 'flex items-start gap-4', children: [_jsx("span", { className: 'flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-line/60 text-sm font-bold text-ink/70', children: index + 1 }), _jsxs("span", { className: 'flex min-w-0 flex-col gap-0.5', children: [_jsx("span", { className: 'text-sm font-bold text-ink', children: step.title }), _jsx("span", { className: 'text-sm leading-5 text-muted', children: step.description })] })] }, step.id))) })), actions] }), preview === undefined ? null : _jsx("div", { className: 'relative hidden xl:block', children: preview })] }) }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const PsStartPreview = ({ badge, children, note, title }) => (_jsxs("div", { className: 'rounded-2xl border border-line/60 bg-surface/60 p-5', children: [_jsxs("div", { className: 'mb-4 flex items-center justify-between', children: [_jsx("span", { className: 'text-sm font-bold text-ink', children: title }), badge === undefined ? null : (_jsx("span", { className: 'rounded-ps-control border border-warning/40 px-2.5 py-1 text-xs font-semibold text-warning', children: badge }))] }), _jsx("ul", { className: 'flex flex-col', children: children }), note === undefined ? null : (_jsx("p", { className: 'mt-4 border-t border-line/40 pt-4 text-xs leading-5 text-
|
|
2
|
+
export const PsStartPreview = ({ badge, children, note, title }) => (_jsxs("div", { className: 'rounded-2xl border border-line/60 bg-surface/60 p-5', children: [_jsxs("div", { className: 'mb-4 flex items-center justify-between', children: [_jsx("span", { className: 'text-sm font-bold text-ink', children: title }), badge === undefined ? null : (_jsx("span", { className: 'rounded-ps-control border border-warning/40 px-2.5 py-1 text-xs font-semibold text-warning', children: badge }))] }), _jsx("ul", { className: 'flex flex-col', children: children }), note === undefined ? null : (_jsx("p", { className: 'mt-4 border-t border-line/40 pt-4 text-xs leading-5 text-subtle', children: note }))] }));
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { PsStepMarkerClassNames } from '../constants/ps-step-marker-class-names.js';
|
|
3
3
|
import { PsStepState } from '../constants/ps-step-state.js';
|
|
4
4
|
export const PsStepList = ({ steps }) => (_jsx("ol", { className: 'flex flex-col rounded-ps-panel border border-line bg-surface', children: steps.map((step, index) => (_jsxs("li", { "aria-current": step.state === PsStepState.current ? 'step' : undefined, className: 'relative flex gap-4 border-b border-line/70 px-5 py-4 last:border-0', children: [_jsx("span", { className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-semibold ${PsStepMarkerClassNames[step.state]}`, children: step.state === PsStepState.done ? _jsx("span", { "aria-hidden": 'true', children: "\u2713" }) : index + 1 }), _jsxs("div", { className: 'flex min-w-0 flex-1 flex-col gap-3', children: [_jsxs("div", { className: 'flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between', children: [_jsxs("div", { className: 'min-w-0', children: [_jsx("h3", { className: step.state === PsStepState.upcoming
|
|
5
|
-
? 'text-sm font-semibold text-
|
|
5
|
+
? 'text-sm font-semibold text-muted'
|
|
6
6
|
: 'text-sm font-semibold text-ink', children: step.title }), _jsx("p", { className: 'mt-0.5 text-sm text-ink/60', children: step.description })] }), step.actions ? (_jsx("div", { className: 'flex shrink-0 flex-wrap items-center gap-2', children: step.actions })) : null] }), step.content ? _jsx("div", { className: 'min-w-0', children: step.content }) : null] })] }, step.id))) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const PsSummaryBar = ({ items }) => (_jsx("dl", { className: 'grid grid-cols-2 gap-x-6 gap-y-4 rounded-ps-panel border border-line bg-surface px-5 py-4 sm:flex sm:flex-wrap sm:items-center sm:gap-x-10', children: items.map((item) => (_jsxs("div", { className: 'flex min-w-0 flex-col gap-1', children: [_jsx("dt", { className: 'text-xs font-medium uppercase tracking-wide text-
|
|
2
|
+
export const PsSummaryBar = ({ items }) => (_jsx("dl", { className: 'grid grid-cols-2 gap-x-6 gap-y-4 rounded-ps-panel border border-line bg-surface px-5 py-4 sm:flex sm:flex-wrap sm:items-center sm:gap-x-10', children: items.map((item) => (_jsxs("div", { className: 'flex min-w-0 flex-col gap-1', children: [_jsx("dt", { className: 'text-xs font-medium uppercase tracking-wide text-muted', children: item.label }), _jsx("dd", { className: item.emphasis
|
|
3
3
|
? 'truncate text-xl font-semibold tabular-nums text-ink'
|
|
4
4
|
: 'truncate text-sm font-medium text-ink', children: item.value })] }, item.label))) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PsPageSkeleton } from './ps-page-skeleton.js';
|
|
3
3
|
import { PsTableListSkeleton } from './ps-table-list-skeleton.js';
|
|
4
|
-
export const PsTablePageSkeleton = ({ isNarrow
|
|
4
|
+
export const PsTablePageSkeleton = ({ isNarrow, loadingLabel, title, width, }) => (_jsx(PsPageSkeleton, { hasActions: true, isNarrow: isNarrow, loadingLabel: loadingLabel, title: title, width: width, children: _jsx(PsTableListSkeleton, {}) }));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PsPageWidth } from './ps-page-width.js';
|
|
2
|
+
export const PsPageWidthClassNames = {
|
|
3
|
+
[PsPageWidth.Form]: 'mx-auto flex w-full min-w-0 max-w-7xl flex-col',
|
|
4
|
+
[PsPageWidth.List]: 'flex min-w-0 flex-col',
|
|
5
|
+
[PsPageWidth.Record]: 'flex min-w-0 flex-col',
|
|
6
|
+
[PsPageWidth.Settings]: 'mx-auto flex w-full min-w-0 max-w-7xl flex-col',
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PsStartHighlightClassName = 'ps-focus-ring group flex items-center gap-4 rounded-2xl border border-primary/40 bg-gradient-to-br from-primary/20 via-primary/10 to-transparent p-4 text-left transition-colors hover:border-primary/70';
|
|
@@ -2,5 +2,5 @@ import { PsStepState } from './ps-step-state.js';
|
|
|
2
2
|
export const PsStepMarkerClassNames = {
|
|
3
3
|
[PsStepState.done]: 'border-success bg-success text-white',
|
|
4
4
|
[PsStepState.current]: 'border-primary bg-primary/10 text-primary',
|
|
5
|
-
[PsStepState.upcoming]: 'border-line bg-surface text-
|
|
5
|
+
[PsStepState.upcoming]: 'border-line bg-surface text-subtle',
|
|
6
6
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -138,6 +138,9 @@ export * from './components/ps-metric-row.js';
|
|
|
138
138
|
export * from './components/ps-page-header.js';
|
|
139
139
|
export * from './components/ps-page-intro.js';
|
|
140
140
|
export * from './components/ps-page-layout.js';
|
|
141
|
+
export * from './constants/ps-page-width.js';
|
|
142
|
+
export * from './constants/ps-page-width-class-names.js';
|
|
143
|
+
export * from './services/ps-page-width-service.js';
|
|
141
144
|
export * from './components/ps-page-skeleton.js';
|
|
142
145
|
export * from './components/ps-page-stack.js';
|
|
143
146
|
export * from './components/ps-section-panel.js';
|
|
@@ -169,6 +172,8 @@ export * from './components/ps-split-view.js';
|
|
|
169
172
|
export * from './components/ps-overview-card.js';
|
|
170
173
|
export * from './components/ps-form-footer.js';
|
|
171
174
|
export * from './components/ps-start-highlight.js';
|
|
175
|
+
export * from './components/ps-start-highlight-link.js';
|
|
176
|
+
export * from './constants/ps-start-highlight-class-name.js';
|
|
172
177
|
export * from './components/ps-start-panel.js';
|
|
173
178
|
export * from './components/ps-start-preview.js';
|
|
174
179
|
export * from './components/ps-step-list.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -138,6 +138,9 @@ export * from './components/ps-metric-row';
|
|
|
138
138
|
export * from './components/ps-page-header';
|
|
139
139
|
export * from './components/ps-page-intro';
|
|
140
140
|
export * from './components/ps-page-layout';
|
|
141
|
+
export * from './constants/ps-page-width';
|
|
142
|
+
export * from './constants/ps-page-width-class-names';
|
|
143
|
+
export * from './services/ps-page-width-service';
|
|
141
144
|
export * from './components/ps-page-skeleton';
|
|
142
145
|
export * from './components/ps-page-stack';
|
|
143
146
|
export * from './components/ps-section-panel';
|
|
@@ -169,6 +172,8 @@ export * from './components/ps-split-view';
|
|
|
169
172
|
export * from './components/ps-overview-card';
|
|
170
173
|
export * from './components/ps-form-footer';
|
|
171
174
|
export * from './components/ps-start-highlight';
|
|
175
|
+
export * from './components/ps-start-highlight-link';
|
|
176
|
+
export * from './constants/ps-start-highlight-class-name';
|
|
172
177
|
export * from './components/ps-start-panel';
|
|
173
178
|
export * from './components/ps-start-preview';
|
|
174
179
|
export * from './components/ps-step-list';
|
package/dist/index.js
CHANGED
|
@@ -155,6 +155,9 @@ __exportStar(require("./components/ps-metric-row"), exports);
|
|
|
155
155
|
__exportStar(require("./components/ps-page-header"), exports);
|
|
156
156
|
__exportStar(require("./components/ps-page-intro"), exports);
|
|
157
157
|
__exportStar(require("./components/ps-page-layout"), exports);
|
|
158
|
+
__exportStar(require("./constants/ps-page-width"), exports);
|
|
159
|
+
__exportStar(require("./constants/ps-page-width-class-names"), exports);
|
|
160
|
+
__exportStar(require("./services/ps-page-width-service"), exports);
|
|
158
161
|
__exportStar(require("./components/ps-page-skeleton"), exports);
|
|
159
162
|
__exportStar(require("./components/ps-page-stack"), exports);
|
|
160
163
|
__exportStar(require("./components/ps-section-panel"), exports);
|
|
@@ -186,6 +189,8 @@ __exportStar(require("./components/ps-split-view"), exports);
|
|
|
186
189
|
__exportStar(require("./components/ps-overview-card"), exports);
|
|
187
190
|
__exportStar(require("./components/ps-form-footer"), exports);
|
|
188
191
|
__exportStar(require("./components/ps-start-highlight"), exports);
|
|
192
|
+
__exportStar(require("./components/ps-start-highlight-link"), exports);
|
|
193
|
+
__exportStar(require("./constants/ps-start-highlight-class-name"), exports);
|
|
189
194
|
__exportStar(require("./components/ps-start-panel"), exports);
|
|
190
195
|
__exportStar(require("./components/ps-start-preview"), exports);
|
|
191
196
|
__exportStar(require("./components/ps-step-list"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsPageWidthService = void 0;
|
|
4
|
+
const ps_page_width_1 = require("../constants/ps-page-width");
|
|
5
|
+
class PsPageWidthService {
|
|
6
|
+
static resolve(width, isNarrow) {
|
|
7
|
+
if (width !== undefined)
|
|
8
|
+
return width;
|
|
9
|
+
return isNarrow === true ? ps_page_width_1.PsPageWidth.Settings : ps_page_width_1.PsPageWidth.List;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.PsPageWidthService = PsPageWidthService;
|