@pallasoft/ps-core-components 2.34.0 → 2.35.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-analytics-provider.d.ts +2 -1
- package/dist/components/ps-analytics-provider.js +3 -2
- 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-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 -2
|
@@ -9,6 +9,7 @@ export interface PsAnalyticsProviderProps {
|
|
|
9
9
|
appVersion?: string;
|
|
10
10
|
nonce?: string;
|
|
11
11
|
consentCookieName?: string;
|
|
12
|
+
requireConsent?: boolean;
|
|
12
13
|
pathname?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare const PsAnalyticsProvider: ({ children, googleAnalyticsId, googleTagManagerUrl, postHogKey, postHogApiHost, userId, appVersion, nonce, consentCookieName, pathname, }: PsAnalyticsProviderProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const PsAnalyticsProvider: ({ children, googleAnalyticsId, googleTagManagerUrl, postHogKey, postHogApiHost, userId, appVersion, nonce, consentCookieName, requireConsent, pathname, }: PsAnalyticsProviderProps) => import("react").JSX.Element;
|
|
@@ -8,8 +8,9 @@ const use_consent_1 = require("../hooks/use-consent");
|
|
|
8
8
|
const ps_analytics_key_service_1 = require("../services/ps-analytics-key-service");
|
|
9
9
|
const ps_google_analytics_service_1 = require("../services/ps-google-analytics-service");
|
|
10
10
|
const ps_post_hog_service_1 = require("../services/ps-post-hog-service");
|
|
11
|
-
const PsAnalyticsProvider = ({ children, googleAnalyticsId, googleTagManagerUrl = ps_analytics_config_1.PsAnalyticsConfig.defaultTagManagerUrl, postHogKey, postHogApiHost, userId, appVersion, nonce, consentCookieName = ps_analytics_config_1.PsAnalyticsConfig.defaultConsentCookieName, pathname, }) => {
|
|
12
|
-
const
|
|
11
|
+
const PsAnalyticsProvider = ({ children, googleAnalyticsId, googleTagManagerUrl = ps_analytics_config_1.PsAnalyticsConfig.defaultTagManagerUrl, postHogKey, postHogApiHost, userId, appVersion, nonce, consentCookieName = ps_analytics_config_1.PsAnalyticsConfig.defaultConsentCookieName, requireConsent = ps_analytics_config_1.PsAnalyticsConfig.defaultRequireConsent, pathname, }) => {
|
|
12
|
+
const consent = (0, use_consent_1.useConsent)(consentCookieName);
|
|
13
|
+
const isGranted = requireConsent ? consent.isGranted : true;
|
|
13
14
|
const [postHog, setPostHog] = (0, react_1.useState)(null);
|
|
14
15
|
const identifiedRef = (0, react_1.useRef)(null);
|
|
15
16
|
const isGoogleOn = ps_analytics_key_service_1.PsAnalyticsKeyService.isEnabled(googleAnalyticsId);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const PsAnalyticsConfig: {
|
|
2
2
|
readonly offValues: readonly ["", "_"];
|
|
3
3
|
readonly defaultConsentCookieName: "ps_consent";
|
|
4
|
+
readonly defaultRequireConsent: true;
|
|
4
5
|
readonly consentGranted: "granted";
|
|
5
6
|
readonly consentDenied: "denied";
|
|
6
7
|
readonly consentMaxAgeSeconds: 31536000;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from '../components/ps-analytics-provider';
|
|
2
|
-
export * from '../components/ps-client-error-reporter';
|
|
3
|
-
export * from '../components/ps-consent-banner';
|
|
4
|
-
export * from '../constants/ps-analytics-config';
|
|
5
|
-
export * from '../constants/ps-client-error-config';
|
|
6
|
-
export * from '../hooks/use-consent';
|
|
7
|
-
export * from '../models/analytics-csp-input';
|
|
8
|
-
export * from '../models/analytics-csp-origins';
|
|
9
|
-
export * from '../models/ps-consent-api';
|
|
10
|
-
export * from '../models/ps-consent-choice';
|
|
11
|
-
export * from '../services/analytics-csp-service';
|
|
12
|
-
export * from './report-client-error';
|
|
1
|
+
export * from '../components/ps-analytics-provider.js';
|
|
2
|
+
export * from '../components/ps-client-error-reporter.js';
|
|
3
|
+
export * from '../components/ps-consent-banner.js';
|
|
4
|
+
export * from '../constants/ps-analytics-config.js';
|
|
5
|
+
export * from '../constants/ps-client-error-config.js';
|
|
6
|
+
export * from '../hooks/use-consent.js';
|
|
7
|
+
export * from '../models/analytics-csp-input.js';
|
|
8
|
+
export * from '../models/analytics-csp-origins.js';
|
|
9
|
+
export * from '../models/ps-consent-api.js';
|
|
10
|
+
export * from '../models/ps-consent-choice.js';
|
|
11
|
+
export * from '../services/analytics-csp-service.js';
|
|
12
|
+
export * from './report-client-error.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PsClientErrorService } from '../services/ps-client-error-service';
|
|
1
|
+
import { PsClientErrorService } from '../services/ps-client-error-service.js';
|
|
2
2
|
export const reportClientError = (error, context) => PsClientErrorService.report(error, context);
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, 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
4
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
5
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
6
|
-
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
5
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
6
|
+
import { PsSkeletonGroup } from './ps-skeleton-group.js';
|
|
7
7
|
export const PsAccordion = ({ children, className, isLoading = false, isOpen, label, onToggle, trailing, }) => isLoading ? (_jsx(PsSkeletonGroup, { className: PallasoftClassNameService.merge('rounded-ps-card border border-line/70 bg-surface/60 px-4 py-3.5', className), label: 'Loading', children: _jsx(PsSkeleton, { className: 'h-4 w-40' }) })) : (_jsx(AccordionPrimitive.Root, { type: 'single', collapsible: true, value: isOpen ? 'open' : '', onValueChange: onToggle, className: PallasoftClassNameService.merge('overflow-hidden rounded-ps-card border border-line/70 bg-surface/60 transition-colors duration-200', isOpen ? 'border-primary/25 bg-surface' : 'hover:border-line hover:bg-surface/90', className), children: _jsxs(AccordionPrimitive.Item, { value: 'open', children: [_jsx(AccordionPrimitive.Header, { children: _jsxs(AccordionPrimitive.Trigger, { className: 'ps-focus-ring flex w-full items-center justify-between gap-3 px-4 py-3.5 text-left', children: [_jsx("span", { className: 'text-body-2 font-semibold text-ink', children: label }), _jsxs("span", { className: 'flex shrink-0 items-center gap-2', children: [trailing, _jsx(PsIcon, { iconKey: PsIconKey.ChevronRight, className: PallasoftClassNameService.merge('h-4 w-4 text-ink/40 transition-transform duration-200', isOpen ? 'rotate-90 text-primary' : '') })] })] }) }), _jsx(AccordionPrimitive.Content, { className: 'ps-accordion-content', children: _jsx("div", { className: 'border-t border-line/70 p-4', children: children }) })] }) }));
|
|
@@ -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 { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
4
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
3
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
4
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
5
5
|
const variantClassNames = {
|
|
6
6
|
default: 'ps-action-tile',
|
|
7
7
|
primary: 'ps-action-tile ps-action-tile-primary',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PsIcon, PsIconKey } from '@pallasoft/ps-icons';
|
|
3
|
-
import { PsPill } from './ps-pill';
|
|
3
|
+
import { PsPill } from './ps-pill.js';
|
|
4
4
|
export const PsActiveFilterChip = ({ id, label, onRemove, removeLabel, }) => (_jsx("button", { "aria-label": removeLabel, className: 'ps-focus-ring shrink-0 rounded-ps-control', id: id, onClick: onRemove, type: 'button', children: _jsx(PsPill, { className: 'pr-2', tone: 'primary', children: _jsxs("span", { className: 'flex items-center gap-1.5', children: [label, _jsx(PsIcon, { className: 'h-3 w-3', iconKey: PsIconKey.Close })] }) }) }));
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { PsAnalyticsConfig } from '../constants/ps-analytics-config';
|
|
4
|
-
import { useConsent } from '../hooks/use-consent';
|
|
5
|
-
import { PsAnalyticsKeyService } from '../services/ps-analytics-key-service';
|
|
6
|
-
import { PsGoogleAnalyticsService } from '../services/ps-google-analytics-service';
|
|
7
|
-
import { PsPostHogService } from '../services/ps-post-hog-service';
|
|
8
|
-
export const PsAnalyticsProvider = ({ children, googleAnalyticsId, googleTagManagerUrl = PsAnalyticsConfig.defaultTagManagerUrl, postHogKey, postHogApiHost, userId, appVersion, nonce, consentCookieName = PsAnalyticsConfig.defaultConsentCookieName, pathname, }) => {
|
|
9
|
-
const
|
|
3
|
+
import { PsAnalyticsConfig } from '../constants/ps-analytics-config.js';
|
|
4
|
+
import { useConsent } from '../hooks/use-consent.js';
|
|
5
|
+
import { PsAnalyticsKeyService } from '../services/ps-analytics-key-service.js';
|
|
6
|
+
import { PsGoogleAnalyticsService } from '../services/ps-google-analytics-service.js';
|
|
7
|
+
import { PsPostHogService } from '../services/ps-post-hog-service.js';
|
|
8
|
+
export const PsAnalyticsProvider = ({ children, googleAnalyticsId, googleTagManagerUrl = PsAnalyticsConfig.defaultTagManagerUrl, postHogKey, postHogApiHost, userId, appVersion, nonce, consentCookieName = PsAnalyticsConfig.defaultConsentCookieName, requireConsent = PsAnalyticsConfig.defaultRequireConsent, pathname, }) => {
|
|
9
|
+
const consent = useConsent(consentCookieName);
|
|
10
|
+
const isGranted = requireConsent ? consent.isGranted : true;
|
|
10
11
|
const [postHog, setPostHog] = useState(null);
|
|
11
12
|
const identifiedRef = useRef(null);
|
|
12
13
|
const isGoogleOn = PsAnalyticsKeyService.isEnabled(googleAnalyticsId);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsStoreBadgeClasses } from '../constants/ps-store-badge-config';
|
|
4
|
-
import { PsStorePlatform } from '../constants/ps-store-platform';
|
|
5
|
-
import { PsStoreBadge } from './ps-store-badge';
|
|
3
|
+
import { PsStoreBadgeClasses } from '../constants/ps-store-badge-config.js';
|
|
4
|
+
import { PsStorePlatform } from '../constants/ps-store-platform.js';
|
|
5
|
+
import { PsStoreBadge } from './ps-store-badge.js';
|
|
6
6
|
const isLinked = (url) => url !== undefined && url.trim() !== '';
|
|
7
7
|
export const PsAppStoreButtons = ({ appStoreLabels, appStoreUrl, className, playStoreLabels, playStoreUrl, size = 'default', }) => {
|
|
8
8
|
const appStoreHref = isLinked(appStoreUrl) ? appStoreUrl : undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
4
|
-
import { PsAudioSpectrumConfig } from '../constants/ps-audio-spectrum-config';
|
|
4
|
+
import { PsAudioSpectrumConfig } from '../constants/ps-audio-spectrum-config.js';
|
|
5
5
|
const scaleFor = (level) => {
|
|
6
6
|
const bounded = Math.max(0, Math.min(1, level));
|
|
7
7
|
return PsAudioSpectrumConfig.minimumScale + bounded * (1 - PsAudioSpectrumConfig.minimumScale);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } 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';
|
|
3
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
4
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
5
5
|
const toneClassNames = {
|
|
6
6
|
danger: 'bg-danger-soft text-danger dark:bg-rose-500/18 dark:text-rose-100',
|
|
7
7
|
neutral: 'bg-slate-100 text-slate-700 dark:bg-white/10 dark:text-slate-100',
|
|
@@ -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 { PsButtonBaseClassName, PsButtonSizeClassNames, PsButtonVariantClassNames, } from '../constants/ps-button-classes';
|
|
4
|
-
import { PsSpinner } from './ps-spinner';
|
|
3
|
+
import { PsButtonBaseClassName, PsButtonSizeClassNames, PsButtonVariantClassNames, } from '../constants/ps-button-classes.js';
|
|
4
|
+
import { PsSpinner } from './ps-spinner.js';
|
|
5
5
|
export const PsButton = ({ children, className, disabled, isLabelHiddenOnMobile = false, isLoading = false, leadingIcon, loadingLabel, size = 'default', trailingIcon, type = 'button', variant = 'secondary', ...props }) => (_jsxs("button", { className: PallasoftClassNameService.merge(PsButtonBaseClassName, 'disabled:cursor-not-allowed disabled:opacity-50', PsButtonSizeClassNames[size], isLabelHiddenOnMobile && leadingIcon ? 'min-w-11 max-sm:px-0' : '', PsButtonVariantClassNames[variant], className), "aria-busy": isLoading || undefined, disabled: disabled || isLoading, type: type, ...props, children: [isLoading ? (_jsx(PsSpinner, { className: 'absolute inset-0 m-auto', color: 'current', label: loadingLabel !== null && loadingLabel !== undefined ? loadingLabel : 'Loading', size: 'small' })) : null, _jsxs("span", { "aria-hidden": isLoading || undefined, className: PallasoftClassNameService.merge('inline-flex min-w-0 items-center gap-2', isLoading ? 'invisible' : ''), children: [leadingIcon ? _jsx("span", { className: 'shrink-0', children: leadingIcon }) : null, _jsx("span", { className: isLabelHiddenOnMobile && leadingIcon ? 'sr-only sm:not-sr-only sm:truncate' : 'truncate', children: children }), trailingIcon ? _jsx("span", { className: 'shrink-0', children: trailingIcon }) : null] })] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { PsCappedListConfig } from '../constants/ps-capped-list-config';
|
|
4
|
-
import { PsButton } from './ps-button';
|
|
3
|
+
import { PsCappedListConfig } from '../constants/ps-capped-list-config.js';
|
|
4
|
+
import { PsButton } from './ps-button.js';
|
|
5
5
|
export const PsCappedList = ({ getKey, items, renderItem, showAllLabel, visibleRows = PsCappedListConfig.defaultVisibleRows, }) => {
|
|
6
6
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
7
7
|
const isCapped = !isExpanded && items.length > visibleRows;
|
|
@@ -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 PsCardBlockSkeleton = ({ height }) => (_jsx(PsSkeleton, { height: height, radius: '1.25rem', shape: PsSkeletonShape.Block, width: '100%' }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { 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
|
const densityClassNames = {
|
|
7
7
|
compact: 'p-3',
|
|
8
8
|
normal: 'p-4',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { PsClientErrorConfig } from '../constants/ps-client-error-config';
|
|
3
|
-
import { PsClientErrorService } from '../services/ps-client-error-service';
|
|
2
|
+
import { PsClientErrorConfig } from '../constants/ps-client-error-config.js';
|
|
3
|
+
import { PsClientErrorService } from '../services/ps-client-error-service.js';
|
|
4
4
|
export const PsClientErrorReporter = ({ endpoint, appVersion }) => {
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
PsClientErrorService.configure({ endpoint, appVersion });
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { usePsHydrated } from '../hooks/use-ps-hydrated';
|
|
2
|
+
import { usePsHydrated } from '../hooks/use-ps-hydrated.js';
|
|
3
3
|
export const PsClientOnly = ({ children, fallback = null }) => usePsHydrated() ? _jsx(_Fragment, { children: children() }) : _jsx(_Fragment, { children: fallback });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { PallasoftZIndex } from '@pallasoft/ps-design-system';
|
|
4
|
-
import { PsAnalyticsConfig } from '../constants/ps-analytics-config';
|
|
5
|
-
import { useConsent } from '../hooks/use-consent';
|
|
6
|
-
import { PsButton } from './ps-button';
|
|
4
|
+
import { PsAnalyticsConfig } from '../constants/ps-analytics-config.js';
|
|
5
|
+
import { useConsent } from '../hooks/use-consent.js';
|
|
6
|
+
import { PsButton } from './ps-button.js';
|
|
7
7
|
export const PsConsentBanner = ({ title, message, acceptLabel, rejectLabel, privacyPolicyHref, privacyPolicyLabel, consentCookieName = PsAnalyticsConfig.defaultConsentCookieName, className, }) => {
|
|
8
8
|
const { isBannerOpen, accept, reject } = useConsent(consentCookieName);
|
|
9
9
|
const ref = useRef(null);
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { DragOverlay, defaultDropAnimationSideEffects } from '@dnd-kit/core';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
|
-
import { PsDragConfig } from '../constants/ps-drag-config';
|
|
6
|
-
import { usePsReducedMotion } from '../hooks/use-ps-reduced-motion';
|
|
5
|
+
import { PsDragConfig } from '../constants/ps-drag-config.js';
|
|
6
|
+
import { usePsReducedMotion } from '../hooks/use-ps-reduced-motion.js';
|
|
7
7
|
const dropAnimation = {
|
|
8
8
|
duration: PsDragConfig.dropDuration,
|
|
9
9
|
easing: PsDragConfig.dropEasing,
|
|
@@ -3,11 +3,11 @@ import { useState } from 'react';
|
|
|
3
3
|
import { DndContext, closestCenter } from '@dnd-kit/core';
|
|
4
4
|
import { SortableContext, arrayMove, rectSortingStrategy, useSortable } from '@dnd-kit/sortable';
|
|
5
5
|
import { CSS } from '@dnd-kit/utilities';
|
|
6
|
-
import { PsDragConfig } from '../constants/ps-drag-config';
|
|
7
|
-
import { PsDraggableGridClasses, PsDraggableGridLiftFrames } from '../constants/ps-draggable-grid';
|
|
8
|
-
import { usePsDragSensors } from '../hooks/use-ps-drag-sensors';
|
|
9
|
-
import { PsDragGrip } from './ps-drag-grip';
|
|
10
|
-
import { PsDragOverlay } from './ps-drag-overlay';
|
|
6
|
+
import { PsDragConfig } from '../constants/ps-drag-config.js';
|
|
7
|
+
import { PsDraggableGridClasses, PsDraggableGridLiftFrames } from '../constants/ps-draggable-grid.js';
|
|
8
|
+
import { usePsDragSensors } from '../hooks/use-ps-drag-sensors.js';
|
|
9
|
+
import { PsDragGrip } from './ps-drag-grip.js';
|
|
10
|
+
import { PsDragOverlay } from './ps-drag-overlay.js';
|
|
11
11
|
const PsDraggableGridHandle = ({ attributes, label, listeners, setActivatorNodeRef, }) => (_jsx("button", { ...attributes, ...listeners, "aria-label": `Move ${label}`, className: PsDraggableGridClasses.handle, ref: setActivatorNodeRef, title: `Move ${label}`, type: 'button', children: _jsx(PsDragGrip, {}) }));
|
|
12
12
|
const PsSortableGridItem = ({ className, index, item, renderItem, }) => {
|
|
13
13
|
const { attributes, isDragging, listeners, setActivatorNodeRef, setNodeRef, transform, transition, } = useSortable({ id: item.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 { PsButton } from './ps-button';
|
|
3
|
+
import { PsButton } from './ps-button.js';
|
|
4
4
|
const positionClassNames = {
|
|
5
5
|
'bottom-right': 'bottom-6 right-6',
|
|
6
6
|
'bottom-left': 'bottom-6 left-6',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsFaqBlockKind } from '../constants/ps-faq-block-kind';
|
|
2
|
+
import { PsFaqBlockKind } from '../constants/ps-faq-block-kind.js';
|
|
3
3
|
export const PsFaqAnswer = ({ blocks }) => (_jsx("div", { className: 'flex flex-col gap-3', children: blocks.map((block, index) => block.kind === PsFaqBlockKind.List ? (_jsx("ul", { className: 'list-disc pl-5', children: block.items.map((item) => (_jsx("li", { children: item }, item))) }, index)) : (_jsx("div", { className: 'flex flex-col gap-3', children: block.items.map((item) => (_jsx("p", { children: item }, item))) }, index))) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PsIcon } from '@pallasoft/ps-icons';
|
|
3
|
-
import { PsCard } from './ps-card';
|
|
3
|
+
import { PsCard } from './ps-card.js';
|
|
4
4
|
export const PsFeatureCard = ({ description, iconKey, title }) => (_jsxs(PsCard, { className: 'h-full text-center', density: 'spacious', children: [_jsx("span", { className: 'ps-icon-surface mx-auto h-12 w-12', children: _jsx(PsIcon, { className: 'h-6 w-6', iconKey: iconKey }) }), _jsx("h3", { className: 'text-header-4 mb-2 mt-4 text-ink', children: title }), _jsx("p", { className: 'text-body-2 text-ink/60', children: description })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PsStaggerContainer, PsStaggerItem } from '@pallasoft/ps-motion-components';
|
|
3
|
-
import { PsWebsiteSectionConfig } from '../constants/ps-website-section-config';
|
|
4
|
-
import { PsFeatureCard } from './ps-feature-card';
|
|
5
|
-
import { PsSectionIntro } from './ps-section-intro';
|
|
3
|
+
import { PsWebsiteSectionConfig } from '../constants/ps-website-section-config.js';
|
|
4
|
+
import { PsFeatureCard } from './ps-feature-card.js';
|
|
5
|
+
import { PsSectionIntro } from './ps-section-intro.js';
|
|
6
6
|
export const PsFeatureGrid = ({ description, eyebrow, features, title }) => (_jsxs("div", { className: 'flex w-full flex-col items-center gap-8', children: [_jsx(PsSectionIntro, { description: description, eyebrow: eyebrow, title: title }), _jsx(PsStaggerContainer, { className: 'grid w-full grid-cols-1 gap-5 md:grid-cols-3', staggerDelay: PsWebsiteSectionConfig.staggerDelay, children: features.map((feature) => (_jsx(PsStaggerItem, { children: _jsx(PsFeatureCard, { description: feature.description, iconKey: feature.iconKey, title: feature.title }) }, feature.title))) })] }));
|
|
@@ -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 { PsPageSkeletonConfig } from '../constants/ps-page-skeleton-config';
|
|
4
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
5
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
3
|
+
import { PsPageSkeletonConfig } from '../constants/ps-page-skeleton-config.js';
|
|
4
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
5
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
6
6
|
export const PsFormFieldsSkeleton = ({ columnsClassName = PsPageSkeletonConfig.formColumnsClassName, fields = PsPageSkeletonConfig.formFields, }) => (_jsx("div", { className: PallasoftClassNameService.merge('grid gap-4', columnsClassName), children: fields.map((field) => (_jsxs("div", { className: 'flex flex-col gap-2', children: [_jsx(PsSkeleton, { className: PsPageSkeletonConfig.formLabelClassName }), _jsx(PsSkeleton, { className: 'h-ps-control w-full', shape: PsSkeletonShape.Block })] }, field))) }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PsButton } from './ps-button';
|
|
2
|
+
import { PsButton } from './ps-button.js';
|
|
3
3
|
export const PsFormFooter = ({ isSaving, isSecondaryVisible = true, isSubmitDisabled, onSecondary, savingLabel, secondaryLabel, submitLabel, }) => (_jsxs("div", { className: 'sticky bottom-0 z-docked -mx-4 flex justify-end gap-2 border-t border-line bg-surface/90 px-4 py-3 backdrop-blur sm:bottom-4 sm:mx-0 sm:border-0 sm:bg-transparent sm:px-0 sm:py-0 sm:backdrop-blur-none', children: [isSecondaryVisible ? (_jsx(PsButton, { disabled: isSaving, onClick: onSecondary, type: 'button', variant: 'surface', children: secondaryLabel })) : null, _jsx(PsButton, { disabled: isSubmitDisabled || isSaving, isLoading: isSaving, loadingLabel: savingLabel, type: 'submit', variant: 'primary', children: submitLabel })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsPageSkeletonConfig } from '../constants/ps-page-skeleton-config';
|
|
3
|
-
import { PsFormFieldsSkeleton } from './ps-form-fields-skeleton';
|
|
4
|
-
import { PsPageSkeleton } from './ps-page-skeleton';
|
|
5
|
-
import { PsSectionPanelSkeleton } from './ps-section-panel-skeleton';
|
|
2
|
+
import { PsPageSkeletonConfig } from '../constants/ps-page-skeleton-config.js';
|
|
3
|
+
import { PsFormFieldsSkeleton } from './ps-form-fields-skeleton.js';
|
|
4
|
+
import { PsPageSkeleton } from './ps-page-skeleton.js';
|
|
5
|
+
import { PsSectionPanelSkeleton } from './ps-section-panel-skeleton.js';
|
|
6
6
|
export const PsFormPageSkeleton = ({ loadingLabel, title }) => (_jsx(PsPageSkeleton, { hasActions: true, loadingLabel: loadingLabel, title: title, children: PsPageSkeletonConfig.formSections.map((section) => (_jsx(PsSectionPanelSkeleton, { children: _jsx(PsFormFieldsSkeleton, {}) }, section))) }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
3
|
import { PsIcon } from '@pallasoft/ps-icons';
|
|
4
|
-
import { PsIconActionConfig } from '../constants/ps-icon-action-config';
|
|
4
|
+
import { PsIconActionConfig } from '../constants/ps-icon-action-config.js';
|
|
5
5
|
export const PsIconButton = ({ className, iconKey, label, size = 'default', type, ...props }) => (_jsx("button", { ...props, "aria-label": label, className: PallasoftClassNameService.merge(PsIconActionConfig.className, PsIconActionConfig.sizeClassNames[size], PsIconActionConfig.disabledClassName, className), title: label, type: type === 'submit' || type === 'reset' ? type : 'button', children: _jsx(PsIcon, { "aria-hidden": 'true', className: PsIconActionConfig.iconClassName, iconKey: iconKey }) }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
3
|
import { PsIcon } from '@pallasoft/ps-icons';
|
|
4
|
-
import { PsIconActionConfig } from '../constants/ps-icon-action-config';
|
|
4
|
+
import { PsIconActionConfig } from '../constants/ps-icon-action-config.js';
|
|
5
5
|
export const PsIconLink = ({ className, href, iconKey, label, LinkComponent, size = 'default', }) => {
|
|
6
6
|
const linkClassName = PallasoftClassNameService.merge(PsIconActionConfig.className, PsIconActionConfig.sizeClassNames[size], className);
|
|
7
7
|
const icon = (_jsx(PsIcon, { "aria-hidden": 'true', className: PsIconActionConfig.iconClassName, iconKey: iconKey }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
3
|
-
import { PsSpinner } from './ps-spinner';
|
|
3
|
+
import { PsSpinner } from './ps-spinner.js';
|
|
4
4
|
const defaultLoader = (_jsx("div", { className: 'flex w-full justify-center py-8', children: _jsx(PsSpinner, {}) }));
|
|
5
5
|
export const PsInfiniteScroll = ({ children, className, dataLength, hasMore, loader, next, }) => (_jsx(InfiniteScroll, { className: className, dataLength: dataLength, hasMore: hasMore, loader: loader !== null && loader !== undefined ? loader : defaultLoader, next: next, children: children }));
|
|
@@ -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 PsIntroSkeleton = () => (_jsxs("div", { className: 'mx-auto flex w-full max-w-3xl flex-col items-center gap-4', children: [_jsx(PsSkeleton, { height: '0.875rem', radius: '999px', width: '6rem' }), _jsx(PsSkeleton, { height: '2.5rem', radius: '0.75rem', width: '70%' }), _jsx(PsSkeleton, { height: '1.125rem', radius: '0.5rem', width: '85%' })] }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsLayerContext } from '../contexts/ps-layer-context';
|
|
2
|
+
import { PsLayerContext } from '../contexts/ps-layer-context.js';
|
|
3
3
|
export const PsLayer = ({ children, zIndex }) => (_jsx(PsLayerContext.Provider, { value: zIndex, children: children }));
|
|
@@ -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 { PsButtonBaseClassName, PsButtonSizeClassNames, PsLinkButtonVariantClassNames, } from '../constants/ps-button-classes';
|
|
3
|
+
import { PsButtonBaseClassName, PsButtonSizeClassNames, PsLinkButtonVariantClassNames, } from '../constants/ps-button-classes.js';
|
|
4
4
|
export const PsLinkButton = ({ children, className, href, leadingIcon, LinkComponent, size = 'default', trailingIcon, variant = 'secondary', ...props }) => {
|
|
5
5
|
const linkClassName = PallasoftClassNameService.merge(PsButtonBaseClassName, PsButtonSizeClassNames[size], PsLinkButtonVariantClassNames[variant], className);
|
|
6
6
|
const content = (_jsxs("span", { className: 'inline-flex min-w-0 items-center gap-2', children: [leadingIcon ? _jsx("span", { className: 'shrink-0', children: leadingIcon }) : null, _jsx("span", { className: 'truncate', children: children }), trailingIcon ? _jsx("span", { className: 'shrink-0', children: trailingIcon }) : null] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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';
|
|
4
|
+
import { PsWebsiteSectionConfig } from '../constants/ps-website-section-config.js';
|
|
5
5
|
const tileClassName = 'ps-pressable ps-focus-ring group flex h-full items-center justify-between gap-3 rounded-ps-card border border-line bg-surface px-4 py-3 transition-colors hover:border-primary/50';
|
|
6
6
|
export const PsLinkTileGrid = ({ LinkComponent, tiles }) => {
|
|
7
7
|
const renderTile = (tile, content) => LinkComponent ? (_jsx(LinkComponent, { "aria-label": tile.ariaLabel, className: tileClassName, prefetch: 'intent', to: tile.href, children: content })) : (_jsx("a", { "aria-label": tile.ariaLabel, className: tileClassName, href: tile.href, children: content }));
|
|
@@ -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 { 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
|
const densityClassNames = {
|
|
6
6
|
compact: 'py-2',
|
|
7
7
|
normal: 'py-2.5',
|
|
@@ -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 PsMetricCard = ({ changeLabel, className, icon, isLoading = false, label, value, }) => isLoading ? (_jsxs(PsSkeletonGroup, { className: PallasoftClassNameService.merge('ps-metric-card flex min-w-0 flex-col gap-3 p-3.5 sm:p-4', className), label: label, children: [_jsx(PsSkeleton, { className: 'h-2.5 w-24' }), _jsx(PsSkeleton, { className: 'h-6 w-32' })] })) : (_jsx("section", { className: PallasoftClassNameService.merge('ps-metric-card min-w-0 p-3.5 sm:p-4', className), children: _jsxs("div", { className: 'flex items-start justify-between gap-3', children: [_jsxs("div", { className: 'min-w-0', children: [_jsx("p", { className: 'ps-eyebrow truncate', children: label }), _jsx("p", { className: 'mt-2 truncate text-2xl font-semibold text-ink', children: value }), changeLabel ? _jsx("p", { className: 'mt-1 text-sm text-slate-500', children: changeLabel }) : null] }), icon ? (_jsx("div", { className: 'flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-soft text-primary', children: icon })) : null] }) }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsMetricCard } from './ps-metric-card';
|
|
2
|
+
import { PsMetricCard } from './ps-metric-card.js';
|
|
3
3
|
export const PsMetricGridSkeleton = ({ count }) => (_jsx("div", { className: 'grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4', children: Array.from({ length: count }, (_, index) => (_jsx(PsMetricCard, { isLoading: true, label: '', value: '' }, index))) }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsMetricGridColumns, PsMetricGridConfig } from '../constants/ps-metric-grid-config';
|
|
4
|
-
import { PsMetricCard } from './ps-metric-card';
|
|
3
|
+
import { PsMetricGridColumns, PsMetricGridConfig } from '../constants/ps-metric-grid-config.js';
|
|
4
|
+
import { PsMetricCard } from './ps-metric-card.js';
|
|
5
5
|
export const PsMetricGrid = ({ items }) => {
|
|
6
6
|
const columns = PsMetricGridColumns[Math.min(items.length, PsMetricGridConfig.maxColumns)];
|
|
7
7
|
return (_jsx("div", { className: PallasoftClassNameService.merge('grid grid-cols-1 gap-3', columns === undefined ? PsMetricGridColumns[PsMetricGridConfig.defaultColumns] : columns), children: items.map((item) => (_jsx(PsMetricCard, { label: item.label, value: item.value }, item.label))) }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PsStaggerContainer, PsStaggerItem } from '@pallasoft/ps-motion-components';
|
|
3
|
-
import { PsWebsiteSectionConfig } from '../constants/ps-website-section-config';
|
|
4
|
-
import { PsMetricCard } from './ps-metric-card';
|
|
3
|
+
import { PsWebsiteSectionConfig } from '../constants/ps-website-section-config.js';
|
|
4
|
+
import { PsMetricCard } from './ps-metric-card.js';
|
|
5
5
|
export const PsMetricRow = ({ metrics }) => (_jsx(PsStaggerContainer, { className: 'grid w-full grid-cols-1 gap-5 md:grid-cols-3', staggerDelay: PsWebsiteSectionConfig.staggerDelay, children: metrics.map((metric) => (_jsx(PsStaggerItem, { children: _jsx(PsMetricCard, { label: metric.label, value: metric.value }) }, metric.label))) }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService, PallasoftZIndex } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsNavigationProgressConfig } from '../constants/ps-navigation-progress-config';
|
|
4
|
-
import { usePsNavigationProgress } from '../hooks/use-ps-navigation-progress';
|
|
3
|
+
import { PsNavigationProgressConfig } from '../constants/ps-navigation-progress-config.js';
|
|
4
|
+
import { usePsNavigationProgress } from '../hooks/use-ps-navigation-progress.js';
|
|
5
5
|
export const PsNavigationProgress = ({ className, color = PsNavigationProgressConfig.defaultColor, delayMs = PsNavigationProgressConfig.showDelayMs, height = PsNavigationProgressConfig.defaultHeight, isLoading, label = PsNavigationProgressConfig.defaultLabel, progress, shadow = true, }) => {
|
|
6
6
|
const { isAnimated, isVisible, width } = usePsNavigationProgress(isLoading !== undefined
|
|
7
7
|
? isLoading
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PsBackLink } from './ps-back-link';
|
|
3
|
-
import { PsSectionHeader } from './ps-section-header';
|
|
2
|
+
import { PsBackLink } from './ps-back-link.js';
|
|
3
|
+
import { PsSectionHeader } from './ps-section-header.js';
|
|
4
4
|
export const PsPageHeader = ({ actions, backLink, title }) => (_jsx(PsSectionHeader, { leading: backLink ? _jsx(PsBackLink, { ...backLink }) : undefined, title: title, trailing: actions ? (_jsx("div", { className: 'flex flex-wrap items-center justify-end gap-2', children: actions })) : undefined }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
3
|
-
import { PsPageHeader } from './ps-page-header';
|
|
4
|
-
import { PsPageLayout } from './ps-page-layout';
|
|
5
|
-
import { PsPageStack } from './ps-page-stack';
|
|
6
|
-
import { PsSectionHeader } from './ps-section-header';
|
|
7
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
2
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
3
|
+
import { PsPageHeader } from './ps-page-header.js';
|
|
4
|
+
import { PsPageLayout } from './ps-page-layout.js';
|
|
5
|
+
import { PsPageStack } from './ps-page-stack.js';
|
|
6
|
+
import { PsSectionHeader } from './ps-section-header.js';
|
|
7
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
8
8
|
export const PsPageSkeleton = ({ children, hasActions = false, isNarrow = false, loadingLabel, title, }) => (_jsx(PsPageLayout, { isNarrow: isNarrow, children: _jsxs(PsPageStack, { children: [title === undefined ? (_jsx(PsSectionHeader, { isLoading: true, title: loadingLabel, trailing: hasActions })) : (_jsx(PsPageHeader, { actions: hasActions ? (_jsx(PsSkeleton, { height: '2.5rem', radius: '9999px', shape: PsSkeletonShape.Block, width: '9rem' })) : undefined, title: title })), children] }) }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PsPallasoftMarkConfig } from '../constants/ps-pallasoft-mark-config';
|
|
2
|
+
import { PsPallasoftMarkConfig } from '../constants/ps-pallasoft-mark-config.js';
|
|
3
3
|
export const PsPallasoftMark = ({ className, title }) => (_jsxs("svg", { "aria-hidden": title === undefined ? true : undefined, className: className, fill: 'none', role: title === undefined ? undefined : 'img', viewBox: PsPallasoftMarkConfig.viewBox, xmlns: 'http://www.w3.org/2000/svg', children: [title === undefined ? null : _jsx("title", { children: title }), _jsx("path", { clipRule: 'evenodd', d: PsPallasoftMarkConfig.primaryPath, fill: PsPallasoftMarkConfig.primaryColor, fillRule: 'evenodd' }), _jsx("path", { clipRule: 'evenodd', d: PsPallasoftMarkConfig.secondaryPath, fill: PsPallasoftMarkConfig.secondaryColor, fillRule: 'evenodd' })] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import { PsPallasoftSignInClasses } from '../constants/ps-pallasoft-sign-in-classes';
|
|
4
|
-
import { PsPallasoftMark } from './ps-pallasoft-mark';
|
|
3
|
+
import { PsPallasoftSignInClasses } from '../constants/ps-pallasoft-sign-in-classes.js';
|
|
4
|
+
import { PsPallasoftMark } from './ps-pallasoft-mark.js';
|
|
5
5
|
export const PsPallasoftSignInButton = ({ children, className, href, LinkComponent, size = 'default', ...props }) => {
|
|
6
6
|
const linkClassName = PallasoftClassNameService.merge(PsPallasoftSignInClasses.base, PsPallasoftSignInClasses.sizes[size], className);
|
|
7
7
|
const content = (_jsxs(_Fragment, { children: [_jsx(PsPallasoftMark, { className: PallasoftClassNameService.merge('shrink-0', PsPallasoftSignInClasses.markSizes[size]) }), _jsx("span", { className: 'truncate', children: children })] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } 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';
|
|
3
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
4
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
5
5
|
const toneClassNames = {
|
|
6
6
|
danger: 'bg-rose-50 text-rose-700 ring-rose-100 dark:bg-rose-500/18 dark:text-rose-100 dark:ring-rose-300/22',
|
|
7
7
|
neutral: 'bg-slate-100 text-slate-700 ring-slate-200 dark:bg-white/10 dark:text-slate-100 dark:ring-white/12',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
3
|
import { PsIcon, PsIconKey } from '@pallasoft/ps-icons';
|
|
4
|
-
import { PsRatingDisplayConfig } from '../constants/ps-rating-display-config';
|
|
5
|
-
import { PsRatingDisplaySize } from '../constants/ps-rating-display-size';
|
|
4
|
+
import { PsRatingDisplayConfig } from '../constants/ps-rating-display-config.js';
|
|
5
|
+
import { PsRatingDisplaySize } from '../constants/ps-rating-display-size.js';
|
|
6
6
|
export const PsRatingDisplay = ({ className, label, max = PsRatingDisplayConfig.defaultMax, score, size = PsRatingDisplaySize.Medium, }) => (_jsx("div", { "aria-label": label, className: PallasoftClassNameService.merge('flex items-center gap-1', className), role: 'img', children: Array.from({ length: max }, (_, index) => index + 1).map((value) => (_jsx(PsIcon, { className: PallasoftClassNameService.merge(PsRatingDisplayConfig.iconClassNames[size], value <= score
|
|
7
7
|
? PsRatingDisplayConfig.filledClassName
|
|
8
8
|
: PsRatingDisplayConfig.emptyClassName), iconKey: PsIconKey.Star }, value))) }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PallasoftClassNameService } from '@pallasoft/ps-design-system';
|
|
3
|
-
import { PsScaledPreviewConfig } from '../constants/ps-scaled-preview-config';
|
|
4
|
-
import { usePsElementSize } from '../hooks/use-ps-element-size';
|
|
3
|
+
import { PsScaledPreviewConfig } from '../constants/ps-scaled-preview-config.js';
|
|
4
|
+
import { usePsElementSize } from '../hooks/use-ps-element-size.js';
|
|
5
5
|
export const PsScaledPreview = ({ children, className, designWidth = PsScaledPreviewConfig.designWidth, isDecorative = true, }) => {
|
|
6
6
|
const [frameRef, frame] = usePsElementSize();
|
|
7
7
|
const [contentRef, content] = usePsElementSize();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PsSkeletonShape } from '../constants/ps-skeleton-shape';
|
|
3
|
-
import { PsSkeleton } from './ps-skeleton';
|
|
4
|
-
import { PsSkeletonGroup } from './ps-skeleton-group';
|
|
2
|
+
import { PsSkeletonShape } from '../constants/ps-skeleton-shape.js';
|
|
3
|
+
import { PsSkeleton } from './ps-skeleton.js';
|
|
4
|
+
import { PsSkeletonGroup } from './ps-skeleton-group.js';
|
|
5
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: [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, { className: 'h-ps-control w-32', shape: PsSkeletonShape.Block }) : 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-ink/50', children: eyebrow })) : null, _jsx("h1", { className: 'break-words text-xl font-extrabold text-ink sm:text-2xl', children: title }), description ? (_jsx("p", { className: 'max-w-3xl text-sm leading-6 text-ink/60', children: description })) : null] }), trailing ? (_jsx("div", { className: 'flex w-full shrink-0 items-center justify-end sm:ml-auto sm:w-auto', children: trailing })) : null] }));
|
|
@@ -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] }));
|