react-better-html 1.1.223 → 1.1.225
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -306,13 +306,13 @@ type PageHeaderProps = {
|
|
|
306
306
|
imageSize?: number;
|
|
307
307
|
/** @default false */
|
|
308
308
|
imageAzProfileImage?: boolean;
|
|
309
|
-
title?: string;
|
|
309
|
+
title?: string | React.ReactNode;
|
|
310
310
|
/** @default "h1" */
|
|
311
311
|
titleAs?: TextAs;
|
|
312
312
|
/** @default textPrimary */
|
|
313
313
|
titleColor?: React.CSSProperties["color"];
|
|
314
314
|
titleRightElement?: React.ReactNode;
|
|
315
|
-
description?: string;
|
|
315
|
+
description?: string | React.ReactNode;
|
|
316
316
|
/** @default textSecondary */
|
|
317
317
|
descriptionColor?: React.CSSProperties["color"];
|
|
318
318
|
textAlign?: React.CSSProperties["textAlign"];
|
package/dist/index.d.ts
CHANGED
|
@@ -306,13 +306,13 @@ type PageHeaderProps = {
|
|
|
306
306
|
imageSize?: number;
|
|
307
307
|
/** @default false */
|
|
308
308
|
imageAzProfileImage?: boolean;
|
|
309
|
-
title?: string;
|
|
309
|
+
title?: string | React.ReactNode;
|
|
310
310
|
/** @default "h1" */
|
|
311
311
|
titleAs?: TextAs;
|
|
312
312
|
/** @default textPrimary */
|
|
313
313
|
titleColor?: React.CSSProperties["color"];
|
|
314
314
|
titleRightElement?: React.ReactNode;
|
|
315
|
-
description?: string;
|
|
315
|
+
description?: string | React.ReactNode;
|
|
316
316
|
/** @default textSecondary */
|
|
317
317
|
descriptionColor?: React.CSSProperties["color"];
|
|
318
318
|
textAlign?: React.CSSProperties["textAlign"];
|
package/dist/index.js
CHANGED
|
@@ -1640,7 +1640,7 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1640
1640
|
justifyContent: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
1641
1641
|
gap: theme2.styles.space,
|
|
1642
1642
|
children: [
|
|
1643
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1643
|
+
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1644
1644
|
Text_default,
|
|
1645
1645
|
{
|
|
1646
1646
|
as: titleAs,
|
|
@@ -1648,12 +1648,12 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1648
1648
|
color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
|
|
1649
1649
|
children: title
|
|
1650
1650
|
}
|
|
1651
|
-
),
|
|
1651
|
+
) : title,
|
|
1652
1652
|
titleRightElement
|
|
1653
1653
|
]
|
|
1654
1654
|
}
|
|
1655
1655
|
),
|
|
1656
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1656
|
+
description && (typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1657
1657
|
Text_default,
|
|
1658
1658
|
{
|
|
1659
1659
|
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
@@ -1662,7 +1662,7 @@ var PageHeaderComponent = (0, import_react7.forwardRef)(function PageHeader({
|
|
|
1662
1662
|
opacity: lightMode ? 0.7 : void 0,
|
|
1663
1663
|
children: description
|
|
1664
1664
|
}
|
|
1665
|
-
)
|
|
1665
|
+
) : description)
|
|
1666
1666
|
]
|
|
1667
1667
|
}
|
|
1668
1668
|
),
|
|
@@ -1765,8 +1765,11 @@ DivComponent.grid = (0, import_react8.forwardRef)(function Grid(props, ref) {
|
|
|
1765
1765
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DivComponent, { display: "grid", ref, ...props });
|
|
1766
1766
|
});
|
|
1767
1767
|
DivComponent.box = (0, import_react8.forwardRef)(function Box({
|
|
1768
|
+
icon,
|
|
1769
|
+
image,
|
|
1768
1770
|
imageUrl,
|
|
1769
1771
|
imageSize,
|
|
1772
|
+
imageAzProfileImage,
|
|
1770
1773
|
title,
|
|
1771
1774
|
titleAs,
|
|
1772
1775
|
titleColor,
|
|
@@ -1815,8 +1818,11 @@ DivComponent.box = (0, import_react8.forwardRef)(function Box({
|
|
|
1815
1818
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1816
1819
|
PageHeader_default,
|
|
1817
1820
|
{
|
|
1821
|
+
icon,
|
|
1822
|
+
image,
|
|
1818
1823
|
imageUrl,
|
|
1819
1824
|
imageSize,
|
|
1825
|
+
imageAzProfileImage,
|
|
1820
1826
|
title,
|
|
1821
1827
|
titleAs,
|
|
1822
1828
|
titleColor,
|
|
@@ -3728,7 +3734,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
3728
3734
|
if (!withDebounce) return;
|
|
3729
3735
|
onChangeSearch?.(debouncedSearchQuery);
|
|
3730
3736
|
}, [withDebounce, onChangeSearch, debouncedSearchQuery]);
|
|
3731
|
-
const displayValue = (withSearch && isFocused
|
|
3737
|
+
const displayValue = (withSearch && isFocused ? searchQuery : !Array.isArray(selectedOption) ? selectedOption?.label : void 0) ?? "";
|
|
3732
3738
|
const withClearButton = isOpen && (Array.isArray(selectedOption) ? selectedOption.length > 0 : selectedOption);
|
|
3733
3739
|
const readyPlaceholder = placeholder ?? `Select ${!withMultiselect ? "an " : ""}${label?.toLowerCase() ?? (0, import_react_better_core17.getPluralWord)("option", withMultiselect ? 2 : 1)}`;
|
|
3734
3740
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Div_default.column, { width: "100%", position: "relative", userSelect: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -3749,7 +3755,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
3749
3755
|
leftIcon,
|
|
3750
3756
|
autoComplete: "off",
|
|
3751
3757
|
className: `react-better-html-dropdown${Array.isArray(selectedOption) && selectedOption.length > 0 ? " react-better-html-dropdown-multiselect" : ""}${isOpen ? " react-better-html-dropdown-open" : ""}${isOpenLate ? " react-better-html-dropdown-open-late" : ""}${inputFieldClassName ? ` ${inputFieldClassName}` : ""}`,
|
|
3752
|
-
onClick: !disabled ? setIsOpen.toggle : void 0,
|
|
3758
|
+
onClick: !disabled ? withMultiselect ? setIsOpen.setTrue : setIsOpen.toggle : void 0,
|
|
3753
3759
|
onFocus: setIsFocused.setTrue,
|
|
3754
3760
|
onBlur: setIsFocused.setFalse,
|
|
3755
3761
|
onKeyDown: onKeyDownInputField,
|