@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.
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Root.css +1 -1
- package/dist/atoms/Button/Button.d.ts +1 -1
- package/dist/atoms/Button/Button.js +35 -33
- package/dist/atoms/Button/Button.stories.d.ts +1 -1
- package/dist/atoms/Button/Button.stories.js +13 -16
- package/dist/atoms/Flex/Flex.stories.d.ts +1 -1
- package/dist/atoms/Grid/Grid.stories.d.ts +1 -1
- package/dist/atoms/Icon/Icon.stories.d.ts +1 -1
- package/dist/atoms/Input/Input.stories.d.ts +1 -1
- package/dist/atoms/Link/Link.stories.d.ts +1 -1
- package/dist/atoms/Separator/Separator.stories.d.ts +1 -1
- package/dist/atoms/Text/Text.stories.d.ts +1 -1
- package/dist/molecules/Account/Account.stories.d.ts +1 -1
- package/dist/molecules/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/molecules/Cart/Cart.stories.d.ts +1 -1
- package/dist/molecules/Chip/Chip.stories.d.ts +1 -1
- package/dist/molecules/HamburgerMenu/HamburgerMenu.js +20 -21
- package/dist/molecules/Logo/Logo.stories.d.ts +1 -1
- package/dist/molecules/SearchBox/SearchBox.stories.d.ts +1 -1
- package/dist/molecules/ToggleView/ToggleView.stories.d.ts +1 -1
- package/dist/molecules/Tooltip/Tooltip.js +558 -19241
- package/dist/molecules/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/organisms/ChipSelector/ChipSelector.stories.d.ts +1 -1
- package/dist/organisms/MainNav/MainNav.js +22 -23
- package/dist/organisms/MainNav/MainNav.stories.d.ts +1 -1
- package/dist/organisms/SpinZoomViewer/SpinZoomViewer.stories.d.ts +1 -1
- package/dist/styles/tokens.css +52 -0
- 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
|
|
2
|
-
import { t
|
|
3
|
-
import { c as
|
|
4
|
-
import { getHideAtStyles as
|
|
5
|
-
import '../../assets/Button.css';const m = "
|
|
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-
|
|
8
|
-
"button-secondary": "_button-
|
|
9
|
-
"button-cta-primary": "_button-cta-
|
|
10
|
-
"button-tertiary": "_button-
|
|
11
|
-
"button-destructive": "_button-
|
|
12
|
-
"button-size-
|
|
13
|
-
"button-size-
|
|
14
|
-
"button-size-
|
|
15
|
-
"button-size-
|
|
16
|
-
"button-size-
|
|
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
|
|
19
|
-
children:
|
|
20
|
-
size:
|
|
21
|
-
variant:
|
|
19
|
+
function y({
|
|
20
|
+
children: n,
|
|
21
|
+
size: i,
|
|
22
|
+
variant: _,
|
|
22
23
|
hideAt: s,
|
|
23
|
-
className:
|
|
24
|
-
...
|
|
24
|
+
className: u,
|
|
25
|
+
...e
|
|
25
26
|
}) {
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ b(
|
|
27
28
|
"button",
|
|
28
29
|
{
|
|
29
|
-
className:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
...
|
|
39
|
-
children:
|
|
40
|
+
...e,
|
|
41
|
+
children: n
|
|
40
42
|
}
|
|
41
43
|
);
|
|
42
44
|
}
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
y as Button
|
|
45
47
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Button as
|
|
3
|
-
const
|
|
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:
|
|
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: "
|
|
15
|
-
size: "
|
|
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__ */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
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
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').ForwardRefExoticComponent<import('./Input').InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,57 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
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
|
|
6
|
-
import { c as
|
|
7
|
-
import '../../assets/HamburgerMenu.css';const C = "_hamburgerContainer_b84wp_1", g = "_menuIcon_b84wp_4", h = "_menuContent_b84wp_8", v = "
|
|
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
|
-
|
|
12
|
-
overlay: w
|
|
11
|
+
overlay: v
|
|
13
12
|
};
|
|
14
|
-
function
|
|
15
|
-
const [e,
|
|
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(
|
|
19
|
-
a.current && !a.current.contains(
|
|
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__ */
|
|
21
|
+
}, [e]), /* @__PURE__ */ i(
|
|
23
22
|
"div",
|
|
24
23
|
{
|
|
25
24
|
ref: a,
|
|
26
|
-
className:
|
|
25
|
+
className: _(t.hamburgerContainer, d(m)),
|
|
27
26
|
children: [
|
|
28
|
-
e && /* @__PURE__ */
|
|
27
|
+
e && /* @__PURE__ */ r(
|
|
29
28
|
"div",
|
|
30
29
|
{
|
|
31
30
|
className: t.overlay,
|
|
32
|
-
onClick: () =>
|
|
31
|
+
onClick: () => o(!1),
|
|
33
32
|
"aria-hidden": "true"
|
|
34
33
|
}
|
|
35
34
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ r(
|
|
37
36
|
p,
|
|
38
37
|
{
|
|
39
38
|
flexDirection: "row",
|
|
40
39
|
className: t.menuIcon,
|
|
41
|
-
onClick: () =>
|
|
40
|
+
onClick: () => o((n) => !n),
|
|
42
41
|
"aria-expanded": e,
|
|
43
42
|
"aria-controls": "hamburger-menu-content",
|
|
44
43
|
role: "button",
|
|
45
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ r(b, { iconKey: "fa-kit fa-bars", title: "Menu", size: "lg" })
|
|
46
45
|
}
|
|
47
46
|
),
|
|
48
|
-
e && /* @__PURE__ */
|
|
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:
|
|
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
|
-
|
|
61
|
+
E as HamburgerMenu
|
|
63
62
|
};
|