@caseparts-org/caseblocks 0.0.15 → 0.0.17

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.
Files changed (32) hide show
  1. package/dist/assets/Button.css +1 -1
  2. package/dist/assets/Root.css +1 -1
  3. package/dist/atoms/Button/Button.d.ts +1 -1
  4. package/dist/atoms/Button/Button.js +35 -33
  5. package/dist/atoms/Button/Button.stories.d.ts +1 -1
  6. package/dist/atoms/Button/Button.stories.js +13 -16
  7. package/dist/atoms/Flex/Flex.stories.d.ts +1 -1
  8. package/dist/atoms/Grid/Grid.stories.d.ts +1 -1
  9. package/dist/atoms/Icon/Icon.stories.d.ts +1 -1
  10. package/dist/atoms/Input/Input.stories.d.ts +1 -1
  11. package/dist/atoms/Link/Link.stories.d.ts +1 -1
  12. package/dist/atoms/Separator/Separator.stories.d.ts +1 -1
  13. package/dist/atoms/Text/Text.stories.d.ts +1 -1
  14. package/dist/molecules/Account/Account.js +40 -38
  15. package/dist/molecules/Account/Account.stories.d.ts +1 -1
  16. package/dist/molecules/Avatar/Avatar.d.ts +1 -1
  17. package/dist/molecules/Avatar/Avatar.js +15 -20
  18. package/dist/molecules/Avatar/Avatar.stories.d.ts +1 -1
  19. package/dist/molecules/Cart/Cart.stories.d.ts +1 -1
  20. package/dist/molecules/Chip/Chip.stories.d.ts +1 -1
  21. package/dist/molecules/HamburgerMenu/HamburgerMenu.js +20 -21
  22. package/dist/molecules/Logo/Logo.stories.d.ts +1 -1
  23. package/dist/molecules/SearchBox/SearchBox.stories.d.ts +1 -1
  24. package/dist/molecules/ToggleView/ToggleView.stories.d.ts +1 -1
  25. package/dist/molecules/Tooltip/Tooltip.js +558 -19241
  26. package/dist/molecules/Tooltip/Tooltip.stories.d.ts +1 -1
  27. package/dist/organisms/ChipSelector/ChipSelector.stories.d.ts +1 -1
  28. package/dist/organisms/MainNav/MainNav.js +22 -23
  29. package/dist/organisms/MainNav/MainNav.stories.d.ts +1 -1
  30. package/dist/organisms/SpinZoomViewer/SpinZoomViewer.stories.d.ts +1 -1
  31. package/dist/styles/tokens.css +52 -0
  32. package/package.json +12 -16
@@ -1,6 +1,6 @@
1
1
  import { HideAtProps } from '../HideAt';
2
2
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, HideAtProps {
3
- size: "xs" | "sm" | "md" | "lg" | "xl";
3
+ size: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
4
4
  variant: "primary" | "secondary" | "cta-primary" | "tertiary" | "destructive";
5
5
  disabled?: boolean;
6
6
  }
@@ -1,45 +1,47 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { t as n } from "../../Text.module-smM1g1J4.js";
3
- import { c as i } from "../../clsx-OuTLNxxd.js";
4
- import { getHideAtStyles as c } from "../HideAt.js";
5
- import '../../assets/Button.css';const m = "_button_1co79_1", t = {
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { t } from "../../Text.module-smM1g1J4.js";
3
+ import { c as r } from "../../clsx-OuTLNxxd.js";
4
+ import { getHideAtStyles as z } from "../HideAt.js";
5
+ import '../../assets/Button.css';const m = "_button_17viz_1", o = {
6
6
  button: m,
7
- "button-primary": "_button-primary_1co79_36",
8
- "button-secondary": "_button-secondary_1co79_50",
9
- "button-cta-primary": "_button-cta-primary_1co79_72",
10
- "button-tertiary": "_button-tertiary_1co79_86",
11
- "button-destructive": "_button-destructive_1co79_104",
12
- "button-size-xs": "_button-size-xs_1co79_122",
13
- "button-size-sm": "_button-size-sm_1co79_126",
14
- "button-size-md": "_button-size-md_1co79_130",
15
- "button-size-lg": "_button-size-lg_1co79_134",
16
- "button-size-xl": "_button-size-xl_1co79_138"
7
+ "button-primary": "_button-primary_17viz_36",
8
+ "button-secondary": "_button-secondary_17viz_50",
9
+ "button-cta-primary": "_button-cta-primary_17viz_72",
10
+ "button-tertiary": "_button-tertiary_17viz_86",
11
+ "button-destructive": "_button-destructive_17viz_104",
12
+ "button-size-xxs": "_button-size-xxs_17viz_122",
13
+ "button-size-xs": "_button-size-xs_17viz_128",
14
+ "button-size-sm": "_button-size-sm_17viz_135",
15
+ "button-size-md": "_button-size-md_17viz_142",
16
+ "button-size-lg": "_button-size-lg_17viz_149",
17
+ "button-size-xl": "_button-size-xl_17viz_156"
17
18
  };
18
- function l({
19
- children: _,
20
- size: o,
21
- variant: u,
19
+ function y({
20
+ children: n,
21
+ size: i,
22
+ variant: _,
22
23
  hideAt: s,
23
- className: e,
24
- ...b
24
+ className: u,
25
+ ...e
25
26
  }) {
26
- return /* @__PURE__ */ r(
27
+ return /* @__PURE__ */ b(
27
28
  "button",
28
29
  {
29
- className: i(
30
- t.button,
31
- t[`button-${u}`],
32
- t[`button-size-${o}`],
33
- n.text,
34
- n[`text-${o}`],
35
- c(s),
36
- e
30
+ className: r(
31
+ o.button,
32
+ o[`button-${_}`],
33
+ o[`button-size-${i}`],
34
+ t.text,
35
+ t[`text-${i}`],
36
+ t["text-semibold"],
37
+ z(s),
38
+ u
37
39
  ),
38
- ...b,
39
- children: _
40
+ ...e,
41
+ children: n
40
42
  }
41
43
  );
42
44
  }
43
45
  export {
44
- l as Button
46
+ y as Button
45
47
  };
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Button } from './Button';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,8 +1,8 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { Button as e } from "./Button.js";
3
- const c = {
1
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
+ import { Button as r } from "./Button.js";
3
+ const n = {
4
4
  title: "Case Parts/Atoms/Button",
5
- component: e,
5
+ component: r,
6
6
  parameters: {
7
7
  // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
8
8
  layout: "centered"
@@ -11,8 +11,8 @@ const c = {
11
11
  tags: ["autodocs"]
12
12
  }, l = {
13
13
  args: {
14
- children: "Button Text",
15
- size: "sm",
14
+ children: "Text",
15
+ size: "md",
16
16
  variant: "primary"
17
17
  }
18
18
  }, a = [
@@ -22,19 +22,16 @@ const c = {
22
22
  "cta-primary",
23
23
  "destructive"
24
24
  ], p = {
25
- render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: a.map((t) => /* @__PURE__ */ s(e, { variant: t, size: "md", children: [
26
- t.charAt(0).toUpperCase() + t.slice(1),
27
- " Button"
28
- ] }, t)) })
29
- }, o = ["xs", "sm", "md", "lg", "xl"], m = {
30
- render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: o.map((t) => /* @__PURE__ */ s(e, { size: t, variant: "primary", children: [
31
- t.charAt(0).toUpperCase() + t.slice(1),
32
- " Button"
33
- ] }, t)) })
25
+ render: () => /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: a.map((e) => /* @__PURE__ */ t(r, { variant: e, size: "md", children: e.charAt(0).toUpperCase() + e.slice(1) }, e)) })
26
+ }, o = ["xxs", "xs", "sm", "md", "lg", "xl"], m = {
27
+ render: () => /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: o.map((e) => /* @__PURE__ */ s(r, { size: e, variant: "primary", children: [
28
+ e.charAt(0).toUpperCase() + e.slice(1).toUpperCase(),
29
+ " Btn"
30
+ ] }, e)) })
34
31
  };
35
32
  export {
36
33
  l as AllProps,
37
34
  m as Sizes,
38
35
  p as Variants,
39
- c as default
36
+ n as default
40
37
  };
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Flex } from './Flex';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Grid } from './Grid';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Icon } from './Icon';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
3
  title: string;
4
4
  component: import('react').ForwardRefExoticComponent<import('./Input').InputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Link } from './Link';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Separator } from './Separator';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Text } from './Text';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,78 +1,80 @@
1
1
  import { jsx as i, jsxs as n } from "react/jsx-runtime";
2
- import { getHideAtStyles as o } from "../../atoms/HideAt.js";
2
+ import { getHideAtStyles as d } from "../../atoms/HideAt.js";
3
3
  import { Icon as f } from "../../atoms/Icon/Icon.js";
4
- import { Text as m } from "../../atoms/Text/Text.js";
5
- import { Avatar as a } from "../Avatar/Avatar.js";
6
- import { Flex as r } from "../../atoms/Flex/Flex.js";
7
- import { Button as h } from "../../atoms/Button/Button.js";
8
- import { c as s } from "../../clsx-OuTLNxxd.js";
9
- import { Link as x } from "../../atoms/Link/Link.js";
10
- import '../../assets/Account.css';const u = "_loggedIn_1uin2_1", t = {
11
- loggedIn: u
4
+ import { Text as a } from "../../atoms/Text/Text.js";
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
12
12
  };
13
- function A(e) {
13
+ function I(e) {
14
14
  return e.account !== void 0;
15
15
  }
16
16
  function w(e) {
17
- return A(e) ? /* @__PURE__ */ i(I, { ...e }) : /* @__PURE__ */ i(k, { ...e });
17
+ return I(e) ? /* @__PURE__ */ i(k, { ...e }) : /* @__PURE__ */ i(y, { ...e });
18
18
  }
19
- function I({
20
- account: e,
21
- accountRoute: l,
22
- onLoginClick: y,
23
- className: d,
24
- hideAt: g,
25
- ...c
26
- }) {
19
+ function k(e) {
20
+ const {
21
+ account: t,
22
+ accountRoute: o,
23
+ onLoginClick: m,
24
+ className: r,
25
+ hideAt: c,
26
+ ...g
27
+ } = e;
27
28
  return /* @__PURE__ */ n(
28
- r,
29
+ s,
29
30
  {
30
31
  flexDirection: "row",
31
32
  alignItems: "center",
32
- className: s(t.loggedIn, o(g), d),
33
- ...c,
33
+ className: u(l.loggedIn, d(c), r),
34
+ ...g,
34
35
  children: [
35
36
  /* @__PURE__ */ n(
36
- r,
37
+ s,
37
38
  {
38
39
  flexDirection: "column",
39
40
  alignItems: "flex-end",
40
41
  hideAt: ["sm", "md"],
41
- className: t.customer,
42
+ className: l.customer,
42
43
  children: [
43
- /* @__PURE__ */ n(m, { size: "xxs", children: [
44
+ /* @__PURE__ */ n(a, { size: "xxs", children: [
44
45
  "Acct: ",
45
- e == null ? void 0 : e.number
46
+ t == null ? void 0 : t.number
46
47
  ] }),
47
- /* @__PURE__ */ i(x, { href: l, children: /* @__PURE__ */ n(m, { size: "sm", variant: "display", children: [
48
+ /* @__PURE__ */ i(A, { href: o, children: /* @__PURE__ */ n(a, { size: "sm", variant: "display", children: [
48
49
  "Hello ",
49
- e == null ? void 0 : e.name
50
+ t == null ? void 0 : t.name
50
51
  ] }) })
51
52
  ]
52
53
  }
53
54
  ),
54
- /* @__PURE__ */ i(a, { initials: e.initials, accountRoute: l })
55
+ /* @__PURE__ */ i(h, { initials: t.initials, accountRoute: o })
55
56
  ]
56
57
  }
57
58
  );
58
59
  }
59
- function k(e) {
60
+ function y(e) {
61
+ const { accountRoute: t, onLoginClick: o, className: m, hideAt: r, ...c } = e;
60
62
  return /* @__PURE__ */ n(
61
- r,
63
+ s,
62
64
  {
63
65
  flexDirection: "row",
64
66
  alignItems: "center",
65
- ...e,
66
- className: s(
67
- t.unauthenticated,
68
- o(e.hideAt),
69
- e.className
67
+ ...c,
68
+ className: u(
69
+ l.unauthenticated,
70
+ d(r),
71
+ m
70
72
  ),
71
73
  children: [
72
74
  /* @__PURE__ */ i(
73
- h,
75
+ x,
74
76
  {
75
- onClick: e.onLoginClick,
77
+ onClick: o,
76
78
  size: "sm",
77
79
  variant: "primary",
78
80
  hideAt: ["sm", "md"],
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Account } from './Account';
3
3
  declare const meta: {
4
4
  title: string;
@@ -4,4 +4,4 @@ export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement>, HideA
4
4
  initials: string;
5
5
  accountRoute: string;
6
6
  }
7
- export declare function Avatar({ initials, accountRoute, className, hideAt, ...otherProps }: AvatarProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Avatar(props: AvatarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,37 +1,32 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { Flex as m } from "../../atoms/Flex/Flex.js";
3
- import { Link as n } from "../../atoms/Link/Link.js";
4
- import { getHideAtStyles as c } from "../../atoms/HideAt.js";
5
- import { c as l } from "../../clsx-OuTLNxxd.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
6
  import { t as r } from "../../Text.module-smM1g1J4.js";
7
- import '../../assets/Avatar.css';const f = "_avatar_vwzwk_1", p = {
8
- avatar: f
7
+ import '../../assets/Avatar.css';const p = "_avatar_vwzwk_1", x = {
8
+ avatar: p
9
9
  };
10
- function h({
11
- initials: e,
12
- accountRoute: a,
13
- className: o,
14
- hideAt: i,
15
- ...s
16
- }) {
17
- return /* @__PURE__ */ t(n, { href: a, children: /* @__PURE__ */ t(
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(
18
13
  m,
19
14
  {
20
15
  flexDirection: "row",
21
16
  alignItems: "center",
22
17
  justifyContent: "center",
23
- className: l(
24
- p.avatar,
18
+ className: f(
19
+ x.avatar,
25
20
  r["text-display"],
26
21
  r["text-md"],
27
- c(i),
28
- o
22
+ l(i),
23
+ s
29
24
  ),
30
- ...s,
31
- children: e.substring(0, 2)
25
+ ...n,
26
+ children: o.substring(0, 2)
32
27
  }
33
28
  ) });
34
29
  }
35
30
  export {
36
- h as Avatar
31
+ w as Avatar
37
32
  };
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Avatar } from './Avatar';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Cart } from './Cart';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Chip } from './Chip';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,57 +1,56 @@
1
- import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
- import { useState as u, useRef as l, useEffect as f } from "react";
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { useState as c, useRef as l, useEffect as f } from "react";
3
3
  import { getHideAtStyles as d } from "../../atoms/HideAt.js";
4
4
  import { Flex as p } from "../../atoms/Flex/Flex.js";
5
- import { Icon as _ } from "../../atoms/Icon/Icon.js";
6
- import { c as b } from "../../clsx-OuTLNxxd.js";
7
- import '../../assets/HamburgerMenu.css';const C = "_hamburgerContainer_b84wp_1", g = "_menuIcon_b84wp_4", h = "_menuContent_b84wp_8", v = "_closeContainer_b84wp_22", w = "_overlay_b84wp_41", t = {
5
+ import { Icon as b } from "../../atoms/Icon/Icon.js";
6
+ import { c as _ } from "../../clsx-OuTLNxxd.js";
7
+ import '../../assets/HamburgerMenu.css';const C = "_hamburgerContainer_b84wp_1", g = "_menuIcon_b84wp_4", h = "_menuContent_b84wp_8", v = "_overlay_b84wp_41", t = {
8
8
  hamburgerContainer: C,
9
9
  menuIcon: g,
10
10
  menuContent: h,
11
- closeContainer: v,
12
- overlay: w
11
+ overlay: v
13
12
  };
14
- function j({ hideAt: s, children: c }) {
15
- const [e, r] = u(!1), a = l(null);
13
+ function E({ hideAt: m, children: s }) {
14
+ const [e, o] = c(!1), a = l(null);
16
15
  return f(() => {
17
16
  if (!e) return;
18
- function n(i) {
19
- a.current && !a.current.contains(i.target) && r(!1);
17
+ function n(u) {
18
+ a.current && !a.current.contains(u.target) && o(!1);
20
19
  }
21
20
  return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
22
- }, [e]), /* @__PURE__ */ m(
21
+ }, [e]), /* @__PURE__ */ i(
23
22
  "div",
24
23
  {
25
24
  ref: a,
26
- className: b(t.hamburgerContainer, d(s)),
25
+ className: _(t.hamburgerContainer, d(m)),
27
26
  children: [
28
- e && /* @__PURE__ */ o(
27
+ e && /* @__PURE__ */ r(
29
28
  "div",
30
29
  {
31
30
  className: t.overlay,
32
- onClick: () => r(!1),
31
+ onClick: () => o(!1),
33
32
  "aria-hidden": "true"
34
33
  }
35
34
  ),
36
- /* @__PURE__ */ o(
35
+ /* @__PURE__ */ r(
37
36
  p,
38
37
  {
39
38
  flexDirection: "row",
40
39
  className: t.menuIcon,
41
- onClick: () => r((n) => !n),
40
+ onClick: () => o((n) => !n),
42
41
  "aria-expanded": e,
43
42
  "aria-controls": "hamburger-menu-content",
44
43
  role: "button",
45
- children: /* @__PURE__ */ o(_, { iconKey: "fa-kit fa-bars", title: "Menu", size: "lg" })
44
+ children: /* @__PURE__ */ r(b, { iconKey: "fa-kit fa-bars", title: "Menu", size: "lg" })
46
45
  }
47
46
  ),
48
- e && /* @__PURE__ */ o(
47
+ e && /* @__PURE__ */ r(
49
48
  "div",
50
49
  {
51
50
  id: "hamburger-menu-content",
52
51
  className: t.menuContent,
53
52
  role: "menu",
54
- children: c
53
+ children: s
55
54
  }
56
55
  )
57
56
  ]
@@ -59,5 +58,5 @@ function j({ hideAt: s, children: c }) {
59
58
  );
60
59
  }
61
60
  export {
62
- j as HamburgerMenu
61
+ E as HamburgerMenu
63
62
  };
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Logo } from './Logo';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import { StoryObj } from '@storybook/react';
1
+ import { StoryObj } from '@storybook/react-vite';
2
2
  import { SearchBox } from './SearchBox';
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,5 +1,5 @@
1
1
  import { ToggleView } from './ToggleView';
2
- import { StoryObj } from '@storybook/react';
2
+ import { StoryObj } from '@storybook/react-vite';
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: typeof ToggleView;