@yimingliao/cms 0.0.95 → 0.0.96
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/dist/client/index.d.ts +7 -1
- package/dist/client/index.js +49 -1
- package/package.json +1 -1
package/dist/client/index.d.ts
CHANGED
|
@@ -413,6 +413,12 @@ interface FieldBodyProps extends HTMLAttributes<HTMLDivElement>, UIStates {
|
|
|
413
413
|
}
|
|
414
414
|
declare function FieldBody({ isLoading, isDisabled, isEmpty, className, backgroundClassName, childrenClassName, children, ...props }: FieldBodyProps): react_jsx_runtime.JSX.Element;
|
|
415
415
|
|
|
416
|
+
declare function FieldsContainer({ className, children, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
417
|
+
|
|
418
|
+
declare function MainFields({ className, children, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
419
|
+
|
|
420
|
+
declare function SideFields({ className, children, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
421
|
+
|
|
416
422
|
declare function PasswordInput<T>({ ...props }: InputProps<T>): react_jsx_runtime.JSX.Element;
|
|
417
423
|
|
|
418
424
|
/**
|
|
@@ -491,4 +497,4 @@ declare const cn: (...inputs: ClassValue[]) => string;
|
|
|
491
497
|
|
|
492
498
|
declare function useDeviceInfo(): DeviceInfo | null;
|
|
493
499
|
|
|
494
|
-
export { AdminProvider, Button, type ButtonProps, Field, FieldBody, Form, Input, type InputProps, PageHeader, PasswordInput, type ShowToastOption, cn, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin, useDeviceInfo };
|
|
500
|
+
export { AdminProvider, Button, type ButtonProps, Field, FieldBody, FieldsContainer, Form, Input, type InputProps, MainFields, PageHeader, PasswordInput, type ShowToastOption, SideFields, cn, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin, useDeviceInfo };
|
package/dist/client/index.js
CHANGED
|
@@ -243,6 +243,8 @@ function createAdminInitializer({
|
|
|
243
243
|
|
|
244
244
|
// src/client/interfaces/styles/constants.ts
|
|
245
245
|
var PAGE_HEADER_HEIGHT = 56;
|
|
246
|
+
var FORM_SIDE_FIELDS_WIDTH = 320;
|
|
247
|
+
var FORM_MIDDLE_GAP_WIDTH = 24;
|
|
246
248
|
function PageHeaderTitle({
|
|
247
249
|
icon,
|
|
248
250
|
title,
|
|
@@ -683,6 +685,52 @@ function FieldBody({
|
|
|
683
685
|
}
|
|
684
686
|
);
|
|
685
687
|
}
|
|
688
|
+
function FieldsContainer({
|
|
689
|
+
className = "",
|
|
690
|
+
children,
|
|
691
|
+
...props
|
|
692
|
+
}) {
|
|
693
|
+
return /* @__PURE__ */ jsx(
|
|
694
|
+
"div",
|
|
695
|
+
{
|
|
696
|
+
className: cn("relative flex w-full", className),
|
|
697
|
+
style: { gap: FORM_MIDDLE_GAP_WIDTH },
|
|
698
|
+
...props,
|
|
699
|
+
children
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
function MainFields({
|
|
704
|
+
className,
|
|
705
|
+
children,
|
|
706
|
+
...props
|
|
707
|
+
}) {
|
|
708
|
+
const sideWidth = FORM_SIDE_FIELDS_WIDTH + FORM_MIDDLE_GAP_WIDTH;
|
|
709
|
+
return /* @__PURE__ */ jsx(
|
|
710
|
+
"div",
|
|
711
|
+
{
|
|
712
|
+
className: cn("relative", "flex flex-1 flex-col gap-6", className),
|
|
713
|
+
style: { maxWidth: `calc(100% - ${sideWidth}px)` },
|
|
714
|
+
...props,
|
|
715
|
+
children
|
|
716
|
+
}
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
function SideFields({
|
|
720
|
+
className,
|
|
721
|
+
children,
|
|
722
|
+
...props
|
|
723
|
+
}) {
|
|
724
|
+
return /* @__PURE__ */ jsx(
|
|
725
|
+
"div",
|
|
726
|
+
{
|
|
727
|
+
className: cn("relative", "min-h-full", className),
|
|
728
|
+
style: { width: `${FORM_SIDE_FIELDS_WIDTH}px` },
|
|
729
|
+
...props,
|
|
730
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("sticky top-24", "flex flex-col gap-6"), children })
|
|
731
|
+
}
|
|
732
|
+
);
|
|
733
|
+
}
|
|
686
734
|
function PasswordInput({ ...props }) {
|
|
687
735
|
const [showPassword, setShowPassword] = useState(false);
|
|
688
736
|
return /* @__PURE__ */ jsx(Input, { type: showPassword ? "text" : "password", ...props, children: /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx(
|
|
@@ -1173,4 +1221,4 @@ function createChangePasswordPage({
|
|
|
1173
1221
|
};
|
|
1174
1222
|
}
|
|
1175
1223
|
|
|
1176
|
-
export { AdminProvider, Button2 as Button, Field, FieldBody, Form, Input, PageHeader, PasswordInput, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin };
|
|
1224
|
+
export { AdminProvider, Button2 as Button, Field, FieldBody, FieldsContainer, Form, Input, MainFields, PageHeader, PasswordInput, SideFields, createAdminInitializer, createChangePasswordPage, createEmailUnverifiedPage, createForgotPasswordPage, createRequestInterceptor, createResetPasswordPage, createResponseInterceptor, createSignInPage, createSmartFetch, createUseCommand, createUseQuery, createVerifyEmailPage, handleToast, useAdmin };
|