@caseparts-org/caseblocks 0.0.275 → 0.0.276
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 -0
- package/dist/main-client.d.ts +2 -0
- package/dist/main-client.js +42 -40
- package/dist/molecules/Markdown/Markdown.js +661 -652
- package/dist/molecules/ProgressTracker/ProgressTracker.d.ts +13 -0
- package/dist/molecules/ProgressTracker/ProgressTracker.js +66 -0
- package/dist/molecules/ProgressTracker/ProgressTracker.stories.d.ts +14 -0
- package/dist/molecules/ProgressTracker/ProgressTracker.stories.js +65 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '../../atoms/Icon/Icon';
|
|
3
|
+
export interface Step {
|
|
4
|
+
label: string;
|
|
5
|
+
subText?: string;
|
|
6
|
+
completed: boolean;
|
|
7
|
+
iconKey?: IconProps["iconKey"];
|
|
8
|
+
tooltipContent?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface ProgressTrackerProps {
|
|
11
|
+
steps: Step[];
|
|
12
|
+
}
|
|
13
|
+
export declare function ProgressTracker({ steps }: ProgressTrackerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { Fragment as m } from "react";
|
|
4
|
+
import { Icon as d } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
import { Text as n } from "../../atoms/Text/Text.js";
|
|
6
|
+
import { Tooltip as u } from "../../atoms/Tooltip/Tooltip.js";
|
|
7
|
+
import '../../assets/ProgressTracker.css';const _ = "_tracker_uwyx3_1", p = "_status_uwyx3_19", x = "_bubbleContainer_uwyx3_37", y = "_details_uwyx3_53", h = "_bubble_uwyx3_37", f = "_completed_uwyx3_89", w = "_connector_uwyx3_107", N = "_label_uwyx3_131", g = "_date_uwyx3_141", e = {
|
|
8
|
+
tracker: _,
|
|
9
|
+
status: p,
|
|
10
|
+
bubbleContainer: x,
|
|
11
|
+
details: y,
|
|
12
|
+
bubble: h,
|
|
13
|
+
completed: f,
|
|
14
|
+
connector: w,
|
|
15
|
+
label: N,
|
|
16
|
+
date: g
|
|
17
|
+
};
|
|
18
|
+
function k({
|
|
19
|
+
label: s,
|
|
20
|
+
subText: c,
|
|
21
|
+
completed: o,
|
|
22
|
+
iconKey: b,
|
|
23
|
+
tooltipContent: r
|
|
24
|
+
}) {
|
|
25
|
+
const l = /* @__PURE__ */ t(
|
|
26
|
+
"span",
|
|
27
|
+
{
|
|
28
|
+
className: i(
|
|
29
|
+
e.bubble,
|
|
30
|
+
o && e.completed
|
|
31
|
+
),
|
|
32
|
+
children: o && /* @__PURE__ */ t(
|
|
33
|
+
d,
|
|
34
|
+
{
|
|
35
|
+
iconKey: b ?? "fa-solid fa-check",
|
|
36
|
+
size: "sm",
|
|
37
|
+
noPadding: !0
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
return /* @__PURE__ */ a("div", { className: e.status, children: [
|
|
43
|
+
/* @__PURE__ */ t("div", { className: e.bubbleContainer, children: r ? /* @__PURE__ */ t(u, { closeDelay: 0, openDelay: 0, trigger: l, position: "top", children: r }) : l }),
|
|
44
|
+
/* @__PURE__ */ a("div", { className: e.details, children: [
|
|
45
|
+
/* @__PURE__ */ t(n, { size: "sm", weight: "semibold", className: e.label, children: s }),
|
|
46
|
+
c && /* @__PURE__ */ t(n, { size: "xxs", colorToken: "quaternary", className: e.date, children: c })
|
|
47
|
+
] })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
function P({ steps: s }) {
|
|
51
|
+
return /* @__PURE__ */ t("div", { className: e.tracker, children: s.map((c, o) => /* @__PURE__ */ a(m, { children: [
|
|
52
|
+
/* @__PURE__ */ t(k, { ...c }),
|
|
53
|
+
o < s.length - 1 && /* @__PURE__ */ t(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
className: i(
|
|
57
|
+
e.connector,
|
|
58
|
+
c.completed && e.completed
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }, `${c.label}-${o}`)) });
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
P as ProgressTracker
|
|
66
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ProgressTracker } from './ProgressTracker';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ProgressTracker;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Shipment: Story;
|
|
14
|
+
export declare const CustomWorkflow: Story;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ProgressTracker as e } from "./ProgressTracker.js";
|
|
2
|
+
const o = {
|
|
3
|
+
title: "Case Parts/Molecules/ProgressTracker",
|
|
4
|
+
component: e,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: "centered"
|
|
7
|
+
},
|
|
8
|
+
tags: ["autodocs"]
|
|
9
|
+
}, l = {
|
|
10
|
+
args: {
|
|
11
|
+
steps: [
|
|
12
|
+
{
|
|
13
|
+
label: "Ordered",
|
|
14
|
+
subText: "9/14 10:00 AM",
|
|
15
|
+
completed: !0,
|
|
16
|
+
tooltipContent: "Order placed"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "Shipped",
|
|
20
|
+
subText: "9/15 2:00 PM",
|
|
21
|
+
completed: !0,
|
|
22
|
+
tooltipContent: "Shipment left the warehouse"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: "In Transit",
|
|
26
|
+
subText: "9/16 8:30 AM",
|
|
27
|
+
completed: !0,
|
|
28
|
+
tooltipContent: "Shipment is on the way"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: "Delivered",
|
|
32
|
+
subText: "This is a longer message",
|
|
33
|
+
completed: !1,
|
|
34
|
+
tooltipContent: "Awaiting delivery"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}, s = {
|
|
39
|
+
args: {
|
|
40
|
+
steps: [
|
|
41
|
+
{
|
|
42
|
+
label: "Submitted",
|
|
43
|
+
subText: "Sep 14",
|
|
44
|
+
completed: !0,
|
|
45
|
+
iconKey: "fa-solid fa-paper-plane",
|
|
46
|
+
tooltipContent: "Request submitted"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: "Under review",
|
|
50
|
+
completed: !1,
|
|
51
|
+
tooltipContent: "Request is awaiting review"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: "Approved",
|
|
55
|
+
completed: !1,
|
|
56
|
+
tooltipContent: "Request has not been approved"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
s as CustomWorkflow,
|
|
63
|
+
l as Shipment,
|
|
64
|
+
o as default
|
|
65
|
+
};
|