@caseparts-org/caseblocks 0.0.247 → 0.0.249
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/Disclaimer.css +1 -1
- package/dist/assets/Pill.css +1 -1
- package/dist/atoms/Pill/Pill.d.ts +6 -3
- package/dist/atoms/Pill/Pill.js +54 -32
- package/dist/atoms/Pill/Pill.stories.d.ts +1 -0
- package/dist/atoms/Pill/Pill.stories.js +22 -16
- package/dist/main-server.d.ts +1 -1
- package/dist/molecules/Disclaimer/Disclaimer.d.ts +39 -13
- package/dist/molecules/Disclaimer/Disclaimer.js +69 -38
- package/dist/molecules/Disclaimer/Disclaimer.stories.d.ts +25 -37
- package/dist/molecules/Disclaimer/Disclaimer.stories.js +62 -63
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._disclaimer_1bxdj_1{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--spacing-spacing-2xs);width:100%;border:1px solid;border-radius:var(--border-radius-sm);padding:var(--spacing-spacing-2xs) var(--spacing-spacing-1xs)}._content_1bxdj_12{display:flex;align-items:flex-start;gap:var(--spacing-spacing-2xs);flex:1;min-width:0}._layout-stacked_1bxdj_20 ._content_1bxdj_12{display:grid;grid-template-columns:auto minmax(0,1fr);row-gap:var(--spacing-spacing-3xs)}._layout-stacked_1bxdj_20 ._primary_1bxdj_26,._layout-stacked_1bxdj_20 ._subtext_1bxdj_27{grid-column:2}._layout-stacked_1bxdj_20 ._icon_1bxdj_31{grid-row:span 2;align-self:start}._primary_1bxdj_26{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold)}._subtext_1bxdj_27{font-size:var(--font-size-xs);white-space:pre-line}._cta_1bxdj_46{flex:none}._background-neutral_1bxdj_50{background-color:var(--color-neutrals-neutral-1)}._background-secondary_1bxdj_54{background-color:var(--color-brand-secondary-lt-teal-blue)}._background-caution-tips_1bxdj_58{background-color:var(--color-brand-secondary-lt-yellow)}._background-warning_1bxdj_62{background-color:var(--color-brand-secondary-lt-orange)}._background-success_1bxdj_66{background-color:var(--color-brand-secondary-lt-green)}._background-error-warning_1bxdj_70{background-color:var(--color-brand-secondary-lt-red)}._border-neutral_1bxdj_74{border-color:var(--color-neutrals-neutral-1)}._border-secondary_1bxdj_78{border-color:var(--color-brand-secondary-lt-teal-blue)}._border-caution-tips_1bxdj_82{border-color:var(--color-brand-secondary-lt-yellow)}._border-warning_1bxdj_86{border-color:var(--color-brand-secondary-lt-orange)}._border-success_1bxdj_90{border-color:var(--color-brand-secondary-lt-green)}._border-error-warning_1bxdj_94{border-color:var(--color-brand-secondary-lt-red)}
|
package/dist/assets/Pill.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._pill_i5js9_1{display:flex;justify-content:center;align-items:center;border-radius:28px;border:1px solid}._pill-xs_i5js9_17{padding:2px 10px}._pill-sm_i5js9_25{padding:2px 12px}._pill-md_i5js9_33{padding:4px 16px}._pill-color-neutral_i5js9_41{background:var(--color-neutrals-neutral-1)}._pill-color-secondary_i5js9_49{background:var(--color-brand-secondary-lt-teal-blue)}._pill-color-caution-tips_i5js9_57{background:var(--color-brand-secondary-lt-yellow)}._pill-color-warning_i5js9_65{background:var(--color-brand-secondary-lt-orange)}._pill-color-success_i5js9_73{background:var(--color-brand-secondary-lt-green)}._pill-color-error-warning_i5js9_81{background:var(--color-brand-secondary-lt-red)}._pill-border-neutral_i5js9_89{border-color:var(--border-border-primary)}._pill-border-secondary_i5js9_97{border-color:var(--border-border-primary-chit)}._pill-border-caution-tips_i5js9_105{border-color:var(--border-border-help)}._pill-border-warning_i5js9_113{border-color:var(--border-border-warning)}._pill-border-success_i5js9_121{border-color:var(--border-border-success)}._pill-border-error-warning_i5js9_129{border-color:var(--border-border-error-warning)}._noBorder_i5js9_137{border:none}._uppercase_i5js9_145{text-transform:uppercase;letter-spacing:.03em}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { TextColorToken } from '../Text/Text';
|
|
2
|
+
import { TextColorToken, TextWeight } from '../Text/Text';
|
|
3
3
|
export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
colorToken?: "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
|
|
6
6
|
customColor?: string;
|
|
7
7
|
textColorToken?: TextColorToken;
|
|
8
|
-
|
|
8
|
+
weight?: TextWeight;
|
|
9
|
+
uppercase?: boolean;
|
|
10
|
+
hideBorder?: boolean;
|
|
11
|
+
size?: "xs" | "sm" | "md";
|
|
9
12
|
className?: string;
|
|
10
13
|
}
|
|
11
|
-
export declare function Pill({ colorToken, textColorToken, customColor, size, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/atoms/Pill/Pill.js
CHANGED
|
@@ -1,42 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Text as
|
|
3
|
-
import { c as
|
|
4
|
-
import '../../assets/Pill.css';const
|
|
5
|
-
pill:
|
|
6
|
-
"pill-xs": "_pill-
|
|
7
|
-
"pill-sm": "_pill-
|
|
8
|
-
"pill-md": "_pill-
|
|
9
|
-
"pill-color-neutral": "_pill-color-
|
|
10
|
-
"pill-color-secondary": "_pill-color-
|
|
11
|
-
"pill-color-caution-tips": "_pill-color-caution-
|
|
12
|
-
"pill-color-warning": "_pill-color-
|
|
13
|
-
"pill-color-success": "_pill-color-
|
|
14
|
-
"pill-color-error-warning": "_pill-color-error-
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { Text as u } from "../Text/Text.js";
|
|
3
|
+
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import '../../assets/Pill.css';const j = "_pill_i5js9_1", m = "_noBorder_i5js9_137", b = "_uppercase_i5js9_145", r = {
|
|
5
|
+
pill: j,
|
|
6
|
+
"pill-xs": "_pill-xs_i5js9_17",
|
|
7
|
+
"pill-sm": "_pill-sm_i5js9_25",
|
|
8
|
+
"pill-md": "_pill-md_i5js9_33",
|
|
9
|
+
"pill-color-neutral": "_pill-color-neutral_i5js9_41",
|
|
10
|
+
"pill-color-secondary": "_pill-color-secondary_i5js9_49",
|
|
11
|
+
"pill-color-caution-tips": "_pill-color-caution-tips_i5js9_57",
|
|
12
|
+
"pill-color-warning": "_pill-color-warning_i5js9_65",
|
|
13
|
+
"pill-color-success": "_pill-color-success_i5js9_73",
|
|
14
|
+
"pill-color-error-warning": "_pill-color-error-warning_i5js9_81",
|
|
15
|
+
"pill-border-neutral": "_pill-border-neutral_i5js9_89",
|
|
16
|
+
"pill-border-secondary": "_pill-border-secondary_i5js9_97",
|
|
17
|
+
"pill-border-caution-tips": "_pill-border-caution-tips_i5js9_105",
|
|
18
|
+
"pill-border-warning": "_pill-border-warning_i5js9_113",
|
|
19
|
+
"pill-border-success": "_pill-border-success_i5js9_121",
|
|
20
|
+
"pill-border-error-warning": "_pill-border-error-warning_i5js9_129",
|
|
21
|
+
noBorder: m,
|
|
22
|
+
uppercase: b
|
|
15
23
|
};
|
|
16
|
-
function
|
|
17
|
-
colorToken:
|
|
18
|
-
textColorToken:
|
|
19
|
-
customColor:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
function y({
|
|
25
|
+
colorToken: l = "success",
|
|
26
|
+
textColorToken: e,
|
|
27
|
+
customColor: s,
|
|
28
|
+
weight: c = "medium",
|
|
29
|
+
uppercase: n = !1,
|
|
30
|
+
hideBorder: o = !1,
|
|
31
|
+
size: i = "xs",
|
|
32
|
+
className: a,
|
|
33
|
+
children: d,
|
|
34
|
+
...t
|
|
24
35
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ p(
|
|
26
37
|
"span",
|
|
27
38
|
{
|
|
28
|
-
className:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
className: _(
|
|
40
|
+
r.pill,
|
|
41
|
+
r[`pill-color-${l}`],
|
|
42
|
+
r[`pill-${i}`],
|
|
43
|
+
!o && r[`pill-border-${l}`],
|
|
44
|
+
o && r.noBorder,
|
|
45
|
+
a
|
|
33
46
|
),
|
|
34
|
-
style:
|
|
35
|
-
...
|
|
36
|
-
children: /* @__PURE__ */
|
|
47
|
+
style: s ? { background: s } : void 0,
|
|
48
|
+
...t,
|
|
49
|
+
children: /* @__PURE__ */ p(
|
|
50
|
+
u,
|
|
51
|
+
{
|
|
52
|
+
size: i === "xs" ? "xxs" : i === "sm" ? "xs" : "sm",
|
|
53
|
+
weight: c,
|
|
54
|
+
colorToken: e ?? (l === "neutral" ? "primary" : l === "secondary" ? "secondary" : l === "success" ? "success" : l === "error-warning" ? "error-warning" : "warning"),
|
|
55
|
+
className: _(n && r.uppercase),
|
|
56
|
+
children: d
|
|
57
|
+
}
|
|
58
|
+
)
|
|
37
59
|
}
|
|
38
60
|
);
|
|
39
61
|
}
|
|
40
62
|
export {
|
|
41
|
-
|
|
63
|
+
y as Pill
|
|
42
64
|
};
|
|
@@ -15,3 +15,4 @@ export declare const Variants: StoryObj<typeof Pill>;
|
|
|
15
15
|
export declare const Sizes: StoryObj<typeof Pill>;
|
|
16
16
|
export declare const TextColors: StoryObj<typeof Pill>;
|
|
17
17
|
export declare const CustomColor: StoryObj<typeof Pill>;
|
|
18
|
+
export declare const WithoutBorder: Story;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Pill as
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Pill as s } from "./Pill.js";
|
|
3
3
|
const a = {
|
|
4
4
|
title: "Case Parts/Atoms/Pill",
|
|
5
|
-
component:
|
|
5
|
+
component: s,
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: "centered"
|
|
8
8
|
},
|
|
9
9
|
tags: ["autodocs"]
|
|
10
10
|
}, d = {
|
|
11
11
|
args: {
|
|
12
|
-
children: "
|
|
12
|
+
children: "Success",
|
|
13
13
|
colorToken: "success",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
size: "md"
|
|
14
|
+
weight: "semibold",
|
|
15
|
+
uppercase: !0
|
|
17
16
|
}
|
|
18
17
|
}, n = [
|
|
19
18
|
"neutral",
|
|
@@ -29,16 +28,16 @@ const a = {
|
|
|
29
28
|
"success",
|
|
30
29
|
"warning",
|
|
31
30
|
"error-warning"
|
|
32
|
-
],
|
|
33
|
-
render: () => /* @__PURE__ */
|
|
34
|
-
},
|
|
35
|
-
render: () => /* @__PURE__ */
|
|
31
|
+
], p = {
|
|
32
|
+
render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: n.map((e) => /* @__PURE__ */ r(s, { colorToken: e, children: e }, e)) })
|
|
33
|
+
}, c = ["xs", "sm", "md"], m = {
|
|
34
|
+
render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: c.map((e) => /* @__PURE__ */ o(s, { size: e, colorToken: "secondary", children: [
|
|
36
35
|
e.toUpperCase(),
|
|
37
36
|
" size"
|
|
38
37
|
] }, e)) })
|
|
39
38
|
}, u = {
|
|
40
|
-
render: () => /* @__PURE__ */
|
|
41
|
-
|
|
39
|
+
render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: t.map((e) => /* @__PURE__ */ r(
|
|
40
|
+
s,
|
|
42
41
|
{
|
|
43
42
|
size: "sm",
|
|
44
43
|
colorToken: "secondary",
|
|
@@ -48,13 +47,20 @@ const a = {
|
|
|
48
47
|
e
|
|
49
48
|
)) })
|
|
50
49
|
}, x = {
|
|
51
|
-
render: () => /* @__PURE__ */ s
|
|
50
|
+
render: () => /* @__PURE__ */ r(s, { size: "sm", customColor: "#7c3aed", textColorToken: "default-inverted", children: "Custom purple" })
|
|
51
|
+
}, h = {
|
|
52
|
+
args: {
|
|
53
|
+
children: "No border",
|
|
54
|
+
colorToken: "secondary",
|
|
55
|
+
hideBorder: !0
|
|
56
|
+
}
|
|
52
57
|
};
|
|
53
58
|
export {
|
|
54
59
|
d as AllProps,
|
|
55
60
|
x as CustomColor,
|
|
56
|
-
|
|
61
|
+
m as Sizes,
|
|
57
62
|
u as TextColors,
|
|
58
|
-
|
|
63
|
+
p as Variants,
|
|
64
|
+
h as WithoutBorder,
|
|
59
65
|
a as default
|
|
60
66
|
};
|
package/dist/main-server.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export type { CardLinkProps } from './molecules/CardLink/CardLink';
|
|
|
47
47
|
export { Breadcrumbs } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
48
48
|
export type { BreadcrumbProps, Breadcrumb } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
49
49
|
export { Disclaimer } from './molecules/Disclaimer/Disclaimer';
|
|
50
|
-
export type { DisclaimerProps,
|
|
50
|
+
export type { DisclaimerProps, DisclaimerColorToken, DisclaimerIcon, DisclaimerContentProps, DisclaimerIconProps, DisclaimerPrimaryProps, DisclaimerSubtextProps, DisclaimerCTAProps, } from './molecules/Disclaimer/Disclaimer';
|
|
51
51
|
export { Admonition } from './molecules/Admonition/Admonition';
|
|
52
52
|
export type { AdmonitionProps, AdmonitionVariant } from './molecules/Admonition/Admonition';
|
|
53
53
|
export { CustomWizardBadge } from './molecules/CustomWizardBadge/CustomWizardBadge';
|
|
@@ -1,13 +1,39 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
export
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '../../atoms/Icon/Icon';
|
|
3
|
+
export type DisclaimerColorToken = "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
|
|
4
|
+
export type DisclaimerIcon = "info" | "question" | "warning" | "security" | "lock";
|
|
5
|
+
export interface DisclaimerProps extends ComponentPropsWithoutRef<"aside"> {
|
|
6
|
+
backgroundColorToken?: DisclaimerColorToken;
|
|
7
|
+
borderColorToken?: DisclaimerColorToken;
|
|
8
|
+
layout?: "inline" | "stacked";
|
|
9
|
+
}
|
|
10
|
+
export interface DisclaimerContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export interface DisclaimerIconProps extends Omit<IconProps, "iconKey"> {
|
|
14
|
+
icon?: DisclaimerIcon;
|
|
15
|
+
iconKey?: IconProps["iconKey"];
|
|
16
|
+
}
|
|
17
|
+
export interface DisclaimerPrimaryProps extends ComponentPropsWithoutRef<"span"> {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface DisclaimerSubtextProps extends ComponentPropsWithoutRef<"span"> {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export interface DisclaimerCTAProps extends ComponentPropsWithoutRef<"div"> {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
declare function DisclaimerRoot({ backgroundColorToken, borderColorToken, layout, className, children, ...otherProps }: DisclaimerProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function DisclaimerContent({ className, children, ...otherProps }: DisclaimerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function DisclaimerIcon({ icon, iconKey, className, ...otherProps }: DisclaimerIconProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function DisclaimerPrimary({ className, children, ...otherProps }: DisclaimerPrimaryProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function DisclaimerSubtext({ className, children, ...otherProps }: DisclaimerSubtextProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function DisclaimerCTA({ className, children, ...otherProps }: DisclaimerCTAProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const Disclaimer: typeof DisclaimerRoot & {
|
|
33
|
+
Content: typeof DisclaimerContent;
|
|
34
|
+
Icon: typeof DisclaimerIcon;
|
|
35
|
+
Primary: typeof DisclaimerPrimary;
|
|
36
|
+
Subtext: typeof DisclaimerSubtext;
|
|
37
|
+
CTA: typeof DisclaimerCTA;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -1,48 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Icon as d } from "../../atoms/Icon/Icon.js";
|
|
4
|
+
import '../../assets/Disclaimer.css';const _ = "_disclaimer_1bxdj_1", b = "_content_1bxdj_12", u = "_primary_1bxdj_26", l = "_subtext_1bxdj_27", m = "_icon_1bxdj_31", x = "_cta_1bxdj_46", a = {
|
|
5
|
+
disclaimer: _,
|
|
6
|
+
content: b,
|
|
7
|
+
"layout-stacked": "_layout-stacked_1bxdj_20",
|
|
8
|
+
primary: u,
|
|
9
|
+
subtext: l,
|
|
10
|
+
icon: m,
|
|
11
|
+
cta: x,
|
|
12
|
+
"background-neutral": "_background-neutral_1bxdj_50",
|
|
13
|
+
"background-secondary": "_background-secondary_1bxdj_54",
|
|
14
|
+
"background-caution-tips": "_background-caution-tips_1bxdj_58",
|
|
15
|
+
"background-warning": "_background-warning_1bxdj_62",
|
|
16
|
+
"background-success": "_background-success_1bxdj_66",
|
|
17
|
+
"background-error-warning": "_background-error-warning_1bxdj_70",
|
|
18
|
+
"border-neutral": "_border-neutral_1bxdj_74",
|
|
19
|
+
"border-secondary": "_border-secondary_1bxdj_78",
|
|
20
|
+
"border-caution-tips": "_border-caution-tips_1bxdj_82",
|
|
21
|
+
"border-warning": "_border-warning_1bxdj_86",
|
|
22
|
+
"border-success": "_border-success_1bxdj_90",
|
|
23
|
+
"border-error-warning": "_border-error-warning_1bxdj_94"
|
|
24
|
+
}, g = {
|
|
25
|
+
info: "fa-solid fa-circle-info",
|
|
26
|
+
question: "fa-solid fa-circle-question",
|
|
27
|
+
warning: "fa-solid fa-triangle-exclamation",
|
|
28
|
+
security: "fa-solid fa-shield",
|
|
29
|
+
lock: "fa-solid fa-lock"
|
|
13
30
|
};
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
linkHref: o,
|
|
22
|
-
linkText: s
|
|
31
|
+
function f({
|
|
32
|
+
backgroundColorToken: r = "neutral",
|
|
33
|
+
borderColorToken: n = "neutral",
|
|
34
|
+
layout: o = "stacked",
|
|
35
|
+
className: t,
|
|
36
|
+
children: i,
|
|
37
|
+
...s
|
|
23
38
|
}) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"div",
|
|
39
|
+
return /* @__PURE__ */ c(
|
|
40
|
+
"aside",
|
|
27
41
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
...s,
|
|
43
|
+
className: e(
|
|
44
|
+
a.disclaimer,
|
|
45
|
+
a[`background-${r}`],
|
|
46
|
+
a[`border-${n}`],
|
|
47
|
+
a[`layout-${o}`],
|
|
48
|
+
t
|
|
32
49
|
),
|
|
33
50
|
role: "note",
|
|
34
|
-
|
|
35
|
-
children: /* @__PURE__ */ c("div", { className: n.header, children: [
|
|
36
|
-
/* @__PURE__ */ a(g, { iconKey: _, size: "sm", colorToken: f }),
|
|
37
|
-
/* @__PURE__ */ c("div", { className: n.content, children: [
|
|
38
|
-
/* @__PURE__ */ a(t, { as: "p", size: "sm", weight: "semibold", children: l }),
|
|
39
|
-
!e && r && /* @__PURE__ */ a(t, { as: "p", size: "xs", colorToken: "primary", className: n.description, children: r }),
|
|
40
|
-
!e && o && s && /* @__PURE__ */ a(p, { href: o, target: "_blank", rel: "noopener noreferrer", size: "xs", children: s })
|
|
41
|
-
] })
|
|
42
|
-
] })
|
|
51
|
+
children: i
|
|
43
52
|
}
|
|
44
53
|
);
|
|
45
54
|
}
|
|
55
|
+
function j({ className: r, children: n, ...o }) {
|
|
56
|
+
return /* @__PURE__ */ c("div", { ...o, className: e(a.content, r), children: n });
|
|
57
|
+
}
|
|
58
|
+
function k({ icon: r = "info", iconKey: n, className: o, ...t }) {
|
|
59
|
+
return /* @__PURE__ */ c(d, { ...t, iconKey: n ?? g[r], className: e(a.icon, o) });
|
|
60
|
+
}
|
|
61
|
+
function y({ className: r, children: n, ...o }) {
|
|
62
|
+
return /* @__PURE__ */ c("span", { ...o, className: e(a.primary, r), children: n });
|
|
63
|
+
}
|
|
64
|
+
function p({ className: r, children: n, ...o }) {
|
|
65
|
+
return /* @__PURE__ */ c("span", { ...o, className: e(a.subtext, r), children: n });
|
|
66
|
+
}
|
|
67
|
+
function w({ className: r, children: n, ...o }) {
|
|
68
|
+
return /* @__PURE__ */ c("div", { ...o, className: e(a.cta, r), children: n });
|
|
69
|
+
}
|
|
70
|
+
const I = Object.assign(f, {
|
|
71
|
+
Content: j,
|
|
72
|
+
Icon: k,
|
|
73
|
+
Primary: y,
|
|
74
|
+
Subtext: p,
|
|
75
|
+
CTA: w
|
|
76
|
+
});
|
|
46
77
|
export {
|
|
47
|
-
|
|
78
|
+
I as Disclaimer
|
|
48
79
|
};
|
|
@@ -1,53 +1,41 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { Disclaimer } from './Disclaimer';
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
5
|
-
component:
|
|
4
|
+
component: (({ backgroundColorToken, borderColorToken, layout, className, children, ...otherProps }: import('./Disclaimer').DisclaimerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
5
|
+
Content: ({ className, children, ...otherProps }: import('./Disclaimer').DisclaimerContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Icon: ({ icon, iconKey, className, ...otherProps }: import('./Disclaimer').DisclaimerIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Primary: ({ className, children, ...otherProps }: import('./Disclaimer').DisclaimerPrimaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Subtext: ({ className, children, ...otherProps }: import('./Disclaimer').DisclaimerSubtextProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
CTA: ({ className, children, ...otherProps }: import('./Disclaimer').DisclaimerCTAProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
6
11
|
tags: string[];
|
|
7
12
|
parameters: {
|
|
8
13
|
layout: string;
|
|
9
14
|
};
|
|
15
|
+
args: {
|
|
16
|
+
backgroundColorToken: "secondary";
|
|
17
|
+
borderColorToken: "secondary";
|
|
18
|
+
layout: "stacked";
|
|
19
|
+
};
|
|
10
20
|
argTypes: {
|
|
11
|
-
|
|
12
|
-
control: "
|
|
13
|
-
|
|
21
|
+
backgroundColorToken: {
|
|
22
|
+
control: "select";
|
|
23
|
+
options: readonly ["neutral", "secondary", "caution-tips", "warning", "success", "error-warning"];
|
|
14
24
|
};
|
|
15
|
-
|
|
16
|
-
control: "
|
|
17
|
-
|
|
25
|
+
borderColorToken: {
|
|
26
|
+
control: "select";
|
|
27
|
+
options: readonly ["neutral", "secondary", "caution-tips", "warning", "success", "error-warning"];
|
|
18
28
|
};
|
|
19
|
-
|
|
20
|
-
control:
|
|
21
|
-
type: "radio";
|
|
22
|
-
};
|
|
29
|
+
layout: {
|
|
30
|
+
control: "radio";
|
|
23
31
|
options: string[];
|
|
24
|
-
description: string;
|
|
25
|
-
};
|
|
26
|
-
compact: {
|
|
27
|
-
control: "boolean";
|
|
28
|
-
description: string;
|
|
29
32
|
};
|
|
30
|
-
linkHref: {
|
|
31
|
-
control: "text";
|
|
32
|
-
description: string;
|
|
33
|
-
};
|
|
34
|
-
linkText: {
|
|
35
|
-
control: "text";
|
|
36
|
-
description: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
args: {
|
|
40
|
-
title: string;
|
|
41
|
-
description: string;
|
|
42
|
-
severity: "warning";
|
|
43
|
-
compact: false;
|
|
44
|
-
linkHref: string;
|
|
45
|
-
linkText: string;
|
|
46
33
|
};
|
|
47
34
|
};
|
|
48
35
|
export default meta;
|
|
49
36
|
type Story = StoryObj<typeof meta>;
|
|
50
|
-
export declare const
|
|
51
|
-
export declare const
|
|
52
|
-
export declare const
|
|
53
|
-
export declare const
|
|
37
|
+
export declare const AllProps: Story;
|
|
38
|
+
export declare const Layouts: Story;
|
|
39
|
+
export declare const ColorTokens: Story;
|
|
40
|
+
export declare const IconOptions: Story;
|
|
41
|
+
export declare const WithCTA: Story;
|
|
@@ -1,72 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsx as n, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Disclaimer as e } from "./Disclaimer.js";
|
|
3
|
+
const i = ["neutral", "secondary", "caution-tips", "warning", "success", "error-warning"], d = {
|
|
3
4
|
title: "Case Parts/Molecules/Disclaimer",
|
|
4
|
-
component:
|
|
5
|
+
component: e,
|
|
5
6
|
tags: ["autodocs"],
|
|
6
|
-
parameters: {
|
|
7
|
-
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
args: {
|
|
9
|
+
backgroundColorToken: "secondary",
|
|
10
|
+
borderColorToken: "secondary",
|
|
11
|
+
layout: "stacked"
|
|
8
12
|
},
|
|
9
13
|
argTypes: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
description: {
|
|
15
|
-
control: "text",
|
|
16
|
-
description: "Supporting disclaimer message."
|
|
17
|
-
},
|
|
18
|
-
severity: {
|
|
19
|
-
control: { type: "radio" },
|
|
20
|
-
options: ["info", "warning"],
|
|
21
|
-
description: "Visual severity variant."
|
|
22
|
-
},
|
|
23
|
-
compact: {
|
|
24
|
-
control: "boolean",
|
|
25
|
-
description: "Hides description and link when true."
|
|
26
|
-
},
|
|
27
|
-
linkHref: {
|
|
28
|
-
control: "text",
|
|
29
|
-
description: "Optional external link URL."
|
|
30
|
-
},
|
|
31
|
-
linkText: {
|
|
32
|
-
control: "text",
|
|
33
|
-
description: "Optional external link label."
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
args: {
|
|
37
|
-
title: "Custom Parts Lead Time",
|
|
38
|
-
description: "Custom-made parts are non-refundable and may require additional production time.",
|
|
39
|
-
severity: "warning",
|
|
40
|
-
compact: !1,
|
|
41
|
-
linkHref: "",
|
|
42
|
-
linkText: ""
|
|
43
|
-
}
|
|
44
|
-
}, n = {}, r = {
|
|
45
|
-
args: {
|
|
46
|
-
title: "UPS 2nd Day Air",
|
|
47
|
-
description: "In-stock orders placed during business hours usually ship the same day and arrive within two business days.",
|
|
48
|
-
severity: "info"
|
|
49
|
-
}
|
|
50
|
-
}, o = {
|
|
51
|
-
args: {
|
|
52
|
-
title: "CA Prop 65 Warning",
|
|
53
|
-
description: "Some products sold by Case Parts may expose you to chemicals known to the State of California to cause cancer or reproductive harm.",
|
|
54
|
-
severity: "warning",
|
|
55
|
-
linkHref: "https://www.p65warnings.ca.gov",
|
|
56
|
-
linkText: "www.p65warnings.ca.gov"
|
|
14
|
+
backgroundColorToken: { control: "select", options: i },
|
|
15
|
+
borderColorToken: { control: "select", options: i },
|
|
16
|
+
layout: { control: "radio", options: ["inline", "stacked"] }
|
|
57
17
|
}
|
|
18
|
+
}, l = {
|
|
19
|
+
render: (r) => /* @__PURE__ */ n("div", { style: { width: 640 }, children: /* @__PURE__ */ n(e, { ...r, children: /* @__PURE__ */ o(e.Content, { children: [
|
|
20
|
+
/* @__PURE__ */ n(e.Icon, { icon: "info", size: "sm", colorToken: "secondary" }),
|
|
21
|
+
/* @__PURE__ */ n(e.Primary, { children: "Custom parts may require additional production time." }),
|
|
22
|
+
/* @__PURE__ */ n(e.Subtext, { children: "Orders cannot be changed after production begins." })
|
|
23
|
+
] }) }) })
|
|
58
24
|
}, a = {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
25
|
+
render: () => /* @__PURE__ */ n("div", { style: { display: "grid", gap: 16, width: 640 }, children: ["inline", "stacked"].map((r) => /* @__PURE__ */ n(e, { backgroundColorToken: "secondary", borderColorToken: "secondary", layout: r, children: /* @__PURE__ */ o(e.Content, { children: [
|
|
26
|
+
/* @__PURE__ */ n(e.Icon, { icon: "info", size: "sm", colorToken: "secondary" }),
|
|
27
|
+
/* @__PURE__ */ o(e.Primary, { children: [
|
|
28
|
+
r === "inline" ? "Inline" : "Stacked",
|
|
29
|
+
" primary text."
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ n(e.Subtext, { children: "Supporting text for this disclaimer." })
|
|
32
|
+
] }) }, r)) })
|
|
33
|
+
}, s = {
|
|
34
|
+
render: () => /* @__PURE__ */ n("div", { style: { display: "grid", gap: 12, width: 640 }, children: i.map((r) => /* @__PURE__ */ n(e, { backgroundColorToken: r, borderColorToken: r, layout: "inline", children: /* @__PURE__ */ o(e.Content, { children: [
|
|
35
|
+
/* @__PURE__ */ n(e.Icon, { icon: "info", size: "sm" }),
|
|
36
|
+
/* @__PURE__ */ n(e.Primary, { children: r }),
|
|
37
|
+
/* @__PURE__ */ n(e.Subtext, { children: "Background and border token." })
|
|
38
|
+
] }) }, r)) })
|
|
39
|
+
}, h = {
|
|
40
|
+
render: () => /* @__PURE__ */ o("div", { style: { display: "grid", gap: 12, width: 640 }, children: [
|
|
41
|
+
["info", "question", "warning", "security", "lock"].map((r) => /* @__PURE__ */ n(e, { backgroundColorToken: "neutral", borderColorToken: "neutral", layout: "inline", children: /* @__PURE__ */ o(e.Content, { children: [
|
|
42
|
+
/* @__PURE__ */ n(e.Icon, { icon: r, size: "sm" }),
|
|
43
|
+
/* @__PURE__ */ n(e.Primary, { children: r })
|
|
44
|
+
] }) }, r)),
|
|
45
|
+
/* @__PURE__ */ n(e, { backgroundColorToken: "neutral", borderColorToken: "neutral", layout: "inline", children: /* @__PURE__ */ o(e.Content, { children: [
|
|
46
|
+
/* @__PURE__ */ n(e.Icon, { iconKey: "fa-regular fa-circle-question", size: "sm" }),
|
|
47
|
+
/* @__PURE__ */ n(e.Primary, { children: "Custom icon key" })
|
|
48
|
+
] }) })
|
|
49
|
+
] })
|
|
50
|
+
}, u = {
|
|
51
|
+
render: () => /* @__PURE__ */ n("div", { style: { width: 640 }, children: /* @__PURE__ */ o(e, { backgroundColorToken: "caution-tips", borderColorToken: "caution-tips", children: [
|
|
52
|
+
/* @__PURE__ */ o(e.Content, { children: [
|
|
53
|
+
/* @__PURE__ */ n(e.Icon, { icon: "warning", size: "sm", colorToken: "warning" }),
|
|
54
|
+
/* @__PURE__ */ n(e.Primary, { children: "Some installation conditions need review." }),
|
|
55
|
+
/* @__PURE__ */ o(e.Subtext, { children: [
|
|
56
|
+
"See the ",
|
|
57
|
+
/* @__PURE__ */ n("a", { href: "https://www.caseparts.com", children: "installation guide" }),
|
|
58
|
+
" before ordering."
|
|
59
|
+
] })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ n(e.CTA, { children: /* @__PURE__ */ n("a", { href: "https://www.caseparts.com", children: "Review" }) })
|
|
62
|
+
] }) })
|
|
65
63
|
};
|
|
66
64
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
l as AllProps,
|
|
66
|
+
s as ColorTokens,
|
|
67
|
+
h as IconOptions,
|
|
68
|
+
a as Layouts,
|
|
69
|
+
u as WithCTA,
|
|
70
|
+
d as default
|
|
72
71
|
};
|