@caseparts-org/caseblocks 0.0.86 → 0.0.88

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
- ._content_1wx0f_2{box-shadow:8px 8px 12px #00000026;background-color:#fff;padding:var(--spacing-1);box-sizing:border-box;width:max-content;border:1px solid var(--color-neutrals-neutral-1);border-radius:4px;z-index:9999}
1
+ ._content_1ao8d_2{box-shadow:8px 8px 12px #00000026;background-color:#fff;padding:var(--spacing-1);box-sizing:border-box;width:max-content;border:1px solid var(--color-neutrals-neutral-1);border-radius:4px;z-index:9999}
@@ -1,38 +1,38 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { c as n } from "../../clsx-OuTLNxxd.js";
3
- import { getHideAtStyles as l } from "../HideAt.js";
4
- import '../../assets/Icon.css';const t = "_wrapper_7uoas_15", o = {
5
- "icon-sm": "_icon-sm_7uoas_1",
6
- "icon-md": "_icon-md_7uoas_5",
7
- "icon-lg": "_icon-lg_7uoas_9",
3
+ import { getHideAtStyles as a } from "../HideAt.js";
4
+ import '../../assets/Icon.css';const t = "_wrapper_1lr8y_15", o = {
5
+ "icon-sm": "_icon-sm_1lr8y_1",
6
+ "icon-md": "_icon-md_1lr8y_5",
7
+ "icon-lg": "_icon-lg_1lr8y_9",
8
8
  wrapper: t,
9
- "iconColor-inherit": "_iconColor-inherit_7uoas_37",
10
- "iconColor-default": "_iconColor-default_7uoas_38",
11
- "iconColor-default-inverted": "_iconColor-default-inverted_7uoas_39",
12
- "iconColor-secondary": "_iconColor-secondary_7uoas_40",
13
- "iconColor-warning": "_iconColor-warning_7uoas_41",
14
- "iconColor-error-warning": "_iconColor-error-warning_7uoas_42",
15
- "iconColor-success": "_iconColor-success_7uoas_43"
9
+ "iconColor-inherit": "_iconColor-inherit_1lr8y_37",
10
+ "iconColor-default": "_iconColor-default_1lr8y_38",
11
+ "iconColor-default-inverted": "_iconColor-default-inverted_1lr8y_39",
12
+ "iconColor-secondary": "_iconColor-secondary_1lr8y_40",
13
+ "iconColor-warning": "_iconColor-warning_1lr8y_41",
14
+ "iconColor-error-warning": "_iconColor-error-warning_1lr8y_42",
15
+ "iconColor-success": "_iconColor-success_1lr8y_43"
16
16
  };
17
17
  function m({
18
18
  iconKey: i,
19
- size: c = "md",
20
- hideAt: s,
21
- className: a,
22
- colorToken: _ = "inherit",
23
- ...e
19
+ size: l = "md",
20
+ hideAt: c,
21
+ className: _,
22
+ colorToken: e = "inherit",
23
+ ...s
24
24
  }) {
25
25
  return /* @__PURE__ */ r(
26
26
  "span",
27
27
  {
28
28
  className: n(
29
29
  o.wrapper,
30
- o[`icon-${c}`],
31
- o[`iconColor-${_}`],
32
- l(s),
33
- a
30
+ o[`icon-${l}`],
31
+ o[`iconColor-${e}`],
32
+ a(c),
33
+ _
34
34
  ),
35
- ...e,
35
+ ...s,
36
36
  children: /* @__PURE__ */ r("i", { className: n(i), "aria-hidden": "true" })
37
37
  }
38
38
  );
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/Root.css';const r = "_root_rz7mq_20", s = {
2
+ import '../../assets/Root.css';const r = "_root_1w7oz_20", s = {
3
3
  root: r
4
4
  };
5
5
  function c({ children: o }) {
@@ -0,0 +1,10 @@
1
+ interface CardLinkProps {
2
+ href: string;
3
+ src: string;
4
+ alt?: string;
5
+ callout: string;
6
+ title: string;
7
+ description: string;
8
+ }
9
+ export default function CardLink({ href, src, alt, callout, title, description }: CardLinkProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,27 @@
1
+ import { jsx as a, jsxs as e } from "react/jsx-runtime";
2
+ import { Text as r } from "../../atoms/Text/Text.js";
3
+ import { Link as n } from "../../atoms/Link/Link.js";
4
+ import { Image as m } from "../../atoms/Image/Image.js";
5
+ import '../../assets/CardLink.css';const _ = "_card_1yols_1", u = "_cardLink_1yols_24", y = "_callout_1yols_29", T = "_calloutText_1yols_51", g = "_cardImage_1yols_57", p = "_cardBody_1yols_66", h = "_cardTitle_1yols_75", x = "_cardDescription_1yols_83", c = {
6
+ card: _,
7
+ cardLink: u,
8
+ callout: y,
9
+ calloutText: T,
10
+ cardImage: g,
11
+ cardBody: p,
12
+ cardTitle: h,
13
+ cardDescription: x
14
+ };
15
+ function z({ href: l = "#", src: s, alt: o = "", callout: t = "Customize", title: d = "Title", description: i = "Customizable part description." }) {
16
+ return /* @__PURE__ */ a(n, { href: l, unstyled: !0, className: c.cardLink, children: /* @__PURE__ */ e("div", { className: c.card, children: [
17
+ /* @__PURE__ */ a(m, { src: s, alt: o, className: c.cardImage }),
18
+ /* @__PURE__ */ a("div", { className: c.callout, children: /* @__PURE__ */ a(r, { size: "xs", weight: "regular", colorToken: "default-inverted", className: c.calloutText, children: t }) }),
19
+ /* @__PURE__ */ e("div", { className: c.cardBody, children: [
20
+ /* @__PURE__ */ a(r, { size: "sm", weight: "regular", colorToken: "secondary", className: c.cardTitle, children: d }),
21
+ /* @__PURE__ */ a(r, { size: "xs", weight: "regular", className: c.cardDescription, children: i })
22
+ ] })
23
+ ] }) });
24
+ }
25
+ export {
26
+ z as default
27
+ };
@@ -0,0 +1,24 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as CardLink } from './CardLink';
3
+ /**
4
+ * CardLink
5
+ *
6
+ * A molecule presenting a customizable part option:
7
+ * - Image (decorative/representative) with alt tied to `title`.
8
+ * - "Customize" callout (uses Text colorToken `default-inverted` over its styled background).
9
+ * - Title (semibold) + description (secondary token for subdued tone).
10
+ *
11
+ * Implicit conventions:
12
+ * - `src` should be a reasonably sized thumbnail (component does not enforce aspect ratio; CSS module does).
13
+ * - `title` doubles as accessible alt text; keep it concise.
14
+ * - Internal Text atoms apply semantic color tokens; prefer editing those tokens over hard-coded colors.
15
+ */
16
+ declare const meta: Meta<typeof CardLink>;
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+ /** Playground: tweak props interactively. */
20
+ export declare const Playground: Story;
21
+ /** Multiple examples to show varied content lengths and images. */
22
+ export declare const Gallery: Story;
23
+ /** Long description stress test (truncation/overflow behavior). */
24
+ export declare const LongDescription: Story;
@@ -0,0 +1,113 @@
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import t from "./CardLink.js";
3
+ const a = {
4
+ title: "Case Parts/Molecules/CardLink",
5
+ component: t,
6
+ args: {
7
+ href: "#",
8
+ src: "https://timely-pika-33be9c.netlify.app/img/fpo_istockphoto-1360227644.jpg",
9
+ alt: "Image Alt",
10
+ callout: "Customize",
11
+ title: "Gaskets",
12
+ description: "We specialize in built-to-spec compression & magnetic gaskets for walk-ins, drawers, and more."
13
+ },
14
+ argTypes: {
15
+ href: {
16
+ control: "text",
17
+ description: "Link URL for the card."
18
+ },
19
+ src: {
20
+ control: "text",
21
+ description: "Image source URL for the part preview."
22
+ },
23
+ alt: {
24
+ control: "text",
25
+ description: "Alt text for the image; defaults to empty string if not provided."
26
+ },
27
+ callout: {
28
+ control: "text",
29
+ description: "Customization callout text."
30
+ },
31
+ title: {
32
+ control: "text",
33
+ description: "Display title for the part option."
34
+ },
35
+ description: {
36
+ control: "text",
37
+ description: "Supporting explanatory text."
38
+ }
39
+ },
40
+ parameters: {
41
+ docs: {
42
+ description: {
43
+ component: "Displays a part option with preview image, a customization callout, and descriptive text. Uses internal Text tokens (`default-inverted`, `secondary`)."
44
+ }
45
+ }
46
+ },
47
+ tags: ["autodocs"]
48
+ }, r = {}, c = {
49
+ render: () => /* @__PURE__ */ i("div", { style: { display: "grid", gap: 24, gridTemplateColumns: "repeat(auto-fill, minmax(260px, 1fr))" }, children: [
50
+ /* @__PURE__ */ e(
51
+ t,
52
+ {
53
+ href: "https://dev.caseparts.com/caseblock",
54
+ src: "https://timely-pika-33be9c.netlify.app/img/fpo_istockphoto-1360227644.jpg",
55
+ alt: "image alt",
56
+ callout: "Customize Gasket",
57
+ title: "How To Customize Gaskets",
58
+ description: "We specialize in built-to-spec compression & magnetic gaskets for walk-ins, drawers, and more. Please call us to discuss your specific needs."
59
+ }
60
+ ),
61
+ /* @__PURE__ */ e(
62
+ t,
63
+ {
64
+ href: "https://dev.caseparts.com/caseblock",
65
+ src: "https://timely-pika-33be9c.netlify.app/img/fpo_istockphoto-1360227644.jpg",
66
+ alt: "image alt",
67
+ callout: "Customize Warmer Wires",
68
+ title: "Warmer Wires Customization",
69
+ description: 'Individually made, built to meet all specifications for any application, and supplied with 18" lead wires.'
70
+ }
71
+ ),
72
+ /* @__PURE__ */ e(
73
+ t,
74
+ {
75
+ href: "https://dev.caseparts.com/caseblock",
76
+ src: "https://timely-pika-33be9c.netlify.app/img/fpo_istockphoto-1360227644.jpg",
77
+ alt: "image alt",
78
+ callout: "Customize Heaters",
79
+ title: "Customizable Heaters",
80
+ description: "Bent to exact specifications—we can help engineer rod & finned heaters for specific applications."
81
+ }
82
+ )
83
+ ] }),
84
+ parameters: {
85
+ docs: {
86
+ description: {
87
+ story: "Demonstrates multiple `CardLink` instances in a responsive grid. Each card illustrates typical variation in image and copy length."
88
+ }
89
+ }
90
+ }
91
+ }, p = {
92
+ args: {
93
+ href: "https://dev.caseparts.com/caseblock",
94
+ src: "https://timely-pika-33be9c.netlify.app/img/fpo_istockphoto-1360227644.jpg",
95
+ alt: "image alt",
96
+ callout: "Customize Heaters To Your Specs",
97
+ title: "Heater Customization For All Applications",
98
+ description: "We specialize in built-to-spec compression & magnetic gaskets for walk-ins, drawers, and more. . Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
99
+ },
100
+ parameters: {
101
+ docs: {
102
+ description: {
103
+ story: "Use this to observe wrapping and vertical spacing when descriptions become verbose"
104
+ }
105
+ }
106
+ }
107
+ };
108
+ export {
109
+ c as Gallery,
110
+ p as LongDescription,
111
+ r as Playground,
112
+ a as default
113
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { Icon as s } from "../../atoms/Icon/Icon.js";
2
+ import { Icon as m } from "../../atoms/Icon/Icon.js";
3
3
  import { Text as a } from "../../atoms/Text/Text.js";
4
4
  import { Link as u } from "../../atoms/Link/Link.js";
5
5
  import { Button as f } from "../../atoms/Button/Button.js";
@@ -7,40 +7,38 @@ import { Tooltip as g } from "../Tooltip/Tooltip.js";
7
7
  import { Pricing as v } from "../Pricing/Pricing.js";
8
8
  import { QuantityInput as w } from "../QuantityInput/QuantityInput.js";
9
9
  import { Availability as x } from "../Availability/Availability.js";
10
- import '../../assets/Cart.css';const b = "_cart_11wxn_2", y = "_count_11wxn_9", N = "_cartTooltip_11wxn_24", z = "_cartContainer_11wxn_27", C = "_cartItems_11wxn_35", k = "_topRow_11wxn_57", T = "_itemInfo_11wxn_63", R = "_purchaseInformation_11wxn_68", L = "_itemManagement_11wxn_75", M = "_removeItem_11wxn_93", P = "_noItems_11wxn_101", S = "_subtotal_11wxn_108", i = {
10
+ import '../../assets/Cart.css';const b = "_cart_11wxn_2", y = "_count_11wxn_9", N = "_cartTooltip_11wxn_24", C = "_cartContainer_11wxn_27", z = "_cartItems_11wxn_35", k = "_topRow_11wxn_57", T = "_itemInfo_11wxn_63", L = "_purchaseInformation_11wxn_68", M = "_itemManagement_11wxn_75", R = "_removeItem_11wxn_93", P = "_noItems_11wxn_101", S = "_subtotal_11wxn_108", i = {
11
11
  cart: b,
12
12
  count: y,
13
13
  cartTooltip: N,
14
- cartContainer: z,
15
- cartItems: C,
14
+ cartContainer: C,
15
+ cartItems: z,
16
16
  topRow: k,
17
17
  itemInfo: T,
18
- purchaseInformation: R,
19
- itemManagement: L,
20
- removeItem: M,
18
+ purchaseInformation: L,
19
+ itemManagement: M,
20
+ removeItem: R,
21
21
  noItems: P,
22
22
  subtotal: S
23
23
  };
24
- function O({
24
+ function U({
25
25
  cart: o,
26
- onItemQtyChange: m,
26
+ onItemQtyChange: s,
27
27
  onItemDelete: c,
28
28
  onCheckout: l,
29
29
  subtotal: r,
30
30
  contactHref: d,
31
- contactLinkBehavior: p,
32
- itemPriceLabel: h,
31
+ contactLinkBehavior: h,
32
+ itemPriceLabel: p,
33
33
  ..._
34
34
  }) {
35
35
  return o = o || { items: [] }, /* @__PURE__ */ t(
36
36
  g,
37
37
  {
38
38
  tooltipClassName: i.cartTooltip,
39
- repositionOnResize: !0,
40
- keepTooltipInside: !0,
41
39
  trigger: /* @__PURE__ */ n("button", { className: i.cart, tabIndex: 0, ..._, children: [
42
40
  /* @__PURE__ */ t(
43
- s,
41
+ m,
44
42
  {
45
43
  iconKey: "fa-kit fa-shoppingcart-empty",
46
44
  title: "Shopping Cart",
@@ -49,7 +47,7 @@ function O({
49
47
  ),
50
48
  o.items.length > 0 && /* @__PURE__ */ t("div", { className: i.count, children: /* @__PURE__ */ t(a, { size: "xxs", children: o.items.length }) })
51
49
  ] }),
52
- position: "bottom left",
50
+ placement: "bottom",
53
51
  on: "click",
54
52
  children: /* @__PURE__ */ n("div", { className: i.cartContainer, children: [
55
53
  /* @__PURE__ */ t(a, { size: "2xl", children: "Cart" }),
@@ -65,7 +63,7 @@ function O({
65
63
  e.itemId
66
64
  ] })
67
65
  ] }),
68
- /* @__PURE__ */ t("button", { onClick: () => c(e), className: i.removeItem, children: /* @__PURE__ */ t(s, { iconKey: "fa-regular fa-trash", size: "sm" }) })
66
+ /* @__PURE__ */ t("button", { onClick: () => c(e), className: i.removeItem, children: /* @__PURE__ */ t(m, { iconKey: "fa-regular fa-trash", size: "sm" }) })
69
67
  ] }),
70
68
  /* @__PURE__ */ n("div", { className: i.itemManagement, children: [
71
69
  /* @__PURE__ */ n("div", { className: i.purchaseInformation, children: [
@@ -75,12 +73,12 @@ function O({
75
73
  availId: e.availabilityId || "",
76
74
  availDescription: e.availability || "",
77
75
  contactHref: d || "",
78
- contactLinkBehavior: p || "new-tab"
76
+ contactLinkBehavior: h || "new-tab"
79
77
  }
80
78
  ),
81
- /* @__PURE__ */ t(v, { pricingLabel: h || "List Price", price: e.price })
79
+ /* @__PURE__ */ t(v, { pricingLabel: p || "List Price", price: e.price })
82
80
  ] }),
83
- /* @__PURE__ */ t(w, { quantity: e.quantity, onQuantityChange: (I) => m(e, I), size: "sm" })
81
+ /* @__PURE__ */ t(w, { quantity: e.quantity, onQuantityChange: (I) => s(e, I), size: "sm" })
84
82
  ] })
85
83
  ] })
86
84
  ] }, e.id)
@@ -95,5 +93,5 @@ function O({
95
93
  );
96
94
  }
97
95
  export {
98
- O as ShoppingCart
96
+ U as ShoppingCart
99
97
  };
@@ -28,7 +28,7 @@ function z({
28
28
  }
29
29
  )
30
30
  ] }) }),
31
- position: "bottom center",
31
+ placement: "bottom",
32
32
  children: /* @__PURE__ */ e("ul", { className: l.submenuTooltip, children: i.children.map((r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(s, { href: r.route, children: /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: r.label }) }) }, r.id)) })
33
33
  },
34
34
  i.id
@@ -1,11 +1,12 @@
1
1
  import { default as React } from 'react';
2
- import { PopupProps } from 'reactjs-popup/dist/types';
3
- /**
4
- * Tooltip component that wraps reactjs-popup's Popup,
5
- * applying consistent styling for all tooltips/popups.
6
- */
7
- export type TooltipProps = PopupProps & {
2
+ import { TippyProps } from '@tippyjs/react';
3
+ export type TooltipProps = Omit<TippyProps, "content" | "children" | "trigger"> & {
8
4
  tooltipClassName?: string;
9
5
  contentClassName?: string;
6
+ trigger: React.ReactElement;
7
+ on?: "click" | "mouseenter focus";
8
+ children: React.ReactNode;
9
+ mouseEnterDelay?: number;
10
+ mouseLeaveDelay?: number;
10
11
  };
11
- export declare const Tooltip: React.FC<TooltipProps>;
12
+ export declare function Tooltip({ tooltipClassName, contentClassName, trigger, children, on, mouseEnterDelay, mouseLeaveDelay, ...tippyProps }: TooltipProps): import("react/jsx-runtime").JSX.Element;