@protobase/ui 0.14.2 → 0.14.3

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.
@@ -0,0 +1,15 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/auth/provider-icon.tsx
4
+ /** The GitHub mark, from GitHub's Octicons, in the text color so it follows the theme. */
5
+ const GitHubMark = ({ className }) => /* @__PURE__ */ jsx("svg", {
6
+ viewBox: "0 0 24 24",
7
+ fill: "currentColor",
8
+ className: cn("size-4 shrink-0", className),
9
+ "aria-hidden": true,
10
+ children: /* @__PURE__ */ jsx("path", { d: "M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943" })
11
+ });
12
+ /** The mark of a sign-in provider, by its id; nothing for a provider without one. */
13
+ const ProviderIcon = ({ id, className }) => id === "github" ? /* @__PURE__ */ jsx(GitHubMark, { className }) : null;
14
+ //#endregion
15
+ export { ProviderIcon };
@@ -1,6 +1,7 @@
1
1
  import { Input } from "../primitives/input.js";
2
2
  import { Button } from "../primitives/button.js";
3
3
  import { AuthLayout } from "./auth-layout.js";
4
+ import { ProviderIcon } from "./provider-icon.js";
4
5
  import { useRef, useState } from "react";
5
6
  import { KeyRound, Mail } from "lucide-react";
6
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -41,7 +42,11 @@ const SignInForm = ({ onSubmit, busy, error, workspace, notice, methods = ["pass
41
42
  onClick: () => onContinueWith?.(provider.id),
42
43
  disabled: busy,
43
44
  className: "min-h-10 w-full",
44
- children: ["Continue with ", provider.name]
45
+ children: [
46
+ /* @__PURE__ */ jsx(ProviderIcon, { id: provider.id }),
47
+ "Continue with ",
48
+ provider.name
49
+ ]
45
50
  }, provider.id)),
46
51
  withPasskey && /* @__PURE__ */ jsxs(Button, {
47
52
  onClick: () => onPasskey?.(),
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.14.2";
2
+ var version = "0.14.3";
3
3
  var protobase = { "pluginApi": 1 };
4
4
  //#endregion
5
5
  export { protobase, version };