@lobehub/ui 5.59.0 → 5.60.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.
Files changed (84) hide show
  1. package/es/ActionIcon/style.mjs +8 -2
  2. package/es/ActionIcon/style.mjs.map +1 -1
  3. package/es/awesome/Grainient/Grainient.d.mts +11 -0
  4. package/es/awesome/Grainient/Grainient.mjs +311 -0
  5. package/es/awesome/Grainient/Grainient.mjs.map +1 -0
  6. package/es/awesome/Grainient/index.d.mts +3 -0
  7. package/es/awesome/Grainient/style.mjs +25 -0
  8. package/es/awesome/Grainient/style.mjs.map +1 -0
  9. package/es/awesome/Grainient/type.d.mts +122 -0
  10. package/es/awesome/index.d.mts +4 -1
  11. package/es/awesome/index.mjs +2 -1
  12. package/es/base-ui/ActionIcon/style.mjs +8 -2
  13. package/es/base-ui/ActionIcon/style.mjs.map +1 -1
  14. package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
  15. package/es/dashboard/AuthLayout/Aside.mjs +30 -0
  16. package/es/dashboard/AuthLayout/Aside.mjs.map +1 -0
  17. package/es/dashboard/AuthLayout/AuthLayout.d.mts +3 -1
  18. package/es/dashboard/AuthLayout/AuthLayout.mjs +93 -37
  19. package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
  20. package/es/dashboard/AuthLayout/index.d.mts +3 -2
  21. package/es/dashboard/AuthLayout/style.mjs +120 -1
  22. package/es/dashboard/AuthLayout/style.mjs.map +1 -1
  23. package/es/dashboard/AuthLayout/type.d.mts +39 -3
  24. package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
  25. package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +32 -0
  26. package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -0
  27. package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +10 -0
  28. package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +59 -0
  29. package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -0
  30. package/es/dashboard/AuthTools/index.d.mts +4 -0
  31. package/es/dashboard/AuthTools/style.mjs +63 -0
  32. package/es/dashboard/AuthTools/style.mjs.map +1 -0
  33. package/es/dashboard/AuthTools/type.d.mts +30 -0
  34. package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
  35. package/es/dashboard/ConsoleNav/Skeleton.mjs +81 -0
  36. package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -0
  37. package/es/dashboard/ConsoleNav/index.d.mts +3 -2
  38. package/es/dashboard/ConsoleNav/style.mjs +15 -0
  39. package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
  40. package/es/dashboard/ConsoleNav/type.d.mts +14 -1
  41. package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
  42. package/es/dashboard/ConsoleShell/ConsoleShell.mjs +11 -3
  43. package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
  44. package/es/dashboard/ConsoleShell/style.mjs +6 -0
  45. package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
  46. package/es/dashboard/ConsoleShell/type.d.mts +9 -0
  47. package/es/dashboard/FilterSidebar/FilterSidebar.mjs +18 -17
  48. package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
  49. package/es/dashboard/FilterStrip/FilterStrip.mjs +36 -32
  50. package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -1
  51. package/es/dashboard/FilterStrip/style.mjs +2 -1
  52. package/es/dashboard/FilterStrip/style.mjs.map +1 -1
  53. package/es/dashboard/MetricStrip/MetricCell.mjs +81 -0
  54. package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -0
  55. package/es/dashboard/MetricStrip/MetricStrip.d.mts +5 -2
  56. package/es/dashboard/MetricStrip/MetricStrip.mjs +33 -62
  57. package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -1
  58. package/es/dashboard/MetricStrip/style.mjs +49 -4
  59. package/es/dashboard/MetricStrip/style.mjs.map +1 -1
  60. package/es/dashboard/MetricStrip/type.d.mts +12 -0
  61. package/es/dashboard/PageSkeleton/PageSkeleton.mjs +20 -18
  62. package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
  63. package/es/dashboard/PageSkeleton/style.mjs +1 -1
  64. package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
  65. package/es/dashboard/PanelSurface/PanelSurface.mjs +4 -1
  66. package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -1
  67. package/es/dashboard/StatCard/StatCard.d.mts +2 -1
  68. package/es/dashboard/StatCard/StatCard.mjs +24 -72
  69. package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
  70. package/es/dashboard/StatCard/type.d.mts +16 -5
  71. package/es/dashboard/Surface/Surface.mjs +26 -10
  72. package/es/dashboard/Surface/Surface.mjs.map +1 -1
  73. package/es/dashboard/Surface/index.d.mts +2 -2
  74. package/es/dashboard/Surface/link.d.mts +6 -1
  75. package/es/dashboard/Surface/link.mjs +12 -1
  76. package/es/dashboard/Surface/link.mjs.map +1 -1
  77. package/es/dashboard/Surface/style.d.mts +22 -3
  78. package/es/dashboard/Surface/style.mjs +95 -26
  79. package/es/dashboard/Surface/style.mjs.map +1 -1
  80. package/es/dashboard/index.d.mts +10 -4
  81. package/es/dashboard/index.mjs +7 -3
  82. package/package.json +1 -1
  83. package/es/dashboard/StatCard/style.mjs +0 -135
  84. package/es/dashboard/StatCard/style.mjs.map +0 -1
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { styles } from "./style.mjs";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { cx } from "antd-style";
5
+ //#region src/dashboard/AuthLayout/Aside.tsx
6
+ /** Inset art panel for `AuthLayout`'s `aside` slot, with a scrim and copy at the bottom. */
7
+ function AuthLayoutAside({ background, className, kicker, line, ...rest }) {
8
+ return /* @__PURE__ */ jsx("div", {
9
+ className: cx(styles.asidePlate, className),
10
+ ...rest,
11
+ children: /* @__PURE__ */ jsxs("div", {
12
+ className: styles.asidePanel,
13
+ children: [background, kicker || line ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { className: styles.asideScrim }), /* @__PURE__ */ jsxs("div", {
14
+ className: styles.asideCopy,
15
+ children: [kicker ? /* @__PURE__ */ jsx("p", {
16
+ className: styles.asideKicker,
17
+ children: kicker
18
+ }) : null, line ? /* @__PURE__ */ jsx("p", {
19
+ className: styles.asideLine,
20
+ children: line
21
+ }) : null]
22
+ })] }) : null]
23
+ })
24
+ });
25
+ }
26
+ AuthLayoutAside.displayName = "AuthLayoutAside";
27
+ //#endregion
28
+ export { AuthLayoutAside as default };
29
+
30
+ //# sourceMappingURL=Aside.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Aside.mjs","names":[],"sources":["../../../src/dashboard/AuthLayout/Aside.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\n\nimport { styles } from './style';\nimport type { AuthLayoutAsideProps } from './type';\n\n/** Inset art panel for `AuthLayout`'s `aside` slot, with a scrim and copy at the bottom. */\nfunction AuthLayoutAside({ background, className, kicker, line, ...rest }: AuthLayoutAsideProps) {\n return (\n <div className={cx(styles.asidePlate, className)} {...rest}>\n <div className={styles.asidePanel}>\n {background}\n {kicker || line ? (\n <>\n <div className={styles.asideScrim} />\n <div className={styles.asideCopy}>\n {kicker ? <p className={styles.asideKicker}>{kicker}</p> : null}\n {line ? <p className={styles.asideLine}>{line}</p> : null}\n </div>\n </>\n ) : null}\n </div>\n </div>\n );\n}\n\nAuthLayoutAside.displayName = 'AuthLayoutAside';\n\nexport default AuthLayoutAside;\n"],"mappings":";;;;;;AAQA,SAAS,gBAAgB,EAAE,YAAY,WAAW,QAAQ,MAAM,GAAG,QAA8B;CAC/F,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,OAAO,YAAY,SAAS;EAAG,GAAI;EACpD,UAAA,qBAAC,OAAD;GAAK,WAAW,OAAO;GAAvB,UAAA,CACG,YACA,UAAU,OACT,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,OAAD,EAAK,WAAW,OAAO,WAAa,CAAA,GACpC,qBAAC,OAAD;IAAK,WAAW,OAAO;IAAvB,UAAA,CACG,SAAS,oBAAC,KAAD;KAAG,WAAW,OAAO;KAAc,UAAA;IAAU,CAAA,IAAI,MAC1D,OAAO,oBAAC,KAAD;KAAG,WAAW,OAAO;KAAY,UAAA;IAAQ,CAAA,IAAI,IAClD;GACL,CAAA,CAAA,EAAA,CAAA,IACA,IACD;;CACF,CAAA;AAET;AAEA,gBAAgB,cAAc"}
@@ -1,8 +1,10 @@
1
1
  import { AuthLayoutProps } from "./type.mjs";
2
+ import AuthLayoutAside from "./Aside.mjs";
2
3
  //#region src/dashboard/AuthLayout/AuthLayout.d.ts
3
- declare function AuthLayout({ aside, brand, children, className, description, title, tools, ...rest }: AuthLayoutProps): import("react").JSX.Element;
4
+ declare function AuthLayout({ alert, aside, background, brand, card, children, className, description, footer, loading, logo, title, tools, variant, ...rest }: AuthLayoutProps): import("react").JSX.Element;
4
5
  declare namespace AuthLayout {
5
6
  var displayName: string;
7
+ var Aside: typeof AuthLayoutAside;
6
8
  }
7
9
  //#endregion
8
10
  export { AuthLayout as default };
@@ -1,53 +1,109 @@
1
1
  "use client";
2
2
  import FlexBasic_default from "../../Flex/FlexBasic.mjs";
3
+ import Skeleton from "../../base-ui/Skeleton/index.mjs";
3
4
  import Text from "../../base-ui/Text/Text.mjs";
4
- import { styles } from "../Surface/style.mjs";
5
- import { styles as styles$1 } from "./style.mjs";
5
+ import { styles } from "./style.mjs";
6
+ import AuthLayoutAside from "./Aside.mjs";
7
+ import { useSurfaceCardClassName } from "../Surface/link.mjs";
8
+ import { isValidElement } from "react";
6
9
  import { jsx, jsxs } from "react/jsx-runtime";
7
10
  import { cx } from "antd-style";
8
11
  //#region src/dashboard/AuthLayout/AuthLayout.tsx
9
- function AuthLayout({ aside, brand, children, className, description, title, tools, ...rest }) {
12
+ const FormSkeleton = () => /* @__PURE__ */ jsxs(FlexBasic_default, {
13
+ "aria-hidden": true,
14
+ gap: 12,
15
+ children: [
16
+ /* @__PURE__ */ jsx(Skeleton, {
17
+ height: 36,
18
+ radius: 8,
19
+ width: "100%"
20
+ }),
21
+ /* @__PURE__ */ jsx(Skeleton, {
22
+ height: 36,
23
+ radius: 8,
24
+ width: "100%"
25
+ }),
26
+ /* @__PURE__ */ jsx(Skeleton, {
27
+ height: 36,
28
+ radius: 8,
29
+ width: "100%"
30
+ })
31
+ ]
32
+ });
33
+ function AuthLayout({ alert, aside, background = "plain", brand, card = true, children, className, description, footer, loading, logo, title, tools, variant = "default", ...rest }) {
34
+ const cardClassName = useSurfaceCardClassName();
10
35
  const split = Boolean(aside);
36
+ const art = isValidElement(background) ? background : null;
37
+ const heading = title === void 0 || title === null ? null : typeof title === "string" ? /* @__PURE__ */ jsx(Text, {
38
+ as: "h1",
39
+ className: styles.title,
40
+ weight: "bold",
41
+ children: title
42
+ }) : /* @__PURE__ */ jsx("div", {
43
+ className: styles.titleNode,
44
+ children: title
45
+ });
46
+ const intro = logo || heading || description ? /* @__PURE__ */ jsxs(FlexBasic_default, {
47
+ gap: 8,
48
+ children: [
49
+ logo ? /* @__PURE__ */ jsx("div", {
50
+ className: styles.logo,
51
+ children: logo
52
+ }) : null,
53
+ heading,
54
+ description ? /* @__PURE__ */ jsx(Text, {
55
+ className: styles.description,
56
+ type: "secondary",
57
+ children: description
58
+ }) : null
59
+ ]
60
+ }) : null;
11
61
  return /* @__PURE__ */ jsxs("div", {
12
- className: className ? `${styles$1.page} ${className}` : styles$1.page,
62
+ className: cx(styles.page, background === "grid" && styles.grid, className),
63
+ "data-auth-layout": "",
13
64
  ...rest,
14
- children: [/* @__PURE__ */ jsxs("header", {
15
- className: styles$1.header,
16
- children: [brand, tools ? /* @__PURE__ */ jsx("div", {
17
- className: styles$1.tools,
18
- children: tools
19
- }) : null]
20
- }), /* @__PURE__ */ jsx("main", {
21
- className: styles$1.main,
22
- children: /* @__PURE__ */ jsx("div", {
23
- className: cx(styles$1.lift, split && styles$1.liftSplit, styles.card),
24
- children: /* @__PURE__ */ jsxs("div", {
25
- className: cx(styles$1.frame, split && styles$1.split),
26
- children: [/* @__PURE__ */ jsxs("div", {
27
- className: cx(styles$1.form, split && styles$1.formSplit),
28
- children: [/* @__PURE__ */ jsxs(FlexBasic_default, {
29
- gap: 8,
30
- children: [/* @__PURE__ */ jsx(Text, {
31
- as: "h1",
32
- className: styles$1.title,
33
- weight: "bold",
34
- children: title
35
- }), description ? /* @__PURE__ */ jsx(Text, {
36
- className: styles$1.description,
37
- type: "secondary",
38
- children: description
39
- }) : null]
40
- }), children]
41
- }), aside ? /* @__PURE__ */ jsx("div", {
42
- className: styles$1.aside,
43
- children: aside
44
- }) : null]
45
- })
65
+ children: [
66
+ art ? /* @__PURE__ */ jsx("div", {
67
+ className: styles.backdrop,
68
+ children: art
69
+ }) : null,
70
+ /* @__PURE__ */ jsxs("header", {
71
+ className: styles.header,
72
+ children: [brand, tools ? /* @__PURE__ */ jsx("div", {
73
+ className: styles.tools,
74
+ children: tools
75
+ }) : null]
76
+ }),
77
+ /* @__PURE__ */ jsx("main", {
78
+ className: styles.main,
79
+ children: card ? /* @__PURE__ */ jsx("div", {
80
+ "data-auth-card": "",
81
+ className: cx(styles.lift, split && styles.liftSplit, cardClassName, variant === "elevated" && styles.elevated),
82
+ children: /* @__PURE__ */ jsxs("div", {
83
+ className: cx(styles.frame, split && styles.split),
84
+ children: [/* @__PURE__ */ jsxs("div", {
85
+ className: cx(styles.form, split && styles.formSplit),
86
+ children: [
87
+ intro,
88
+ alert,
89
+ loading ? /* @__PURE__ */ jsx(FormSkeleton, {}) : children,
90
+ footer ? /* @__PURE__ */ jsx("div", {
91
+ className: styles.footer,
92
+ children: footer
93
+ }) : null
94
+ ]
95
+ }), aside ? /* @__PURE__ */ jsx("div", {
96
+ className: styles.aside,
97
+ children: aside
98
+ }) : null]
99
+ })
100
+ }) : children
46
101
  })
47
- })]
102
+ ]
48
103
  });
49
104
  }
50
105
  AuthLayout.displayName = "AuthLayout";
106
+ AuthLayout.Aside = AuthLayoutAside;
51
107
  //#endregion
52
108
  export { AuthLayout as default };
53
109
 
@@ -1 +1 @@
1
- {"version":3,"file":"AuthLayout.mjs","names":["styles","surfaceStyles","Flexbox"],"sources":["../../../src/dashboard/AuthLayout/AuthLayout.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\n\nimport Text from '@/base-ui/Text';\nimport { Flexbox } from '@/Flex';\n\nimport { styles as surfaceStyles } from '../Surface/style';\nimport { styles } from './style';\nimport type { AuthLayoutProps } from './type';\n\nfunction AuthLayout({\n aside,\n brand,\n children,\n className,\n description,\n title,\n tools,\n ...rest\n}: AuthLayoutProps) {\n const split = Boolean(aside);\n return (\n <div className={className ? `${styles.page} ${className}` : styles.page} {...rest}>\n <header className={styles.header}>\n {brand}\n {tools ? <div className={styles.tools}>{tools}</div> : null}\n </header>\n <main className={styles.main}>\n <div className={cx(styles.lift, split && styles.liftSplit, surfaceStyles.card)}>\n <div className={cx(styles.frame, split && styles.split)}>\n <div className={cx(styles.form, split && styles.formSplit)}>\n <Flexbox gap={8}>\n <Text as=\"h1\" className={styles.title} weight=\"bold\">\n {title}\n </Text>\n {description ? (\n <Text className={styles.description} type=\"secondary\">\n {description}\n </Text>\n ) : null}\n </Flexbox>\n {children}\n </div>\n {aside ? <div className={styles.aside}>{aside}</div> : null}\n </div>\n </div>\n </main>\n </div>\n );\n}\n\nAuthLayout.displayName = 'AuthLayout';\n\nexport default AuthLayout;\n"],"mappings":";;;;;;;;AAWA,SAAS,WAAW,EAClB,OACA,OACA,UACA,WACA,aACA,OACA,OACA,GAAG,QACe;CAClB,MAAM,QAAQ,QAAQ,KAAK;CAC3B,OACE,qBAAC,OAAD;EAAK,WAAW,YAAY,GAAGA,SAAO,KAAK,GAAG,cAAcA,SAAO;EAAM,GAAI;EAA7E,UAAA,CACE,qBAAC,UAAD;GAAQ,WAAWA,SAAO;GAA1B,UAAA,CACG,OACA,QAAQ,oBAAC,OAAD;IAAK,WAAWA,SAAO;IAAQ,UAAA;GAAW,CAAA,IAAI,IACjD;EACR,CAAA,GAAA,oBAAC,QAAD;GAAM,WAAWA,SAAO;GACtB,UAAA,oBAAC,OAAD;IAAK,WAAW,GAAGA,SAAO,MAAM,SAASA,SAAO,WAAWC,OAAc,IAAI;IAC3E,UAAA,qBAAC,OAAD;KAAK,WAAW,GAAGD,SAAO,OAAO,SAASA,SAAO,KAAK;KAAtD,UAAA,CACE,qBAAC,OAAD;MAAK,WAAW,GAAGA,SAAO,MAAM,SAASA,SAAO,SAAS;MAAzD,UAAA,CACE,qBAACE,mBAAD;OAAS,KAAK;OAAd,UAAA,CACE,oBAAC,MAAD;QAAM,IAAG;QAAK,WAAWF,SAAO;QAAO,QAAO;QAC3C,UAAA;OACG,CAAA,GACL,cACC,oBAAC,MAAD;QAAM,WAAWA,SAAO;QAAa,MAAK;QACvC,UAAA;OACG,CAAA,IACJ,IACG;MACR,CAAA,GAAA,QACE;KACJ,CAAA,GAAA,QAAQ,oBAAC,OAAD;MAAK,WAAWA,SAAO;MAAQ,UAAA;KAAW,CAAA,IAAI,IACpD;;GACF,CAAA;EACD,CAAA,CACH;;AAET;AAEA,WAAW,cAAc"}
1
+ {"version":3,"file":"AuthLayout.mjs","names":["Flexbox","Aside"],"sources":["../../../src/dashboard/AuthLayout/AuthLayout.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { isValidElement } from 'react';\n\nimport Skeleton from '@/base-ui/Skeleton';\nimport Text from '@/base-ui/Text';\nimport { Flexbox } from '@/Flex';\n\nimport { useSurfaceCardClassName } from '../Surface/link';\nimport Aside from './Aside';\nimport { styles } from './style';\nimport type { AuthLayoutProps } from './type';\n\nconst FormSkeleton = () => (\n <Flexbox aria-hidden gap={12}>\n <Skeleton height={36} radius={8} width=\"100%\" />\n <Skeleton height={36} radius={8} width=\"100%\" />\n <Skeleton height={36} radius={8} width=\"100%\" />\n </Flexbox>\n);\n\nfunction AuthLayout({\n alert,\n aside,\n background = 'plain',\n brand,\n card = true,\n children,\n className,\n description,\n footer,\n loading,\n logo,\n title,\n tools,\n variant = 'default',\n ...rest\n}: AuthLayoutProps) {\n const cardClassName = useSurfaceCardClassName();\n const split = Boolean(aside);\n const art = isValidElement(background) ? background : null;\n const heading =\n title === undefined || title === null ? null : typeof title === 'string' ? (\n <Text as=\"h1\" className={styles.title} weight=\"bold\">\n {title}\n </Text>\n ) : (\n <div className={styles.titleNode}>{title}</div>\n );\n const intro =\n logo || heading || description ? (\n <Flexbox gap={8}>\n {logo ? <div className={styles.logo}>{logo}</div> : null}\n {heading}\n {description ? (\n <Text className={styles.description} type=\"secondary\">\n {description}\n </Text>\n ) : null}\n </Flexbox>\n ) : null;\n\n return (\n <div\n className={cx(styles.page, background === 'grid' && styles.grid, className)}\n data-auth-layout=\"\"\n {...rest}\n >\n {art ? <div className={styles.backdrop}>{art}</div> : null}\n <header className={styles.header}>\n {brand}\n {tools ? <div className={styles.tools}>{tools}</div> : null}\n </header>\n <main className={styles.main}>\n {card ? (\n <div\n data-auth-card=\"\"\n className={cx(\n styles.lift,\n split && styles.liftSplit,\n cardClassName,\n variant === 'elevated' && styles.elevated,\n )}\n >\n <div className={cx(styles.frame, split && styles.split)}>\n <div className={cx(styles.form, split && styles.formSplit)}>\n {intro}\n {alert}\n {loading ? <FormSkeleton /> : children}\n {footer ? <div className={styles.footer}>{footer}</div> : null}\n </div>\n {aside ? <div className={styles.aside}>{aside}</div> : null}\n </div>\n </div>\n ) : (\n children\n )}\n </main>\n </div>\n );\n}\n\nAuthLayout.displayName = 'AuthLayout';\nAuthLayout.Aside = Aside;\n\nexport default AuthLayout;\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,qBACJ,qBAACA,mBAAD;CAAS,eAAA;CAAY,KAAK;CAA1B,UAAA;EACE,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAG,OAAM;EAAQ,CAAA;EAC/C,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAG,OAAM;EAAQ,CAAA;EAC/C,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAG,OAAM;EAAQ,CAAA;CACxC;;AAGX,SAAS,WAAW,EAClB,OACA,OACA,aAAa,SACb,OACA,OAAO,MACP,UACA,WACA,aACA,QACA,SACA,MACA,OACA,OACA,UAAU,WACV,GAAG,QACe;CAClB,MAAM,gBAAgB,wBAAwB;CAC9C,MAAM,QAAQ,QAAQ,KAAK;CAC3B,MAAM,MAAM,eAAe,UAAU,IAAI,aAAa;CACtD,MAAM,UACJ,UAAU,KAAA,KAAa,UAAU,OAAO,OAAO,OAAO,UAAU,WAC9D,oBAAC,MAAD;EAAM,IAAG;EAAK,WAAW,OAAO;EAAO,QAAO;EAC3C,UAAA;CACG,CAAA,IAEN,oBAAC,OAAD;EAAK,WAAW,OAAO;EAAY,UAAA;CAAW,CAAA;CAElD,MAAM,QACJ,QAAQ,WAAW,cACjB,qBAACA,mBAAD;EAAS,KAAK;EAAd,UAAA;GACG,OAAO,oBAAC,OAAD;IAAK,WAAW,OAAO;IAAO,UAAA;GAAU,CAAA,IAAI;GACnD;GACA,cACC,oBAAC,MAAD;IAAM,WAAW,OAAO;IAAa,MAAK;IACvC,UAAA;GACG,CAAA,IACJ;EACG;CACP,CAAA,IAAA;CAEN,OACE,qBAAC,OAAD;EACE,WAAW,GAAG,OAAO,MAAM,eAAe,UAAU,OAAO,MAAM,SAAS;EAC1E,oBAAiB;EACjB,GAAI;EAHN,UAAA;GAKG,MAAM,oBAAC,OAAD;IAAK,WAAW,OAAO;IAAW,UAAA;GAAS,CAAA,IAAI;GACtD,qBAAC,UAAD;IAAQ,WAAW,OAAO;IAA1B,UAAA,CACG,OACA,QAAQ,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAQ,UAAA;IAAW,CAAA,IAAI,IACjD;;GACR,oBAAC,QAAD;IAAM,WAAW,OAAO;IACrB,UAAA,OACC,oBAAC,OAAD;KACE,kBAAe;KACf,WAAW,GACT,OAAO,MACP,SAAS,OAAO,WAChB,eACA,YAAY,cAAc,OAAO,QACnC;KAEA,UAAA,qBAAC,OAAD;MAAK,WAAW,GAAG,OAAO,OAAO,SAAS,OAAO,KAAK;MAAtD,UAAA,CACE,qBAAC,OAAD;OAAK,WAAW,GAAG,OAAO,MAAM,SAAS,OAAO,SAAS;OAAzD,UAAA;QACG;QACA;QACA,UAAU,oBAAC,cAAD,CAAe,CAAA,IAAI;QAC7B,SAAS,oBAAC,OAAD;SAAK,WAAW,OAAO;SAAS,UAAA;QAAY,CAAA,IAAI;OACvD;MACJ,CAAA,GAAA,QAAQ,oBAAC,OAAD;OAAK,WAAW,OAAO;OAAQ,UAAA;MAAW,CAAA,IAAI,IACpD;;IACF,CAAA,IAEL;GAEE,CAAA;EACH;;AAET;AAEA,WAAW,cAAc;AACzB,WAAW,QAAQC"}
@@ -1,3 +1,4 @@
1
- import { AuthLayoutProps } from "./type.mjs";
1
+ import { AuthLayoutAsideProps, AuthLayoutBackground, AuthLayoutProps, AuthLayoutVariant } from "./type.mjs";
2
+ import AuthLayoutAside from "./Aside.mjs";
2
3
  import AuthLayout from "./AuthLayout.mjs";
3
- export { type AuthLayoutProps, AuthLayout as default };
4
+ export { AuthLayoutAside, type AuthLayoutAsideProps, type AuthLayoutBackground, type AuthLayoutProps, type AuthLayoutVariant, AuthLayout as default };
@@ -16,10 +16,91 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
16
16
  ${responsive.laptop} {
17
17
  display: none;
18
18
  }
19
+ `,
20
+ asideCopy: css`
21
+ pointer-events: none;
22
+
23
+ position: absolute;
24
+ z-index: 2;
25
+ inset-block-end: 64px;
26
+ inset-inline: 40px;
27
+
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 8px;
31
+ `,
32
+ asideKicker: css`
33
+ margin: 0;
34
+
35
+ font-size: ${cssVar.fontSize};
36
+ line-height: 1.4;
37
+ color: #fff;
38
+
39
+ opacity: 0.82;
40
+ `,
41
+ asideLine: css`
42
+ margin: 0;
43
+
44
+ font-size: ${cssVar.fontSizeHeading2};
45
+ font-weight: 600;
46
+ line-height: 1.25;
47
+ color: #fff;
48
+ letter-spacing: -0.02em;
49
+ `,
50
+ asidePanel: css`
51
+ position: absolute;
52
+ inset: 8px;
53
+
54
+ overflow: hidden;
55
+
56
+ border-radius: 20px;
57
+
58
+ background: linear-gradient(165deg, #ff9ffc 0%, #5227ff 46%, #b497cf 100%);
59
+ `,
60
+ asidePlate: css`
61
+ position: absolute;
62
+ inset: 0;
63
+ background: var(--lobe-surface-bg-solid, ${cssVar.colorBgContainer});
64
+ `,
65
+ asideScrim: css`
66
+ pointer-events: none;
67
+
68
+ position: absolute;
69
+ z-index: 1;
70
+ inset-block-end: 0;
71
+ inset-inline: 0;
72
+
73
+ block-size: 58%;
74
+
75
+ background: linear-gradient(to top, rgb(24 10 48 / 42%), transparent);
76
+ `,
77
+ backdrop: css`
78
+ pointer-events: none;
79
+ position: absolute;
80
+ z-index: 0;
81
+ inset: 0;
19
82
  `,
20
83
  description: css`
21
84
  line-height: 1.6;
22
85
  color: ${cssVar.colorTextSecondary};
86
+ `,
87
+ elevated: css`
88
+ &&&,
89
+ &&&:hover {
90
+ border-radius: 28px;
91
+ }
92
+ `,
93
+ footer: css`
94
+ margin: 0;
95
+ font-size: ${cssVar.fontSizeSM};
96
+ line-height: 1.6;
97
+ color: ${cssVar.colorTextSecondary};
98
+
99
+ a {
100
+ font-weight: 600;
101
+ color: ${cssVar.colorLink};
102
+ text-decoration: none;
103
+ }
23
104
  `,
24
105
  form: css`
25
106
  display: flex;
@@ -56,8 +137,28 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
56
137
  inline-size: 100%;
57
138
  min-inline-size: 0;
58
139
  border-radius: inherit;
140
+ `,
141
+ grid: css`
142
+ && {
143
+ background-color: color-mix(in srgb, ${cssVar.colorBgLayout}, ${cssVar.colorBgElevated} 70%);
144
+ background-image:
145
+ linear-gradient(
146
+ color-mix(in srgb, ${cssVar.colorText} 5%, transparent) 1px,
147
+ transparent 1px
148
+ ),
149
+ linear-gradient(
150
+ 90deg,
151
+ color-mix(in srgb, ${cssVar.colorText} 5%, transparent) 1px,
152
+ transparent 1px
153
+ );
154
+ background-position: -1px -1px;
155
+ background-size: 32px 32px;
156
+ }
59
157
  `,
60
158
  header: css`
159
+ position: relative;
160
+ z-index: 1;
161
+
61
162
  display: flex;
62
163
  flex: none;
63
164
  gap: 12px;
@@ -68,6 +169,7 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
68
169
  padding-inline: 16px;
69
170
  `,
70
171
  lift: css`
172
+ position: relative;
71
173
  display: flex;
72
174
  inline-size: min(440px, 100%);
73
175
  `,
@@ -77,8 +179,15 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
77
179
  ${responsive.laptop} {
78
180
  inline-size: min(440px, 100%);
79
181
  }
182
+ `,
183
+ logo: css`
184
+ display: flex;
185
+ margin-block-end: 8px;
80
186
  `,
81
187
  main: css`
188
+ position: relative;
189
+ z-index: 1;
190
+
82
191
  display: grid;
83
192
  flex: 1;
84
193
  place-items: center;
@@ -87,11 +196,17 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
87
196
  padding-inline: 16px;
88
197
  `,
89
198
  page: css`
199
+ position: relative;
200
+
201
+ overflow: auto;
90
202
  display: flex;
203
+ flex: 1;
91
204
  flex-direction: column;
92
205
 
206
+ box-sizing: border-box;
207
+ inline-size: 100%;
93
208
  block-size: 100%;
94
- min-block-size: 0;
209
+ min-block-size: 100dvh;
95
210
 
96
211
  background: ${cssVar.colorBgLayout};
97
212
  `,
@@ -106,6 +221,10 @@ const styles = createStaticStyles(({ css, cssVar, responsive }) => ({
106
221
  margin: 0;
107
222
  font-size: ${cssVar.fontSizeHeading3};
108
223
  line-height: ${cssVar.lineHeightHeading3};
224
+ `,
225
+ titleNode: css`
226
+ display: flex;
227
+ min-inline-size: 0;
109
228
  `,
110
229
  tools: css`
111
230
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/AuthLayout/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar, responsive }) => ({\n aside: css`\n position: relative;\n\n flex: none;\n\n box-sizing: border-box;\n inline-size: 50%;\n min-inline-size: 0;\n max-inline-size: 50%;\n\n background: ${cssVar.colorFillSecondary};\n\n ${responsive.laptop} {\n display: none;\n }\n `,\n description: css`\n line-height: 1.6;\n color: ${cssVar.colorTextSecondary};\n `,\n form: css`\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 24px;\n justify-content: center;\n\n box-sizing: border-box;\n inline-size: 100%;\n min-inline-size: 0;\n padding-block: 40px;\n padding-inline: 36px;\n\n ${responsive.laptop} {\n padding-block: 28px;\n padding-inline: 24px;\n }\n `,\n formSplit: css`\n inline-size: 50%;\n max-inline-size: 50%;\n\n ${responsive.laptop} {\n inline-size: 100%;\n max-inline-size: 100%;\n }\n `,\n frame: css`\n overflow: hidden;\n display: flex;\n flex: none;\n\n inline-size: 100%;\n min-inline-size: 0;\n border-radius: inherit;\n `,\n header: css`\n display: flex;\n flex: none;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n\n block-size: 56px;\n padding-inline: 16px;\n `,\n lift: css`\n display: flex;\n inline-size: min(440px, 100%);\n `,\n liftSplit: css`\n inline-size: min(880px, 100%);\n\n ${responsive.laptop} {\n inline-size: min(440px, 100%);\n }\n `,\n main: css`\n display: grid;\n flex: 1;\n place-items: center;\n\n padding-block: 24px 48px;\n padding-inline: 16px;\n `,\n page: css`\n display: flex;\n flex-direction: column;\n\n block-size: 100%;\n min-block-size: 0;\n\n background: ${cssVar.colorBgLayout};\n `,\n split: css`\n min-block-size: 520px;\n\n ${responsive.laptop} {\n min-block-size: 0;\n }\n `,\n title: css`\n margin: 0;\n font-size: ${cssVar.fontSizeHeading3};\n line-height: ${cssVar.lineHeightHeading3};\n `,\n tools: css`\n display: flex;\n gap: 6px;\n align-items: center;\n margin-inline-start: auto;\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,QAAQ,kBAAkB;CACzE,OAAO,GAAG;;;;;;;;;;kBAUM,OAAO,mBAAmB;;MAEtC,WAAW,OAAO;;;;CAItB,aAAa,GAAG;;aAEL,OAAO,mBAAmB;;CAErC,MAAM,GAAG;;;;;;;;;;;;;MAaL,WAAW,OAAO;;;;;CAKtB,WAAW,GAAG;;;;MAIV,WAAW,OAAO;;;;;CAKtB,OAAO,GAAG;;;;;;;;;CASV,QAAQ,GAAG;;;;;;;;;;CAUX,MAAM,GAAG;;;;CAIT,WAAW,GAAG;;;MAGV,WAAW,OAAO;;;;CAItB,MAAM,GAAG;;;;;;;;CAQT,MAAM,GAAG;;;;;;;kBAOO,OAAO,cAAc;;CAErC,OAAO,GAAG;;;MAGN,WAAW,OAAO;;;;CAItB,OAAO,GAAG;;iBAEK,OAAO,iBAAiB;mBACtB,OAAO,mBAAmB;;CAE3C,OAAO,GAAG;;;;;;AAMZ,EAAE"}
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/AuthLayout/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar, responsive }) => ({\n aside: css`\n position: relative;\n\n flex: none;\n\n box-sizing: border-box;\n inline-size: 50%;\n min-inline-size: 0;\n max-inline-size: 50%;\n\n background: ${cssVar.colorFillSecondary};\n\n ${responsive.laptop} {\n display: none;\n }\n `,\n asideCopy: css`\n pointer-events: none;\n\n position: absolute;\n z-index: 2;\n inset-block-end: 64px;\n inset-inline: 40px;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n `,\n asideKicker: css`\n margin: 0;\n\n font-size: ${cssVar.fontSize};\n line-height: 1.4;\n color: #fff;\n\n opacity: 0.82;\n `,\n asideLine: css`\n margin: 0;\n\n font-size: ${cssVar.fontSizeHeading2};\n font-weight: 600;\n line-height: 1.25;\n color: #fff;\n letter-spacing: -0.02em;\n `,\n asidePanel: css`\n position: absolute;\n inset: 8px;\n\n overflow: hidden;\n\n border-radius: 20px;\n\n background: linear-gradient(165deg, #ff9ffc 0%, #5227ff 46%, #b497cf 100%);\n `,\n asidePlate: css`\n position: absolute;\n inset: 0;\n background: var(--lobe-surface-bg-solid, ${cssVar.colorBgContainer});\n `,\n asideScrim: css`\n pointer-events: none;\n\n position: absolute;\n z-index: 1;\n inset-block-end: 0;\n inset-inline: 0;\n\n block-size: 58%;\n\n background: linear-gradient(to top, rgb(24 10 48 / 42%), transparent);\n `,\n backdrop: css`\n pointer-events: none;\n position: absolute;\n z-index: 0;\n inset: 0;\n `,\n description: css`\n line-height: 1.6;\n color: ${cssVar.colorTextSecondary};\n `,\n elevated: css`\n &&&,\n &&&:hover {\n border-radius: 28px;\n }\n `,\n footer: css`\n margin: 0;\n font-size: ${cssVar.fontSizeSM};\n line-height: 1.6;\n color: ${cssVar.colorTextSecondary};\n\n a {\n font-weight: 600;\n color: ${cssVar.colorLink};\n text-decoration: none;\n }\n `,\n form: css`\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 24px;\n justify-content: center;\n\n box-sizing: border-box;\n inline-size: 100%;\n min-inline-size: 0;\n padding-block: 40px;\n padding-inline: 36px;\n\n ${responsive.laptop} {\n padding-block: 28px;\n padding-inline: 24px;\n }\n `,\n formSplit: css`\n inline-size: 50%;\n max-inline-size: 50%;\n\n ${responsive.laptop} {\n inline-size: 100%;\n max-inline-size: 100%;\n }\n `,\n frame: css`\n overflow: hidden;\n display: flex;\n flex: none;\n\n inline-size: 100%;\n min-inline-size: 0;\n border-radius: inherit;\n `,\n grid: css`\n && {\n background-color: color-mix(in srgb, ${cssVar.colorBgLayout}, ${cssVar.colorBgElevated} 70%);\n background-image:\n linear-gradient(\n color-mix(in srgb, ${cssVar.colorText} 5%, transparent) 1px,\n transparent 1px\n ),\n linear-gradient(\n 90deg,\n color-mix(in srgb, ${cssVar.colorText} 5%, transparent) 1px,\n transparent 1px\n );\n background-position: -1px -1px;\n background-size: 32px 32px;\n }\n `,\n header: css`\n position: relative;\n z-index: 1;\n\n display: flex;\n flex: none;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n\n block-size: 56px;\n padding-inline: 16px;\n `,\n lift: css`\n position: relative;\n display: flex;\n inline-size: min(440px, 100%);\n `,\n liftSplit: css`\n inline-size: min(880px, 100%);\n\n ${responsive.laptop} {\n inline-size: min(440px, 100%);\n }\n `,\n logo: css`\n display: flex;\n margin-block-end: 8px;\n `,\n main: css`\n position: relative;\n z-index: 1;\n\n display: grid;\n flex: 1;\n place-items: center;\n\n padding-block: 24px 48px;\n padding-inline: 16px;\n `,\n page: css`\n position: relative;\n\n overflow: auto;\n display: flex;\n flex: 1;\n flex-direction: column;\n\n box-sizing: border-box;\n inline-size: 100%;\n block-size: 100%;\n min-block-size: 100dvh;\n\n background: ${cssVar.colorBgLayout};\n `,\n split: css`\n min-block-size: 520px;\n\n ${responsive.laptop} {\n min-block-size: 0;\n }\n `,\n title: css`\n margin: 0;\n font-size: ${cssVar.fontSizeHeading3};\n line-height: ${cssVar.lineHeightHeading3};\n `,\n titleNode: css`\n display: flex;\n min-inline-size: 0;\n `,\n tools: css`\n display: flex;\n gap: 6px;\n align-items: center;\n margin-inline-start: auto;\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,QAAQ,kBAAkB;CACzE,OAAO,GAAG;;;;;;;;;;kBAUM,OAAO,mBAAmB;;MAEtC,WAAW,OAAO;;;;CAItB,WAAW,GAAG;;;;;;;;;;;;CAYd,aAAa,GAAG;;;iBAGD,OAAO,SAAS;;;;;;CAM/B,WAAW,GAAG;;;iBAGC,OAAO,iBAAiB;;;;;;CAMvC,YAAY,GAAG;;;;;;;;;;CAUf,YAAY,GAAG;;;+CAG8B,OAAO,iBAAiB;;CAErE,YAAY,GAAG;;;;;;;;;;;;CAYf,UAAU,GAAG;;;;;;CAMb,aAAa,GAAG;;aAEL,OAAO,mBAAmB;;CAErC,UAAU,GAAG;;;;;;CAMb,QAAQ,GAAG;;iBAEI,OAAO,WAAW;;aAEtB,OAAO,mBAAmB;;;;eAIxB,OAAO,UAAU;;;;CAI9B,MAAM,GAAG;;;;;;;;;;;;;MAaL,WAAW,OAAO;;;;;CAKtB,WAAW,GAAG;;;;MAIV,WAAW,OAAO;;;;;CAKtB,OAAO,GAAG;;;;;;;;;CASV,MAAM,GAAG;;6CAEkC,OAAO,cAAc,IAAI,OAAO,gBAAgB;;;+BAG9D,OAAO,UAAU;;;;;+BAKjB,OAAO,UAAU;;;;;;;CAO9C,QAAQ,GAAG;;;;;;;;;;;;;CAaX,MAAM,GAAG;;;;;CAKT,WAAW,GAAG;;;MAGV,WAAW,OAAO;;;;CAItB,MAAM,GAAG;;;;CAIT,MAAM,GAAG;;;;;;;;;;;CAWT,MAAM,GAAG;;;;;;;;;;;;;kBAaO,OAAO,cAAc;;CAErC,OAAO,GAAG;;;MAGN,WAAW,OAAO;;;;CAItB,OAAO,GAAG;;iBAEK,OAAO,iBAAiB;mBACtB,OAAO,mBAAmB;;CAE3C,WAAW,GAAG;;;;CAId,OAAO,GAAG;;;;;;AAMZ,EAAE"}
@@ -1,16 +1,52 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
2
  //#region src/dashboard/AuthLayout/type.d.ts
3
+ type AuthLayoutBackground = 'plain' | 'grid';
4
+ type AuthLayoutVariant = 'default' | 'elevated';
3
5
  interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
4
- /** Optional panel beside the form. Hidden below the laptop breakpoint. */
6
+ /** Message shown above the form, such as an error `Alert`. */
7
+ alert?: ReactNode;
8
+ /** Optional panel beside the form. Hidden below the laptop breakpoint. See `AuthLayout.Aside`. */
5
9
  aside?: ReactNode;
10
+ /**
11
+ * Page backdrop. `grid` draws a 32px line grid over a mix of the layout and elevated colors.
12
+ * Any other node is rendered behind the content.
13
+ * @default 'plain'
14
+ */
15
+ background?: AuthLayoutBackground | ReactNode;
6
16
  /** Home mark rendered in the corner. Pass your own logo. */
7
17
  brand?: ReactNode;
18
+ /**
19
+ * Render the sign-in card. Set `false` to keep only the header, tools and backdrop,
20
+ * for status pages that center their own content.
21
+ * @default true
22
+ */
23
+ card?: boolean;
8
24
  children?: ReactNode;
9
25
  description?: ReactNode;
10
- title: ReactNode;
26
+ /** Small secondary line under the form, such as support links. */
27
+ footer?: ReactNode;
28
+ /** Replace the form with a skeleton. Title and description stay. */
29
+ loading?: boolean;
30
+ /** Mark shown above the title. */
31
+ logo?: ReactNode;
32
+ /** A string renders as the page heading. Other nodes render as is. */
33
+ title?: ReactNode;
11
34
  /** Corner actions, such as a theme switch. */
12
35
  tools?: ReactNode;
36
+ /**
37
+ * Card shape. `elevated` uses a 28px radius for standalone sign-in pages.
38
+ * @default 'default'
39
+ */
40
+ variant?: AuthLayoutVariant;
41
+ }
42
+ interface AuthLayoutAsideProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
43
+ /** Art behind the copy, such as `<Grainient />`. Defaults to a static gradient. */
44
+ background?: ReactNode;
45
+ /** Small line above the headline. */
46
+ kicker?: ReactNode;
47
+ /** Headline at the bottom of the panel. */
48
+ line?: ReactNode;
13
49
  }
14
50
  //#endregion
15
- export { AuthLayoutProps };
51
+ export { AuthLayoutAsideProps, AuthLayoutBackground, AuthLayoutProps, AuthLayoutVariant };
16
52
  //# sourceMappingURL=type.d.mts.map
@@ -0,0 +1,10 @@
1
+ import { AuthLocaleSwitchProps } from "./type.mjs";
2
+ //#region src/dashboard/AuthTools/AuthLocaleSwitch.d.ts
3
+ /** Pill language select for auth corner tools. Controlled; pass your locale list. */
4
+ declare function AuthLocaleSwitch({ 'aria-label': ariaLabel, className, onChange, options, style, value }: AuthLocaleSwitchProps): import("react").JSX.Element;
5
+ declare namespace AuthLocaleSwitch {
6
+ var displayName: string;
7
+ }
8
+ //#endregion
9
+ export { AuthLocaleSwitch as default };
10
+ //# sourceMappingURL=AuthLocaleSwitch.d.mts.map
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import Icon from "../../Icon/Icon.mjs";
3
+ import Select from "../../base-ui/Select/Select.mjs";
4
+ import { styles } from "./style.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { cx } from "antd-style";
7
+ import { GlobeIcon } from "lucide-react";
8
+ //#region src/dashboard/AuthTools/AuthLocaleSwitch.tsx
9
+ /** Pill language select for auth corner tools. Controlled; pass your locale list. */
10
+ function AuthLocaleSwitch({ "aria-label": ariaLabel = "Language", className, onChange, options, style, value }) {
11
+ return /* @__PURE__ */ jsx(Select, {
12
+ "aria-label": ariaLabel,
13
+ className: cx(styles.locale, className),
14
+ options,
15
+ prefix: /* @__PURE__ */ jsx(Icon, {
16
+ className: styles.localeIcon,
17
+ icon: GlobeIcon
18
+ }),
19
+ size: "small",
20
+ style,
21
+ value,
22
+ variant: "outlined",
23
+ onChange: (next) => {
24
+ if (typeof next === "string") onChange?.(next);
25
+ }
26
+ });
27
+ }
28
+ AuthLocaleSwitch.displayName = "AuthLocaleSwitch";
29
+ //#endregion
30
+ export { AuthLocaleSwitch as default };
31
+
32
+ //# sourceMappingURL=AuthLocaleSwitch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthLocaleSwitch.mjs","names":[],"sources":["../../../src/dashboard/AuthTools/AuthLocaleSwitch.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { GlobeIcon } from 'lucide-react';\n\nimport Select from '@/base-ui/Select';\nimport Icon from '@/Icon';\n\nimport { styles } from './style';\nimport type { AuthLocaleSwitchProps } from './type';\n\n/** Pill language select for auth corner tools. Controlled; pass your locale list. */\nfunction AuthLocaleSwitch({\n 'aria-label': ariaLabel = 'Language',\n className,\n onChange,\n options,\n style,\n value,\n}: AuthLocaleSwitchProps) {\n return (\n <Select\n aria-label={ariaLabel}\n className={cx(styles.locale, className)}\n options={options}\n prefix={<Icon className={styles.localeIcon} icon={GlobeIcon} />}\n size=\"small\"\n style={style}\n value={value}\n variant=\"outlined\"\n onChange={(next: unknown) => {\n if (typeof next === 'string') onChange?.(next);\n }}\n />\n );\n}\n\nAuthLocaleSwitch.displayName = 'AuthLocaleSwitch';\n\nexport default AuthLocaleSwitch;\n"],"mappings":";;;;;;;;;AAYA,SAAS,iBAAiB,EACxB,cAAc,YAAY,YAC1B,WACA,UACA,SACA,OACA,SACwB;CACxB,OACE,oBAAC,QAAD;EACE,cAAY;EACZ,WAAW,GAAG,OAAO,QAAQ,SAAS;EAC7B;EACT,QAAQ,oBAAC,MAAD;GAAM,WAAW,OAAO;GAAY,MAAM;EAAY,CAAA;EAC9D,MAAK;EACE;EACA;EACP,SAAQ;EACR,WAAW,SAAkB;GAC3B,IAAI,OAAO,SAAS,UAAU,WAAW,IAAI;EAC/C;CACD,CAAA;AAEL;AAEA,iBAAiB,cAAc"}
@@ -0,0 +1,10 @@
1
+ import { AuthThemeSwitchProps } from "./type.mjs";
2
+ //#region src/dashboard/AuthTools/AuthThemeSwitch.d.ts
3
+ /** Compact icon-only theme picker for auth corner tools. Controlled; wire it to your store. */
4
+ declare function AuthThemeSwitch({ className, labels, onChange, style, value }: AuthThemeSwitchProps): import("react").JSX.Element;
5
+ declare namespace AuthThemeSwitch {
6
+ var displayName: string;
7
+ }
8
+ //#endregion
9
+ export { AuthThemeSwitch as default };
10
+ //# sourceMappingURL=AuthThemeSwitch.d.mts.map
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import Icon from "../../Icon/Icon.mjs";
3
+ import Segmented from "../../base-ui/Segmented/Segmented.mjs";
4
+ import { styles } from "./style.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { cx } from "antd-style";
7
+ import { Monitor, Moon, Sun } from "lucide-react";
8
+ //#region src/dashboard/AuthTools/AuthThemeSwitch.tsx
9
+ const OPTIONS = [
10
+ {
11
+ icon: Moon,
12
+ value: "dark"
13
+ },
14
+ {
15
+ icon: Monitor,
16
+ value: "auto"
17
+ },
18
+ {
19
+ icon: Sun,
20
+ value: "light"
21
+ }
22
+ ];
23
+ const DEFAULT_LABELS = {
24
+ auto: "System",
25
+ dark: "Dark",
26
+ light: "Light"
27
+ };
28
+ /** Compact icon-only theme picker for auth corner tools. Controlled; wire it to your store. */
29
+ function AuthThemeSwitch({ className, labels, onChange, style, value = "auto" }) {
30
+ const names = {
31
+ ...DEFAULT_LABELS,
32
+ ...labels
33
+ };
34
+ return /* @__PURE__ */ jsx(Segmented, {
35
+ className: cx(styles.theme, className),
36
+ size: "small",
37
+ style,
38
+ value,
39
+ variant: "outlined",
40
+ classNames: {
41
+ indicator: styles.themeIndicator,
42
+ item: styles.themeItem,
43
+ itemIcon: styles.themeIcon,
44
+ itemLabel: styles.themeLabel
45
+ },
46
+ options: OPTIONS.map((option) => ({
47
+ icon: /* @__PURE__ */ jsx(Icon, { icon: option.icon }),
48
+ label: names[option.value],
49
+ title: names[option.value],
50
+ value: option.value
51
+ })),
52
+ onChange: (next) => onChange?.(next)
53
+ });
54
+ }
55
+ AuthThemeSwitch.displayName = "AuthThemeSwitch";
56
+ //#endregion
57
+ export { AuthThemeSwitch as default };
58
+
59
+ //# sourceMappingURL=AuthThemeSwitch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthThemeSwitch.mjs","names":[],"sources":["../../../src/dashboard/AuthTools/AuthThemeSwitch.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { Monitor, Moon, Sun } from 'lucide-react';\n\nimport Segmented from '@/base-ui/Segmented';\nimport Icon from '@/Icon';\n\nimport { styles } from './style';\nimport type { AuthThemeMode, AuthThemeSwitchProps } from './type';\n\nconst OPTIONS = [\n { icon: Moon, value: 'dark' },\n { icon: Monitor, value: 'auto' },\n { icon: Sun, value: 'light' },\n] as const;\n\nconst DEFAULT_LABELS: Record<AuthThemeMode, string> = {\n auto: 'System',\n dark: 'Dark',\n light: 'Light',\n};\n\n/** Compact icon-only theme picker for auth corner tools. Controlled; wire it to your store. */\nfunction AuthThemeSwitch({\n className,\n labels,\n onChange,\n style,\n value = 'auto',\n}: AuthThemeSwitchProps) {\n const names = { ...DEFAULT_LABELS, ...labels };\n return (\n <Segmented<AuthThemeMode>\n className={cx(styles.theme, className)}\n size=\"small\"\n style={style}\n value={value}\n variant=\"outlined\"\n classNames={{\n indicator: styles.themeIndicator,\n item: styles.themeItem,\n itemIcon: styles.themeIcon,\n itemLabel: styles.themeLabel,\n }}\n options={OPTIONS.map((option) => ({\n icon: <Icon icon={option.icon} />,\n label: names[option.value],\n title: names[option.value],\n value: option.value,\n }))}\n onChange={(next) => onChange?.(next)}\n />\n );\n}\n\nAuthThemeSwitch.displayName = 'AuthThemeSwitch';\n\nexport default AuthThemeSwitch;\n"],"mappings":";;;;;;;;AAWA,MAAM,UAAU;CACd;EAAE,MAAM;EAAM,OAAO;CAAO;CAC5B;EAAE,MAAM;EAAS,OAAO;CAAO;CAC/B;EAAE,MAAM;EAAK,OAAO;CAAQ;AAC9B;AAEA,MAAM,iBAAgD;CACpD,MAAM;CACN,MAAM;CACN,OAAO;AACT;;AAGA,SAAS,gBAAgB,EACvB,WACA,QACA,UACA,OACA,QAAQ,UACe;CACvB,MAAM,QAAQ;EAAE,GAAG;EAAgB,GAAG;CAAO;CAC7C,OACE,oBAAC,WAAD;EACE,WAAW,GAAG,OAAO,OAAO,SAAS;EACrC,MAAK;EACE;EACA;EACP,SAAQ;EACR,YAAY;GACV,WAAW,OAAO;GAClB,MAAM,OAAO;GACb,UAAU,OAAO;GACjB,WAAW,OAAO;EACpB;EACA,SAAS,QAAQ,KAAK,YAAY;GAChC,MAAM,oBAAC,MAAD,EAAM,MAAM,OAAO,KAAO,CAAA;GAChC,OAAO,MAAM,OAAO;GACpB,OAAO,MAAM,OAAO;GACpB,OAAO,OAAO;EAChB,EAAE;EACF,WAAW,SAAS,WAAW,IAAI;CACpC,CAAA;AAEL;AAEA,gBAAgB,cAAc"}
@@ -0,0 +1,4 @@
1
+ import { AuthLocaleOption, AuthLocaleSwitchProps, AuthThemeMode, AuthThemeSwitchProps } from "./type.mjs";
2
+ import AuthLocaleSwitch from "./AuthLocaleSwitch.mjs";
3
+ import AuthThemeSwitch from "./AuthThemeSwitch.mjs";
4
+ export { type AuthLocaleOption, AuthLocaleSwitch, type AuthLocaleSwitchProps, type AuthThemeMode, AuthThemeSwitch, type AuthThemeSwitchProps };