@caseparts-org/caseblocks 0.0.108 → 0.0.110

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
- ._loggedIn_1uin2_1{flex-shrink:0;gap:var(--spacing-0-25)}
1
+ ._loggedIn_1aoh3_1{flex-shrink:0;gap:var(--spacing-spacing-2xs);cursor:pointer;transition:all .3s linear;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:var(--spacing-spacing-3xs)}._customer_1aoh3_12>a,._customer_1aoh3_12>a:hover{text-decoration:none}._loggedIn_1aoh3_1:hover{background-color:#f3f3f3;border-radius:var(--border-radius-md)}
@@ -1 +1 @@
1
- ._avatar_vwzwk_1{margin:10px;position:relative;background-color:var(--icons-icon-secondary);color:var(--text-text-invert);flex-shrink:0;border-radius:50%;width:28px;height:28px;text-align:center;text-transform:uppercase;cursor:pointer}
1
+ ._avatar_nvnsd_1{position:relative;background-color:var(--icons-icon-secondary);color:var(--text-text-invert);flex-shrink:0;border-radius:50%;width:28px;height:28px;text-align:center;text-transform:uppercase;cursor:pointer}
@@ -4,6 +4,8 @@ export type { HorizontalScrollProps } from './atoms/HorizontalScroll/HorizontalS
4
4
  export { SlideInPanel } from './atoms/SlideInPanel/SlideInPanel';
5
5
  export type { SlideInPanelProps } from './atoms/SlideInPanel/SlideInPanel';
6
6
  export { Tooltip } from './atoms/Tooltip/Tooltip';
7
+ export { Popover } from './atoms/Popover/Popover';
8
+ export type { PopoverProps } from './atoms/Popover/Popover';
7
9
  export { Account } from './molecules/Account/Account';
8
10
  export type { AccountProps } from './molecules/Account/Account';
9
11
  export { Chip } from './molecules/Chip/Chip';
@@ -1,4 +1,4 @@
1
- import { Button as t } from "./atoms/Button/Button.js";
1
+ import { Button as e } from "./atoms/Button/Button.js";
2
2
  import { Flex as p } from "./atoms/Flex/Flex.js";
3
3
  import { Column as f, Grid as x } from "./atoms/Grid/Grid.js";
4
4
  import { Head as n } from "./atoms/Root/Head.js";
@@ -7,9 +7,9 @@ import { Root as d } from "./atoms/Root/Root.js";
7
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 B } from "./atoms/Input/Input.js";
10
- import { Link as A } from "./atoms/Link/Link.js";
11
- import { linkClassName as h } from "./atoms/Link/linkClassName.js";
12
- import { configureLink as v, routerOverride as P } from "./atoms/Link/configureLink.js";
10
+ import { Link as v } from "./atoms/Link/Link.js";
11
+ import { linkClassName as L } from "./atoms/Link/linkClassName.js";
12
+ import { configureLink as h, routerOverride as s } from "./atoms/Link/configureLink.js";
13
13
  import { LinkButton as F } from "./atoms/LinkButton/LinkButton.js";
14
14
  import { configureImage as b } from "./atoms/Image/configureImage.js";
15
15
  import { Logo as H } from "./molecules/Logo/Logo.js";
@@ -24,46 +24,48 @@ import { Breadcrumbs as W } from "./molecules/Breadcrumbs/Breadcrumbs.js";
24
24
  import { NotFound as Y } from "./organisms/NotFound/NotFound.js";
25
25
  import { HorizontalScroll as _ } from "./atoms/HorizontalScroll/HorizontalScroll.js";
26
26
  import { SlideInPanel as oo } from "./atoms/SlideInPanel/SlideInPanel.js";
27
- import { Tooltip as to } from "./atoms/Tooltip/Tooltip.js";
28
- import { Account as po } from "./molecules/Account/Account.js";
29
- import { Chip as fo } from "./molecules/Chip/Chip.js";
30
- import { ToggleView as ao } from "./molecules/ToggleView/ToggleView.js";
31
- import { CartSlideInPanel as io } from "./molecules/Cart/CartSlideInPanel.js";
32
- import { StatefulButton as uo } from "./molecules/StatefulButton/StatefulButton.js";
33
- import { AnimatedCheckMark as Co } from "./molecules/StatefulButton/AnimatedCheckmark.js";
34
- import { AddToCart as ko } from "./molecules/AddToCart/AddToCart.js";
35
- import { MainNav as Bo } from "./organisms/MainNav/MainNav.js";
36
- import { ChipSelector as Ao } from "./organisms/ChipSelector/ChipSelector.js";
27
+ import { Tooltip as eo } from "./atoms/Tooltip/Tooltip.js";
28
+ import { Popover as po } from "./atoms/Popover/Popover.js";
29
+ import { Account as fo } from "./molecules/Account/Account.js";
30
+ import { Chip as ao } from "./molecules/Chip/Chip.js";
31
+ import { ToggleView as io } from "./molecules/ToggleView/ToggleView.js";
32
+ import { CartSlideInPanel as uo } from "./molecules/Cart/CartSlideInPanel.js";
33
+ import { StatefulButton as Co } from "./molecules/StatefulButton/StatefulButton.js";
34
+ import { AnimatedCheckMark as ko } from "./molecules/StatefulButton/AnimatedCheckmark.js";
35
+ import { AddToCart as Bo } from "./molecules/AddToCart/AddToCart.js";
36
+ import { MainNav as vo } from "./organisms/MainNav/MainNav.js";
37
+ import { ChipSelector as Lo } from "./organisms/ChipSelector/ChipSelector.js";
37
38
  import { Product as ho } from "./organisms/Product/Product.js";
38
- import { Carousel as vo } from "./organisms/Carousel/Carousel.js";
39
- import { Footer as To } from "./organisms/Footer/Footer.js";
39
+ import { Carousel as To } from "./organisms/Carousel/Carousel.js";
40
+ import { Footer as No } from "./organisms/Footer/Footer.js";
40
41
  export {
41
- po as Account,
42
- ko as AddToCart,
43
- Co as AnimatedCheckMark,
42
+ fo as Account,
43
+ Bo as AddToCart,
44
+ ko as AnimatedCheckMark,
44
45
  V as Availability,
45
46
  q as Avatar,
46
47
  E as BannerCard,
47
48
  W as Breadcrumbs,
48
- t as Button,
49
+ e as Button,
49
50
  K as CardLink,
50
- vo as Carousel,
51
- io as CartSlideInPanel,
52
- fo as Chip,
53
- Ao as ChipSelector,
51
+ To as Carousel,
52
+ uo as CartSlideInPanel,
53
+ ao as Chip,
54
+ Lo as ChipSelector,
54
55
  f as Column,
55
56
  p as Flex,
56
- To as Footer,
57
+ No as Footer,
57
58
  x as Grid,
58
59
  n as Head,
59
60
  _ as HorizontalScroll,
60
61
  l as Icon,
61
62
  B as Input,
62
- A as Link,
63
+ v as Link,
63
64
  F as LinkButton,
64
65
  H as Logo,
65
- Bo as MainNav,
66
+ vo as MainNav,
66
67
  Y as NotFound,
68
+ po as Popover,
67
69
  Q as Pricing,
68
70
  ho as Product,
69
71
  G as QuantityInput,
@@ -71,12 +73,12 @@ export {
71
73
  w as SearchBox,
72
74
  C as Separator,
73
75
  oo as SlideInPanel,
74
- uo as StatefulButton,
76
+ Co as StatefulButton,
75
77
  k as Text,
76
- ao as ToggleView,
77
- to as Tooltip,
78
+ io as ToggleView,
79
+ eo as Tooltip,
78
80
  b as configureImage,
79
- v as configureLink,
80
- h as linkClassName,
81
- P as routerOverride
81
+ h as configureLink,
82
+ L as linkClassName,
83
+ s as routerOverride
82
84
  };
@@ -10,7 +10,8 @@ export interface AccountProps extends React.HTMLAttributes<HTMLDivElement>, Hide
10
10
  /** The account user's initials. */
11
11
  initials: string;
12
12
  };
13
- accountRoute: string;
14
13
  onLoginClick: () => void;
14
+ /** Optional content to show when clicking the authenticated container */
15
+ popoverContent?: React.ReactNode;
15
16
  }
16
17
  export declare function Account(props: AccountProps): import("react/jsx-runtime").JSX.Element;
@@ -1,91 +1,124 @@
1
- import { jsx as i, jsxs as n } from "react/jsx-runtime";
2
- import { getHideAtStyles as d } from "../../atoms/HideAt.js";
1
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ import { getHideAtStyles as c } from "../../atoms/HideAt.js";
3
3
  import { Icon as f } from "../../atoms/Icon/Icon.js";
4
- import { Text as a } from "../../atoms/Text/Text.js";
4
+ import { Text as m } from "../../atoms/Text/Text.js";
5
5
  import { Avatar as h } from "../Avatar/Avatar.js";
6
- import { Flex as s } from "../../atoms/Flex/Flex.js";
7
- import { Button as x } from "../../atoms/Button/Button.js";
8
- import { c as u } from "../../clsx-OuTLNxxd.js";
9
- import { Link as A } from "../../atoms/Link/Link.js";
10
- import '../../assets/Account.css';const p = "_loggedIn_1uin2_1", l = {
11
- loggedIn: p
6
+ import { Flex as a } from "../../atoms/Flex/Flex.js";
7
+ import { Button as u } from "../../atoms/Button/Button.js";
8
+ import { Popover as p } from "../../atoms/Popover/Popover.js";
9
+ import { c as d } from "../../clsx-OuTLNxxd.js";
10
+ import '../../assets/Account.css';const x = "_loggedIn_1aoh3_1", A = "_customer_1aoh3_12", o = {
11
+ loggedIn: x,
12
+ customer: A
12
13
  };
13
- function I(e) {
14
- return e.account !== void 0;
14
+ function I(i) {
15
+ return i.account !== void 0;
15
16
  }
16
- function w(e) {
17
- return I(e) ? /* @__PURE__ */ i(k, { ...e }) : /* @__PURE__ */ i(y, { ...e });
17
+ function P(i) {
18
+ return I(i) ? /* @__PURE__ */ t(v, { ...i }) : /* @__PURE__ */ t(k, { ...i });
18
19
  }
19
- function k(e) {
20
+ function v(i) {
20
21
  const {
21
- account: t,
22
- accountRoute: o,
23
- onLoginClick: m,
22
+ account: e,
24
23
  className: r,
25
- hideAt: c,
24
+ hideAt: s,
25
+ popoverContent: l,
26
26
  ...g
27
- } = e;
28
- return /* @__PURE__ */ n(
29
- s,
27
+ } = i;
28
+ return l ? /* @__PURE__ */ t(
29
+ p,
30
30
  {
31
- flexDirection: "row",
32
- alignItems: "center",
33
- className: u(l.loggedIn, d(c), r),
31
+ position: "bottom right",
32
+ trigger: /* @__PURE__ */ n(
33
+ "div",
34
+ {
35
+ className: d(o.loggedIn, c(s), r),
36
+ ...g,
37
+ children: [
38
+ /* @__PURE__ */ n(
39
+ a,
40
+ {
41
+ flexDirection: "column",
42
+ alignItems: "flex-end",
43
+ hideAt: ["sm", "md"],
44
+ className: o.customer,
45
+ children: [
46
+ /* @__PURE__ */ n(m, { size: "xxs", children: [
47
+ "Acct: ",
48
+ e == null ? void 0 : e.number
49
+ ] }),
50
+ /* @__PURE__ */ n(m, { size: "sm", variant: "display", colorToken: "links", children: [
51
+ "Hello ",
52
+ e == null ? void 0 : e.name
53
+ ] })
54
+ ]
55
+ }
56
+ ),
57
+ /* @__PURE__ */ t(h, { initials: e.initials })
58
+ ]
59
+ }
60
+ ),
61
+ children: l
62
+ }
63
+ ) : /* @__PURE__ */ n(
64
+ "div",
65
+ {
66
+ className: d(o.loggedIn, c(s), r),
34
67
  ...g,
35
68
  children: [
36
69
  /* @__PURE__ */ n(
37
- s,
70
+ a,
38
71
  {
39
72
  flexDirection: "column",
40
73
  alignItems: "flex-end",
41
74
  hideAt: ["sm", "md"],
42
- className: l.customer,
75
+ className: o.customer,
43
76
  children: [
44
- /* @__PURE__ */ n(a, { size: "xxs", children: [
77
+ /* @__PURE__ */ n(m, { size: "xxs", children: [
45
78
  "Acct: ",
46
- t == null ? void 0 : t.number
79
+ e == null ? void 0 : e.number
47
80
  ] }),
48
- /* @__PURE__ */ i(A, { href: o, children: /* @__PURE__ */ n(a, { size: "sm", variant: "display", children: [
81
+ /* @__PURE__ */ n(m, { size: "sm", variant: "display", colorToken: "links", children: [
49
82
  "Hello ",
50
- t == null ? void 0 : t.name
51
- ] }) })
83
+ e == null ? void 0 : e.name
84
+ ] })
52
85
  ]
53
86
  }
54
87
  ),
55
- /* @__PURE__ */ i(h, { initials: t.initials, accountRoute: o })
88
+ /* @__PURE__ */ t(h, { initials: e.initials })
56
89
  ]
57
90
  }
58
91
  );
59
92
  }
60
- function y(e) {
61
- const { accountRoute: t, onLoginClick: o, className: m, hideAt: r, ...c } = e;
93
+ function k(i) {
94
+ const { onLoginClick: e, className: r, hideAt: s, ...l } = i;
62
95
  return /* @__PURE__ */ n(
63
- s,
96
+ a,
64
97
  {
65
98
  flexDirection: "row",
66
99
  alignItems: "center",
67
- ...c,
68
- className: u(
69
- l.unauthenticated,
70
- d(r),
71
- m
100
+ ...l,
101
+ className: d(
102
+ o.unauthenticated,
103
+ c(s),
104
+ r
72
105
  ),
73
106
  children: [
74
- /* @__PURE__ */ i(
75
- x,
107
+ /* @__PURE__ */ t(
108
+ u,
76
109
  {
77
- onClick: o,
110
+ onClick: e,
78
111
  size: "sm",
79
112
  variant: "primary",
80
113
  hideAt: ["sm", "md"],
81
114
  children: "Sign In / Register"
82
115
  }
83
116
  ),
84
- /* @__PURE__ */ i(f, { iconKey: "fa-kit fa-user-anon", size: "lg", hideAt: "lg" })
117
+ /* @__PURE__ */ t(f, { iconKey: "fa-kit fa-user-anon", size: "lg", hideAt: "lg" })
85
118
  ]
86
119
  }
87
120
  );
88
121
  }
89
122
  export {
90
- w as Account
123
+ P as Account
91
124
  };
@@ -1,5 +1,5 @@
1
1
  import { Account as t } from "./Account.js";
2
- const c = {
2
+ const o = {
3
3
  title: "Case Parts/Molecules/Account",
4
4
  component: t,
5
5
  parameters: {
@@ -8,9 +8,8 @@ const c = {
8
8
  },
9
9
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
10
10
  tags: ["autodocs"]
11
- }, n = {
11
+ }, e = {
12
12
  args: {
13
- accountRoute: "/account",
14
13
  onLoginClick: () => {
15
14
  }
16
15
  }
@@ -21,13 +20,12 @@ const c = {
21
20
  initials: "RS",
22
21
  number: "123456789012"
23
22
  },
24
- accountRoute: "/account",
25
23
  onLoginClick: () => {
26
24
  }
27
25
  }
28
26
  };
29
27
  export {
30
28
  a as Authenticated,
31
- n as Unauthenticated,
32
- c as default
29
+ e as Unauthenticated,
30
+ o as default
33
31
  };
@@ -2,6 +2,5 @@ import { HideAtProps } from '../../atoms/HideAt';
2
2
  export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement>, HideAtProps {
3
3
  /** The user's initials (2 characters) */
4
4
  initials: string;
5
- accountRoute: string;
6
5
  }
7
6
  export declare function Avatar(props: AvatarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,32 +1,31 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { Flex as m } from "../../atoms/Flex/Flex.js";
3
- import { Link as c } from "../../atoms/Link/Link.js";
4
- import { getHideAtStyles as l } from "../../atoms/HideAt.js";
5
- import { c as f } from "../../clsx-OuTLNxxd.js";
6
- import { t as r } from "../../Text.module-Dzhzk2fH.js";
7
- import '../../assets/Avatar.css';const p = "_avatar_vwzwk_1", x = {
8
- avatar: p
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Flex as n } from "../../atoms/Flex/Flex.js";
3
+ import { getHideAtStyles as m } from "../../atoms/HideAt.js";
4
+ import { c } from "../../clsx-OuTLNxxd.js";
5
+ import { t } from "../../Text.module-Dzhzk2fH.js";
6
+ import '../../assets/Avatar.css';const l = "_avatar_nvnsd_1", f = {
7
+ avatar: l
9
8
  };
10
- function w(e) {
11
- const { accountRoute: a, initials: o, className: s, hideAt: i, ...n } = e;
12
- return /* @__PURE__ */ t(c, { href: a, children: /* @__PURE__ */ t(
13
- m,
9
+ function u(r) {
10
+ const { initials: e, className: a, hideAt: s, ...i } = r;
11
+ return /* @__PURE__ */ o(
12
+ n,
14
13
  {
15
14
  flexDirection: "row",
16
15
  alignItems: "center",
17
16
  justifyContent: "center",
18
- className: f(
19
- x.avatar,
20
- r["text-display"],
21
- r["text-md"],
22
- l(i),
23
- s
17
+ className: c(
18
+ f.avatar,
19
+ t["text-display"],
20
+ t["text-md"],
21
+ m(s),
22
+ a
24
23
  ),
25
- ...n,
26
- children: o.substring(0, 2)
24
+ ...i,
25
+ children: e.substring(0, 2)
27
26
  }
28
- ) });
27
+ );
29
28
  }
30
29
  export {
31
- w as Avatar
30
+ u as Avatar
32
31
  };
@@ -10,8 +10,7 @@ const e = {
10
10
  tags: ["autodocs"]
11
11
  }, o = {
12
12
  args: {
13
- initials: "RS",
14
- accountRoute: "/account"
13
+ initials: "RS"
15
14
  }
16
15
  };
17
16
  export {
@@ -8,12 +8,13 @@ export interface MainNavProps extends CartPropsBase, React.HTMLAttributes<HTMLDi
8
8
  faqRoute: string;
9
9
  customPartsRoute: string;
10
10
  aboutUsRoute: string;
11
- accountRoute: string;
12
11
  contactRoute: string;
13
12
  cart: ShoppingCart;
14
13
  onLoginClick: () => void;
15
14
  onSearch: (_input: string) => void;
16
15
  onClickModelSerial: () => void;
16
+ /** Content shown in the account popover when authenticated */
17
+ accountPopoverContent?: React.ReactNode;
17
18
  }
18
19
  export type MainNavHandle = ShoppingCartHandle;
19
20
  export declare const MainNav: React.ForwardRefExoticComponent<MainNavProps & React.RefAttributes<ShoppingCartHandle>>;
@@ -31,19 +31,19 @@ import '../../assets/MainNav.css';const G = "_main_19pdr_1", K = "_column_19pdr_
31
31
  faqRoute: v,
32
32
  customPartsRoute: d,
33
33
  aboutUsRoute: A,
34
- accountRoute: L,
35
34
  contactRoute: h,
36
- cart: x,
37
- open: C,
35
+ cart: L,
36
+ open: x,
38
37
  // consume external panel control props from CartPropsBase
39
- className: k,
40
- onLoginClick: y,
38
+ className: C,
39
+ onLoginClick: k,
41
40
  onSearch: p,
42
41
  onClickModelSerial: f,
43
- onCartClick: b,
42
+ onCartClick: y,
43
+ accountPopoverContent: b,
44
44
  ...w
45
45
  }, j) {
46
- return /* @__PURE__ */ e(z, { ...w, gridWrapperClassName: s(r.main, k), children: /* @__PURE__ */ o(I, { span: 12, className: r.column, children: [
46
+ return /* @__PURE__ */ e(z, { ...w, gridWrapperClassName: s(r.main, C), children: /* @__PURE__ */ o(I, { span: 12, className: r.column, children: [
47
47
  /* @__PURE__ */ o(
48
48
  t,
49
49
  {
@@ -69,18 +69,18 @@ import '../../assets/MainNav.css';const G = "_main_19pdr_1", K = "_column_19pdr_
69
69
  H,
70
70
  {
71
71
  account: c,
72
- accountRoute: L,
73
- onLoginClick: y,
74
- className: r.avatar
72
+ onLoginClick: k,
73
+ className: r.avatar,
74
+ popoverContent: b
75
75
  }
76
76
  ) }),
77
77
  /* @__PURE__ */ e(
78
78
  F,
79
79
  {
80
80
  ref: j,
81
- cart: x,
82
- open: C,
83
- onCartClick: b
81
+ cart: L,
82
+ open: x,
83
+ onCartClick: y
84
84
  }
85
85
  ),
86
86
  /* @__PURE__ */ e(U, { hideAt: ["lg"], children: /* @__PURE__ */ o("ul", { className: r.menuList, children: [
@@ -1,16 +1,19 @@
1
- import { jsxs as u, Fragment as s, jsx as c } from "react/jsx-runtime";
2
- import { useState as b } from "react";
3
- import { MainNav as d } from "./MainNav.js";
4
- import { CartSlideInPanel as m } from "../../molecules/Cart/CartSlideInPanel.js";
5
- const I = {
1
+ import { jsxs as u, Fragment as h, jsx as i } from "react/jsx-runtime";
2
+ import { useState as p } from "react";
3
+ import { MainNav as b } from "./MainNav.js";
4
+ import { Text as d } from "../../atoms/Text/Text.js";
5
+ import { Link as s } from "../../atoms/Link/Link.js";
6
+ import { Button as v } from "../../atoms/Button/Button.js";
7
+ import { CartSlideInPanel as g } from "../../molecules/Cart/CartSlideInPanel.js";
8
+ const U = {
6
9
  title: "Case Parts/Organisms/MainNav",
7
- component: d,
10
+ component: b,
8
11
  parameters: {
9
12
  // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
10
13
  layout: "fullscreen"
11
14
  }
12
15
  // tags: ["autodocs"],
13
- }, o = [
16
+ }, r = [
14
17
  {
15
18
  id: 0,
16
19
  label: "Shop by Brands",
@@ -103,7 +106,7 @@ const I = {
103
106
  route: "#",
104
107
  children: []
105
108
  }
106
- ], a = "https://m.media-amazon.com/images/I/216+JEttsYL._UF1000,1000_QL80_.jpg", r = {
109
+ ], a = "https://m.media-amazon.com/images/I/216+JEttsYL._UF1000,1000_QL80_.jpg", n = {
107
110
  items: [
108
111
  { id: 1, itemId: "1094-01", description: "Kason Door Closer - Flush", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" },
109
112
  { id: 2, itemId: "810810", description: "True Door Gasket", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" },
@@ -119,30 +122,36 @@ const I = {
119
122
  { id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" }
120
123
  ]
121
124
  };
122
- function v(e) {
125
+ function y(e) {
123
126
  return `$${e.items.reduce(
124
- (t, i) => t + (parseFloat(i.price.replace(/[^0-9.]/g, "")) || 0) * i.quantity,
127
+ (t, l) => t + (parseFloat(l.price.replace(/[^0-9.]/g, "")) || 0) * l.quantity,
125
128
  0
126
129
  ).toFixed(2)}`;
127
130
  }
128
- const n = (e) => {
129
- const [l, t] = b(!1);
130
- return /* @__PURE__ */ u(s, { children: [
131
- /* @__PURE__ */ c(
132
- d,
131
+ const m = /* @__PURE__ */ u("div", { style: { display: "flex", flexDirection: "column", gap: 8, minWidth: 220 }, children: [
132
+ /* @__PURE__ */ i(d, { size: "sm", weight: "semibold", children: "Account" }),
133
+ /* @__PURE__ */ i(d, { size: "xs", children: "Signed in as Ringo" }),
134
+ /* @__PURE__ */ i(s, { href: "/account", children: "View Account" }),
135
+ /* @__PURE__ */ i(s, { href: "/orders", children: "Order History" }),
136
+ /* @__PURE__ */ i(v, { size: "sm", variant: "secondary", onClick: () => alert("Sign out"), children: "Sign Out" })
137
+ ] }), c = (e) => {
138
+ const [o, t] = p(!1);
139
+ return /* @__PURE__ */ u(h, { children: [
140
+ /* @__PURE__ */ i(
141
+ b,
133
142
  {
134
143
  ...e,
135
- open: l,
136
- onCartClick: () => t((i) => !i)
144
+ open: o,
145
+ onCartClick: () => t((l) => !l)
137
146
  }
138
147
  ),
139
- /* @__PURE__ */ c(
140
- m,
148
+ /* @__PURE__ */ i(
149
+ g,
141
150
  {
142
- open: l,
151
+ open: o,
143
152
  onClose: () => t(!1),
144
153
  cart: e.cart,
145
- subtotal: v(e.cart),
154
+ subtotal: y(e.cart),
146
155
  itemPriceLabel: "List Price",
147
156
  contactHref: e.contactRoute,
148
157
  contactLinkBehavior: "new-tab",
@@ -152,13 +161,12 @@ const n = (e) => {
152
161
  }
153
162
  )
154
163
  ] });
155
- }, S = {
164
+ }, D = {
156
165
  args: {
157
166
  account: { name: "Ringo", initials: "RS", number: "123456789012" },
158
- cart: r,
167
+ cart: n,
159
168
  homeRoute: "/",
160
169
  customPartsRoute: "/custom",
161
- accountRoute: "/account",
162
170
  onClickModelSerial: () => {
163
171
  alert("Model/Serial");
164
172
  },
@@ -174,16 +182,16 @@ const n = (e) => {
174
182
  onCartClick: () => {
175
183
  },
176
184
  // placeholder required by component
177
- categories: o
185
+ categories: r,
186
+ accountPopoverContent: m
178
187
  },
179
- render: n
180
- }, C = {
188
+ render: c
189
+ }, $ = {
181
190
  args: {
182
191
  account: { name: "Ringo", initials: "RS", number: "123456789012" },
183
- cart: r,
192
+ cart: n,
184
193
  homeRoute: "/",
185
194
  customPartsRoute: "/custom",
186
- accountRoute: "/account",
187
195
  onClickModelSerial: () => {
188
196
  alert("Model/Serial");
189
197
  },
@@ -198,15 +206,15 @@ const n = (e) => {
198
206
  },
199
207
  onCartClick: () => {
200
208
  },
201
- categories: o
209
+ categories: r,
210
+ accountPopoverContent: m
202
211
  },
203
- render: n
204
- }, k = {
212
+ render: c
213
+ }, L = {
205
214
  args: {
206
- cart: r,
215
+ cart: n,
207
216
  homeRoute: "/",
208
217
  customPartsRoute: "/custom",
209
- accountRoute: "/account",
210
218
  onClickModelSerial: () => {
211
219
  alert("Model/Serial");
212
220
  },
@@ -221,13 +229,13 @@ const n = (e) => {
221
229
  },
222
230
  onCartClick: () => {
223
231
  },
224
- categories: o
232
+ categories: r
225
233
  },
226
- render: n
234
+ render: c
227
235
  };
228
236
  export {
229
- S as Authenticated,
230
- k as Unauthenticated,
231
- C as WithCartItems,
232
- I as default
237
+ D as Authenticated,
238
+ L as Unauthenticated,
239
+ $ as WithCartItems,
240
+ U as default
233
241
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.108",
4
+ "version": "0.0.110",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",