@caseparts-org/caseblocks 0.0.77 → 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,10 +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 linkClassName({ className, unstyled, disabled, hideAt }: {
17
- className?: string;
18
- unstyled?: boolean;
19
- disabled?: boolean;
20
- hideAt?: HideAtProps["hideAt"];
21
- }): string;
22
- 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,54 +1,33 @@
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: _
9
- };
10
- function g({
11
- className: o,
12
- unstyled: t,
13
- disabled: r,
14
- hideAt: n
15
- }) {
16
- return u(
17
- o,
18
- !t && p["text-body"],
19
- !t && m.link,
20
- r && m.disabled,
21
- x(n)
22
- );
23
- }
24
- function S({
25
- href: o,
26
- disabled: t = !1,
27
- unstyled: r = !1,
28
- external: n,
29
- hideAt: c,
30
- className: f,
31
- children: i,
32
- ...e
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,
10
+ children: a,
11
+ implementation: t,
12
+ ...o
33
13
  }) {
34
- const d = g({ className: f, unstyled: r, disabled: t, hideAt: c }), a = {
35
- ...e,
36
- href: t ? "#" : o,
37
- className: d,
38
- "aria-disabled": t || void 0,
39
- tabIndex: t ? -1 : e.tabIndex,
40
- role: t ? "link" : e.role
41
- };
42
- return l ? /* @__PURE__ */ s(
43
- l,
14
+ const u = l({ className: p, unstyled: c, disabled: r, hideAt: i }), e = {
15
+ ...o,
16
+ href: r ? "#" : f,
17
+ className: u,
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(
23
+ n,
44
24
  {
45
- ...a,
46
- "data-router-adapter": "configured",
47
- children: i
25
+ ...e,
26
+ "data-router-adapter": t ? "explicit" : "configured",
27
+ children: a
48
28
  }
49
- ) : /* @__PURE__ */ s("a", { ...a, children: i });
29
+ ) : /* @__PURE__ */ m("a", { ...e, "data-router-adapter": "anchor", children: a });
50
30
  }
51
31
  export {
52
- S as Link,
53
- g as linkClassName
32
+ I as Link
54
33
  };
@@ -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, ...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,8 +1,8 @@
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({
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
6
  href: o,
7
7
  children: r,
8
8
  size: m,
@@ -10,22 +10,23 @@ function L({
10
10
  hideAt: n,
11
11
  className: e,
12
12
  disabled: t,
13
- // onClick,
14
- ...a
13
+ implementation: a,
14
+ ...c
15
15
  }) {
16
- const c = f({ size: m, variant: s, hideAt: n, className: p(e), disabled: t });
17
- return /* @__PURE__ */ i(
18
- u,
16
+ const i = p({ size: m, variant: s, hideAt: n, className: l(e), disabled: t });
17
+ return /* @__PURE__ */ u(
18
+ f,
19
19
  {
20
20
  href: o,
21
- className: c,
21
+ className: i,
22
22
  disabled: t,
23
+ implementation: a,
23
24
  unstyled: !0,
24
- ...a,
25
+ ...c,
25
26
  children: r
26
27
  }
27
28
  );
28
29
  }
29
30
  export {
30
- L as LinkButton
31
+ g as LinkButton
31
32
  };
@@ -3,69 +3,71 @@ 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 i } from "./atoms/Root/Head.js";
5
5
  import { Icon as u } from "./atoms/Icon/Icon.js";
6
- import { Root as c } from "./atoms/Root/Root.js";
7
- import { Separator as g } from "./atoms/Separator/Separator.js";
6
+ import { Root as d } from "./atoms/Root/Root.js";
7
+ import { Separator as C } from "./atoms/Separator/Separator.js";
8
8
  import { Text as k } from "./atoms/Text/Text.js";
9
9
  import { Input as A } from "./atoms/Input/Input.js";
10
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";
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";
13
14
  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
- import { Tooltip as V } from "./molecules/Tooltip/Tooltip.js";
19
- import { Account as q } from "./molecules/Account/Account.js";
20
- import { Avatar as D } from "./molecules/Avatar/Avatar.js";
21
- import { Chip as J } from "./molecules/Chip/Chip.js";
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
- import { Footer as Co } from "./organisms/Footer/Footer.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";
34
35
  export {
35
- q as Account,
36
- $ as AddToCart,
37
- Z as AnimatedCheckMark,
38
- ro as Availability,
39
- D as Avatar,
40
- eo 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,
41
42
  t as Button,
42
- lo as Carousel,
43
- J as Chip,
44
- fo as ChipSelector,
43
+ go as Carousel,
44
+ U as Chip,
45
+ io as ChipSelector,
45
46
  x as Column,
46
47
  p as Flex,
47
- Co as Footer,
48
+ vo as Footer,
48
49
  f as Grid,
49
50
  i as Head,
50
51
  u as Icon,
51
- O as Image,
52
- Q as ImageProvider,
52
+ R as Image,
53
+ V as ImageProvider,
53
54
  A as Input,
54
55
  I as Link,
55
- F as LinkButton,
56
+ N as LinkButton,
56
57
  y as Logo,
57
- mo as MainNav,
58
- uo as NotFound,
59
- G as Pricing,
60
- io as Product,
61
- s as QuantityInput,
62
- c as Root,
63
- N as SearchBox,
64
- g as Separator,
65
- X as StatefulButton,
58
+ fo as MainNav,
59
+ co as NotFound,
60
+ O as Pricing,
61
+ uo as Product,
62
+ G as QuantityInput,
63
+ d as Root,
64
+ b as SearchBox,
65
+ C as Separator,
66
+ Z as StatefulButton,
66
67
  k as Text,
67
- U as ToggleView,
68
- V as Tooltip,
69
- L as configureLink,
70
- S as routerOverride
68
+ X as ToggleView,
69
+ q as Tooltip,
70
+ T as configureLink,
71
+ L as linkClassName,
72
+ s as routerOverride
71
73
  };
@@ -14,8 +14,9 @@ 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 { configureLink, routerOverride } from './atoms/Link/configureLink';
18
17
  export type { LinkProps, RouterLike } from './atoms/Link/Link';
18
+ export { linkClassName } from './atoms/Link/linkClassName';
19
+ export { configureLink, routerOverride } from './atoms/Link/configureLink';
19
20
  export { LinkButton } from './atoms/LinkButton/LinkButton';
20
21
  export type { LinkButtonProps } from './atoms/LinkButton/LinkButton';
21
22
  export { Logo } from './molecules/Logo/Logo';
@@ -1,36 +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 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
- import { Link as h } from "./atoms/Link/Link.js";
11
- import { configureLink as y, routerOverride as C } from "./atoms/Link/configureLink.js";
12
- import { LinkButton as G } from "./atoms/LinkButton/LinkButton.js";
6
+ import { Root as k } from "./atoms/Root/Root.js";
7
+ import { Separator as L } from "./atoms/Separator/Separator.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";
13
14
  import { Logo as O } from "./molecules/Logo/Logo.js";
14
15
  import { SearchBox as Q } from "./molecules/SearchBox/SearchBox.js";
15
16
  import { QuantityInput as T } from "./molecules/QuantityInput/QuantityInput.js";
16
17
  import { Pricing as j } from "./molecules/Pricing/Pricing.js";
17
18
  export {
18
19
  t as Button,
19
- f as Column,
20
+ m as Column,
20
21
  p as Flex,
21
- m as Grid,
22
+ f as Grid,
22
23
  i as Head,
23
24
  a as Icon,
24
- l as Input,
25
- h as Link,
26
- G as LinkButton,
25
+ I as Input,
26
+ C as Link,
27
+ H as LinkButton,
27
28
  O as Logo,
28
29
  j as Pricing,
29
30
  T as QuantityInput,
30
- L as Root,
31
+ k as Root,
31
32
  Q as SearchBox,
32
- g as Separator,
33
- B as Text,
33
+ L as Separator,
34
+ g as Text,
34
35
  y as configureLink,
35
- C as routerOverride
36
+ h as linkClassName,
37
+ F as routerOverride
36
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.77",
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