react-better-html 1.1.244 → 1.1.245
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 -22
- package/dist/index.d.ts +30 -22
- package/dist/index.js +42 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -416,6 +416,24 @@ type LabelProps = {
|
|
|
416
416
|
declare function Label(labelProps: LabelProps): react_jsx_runtime.JSX.Element;
|
|
417
417
|
declare const _default$3: react.MemoExoticComponent<typeof Label>;
|
|
418
418
|
|
|
419
|
+
type ImageProps = {
|
|
420
|
+
name?: AssetName | AnyOtherString;
|
|
421
|
+
} & OmitProps<React.ComponentProps<"img">, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
422
|
+
type ImageComponent = {
|
|
423
|
+
(props: ComponentPropWithRef<HTMLImageElement, ImageProps>): React.ReactElement;
|
|
424
|
+
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
425
|
+
/** @default 40 */
|
|
426
|
+
size?: number;
|
|
427
|
+
letters?: string;
|
|
428
|
+
letterColor?: string;
|
|
429
|
+
backgroundColor?: string;
|
|
430
|
+
}>) => React.ReactElement;
|
|
431
|
+
};
|
|
432
|
+
declare const Image: ImageComponent;
|
|
433
|
+
declare const _default$2: ImageComponent & {
|
|
434
|
+
profileImage: typeof Image.profileImage;
|
|
435
|
+
};
|
|
436
|
+
|
|
419
437
|
type ComponentStyleConfig<ComponentProps, Subcomponents extends string> = {
|
|
420
438
|
[key in Subcomponents]?: Partial<ComponentProps>;
|
|
421
439
|
};
|
|
@@ -452,6 +470,9 @@ type BetterHtmlConfig = {
|
|
|
452
470
|
horizontal?: HorizontalDividerProps;
|
|
453
471
|
};
|
|
454
472
|
};
|
|
473
|
+
image?: {
|
|
474
|
+
style?: ComponentStyleConfig<ImageProps, "default" | "profileImage">;
|
|
475
|
+
};
|
|
455
476
|
sideMenu?: {
|
|
456
477
|
/** @default 300 */
|
|
457
478
|
width?: number;
|
|
@@ -521,7 +542,7 @@ type BetterHtmlProviderProps = BetterProviderCommonProps & {
|
|
|
521
542
|
config?: BetterHtmlProviderConfig;
|
|
522
543
|
};
|
|
523
544
|
declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react_jsx_runtime.JSX.Element;
|
|
524
|
-
declare const _default$
|
|
545
|
+
declare const _default$1: react.MemoExoticComponent<typeof BetterHtmlProvider>;
|
|
525
546
|
|
|
526
547
|
declare const isMobileDevice: boolean;
|
|
527
548
|
|
|
@@ -652,25 +673,7 @@ type IconProps = {
|
|
|
652
673
|
type IconComponent = {
|
|
653
674
|
(props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
|
|
654
675
|
};
|
|
655
|
-
declare const _default
|
|
656
|
-
|
|
657
|
-
type ImageProps = {
|
|
658
|
-
name?: AssetName | AnyOtherString;
|
|
659
|
-
} & OmitProps<React.ComponentProps<"img">, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
660
|
-
type ImageComponent = {
|
|
661
|
-
(props: ComponentPropWithRef<HTMLImageElement, ImageProps>): React.ReactElement;
|
|
662
|
-
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
663
|
-
/** @default 40 */
|
|
664
|
-
size?: number;
|
|
665
|
-
letters?: string;
|
|
666
|
-
letterColor?: string;
|
|
667
|
-
backgroundColor?: string;
|
|
668
|
-
}>) => React.ReactElement;
|
|
669
|
-
};
|
|
670
|
-
declare const Image: ImageComponent;
|
|
671
|
-
declare const _default: ImageComponent & {
|
|
672
|
-
profileImage: typeof Image.profileImage;
|
|
673
|
-
};
|
|
676
|
+
declare const _default: IconComponent;
|
|
674
677
|
|
|
675
678
|
type ModalProps = {
|
|
676
679
|
/**
|
|
@@ -1099,12 +1102,17 @@ type SideMenuProps = {
|
|
|
1099
1102
|
type SideMenuComponentType = {
|
|
1100
1103
|
(props: SideMenuProps): React.ReactElement;
|
|
1101
1104
|
pageHolder: (props: SideMenuPageHolderProps) => React.ReactElement;
|
|
1102
|
-
burgerButton: () => React.ReactElement;
|
|
1105
|
+
burgerButton: (props: BurgerButtonProps) => React.ReactElement;
|
|
1103
1106
|
};
|
|
1104
1107
|
declare const SideMenuComponent: SideMenuComponentType;
|
|
1105
1108
|
type SideMenuPageHolderProps = PageHolderProps & {
|
|
1106
1109
|
outsideComponent?: React.ReactNode;
|
|
1107
1110
|
};
|
|
1111
|
+
type BurgerButtonProps = {
|
|
1112
|
+
/** @default "left" */
|
|
1113
|
+
position?: "left" | "center" | "right";
|
|
1114
|
+
onClick?: (isOpened: boolean) => void;
|
|
1115
|
+
};
|
|
1108
1116
|
declare const SideMenu: typeof SideMenuComponent & {
|
|
1109
1117
|
pageHolder: typeof SideMenuComponent.pageHolder;
|
|
1110
1118
|
burgerButton: typeof SideMenuComponent.burgerButton;
|
|
@@ -1169,4 +1177,4 @@ type LocalStoragePluginOptions = {
|
|
|
1169
1177
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1170
1178
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1171
1179
|
|
|
1172
|
-
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$
|
|
1180
|
+
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$1 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, type BurgerButtonProps, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$4 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default$3 as Label, type LabelProps, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type SideMenuProps, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$5 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -416,6 +416,24 @@ type LabelProps = {
|
|
|
416
416
|
declare function Label(labelProps: LabelProps): react_jsx_runtime.JSX.Element;
|
|
417
417
|
declare const _default$3: react.MemoExoticComponent<typeof Label>;
|
|
418
418
|
|
|
419
|
+
type ImageProps = {
|
|
420
|
+
name?: AssetName | AnyOtherString;
|
|
421
|
+
} & OmitProps<React.ComponentProps<"img">, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
422
|
+
type ImageComponent = {
|
|
423
|
+
(props: ComponentPropWithRef<HTMLImageElement, ImageProps>): React.ReactElement;
|
|
424
|
+
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
425
|
+
/** @default 40 */
|
|
426
|
+
size?: number;
|
|
427
|
+
letters?: string;
|
|
428
|
+
letterColor?: string;
|
|
429
|
+
backgroundColor?: string;
|
|
430
|
+
}>) => React.ReactElement;
|
|
431
|
+
};
|
|
432
|
+
declare const Image: ImageComponent;
|
|
433
|
+
declare const _default$2: ImageComponent & {
|
|
434
|
+
profileImage: typeof Image.profileImage;
|
|
435
|
+
};
|
|
436
|
+
|
|
419
437
|
type ComponentStyleConfig<ComponentProps, Subcomponents extends string> = {
|
|
420
438
|
[key in Subcomponents]?: Partial<ComponentProps>;
|
|
421
439
|
};
|
|
@@ -452,6 +470,9 @@ type BetterHtmlConfig = {
|
|
|
452
470
|
horizontal?: HorizontalDividerProps;
|
|
453
471
|
};
|
|
454
472
|
};
|
|
473
|
+
image?: {
|
|
474
|
+
style?: ComponentStyleConfig<ImageProps, "default" | "profileImage">;
|
|
475
|
+
};
|
|
455
476
|
sideMenu?: {
|
|
456
477
|
/** @default 300 */
|
|
457
478
|
width?: number;
|
|
@@ -521,7 +542,7 @@ type BetterHtmlProviderProps = BetterProviderCommonProps & {
|
|
|
521
542
|
config?: BetterHtmlProviderConfig;
|
|
522
543
|
};
|
|
523
544
|
declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react_jsx_runtime.JSX.Element;
|
|
524
|
-
declare const _default$
|
|
545
|
+
declare const _default$1: react.MemoExoticComponent<typeof BetterHtmlProvider>;
|
|
525
546
|
|
|
526
547
|
declare const isMobileDevice: boolean;
|
|
527
548
|
|
|
@@ -652,25 +673,7 @@ type IconProps = {
|
|
|
652
673
|
type IconComponent = {
|
|
653
674
|
(props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
|
|
654
675
|
};
|
|
655
|
-
declare const _default
|
|
656
|
-
|
|
657
|
-
type ImageProps = {
|
|
658
|
-
name?: AssetName | AnyOtherString;
|
|
659
|
-
} & OmitProps<React.ComponentProps<"img">, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
660
|
-
type ImageComponent = {
|
|
661
|
-
(props: ComponentPropWithRef<HTMLImageElement, ImageProps>): React.ReactElement;
|
|
662
|
-
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
663
|
-
/** @default 40 */
|
|
664
|
-
size?: number;
|
|
665
|
-
letters?: string;
|
|
666
|
-
letterColor?: string;
|
|
667
|
-
backgroundColor?: string;
|
|
668
|
-
}>) => React.ReactElement;
|
|
669
|
-
};
|
|
670
|
-
declare const Image: ImageComponent;
|
|
671
|
-
declare const _default: ImageComponent & {
|
|
672
|
-
profileImage: typeof Image.profileImage;
|
|
673
|
-
};
|
|
676
|
+
declare const _default: IconComponent;
|
|
674
677
|
|
|
675
678
|
type ModalProps = {
|
|
676
679
|
/**
|
|
@@ -1099,12 +1102,17 @@ type SideMenuProps = {
|
|
|
1099
1102
|
type SideMenuComponentType = {
|
|
1100
1103
|
(props: SideMenuProps): React.ReactElement;
|
|
1101
1104
|
pageHolder: (props: SideMenuPageHolderProps) => React.ReactElement;
|
|
1102
|
-
burgerButton: () => React.ReactElement;
|
|
1105
|
+
burgerButton: (props: BurgerButtonProps) => React.ReactElement;
|
|
1103
1106
|
};
|
|
1104
1107
|
declare const SideMenuComponent: SideMenuComponentType;
|
|
1105
1108
|
type SideMenuPageHolderProps = PageHolderProps & {
|
|
1106
1109
|
outsideComponent?: React.ReactNode;
|
|
1107
1110
|
};
|
|
1111
|
+
type BurgerButtonProps = {
|
|
1112
|
+
/** @default "left" */
|
|
1113
|
+
position?: "left" | "center" | "right";
|
|
1114
|
+
onClick?: (isOpened: boolean) => void;
|
|
1115
|
+
};
|
|
1108
1116
|
declare const SideMenu: typeof SideMenuComponent & {
|
|
1109
1117
|
pageHolder: typeof SideMenuComponent.pageHolder;
|
|
1110
1118
|
burgerButton: typeof SideMenuComponent.burgerButton;
|
|
@@ -1169,4 +1177,4 @@ type LocalStoragePluginOptions = {
|
|
|
1169
1177
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1170
1178
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1171
1179
|
|
|
1172
|
-
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$
|
|
1180
|
+
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$1 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, type BurgerButtonProps, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$4 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default$3 as Label, type LabelProps, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type SideMenuProps, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$5 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
|
package/dist/index.js
CHANGED
|
@@ -1379,6 +1379,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
1379
1379
|
var TextStyledComponent = import_styled_components.default.p.withConfig({
|
|
1380
1380
|
shouldForwardProp: (prop) => !["style", "hoverStyle"].includes(prop)
|
|
1381
1381
|
})`
|
|
1382
|
+
font-size: ${(props) => props.theme.styles.fontSize}px;
|
|
1383
|
+
|
|
1382
1384
|
${(props) => props.style}
|
|
1383
1385
|
|
|
1384
1386
|
&:hover {
|
|
@@ -1386,6 +1388,7 @@ var TextStyledComponent = import_styled_components.default.p.withConfig({
|
|
|
1386
1388
|
}
|
|
1387
1389
|
`;
|
|
1388
1390
|
var TextComponent = (0, import_react2.forwardRef)(function Text({ htmlContentTranslate, children, ...props }, ref) {
|
|
1391
|
+
const theme2 = (0, import_react_better_core2.useTheme)();
|
|
1389
1392
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
1390
1393
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
1391
1394
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
@@ -1393,6 +1396,7 @@ var TextComponent = (0, import_react2.forwardRef)(function Text({ htmlContentTra
|
|
|
1393
1396
|
TextStyledComponent,
|
|
1394
1397
|
{
|
|
1395
1398
|
as: props.as,
|
|
1399
|
+
theme: theme2,
|
|
1396
1400
|
translate: htmlContentTranslate,
|
|
1397
1401
|
style,
|
|
1398
1402
|
hoverStyle,
|
|
@@ -1500,7 +1504,12 @@ var ImageElement = import_styled_components2.default.img.withConfig({
|
|
|
1500
1504
|
${(props) => props.hoverStyle}
|
|
1501
1505
|
}
|
|
1502
1506
|
`;
|
|
1503
|
-
var Image = (0, import_react4.forwardRef)(function Image2(
|
|
1507
|
+
var Image = (0, import_react4.forwardRef)(function Image2(ImageProps3, ref) {
|
|
1508
|
+
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
1509
|
+
const { name, src, ...props } = useComponentsPropsMerger(
|
|
1510
|
+
betterHtmlContextInternal.components.image?.style?.default,
|
|
1511
|
+
ImageProps3
|
|
1512
|
+
);
|
|
1504
1513
|
const { assets: assets2 } = (0, import_react_better_core4.useBetterCoreContext)();
|
|
1505
1514
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
1506
1515
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
@@ -1525,7 +1534,9 @@ var Image = (0, import_react4.forwardRef)(function Image2({ name, src, ...props
|
|
|
1525
1534
|
}
|
|
1526
1535
|
);
|
|
1527
1536
|
});
|
|
1528
|
-
Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size = 40, letters, letterColor, backgroundColor, ...
|
|
1537
|
+
Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size = 40, letters, letterColor, backgroundColor, ...ImageProps3 }, ref) {
|
|
1538
|
+
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
1539
|
+
const props = useComponentsPropsMerger(betterHtmlContextInternal.components.image?.style?.default, ImageProps3);
|
|
1529
1540
|
const theme2 = (0, import_react_better_core4.useTheme)();
|
|
1530
1541
|
return letters ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1531
1542
|
Div_default.row,
|
|
@@ -2112,8 +2123,8 @@ var ButtonElement = import_styled_components6.default.button.withConfig({
|
|
|
2112
2123
|
width: fit-content;
|
|
2113
2124
|
min-width: max-content;
|
|
2114
2125
|
font-family: ${(props) => props.theme.styles.fontFamily};
|
|
2115
|
-
font-size:
|
|
2116
|
-
line-height:
|
|
2126
|
+
font-size: ${(props) => props.theme.styles.fontSize}px;
|
|
2127
|
+
line-height: ${(props) => props.theme.styles.fontSize + 4}px;
|
|
2117
2128
|
text-decoration: none;
|
|
2118
2129
|
color: ${(props) => props.theme.colors.base};
|
|
2119
2130
|
background-color: ${(props) => props.theme.colors.primary};
|
|
@@ -2204,7 +2215,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2204
2215
|
const iconComponent = icon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2205
2216
|
Div_default.row,
|
|
2206
2217
|
{
|
|
2207
|
-
height: iconSize ?? parseInt(style.fontSize?.toString() ??
|
|
2218
|
+
height: iconSize ?? parseInt(style.fontSize?.toString() ?? theme2.styles.fontSize.toString()),
|
|
2208
2219
|
alignItems: "center",
|
|
2209
2220
|
justifyContent: "center",
|
|
2210
2221
|
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -2212,7 +2223,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2212
2223
|
{
|
|
2213
2224
|
name: icon,
|
|
2214
2225
|
color: iconColor ?? props.color ?? theme2.colors.base,
|
|
2215
|
-
size: iconSize ?? parseInt(style.fontSize?.toString() ??
|
|
2226
|
+
size: iconSize ?? parseInt(style.fontSize?.toString() ?? theme2.styles.fontSize.toString())
|
|
2216
2227
|
}
|
|
2217
2228
|
)
|
|
2218
2229
|
}
|
|
@@ -2222,7 +2233,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2222
2233
|
{
|
|
2223
2234
|
name: image,
|
|
2224
2235
|
color: iconColor ?? props.color ?? theme2.colors.base,
|
|
2225
|
-
width: imageWidth ?? parseInt(style.fontSize?.toString() ??
|
|
2236
|
+
width: imageWidth ?? parseInt(style.fontSize?.toString() ?? theme2.styles.fontSize.toString()),
|
|
2226
2237
|
height: imageHeight
|
|
2227
2238
|
}
|
|
2228
2239
|
) : void 0;
|
|
@@ -3007,7 +3018,7 @@ function Alert2({ alert }) {
|
|
|
3007
3018
|
),
|
|
3008
3019
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
3009
3020
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { fontSize: 18, fontWeight: 700, children: alertTitle }),
|
|
3010
|
-
alert.message && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
|
|
3021
|
+
alert.message && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { fontSize: theme2.styles.fontSize, color: theme2.colors.textSecondary, children: alert.message })
|
|
3011
3022
|
] }),
|
|
3012
3023
|
pluginConfig.withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
|
|
3013
3024
|
] }),
|
|
@@ -4310,8 +4321,8 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
4310
4321
|
position: relative;
|
|
4311
4322
|
width: 100%;
|
|
4312
4323
|
font-family: ${(props) => props.theme.styles.fontFamily};
|
|
4313
|
-
font-size:
|
|
4314
|
-
line-height:
|
|
4324
|
+
font-size: ${(props) => props.theme.styles.fontSize}px;
|
|
4325
|
+
line-height: ${(props) => props.theme.styles.fontSize + 4}px;
|
|
4315
4326
|
color: ${(props) => props.theme.colors.textPrimary};
|
|
4316
4327
|
background: ${(props) => props.theme.colors.backgroundContent};
|
|
4317
4328
|
border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
|
|
@@ -4437,8 +4448,8 @@ var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
|
4437
4448
|
min-height: 3lh;
|
|
4438
4449
|
max-height: 8lh;
|
|
4439
4450
|
font-family: ${(props) => props.theme.styles.fontFamily};
|
|
4440
|
-
font-size:
|
|
4441
|
-
line-height:
|
|
4451
|
+
font-size: ${(props) => props.theme.styles.fontSize}px;
|
|
4452
|
+
line-height: ${(props) => props.theme.styles.fontSize + 4}px;
|
|
4442
4453
|
color: ${(props) => props.theme.colors.textPrimary};
|
|
4443
4454
|
background: ${(props) => props.theme.colors.backgroundContent};
|
|
4444
4455
|
border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
|
|
@@ -5706,7 +5717,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5706
5717
|
onClick: onClickText,
|
|
5707
5718
|
children: [
|
|
5708
5719
|
text,
|
|
5709
|
-
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize:
|
|
5720
|
+
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize: theme2.styles.fontSize, color: theme2.colors.error, children: [
|
|
5710
5721
|
" ",
|
|
5711
5722
|
"*"
|
|
5712
5723
|
] })
|
|
@@ -5714,7 +5725,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5714
5725
|
}
|
|
5715
5726
|
) : textAdvanced ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Div_default.row, { userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
|
|
5716
5727
|
textAdvanced,
|
|
5717
|
-
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize:
|
|
5728
|
+
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize: theme2.styles.fontSize, color: theme2.colors.error, marginLeft: 4, children: [
|
|
5718
5729
|
" ",
|
|
5719
5730
|
"*"
|
|
5720
5731
|
] })
|
|
@@ -5975,12 +5986,12 @@ FormRowComponent.withTitle = (0, import_react24.forwardRef)(function WithTitle({
|
|
|
5975
5986
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
5976
5987
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text_default, { as: titleAs, fontSize: titleFontSize, children: [
|
|
5977
5988
|
title,
|
|
5978
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text_default, { as: "span", fontSize:
|
|
5989
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text_default, { as: "span", fontSize: theme2.styles.fontSize, color: theme2.colors.error, children: [
|
|
5979
5990
|
" ",
|
|
5980
5991
|
"*"
|
|
5981
5992
|
] })
|
|
5982
5993
|
] }),
|
|
5983
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { fontSize: descriptionFontSize, color: theme2.colors.textSecondary, children: description })
|
|
5994
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { fontSize: descriptionFontSize ?? theme2.styles.fontSize, color: theme2.colors.textSecondary, children: description })
|
|
5984
5995
|
] }),
|
|
5985
5996
|
isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Div_default, { width: 26 - titleGap })
|
|
5986
5997
|
] }),
|
|
@@ -8183,10 +8194,14 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({ outsideComponent, .
|
|
|
8183
8194
|
}
|
|
8184
8195
|
);
|
|
8185
8196
|
};
|
|
8186
|
-
SideMenuComponent.burgerButton = function BurgerButton() {
|
|
8197
|
+
SideMenuComponent.burgerButton = function BurgerButton({ position = "left", onClick }) {
|
|
8187
8198
|
const theme2 = (0, import_react_better_core29.useTheme)();
|
|
8188
8199
|
const { sideMenuIsOpenMobile, setSideMenuIsOpenMobile } = useBetterHtmlContextInternal();
|
|
8189
8200
|
const [isHovered, setIsHovered] = (0, import_react_better_core29.useBooleanState)();
|
|
8201
|
+
const onClickElement = (0, import_react31.useCallback)(() => {
|
|
8202
|
+
setSideMenuIsOpenMobile.toggle();
|
|
8203
|
+
onClick?.(!sideMenuIsOpenMobile);
|
|
8204
|
+
}, [onClick, sideMenuIsOpenMobile]);
|
|
8190
8205
|
const width = 2;
|
|
8191
8206
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
8192
8207
|
Div_default,
|
|
@@ -8198,7 +8213,7 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8198
8213
|
onMouseOver: setIsHovered.setTrue,
|
|
8199
8214
|
onMouseLeave: setIsHovered.setFalse,
|
|
8200
8215
|
onMouseOut: setIsHovered.setFalse,
|
|
8201
|
-
onClick:
|
|
8216
|
+
onClick: onClickElement,
|
|
8202
8217
|
children: [
|
|
8203
8218
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
8204
8219
|
Div_default,
|
|
@@ -8207,10 +8222,11 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8207
8222
|
width: isHovered || sideMenuIsOpenMobile ? "100%" : "50%",
|
|
8208
8223
|
height: width,
|
|
8209
8224
|
top: sideMenuIsOpenMobile ? `calc(50% - ${width / 2}px)` : 0,
|
|
8210
|
-
left: 0,
|
|
8225
|
+
left: position === "left" ? 0 : position === "center" ? sideMenuIsOpenMobile ? 0 : "50%" : "auto",
|
|
8226
|
+
right: position === "right" ? 0 : void 0,
|
|
8211
8227
|
backgroundColor: theme2.colors.border,
|
|
8212
8228
|
borderRadius: 999,
|
|
8213
|
-
transform: sideMenuIsOpenMobile ? "rotate(45deg)" : void 0,
|
|
8229
|
+
transform: sideMenuIsOpenMobile ? "rotate(45deg)" : position === "center" ? "translateX(-50%)" : void 0,
|
|
8214
8230
|
transition: theme2.styles.transition
|
|
8215
8231
|
}
|
|
8216
8232
|
),
|
|
@@ -8221,10 +8237,11 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8221
8237
|
width: isHovered ? "100%" : "100%",
|
|
8222
8238
|
height: width,
|
|
8223
8239
|
top: "50%",
|
|
8224
|
-
left: 0,
|
|
8240
|
+
left: position === "left" ? 0 : position === "center" ? "50%" : "auto",
|
|
8241
|
+
right: position === "right" ? 0 : void 0,
|
|
8225
8242
|
backgroundColor: theme2.colors.border,
|
|
8226
8243
|
borderRadius: 999,
|
|
8227
|
-
transform:
|
|
8244
|
+
transform: `translateY(-50%)${position === "center" ? " translateX(-50%)" : ""}`,
|
|
8228
8245
|
opacity: sideMenuIsOpenMobile ? 0 : void 0,
|
|
8229
8246
|
transition: theme2.styles.transition
|
|
8230
8247
|
}
|
|
@@ -8236,10 +8253,11 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8236
8253
|
width: isHovered || sideMenuIsOpenMobile ? "100%" : "75%",
|
|
8237
8254
|
height: width,
|
|
8238
8255
|
bottom: sideMenuIsOpenMobile ? `calc(50% - ${width / 2}px)` : 0,
|
|
8239
|
-
left: 0,
|
|
8256
|
+
left: position === "left" ? 0 : position === "center" ? sideMenuIsOpenMobile ? 0 : "50%" : "auto",
|
|
8257
|
+
right: position === "right" ? 0 : void 0,
|
|
8240
8258
|
backgroundColor: theme2.colors.border,
|
|
8241
8259
|
borderRadius: 999,
|
|
8242
|
-
transform: sideMenuIsOpenMobile ? "rotate(-45deg)" : void 0,
|
|
8260
|
+
transform: sideMenuIsOpenMobile ? "rotate(-45deg)" : position === "center" ? "translateX(-50%)" : void 0,
|
|
8243
8261
|
transition: theme2.styles.transition
|
|
8244
8262
|
}
|
|
8245
8263
|
)
|