react-better-html 1.1.94 → 1.1.95
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 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -551,11 +551,13 @@ type FormProps = {
|
|
|
551
551
|
isSubmitting?: boolean;
|
|
552
552
|
/** @default false */
|
|
553
553
|
isDestructive?: boolean;
|
|
554
|
+
/** @default false */
|
|
555
|
+
withDividers?: boolean;
|
|
554
556
|
onClickCancel?: () => void;
|
|
555
557
|
onSubmit?: (value: React.FormEvent<HTMLFormElement>) => void;
|
|
556
558
|
children?: React.ReactNode;
|
|
557
559
|
} & ComponentMarginProps;
|
|
558
|
-
declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
|
|
560
|
+
declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, withDividers, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
|
|
559
561
|
declare const _default$2: react.MemoExoticComponent<typeof Form>;
|
|
560
562
|
|
|
561
563
|
type LabelProps = {
|
package/dist/index.d.ts
CHANGED
|
@@ -551,11 +551,13 @@ type FormProps = {
|
|
|
551
551
|
isSubmitting?: boolean;
|
|
552
552
|
/** @default false */
|
|
553
553
|
isDestructive?: boolean;
|
|
554
|
+
/** @default false */
|
|
555
|
+
withDividers?: boolean;
|
|
554
556
|
onClickCancel?: () => void;
|
|
555
557
|
onSubmit?: (value: React.FormEvent<HTMLFormElement>) => void;
|
|
556
558
|
children?: React.ReactNode;
|
|
557
559
|
} & ComponentMarginProps;
|
|
558
|
-
declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
|
|
560
|
+
declare function Form({ form, submitButtonText, submitButtonLoaderName, submitButtonId, submitButtonIsDisabled, actionButtonsLocation, gap, isSubmitting, isDestructive, withDividers, onClickCancel, onSubmit, children, ...props }: FormProps): react_jsx_runtime.JSX.Element;
|
|
559
561
|
declare const _default$2: react.MemoExoticComponent<typeof Form>;
|
|
560
562
|
|
|
561
563
|
type LabelProps = {
|
package/dist/index.js
CHANGED
|
@@ -6573,6 +6573,7 @@ function Form({
|
|
|
6573
6573
|
gap,
|
|
6574
6574
|
isSubmitting,
|
|
6575
6575
|
isDestructive,
|
|
6576
|
+
withDividers,
|
|
6576
6577
|
onClickCancel,
|
|
6577
6578
|
onSubmit,
|
|
6578
6579
|
children,
|
|
@@ -6588,7 +6589,10 @@ function Form({
|
|
|
6588
6589
|
const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
|
|
6589
6590
|
const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
|
|
6590
6591
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("form", { onSubmit: onSubmit ?? form?.onSubmit, children: [
|
|
6591
|
-
gap !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Div_default.column, { gap, children
|
|
6592
|
+
gap !== void 0 || withDividers ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? import_react20.Children.toArray(children).map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react20.Fragment, { children: [
|
|
6593
|
+
child,
|
|
6594
|
+
index < import_react20.Children.toArray(children).length - 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Divider_default.horizontal, {})
|
|
6595
|
+
] }, index)) : children }) : children,
|
|
6592
6596
|
submitButtonText && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
6593
6597
|
Div_default.row,
|
|
6594
6598
|
{
|