react-better-html 1.1.139 → 1.1.141

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.mjs CHANGED
@@ -2348,6 +2348,7 @@ function AlertsHolder() {
2348
2348
  gap: theme2.styles.gap,
2349
2349
  alignItems: pluginConfig.align === "center" ? "center" : pluginConfig.align === "right" ? "flex-end" : void 0,
2350
2350
  transform: pluginConfig.align === "center" ? "translateX(-50%)" : void 0,
2351
+ zIndex: 1e3,
2351
2352
  children: alerts.map((alert) => /* @__PURE__ */ jsx7(Alert_default, { alert }, alert.id))
2352
2353
  }
2353
2354
  );
@@ -7121,10 +7122,10 @@ var Form_default = Form2;
7121
7122
  // src/components/FormRow.tsx
7122
7123
  import { forwardRef as forwardRef14, memo as memo20 } from "react";
7123
7124
  import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
7124
- var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPoint, gap, children, ...props }, ref) {
7125
+ var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPoint, asColumn, gap, children, ...props }, ref) {
7125
7126
  const theme2 = useTheme();
7126
7127
  const mediaQuery = useMediaQuery();
7127
- const breakingPoint = !noBreakingPoint ? mediaQuery.size900 : false;
7128
+ const breakingPoint = asColumn ?? (!noBreakingPoint ? mediaQuery.size900 : false);
7128
7129
  const readyGap = breakingPoint || noBreakingPoint && mediaQuery.size900 ? theme2.styles.gap : theme2.styles.space * 2;
7129
7130
  return /* @__PURE__ */ jsxs15(Div_default.row, { alignItems: "center", gap: gap ?? readyGap, invertFlexDirection: breakingPoint, ...props, ref, children: [
7130
7131
  children,
@@ -7135,6 +7136,7 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
7135
7136
  icon,
7136
7137
  title,
7137
7138
  description,
7139
+ isLoading,
7138
7140
  withActions,
7139
7141
  saveButtonLoaderName,
7140
7142
  resetButtonLoaderName,
@@ -7146,20 +7148,43 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
7146
7148
  const theme2 = useTheme();
7147
7149
  const mediaQuery = useMediaQuery();
7148
7150
  return /* @__PURE__ */ jsxs15(FormRowComponent, { ...props, ref, children: [
7149
- /* @__PURE__ */ jsxs15(Div_default.row, { width: "100%", alignItems: "center", gap: theme2.styles.space, children: [
7150
- icon && /* @__PURE__ */ jsx20(Icon_default, { name: icon }),
7151
- /* @__PURE__ */ jsxs15(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
7152
- /* @__PURE__ */ jsx20(Text_default, { as: "h3", children: title }),
7153
- description && /* @__PURE__ */ jsx20(Text_default, { color: theme2.colors.textSecondary, children: description })
7154
- ] })
7155
- ] }),
7156
7151
  /* @__PURE__ */ jsxs15(
7157
7152
  Div_default.row,
7158
7153
  {
7154
+ width: "100%",
7155
+ alignItems: "center",
7156
+ gap: theme2.styles.space,
7157
+ paddingRight: isLoading ? 26 : void 0,
7158
+ transition: theme2.styles.transition,
7159
+ children: [
7160
+ icon && /* @__PURE__ */ jsx20(Icon_default, { name: icon }),
7161
+ /* @__PURE__ */ jsxs15(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
7162
+ /* @__PURE__ */ jsx20(Text_default, { as: "h3", children: title }),
7163
+ description && /* @__PURE__ */ jsx20(Text_default, { color: theme2.colors.textSecondary, children: description })
7164
+ ] })
7165
+ ]
7166
+ }
7167
+ ),
7168
+ /* @__PURE__ */ jsxs15(
7169
+ Div_default.row,
7170
+ {
7171
+ position: "relative",
7159
7172
  width: props.noBreakingPoint && mediaQuery.size900 ? void 0 : "100%",
7160
7173
  alignItems: "center",
7161
7174
  gap: theme2.styles.gap,
7162
7175
  children: [
7176
+ /* @__PURE__ */ jsx20(
7177
+ Div_default,
7178
+ {
7179
+ position: "absolute",
7180
+ top: "50%",
7181
+ right: `calc(100% + ${theme2.styles.space}px)`,
7182
+ transform: "translateY(-50%)",
7183
+ opacity: !isLoading ? 0 : void 0,
7184
+ pointerEvents: !isLoading ? "none" : void 0,
7185
+ children: /* @__PURE__ */ jsx20(Loader_default, {})
7186
+ }
7187
+ ),
7163
7188
  children,
7164
7189
  withActions && /* @__PURE__ */ jsxs15(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
7165
7190
  onClickReset && /* @__PURE__ */ jsx20(Button_default.icon, { icon: "XMark", loaderName: resetButtonLoaderName, onClick: onClickReset }),
@@ -8692,6 +8717,18 @@ var FoldableComponent = forwardRef18(function Foldable({
8692
8717
  clearTimeout(timeout);
8693
8718
  };
8694
8719
  }, [isOpen]);
8720
+ useEffect13(() => {
8721
+ if (!isOpen) return;
8722
+ if (!bodyRef.current) return;
8723
+ const observer = new ResizeObserver(() => {
8724
+ if (!bodyRef.current) return;
8725
+ setBodyVirtualHeight(bodyRef.current.scrollHeight * 2);
8726
+ });
8727
+ observer.observe(bodyRef.current);
8728
+ return () => {
8729
+ observer.disconnect();
8730
+ };
8731
+ }, [isOpen]);
8695
8732
  useImperativeHandle5(
8696
8733
  ref,
8697
8734
  () => {