react-better-html 1.1.101 → 1.1.103
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 +30 -13
- package/dist/index.d.ts +30 -13
- package/dist/index.js +104 -83
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +151 -130
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -152,7 +152,7 @@ type IconProps = {
|
|
|
152
152
|
type IconComponent = {
|
|
153
153
|
(props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
|
|
154
154
|
};
|
|
155
|
-
declare const _default$
|
|
155
|
+
declare const _default$5: IconComponent;
|
|
156
156
|
|
|
157
157
|
type AssetName = "logo";
|
|
158
158
|
type AssetsConfig = Record<AssetName, string> & {
|
|
@@ -172,7 +172,7 @@ type ImageComponent = {
|
|
|
172
172
|
}>) => React.ReactElement;
|
|
173
173
|
};
|
|
174
174
|
declare const Image: ImageComponent;
|
|
175
|
-
declare const _default$
|
|
175
|
+
declare const _default$4: ImageComponent & {
|
|
176
176
|
profileImage: typeof Image.profileImage;
|
|
177
177
|
};
|
|
178
178
|
|
|
@@ -255,9 +255,13 @@ type HorizontalDividerProps = DividerProps & {
|
|
|
255
255
|
/** @default textSecondary */
|
|
256
256
|
textColor?: string;
|
|
257
257
|
};
|
|
258
|
-
|
|
259
|
-
vertical:
|
|
260
|
-
horizontal:
|
|
258
|
+
type DividerComponentType = {
|
|
259
|
+
vertical: (props: ComponentPropWithRef<HTMLDivElement, VerticalDividerProps>) => React.ReactElement;
|
|
260
|
+
horizontal: (props: ComponentPropWithRef<HTMLDivElement, HorizontalDividerProps>) => React.ReactElement;
|
|
261
|
+
};
|
|
262
|
+
declare const _default$3: {
|
|
263
|
+
vertical: DividerComponentType["vertical"];
|
|
264
|
+
horizontal: DividerComponentType["horizontal"];
|
|
261
265
|
};
|
|
262
266
|
|
|
263
267
|
type ModalProps = {
|
|
@@ -306,10 +310,17 @@ declare const Modal: typeof ModalComponent & {
|
|
|
306
310
|
type PageHolderProps = {
|
|
307
311
|
/** @default false */
|
|
308
312
|
noMaxContentWidth?: boolean;
|
|
313
|
+
backgroundColor?: string;
|
|
309
314
|
children?: React.ReactNode;
|
|
310
315
|
} & ComponentPaddingProps;
|
|
311
|
-
|
|
312
|
-
|
|
316
|
+
type PageHolderComponentType = {
|
|
317
|
+
(props: ComponentPropWithRef<HTMLDivElement, PageHolderProps>): React.ReactElement;
|
|
318
|
+
center: (props: ComponentPropWithRef<HTMLDivElement, PageHolderProps>) => React.ReactElement;
|
|
319
|
+
};
|
|
320
|
+
declare const PageHolderComponent: PageHolderComponentType;
|
|
321
|
+
declare const PageHolder: typeof PageHolderComponent & {
|
|
322
|
+
center: typeof PageHolderComponent.center;
|
|
323
|
+
};
|
|
313
324
|
|
|
314
325
|
type PageHeaderProps = {
|
|
315
326
|
imageUrl?: string;
|
|
@@ -323,8 +334,11 @@ type PageHeaderProps = {
|
|
|
323
334
|
/** @default false */
|
|
324
335
|
lightMode?: boolean;
|
|
325
336
|
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
326
|
-
|
|
327
|
-
|
|
337
|
+
type PageHeaderComponentType = {
|
|
338
|
+
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
339
|
+
};
|
|
340
|
+
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
341
|
+
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
328
342
|
|
|
329
343
|
type ChipProps = {
|
|
330
344
|
text: string;
|
|
@@ -466,7 +480,7 @@ type InternalToggleInputProps<Value> = {
|
|
|
466
480
|
} & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange"> & ComponentStyle & ComponentHoverStyle;
|
|
467
481
|
type ToggleInputProps<Value> = ComponentPropWithRef<ToggleInputRef, OmitProps<InternalToggleInputProps<Value>, "type">>;
|
|
468
482
|
type ToggleInputComponentType = <Value>(props: ToggleInputProps<Value>) => React.ReactElement;
|
|
469
|
-
declare const _default$
|
|
483
|
+
declare const _default$2: {
|
|
470
484
|
checkbox: ToggleInputComponentType;
|
|
471
485
|
radiobutton: ToggleInputComponentType;
|
|
472
486
|
switch: ToggleInputComponentType;
|
|
@@ -557,8 +571,11 @@ type FormProps = {
|
|
|
557
571
|
onSubmit?: (value: React.FormEvent<HTMLFormElement>) => void;
|
|
558
572
|
children?: React.ReactNode;
|
|
559
573
|
} & ComponentMarginProps;
|
|
560
|
-
|
|
561
|
-
|
|
574
|
+
type FormComponentType = {
|
|
575
|
+
(props: ComponentPropWithRef<HTMLFormElement, FormProps>): React.ReactElement;
|
|
576
|
+
};
|
|
577
|
+
declare const FormComponent: FormComponentType;
|
|
578
|
+
declare const Form: typeof FormComponent & {};
|
|
562
579
|
|
|
563
580
|
type LabelProps = {
|
|
564
581
|
text?: string;
|
|
@@ -790,4 +807,4 @@ declare const isMobileDevice: boolean;
|
|
|
790
807
|
|
|
791
808
|
declare const reactRouterDomPlugin: BetterHtmlPlugin;
|
|
792
809
|
|
|
793
|
-
export { type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type DeepPartialRecord, Div, type DivProps, _default$
|
|
810
|
+
export { type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type Styles, type TabGroup, Table, type TableColumn, type TableProps, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, type VerticalDividerProps, darkenColor, desaturateColor, formatPhoneNumber, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, reactRouterDomPlugin, saturateColor, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ type IconProps = {
|
|
|
152
152
|
type IconComponent = {
|
|
153
153
|
(props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
|
|
154
154
|
};
|
|
155
|
-
declare const _default$
|
|
155
|
+
declare const _default$5: IconComponent;
|
|
156
156
|
|
|
157
157
|
type AssetName = "logo";
|
|
158
158
|
type AssetsConfig = Record<AssetName, string> & {
|
|
@@ -172,7 +172,7 @@ type ImageComponent = {
|
|
|
172
172
|
}>) => React.ReactElement;
|
|
173
173
|
};
|
|
174
174
|
declare const Image: ImageComponent;
|
|
175
|
-
declare const _default$
|
|
175
|
+
declare const _default$4: ImageComponent & {
|
|
176
176
|
profileImage: typeof Image.profileImage;
|
|
177
177
|
};
|
|
178
178
|
|
|
@@ -255,9 +255,13 @@ type HorizontalDividerProps = DividerProps & {
|
|
|
255
255
|
/** @default textSecondary */
|
|
256
256
|
textColor?: string;
|
|
257
257
|
};
|
|
258
|
-
|
|
259
|
-
vertical:
|
|
260
|
-
horizontal:
|
|
258
|
+
type DividerComponentType = {
|
|
259
|
+
vertical: (props: ComponentPropWithRef<HTMLDivElement, VerticalDividerProps>) => React.ReactElement;
|
|
260
|
+
horizontal: (props: ComponentPropWithRef<HTMLDivElement, HorizontalDividerProps>) => React.ReactElement;
|
|
261
|
+
};
|
|
262
|
+
declare const _default$3: {
|
|
263
|
+
vertical: DividerComponentType["vertical"];
|
|
264
|
+
horizontal: DividerComponentType["horizontal"];
|
|
261
265
|
};
|
|
262
266
|
|
|
263
267
|
type ModalProps = {
|
|
@@ -306,10 +310,17 @@ declare const Modal: typeof ModalComponent & {
|
|
|
306
310
|
type PageHolderProps = {
|
|
307
311
|
/** @default false */
|
|
308
312
|
noMaxContentWidth?: boolean;
|
|
313
|
+
backgroundColor?: string;
|
|
309
314
|
children?: React.ReactNode;
|
|
310
315
|
} & ComponentPaddingProps;
|
|
311
|
-
|
|
312
|
-
|
|
316
|
+
type PageHolderComponentType = {
|
|
317
|
+
(props: ComponentPropWithRef<HTMLDivElement, PageHolderProps>): React.ReactElement;
|
|
318
|
+
center: (props: ComponentPropWithRef<HTMLDivElement, PageHolderProps>) => React.ReactElement;
|
|
319
|
+
};
|
|
320
|
+
declare const PageHolderComponent: PageHolderComponentType;
|
|
321
|
+
declare const PageHolder: typeof PageHolderComponent & {
|
|
322
|
+
center: typeof PageHolderComponent.center;
|
|
323
|
+
};
|
|
313
324
|
|
|
314
325
|
type PageHeaderProps = {
|
|
315
326
|
imageUrl?: string;
|
|
@@ -323,8 +334,11 @@ type PageHeaderProps = {
|
|
|
323
334
|
/** @default false */
|
|
324
335
|
lightMode?: boolean;
|
|
325
336
|
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
326
|
-
|
|
327
|
-
|
|
337
|
+
type PageHeaderComponentType = {
|
|
338
|
+
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
339
|
+
};
|
|
340
|
+
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
341
|
+
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
328
342
|
|
|
329
343
|
type ChipProps = {
|
|
330
344
|
text: string;
|
|
@@ -466,7 +480,7 @@ type InternalToggleInputProps<Value> = {
|
|
|
466
480
|
} & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange"> & ComponentStyle & ComponentHoverStyle;
|
|
467
481
|
type ToggleInputProps<Value> = ComponentPropWithRef<ToggleInputRef, OmitProps<InternalToggleInputProps<Value>, "type">>;
|
|
468
482
|
type ToggleInputComponentType = <Value>(props: ToggleInputProps<Value>) => React.ReactElement;
|
|
469
|
-
declare const _default$
|
|
483
|
+
declare const _default$2: {
|
|
470
484
|
checkbox: ToggleInputComponentType;
|
|
471
485
|
radiobutton: ToggleInputComponentType;
|
|
472
486
|
switch: ToggleInputComponentType;
|
|
@@ -557,8 +571,11 @@ type FormProps = {
|
|
|
557
571
|
onSubmit?: (value: React.FormEvent<HTMLFormElement>) => void;
|
|
558
572
|
children?: React.ReactNode;
|
|
559
573
|
} & ComponentMarginProps;
|
|
560
|
-
|
|
561
|
-
|
|
574
|
+
type FormComponentType = {
|
|
575
|
+
(props: ComponentPropWithRef<HTMLFormElement, FormProps>): React.ReactElement;
|
|
576
|
+
};
|
|
577
|
+
declare const FormComponent: FormComponentType;
|
|
578
|
+
declare const Form: typeof FormComponent & {};
|
|
562
579
|
|
|
563
580
|
type LabelProps = {
|
|
564
581
|
text?: string;
|
|
@@ -790,4 +807,4 @@ declare const isMobileDevice: boolean;
|
|
|
790
807
|
|
|
791
808
|
declare const reactRouterDomPlugin: BetterHtmlPlugin;
|
|
792
809
|
|
|
793
|
-
export { type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type DeepPartialRecord, Div, type DivProps, _default$
|
|
810
|
+
export { type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type Styles, type TabGroup, Table, type TableColumn, type TableProps, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, type VerticalDividerProps, darkenColor, desaturateColor, formatPhoneNumber, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, reactRouterDomPlugin, saturateColor, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
package/dist/index.js
CHANGED
|
@@ -2833,33 +2833,32 @@ var Button_default = Button2;
|
|
|
2833
2833
|
var import_react10 = require("react");
|
|
2834
2834
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2835
2835
|
var Divider_default = {
|
|
2836
|
-
vertical: (0, import_react10.memo)(
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
textColor,
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
})
|
|
2836
|
+
vertical: (0, import_react10.memo)(
|
|
2837
|
+
(0, import_react10.forwardRef)(function Divider({ width = 1, backgroundColor, height, ...props }, ref) {
|
|
2838
|
+
const theme2 = useTheme();
|
|
2839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2840
|
+
Div_default,
|
|
2841
|
+
{
|
|
2842
|
+
width,
|
|
2843
|
+
height: height ?? "100%",
|
|
2844
|
+
flexShrink: 0,
|
|
2845
|
+
backgroundColor: backgroundColor ?? theme2.colors.border,
|
|
2846
|
+
...props,
|
|
2847
|
+
ref
|
|
2848
|
+
}
|
|
2849
|
+
);
|
|
2850
|
+
})
|
|
2851
|
+
),
|
|
2852
|
+
horizontal: (0, import_react10.memo)(
|
|
2853
|
+
(0, import_react10.forwardRef)(function Divider2({ width = 1, backgroundColor, text, textColor, ...props }, ref) {
|
|
2854
|
+
const theme2 = useTheme();
|
|
2855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Div_default.row, { width: "100%", alignItems: "center", gap: text ? theme2.styles.space : void 0, ...props, ref, children: [
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border }),
|
|
2857
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { color: textColor ?? theme2.colors.textSecondary, children: text }),
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border })
|
|
2859
|
+
] });
|
|
2860
|
+
})
|
|
2861
|
+
)
|
|
2863
2862
|
};
|
|
2864
2863
|
|
|
2865
2864
|
// src/components/Modal.tsx
|
|
@@ -3131,7 +3130,7 @@ var Modal_default = Modal2;
|
|
|
3131
3130
|
// src/components/PageHolder.tsx
|
|
3132
3131
|
var import_react12 = require("react");
|
|
3133
3132
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
3134
|
-
function PageHolder({ noMaxContentWidth, children, ...props }) {
|
|
3133
|
+
var PageHolderComponent = (0, import_react12.forwardRef)(function PageHolder({ noMaxContentWidth, backgroundColor, children, ...props }, ref) {
|
|
3135
3134
|
const theme2 = useTheme();
|
|
3136
3135
|
const { app } = useBetterHtmlContextInternal();
|
|
3137
3136
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
@@ -3140,19 +3139,26 @@ function PageHolder({ noMaxContentWidth, children, ...props }) {
|
|
|
3140
3139
|
as: "main",
|
|
3141
3140
|
width: "100%",
|
|
3142
3141
|
maxWidth: !noMaxContentWidth ? app.contentMaxWidth : void 0,
|
|
3142
|
+
backgroundColor,
|
|
3143
3143
|
margin: "0px auto",
|
|
3144
3144
|
padding: theme2.styles.space,
|
|
3145
3145
|
...props,
|
|
3146
|
+
ref,
|
|
3146
3147
|
children
|
|
3147
3148
|
}
|
|
3148
3149
|
);
|
|
3149
|
-
}
|
|
3150
|
-
|
|
3150
|
+
});
|
|
3151
|
+
PageHolderComponent.center = (0, import_react12.forwardRef)(function Center(props, ref) {
|
|
3152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, {});
|
|
3153
|
+
});
|
|
3154
|
+
var PageHolder2 = (0, import_react12.memo)(PageHolderComponent);
|
|
3155
|
+
PageHolder2.center = PageHolderComponent.center;
|
|
3156
|
+
var PageHolder_default = PageHolder2;
|
|
3151
3157
|
|
|
3152
3158
|
// src/components/PageHeader.tsx
|
|
3153
3159
|
var import_react13 = require("react");
|
|
3154
3160
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3155
|
-
function PageHeader({
|
|
3161
|
+
var PageHeaderComponent = (0, import_react13.forwardRef)(function PageHeader({
|
|
3156
3162
|
imageUrl,
|
|
3157
3163
|
imageSize = 60,
|
|
3158
3164
|
title,
|
|
@@ -3163,56 +3169,66 @@ function PageHeader({
|
|
|
3163
3169
|
rightElement,
|
|
3164
3170
|
lightMode,
|
|
3165
3171
|
marginBottom
|
|
3166
|
-
}) {
|
|
3172
|
+
}, ref) {
|
|
3167
3173
|
const theme2 = useTheme();
|
|
3168
3174
|
const { app } = useBetterHtmlContextInternal();
|
|
3169
3175
|
const mediaQuery = useMediaQuery();
|
|
3170
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3177
|
+
Div_default.row,
|
|
3178
|
+
{
|
|
3179
|
+
alignItems: "center",
|
|
3180
|
+
gap: theme2.styles.space,
|
|
3181
|
+
marginBottom: marginBottom ?? theme2.styles.space * 2,
|
|
3182
|
+
ref,
|
|
3183
|
+
children: [
|
|
3184
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
|
|
3185
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3186
|
+
Div_default.column,
|
|
3187
|
+
{
|
|
3188
|
+
alignItems: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3189
|
+
flex: 1,
|
|
3190
|
+
gap: theme2.styles.gap / 2,
|
|
3191
|
+
children: [
|
|
3192
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3193
|
+
Div_default.row,
|
|
3194
|
+
{
|
|
3195
|
+
alignItems: "center",
|
|
3196
|
+
justifyContent: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3197
|
+
gap: theme2.styles.space,
|
|
3198
|
+
children: [
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3200
|
+
Text_default,
|
|
3201
|
+
{
|
|
3202
|
+
as: titleAs ?? "h1",
|
|
3203
|
+
textAlign,
|
|
3204
|
+
color: lightMode ? theme2.colors.base : theme2.colors.textPrimary,
|
|
3205
|
+
children: title
|
|
3206
|
+
}
|
|
3207
|
+
),
|
|
3208
|
+
titleRightElement
|
|
3209
|
+
]
|
|
3210
|
+
}
|
|
3211
|
+
),
|
|
3212
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3213
|
+
Text_default,
|
|
3214
|
+
{
|
|
3215
|
+
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
3216
|
+
textAlign,
|
|
3217
|
+
color: lightMode ? theme2.colors.base : theme2.colors.textSecondary,
|
|
3218
|
+
opacity: lightMode ? 0.7 : void 0,
|
|
3219
|
+
children: description
|
|
3220
|
+
}
|
|
3221
|
+
)
|
|
3222
|
+
]
|
|
3223
|
+
}
|
|
3224
|
+
),
|
|
3225
|
+
rightElement
|
|
3226
|
+
]
|
|
3227
|
+
}
|
|
3228
|
+
);
|
|
3229
|
+
});
|
|
3230
|
+
var PageHeader2 = (0, import_react13.memo)(PageHeaderComponent);
|
|
3231
|
+
var PageHeader_default = PageHeader2;
|
|
3216
3232
|
|
|
3217
3233
|
// src/components/Chip.tsx
|
|
3218
3234
|
var import_react14 = require("react");
|
|
@@ -5919,6 +5935,7 @@ InputFieldComponent.phoneNumber = (0, import_react18.forwardRef)(function PhoneN
|
|
|
5919
5935
|
inputFieldClassName: "react-better-html-phone-number-holder",
|
|
5920
5936
|
defaultValue,
|
|
5921
5937
|
value: dropdownValue,
|
|
5938
|
+
disabled: props.disabled,
|
|
5922
5939
|
onChange: setDropdownValue,
|
|
5923
5940
|
withoutClearButton: true
|
|
5924
5941
|
}
|
|
@@ -6241,6 +6258,9 @@ InputFieldComponent.color = (0, import_react18.forwardRef)(function Color2({ val
|
|
|
6241
6258
|
},
|
|
6242
6259
|
[onChangeValue]
|
|
6243
6260
|
);
|
|
6261
|
+
(0, import_react18.useEffect)(() => {
|
|
6262
|
+
setInputFieldValue(value);
|
|
6263
|
+
}, [value]);
|
|
6244
6264
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6245
6265
|
InputFieldComponent,
|
|
6246
6266
|
{
|
|
@@ -6567,7 +6587,7 @@ var ToggleInput_default = {
|
|
|
6567
6587
|
// src/components/Form.tsx
|
|
6568
6588
|
var import_react20 = require("react");
|
|
6569
6589
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
6570
|
-
function Form({
|
|
6590
|
+
var FormComponent = (0, import_react20.forwardRef)(function Form({
|
|
6571
6591
|
form,
|
|
6572
6592
|
submitButtonText,
|
|
6573
6593
|
submitButtonLoaderName,
|
|
@@ -6582,7 +6602,7 @@ function Form({
|
|
|
6582
6602
|
onSubmit,
|
|
6583
6603
|
children,
|
|
6584
6604
|
...props
|
|
6585
|
-
}) {
|
|
6605
|
+
}, ref) {
|
|
6586
6606
|
const theme2 = useTheme();
|
|
6587
6607
|
const submitButtonIsDisabledInternal = (0, import_react20.useMemo)(() => {
|
|
6588
6608
|
if (!form || !form.requiredFields) return false;
|
|
@@ -6592,7 +6612,7 @@ function Form({
|
|
|
6592
6612
|
}, [form]);
|
|
6593
6613
|
const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
|
|
6594
6614
|
const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
|
|
6595
|
-
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: [
|
|
6615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("form", { onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
|
|
6596
6616
|
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: [
|
|
6597
6617
|
child,
|
|
6598
6618
|
index < import_react20.Children.toArray(children).length - 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Divider_default.horizontal, {})
|
|
@@ -6621,8 +6641,9 @@ function Form({
|
|
|
6621
6641
|
}
|
|
6622
6642
|
)
|
|
6623
6643
|
] }) });
|
|
6624
|
-
}
|
|
6625
|
-
var
|
|
6644
|
+
});
|
|
6645
|
+
var Form2 = (0, import_react20.memo)(FormComponent);
|
|
6646
|
+
var Form_default = Form2;
|
|
6626
6647
|
|
|
6627
6648
|
// src/components/FormRow.tsx
|
|
6628
6649
|
var import_react21 = require("react");
|