react-better-html 1.1.244 → 1.1.246
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 +32 -22
- package/dist/index.d.ts +32 -22
- package/dist/index.js +52 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -186,10 +186,12 @@ type PageHeaderProps = {
|
|
|
186
186
|
title?: string | React.ReactNode;
|
|
187
187
|
/** @default "h1" */
|
|
188
188
|
titleAs?: TextAs;
|
|
189
|
+
titleFontSize?: React.CSSProperties["fontSize"];
|
|
189
190
|
/** @default textPrimary */
|
|
190
191
|
titleColor?: React.CSSProperties["color"];
|
|
191
192
|
titleRightElement?: React.ReactNode;
|
|
192
193
|
description?: string | React.ReactNode;
|
|
194
|
+
descriptionFontSize?: React.CSSProperties["fontSize"];
|
|
193
195
|
/** @default textSecondary */
|
|
194
196
|
descriptionColor?: React.CSSProperties["color"];
|
|
195
197
|
textAlign?: React.CSSProperties["textAlign"];
|
|
@@ -416,6 +418,24 @@ type LabelProps = {
|
|
|
416
418
|
declare function Label(labelProps: LabelProps): react_jsx_runtime.JSX.Element;
|
|
417
419
|
declare const _default$3: react.MemoExoticComponent<typeof Label>;
|
|
418
420
|
|
|
421
|
+
type ImageProps = {
|
|
422
|
+
name?: AssetName | AnyOtherString;
|
|
423
|
+
} & OmitProps<React.ComponentProps<"img">, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
424
|
+
type ImageComponent = {
|
|
425
|
+
(props: ComponentPropWithRef<HTMLImageElement, ImageProps>): React.ReactElement;
|
|
426
|
+
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
427
|
+
/** @default 40 */
|
|
428
|
+
size?: number;
|
|
429
|
+
letters?: string;
|
|
430
|
+
letterColor?: string;
|
|
431
|
+
backgroundColor?: string;
|
|
432
|
+
}>) => React.ReactElement;
|
|
433
|
+
};
|
|
434
|
+
declare const Image: ImageComponent;
|
|
435
|
+
declare const _default$2: ImageComponent & {
|
|
436
|
+
profileImage: typeof Image.profileImage;
|
|
437
|
+
};
|
|
438
|
+
|
|
419
439
|
type ComponentStyleConfig<ComponentProps, Subcomponents extends string> = {
|
|
420
440
|
[key in Subcomponents]?: Partial<ComponentProps>;
|
|
421
441
|
};
|
|
@@ -452,6 +472,9 @@ type BetterHtmlConfig = {
|
|
|
452
472
|
horizontal?: HorizontalDividerProps;
|
|
453
473
|
};
|
|
454
474
|
};
|
|
475
|
+
image?: {
|
|
476
|
+
style?: ComponentStyleConfig<ImageProps, "default" | "profileImage">;
|
|
477
|
+
};
|
|
455
478
|
sideMenu?: {
|
|
456
479
|
/** @default 300 */
|
|
457
480
|
width?: number;
|
|
@@ -521,7 +544,7 @@ type BetterHtmlProviderProps = BetterProviderCommonProps & {
|
|
|
521
544
|
config?: BetterHtmlProviderConfig;
|
|
522
545
|
};
|
|
523
546
|
declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react_jsx_runtime.JSX.Element;
|
|
524
|
-
declare const _default$
|
|
547
|
+
declare const _default$1: react.MemoExoticComponent<typeof BetterHtmlProvider>;
|
|
525
548
|
|
|
526
549
|
declare const isMobileDevice: boolean;
|
|
527
550
|
|
|
@@ -652,25 +675,7 @@ type IconProps = {
|
|
|
652
675
|
type IconComponent = {
|
|
653
676
|
(props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
|
|
654
677
|
};
|
|
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
|
-
};
|
|
678
|
+
declare const _default: IconComponent;
|
|
674
679
|
|
|
675
680
|
type ModalProps = {
|
|
676
681
|
/**
|
|
@@ -1099,12 +1104,17 @@ type SideMenuProps = {
|
|
|
1099
1104
|
type SideMenuComponentType = {
|
|
1100
1105
|
(props: SideMenuProps): React.ReactElement;
|
|
1101
1106
|
pageHolder: (props: SideMenuPageHolderProps) => React.ReactElement;
|
|
1102
|
-
burgerButton: () => React.ReactElement;
|
|
1107
|
+
burgerButton: (props: BurgerButtonProps) => React.ReactElement;
|
|
1103
1108
|
};
|
|
1104
1109
|
declare const SideMenuComponent: SideMenuComponentType;
|
|
1105
1110
|
type SideMenuPageHolderProps = PageHolderProps & {
|
|
1106
1111
|
outsideComponent?: React.ReactNode;
|
|
1107
1112
|
};
|
|
1113
|
+
type BurgerButtonProps = {
|
|
1114
|
+
/** @default "left" */
|
|
1115
|
+
position?: "left" | "center" | "right";
|
|
1116
|
+
onClick?: (isOpened: boolean) => void;
|
|
1117
|
+
};
|
|
1108
1118
|
declare const SideMenu: typeof SideMenuComponent & {
|
|
1109
1119
|
pageHolder: typeof SideMenuComponent.pageHolder;
|
|
1110
1120
|
burgerButton: typeof SideMenuComponent.burgerButton;
|
|
@@ -1169,4 +1179,4 @@ type LocalStoragePluginOptions = {
|
|
|
1169
1179
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1170
1180
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1171
1181
|
|
|
1172
|
-
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$
|
|
1182
|
+
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
|
@@ -186,10 +186,12 @@ type PageHeaderProps = {
|
|
|
186
186
|
title?: string | React.ReactNode;
|
|
187
187
|
/** @default "h1" */
|
|
188
188
|
titleAs?: TextAs;
|
|
189
|
+
titleFontSize?: React.CSSProperties["fontSize"];
|
|
189
190
|
/** @default textPrimary */
|
|
190
191
|
titleColor?: React.CSSProperties["color"];
|
|
191
192
|
titleRightElement?: React.ReactNode;
|
|
192
193
|
description?: string | React.ReactNode;
|
|
194
|
+
descriptionFontSize?: React.CSSProperties["fontSize"];
|
|
193
195
|
/** @default textSecondary */
|
|
194
196
|
descriptionColor?: React.CSSProperties["color"];
|
|
195
197
|
textAlign?: React.CSSProperties["textAlign"];
|
|
@@ -416,6 +418,24 @@ type LabelProps = {
|
|
|
416
418
|
declare function Label(labelProps: LabelProps): react_jsx_runtime.JSX.Element;
|
|
417
419
|
declare const _default$3: react.MemoExoticComponent<typeof Label>;
|
|
418
420
|
|
|
421
|
+
type ImageProps = {
|
|
422
|
+
name?: AssetName | AnyOtherString;
|
|
423
|
+
} & OmitProps<React.ComponentProps<"img">, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
424
|
+
type ImageComponent = {
|
|
425
|
+
(props: ComponentPropWithRef<HTMLImageElement, ImageProps>): React.ReactElement;
|
|
426
|
+
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
427
|
+
/** @default 40 */
|
|
428
|
+
size?: number;
|
|
429
|
+
letters?: string;
|
|
430
|
+
letterColor?: string;
|
|
431
|
+
backgroundColor?: string;
|
|
432
|
+
}>) => React.ReactElement;
|
|
433
|
+
};
|
|
434
|
+
declare const Image: ImageComponent;
|
|
435
|
+
declare const _default$2: ImageComponent & {
|
|
436
|
+
profileImage: typeof Image.profileImage;
|
|
437
|
+
};
|
|
438
|
+
|
|
419
439
|
type ComponentStyleConfig<ComponentProps, Subcomponents extends string> = {
|
|
420
440
|
[key in Subcomponents]?: Partial<ComponentProps>;
|
|
421
441
|
};
|
|
@@ -452,6 +472,9 @@ type BetterHtmlConfig = {
|
|
|
452
472
|
horizontal?: HorizontalDividerProps;
|
|
453
473
|
};
|
|
454
474
|
};
|
|
475
|
+
image?: {
|
|
476
|
+
style?: ComponentStyleConfig<ImageProps, "default" | "profileImage">;
|
|
477
|
+
};
|
|
455
478
|
sideMenu?: {
|
|
456
479
|
/** @default 300 */
|
|
457
480
|
width?: number;
|
|
@@ -521,7 +544,7 @@ type BetterHtmlProviderProps = BetterProviderCommonProps & {
|
|
|
521
544
|
config?: BetterHtmlProviderConfig;
|
|
522
545
|
};
|
|
523
546
|
declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react_jsx_runtime.JSX.Element;
|
|
524
|
-
declare const _default$
|
|
547
|
+
declare const _default$1: react.MemoExoticComponent<typeof BetterHtmlProvider>;
|
|
525
548
|
|
|
526
549
|
declare const isMobileDevice: boolean;
|
|
527
550
|
|
|
@@ -652,25 +675,7 @@ type IconProps = {
|
|
|
652
675
|
type IconComponent = {
|
|
653
676
|
(props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
|
|
654
677
|
};
|
|
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
|
-
};
|
|
678
|
+
declare const _default: IconComponent;
|
|
674
679
|
|
|
675
680
|
type ModalProps = {
|
|
676
681
|
/**
|
|
@@ -1099,12 +1104,17 @@ type SideMenuProps = {
|
|
|
1099
1104
|
type SideMenuComponentType = {
|
|
1100
1105
|
(props: SideMenuProps): React.ReactElement;
|
|
1101
1106
|
pageHolder: (props: SideMenuPageHolderProps) => React.ReactElement;
|
|
1102
|
-
burgerButton: () => React.ReactElement;
|
|
1107
|
+
burgerButton: (props: BurgerButtonProps) => React.ReactElement;
|
|
1103
1108
|
};
|
|
1104
1109
|
declare const SideMenuComponent: SideMenuComponentType;
|
|
1105
1110
|
type SideMenuPageHolderProps = PageHolderProps & {
|
|
1106
1111
|
outsideComponent?: React.ReactNode;
|
|
1107
1112
|
};
|
|
1113
|
+
type BurgerButtonProps = {
|
|
1114
|
+
/** @default "left" */
|
|
1115
|
+
position?: "left" | "center" | "right";
|
|
1116
|
+
onClick?: (isOpened: boolean) => void;
|
|
1117
|
+
};
|
|
1108
1118
|
declare const SideMenu: typeof SideMenuComponent & {
|
|
1109
1119
|
pageHolder: typeof SideMenuComponent.pageHolder;
|
|
1110
1120
|
burgerButton: typeof SideMenuComponent.burgerButton;
|
|
@@ -1169,4 +1179,4 @@ type LocalStoragePluginOptions = {
|
|
|
1169
1179
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1170
1180
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1171
1181
|
|
|
1172
|
-
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$
|
|
1182
|
+
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
|
@@ -1377,25 +1377,32 @@ var import_react_better_core2 = require("react-better-core");
|
|
|
1377
1377
|
var import_styled_components = __toESM(require("styled-components"));
|
|
1378
1378
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1379
1379
|
var TextStyledComponent = import_styled_components.default.p.withConfig({
|
|
1380
|
-
shouldForwardProp: (prop) => !["style", "hoverStyle"].includes(prop)
|
|
1380
|
+
shouldForwardProp: (prop) => !["theme", "style", "hoverStyle", "isP"].includes(prop)
|
|
1381
1381
|
})`
|
|
1382
|
+
${(props) => props.isP ? import_styled_components.css`
|
|
1383
|
+
font-size: ${props.theme.styles.fontSize}px;
|
|
1384
|
+
` : ""}
|
|
1385
|
+
|
|
1382
1386
|
${(props) => props.style}
|
|
1383
1387
|
|
|
1384
1388
|
&:hover {
|
|
1385
1389
|
${(props) => props.hoverStyle}
|
|
1386
1390
|
}
|
|
1387
1391
|
`;
|
|
1388
|
-
var TextComponent = (0, import_react2.forwardRef)(function Text({ htmlContentTranslate, children, ...props }, ref) {
|
|
1392
|
+
var TextComponent = (0, import_react2.forwardRef)(function Text({ as: asValue, htmlContentTranslate, children, ...props }, ref) {
|
|
1393
|
+
const theme2 = (0, import_react_better_core2.useTheme)();
|
|
1389
1394
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
1390
1395
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
1391
1396
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
1392
1397
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1393
1398
|
TextStyledComponent,
|
|
1394
1399
|
{
|
|
1395
|
-
as:
|
|
1400
|
+
as: asValue,
|
|
1401
|
+
theme: theme2,
|
|
1396
1402
|
translate: htmlContentTranslate,
|
|
1397
1403
|
style,
|
|
1398
1404
|
hoverStyle,
|
|
1405
|
+
isP: asValue === "p",
|
|
1399
1406
|
...restProps,
|
|
1400
1407
|
...dataProps,
|
|
1401
1408
|
...ariaProps,
|
|
@@ -1500,7 +1507,12 @@ var ImageElement = import_styled_components2.default.img.withConfig({
|
|
|
1500
1507
|
${(props) => props.hoverStyle}
|
|
1501
1508
|
}
|
|
1502
1509
|
`;
|
|
1503
|
-
var Image = (0, import_react4.forwardRef)(function Image2(
|
|
1510
|
+
var Image = (0, import_react4.forwardRef)(function Image2(ImageProps3, ref) {
|
|
1511
|
+
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
1512
|
+
const { name, src, ...props } = useComponentsPropsMerger(
|
|
1513
|
+
betterHtmlContextInternal.components.image?.style?.default,
|
|
1514
|
+
ImageProps3
|
|
1515
|
+
);
|
|
1504
1516
|
const { assets: assets2 } = (0, import_react_better_core4.useBetterCoreContext)();
|
|
1505
1517
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
1506
1518
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
@@ -1525,7 +1537,9 @@ var Image = (0, import_react4.forwardRef)(function Image2({ name, src, ...props
|
|
|
1525
1537
|
}
|
|
1526
1538
|
);
|
|
1527
1539
|
});
|
|
1528
|
-
Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size = 40, letters, letterColor, backgroundColor, ...
|
|
1540
|
+
Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size = 40, letters, letterColor, backgroundColor, ...ImageProps3 }, ref) {
|
|
1541
|
+
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
1542
|
+
const props = useComponentsPropsMerger(betterHtmlContextInternal.components.image?.style?.default, ImageProps3);
|
|
1529
1543
|
const theme2 = (0, import_react_better_core4.useTheme)();
|
|
1530
1544
|
return letters ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1531
1545
|
Div_default.row,
|
|
@@ -1643,9 +1657,11 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1643
1657
|
imageAzProfileImage,
|
|
1644
1658
|
title,
|
|
1645
1659
|
titleAs = "h1",
|
|
1660
|
+
titleFontSize,
|
|
1646
1661
|
titleColor,
|
|
1647
1662
|
titleRightElement,
|
|
1648
1663
|
description,
|
|
1664
|
+
descriptionFontSize,
|
|
1649
1665
|
descriptionColor,
|
|
1650
1666
|
textAlign,
|
|
1651
1667
|
rightElement,
|
|
@@ -1695,6 +1711,7 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1695
1711
|
Text_default,
|
|
1696
1712
|
{
|
|
1697
1713
|
as: titleAs,
|
|
1714
|
+
fontSize: titleFontSize,
|
|
1698
1715
|
textAlign,
|
|
1699
1716
|
color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
|
|
1700
1717
|
children: title
|
|
@@ -1708,6 +1725,7 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1708
1725
|
Text_default,
|
|
1709
1726
|
{
|
|
1710
1727
|
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
1728
|
+
fontSize: descriptionFontSize,
|
|
1711
1729
|
textAlign,
|
|
1712
1730
|
color: descriptionColor ?? (lightMode ? theme2.colors.base : theme2.colors.textSecondary),
|
|
1713
1731
|
opacity: lightMode ? 0.7 : void 0,
|
|
@@ -2112,8 +2130,8 @@ var ButtonElement = import_styled_components6.default.button.withConfig({
|
|
|
2112
2130
|
width: fit-content;
|
|
2113
2131
|
min-width: max-content;
|
|
2114
2132
|
font-family: ${(props) => props.theme.styles.fontFamily};
|
|
2115
|
-
font-size:
|
|
2116
|
-
line-height:
|
|
2133
|
+
font-size: ${(props) => props.theme.styles.fontSize}px;
|
|
2134
|
+
line-height: ${(props) => props.theme.styles.fontSize + 4}px;
|
|
2117
2135
|
text-decoration: none;
|
|
2118
2136
|
color: ${(props) => props.theme.colors.base};
|
|
2119
2137
|
background-color: ${(props) => props.theme.colors.primary};
|
|
@@ -2204,7 +2222,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2204
2222
|
const iconComponent = icon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2205
2223
|
Div_default.row,
|
|
2206
2224
|
{
|
|
2207
|
-
height: iconSize ?? parseInt(style.fontSize?.toString() ??
|
|
2225
|
+
height: iconSize ?? parseInt(style.fontSize?.toString() ?? theme2.styles.fontSize.toString()),
|
|
2208
2226
|
alignItems: "center",
|
|
2209
2227
|
justifyContent: "center",
|
|
2210
2228
|
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -2212,7 +2230,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2212
2230
|
{
|
|
2213
2231
|
name: icon,
|
|
2214
2232
|
color: iconColor ?? props.color ?? theme2.colors.base,
|
|
2215
|
-
size: iconSize ?? parseInt(style.fontSize?.toString() ??
|
|
2233
|
+
size: iconSize ?? parseInt(style.fontSize?.toString() ?? theme2.styles.fontSize.toString())
|
|
2216
2234
|
}
|
|
2217
2235
|
)
|
|
2218
2236
|
}
|
|
@@ -2222,7 +2240,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2222
2240
|
{
|
|
2223
2241
|
name: image,
|
|
2224
2242
|
color: iconColor ?? props.color ?? theme2.colors.base,
|
|
2225
|
-
width: imageWidth ?? parseInt(style.fontSize?.toString() ??
|
|
2243
|
+
width: imageWidth ?? parseInt(style.fontSize?.toString() ?? theme2.styles.fontSize.toString()),
|
|
2226
2244
|
height: imageHeight
|
|
2227
2245
|
}
|
|
2228
2246
|
) : void 0;
|
|
@@ -3007,7 +3025,7 @@ function Alert2({ alert }) {
|
|
|
3007
3025
|
),
|
|
3008
3026
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
3009
3027
|
/* @__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 })
|
|
3028
|
+
alert.message && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { fontSize: theme2.styles.fontSize, color: theme2.colors.textSecondary, children: alert.message })
|
|
3011
3029
|
] }),
|
|
3012
3030
|
pluginConfig.withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
|
|
3013
3031
|
] }),
|
|
@@ -4310,8 +4328,8 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
4310
4328
|
position: relative;
|
|
4311
4329
|
width: 100%;
|
|
4312
4330
|
font-family: ${(props) => props.theme.styles.fontFamily};
|
|
4313
|
-
font-size:
|
|
4314
|
-
line-height:
|
|
4331
|
+
font-size: ${(props) => props.theme.styles.fontSize}px;
|
|
4332
|
+
line-height: ${(props) => props.theme.styles.fontSize + 4}px;
|
|
4315
4333
|
color: ${(props) => props.theme.colors.textPrimary};
|
|
4316
4334
|
background: ${(props) => props.theme.colors.backgroundContent};
|
|
4317
4335
|
border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
|
|
@@ -4437,8 +4455,8 @@ var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
|
4437
4455
|
min-height: 3lh;
|
|
4438
4456
|
max-height: 8lh;
|
|
4439
4457
|
font-family: ${(props) => props.theme.styles.fontFamily};
|
|
4440
|
-
font-size:
|
|
4441
|
-
line-height:
|
|
4458
|
+
font-size: ${(props) => props.theme.styles.fontSize}px;
|
|
4459
|
+
line-height: ${(props) => props.theme.styles.fontSize + 4}px;
|
|
4442
4460
|
color: ${(props) => props.theme.colors.textPrimary};
|
|
4443
4461
|
background: ${(props) => props.theme.colors.backgroundContent};
|
|
4444
4462
|
border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
|
|
@@ -5706,7 +5724,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5706
5724
|
onClick: onClickText,
|
|
5707
5725
|
children: [
|
|
5708
5726
|
text,
|
|
5709
|
-
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize:
|
|
5727
|
+
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize: theme2.styles.fontSize, color: theme2.colors.error, children: [
|
|
5710
5728
|
" ",
|
|
5711
5729
|
"*"
|
|
5712
5730
|
] })
|
|
@@ -5714,7 +5732,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5714
5732
|
}
|
|
5715
5733
|
) : textAdvanced ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Div_default.row, { userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
|
|
5716
5734
|
textAdvanced,
|
|
5717
|
-
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize:
|
|
5735
|
+
required && !label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text_default, { as: "span", fontSize: theme2.styles.fontSize, color: theme2.colors.error, marginLeft: 4, children: [
|
|
5718
5736
|
" ",
|
|
5719
5737
|
"*"
|
|
5720
5738
|
] })
|
|
@@ -5975,12 +5993,12 @@ FormRowComponent.withTitle = (0, import_react24.forwardRef)(function WithTitle({
|
|
|
5975
5993
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
5976
5994
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text_default, { as: titleAs, fontSize: titleFontSize, children: [
|
|
5977
5995
|
title,
|
|
5978
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text_default, { as: "span", fontSize:
|
|
5996
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text_default, { as: "span", fontSize: theme2.styles.fontSize, color: theme2.colors.error, children: [
|
|
5979
5997
|
" ",
|
|
5980
5998
|
"*"
|
|
5981
5999
|
] })
|
|
5982
6000
|
] }),
|
|
5983
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { fontSize: descriptionFontSize, color: theme2.colors.textSecondary, children: description })
|
|
6001
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { fontSize: descriptionFontSize ?? theme2.styles.fontSize, color: theme2.colors.textSecondary, children: description })
|
|
5984
6002
|
] }),
|
|
5985
6003
|
isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Div_default, { width: 26 - titleGap })
|
|
5986
6004
|
] }),
|
|
@@ -8183,10 +8201,14 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({ outsideComponent, .
|
|
|
8183
8201
|
}
|
|
8184
8202
|
);
|
|
8185
8203
|
};
|
|
8186
|
-
SideMenuComponent.burgerButton = function BurgerButton() {
|
|
8204
|
+
SideMenuComponent.burgerButton = function BurgerButton({ position = "left", onClick }) {
|
|
8187
8205
|
const theme2 = (0, import_react_better_core29.useTheme)();
|
|
8188
8206
|
const { sideMenuIsOpenMobile, setSideMenuIsOpenMobile } = useBetterHtmlContextInternal();
|
|
8189
8207
|
const [isHovered, setIsHovered] = (0, import_react_better_core29.useBooleanState)();
|
|
8208
|
+
const onClickElement = (0, import_react31.useCallback)(() => {
|
|
8209
|
+
setSideMenuIsOpenMobile.toggle();
|
|
8210
|
+
onClick?.(!sideMenuIsOpenMobile);
|
|
8211
|
+
}, [onClick, sideMenuIsOpenMobile]);
|
|
8190
8212
|
const width = 2;
|
|
8191
8213
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
8192
8214
|
Div_default,
|
|
@@ -8198,7 +8220,7 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8198
8220
|
onMouseOver: setIsHovered.setTrue,
|
|
8199
8221
|
onMouseLeave: setIsHovered.setFalse,
|
|
8200
8222
|
onMouseOut: setIsHovered.setFalse,
|
|
8201
|
-
onClick:
|
|
8223
|
+
onClick: onClickElement,
|
|
8202
8224
|
children: [
|
|
8203
8225
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
8204
8226
|
Div_default,
|
|
@@ -8207,10 +8229,11 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8207
8229
|
width: isHovered || sideMenuIsOpenMobile ? "100%" : "50%",
|
|
8208
8230
|
height: width,
|
|
8209
8231
|
top: sideMenuIsOpenMobile ? `calc(50% - ${width / 2}px)` : 0,
|
|
8210
|
-
left: 0,
|
|
8232
|
+
left: position === "left" ? 0 : position === "center" ? sideMenuIsOpenMobile ? 0 : "50%" : "auto",
|
|
8233
|
+
right: position === "right" ? 0 : void 0,
|
|
8211
8234
|
backgroundColor: theme2.colors.border,
|
|
8212
8235
|
borderRadius: 999,
|
|
8213
|
-
transform: sideMenuIsOpenMobile ? "rotate(45deg)" : void 0,
|
|
8236
|
+
transform: sideMenuIsOpenMobile ? "rotate(45deg)" : position === "center" ? "translateX(-50%)" : void 0,
|
|
8214
8237
|
transition: theme2.styles.transition
|
|
8215
8238
|
}
|
|
8216
8239
|
),
|
|
@@ -8221,10 +8244,11 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8221
8244
|
width: isHovered ? "100%" : "100%",
|
|
8222
8245
|
height: width,
|
|
8223
8246
|
top: "50%",
|
|
8224
|
-
left: 0,
|
|
8247
|
+
left: position === "left" ? 0 : position === "center" ? "50%" : "auto",
|
|
8248
|
+
right: position === "right" ? 0 : void 0,
|
|
8225
8249
|
backgroundColor: theme2.colors.border,
|
|
8226
8250
|
borderRadius: 999,
|
|
8227
|
-
transform:
|
|
8251
|
+
transform: `translateY(-50%)${position === "center" ? " translateX(-50%)" : ""}`,
|
|
8228
8252
|
opacity: sideMenuIsOpenMobile ? 0 : void 0,
|
|
8229
8253
|
transition: theme2.styles.transition
|
|
8230
8254
|
}
|
|
@@ -8236,10 +8260,11 @@ SideMenuComponent.burgerButton = function BurgerButton() {
|
|
|
8236
8260
|
width: isHovered || sideMenuIsOpenMobile ? "100%" : "75%",
|
|
8237
8261
|
height: width,
|
|
8238
8262
|
bottom: sideMenuIsOpenMobile ? `calc(50% - ${width / 2}px)` : 0,
|
|
8239
|
-
left: 0,
|
|
8263
|
+
left: position === "left" ? 0 : position === "center" ? sideMenuIsOpenMobile ? 0 : "50%" : "auto",
|
|
8264
|
+
right: position === "right" ? 0 : void 0,
|
|
8240
8265
|
backgroundColor: theme2.colors.border,
|
|
8241
8266
|
borderRadius: 999,
|
|
8242
|
-
transform: sideMenuIsOpenMobile ? "rotate(-45deg)" : void 0,
|
|
8267
|
+
transform: sideMenuIsOpenMobile ? "rotate(-45deg)" : position === "center" ? "translateX(-50%)" : void 0,
|
|
8243
8268
|
transition: theme2.styles.transition
|
|
8244
8269
|
}
|
|
8245
8270
|
)
|