@caseparts-org/caseblocks 0.0.76 → 0.0.78

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