@caseparts-org/caseblocks 0.0.54 → 0.0.56

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,111 +1,113 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { Text as f } from "../../atoms/Text/Text.js";
3
- import { Link as p } from "../../atoms/Link/Link.js";
4
- import { Icon as w } from "../../atoms/Icon/Icon.js";
5
- import { Flex as a } from "../../atoms/Flex/Flex.js";
6
- import { Grid as D, Column as I } from "../../atoms/Grid/Grid.js";
7
- import { Logo as M } from "../../molecules/Logo/Logo.js";
8
- import { SearchBox as d } from "../../molecules/SearchBox/SearchBox.js";
9
- import { HamburgerMenu as U } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
10
- import { ShoppingCart as B } from "../../molecules/Cart/Cart.js";
11
- import { Account as F } from "../../molecules/Account/Account.js";
12
- import { CategoryNav as H } from "../../molecules/CategoryNav/CategoryNav.js";
13
- import { c as P } from "../../clsx-OuTLNxxd.js";
14
- import '../../assets/MainNav.css';const S = "_main_18fjz_1", G = "_column_18fjz_8", K = "_topNav_18fjz_13", Q = "_operations_18fjz_21", T = "_search_18fjz_28", W = "_siteLink_18fjz_31", q = "_accountArea_18fjz_35", E = "_category_18fjz_47", J = "_menuList_18fjz_69", i = {
15
- main: S,
16
- column: G,
17
- topNav: K,
18
- operations: Q,
19
- search: T,
20
- siteLink: W,
21
- accountArea: q,
22
- category: E,
23
- menuList: J
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { Text as p } from "../../atoms/Text/Text.js";
3
+ import { Link as m } from "../../atoms/Link/Link.js";
4
+ import { Icon as z } from "../../atoms/Icon/Icon.js";
5
+ import { Flex as t } from "../../atoms/Flex/Flex.js";
6
+ import { Grid as I, Column as M } from "../../atoms/Grid/Grid.js";
7
+ import { Logo as U } from "../../molecules/Logo/Logo.js";
8
+ import { SearchBox as f } from "../../molecules/SearchBox/SearchBox.js";
9
+ import { HamburgerMenu as B } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
10
+ import { ShoppingCart as F } from "../../molecules/Cart/Cart.js";
11
+ import { Account as H } from "../../molecules/Account/Account.js";
12
+ import { CategoryNav as P } from "../../molecules/CategoryNav/CategoryNav.js";
13
+ import { c as S } from "../../clsx-OuTLNxxd.js";
14
+ import '../../assets/MainNav.css';const G = "_main_1l043_1", K = "_column_1l043_8", Q = "_topNav_1l043_13", T = "_logo_1l043_21", W = "_operations_1l043_24", q = "_search_1l043_31", E = "_siteLink_1l043_34", J = "_accountArea_1l043_38", O = "_category_1l043_50", V = "_menuList_1l043_72", i = {
15
+ main: G,
16
+ column: K,
17
+ topNav: Q,
18
+ logo: T,
19
+ operations: W,
20
+ search: q,
21
+ siteLink: E,
22
+ accountArea: J,
23
+ category: O,
24
+ menuList: V
24
25
  };
25
26
  function ae({
26
- account: o,
27
+ account: l,
27
28
  categories: n,
28
29
  byModelSerialRoute: c,
29
- faqRoute: _,
30
- customPartsRoute: m,
31
- aboutUsRoute: u,
32
- accountRoute: N,
33
- contactRoute: s,
30
+ homeRoute: _,
31
+ faqRoute: u,
32
+ customPartsRoute: h,
33
+ aboutUsRoute: N,
34
+ accountRoute: g,
35
+ contactRoute: a,
34
36
  cart: v,
35
- cartSubtotal: g,
36
- cartItemPriceLabel: j,
37
- cartContactLinkBehavior: A,
38
- onLoginClick: L,
39
- onSearch: h,
40
- onItemQtyChange: x,
41
- onItemDelete: z,
42
- onItemEdit: C,
43
- onCheckout: k,
44
- className: y,
45
- ...b
37
+ cartSubtotal: A,
38
+ cartItemPriceLabel: L,
39
+ cartContactLinkBehavior: x,
40
+ onLoginClick: C,
41
+ onSearch: d,
42
+ onItemQtyChange: k,
43
+ onItemDelete: y,
44
+ onItemEdit: b,
45
+ onCheckout: w,
46
+ className: j,
47
+ ...D
46
48
  }) {
47
- return /* @__PURE__ */ e(D, { ...b, gridWrapperClassName: P(i.main, y), children: /* @__PURE__ */ t(I, { span: 12, className: i.column, children: [
48
- /* @__PURE__ */ t(
49
- a,
49
+ return /* @__PURE__ */ e(I, { ...D, gridWrapperClassName: S(i.main, j), children: /* @__PURE__ */ o(M, { span: 12, className: i.column, children: [
50
+ /* @__PURE__ */ o(
51
+ t,
50
52
  {
51
53
  flexDirection: "row",
52
54
  alignItems: "center",
53
55
  justifyContent: "space-between",
54
56
  className: i.topNav,
55
57
  children: [
56
- /* @__PURE__ */ e("div", { className: i.logo, children: /* @__PURE__ */ e(M, {}) }),
57
- /* @__PURE__ */ t(
58
- a,
58
+ /* @__PURE__ */ e("div", { className: i.logo, children: /* @__PURE__ */ e(m, { href: _, children: /* @__PURE__ */ e(U, {}) }) }),
59
+ /* @__PURE__ */ o(
60
+ t,
59
61
  {
60
62
  flexDirection: "row",
61
63
  alignItems: "center",
62
64
  justifyContent: "flex-end",
63
65
  className: i.operations,
64
66
  children: [
65
- /* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: /* @__PURE__ */ e(d, { onSearch: h, inputName: "cpc-search" }) }),
67
+ /* @__PURE__ */ e(t, { flexDirection: "row", hideAt: ["sm"], className: i.search, children: /* @__PURE__ */ e(f, { onSearch: d, inputName: "cpc-search" }) }),
66
68
  /* @__PURE__ */ e(r, { href: c, hideAt: ["sm", "md"], children: "Model/Serial" }),
67
- /* @__PURE__ */ e(r, { href: m, hideAt: ["sm", "md"], children: "Custom Parts" }),
68
- /* @__PURE__ */ e(r, { href: s, hideAt: ["sm", "md"], children: "Contact Us" }),
69
+ /* @__PURE__ */ e(r, { href: h, hideAt: ["sm", "md"], children: "Custom Parts" }),
70
+ /* @__PURE__ */ e(r, { href: a, hideAt: ["sm", "md"], children: "Contact Us" }),
69
71
  /* @__PURE__ */ e("div", { className: i.accountArea, children: /* @__PURE__ */ e(
70
- F,
72
+ H,
71
73
  {
72
- account: o,
73
- accountRoute: N,
74
- onLoginClick: L,
74
+ account: l,
75
+ accountRoute: g,
76
+ onLoginClick: C,
75
77
  className: i.avatar
76
78
  }
77
79
  ) }),
78
80
  /* @__PURE__ */ e(
79
- B,
81
+ F,
80
82
  {
81
83
  cart: v,
82
- onItemDelete: z,
83
- onItemEdit: C,
84
- onItemQtyChange: x,
85
- onCheckout: k,
86
- subtotal: g,
87
- contactHref: s,
88
- contactLinkBehavior: A,
89
- itemPriceLabel: j
84
+ onItemDelete: y,
85
+ onItemEdit: b,
86
+ onItemQtyChange: k,
87
+ onCheckout: w,
88
+ subtotal: A,
89
+ contactHref: a,
90
+ contactLinkBehavior: x,
91
+ itemPriceLabel: L
90
92
  }
91
93
  ),
92
- /* @__PURE__ */ e(U, { hideAt: ["lg"], children: /* @__PURE__ */ t("ul", { className: i.menuList, children: [
94
+ /* @__PURE__ */ e(B, { hideAt: ["lg"], children: /* @__PURE__ */ o("ul", { className: i.menuList, children: [
93
95
  /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: c, children: "Make/Serial" }) }),
94
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: m, children: "Custom Parts" }) }),
95
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: s, children: "Contact Us" }) }),
96
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: _, children: "FAQ" }) }),
97
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: u, children: "About Us" }) }),
98
- n && n.map((l) => /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ t(p, { href: l.route, children: [
99
- /* @__PURE__ */ e(f, { size: "sm", weight: "semibold", children: l.label }),
96
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: h, children: "Custom Parts" }) }),
97
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: a, children: "Contact Us" }) }),
98
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: u, children: "FAQ" }) }),
99
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(r, { href: N, children: "About Us" }) }),
100
+ n && n.map((s) => /* @__PURE__ */ e("li", { className: i.category, children: /* @__PURE__ */ o(m, { href: s.route, children: [
101
+ /* @__PURE__ */ e(p, { size: "sm", weight: "semibold", children: s.label }),
100
102
  /* @__PURE__ */ e(
101
- w,
103
+ z,
102
104
  {
103
105
  iconKey: "fa-solid fa-chevron-right",
104
106
  title: "Navigate",
105
107
  size: "sm"
106
108
  }
107
109
  )
108
- ] }) }, l.id))
110
+ ] }) }, s.id))
109
111
  ] }) })
110
112
  ]
111
113
  }
@@ -113,16 +115,16 @@ function ae({
113
115
  ]
114
116
  }
115
117
  ),
116
- /* @__PURE__ */ e(a, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(d, { onSearch: h, inputName: "cpc-search", className: i.search }) }),
117
- /* @__PURE__ */ e(H, { categories: n })
118
+ /* @__PURE__ */ e(t, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(f, { onSearch: d, inputName: "cpc-search", className: i.search }) }),
119
+ /* @__PURE__ */ e(P, { categories: n })
118
120
  ] }) });
119
121
  }
120
122
  function r({
121
- href: o,
123
+ href: l,
122
124
  children: n,
123
125
  ...c
124
126
  }) {
125
- return /* @__PURE__ */ e(p, { href: o, className: i.siteLink, ...c, children: /* @__PURE__ */ e(f, { size: "md", variant: "display", children: n }) });
127
+ return /* @__PURE__ */ e(m, { href: l, className: i.siteLink, ...c, children: /* @__PURE__ */ e(p, { size: "md", variant: "display", children: n }) });
126
128
  }
127
129
  export {
128
130
  ae as MainNav
@@ -103,6 +103,7 @@ const r = {
103
103
  number: "123456789012"
104
104
  },
105
105
  cart: i,
106
+ homeRoute: "/",
106
107
  customPartsRoute: "/custom",
107
108
  accountRoute: "/account",
108
109
  byModelSerialRoute: "/model",
@@ -137,6 +138,7 @@ const r = {
137
138
  number: "123456789012"
138
139
  },
139
140
  cart: i,
141
+ homeRoute: "/",
140
142
  customPartsRoute: "/custom",
141
143
  accountRoute: "/account",
142
144
  byModelSerialRoute: "/model",
@@ -166,6 +168,7 @@ const r = {
166
168
  }, d = {
167
169
  args: {
168
170
  cart: i,
171
+ homeRoute: "/",
169
172
  customPartsRoute: "/custom",
170
173
  accountRoute: "/account",
171
174
  byModelSerialRoute: "/model",
@@ -0,0 +1,11 @@
1
+ export interface NotFoundProps {
2
+ primaryLinkButtonProps: {
3
+ label: string;
4
+ href: string;
5
+ };
6
+ secondaryLinkButtonProps: {
7
+ label: string;
8
+ href: string;
9
+ };
10
+ }
11
+ export declare function NotFound({ primaryLinkButtonProps, secondaryLinkButtonProps }: NotFoundProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { Image as t } from "../../atoms/Image/Image.js";
3
+ import { Text as n } from "../../atoms/Text/Text.js";
4
+ import { LinkButton as l } from "../../atoms/LinkButton/LinkButton.js";
5
+ import { Flex as a } from "../../atoms/Flex/Flex.js";
6
+ import { c } from "../../clsx-OuTLNxxd.js";
7
+ import '../../assets/NotFound.css';const m = "_main_1dfh4_1", d = "_column_1dfh4_10", h = "_description_1dfh4_14", f = "_header_1dfh4_19", _ = "_links_1dfh4_24", i = {
8
+ main: m,
9
+ column: d,
10
+ description: h,
11
+ header: f,
12
+ links: _
13
+ };
14
+ function z({ primaryLinkButtonProps: r, secondaryLinkButtonProps: o }) {
15
+ return /* @__PURE__ */ s(a, { flexDirection: "row", alignItems: "center", justifyContent: "center", className: i.main, children: [
16
+ /* @__PURE__ */ e("div", { className: i.column, children: /* @__PURE__ */ e(t, { src: "/assets/not-found.png", alt: "Not found image" }) }),
17
+ /* @__PURE__ */ s("div", { className: c(i.description, i.column), children: [
18
+ /* @__PURE__ */ e(n, { size: "6xl", variant: "display", as: "h1", className: i.header, children: "404" }),
19
+ /* @__PURE__ */ s(n, { size: "xl", children: [
20
+ "Oops! Well this is embarrassing...",
21
+ /* @__PURE__ */ e("br", {}),
22
+ "what you're looking for is missing or something is on the fritz."
23
+ ] }),
24
+ /* @__PURE__ */ e(n, { size: "xl", children: "Don't worry—for assistance call us at 1-800-421-0271" }),
25
+ /* @__PURE__ */ s("div", { className: i.links, children: [
26
+ /* @__PURE__ */ e(l, { variant: "primary", size: "md", href: r.href, children: r.label }),
27
+ /* @__PURE__ */ e(l, { variant: "secondary", size: "md", href: o.href, children: o.label })
28
+ ] })
29
+ ] })
30
+ ] });
31
+ }
32
+ export {
33
+ z as NotFound
34
+ };
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { NotFound } from './NotFound';
3
+ declare const meta: Meta<typeof NotFound>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Playground: Story;
7
+ export declare const SupportFocused: Story;
@@ -0,0 +1,65 @@
1
+ import { NotFound as o } from "./NotFound.js";
2
+ const e = {
3
+ title: "Case Parts/Organisms/NotFound",
4
+ component: o,
5
+ tags: ["autodocs"],
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: [
10
+ "A presentational 404 style page section that shows a friendly message,",
11
+ "an illustration image, and two prominent calls-to-action implemented with",
12
+ `LinkButton components.
13
+ `,
14
+ `
15
+ Usage notes:`,
16
+ `
17
+ - Use this component on routes that are not found or content that is missing.`,
18
+ `
19
+ - Provide meaningful primary and secondary actions to help the user recover.`,
20
+ `
21
+ - Keep labels concise (ideally 2–3 words).`
22
+ ].join(" ")
23
+ }
24
+ }
25
+ },
26
+ argTypes: {
27
+ primaryLinkButtonProps: {
28
+ control: "object",
29
+ description: "Primary call-to-action link button (e.g., Go Home). Provide a { label, href } object.",
30
+ table: {
31
+ type: { summary: "{ label: string; href: string }" }
32
+ }
33
+ },
34
+ secondaryLinkButtonProps: {
35
+ control: "object",
36
+ description: "Secondary link button (e.g., Contact Support). Provide a { label, href } object.",
37
+ table: {
38
+ type: { summary: "{ label: string; href: string }" }
39
+ }
40
+ }
41
+ },
42
+ args: {
43
+ primaryLinkButtonProps: { label: "Return Home to CaseParts.com", href: "/" },
44
+ secondaryLinkButtonProps: { label: "Sign In or Go to My Account", href: "/account" }
45
+ }
46
+ }, n = {
47
+ name: "Playground"
48
+ }, r = {
49
+ args: {
50
+ primaryLinkButtonProps: { label: "Search Products", href: "/search" },
51
+ secondaryLinkButtonProps: { label: "Support", href: "/support" }
52
+ },
53
+ parameters: {
54
+ docs: {
55
+ description: {
56
+ story: "Variant emphasizing a support-oriented recovery path."
57
+ }
58
+ }
59
+ }
60
+ };
61
+ export {
62
+ n as Playground,
63
+ r as SupportFocused,
64
+ e as default
65
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.54",
4
+ "version": "0.0.56",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._button_1fy9r_1{--inset-shadow-color: var(--surface-surface-primary-btn);--inset-shadow-style: 0 0 0, inset 0 0 0 var(--spacing-0-125) var(--inset-shadow-color);transition-property:background-color,border-width,box-shadow,color;transition-duration:.1s;transition-timing-function:ease-in;padding:var(--spacing-1);border:none;cursor:pointer}._button_1fy9r_1:hover{box-shadow:var(--color-neutrals-neutral-2) var(--spacing-0-125) var(--spacing-0-25) var(--spacing-0-5)}._button_1fy9r_1:active{box-shadow:none}._button_1fy9r_1:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert);transition:none;cursor:default}._button_1fy9r_1:disabled:hover{box-shadow:none}._button-primary_1fy9r_36{background-color:var(--surface-surface-primary-btn);color:var(--surface-surface-primary)}._button-primary_1fy9r_36:active{background-color:var(--color-brand-secondary-dark-teal-blue)}._button-primary_1fy9r_36:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-secondary_1fy9r_50{background-color:var(--surface-surface-secondary-btn);border:1px solid var(--border-border-secondary-btn);color:var(--text-text-links)}._button-secondary_1fy9r_50:active{--inset-shadow-color: var(--surface-surface-secondary);box-shadow:var(--inset-shadow-style)}._button-secondary_1fy9r_50:disabled{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-secondary_1fy9r_50:disabled:hover{box-shadow:var(--inset-shadow-style)}._button-cta-primary_1fy9r_72{background-color:var(--surface-surface-call-to-action-btn);color:var(--surface-surface-primary)}._button-cta-primary_1fy9r_72:active{background-color:var(--surface-surface-call-to-action-btn-focus)}._button-cta-primary_1fy9r_72:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-tertiary_1fy9r_86{background-color:var(--surface-surface-tertiary-btn);color:var(--surface-surface-tertiary-btn-focus)}._button-tertiary_1fy9r_86:active{color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-tertiary_1fy9r_86:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-destructive_1fy9r_104{background-color:var(--surface-surface-error-warning-btn);color:var(--surface-surface-primary)}._button-destructive_1fy9r_104:active{color:var(--surface-surface-error-warning-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--border-border-error-warning);box-shadow:var(--inset-shadow-style)}._button-destructive_1fy9r_104:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-size-xxs_1fy9r_122{border-radius:var(--border-radius-xs);padding:var(--spacing-spacing-4xs) var(--spacing-spacing-4xs)}._button-size-xs_1fy9r_126{border-radius:var(--border-radius-xs);padding:calc(var(--spacing-spacing-4xs) - 1px) var(--spacing-spacing-2xs)}._button-size-sm_1fy9r_130{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-3xs) - 1px) var(--spacing-0-75)}._button-size-md_1fy9r_134,._button-size-lg_1fy9r_138{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-2xs) - 1px) var(--spacing-spacing-default)}._button-size-xl_1fy9r_142{border-radius:var(--border-radius-sm);padding:var(--spacing-0-75) var(--spacing-spacing-default)}