@pallasoft/ps-core-components 2.34.0 → 2.35.1
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-analytics-provider.d.ts +2 -1
- package/dist/components/ps-analytics-provider.js +3 -2
- package/dist/components/ps-reflective-app-shell.js +1 -1
- package/dist/constants/ps-analytics-config.d.ts +1 -0
- package/dist/constants/ps-analytics-config.js +1 -0
- package/dist/esm/analytics/index.js +12 -12
- package/dist/esm/analytics/report-client-error.js +1 -1
- package/dist/esm/components/ps-accordion.js +2 -2
- package/dist/esm/components/ps-action-tile.js +2 -2
- package/dist/esm/components/ps-active-filter-chip.js +1 -1
- package/dist/esm/components/ps-analytics-provider.js +8 -7
- package/dist/esm/components/ps-app-store-buttons.js +3 -3
- package/dist/esm/components/ps-audio-spectrum.js +1 -1
- package/dist/esm/components/ps-badge.js +2 -2
- package/dist/esm/components/ps-button.js +2 -2
- package/dist/esm/components/ps-capped-list.js +2 -2
- package/dist/esm/components/ps-card-block-skeleton.js +2 -2
- package/dist/esm/components/ps-card.js +3 -3
- package/dist/esm/components/ps-client-error-reporter.js +2 -2
- package/dist/esm/components/ps-client-only.js +1 -1
- package/dist/esm/components/ps-consent-banner.js +3 -3
- package/dist/esm/components/ps-drag-overlay.js +2 -2
- package/dist/esm/components/ps-draggable-grid.js +5 -5
- package/dist/esm/components/ps-fab.js +1 -1
- package/dist/esm/components/ps-faq-answer.js +1 -1
- package/dist/esm/components/ps-feature-card.js +1 -1
- package/dist/esm/components/ps-feature-grid.js +3 -3
- package/dist/esm/components/ps-form-fields-skeleton.js +3 -3
- package/dist/esm/components/ps-form-footer.js +1 -1
- package/dist/esm/components/ps-form-page-skeleton.js +4 -4
- package/dist/esm/components/ps-icon-button.js +1 -1
- package/dist/esm/components/ps-icon-link.js +1 -1
- package/dist/esm/components/ps-infinite-scroll.js +1 -1
- package/dist/esm/components/ps-intro-skeleton.js +1 -1
- package/dist/esm/components/ps-layer.js +1 -1
- package/dist/esm/components/ps-link-button.js +1 -1
- package/dist/esm/components/ps-link-tile-grid.js +1 -1
- package/dist/esm/components/ps-list-tile.js +2 -2
- package/dist/esm/components/ps-metric-card.js +2 -2
- package/dist/esm/components/ps-metric-grid-skeleton.js +1 -1
- package/dist/esm/components/ps-metric-grid.js +2 -2
- package/dist/esm/components/ps-metric-row.js +2 -2
- package/dist/esm/components/ps-navigation-progress.js +2 -2
- package/dist/esm/components/ps-page-header.js +2 -2
- package/dist/esm/components/ps-page-skeleton.js +6 -6
- package/dist/esm/components/ps-pallasoft-mark.js +1 -1
- package/dist/esm/components/ps-pallasoft-sign-in-button.js +2 -2
- package/dist/esm/components/ps-pill.js +2 -2
- package/dist/esm/components/ps-rating-display.js +2 -2
- package/dist/esm/components/ps-reflective-app-shell.js +1 -1
- package/dist/esm/components/ps-scaled-preview.js +2 -2
- package/dist/esm/components/ps-section-header.js +3 -3
- package/dist/esm/components/ps-section-panel-skeleton.js +1 -1
- package/dist/esm/components/ps-signed-amount.js +1 -1
- package/dist/esm/components/ps-site-header.js +2 -2
- package/dist/esm/components/ps-skeleton-card.js +2 -2
- package/dist/esm/components/ps-skeleton-list.js +4 -4
- package/dist/esm/components/ps-skeleton-media.js +3 -3
- package/dist/esm/components/ps-skeleton-table.js +4 -4
- package/dist/esm/components/ps-skeleton-text.js +3 -3
- package/dist/esm/components/ps-skeleton.js +3 -3
- package/dist/esm/components/ps-sortable-list.js +5 -5
- package/dist/esm/components/ps-start-panel.js +1 -1
- package/dist/esm/components/ps-step-list.js +2 -2
- package/dist/esm/components/ps-step-progress.js +1 -1
- package/dist/esm/components/ps-store-badge.js +1 -1
- package/dist/esm/components/ps-tab-row-skeleton.js +2 -2
- package/dist/esm/components/ps-table-list-skeleton.js +2 -2
- package/dist/esm/components/ps-table-page-skeleton.js +2 -2
- package/dist/esm/components/ps-theme-controller.js +2 -2
- package/dist/esm/components/ps-tool-card-grid.js +2 -2
- package/dist/esm/components/ps-voice-orb.js +1 -1
- package/dist/esm/constants/ps-analytics-config.js +1 -0
- package/dist/esm/constants/ps-draggable-grid.js +1 -1
- package/dist/esm/constants/ps-rating-display-config.js +1 -1
- package/dist/esm/constants/ps-skeleton-config.js +1 -1
- package/dist/esm/constants/ps-step-marker-class-names.js +1 -1
- package/dist/esm/constants/ps-store-badge-config.js +1 -1
- package/dist/esm/hooks/use-consent.js +2 -2
- package/dist/esm/hooks/use-ps-drag-sensors.js +1 -1
- package/dist/esm/hooks/use-ps-exit-transition.js +1 -1
- package/dist/esm/hooks/use-ps-hydrated.js +1 -1
- package/dist/esm/hooks/use-ps-layer-z-index.js +1 -1
- package/dist/esm/hooks/use-ps-navigation-progress.js +1 -1
- package/dist/esm/hooks/use-ps-optimistic-fetcher.js +2 -2
- package/dist/esm/hooks/use-ps-optimistic-save.js +2 -2
- package/dist/esm/hooks/use-ps-scroll-lock.js +1 -1
- package/dist/esm/index.js +173 -173
- package/dist/esm/services/analytics-csp-service.js +2 -2
- package/dist/esm/services/ps-analytics-key-service.js +1 -1
- package/dist/esm/services/ps-client-error-service.js +1 -1
- package/dist/esm/services/ps-consent-service.js +1 -1
- package/dist/esm/services/ps-google-analytics-service.js +1 -1
- package/dist/esm/services/ps-optimistic-save-service.js +1 -1
- package/dist/esm/services/ps-post-hog-service.js +1 -1
- package/dist/esm/services/ps-skeleton-class-service.js +1 -1
- package/package.json +3 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
2
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
3
3
|
export const PsSectionPanelSkeleton = ({ children, title }) => (_jsxs("section", { className: 'ps-section', children: [_jsx("div", { className: 'flex min-h-10 items-center', children: title === undefined ? (_jsx(PsSkeleton, { className: 'h-4 w-44' })) : (_jsx("h2", { className: 'text-base font-semibold text-ink', children: title })) }), _jsx("div", { className: 'flex min-w-0 flex-col gap-4', children: children })] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
3
|
import { AmountDirection, Common } from '@pallasoft/ps-utilities';
|
|
4
|
-
import { PsAmountDirectionClasses } from '../constants/ps-amount-direction-classes';
|
|
4
|
+
import { PsAmountDirectionClasses } from '../constants/ps-amount-direction-classes.js';
|
|
5
5
|
export const PsSignedAmount = ({ amount, className, formatted }) => {
|
|
6
6
|
const direction = Common.AmountService.direction(amount);
|
|
7
7
|
return (_jsxs("span", { className: PallasoftClassNameService.merge('tabular-nums', PsAmountDirectionClasses[direction], className), children: [direction === AmountDirection.In ? '+' : '', formatted] }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
3
|
import { PsIcon, PsIconKey } from '@pallasoft/ps-icons';
|
|
4
|
-
import { PsSiteHeaderConfig } from '../constants/ps-site-header-config';
|
|
5
|
-
import { usePsPublishedHeight } from '../hooks/use-ps-published-height';
|
|
4
|
+
import { PsSiteHeaderConfig } from '../constants/ps-site-header-config.js';
|
|
5
|
+
import { usePsPublishedHeight } from '../hooks/use-ps-published-height.js';
|
|
6
6
|
const logoLinkClassName = 'flex shrink-0 items-center gap-2.5';
|
|
7
7
|
export const PsSiteHeader = ({ centerContent, className, homeHref, label, LinkComponent, logoAlt, logoClassName, logoSrc, logoSrcDark, logoSrcMobile, logoSrcMobileDark, navClassName, onBack, showLabel = false, trailing, }) => {
|
|
8
8
|
const headerRef = usePsPublishedHeight(PsSiteHeaderConfig.heightVariable);
|
|
@@ -1,5 +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
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
4
|
-
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
4
|
+
import { PsSkeletonGroup } from './ps-skeleton-group.js';
|
|
5
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' })] }));
|
|
@@ -1,7 +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 { PsSkeletonConfig } from '../constants/ps-skeleton-config';
|
|
4
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
5
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
6
|
-
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
3
|
+
import { PsSkeletonConfig } from '../constants/ps-skeleton-config.js';
|
|
4
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
5
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
6
|
+
import { PsSkeletonGroup } from './ps-skeleton-group.js';
|
|
7
7
|
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: PsSkeletonShape.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)))] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
4
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
5
|
-
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
3
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
4
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
5
|
+
import { PsSkeletonGroup } from './ps-skeleton-group.js';
|
|
6
6
|
export const PsSkeletonMedia = ({ aspect = '16 / 9', className, hasCaption = true, label, }) => (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('w-full', className), label: label, children: [_jsx(PsSkeleton, { aspect: aspect, radius: 'var(--ps-radius-card, 1rem)', shape: PsSkeletonShape.Block }), hasCaption ? _jsx(PsSkeleton, { lines: 2, shape: PsSkeletonShape.Text }) : null] }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsSkeletonConfig } from '../constants/ps-skeleton-config';
|
|
4
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
5
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
6
|
-
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
3
|
+
import { PsSkeletonConfig } from '../constants/ps-skeleton-config.js';
|
|
4
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
5
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
6
|
+
import { PsSkeletonGroup } from './ps-skeleton-group.js';
|
|
7
7
|
export const PsSkeletonTable = ({ alignments, className, columns = 4, hasFooter = false, hasToolbar = false, isFramed = true, rows = 6, }) => {
|
|
8
8
|
const gridTemplateColumns = `minmax(0, 2fr) repeat(${Math.max(columns - 1, 0)}, minmax(0, 1fr))`;
|
|
9
9
|
const isRight = (columnIndex) => alignments !== undefined
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsSkeletonConfig } from '../constants/ps-skeleton-config';
|
|
4
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
5
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
3
|
+
import { PsSkeletonConfig } from '../constants/ps-skeleton-config.js';
|
|
4
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
5
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
6
6
|
export const PsSkeletonText = ({ className, lines = PsSkeletonConfig.defaultTextLines, }) => (_jsx(PsSkeleton, { className: PallasoftClassNameService.merge('w-full', className), lines: lines, shape: PsSkeletonShape.Text }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsSkeletonConfig } from '../constants/ps-skeleton-config';
|
|
4
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
5
|
-
import { PsSkeletonClassService } from '../services/ps-skeleton-class-service';
|
|
3
|
+
import { PsSkeletonConfig } from '../constants/ps-skeleton-config.js';
|
|
4
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
5
|
+
import { PsSkeletonClassService } from '../services/ps-skeleton-class-service.js';
|
|
6
6
|
const sizeStyle = (props) => {
|
|
7
7
|
const style = {};
|
|
8
8
|
if (props.width !== undefined)
|
|
@@ -3,11 +3,11 @@ import { useState } from 'react';
|
|
|
3
3
|
import { DndContext, closestCenter, } from '@dnd-kit/core';
|
|
4
4
|
import { SortableContext, horizontalListSortingStrategy, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable';
|
|
5
5
|
import { CSS } from '@dnd-kit/utilities';
|
|
6
|
-
import { PsDragClasses, PsDragConfig, PsDragListLiftFrames } from '../constants/ps-drag-config';
|
|
7
|
-
import { usePsDragSensors } from '../hooks/use-ps-drag-sensors';
|
|
8
|
-
import { usePsReducedMotion } from '../hooks/use-ps-reduced-motion';
|
|
9
|
-
import { PsDragGrip } from './ps-drag-grip';
|
|
10
|
-
import { PsDragOverlay } from './ps-drag-overlay';
|
|
6
|
+
import { PsDragClasses, PsDragConfig, PsDragListLiftFrames } from '../constants/ps-drag-config.js';
|
|
7
|
+
import { usePsDragSensors } from '../hooks/use-ps-drag-sensors.js';
|
|
8
|
+
import { usePsReducedMotion } from '../hooks/use-ps-reduced-motion.js';
|
|
9
|
+
import { PsDragGrip } from './ps-drag-grip.js';
|
|
10
|
+
import { PsDragOverlay } from './ps-drag-overlay.js';
|
|
11
11
|
const PsSortableListHandle = ({ attributes, className, icon, label, listeners, setActivatorNodeRef, }) => (_jsx("button", { ...attributes, ...listeners, "aria-label": label, className: className === undefined ? PsDragClasses.handle : className, ref: setActivatorNodeRef, title: label, type: 'button', children: icon === undefined ? _jsx(PsDragGrip, {}) : icon }));
|
|
12
12
|
const PsSortableListRow = ({ className, handleClassName, handleIcon, getHandleLabel, index, isDisabled, item, renderItem, }) => {
|
|
13
13
|
const isReduced = usePsReducedMotion();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PsCard } from './ps-card';
|
|
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
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-ink/55', children: step.description })] })] }, step.id))) })), actions] }), preview === undefined ? null : _jsx("div", { className: 'relative hidden xl:block', children: preview })] }) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PsStepMarkerClassNames } from '../constants/ps-step-marker-class-names';
|
|
3
|
-
import { PsStepState } from '../constants/ps-step-state';
|
|
2
|
+
import { PsStepMarkerClassNames } from '../constants/ps-step-marker-class-names.js';
|
|
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
5
|
? 'text-sm font-semibold text-ink/50'
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsStepProgressConfig } from '../constants/ps-step-progress-config';
|
|
3
|
+
import { PsStepProgressConfig } from '../constants/ps-step-progress-config.js';
|
|
4
4
|
export const PsStepProgress = ({ className, label = PsStepProgressConfig.defaultLabel, total, value, }) => {
|
|
5
5
|
const steps = Math.max(total, PsStepProgressConfig.minimumTotal);
|
|
6
6
|
const done = Math.min(Math.max(value, 0), steps);
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
import { PsStoreBadgeClasses, PsStoreBadgeConfig } from '../constants/ps-store-badge-config';
|
|
3
|
+
import { PsStoreBadgeClasses, PsStoreBadgeConfig } from '../constants/ps-store-badge-config.js';
|
|
4
4
|
export const PsStoreBadge = ({ className, href, labels, onPress, platform, size = 'default', }) => {
|
|
5
5
|
const platformData = PsStoreBadgeConfig.platforms[platform];
|
|
6
6
|
const shownLabels = labels === undefined ? platformData.labels : labels;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
3
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
2
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
4
4
|
export const PsTabRowSkeleton = () => (_jsx(PsSkeleton, { height: '2.75rem', radius: '9999px', shape: PsSkeletonShape.Block, width: '100%' }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsPageSkeletonConfig } from '../constants/ps-page-skeleton-config';
|
|
3
|
-
import { PsSkeletonTable } from './ps-skeleton-table';
|
|
2
|
+
import { PsPageSkeletonConfig } from '../constants/ps-page-skeleton-config.js';
|
|
3
|
+
import { PsSkeletonTable } from './ps-skeleton-table.js';
|
|
4
4
|
export const PsTableListSkeleton = () => (_jsx(PsSkeletonTable, { columns: PsPageSkeletonConfig.tableColumns, hasToolbar: true, rows: PsPageSkeletonConfig.tableRows }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsPageSkeleton } from './ps-page-skeleton';
|
|
3
|
-
import { PsTableListSkeleton } from './ps-table-list-skeleton';
|
|
2
|
+
import { PsPageSkeleton } from './ps-page-skeleton.js';
|
|
3
|
+
import { PsTableListSkeleton } from './ps-table-list-skeleton.js';
|
|
4
4
|
export const PsTablePageSkeleton = ({ isNarrow = false, loadingLabel, title, }) => (_jsx(PsPageSkeleton, { hasActions: true, isNarrow: isNarrow, loadingLabel: loadingLabel, title: title, children: _jsx(PsTableListSkeleton, {}) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { usePsThemeMode } from '../hooks/use-ps-theme-mode';
|
|
3
|
-
import { PsThemeToggle } from './ps-theme-toggle';
|
|
2
|
+
import { usePsThemeMode } from '../hooks/use-ps-theme-mode.js';
|
|
3
|
+
import { PsThemeToggle } from './ps-theme-toggle.js';
|
|
4
4
|
export const PsThemeController = () => {
|
|
5
5
|
const { resolvedMode, toggle } = usePsThemeMode();
|
|
6
6
|
if (resolvedMode === null)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PsIcon, PsIconKey } from '@pallasoft/ps-icons';
|
|
3
3
|
import { PsStaggerContainer, PsStaggerItem } from '@pallasoft/ps-motion-components';
|
|
4
|
-
import { PsWebsiteSectionConfig } from '../constants/ps-website-section-config';
|
|
5
|
-
import { PsCard } from './ps-card';
|
|
4
|
+
import { PsWebsiteSectionConfig } from '../constants/ps-website-section-config.js';
|
|
5
|
+
import { PsCard } from './ps-card.js';
|
|
6
6
|
const cardLinkClassName = 'ps-pressable ps-focus-ring block h-full rounded-ps-card';
|
|
7
7
|
export const PsToolCardGrid = ({ cards, LinkComponent }) => {
|
|
8
8
|
const renderCard = (card, content) => LinkComponent ? (_jsx(LinkComponent, { "aria-label": card.ariaLabel, className: cardLinkClassName, prefetch: 'intent', to: card.href, children: content })) : (_jsx("a", { "aria-label": card.ariaLabel, className: cardLinkClassName, href: card.href, children: content }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
4
|
-
import { PsVoiceOrbCadenceByState, PsVoiceOrbConfig, PsVoiceOrbThemes, } from '../constants/ps-voice-orb';
|
|
4
|
+
import { PsVoiceOrbCadenceByState, PsVoiceOrbConfig, PsVoiceOrbThemes, } from '../constants/ps-voice-orb.js';
|
|
5
5
|
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
6
6
|
const approach = (current, target, factor) => current + (target - current) * factor;
|
|
7
7
|
const buildRimMask = (innerStopPercent) => `radial-gradient(circle, transparent ${innerStopPercent}%, black ${innerStopPercent + 6}%, black 92%, transparent 97%)`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PsDragClasses, PsDragConfig, PsDragLiftFrames } from './ps-drag-config';
|
|
1
|
+
import { PsDragClasses, PsDragConfig, PsDragLiftFrames } from './ps-drag-config.js';
|
|
2
2
|
export const PsDraggableGridConfig = PsDragConfig;
|
|
3
3
|
export const PsDraggableGridClasses = {
|
|
4
4
|
handle: PsDragClasses.handle,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PsStepState } from './ps-step-state';
|
|
1
|
+
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',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useSyncExternalStore } from 'react';
|
|
2
|
-
import { PsAnalyticsConfig } from '../constants/ps-analytics-config';
|
|
3
|
-
import { PsConsentService } from '../services/ps-consent-service';
|
|
2
|
+
import { PsAnalyticsConfig } from '../constants/ps-analytics-config.js';
|
|
3
|
+
import { PsConsentService } from '../services/ps-consent-service.js';
|
|
4
4
|
export const useConsent = (consentCookieName = PsAnalyticsConfig.defaultConsentCookieName) => {
|
|
5
5
|
const state = useSyncExternalStore((listener) => PsConsentService.subscribe(listener), () => PsConsentService.snapshot(consentCookieName), () => PsConsentService.serverState);
|
|
6
6
|
const accept = useCallback(() => PsConsentService.choose(consentCookieName, PsAnalyticsConfig.consentGranted), [consentCookieName]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeyboardSensor, MouseSensor, TouchSensor, useSensor, useSensors, } from '@dnd-kit/core';
|
|
2
2
|
import { sortableKeyboardCoordinates } from '@dnd-kit/sortable';
|
|
3
|
-
import { PsDragConfig } from '../constants/ps-drag-config';
|
|
3
|
+
import { PsDragConfig } from '../constants/ps-drag-config.js';
|
|
4
4
|
export const usePsDragSensors = () => useSensors(useSensor(MouseSensor, {
|
|
5
5
|
activationConstraint: { distance: PsDragConfig.activationDistance },
|
|
6
6
|
}), useSensor(TouchSensor, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { usePsReducedMotion } from './use-ps-reduced-motion';
|
|
2
|
+
import { usePsReducedMotion } from './use-ps-reduced-motion.js';
|
|
3
3
|
export const usePsExitTransition = (isOpen, durationMs = 180) => {
|
|
4
4
|
const [shouldRender, setShouldRender] = useState(isOpen);
|
|
5
5
|
const [isClosing, setIsClosing] = useState(false);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { useSyncExternalStore } from 'react';
|
|
2
|
-
import { PsHydrationStore } from '../constants/ps-hydration-store';
|
|
2
|
+
import { PsHydrationStore } from '../constants/ps-hydration-store.js';
|
|
3
3
|
export const usePsHydrated = () => useSyncExternalStore(PsHydrationStore.subscribe, PsHydrationStore.clientSnapshot, PsHydrationStore.serverSnapshot);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
2
|
import { PallasoftZIndexService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsLayerContext } from '../contexts/ps-layer-context';
|
|
3
|
+
import { PsLayerContext } from '../contexts/ps-layer-context.js';
|
|
4
4
|
export const usePsLayerZIndex = (layer) => PallasoftZIndexService.above(useContext(PsLayerContext), layer);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { PsNavigationProgressConfig } from '../constants/ps-navigation-progress-config';
|
|
2
|
+
import { PsNavigationProgressConfig } from '../constants/ps-navigation-progress-config.js';
|
|
3
3
|
const hidden = { isAnimated: false, isVisible: false, width: 0 };
|
|
4
4
|
export const usePsNavigationProgress = (isLoading, delayMs = PsNavigationProgressConfig.showDelayMs) => {
|
|
5
5
|
const [state, setState] = useState(hidden);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { usePsChangeQueue } from './use-ps-change-queue';
|
|
3
|
-
import { usePsOptimisticRows } from './use-ps-optimistic-rows';
|
|
2
|
+
import { usePsChangeQueue } from './use-ps-change-queue.js';
|
|
3
|
+
import { usePsOptimisticRows } from './use-ps-optimistic-rows.js';
|
|
4
4
|
export const usePsOptimisticFetcher = ({ apply, fetcher, isHolding = false, isSuccess, merge, revalidator, rows, }) => {
|
|
5
5
|
const [isUnsettled, setIsUnsettled] = useState(false);
|
|
6
6
|
const submitted = useRef(0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
|
-
import { PsOptimisticSaveService } from '../services/ps-optimistic-save-service';
|
|
3
|
-
import { usePsOptimisticFetcher } from './use-ps-optimistic-fetcher';
|
|
2
|
+
import { PsOptimisticSaveService } from '../services/ps-optimistic-save-service.js';
|
|
3
|
+
import { usePsOptimisticFetcher } from './use-ps-optimistic-fetcher.js';
|
|
4
4
|
export const usePsOptimisticSave = ({ fetcher, isSuccess, revalidator, rows, scopeId, spec, }) => {
|
|
5
5
|
const apply = useCallback((base, changes) => PsOptimisticSaveService.apply(base, changes, spec), [spec]);
|
|
6
6
|
const optimistic = usePsOptimisticFetcher({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { PsScrollLockService } from '../services/ps-scroll-lock-service';
|
|
2
|
+
import { PsScrollLockService } from '../services/ps-scroll-lock-service.js';
|
|
3
3
|
export const usePsScrollLock = (isLocked) => {
|
|
4
4
|
useEffect(() => {
|
|
5
5
|
if (!isLocked)
|