react-better-html 1.1.193 → 1.1.194
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 +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +27 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,6 @@ var isMobileDevice = /Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Op
|
|
|
9
9
|
|
|
10
10
|
// src/utils/hooks.ts
|
|
11
11
|
import { useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo3, useRef as useRef2, useState as useState3 } from "react";
|
|
12
|
-
import { createSearchParams } from "react-router-dom";
|
|
13
12
|
|
|
14
13
|
// src/constants/css.ts
|
|
15
14
|
var cssProps = {
|
|
@@ -1548,12 +1547,13 @@ var alertsPlugin = (options) => ({
|
|
|
1548
1547
|
});
|
|
1549
1548
|
|
|
1550
1549
|
// src/plugins/reactRouterDom.ts
|
|
1551
|
-
import { useInRouterContext, useLocation, useNavigate, useSearchParams } from "react-router-dom";
|
|
1550
|
+
import { createSearchParams, useInRouterContext, useLocation, useNavigate, useSearchParams } from "react-router-dom";
|
|
1552
1551
|
var defaultReactRouterDomPluginOptions = {
|
|
1553
1552
|
useNavigate,
|
|
1554
1553
|
useLocation,
|
|
1555
1554
|
useInRouterContext,
|
|
1556
|
-
useSearchParams
|
|
1555
|
+
useSearchParams,
|
|
1556
|
+
createSearchParams
|
|
1557
1557
|
};
|
|
1558
1558
|
var reactRouterDomPlugin = (options) => ({
|
|
1559
1559
|
name: "react-router-dom",
|
|
@@ -3113,6 +3113,7 @@ function useUrlQuery() {
|
|
|
3113
3113
|
}
|
|
3114
3114
|
const navigate = reactRouterDomPluginConfig.useNavigate();
|
|
3115
3115
|
const [searchParams] = reactRouterDomPluginConfig.useSearchParams();
|
|
3116
|
+
const createSearchParams2 = reactRouterDomPluginConfig.createSearchParams;
|
|
3116
3117
|
const setQuery = useCallback4(
|
|
3117
3118
|
(query, keepHistory = true) => {
|
|
3118
3119
|
const currentSearchParams = {};
|
|
@@ -3121,7 +3122,7 @@ function useUrlQuery() {
|
|
|
3121
3122
|
});
|
|
3122
3123
|
navigate(
|
|
3123
3124
|
{
|
|
3124
|
-
search:
|
|
3125
|
+
search: createSearchParams2({
|
|
3125
3126
|
...currentSearchParams,
|
|
3126
3127
|
...Object.fromEntries(Object.entries(query).map(([key, value]) => [key, value.toString()]))
|
|
3127
3128
|
}).toString()
|
|
@@ -3194,7 +3195,7 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
|
|
|
3194
3195
|
imageUrl,
|
|
3195
3196
|
imageSize = 60,
|
|
3196
3197
|
title,
|
|
3197
|
-
titleAs,
|
|
3198
|
+
titleAs = "h1",
|
|
3198
3199
|
titleColor,
|
|
3199
3200
|
titleRightElement,
|
|
3200
3201
|
description,
|
|
@@ -3233,7 +3234,7 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
|
|
|
3233
3234
|
/* @__PURE__ */ jsx10(
|
|
3234
3235
|
Text_default,
|
|
3235
3236
|
{
|
|
3236
|
-
as: titleAs
|
|
3237
|
+
as: titleAs,
|
|
3237
3238
|
textAlign,
|
|
3238
3239
|
color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
|
|
3239
3240
|
children: title
|
|
@@ -9206,7 +9207,12 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
9206
9207
|
isOpen: controlledIsOpen,
|
|
9207
9208
|
defaultOpen = false,
|
|
9208
9209
|
title,
|
|
9210
|
+
titleAs = "h3",
|
|
9211
|
+
titleColor,
|
|
9212
|
+
titleRightElement,
|
|
9209
9213
|
description,
|
|
9214
|
+
descriptionColor,
|
|
9215
|
+
rightElement,
|
|
9210
9216
|
icon,
|
|
9211
9217
|
image,
|
|
9212
9218
|
headerPaddingBlock,
|
|
@@ -9274,7 +9280,7 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
9274
9280
|
{
|
|
9275
9281
|
width: "100%",
|
|
9276
9282
|
alignItems: "center",
|
|
9277
|
-
gap: theme2.styles.
|
|
9283
|
+
gap: theme2.styles.space,
|
|
9278
9284
|
paddingBlock: headerPaddingBlock ?? theme2.styles.gap,
|
|
9279
9285
|
paddingInline: headerPaddingInline,
|
|
9280
9286
|
cursor: "pointer",
|
|
@@ -9285,10 +9291,23 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
9285
9291
|
icon && /* @__PURE__ */ jsx26(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
|
|
9286
9292
|
image && /* @__PURE__ */ jsx26(Image_default.profileImage, { name: image, size: 24, flexShrink: 0 }),
|
|
9287
9293
|
/* @__PURE__ */ jsxs22(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
9288
|
-
title && /* @__PURE__ */
|
|
9289
|
-
|
|
9294
|
+
title && /* @__PURE__ */ jsxs22(Div_default.row, { alignItems: "center", gap: theme2.styles.space, children: [
|
|
9295
|
+
/* @__PURE__ */ jsx26(
|
|
9296
|
+
Text_default,
|
|
9297
|
+
{
|
|
9298
|
+
as: titleAs,
|
|
9299
|
+
fontWeight: 700,
|
|
9300
|
+
lineHeight: "20px",
|
|
9301
|
+
color: titleColor ?? theme2.colors.textPrimary,
|
|
9302
|
+
children: title
|
|
9303
|
+
}
|
|
9304
|
+
),
|
|
9305
|
+
titleRightElement
|
|
9306
|
+
] }),
|
|
9307
|
+
description && /* @__PURE__ */ jsx26(Text_default, { color: descriptionColor ?? theme2.colors.textSecondary, children: description })
|
|
9290
9308
|
] })
|
|
9291
9309
|
] }),
|
|
9310
|
+
rightElement,
|
|
9292
9311
|
/* @__PURE__ */ jsx26(
|
|
9293
9312
|
Icon_default,
|
|
9294
9313
|
{
|