@poly-x/react 0.1.0-alpha.7 → 0.1.0-alpha.8

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 CHANGED
@@ -362,6 +362,7 @@ const DEFAULT_LABELS$2 = {
362
362
  passwordPlaceholder: "••••••••",
363
363
  submit: "Sign in",
364
364
  submitting: "Signing in…",
365
+ forgotPassword: "Forgot password?",
365
366
  chooseWorkspace: "Choose a workspace",
366
367
  chooseWorkspaceSubheading: "You have access to more than one workspace.",
367
368
  securedBy: "Secured by PolyX",
@@ -632,6 +633,14 @@ function SignIn(props) {
632
633
  onChange: (event) => setPassword(event.target.value)
633
634
  })]
634
635
  }),
636
+ props.forgotPasswordUrl ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
637
+ className: "polyx-signin__forgot",
638
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
639
+ className: "polyx-signin__link",
640
+ href: props.forgotPasswordUrl,
641
+ children: labels.forgotPassword
642
+ })
643
+ }) : null,
635
644
  errorNode,
636
645
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
637
646
  type: "submit",
package/dist/index.d.cts CHANGED
@@ -203,6 +203,7 @@ interface SignInLabels {
203
203
  passwordPlaceholder: string;
204
204
  submit: string;
205
205
  submitting: string;
206
+ forgotPassword: string;
206
207
  chooseWorkspace: string;
207
208
  chooseWorkspaceSubheading: string;
208
209
  securedBy: string;
@@ -235,6 +236,11 @@ interface SignInProps {
235
236
  panel?: ReactNode;
236
237
  /** BFF endpoint backed by `createAuthHandlers().authenticate`. Default `/api/polyx/authenticate`. */
237
238
  action?: string;
239
+ /**
240
+ * URL of your reset flow (where `<ForgotPassword/>` lives). When set, a
241
+ * "Forgot password?" link appears under the password field. Omit to hide it.
242
+ */
243
+ forgotPasswordUrl?: string;
238
244
  /** Where to send the browser after success. Overrides the server's default redirect. */
239
245
  afterSignInPath?: string;
240
246
  /** Pre-scope the login to a single organization (skips org discovery). */
package/dist/index.d.mts CHANGED
@@ -203,6 +203,7 @@ interface SignInLabels {
203
203
  passwordPlaceholder: string;
204
204
  submit: string;
205
205
  submitting: string;
206
+ forgotPassword: string;
206
207
  chooseWorkspace: string;
207
208
  chooseWorkspaceSubheading: string;
208
209
  securedBy: string;
@@ -235,6 +236,11 @@ interface SignInProps {
235
236
  panel?: ReactNode;
236
237
  /** BFF endpoint backed by `createAuthHandlers().authenticate`. Default `/api/polyx/authenticate`. */
237
238
  action?: string;
239
+ /**
240
+ * URL of your reset flow (where `<ForgotPassword/>` lives). When set, a
241
+ * "Forgot password?" link appears under the password field. Omit to hide it.
242
+ */
243
+ forgotPasswordUrl?: string;
238
244
  /** Where to send the browser after success. Overrides the server's default redirect. */
239
245
  afterSignInPath?: string;
240
246
  /** Pre-scope the login to a single organization (skips org discovery). */
package/dist/index.mjs CHANGED
@@ -361,6 +361,7 @@ const DEFAULT_LABELS$2 = {
361
361
  passwordPlaceholder: "••••••••",
362
362
  submit: "Sign in",
363
363
  submitting: "Signing in…",
364
+ forgotPassword: "Forgot password?",
364
365
  chooseWorkspace: "Choose a workspace",
365
366
  chooseWorkspaceSubheading: "You have access to more than one workspace.",
366
367
  securedBy: "Secured by PolyX",
@@ -631,6 +632,14 @@ function SignIn(props) {
631
632
  onChange: (event) => setPassword(event.target.value)
632
633
  })]
633
634
  }),
635
+ props.forgotPasswordUrl ? /* @__PURE__ */ jsx("div", {
636
+ className: "polyx-signin__forgot",
637
+ children: /* @__PURE__ */ jsx("a", {
638
+ className: "polyx-signin__link",
639
+ href: props.forgotPasswordUrl,
640
+ children: labels.forgotPassword
641
+ })
642
+ }) : null,
634
643
  errorNode,
635
644
  /* @__PURE__ */ jsx("button", {
636
645
  type: "submit",
package/dist/styles.css CHANGED
@@ -339,6 +339,13 @@
339
339
  opacity: 0.85;
340
340
  }
341
341
 
342
+ /* "Forgot password?" link under the sign-in password field. */
343
+ .polyx-signin__forgot {
344
+ display: flex;
345
+ justify-content: flex-end;
346
+ margin-top: -0.5rem;
347
+ }
348
+
342
349
  /* --- Recovery confirmation states (ForgotPassword / ResetPassword) ------- */
343
350
 
344
351
  .polyx-signin__header--center {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poly-x/react",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "0.1.0-alpha.8",
4
4
  "description": "PolyX SDK for React SPAs - provider, hooks, drop-in auth UI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "module": "./dist/index.mjs",
28
28
  "types": "./dist/index.d.cts",
29
29
  "dependencies": {
30
- "@poly-x/core": "0.1.0-alpha.7"
30
+ "@poly-x/core": "0.1.0-alpha.8"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=18",