@alfadocs/ui-kit 0.0.16 → 0.0.17

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,23 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as e } from "react";
3
+ import { useTranslation as m } from "react-i18next";
4
+ import { B as c } from "./button-CXL8bA8G.js";
5
+ import { L as f } from "./logo-BlIdYz3n.js";
6
+ const u = e(({ label: o, type: r = "button", ...n }, i) => {
7
+ const { t: a } = m(), s = o ?? a("ui.auth.continueWithAlfadocs", "Continue with AlfaDocs");
8
+ return /* @__PURE__ */ t(
9
+ c,
10
+ {
11
+ ref: i,
12
+ type: r,
13
+ startIcon: /* @__PURE__ */ t(f, { variant: "mark", size: "sm", decorative: !0 }),
14
+ ...n,
15
+ children: s
16
+ }
17
+ );
18
+ });
19
+ u.displayName = "SignInWithAlfadocsButton";
20
+ export {
21
+ u as S
22
+ };
23
+ //# sourceMappingURL=sign-in-with-alfadocs-button-CprizH2U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-in-with-alfadocs-button-CprizH2U.js","sources":["../../src/components/sign-in-with-alfadocs-button/sign-in-with-alfadocs-button.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Button, type ButtonProps } from '../button';\nimport { Logo } from '../logo';\n\n// A provider-style button (\"Sign in with AlfaDocs\"). Wraps the Button\n// primitive so it inherits the full intent / size / loading / asChild /\n// startIcon / endIcon / forced-colors / focus-ring contract for free.\n// The only additions are: a sensible default label resolved from the\n// `ui.auth.continueWithAlfadocs` translation key, and the AlfaDocs\n// brand mark rendered as a leading icon.\n\nexport interface SignInWithAlfadocsButtonProps\n extends Omit<ButtonProps, 'startIcon' | 'children'> {\n /**\n * Override the visible label. When omitted, the component reads\n * `ui.auth.continueWithAlfadocs` (English fallback: \"Continue with\n * AlfaDocs\"). Pass a node to render e.g. \"Sign in with AlfaDocs\" or a\n * fully-translated string.\n */\n label?: ReactNode;\n}\n\nexport const SignInWithAlfadocsButton = forwardRef<\n HTMLButtonElement,\n SignInWithAlfadocsButtonProps\n>(({ label, type = 'button', ...props }, ref) => {\n const { t } = useTranslation();\n const resolvedLabel =\n label ?? t('ui.auth.continueWithAlfadocs', 'Continue with AlfaDocs');\n\n return (\n <Button\n ref={ref}\n type={type}\n startIcon={<Logo variant=\"mark\" size=\"sm\" decorative />}\n {...props}\n >\n {resolvedLabel}\n </Button>\n );\n});\n\nSignInWithAlfadocsButton.displayName = 'SignInWithAlfadocsButton';\n"],"names":["SignInWithAlfadocsButton","forwardRef","label","type","props","ref","t","useTranslation","resolvedLabel","jsx","Button","Logo"],"mappings":";;;;;AAuBO,MAAMA,IAA2BC,EAGtC,CAAC,EAAE,OAAAC,GAAO,MAAAC,IAAO,UAAU,GAAGC,EAAA,GAASC,MAAQ;AAC/C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IACJN,KAASI,EAAE,gCAAgC,wBAAwB;AAErE,SACE,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAL;AAAA,MACA,MAAAF;AAAA,MACA,6BAAYQ,GAAA,EAAK,SAAQ,QAAO,MAAK,MAAK,YAAU,IAAC;AAAA,MACpD,GAAGP;AAAA,MAEH,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AAEDR,EAAyB,cAAc;"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.0.16",
3
+ "packageVersion": "0.0.17",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1,4 +1,4 @@
1
- import { S as n } from "../../_chunks/sign-in-with-alfadocs-button-Gu7Qk2gq.js";
1
+ import { S as n } from "../../_chunks/sign-in-with-alfadocs-button-CprizH2U.js";
2
2
  export {
3
3
  n as SignInWithAlfadocsButton
4
4
  };
@@ -1,15 +1,6 @@
1
- import { type ButtonHTMLAttributes, type ReactNode } from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
3
- declare const signInVariants: (props?: ({
4
- surface?: "light" | "dark" | "auto" | null | undefined;
5
- size?: "sm" | "md" | "lg" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- export interface SignInWithAlfadocsButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof signInVariants> {
8
- /**
9
- * Show the loading spinner and disable the button. Mirrors Button's
10
- * loading contract so the two can be swapped without surprise.
11
- */
12
- loading?: boolean;
1
+ import { type ReactNode } from 'react';
2
+ import { type ButtonProps } from '../button';
3
+ export interface SignInWithAlfadocsButtonProps extends Omit<ButtonProps, 'startIcon' | 'children'> {
13
4
  /**
14
5
  * Override the visible label. When omitted, the component reads
15
6
  * `ui.auth.continueWithAlfadocs` (English fallback: "Continue with
@@ -19,5 +10,4 @@ export interface SignInWithAlfadocsButtonProps extends ButtonHTMLAttributes<HTML
19
10
  label?: ReactNode;
20
11
  }
21
12
  export declare const SignInWithAlfadocsButton: import("react").ForwardRefExoticComponent<SignInWithAlfadocsButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
22
- export {};
23
13
  //# sourceMappingURL=sign-in-with-alfadocs-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sign-in-with-alfadocs-button.d.ts","sourceRoot":"","sources":["../../../src/components/sign-in-with-alfadocs-button/sign-in-with-alfadocs-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASlE,QAAA,MAAM,cAAc;;;8EAgDnB,CAAC;AAEF,MAAM,WAAW,6BACf,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,wBAAwB,6HAyCpC,CAAC"}
1
+ {"version":3,"file":"sign-in-with-alfadocs-button.d.ts","sourceRoot":"","sources":["../../../src/components/sign-in-with-alfadocs-button/sign-in-with-alfadocs-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAUrD,MAAM,WAAW,6BACf,SAAQ,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,UAAU,CAAC;IACnD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,wBAAwB,6HAkBnC,CAAC"}
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { b as S } from "./_chunks/button.agent-BuGZBktn.js";
6
6
  import { B as g } from "./_chunks/button-group-CI7LFxt3.js";
7
7
  import { F as C } from "./_chunks/floating-action-button-BM9ib-Wf.js";
8
8
  import { I as A } from "./_chunks/icon-button-group-tERESY-n.js";
9
- import { S as I } from "./_chunks/sign-in-with-alfadocs-button-Gu7Qk2gq.js";
9
+ import { S as I } from "./_chunks/sign-in-with-alfadocs-button-CprizH2U.js";
10
10
  import { SafeHtml as R, sanitiseHtml as E } from "./safe-html/index.js";
11
11
  import { A as N, a as F, b as k } from "./_chunks/autocomplete.agent-kb0nmr6F.js";
12
12
  import { C as M, a as D, u as V } from "./_chunks/checkbox-CfiZ0FZc.js";