react-better-html 1.1.259 → 1.1.261
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 +1 -0
- package/dist/index.d.ts +1 -0
- 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
|
@@ -802,6 +802,7 @@ type FormProps = {
|
|
|
802
802
|
renderActionButtons?: React.ReactNode;
|
|
803
803
|
onClickCancel?: () => void;
|
|
804
804
|
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
805
|
+
id?: React.ComponentProps<"form">["id"];
|
|
805
806
|
children?: React.ReactNode;
|
|
806
807
|
} & ComponentMarginProps;
|
|
807
808
|
type FormComponentType = {
|
package/dist/index.d.ts
CHANGED
|
@@ -802,6 +802,7 @@ type FormProps = {
|
|
|
802
802
|
renderActionButtons?: React.ReactNode;
|
|
803
803
|
onClickCancel?: () => void;
|
|
804
804
|
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
805
|
+
id?: React.ComponentProps<"form">["id"];
|
|
805
806
|
children?: React.ReactNode;
|
|
806
807
|
} & ComponentMarginProps;
|
|
807
808
|
type FormComponentType = {
|
package/dist/index.js
CHANGED
|
@@ -5989,6 +5989,7 @@ var FormComponent = (0, import_react23.forwardRef)(function Form({
|
|
|
5989
5989
|
renderActionButtons,
|
|
5990
5990
|
onClickCancel,
|
|
5991
5991
|
onSubmit,
|
|
5992
|
+
id,
|
|
5992
5993
|
children,
|
|
5993
5994
|
...props
|
|
5994
5995
|
}, ref) {
|
|
@@ -6001,7 +6002,7 @@ var FormComponent = (0, import_react23.forwardRef)(function Form({
|
|
|
6001
6002
|
}, [form]);
|
|
6002
6003
|
const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
|
|
6003
6004
|
const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
|
|
6004
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", { name, onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
|
|
6005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", { name, onSubmit: onSubmit ?? form?.onSubmit, id, ref, children: [
|
|
6005
6006
|
gap !== void 0 || withDividers ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? import_react23.Children.toArray(children).map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react23.Fragment, { children: [
|
|
6006
6007
|
child,
|
|
6007
6008
|
index < import_react23.Children.toArray(children).length - 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -7973,10 +7974,10 @@ var MenuItemComponent = (0, import_react31.memo)(function MenuItemComponent2({
|
|
|
7973
7974
|
const isActive2 = location.pathname === "/" ? location.pathname === item.href : location.pathname.startsWith(item.href) && item.href !== "/";
|
|
7974
7975
|
if (!isActive2) return;
|
|
7975
7976
|
setActiveItem(
|
|
7976
|
-
(oldValue) => item.href
|
|
7977
|
+
(oldValue) => item.href && item.href !== oldValue?.href ? {
|
|
7977
7978
|
href: item.href,
|
|
7978
7979
|
length: item.href.length
|
|
7979
|
-
} :
|
|
7980
|
+
} : oldValue
|
|
7980
7981
|
);
|
|
7981
7982
|
}, [location.pathname]);
|
|
7982
7983
|
(0, import_react31.useEffect)(() => {
|