@caseparts-org/caseblocks 0.0.163 → 0.0.165
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 -0
- package/dist/assets/ToggleSwitch.css +1 -0
- package/dist/atoms/ToggleSwitch/ToggleSwitch.d.ts +9 -0
- package/dist/atoms/ToggleSwitch/ToggleSwitch.js +60 -0
- package/dist/atoms/ToggleSwitch/ToggleSwitch.stories.d.ts +22 -0
- package/dist/atoms/ToggleSwitch/ToggleSwitch.stories.js +48 -0
- package/dist/main-client.js +91 -87
- package/dist/main-server.d.ts +4 -0
- package/dist/main-server.js +45 -41
- package/dist/molecules/Disclaimer/Disclaimer.d.ts +13 -0
- package/dist/molecules/Disclaimer/Disclaimer.js +48 -0
- package/dist/molecules/Disclaimer/Disclaimer.stories.d.ts +53 -0
- package/dist/molecules/Disclaimer/Disclaimer.stories.js +72 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._disclaimer_hmbag_1{display:flex;flex-direction:column;gap:var(--spacing-spacing-3xs);border:1px solid var(--border-border-primary);border-radius:var(--border-radius-sm);padding:var(--spacing-spacing-2xs) var(--spacing-spacing-1xs);background:var(--surface-surface-primary)}._header_hmbag_11{display:flex;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._content_hmbag_17{display:grid;gap:var(--spacing-spacing-3xs);min-width:0}._description_hmbag_23{white-space:pre-line}._variantInfo_hmbag_27{border-color:var(--border-border-primary);background:color-mix(in srgb,var(--surface-surface-secondary) 24%,var(--surface-surface-primary))}._variantWarning_hmbag_32{border-color:var(--border-border-warning);background:color-mix(in srgb,var(--color-alerts-warning) 10%,var(--surface-surface-primary))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapper_1p695_1{display:inline-flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs);cursor:pointer}._disabled_1p695_9{cursor:not-allowed}._switch_1p695_17{position:relative;display:inline-flex}._input_1p695_22{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}._track_1p695_31{width:2.5rem;height:1.5rem;padding:2px;border-radius:999px;border:1px solid var(--border-border-primary);background-color:var(--surface-surface-secondary);transition:background-color .12s ease,border-color .12s ease}._thumb_1p695_41{display:block;width:1.1rem;height:1.1rem;border-radius:999px;background-color:var(--surface-surface-primary);box-shadow:0 1px 2px #0003;transition:transform .12s ease}._input_1p695_22:checked+._track_1p695_31{background-color:var(--surface-surface-primary-btn);border-color:var(--surface-surface-primary-btn)}._input_1p695_22:checked+._track_1p695_31 ._thumb_1p695_41{transform:translate(1rem)}._input_1p695_22:focus-visible+._track_1p695_31{outline:2px solid var(--border-border-focus);outline-offset:2px}._input_1p695_22:disabled+._track_1p695_31{background-color:var(--surface-surface-disabled-btn-focus);border-color:var(--surface-surface-disabled-btn)}._input_1p695_22:disabled+._track_1p695_31 ._thumb_1p695_41{background-color:var(--surface-surface-disabled-btn)}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { HideAtProps } from '../HideAt';
|
|
3
|
+
import { TextSize } from '../Text/Text';
|
|
4
|
+
export interface ToggleSwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type">, HideAtProps {
|
|
5
|
+
label?: string | React.ReactNode;
|
|
6
|
+
labelAlignment?: "left" | "right";
|
|
7
|
+
labelSize?: TextSize;
|
|
8
|
+
}
|
|
9
|
+
export declare function ToggleSwitch({ label, labelAlignment, hideAt, className, id, name, disabled, labelSize, ...otherProps }: ToggleSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { c as d } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { getHideAtStyles as u } from "../HideAt.js";
|
|
4
|
+
import { Text as b } from "../Text/Text.js";
|
|
5
|
+
import '../../assets/ToggleSwitch.css';const w = "_wrapper_1p695_1", f = "_disabled_1p695_9", N = "_label_1p695_13", x = "_input_1p695_22", k = "_track_1p695_31", g = "_thumb_1p695_41", t = {
|
|
6
|
+
wrapper: w,
|
|
7
|
+
disabled: f,
|
|
8
|
+
label: N,
|
|
9
|
+
switch: "_switch_1p695_17",
|
|
10
|
+
input: x,
|
|
11
|
+
track: k,
|
|
12
|
+
thumb: g
|
|
13
|
+
};
|
|
14
|
+
function z({
|
|
15
|
+
label: e,
|
|
16
|
+
labelAlignment: c = "left",
|
|
17
|
+
hideAt: n,
|
|
18
|
+
className: o,
|
|
19
|
+
id: _,
|
|
20
|
+
name: a,
|
|
21
|
+
disabled: r,
|
|
22
|
+
labelSize: m = "sm",
|
|
23
|
+
...h
|
|
24
|
+
}) {
|
|
25
|
+
const l = _ ?? a, p = e ? /* @__PURE__ */ s(b, { size: m, className: t.label, children: e }) : null;
|
|
26
|
+
return /* @__PURE__ */ i(
|
|
27
|
+
"label",
|
|
28
|
+
{
|
|
29
|
+
htmlFor: l,
|
|
30
|
+
className: d(
|
|
31
|
+
t.wrapper,
|
|
32
|
+
r && t.disabled,
|
|
33
|
+
u(n),
|
|
34
|
+
o
|
|
35
|
+
),
|
|
36
|
+
children: [
|
|
37
|
+
c === "left" && p,
|
|
38
|
+
/* @__PURE__ */ i("span", { className: t.switch, children: [
|
|
39
|
+
/* @__PURE__ */ s(
|
|
40
|
+
"input",
|
|
41
|
+
{
|
|
42
|
+
id: l,
|
|
43
|
+
name: a,
|
|
44
|
+
type: "checkbox",
|
|
45
|
+
role: "switch",
|
|
46
|
+
disabled: r,
|
|
47
|
+
className: t.input,
|
|
48
|
+
...h
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ s("span", { className: t.track, "aria-hidden": "true", children: /* @__PURE__ */ s("span", { className: t.thumb }) })
|
|
52
|
+
] }),
|
|
53
|
+
c === "right" && p
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
z as ToggleSwitch
|
|
60
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ToggleSwitch } from './ToggleSwitch';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ToggleSwitch;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
label: {
|
|
11
|
+
control: "text";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Default: Story;
|
|
19
|
+
export declare const Checked: Story;
|
|
20
|
+
export declare const WithLabel: Story;
|
|
21
|
+
export declare const WithRightLabel: Story;
|
|
22
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ToggleSwitch as e } from "./ToggleSwitch.js";
|
|
2
|
+
const t = {
|
|
3
|
+
title: "Case Parts/Atoms/ToggleSwitch",
|
|
4
|
+
component: e,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: "centered"
|
|
7
|
+
},
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: {
|
|
10
|
+
control: "text"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
tags: ["autodocs"]
|
|
14
|
+
}, r = {
|
|
15
|
+
args: {
|
|
16
|
+
"aria-label": "Save card"
|
|
17
|
+
}
|
|
18
|
+
}, l = {
|
|
19
|
+
args: {
|
|
20
|
+
"aria-label": "Save card",
|
|
21
|
+
defaultChecked: !0
|
|
22
|
+
}
|
|
23
|
+
}, s = {
|
|
24
|
+
args: {
|
|
25
|
+
label: "Save for future purchases",
|
|
26
|
+
defaultChecked: !0
|
|
27
|
+
}
|
|
28
|
+
}, c = {
|
|
29
|
+
args: {
|
|
30
|
+
label: "Save for future purchases",
|
|
31
|
+
labelAlignment: "right",
|
|
32
|
+
defaultChecked: !0
|
|
33
|
+
}
|
|
34
|
+
}, o = {
|
|
35
|
+
args: {
|
|
36
|
+
label: "Save for future purchases",
|
|
37
|
+
disabled: !0,
|
|
38
|
+
defaultChecked: !0
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
l as Checked,
|
|
43
|
+
r as Default,
|
|
44
|
+
o as Disabled,
|
|
45
|
+
s as WithLabel,
|
|
46
|
+
c as WithRightLabel,
|
|
47
|
+
t as default
|
|
48
|
+
};
|
package/dist/main-client.js
CHANGED
|
@@ -1,104 +1,108 @@
|
|
|
1
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
|
-
import { Head as
|
|
4
|
+
import { Head as i } from "./atoms/Root/Head.js";
|
|
5
5
|
import { Icon as l } from "./atoms/Icon/Icon.js";
|
|
6
6
|
import { Root as u } from "./atoms/Root/Root.js";
|
|
7
7
|
import { Separator as s } from "./atoms/Separator/Separator.js";
|
|
8
|
-
import { Text as
|
|
8
|
+
import { Text as C } from "./atoms/Text/Text.js";
|
|
9
9
|
import { Input as S } from "./atoms/Input/Input.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
10
|
+
import { ToggleSwitch as w } from "./atoms/ToggleSwitch/ToggleSwitch.js";
|
|
11
|
+
import { Link as T } from "./atoms/Link/Link.js";
|
|
12
|
+
import { linkClassName as B } from "./atoms/Link/linkClassName.js";
|
|
13
|
+
import { configureLink as h, routerOverride as v } from "./atoms/Link/configureLink.js";
|
|
14
|
+
import { LinkButton as b } from "./atoms/LinkButton/LinkButton.js";
|
|
15
|
+
import { configureImage as F } from "./atoms/Image/configureImage.js";
|
|
16
|
+
import { getHideAtStyles as N } from "./atoms/HideAt.js";
|
|
17
|
+
import { Logo as z } from "./molecules/Logo/Logo.js";
|
|
18
|
+
import { SearchBox as E } from "./molecules/SearchBox/SearchBox.js";
|
|
19
|
+
import { QuantityInput as O } from "./molecules/QuantityInput/QuantityInput.js";
|
|
20
|
+
import { Pricing as R } from "./molecules/Pricing/Pricing.js";
|
|
21
|
+
import { Availability as j } from "./molecules/Availability/Availability.js";
|
|
22
|
+
import { Avatar as J } from "./molecules/Avatar/Avatar.js";
|
|
23
|
+
import { BannerCard as U } from "./molecules/BannerCard/BannerCard.js";
|
|
24
|
+
import { CardLink as X } from "./molecules/CardLink/CardLink.js";
|
|
25
|
+
import { Breadcrumbs as _ } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
26
|
+
import { Disclaimer as rr } from "./molecules/Disclaimer/Disclaimer.js";
|
|
27
|
+
import { NotFound as er } from "./organisms/NotFound/NotFound.js";
|
|
28
|
+
import { HorizontalScroll as pr } from "./atoms/HorizontalScroll/HorizontalScroll.js";
|
|
29
|
+
import { SlideInPanel as fr } from "./atoms/SlideInPanel/SlideInPanel.js";
|
|
30
|
+
import { Markdown as ar } from "./atoms/Markdown/Markdown.js";
|
|
31
|
+
import { PreprocessedMarkdown as nr } from "./atoms/Markdown/PreprocessedMarkdown.js";
|
|
32
|
+
import { usePreprocessedMarkdown as dr } from "./atoms/Markdown/usePreprocessedMarkdown.js";
|
|
33
|
+
import { Tooltip as cr } from "./atoms/Tooltip/Tooltip.js";
|
|
34
|
+
import { Popover as gr } from "./atoms/Popover/Popover.js";
|
|
35
|
+
import { Account as kr } from "./molecules/Account/Account.js";
|
|
36
|
+
import { Chip as Pr } from "./molecules/Chip/Chip.js";
|
|
37
|
+
import { ToggleView as Ir } from "./molecules/ToggleView/ToggleView.js";
|
|
38
|
+
import { CartPart as Ar } from "./molecules/Cart/CartPart.js";
|
|
39
|
+
import { CartSlideInPanel as Mr } from "./molecules/Cart/CartSlideInPanel.js";
|
|
40
|
+
import { StatefulButton as vr } from "./molecules/StatefulButton/StatefulButton.js";
|
|
41
|
+
import { AnimatedCheckMark as br } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
42
|
+
import { AddToCart as Fr } from "./molecules/AddToCart/AddToCart.js";
|
|
43
|
+
import { Modal as Nr } from "./molecules/Modal/Modal.js";
|
|
44
|
+
import { ImageViewer as zr } from "./molecules/ImageViewer/ImageViewer.js";
|
|
45
|
+
import { T as Er } from "./Table-BX4PtCNE.js";
|
|
46
|
+
import { Error as Or } from "./molecules/Error/Error.js";
|
|
47
|
+
import { MainNav as Rr } from "./organisms/MainNav/MainNav.js";
|
|
48
|
+
import { ChipSelector as jr } from "./organisms/ChipSelector/ChipSelector.js";
|
|
49
|
+
import { Product as Jr } from "./organisms/Product/Product.js";
|
|
50
|
+
import { Carousel as Ur } from "./organisms/Carousel/Carousel.js";
|
|
51
|
+
import { Footer as Xr } from "./organisms/Footer/Footer.js";
|
|
52
|
+
import { default as _r } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
|
|
51
53
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
kr as Account,
|
|
55
|
+
Fr as AddToCart,
|
|
56
|
+
br as AnimatedCheckMark,
|
|
57
|
+
j as Availability,
|
|
58
|
+
J as Avatar,
|
|
59
|
+
U as BannerCard,
|
|
60
|
+
_ as Breadcrumbs,
|
|
59
61
|
e as Button,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
X as CardLink,
|
|
63
|
+
Ur as Carousel,
|
|
64
|
+
Ar as CartPart,
|
|
65
|
+
Mr as CartSlideInPanel,
|
|
66
|
+
Pr as Chip,
|
|
67
|
+
jr as ChipSelector,
|
|
66
68
|
f as Column,
|
|
67
|
-
|
|
69
|
+
rr as Disclaimer,
|
|
70
|
+
Or as Error,
|
|
68
71
|
p as Flex,
|
|
69
|
-
|
|
72
|
+
Xr as Footer,
|
|
70
73
|
x as Grid,
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
i as Head,
|
|
75
|
+
pr as HorizontalScroll,
|
|
73
76
|
l as Icon,
|
|
74
|
-
|
|
77
|
+
zr as ImageViewer,
|
|
75
78
|
S as Input,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
T as Link,
|
|
80
|
+
b as LinkButton,
|
|
81
|
+
z as Logo,
|
|
82
|
+
Rr as MainNav,
|
|
83
|
+
ar as Markdown,
|
|
84
|
+
Nr as Modal,
|
|
85
|
+
er as NotFound,
|
|
86
|
+
gr as Popover,
|
|
87
|
+
nr as PreprocessedMarkdown,
|
|
88
|
+
R as Pricing,
|
|
89
|
+
Jr as Product,
|
|
90
|
+
O as QuantityInput,
|
|
88
91
|
u as Root,
|
|
89
|
-
|
|
92
|
+
E as SearchBox,
|
|
90
93
|
s as Separator,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
fr as SlideInPanel,
|
|
95
|
+
_r as SpinZoomViewer,
|
|
96
|
+
vr as StatefulButton,
|
|
97
|
+
Er as Table,
|
|
98
|
+
C as Text,
|
|
99
|
+
w as ToggleSwitch,
|
|
100
|
+
Ir as ToggleView,
|
|
101
|
+
cr as Tooltip,
|
|
102
|
+
F as configureImage,
|
|
103
|
+
h as configureLink,
|
|
104
|
+
N as getHideAtStyles,
|
|
105
|
+
B as linkClassName,
|
|
106
|
+
v as routerOverride,
|
|
107
|
+
dr as usePreprocessedMarkdown
|
|
104
108
|
};
|
package/dist/main-server.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { Text } from './atoms/Text/Text';
|
|
|
14
14
|
export type { TextProps } from './atoms/Text/Text';
|
|
15
15
|
export { Input } from './atoms/Input/Input';
|
|
16
16
|
export type { InputProps } from './atoms/Input/Input';
|
|
17
|
+
export { ToggleSwitch } from './atoms/ToggleSwitch/ToggleSwitch';
|
|
18
|
+
export type { ToggleSwitchProps } from './atoms/ToggleSwitch/ToggleSwitch';
|
|
17
19
|
export { Link } from './atoms/Link/Link';
|
|
18
20
|
export type { LinkProps, LinkImplementation as RouterLike } from './atoms/Link/Link';
|
|
19
21
|
export { linkClassName } from './atoms/Link/linkClassName';
|
|
@@ -42,5 +44,7 @@ export { CardLink } from './molecules/CardLink/CardLink';
|
|
|
42
44
|
export type { CardLinkProps } from './molecules/CardLink/CardLink';
|
|
43
45
|
export { Breadcrumbs } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
44
46
|
export type { BreadcrumbProps, Breadcrumb } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
47
|
+
export { Disclaimer } from './molecules/Disclaimer/Disclaimer';
|
|
48
|
+
export type { DisclaimerProps, DisclaimerSeverity } from './molecules/Disclaimer/Disclaimer';
|
|
45
49
|
export { NotFound } from './organisms/NotFound/NotFound';
|
|
46
50
|
export type { NotFoundProps } from './organisms/NotFound/NotFound';
|
package/dist/main-server.js
CHANGED
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
import { Button as
|
|
1
|
+
import { Button as e } from "./atoms/Button/Button.js";
|
|
2
2
|
import { Flex as m } from "./atoms/Flex/Flex.js";
|
|
3
3
|
import { Column as x, Grid as f } from "./atoms/Grid/Grid.js";
|
|
4
|
-
import { Head as
|
|
4
|
+
import { Head as n } from "./atoms/Root/Head.js";
|
|
5
5
|
import { Icon as u } from "./atoms/Icon/Icon.js";
|
|
6
|
-
import { Root as
|
|
6
|
+
import { Root as c } from "./atoms/Root/Root.js";
|
|
7
7
|
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
8
|
-
import { Text as
|
|
9
|
-
import { Input as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
8
|
+
import { Text as s } from "./atoms/Text/Text.js";
|
|
9
|
+
import { Input as L } from "./atoms/Input/Input.js";
|
|
10
|
+
import { ToggleSwitch as I } from "./atoms/ToggleSwitch/ToggleSwitch.js";
|
|
11
|
+
import { Link as v } from "./atoms/Link/Link.js";
|
|
12
|
+
import { linkClassName as A } from "./atoms/Link/linkClassName.js";
|
|
13
|
+
import { configureLink as h, routerOverride as F } from "./atoms/Link/configureLink.js";
|
|
14
|
+
import { LinkButton as N } from "./atoms/LinkButton/LinkButton.js";
|
|
15
|
+
import { configureImage as w } from "./atoms/Image/configureImage.js";
|
|
16
|
+
import { getHideAtStyles as G } from "./atoms/HideAt.js";
|
|
17
|
+
import { Logo as P } from "./molecules/Logo/Logo.js";
|
|
18
|
+
import { SearchBox as R } from "./molecules/SearchBox/SearchBox.js";
|
|
18
19
|
import { QuantityInput as q } from "./molecules/QuantityInput/QuantityInput.js";
|
|
19
|
-
import { Pricing as
|
|
20
|
-
import { Availability as
|
|
21
|
-
import { Avatar as
|
|
22
|
-
import { BannerCard as
|
|
23
|
-
import { CardLink as
|
|
24
|
-
import { Breadcrumbs as
|
|
25
|
-
import {
|
|
20
|
+
import { Pricing as E } from "./molecules/Pricing/Pricing.js";
|
|
21
|
+
import { Availability as K } from "./molecules/Availability/Availability.js";
|
|
22
|
+
import { Avatar as U } from "./molecules/Avatar/Avatar.js";
|
|
23
|
+
import { BannerCard as W } from "./molecules/BannerCard/BannerCard.js";
|
|
24
|
+
import { CardLink as Y } from "./molecules/CardLink/CardLink.js";
|
|
25
|
+
import { Breadcrumbs as _ } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
26
|
+
import { Disclaimer as rr } from "./molecules/Disclaimer/Disclaimer.js";
|
|
27
|
+
import { NotFound as er } from "./organisms/NotFound/NotFound.js";
|
|
26
28
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
K as Availability,
|
|
30
|
+
U as Avatar,
|
|
31
|
+
W as BannerCard,
|
|
32
|
+
_ as Breadcrumbs,
|
|
33
|
+
e as Button,
|
|
34
|
+
Y as CardLink,
|
|
33
35
|
x as Column,
|
|
36
|
+
rr as Disclaimer,
|
|
34
37
|
m as Flex,
|
|
35
38
|
f as Grid,
|
|
36
|
-
|
|
39
|
+
n as Head,
|
|
37
40
|
u as Icon,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
L as Input,
|
|
42
|
+
v as Link,
|
|
43
|
+
N as LinkButton,
|
|
44
|
+
P as Logo,
|
|
45
|
+
er as NotFound,
|
|
46
|
+
E as Pricing,
|
|
44
47
|
q as QuantityInput,
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
c as Root,
|
|
49
|
+
R as SearchBox,
|
|
47
50
|
g as Separator,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
s as Text,
|
|
52
|
+
I as ToggleSwitch,
|
|
53
|
+
w as configureImage,
|
|
54
|
+
h as configureLink,
|
|
55
|
+
G as getHideAtStyles,
|
|
56
|
+
A as linkClassName,
|
|
57
|
+
F as routerOverride
|
|
54
58
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type DisclaimerSeverity = "info" | "warning";
|
|
3
|
+
export interface DisclaimerProps {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
severity?: DisclaimerSeverity;
|
|
7
|
+
iconKey?: "fa-solid fa-circle-info" | "fa-solid fa-triangle-exclamation";
|
|
8
|
+
className?: string;
|
|
9
|
+
compact?: boolean;
|
|
10
|
+
linkHref?: string;
|
|
11
|
+
linkText?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Disclaimer({ title, description, severity, iconKey, className, compact, linkHref, linkText, }: DisclaimerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as h } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Icon as g } from "../../atoms/Icon/Icon.js";
|
|
4
|
+
import { Link as p } from "../../atoms/Link/Link.js";
|
|
5
|
+
import { Text as t } from "../../atoms/Text/Text.js";
|
|
6
|
+
import '../../assets/Disclaimer.css';const v = "_disclaimer_hmbag_1", b = "_header_hmbag_11", x = "_content_hmbag_17", I = "_description_hmbag_23", w = "_variantInfo_hmbag_27", z = "_variantWarning_hmbag_32", n = {
|
|
7
|
+
disclaimer: v,
|
|
8
|
+
header: b,
|
|
9
|
+
content: x,
|
|
10
|
+
description: I,
|
|
11
|
+
variantInfo: w,
|
|
12
|
+
variantWarning: z
|
|
13
|
+
};
|
|
14
|
+
function u({
|
|
15
|
+
title: l,
|
|
16
|
+
description: r,
|
|
17
|
+
severity: i = "info",
|
|
18
|
+
iconKey: m,
|
|
19
|
+
className: d,
|
|
20
|
+
compact: e = !1,
|
|
21
|
+
linkHref: o,
|
|
22
|
+
linkText: s
|
|
23
|
+
}) {
|
|
24
|
+
const _ = m ?? (i === "warning" ? "fa-solid fa-triangle-exclamation" : "fa-solid fa-circle-info"), f = i === "warning" ? "warning" : "secondary";
|
|
25
|
+
return /* @__PURE__ */ a(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: h(
|
|
29
|
+
n.disclaimer,
|
|
30
|
+
i === "warning" ? n.variantWarning : n.variantInfo,
|
|
31
|
+
d
|
|
32
|
+
),
|
|
33
|
+
role: "note",
|
|
34
|
+
"aria-live": "polite",
|
|
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: "secondary", 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
|
+
] })
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
u as Disclaimer
|
|
48
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Disclaimer } from './Disclaimer';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Disclaimer;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
title: {
|
|
12
|
+
control: "text";
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
control: "text";
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
severity: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "radio";
|
|
22
|
+
};
|
|
23
|
+
options: string[];
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
compact: {
|
|
27
|
+
control: "boolean";
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
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
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default meta;
|
|
49
|
+
type Story = StoryObj<typeof meta>;
|
|
50
|
+
export declare const Warning: Story;
|
|
51
|
+
export declare const Info: Story;
|
|
52
|
+
export declare const WithLink: Story;
|
|
53
|
+
export declare const Compact: Story;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Disclaimer as t } from "./Disclaimer.js";
|
|
2
|
+
const i = {
|
|
3
|
+
title: "Case Parts/Molecules/Disclaimer",
|
|
4
|
+
component: t,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: "centered"
|
|
8
|
+
},
|
|
9
|
+
argTypes: {
|
|
10
|
+
title: {
|
|
11
|
+
control: "text",
|
|
12
|
+
description: "Short header for the disclaimer card."
|
|
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"
|
|
57
|
+
}
|
|
58
|
+
}, a = {
|
|
59
|
+
args: {
|
|
60
|
+
title: "Parts Not in Stock",
|
|
61
|
+
description: "This text is hidden when compact mode is enabled.",
|
|
62
|
+
compact: !0,
|
|
63
|
+
severity: "warning"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
a as Compact,
|
|
68
|
+
r as Info,
|
|
69
|
+
n as Warning,
|
|
70
|
+
o as WithLink,
|
|
71
|
+
i as default
|
|
72
|
+
};
|