@caseparts-org/caseblocks 0.0.250 → 0.0.252
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/Table-f_q_CCA-.js +187 -0
- package/dist/assets/Availability.css +1 -1
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/Select.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/atoms/Pill/Pill.d.ts +3 -2
- package/dist/atoms/Pill/Pill.js +29 -26
- package/dist/atoms/Select/Select.js +53 -42
- package/dist/main-client.js +1 -1
- package/dist/molecules/Availability/Availability.d.ts +6 -0
- package/dist/molecules/Availability/Availability.js +109 -57
- package/dist/molecules/Availability/Availability.stories.d.ts +4 -0
- package/dist/molecules/Availability/Availability.stories.js +33 -17
- package/dist/molecules/CustomWizardBadge/CustomWizardBadge.d.ts +3 -2
- package/dist/molecules/CustomWizardBadge/CustomWizardBadge.js +23 -22
- package/dist/molecules/Disclaimer/Disclaimer.d.ts +11 -10
- package/dist/molecules/Disclaimer/Disclaimer.js +44 -41
- package/dist/molecules/Disclaimer/Disclaimer.stories.d.ts +5 -5
- package/dist/molecules/Error/Error.d.ts +4 -3
- package/dist/molecules/Error/Error.js +104 -101
- package/dist/molecules/Modal/Modal.d.ts +1 -0
- package/dist/molecules/Modal/Modal.js +56 -44
- package/dist/molecules/Modal/Modal.stories.d.ts +1 -1
- package/dist/molecules/Modal/Modal.stories.js +50 -52
- package/dist/molecules/Table/Table.d.ts +7 -4
- package/dist/molecules/Table/Table.js +4 -3
- package/dist/molecules/Table/Table.stories.js +1 -1
- package/package.json +1 -1
- package/dist/Table-BX4PtCNE.js +0 -178
|
@@ -1,74 +1,126 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as e, jsxs as t, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { Text as s } from "../../atoms/Text/Text.js";
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
import { Tooltip as k } from "../../atoms/Tooltip/Tooltip.js";
|
|
5
|
+
import { Icon as l } from "../../atoms/Icon/Icon.js";
|
|
6
|
+
import { Disclaimer as n } from "../Disclaimer/Disclaimer.js";
|
|
7
|
+
import { Pill as w } from "../../atoms/Pill/Pill.js";
|
|
8
|
+
import '../../assets/Availability.css';const x = "_availability_4sun9_1", g = "_pointer_4sun9_8", y = "_tooltip_4sun9_12", b = "_tooltipContent_4sun9_20", T = "_tooltipHeader_4sun9_24", v = "_tooltipInfo_4sun9_33", z = "_tooltipTitle_4sun9_38", C = "_tooltipHeaderIcon_4sun9_42", H = "_tooltipHeaderAlert_4sun9_53", A = "_warehouseList_4sun9_67", K = "_warehouseName_4sun9_82", L = "_fulfillmentNotice_4sun9_93", S = "_available_4sun9_98", D = "_limited_4sun9_101", I = "_discontinued_4sun9_104", o = {
|
|
9
|
+
availability: x,
|
|
10
|
+
pointer: g,
|
|
11
|
+
tooltip: y,
|
|
12
|
+
tooltipContent: b,
|
|
13
|
+
tooltipHeader: T,
|
|
14
|
+
tooltipInfo: v,
|
|
15
|
+
tooltipTitle: z,
|
|
16
|
+
tooltipHeaderIcon: C,
|
|
17
|
+
tooltipHeaderAlert: H,
|
|
18
|
+
warehouseList: A,
|
|
19
|
+
warehouseName: K,
|
|
20
|
+
fulfillmentNotice: L,
|
|
21
|
+
available: S,
|
|
22
|
+
"in-stock": "_in-stock_4sun9_98",
|
|
23
|
+
limited: D,
|
|
24
|
+
discontinued: I
|
|
15
25
|
};
|
|
16
|
-
function
|
|
17
|
-
availId:
|
|
18
|
-
availDescription:
|
|
19
|
-
availClassName:
|
|
20
|
-
enableTooltip:
|
|
21
|
-
inventory:
|
|
26
|
+
function F({
|
|
27
|
+
availId: i,
|
|
28
|
+
availDescription: r,
|
|
29
|
+
availClassName: c,
|
|
30
|
+
enableTooltip: m = !1,
|
|
31
|
+
inventory: d
|
|
22
32
|
}) {
|
|
23
|
-
const a =
|
|
24
|
-
return a ? /* @__PURE__ */
|
|
25
|
-
|
|
33
|
+
const a = m && d && i !== "not-found";
|
|
34
|
+
return a ? /* @__PURE__ */ e(
|
|
35
|
+
k,
|
|
26
36
|
{
|
|
27
37
|
closeDelay: 0,
|
|
28
38
|
openDelay: 250,
|
|
29
39
|
position: "bottom center",
|
|
30
|
-
trigger: /* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */
|
|
40
|
+
trigger: /* @__PURE__ */ t(s, { size: "xs", className: f(o.availability, o[i], a ? o.pointer : null, c), children: [
|
|
41
|
+
r,
|
|
42
|
+
/* @__PURE__ */ e(l, { iconKey: "fa-solid fa-chevron-down", size: "3xs" })
|
|
33
43
|
] }),
|
|
34
|
-
contentClassName:
|
|
35
|
-
children: /* @__PURE__ */
|
|
44
|
+
contentClassName: o.tooltip,
|
|
45
|
+
children: /* @__PURE__ */ e(P, { availabilityId: i, inventory: d })
|
|
36
46
|
}
|
|
37
|
-
) : /* @__PURE__ */
|
|
47
|
+
) : /* @__PURE__ */ e(s, { size: "xs", className: f(o.availability, o[i], a ? o.pointer : null, c), children: r });
|
|
38
48
|
}
|
|
39
|
-
function
|
|
40
|
-
var
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
+
function P({ availabilityId: i, inventory: r }) {
|
|
50
|
+
var u, h, p;
|
|
51
|
+
const c = Math.max(0, ((u = r.MPK) == null ? void 0 : u.Unreserved) ?? 0), m = Math.max(0, ((h = r.SEA) == null ? void 0 : h.Unreserved) ?? 0), d = Math.max(0, ((p = r.STL) == null ? void 0 : p.Unreserved) ?? 0), a = c + m + d;
|
|
52
|
+
if (i === "in-stock" || i === "limited") {
|
|
53
|
+
const _ = i === "in-stock" ? "Additional quantity will be backordered. A customer service representative will contact you if fulfillment requires multiple warehouses." : "Once our stock is depleted, this item will no longer be available.";
|
|
54
|
+
return /* @__PURE__ */ t("div", { className: o.tooltipContent, children: [
|
|
55
|
+
/* @__PURE__ */ t("div", { className: o.tooltipHeader, children: [
|
|
56
|
+
/* @__PURE__ */ e("span", { className: o.tooltipHeaderIcon, children: /* @__PURE__ */ e(l, { colorToken: i === "in-stock" ? "success" : "warning", iconKey: i === "in-stock" ? "fa-solid fa-box" : "fa-solid fa-triangle-exclamation", size: "xs" }) }),
|
|
57
|
+
/* @__PURE__ */ e("div", { className: o.tooltipTitle, children: /* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: i === "limited" ? "Limited stock across 3 warehouses" : "Available across 3 warehouses" }) }),
|
|
58
|
+
/* @__PURE__ */ t(w, { colorToken: i === "limited" ? "warning" : "success", weight: "semibold", children: [
|
|
59
|
+
a,
|
|
60
|
+
" total"
|
|
61
|
+
] })
|
|
49
62
|
] }),
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
/* @__PURE__ */ t("ul", { className: o.warehouseList, children: [
|
|
64
|
+
/* @__PURE__ */ t("li", { children: [
|
|
65
|
+
/* @__PURE__ */ t(s, { size: "sm", className: o.warehouseName, children: [
|
|
66
|
+
/* @__PURE__ */ e(l, { iconKey: "fa-solid fa-box", size: "xs" }),
|
|
67
|
+
"Los Angeles"
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: c })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ t("li", { children: [
|
|
72
|
+
/* @__PURE__ */ t(s, { size: "sm", className: o.warehouseName, children: [
|
|
73
|
+
/* @__PURE__ */ e(l, { iconKey: "fa-solid fa-box", size: "xs" }),
|
|
74
|
+
"St. Louis"
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: d })
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ t("li", { children: [
|
|
79
|
+
/* @__PURE__ */ t(s, { size: "sm", className: o.warehouseName, children: [
|
|
80
|
+
/* @__PURE__ */ e(l, { iconKey: "fa-solid fa-box", size: "xs" }),
|
|
81
|
+
"Seattle"
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: m })
|
|
84
|
+
] })
|
|
66
85
|
] }),
|
|
67
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ e(n, { backgroundColorToken: i === "in-stock" ? "neutral" : "warning", layout: "stacked", className: o.fulfillmentNotice, children: /* @__PURE__ */ t(n.Content, { children: [
|
|
87
|
+
/* @__PURE__ */ e(n.Icon, { icon: i === "in-stock" ? "info" : "warning", size: "xs", colorToken: i === "in-stock" ? "secondary" : "warning" }),
|
|
88
|
+
/* @__PURE__ */ e(n.Primary, { children: i === "limited" ? "Available while supplies last" : `Need more than ${a}?` }),
|
|
89
|
+
/* @__PURE__ */ e(n.Subtext, { children: _ })
|
|
90
|
+
] }) })
|
|
68
91
|
] });
|
|
69
92
|
}
|
|
70
|
-
return
|
|
93
|
+
return i === "available" ? /* @__PURE__ */ t("div", { className: o.tooltipContent, children: [
|
|
94
|
+
/* @__PURE__ */ t("div", { className: o.tooltipHeader, children: [
|
|
95
|
+
/* @__PURE__ */ e("span", { className: o.tooltipHeaderIcon, children: /* @__PURE__ */ e(l, { colorToken: "warning", iconKey: "fa-solid fa-truck", size: "xs" }) }),
|
|
96
|
+
/* @__PURE__ */ t("div", { className: o.tooltipTitle, children: [
|
|
97
|
+
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: "Not currently in stock" }),
|
|
98
|
+
/* @__PURE__ */ e(s, { size: "xs", colorToken: "quaternary", children: "We can get this part for you." })
|
|
99
|
+
] })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ e(s, { size: "xs", className: o.tooltipInfo, children: "While this part is not currently in stock, we will arrange to get it to you asap, and your CSR will keep you advised of the lead time." }),
|
|
102
|
+
/* @__PURE__ */ e(n, { backgroundColorToken: "neutral", layout: "stacked", className: o.fulfillmentNotice, children: /* @__PURE__ */ t(n.Content, { children: [
|
|
103
|
+
/* @__PURE__ */ e(n.Icon, { icon: "info", size: "xs", colorToken: "secondary" }),
|
|
104
|
+
/* @__PURE__ */ e(n.Primary, { children: "Need it sooner?" }),
|
|
105
|
+
/* @__PURE__ */ e(n.Subtext, { children: "Contact your customer service representative for expedited options or current lead time." })
|
|
106
|
+
] }) })
|
|
107
|
+
] }) : i === "discontinued" ? /* @__PURE__ */ t("div", { className: o.tooltipContent, children: [
|
|
108
|
+
/* @__PURE__ */ t("div", { className: o.tooltipHeader, children: [
|
|
109
|
+
/* @__PURE__ */ e("span", { className: o.tooltipHeaderIcon, children: /* @__PURE__ */ e(l, { colorToken: "error-warning", iconKey: "fa-solid fa-empty-set", size: "xs" }) }),
|
|
110
|
+
/* @__PURE__ */ t("div", { className: o.tooltipTitle, children: [
|
|
111
|
+
/* @__PURE__ */ e(s, { size: "sm", weight: "semibold", children: "Discontinued" }),
|
|
112
|
+
/* @__PURE__ */ e(s, { size: "xs", colorToken: "quaternary", children: "This part is no longer available" })
|
|
113
|
+
] })
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ e(s, { size: "xs", className: o.tooltipInfo, children: "This item has been discontinued and is no longer in stock. We are unable to special order or restock it." }),
|
|
116
|
+
/* @__PURE__ */ e(n, { backgroundColorToken: "neutral", layout: "stacked", className: o.fulfillmentNotice, children: /* @__PURE__ */ t(n.Content, { children: [
|
|
117
|
+
/* @__PURE__ */ e(n.Icon, { icon: "info", size: "xs", colorToken: "secondary" }),
|
|
118
|
+
/* @__PURE__ */ e(n.Primary, { children: "Need an alternative?" }),
|
|
119
|
+
/* @__PURE__ */ e(n.Subtext, { children: "Contact your customer service representative for replacement options or compatible parts." })
|
|
120
|
+
] }) })
|
|
121
|
+
] }) : /* @__PURE__ */ e(N, {});
|
|
71
122
|
}
|
|
72
123
|
export {
|
|
73
|
-
|
|
124
|
+
F as Availability,
|
|
125
|
+
P as AvailabilityTooltipContent
|
|
74
126
|
};
|
|
@@ -45,3 +45,7 @@ export declare const Available: Story;
|
|
|
45
45
|
export declare const NotFound: Story;
|
|
46
46
|
export declare const InStockWithTooltip: Story;
|
|
47
47
|
export declare const LimitedWithTooltip: Story;
|
|
48
|
+
export declare const InStockTooltipContent: Story;
|
|
49
|
+
export declare const LimitedTooltipContent: Story;
|
|
50
|
+
export declare const AvailableTooltipContent: Story;
|
|
51
|
+
export declare const DiscontinuedTooltipContent: Story;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Availability as
|
|
3
|
-
const
|
|
2
|
+
import { Availability as a, AvailabilityTooltipContent as e } from "./Availability.js";
|
|
3
|
+
const n = (o) => /* @__PURE__ */ i(a, { ...o }), t = {
|
|
4
4
|
MPK: { Unreserved: 5, Available: 5 },
|
|
5
5
|
SEA: { Unreserved: 3, Available: 3 },
|
|
6
6
|
STL: { Unreserved: 8, Available: 8 }
|
|
7
7
|
}, r = {
|
|
8
8
|
title: "Case Parts/Molecules/Availability",
|
|
9
|
-
component:
|
|
9
|
+
component: n,
|
|
10
10
|
parameters: {
|
|
11
11
|
layout: "centered"
|
|
12
12
|
},
|
|
@@ -42,7 +42,7 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
42
42
|
inventory: t
|
|
43
43
|
},
|
|
44
44
|
tags: ["autodocs"]
|
|
45
|
-
},
|
|
45
|
+
}, c = {
|
|
46
46
|
name: "In Stock",
|
|
47
47
|
args: {
|
|
48
48
|
availId: "in-stock",
|
|
@@ -55,7 +55,7 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, d = {
|
|
59
59
|
name: "Limited",
|
|
60
60
|
args: {
|
|
61
61
|
availId: "limited",
|
|
@@ -68,7 +68,7 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
},
|
|
71
|
+
}, v = {
|
|
72
72
|
name: "Discontinued",
|
|
73
73
|
args: {
|
|
74
74
|
availId: "discontinued",
|
|
@@ -81,7 +81,7 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, p = {
|
|
85
85
|
name: "Available",
|
|
86
86
|
args: {
|
|
87
87
|
availId: "available",
|
|
@@ -94,7 +94,7 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
},
|
|
97
|
+
}, m = {
|
|
98
98
|
name: "Not Found",
|
|
99
99
|
args: {
|
|
100
100
|
availId: "not-found",
|
|
@@ -107,7 +107,7 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, y = {
|
|
111
111
|
name: "In Stock with Tooltip",
|
|
112
112
|
args: {
|
|
113
113
|
availId: "in-stock",
|
|
@@ -122,7 +122,7 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
},
|
|
125
|
+
}, b = {
|
|
126
126
|
name: "Limited with Tooltip",
|
|
127
127
|
args: {
|
|
128
128
|
availId: "limited",
|
|
@@ -141,14 +141,30 @@ const a = (e) => /* @__PURE__ */ i(o, { ...e }), t = {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
+
}, u = {
|
|
145
|
+
name: "In Stock Tooltip Content",
|
|
146
|
+
render: () => /* @__PURE__ */ i(e, { availabilityId: "in-stock", inventory: t })
|
|
147
|
+
}, I = {
|
|
148
|
+
name: "Limited Tooltip Content",
|
|
149
|
+
render: () => /* @__PURE__ */ i(e, { availabilityId: "limited", inventory: t })
|
|
150
|
+
}, h = {
|
|
151
|
+
name: "Available Tooltip Content",
|
|
152
|
+
render: () => /* @__PURE__ */ i(e, { availabilityId: "available", inventory: t })
|
|
153
|
+
}, T = {
|
|
154
|
+
name: "Discontinued Tooltip Content",
|
|
155
|
+
render: () => /* @__PURE__ */ i(e, { availabilityId: "discontinued", inventory: t })
|
|
144
156
|
};
|
|
145
157
|
export {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
c as
|
|
151
|
-
|
|
152
|
-
|
|
158
|
+
p as Available,
|
|
159
|
+
h as AvailableTooltipContent,
|
|
160
|
+
v as Discontinued,
|
|
161
|
+
T as DiscontinuedTooltipContent,
|
|
162
|
+
c as InStock,
|
|
163
|
+
u as InStockTooltipContent,
|
|
164
|
+
y as InStockWithTooltip,
|
|
165
|
+
d as Limited,
|
|
166
|
+
I as LimitedTooltipContent,
|
|
167
|
+
b as LimitedWithTooltip,
|
|
168
|
+
m as NotFound,
|
|
153
169
|
r as default
|
|
154
170
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { HideAtProps } from '../../atoms/HideAt';
|
|
1
2
|
import { TextProps } from '../../atoms/Text/Text';
|
|
2
|
-
export interface CustomWizardBadgeProps {
|
|
3
|
+
export interface CustomWizardBadgeProps extends HideAtProps {
|
|
3
4
|
href: string;
|
|
4
5
|
text?: string;
|
|
5
6
|
colorToken?: TextProps['colorToken'];
|
|
6
7
|
className?: string;
|
|
7
8
|
textClassName?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare function CustomWizardBadge({ href, text, colorToken, className, textClassName, }: CustomWizardBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function CustomWizardBadge({ href, text, colorToken, hideAt, className, textClassName, }: CustomWizardBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { c as e } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { Link as
|
|
4
|
-
import { Text as
|
|
5
|
-
import '../../assets/CustomWizardBadge.css';const
|
|
6
|
-
badge:
|
|
7
|
-
inherit:
|
|
8
|
-
warning:
|
|
9
|
-
disabled:
|
|
3
|
+
import { Link as c } from "../../atoms/Link/Link.js";
|
|
4
|
+
import { Text as g } from "../../atoms/Text/Text.js";
|
|
5
|
+
import '../../assets/CustomWizardBadge.css';const d = "_badge_iwjsg_1", w = "_inherit_iwjsg_31", l = "_warning_iwjsg_35", j = "_disabled_iwjsg_39", u = "_links_iwjsg_51", m = "_primary_iwjsg_59", y = "_quaternary_iwjsg_63", f = "_secondary_iwjsg_71", h = "_success_iwjsg_75", p = "_tertiary_iwjsg_79", b = "_footer_iwjsg_83", x = "_text_iwjsg_87", s = {
|
|
6
|
+
badge: d,
|
|
7
|
+
inherit: w,
|
|
8
|
+
warning: l,
|
|
9
|
+
disabled: j,
|
|
10
10
|
"error-warning": "_error-warning_iwjsg_43",
|
|
11
11
|
"default-inverted": "_default-inverted_iwjsg_47",
|
|
12
|
-
links:
|
|
12
|
+
links: u,
|
|
13
13
|
"links-hover-press": "_links-hover-press_iwjsg_55",
|
|
14
|
-
primary:
|
|
15
|
-
quaternary:
|
|
14
|
+
primary: m,
|
|
15
|
+
quaternary: y,
|
|
16
16
|
"search-bar": "_search-bar_iwjsg_67",
|
|
17
|
-
secondary:
|
|
18
|
-
success:
|
|
19
|
-
tertiary:
|
|
20
|
-
footer:
|
|
21
|
-
text:
|
|
17
|
+
secondary: f,
|
|
18
|
+
success: h,
|
|
19
|
+
tertiary: p,
|
|
20
|
+
footer: b,
|
|
21
|
+
text: x
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function C({
|
|
24
24
|
href: i,
|
|
25
25
|
text: t = "Customize",
|
|
26
26
|
colorToken: n = "secondary",
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
hideAt: _,
|
|
28
|
+
className: a,
|
|
29
|
+
textClassName: o
|
|
29
30
|
}) {
|
|
30
|
-
return /* @__PURE__ */ r(
|
|
31
|
-
|
|
31
|
+
return /* @__PURE__ */ r(c, { href: i, unstyled: !0, hideAt: _, className: e(s.badge, s[n], a), children: /* @__PURE__ */ r(
|
|
32
|
+
g,
|
|
32
33
|
{
|
|
33
34
|
size: "xs",
|
|
34
35
|
weight: "regular",
|
|
35
36
|
colorToken: "default-inverted",
|
|
36
|
-
className: e(s.text,
|
|
37
|
+
className: e(s.text, o),
|
|
37
38
|
children: t
|
|
38
39
|
}
|
|
39
40
|
) });
|
|
40
41
|
}
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
C as CustomWizardBadge
|
|
43
44
|
};
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import { IconProps } from '../../atoms/Icon/Icon';
|
|
3
|
+
import { HideAtProps } from '../../atoms/HideAt';
|
|
3
4
|
export type DisclaimerColorToken = "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
|
|
4
5
|
export type DisclaimerIcon = "info" | "question" | "warning" | "security" | "lock";
|
|
5
|
-
export interface DisclaimerProps extends ComponentPropsWithoutRef<"aside"
|
|
6
|
+
export interface DisclaimerProps extends ComponentPropsWithoutRef<"aside">, HideAtProps {
|
|
6
7
|
backgroundColorToken?: DisclaimerColorToken;
|
|
7
8
|
borderColorToken?: DisclaimerColorToken;
|
|
8
9
|
layout?: "inline" | "stacked";
|
|
9
10
|
}
|
|
10
|
-
export interface DisclaimerContentProps extends ComponentPropsWithoutRef<"div"
|
|
11
|
+
export interface DisclaimerContentProps extends ComponentPropsWithoutRef<"div">, HideAtProps {
|
|
11
12
|
children: ReactNode;
|
|
12
13
|
}
|
|
13
14
|
export interface DisclaimerIconProps extends Omit<IconProps, "iconKey"> {
|
|
14
15
|
icon?: DisclaimerIcon;
|
|
15
16
|
iconKey?: IconProps["iconKey"];
|
|
16
17
|
}
|
|
17
|
-
export interface DisclaimerPrimaryProps extends ComponentPropsWithoutRef<"span"
|
|
18
|
+
export interface DisclaimerPrimaryProps extends ComponentPropsWithoutRef<"span">, HideAtProps {
|
|
18
19
|
children: ReactNode;
|
|
19
20
|
}
|
|
20
|
-
export interface DisclaimerSubtextProps extends ComponentPropsWithoutRef<"span"
|
|
21
|
+
export interface DisclaimerSubtextProps extends ComponentPropsWithoutRef<"span">, HideAtProps {
|
|
21
22
|
children: ReactNode;
|
|
22
23
|
}
|
|
23
|
-
export interface DisclaimerCTAProps extends ComponentPropsWithoutRef<"div"
|
|
24
|
+
export interface DisclaimerCTAProps extends ComponentPropsWithoutRef<"div">, HideAtProps {
|
|
24
25
|
children: ReactNode;
|
|
25
26
|
}
|
|
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;
|
|
27
|
+
declare function DisclaimerRoot({ backgroundColorToken, borderColorToken, layout, hideAt, className, children, ...otherProps }: DisclaimerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function DisclaimerContent({ hideAt, className, children, ...otherProps }: DisclaimerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
28
29
|
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;
|
|
30
|
+
declare function DisclaimerPrimary({ hideAt, className, children, ...otherProps }: DisclaimerPrimaryProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function DisclaimerSubtext({ hideAt, className, children, ...otherProps }: DisclaimerSubtextProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function DisclaimerCTA({ hideAt, className, children, ...otherProps }: DisclaimerCTAProps): import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
export declare const Disclaimer: typeof DisclaimerRoot & {
|
|
33
34
|
Content: typeof DisclaimerContent;
|
|
34
35
|
Icon: typeof DisclaimerIcon;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { c as t } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Icon as b } from "../../atoms/Icon/Icon.js";
|
|
4
|
+
import { getHideAtStyles as i } from "../../atoms/HideAt.js";
|
|
5
|
+
import '../../assets/Disclaimer.css';const u = "_disclaimer_1bxdj_1", l = "_content_1bxdj_12", m = "_primary_1bxdj_26", x = "_subtext_1bxdj_27", g = "_icon_1bxdj_31", f = "_cta_1bxdj_46", c = {
|
|
6
|
+
disclaimer: u,
|
|
7
|
+
content: l,
|
|
7
8
|
"layout-stacked": "_layout-stacked_1bxdj_20",
|
|
8
|
-
primary:
|
|
9
|
-
subtext:
|
|
10
|
-
icon:
|
|
11
|
-
cta:
|
|
9
|
+
primary: m,
|
|
10
|
+
subtext: x,
|
|
11
|
+
icon: g,
|
|
12
|
+
cta: f,
|
|
12
13
|
"background-neutral": "_background-neutral_1bxdj_50",
|
|
13
14
|
"background-secondary": "_background-secondary_1bxdj_54",
|
|
14
15
|
"background-caution-tips": "_background-caution-tips_1bxdj_58",
|
|
@@ -21,59 +22,61 @@ import '../../assets/Disclaimer.css';const _ = "_disclaimer_1bxdj_1", b = "_cont
|
|
|
21
22
|
"border-warning": "_border-warning_1bxdj_86",
|
|
22
23
|
"border-success": "_border-success_1bxdj_90",
|
|
23
24
|
"border-error-warning": "_border-error-warning_1bxdj_94"
|
|
24
|
-
},
|
|
25
|
+
}, j = {
|
|
25
26
|
info: "fa-solid fa-circle-info",
|
|
26
27
|
question: "fa-solid fa-circle-question",
|
|
27
28
|
warning: "fa-solid fa-triangle-exclamation",
|
|
28
29
|
security: "fa-solid fa-shield",
|
|
29
30
|
lock: "fa-solid fa-lock"
|
|
30
31
|
};
|
|
31
|
-
function
|
|
32
|
+
function k({
|
|
32
33
|
backgroundColorToken: r = "neutral",
|
|
33
34
|
borderColorToken: n = "neutral",
|
|
34
35
|
layout: o = "stacked",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
hideAt: a,
|
|
37
|
+
className: s,
|
|
38
|
+
children: d,
|
|
39
|
+
..._
|
|
38
40
|
}) {
|
|
39
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ e(
|
|
40
42
|
"aside",
|
|
41
43
|
{
|
|
42
|
-
...
|
|
43
|
-
className:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
..._,
|
|
45
|
+
className: t(
|
|
46
|
+
c.disclaimer,
|
|
47
|
+
c[`background-${r}`],
|
|
48
|
+
c[`border-${n}`],
|
|
49
|
+
c[`layout-${o}`],
|
|
50
|
+
i(a),
|
|
51
|
+
s
|
|
49
52
|
),
|
|
50
53
|
role: "note",
|
|
51
|
-
children:
|
|
54
|
+
children: d
|
|
52
55
|
}
|
|
53
56
|
);
|
|
54
57
|
}
|
|
55
|
-
function
|
|
56
|
-
return /* @__PURE__ */
|
|
58
|
+
function y({ hideAt: r, className: n, children: o, ...a }) {
|
|
59
|
+
return /* @__PURE__ */ e("div", { ...a, className: t(c.content, i(r), n), children: o });
|
|
57
60
|
}
|
|
58
|
-
function
|
|
59
|
-
return /* @__PURE__ */
|
|
61
|
+
function p({ icon: r = "info", iconKey: n, className: o, ...a }) {
|
|
62
|
+
return /* @__PURE__ */ e(b, { ...a, iconKey: n ?? j[r], className: t(c.icon, o) });
|
|
60
63
|
}
|
|
61
|
-
function
|
|
62
|
-
return /* @__PURE__ */
|
|
64
|
+
function w({ hideAt: r, className: n, children: o, ...a }) {
|
|
65
|
+
return /* @__PURE__ */ e("span", { ...a, className: t(c.primary, i(r), n), children: o });
|
|
63
66
|
}
|
|
64
|
-
function
|
|
65
|
-
return /* @__PURE__ */
|
|
67
|
+
function D({ hideAt: r, className: n, children: o, ...a }) {
|
|
68
|
+
return /* @__PURE__ */ e("span", { ...a, className: t(c.subtext, i(r), n), children: o });
|
|
66
69
|
}
|
|
67
|
-
function
|
|
68
|
-
return /* @__PURE__ */
|
|
70
|
+
function N({ hideAt: r, className: n, children: o, ...a }) {
|
|
71
|
+
return /* @__PURE__ */ e("div", { ...a, className: t(c.cta, i(r), n), children: o });
|
|
69
72
|
}
|
|
70
|
-
const
|
|
71
|
-
Content:
|
|
72
|
-
Icon:
|
|
73
|
-
Primary:
|
|
74
|
-
Subtext:
|
|
75
|
-
CTA:
|
|
73
|
+
const $ = Object.assign(k, {
|
|
74
|
+
Content: y,
|
|
75
|
+
Icon: p,
|
|
76
|
+
Primary: w,
|
|
77
|
+
Subtext: D,
|
|
78
|
+
CTA: N
|
|
76
79
|
});
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
$ as Disclaimer
|
|
79
82
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
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;
|
|
4
|
+
component: (({ backgroundColorToken, borderColorToken, layout, hideAt, className, children, ...otherProps }: import('./Disclaimer').DisclaimerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
5
|
+
Content: ({ hideAt, className, children, ...otherProps }: import('./Disclaimer').DisclaimerContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
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;
|
|
7
|
+
Primary: ({ hideAt, className, children, ...otherProps }: import('./Disclaimer').DisclaimerPrimaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Subtext: ({ hideAt, className, children, ...otherProps }: import('./Disclaimer').DisclaimerSubtextProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
CTA: ({ hideAt, className, children, ...otherProps }: import('./Disclaimer').DisclaimerCTAProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
};
|
|
11
11
|
tags: string[];
|
|
12
12
|
parameters: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { HideAtProps } from '../../atoms/HideAt';
|
|
2
3
|
import { TextProps } from '../../atoms/Text/Text';
|
|
3
|
-
export interface ErrorProps {
|
|
4
|
+
export interface ErrorProps extends HideAtProps {
|
|
4
5
|
isVisible?: boolean;
|
|
5
6
|
className?: string;
|
|
6
7
|
children?: ReactNode;
|
|
@@ -18,12 +19,12 @@ export interface ErrorMessageProps {
|
|
|
18
19
|
className?: string;
|
|
19
20
|
children?: ReactNode;
|
|
20
21
|
}
|
|
21
|
-
export interface ErrorDetailsProps extends React.HTMLAttributes<HTMLDivElement
|
|
22
|
+
export interface ErrorDetailsProps extends React.HTMLAttributes<HTMLDivElement>, HideAtProps {
|
|
22
23
|
children?: ReactNode;
|
|
23
24
|
hide?: boolean;
|
|
24
25
|
}
|
|
25
26
|
declare function ErrorMessage({ as, size, variant, weight, colorToken, hideAt, className, children, }: ErrorMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
declare function ErrorDetails({ children, hide, ...otherProps }: ErrorDetailsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
declare function ErrorDetails({ children, hide, hideAt, className, ...otherProps }: ErrorDetailsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
28
|
interface ErrorComponent extends React.FC<ErrorProps> {
|
|
28
29
|
Message: typeof ErrorMessage;
|
|
29
30
|
Details: typeof ErrorDetails;
|