@caseparts-org/caseblocks 0.0.15 → 0.0.16

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 (29) 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.stories.d.ts +1 -1
  15. package/dist/molecules/Avatar/Avatar.stories.d.ts +1 -1
  16. package/dist/molecules/Cart/Cart.stories.d.ts +1 -1
  17. package/dist/molecules/Chip/Chip.stories.d.ts +1 -1
  18. package/dist/molecules/HamburgerMenu/HamburgerMenu.js +20 -21
  19. package/dist/molecules/Logo/Logo.stories.d.ts +1 -1
  20. package/dist/molecules/SearchBox/SearchBox.stories.d.ts +1 -1
  21. package/dist/molecules/ToggleView/ToggleView.stories.d.ts +1 -1
  22. package/dist/molecules/Tooltip/Tooltip.js +558 -19241
  23. package/dist/molecules/Tooltip/Tooltip.stories.d.ts +1 -1
  24. package/dist/organisms/ChipSelector/ChipSelector.stories.d.ts +1 -1
  25. package/dist/organisms/MainNav/MainNav.js +22 -23
  26. package/dist/organisms/MainNav/MainNav.stories.d.ts +1 -1
  27. package/dist/organisms/SpinZoomViewer/SpinZoomViewer.stories.d.ts +1 -1
  28. package/dist/styles/tokens.css +52 -0
  29. 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,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;
@@ -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;