@flytedan/flytebot-design-system 0.51.6 → 0.53.0
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/README.md +2 -2
- package/dist/index.cjs +55 -205
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -54
- package/dist/index.d.ts +34 -54
- package/dist/index.js +54 -204
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/styles/components.css +145 -0
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ TypeScript interfaces, a live interactive example, and a usage snippet — in
|
|
|
69
69
|
the docs site included in this repo (not yet published as a hosted site):
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
git clone git@github.com:
|
|
72
|
+
git clone git@github.com:Flytedesk/flytebot-design-system.git
|
|
73
73
|
cd flytebot-design-system
|
|
74
74
|
pnpm install
|
|
75
75
|
pnpm run docs
|
|
@@ -94,7 +94,7 @@ whatever a builder happens to be mid-edit on.
|
|
|
94
94
|
One-time setup, once per machine:
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
git clone git@github.com:
|
|
97
|
+
git clone git@github.com:Flytedesk/flytebot-design-system.git C:/Users/newms/deploy/flytebot-design-system
|
|
98
98
|
cd C:/Users/newms/deploy/flytebot-design-system
|
|
99
99
|
touch .deploy-clone-marker # git-ignored; scripts/release.sh refuses to run without it
|
|
100
100
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -159,8 +159,8 @@ __export(index_exports, {
|
|
|
159
159
|
Select: () => Select,
|
|
160
160
|
SessionKit: () => SessionKit,
|
|
161
161
|
SessionProvider: () => SessionProvider,
|
|
162
|
+
SessionScreen: () => SessionScreen,
|
|
162
163
|
SidebarNav: () => SidebarNav,
|
|
163
|
-
SignInPage: () => SignInPage,
|
|
164
164
|
Skeleton: () => Skeleton,
|
|
165
165
|
SkeletonText: () => SkeletonText,
|
|
166
166
|
Slider: () => Slider,
|
|
@@ -3037,19 +3037,6 @@ function FunnelChart({
|
|
|
3037
3037
|
const color = chartColor(i);
|
|
3038
3038
|
const detail = `${s.label} \u2014 ${valueFormat(value)} \xB7 ${formatPercent(Math.round(pctFirst))} of ${steps[0]?.label || "first step"}` + (stepRate != null ? ` \xB7 ${formatPercent(Math.round(stepRate))} of ${steps[i - 1].label}` : "");
|
|
3039
3039
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { className: "fd-funnel-row", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Tooltip, { label: detail, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("button", { type: "button", className: "fd-funnel-btn", children: [
|
|
3040
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-funnel-shape-wrap", style: { height: barHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3041
|
-
"span",
|
|
3042
|
-
{
|
|
3043
|
-
className: "fd-funnel-shape",
|
|
3044
|
-
role: "img",
|
|
3045
|
-
"aria-label": detail,
|
|
3046
|
-
style: {
|
|
3047
|
-
width: widthPct + "%",
|
|
3048
|
-
background: color,
|
|
3049
|
-
clipPath: `polygon(${insetTop}% 0, ${100 - insetTop}% 0, ${100 - insetBottom}% 100%, ${insetBottom}% 100%)`
|
|
3050
|
-
}
|
|
3051
|
-
}
|
|
3052
|
-
) }),
|
|
3053
3040
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "fd-funnel-meta", children: [
|
|
3054
3041
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-funnel-label", title: truncationTitle(s.label), children: s.label }),
|
|
3055
3042
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-funnel-value fd-tabular", children: valueFormat(value) }),
|
|
@@ -3063,7 +3050,20 @@ function FunnelChart({
|
|
|
3063
3050
|
" of first"
|
|
3064
3051
|
] })
|
|
3065
3052
|
] })
|
|
3066
|
-
] })
|
|
3053
|
+
] }),
|
|
3054
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "fd-funnel-shape-wrap", style: { height: barHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3055
|
+
"span",
|
|
3056
|
+
{
|
|
3057
|
+
className: "fd-funnel-shape",
|
|
3058
|
+
role: "img",
|
|
3059
|
+
"aria-label": detail,
|
|
3060
|
+
style: {
|
|
3061
|
+
width: widthPct + "%",
|
|
3062
|
+
background: color,
|
|
3063
|
+
clipPath: `polygon(${insetTop}% 0, ${100 - insetTop}% 0, ${100 - insetBottom}% 100%, ${insetBottom}% 100%)`
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
) })
|
|
3067
3067
|
] }) }) }, s.id);
|
|
3068
3068
|
}) }),
|
|
3069
3069
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
@@ -8806,197 +8806,47 @@ function ProfilePage({
|
|
|
8806
8806
|
] });
|
|
8807
8807
|
}
|
|
8808
8808
|
|
|
8809
|
-
// src/components/platform/
|
|
8809
|
+
// src/components/platform/SessionScreen.tsx
|
|
8810
8810
|
var React55 = __toESM(require("react"), 1);
|
|
8811
8811
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
}
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8851
|
-
"div",
|
|
8852
|
-
{
|
|
8853
|
-
style: {
|
|
8854
|
-
position: "relative",
|
|
8855
|
-
width: "100%",
|
|
8856
|
-
maxWidth: 408,
|
|
8857
|
-
display: "flex",
|
|
8858
|
-
flexDirection: "column",
|
|
8859
|
-
alignItems: "center"
|
|
8860
|
-
},
|
|
8861
|
-
children: [
|
|
8862
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { style: { marginBottom: "var(--s-32)" }, "data-theme": "dark", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(FlytedeskMark, { size: "lg" }) }),
|
|
8863
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8864
|
-
"div",
|
|
8865
|
-
{
|
|
8866
|
-
style: {
|
|
8867
|
-
width: "100%",
|
|
8868
|
-
borderRadius: "var(--r-2xl)",
|
|
8869
|
-
overflow: "hidden",
|
|
8870
|
-
boxShadow: "0 24px 64px -12px rgba(2, 8, 20, 0.55), 0 2px 8px rgba(2, 8, 20, 0.3)"
|
|
8871
|
-
},
|
|
8872
|
-
children: [
|
|
8873
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8874
|
-
"div",
|
|
8875
|
-
{
|
|
8876
|
-
style: {
|
|
8877
|
-
height: 4,
|
|
8878
|
-
background: "linear-gradient(90deg, var(--blue-400), var(--blue-600), var(--navy))"
|
|
8879
|
-
}
|
|
8880
|
-
}
|
|
8881
|
-
),
|
|
8882
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8883
|
-
"div",
|
|
8884
|
-
{
|
|
8885
|
-
style: {
|
|
8886
|
-
display: "flex",
|
|
8887
|
-
flexDirection: "column",
|
|
8888
|
-
gap: "var(--s-20)",
|
|
8889
|
-
alignItems: "center",
|
|
8890
|
-
textAlign: "center",
|
|
8891
|
-
padding: "var(--s-8) 0"
|
|
8892
|
-
},
|
|
8893
|
-
children: [
|
|
8894
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { children: [
|
|
8895
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h1", { className: "fd-h3", style: { color: "var(--navy)" }, children: productName }),
|
|
8896
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "fd-body-sm fd-muted", style: { marginTop: "var(--s-4)" }, children: continueAs ? "Your session timed out, but you're likely still signed in" : "Sign in with your flytedesk workspace account" })
|
|
8897
|
-
] }),
|
|
8898
|
-
error ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { role: "alert", style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Banner, { tone: "danger", title: error }) }) : null,
|
|
8899
|
-
continueAs ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
8900
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8901
|
-
Button,
|
|
8902
|
-
{
|
|
8903
|
-
variant: "primary",
|
|
8904
|
-
style: { width: "100%" },
|
|
8905
|
-
loading: resuming,
|
|
8906
|
-
disabled: resuming,
|
|
8907
|
-
onClick: handleContinue,
|
|
8908
|
-
children: resuming ? "Resuming\u2026" : `Continue as ${continueAs.name}`
|
|
8909
|
-
}
|
|
8910
|
-
),
|
|
8911
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8912
|
-
"button",
|
|
8913
|
-
{
|
|
8914
|
-
type: "button",
|
|
8915
|
-
className: "fd-body-sm fd-muted",
|
|
8916
|
-
style: {
|
|
8917
|
-
background: "none",
|
|
8918
|
-
border: "none",
|
|
8919
|
-
cursor: "pointer",
|
|
8920
|
-
textDecoration: "underline",
|
|
8921
|
-
padding: 0
|
|
8922
|
-
},
|
|
8923
|
-
disabled: resuming,
|
|
8924
|
-
onClick: continueAs.onDecline,
|
|
8925
|
-
children: "Not you? Sign in with flytedesk ID"
|
|
8926
|
-
}
|
|
8927
|
-
)
|
|
8928
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8929
|
-
Button,
|
|
8930
|
-
{
|
|
8931
|
-
variant: "primary",
|
|
8932
|
-
style: { width: "100%" },
|
|
8933
|
-
loading: signingIn,
|
|
8934
|
-
disabled: signingIn,
|
|
8935
|
-
onClick: handleSignIn,
|
|
8936
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8937
|
-
"span",
|
|
8938
|
-
{
|
|
8939
|
-
style: {
|
|
8940
|
-
display: "flex",
|
|
8941
|
-
flexDirection: "row",
|
|
8942
|
-
alignItems: "center",
|
|
8943
|
-
justifyContent: "center",
|
|
8944
|
-
gap: "var(--s-8)",
|
|
8945
|
-
flexWrap: "nowrap"
|
|
8946
|
-
},
|
|
8947
|
-
children: [
|
|
8948
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GoogleGlyph, {}),
|
|
8949
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: signingIn ? "Signing in\u2026" : "Sign in with flytedesk ID" })
|
|
8950
|
-
]
|
|
8951
|
-
}
|
|
8952
|
-
)
|
|
8953
|
-
}
|
|
8954
|
-
),
|
|
8955
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "fd-body-sm fd-muted", style: { fontSize: "12px" }, children: "One account, every flytedesk app." })
|
|
8956
|
-
]
|
|
8957
|
-
}
|
|
8958
|
-
) })
|
|
8959
|
-
]
|
|
8960
|
-
}
|
|
8961
|
-
)
|
|
8962
|
-
]
|
|
8963
|
-
}
|
|
8964
|
-
)
|
|
8965
|
-
]
|
|
8966
|
-
}
|
|
8967
|
-
);
|
|
8968
|
-
}
|
|
8969
|
-
function GoogleGlyph() {
|
|
8970
|
-
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", "aria-hidden": true, children: [
|
|
8971
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8972
|
-
"path",
|
|
8973
|
-
{
|
|
8974
|
-
fill: "#4285F4",
|
|
8975
|
-
d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.87 2.68-6.62Z"
|
|
8976
|
-
}
|
|
8977
|
-
),
|
|
8978
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8979
|
-
"path",
|
|
8980
|
-
{
|
|
8981
|
-
fill: "#34A853",
|
|
8982
|
-
d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.81.54-1.84.87-3.04.87-2.34 0-4.32-1.58-5.03-3.7H.96v2.33A9 9 0 0 0 9 18Z"
|
|
8983
|
-
}
|
|
8984
|
-
),
|
|
8985
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8986
|
-
"path",
|
|
8987
|
-
{
|
|
8988
|
-
fill: "#FBBC05",
|
|
8989
|
-
d: "M3.97 10.73A5.4 5.4 0 0 1 3.68 9c0-.6.1-1.19.29-1.73V4.94H.96A9 9 0 0 0 0 9c0 1.45.35 2.83.96 4.06l3.01-2.33Z"
|
|
8990
|
-
}
|
|
8991
|
-
),
|
|
8992
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8993
|
-
"path",
|
|
8994
|
-
{
|
|
8995
|
-
fill: "#EA4335",
|
|
8996
|
-
d: "M9 3.58c1.32 0 2.51.45 3.44 1.35l2.59-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.94l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58Z"
|
|
8997
|
-
}
|
|
8998
|
-
)
|
|
8999
|
-
] });
|
|
8812
|
+
var COPY = {
|
|
8813
|
+
"signing-in": { busy: "Signing you in\u2026" },
|
|
8814
|
+
"session-expired": { busy: "Your session expired \u2014 signing you back in\u2026" },
|
|
8815
|
+
"signing-out": { busy: "Signing you out\u2026" },
|
|
8816
|
+
reconnecting: { busy: "Reconnecting\u2026" },
|
|
8817
|
+
"sign-in-failed": { failure: "We couldn't sign you in" },
|
|
8818
|
+
"load-failed": { failure: "We couldn't load your session" }
|
|
8819
|
+
};
|
|
8820
|
+
function SessionScreen({ kind, error, onRetry, productName }) {
|
|
8821
|
+
const copy = COPY[kind];
|
|
8822
|
+
const busyMessage = "busy" in copy ? copy.busy : null;
|
|
8823
|
+
const failureTitle = "failure" in copy ? copy.failure : null;
|
|
8824
|
+
const [announced, setAnnounced] = React55.useState("");
|
|
8825
|
+
React55.useEffect(() => {
|
|
8826
|
+
setAnnounced(busyMessage ?? "");
|
|
8827
|
+
}, [busyMessage]);
|
|
8828
|
+
const titleRef = React55.useRef(null);
|
|
8829
|
+
const failed = failureTitle !== null;
|
|
8830
|
+
React55.useEffect(() => {
|
|
8831
|
+
titleRef.current?.focus({ preventScroll: true });
|
|
8832
|
+
}, [failed]);
|
|
8833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("main", { className: "fd-session-screen", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "fd-session-screen-inner", children: [
|
|
8834
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "fd-session-screen-mark", "data-theme": "dark", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(FlytedeskMark, { size: "lg" }) }),
|
|
8835
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "fd-session-screen-frame", children: [
|
|
8836
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "fd-session-screen-stripe" }),
|
|
8837
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "fd-session-screen-body", children: [
|
|
8838
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h1", { ref: titleRef, tabIndex: -1, className: "fd-h3 fd-session-screen-title", children: productName }),
|
|
8839
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { role: "status", "aria-live": "polite", className: "fd-session-screen-status", children: busyMessage !== null ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
8840
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "fd-spinner fd-spinner-lg fd-session-screen-spinner", "aria-hidden": "true" }),
|
|
8841
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "fd-body fd-session-screen-message", children: announced })
|
|
8842
|
+
] }) : null }),
|
|
8843
|
+
failureTitle !== null ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "fd-session-screen-failure", children: [
|
|
8844
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Banner, { tone: "danger", title: failureTitle, detail: error ?? void 0 }),
|
|
8845
|
+
onRetry !== null ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Button, { variant: "primary", block: true, onClick: onRetry, children: "Try again" }) : null
|
|
8846
|
+
] }) : null
|
|
8847
|
+
] }) })
|
|
8848
|
+
] })
|
|
8849
|
+
] }) });
|
|
9000
8850
|
}
|
|
9001
8851
|
|
|
9002
8852
|
// src/components/platform/RoadmapTimeline.tsx
|
|
@@ -14866,8 +14716,8 @@ function useDocumentTitle(routeTitle, appName) {
|
|
|
14866
14716
|
Select,
|
|
14867
14717
|
SessionKit,
|
|
14868
14718
|
SessionProvider,
|
|
14719
|
+
SessionScreen,
|
|
14869
14720
|
SidebarNav,
|
|
14870
|
-
SignInPage,
|
|
14871
14721
|
Skeleton,
|
|
14872
14722
|
SkeletonText,
|
|
14873
14723
|
Slider,
|