react-better-html 1.1.155 → 1.1.156
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/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -523,6 +523,7 @@ declare function usePageScroll(): {
|
|
|
523
523
|
scrollY: number;
|
|
524
524
|
};
|
|
525
525
|
declare function useMediaQuery(): {
|
|
526
|
+
screenWidth: number;
|
|
526
527
|
size320: boolean;
|
|
527
528
|
size400: boolean;
|
|
528
529
|
size500: boolean;
|
|
@@ -584,6 +585,7 @@ type FormProps = {
|
|
|
584
585
|
form?: OmitProps<ReturnType<typeof useForm>, "focusField">;
|
|
585
586
|
submitButtonText?: string;
|
|
586
587
|
submitButtonLoaderName?: LoaderName | AnyOtherString;
|
|
588
|
+
submitButtonIsLoading?: boolean;
|
|
587
589
|
submitButtonId?: string;
|
|
588
590
|
/** @default false */
|
|
589
591
|
submitButtonIsDisabled?: boolean;
|
|
@@ -592,14 +594,12 @@ type FormProps = {
|
|
|
592
594
|
actionButtonsLocation?: "left" | "center" | "right";
|
|
593
595
|
gap?: React.CSSProperties["gap"];
|
|
594
596
|
/** @default false */
|
|
595
|
-
isSubmitting?: boolean;
|
|
596
|
-
/** @default false */
|
|
597
597
|
isDestructive?: boolean;
|
|
598
598
|
/** @default false */
|
|
599
599
|
withDividers?: boolean;
|
|
600
600
|
renderActionButtons?: React.ReactNode;
|
|
601
601
|
onClickCancel?: () => void;
|
|
602
|
-
onSubmit?: (
|
|
602
|
+
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
603
603
|
children?: React.ReactNode;
|
|
604
604
|
} & ComponentMarginProps;
|
|
605
605
|
type FormComponentType = {
|
package/dist/index.d.ts
CHANGED
|
@@ -523,6 +523,7 @@ declare function usePageScroll(): {
|
|
|
523
523
|
scrollY: number;
|
|
524
524
|
};
|
|
525
525
|
declare function useMediaQuery(): {
|
|
526
|
+
screenWidth: number;
|
|
526
527
|
size320: boolean;
|
|
527
528
|
size400: boolean;
|
|
528
529
|
size500: boolean;
|
|
@@ -584,6 +585,7 @@ type FormProps = {
|
|
|
584
585
|
form?: OmitProps<ReturnType<typeof useForm>, "focusField">;
|
|
585
586
|
submitButtonText?: string;
|
|
586
587
|
submitButtonLoaderName?: LoaderName | AnyOtherString;
|
|
588
|
+
submitButtonIsLoading?: boolean;
|
|
587
589
|
submitButtonId?: string;
|
|
588
590
|
/** @default false */
|
|
589
591
|
submitButtonIsDisabled?: boolean;
|
|
@@ -592,14 +594,12 @@ type FormProps = {
|
|
|
592
594
|
actionButtonsLocation?: "left" | "center" | "right";
|
|
593
595
|
gap?: React.CSSProperties["gap"];
|
|
594
596
|
/** @default false */
|
|
595
|
-
isSubmitting?: boolean;
|
|
596
|
-
/** @default false */
|
|
597
597
|
isDestructive?: boolean;
|
|
598
598
|
/** @default false */
|
|
599
599
|
withDividers?: boolean;
|
|
600
600
|
renderActionButtons?: React.ReactNode;
|
|
601
601
|
onClickCancel?: () => void;
|
|
602
|
-
onSubmit?: (
|
|
602
|
+
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
603
603
|
children?: React.ReactNode;
|
|
604
604
|
} & ComponentMarginProps;
|
|
605
605
|
type FormComponentType = {
|
package/dist/index.js
CHANGED
|
@@ -2864,6 +2864,7 @@ function usePageScroll() {
|
|
|
2864
2864
|
function useMediaQuery() {
|
|
2865
2865
|
const { width } = usePageResize();
|
|
2866
2866
|
return {
|
|
2867
|
+
screenWidth: width,
|
|
2867
2868
|
size320: width <= 320,
|
|
2868
2869
|
size400: width <= 400,
|
|
2869
2870
|
size500: width <= 500,
|
|
@@ -3704,7 +3705,7 @@ var PageHeaderComponent = (0, import_react15.forwardRef)(function PageHeader({
|
|
|
3704
3705
|
{
|
|
3705
3706
|
alignItems: "center",
|
|
3706
3707
|
gap: theme2.styles.space,
|
|
3707
|
-
marginBottom: marginBottom
|
|
3708
|
+
marginBottom: marginBottom ?? theme2.styles.space * 2,
|
|
3708
3709
|
ref,
|
|
3709
3710
|
children: [
|
|
3710
3711
|
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
|
|
@@ -7247,12 +7248,12 @@ var FormComponent = (0, import_react22.forwardRef)(function Form({
|
|
|
7247
7248
|
form,
|
|
7248
7249
|
submitButtonText,
|
|
7249
7250
|
submitButtonLoaderName,
|
|
7251
|
+
submitButtonIsLoading,
|
|
7250
7252
|
submitButtonId,
|
|
7251
7253
|
submitButtonIsDisabled,
|
|
7252
7254
|
cancelButtonText,
|
|
7253
7255
|
actionButtonsLocation = "right",
|
|
7254
7256
|
gap,
|
|
7255
|
-
isSubmitting,
|
|
7256
7257
|
isDestructive,
|
|
7257
7258
|
withDividers,
|
|
7258
7259
|
renderActionButtons,
|
|
@@ -7289,7 +7290,7 @@ var FormComponent = (0, import_react22.forwardRef)(function Form({
|
|
|
7289
7290
|
SubmitButtonTag,
|
|
7290
7291
|
{
|
|
7291
7292
|
text: submitButtonText,
|
|
7292
|
-
isLoading:
|
|
7293
|
+
isLoading: submitButtonIsLoading || form?.isSubmitting,
|
|
7293
7294
|
loaderName: submitButtonLoaderName,
|
|
7294
7295
|
disabled: submitButtonIsDisabledFinal,
|
|
7295
7296
|
id: submitButtonId,
|