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