@caseparts-org/caseblocks 0.0.75 → 0.0.77
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/atoms/Link/Link.d.ts +7 -2
- package/dist/atoms/Link/Link.js +41 -35
- package/dist/atoms/Link/configureLink.d.ts +3 -0
- package/dist/atoms/Link/configureLink.js +8 -0
- package/dist/atoms/LinkButton/LinkButton.d.ts +1 -1
- package/dist/atoms/LinkButton/LinkButton.js +21 -29
- package/dist/main-client.d.ts +0 -2
- package/dist/main-client.js +47 -46
- package/dist/main-server.d.ts +4 -3
- package/dist/main-server.js +28 -25
- package/package.json +1 -1
- package/dist/atoms/Link/createLinkAdapter.d.ts +0 -10
- package/dist/atoms/Link/createLinkAdapter.js +0 -40
|
@@ -7,11 +7,16 @@ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>
|
|
|
7
7
|
external?: boolean;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
+
/** Router component contract (e.g. next/link or react-router Link) */
|
|
11
|
+
export type RouterLike = React.ComponentType<{
|
|
12
|
+
href: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">>;
|
|
10
16
|
export declare function linkClassName({ className, unstyled, disabled, hideAt }: {
|
|
11
17
|
className?: string;
|
|
12
18
|
unstyled?: boolean;
|
|
13
19
|
disabled?: boolean;
|
|
14
20
|
hideAt?: HideAtProps["hideAt"];
|
|
15
21
|
}): string;
|
|
16
|
-
|
|
17
|
-
export declare function Link({ href, disabled, unstyled, hideAt, className, children, ...rest }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function Link({ href, disabled, unstyled, external, hideAt, className, children, ...rest }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/atoms/Link/Link.js
CHANGED
|
@@ -1,48 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import { c as
|
|
4
|
-
import { getHideAtStyles as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { t as p } from "../../Text.module-Dzhzk2fH.js";
|
|
3
|
+
import { c as u } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { getHideAtStyles as x } from "../HideAt.js";
|
|
5
|
+
import { routerOverride as l } from "./configureLink.js";
|
|
6
|
+
import '../../assets/Link.css';const k = "_link_ygp31_1", _ = "_disabled_ygp31_14", m = {
|
|
7
|
+
link: k,
|
|
8
|
+
disabled: _
|
|
8
9
|
};
|
|
9
|
-
function
|
|
10
|
-
className:
|
|
10
|
+
function g({
|
|
11
|
+
className: o,
|
|
11
12
|
unstyled: t,
|
|
12
|
-
disabled:
|
|
13
|
+
disabled: r,
|
|
13
14
|
hideAt: n
|
|
14
15
|
}) {
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
!t &&
|
|
18
|
-
!t &&
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
return u(
|
|
17
|
+
o,
|
|
18
|
+
!t && p["text-body"],
|
|
19
|
+
!t && m.link,
|
|
20
|
+
r && m.disabled,
|
|
21
|
+
x(n)
|
|
21
22
|
);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
href:
|
|
24
|
+
function S({
|
|
25
|
+
href: o,
|
|
25
26
|
disabled: t = !1,
|
|
26
|
-
unstyled:
|
|
27
|
-
|
|
28
|
-
hideAt:
|
|
29
|
-
className:
|
|
30
|
-
children:
|
|
31
|
-
|
|
32
|
-
...s
|
|
27
|
+
unstyled: r = !1,
|
|
28
|
+
external: n,
|
|
29
|
+
hideAt: c,
|
|
30
|
+
className: f,
|
|
31
|
+
children: i,
|
|
32
|
+
...e
|
|
33
33
|
}) {
|
|
34
|
-
const
|
|
35
|
-
...
|
|
36
|
-
href: t ? "#" :
|
|
37
|
-
className:
|
|
38
|
-
// onClick: handleClick,
|
|
34
|
+
const d = g({ className: f, unstyled: r, disabled: t, hideAt: c }), a = {
|
|
35
|
+
...e,
|
|
36
|
+
href: t ? "#" : o,
|
|
37
|
+
className: d,
|
|
39
38
|
"aria-disabled": t || void 0,
|
|
40
|
-
tabIndex: t ? -1 :
|
|
41
|
-
role: t ? "link" :
|
|
39
|
+
tabIndex: t ? -1 : e.tabIndex,
|
|
40
|
+
role: t ? "link" : e.role
|
|
42
41
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
42
|
+
return l ? /* @__PURE__ */ s(
|
|
43
|
+
l,
|
|
44
|
+
{
|
|
45
|
+
...a,
|
|
46
|
+
"data-router-adapter": "configured",
|
|
47
|
+
children: i
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ s("a", { ...a, children: i });
|
|
44
50
|
}
|
|
45
51
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
S as Link,
|
|
53
|
+
g as linkClassName
|
|
48
54
|
};
|
|
@@ -3,4 +3,4 @@ import { LinkProps } from '../Link/Link';
|
|
|
3
3
|
import { ButtonStyleProps } from '../Button/buttonClassName';
|
|
4
4
|
export interface LinkButtonProps extends LinkProps, HideAtProps, ButtonStyleProps {
|
|
5
5
|
}
|
|
6
|
-
export declare function LinkButton({ href, children, size, variant, hideAt, className, disabled,
|
|
6
|
+
export declare function LinkButton({ href, children, size, variant, hideAt, className, disabled, ...otherProps }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Link as
|
|
3
|
-
import { buttonClassNames as
|
|
4
|
-
import { c as
|
|
5
|
-
function
|
|
6
|
-
href:
|
|
7
|
-
children:
|
|
8
|
-
size:
|
|
9
|
-
variant:
|
|
10
|
-
hideAt:
|
|
11
|
-
className:
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Link as u } from "../Link/Link.js";
|
|
3
|
+
import { buttonClassNames as f } from "../Button/buttonClassName.js";
|
|
4
|
+
import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
function L({
|
|
6
|
+
href: o,
|
|
7
|
+
children: r,
|
|
8
|
+
size: m,
|
|
9
|
+
variant: s,
|
|
10
|
+
hideAt: n,
|
|
11
|
+
className: e,
|
|
12
12
|
disabled: t,
|
|
13
|
-
onClick
|
|
14
|
-
...
|
|
13
|
+
// onClick,
|
|
14
|
+
...a
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
o.preventDefault(), o.stopPropagation();
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
r == null || r(o);
|
|
23
|
-
}
|
|
24
|
-
return /* @__PURE__ */ c(
|
|
25
|
-
l,
|
|
16
|
+
const c = f({ size: m, variant: s, hideAt: n, className: p(e), disabled: t });
|
|
17
|
+
return /* @__PURE__ */ i(
|
|
18
|
+
u,
|
|
26
19
|
{
|
|
27
|
-
href:
|
|
28
|
-
className:
|
|
20
|
+
href: o,
|
|
21
|
+
className: c,
|
|
29
22
|
disabled: t,
|
|
30
|
-
onClick: i,
|
|
31
23
|
unstyled: !0,
|
|
32
|
-
...
|
|
33
|
-
children:
|
|
24
|
+
...a,
|
|
25
|
+
children: r
|
|
34
26
|
}
|
|
35
27
|
);
|
|
36
28
|
}
|
|
37
29
|
export {
|
|
38
|
-
|
|
30
|
+
L as LinkButton
|
|
39
31
|
};
|
package/dist/main-client.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from './main-server';
|
|
2
|
-
export { LinkButton } from './atoms/LinkButton/LinkButton';
|
|
3
|
-
export type { LinkButtonProps } from './atoms/LinkButton/LinkButton';
|
|
4
2
|
export { Image, ImageProvider } from './atoms/Image/Image';
|
|
5
3
|
export type { ImageProps } from './atoms/Image/Image';
|
|
6
4
|
export { Tooltip } from './molecules/Tooltip/Tooltip';
|
package/dist/main-client.js
CHANGED
|
@@ -1,70 +1,71 @@
|
|
|
1
1
|
import { Button as t } from "./atoms/Button/Button.js";
|
|
2
2
|
import { Flex as p } from "./atoms/Flex/Flex.js";
|
|
3
3
|
import { Column as x, Grid as f } from "./atoms/Grid/Grid.js";
|
|
4
|
-
import { Head as
|
|
4
|
+
import { Head as i } from "./atoms/Root/Head.js";
|
|
5
5
|
import { Icon as u } from "./atoms/Icon/Icon.js";
|
|
6
6
|
import { Root as c } from "./atoms/Root/Root.js";
|
|
7
|
-
import { Separator as
|
|
8
|
-
import { Text as
|
|
9
|
-
import { Input as
|
|
10
|
-
import { Link as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { Image as
|
|
7
|
+
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
8
|
+
import { Text as k } from "./atoms/Text/Text.js";
|
|
9
|
+
import { Input as A } from "./atoms/Input/Input.js";
|
|
10
|
+
import { Link as I } from "./atoms/Link/Link.js";
|
|
11
|
+
import { configureLink as L, routerOverride as S } from "./atoms/Link/configureLink.js";
|
|
12
|
+
import { LinkButton as F } from "./atoms/LinkButton/LinkButton.js";
|
|
13
|
+
import { Logo as y } from "./molecules/Logo/Logo.js";
|
|
14
|
+
import { SearchBox as N } from "./molecules/SearchBox/SearchBox.js";
|
|
15
|
+
import { QuantityInput as s } from "./molecules/QuantityInput/QuantityInput.js";
|
|
16
|
+
import { Pricing as G } from "./molecules/Pricing/Pricing.js";
|
|
17
|
+
import { Image as O, ImageProvider as Q } from "./atoms/Image/Image.js";
|
|
18
18
|
import { Tooltip as V } from "./molecules/Tooltip/Tooltip.js";
|
|
19
19
|
import { Account as q } from "./molecules/Account/Account.js";
|
|
20
20
|
import { Avatar as D } from "./molecules/Avatar/Avatar.js";
|
|
21
21
|
import { Chip as J } from "./molecules/Chip/Chip.js";
|
|
22
|
-
import { ToggleView as
|
|
23
|
-
import { StatefulButton as
|
|
24
|
-
import { AnimatedCheckMark as
|
|
25
|
-
import { AddToCart as
|
|
26
|
-
import { Availability as
|
|
27
|
-
import { BannerCard as
|
|
28
|
-
import { MainNav as
|
|
29
|
-
import { ChipSelector as
|
|
30
|
-
import { Product as
|
|
31
|
-
import { NotFound as
|
|
32
|
-
import { Carousel as
|
|
22
|
+
import { ToggleView as U } from "./molecules/ToggleView/ToggleView.js";
|
|
23
|
+
import { StatefulButton as X } from "./molecules/StatefulButton/StatefulButton.js";
|
|
24
|
+
import { AnimatedCheckMark as Z } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
25
|
+
import { AddToCart as $ } from "./molecules/AddToCart/AddToCart.js";
|
|
26
|
+
import { Availability as ro } from "./molecules/Availability/Availability.js";
|
|
27
|
+
import { BannerCard as eo } from "./molecules/BannerCard/BannerCard.js";
|
|
28
|
+
import { MainNav as mo } from "./organisms/MainNav/MainNav.js";
|
|
29
|
+
import { ChipSelector as fo } from "./organisms/ChipSelector/ChipSelector.js";
|
|
30
|
+
import { Product as io } from "./organisms/Product/Product.js";
|
|
31
|
+
import { NotFound as uo } from "./organisms/NotFound/NotFound.js";
|
|
32
|
+
import { Carousel as lo } from "./organisms/Carousel/Carousel.js";
|
|
33
33
|
import { Footer as Co } from "./organisms/Footer/Footer.js";
|
|
34
34
|
export {
|
|
35
35
|
q as Account,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
$ as AddToCart,
|
|
37
|
+
Z as AnimatedCheckMark,
|
|
38
|
+
ro as Availability,
|
|
39
39
|
D as Avatar,
|
|
40
|
-
|
|
40
|
+
eo as BannerCard,
|
|
41
41
|
t as Button,
|
|
42
|
-
|
|
42
|
+
lo as Carousel,
|
|
43
43
|
J as Chip,
|
|
44
|
-
|
|
44
|
+
fo as ChipSelector,
|
|
45
45
|
x as Column,
|
|
46
46
|
p as Flex,
|
|
47
47
|
Co as Footer,
|
|
48
48
|
f as Grid,
|
|
49
|
-
|
|
49
|
+
i as Head,
|
|
50
50
|
u as Icon,
|
|
51
|
-
|
|
51
|
+
O as Image,
|
|
52
52
|
Q as ImageProvider,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
A as Input,
|
|
54
|
+
I as Link,
|
|
55
|
+
F as LinkButton,
|
|
56
|
+
y as Logo,
|
|
57
|
+
mo as MainNav,
|
|
58
|
+
uo as NotFound,
|
|
59
|
+
G as Pricing,
|
|
60
|
+
io as Product,
|
|
61
|
+
s as QuantityInput,
|
|
62
62
|
c as Root,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
N as SearchBox,
|
|
64
|
+
g as Separator,
|
|
65
|
+
X as StatefulButton,
|
|
66
|
+
k as Text,
|
|
67
|
+
U as ToggleView,
|
|
68
68
|
V as Tooltip,
|
|
69
|
-
L as
|
|
69
|
+
L as configureLink,
|
|
70
|
+
S as routerOverride
|
|
70
71
|
};
|
package/dist/main-server.d.ts
CHANGED
|
@@ -14,9 +14,10 @@ export type { TextProps } from './atoms/Text/Text';
|
|
|
14
14
|
export { Input } from './atoms/Input/Input';
|
|
15
15
|
export type { InputProps } from './atoms/Input/Input';
|
|
16
16
|
export { Link } from './atoms/Link/Link';
|
|
17
|
-
export
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
17
|
+
export { configureLink, routerOverride } from './atoms/Link/configureLink';
|
|
18
|
+
export type { LinkProps, RouterLike } from './atoms/Link/Link';
|
|
19
|
+
export { LinkButton } from './atoms/LinkButton/LinkButton';
|
|
20
|
+
export type { LinkButtonProps } from './atoms/LinkButton/LinkButton';
|
|
20
21
|
export { Logo } from './molecules/Logo/Logo';
|
|
21
22
|
export type { LogoProps } from './molecules/Logo/Logo';
|
|
22
23
|
export { SearchBox } from './molecules/SearchBox/SearchBox';
|
package/dist/main-server.js
CHANGED
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
import { Button as t } from "./atoms/Button/Button.js";
|
|
2
2
|
import { Flex as p } from "./atoms/Flex/Flex.js";
|
|
3
|
-
import { Column as
|
|
4
|
-
import { Head as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { Root as
|
|
7
|
-
import { Separator as
|
|
8
|
-
import { Text as
|
|
9
|
-
import { Input as
|
|
3
|
+
import { Column as f, Grid as m } from "./atoms/Grid/Grid.js";
|
|
4
|
+
import { Head as i } from "./atoms/Root/Head.js";
|
|
5
|
+
import { Icon as a } from "./atoms/Icon/Icon.js";
|
|
6
|
+
import { Root as L } from "./atoms/Root/Root.js";
|
|
7
|
+
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
8
|
+
import { Text as B } from "./atoms/Text/Text.js";
|
|
9
|
+
import { Input as l } from "./atoms/Input/Input.js";
|
|
10
10
|
import { Link as h } from "./atoms/Link/Link.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
import { configureLink as y, routerOverride as C } from "./atoms/Link/configureLink.js";
|
|
12
|
+
import { LinkButton as G } from "./atoms/LinkButton/LinkButton.js";
|
|
13
|
+
import { Logo as O } from "./molecules/Logo/Logo.js";
|
|
14
|
+
import { SearchBox as Q } from "./molecules/SearchBox/SearchBox.js";
|
|
15
|
+
import { QuantityInput as T } from "./molecules/QuantityInput/QuantityInput.js";
|
|
16
|
+
import { Pricing as j } from "./molecules/Pricing/Pricing.js";
|
|
16
17
|
export {
|
|
17
18
|
t as Button,
|
|
18
|
-
|
|
19
|
+
f as Column,
|
|
19
20
|
p as Flex,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
m as Grid,
|
|
22
|
+
i as Head,
|
|
23
|
+
a as Icon,
|
|
24
|
+
l as Input,
|
|
24
25
|
h as Link,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
G as LinkButton,
|
|
27
|
+
O as Logo,
|
|
28
|
+
j as Pricing,
|
|
29
|
+
T as QuantityInput,
|
|
30
|
+
L as Root,
|
|
31
|
+
Q as SearchBox,
|
|
32
|
+
g as Separator,
|
|
33
|
+
B as Text,
|
|
34
|
+
y as configureLink,
|
|
35
|
+
C as routerOverride
|
|
33
36
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { LinkProps } from './Link';
|
|
3
|
-
/** Minimal contract a router link should satisfy */
|
|
4
|
-
export type RouterLike = React.ComponentType<{
|
|
5
|
-
href: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
} & React.AnchorHTMLAttributes<HTMLAnchorElement>>;
|
|
9
|
-
/** Build a styled, disabled-aware Link that delegates navigation to RouterLike */
|
|
10
|
-
export declare function createLinkAdapter(RouterComponent: RouterLike): ({ href, disabled, unstyled, hideAt, className, children, onClick, ...rest }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { linkClassName as l } from "./Link.js";
|
|
3
|
-
function k(n) {
|
|
4
|
-
return function({
|
|
5
|
-
href: o,
|
|
6
|
-
disabled: r = !1,
|
|
7
|
-
unstyled: f = !1,
|
|
8
|
-
hideAt: p,
|
|
9
|
-
className: u,
|
|
10
|
-
children: i,
|
|
11
|
-
onClick: t,
|
|
12
|
-
...e
|
|
13
|
-
}) {
|
|
14
|
-
function m(a) {
|
|
15
|
-
if (r) {
|
|
16
|
-
a.preventDefault(), a.stopPropagation();
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
t == null || t(a);
|
|
20
|
-
}
|
|
21
|
-
const x = l({ className: u, unstyled: f, disabled: r, hideAt: p });
|
|
22
|
-
return /* @__PURE__ */ c(
|
|
23
|
-
n,
|
|
24
|
-
{
|
|
25
|
-
...e,
|
|
26
|
-
href: r ? "#" : o,
|
|
27
|
-
className: x,
|
|
28
|
-
onClick: m,
|
|
29
|
-
"aria-disabled": r || void 0,
|
|
30
|
-
tabIndex: r ? -1 : e.tabIndex,
|
|
31
|
-
role: r ? "link" : e.role,
|
|
32
|
-
"data-router-adapter": "next",
|
|
33
|
-
children: i
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
k as createLinkAdapter
|
|
40
|
-
};
|