react-better-html 1.1.140 → 1.1.142
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 +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
);
|
|
@@ -6902,7 +6903,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
6902
6903
|
onChange?.(newIsChecked, value);
|
|
6903
6904
|
}, [checked, controlledChecked, onChange, value]);
|
|
6904
6905
|
const readyId = id ?? internalId;
|
|
6905
|
-
return /* @__PURE__ */ jsxs13(Div_default.column, {
|
|
6906
|
+
return /* @__PURE__ */ jsxs13(Div_default.column, { gap: theme2.styles.gap, ...styledComponentStylesWithExcluded, children: [
|
|
6906
6907
|
label && /* @__PURE__ */ jsx18(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
6907
6908
|
/* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
6908
6909
|
/* @__PURE__ */ jsxs13(Div_default.row, { position: "relative", alignItems: "center", children: [
|
|
@@ -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,
|
|
@@ -7145,21 +7147,36 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
7145
7147
|
}, ref) {
|
|
7146
7148
|
const theme2 = useTheme();
|
|
7147
7149
|
const mediaQuery = useMediaQuery();
|
|
7150
|
+
const titleGap = theme2.styles.space;
|
|
7148
7151
|
return /* @__PURE__ */ jsxs15(FormRowComponent, { ...props, ref, children: [
|
|
7149
|
-
/* @__PURE__ */ jsxs15(Div_default.row, { width: "100%", alignItems: "center", gap:
|
|
7152
|
+
/* @__PURE__ */ jsxs15(Div_default.row, { width: "100%", alignItems: "center", gap: titleGap, children: [
|
|
7150
7153
|
icon && /* @__PURE__ */ jsx20(Icon_default, { name: icon }),
|
|
7151
7154
|
/* @__PURE__ */ jsxs15(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
7152
7155
|
/* @__PURE__ */ jsx20(Text_default, { as: "h3", children: title }),
|
|
7153
7156
|
description && /* @__PURE__ */ jsx20(Text_default, { color: theme2.colors.textSecondary, children: description })
|
|
7154
|
-
] })
|
|
7157
|
+
] }),
|
|
7158
|
+
isLoading && /* @__PURE__ */ jsx20(Div_default, { width: 26 - titleGap })
|
|
7155
7159
|
] }),
|
|
7156
7160
|
/* @__PURE__ */ jsxs15(
|
|
7157
7161
|
Div_default.row,
|
|
7158
7162
|
{
|
|
7163
|
+
position: "relative",
|
|
7159
7164
|
width: props.noBreakingPoint && mediaQuery.size900 ? void 0 : "100%",
|
|
7160
7165
|
alignItems: "center",
|
|
7161
7166
|
gap: theme2.styles.gap,
|
|
7162
7167
|
children: [
|
|
7168
|
+
/* @__PURE__ */ jsx20(
|
|
7169
|
+
Div_default,
|
|
7170
|
+
{
|
|
7171
|
+
position: "absolute",
|
|
7172
|
+
top: "50%",
|
|
7173
|
+
right: `calc(100% + ${theme2.styles.space}px)`,
|
|
7174
|
+
transform: "translateY(-50%)",
|
|
7175
|
+
opacity: !isLoading ? 0 : void 0,
|
|
7176
|
+
pointerEvents: !isLoading ? "none" : void 0,
|
|
7177
|
+
children: /* @__PURE__ */ jsx20(Loader_default, {})
|
|
7178
|
+
}
|
|
7179
|
+
),
|
|
7163
7180
|
children,
|
|
7164
7181
|
withActions && /* @__PURE__ */ jsxs15(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
7165
7182
|
onClickReset && /* @__PURE__ */ jsx20(Button_default.icon, { icon: "XMark", loaderName: resetButtonLoaderName, onClick: onClickReset }),
|