@caseparts-org/caseblocks 0.0.284 → 0.0.285
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._tracker_ejzrv_1{display:flex;flex-direction:row;justify-content:center;gap:var(--spacing-spacing-2xs);width:100%;max-width:21.875rem}._status_ejzrv_19{display:flex;flex:0 0 1.85rem;flex-direction:column;align-items:center;min-width:0;text-align:center}._bubbleContainer_ejzrv_37{display:flex;flex:0 0 1.85rem;align-items:center;justify-content:center;width:1.85rem}._details_ejzrv_53{display:flex;flex-direction:column;align-items:center}._bubble_ejzrv_37{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:1.85rem;height:1.85rem;border:.3rem solid var(--color-neutrals-neutral-3);border-radius:50%;color:var(--color-brand-primary-white)}._bubble_ejzrv_37._completed_ejzrv_89{border-color:var(--color-brand-primary-primary-teal-blue);background-color:var(--color-brand-primary-primary-teal-blue)}._bubble_ejzrv_37._completed-neutral_ejzrv_99{border-color:var(--color-neutrals-neutral-5);background-color:var(--color-neutrals-neutral-5)}._bubble_ejzrv_37._completed-secondary_ejzrv_109{border-color:var(--color-brand-primary-primary-teal-blue);background-color:var(--color-brand-primary-primary-teal-blue)}._bubble_ejzrv_37._completed-caution-tips_ejzrv_119{border-color:var(--color-alerts-caution-tips);background-color:var(--color-alerts-caution-tips)}._bubble_ejzrv_37._completed-warning_ejzrv_129{border-color:var(--color-alerts-warning);background-color:var(--color-alerts-warning)}._bubble_ejzrv_37._completed-success_ejzrv_139{border-color:var(--color-alerts-success);background-color:var(--color-alerts-success)}._bubble_ejzrv_37._completed-error-warning_ejzrv_149{border-color:var(--color-alerts-error-warning);background-color:var(--color-alerts-error-warning)}._bubble_ejzrv_37:not(._completed_ejzrv_89){border-width:.35rem}._connector_ejzrv_167{flex:0 0 3.1rem;height:.24rem;margin-top:var(--spacing-spacing-1xs);border-radius:999px;background-color:var(--color-neutrals-neutral-3)}._connector_ejzrv_167._completed_ejzrv_89{background-color:var(--color-brand-primary-primary-teal-blue)}._connector_ejzrv_167._completed-neutral_ejzrv_99{background-color:var(--color-neutrals-neutral-5)}._connector_ejzrv_167._completed-secondary_ejzrv_109{background-color:var(--color-brand-primary-primary-teal-blue)}._connector_ejzrv_167._completed-caution-tips_ejzrv_119{background-color:var(--color-alerts-caution-tips)}._connector_ejzrv_167._completed-warning_ejzrv_129{background-color:var(--color-alerts-warning)}._connector_ejzrv_167._completed-success_ejzrv_139{background-color:var(--color-alerts-success)}._connector_ejzrv_167._completed-error-warning_ejzrv_149{background-color:var(--color-alerts-error-warning)}._label_ejzrv_239{margin-top:var(--spacing-spacing-2xs);white-space:nowrap}._date_ejzrv_249{margin-top:var(--spacing-spacing-4xs);width:4.75rem;max-width:4.75rem}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { IconProps } from '../../atoms/Icon/Icon';
|
|
3
|
+
export type ProgressTrackerColorToken = "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
|
|
3
4
|
export interface Step {
|
|
4
5
|
label: string;
|
|
5
6
|
subText?: string;
|
|
6
7
|
completed: boolean;
|
|
8
|
+
colorToken?: ProgressTrackerColorToken;
|
|
7
9
|
iconKey?: IconProps["iconKey"];
|
|
8
10
|
tooltipContent?: ReactNode;
|
|
9
11
|
}
|
|
10
12
|
export interface ProgressTrackerProps {
|
|
11
13
|
steps: Step[];
|
|
14
|
+
colorToken?: ProgressTrackerColorToken;
|
|
12
15
|
}
|
|
13
|
-
export declare function ProgressTracker({ steps }: ProgressTrackerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function ProgressTracker({ steps, colorToken }: ProgressTrackerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,38 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Text as
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as d } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Fragment as p } from "react";
|
|
4
|
+
import { Icon as b } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
import { Text as i } from "../../atoms/Text/Text.js";
|
|
6
6
|
import { Tooltip as u } from "../../atoms/Tooltip/Tooltip.js";
|
|
7
|
-
import '../../assets/ProgressTracker.css';const
|
|
8
|
-
tracker:
|
|
9
|
-
status:
|
|
10
|
-
bubbleContainer:
|
|
11
|
-
details:
|
|
12
|
-
bubble:
|
|
7
|
+
import '../../assets/ProgressTracker.css';const v = "_tracker_ejzrv_1", z = "_status_ejzrv_19", j = "_bubbleContainer_ejzrv_37", h = "_details_ejzrv_53", g = "_bubble_ejzrv_37", f = "_completed_ejzrv_89", k = "_connector_ejzrv_167", y = "_label_ejzrv_239", N = "_date_ejzrv_249", e = {
|
|
8
|
+
tracker: v,
|
|
9
|
+
status: z,
|
|
10
|
+
bubbleContainer: j,
|
|
11
|
+
details: h,
|
|
12
|
+
bubble: g,
|
|
13
13
|
completed: f,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
"completed-neutral": "_completed-neutral_ejzrv_99",
|
|
15
|
+
"completed-secondary": "_completed-secondary_ejzrv_109",
|
|
16
|
+
"completed-caution-tips": "_completed-caution-tips_ejzrv_119",
|
|
17
|
+
"completed-warning": "_completed-warning_ejzrv_129",
|
|
18
|
+
"completed-success": "_completed-success_ejzrv_139",
|
|
19
|
+
"completed-error-warning": "_completed-error-warning_ejzrv_149",
|
|
20
|
+
connector: k,
|
|
21
|
+
label: y,
|
|
22
|
+
date: N
|
|
17
23
|
};
|
|
18
|
-
function
|
|
19
|
-
label:
|
|
20
|
-
subText:
|
|
21
|
-
completed:
|
|
22
|
-
iconKey:
|
|
23
|
-
tooltipContent:
|
|
24
|
+
function w({
|
|
25
|
+
label: c,
|
|
26
|
+
subText: l,
|
|
27
|
+
completed: t,
|
|
28
|
+
iconKey: n,
|
|
29
|
+
tooltipContent: o,
|
|
30
|
+
colorToken: _,
|
|
31
|
+
parentColorToken: m
|
|
24
32
|
}) {
|
|
25
|
-
const
|
|
33
|
+
const s = /* @__PURE__ */ r(
|
|
26
34
|
"span",
|
|
27
35
|
{
|
|
28
|
-
className:
|
|
36
|
+
className: d(
|
|
29
37
|
e.bubble,
|
|
30
|
-
|
|
38
|
+
t && e.completed,
|
|
39
|
+
t && e[`completed-${_ ?? m}`]
|
|
31
40
|
),
|
|
32
|
-
children:
|
|
33
|
-
|
|
41
|
+
children: t && /* @__PURE__ */ r(
|
|
42
|
+
b,
|
|
34
43
|
{
|
|
35
|
-
iconKey:
|
|
44
|
+
iconKey: n ?? "fa-solid fa-check",
|
|
36
45
|
size: "sm",
|
|
37
46
|
noPadding: !0
|
|
38
47
|
}
|
|
@@ -40,27 +49,31 @@ function k({
|
|
|
40
49
|
}
|
|
41
50
|
);
|
|
42
51
|
return /* @__PURE__ */ a("div", { className: e.status, children: [
|
|
43
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ r("div", { className: e.bubbleContainer, children: o ? /* @__PURE__ */ r(u, { closeDelay: 0, openDelay: 0, trigger: s, position: "top", children: o }) : s }),
|
|
44
53
|
/* @__PURE__ */ a("div", { className: e.details, children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
54
|
+
/* @__PURE__ */ r(i, { size: "sm", weight: "semibold", className: e.label, children: c }),
|
|
55
|
+
l && /* @__PURE__ */ r(i, { size: "xxs", colorToken: "quaternary", className: e.date, children: l })
|
|
47
56
|
] })
|
|
48
57
|
] });
|
|
49
58
|
}
|
|
50
|
-
function
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
function S({ steps: c, colorToken: l = "secondary" }) {
|
|
60
|
+
return /* @__PURE__ */ r("div", { className: e.tracker, children: c.map((t, n) => {
|
|
61
|
+
const o = c[n + 1];
|
|
62
|
+
return /* @__PURE__ */ a(p, { children: [
|
|
63
|
+
/* @__PURE__ */ r(w, { ...t, parentColorToken: l }),
|
|
64
|
+
n < c.length - 1 && /* @__PURE__ */ r(
|
|
65
|
+
"span",
|
|
66
|
+
{
|
|
67
|
+
className: d(
|
|
68
|
+
e.connector,
|
|
69
|
+
o.completed && e.completed,
|
|
70
|
+
o.completed && e[`completed-${o.colorToken ?? l}`]
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }, `${t.label}-${n}`);
|
|
75
|
+
}) });
|
|
63
76
|
}
|
|
64
77
|
export {
|
|
65
|
-
|
|
78
|
+
S as ProgressTracker
|
|
66
79
|
};
|
|
@@ -8,6 +8,7 @@ const o = {
|
|
|
8
8
|
tags: ["autodocs"]
|
|
9
9
|
}, l = {
|
|
10
10
|
args: {
|
|
11
|
+
colorToken: "success",
|
|
11
12
|
steps: [
|
|
12
13
|
{
|
|
13
14
|
label: "Ordered",
|
|
@@ -25,6 +26,7 @@ const o = {
|
|
|
25
26
|
label: "In Transit",
|
|
26
27
|
subText: "9/16 8:30 AM",
|
|
27
28
|
completed: !0,
|
|
29
|
+
colorToken: "warning",
|
|
28
30
|
tooltipContent: "Shipment is on the way"
|
|
29
31
|
},
|
|
30
32
|
{
|
|
@@ -37,6 +39,7 @@ const o = {
|
|
|
37
39
|
}
|
|
38
40
|
}, s = {
|
|
39
41
|
args: {
|
|
42
|
+
colorToken: "warning",
|
|
40
43
|
steps: [
|
|
41
44
|
{
|
|
42
45
|
label: "Submitted",
|