@lobehub/ui 5.58.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.
- package/es/ActionIcon/style.mjs +8 -2
- package/es/ActionIcon/style.mjs.map +1 -1
- package/es/Grid/style.mjs +8 -8
- package/es/Grid/style.mjs.map +1 -1
- package/es/awesome/Grainient/Grainient.d.mts +11 -0
- package/es/awesome/Grainient/Grainient.mjs +311 -0
- package/es/awesome/Grainient/Grainient.mjs.map +1 -0
- package/es/awesome/Grainient/index.d.mts +3 -0
- package/es/awesome/Grainient/style.mjs +25 -0
- package/es/awesome/Grainient/style.mjs.map +1 -0
- package/es/awesome/Grainient/type.d.mts +122 -0
- package/es/awesome/index.d.mts +4 -1
- package/es/awesome/index.mjs +2 -1
- package/es/base-ui/ActionIcon/style.mjs +8 -2
- package/es/base-ui/ActionIcon/style.mjs.map +1 -1
- package/es/base-ui/Input/style.mjs +8 -2
- package/es/base-ui/Input/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
- package/es/dashboard/AuthLayout/Aside.mjs +30 -0
- package/es/dashboard/AuthLayout/Aside.mjs.map +1 -0
- package/es/dashboard/AuthLayout/AuthLayout.d.mts +3 -1
- package/es/dashboard/AuthLayout/AuthLayout.mjs +93 -37
- package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
- package/es/dashboard/AuthLayout/index.d.mts +3 -2
- package/es/dashboard/AuthLayout/style.mjs +120 -1
- package/es/dashboard/AuthLayout/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/type.d.mts +39 -3
- package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +32 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +59 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/index.d.mts +4 -0
- package/es/dashboard/AuthTools/style.mjs +63 -0
- package/es/dashboard/AuthTools/style.mjs.map +1 -0
- package/es/dashboard/AuthTools/type.d.mts +30 -0
- package/es/dashboard/ChartGrid/ChartGrid.d.mts +10 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs +18 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs.map +1 -0
- package/es/dashboard/ChartGrid/index.d.mts +3 -0
- package/es/dashboard/ChartGrid/style.mjs +32 -0
- package/es/dashboard/ChartGrid/style.mjs.map +1 -0
- package/es/dashboard/ChartGrid/type.d.mts +9 -0
- package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs +81 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -0
- package/es/dashboard/ConsoleNav/index.d.mts +3 -2
- package/es/dashboard/ConsoleNav/style.mjs +15 -0
- package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/type.d.mts +14 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs +22 -6
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/style.mjs +21 -0
- package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/type.d.mts +11 -0
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs +18 -17
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
- package/es/dashboard/FilterStrip/FilterStrip.d.mts +11 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs +55 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -0
- package/es/dashboard/FilterStrip/index.d.mts +3 -0
- package/es/dashboard/FilterStrip/style.mjs +94 -0
- package/es/dashboard/FilterStrip/style.mjs.map +1 -0
- package/es/dashboard/FilterStrip/type.d.mts +26 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +10 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs +18 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs.map +1 -0
- package/es/dashboard/LabelWithKey/index.d.mts +3 -0
- package/es/dashboard/LabelWithKey/type.d.mts +12 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs +81 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -0
- package/es/dashboard/MetricStrip/MetricStrip.d.mts +13 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs +47 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -0
- package/es/dashboard/MetricStrip/index.d.mts +3 -0
- package/es/dashboard/MetricStrip/style.mjs +161 -0
- package/es/dashboard/MetricStrip/style.mjs.map +1 -0
- package/es/dashboard/MetricStrip/type.d.mts +37 -0
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs +20 -18
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
- package/es/dashboard/PageSkeleton/style.mjs +1 -1
- package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
- package/es/dashboard/PageToolbar/PageToolbar.d.mts +10 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs +21 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs.map +1 -0
- package/es/dashboard/PageToolbar/index.d.mts +3 -0
- package/es/dashboard/PageToolbar/style.mjs +34 -0
- package/es/dashboard/PageToolbar/style.mjs.map +1 -0
- package/es/dashboard/PageToolbar/type.d.mts +12 -0
- package/es/dashboard/PanelSurface/PanelSurface.d.mts +10 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs +39 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -0
- package/es/dashboard/PanelSurface/index.d.mts +3 -0
- package/es/dashboard/PanelSurface/style.mjs +24 -0
- package/es/dashboard/PanelSurface/style.mjs.map +1 -0
- package/es/dashboard/PanelSurface/type.d.mts +18 -0
- package/es/dashboard/Section/Section.d.mts +10 -0
- package/es/dashboard/Section/Section.mjs +81 -0
- package/es/dashboard/Section/Section.mjs.map +1 -0
- package/es/dashboard/Section/index.d.mts +3 -0
- package/es/dashboard/Section/style.mjs +35 -0
- package/es/dashboard/Section/style.mjs.map +1 -0
- package/es/dashboard/Section/type.d.mts +24 -0
- package/es/dashboard/StatCard/StatCard.d.mts +2 -1
- package/es/dashboard/StatCard/StatCard.mjs +24 -72
- package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
- package/es/dashboard/StatCard/type.d.mts +16 -5
- package/es/dashboard/Surface/Surface.d.mts +4 -3
- package/es/dashboard/Surface/Surface.mjs +83 -7
- package/es/dashboard/Surface/Surface.mjs.map +1 -1
- package/es/dashboard/Surface/index.d.mts +3 -2
- package/es/dashboard/Surface/link.d.mts +19 -0
- package/es/dashboard/Surface/link.mjs +33 -0
- package/es/dashboard/Surface/link.mjs.map +1 -0
- package/es/dashboard/Surface/style.d.mts +45 -3
- package/es/dashboard/Surface/style.mjs +358 -8
- package/es/dashboard/Surface/style.mjs.map +1 -1
- package/es/dashboard/Surface/type.d.mts +30 -2
- package/es/dashboard/TableIconActions/TableIconActions.d.mts +17 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs +39 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs.map +1 -0
- package/es/dashboard/TableIconActions/index.d.mts +3 -0
- package/es/dashboard/TableIconActions/type.d.mts +18 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +10 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs +28 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs.map +1 -0
- package/es/dashboard/TitleWithTips/index.d.mts +3 -0
- package/es/dashboard/TitleWithTips/type.d.mts +11 -0
- package/es/dashboard/index.d.mts +38 -4
- package/es/dashboard/index.mjs +17 -3
- package/package.json +1 -1
- package/es/dashboard/StatCard/style.mjs +0 -135
- package/es/dashboard/StatCard/style.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/ActionIcon/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n return {\n active: lobeStaticStylish.active,\n //
|
|
1
|
+
{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/ActionIcon/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n return {\n active: lobeStaticStylish.active,\n // &&& outranks both base-ui Button's variant classes and this file's own `root` color\n // (same `&&` weight, inserted later), so the icon itself turns red, not just the fill.\n dangerRoot: css`\n /* Mirrors the neutral ladder (colorTextTertiary -> colorTextSecondary -> colorText):\n a softened red at rest, full colorError on hover, colorErrorActive when pressed. */\n &&& {\n color: color-mix(in srgb, ${cssVar.colorError} 66%, transparent);\n }\n\n &&&:hover:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorError};\n }\n\n &&&:active:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorErrorActive};\n }\n `,\n glass: lobeStaticStylish.blur,\n root: css`\n && {\n color: ${cssVar.colorTextTertiary};\n }\n\n &&:hover {\n color: ${cssVar.colorTextSecondary};\n }\n\n &&:active {\n color: ${cssVar.colorText};\n }\n `,\n shadow: lobeStaticStylish.shadow,\n };\n});\n\nexport const variants = cva(styles.root, {\n defaultVariants: {\n active: false,\n danger: false,\n glass: false,\n shadow: false,\n },\n\n variants: {\n active: {\n false: null,\n true: styles.active,\n },\n danger: {\n false: null,\n true: styles.dangerRoot,\n },\n glass: {\n false: null,\n true: styles.glass,\n },\n shadow: {\n false: null,\n true: styles.shadow,\n },\n },\n});\n"],"mappings":";;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,KAAK,aAAa;CAC5D,OAAO;EACL,QAAQA,cAAkB;EAG1B,YAAY,GAAG;;;;oCAIiB,OAAO,WAAW;;;;iBAIrC,OAAO,WAAW;;;;iBAIlB,OAAO,iBAAiB;;;EAGrC,OAAOA,cAAkB;EACzB,MAAM,GAAG;;iBAEI,OAAO,kBAAkB;;;;iBAIzB,OAAO,mBAAmB;;;;iBAI1B,OAAO,UAAU;;;EAG9B,QAAQA,cAAkB;CAC5B;AACF,CAAC;AAED,MAAa,WAAW,IAAI,OAAO,MAAM;CACvC,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;CACV;CAEA,UAAU;EACR,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;EACA,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;EACA,OAAO;GACL,OAAO;GACP,MAAM,OAAO;EACf;EACA,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;CACF;AACF,CAAC"}
|
|
@@ -3,6 +3,12 @@ import { controlHeight } from "../controlSize.mjs";
|
|
|
3
3
|
import { createStaticStyles } from "antd-style";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
//#region src/base-ui/Input/style.ts
|
|
6
|
+
/**
|
|
7
|
+
* Only the field's own control counts as disabled. NumberField disables its
|
|
8
|
+
* increment / decrement buttons at max / min, and a bare `:has(:disabled)` greyed
|
|
9
|
+
* the whole root whenever the value sat on a bound.
|
|
10
|
+
*/
|
|
11
|
+
const disabledControl = "input:disabled, textarea:disabled";
|
|
6
12
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
7
13
|
clear: css`
|
|
8
14
|
cursor: pointer;
|
|
@@ -140,7 +146,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
140
146
|
box-shadow 150ms ${cssVar.motionEaseOut};
|
|
141
147
|
|
|
142
148
|
&[data-disabled],
|
|
143
|
-
&:has(
|
|
149
|
+
&:has(${disabledControl}) {
|
|
144
150
|
cursor: not-allowed;
|
|
145
151
|
color: ${cssVar.colorTextQuaternary};
|
|
146
152
|
opacity: 0.66;
|
|
@@ -306,6 +312,6 @@ const rootVariants = cva([styles.root, styles.invalid], {
|
|
|
306
312
|
}
|
|
307
313
|
});
|
|
308
314
|
//#endregion
|
|
309
|
-
export { rootVariants, styles };
|
|
315
|
+
export { disabledControl, rootVariants, styles };
|
|
310
316
|
|
|
311
317
|
//# sourceMappingURL=style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/Input/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { controlHeight } from '@/base-ui/controlSize';\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n clear: css`\n cursor: pointer;\n\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 16px;\n height: 16px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n\n color: ${cssVar.colorBgContainer};\n\n visibility: hidden;\n background: ${cssVar.colorTextQuaternary};\n\n &:hover {\n background: ${cssVar.colorTextTertiary};\n }\n `,\n count: css`\n pointer-events: none;\n\n position: absolute;\n inset-block-end: 6px;\n inset-inline-end: 8px;\n\n display: inline-flex;\n align-items: center;\n\n height: 20px;\n padding-inline: 8px;\n border-radius: 999px;\n\n font-size: 11px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n color: ${cssVar.colorTextSecondary};\n\n background: ${cssVar.colorFillTertiary};\n\n &[data-over] {\n color: ${cssVar.colorWhite};\n background: ${cssVar.colorError};\n }\n `,\n textareaClear: css`\n position: absolute;\n inset-block-start: 10px;\n inset-inline-end: 10px;\n `,\n textareaWithCount: css`\n padding-block-end: 30px;\n `,\n borderless: css`\n border: 1px solid transparent;\n background: none;\n `,\n filled: css`\n border: 1px solid transparent;\n background: ${cssVar.colorFillTertiary};\n\n &:hover:not(:focus-within, [data-disabled]) {\n background: ${cssVar.colorFillSecondary};\n }\n `,\n input: css`\n flex: 1;\n\n min-width: 0;\n padding: 0;\n border: none;\n\n font: inherit;\n color: inherit;\n\n appearance: none;\n background: transparent;\n outline: none;\n\n &::placeholder {\n color: ${cssVar.colorTextPlaceholder};\n }\n\n /* the root shows focus via its border; outrank global :focus-visible rings */\n &:focus-visible {\n outline: none;\n }\n `,\n invalid: css`\n &:has([data-invalid], [aria-invalid='true']) {\n border-color: ${cssVar.colorError};\n\n &:focus-within {\n border-color: ${cssVar.colorError};\n box-shadow: 0 0 0 2px ${cssVar.colorErrorBg};\n }\n }\n `,\n outlined: css`\n border: 1px solid ${cssVar.colorBorderSecondary};\n background: ${cssVar.colorBgContainer};\n\n &:hover:not(:focus-within, [data-disabled]) {\n border-color: ${cssVar.colorBorder};\n }\n\n &:focus-within {\n border-color: ${cssVar.colorPrimary};\n box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBg};\n }\n `,\n root: css`\n cursor: text;\n\n display: inline-flex;\n gap: 8px;\n align-items: center;\n\n box-sizing: border-box;\n width: 100%;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n\n font-size: 14px;\n color: ${cssVar.colorText};\n\n transition:\n background 150ms ${cssVar.motionEaseOut},\n border-color 150ms ${cssVar.motionEaseOut},\n box-shadow 150ms ${cssVar.motionEaseOut};\n\n &[data-disabled],\n &:has(
|
|
1
|
+
{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/Input/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { controlHeight } from '@/base-ui/controlSize';\nimport { lobeStaticStylish } from '@/styles';\n\n/**\n * Only the field's own control counts as disabled. NumberField disables its\n * increment / decrement buttons at max / min, and a bare `:has(:disabled)` greyed\n * the whole root whenever the value sat on a bound.\n */\nexport const disabledControl = 'input:disabled, textarea:disabled';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n clear: css`\n cursor: pointer;\n\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n width: 16px;\n height: 16px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n\n color: ${cssVar.colorBgContainer};\n\n visibility: hidden;\n background: ${cssVar.colorTextQuaternary};\n\n &:hover {\n background: ${cssVar.colorTextTertiary};\n }\n `,\n count: css`\n pointer-events: none;\n\n position: absolute;\n inset-block-end: 6px;\n inset-inline-end: 8px;\n\n display: inline-flex;\n align-items: center;\n\n height: 20px;\n padding-inline: 8px;\n border-radius: 999px;\n\n font-size: 11px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n color: ${cssVar.colorTextSecondary};\n\n background: ${cssVar.colorFillTertiary};\n\n &[data-over] {\n color: ${cssVar.colorWhite};\n background: ${cssVar.colorError};\n }\n `,\n textareaClear: css`\n position: absolute;\n inset-block-start: 10px;\n inset-inline-end: 10px;\n `,\n textareaWithCount: css`\n padding-block-end: 30px;\n `,\n borderless: css`\n border: 1px solid transparent;\n background: none;\n `,\n filled: css`\n border: 1px solid transparent;\n background: ${cssVar.colorFillTertiary};\n\n &:hover:not(:focus-within, [data-disabled]) {\n background: ${cssVar.colorFillSecondary};\n }\n `,\n input: css`\n flex: 1;\n\n min-width: 0;\n padding: 0;\n border: none;\n\n font: inherit;\n color: inherit;\n\n appearance: none;\n background: transparent;\n outline: none;\n\n &::placeholder {\n color: ${cssVar.colorTextPlaceholder};\n }\n\n /* the root shows focus via its border; outrank global :focus-visible rings */\n &:focus-visible {\n outline: none;\n }\n `,\n invalid: css`\n &:has([data-invalid], [aria-invalid='true']) {\n border-color: ${cssVar.colorError};\n\n &:focus-within {\n border-color: ${cssVar.colorError};\n box-shadow: 0 0 0 2px ${cssVar.colorErrorBg};\n }\n }\n `,\n outlined: css`\n border: 1px solid ${cssVar.colorBorderSecondary};\n background: ${cssVar.colorBgContainer};\n\n &:hover:not(:focus-within, [data-disabled]) {\n border-color: ${cssVar.colorBorder};\n }\n\n &:focus-within {\n border-color: ${cssVar.colorPrimary};\n box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBg};\n }\n `,\n root: css`\n cursor: text;\n\n display: inline-flex;\n gap: 8px;\n align-items: center;\n\n box-sizing: border-box;\n width: 100%;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n\n font-size: 14px;\n color: ${cssVar.colorText};\n\n transition:\n background 150ms ${cssVar.motionEaseOut},\n border-color 150ms ${cssVar.motionEaseOut},\n box-shadow 150ms ${cssVar.motionEaseOut};\n\n &[data-disabled],\n &:has(${disabledControl}) {\n cursor: not-allowed;\n color: ${cssVar.colorTextQuaternary};\n opacity: 0.66;\n }\n\n &:hover [data-lobe-input-clear],\n &:focus-within [data-lobe-input-clear] {\n visibility: visible;\n }\n `,\n shadow: lobeStaticStylish.shadow,\n sizeLarge: css`\n min-height: ${controlHeight.large}px;\n border-radius: ${cssVar.borderRadiusLG};\n font-size: 16px;\n `,\n sizeMiddle: css`\n min-height: ${controlHeight.middle}px;\n `,\n sizeSmall: css`\n min-height: ${controlHeight.small}px;\n padding-inline: 8px;\n border-radius: ${cssVar.borderRadiusSM};\n font-size: 12px;\n `,\n numberControl: css`\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 20px;\n height: 13px;\n margin: 0;\n padding: 0;\n border: none;\n border-radius: 4px;\n\n color: ${cssVar.colorTextTertiary};\n\n background: none;\n outline: none;\n\n transition:\n color 150ms ${cssVar.motionEaseOut},\n background 150ms ${cssVar.motionEaseOut};\n\n &:hover:not(:disabled) {\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillSecondary};\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.3;\n }\n `,\n numberControlLarge: css`\n width: 22px;\n height: 15px;\n `,\n numberControlSmall: css`\n width: 16px;\n height: 10px;\n border-radius: 3px;\n `,\n numberControls: css`\n display: flex;\n flex: none;\n flex-direction: column;\n margin-inline-end: -6px;\n `,\n numberControlsSmall: css`\n margin-inline-end: -4px;\n `,\n numberInput: css`\n font-variant-numeric: tabular-nums;\n `,\n otpCell: css`\n flex: none;\n width: ${controlHeight.middle}px;\n padding-inline: 0;\n text-align: center;\n `,\n otpRoot: css`\n display: inline-flex;\n gap: 8px;\n align-items: center;\n `,\n passwordToggle: css`\n cursor: pointer;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n margin: 0;\n padding: 0;\n border: none;\n\n color: ${cssVar.colorTextTertiary};\n\n background: none;\n outline: none;\n\n transition: color 150ms ${cssVar.motionEaseOut};\n\n &:hover {\n color: ${cssVar.colorText};\n }\n `,\n slot: css`\n display: inline-flex;\n flex: none;\n align-items: center;\n color: ${cssVar.colorTextTertiary};\n `,\n textarea: css`\n position: relative;\n height: auto;\n padding-block: 8px;\n\n textarea {\n resize: none;\n min-height: calc(1.5em * var(--textarea-min-rows, 2));\n max-height: var(--textarea-max-height, none);\n line-height: 1.5;\n }\n `,\n textareaAutoSize: css`\n textarea {\n field-sizing: content;\n }\n `,\n textareaResize: css`\n textarea {\n resize: vertical;\n }\n `,\n}));\n\nexport const rootVariants = cva([styles.root, styles.invalid], {\n defaultVariants: {\n shadow: false,\n size: 'middle',\n variant: 'outlined',\n },\n variants: {\n shadow: {\n false: null,\n true: styles.shadow,\n },\n size: {\n large: styles.sizeLarge,\n middle: styles.sizeMiddle,\n small: styles.sizeSmall,\n },\n variant: {\n borderless: styles.borderless,\n filled: styles.filled,\n outlined: styles.outlined,\n },\n },\n});\n"],"mappings":";;;;;;;;;;AAWA,MAAa,kBAAkB;AAE/B,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,OAAO,GAAG;;;;;;;;;;;;;;aAcC,OAAO,iBAAiB;;;kBAGnB,OAAO,oBAAoB;;;oBAGzB,OAAO,kBAAkB;;;CAG3C,OAAO,GAAG;;;;;;;;;;;;;;;;;aAiBC,OAAO,mBAAmB;;kBAErB,OAAO,kBAAkB;;;eAG5B,OAAO,WAAW;oBACb,OAAO,WAAW;;;CAGpC,eAAe,GAAG;;;;;CAKlB,mBAAmB,GAAG;;;CAGtB,YAAY,GAAG;;;;CAIf,QAAQ,GAAG;;kBAEK,OAAO,kBAAkB;;;oBAGvB,OAAO,mBAAmB;;;CAG5C,OAAO,GAAG;;;;;;;;;;;;;;;eAeG,OAAO,qBAAqB;;;;;;;;CAQzC,SAAS,GAAG;;sBAEQ,OAAO,WAAW;;;wBAGhB,OAAO,WAAW;gCACV,OAAO,aAAa;;;;CAIlD,UAAU,GAAG;wBACS,OAAO,qBAAqB;kBAClC,OAAO,iBAAiB;;;sBAGpB,OAAO,YAAY;;;;sBAInB,OAAO,aAAa;8BACZ,OAAO,eAAe;;;CAGlD,MAAM,GAAG;;;;;;;;;;qBAUU,OAAO,aAAa;;;aAG5B,OAAO,UAAU;;;yBAGL,OAAO,cAAc;2BACnB,OAAO,cAAc;yBACvB,OAAO,cAAc;;;YAGlC,gBAAgB;;eAEb,OAAO,oBAAoB;;;;;;;;;CASxC,QAAQA,cAAkB;CAC1B,WAAW,GAAG;kBACE,cAAc,MAAM;qBACjB,OAAO,eAAe;;;CAGzC,YAAY,GAAG;kBACC,cAAc,OAAO;;CAErC,WAAW,GAAG;kBACE,cAAc,MAAM;;qBAEjB,OAAO,eAAe;;;CAGzC,eAAe,GAAG;;;;;;;;;;;;;;aAcP,OAAO,kBAAkB;;;;;;oBAMlB,OAAO,cAAc;yBAChB,OAAO,cAAc;;;eAG/B,OAAO,UAAU;oBACZ,OAAO,mBAAmB;;;;;;;;CAQ5C,oBAAoB,GAAG;;;;CAIvB,oBAAoB,GAAG;;;;;CAKvB,gBAAgB,GAAG;;;;;;CAMnB,qBAAqB,GAAG;;;CAGxB,aAAa,GAAG;;;CAGhB,SAAS,GAAG;;aAED,cAAc,OAAO;;;;CAIhC,SAAS,GAAG;;;;;CAKZ,gBAAgB,GAAG;;;;;;;;;;;aAWR,OAAO,kBAAkB;;;;;8BAKR,OAAO,cAAc;;;eAGpC,OAAO,UAAU;;;CAG9B,MAAM,GAAG;;;;aAIE,OAAO,kBAAkB;;CAEpC,UAAU,GAAG;;;;;;;;;;;;CAYb,kBAAkB,GAAG;;;;;CAKrB,gBAAgB,GAAG;;;;;AAKrB,EAAE;AAEF,MAAa,eAAe,IAAI,CAAC,OAAO,MAAM,OAAO,OAAO,GAAG;CAC7D,iBAAiB;EACf,QAAQ;EACR,MAAM;EACN,SAAS;CACX;CACA,UAAU;EACR,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;EACA,MAAM;GACJ,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,OAAO,OAAO;EAChB;EACA,SAAS;GACP,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,UAAU,OAAO;EACnB;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AuthLayoutAsideProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/AuthLayout/Aside.d.ts
|
|
3
|
+
/** Inset art panel for `AuthLayout`'s `aside` slot, with a scrim and copy at the bottom. */
|
|
4
|
+
declare function AuthLayoutAside({ background, className, kicker, line, ...rest }: AuthLayoutAsideProps): import("react").JSX.Element;
|
|
5
|
+
declare namespace AuthLayoutAside {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AuthLayoutAside as default };
|
|
10
|
+
//# sourceMappingURL=Aside.d.mts.map
|
|
@@ -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 "
|
|
5
|
-
import
|
|
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
|
-
|
|
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:
|
|
62
|
+
className: cx(styles.page, background === "grid" && styles.grid, className),
|
|
63
|
+
"data-auth-layout": "",
|
|
13
64
|
...rest,
|
|
14
|
-
children: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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":["
|
|
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:
|
|
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:
|
|
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
|
-
/**
|
|
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
|
-
|
|
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"}
|