@caseparts-org/caseblocks 0.0.286 → 0.0.287
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/ProgressTracker.css +1 -1
- package/dist/molecules/ProgressTracker/ProgressTracker.d.ts +2 -1
- package/dist/molecules/ProgressTracker/ProgressTracker.js +50 -48
- package/dist/molecules/ProgressTracker/ProgressTracker.stories.d.ts +1 -0
- package/dist/molecules/ProgressTracker/ProgressTracker.stories.js +12 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._tracker_1hl67_1{display:flex;flex-direction:row;justify-content:center;gap:var(--spacing-spacing-2xs);width:100%;max-width:21.875rem}._sm_1hl67_19 ._status_1hl67_19{flex-basis:2.25rem}._sm_1hl67_19 ._bubbleContainer_1hl67_27{flex-basis:1.35rem;width:1.35rem}._sm_1hl67_19 ._bubble_1hl67_27{width:1.35rem;height:1.35rem;border-width:.25rem}._sm_1hl67_19 ._bubble_1hl67_27:not(._completed_1hl67_49){border-width:.3rem}._sm_1hl67_19 ._connector_1hl67_57{flex-basis:2rem;height:.2rem}._status_1hl67_19{display:flex;flex:0 0 1.85rem;flex-direction:column;align-items:center;min-width:0;text-align:center}._bubbleContainer_1hl67_27{display:flex;flex:0 0 1.85rem;align-items:center;justify-content:center;width:1.85rem}._details_1hl67_101{display:flex;flex-direction:column;align-items:center}._bubble_1hl67_27{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_1hl67_27._completed_1hl67_49{border-color:var(--color-brand-primary-primary-teal-blue);background-color:var(--color-brand-primary-primary-teal-blue)}._bubble_1hl67_27._completed-neutral_1hl67_147{border-color:var(--color-neutrals-neutral-5);background-color:var(--color-neutrals-neutral-5)}._bubble_1hl67_27._completed-secondary_1hl67_157{border-color:var(--color-brand-primary-primary-teal-blue);background-color:var(--color-brand-primary-primary-teal-blue)}._bubble_1hl67_27._completed-caution-tips_1hl67_167{border-color:var(--color-alerts-caution-tips);background-color:var(--color-alerts-caution-tips)}._bubble_1hl67_27._completed-warning_1hl67_177{border-color:var(--color-alerts-warning);background-color:var(--color-alerts-warning)}._bubble_1hl67_27._completed-success_1hl67_187{border-color:var(--color-alerts-success);background-color:var(--color-alerts-success)}._bubble_1hl67_27._completed-error-warning_1hl67_197{border-color:var(--color-alerts-error-warning);background-color:var(--color-alerts-error-warning)}._bubble_1hl67_27:not(._completed_1hl67_49){border-width:.35rem}._connector_1hl67_57{flex:0 0 3.1rem;height:.24rem;margin-top:var(--spacing-spacing-1xs);border-radius:999px;background-color:var(--color-neutrals-neutral-3)}._connector_1hl67_57._completed_1hl67_49{background-color:var(--color-brand-primary-primary-teal-blue)}._connector_1hl67_57._completed-neutral_1hl67_147{background-color:var(--color-neutrals-neutral-5)}._connector_1hl67_57._completed-secondary_1hl67_157{background-color:var(--color-brand-primary-primary-teal-blue)}._connector_1hl67_57._completed-caution-tips_1hl67_167{background-color:var(--color-alerts-caution-tips)}._connector_1hl67_57._completed-warning_1hl67_177{background-color:var(--color-alerts-warning)}._connector_1hl67_57._completed-success_1hl67_187{background-color:var(--color-alerts-success)}._connector_1hl67_57._completed-error-warning_1hl67_197{background-color:var(--color-alerts-error-warning)}@media print{._bubble_1hl67_27._completed_1hl67_49,._connector_1hl67_57._completed_1hl67_49{-webkit-print-color-adjust:exact;print-color-adjust:exact}}._label_1hl67_303{margin-top:var(--spacing-spacing-2xs);white-space:nowrap}._sm_1hl67_19 ._label_1hl67_303{margin-top:var(--spacing-spacing-4xs)}._date_1hl67_321{margin-top:var(--spacing-spacing-4xs);width:4.75rem;max-width:4.75rem}
|
|
@@ -12,5 +12,6 @@ export interface Step {
|
|
|
12
12
|
export interface ProgressTrackerProps {
|
|
13
13
|
steps: Step[];
|
|
14
14
|
colorToken?: ProgressTrackerColorToken;
|
|
15
|
+
size?: "sm" | "md";
|
|
15
16
|
}
|
|
16
|
-
export declare function ProgressTracker({ steps, colorToken }: ProgressTrackerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ProgressTracker({ steps, colorToken, size }: ProgressTrackerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,45 +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 l, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Fragment as b } from "react";
|
|
4
|
+
import { Icon as h } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
import { Text as d } 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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
bubble:
|
|
13
|
-
completed:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"completed-
|
|
17
|
-
"completed-
|
|
18
|
-
"completed-
|
|
19
|
-
"completed-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
import '../../assets/ProgressTracker.css';const g = "_tracker_1hl67_1", f = "_sm_1hl67_19", k = "_status_1hl67_19", y = "_bubbleContainer_1hl67_27", N = "_bubble_1hl67_27", x = "_completed_1hl67_49", w = "_connector_1hl67_57", v = "_details_1hl67_101", C = "_label_1hl67_303", T = "_date_1hl67_321", e = {
|
|
8
|
+
tracker: g,
|
|
9
|
+
sm: f,
|
|
10
|
+
status: k,
|
|
11
|
+
bubbleContainer: y,
|
|
12
|
+
bubble: N,
|
|
13
|
+
completed: x,
|
|
14
|
+
connector: w,
|
|
15
|
+
details: v,
|
|
16
|
+
"completed-neutral": "_completed-neutral_1hl67_147",
|
|
17
|
+
"completed-secondary": "_completed-secondary_1hl67_157",
|
|
18
|
+
"completed-caution-tips": "_completed-caution-tips_1hl67_167",
|
|
19
|
+
"completed-warning": "_completed-warning_1hl67_177",
|
|
20
|
+
"completed-success": "_completed-success_1hl67_187",
|
|
21
|
+
"completed-error-warning": "_completed-error-warning_1hl67_197",
|
|
22
|
+
label: C,
|
|
23
|
+
date: T
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
-
label:
|
|
26
|
-
subText:
|
|
27
|
-
completed:
|
|
25
|
+
function $({
|
|
26
|
+
label: c,
|
|
27
|
+
subText: r,
|
|
28
|
+
completed: t,
|
|
28
29
|
iconKey: n,
|
|
29
|
-
tooltipContent:
|
|
30
|
-
colorToken:
|
|
31
|
-
parentColorToken:
|
|
30
|
+
tooltipContent: o,
|
|
31
|
+
colorToken: s,
|
|
32
|
+
parentColorToken: i,
|
|
33
|
+
size: p
|
|
32
34
|
}) {
|
|
33
|
-
const
|
|
35
|
+
const _ = /* @__PURE__ */ l(
|
|
34
36
|
"span",
|
|
35
37
|
{
|
|
36
|
-
className:
|
|
38
|
+
className: m(
|
|
37
39
|
e.bubble,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
t && e.completed,
|
|
41
|
+
t && e[`completed-${s ?? i}`]
|
|
40
42
|
),
|
|
41
|
-
children:
|
|
42
|
-
|
|
43
|
+
children: t && /* @__PURE__ */ l(
|
|
44
|
+
h,
|
|
43
45
|
{
|
|
44
46
|
iconKey: n ?? "fa-solid fa-check",
|
|
45
47
|
size: "sm",
|
|
@@ -49,31 +51,31 @@ function v({
|
|
|
49
51
|
}
|
|
50
52
|
);
|
|
51
53
|
return /* @__PURE__ */ a("div", { className: e.status, children: [
|
|
52
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ l("div", { className: e.bubbleContainer, children: o ? /* @__PURE__ */ l(u, { closeDelay: 0, openDelay: 0, trigger: _, position: "top", children: o }) : _ }),
|
|
53
55
|
/* @__PURE__ */ a("div", { className: e.details, children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
56
|
+
/* @__PURE__ */ l(d, { size: p === "sm" ? "xxs" : "sm", weight: "semibold", className: e.label, children: c }),
|
|
57
|
+
r && /* @__PURE__ */ l(d, { size: "xxs", colorToken: "quaternary", className: e.date, children: r })
|
|
56
58
|
] })
|
|
57
59
|
] });
|
|
58
60
|
}
|
|
59
|
-
function
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
const
|
|
62
|
-
return /* @__PURE__ */ a(
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
61
|
+
function F({ steps: c, colorToken: r = "secondary", size: t = "md" }) {
|
|
62
|
+
return /* @__PURE__ */ l("div", { className: m(e.tracker, e[t]), children: c.map((n, o) => {
|
|
63
|
+
const s = c[o + 1];
|
|
64
|
+
return /* @__PURE__ */ a(b, { children: [
|
|
65
|
+
/* @__PURE__ */ l($, { ...n, parentColorToken: r, size: t }),
|
|
66
|
+
o < c.length - 1 && /* @__PURE__ */ l(
|
|
65
67
|
"span",
|
|
66
68
|
{
|
|
67
|
-
className:
|
|
69
|
+
className: m(
|
|
68
70
|
e.connector,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
s.completed && e.completed,
|
|
72
|
+
s.completed && e[`completed-${s.colorToken ?? r}`]
|
|
71
73
|
)
|
|
72
74
|
}
|
|
73
75
|
)
|
|
74
|
-
] }, `${
|
|
76
|
+
] }, `${n.label}-${o}`);
|
|
75
77
|
}) });
|
|
76
78
|
}
|
|
77
79
|
export {
|
|
78
|
-
|
|
80
|
+
F as ProgressTracker
|
|
79
81
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ProgressTracker as e } from "./ProgressTracker.js";
|
|
2
|
-
const
|
|
2
|
+
const s = {
|
|
3
3
|
title: "Case Parts/Molecules/ProgressTracker",
|
|
4
4
|
component: e,
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: "centered"
|
|
7
7
|
},
|
|
8
8
|
tags: ["autodocs"]
|
|
9
|
-
},
|
|
9
|
+
}, t = {
|
|
10
10
|
args: {
|
|
11
11
|
colorToken: "success",
|
|
12
12
|
steps: [
|
|
@@ -37,7 +37,12 @@ const o = {
|
|
|
37
37
|
}
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, l = {
|
|
41
|
+
args: {
|
|
42
|
+
...t.args,
|
|
43
|
+
size: "sm"
|
|
44
|
+
}
|
|
45
|
+
}, a = {
|
|
41
46
|
args: {
|
|
42
47
|
colorToken: "warning",
|
|
43
48
|
steps: [
|
|
@@ -62,7 +67,8 @@ const o = {
|
|
|
62
67
|
}
|
|
63
68
|
};
|
|
64
69
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
l as Compact,
|
|
71
|
+
a as CustomWorkflow,
|
|
72
|
+
t as Shipment,
|
|
73
|
+
s as default
|
|
68
74
|
};
|