@caseparts-org/caseblocks 0.0.284 → 0.0.286
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_13p1z_1{display:flex;flex-direction:row;justify-content:center;gap:var(--spacing-spacing-2xs);width:100%;max-width:21.875rem}._status_13p1z_19{display:flex;flex:0 0 1.85rem;flex-direction:column;align-items:center;min-width:0;text-align:center}._bubbleContainer_13p1z_37{display:flex;flex:0 0 1.85rem;align-items:center;justify-content:center;width:1.85rem}._details_13p1z_53{display:flex;flex-direction:column;align-items:center}._bubble_13p1z_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_13p1z_37._completed_13p1z_89{border-color:var(--color-brand-primary-primary-teal-blue);background-color:var(--color-brand-primary-primary-teal-blue)}._bubble_13p1z_37._completed-neutral_13p1z_99{border-color:var(--color-neutrals-neutral-5);background-color:var(--color-neutrals-neutral-5)}._bubble_13p1z_37._completed-secondary_13p1z_109{border-color:var(--color-brand-primary-primary-teal-blue);background-color:var(--color-brand-primary-primary-teal-blue)}._bubble_13p1z_37._completed-caution-tips_13p1z_119{border-color:var(--color-alerts-caution-tips);background-color:var(--color-alerts-caution-tips)}._bubble_13p1z_37._completed-warning_13p1z_129{border-color:var(--color-alerts-warning);background-color:var(--color-alerts-warning)}._bubble_13p1z_37._completed-success_13p1z_139{border-color:var(--color-alerts-success);background-color:var(--color-alerts-success)}._bubble_13p1z_37._completed-error-warning_13p1z_149{border-color:var(--color-alerts-error-warning);background-color:var(--color-alerts-error-warning)}._bubble_13p1z_37:not(._completed_13p1z_89){border-width:.35rem}._connector_13p1z_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_13p1z_167._completed_13p1z_89{background-color:var(--color-brand-primary-primary-teal-blue)}._connector_13p1z_167._completed-neutral_13p1z_99{background-color:var(--color-neutrals-neutral-5)}._connector_13p1z_167._completed-secondary_13p1z_109{background-color:var(--color-brand-primary-primary-teal-blue)}._connector_13p1z_167._completed-caution-tips_13p1z_119{background-color:var(--color-alerts-caution-tips)}._connector_13p1z_167._completed-warning_13p1z_129{background-color:var(--color-alerts-warning)}._connector_13p1z_167._completed-success_13p1z_139{background-color:var(--color-alerts-success)}._connector_13p1z_167._completed-error-warning_13p1z_149{background-color:var(--color-alerts-error-warning)}@media print{._bubble_13p1z_37._completed_13p1z_89,._connector_13p1z_167._completed_13p1z_89{-webkit-print-color-adjust:exact;print-color-adjust:exact}}._label_13p1z_255{margin-top:var(--spacing-spacing-2xs);white-space:nowrap}._date_13p1z_265{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
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { Fragment as m } from "react";
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Text as
|
|
4
|
+
import { Icon as b } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
import { Text as p } 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:
|
|
13
|
-
completed:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import '../../assets/ProgressTracker.css';const z = "_tracker_13p1z_1", h = "_status_13p1z_19", g = "_bubbleContainer_13p1z_37", f = "_details_13p1z_53", k = "_bubble_13p1z_37", y = "_completed_13p1z_89", N = "_connector_13p1z_167", w = "_label_13p1z_255", x = "_date_13p1z_265", e = {
|
|
8
|
+
tracker: z,
|
|
9
|
+
status: h,
|
|
10
|
+
bubbleContainer: g,
|
|
11
|
+
details: f,
|
|
12
|
+
bubble: k,
|
|
13
|
+
completed: y,
|
|
14
|
+
"completed-neutral": "_completed-neutral_13p1z_99",
|
|
15
|
+
"completed-secondary": "_completed-secondary_13p1z_109",
|
|
16
|
+
"completed-caution-tips": "_completed-caution-tips_13p1z_119",
|
|
17
|
+
"completed-warning": "_completed-warning_13p1z_129",
|
|
18
|
+
"completed-success": "_completed-success_13p1z_139",
|
|
19
|
+
"completed-error-warning": "_completed-error-warning_13p1z_149",
|
|
20
|
+
connector: N,
|
|
21
|
+
label: w,
|
|
22
|
+
date: x
|
|
17
23
|
};
|
|
18
|
-
function
|
|
19
|
-
label:
|
|
20
|
-
subText:
|
|
24
|
+
function v({
|
|
25
|
+
label: r,
|
|
26
|
+
subText: l,
|
|
21
27
|
completed: o,
|
|
22
|
-
iconKey:
|
|
23
|
-
tooltipContent:
|
|
28
|
+
iconKey: n,
|
|
29
|
+
tooltipContent: c,
|
|
30
|
+
colorToken: d,
|
|
31
|
+
parentColorToken: _
|
|
24
32
|
}) {
|
|
25
|
-
const
|
|
33
|
+
const s = /* @__PURE__ */ t(
|
|
26
34
|
"span",
|
|
27
35
|
{
|
|
28
36
|
className: i(
|
|
29
37
|
e.bubble,
|
|
30
|
-
o && e.completed
|
|
38
|
+
o && e.completed,
|
|
39
|
+
o && e[`completed-${d ?? _}`]
|
|
31
40
|
),
|
|
32
41
|
children: o && /* @__PURE__ */ t(
|
|
33
|
-
|
|
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__ */ t("div", { className: e.bubbleContainer, children:
|
|
52
|
+
/* @__PURE__ */ t("div", { className: e.bubbleContainer, children: c ? /* @__PURE__ */ t(u, { closeDelay: 0, openDelay: 0, trigger: s, position: "top", children: c }) : s }),
|
|
44
53
|
/* @__PURE__ */ a("div", { className: e.details, children: [
|
|
45
|
-
/* @__PURE__ */ t(
|
|
46
|
-
|
|
54
|
+
/* @__PURE__ */ t(p, { size: "sm", weight: "semibold", className: e.label, children: r }),
|
|
55
|
+
l && /* @__PURE__ */ t(p, { size: "xxs", colorToken: "quaternary", className: e.date, children: l })
|
|
47
56
|
] })
|
|
48
57
|
] });
|
|
49
58
|
}
|
|
50
|
-
function
|
|
51
|
-
return /* @__PURE__ */ t("div", { className: e.tracker, children:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
function S({ steps: r, colorToken: l = "secondary" }) {
|
|
60
|
+
return /* @__PURE__ */ t("div", { className: e.tracker, children: r.map((o, n) => {
|
|
61
|
+
const c = r[n + 1];
|
|
62
|
+
return /* @__PURE__ */ a(m, { children: [
|
|
63
|
+
/* @__PURE__ */ t(v, { ...o, parentColorToken: l }),
|
|
64
|
+
n < r.length - 1 && /* @__PURE__ */ t(
|
|
65
|
+
"span",
|
|
66
|
+
{
|
|
67
|
+
className: i(
|
|
68
|
+
e.connector,
|
|
69
|
+
c.completed && e.completed,
|
|
70
|
+
c.completed && e[`completed-${c.colorToken ?? l}`]
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }, `${o.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",
|