@flytedan/flytebot-design-system 0.51.6 → 0.52.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/dist/index.cjs +41 -191
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -53
- package/dist/index.d.ts +33 -53
- package/dist/index.js +40 -190
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +143 -0
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,
|
|
@@ -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,
|