@caseparts-org/caseblocks 0.0.129 → 0.0.131

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.
@@ -1 +1 @@
1
- ._productCard_179ie_1{box-sizing:border-box;background:var(--surface-surface-primary, #FFF);display:flex;width:232px;height:296px;padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._productCard_179ie_1>img{width:96px;height:96px;object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_179ie_1 ._productInformation_179ie_20{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_179ie_1 ._purchaseInformation_179ie_27{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_179ie_1 ._addToCart_179ie_35,._productCard_179ie_1 ._addToCartButton_179ie_38{width:100%}._productInformation_179ie_20>a{font-weight:var(--font-weight-semibold)}._partNumber_179ie_46{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_179ie_53{color:var(--text-text-quaternary)}._productTile_179ie_57{box-sizing:border-box;width:100%;max-width:1072px;display:flex;flex-direction:row;align-items:flex-start;background:var(--surface-surface-primary, #FFF);padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);gap:var(--spacing-spacing-1xs)}._productTile_179ie_57>img{width:108px;height:108px;object-fit:contain}._productTile_179ie_57 ._topRow_179ie_76{display:grid;grid-template-columns:1fr auto;width:100%}._productTile_179ie_57 ._topRow_179ie_76 button{background-color:transparent;padding:0;margin:0;outline:none;border:none;height:min-content;width:min-content}._productTile_179ie_57 ._topRow_179ie_76 path{fill:var(--icons-icon-search)}._productTile_179ie_57 ._topRow_179ie_76 svg{padding:0}._productTile_179ie_57 ._productInformation_179ie_20{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_179ie_57 ._productData_179ie_107{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_179ie_57 ._purchase_179ie_27{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_179ie_57 ._purchase_179ie_27{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_179ie_57 ._purchaseInformation_179ie_27{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_179ie_57 ._purchaseInformation_179ie_27{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_179ie_57 ._attributeContainer_179ie_144{margin:0;padding:0;padding-top:var(--spacing-spacing-1xs);border-top:1px solid var(--border-border-primary);width:100%;list-style:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:var(--spacing-spacing-lg);row-gap:var(--spacing-spacing-3xs)}@media (max-width: 640px){._productTile_179ie_57 ._attributeContainer_179ie_144{display:none}}._productTile_179ie_57 ._attributeContainer_179ie_144 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_179ie_57 ._addToCart_179ie_35{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_179ie_57 ._addToCart_179ie_35{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_179ie_57 ._addToCartButton_179ie_38{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_179ie_57 ._addToCartButton_179ie_38{width:100%}}._elevated_179ie_192{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_179ie_198 ._productInformation_179ie_20{margin-top:0}
1
+ ._productCard_tpx1r_3{box-sizing:border-box;background:var(--surface-surface-primary, #FFF);display:flex;width:232px;height:296px;padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._productCard_tpx1r_3._sm_tpx1r_15{width:180px;height:230px}._productCard_tpx1r_3>img{width:78px;height:78px;object-fit:contain;flex-shrink:0;margin:0 auto}._productCard_tpx1r_3 ._productInformation_tpx1r_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:auto}._productCard_tpx1r_3 ._purchaseInformation_tpx1r_34{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._productCard_tpx1r_3 ._addToCart_tpx1r_42,._productCard_tpx1r_3 ._addToCartButton_tpx1r_45{width:100%}._productInformation_tpx1r_27>a{font-weight:var(--font-weight-semibold)}._partNumber_tpx1r_53{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._partNumberLabel_tpx1r_60{color:var(--text-text-quaternary)}._productTile_tpx1r_64{box-sizing:border-box;width:100%;max-width:1072px;display:flex;flex-direction:row;align-items:flex-start;background:var(--surface-surface-primary, #FFF);padding:var(--spacing-spacing-default, 16px) var(--spacing-spacing-sm, 20px);gap:var(--spacing-spacing-1xs)}._productTile_tpx1r_64>img{width:108px;height:108px;object-fit:contain}._productTile_tpx1r_64 ._topRow_tpx1r_83{display:grid;grid-template-columns:1fr auto;width:100%}._productTile_tpx1r_64 ._topRow_tpx1r_83 button{background-color:transparent;padding:0;margin:0;outline:none;border:none;height:min-content;width:min-content}._productTile_tpx1r_64 ._topRow_tpx1r_83 path{fill:var(--icons-icon-search)}._productTile_tpx1r_64 ._topRow_tpx1r_83 svg{padding:0}._productTile_tpx1r_64 ._productInformation_tpx1r_27{display:flex;flex-direction:column;align-items:flex-start;gap:2px}._productTile_tpx1r_64 ._productData_tpx1r_114{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:var(--spacing-spacing-2xs)}._productTile_tpx1r_64 ._purchase_tpx1r_34{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;width:100%}@media (max-width: 480px){._productTile_tpx1r_64 ._purchase_tpx1r_34{flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-3xs)}}._productTile_tpx1r_64 ._purchaseInformation_tpx1r_34{display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-spacing-2xs)}@media (max-width: 480px){._productTile_tpx1r_64 ._purchaseInformation_tpx1r_34{flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%;gap:0px}}._productTile_tpx1r_64 ._attributeContainer_tpx1r_151{margin:0;padding:0;padding-top:var(--spacing-spacing-1xs);border-top:1px solid var(--border-border-primary);width:100%;list-style:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:var(--spacing-spacing-lg);row-gap:var(--spacing-spacing-3xs)}@media (max-width: 640px){._productTile_tpx1r_64 ._attributeContainer_tpx1r_151{display:none}}._productTile_tpx1r_64 ._attributeContainer_tpx1r_151 li{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-3xs)}._productTile_tpx1r_64 ._addToCart_tpx1r_42{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-md)}@media (max-width: 480px){._productTile_tpx1r_64 ._addToCart_tpx1r_42{gap:var(--spacing-spacing-2xs);width:100%}}._productTile_tpx1r_64 ._addToCartButton_tpx1r_45{width:96px;font-size:var(--font-size-md);font-weight:var(--font-weight-semibold)}@media (max-width: 640px){._productTile_tpx1r_64 ._addToCartButton_tpx1r_45{width:100%}}._elevated_tpx1r_199{border:1px solid var(--border-border-primary, #DFDFDF);box-shadow:2px 4px 12px #00000026}._noImage_tpx1r_205 ._productInformation_tpx1r_27{margin-top:0}._sm_tpx1r_15{padding:var(--spacing-spacing-1xs)}
@@ -1 +1 @@
1
- ._link_ygp31_1{color:var(--text-text-links);text-decoration:none}._link_ygp31_1:hover{text-decoration:underline}._link_ygp31_1:focus{text-decoration:underline;font-weight:var(--font-weight-semibold)}._link_ygp31_1._disabled_ygp31_14{color:var(--text-text-disabled);cursor:not-allowed}._link_ygp31_1._disabled_ygp31_14:hover{text-decoration:none}
1
+ ._link_f9a12_1{color:var(--text-text-links);text-decoration:none}._link_f9a12_1:hover{text-decoration:underline}._link_f9a12_1:focus{text-decoration:underline;font-weight:var(--font-weight-semibold)}._link_f9a12_1._disabled_f9a12_14{color:var(--text-text-disabled);cursor:not-allowed}._link_f9a12_1._disabled_f9a12_14:hover{text-decoration:none}
@@ -1,8 +1,10 @@
1
1
  import { HideAtProps } from '../HideAt';
2
+ export type ButtonVariant = "primary" | "secondary" | "secondary-transparent" | "cta-primary" | "tertiary" | "destructive";
3
+ export type ButtonSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
2
4
  export interface ButtonStyleProps {
3
5
  disabled?: boolean;
4
- size: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
5
- variant: "primary" | "secondary" | "secondary-transparent" | "cta-primary" | "tertiary" | "destructive";
6
+ size: ButtonSize;
7
+ variant: ButtonVariant;
6
8
  }
7
9
  export declare function buttonClassNames({ size, variant, hideAt, className, disabled, }: ButtonStyleProps & {
8
10
  hideAt?: HideAtProps["hideAt"];
@@ -1,11 +1,14 @@
1
1
  import { default as React } from 'react';
2
2
  import { HideAtProps } from '../HideAt';
3
+ import { TextSize, TextWeight } from '../Text/Text';
3
4
  export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, HideAtProps {
4
5
  href: string;
5
6
  disabled?: boolean;
6
7
  unstyled?: boolean;
7
8
  children: React.ReactNode;
8
9
  implementation?: LinkImplementation;
10
+ size?: TextSize;
11
+ weight?: TextWeight;
9
12
  }
10
13
  /** Router component contract (e.g. next/link or react-router Link) */
11
14
  export type LinkImplementation = React.ComponentType<{
@@ -13,4 +16,4 @@ export type LinkImplementation = React.ComponentType<{
13
16
  className?: string;
14
17
  children: React.ReactNode;
15
18
  } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">>;
16
- export declare function Link({ href, disabled, unstyled, hideAt, className, children, implementation, ...rest }: LinkProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function Link({ href, disabled, unstyled, hideAt, className, children, implementation, size, weight, ...rest }: LinkProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { routerOverride as i } from "./configureLink.js";
3
- import { linkClassName as d } from "./linkClassName.js";
4
- function L({
3
+ import { linkClassName as x } from "./linkClassName.js";
4
+ function b({
5
5
  href: f,
6
6
  disabled: o = !1,
7
7
  unstyled: m = !1,
@@ -9,16 +9,18 @@ function L({
9
9
  className: c,
10
10
  children: e,
11
11
  implementation: a,
12
+ size: p,
13
+ weight: s,
12
14
  ...r
13
15
  }) {
14
- const p = d({ className: c, unstyled: m, disabled: o, hideAt: u }), t = {
16
+ const d = x({ className: c, size: p, weight: s, unstyled: m, disabled: o, hideAt: u }), t = {
15
17
  ...r,
16
18
  href: o ? "#" : f,
17
- className: p,
19
+ className: d,
18
20
  "aria-disabled": o || void 0,
19
21
  tabIndex: o ? -1 : r.tabIndex,
20
22
  role: o ? "link" : r.role
21
- }, s = typeof globalThis < "u" && globalThis.__CASEBLOCKS_LINK_IMPL || null, n = a || i || s;
23
+ }, g = typeof globalThis < "u" && globalThis.__CASEBLOCKS_LINK_IMPL || null, n = a || i || g;
22
24
  return n ? /* @__PURE__ */ l(
23
25
  n,
24
26
  {
@@ -29,5 +31,5 @@ function L({
29
31
  ) : /* @__PURE__ */ l("a", { ...t, "data-router-adapter": "anchor", children: e });
30
32
  }
31
33
  export {
32
- L as Link
34
+ b as Link
33
35
  };
@@ -1,6 +1,9 @@
1
1
  import { HideAtProps } from '../HideAt';
2
- export declare function linkClassName({ className, unstyled, disabled, hideAt }: {
2
+ import { TextSize, TextWeight } from '../Text/Text';
3
+ export declare function linkClassName({ className, size, weight, unstyled, disabled, hideAt }: {
3
4
  className?: string;
5
+ size?: TextSize;
6
+ weight?: TextWeight;
4
7
  unstyled?: boolean;
5
8
  disabled?: boolean;
6
9
  hideAt?: HideAtProps["hideAt"];
@@ -1,24 +1,28 @@
1
- import { t as o } from "../../Text.module-Dzhzk2fH.js";
2
1
  import { c as n } from "../../clsx-OuTLNxxd.js";
3
2
  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
3
+ import { t as i } from "../../Text.module-Dzhzk2fH.js";
4
+ import '../../assets/linkClassName.css';const m = "_link_f9a12_1", c = "_disabled_f9a12_14", e = {
5
+ link: m,
6
+ disabled: c
7
7
  };
8
- function _({
9
- className: i,
8
+ function b({
9
+ className: l,
10
+ size: o,
11
+ weight: s,
10
12
  unstyled: t,
11
- disabled: e,
12
- hideAt: l
13
+ disabled: a,
14
+ hideAt: r
13
15
  }) {
14
16
  return n(
15
- i,
16
- !t && o["text-body"],
17
- !t && s.link,
18
- e && s.disabled,
19
- d(l)
17
+ l,
18
+ !t && o && i[`text-${o}`],
19
+ !t && s && i[`text-${s}`],
20
+ !t && i["text-body"],
21
+ !t && e.link,
22
+ a && e.disabled,
23
+ d(r)
20
24
  );
21
25
  }
22
26
  export {
23
- _ as linkClassName
27
+ b as linkClassName
24
28
  };
@@ -1,6 +1,6 @@
1
1
  import { HideAtProps } from '../HideAt';
2
2
  import { LinkProps } from '../Link/Link';
3
3
  import { ButtonStyleProps } from '../Button/buttonClassName';
4
- export interface LinkButtonProps extends LinkProps, HideAtProps, ButtonStyleProps {
4
+ export interface LinkButtonProps extends Omit<LinkProps, "size" | "weight">, HideAtProps, ButtonStyleProps {
5
5
  }
6
6
  export declare function LinkButton({ href, children, size, variant, hideAt, className, disabled, ...otherProps }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,18 @@
1
1
  import { HideAtProps } from '../HideAt';
2
2
  import { JSX } from 'react';
3
3
  type ElementType = keyof Pick<JSX.IntrinsicElements, "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div">;
4
+ export type TextSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
5
+ export type TextWeight = "thin" | "extra-light" | "light" | "regular" | "medium" | "semibold" | "bold";
4
6
  /** A text element. */
5
7
  export type TextProps<T extends ElementType = "span"> = HideAtProps & {
6
8
  /** The HTML element to render as */
7
9
  as?: ElementType;
8
10
  /** The size of the text. */
9
- size: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
11
+ size: TextSize;
10
12
  /** The variant of the text. */
11
13
  variant?: "body" | "display";
12
14
  /** The weight of the text. */
13
- weight?: "thin" | "extra-light" | "light" | "regular" | "medium" | "semibold" | "bold";
15
+ weight?: TextWeight;
14
16
  colorToken?: 'inherit' | 'warning' | 'disabled' | 'error-warning' | 'default-inverted' | 'links' | 'links-hover-press' | 'primary' | 'quaternary' | 'search-bar' | 'secondary' | 'success' | 'tertiary' | 'footer';
15
17
  } & Omit<React.ComponentPropsWithoutRef<T>, "size">;
16
18
  export declare function Text<T extends ElementType = "span">({ as, size, variant, weight, colorToken, children, hideAt, className, ...otherProps }: TextProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -5,8 +5,8 @@ export { SlideInPanel } from './atoms/SlideInPanel/SlideInPanel';
5
5
  export type { SlideInPanelProps } from './atoms/SlideInPanel/SlideInPanel';
6
6
  export { Markdown } from './atoms/Markdown/Markdown';
7
7
  export type { MarkdownProps } from './atoms/Markdown/Markdown';
8
- export { PreprocessedMarkdown as ItemDescriptionMarkdown } from './atoms/Markdown/PreprocessedMarkdown';
9
- export type { PreprocessedMarkdownProps as ItemDescriptionMarkdownProps } from './atoms/Markdown/PreprocessedMarkdown';
8
+ export { PreprocessedMarkdown } from './atoms/Markdown/PreprocessedMarkdown';
9
+ export type { PreprocessedMarkdownProps } from './atoms/Markdown/PreprocessedMarkdown';
10
10
  export { usePreprocessedMarkdown } from './atoms/Markdown/usePreprocessedMarkdown';
11
11
  export type { LinkTarget, ValidateToken } from './atoms/Markdown/usePreprocessedMarkdown';
12
12
  export { Tooltip } from './atoms/Tooltip/Tooltip';
@@ -4,21 +4,21 @@ import { Column as f, Grid as x } from "./atoms/Grid/Grid.js";
4
4
  import { Head as n } from "./atoms/Root/Head.js";
5
5
  import { Icon as d } from "./atoms/Icon/Icon.js";
6
6
  import { Root as u } from "./atoms/Root/Root.js";
7
- import { Separator as s } from "./atoms/Separator/Separator.js";
7
+ import { Separator as k } from "./atoms/Separator/Separator.js";
8
8
  import { Text as C } from "./atoms/Text/Text.js";
9
- import { Input as I } from "./atoms/Input/Input.js";
10
- import { Link as w } from "./atoms/Link/Link.js";
11
- import { linkClassName as P } from "./atoms/Link/linkClassName.js";
9
+ import { Input as S } from "./atoms/Input/Input.js";
10
+ import { Link as P } from "./atoms/Link/Link.js";
11
+ import { linkClassName as B } from "./atoms/Link/linkClassName.js";
12
12
  import { configureLink as v, routerOverride as A } from "./atoms/Link/configureLink.js";
13
13
  import { LinkButton as h } from "./atoms/LinkButton/LinkButton.js";
14
14
  import { configureImage as F } from "./atoms/Image/configureImage.js";
15
15
  import { Logo as V } from "./molecules/Logo/Logo.js";
16
16
  import { SearchBox as y } from "./molecules/SearchBox/SearchBox.js";
17
17
  import { QuantityInput as z } from "./molecules/QuantityInput/QuantityInput.js";
18
- import { Pricing as G } from "./molecules/Pricing/Pricing.js";
19
- import { Availability as Q } from "./molecules/Availability/Availability.js";
20
- import { Avatar as Z } from "./molecules/Avatar/Avatar.js";
21
- import { BannerCard as q } from "./molecules/BannerCard/BannerCard.js";
18
+ import { Pricing as O } from "./molecules/Pricing/Pricing.js";
19
+ import { Availability as R } from "./molecules/Availability/Availability.js";
20
+ import { Avatar as j } from "./molecules/Avatar/Avatar.js";
21
+ import { BannerCard as D } from "./molecules/BannerCard/BannerCard.js";
22
22
  import { CardLink as J } from "./molecules/CardLink/CardLink.js";
23
23
  import { Breadcrumbs as U } from "./molecules/Breadcrumbs/Breadcrumbs.js";
24
24
  import { NotFound as X } from "./organisms/NotFound/NotFound.js";
@@ -30,45 +30,44 @@ import { usePreprocessedMarkdown as fo } from "./atoms/Markdown/usePreprocessedM
30
30
  import { Tooltip as ao } from "./atoms/Tooltip/Tooltip.js";
31
31
  import { Popover as io } from "./atoms/Popover/Popover.js";
32
32
  import { Account as uo } from "./molecules/Account/Account.js";
33
- import { Chip as so } from "./molecules/Chip/Chip.js";
33
+ import { Chip as ko } from "./molecules/Chip/Chip.js";
34
34
  import { ToggleView as Co } from "./molecules/ToggleView/ToggleView.js";
35
- import { CartSlideInPanel as Io } from "./molecules/Cart/CartSlideInPanel.js";
36
- import { StatefulButton as wo } from "./molecules/StatefulButton/StatefulButton.js";
37
- import { AnimatedCheckMark as Po } from "./molecules/StatefulButton/AnimatedCheckmark.js";
35
+ import { CartSlideInPanel as So } from "./molecules/Cart/CartSlideInPanel.js";
36
+ import { StatefulButton as Po } from "./molecules/StatefulButton/StatefulButton.js";
37
+ import { AnimatedCheckMark as Bo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
38
38
  import { AddToCart as vo } from "./molecules/AddToCart/AddToCart.js";
39
39
  import { Modal as Lo } from "./molecules/Modal/Modal.js";
40
40
  import { ImageViewer as To } from "./molecules/ImageViewer/ImageViewer.js";
41
41
  import { MainNav as No } from "./organisms/MainNav/MainNav.js";
42
42
  import { ChipSelector as bo } from "./organisms/ChipSelector/ChipSelector.js";
43
43
  import { Product as Ho } from "./organisms/Product/Product.js";
44
- import { Carousel as Do } from "./organisms/Carousel/Carousel.js";
45
- import { Footer as Oo } from "./organisms/Footer/Footer.js";
46
- import { default as Ro } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
44
+ import { Carousel as Go } from "./organisms/Carousel/Carousel.js";
45
+ import { Footer as Qo } from "./organisms/Footer/Footer.js";
46
+ import { default as Zo } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
47
47
  export {
48
48
  uo as Account,
49
49
  vo as AddToCart,
50
- Po as AnimatedCheckMark,
51
- Q as Availability,
52
- Z as Avatar,
53
- q as BannerCard,
50
+ Bo as AnimatedCheckMark,
51
+ R as Availability,
52
+ j as Avatar,
53
+ D as BannerCard,
54
54
  U as Breadcrumbs,
55
55
  e as Button,
56
56
  J as CardLink,
57
- Do as Carousel,
58
- Io as CartSlideInPanel,
59
- so as Chip,
57
+ Go as Carousel,
58
+ So as CartSlideInPanel,
59
+ ko as Chip,
60
60
  bo as ChipSelector,
61
61
  f as Column,
62
62
  p as Flex,
63
- Oo as Footer,
63
+ Qo as Footer,
64
64
  x as Grid,
65
65
  n as Head,
66
66
  _ as HorizontalScroll,
67
67
  d as Icon,
68
68
  To as ImageViewer,
69
- I as Input,
70
- po as ItemDescriptionMarkdown,
71
- w as Link,
69
+ S as Input,
70
+ P as Link,
72
71
  h as LinkButton,
73
72
  V as Logo,
74
73
  No as MainNav,
@@ -76,21 +75,22 @@ export {
76
75
  Lo as Modal,
77
76
  X as NotFound,
78
77
  io as Popover,
79
- G as Pricing,
78
+ po as PreprocessedMarkdown,
79
+ O as Pricing,
80
80
  Ho as Product,
81
81
  z as QuantityInput,
82
82
  u as Root,
83
83
  y as SearchBox,
84
- s as Separator,
84
+ k as Separator,
85
85
  oo as SlideInPanel,
86
- Ro as SpinZoomViewer,
87
- wo as StatefulButton,
86
+ Zo as SpinZoomViewer,
87
+ Po as StatefulButton,
88
88
  C as Text,
89
89
  Co as ToggleView,
90
90
  ao as Tooltip,
91
91
  F as configureImage,
92
92
  v as configureLink,
93
- P as linkClassName,
93
+ B as linkClassName,
94
94
  A as routerOverride,
95
95
  fo as usePreprocessedMarkdown
96
96
  };
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { ButtonVariant } from '../../atoms/Button/buttonClassName';
2
3
  export interface AddToCartProps {
3
4
  itemKey: number;
4
5
  initialQuantity?: number;
@@ -10,8 +11,9 @@ export interface AddToCartProps {
10
11
  showQuantity?: boolean;
11
12
  className?: string;
12
13
  addButtonClassName?: string;
14
+ addButtonVariant?: ButtonVariant;
13
15
  buttonText?: string;
14
16
  buttonDoneText?: string;
15
17
  size?: "sm" | "md";
16
18
  }
17
- export declare function AddToCart({ itemKey, initialQuantity, min, max, onQuantityChange, onAdd, autoHideDelayMs, showQuantity, className, addButtonClassName, buttonText, buttonDoneText, size }: AddToCartProps): React.ReactElement | null;
19
+ export declare function AddToCart({ itemKey, initialQuantity, min, max, onQuantityChange, onAdd, autoHideDelayMs, showQuantity, className, addButtonClassName, addButtonVariant, buttonText, buttonDoneText, size }: AddToCartProps): React.ReactElement | null;
@@ -1,12 +1,12 @@
1
- import { jsxs as S, jsx as d } from "react/jsx-runtime";
1
+ import { jsxs as j, jsx as d } from "react/jsx-runtime";
2
2
  import r from "react";
3
- import { c as j } from "../../clsx-OuTLNxxd.js";
4
- import { StatefulButton as v } from "../StatefulButton/StatefulButton.js";
5
- import { QuantityInput as q } from "../QuantityInput/QuantityInput.js";
6
- import '../../assets/AddToCart.css';const w = "_container_1xk40_1", y = {
7
- container: w
3
+ import { c as v } from "../../clsx-OuTLNxxd.js";
4
+ import { StatefulButton as q } from "../StatefulButton/StatefulButton.js";
5
+ import { QuantityInput as w } from "../QuantityInput/QuantityInput.js";
6
+ import '../../assets/AddToCart.css';const y = "_container_1xk40_1", z = {
7
+ container: y
8
8
  };
9
- function F({
9
+ function G({
10
10
  itemKey: s,
11
11
  initialQuantity: i = 1,
12
12
  min: o = 1,
@@ -17,42 +17,43 @@ function F({
17
17
  showQuantity: p = !0,
18
18
  className: x,
19
19
  addButtonClassName: T,
20
- buttonText: _,
21
- buttonDoneText: b,
20
+ addButtonVariant: _,
21
+ buttonText: b,
22
+ buttonDoneText: k,
22
23
  size: a
23
24
  }) {
24
- const [u, k] = r.useState(() => {
25
+ const [u, A] = r.useState(() => {
25
26
  const e = Number(i) || 1;
26
27
  return e < o ? o : e;
27
- }), [A, n] = r.useState(!1), t = r.useRef(null);
28
+ }), [N, n] = r.useState(!1), t = r.useRef(null);
28
29
  r.useEffect(() => () => {
29
30
  t.current && clearTimeout(t.current);
30
31
  }, []);
31
- const N = r.useCallback((e) => {
32
- k(e), c == null || c(e);
33
- }, [c]), R = async () => {
32
+ const R = r.useCallback((e) => {
33
+ A(e), c == null || c(e);
34
+ }, [c]), S = async () => {
34
35
  s && (await m(s, u), n(!0), t.current && clearTimeout(t.current), t.current = setTimeout(() => n(!1), f));
35
36
  };
36
- return /* @__PURE__ */ S("div", { className: j(y.container, x), children: [
37
+ return /* @__PURE__ */ j("div", { className: v(z.container, x), children: [
37
38
  p && /* @__PURE__ */ d(
38
- q,
39
+ w,
39
40
  {
40
41
  quantity: u,
41
- onQuantityChange: N,
42
+ onQuantityChange: R,
42
43
  min: o,
43
44
  max: l,
44
45
  size: a || "md"
45
46
  }
46
47
  ),
47
48
  /* @__PURE__ */ d(
48
- v,
49
+ q,
49
50
  {
50
51
  size: a || "md",
51
- variant: "cta-primary",
52
- completed: A,
53
- onClick: R,
54
- text: _,
55
- completedText: b,
52
+ variant: _ || "cta-primary",
53
+ completed: N,
54
+ onClick: S,
55
+ text: b,
56
+ completedText: k,
56
57
  disabled: !s,
57
58
  className: T
58
59
  }
@@ -60,5 +61,5 @@ function F({
60
61
  ] });
61
62
  }
62
63
  export {
63
- F as AddToCart
64
+ G as AddToCart
64
65
  };
@@ -1,5 +1,6 @@
1
1
  import { AvailabilityProps } from '../../molecules/Availability/Availability';
2
2
  export type ProductView = "Card" | "Tile";
3
+ export type Size = "md" | "sm";
3
4
  export interface ProductProps extends AvailabilityProps {
4
5
  productView: ProductView;
5
6
  productDescription: string;
@@ -18,5 +19,7 @@ export interface ProductProps extends AvailabilityProps {
18
19
  onAddToCart: (_itemKey: number, _quantity: number) => void;
19
20
  onClose?: (_itemKey: number) => void;
20
21
  flat?: boolean;
22
+ size?: Size;
23
+ showQuantity?: boolean;
21
24
  }
22
- export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, contactHref, contactLinkBehavior, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function Product({ productView, itemKey, partNumber, productDescription, availDescription, availId, contactHref, contactLinkBehavior, productHref, priceLabel, price, imgSrc, attributes, className, onAddToCart, onClose, flat, size, showQuantity, ...otherProps }: ProductProps): import("react/jsx-runtime").JSX.Element;
@@ -1,134 +1,157 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
- import { Image as v } from "../../atoms/Image/Image.js";
3
- import { Link as I } from "../../atoms/Link/Link.js";
4
- import { Text as o } from "../../atoms/Text/Text.js";
5
- import { Availability as w } from "../../molecules/Availability/Availability.js";
6
- import { Pricing as x } from "../../molecules/Pricing/Pricing.js";
7
- import { AddToCart as z } from "../../molecules/AddToCart/AddToCart.js";
8
- import { Icon as R } from "../../atoms/Icon/Icon.js";
9
- import { c as B } from "../../clsx-OuTLNxxd.js";
10
- import '../../assets/Product.css';const $ = "_productCard_179ie_1", A = "_productInformation_179ie_20", D = "_purchaseInformation_179ie_27", P = "_addToCart_179ie_35", j = "_addToCartButton_179ie_38", k = "_partNumber_179ie_46", y = "_partNumberLabel_179ie_53", q = "_productTile_179ie_57", E = "_topRow_179ie_76", F = "_productData_179ie_107", G = "_purchase_179ie_27", J = "_attributeContainer_179ie_144", M = "_elevated_179ie_192", O = "_noImage_179ie_198", e = {
11
- productCard: $,
12
- productInformation: A,
13
- purchaseInformation: D,
14
- addToCart: P,
15
- addToCartButton: j,
16
- partNumber: k,
17
- partNumberLabel: y,
18
- productTile: q,
19
- topRow: E,
20
- productData: F,
21
- purchase: G,
22
- attributeContainer: J,
23
- elevated: M,
24
- noImage: O
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { Image as I } from "../../atoms/Image/Image.js";
3
+ import { Link as w } from "../../atoms/Link/Link.js";
4
+ import { Text as n } from "../../atoms/Text/Text.js";
5
+ import { Availability as B } from "../../molecules/Availability/Availability.js";
6
+ import { Pricing as L } from "../../molecules/Pricing/Pricing.js";
7
+ import { AddToCart as A } from "../../molecules/AddToCart/AddToCart.js";
8
+ import { Icon as D } from "../../atoms/Icon/Icon.js";
9
+ import { c as R } from "../../clsx-OuTLNxxd.js";
10
+ import '../../assets/Product.css';const P = "_productCard_tpx1r_3", j = "_sm_tpx1r_15", k = "_productInformation_tpx1r_27", z = "_purchaseInformation_tpx1r_34", y = "_addToCart_tpx1r_42", V = "_addToCartButton_tpx1r_45", q = "_partNumber_tpx1r_53", E = "_partNumberLabel_tpx1r_60", F = "_productTile_tpx1r_64", G = "_topRow_tpx1r_83", J = "_productData_tpx1r_114", M = "_purchase_tpx1r_34", O = "_attributeContainer_tpx1r_151", U = "_elevated_tpx1r_199", W = "_noImage_tpx1r_205", t = {
11
+ productCard: P,
12
+ sm: j,
13
+ productInformation: k,
14
+ purchaseInformation: z,
15
+ addToCart: y,
16
+ addToCartButton: V,
17
+ partNumber: q,
18
+ partNumberLabel: E,
19
+ productTile: F,
20
+ topRow: G,
21
+ productData: J,
22
+ purchase: M,
23
+ attributeContainer: O,
24
+ elevated: U,
25
+ noImage: W
25
26
  };
26
- function S({
27
- productView: L,
28
- itemKey: c,
29
- partNumber: i,
30
- productDescription: m,
31
- availDescription: u,
32
- availId: d,
27
+ function at({
28
+ productView: $,
29
+ itemKey: m,
30
+ partNumber: c,
31
+ productDescription: u,
32
+ availDescription: _,
33
+ availId: s,
33
34
  contactHref: h,
34
- contactLinkBehavior: p,
35
- productHref: _,
35
+ contactLinkBehavior: x,
36
+ productHref: b,
36
37
  priceLabel: N,
37
- price: n,
38
- imgSrc: r,
38
+ price: i,
39
+ imgSrc: d,
39
40
  attributes: l,
40
- className: b,
41
- onAddToCart: f,
42
- onClose: C,
43
- flat: T,
44
- ...g
41
+ className: f,
42
+ onAddToCart: C,
43
+ onClose: T,
44
+ flat: g,
45
+ size: o = "md",
46
+ showQuantity: p = !0,
47
+ ...v
45
48
  }) {
46
- return L === "Card" ? /* @__PURE__ */ a("div", { className: B(e.productCard, b, !T && e.elevated, !r && e.noImage), ...g, children: [
47
- r && /* @__PURE__ */ t(
48
- v,
49
+ if ($ === "Card") {
50
+ const e = o === "sm" ? "xs" : "sm";
51
+ return /* @__PURE__ */ a(
52
+ "div",
49
53
  {
50
- src: r,
51
- alt: `${i} product image`,
52
- height: 96,
53
- width: 96
54
- }
55
- ),
56
- /* @__PURE__ */ a("div", { className: e.productInformation, children: [
57
- /* @__PURE__ */ t(I, { href: _, children: m }),
58
- /* @__PURE__ */ a("div", { className: e.partNumber, children: [
59
- /* @__PURE__ */ t(o, { size: "sm", className: e.partNumberLabel, children: "Part #" }),
60
- /* @__PURE__ */ t(o, { size: "sm", weight: "semibold", children: i })
61
- ] })
62
- ] }),
63
- /* @__PURE__ */ a("div", { className: e.purchaseInformation, children: [
64
- d && /* @__PURE__ */ t(
65
- w,
66
- {
67
- availId: d,
68
- availDescription: u,
69
- contactHref: h,
70
- contactLinkBehavior: p
71
- }
72
- ),
73
- n && /* @__PURE__ */ t(x, { pricingLabel: N, price: n })
74
- ] }),
75
- /* @__PURE__ */ t(
76
- z,
77
- {
78
- itemKey: c,
79
- onAdd: f,
80
- className: e.addToCart,
81
- addButtonClassName: e.addToCartButton,
82
- size: "md",
83
- buttonDoneText: ""
54
+ className: R(
55
+ t.productCard,
56
+ o && t[o],
57
+ f,
58
+ !g && t.elevated,
59
+ !d && t.noImage
60
+ ),
61
+ ...v,
62
+ children: [
63
+ d && /* @__PURE__ */ r(
64
+ I,
65
+ {
66
+ src: d,
67
+ alt: `${c} product image`,
68
+ height: o === "sm" ? 78 : 96,
69
+ width: o === "sm" ? 78 : 96
70
+ }
71
+ ),
72
+ /* @__PURE__ */ a("div", { className: t.productInformation, children: [
73
+ /* @__PURE__ */ r(w, { size: o, href: b, children: u }),
74
+ /* @__PURE__ */ a("div", { className: t.partNumber, children: [
75
+ /* @__PURE__ */ r(n, { size: e, className: t.partNumberLabel, children: "Part #" }),
76
+ /* @__PURE__ */ r(n, { size: e, weight: "semibold", children: c })
77
+ ] })
78
+ ] }),
79
+ /* @__PURE__ */ a("div", { className: t.purchaseInformation, children: [
80
+ s && /* @__PURE__ */ r(
81
+ B,
82
+ {
83
+ availId: s,
84
+ availDescription: _,
85
+ contactHref: h,
86
+ contactLinkBehavior: x
87
+ }
88
+ ),
89
+ i && /* @__PURE__ */ r(L, { pricingLabel: N, price: i })
90
+ ] }),
91
+ /* @__PURE__ */ r(
92
+ A,
93
+ {
94
+ itemKey: m,
95
+ onAdd: C,
96
+ className: t.addToCart,
97
+ addButtonClassName: t.addToCartButton,
98
+ addButtonVariant: p ? "cta-primary" : "secondary",
99
+ size: o,
100
+ buttonDoneText: "",
101
+ buttonText: p ? "Add" : "Add to Cart",
102
+ showQuantity: p
103
+ }
104
+ )
105
+ ]
84
106
  }
85
- )
86
- ] }) : /* @__PURE__ */ a("div", { className: B(e.productTile, b, !T && e.elevated, !r && e.noImage), ...g, children: [
87
- r && /* @__PURE__ */ t(
88
- v,
107
+ );
108
+ }
109
+ return /* @__PURE__ */ a("div", { className: R(t.productTile, f, !g && t.elevated, !d && t.noImage), ...v, children: [
110
+ d && /* @__PURE__ */ r(
111
+ I,
89
112
  {
90
- src: r,
91
- alt: `${i} product image`,
113
+ src: d,
114
+ alt: `${c} product image`,
92
115
  height: 108,
93
116
  width: 108
94
117
  }
95
118
  ),
96
- /* @__PURE__ */ a("div", { className: e.productData, children: [
97
- /* @__PURE__ */ a("div", { className: e.topRow, children: [
98
- /* @__PURE__ */ a("div", { className: e.productInformation, children: [
99
- /* @__PURE__ */ t(I, { href: _, children: m }),
100
- /* @__PURE__ */ a("div", { className: e.partNumber, children: [
101
- /* @__PURE__ */ t(o, { size: "sm", className: e.partNumberLabel, children: "Part #" }),
102
- /* @__PURE__ */ t(o, { size: "sm", weight: "semibold", children: i })
119
+ /* @__PURE__ */ a("div", { className: t.productData, children: [
120
+ /* @__PURE__ */ a("div", { className: t.topRow, children: [
121
+ /* @__PURE__ */ a("div", { className: t.productInformation, children: [
122
+ /* @__PURE__ */ r(w, { href: b, children: u }),
123
+ /* @__PURE__ */ a("div", { className: t.partNumber, children: [
124
+ /* @__PURE__ */ r(n, { size: "sm", className: t.partNumberLabel, children: "Part #" }),
125
+ /* @__PURE__ */ r(n, { size: "sm", weight: "semibold", children: c })
103
126
  ] })
104
127
  ] }),
105
- C && /* @__PURE__ */ t("button", { onClick: () => C(c), children: /* @__PURE__ */ t(R, { size: "sm", iconKey: "fa-light fa-xmark" }) })
128
+ T && /* @__PURE__ */ r("button", { onClick: () => T(m), children: /* @__PURE__ */ r(D, { size: "sm", iconKey: "fa-light fa-xmark" }) })
106
129
  ] }),
107
- /* @__PURE__ */ a("div", { className: e.purchase, children: [
108
- /* @__PURE__ */ a("div", { className: e.purchaseInformation, children: [
109
- d && /* @__PURE__ */ t(
110
- w,
130
+ /* @__PURE__ */ a("div", { className: t.purchase, children: [
131
+ /* @__PURE__ */ a("div", { className: t.purchaseInformation, children: [
132
+ s && /* @__PURE__ */ r(
133
+ B,
111
134
  {
112
- availId: d,
113
- availDescription: u,
135
+ availId: s,
136
+ availDescription: _,
114
137
  contactHref: h,
115
- contactLinkBehavior: p
138
+ contactLinkBehavior: x
116
139
  }
117
140
  ),
118
- n && /* @__PURE__ */ t(x, { pricingLabel: N, price: n })
141
+ i && /* @__PURE__ */ r(L, { pricingLabel: N, price: i })
119
142
  ] }),
120
- /* @__PURE__ */ t(z, { itemKey: c, onAdd: f, className: e.addToCart, addButtonClassName: e.addToCartButton })
143
+ /* @__PURE__ */ r(A, { itemKey: m, onAdd: C, className: t.addToCart, addButtonClassName: t.addToCartButton })
121
144
  ] }),
122
- l && l.length > 0 && /* @__PURE__ */ t("ul", { className: e.attributeContainer, children: l.map((s) => /* @__PURE__ */ a("li", { children: [
123
- /* @__PURE__ */ a(o, { size: "xs", weight: "light", children: [
124
- s.label,
145
+ l && l.length > 0 && /* @__PURE__ */ r("ul", { className: t.attributeContainer, children: l.map((e) => /* @__PURE__ */ a("li", { children: [
146
+ /* @__PURE__ */ a(n, { size: "xs", weight: "light", children: [
147
+ e.label,
125
148
  ":"
126
149
  ] }),
127
- /* @__PURE__ */ t(o, { size: "xs", weight: "semibold", children: s.value })
128
- ] }, `${s.label}.${s.value}`)) })
150
+ /* @__PURE__ */ r(n, { size: "xs", weight: "semibold", children: e.value })
151
+ ] }, `${e.label}.${e.value}`)) })
129
152
  ] })
130
153
  ] });
131
154
  }
132
155
  export {
133
- S as Product
156
+ at as Product
134
157
  };
@@ -69,6 +69,16 @@ declare const meta: {
69
69
  control: "boolean";
70
70
  description: string;
71
71
  };
72
+ size: {
73
+ control: {
74
+ type: "select";
75
+ };
76
+ options: string[];
77
+ };
78
+ showQuantity: {
79
+ control: "boolean";
80
+ description: string;
81
+ };
72
82
  };
73
83
  args: ProductProps;
74
84
  tags: string[];
@@ -47,7 +47,12 @@ const o = [
47
47
  imgSrc: { control: "text" },
48
48
  itemKey: { control: "number" },
49
49
  onAddToCart: { action: "addToCart", description: "(itemKey, quantity)" },
50
- flat: { control: "boolean", description: "Removes border and shadow" }
50
+ flat: { control: "boolean", description: "Removes border and shadow" },
51
+ size: {
52
+ control: { type: "select" },
53
+ options: ["md", "sm"]
54
+ },
55
+ showQuantity: { control: "boolean", description: "Shows/Hides add to cart quantity" }
51
56
  },
52
57
  args: {
53
58
  productView: "Card",
@@ -71,7 +76,9 @@ const o = [
71
76
  onClose: (t) => {
72
77
  alert(`On close clicked ${t}`);
73
78
  },
74
- flat: !1
79
+ flat: !1,
80
+ size: "md",
81
+ showQuantity: !0
75
82
  },
76
83
  tags: ["autodocs"]
77
84
  }, l = {}, c = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.129",
4
+ "version": "0.0.131",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",