@vkzstudio/muza-ui 1.1.0 → 1.2.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.
@@ -7,7 +7,17 @@ export interface LoginScreenProps {
7
7
  children?: React.ReactNode;
8
8
  /** Additional CSS classes for the root container. */
9
9
  className?: string;
10
- /** Logo element displayed in the top-left corner. */
10
+ /**
11
+ * Logo element displayed in the top-left corner.
12
+ *
13
+ * The logo is rendered inside a normalizing wrapper that forces any
14
+ * descendant `<svg>`/`<img>` to a fixed height with automatic width, so its
15
+ * aspect ratio is always preserved and every Múza logo renders at a
16
+ * consistent size — regardless of the intrinsic `width`/`height` attributes
17
+ * baked into the source markup. This makes it safe to drop in any logo from
18
+ * `CustomLogos` (or a raw SVG copy) without it stretching or gaining a
19
+ * horizontal offset from a mismatched `viewBox`.
20
+ */
11
21
  logo?: React.ReactNode;
12
22
  /**
13
23
  * Language options for the integrated language switcher.
@@ -1 +1 @@
1
- {"version":3,"file":"LoginScreen.d.ts","sourceRoot":"","sources":["../../../src/components/LoginScreen/LoginScreen.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yHAAyH;IACzH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qDAAqD;IACrD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAA;IAC5B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,WAAW,GAAI,wEAOlB,gBAAgB,4CA8BlB,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"LoginScreen.d.ts","sourceRoot":"","sources":["../../../src/components/LoginScreen/LoginScreen.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yHAAyH;IACzH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAA;IAC5B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,WAAW,GAAI,wEAOlB,gBAAgB,4CAkClB,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -1,45 +1,45 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { AnimatePresence as n } from "framer-motion";
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { AnimatePresence as o } from "framer-motion";
3
3
  import { useIsDesktop as d } from "../../hooks/use-is-desktop.js";
4
4
  import { LoginScreen3D as f } from "./LoginScreen3D/LoginScreen3D.js";
5
5
  import { LanguageSwitcher as h } from "../LanguageSwitcher/LanguageSwitcher.js";
6
- import { cn as p } from "../../utils/cn.js";
7
- const b = ({
8
- children: s,
9
- className: t,
10
- logo: c,
11
- languages: r = [],
12
- onLanguageChange: m,
13
- modelPath: o
6
+ import { cn as a } from "../../utils/cn.js";
7
+ const j = ({
8
+ children: t,
9
+ className: m,
10
+ logo: s,
11
+ languages: i = [],
12
+ onLanguageChange: c,
13
+ modelPath: l
14
14
  }) => {
15
- const l = d();
16
- return /* @__PURE__ */ i(
15
+ const n = d();
16
+ return /* @__PURE__ */ r(
17
17
  "div",
18
18
  {
19
- className: p(
19
+ className: a(
20
20
  "grid size-full min-h-[100svh] grid-cols-2 bg-surface-base-tertiary",
21
21
  "max-lg:grid-cols-1",
22
- t
22
+ m
23
23
  ),
24
24
  children: [
25
- /* @__PURE__ */ i("div", { className: "flex flex-col p-2xl", children: [
26
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
27
- c,
28
- (r == null ? void 0 : r.length) > 1 && /* @__PURE__ */ e(
25
+ /* @__PURE__ */ r("div", { className: "flex flex-col p-2xl", children: [
26
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
27
+ s && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center [&_img]:h-xl [&_img]:w-auto [&_svg]:h-xl [&_svg]:w-auto", children: s }),
28
+ (i == null ? void 0 : i.length) > 1 && /* @__PURE__ */ e(
29
29
  h,
30
30
  {
31
- languages: r,
32
- onValueChange: m
31
+ languages: i,
32
+ onValueChange: c
33
33
  }
34
34
  )
35
35
  ] }),
36
- /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(n, { children: s }) })
36
+ /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(o, { children: t }) })
37
37
  ] }),
38
- /* @__PURE__ */ e("div", { className: "p-md max-lg:hidden", children: l && /* @__PURE__ */ e(f, { modelPath: o }) })
38
+ /* @__PURE__ */ e("div", { className: "p-md max-lg:hidden", children: n && /* @__PURE__ */ e(f, { modelPath: l }) })
39
39
  ]
40
40
  }
41
41
  );
42
42
  };
43
43
  export {
44
- b as LoginScreen
44
+ j as LoginScreen
45
45
  };
@@ -7,8 +7,8 @@ export declare const Intro: Story;
7
7
  export declare const Login: Story;
8
8
  export declare const PassRecovery: Story;
9
9
  export declare const PassRecoverySent: Story;
10
- type StoryProps = {
10
+ type LoginState = 'intro' | 'login' | 'pass-recovery' | 'pass-recovery-sent';
11
+ type StoryProps = React.ComponentProps<typeof LoginScreen> & {
11
12
  defaultState?: LoginState;
12
13
  };
13
- type LoginState = 'intro' | 'login' | 'pass-recovery' | 'pass-recovery-sent';
14
14
  //# sourceMappingURL=LoginScreen.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoginScreen.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LoginScreen/LoginScreen.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAM3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CA2ClC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;AAEjC,eAAO,MAAM,KAAK,EAAE,KA4KnB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAc9B,CAAA;AAID,KAAK,UAAU,GAAG;IAChB,YAAY,CAAC,EAAE,UAAU,CAAA;CAC1B,CAAA;AAED,KAAK,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,eAAe,GAAG,oBAAoB,CAAA"}
1
+ {"version":3,"file":"LoginScreen.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LoginScreen/LoginScreen.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAc3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAgB3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CA8ClC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;AAEjC,eAAO,MAAM,KAAK,EAAE,KA4KnB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAc9B,CAAA;AAID,KAAK,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,eAAe,GAAG,oBAAoB,CAAA;AAE5E,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,GAAG;IAC3D,YAAY,CAAC,EAAE,UAAU,CAAA;CAC1B,CAAA"}