@pallasoft/ps-core-components 2.17.0 → 2.19.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-pallasoft-mark.d.ts +5 -0
- package/dist/components/ps-pallasoft-mark.js +7 -0
- package/dist/components/ps-pallasoft-sign-in-button.d.ts +8 -0
- package/dist/components/ps-pallasoft-sign-in-button.js +13 -0
- package/dist/constants/ps-pallasoft-mark-config.d.ts +7 -0
- package/dist/constants/ps-pallasoft-mark-config.js +10 -0
- package/dist/constants/ps-pallasoft-sign-in-classes.d.ts +11 -0
- package/dist/constants/ps-pallasoft-sign-in-classes.js +14 -0
- package/dist/esm/components/ps-pallasoft-mark.js +3 -0
- package/dist/esm/components/ps-pallasoft-sign-in-button.js +9 -0
- package/dist/esm/constants/ps-pallasoft-mark-config.js +7 -0
- package/dist/esm/constants/ps-pallasoft-sign-in-classes.js +11 -0
- package/dist/esm/hooks/use-ps-optimistic-rows.js +16 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/interfaces/ps-optimistic-changes.js +1 -0
- package/dist/esm/interfaces/ps-optimistic-rows-input.js +1 -0
- package/dist/esm/interfaces/ps-optimistic-rows-result.js +1 -0
- package/dist/hooks/use-ps-optimistic-rows.d.ts +3 -0
- package/dist/hooks/use-ps-optimistic-rows.js +20 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/interfaces/ps-optimistic-changes.d.ts +4 -0
- package/dist/interfaces/ps-optimistic-changes.js +2 -0
- package/dist/interfaces/ps-optimistic-rows-input.d.ts +6 -0
- package/dist/interfaces/ps-optimistic-rows-input.js +2 -0
- package/dist/interfaces/ps-optimistic-rows-result.d.ts +6 -0
- package/dist/interfaces/ps-optimistic-rows-result.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsPallasoftMark = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_pallasoft_mark_config_1 = require("../constants/ps-pallasoft-mark-config");
|
|
6
|
+
const PsPallasoftMark = ({ className, title }) => ((0, jsx_runtime_1.jsxs)("svg", { "aria-hidden": title === undefined ? true : undefined, className: className, fill: 'none', role: title === undefined ? undefined : 'img', viewBox: ps_pallasoft_mark_config_1.PsPallasoftMarkConfig.viewBox, xmlns: 'http://www.w3.org/2000/svg', children: [title === undefined ? null : (0, jsx_runtime_1.jsx)("title", { children: title }), (0, jsx_runtime_1.jsx)("path", { clipRule: 'evenodd', d: ps_pallasoft_mark_config_1.PsPallasoftMarkConfig.primaryPath, fill: ps_pallasoft_mark_config_1.PsPallasoftMarkConfig.primaryColor, fillRule: 'evenodd' }), (0, jsx_runtime_1.jsx)("path", { clipRule: 'evenodd', d: ps_pallasoft_mark_config_1.PsPallasoftMarkConfig.secondaryPath, fill: ps_pallasoft_mark_config_1.PsPallasoftMarkConfig.secondaryColor, fillRule: 'evenodd' })] }));
|
|
7
|
+
exports.PsPallasoftMark = PsPallasoftMark;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
+
export interface PsPallasoftSignInButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
href: string;
|
|
5
|
+
LinkComponent?: ElementType;
|
|
6
|
+
size?: 'default' | 'large';
|
|
7
|
+
}
|
|
8
|
+
export declare const PsPallasoftSignInButton: ({ children, className, href, LinkComponent, size, ...props }: PsPallasoftSignInButtonProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsPallasoftSignInButton = 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_pallasoft_sign_in_classes_1 = require("../constants/ps-pallasoft-sign-in-classes");
|
|
7
|
+
const ps_pallasoft_mark_1 = require("./ps-pallasoft-mark");
|
|
8
|
+
const PsPallasoftSignInButton = ({ children, className, href, LinkComponent, size = 'default', ...props }) => {
|
|
9
|
+
const linkClassName = ps_design_system_1.PallasoftClassNameService.merge(ps_pallasoft_sign_in_classes_1.PsPallasoftSignInClasses.base, ps_pallasoft_sign_in_classes_1.PsPallasoftSignInClasses.sizes[size], className);
|
|
10
|
+
const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ps_pallasoft_mark_1.PsPallasoftMark, { className: ps_design_system_1.PallasoftClassNameService.merge('shrink-0', ps_pallasoft_sign_in_classes_1.PsPallasoftSignInClasses.markSizes[size]) }), (0, jsx_runtime_1.jsx)("span", { className: 'truncate', children: children })] }));
|
|
11
|
+
return LinkComponent ? ((0, jsx_runtime_1.jsx)(LinkComponent, { className: linkClassName, to: href, ...props, children: content })) : ((0, jsx_runtime_1.jsx)("a", { className: linkClassName, href: href, ...props, children: content }));
|
|
12
|
+
};
|
|
13
|
+
exports.PsPallasoftSignInButton = PsPallasoftSignInButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const PsPallasoftMarkConfig: {
|
|
2
|
+
readonly viewBox: "0 0 1024 1024";
|
|
3
|
+
readonly primaryColor: "#00A4EF";
|
|
4
|
+
readonly primaryPath: "M315.957 199.887C274.799 206.906 241.376 221.02 210.443 244.447C196.838 254.749 188.133 263.104 178.293 275.302C159.096 299.097 148.203 320.647 140.567 349.936C133.378 377.511 132.698 386.254 131.353 468.437C130.19 539.538 129.488 799.328 130.457 800.235C131.315 801.037 299.378 801.618 298.883 800.817C298.625 800.399 298.486 767.293 298.575 727.247C298.663 687.202 298.797 597.962 298.872 528.937C298.977 432.407 299.302 401.843 300.276 396.534C302.825 382.658 309.864 373.011 321.444 367.522C327.255 364.769 329.139 364.399 338.919 364.092C347.214 363.831 351.266 364.167 355.573 365.471C362.283 367.503 369.768 372.871 373.667 378.449C383.843 393.004 382.419 416.303 370.564 429.227C363.982 436.403 348.177 442.937 337.398 442.937C327.53 442.937 328.403 435.012 328.698 521.937L328.957 598.437L334.957 598.33C347.009 598.117 378.079 595.96 382.499 595.03C384.997 594.505 391.072 593.76 395.999 593.375C400.926 592.991 405.407 592.343 405.957 591.936C406.507 591.53 409.882 590.951 413.457 590.651C419.512 590.142 434.749 586.061 438.693 583.892C439.648 583.367 440.875 582.937 441.418 582.937C441.962 582.937 445.354 581.587 448.957 579.937C452.56 578.287 455.681 576.937 455.894 576.937C456.558 576.937 470.929 568.585 471.457 567.892C471.732 567.532 473.005 566.684 474.286 566.009C475.567 565.334 477.367 564.167 478.286 563.415C479.205 562.663 482.657 560.039 485.957 557.583C491.419 553.519 504.22 540.9 510.457 533.431C521.449 520.269 533.739 497.895 539.842 479.937C548.295 455.061 550.726 439.066 550.706 408.436C550.689 380.964 549.63 371.735 543.823 348.436C536.822 320.347 525.29 297.186 506.978 274.436C495.651 260.363 487.636 252.332 473.549 240.936C471.169 239.011 468.712 236.98 468.09 236.423C464.948 233.614 448.048 222.706 441.457 219.233C426.494 211.348 407.308 204.87 390.457 202.012C386.882 201.406 380.097 200.241 375.379 199.423C363.314 197.331 329.388 197.596 315.957 199.887Z";
|
|
5
|
+
readonly secondaryColor: "#AFE6FF";
|
|
6
|
+
readonly secondaryPath: "M798.32 206.29C763.386 213.007 734.128 226.139 709.82 246.013C701.763 252.6 684.651 269.56 677.752 277.796C662.272 296.274 647.981 322.249 640.402 345.681C633.538 366.903 628.384 400.023 629.64 414.837C633.003 454.511 638.5 478.69 651.318 510.182C654.228 517.332 659.735 529.707 663.555 537.682C690.032 592.955 693.771 603.654 690.724 615.427C688.613 623.583 685.836 628.892 680.679 634.627C671.217 645.151 656.472 651.171 640.32 651.103C629.247 651.056 621.857 649.273 609.298 643.618C604.49 641.453 599.874 639.682 599.04 639.682C597.79 639.682 597.415 642.091 596.896 653.432C596.55 660.995 596.075 669.432 595.841 672.182C595.053 681.443 593.994 800.247 594.675 802.96C595.078 804.565 596.622 806.304 598.511 807.281C603.234 809.723 628.179 818.348 637.13 820.633C647.762 823.348 672.337 826.001 680.32 825.295C683.895 824.979 692.41 824.237 699.241 823.645C735.686 820.49 768.735 807.805 797.82 785.809C807.75 778.299 822.616 765.059 827.413 759.452C855.948 726.104 872.197 690.41 878.296 647.682C880.877 629.597 881.06 615.883 878.943 599.182C874.503 564.16 866.132 539.906 841.753 491.423C821.914 451.969 818.237 441.902 818.263 427.114C818.287 414.185 822.623 403.662 832.125 393.472C840.813 384.156 853.413 378.639 865.817 378.72C871.092 378.755 884.849 381.186 890.945 383.16C892.946 383.809 893.11 383.413 893.774 376.332C894.161 372.198 894.227 363.498 893.92 356.998C893.613 350.499 893.122 326.056 892.828 302.681C892.129 247.042 891.296 217.362 890.407 216.415C889.111 215.035 870.089 210.702 856.618 208.72C843.898 206.848 804.056 205.187 798.32 206.29Z";
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsPallasoftMarkConfig = void 0;
|
|
4
|
+
exports.PsPallasoftMarkConfig = {
|
|
5
|
+
viewBox: '0 0 1024 1024',
|
|
6
|
+
primaryColor: '#00A4EF',
|
|
7
|
+
primaryPath: 'M315.957 199.887C274.799 206.906 241.376 221.02 210.443 244.447C196.838 254.749 188.133 263.104 178.293 275.302C159.096 299.097 148.203 320.647 140.567 349.936C133.378 377.511 132.698 386.254 131.353 468.437C130.19 539.538 129.488 799.328 130.457 800.235C131.315 801.037 299.378 801.618 298.883 800.817C298.625 800.399 298.486 767.293 298.575 727.247C298.663 687.202 298.797 597.962 298.872 528.937C298.977 432.407 299.302 401.843 300.276 396.534C302.825 382.658 309.864 373.011 321.444 367.522C327.255 364.769 329.139 364.399 338.919 364.092C347.214 363.831 351.266 364.167 355.573 365.471C362.283 367.503 369.768 372.871 373.667 378.449C383.843 393.004 382.419 416.303 370.564 429.227C363.982 436.403 348.177 442.937 337.398 442.937C327.53 442.937 328.403 435.012 328.698 521.937L328.957 598.437L334.957 598.33C347.009 598.117 378.079 595.96 382.499 595.03C384.997 594.505 391.072 593.76 395.999 593.375C400.926 592.991 405.407 592.343 405.957 591.936C406.507 591.53 409.882 590.951 413.457 590.651C419.512 590.142 434.749 586.061 438.693 583.892C439.648 583.367 440.875 582.937 441.418 582.937C441.962 582.937 445.354 581.587 448.957 579.937C452.56 578.287 455.681 576.937 455.894 576.937C456.558 576.937 470.929 568.585 471.457 567.892C471.732 567.532 473.005 566.684 474.286 566.009C475.567 565.334 477.367 564.167 478.286 563.415C479.205 562.663 482.657 560.039 485.957 557.583C491.419 553.519 504.22 540.9 510.457 533.431C521.449 520.269 533.739 497.895 539.842 479.937C548.295 455.061 550.726 439.066 550.706 408.436C550.689 380.964 549.63 371.735 543.823 348.436C536.822 320.347 525.29 297.186 506.978 274.436C495.651 260.363 487.636 252.332 473.549 240.936C471.169 239.011 468.712 236.98 468.09 236.423C464.948 233.614 448.048 222.706 441.457 219.233C426.494 211.348 407.308 204.87 390.457 202.012C386.882 201.406 380.097 200.241 375.379 199.423C363.314 197.331 329.388 197.596 315.957 199.887Z',
|
|
8
|
+
secondaryColor: '#AFE6FF',
|
|
9
|
+
secondaryPath: 'M798.32 206.29C763.386 213.007 734.128 226.139 709.82 246.013C701.763 252.6 684.651 269.56 677.752 277.796C662.272 296.274 647.981 322.249 640.402 345.681C633.538 366.903 628.384 400.023 629.64 414.837C633.003 454.511 638.5 478.69 651.318 510.182C654.228 517.332 659.735 529.707 663.555 537.682C690.032 592.955 693.771 603.654 690.724 615.427C688.613 623.583 685.836 628.892 680.679 634.627C671.217 645.151 656.472 651.171 640.32 651.103C629.247 651.056 621.857 649.273 609.298 643.618C604.49 641.453 599.874 639.682 599.04 639.682C597.79 639.682 597.415 642.091 596.896 653.432C596.55 660.995 596.075 669.432 595.841 672.182C595.053 681.443 593.994 800.247 594.675 802.96C595.078 804.565 596.622 806.304 598.511 807.281C603.234 809.723 628.179 818.348 637.13 820.633C647.762 823.348 672.337 826.001 680.32 825.295C683.895 824.979 692.41 824.237 699.241 823.645C735.686 820.49 768.735 807.805 797.82 785.809C807.75 778.299 822.616 765.059 827.413 759.452C855.948 726.104 872.197 690.41 878.296 647.682C880.877 629.597 881.06 615.883 878.943 599.182C874.503 564.16 866.132 539.906 841.753 491.423C821.914 451.969 818.237 441.902 818.263 427.114C818.287 414.185 822.623 403.662 832.125 393.472C840.813 384.156 853.413 378.639 865.817 378.72C871.092 378.755 884.849 381.186 890.945 383.16C892.946 383.809 893.11 383.413 893.774 376.332C894.161 372.198 894.227 363.498 893.92 356.998C893.613 350.499 893.122 326.056 892.828 302.681C892.129 247.042 891.296 217.362 890.407 216.415C889.111 215.035 870.089 210.702 856.618 208.72C843.898 206.848 804.056 205.187 798.32 206.29Z',
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const PsPallasoftSignInClasses: {
|
|
2
|
+
readonly base: "ps-focus-ring ps-liquid ps-liquid-control group relative inline-flex max-w-full items-center justify-center gap-3 rounded-full border border-line bg-white font-semibold text-ink shadow-sm transition duration-200 hover:-translate-y-px hover:border-primary/40 hover:shadow-md active:translate-y-0 motion-reduce:transition-none motion-reduce:hover:translate-y-0 dark:border-white/15 dark:bg-white/10 dark:text-white dark:hover:border-white/30";
|
|
3
|
+
readonly sizes: {
|
|
4
|
+
readonly default: "ps-control px-5 text-sm";
|
|
5
|
+
readonly large: "ps-control-large px-6 py-3 text-base";
|
|
6
|
+
};
|
|
7
|
+
readonly markSizes: {
|
|
8
|
+
readonly default: "h-5 w-5";
|
|
9
|
+
readonly large: "h-6 w-6";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsPallasoftSignInClasses = void 0;
|
|
4
|
+
exports.PsPallasoftSignInClasses = {
|
|
5
|
+
base: 'ps-focus-ring ps-liquid ps-liquid-control group relative inline-flex max-w-full items-center justify-center gap-3 rounded-full border border-line bg-white font-semibold text-ink shadow-sm transition duration-200 hover:-translate-y-px hover:border-primary/40 hover:shadow-md active:translate-y-0 motion-reduce:transition-none motion-reduce:hover:translate-y-0 dark:border-white/15 dark:bg-white/10 dark:text-white dark:hover:border-white/30',
|
|
6
|
+
sizes: {
|
|
7
|
+
default: 'ps-control px-5 text-sm',
|
|
8
|
+
large: 'ps-control-large px-6 py-3 text-base',
|
|
9
|
+
},
|
|
10
|
+
markSizes: {
|
|
11
|
+
default: 'h-5 w-5',
|
|
12
|
+
large: 'h-6 w-6',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PsPallasoftMarkConfig } from '../constants/ps-pallasoft-mark-config';
|
|
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' })] }));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
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';
|
|
5
|
+
export const PsPallasoftSignInButton = ({ children, className, href, LinkComponent, size = 'default', ...props }) => {
|
|
6
|
+
const linkClassName = PallasoftClassNameService.merge(PsPallasoftSignInClasses.base, PsPallasoftSignInClasses.sizes[size], className);
|
|
7
|
+
const content = (_jsxs(_Fragment, { children: [_jsx(PsPallasoftMark, { className: PallasoftClassNameService.merge('shrink-0', PsPallasoftSignInClasses.markSizes[size]) }), _jsx("span", { className: 'truncate', children: children })] }));
|
|
8
|
+
return LinkComponent ? (_jsx(LinkComponent, { className: linkClassName, to: href, ...props, children: content })) : (_jsx("a", { className: linkClassName, href: href, ...props, children: content }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const PsPallasoftMarkConfig = {
|
|
2
|
+
viewBox: '0 0 1024 1024',
|
|
3
|
+
primaryColor: '#00A4EF',
|
|
4
|
+
primaryPath: 'M315.957 199.887C274.799 206.906 241.376 221.02 210.443 244.447C196.838 254.749 188.133 263.104 178.293 275.302C159.096 299.097 148.203 320.647 140.567 349.936C133.378 377.511 132.698 386.254 131.353 468.437C130.19 539.538 129.488 799.328 130.457 800.235C131.315 801.037 299.378 801.618 298.883 800.817C298.625 800.399 298.486 767.293 298.575 727.247C298.663 687.202 298.797 597.962 298.872 528.937C298.977 432.407 299.302 401.843 300.276 396.534C302.825 382.658 309.864 373.011 321.444 367.522C327.255 364.769 329.139 364.399 338.919 364.092C347.214 363.831 351.266 364.167 355.573 365.471C362.283 367.503 369.768 372.871 373.667 378.449C383.843 393.004 382.419 416.303 370.564 429.227C363.982 436.403 348.177 442.937 337.398 442.937C327.53 442.937 328.403 435.012 328.698 521.937L328.957 598.437L334.957 598.33C347.009 598.117 378.079 595.96 382.499 595.03C384.997 594.505 391.072 593.76 395.999 593.375C400.926 592.991 405.407 592.343 405.957 591.936C406.507 591.53 409.882 590.951 413.457 590.651C419.512 590.142 434.749 586.061 438.693 583.892C439.648 583.367 440.875 582.937 441.418 582.937C441.962 582.937 445.354 581.587 448.957 579.937C452.56 578.287 455.681 576.937 455.894 576.937C456.558 576.937 470.929 568.585 471.457 567.892C471.732 567.532 473.005 566.684 474.286 566.009C475.567 565.334 477.367 564.167 478.286 563.415C479.205 562.663 482.657 560.039 485.957 557.583C491.419 553.519 504.22 540.9 510.457 533.431C521.449 520.269 533.739 497.895 539.842 479.937C548.295 455.061 550.726 439.066 550.706 408.436C550.689 380.964 549.63 371.735 543.823 348.436C536.822 320.347 525.29 297.186 506.978 274.436C495.651 260.363 487.636 252.332 473.549 240.936C471.169 239.011 468.712 236.98 468.09 236.423C464.948 233.614 448.048 222.706 441.457 219.233C426.494 211.348 407.308 204.87 390.457 202.012C386.882 201.406 380.097 200.241 375.379 199.423C363.314 197.331 329.388 197.596 315.957 199.887Z',
|
|
5
|
+
secondaryColor: '#AFE6FF',
|
|
6
|
+
secondaryPath: 'M798.32 206.29C763.386 213.007 734.128 226.139 709.82 246.013C701.763 252.6 684.651 269.56 677.752 277.796C662.272 296.274 647.981 322.249 640.402 345.681C633.538 366.903 628.384 400.023 629.64 414.837C633.003 454.511 638.5 478.69 651.318 510.182C654.228 517.332 659.735 529.707 663.555 537.682C690.032 592.955 693.771 603.654 690.724 615.427C688.613 623.583 685.836 628.892 680.679 634.627C671.217 645.151 656.472 651.171 640.32 651.103C629.247 651.056 621.857 649.273 609.298 643.618C604.49 641.453 599.874 639.682 599.04 639.682C597.79 639.682 597.415 642.091 596.896 653.432C596.55 660.995 596.075 669.432 595.841 672.182C595.053 681.443 593.994 800.247 594.675 802.96C595.078 804.565 596.622 806.304 598.511 807.281C603.234 809.723 628.179 818.348 637.13 820.633C647.762 823.348 672.337 826.001 680.32 825.295C683.895 824.979 692.41 824.237 699.241 823.645C735.686 820.49 768.735 807.805 797.82 785.809C807.75 778.299 822.616 765.059 827.413 759.452C855.948 726.104 872.197 690.41 878.296 647.682C880.877 629.597 881.06 615.883 878.943 599.182C874.503 564.16 866.132 539.906 841.753 491.423C821.914 451.969 818.237 441.902 818.263 427.114C818.287 414.185 822.623 403.662 832.125 393.472C840.813 384.156 853.413 378.639 865.817 378.72C871.092 378.755 884.849 381.186 890.945 383.16C892.946 383.809 893.11 383.413 893.774 376.332C894.161 372.198 894.227 363.498 893.92 356.998C893.613 350.499 893.122 326.056 892.828 302.681C892.129 247.042 891.296 217.362 890.407 216.415C889.111 215.035 870.089 210.702 856.618 208.72C843.898 206.848 804.056 205.187 798.32 206.29Z',
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const PsPallasoftSignInClasses = {
|
|
2
|
+
base: 'ps-focus-ring ps-liquid ps-liquid-control group relative inline-flex max-w-full items-center justify-center gap-3 rounded-full border border-line bg-white font-semibold text-ink shadow-sm transition duration-200 hover:-translate-y-px hover:border-primary/40 hover:shadow-md active:translate-y-0 motion-reduce:transition-none motion-reduce:hover:translate-y-0 dark:border-white/15 dark:bg-white/10 dark:text-white dark:hover:border-white/30',
|
|
3
|
+
sizes: {
|
|
4
|
+
default: 'ps-control px-5 text-sm',
|
|
5
|
+
large: 'ps-control-large px-6 py-3 text-base',
|
|
6
|
+
},
|
|
7
|
+
markSizes: {
|
|
8
|
+
default: 'h-5 w-5',
|
|
9
|
+
large: 'h-6 w-6',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
export const usePsOptimisticRows = ({ apply, isHolding = false, isSaving, rows, }) => {
|
|
3
|
+
const [remembered, setRemembered] = useState({
|
|
4
|
+
base: rows,
|
|
5
|
+
changes: [],
|
|
6
|
+
});
|
|
7
|
+
const changes = remembered.base === rows || isSaving || isHolding ? remembered.changes : [];
|
|
8
|
+
const shown = useMemo(() => (changes.length === 0 ? rows : apply(rows, changes)), [apply, changes, rows]);
|
|
9
|
+
const remember = useCallback((change) => setRemembered((current) => ({
|
|
10
|
+
base: rows,
|
|
11
|
+
changes: [...(current.base === rows ? current.changes : []), change],
|
|
12
|
+
})), [rows]);
|
|
13
|
+
const forgetLast = useCallback(() => setRemembered((current) => ({ base: current.base, changes: current.changes.slice(0, -1) })), []);
|
|
14
|
+
const rollback = useCallback(() => setRemembered({ base: rows, changes: [] }), [rows]);
|
|
15
|
+
return { forgetLast, remember, rollback, rows: shown };
|
|
16
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -6,6 +6,9 @@ export * from './constants/ps-audio-spectrum-config';
|
|
|
6
6
|
export * from './components/ps-badge';
|
|
7
7
|
export * from './components/ps-button';
|
|
8
8
|
export * from './components/ps-link-button';
|
|
9
|
+
export * from './components/ps-pallasoft-mark';
|
|
10
|
+
export * from './components/ps-pallasoft-sign-in-button';
|
|
11
|
+
export * from './constants/ps-pallasoft-mark-config';
|
|
9
12
|
export * from './components/ps-card';
|
|
10
13
|
export * from './components/ps-draggable-grid';
|
|
11
14
|
export * from './components/ps-empty-state';
|
|
@@ -51,6 +54,9 @@ export * from './models/ps-element-size';
|
|
|
51
54
|
export * from './models/ps-voice-orb';
|
|
52
55
|
export * from './models/ps-navigation-progress';
|
|
53
56
|
export * from './hooks/use-ps-debounced-value';
|
|
57
|
+
export * from './hooks/use-ps-optimistic-rows';
|
|
58
|
+
export * from './interfaces/ps-optimistic-rows-input';
|
|
59
|
+
export * from './interfaces/ps-optimistic-rows-result';
|
|
54
60
|
export * from './hooks/use-ps-navigation-progress';
|
|
55
61
|
export * from './models/ps-draggable-grid';
|
|
56
62
|
export * from './constants/ps-draggable-grid';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PsOptimisticRowsInput } from '../interfaces/ps-optimistic-rows-input';
|
|
2
|
+
import type { PsOptimisticRowsResult } from '../interfaces/ps-optimistic-rows-result';
|
|
3
|
+
export declare const usePsOptimisticRows: <Row, Change>({ apply, isHolding, isSaving, rows, }: PsOptimisticRowsInput<Row, Change>) => PsOptimisticRowsResult<Row, Change>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePsOptimisticRows = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const usePsOptimisticRows = ({ apply, isHolding = false, isSaving, rows, }) => {
|
|
6
|
+
const [remembered, setRemembered] = (0, react_1.useState)({
|
|
7
|
+
base: rows,
|
|
8
|
+
changes: [],
|
|
9
|
+
});
|
|
10
|
+
const changes = remembered.base === rows || isSaving || isHolding ? remembered.changes : [];
|
|
11
|
+
const shown = (0, react_1.useMemo)(() => (changes.length === 0 ? rows : apply(rows, changes)), [apply, changes, rows]);
|
|
12
|
+
const remember = (0, react_1.useCallback)((change) => setRemembered((current) => ({
|
|
13
|
+
base: rows,
|
|
14
|
+
changes: [...(current.base === rows ? current.changes : []), change],
|
|
15
|
+
})), [rows]);
|
|
16
|
+
const forgetLast = (0, react_1.useCallback)(() => setRemembered((current) => ({ base: current.base, changes: current.changes.slice(0, -1) })), []);
|
|
17
|
+
const rollback = (0, react_1.useCallback)(() => setRemembered({ base: rows, changes: [] }), [rows]);
|
|
18
|
+
return { forgetLast, remember, rollback, rows: shown };
|
|
19
|
+
};
|
|
20
|
+
exports.usePsOptimisticRows = usePsOptimisticRows;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export * from './constants/ps-audio-spectrum-config';
|
|
|
6
6
|
export * from './components/ps-badge';
|
|
7
7
|
export * from './components/ps-button';
|
|
8
8
|
export * from './components/ps-link-button';
|
|
9
|
+
export * from './components/ps-pallasoft-mark';
|
|
10
|
+
export * from './components/ps-pallasoft-sign-in-button';
|
|
11
|
+
export * from './constants/ps-pallasoft-mark-config';
|
|
9
12
|
export * from './components/ps-card';
|
|
10
13
|
export * from './components/ps-draggable-grid';
|
|
11
14
|
export * from './components/ps-empty-state';
|
|
@@ -51,6 +54,9 @@ export * from './models/ps-element-size';
|
|
|
51
54
|
export * from './models/ps-voice-orb';
|
|
52
55
|
export * from './models/ps-navigation-progress';
|
|
53
56
|
export * from './hooks/use-ps-debounced-value';
|
|
57
|
+
export * from './hooks/use-ps-optimistic-rows';
|
|
58
|
+
export * from './interfaces/ps-optimistic-rows-input';
|
|
59
|
+
export * from './interfaces/ps-optimistic-rows-result';
|
|
54
60
|
export * from './hooks/use-ps-navigation-progress';
|
|
55
61
|
export * from './models/ps-draggable-grid';
|
|
56
62
|
export * from './constants/ps-draggable-grid';
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,9 @@ __exportStar(require("./constants/ps-audio-spectrum-config"), exports);
|
|
|
22
22
|
__exportStar(require("./components/ps-badge"), exports);
|
|
23
23
|
__exportStar(require("./components/ps-button"), exports);
|
|
24
24
|
__exportStar(require("./components/ps-link-button"), exports);
|
|
25
|
+
__exportStar(require("./components/ps-pallasoft-mark"), exports);
|
|
26
|
+
__exportStar(require("./components/ps-pallasoft-sign-in-button"), exports);
|
|
27
|
+
__exportStar(require("./constants/ps-pallasoft-mark-config"), exports);
|
|
25
28
|
__exportStar(require("./components/ps-card"), exports);
|
|
26
29
|
__exportStar(require("./components/ps-draggable-grid"), exports);
|
|
27
30
|
__exportStar(require("./components/ps-empty-state"), exports);
|
|
@@ -67,6 +70,9 @@ __exportStar(require("./models/ps-element-size"), exports);
|
|
|
67
70
|
__exportStar(require("./models/ps-voice-orb"), exports);
|
|
68
71
|
__exportStar(require("./models/ps-navigation-progress"), exports);
|
|
69
72
|
__exportStar(require("./hooks/use-ps-debounced-value"), exports);
|
|
73
|
+
__exportStar(require("./hooks/use-ps-optimistic-rows"), exports);
|
|
74
|
+
__exportStar(require("./interfaces/ps-optimistic-rows-input"), exports);
|
|
75
|
+
__exportStar(require("./interfaces/ps-optimistic-rows-result"), exports);
|
|
70
76
|
__exportStar(require("./hooks/use-ps-navigation-progress"), exports);
|
|
71
77
|
__exportStar(require("./models/ps-draggable-grid"), exports);
|
|
72
78
|
__exportStar(require("./constants/ps-draggable-grid"), exports);
|