@datatechsolutions/ui 3.3.0 → 3.5.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/astrlabe/index.js +113 -113
- package/dist/astrlabe/index.mjs +6 -6
- package/dist/astrlabe/workflow-canvas.js +6 -6
- package/dist/astrlabe/workflow-canvas.mjs +5 -5
- package/dist/brand/index.js +0 -14
- package/dist/brand/index.js.map +1 -1
- package/dist/brand/index.mjs +0 -14
- package/dist/brand/index.mjs.map +1 -1
- package/dist/{chunk-2WXRRQM3.mjs → chunk-2MJAHST4.mjs} +554 -516
- package/dist/chunk-2MJAHST4.mjs.map +1 -0
- package/dist/{chunk-FAGDZEKM.js → chunk-2OZZH2IO.js} +2 -2
- package/dist/chunk-2OZZH2IO.js.map +1 -0
- package/dist/{chunk-SYNVNTLJ.mjs → chunk-3AY5HIQ6.mjs} +2 -2
- package/dist/chunk-3AY5HIQ6.mjs.map +1 -0
- package/dist/{chunk-O6M3KDGT.mjs → chunk-3OLYSMI5.mjs} +41 -7
- package/dist/chunk-3OLYSMI5.mjs.map +1 -0
- package/dist/{chunk-GIQXB3BG.mjs → chunk-4PFU6A2B.mjs} +3 -3
- package/dist/{chunk-GIQXB3BG.mjs.map → chunk-4PFU6A2B.mjs.map} +1 -1
- package/dist/{chunk-3ZUMJTDT.mjs → chunk-5BEVTOZV.mjs} +4 -5
- package/dist/{chunk-3JJWPOK6.js.map → chunk-5BEVTOZV.mjs.map} +1 -1
- package/dist/{chunk-3JJWPOK6.js → chunk-5I7F7KZ6.js} +10 -11
- package/dist/chunk-5I7F7KZ6.js.map +1 -0
- package/dist/{chunk-BR2GAZKG.mjs → chunk-6V3DUBOZ.mjs} +7 -7
- package/dist/{chunk-BR2GAZKG.mjs.map → chunk-6V3DUBOZ.mjs.map} +1 -1
- package/dist/{chunk-5GDKCFM5.mjs → chunk-6W7VTZG6.mjs} +3 -3
- package/dist/{chunk-5GDKCFM5.mjs.map → chunk-6W7VTZG6.mjs.map} +1 -1
- package/dist/{chunk-IJAKZHXX.js → chunk-74MHWEDC.js} +684 -645
- package/dist/chunk-74MHWEDC.js.map +1 -0
- package/dist/{chunk-IRPS5UCS.mjs → chunk-7CEZB3ZD.mjs} +3 -3
- package/dist/{chunk-IRPS5UCS.mjs.map → chunk-7CEZB3ZD.mjs.map} +1 -1
- package/dist/{chunk-UDDZTTLO.mjs → chunk-7UHV6A4C.mjs} +6 -7
- package/dist/chunk-7UHV6A4C.mjs.map +1 -0
- package/dist/{chunk-ZM5MVWIT.js → chunk-A7FI4K7Z.js} +5 -6
- package/dist/chunk-A7FI4K7Z.js.map +1 -0
- package/dist/{chunk-MWPTSBAI.js → chunk-AVM53A3Y.js} +63 -29
- package/dist/chunk-AVM53A3Y.js.map +1 -0
- package/dist/{chunk-I2NZGVBG.js → chunk-AWDH6WNA.js} +1214 -5396
- package/dist/chunk-AWDH6WNA.js.map +1 -0
- package/dist/{chunk-ZJPNP2YW.mjs → chunk-BUDZNAKL.mjs} +2 -2
- package/dist/chunk-BUDZNAKL.mjs.map +1 -0
- package/dist/{chunk-OCELRSLO.js → chunk-BVXATTTA.js} +4 -4
- package/dist/{chunk-OCELRSLO.js.map → chunk-BVXATTTA.js.map} +1 -1
- package/dist/{chunk-W5OEBO6E.js → chunk-C4NRF2G2.js} +13 -14
- package/dist/chunk-C4NRF2G2.js.map +1 -0
- package/dist/{chunk-JSNRCYSO.js → chunk-CY2MBKVG.js} +4 -4
- package/dist/{chunk-JSNRCYSO.js.map → chunk-CY2MBKVG.js.map} +1 -1
- package/dist/{chunk-ZL6C2ZAF.js → chunk-FK3WDELF.js} +67 -67
- package/dist/{chunk-ZL6C2ZAF.js.map → chunk-FK3WDELF.js.map} +1 -1
- package/dist/{chunk-MVBIAXVN.mjs → chunk-IOEQ2GET.mjs} +14 -11
- package/dist/chunk-IOEQ2GET.mjs.map +1 -0
- package/dist/{chunk-AOUUZ52N.js → chunk-NCDBNGIB.js} +85 -86
- package/dist/chunk-NCDBNGIB.js.map +1 -0
- package/dist/{chunk-B67DP7MI.mjs → chunk-NJ5RVWLA.mjs} +4 -4
- package/dist/{chunk-B67DP7MI.mjs.map → chunk-NJ5RVWLA.mjs.map} +1 -1
- package/dist/{chunk-HDCUWUNH.js → chunk-NKXQYFS7.js} +28 -27
- package/dist/chunk-NKXQYFS7.js.map +1 -0
- package/dist/{chunk-JN6IL6OH.mjs → chunk-NOHHZ6FM.mjs} +1171 -5316
- package/dist/chunk-NOHHZ6FM.mjs.map +1 -0
- package/dist/{chunk-PCYL4MII.mjs → chunk-OASC7NYV.mjs} +156 -314
- package/dist/chunk-OASC7NYV.mjs.map +1 -0
- package/dist/{chunk-RXZNACMI.js → chunk-P43PX75J.js} +33 -33
- package/dist/{chunk-RXZNACMI.js.map → chunk-P43PX75J.js.map} +1 -1
- package/dist/{chunk-OL73LBX5.mjs → chunk-QLFSJ6HK.mjs} +3 -4
- package/dist/chunk-QLFSJ6HK.mjs.map +1 -0
- package/dist/{chunk-LEKZUS6N.mjs → chunk-QPSHM2JQ.mjs} +4 -5
- package/dist/chunk-QPSHM2JQ.mjs.map +1 -0
- package/dist/{chunk-NJFRJ6YD.js → chunk-QSMPKL27.js} +225 -384
- package/dist/chunk-QSMPKL27.js.map +1 -0
- package/dist/{chunk-ZV5EZXXO.mjs → chunk-RHRJXK5R.mjs} +3 -3
- package/dist/{chunk-ZV5EZXXO.mjs.map → chunk-RHRJXK5R.mjs.map} +1 -1
- package/dist/{chunk-F54Q2YJY.js → chunk-SY4MUT5V.js} +7 -7
- package/dist/{chunk-F54Q2YJY.js.map → chunk-SY4MUT5V.js.map} +1 -1
- package/dist/{chunk-5RM6NGZ6.mjs → chunk-UHMAKUON.mjs} +3 -3
- package/dist/{chunk-5RM6NGZ6.mjs.map → chunk-UHMAKUON.mjs.map} +1 -1
- package/dist/{chunk-TIJJHW2Z.js → chunk-V5VBYOF5.js} +36 -36
- package/dist/{chunk-TIJJHW2Z.js.map → chunk-V5VBYOF5.js.map} +1 -1
- package/dist/{chunk-KR2X2WHJ.js → chunk-VMGNQFRO.js} +53 -53
- package/dist/{chunk-KR2X2WHJ.js.map → chunk-VMGNQFRO.js.map} +1 -1
- package/dist/{chunk-HZ4LOVHM.js → chunk-VY52Y5GC.js} +2 -2
- package/dist/chunk-VY52Y5GC.js.map +1 -0
- package/dist/{chunk-TVMLV675.js → chunk-Z7VY5M4T.js} +98 -95
- package/dist/chunk-Z7VY5M4T.js.map +1 -0
- package/dist/{chunk-R4TQWXNG.mjs → chunk-ZM2Q2SMC.mjs} +6 -5
- package/dist/chunk-ZM2Q2SMC.mjs.map +1 -0
- package/dist/index.js +744 -904
- package/dist/index.mjs +4 -4
- package/dist/platform/admin/index.js +13 -13
- package/dist/platform/admin/index.mjs +7 -7
- package/dist/platform/agents-workspace.js +9 -9
- package/dist/platform/agents-workspace.mjs +8 -8
- package/dist/platform/app-shell.js +6 -6
- package/dist/platform/app-shell.mjs +5 -5
- package/dist/platform/auth/index.js +30 -30
- package/dist/platform/auth/index.mjs +7 -7
- package/dist/platform/billing/index.js +6 -6
- package/dist/platform/billing/index.mjs +5 -5
- package/dist/platform/impersonation/index.js +6 -6
- package/dist/platform/impersonation/index.mjs +5 -5
- package/dist/platform/index.js +102 -4812
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.mjs +24 -4729
- package/dist/platform/index.mjs.map +1 -1
- package/dist/platform/pages/index.js +320 -204
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +146 -30
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/rbac.js +2 -2
- package/dist/platform/rbac.mjs +1 -1
- package/dist/platform/settings/index.js +10 -10
- package/dist/platform/settings/index.mjs +9 -9
- package/dist/platform/utils/index.js +3 -3
- package/dist/platform/utils/index.js.map +1 -1
- package/dist/platform/utils/index.mjs +1 -1
- package/dist/platform/utils/index.mjs.map +1 -1
- package/dist/platform/workflow-api-client.js +62 -62
- package/dist/platform/workflow-api-client.mjs +2 -2
- package/dist/platform/workflow-canvas-shell.js +7 -7
- package/dist/platform/workflow-canvas-shell.mjs +6 -6
- package/package.json +15 -5
- package/src/styles/liquid-glass.css +283 -2
- package/dist/astrlabe/contracts.d.mts +0 -517
- package/dist/astrlabe/contracts.d.ts +0 -517
- package/dist/astrlabe/graph-node.d.mts +0 -28
- package/dist/astrlabe/graph-node.d.ts +0 -28
- package/dist/astrlabe/index.d.mts +0 -751
- package/dist/astrlabe/index.d.ts +0 -751
- package/dist/astrlabe/utils.d.mts +0 -60
- package/dist/astrlabe/utils.d.ts +0 -60
- package/dist/astrlabe/workflow-canvas.d.mts +0 -69
- package/dist/astrlabe/workflow-canvas.d.ts +0 -69
- package/dist/astrlabe/workflow-preview-canvas.d.mts +0 -10
- package/dist/astrlabe/workflow-preview-canvas.d.ts +0 -10
- package/dist/billing-panel-DsHhhJqG.d.mts +0 -18
- package/dist/billing-panel-DsHhhJqG.d.ts +0 -18
- package/dist/brand/index.d.mts +0 -85
- package/dist/brand/index.d.ts +0 -85
- package/dist/chunk-2WXRRQM3.mjs.map +0 -1
- package/dist/chunk-3ZUMJTDT.mjs.map +0 -1
- package/dist/chunk-AOUUZ52N.js.map +0 -1
- package/dist/chunk-FAGDZEKM.js.map +0 -1
- package/dist/chunk-HDCUWUNH.js.map +0 -1
- package/dist/chunk-HZ4LOVHM.js.map +0 -1
- package/dist/chunk-I2NZGVBG.js.map +0 -1
- package/dist/chunk-IJAKZHXX.js.map +0 -1
- package/dist/chunk-JN6IL6OH.mjs.map +0 -1
- package/dist/chunk-LEKZUS6N.mjs.map +0 -1
- package/dist/chunk-MVBIAXVN.mjs.map +0 -1
- package/dist/chunk-MWPTSBAI.js.map +0 -1
- package/dist/chunk-NJFRJ6YD.js.map +0 -1
- package/dist/chunk-O6M3KDGT.mjs.map +0 -1
- package/dist/chunk-OL73LBX5.mjs.map +0 -1
- package/dist/chunk-PCYL4MII.mjs.map +0 -1
- package/dist/chunk-R4TQWXNG.mjs.map +0 -1
- package/dist/chunk-SYNVNTLJ.mjs.map +0 -1
- package/dist/chunk-TVMLV675.js.map +0 -1
- package/dist/chunk-UDDZTTLO.mjs.map +0 -1
- package/dist/chunk-W5OEBO6E.js.map +0 -1
- package/dist/chunk-ZJPNP2YW.mjs.map +0 -1
- package/dist/chunk-ZM5MVWIT.js.map +0 -1
- package/dist/dynamic-island-confirm-BKsZkAEP.d.mts +0 -17
- package/dist/dynamic-island-confirm-BKsZkAEP.d.ts +0 -17
- package/dist/index-CoB18TbG.d.ts +0 -215
- package/dist/index-VI9gyJXl.d.mts +0 -215
- package/dist/index.d.mts +0 -5412
- package/dist/index.d.ts +0 -5412
- package/dist/layout-engine-YZcVr20M.d.mts +0 -19
- package/dist/layout-engine-YZcVr20M.d.ts +0 -19
- package/dist/lib/i18n-context.d.mts +0 -36
- package/dist/lib/i18n-context.d.ts +0 -36
- package/dist/lib/router-context.d.mts +0 -35
- package/dist/lib/router-context.d.ts +0 -35
- package/dist/navigation-BiWVffAN.d.mts +0 -49
- package/dist/navigation-BiWVffAN.d.ts +0 -49
- package/dist/platform/admin/index.d.mts +0 -17
- package/dist/platform/admin/index.d.ts +0 -17
- package/dist/platform/agents-workspace.d.mts +0 -19
- package/dist/platform/agents-workspace.d.ts +0 -19
- package/dist/platform/app-shell.d.mts +0 -58
- package/dist/platform/app-shell.d.ts +0 -58
- package/dist/platform/auth/index.d.mts +0 -73
- package/dist/platform/auth/index.d.ts +0 -73
- package/dist/platform/billing/index.d.mts +0 -29
- package/dist/platform/billing/index.d.ts +0 -29
- package/dist/platform/impersonation/index.d.mts +0 -19
- package/dist/platform/impersonation/index.d.ts +0 -19
- package/dist/platform/index.d.mts +0 -224
- package/dist/platform/index.d.ts +0 -224
- package/dist/platform/pages/index.d.mts +0 -432
- package/dist/platform/pages/index.d.ts +0 -432
- package/dist/platform/rbac.d.mts +0 -41
- package/dist/platform/rbac.d.ts +0 -41
- package/dist/platform/settings/index.d.mts +0 -31
- package/dist/platform/settings/index.d.ts +0 -31
- package/dist/platform/telemetry/index.d.mts +0 -51
- package/dist/platform/telemetry/index.d.ts +0 -51
- package/dist/platform/utils/index.d.mts +0 -32
- package/dist/platform/utils/index.d.ts +0 -32
- package/dist/platform/windsock-admin-client.d.mts +0 -57
- package/dist/platform/windsock-admin-client.d.ts +0 -57
- package/dist/platform/workflow-api-client.d.mts +0 -6
- package/dist/platform/workflow-api-client.d.ts +0 -6
- package/dist/platform/workflow-canvas-shell.d.mts +0 -18
- package/dist/platform/workflow-canvas-shell.d.ts +0 -18
- package/dist/rule-form-BYJzyork.d.mts +0 -128
- package/dist/rule-form-BYJzyork.d.ts +0 -128
- package/dist/workflow-api-client-BKD8OfP_.d.ts +0 -468
- package/dist/workflow-api-client-DoYj7nHz.d.mts +0 -468
- package/dist/workflow-store-o17I6L6A.d.ts +0 -79
- package/dist/workflow-store-ppVHdMZi.d.mts +0 -79
- package/src/brand/logos/kori-icon.svg +0 -45
- package/src/brand/logos/kori-logo-dark.svg +0 -40
- package/src/brand/logos/kori-logo.svg +0 -43
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkCY2MBKVG_js = require('./chunk-CY2MBKVG.js');
|
|
5
|
+
var chunkAWDH6WNA_js = require('./chunk-AWDH6WNA.js');
|
|
6
6
|
var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
|
|
7
7
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var outline = require('@heroicons/react/24/outline');
|
|
10
|
-
var client = require('@datatechsolutions/windsock/client');
|
|
11
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
11
|
var solid = require('@heroicons/react/20/solid');
|
|
13
12
|
var react$1 = require('@headlessui/react');
|
|
@@ -20,7 +19,7 @@ function MfaChallenge({
|
|
|
20
19
|
embedded = false
|
|
21
20
|
}) {
|
|
22
21
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
23
|
-
const { verifyMFA } =
|
|
22
|
+
const { verifyMFA } = chunkAWDH6WNA_js.useAuth();
|
|
24
23
|
const [method, setMethod] = react.useState("totp");
|
|
25
24
|
const [totpCode, setTotpCode] = react.useState("");
|
|
26
25
|
const [backupCode, setBackupCode] = react.useState("");
|
|
@@ -84,7 +83,7 @@ function MfaChallenge({
|
|
|
84
83
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: method === "totp" ? t("mfa.challenge.descriptionTotp") : t("mfa.challenge.descriptionBackup") })
|
|
85
84
|
] }),
|
|
86
85
|
availableMethods.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
87
|
-
|
|
86
|
+
chunkAWDH6WNA_js.SegmentedControl,
|
|
88
87
|
{
|
|
89
88
|
segments,
|
|
90
89
|
value: method,
|
|
@@ -95,7 +94,7 @@ function MfaChallenge({
|
|
|
95
94
|
failureCount >= 3 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400 text-center", children: t("mfa.challenge.lockoutWarning") }),
|
|
96
95
|
method === "totp" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
97
96
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
98
|
-
|
|
97
|
+
chunkCY2MBKVG_js.OtpInput,
|
|
99
98
|
{
|
|
100
99
|
value: totpCode,
|
|
101
100
|
onChange: setTotpCode,
|
|
@@ -105,11 +104,11 @@ function MfaChallenge({
|
|
|
105
104
|
autoFocus: true
|
|
106
105
|
}
|
|
107
106
|
),
|
|
108
|
-
isSubmitting && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
+
isSubmitting && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Spinner, {}) })
|
|
109
108
|
] }),
|
|
110
109
|
method === "backup" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
111
110
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
112
|
-
|
|
111
|
+
chunkAWDH6WNA_js.Input,
|
|
113
112
|
{
|
|
114
113
|
value: backupCode,
|
|
115
114
|
onChange: (event) => setBackupCode(event.target.value),
|
|
@@ -121,7 +120,7 @@ function MfaChallenge({
|
|
|
121
120
|
}
|
|
122
121
|
),
|
|
123
122
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
124
|
-
|
|
123
|
+
chunkAWDH6WNA_js.Button,
|
|
125
124
|
{
|
|
126
125
|
color: "ios-glass-blue",
|
|
127
126
|
fullWidth: true,
|
|
@@ -146,7 +145,7 @@ function MfaChallenge({
|
|
|
146
145
|
) })
|
|
147
146
|
] });
|
|
148
147
|
if (embedded) return content;
|
|
149
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
148
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto max-w-md p-6 sm:p-8", children: content });
|
|
150
149
|
}
|
|
151
150
|
function SignIn({
|
|
152
151
|
onSuccess,
|
|
@@ -160,8 +159,8 @@ function SignIn({
|
|
|
160
159
|
heroPanel
|
|
161
160
|
}) {
|
|
162
161
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
163
|
-
const { loginWithCredentials, loginWithProvider } =
|
|
164
|
-
const discovered =
|
|
162
|
+
const { loginWithCredentials, loginWithProvider } = chunkAWDH6WNA_js.useAuth();
|
|
163
|
+
const discovered = chunkAWDH6WNA_js.useSocialProviders();
|
|
165
164
|
const effectiveSocialProviders = socialProviders ?? discovered.providers;
|
|
166
165
|
const [email, setEmail] = react.useState(defaultEmail);
|
|
167
166
|
const [password, setPassword] = react.useState("");
|
|
@@ -181,10 +180,10 @@ function SignIn({
|
|
|
181
180
|
} else if (result.mfaRequired && result.mfaToken) {
|
|
182
181
|
setMfaRequired({ mfaToken: result.mfaToken });
|
|
183
182
|
} else if (result.error) {
|
|
184
|
-
setError(t("signInError"));
|
|
183
|
+
setError(result.error || t("signInError"));
|
|
185
184
|
}
|
|
186
|
-
} catch {
|
|
187
|
-
setError(t("signInError"));
|
|
185
|
+
} catch (e) {
|
|
186
|
+
setError(e instanceof Error ? e.message : t("signInError"));
|
|
188
187
|
} finally {
|
|
189
188
|
setIsSubmitting(false);
|
|
190
189
|
}
|
|
@@ -214,7 +213,7 @@ function SignIn({
|
|
|
214
213
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl bg-red-50 dark:bg-red-900/20 px-4 py-3 text-sm text-ios-red", role: "alert", children: error }),
|
|
215
214
|
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
216
215
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
217
|
-
|
|
216
|
+
chunkAWDH6WNA_js.Input,
|
|
218
217
|
{
|
|
219
218
|
label: t("emailLabel"),
|
|
220
219
|
type: "email",
|
|
@@ -227,7 +226,7 @@ function SignIn({
|
|
|
227
226
|
}
|
|
228
227
|
),
|
|
229
228
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
230
|
-
|
|
229
|
+
chunkAWDH6WNA_js.PasswordInput,
|
|
231
230
|
{
|
|
232
231
|
label: t("passwordLabel"),
|
|
233
232
|
value: password,
|
|
@@ -248,7 +247,7 @@ function SignIn({
|
|
|
248
247
|
}
|
|
249
248
|
) }),
|
|
250
249
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
251
|
-
|
|
250
|
+
chunkAWDH6WNA_js.Button,
|
|
252
251
|
{
|
|
253
252
|
type: "submit",
|
|
254
253
|
color: "ios-glass-green",
|
|
@@ -266,7 +265,7 @@ function SignIn({
|
|
|
266
265
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex justify-center text-xs", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-white/80 px-3 text-gray-400 dark:bg-gray-900/80 dark:text-gray-500", children: t("orContinueWith") }) })
|
|
267
266
|
] }),
|
|
268
267
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
269
|
-
|
|
268
|
+
chunkCY2MBKVG_js.SocialLoginButtons,
|
|
270
269
|
{
|
|
271
270
|
providers: [...effectiveSocialProviders],
|
|
272
271
|
onProviderClick: handleSocialLogin,
|
|
@@ -276,7 +275,7 @@ function SignIn({
|
|
|
276
275
|
)
|
|
277
276
|
] }),
|
|
278
277
|
allowPasswordless && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
279
|
-
|
|
278
|
+
chunkAWDH6WNA_js.Button,
|
|
280
279
|
{
|
|
281
280
|
type: "button",
|
|
282
281
|
color: "ios-glass-blue",
|
|
@@ -304,7 +303,7 @@ function SignIn({
|
|
|
304
303
|
] })
|
|
305
304
|
] });
|
|
306
305
|
if (embedded) return content;
|
|
307
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
306
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkCY2MBKVG_js.AuthLayout, { heroPanel, children: content });
|
|
308
307
|
}
|
|
309
308
|
var RESEND_COOLDOWN_SECONDS = 60;
|
|
310
309
|
function VerifyEmail({
|
|
@@ -314,7 +313,7 @@ function VerifyEmail({
|
|
|
314
313
|
embedded = false
|
|
315
314
|
}) {
|
|
316
315
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
317
|
-
const { client
|
|
316
|
+
const { client } = chunkAWDH6WNA_js.useAuth();
|
|
318
317
|
const [code, setCode] = react.useState("");
|
|
319
318
|
const [error, setError] = react.useState(null);
|
|
320
319
|
const [isSubmitting, setIsSubmitting] = react.useState(false);
|
|
@@ -338,7 +337,7 @@ function VerifyEmail({
|
|
|
338
337
|
setError(null);
|
|
339
338
|
setIsSubmitting(true);
|
|
340
339
|
try {
|
|
341
|
-
await client
|
|
340
|
+
await client.verifyEmail(email, completedCode);
|
|
342
341
|
onSuccess?.();
|
|
343
342
|
} catch {
|
|
344
343
|
setError(t("verifyEmailError"));
|
|
@@ -347,7 +346,7 @@ function VerifyEmail({
|
|
|
347
346
|
setIsSubmitting(false);
|
|
348
347
|
}
|
|
349
348
|
},
|
|
350
|
-
[client
|
|
349
|
+
[client, email, onSuccess, t]
|
|
351
350
|
);
|
|
352
351
|
const handleResend = react.useCallback(async () => {
|
|
353
352
|
if (cooldown > 0 || isResending) return;
|
|
@@ -372,7 +371,7 @@ function VerifyEmail({
|
|
|
372
371
|
] }),
|
|
373
372
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl bg-red-50 dark:bg-red-900/20 px-4 py-3 text-sm text-ios-red text-center", role: "alert", children: error }),
|
|
374
373
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
375
|
-
|
|
374
|
+
chunkCY2MBKVG_js.OtpInput,
|
|
376
375
|
{
|
|
377
376
|
value: code,
|
|
378
377
|
onChange: setCode,
|
|
@@ -382,11 +381,11 @@ function VerifyEmail({
|
|
|
382
381
|
autoFocus: true
|
|
383
382
|
}
|
|
384
383
|
),
|
|
385
|
-
isSubmitting && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
384
|
+
isSubmitting && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Spinner, {}) }),
|
|
386
385
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-1", children: [
|
|
387
386
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("verifyEmailNoCode") }),
|
|
388
387
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
389
|
-
|
|
388
|
+
chunkAWDH6WNA_js.Button,
|
|
390
389
|
{
|
|
391
390
|
type: "button",
|
|
392
391
|
outline: true,
|
|
@@ -399,7 +398,7 @@ function VerifyEmail({
|
|
|
399
398
|
] })
|
|
400
399
|
] });
|
|
401
400
|
if (embedded) return content;
|
|
402
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
401
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto max-w-md p-6 sm:p-8", children: content });
|
|
403
402
|
}
|
|
404
403
|
function SignUp({
|
|
405
404
|
onSuccess,
|
|
@@ -410,8 +409,8 @@ function SignUp({
|
|
|
410
409
|
heroPanel
|
|
411
410
|
}) {
|
|
412
411
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
413
|
-
const { client
|
|
414
|
-
const discovered =
|
|
412
|
+
const { client, loginWithProvider } = chunkAWDH6WNA_js.useAuth();
|
|
413
|
+
const discovered = chunkAWDH6WNA_js.useSocialProviders();
|
|
415
414
|
const effectiveSocialProviders = socialProviders ?? discovered.providers;
|
|
416
415
|
const [phase, setPhase] = react.useState("form");
|
|
417
416
|
const [registeredEmail, setRegisteredEmail] = react.useState("");
|
|
@@ -428,16 +427,20 @@ function SignUp({
|
|
|
428
427
|
setError(null);
|
|
429
428
|
setIsSubmitting(true);
|
|
430
429
|
try {
|
|
431
|
-
await client
|
|
430
|
+
const result = await client.register({ name, email, password });
|
|
431
|
+
if (!result.success) {
|
|
432
|
+
setError(result.error ?? t("signUpError"));
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
432
435
|
setRegisteredEmail(email);
|
|
433
436
|
setPhase("verify");
|
|
434
|
-
} catch {
|
|
435
|
-
setError(t("signUpError"));
|
|
437
|
+
} catch (e) {
|
|
438
|
+
setError(e instanceof Error ? e.message : t("signUpError"));
|
|
436
439
|
} finally {
|
|
437
440
|
setIsSubmitting(false);
|
|
438
441
|
}
|
|
439
442
|
},
|
|
440
|
-
[client
|
|
443
|
+
[client, name, email, password, t]
|
|
441
444
|
);
|
|
442
445
|
const handleSocialLogin = react.useCallback((provider) => {
|
|
443
446
|
setSocialLoading(provider);
|
|
@@ -462,7 +465,7 @@ function SignUp({
|
|
|
462
465
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl bg-red-50 dark:bg-red-900/20 px-4 py-3 text-sm text-ios-red", role: "alert", children: error }),
|
|
463
466
|
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
464
467
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
465
|
-
|
|
468
|
+
chunkAWDH6WNA_js.Input,
|
|
466
469
|
{
|
|
467
470
|
label: t("nameLabel"),
|
|
468
471
|
type: "text",
|
|
@@ -476,7 +479,7 @@ function SignUp({
|
|
|
476
479
|
}
|
|
477
480
|
),
|
|
478
481
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
-
|
|
482
|
+
chunkAWDH6WNA_js.Input,
|
|
480
483
|
{
|
|
481
484
|
label: t("emailLabel"),
|
|
482
485
|
type: "email",
|
|
@@ -491,7 +494,7 @@ function SignUp({
|
|
|
491
494
|
),
|
|
492
495
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
493
496
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
494
|
-
|
|
497
|
+
chunkAWDH6WNA_js.PasswordInput,
|
|
495
498
|
{
|
|
496
499
|
label: t("passwordLabel"),
|
|
497
500
|
value: password,
|
|
@@ -504,7 +507,7 @@ function SignUp({
|
|
|
504
507
|
}
|
|
505
508
|
),
|
|
506
509
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
507
|
-
|
|
510
|
+
chunkCY2MBKVG_js.PasswordStrengthMeter,
|
|
508
511
|
{
|
|
509
512
|
password,
|
|
510
513
|
policy: passwordPolicy,
|
|
@@ -513,7 +516,7 @@ function SignUp({
|
|
|
513
516
|
)
|
|
514
517
|
] }),
|
|
515
518
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
516
|
-
|
|
519
|
+
chunkAWDH6WNA_js.FormCheckbox,
|
|
517
520
|
{
|
|
518
521
|
checked: termsAccepted,
|
|
519
522
|
onChange: setTermsAccepted,
|
|
@@ -523,7 +526,7 @@ function SignUp({
|
|
|
523
526
|
}
|
|
524
527
|
),
|
|
525
528
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
526
|
-
|
|
529
|
+
chunkAWDH6WNA_js.Button,
|
|
527
530
|
{
|
|
528
531
|
type: "submit",
|
|
529
532
|
color: "ios-glass-blue",
|
|
@@ -540,7 +543,7 @@ function SignUp({
|
|
|
540
543
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex justify-center text-xs", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-white dark:bg-gray-900 px-3 text-gray-400 dark:text-gray-500", children: t("orContinueWith") }) })
|
|
541
544
|
] }),
|
|
542
545
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
543
|
-
|
|
546
|
+
chunkCY2MBKVG_js.SocialLoginButtons,
|
|
544
547
|
{
|
|
545
548
|
providers: [...effectiveSocialProviders],
|
|
546
549
|
onProviderClick: handleSocialLogin,
|
|
@@ -564,7 +567,7 @@ function SignUp({
|
|
|
564
567
|
] })
|
|
565
568
|
] });
|
|
566
569
|
if (embedded) return content;
|
|
567
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
570
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkCY2MBKVG_js.AuthLayout, { heroPanel, children: content });
|
|
568
571
|
}
|
|
569
572
|
function ForgotPassword({
|
|
570
573
|
onSuccess,
|
|
@@ -573,7 +576,7 @@ function ForgotPassword({
|
|
|
573
576
|
embedded = false
|
|
574
577
|
}) {
|
|
575
578
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
576
|
-
const { client
|
|
579
|
+
const { client } = chunkAWDH6WNA_js.useAuth();
|
|
577
580
|
const [phase, setPhase] = react.useState("form");
|
|
578
581
|
const [email, setEmail] = react.useState(defaultEmail);
|
|
579
582
|
const [error, setError] = react.useState(null);
|
|
@@ -584,7 +587,7 @@ function ForgotPassword({
|
|
|
584
587
|
setError(null);
|
|
585
588
|
setIsSubmitting(true);
|
|
586
589
|
try {
|
|
587
|
-
await client
|
|
590
|
+
await client.requestPasswordReset(email);
|
|
588
591
|
setPhase("sent");
|
|
589
592
|
onSuccess?.();
|
|
590
593
|
} catch {
|
|
@@ -593,11 +596,11 @@ function ForgotPassword({
|
|
|
593
596
|
setIsSubmitting(false);
|
|
594
597
|
}
|
|
595
598
|
},
|
|
596
|
-
[client
|
|
599
|
+
[client, email, onSuccess, t]
|
|
597
600
|
);
|
|
598
601
|
const sentContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
599
602
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
600
|
-
|
|
603
|
+
chunkAWDH6WNA_js.EmptyState,
|
|
601
604
|
{
|
|
602
605
|
variant: "minimal",
|
|
603
606
|
icon: outline.CheckCircleIcon,
|
|
@@ -622,7 +625,7 @@ function ForgotPassword({
|
|
|
622
625
|
] }),
|
|
623
626
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl bg-red-50 dark:bg-red-900/20 px-4 py-3 text-sm text-ios-red", role: "alert", children: error }),
|
|
624
627
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
625
|
-
|
|
628
|
+
chunkAWDH6WNA_js.BaseForm,
|
|
626
629
|
{
|
|
627
630
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.EnvelopeIcon, { className: "h-5 w-5" }),
|
|
628
631
|
iconColor: "blue",
|
|
@@ -634,7 +637,7 @@ function ForgotPassword({
|
|
|
634
637
|
submitDisabled: !email.trim(),
|
|
635
638
|
showHeader: false,
|
|
636
639
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
637
|
-
|
|
640
|
+
chunkAWDH6WNA_js.Input,
|
|
638
641
|
{
|
|
639
642
|
label: t("emailLabel"),
|
|
640
643
|
type: "email",
|
|
@@ -662,7 +665,7 @@ function ForgotPassword({
|
|
|
662
665
|
] });
|
|
663
666
|
const activeContent = phase === "sent" ? sentContent : formContent;
|
|
664
667
|
if (embedded) return activeContent;
|
|
665
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
668
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto max-w-md p-6 sm:p-8", children: activeContent });
|
|
666
669
|
}
|
|
667
670
|
function ResetPassword({
|
|
668
671
|
token,
|
|
@@ -671,7 +674,7 @@ function ResetPassword({
|
|
|
671
674
|
embedded = false
|
|
672
675
|
}) {
|
|
673
676
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
674
|
-
const { client
|
|
677
|
+
const { client } = chunkAWDH6WNA_js.useAuth();
|
|
675
678
|
const [phase, setPhase] = react.useState("form");
|
|
676
679
|
const [password, setPassword] = react.useState("");
|
|
677
680
|
const [confirmPassword, setConfirmPassword] = react.useState("");
|
|
@@ -689,7 +692,7 @@ function ResetPassword({
|
|
|
689
692
|
}
|
|
690
693
|
setIsSubmitting(true);
|
|
691
694
|
try {
|
|
692
|
-
await client
|
|
695
|
+
await client.resetPassword(token, password);
|
|
693
696
|
setPhase("success");
|
|
694
697
|
onSuccess?.();
|
|
695
698
|
} catch {
|
|
@@ -698,10 +701,10 @@ function ResetPassword({
|
|
|
698
701
|
setIsSubmitting(false);
|
|
699
702
|
}
|
|
700
703
|
},
|
|
701
|
-
[client
|
|
704
|
+
[client, token, password, passwordsMatch, onSuccess, t]
|
|
702
705
|
);
|
|
703
706
|
const successContent = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
704
|
-
|
|
707
|
+
chunkAWDH6WNA_js.EmptyState,
|
|
705
708
|
{
|
|
706
709
|
variant: "minimal",
|
|
707
710
|
icon: outline.CheckCircleIcon,
|
|
@@ -718,7 +721,7 @@ function ResetPassword({
|
|
|
718
721
|
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
719
722
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
720
723
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
721
|
-
|
|
724
|
+
chunkAWDH6WNA_js.PasswordInput,
|
|
722
725
|
{
|
|
723
726
|
label: t("newPasswordLabel"),
|
|
724
727
|
value: password,
|
|
@@ -732,7 +735,7 @@ function ResetPassword({
|
|
|
732
735
|
}
|
|
733
736
|
),
|
|
734
737
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
735
|
-
|
|
738
|
+
chunkCY2MBKVG_js.PasswordStrengthMeter,
|
|
736
739
|
{
|
|
737
740
|
password,
|
|
738
741
|
policy: passwordPolicy,
|
|
@@ -741,7 +744,7 @@ function ResetPassword({
|
|
|
741
744
|
)
|
|
742
745
|
] }),
|
|
743
746
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
744
|
-
|
|
747
|
+
chunkAWDH6WNA_js.PasswordInput,
|
|
745
748
|
{
|
|
746
749
|
label: t("confirmPasswordLabel"),
|
|
747
750
|
value: confirmPassword,
|
|
@@ -756,7 +759,7 @@ function ResetPassword({
|
|
|
756
759
|
}
|
|
757
760
|
),
|
|
758
761
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
759
|
-
|
|
762
|
+
chunkAWDH6WNA_js.Button,
|
|
760
763
|
{
|
|
761
764
|
type: "submit",
|
|
762
765
|
color: "ios-glass-blue",
|
|
@@ -770,7 +773,7 @@ function ResetPassword({
|
|
|
770
773
|
] });
|
|
771
774
|
const activeContent = phase === "success" ? successContent : formContent;
|
|
772
775
|
if (embedded) return activeContent;
|
|
773
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
776
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto max-w-md p-6 sm:p-8", children: activeContent });
|
|
774
777
|
}
|
|
775
778
|
function PasswordlessSignIn({
|
|
776
779
|
defaultMethod = "email",
|
|
@@ -781,7 +784,7 @@ function PasswordlessSignIn({
|
|
|
781
784
|
embedded = false
|
|
782
785
|
}) {
|
|
783
786
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
784
|
-
const { client
|
|
787
|
+
const { client } = chunkAWDH6WNA_js.useAuth();
|
|
785
788
|
const [step, setStep] = react.useState("input");
|
|
786
789
|
const [channel, setChannel] = react.useState(
|
|
787
790
|
allowedChannels.includes(defaultMethod) ? defaultMethod : allowedChannels[0] ?? "email"
|
|
@@ -800,7 +803,7 @@ function PasswordlessSignIn({
|
|
|
800
803
|
setError(null);
|
|
801
804
|
setIsSending(true);
|
|
802
805
|
try {
|
|
803
|
-
await client
|
|
806
|
+
await client.sendPasswordlessCode(channel, identifier.trim());
|
|
804
807
|
setStep("sent");
|
|
805
808
|
setTimeout(() => setStep("verify"), 1500);
|
|
806
809
|
} catch {
|
|
@@ -808,13 +811,13 @@ function PasswordlessSignIn({
|
|
|
808
811
|
} finally {
|
|
809
812
|
setIsSending(false);
|
|
810
813
|
}
|
|
811
|
-
}, [client
|
|
814
|
+
}, [client, channel, identifier, t]);
|
|
812
815
|
const handleVerifyCode = react.useCallback(
|
|
813
816
|
async (completedCode) => {
|
|
814
817
|
setError(null);
|
|
815
818
|
setIsVerifying(true);
|
|
816
819
|
try {
|
|
817
|
-
await client
|
|
820
|
+
await client.verifyPasswordlessCode(channel, identifier.trim(), completedCode);
|
|
818
821
|
onSuccess?.();
|
|
819
822
|
} catch {
|
|
820
823
|
setError(t("passwordlessVerifyError"));
|
|
@@ -823,7 +826,7 @@ function PasswordlessSignIn({
|
|
|
823
826
|
setIsVerifying(false);
|
|
824
827
|
}
|
|
825
828
|
},
|
|
826
|
-
[client
|
|
829
|
+
[client, channel, identifier, onSuccess, t]
|
|
827
830
|
);
|
|
828
831
|
const inputContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
829
832
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
@@ -831,7 +834,7 @@ function PasswordlessSignIn({
|
|
|
831
834
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: t("passwordlessSubtitle") })
|
|
832
835
|
] }),
|
|
833
836
|
allowedChannels.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
834
|
-
|
|
837
|
+
chunkAWDH6WNA_js.SegmentedControl,
|
|
835
838
|
{
|
|
836
839
|
segments: channelSegments,
|
|
837
840
|
value: channel,
|
|
@@ -845,7 +848,7 @@ function PasswordlessSignIn({
|
|
|
845
848
|
) }),
|
|
846
849
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl bg-red-50 dark:bg-red-900/20 px-4 py-3 text-sm text-ios-red", role: "alert", children: error }),
|
|
847
850
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
848
|
-
|
|
851
|
+
chunkAWDH6WNA_js.Input,
|
|
849
852
|
{
|
|
850
853
|
label: channel === "email" ? t("emailLabel") : t("phoneLabel"),
|
|
851
854
|
type: channel === "email" ? "email" : "tel",
|
|
@@ -859,7 +862,7 @@ function PasswordlessSignIn({
|
|
|
859
862
|
}
|
|
860
863
|
),
|
|
861
864
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
862
|
-
|
|
865
|
+
chunkAWDH6WNA_js.Button,
|
|
863
866
|
{
|
|
864
867
|
type: "button",
|
|
865
868
|
color: "ios-glass-blue",
|
|
@@ -882,7 +885,7 @@ function PasswordlessSignIn({
|
|
|
882
885
|
] });
|
|
883
886
|
const sentContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
884
887
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
885
|
-
|
|
888
|
+
chunkAWDH6WNA_js.EmptyState,
|
|
886
889
|
{
|
|
887
890
|
variant: "minimal",
|
|
888
891
|
icon: outline.PaperAirplaneIcon,
|
|
@@ -890,7 +893,7 @@ function PasswordlessSignIn({
|
|
|
890
893
|
description: channel === "email" ? t("passwordlessCodeSentEmailDescription", { email: identifier }) : t("passwordlessCodeSentSmsDescription", { phone: identifier })
|
|
891
894
|
}
|
|
892
895
|
),
|
|
893
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
896
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Spinner, {}) })
|
|
894
897
|
] });
|
|
895
898
|
const verifyContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
896
899
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
@@ -899,7 +902,7 @@ function PasswordlessSignIn({
|
|
|
899
902
|
] }),
|
|
900
903
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl bg-red-50 dark:bg-red-900/20 px-4 py-3 text-sm text-ios-red text-center", role: "alert", children: error }),
|
|
901
904
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
902
|
-
|
|
905
|
+
chunkCY2MBKVG_js.OtpInput,
|
|
903
906
|
{
|
|
904
907
|
value: code,
|
|
905
908
|
onChange: setCode,
|
|
@@ -909,7 +912,7 @@ function PasswordlessSignIn({
|
|
|
909
912
|
autoFocus: true
|
|
910
913
|
}
|
|
911
914
|
),
|
|
912
|
-
isVerifying && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
915
|
+
isVerifying && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Spinner, {}) }),
|
|
913
916
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
|
|
914
917
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
915
918
|
"button",
|
|
@@ -942,7 +945,7 @@ function PasswordlessSignIn({
|
|
|
942
945
|
] });
|
|
943
946
|
const activeContent = step === "input" ? inputContent : step === "sent" ? sentContent : verifyContent;
|
|
944
947
|
if (embedded) return activeContent;
|
|
945
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
948
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto max-w-md p-6 sm:p-8", children: activeContent });
|
|
946
949
|
}
|
|
947
950
|
function ConsentScreen({
|
|
948
951
|
application,
|
|
@@ -976,10 +979,10 @@ function ConsentScreen({
|
|
|
976
979
|
onDeny();
|
|
977
980
|
}, [onDeny]);
|
|
978
981
|
const appInitials = application.name.split(" ").map((word) => word[0]).join("").slice(0, 2).toUpperCase();
|
|
979
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
982
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkCY2MBKVG_js.AuthLayout, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto w-full max-w-md", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkAWDH6WNA_js.CardContent, { className: "space-y-6 p-6 sm:p-8", children: [
|
|
980
983
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
|
|
981
984
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
982
|
-
|
|
985
|
+
chunkAWDH6WNA_js.Avatar,
|
|
983
986
|
{
|
|
984
987
|
src: application.logoUrl,
|
|
985
988
|
initials: appInitials,
|
|
@@ -989,7 +992,7 @@ function ConsentScreen({
|
|
|
989
992
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
990
993
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
991
994
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: application.name }),
|
|
992
|
-
application.verified ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
995
|
+
application.verified ? /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Badge, { color: "green", children: t("consent.verified") }) : /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Badge, { color: "amber", children: t("consent.unverified") })
|
|
993
996
|
] }),
|
|
994
997
|
application.url && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: application.url }),
|
|
995
998
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: t("consent.wantsAccess") })
|
|
@@ -1001,11 +1004,11 @@ function ConsentScreen({
|
|
|
1001
1004
|
] }),
|
|
1002
1005
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1003
1006
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-gray-500 dark:text-gray-400", children: t("consent.permissionsLabel") }),
|
|
1004
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1005
|
-
|
|
1007
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.ListCard, { children: scopes.map((scope) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1008
|
+
chunkAWDH6WNA_js.ListCardItem,
|
|
1006
1009
|
{
|
|
1007
1010
|
leading: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1008
|
-
|
|
1011
|
+
chunkAWDH6WNA_js.FormCheckbox,
|
|
1009
1012
|
{
|
|
1010
1013
|
checked: checkedScopes.has(scope.id),
|
|
1011
1014
|
onChange: (checked) => handleScopeToggle(scope.id, checked),
|
|
@@ -1023,7 +1026,7 @@ function ConsentScreen({
|
|
|
1023
1026
|
] }),
|
|
1024
1027
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 sm:flex-row-reverse", children: [
|
|
1025
1028
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1026
|
-
|
|
1029
|
+
chunkAWDH6WNA_js.Button,
|
|
1027
1030
|
{
|
|
1028
1031
|
color: "ios-glass-blue",
|
|
1029
1032
|
fullWidth: true,
|
|
@@ -1034,7 +1037,7 @@ function ConsentScreen({
|
|
|
1034
1037
|
}
|
|
1035
1038
|
),
|
|
1036
1039
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1037
|
-
|
|
1040
|
+
chunkAWDH6WNA_js.Button,
|
|
1038
1041
|
{
|
|
1039
1042
|
outline: true,
|
|
1040
1043
|
fullWidth: true,
|
|
@@ -1051,20 +1054,20 @@ function SsoConnectorList({ connectors, onSelect, loading = false }) {
|
|
|
1051
1054
|
const t = chunkYXN2K77G_js.useTranslations("windsock");
|
|
1052
1055
|
if (loading) {
|
|
1053
1056
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-8 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
1054
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1057
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.InlineSpinner, {}),
|
|
1055
1058
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("sso.connectorList.loading") })
|
|
1056
1059
|
] });
|
|
1057
1060
|
}
|
|
1058
1061
|
if (connectors.length === 0) {
|
|
1059
1062
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-6 text-center text-sm text-gray-500 dark:text-gray-400", children: t("sso.connectorList.empty") });
|
|
1060
1063
|
}
|
|
1061
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1064
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.ListCard, { children: connectors.map((connector) => {
|
|
1062
1065
|
const initials = connector.name.split(" ").map((word) => word[0]).join("").slice(0, 2).toUpperCase();
|
|
1063
1066
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1064
|
-
|
|
1067
|
+
chunkAWDH6WNA_js.ListCardItem,
|
|
1065
1068
|
{
|
|
1066
1069
|
leading: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1067
|
-
|
|
1070
|
+
chunkAWDH6WNA_js.Avatar,
|
|
1068
1071
|
{
|
|
1069
1072
|
src: connector.logoUrl,
|
|
1070
1073
|
initials,
|
|
@@ -1072,7 +1075,7 @@ function SsoConnectorList({ connectors, onSelect, loading = false }) {
|
|
|
1072
1075
|
}
|
|
1073
1076
|
),
|
|
1074
1077
|
trailing: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1075
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1078
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Badge, { color: "zinc", children: connector.type === "saml" ? t("sso.connectorList.typeSaml") : t("sso.connectorList.typeOidc") }),
|
|
1076
1079
|
/* @__PURE__ */ jsxRuntime.jsx(solid.ChevronRightIcon, { className: "h-4 w-4 text-gray-400" })
|
|
1077
1080
|
] }),
|
|
1078
1081
|
onClick: () => onSelect(connector),
|
|
@@ -1158,16 +1161,16 @@ function SsoEmailForm({
|
|
|
1158
1161
|
) })
|
|
1159
1162
|
] });
|
|
1160
1163
|
if (embedded) return connectorsContent;
|
|
1161
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1164
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto w-full max-w-md", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.CardContent, { className: "p-6 sm:p-8", children: connectorsContent }) });
|
|
1162
1165
|
}
|
|
1163
1166
|
const emailContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1164
1167
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
1165
1168
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-900 dark:text-white", children: t("sso.emailForm.title") }),
|
|
1166
1169
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t("sso.emailForm.subtitle") })
|
|
1167
1170
|
] }),
|
|
1168
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1171
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAWDH6WNA_js.BaseForm, { onSubmit: handleEmailSubmit, submitLabel: t("sso.emailForm.continueButton"), showFooter: false, children: [
|
|
1169
1172
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
|
-
|
|
1173
|
+
chunkAWDH6WNA_js.Input,
|
|
1171
1174
|
{
|
|
1172
1175
|
type: "email",
|
|
1173
1176
|
label: t("sso.emailForm.emailLabel"),
|
|
@@ -1185,7 +1188,7 @@ function SsoEmailForm({
|
|
|
1185
1188
|
}
|
|
1186
1189
|
),
|
|
1187
1190
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1188
|
-
|
|
1191
|
+
chunkAWDH6WNA_js.Button,
|
|
1189
1192
|
{
|
|
1190
1193
|
type: "submit",
|
|
1191
1194
|
color: "ios-glass-blue",
|
|
@@ -1198,7 +1201,7 @@ function SsoEmailForm({
|
|
|
1198
1201
|
] })
|
|
1199
1202
|
] });
|
|
1200
1203
|
if (embedded) return emailContent;
|
|
1201
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1204
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.Card, { variant: "glass", className: "mx-auto w-full max-w-md", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWDH6WNA_js.CardContent, { className: "p-6 sm:p-8", children: emailContent }) });
|
|
1202
1205
|
}
|
|
1203
1206
|
var DEFAULT_LABELS = {
|
|
1204
1207
|
menuLabel: "User menu",
|
|
@@ -1210,7 +1213,7 @@ var DEFAULT_LABELS = {
|
|
|
1210
1213
|
};
|
|
1211
1214
|
function UserButton({ menuItems = [], onSignOut, avatarUrl, labels }) {
|
|
1212
1215
|
const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
|
|
1213
|
-
const { user, logout, status } =
|
|
1216
|
+
const { user, logout, status } = chunkAWDH6WNA_js.useAuth();
|
|
1214
1217
|
const [confirmSignOut, setConfirmSignOut] = react.useState(false);
|
|
1215
1218
|
if (status !== "authenticated") {
|
|
1216
1219
|
return null;
|
|
@@ -1243,7 +1246,7 @@ function UserButton({ menuItems = [], onSignOut, avatarUrl, labels }) {
|
|
|
1243
1246
|
"aria-label": resolvedLabels.menuLabel,
|
|
1244
1247
|
children: [
|
|
1245
1248
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1246
|
-
|
|
1249
|
+
chunkAWDH6WNA_js.Avatar,
|
|
1247
1250
|
{
|
|
1248
1251
|
src: resolvedAvatarUrl,
|
|
1249
1252
|
initials: userInitials,
|
|
@@ -1267,7 +1270,7 @@ function UserButton({ menuItems = [], onSignOut, avatarUrl, labels }) {
|
|
|
1267
1270
|
children: /* @__PURE__ */ jsxRuntime.jsxs(react$1.Menu.Items, { className: "liquid-surface absolute right-0 z-50 mt-2 w-60 origin-top-right rounded-2xl shadow-lg ring-1 ring-black/5 focus:outline-none dark:ring-white/10", children: [
|
|
1268
1271
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 border-b border-gray-200/60 px-4 py-3 dark:border-white/10", children: [
|
|
1269
1272
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1270
|
-
|
|
1273
|
+
chunkAWDH6WNA_js.Avatar,
|
|
1271
1274
|
{
|
|
1272
1275
|
src: resolvedAvatarUrl,
|
|
1273
1276
|
initials: userInitials,
|
|
@@ -1314,7 +1317,7 @@ function UserButton({ menuItems = [], onSignOut, avatarUrl, labels }) {
|
|
|
1314
1317
|
)
|
|
1315
1318
|
] }),
|
|
1316
1319
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
|
-
|
|
1320
|
+
chunkAWDH6WNA_js.DynamicIslandConfirm,
|
|
1318
1321
|
{
|
|
1319
1322
|
open: confirmSignOut,
|
|
1320
1323
|
onClose: handleSignOutCancel,
|
|
@@ -1338,5 +1341,5 @@ exports.SsoConnectorList = SsoConnectorList;
|
|
|
1338
1341
|
exports.SsoEmailForm = SsoEmailForm;
|
|
1339
1342
|
exports.UserButton = UserButton;
|
|
1340
1343
|
exports.VerifyEmail = VerifyEmail;
|
|
1341
|
-
//# sourceMappingURL=chunk-
|
|
1342
|
-
//# sourceMappingURL=chunk-
|
|
1344
|
+
//# sourceMappingURL=chunk-Z7VY5M4T.js.map
|
|
1345
|
+
//# sourceMappingURL=chunk-Z7VY5M4T.js.map
|