react-better-html 1.1.276 → 1.1.278
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 +53 -4
- package/dist/index.d.ts +53 -4
- package/dist/index.js +901 -695
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +579 -374
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -42,6 +42,7 @@ var appConfig = {
|
|
|
42
42
|
};
|
|
43
43
|
var defaultAlertDuration = 2.3 * 1e3;
|
|
44
44
|
var defaultSideMenuWidth = 300;
|
|
45
|
+
var defaultSideBarWidth = 80;
|
|
45
46
|
|
|
46
47
|
// src/constants/theme.ts
|
|
47
48
|
var theme = {};
|
|
@@ -3093,7 +3094,18 @@ var useBetterHtmlContext = () => {
|
|
|
3093
3094
|
throw new Error(
|
|
3094
3095
|
"`useBetterHtmlContext()` must be used within a `<BetterHtmlProvider>`. Make sure to add one at the root of your component tree."
|
|
3095
3096
|
);
|
|
3096
|
-
const {
|
|
3097
|
+
const {
|
|
3098
|
+
alerts,
|
|
3099
|
+
setAlerts,
|
|
3100
|
+
setLanguage,
|
|
3101
|
+
languages,
|
|
3102
|
+
setLanguages,
|
|
3103
|
+
setSideMenuIsCollapsed,
|
|
3104
|
+
setSideMenuIsOpenMobile,
|
|
3105
|
+
plugins,
|
|
3106
|
+
componentsState,
|
|
3107
|
+
...rest
|
|
3108
|
+
} = context;
|
|
3097
3109
|
return {
|
|
3098
3110
|
...coreContext,
|
|
3099
3111
|
...rest
|
|
@@ -3160,6 +3172,8 @@ function BetterHtmlProviderInternalContent({ children }) {
|
|
|
3160
3172
|
function BetterHtmlProviderInternal({ config, plugins, children }) {
|
|
3161
3173
|
const betterCoreContext = useBetterCoreContext5();
|
|
3162
3174
|
const [alerts, setAlerts] = useState4([]);
|
|
3175
|
+
const [language, setLanguage] = useState4(localStorage.getItem("language") ?? "");
|
|
3176
|
+
const [languages, setLanguages] = useState4({});
|
|
3163
3177
|
const [sideMenuIsCollapsed, setSideMenuIsCollapsed] = useBooleanState3();
|
|
3164
3178
|
const [sideMenuIsOpenMobile, setSideMenuIsOpenMobile] = useBooleanState3();
|
|
3165
3179
|
const [tabGroups, setTabGroups] = useState4([]);
|
|
@@ -3172,6 +3186,10 @@ function BetterHtmlProviderInternal({ config, plugins, children }) {
|
|
|
3172
3186
|
},
|
|
3173
3187
|
alerts,
|
|
3174
3188
|
setAlerts,
|
|
3189
|
+
language,
|
|
3190
|
+
setLanguage,
|
|
3191
|
+
languages,
|
|
3192
|
+
setLanguages,
|
|
3175
3193
|
sideMenuIsCollapsed,
|
|
3176
3194
|
setSideMenuIsCollapsed,
|
|
3177
3195
|
sideMenuIsOpenMobile,
|
|
@@ -3189,7 +3207,17 @@ function BetterHtmlProviderInternal({ config, plugins, children }) {
|
|
|
3189
3207
|
}
|
|
3190
3208
|
}
|
|
3191
3209
|
}),
|
|
3192
|
-
[
|
|
3210
|
+
[
|
|
3211
|
+
config,
|
|
3212
|
+
alerts,
|
|
3213
|
+
language,
|
|
3214
|
+
languages,
|
|
3215
|
+
sideMenuIsCollapsed,
|
|
3216
|
+
sideMenuIsOpenMobile,
|
|
3217
|
+
plugins,
|
|
3218
|
+
tabGroups,
|
|
3219
|
+
tabsWithDots
|
|
3220
|
+
]
|
|
3193
3221
|
);
|
|
3194
3222
|
useEffect6(() => {
|
|
3195
3223
|
if (!plugins) return;
|
|
@@ -3417,14 +3445,72 @@ function generateLocalStorage() {
|
|
|
3417
3445
|
};
|
|
3418
3446
|
}
|
|
3419
3447
|
|
|
3448
|
+
// src/utils/i18n.tsx
|
|
3449
|
+
import { Fragment as Fragment3 } from "react";
|
|
3450
|
+
import { Fragment as Fragment4, jsx as jsx13 } from "react/jsx-runtime";
|
|
3451
|
+
var missingTranslation = "MISSING_TRANSLATION";
|
|
3452
|
+
function generateI18n(config) {
|
|
3453
|
+
setTimeout(() => {
|
|
3454
|
+
externalBetterHtmlContextValue?.setLanguages(config.languages);
|
|
3455
|
+
const cachedLanguage = localStorage.getItem("language");
|
|
3456
|
+
const language = !cachedLanguage || !Object.keys(config.languages).includes(cachedLanguage) ? config.defaultLanguage : cachedLanguage;
|
|
3457
|
+
setLanguage(language);
|
|
3458
|
+
}, 1);
|
|
3459
|
+
function setLanguage(language) {
|
|
3460
|
+
externalBetterHtmlContextValue?.setLanguage(language);
|
|
3461
|
+
localStorage.setItem("language", language);
|
|
3462
|
+
}
|
|
3463
|
+
function internalI18n(language) {
|
|
3464
|
+
function translate(getString, template) {
|
|
3465
|
+
const words = config.languages[language]?.words;
|
|
3466
|
+
try {
|
|
3467
|
+
const readyString = words ? getString?.(words) ?? missingTranslation : missingTranslation;
|
|
3468
|
+
if (!template) return readyString;
|
|
3469
|
+
const matches = Array.from(readyString.matchAll(/{([^}]+)}/g));
|
|
3470
|
+
if (matches.length === 0) return readyString;
|
|
3471
|
+
const parts = [];
|
|
3472
|
+
let lastIndex = 0;
|
|
3473
|
+
matches.forEach((match, index) => {
|
|
3474
|
+
const [fullMatch, key] = match;
|
|
3475
|
+
const startIndex = match.index;
|
|
3476
|
+
if (startIndex > lastIndex) parts.push(readyString.substring(lastIndex, startIndex));
|
|
3477
|
+
const readyKey = words.templates[key.trim()] ?? fullMatch;
|
|
3478
|
+
const handler = template[key.trim()];
|
|
3479
|
+
parts.push(handler ? /* @__PURE__ */ jsx13(Fragment3, { children: handler(readyKey, index) }, fullMatch) : fullMatch);
|
|
3480
|
+
lastIndex = startIndex + fullMatch.length;
|
|
3481
|
+
});
|
|
3482
|
+
if (lastIndex < readyString.length) parts.push(readyString.substring(lastIndex));
|
|
3483
|
+
return parts;
|
|
3484
|
+
} catch (error) {
|
|
3485
|
+
return /* @__PURE__ */ jsx13(Fragment4, { children: missingTranslation });
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
return {
|
|
3489
|
+
t: translate,
|
|
3490
|
+
language,
|
|
3491
|
+
setLanguage
|
|
3492
|
+
};
|
|
3493
|
+
}
|
|
3494
|
+
return {
|
|
3495
|
+
useI18n: () => {
|
|
3496
|
+
const { language } = useBetterHtmlContext();
|
|
3497
|
+
return {
|
|
3498
|
+
...internalI18n(language ?? config.defaultLanguage)
|
|
3499
|
+
};
|
|
3500
|
+
},
|
|
3501
|
+
...internalI18n(externalBetterHtmlContextValue?.language ?? config.defaultLanguage),
|
|
3502
|
+
...config
|
|
3503
|
+
};
|
|
3504
|
+
}
|
|
3505
|
+
|
|
3420
3506
|
// src/components/PageHolder.tsx
|
|
3421
3507
|
import { forwardRef as forwardRef8, memo as memo13 } from "react";
|
|
3422
3508
|
import { useTheme as useTheme14 } from "react-better-core";
|
|
3423
|
-
import { jsx as
|
|
3509
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3424
3510
|
var PageHolderComponent = forwardRef8(function PageHolder({ noMaxContentWidth, children, ...props }, ref) {
|
|
3425
3511
|
const theme2 = useTheme14();
|
|
3426
3512
|
const { app } = useBetterHtmlContextInternal();
|
|
3427
|
-
return /* @__PURE__ */
|
|
3513
|
+
return /* @__PURE__ */ jsx14(
|
|
3428
3514
|
Div_default,
|
|
3429
3515
|
{
|
|
3430
3516
|
as: "main",
|
|
@@ -3468,7 +3554,7 @@ PageHolderComponent.center = forwardRef8(function Center({
|
|
|
3468
3554
|
backgroundColor: pageBackgroundColor,
|
|
3469
3555
|
backgroundImage: pageBackgroundImage,
|
|
3470
3556
|
children: [
|
|
3471
|
-
behindComponent && /* @__PURE__ */
|
|
3557
|
+
behindComponent && /* @__PURE__ */ jsx14(
|
|
3472
3558
|
Div_default,
|
|
3473
3559
|
{
|
|
3474
3560
|
position: "fixed",
|
|
@@ -3481,8 +3567,8 @@ PageHolderComponent.center = forwardRef8(function Center({
|
|
|
3481
3567
|
children: behindComponent
|
|
3482
3568
|
}
|
|
3483
3569
|
),
|
|
3484
|
-
sideComponentPosition === "left" && withSideComponent && /* @__PURE__ */
|
|
3485
|
-
/* @__PURE__ */
|
|
3570
|
+
sideComponentPosition === "left" && withSideComponent && /* @__PURE__ */ jsx14(Div_default, { width: "50%" }),
|
|
3571
|
+
/* @__PURE__ */ jsx14(Div_default.column, { position: "relative", width: `${withSideComponent ? 50 : 100}%`, alignItems: "center", zIndex: 2, children: /* @__PURE__ */ jsx14(
|
|
3486
3572
|
ContentTag,
|
|
3487
3573
|
{
|
|
3488
3574
|
width: `calc(100% - ${((props.margin ?? props.marginInline) !== void 0 ? parseFloat((props.margin ?? props.marginInline)?.toString() ?? "") : theme2.styles.space) * 2}px)`,
|
|
@@ -3495,8 +3581,8 @@ PageHolderComponent.center = forwardRef8(function Center({
|
|
|
3495
3581
|
children
|
|
3496
3582
|
}
|
|
3497
3583
|
) }),
|
|
3498
|
-
sideComponentPosition === "right" && withSideComponent && /* @__PURE__ */
|
|
3499
|
-
withSideComponent && /* @__PURE__ */
|
|
3584
|
+
sideComponentPosition === "right" && withSideComponent && /* @__PURE__ */ jsx14(Div_default, { width: "50%" }),
|
|
3585
|
+
withSideComponent && /* @__PURE__ */ jsx14(
|
|
3500
3586
|
Div_default,
|
|
3501
3587
|
{
|
|
3502
3588
|
position: "fixed",
|
|
@@ -3519,7 +3605,7 @@ var PageHolder_default = PageHolder2;
|
|
|
3519
3605
|
// src/components/Chip.tsx
|
|
3520
3606
|
import { forwardRef as forwardRef9, memo as memo14, useCallback as useCallback7 } from "react";
|
|
3521
3607
|
import { darkenColor, lightenColor, useBetterCoreContext as useBetterCoreContext6, useTheme as useTheme15 } from "react-better-core";
|
|
3522
|
-
import { jsx as
|
|
3608
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3523
3609
|
var borderRadiusOffset = 1.3;
|
|
3524
3610
|
var ChipComponent = forwardRef9(function Chip({
|
|
3525
3611
|
text,
|
|
@@ -3542,7 +3628,7 @@ var ChipComponent = forwardRef9(function Chip({
|
|
|
3542
3628
|
},
|
|
3543
3629
|
[onClick, onClickWithValue, value]
|
|
3544
3630
|
);
|
|
3545
|
-
return /* @__PURE__ */
|
|
3631
|
+
return /* @__PURE__ */ jsx15(
|
|
3546
3632
|
Div_default,
|
|
3547
3633
|
{
|
|
3548
3634
|
width: "fit-content",
|
|
@@ -3557,7 +3643,7 @@ var ChipComponent = forwardRef9(function Chip({
|
|
|
3557
3643
|
ref,
|
|
3558
3644
|
children: /* @__PURE__ */ jsxs10(Div_default.row, { height: "100%", alignItems: "center", gap: theme2.styles.gap, children: [
|
|
3559
3645
|
beforeText,
|
|
3560
|
-
typeof text === "string" ? /* @__PURE__ */
|
|
3646
|
+
typeof text === "string" ? /* @__PURE__ */ jsx15(Text_default, { color: color ?? theme2.colors.textPrimary, children: text }) : text,
|
|
3561
3647
|
afterText
|
|
3562
3648
|
] })
|
|
3563
3649
|
}
|
|
@@ -3567,7 +3653,7 @@ ChipComponent.colored = forwardRef9(function Colored({ color, withWhiteBackgroun
|
|
|
3567
3653
|
const theme2 = useTheme15();
|
|
3568
3654
|
const { colorTheme } = useBetterCoreContext6();
|
|
3569
3655
|
const readyColor = color ?? theme2.colors.textSecondary;
|
|
3570
|
-
const chip = /* @__PURE__ */
|
|
3656
|
+
const chip = /* @__PURE__ */ jsx15(
|
|
3571
3657
|
ChipComponent,
|
|
3572
3658
|
{
|
|
3573
3659
|
color: colorTheme === "light" ? darkenColor(readyColor, 0.7) : lightenColor(readyColor, 0.7),
|
|
@@ -3577,7 +3663,7 @@ ChipComponent.colored = forwardRef9(function Colored({ color, withWhiteBackgroun
|
|
|
3577
3663
|
...props
|
|
3578
3664
|
}
|
|
3579
3665
|
);
|
|
3580
|
-
return withWhiteBackground ? /* @__PURE__ */
|
|
3666
|
+
return withWhiteBackground ? /* @__PURE__ */ jsx15(
|
|
3581
3667
|
Div_default,
|
|
3582
3668
|
{
|
|
3583
3669
|
width: "fit-content",
|
|
@@ -3659,7 +3745,7 @@ function Label(labelProps) {
|
|
|
3659
3745
|
var Label_default = memo15(Label);
|
|
3660
3746
|
|
|
3661
3747
|
// src/components/Dropdown.tsx
|
|
3662
|
-
import { forwardRef as forwardRef10, Fragment as
|
|
3748
|
+
import { forwardRef as forwardRef10, Fragment as Fragment5, memo as memo16, useCallback as useCallback8, useEffect as useEffect7, useMemo as useMemo4, useRef as useRef4, useState as useState5 } from "react";
|
|
3663
3749
|
import {
|
|
3664
3750
|
getPluralWord,
|
|
3665
3751
|
useBooleanState as useBooleanState4,
|
|
@@ -3667,7 +3753,7 @@ import {
|
|
|
3667
3753
|
countries,
|
|
3668
3754
|
useTheme as useTheme17
|
|
3669
3755
|
} from "react-better-core";
|
|
3670
|
-
import { Fragment as
|
|
3756
|
+
import { Fragment as Fragment6, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3671
3757
|
import { createElement as createElement2 } from "react";
|
|
3672
3758
|
var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
3673
3759
|
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
@@ -3695,6 +3781,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3695
3781
|
debounceDelay = 0.5,
|
|
3696
3782
|
debounceIsLoading,
|
|
3697
3783
|
debounceMinimumSymbolsRequired,
|
|
3784
|
+
withoutArrow,
|
|
3698
3785
|
withoutClearButton,
|
|
3699
3786
|
withoutRenderingOptionsWhenClosed,
|
|
3700
3787
|
onChange,
|
|
@@ -3703,6 +3790,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3703
3790
|
renderOptionDivider,
|
|
3704
3791
|
withMultiselect,
|
|
3705
3792
|
id,
|
|
3793
|
+
textAlign,
|
|
3706
3794
|
...props
|
|
3707
3795
|
} = useComponentsPropsMerger(
|
|
3708
3796
|
betterHtmlContextInternal.components.dropdown?.style?.default,
|
|
@@ -3829,14 +3917,14 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3829
3917
|
[options, value]
|
|
3830
3918
|
);
|
|
3831
3919
|
const renderedOptions = useMemo4(
|
|
3832
|
-
() => /* @__PURE__ */ jsxs12(
|
|
3920
|
+
() => /* @__PURE__ */ jsxs12(Fragment6, { children: [
|
|
3833
3921
|
renderOptionDivider ? renderOptionDivider(void 0, filteredOptions[0], -1, 0) : void 0,
|
|
3834
3922
|
filteredOptions.map((option, index) => {
|
|
3835
3923
|
const isSelected = withMultiselect ? Array.isArray(value) ? value.includes(option.value) : false : option.value === value;
|
|
3836
3924
|
const isDisabled = option.disabled;
|
|
3837
3925
|
const isFocused2 = index === focusedOptionIndex;
|
|
3838
|
-
return /* @__PURE__ */ jsxs12(
|
|
3839
|
-
/* @__PURE__ */
|
|
3926
|
+
return /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
3927
|
+
/* @__PURE__ */ jsx16(
|
|
3840
3928
|
Div_default,
|
|
3841
3929
|
{
|
|
3842
3930
|
color: isDisabled ? theme2.colors.textSecondary + "80" : isSelected ? theme2.colors.base : theme2.colors.textPrimary,
|
|
@@ -3851,7 +3939,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3851
3939
|
role: "option",
|
|
3852
3940
|
"aria-selected": isSelected,
|
|
3853
3941
|
"aria-disabled": isDisabled,
|
|
3854
|
-
children: renderOption ? renderOption(option, index, isSelected) : /* @__PURE__ */
|
|
3942
|
+
children: renderOption ? renderOption(option, index, isSelected) : /* @__PURE__ */ jsx16(Fragment6, { children: !option.renderType || option.renderType === "default" ? /* @__PURE__ */ jsx16(Text_default, { children: option.label }) : option.renderType === "chip" ? /* @__PURE__ */ jsx16(Chip_default, { text: option.label, ...option.chipProps }) : option.renderType === "chip.colored" ? /* @__PURE__ */ jsx16(Chip_default.colored, { text: option.label, withWhiteBackground: true, ...option.chipProps }) : void 0 })
|
|
3855
3943
|
}
|
|
3856
3944
|
),
|
|
3857
3945
|
renderOptionDivider ? renderOptionDivider(
|
|
@@ -3913,7 +4001,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3913
4001
|
const displayValue = (withSearch && isFocused ? searchQuery : !Array.isArray(selectedOption) ? selectedOption?.label : void 0) ?? "";
|
|
3914
4002
|
const withClearButton = isOpen && (Array.isArray(selectedOption) ? selectedOption.length > 0 : selectedOption);
|
|
3915
4003
|
const readyPlaceholder = placeholder ?? `Select ${!withMultiselect ? "an " : ""}${label?.toLowerCase() ?? getPluralWord("option", withMultiselect ? 2 : 1)}`;
|
|
3916
|
-
return /* @__PURE__ */
|
|
4004
|
+
return /* @__PURE__ */ jsx16(Div_default.column, { width: "100%", position: "relative", userSelect: "none", ...props, children: /* @__PURE__ */ jsx16(
|
|
3917
4005
|
InputField_default,
|
|
3918
4006
|
{
|
|
3919
4007
|
label,
|
|
@@ -3926,6 +4014,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3926
4014
|
errorText,
|
|
3927
4015
|
infoText,
|
|
3928
4016
|
required: withMultiselect ? (Array.isArray(value) ? value.length > 0 : value !== void 0) ? false : required : required,
|
|
4017
|
+
textAlign,
|
|
3929
4018
|
name,
|
|
3930
4019
|
disabled,
|
|
3931
4020
|
readOnly: !withSearch,
|
|
@@ -3935,13 +4024,13 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3935
4024
|
placeholder: withSearch ? selectedOption && !Array.isArray(selectedOption) ? selectedOption.label : readyPlaceholder : readyPlaceholder,
|
|
3936
4025
|
leftIcon,
|
|
3937
4026
|
autoComplete: "off",
|
|
3938
|
-
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}` : ""}`,
|
|
4027
|
+
className: `react-better-html-dropdown${withoutArrow ? " react-better-html-dropdown-without-arrow" : ""}${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}` : ""}`,
|
|
3939
4028
|
onClick: !disabled ? withMultiselect ? setIsOpen.setTrue : setIsOpen.toggle : void 0,
|
|
3940
4029
|
onFocus: setIsFocused.setTrue,
|
|
3941
4030
|
onBlur: setIsFocused.setFalse,
|
|
3942
4031
|
onKeyDown: onKeyDownInputField,
|
|
3943
4032
|
onChangeValue: withSearch ? onChangeValue : void 0,
|
|
3944
|
-
insideInputFieldBeforeComponent: Array.isArray(selectedOption) && selectedOption.length > 0 ? /* @__PURE__ */
|
|
4033
|
+
insideInputFieldBeforeComponent: Array.isArray(selectedOption) && selectedOption.length > 0 ? /* @__PURE__ */ jsx16(
|
|
3945
4034
|
Div_default,
|
|
3946
4035
|
{
|
|
3947
4036
|
width: "100%",
|
|
@@ -3954,14 +4043,14 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3954
4043
|
paddingBlock: theme2.styles.gap,
|
|
3955
4044
|
paddingInline: (theme2.styles.space + theme2.styles.gap) / 2,
|
|
3956
4045
|
transition: theme2.styles.transition,
|
|
3957
|
-
children: /* @__PURE__ */
|
|
4046
|
+
children: /* @__PURE__ */ jsx16(Div_default.row, { width: "100%", flexWrap: "wrap", gap: theme2.styles.gap, children: selectedOption.map((option) => {
|
|
3958
4047
|
const ChipComponentTag = !option.renderType || option.renderType === "default" || option.renderType === "chip" ? Chip_default : option.renderType === "chip.colored" ? Chip_default.colored : Chip_default;
|
|
3959
4048
|
const withXButton = isFocused || isOpen;
|
|
3960
4049
|
return /* @__PURE__ */ createElement2(
|
|
3961
4050
|
ChipComponentTag,
|
|
3962
4051
|
{
|
|
3963
4052
|
text: option.label,
|
|
3964
|
-
afterText: withXButton && /* @__PURE__ */
|
|
4053
|
+
afterText: withXButton && /* @__PURE__ */ jsx16(
|
|
3965
4054
|
Button_default.icon,
|
|
3966
4055
|
{
|
|
3967
4056
|
icon: "XMark",
|
|
@@ -3983,8 +4072,8 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
3983
4072
|
}) })
|
|
3984
4073
|
}
|
|
3985
4074
|
) : void 0,
|
|
3986
|
-
insideInputFieldAfterComponent: /* @__PURE__ */ jsxs12(
|
|
3987
|
-
/* @__PURE__ */
|
|
4075
|
+
insideInputFieldAfterComponent: /* @__PURE__ */ jsxs12(Fragment6, { children: [
|
|
4076
|
+
/* @__PURE__ */ jsx16(
|
|
3988
4077
|
Div_default,
|
|
3989
4078
|
{
|
|
3990
4079
|
position: "absolute",
|
|
@@ -4006,7 +4095,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
4006
4095
|
transition: theme2.styles.transition,
|
|
4007
4096
|
role: "listbox",
|
|
4008
4097
|
"aria-label": label,
|
|
4009
|
-
children: isLoadingDebouncedSearchQuery || debounceIsLoading ? /* @__PURE__ */
|
|
4098
|
+
children: isLoadingDebouncedSearchQuery || debounceIsLoading ? /* @__PURE__ */ jsx16(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ jsx16(Loader_default.text, {}) }) : filteredOptions.length ? /* @__PURE__ */ jsx16(Fragment6, { children: (withoutRenderingOptionsWhenClosed ? isOpen || isOpenLate : true) ? renderedOptions : void 0 }) : /* @__PURE__ */ jsx16(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ jsx16(Text_default.unknown, { textAlign: "left", children: debounceMinimumSymbolsRequired !== void 0 && searchQuery.length < debounceMinimumSymbolsRequired ? `Enter at least ${debounceMinimumSymbolsRequired} characters` : "No options" }) })
|
|
4010
4099
|
}
|
|
4011
4100
|
),
|
|
4012
4101
|
/* @__PURE__ */ jsxs12(
|
|
@@ -4024,7 +4113,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
4024
4113
|
zIndex: isOpen || isOpenLate ? 1001 : void 0,
|
|
4025
4114
|
ref: buttonsRef,
|
|
4026
4115
|
children: [
|
|
4027
|
-
!withoutClearButton && /* @__PURE__ */
|
|
4116
|
+
!withoutClearButton && /* @__PURE__ */ jsx16(
|
|
4028
4117
|
Button_default.icon,
|
|
4029
4118
|
{
|
|
4030
4119
|
icon: "XMark",
|
|
@@ -4037,7 +4126,7 @@ var DropdownComponent = forwardRef10(function Dropdown(dropdownProps, ref) {
|
|
|
4037
4126
|
disabled: !withClearButton
|
|
4038
4127
|
}
|
|
4039
4128
|
),
|
|
4040
|
-
/* @__PURE__ */
|
|
4129
|
+
!withoutArrow && /* @__PURE__ */ jsx16(
|
|
4041
4130
|
Icon_default,
|
|
4042
4131
|
{
|
|
4043
4132
|
name: "chevronDown",
|
|
@@ -4074,8 +4163,8 @@ DropdownComponent.countries = forwardRef10(function Countries(dropdownProps, ref
|
|
|
4074
4163
|
const theme2 = useTheme17();
|
|
4075
4164
|
const renderOption = useCallback8(
|
|
4076
4165
|
(option, index, isSelected) => /* @__PURE__ */ jsxs12(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
4077
|
-
/* @__PURE__ */
|
|
4078
|
-
/* @__PURE__ */
|
|
4166
|
+
/* @__PURE__ */ jsx16(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
|
|
4167
|
+
/* @__PURE__ */ jsx16(Text_default, { children: option.label })
|
|
4079
4168
|
] }),
|
|
4080
4169
|
[]
|
|
4081
4170
|
);
|
|
@@ -4090,7 +4179,7 @@ DropdownComponent.countries = forwardRef10(function Countries(dropdownProps, ref
|
|
|
4090
4179
|
),
|
|
4091
4180
|
[]
|
|
4092
4181
|
);
|
|
4093
|
-
return /* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ jsx16(
|
|
4094
4183
|
DropdownComponent,
|
|
4095
4184
|
{
|
|
4096
4185
|
placeholder: "Select a country",
|
|
@@ -4102,15 +4191,63 @@ DropdownComponent.countries = forwardRef10(function Countries(dropdownProps, ref
|
|
|
4102
4191
|
}
|
|
4103
4192
|
);
|
|
4104
4193
|
});
|
|
4194
|
+
DropdownComponent.language = forwardRef10(function Countries2({ isSmall, ...dropdownProps }, ref) {
|
|
4195
|
+
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
4196
|
+
const { inputFieldClassName, ...props } = useComponentsPropsMerger(
|
|
4197
|
+
betterHtmlContextInternal.components.dropdown?.style?.language,
|
|
4198
|
+
dropdownProps
|
|
4199
|
+
);
|
|
4200
|
+
const theme2 = useTheme17();
|
|
4201
|
+
const renderOption = useCallback8(
|
|
4202
|
+
(option, index, isSelected) => /* @__PURE__ */ jsxs12(Div_default.row, { alignItems: "center", justifyContent: isSmall ? "center" : void 0, gap: theme2.styles.gap, children: [
|
|
4203
|
+
/* @__PURE__ */ jsx16(Image_default, { src: `https://flagcdn.com/w80/${option.data?.flagCode.toString().toLowerCase()}.webp`, width: 20 }),
|
|
4204
|
+
!isSmall && /* @__PURE__ */ jsx16(Text_default, { children: option.label })
|
|
4205
|
+
] }),
|
|
4206
|
+
[isSmall]
|
|
4207
|
+
);
|
|
4208
|
+
const onChange = useCallback8((value) => {
|
|
4209
|
+
betterHtmlContextInternal.setLanguage(value);
|
|
4210
|
+
localStorage.setItem("language", value);
|
|
4211
|
+
}, []);
|
|
4212
|
+
const options = useMemo4(
|
|
4213
|
+
() => Object.values(betterHtmlContextInternal.languages).map(
|
|
4214
|
+
(data) => ({
|
|
4215
|
+
value: data.code,
|
|
4216
|
+
label: isSmall ? data.code.toUpperCase() : data.name,
|
|
4217
|
+
data,
|
|
4218
|
+
searchValues: [data.code]
|
|
4219
|
+
})
|
|
4220
|
+
),
|
|
4221
|
+
[]
|
|
4222
|
+
);
|
|
4223
|
+
return /* @__PURE__ */ jsx16(
|
|
4224
|
+
DropdownComponent,
|
|
4225
|
+
{
|
|
4226
|
+
placeholder: isSmall ? "lang" : "Select a language",
|
|
4227
|
+
withoutClearButton: true,
|
|
4228
|
+
withoutArrow: isSmall,
|
|
4229
|
+
width: isSmall ? 60 : void 0,
|
|
4230
|
+
textAlign: isSmall ? "center" : void 0,
|
|
4231
|
+
inputFieldClassName: `${inputFieldClassName}${isSmall ? " react-better-html-dropdown-no-horizontal-padding" : ""}`,
|
|
4232
|
+
options,
|
|
4233
|
+
renderOption,
|
|
4234
|
+
value: betterHtmlContextInternal.language,
|
|
4235
|
+
onChange,
|
|
4236
|
+
ref,
|
|
4237
|
+
...props
|
|
4238
|
+
}
|
|
4239
|
+
);
|
|
4240
|
+
});
|
|
4105
4241
|
var Dropdown2 = memo16(DropdownComponent);
|
|
4106
4242
|
Dropdown2.countries = DropdownComponent.countries;
|
|
4243
|
+
Dropdown2.language = DropdownComponent.language;
|
|
4107
4244
|
var Dropdown_default = Dropdown2;
|
|
4108
4245
|
|
|
4109
4246
|
// src/components/Calendar.tsx
|
|
4110
4247
|
import { useCallback as useCallback9, useMemo as useMemo5, useState as useState6, memo as memo17, useEffect as useEffect8, useId } from "react";
|
|
4111
4248
|
import { useTheme as useTheme18 } from "react-better-core";
|
|
4112
4249
|
import styled9 from "styled-components";
|
|
4113
|
-
import { jsx as
|
|
4250
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4114
4251
|
var getMonthName = (month, short = false) => {
|
|
4115
4252
|
return [
|
|
4116
4253
|
short ? "Jan" : "January",
|
|
@@ -4226,28 +4363,28 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
4226
4363
|
}, [value]);
|
|
4227
4364
|
return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", maxWidth: 320, gap: theme2.styles.gap, padding: theme2.styles.space / 2, userSelect: "none", children: [
|
|
4228
4365
|
/* @__PURE__ */ jsxs13(Div_default.row, { width: "100%", justifyContent: "space-between", alignItems: "center", children: [
|
|
4229
|
-
/* @__PURE__ */
|
|
4366
|
+
/* @__PURE__ */ jsx17(Button_default.icon, { icon: "chevronLeft", onClick: onClickPreviousMonthButton }),
|
|
4230
4367
|
/* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "center", gap: 4, children: [
|
|
4231
|
-
/* @__PURE__ */
|
|
4232
|
-
/* @__PURE__ */
|
|
4233
|
-
/* @__PURE__ */
|
|
4234
|
-
/* @__PURE__ */
|
|
4235
|
-
/* @__PURE__ */
|
|
4368
|
+
/* @__PURE__ */ jsx17(Text_default, { fontWeight: 700, children: getMonthName(currentMonth) }),
|
|
4369
|
+
/* @__PURE__ */ jsx17(SelectWrapperComponent, { children: /* @__PURE__ */ jsxs13(Div_default.row, { position: "relative", alignItems: "center", gap: 2, children: [
|
|
4370
|
+
/* @__PURE__ */ jsx17(Text_default, { fontWeight: 700, children: currentYear }),
|
|
4371
|
+
/* @__PURE__ */ jsx17(Icon_default, { name: "chevronDown", size: 12 }),
|
|
4372
|
+
/* @__PURE__ */ jsx17(
|
|
4236
4373
|
SelectComponent,
|
|
4237
4374
|
{
|
|
4238
4375
|
theme: theme2,
|
|
4239
4376
|
value: currentYear,
|
|
4240
4377
|
onChange: onChangeYearSelect,
|
|
4241
4378
|
id: internalYearSelectId,
|
|
4242
|
-
children: yearsRange.map((year) => /* @__PURE__ */
|
|
4379
|
+
children: yearsRange.map((year) => /* @__PURE__ */ jsx17("option", { value: year, children: year }, year))
|
|
4243
4380
|
}
|
|
4244
4381
|
)
|
|
4245
4382
|
] }) })
|
|
4246
4383
|
] }),
|
|
4247
|
-
/* @__PURE__ */
|
|
4384
|
+
/* @__PURE__ */ jsx17(Button_default.icon, { icon: "chevronRight", onClick: onClickNextMonthButton })
|
|
4248
4385
|
] }),
|
|
4249
4386
|
/* @__PURE__ */ jsxs13(Div_default.grid, { width: "100%", gridTemplateColumns: "repeat(7, 1fr)", gap: theme2.styles.gap / 2, children: [
|
|
4250
|
-
weekDaysIndex.map((day) => /* @__PURE__ */
|
|
4387
|
+
weekDaysIndex.map((day) => /* @__PURE__ */ jsx17(Div_default.row, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", children: getWeekDayName(day, true) }) }, day)),
|
|
4251
4388
|
days.map((day, index) => {
|
|
4252
4389
|
const thisDayDate = new Date(currentYear, currentMonth, day);
|
|
4253
4390
|
const isSelected = day !== void 0 && day === currentDate?.getDate() && currentMonth === currentDate.getMonth() && currentYear === currentDate.getFullYear();
|
|
@@ -4271,7 +4408,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
4271
4408
|
value: day,
|
|
4272
4409
|
onClickWithValue: !isDisabled ? onClickDay : void 0,
|
|
4273
4410
|
children: [
|
|
4274
|
-
day && /* @__PURE__ */
|
|
4411
|
+
day && /* @__PURE__ */ jsx17(
|
|
4275
4412
|
Text_default,
|
|
4276
4413
|
{
|
|
4277
4414
|
fontSize: 14,
|
|
@@ -4280,7 +4417,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
4280
4417
|
children: day
|
|
4281
4418
|
}
|
|
4282
4419
|
),
|
|
4283
|
-
isDisabled && /* @__PURE__ */
|
|
4420
|
+
isDisabled && /* @__PURE__ */ jsx17(
|
|
4284
4421
|
Div_default,
|
|
4285
4422
|
{
|
|
4286
4423
|
position: "absolute",
|
|
@@ -4300,7 +4437,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
4300
4437
|
})
|
|
4301
4438
|
] }),
|
|
4302
4439
|
/* @__PURE__ */ jsxs13(Div_default.row, { width: "100%", justifyContent: "space-between", alignItems: "center", children: [
|
|
4303
|
-
/* @__PURE__ */
|
|
4440
|
+
/* @__PURE__ */ jsx17(Div_default, { isTabAccessed: true, cursor: "pointer", onClick: onClickClear, children: /* @__PURE__ */ jsx17(
|
|
4304
4441
|
Text_default,
|
|
4305
4442
|
{
|
|
4306
4443
|
fontSize: 14,
|
|
@@ -4310,7 +4447,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
4310
4447
|
children: "Clear"
|
|
4311
4448
|
}
|
|
4312
4449
|
) }),
|
|
4313
|
-
/* @__PURE__ */
|
|
4450
|
+
/* @__PURE__ */ jsx17(Div_default, { isTabAccessed: true, cursor: "pointer", onClick: onClickToday, children: /* @__PURE__ */ jsx17(
|
|
4314
4451
|
Text_default,
|
|
4315
4452
|
{
|
|
4316
4453
|
fontSize: 14,
|
|
@@ -4326,7 +4463,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
4326
4463
|
var Calendar_default = memo17(Calendar);
|
|
4327
4464
|
|
|
4328
4465
|
// src/components/InputField.tsx
|
|
4329
|
-
import { jsx as
|
|
4466
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4330
4467
|
var buttonWidth = 50;
|
|
4331
4468
|
var colorPickerSpacing = 4;
|
|
4332
4469
|
var colorPickerColorWidth = 12 + 27 + colorPickerSpacing;
|
|
@@ -4436,6 +4573,15 @@ var InputElement = styled10.input.withConfig({
|
|
|
4436
4573
|
&.react-better-html-dropdown {
|
|
4437
4574
|
padding-right: ${(props) => props.theme.styles.space + 16 + props.theme.styles.space - props.theme.styles.borderWidth}px;
|
|
4438
4575
|
|
|
4576
|
+
&.react-better-html-dropdown-without-arrow {
|
|
4577
|
+
padding-right: ${(props) => props.theme.styles.space}px;
|
|
4578
|
+
}
|
|
4579
|
+
|
|
4580
|
+
&.react-better-html-dropdown-no-horizontal-padding {
|
|
4581
|
+
padding-left: 0px;
|
|
4582
|
+
padding-right: 0px;
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4439
4585
|
&.react-better-html-dropdown-multiselect {
|
|
4440
4586
|
border-top: none;
|
|
4441
4587
|
border-top-left-radius: 0px;
|
|
@@ -4573,7 +4719,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4573
4719
|
}, [withDebounce, onChangeValue, debouncedValue]);
|
|
4574
4720
|
const readyId = id ?? internalId;
|
|
4575
4721
|
return /* @__PURE__ */ jsxs14(Div_default.column, { width: "100%", gap: labelGap ?? theme2.styles.gap / 2, ...excludeStyle, children: [
|
|
4576
|
-
label && /* @__PURE__ */
|
|
4722
|
+
label && /* @__PURE__ */ jsx18(
|
|
4577
4723
|
Label_default,
|
|
4578
4724
|
{
|
|
4579
4725
|
text: label,
|
|
@@ -4588,7 +4734,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4588
4734
|
}
|
|
4589
4735
|
),
|
|
4590
4736
|
/* @__PURE__ */ jsxs14(Div_default.row, { alignItems: "stretch", width: "100%", children: [
|
|
4591
|
-
prefix && /* @__PURE__ */
|
|
4737
|
+
prefix && /* @__PURE__ */ jsx18(
|
|
4592
4738
|
Div_default.row,
|
|
4593
4739
|
{
|
|
4594
4740
|
alignItems: "center",
|
|
@@ -4605,7 +4751,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4605
4751
|
/* @__PURE__ */ jsxs14(Div_default, { position: "relative", width: "100%", height: "fit-content", ref: holderRef, children: [
|
|
4606
4752
|
insideInputFieldBeforeComponent,
|
|
4607
4753
|
/* @__PURE__ */ jsxs14(Div_default, { position: "relative", width: "100%", height: "fit-content", children: [
|
|
4608
|
-
leftIcon && /* @__PURE__ */
|
|
4754
|
+
leftIcon && /* @__PURE__ */ jsx18(
|
|
4609
4755
|
Icon_default,
|
|
4610
4756
|
{
|
|
4611
4757
|
name: leftIcon,
|
|
@@ -4617,7 +4763,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4617
4763
|
zIndex: leftIconZIndex
|
|
4618
4764
|
}
|
|
4619
4765
|
),
|
|
4620
|
-
/* @__PURE__ */
|
|
4766
|
+
/* @__PURE__ */ jsx18(
|
|
4621
4767
|
InputElement,
|
|
4622
4768
|
{
|
|
4623
4769
|
theme: theme2,
|
|
@@ -4639,7 +4785,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4639
4785
|
ref
|
|
4640
4786
|
}
|
|
4641
4787
|
),
|
|
4642
|
-
rightIcon ? onClickRightIcon ? /* @__PURE__ */
|
|
4788
|
+
rightIcon ? onClickRightIcon ? /* @__PURE__ */ jsx18(
|
|
4643
4789
|
Button_default.icon,
|
|
4644
4790
|
{
|
|
4645
4791
|
icon: rightIcon,
|
|
@@ -4649,7 +4795,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4649
4795
|
transform: "translateY(-50%)",
|
|
4650
4796
|
onClick: onClickRightIcon
|
|
4651
4797
|
}
|
|
4652
|
-
) : /* @__PURE__ */
|
|
4798
|
+
) : /* @__PURE__ */ jsx18(
|
|
4653
4799
|
Icon_default,
|
|
4654
4800
|
{
|
|
4655
4801
|
name: rightIcon,
|
|
@@ -4663,7 +4809,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4663
4809
|
insideInputFieldAfterComponent
|
|
4664
4810
|
] })
|
|
4665
4811
|
] }),
|
|
4666
|
-
suffix && /* @__PURE__ */
|
|
4812
|
+
suffix && /* @__PURE__ */ jsx18(
|
|
4667
4813
|
Div_default.row,
|
|
4668
4814
|
{
|
|
4669
4815
|
alignItems: "center",
|
|
@@ -4678,7 +4824,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4678
4824
|
}
|
|
4679
4825
|
)
|
|
4680
4826
|
] }),
|
|
4681
|
-
(errorText || infoText) && /* @__PURE__ */
|
|
4827
|
+
(errorText || infoText) && /* @__PURE__ */ jsx18(
|
|
4682
4828
|
Text_default,
|
|
4683
4829
|
{
|
|
4684
4830
|
as: "span",
|
|
@@ -4730,7 +4876,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4730
4876
|
);
|
|
4731
4877
|
const readyId = id ?? internalId;
|
|
4732
4878
|
return /* @__PURE__ */ jsxs14(Div_default.column, { gap: labelGap ?? theme2.styles.gap / 2, children: [
|
|
4733
|
-
label && /* @__PURE__ */
|
|
4879
|
+
label && /* @__PURE__ */ jsx18(
|
|
4734
4880
|
Label_default,
|
|
4735
4881
|
{
|
|
4736
4882
|
text: label,
|
|
@@ -4745,7 +4891,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4745
4891
|
}
|
|
4746
4892
|
),
|
|
4747
4893
|
/* @__PURE__ */ jsxs14(Div_default, { position: "relative", width: "100%", children: [
|
|
4748
|
-
leftIcon && /* @__PURE__ */
|
|
4894
|
+
leftIcon && /* @__PURE__ */ jsx18(
|
|
4749
4895
|
Icon_default,
|
|
4750
4896
|
{
|
|
4751
4897
|
name: leftIcon,
|
|
@@ -4756,7 +4902,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4756
4902
|
pointerEvents: "none"
|
|
4757
4903
|
}
|
|
4758
4904
|
),
|
|
4759
|
-
/* @__PURE__ */
|
|
4905
|
+
/* @__PURE__ */ jsx18(
|
|
4760
4906
|
TextareaElement,
|
|
4761
4907
|
{
|
|
4762
4908
|
theme: theme2,
|
|
@@ -4776,7 +4922,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4776
4922
|
ref
|
|
4777
4923
|
}
|
|
4778
4924
|
),
|
|
4779
|
-
rightIcon ? onClickRightIcon ? /* @__PURE__ */
|
|
4925
|
+
rightIcon ? onClickRightIcon ? /* @__PURE__ */ jsx18(
|
|
4780
4926
|
Button_default.icon,
|
|
4781
4927
|
{
|
|
4782
4928
|
icon: rightIcon,
|
|
@@ -4786,7 +4932,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4786
4932
|
transform: "translateY(-50%)",
|
|
4787
4933
|
onClick: onClickRightIcon
|
|
4788
4934
|
}
|
|
4789
|
-
) : /* @__PURE__ */
|
|
4935
|
+
) : /* @__PURE__ */ jsx18(
|
|
4790
4936
|
Icon_default,
|
|
4791
4937
|
{
|
|
4792
4938
|
name: rightIcon,
|
|
@@ -4798,7 +4944,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4798
4944
|
}
|
|
4799
4945
|
) : void 0
|
|
4800
4946
|
] }),
|
|
4801
|
-
(errorText || infoText) && /* @__PURE__ */
|
|
4947
|
+
(errorText || infoText) && /* @__PURE__ */ jsx18(
|
|
4802
4948
|
Text_default,
|
|
4803
4949
|
{
|
|
4804
4950
|
as: "span",
|
|
@@ -4817,7 +4963,7 @@ InputFieldComponent.email = forwardRef11(function Email(inputFieldProps, ref) {
|
|
|
4817
4963
|
betterHtmlContextInternal.components.inputField?.style?.email,
|
|
4818
4964
|
inputFieldProps
|
|
4819
4965
|
);
|
|
4820
|
-
return /* @__PURE__ */
|
|
4966
|
+
return /* @__PURE__ */ jsx18(
|
|
4821
4967
|
InputFieldComponent,
|
|
4822
4968
|
{
|
|
4823
4969
|
type: "email",
|
|
@@ -4837,7 +4983,7 @@ InputFieldComponent.password = forwardRef11(function Password(inputFieldProps, r
|
|
|
4837
4983
|
inputFieldProps
|
|
4838
4984
|
);
|
|
4839
4985
|
const [isPassword, setIsPassword] = useBooleanState5(true);
|
|
4840
|
-
return /* @__PURE__ */
|
|
4986
|
+
return /* @__PURE__ */ jsx18(
|
|
4841
4987
|
InputFieldComponent,
|
|
4842
4988
|
{
|
|
4843
4989
|
type: isPassword ? "password" : "text",
|
|
@@ -4884,7 +5030,7 @@ InputFieldComponent.search = forwardRef11(function Search(inputFieldProps, ref)
|
|
|
4884
5030
|
const onClickRightIcon = useCallback10(() => {
|
|
4885
5031
|
onChangeValueElement("");
|
|
4886
5032
|
}, [onChangeValueElement]);
|
|
4887
|
-
return /* @__PURE__ */
|
|
5033
|
+
return /* @__PURE__ */ jsx18(
|
|
4888
5034
|
InputFieldComponent,
|
|
4889
5035
|
{
|
|
4890
5036
|
leftIcon: "magnifyingGlass",
|
|
@@ -4920,8 +5066,8 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber(inputFieldPr
|
|
|
4920
5066
|
const [inputFieldValue, setInputFieldValue] = useState7(value?.toString() ?? "");
|
|
4921
5067
|
const renderOption = useCallback10(
|
|
4922
5068
|
(option, index, isSelected) => /* @__PURE__ */ jsxs14(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
4923
|
-
/* @__PURE__ */
|
|
4924
|
-
/* @__PURE__ */
|
|
5069
|
+
/* @__PURE__ */ jsx18(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
|
|
5070
|
+
/* @__PURE__ */ jsx18(Text_default, { children: option.label })
|
|
4925
5071
|
] }),
|
|
4926
5072
|
[]
|
|
4927
5073
|
);
|
|
@@ -4973,7 +5119,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber(inputFieldPr
|
|
|
4973
5119
|
const readyId = id ?? internalId;
|
|
4974
5120
|
const readyLabel = betterHtmlContextInternal.components.inputField?.style?.phoneNumber?.label ?? label;
|
|
4975
5121
|
return /* @__PURE__ */ jsxs14(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, children: [
|
|
4976
|
-
readyLabel && /* @__PURE__ */
|
|
5122
|
+
readyLabel && /* @__PURE__ */ jsx18(
|
|
4977
5123
|
Label_default,
|
|
4978
5124
|
{
|
|
4979
5125
|
text: readyLabel,
|
|
@@ -4988,7 +5134,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber(inputFieldPr
|
|
|
4988
5134
|
}
|
|
4989
5135
|
),
|
|
4990
5136
|
/* @__PURE__ */ jsxs14(Div_default.row, { children: [
|
|
4991
|
-
/* @__PURE__ */
|
|
5137
|
+
/* @__PURE__ */ jsx18(
|
|
4992
5138
|
Dropdown_default,
|
|
4993
5139
|
{
|
|
4994
5140
|
options,
|
|
@@ -5006,7 +5152,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber(inputFieldPr
|
|
|
5006
5152
|
withoutRenderingOptionsWhenClosed: true
|
|
5007
5153
|
}
|
|
5008
5154
|
),
|
|
5009
|
-
/* @__PURE__ */
|
|
5155
|
+
/* @__PURE__ */ jsx18(
|
|
5010
5156
|
InputFieldComponent,
|
|
5011
5157
|
{
|
|
5012
5158
|
...betterHtmlContextInternal.components.inputField?.style?.phoneNumber,
|
|
@@ -5046,7 +5192,7 @@ InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, dropd
|
|
|
5046
5192
|
},
|
|
5047
5193
|
[restInputFieldProps.onChangeValue]
|
|
5048
5194
|
);
|
|
5049
|
-
return /* @__PURE__ */
|
|
5195
|
+
return /* @__PURE__ */ jsx18(
|
|
5050
5196
|
InputFieldComponent,
|
|
5051
5197
|
{
|
|
5052
5198
|
...betterHtmlContextInternal.components.inputField?.style?.date,
|
|
@@ -5066,7 +5212,7 @@ InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, dropd
|
|
|
5066
5212
|
userSelect: "none",
|
|
5067
5213
|
...insideInputFieldComponentProps,
|
|
5068
5214
|
children: [
|
|
5069
|
-
/* @__PURE__ */
|
|
5215
|
+
/* @__PURE__ */ jsx18(
|
|
5070
5216
|
Div_default,
|
|
5071
5217
|
{
|
|
5072
5218
|
position: "absolute",
|
|
@@ -5079,7 +5225,7 @@ InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, dropd
|
|
|
5079
5225
|
transition: theme2.styles.transition
|
|
5080
5226
|
}
|
|
5081
5227
|
),
|
|
5082
|
-
/* @__PURE__ */
|
|
5228
|
+
/* @__PURE__ */ jsx18(Calendar_default, { value: internalValue, minDate, maxDate, onChange })
|
|
5083
5229
|
]
|
|
5084
5230
|
}
|
|
5085
5231
|
) : void 0,
|
|
@@ -5189,7 +5335,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5189
5335
|
const valueHour = parseInt(internalValue?.toString().split("T")?.[1]?.split(":")?.[0]).toString();
|
|
5190
5336
|
const valueMinute = parseInt(internalValue?.toString().split("T")?.[1]?.split(":")?.[1]).toString();
|
|
5191
5337
|
const topSpacing = 32 + theme2.styles.space / 2 + theme2.styles.gap;
|
|
5192
|
-
return /* @__PURE__ */
|
|
5338
|
+
return /* @__PURE__ */ jsx18(
|
|
5193
5339
|
InputFieldComponent,
|
|
5194
5340
|
{
|
|
5195
5341
|
...betterHtmlContextInternal.components.inputField?.style?.dateTime,
|
|
@@ -5210,7 +5356,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5210
5356
|
userSelect: "none",
|
|
5211
5357
|
...insideInputFieldComponentProps,
|
|
5212
5358
|
children: [
|
|
5213
|
-
/* @__PURE__ */
|
|
5359
|
+
/* @__PURE__ */ jsx18(
|
|
5214
5360
|
Div_default,
|
|
5215
5361
|
{
|
|
5216
5362
|
position: "absolute",
|
|
@@ -5224,7 +5370,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5224
5370
|
}
|
|
5225
5371
|
),
|
|
5226
5372
|
/* @__PURE__ */ jsxs14(Div_default.row, { gap: theme2.styles.space, children: [
|
|
5227
|
-
/* @__PURE__ */
|
|
5373
|
+
/* @__PURE__ */ jsx18(Calendar_default, { value: internalValue, minDate, maxDate, onChange }),
|
|
5228
5374
|
/* @__PURE__ */ jsxs14(
|
|
5229
5375
|
Div_default.row,
|
|
5230
5376
|
{
|
|
@@ -5235,8 +5381,8 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5235
5381
|
paddingRight: theme2.styles.space / 2,
|
|
5236
5382
|
children: [
|
|
5237
5383
|
/* @__PURE__ */ jsxs14(Div_default, { height: "100%", children: [
|
|
5238
|
-
/* @__PURE__ */
|
|
5239
|
-
/* @__PURE__ */
|
|
5384
|
+
/* @__PURE__ */ jsx18(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "H" }),
|
|
5385
|
+
/* @__PURE__ */ jsx18(
|
|
5240
5386
|
Div_default,
|
|
5241
5387
|
{
|
|
5242
5388
|
className: "react-better-html-no-scrollbar",
|
|
@@ -5246,7 +5392,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5246
5392
|
tabIndex: -1,
|
|
5247
5393
|
children: readyHours.map((hour) => {
|
|
5248
5394
|
const isSelected = hour.toString() === valueHour;
|
|
5249
|
-
return /* @__PURE__ */
|
|
5395
|
+
return /* @__PURE__ */ jsx18(
|
|
5250
5396
|
Div_default.row,
|
|
5251
5397
|
{
|
|
5252
5398
|
alignItems: "center",
|
|
@@ -5260,7 +5406,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5260
5406
|
value: hour,
|
|
5261
5407
|
onClickWithValue: onClickHour,
|
|
5262
5408
|
ref: isSelected ? selectedHourRef : void 0,
|
|
5263
|
-
children: /* @__PURE__ */
|
|
5409
|
+
children: /* @__PURE__ */ jsx18(Text_default, { textAlign: "center", children: hour.toString().padStart(2, "0") })
|
|
5264
5410
|
},
|
|
5265
5411
|
hour
|
|
5266
5412
|
);
|
|
@@ -5269,8 +5415,8 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5269
5415
|
)
|
|
5270
5416
|
] }),
|
|
5271
5417
|
/* @__PURE__ */ jsxs14(Div_default, { height: "100%", children: [
|
|
5272
|
-
/* @__PURE__ */
|
|
5273
|
-
/* @__PURE__ */
|
|
5418
|
+
/* @__PURE__ */ jsx18(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "M" }),
|
|
5419
|
+
/* @__PURE__ */ jsx18(
|
|
5274
5420
|
Div_default,
|
|
5275
5421
|
{
|
|
5276
5422
|
className: "react-better-html-no-scrollbar",
|
|
@@ -5280,7 +5426,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5280
5426
|
tabIndex: -1,
|
|
5281
5427
|
children: readyMinutes.map((minute) => {
|
|
5282
5428
|
const isSelected = minute.toString() === valueMinute;
|
|
5283
|
-
return /* @__PURE__ */
|
|
5429
|
+
return /* @__PURE__ */ jsx18(
|
|
5284
5430
|
Div_default.row,
|
|
5285
5431
|
{
|
|
5286
5432
|
alignItems: "center",
|
|
@@ -5294,7 +5440,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({
|
|
|
5294
5440
|
value: minute,
|
|
5295
5441
|
onClickWithValue: onClickMinute,
|
|
5296
5442
|
ref: isSelected ? selectedMinuteRef : void 0,
|
|
5297
|
-
children: /* @__PURE__ */
|
|
5443
|
+
children: /* @__PURE__ */ jsx18(Text_default, { textAlign: "center", children: minute.toString().padStart(2, "0") })
|
|
5298
5444
|
},
|
|
5299
5445
|
minute
|
|
5300
5446
|
);
|
|
@@ -5400,7 +5546,7 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
5400
5546
|
}, [isOpen]);
|
|
5401
5547
|
const valueHour = parseInt(internalValue?.toString().split(":")?.[0]).toString();
|
|
5402
5548
|
const valueMinute = parseInt(internalValue?.toString().split(":")?.[1]).toString();
|
|
5403
|
-
return /* @__PURE__ */
|
|
5549
|
+
return /* @__PURE__ */ jsx18(
|
|
5404
5550
|
InputFieldComponent,
|
|
5405
5551
|
{
|
|
5406
5552
|
...betterHtmlContextInternal.components.inputField?.style?.time,
|
|
@@ -5422,7 +5568,7 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
5422
5568
|
userSelect: "none",
|
|
5423
5569
|
...insideInputFieldComponentProps,
|
|
5424
5570
|
children: [
|
|
5425
|
-
/* @__PURE__ */
|
|
5571
|
+
/* @__PURE__ */ jsx18(
|
|
5426
5572
|
Div_default,
|
|
5427
5573
|
{
|
|
5428
5574
|
position: "absolute",
|
|
@@ -5436,7 +5582,7 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
5436
5582
|
}
|
|
5437
5583
|
),
|
|
5438
5584
|
/* @__PURE__ */ jsxs14(Div_default.row, { height: "100%", children: [
|
|
5439
|
-
/* @__PURE__ */
|
|
5585
|
+
/* @__PURE__ */ jsx18(
|
|
5440
5586
|
Div_default,
|
|
5441
5587
|
{
|
|
5442
5588
|
className: "react-better-html-no-scrollbar",
|
|
@@ -5447,7 +5593,7 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
5447
5593
|
children: readyHours.map((hour) => {
|
|
5448
5594
|
const isSelected = hour.toString() === valueHour;
|
|
5449
5595
|
const isDisabled = minHours && hour < minHours || maxHours && hour > maxHours;
|
|
5450
|
-
return /* @__PURE__ */
|
|
5596
|
+
return /* @__PURE__ */ jsx18(
|
|
5451
5597
|
Div_default.row,
|
|
5452
5598
|
{
|
|
5453
5599
|
alignItems: "center",
|
|
@@ -5461,14 +5607,14 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
5461
5607
|
value: hour,
|
|
5462
5608
|
onClickWithValue: !isDisabled ? onClickHour : void 0,
|
|
5463
5609
|
ref: isSelected ? selectedHourRef : void 0,
|
|
5464
|
-
children: /* @__PURE__ */
|
|
5610
|
+
children: /* @__PURE__ */ jsx18(Text_default, { textAlign: "center", children: hour.toString().padStart(2, "0") })
|
|
5465
5611
|
},
|
|
5466
5612
|
hour
|
|
5467
5613
|
);
|
|
5468
5614
|
})
|
|
5469
5615
|
}
|
|
5470
5616
|
),
|
|
5471
|
-
/* @__PURE__ */
|
|
5617
|
+
/* @__PURE__ */ jsx18(
|
|
5472
5618
|
Div_default,
|
|
5473
5619
|
{
|
|
5474
5620
|
className: "react-better-html-no-scrollbar",
|
|
@@ -5480,7 +5626,7 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
5480
5626
|
const isSelected = minute.toString() === valueMinute;
|
|
5481
5627
|
const currentHour = parseInt(valueHour);
|
|
5482
5628
|
const isDisabled = minHours !== void 0 && minMinutes !== void 0 && currentHour === minHours && minute < minMinutes || maxHours !== void 0 && maxMinutes !== void 0 && currentHour === maxHours && minute > maxMinutes;
|
|
5483
|
-
return /* @__PURE__ */
|
|
5629
|
+
return /* @__PURE__ */ jsx18(
|
|
5484
5630
|
Div_default.row,
|
|
5485
5631
|
{
|
|
5486
5632
|
alignItems: "center",
|
|
@@ -5494,7 +5640,7 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
5494
5640
|
value: minute,
|
|
5495
5641
|
onClickWithValue: !isDisabled ? onClickMinute : void 0,
|
|
5496
5642
|
ref: isSelected ? selectedMinuteRef : void 0,
|
|
5497
|
-
children: /* @__PURE__ */
|
|
5643
|
+
children: /* @__PURE__ */ jsx18(Text_default, { textAlign: "center", children: minute.toString().padStart(2, "0") })
|
|
5498
5644
|
},
|
|
5499
5645
|
minute
|
|
5500
5646
|
);
|
|
@@ -5532,12 +5678,12 @@ InputFieldComponent.color = forwardRef11(function Color4({ ...inputFieldProps },
|
|
|
5532
5678
|
if (value === void 0) return;
|
|
5533
5679
|
setInputFieldValue(value);
|
|
5534
5680
|
}, [value]);
|
|
5535
|
-
return /* @__PURE__ */
|
|
5681
|
+
return /* @__PURE__ */ jsx18(
|
|
5536
5682
|
InputFieldComponent,
|
|
5537
5683
|
{
|
|
5538
5684
|
...betterHtmlContextInternal.components.inputField?.style?.color,
|
|
5539
5685
|
type: "color",
|
|
5540
|
-
insideInputFieldAfterComponent: /* @__PURE__ */
|
|
5686
|
+
insideInputFieldAfterComponent: /* @__PURE__ */ jsx18(
|
|
5541
5687
|
Div_default.row,
|
|
5542
5688
|
{
|
|
5543
5689
|
position: "absolute",
|
|
@@ -5549,7 +5695,7 @@ InputFieldComponent.color = forwardRef11(function Color4({ ...inputFieldProps },
|
|
|
5549
5695
|
pointerEvents: "none",
|
|
5550
5696
|
userSelect: "none",
|
|
5551
5697
|
paddingLeft: colorPickerColorWidth,
|
|
5552
|
-
children: /* @__PURE__ */
|
|
5698
|
+
children: /* @__PURE__ */ jsx18(Text_default, { children: inputFieldValue })
|
|
5553
5699
|
}
|
|
5554
5700
|
),
|
|
5555
5701
|
value: inputFieldValue,
|
|
@@ -5575,7 +5721,7 @@ var InputField_default = InputField2;
|
|
|
5575
5721
|
import { forwardRef as forwardRef12, useCallback as useCallback11, useId as useId3, useState as useState8 } from "react";
|
|
5576
5722
|
import { useBetterCoreContext as useBetterCoreContext8, useBooleanState as useBooleanState6, useTheme as useTheme20 } from "react-better-core";
|
|
5577
5723
|
import styled11, { css as css4 } from "styled-components";
|
|
5578
|
-
import { jsx as
|
|
5724
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5579
5725
|
var componentSize = 26;
|
|
5580
5726
|
var switchComponentBallGap = 3;
|
|
5581
5727
|
var switchComponentMouseDownDifference = 4;
|
|
@@ -5720,7 +5866,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5720
5866
|
}, [checked, controlledChecked, onChange, value]);
|
|
5721
5867
|
const readyId = id ?? internalId;
|
|
5722
5868
|
return /* @__PURE__ */ jsxs15(Div_default.column, { gap: labelGap ?? theme2.styles.gap, ...excludeStyle, children: [
|
|
5723
|
-
label && /* @__PURE__ */
|
|
5869
|
+
label && /* @__PURE__ */ jsx19(
|
|
5724
5870
|
Label_default,
|
|
5725
5871
|
{
|
|
5726
5872
|
text: label,
|
|
@@ -5736,7 +5882,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5736
5882
|
),
|
|
5737
5883
|
/* @__PURE__ */ jsxs15(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
5738
5884
|
/* @__PURE__ */ jsxs15(Div_default.row, { position: "relative", alignItems: "center", children: [
|
|
5739
|
-
/* @__PURE__ */
|
|
5885
|
+
/* @__PURE__ */ jsx19(
|
|
5740
5886
|
InputElement2,
|
|
5741
5887
|
{
|
|
5742
5888
|
theme: theme2,
|
|
@@ -5754,7 +5900,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5754
5900
|
...ariaProps
|
|
5755
5901
|
}
|
|
5756
5902
|
),
|
|
5757
|
-
props.type === "checkbox" ? /* @__PURE__ */
|
|
5903
|
+
props.type === "checkbox" ? /* @__PURE__ */ jsx19(
|
|
5758
5904
|
Icon_default,
|
|
5759
5905
|
{
|
|
5760
5906
|
name: "check",
|
|
@@ -5768,7 +5914,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5768
5914
|
pointerEvents: "none",
|
|
5769
5915
|
transition: theme2.styles.transition
|
|
5770
5916
|
}
|
|
5771
|
-
) : props.type === "radio" ? /* @__PURE__ */
|
|
5917
|
+
) : props.type === "radio" ? /* @__PURE__ */ jsx19(
|
|
5772
5918
|
Div_default,
|
|
5773
5919
|
{
|
|
5774
5920
|
position: "absolute",
|
|
@@ -5811,7 +5957,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5811
5957
|
] })
|
|
5812
5958
|
] }) : void 0
|
|
5813
5959
|
] }),
|
|
5814
|
-
(errorText || infoText) && /* @__PURE__ */
|
|
5960
|
+
(errorText || infoText) && /* @__PURE__ */ jsx19(
|
|
5815
5961
|
Text_default,
|
|
5816
5962
|
{
|
|
5817
5963
|
as: "span",
|
|
@@ -5830,7 +5976,7 @@ var ToggleInput_default = {
|
|
|
5830
5976
|
betterHtmlContextInternal.components.toggleInput?.style?.checkbox,
|
|
5831
5977
|
checkboxProps
|
|
5832
5978
|
);
|
|
5833
|
-
return /* @__PURE__ */
|
|
5979
|
+
return /* @__PURE__ */ jsx19(ToggleInputComponent, { type: "checkbox", ref, ...props });
|
|
5834
5980
|
}),
|
|
5835
5981
|
radiobutton: forwardRef12(function RadioButton(radiobuttonProps, ref) {
|
|
5836
5982
|
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
@@ -5838,7 +5984,7 @@ var ToggleInput_default = {
|
|
|
5838
5984
|
betterHtmlContextInternal.components.toggleInput?.style?.radiobutton,
|
|
5839
5985
|
radiobuttonProps
|
|
5840
5986
|
);
|
|
5841
|
-
return /* @__PURE__ */
|
|
5987
|
+
return /* @__PURE__ */ jsx19(ToggleInputComponent, { type: "radio", ref, ...props });
|
|
5842
5988
|
}),
|
|
5843
5989
|
switch: forwardRef12(function Switch(switchProps, ref) {
|
|
5844
5990
|
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
@@ -5878,7 +6024,7 @@ var ToggleInput_default = {
|
|
|
5878
6024
|
}, [disabled, checked, onChange, controlledChecked, value]);
|
|
5879
6025
|
const readyId = id ?? internalId;
|
|
5880
6026
|
return /* @__PURE__ */ jsxs15(Div_default.column, { width: "fit-content", gap: theme2.styles.gap, ...excludeStyle, children: [
|
|
5881
|
-
label && /* @__PURE__ */
|
|
6027
|
+
label && /* @__PURE__ */ jsx19(
|
|
5882
6028
|
Label_default,
|
|
5883
6029
|
{
|
|
5884
6030
|
text: label,
|
|
@@ -5892,7 +6038,7 @@ var ToggleInput_default = {
|
|
|
5892
6038
|
htmlFor: readyId
|
|
5893
6039
|
}
|
|
5894
6040
|
),
|
|
5895
|
-
/* @__PURE__ */
|
|
6041
|
+
/* @__PURE__ */ jsx19(
|
|
5896
6042
|
Div_default.row,
|
|
5897
6043
|
{
|
|
5898
6044
|
alignItems: "center",
|
|
@@ -5906,7 +6052,7 @@ var ToggleInput_default = {
|
|
|
5906
6052
|
onTouchStart: setIsMouseDown.setTrue,
|
|
5907
6053
|
onTouchEnd: setIsMouseDown.setFalse,
|
|
5908
6054
|
onTouchCancel: setIsMouseDown.setFalse,
|
|
5909
|
-
children: /* @__PURE__ */
|
|
6055
|
+
children: /* @__PURE__ */ jsx19(
|
|
5910
6056
|
SwitchElement,
|
|
5911
6057
|
{
|
|
5912
6058
|
theme: theme2,
|
|
@@ -5926,7 +6072,7 @@ var ToggleInput_default = {
|
|
|
5926
6072
|
)
|
|
5927
6073
|
}
|
|
5928
6074
|
),
|
|
5929
|
-
(errorText || infoText) && /* @__PURE__ */
|
|
6075
|
+
(errorText || infoText) && /* @__PURE__ */ jsx19(
|
|
5930
6076
|
Text_default,
|
|
5931
6077
|
{
|
|
5932
6078
|
as: "span",
|
|
@@ -5941,9 +6087,9 @@ var ToggleInput_default = {
|
|
|
5941
6087
|
};
|
|
5942
6088
|
|
|
5943
6089
|
// src/components/Form.tsx
|
|
5944
|
-
import { Children, forwardRef as forwardRef13, Fragment as
|
|
6090
|
+
import { Children, forwardRef as forwardRef13, Fragment as Fragment7, memo as memo19, useMemo as useMemo7 } from "react";
|
|
5945
6091
|
import { useTheme as useTheme21 } from "react-better-core";
|
|
5946
|
-
import { jsx as
|
|
6092
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5947
6093
|
var FormComponent = forwardRef13(function Form({
|
|
5948
6094
|
form,
|
|
5949
6095
|
name,
|
|
@@ -5977,10 +6123,10 @@ var FormComponent = forwardRef13(function Form({
|
|
|
5977
6123
|
}, [form]);
|
|
5978
6124
|
const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
|
|
5979
6125
|
const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
|
|
5980
|
-
return /* @__PURE__ */
|
|
5981
|
-
gap !== void 0 || withDividers ? /* @__PURE__ */
|
|
6126
|
+
return /* @__PURE__ */ jsx20(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs16("form", { name, onSubmit: onSubmit ?? form?.onSubmit, id, ref, children: [
|
|
6127
|
+
gap !== void 0 || withDividers ? /* @__PURE__ */ jsx20(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
5982
6128
|
child,
|
|
5983
|
-
index < Children.toArray(children).length - 1 && /* @__PURE__ */
|
|
6129
|
+
index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx20(
|
|
5984
6130
|
Divider_default.horizontal,
|
|
5985
6131
|
{
|
|
5986
6132
|
width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth
|
|
@@ -5996,7 +6142,7 @@ var FormComponent = forwardRef13(function Form({
|
|
|
5996
6142
|
marginTop: theme2.styles.space,
|
|
5997
6143
|
children: [
|
|
5998
6144
|
renderActionButtons,
|
|
5999
|
-
onClickCancel && /* @__PURE__ */
|
|
6145
|
+
onClickCancel && /* @__PURE__ */ jsx20(
|
|
6000
6146
|
Button_default.secondary,
|
|
6001
6147
|
{
|
|
6002
6148
|
text: cancelButtonText ?? "Cancel",
|
|
@@ -6007,7 +6153,7 @@ var FormComponent = forwardRef13(function Form({
|
|
|
6007
6153
|
onClick: onClickCancel
|
|
6008
6154
|
}
|
|
6009
6155
|
),
|
|
6010
|
-
/* @__PURE__ */
|
|
6156
|
+
/* @__PURE__ */ jsx20(
|
|
6011
6157
|
SubmitButtonTag,
|
|
6012
6158
|
{
|
|
6013
6159
|
text: submitButtonText,
|
|
@@ -6029,7 +6175,7 @@ var Form_default = Form2;
|
|
|
6029
6175
|
// src/components/FormRow.tsx
|
|
6030
6176
|
import { forwardRef as forwardRef14, memo as memo20 } from "react";
|
|
6031
6177
|
import { useTheme as useTheme22 } from "react-better-core";
|
|
6032
|
-
import { jsx as
|
|
6178
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6033
6179
|
var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPoint, asColumn, gap, children, ...props }, ref) {
|
|
6034
6180
|
const theme2 = useTheme22();
|
|
6035
6181
|
const mediaQuery = useMediaQuery();
|
|
@@ -6037,7 +6183,7 @@ var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPo
|
|
|
6037
6183
|
const readyGap = breakingPoint || noBreakingPoint && mediaQuery.size900 ? theme2.styles.gap : theme2.styles.space * 2;
|
|
6038
6184
|
return /* @__PURE__ */ jsxs17(Div_default.row, { alignItems: "center", gap: gap ?? readyGap, invertFlexDirection: breakingPoint, ...props, ref, children: [
|
|
6039
6185
|
children,
|
|
6040
|
-
oneItemOnly && /* @__PURE__ */
|
|
6186
|
+
oneItemOnly && /* @__PURE__ */ jsx21(Div_default, { width: "100%" })
|
|
6041
6187
|
] });
|
|
6042
6188
|
});
|
|
6043
6189
|
FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
@@ -6063,7 +6209,7 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
6063
6209
|
const titleGap = theme2.styles.space;
|
|
6064
6210
|
return /* @__PURE__ */ jsxs17(FormRowComponent, { ...props, ref, children: [
|
|
6065
6211
|
/* @__PURE__ */ jsxs17(Div_default.row, { width: "100%", alignItems: "center", gap: titleGap, children: [
|
|
6066
|
-
icon && /* @__PURE__ */
|
|
6212
|
+
icon && /* @__PURE__ */ jsx21(Icon_default, { name: icon }),
|
|
6067
6213
|
/* @__PURE__ */ jsxs17(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
6068
6214
|
/* @__PURE__ */ jsxs17(Text_default, { as: titleAs, fontSize: titleFontSize, children: [
|
|
6069
6215
|
title,
|
|
@@ -6072,9 +6218,9 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
6072
6218
|
"*"
|
|
6073
6219
|
] })
|
|
6074
6220
|
] }),
|
|
6075
|
-
description && /* @__PURE__ */
|
|
6221
|
+
description && /* @__PURE__ */ jsx21(Text_default, { fontSize: descriptionFontSize ?? theme2.styles.fontSize, color: theme2.colors.textSecondary, children: description })
|
|
6076
6222
|
] }),
|
|
6077
|
-
isLoading && /* @__PURE__ */
|
|
6223
|
+
isLoading && /* @__PURE__ */ jsx21(Div_default, { width: 26 - titleGap })
|
|
6078
6224
|
] }),
|
|
6079
6225
|
/* @__PURE__ */ jsxs17(
|
|
6080
6226
|
Div_default.row,
|
|
@@ -6085,7 +6231,7 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
6085
6231
|
justifyContent: alignChildren,
|
|
6086
6232
|
gap: theme2.styles.gap,
|
|
6087
6233
|
children: [
|
|
6088
|
-
/* @__PURE__ */
|
|
6234
|
+
/* @__PURE__ */ jsx21(
|
|
6089
6235
|
Div_default,
|
|
6090
6236
|
{
|
|
6091
6237
|
position: "absolute",
|
|
@@ -6094,13 +6240,13 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
6094
6240
|
transform: "translateY(-50%)",
|
|
6095
6241
|
opacity: !isLoading ? 0 : void 0,
|
|
6096
6242
|
pointerEvents: !isLoading ? "none" : void 0,
|
|
6097
|
-
children: /* @__PURE__ */
|
|
6243
|
+
children: /* @__PURE__ */ jsx21(Loader_default, {})
|
|
6098
6244
|
}
|
|
6099
6245
|
),
|
|
6100
6246
|
children,
|
|
6101
6247
|
withActions && /* @__PURE__ */ jsxs17(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
6102
|
-
onClickReset && /* @__PURE__ */
|
|
6103
|
-
/* @__PURE__ */
|
|
6248
|
+
onClickReset && /* @__PURE__ */ jsx21(Button_default.icon, { icon: "XMark", loaderName: resetButtonLoaderName, onClick: onClickReset }),
|
|
6249
|
+
/* @__PURE__ */ jsx21(Button_default.icon, { icon: "check", loaderName: saveButtonLoaderName, onClick: onClickSave })
|
|
6104
6250
|
] })
|
|
6105
6251
|
]
|
|
6106
6252
|
}
|
|
@@ -6114,7 +6260,7 @@ var FormRow_default = FormRow2;
|
|
|
6114
6260
|
// src/components/ColorThemeSwitch.tsx
|
|
6115
6261
|
import { memo as memo21, useCallback as useCallback12, useEffect as useEffect10, useState as useState9 } from "react";
|
|
6116
6262
|
import { useTheme as useTheme23 } from "react-better-core";
|
|
6117
|
-
import { jsx as
|
|
6263
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
6118
6264
|
var ColorThemeSwitchComponent = function ColorThemeSwitch({
|
|
6119
6265
|
withMoon,
|
|
6120
6266
|
className,
|
|
@@ -6143,7 +6289,7 @@ var ColorThemeSwitchComponent = function ColorThemeSwitch({
|
|
|
6143
6289
|
observer.disconnect();
|
|
6144
6290
|
};
|
|
6145
6291
|
}, []);
|
|
6146
|
-
return /* @__PURE__ */
|
|
6292
|
+
return /* @__PURE__ */ jsx22(
|
|
6147
6293
|
ToggleInput_default.switch,
|
|
6148
6294
|
{
|
|
6149
6295
|
className: `react-better-html-color-theme-switch ${withMoon ? ` react-better-html-color-theme-switch-with-moon` : ""}${className ? ` ${className}` : ""}`,
|
|
@@ -6156,9 +6302,9 @@ var ColorThemeSwitchComponent = function ColorThemeSwitch({
|
|
|
6156
6302
|
ColorThemeSwitchComponent.withText = function WithText({ withMoon, className, ...props }) {
|
|
6157
6303
|
const theme2 = useTheme23();
|
|
6158
6304
|
return /* @__PURE__ */ jsxs18(Div_default.row, { width: "fit-content", alignItems: "center", gap: theme2.styles.gap, userSelect: "none", ...props, children: [
|
|
6159
|
-
/* @__PURE__ */
|
|
6160
|
-
/* @__PURE__ */
|
|
6161
|
-
/* @__PURE__ */
|
|
6305
|
+
/* @__PURE__ */ jsx22(Text_default, { children: "Light" }),
|
|
6306
|
+
/* @__PURE__ */ jsx22(ColorThemeSwitchComponent, { withMoon, className }),
|
|
6307
|
+
/* @__PURE__ */ jsx22(Text_default, { children: "Dark" })
|
|
6162
6308
|
] });
|
|
6163
6309
|
};
|
|
6164
6310
|
var ColorThemeSwitch2 = memo21(ColorThemeSwitchComponent);
|
|
@@ -6175,7 +6321,7 @@ import {
|
|
|
6175
6321
|
useImperativeHandle as useImperativeHandle2,
|
|
6176
6322
|
useRef as useRef6,
|
|
6177
6323
|
useEffect as useEffect12,
|
|
6178
|
-
Fragment as
|
|
6324
|
+
Fragment as Fragment8
|
|
6179
6325
|
} from "react";
|
|
6180
6326
|
import { darkenColor as darkenColor3, useBetterCoreContext as useBetterCoreContext9, useTheme as useTheme25 } from "react-better-core";
|
|
6181
6327
|
import styled12, { css as css5 } from "styled-components";
|
|
@@ -6183,7 +6329,7 @@ import styled12, { css as css5 } from "styled-components";
|
|
|
6183
6329
|
// src/components/Pagination.tsx
|
|
6184
6330
|
import { memo as memo22, useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo8, useState as useState10 } from "react";
|
|
6185
6331
|
import { useTheme as useTheme24 } from "react-better-core";
|
|
6186
|
-
import { jsx as
|
|
6332
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6187
6333
|
var PaginationComponent = function Pagination({
|
|
6188
6334
|
currentPage = 1,
|
|
6189
6335
|
itemsLength = 0,
|
|
@@ -6231,7 +6377,7 @@ var PaginationComponent = function Pagination({
|
|
|
6231
6377
|
}, [currentPage]);
|
|
6232
6378
|
const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages2 / 1.4;
|
|
6233
6379
|
return /* @__PURE__ */ jsxs19(Div_default.row, { alignItems: "center", justifyContent: "center", gap: theme2.styles.gap * 2, children: [
|
|
6234
|
-
pageCountInternal > maximumVisiblePages2 && /* @__PURE__ */
|
|
6380
|
+
pageCountInternal > maximumVisiblePages2 && /* @__PURE__ */ jsx23(
|
|
6235
6381
|
Button_default.icon,
|
|
6236
6382
|
{
|
|
6237
6383
|
icon: "doubleChevronLeft",
|
|
@@ -6240,8 +6386,8 @@ var PaginationComponent = function Pagination({
|
|
|
6240
6386
|
onClickWithValue: setCurrentPage
|
|
6241
6387
|
}
|
|
6242
6388
|
),
|
|
6243
|
-
/* @__PURE__ */
|
|
6244
|
-
/* @__PURE__ */
|
|
6389
|
+
/* @__PURE__ */ jsx23(Button_default.icon, { icon: "chevronLeft", disabled: currentPageInternal === 1, onClick: onClickPreviousPageElement }),
|
|
6390
|
+
/* @__PURE__ */ jsx23(
|
|
6245
6391
|
Div_default.row,
|
|
6246
6392
|
{
|
|
6247
6393
|
alignItems: "center",
|
|
@@ -6250,14 +6396,14 @@ var PaginationComponent = function Pagination({
|
|
|
6250
6396
|
gap: theme2.styles.gap,
|
|
6251
6397
|
children: paginationItems.map((pageIndex) => {
|
|
6252
6398
|
const isActive = currentPageInternal === pageIndex;
|
|
6253
|
-
return /* @__PURE__ */
|
|
6399
|
+
return /* @__PURE__ */ jsx23(
|
|
6254
6400
|
Div_default,
|
|
6255
6401
|
{
|
|
6256
6402
|
cursor: "pointer",
|
|
6257
6403
|
userSelect: "none",
|
|
6258
6404
|
value: pageIndex,
|
|
6259
6405
|
onClickWithValue: setCurrentPage,
|
|
6260
|
-
children: /* @__PURE__ */
|
|
6406
|
+
children: /* @__PURE__ */ jsx23(
|
|
6261
6407
|
Text_default,
|
|
6262
6408
|
{
|
|
6263
6409
|
fontWeight: isActive ? 700 : 400,
|
|
@@ -6272,7 +6418,7 @@ var PaginationComponent = function Pagination({
|
|
|
6272
6418
|
})
|
|
6273
6419
|
}
|
|
6274
6420
|
),
|
|
6275
|
-
/* @__PURE__ */
|
|
6421
|
+
/* @__PURE__ */ jsx23(
|
|
6276
6422
|
Button_default.icon,
|
|
6277
6423
|
{
|
|
6278
6424
|
icon: "chevronRight",
|
|
@@ -6280,7 +6426,7 @@ var PaginationComponent = function Pagination({
|
|
|
6280
6426
|
onClick: onClickNextPageElement
|
|
6281
6427
|
}
|
|
6282
6428
|
),
|
|
6283
|
-
pageCountInternal > maximumVisiblePages2 && /* @__PURE__ */
|
|
6429
|
+
pageCountInternal > maximumVisiblePages2 && /* @__PURE__ */ jsx23(
|
|
6284
6430
|
Button_default.icon,
|
|
6285
6431
|
{
|
|
6286
6432
|
icon: "doubleChevronRight",
|
|
@@ -6295,7 +6441,7 @@ var Pagination2 = memo22(PaginationComponent);
|
|
|
6295
6441
|
var Pagination_default = Pagination2;
|
|
6296
6442
|
|
|
6297
6443
|
// src/components/Table.tsx
|
|
6298
|
-
import { Fragment as
|
|
6444
|
+
import { Fragment as Fragment9, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6299
6445
|
var defaultImageWidth = 160;
|
|
6300
6446
|
var maximumVisiblePages = 11;
|
|
6301
6447
|
var TableStyledComponent = styled12.table.withConfig({
|
|
@@ -6522,19 +6668,19 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6522
6668
|
case "text": {
|
|
6523
6669
|
const value = column.keyName ? item[column.keyName] : void 0;
|
|
6524
6670
|
const textProps = (typeof column.getTextProps === "function" ? column.getTextProps?.(item, itemIndex) : column.getTextProps) ?? {};
|
|
6525
|
-
return /* @__PURE__ */
|
|
6671
|
+
return /* @__PURE__ */ jsx24(Text_default, { ...textProps, children: column.format?.(item, itemIndex) ?? String(value ?? "") });
|
|
6526
6672
|
}
|
|
6527
6673
|
case "element": {
|
|
6528
|
-
return column.render?.(item, itemIndex) ?? /* @__PURE__ */
|
|
6674
|
+
return column.render?.(item, itemIndex) ?? /* @__PURE__ */ jsx24(Fragment9, {});
|
|
6529
6675
|
}
|
|
6530
6676
|
case "image": {
|
|
6531
6677
|
const imageProps = (typeof column.getImageProps === "function" ? column.getImageProps?.(item, itemIndex) : column.getImageProps) ?? {};
|
|
6532
|
-
return /* @__PURE__ */
|
|
6678
|
+
return /* @__PURE__ */ jsx24(Image_default, { width: "100%", borderRadius: theme2.styles.borderRadius / 2, ...imageProps });
|
|
6533
6679
|
}
|
|
6534
6680
|
case "checkbox": {
|
|
6535
6681
|
const { onChange, ...toggleInputProps } = (typeof column.getToggleInputProps === "function" ? column.getToggleInputProps?.(item, itemIndex) : column.getToggleInputProps) ?? {};
|
|
6536
6682
|
const checkedValue = checkedItems[itemIndex];
|
|
6537
|
-
return /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsx24(
|
|
6538
6684
|
ToggleInput_default.checkbox,
|
|
6539
6685
|
{
|
|
6540
6686
|
checked: checkedValue,
|
|
@@ -6555,7 +6701,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6555
6701
|
);
|
|
6556
6702
|
}
|
|
6557
6703
|
case "expand": {
|
|
6558
|
-
return /* @__PURE__ */
|
|
6704
|
+
return /* @__PURE__ */ jsx24(Div_default, { isTabAccessed: true, children: /* @__PURE__ */ jsx24(
|
|
6559
6705
|
Icon_default,
|
|
6560
6706
|
{
|
|
6561
6707
|
name: "chevronDown",
|
|
@@ -6565,7 +6711,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6565
6711
|
) });
|
|
6566
6712
|
}
|
|
6567
6713
|
default: {
|
|
6568
|
-
return /* @__PURE__ */
|
|
6714
|
+
return /* @__PURE__ */ jsx24(Fragment9, {});
|
|
6569
6715
|
}
|
|
6570
6716
|
}
|
|
6571
6717
|
},
|
|
@@ -6818,8 +6964,8 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6818
6964
|
}, [currentPage, setCurrentPage, pageCountInternal, setCheckedItems]);
|
|
6819
6965
|
const withFooter = pageSize !== void 0 && pageCountInternal > 1;
|
|
6820
6966
|
const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages / 1.4;
|
|
6821
|
-
return /* @__PURE__ */ jsxs20(
|
|
6822
|
-
/* @__PURE__ */
|
|
6967
|
+
return /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
6968
|
+
/* @__PURE__ */ jsx24(
|
|
6823
6969
|
Div_default,
|
|
6824
6970
|
{
|
|
6825
6971
|
border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
|
|
@@ -6838,7 +6984,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6838
6984
|
containsOverflowComponents,
|
|
6839
6985
|
withFooter,
|
|
6840
6986
|
children: [
|
|
6841
|
-
/* @__PURE__ */
|
|
6987
|
+
/* @__PURE__ */ jsx24("thead", { children: /* @__PURE__ */ jsx24("tr", { className: "isHeader", children: readyColumns.map((column, index) => /* @__PURE__ */ jsx24(
|
|
6842
6988
|
ThStyledComponent,
|
|
6843
6989
|
{
|
|
6844
6990
|
width: column.width ?? (column.type === "image" ? defaultImageWidth : column.type === "checkbox" ? 26 : column.type === "expand" ? 16 : void 0),
|
|
@@ -6853,15 +6999,15 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6853
6999
|
justifyContent: column.filter ? "space-between" : column.align === "center" ? "center" : column.align === "right" ? "flex-end" : "flex-start",
|
|
6854
7000
|
gap: theme2.styles.gap,
|
|
6855
7001
|
children: [
|
|
6856
|
-
column.type === "checkbox" && onClickAllCheckboxes ? /* @__PURE__ */
|
|
7002
|
+
column.type === "checkbox" && onClickAllCheckboxes ? /* @__PURE__ */ jsx24(
|
|
6857
7003
|
ToggleInput_default.checkbox,
|
|
6858
7004
|
{
|
|
6859
7005
|
checked: everythingIsChecked,
|
|
6860
7006
|
disabled: data.length === 0,
|
|
6861
7007
|
onChange: onClickAllCheckboxesElement
|
|
6862
7008
|
}
|
|
6863
|
-
) : column.label ? column.renderLabel ? column.renderLabel(column.label) : /* @__PURE__ */
|
|
6864
|
-
column.filter && /* @__PURE__ */
|
|
7009
|
+
) : column.label ? column.renderLabel ? column.renderLabel(column.label) : /* @__PURE__ */ jsx24(Text_default, { children: column.label }) : void 0,
|
|
7010
|
+
column.filter && /* @__PURE__ */ jsx24(
|
|
6865
7011
|
Button_default.icon,
|
|
6866
7012
|
{
|
|
6867
7013
|
icon: "filter",
|
|
@@ -6876,16 +7022,16 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6876
7022
|
},
|
|
6877
7023
|
column.type + column.label + index
|
|
6878
7024
|
)) }) }),
|
|
6879
|
-
/* @__PURE__ */
|
|
7025
|
+
/* @__PURE__ */ jsx24("tbody", { children: isLoading ? /* @__PURE__ */ jsx24("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx24("td", { className: "noData", colSpan: readyColumns.length, children: /* @__PURE__ */ jsx24(Loader_default.box, {}) }) }) : dataAfterPagination.length > 0 ? dataAfterPagination.map((item, rowIndex) => {
|
|
6880
7026
|
const realRowIndex = rowIndex + (pageSize ? (currentPage - 1) * pageSize : 0);
|
|
6881
|
-
return /* @__PURE__ */ jsxs20(
|
|
6882
|
-
/* @__PURE__ */
|
|
7027
|
+
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
7028
|
+
/* @__PURE__ */ jsx24(
|
|
6883
7029
|
"tr",
|
|
6884
7030
|
{
|
|
6885
7031
|
className: isInsideTableExpandRow && onClickRow === void 0 && expandColumn === void 0 ? "withoutHover" : void 0,
|
|
6886
7032
|
style: getRowStyle?.(item, realRowIndex),
|
|
6887
7033
|
onClick: () => onClickRowElement(item, realRowIndex),
|
|
6888
|
-
children: readyColumns.map((column, colIndex) => /* @__PURE__ */
|
|
7034
|
+
children: readyColumns.map((column, colIndex) => /* @__PURE__ */ jsx24(
|
|
6889
7035
|
TdStyledComponent,
|
|
6890
7036
|
{
|
|
6891
7037
|
textAlign: column.align,
|
|
@@ -6898,10 +7044,10 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6898
7044
|
))
|
|
6899
7045
|
}
|
|
6900
7046
|
),
|
|
6901
|
-
expandedRows[realRowIndex] && /* @__PURE__ */
|
|
7047
|
+
expandedRows[realRowIndex] && /* @__PURE__ */ jsx24("tr", { className: "withoutHover isExpandRow", children: /* @__PURE__ */ jsx24("td", { colSpan: readyColumns.length, children: renderExpandedRow(item, realRowIndex) }) })
|
|
6902
7048
|
] }, JSON.stringify(item) + realRowIndex);
|
|
6903
|
-
}) : /* @__PURE__ */
|
|
6904
|
-
withFooter && /* @__PURE__ */
|
|
7049
|
+
}) : /* @__PURE__ */ jsx24("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx24("td", { className: "noData", colSpan: readyColumns.length, children: /* @__PURE__ */ jsx24(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
|
|
7050
|
+
withFooter && /* @__PURE__ */ jsx24("tfoot", { children: /* @__PURE__ */ jsx24("tr", { className: "isFooter", children: /* @__PURE__ */ jsx24("td", { colSpan: readyColumns.length, children: /* @__PURE__ */ jsxs20(
|
|
6905
7051
|
Div_default.column,
|
|
6906
7052
|
{
|
|
6907
7053
|
position: "relative",
|
|
@@ -6925,7 +7071,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6925
7071
|
]
|
|
6926
7072
|
}
|
|
6927
7073
|
),
|
|
6928
|
-
/* @__PURE__ */
|
|
7074
|
+
/* @__PURE__ */ jsx24(
|
|
6929
7075
|
Pagination_default,
|
|
6930
7076
|
{
|
|
6931
7077
|
currentPage,
|
|
@@ -6944,14 +7090,14 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6944
7090
|
)
|
|
6945
7091
|
}
|
|
6946
7092
|
),
|
|
6947
|
-
/* @__PURE__ */
|
|
7093
|
+
/* @__PURE__ */ jsx24(
|
|
6948
7094
|
Modal_default,
|
|
6949
7095
|
{
|
|
6950
7096
|
title: `Filter ${openedFilterColumn?.label ?? ""}`,
|
|
6951
7097
|
description: openedFilterColumn?.filter === "number" ? "Enter minimum and maximum values to filter" : openedFilterColumn?.filter === "date" || openedFilterColumn?.filter === "date-time" ? "Enter minimum and maximum dates to filter" : openedFilterColumn?.filter === "list" ? "Select values to filter from the list bellow" : "",
|
|
6952
7098
|
onClose: onCloseFilterModal,
|
|
6953
7099
|
ref: filterModalRef,
|
|
6954
|
-
children: openedFilterColumn ? openedFilterColumn.filter === "number" ? /* @__PURE__ */
|
|
7100
|
+
children: openedFilterColumn ? openedFilterColumn.filter === "number" ? /* @__PURE__ */ jsx24(
|
|
6955
7101
|
Form_default,
|
|
6956
7102
|
{
|
|
6957
7103
|
form: filterForm,
|
|
@@ -6959,8 +7105,8 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6959
7105
|
cancelButtonText: "Clear",
|
|
6960
7106
|
onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
|
|
6961
7107
|
children: /* @__PURE__ */ jsxs20(FormRow_default, { children: [
|
|
6962
|
-
/* @__PURE__ */
|
|
6963
|
-
/* @__PURE__ */
|
|
7108
|
+
/* @__PURE__ */ jsx24(InputField_default, { type: "number", label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
7109
|
+
/* @__PURE__ */ jsx24(InputField_default, { type: "number", label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
6964
7110
|
] })
|
|
6965
7111
|
}
|
|
6966
7112
|
) : openedFilterColumn.filter === "date" || openedFilterColumn.filter === "date-time" ? /* @__PURE__ */ jsxs20(
|
|
@@ -6972,16 +7118,16 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6972
7118
|
cancelButtonText: "Clear",
|
|
6973
7119
|
onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
|
|
6974
7120
|
children: [
|
|
6975
|
-
/* @__PURE__ */
|
|
6976
|
-
/* @__PURE__ */
|
|
6977
|
-
/* @__PURE__ */
|
|
6978
|
-
] }) : /* @__PURE__ */ jsxs20(
|
|
6979
|
-
/* @__PURE__ */
|
|
6980
|
-
/* @__PURE__ */
|
|
7121
|
+
/* @__PURE__ */ jsx24(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
7122
|
+
/* @__PURE__ */ jsx24(InputField_default.date, { label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
7123
|
+
/* @__PURE__ */ jsx24(InputField_default.date, { label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
7124
|
+
] }) : /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
7125
|
+
/* @__PURE__ */ jsx24(InputField_default.dateTime, { label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
7126
|
+
/* @__PURE__ */ jsx24(InputField_default.dateTime, { label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
6981
7127
|
] }) }),
|
|
6982
7128
|
openedFilterColumn.presets && /* @__PURE__ */ jsxs20(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
6983
|
-
/* @__PURE__ */
|
|
6984
|
-
/* @__PURE__ */
|
|
7129
|
+
/* @__PURE__ */ jsx24(Label_default, { text: "Presets" }),
|
|
7130
|
+
/* @__PURE__ */ jsx24(Div_default.row, { alignItems: "center", flexWrap: "wrap", gap: theme2.styles.gap, children: openedFilterColumn.presets.map((preset) => /* @__PURE__ */ jsx24(
|
|
6985
7131
|
Button_default.secondary,
|
|
6986
7132
|
{
|
|
6987
7133
|
text: filterPresetsText[preset],
|
|
@@ -7001,7 +7147,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7001
7147
|
submitButtonText: "Filter",
|
|
7002
7148
|
cancelButtonText: "Clear",
|
|
7003
7149
|
renderActionButtons: /* @__PURE__ */ jsxs20(Div_default.row, { marginRight: "auto", alignItems: "center", gap: theme2.styles.gap, children: [
|
|
7004
|
-
/* @__PURE__ */
|
|
7150
|
+
/* @__PURE__ */ jsx24(
|
|
7005
7151
|
Button_default.secondary,
|
|
7006
7152
|
{
|
|
7007
7153
|
text: "Select All",
|
|
@@ -7010,7 +7156,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7010
7156
|
onClick: onClickSelectAllFilterListItems
|
|
7011
7157
|
}
|
|
7012
7158
|
),
|
|
7013
|
-
/* @__PURE__ */
|
|
7159
|
+
/* @__PURE__ */ jsx24(
|
|
7014
7160
|
Button_default.secondary,
|
|
7015
7161
|
{
|
|
7016
7162
|
text: "Deselect All",
|
|
@@ -7023,7 +7169,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7023
7169
|
onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
|
|
7024
7170
|
onSubmit: filterForm.onSubmit,
|
|
7025
7171
|
children: [
|
|
7026
|
-
openedFilterColumn?.withSearch && /* @__PURE__ */
|
|
7172
|
+
openedFilterColumn?.withSearch && /* @__PURE__ */ jsx24(FormRow_default, { oneItemOnly: true, children: /* @__PURE__ */ jsx24(
|
|
7027
7173
|
InputField_default.search,
|
|
7028
7174
|
{
|
|
7029
7175
|
label: "Search",
|
|
@@ -7032,17 +7178,17 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7032
7178
|
}
|
|
7033
7179
|
) }),
|
|
7034
7180
|
/* @__PURE__ */ jsxs20(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
7035
|
-
/* @__PURE__ */
|
|
7036
|
-
/* @__PURE__ */
|
|
7181
|
+
/* @__PURE__ */ jsx24(Label_default, { text: "Possible values" }),
|
|
7182
|
+
/* @__PURE__ */ jsx24(Div_default.row, { flexWrap: "wrap", gap: theme2.styles.gap, children: possibleFilterListValues.length > 0 ? possibleFilterListValues.map((value) => {
|
|
7037
7183
|
const isActive = filterListSelectedItems?.includes(value.value);
|
|
7038
|
-
return /* @__PURE__ */
|
|
7184
|
+
return /* @__PURE__ */ jsx24(
|
|
7039
7185
|
Div_default.box,
|
|
7040
7186
|
{
|
|
7041
7187
|
isActive,
|
|
7042
7188
|
value: value.value,
|
|
7043
7189
|
onClickWithValue: onClickFilterListItem,
|
|
7044
7190
|
children: /* @__PURE__ */ jsxs20(Div_default.row, { alignItems: "center", gap: theme2.styles.gap / 2, children: [
|
|
7045
|
-
/* @__PURE__ */
|
|
7191
|
+
/* @__PURE__ */ jsx24(Text_default, { children: value.label || value.value }),
|
|
7046
7192
|
openedFilterColumn.withTotalNumber && /* @__PURE__ */ jsxs20(
|
|
7047
7193
|
Text_default,
|
|
7048
7194
|
{
|
|
@@ -7059,12 +7205,12 @@ var TableComponent = forwardRef15(function Table({
|
|
|
7059
7205
|
},
|
|
7060
7206
|
value.value.toString()
|
|
7061
7207
|
);
|
|
7062
|
-
}) : /* @__PURE__ */
|
|
7208
|
+
}) : /* @__PURE__ */ jsx24(Text_default.unknown, { children: "No values" }) })
|
|
7063
7209
|
] }),
|
|
7064
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsx24(Div_default, {})
|
|
7065
7211
|
]
|
|
7066
7212
|
}
|
|
7067
|
-
) : /* @__PURE__ */
|
|
7213
|
+
) : /* @__PURE__ */ jsx24(Text_default.unknown, { children: "Unknown filter" }) : /* @__PURE__ */ jsx24(Loader_default.box, {})
|
|
7068
7214
|
}
|
|
7069
7215
|
)
|
|
7070
7216
|
] });
|
|
@@ -7076,7 +7222,7 @@ var Table_default = Table2;
|
|
|
7076
7222
|
import { memo as memo24, useCallback as useCallback15, useRef as useRef7, useState as useState12, useEffect as useEffect13, forwardRef as forwardRef16, useImperativeHandle as useImperativeHandle3, useMemo as useMemo10 } from "react";
|
|
7077
7223
|
import { useTheme as useTheme26 } from "react-better-core";
|
|
7078
7224
|
import styled13, { css as css6 } from "styled-components";
|
|
7079
|
-
import { jsx as
|
|
7225
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
7080
7226
|
var tooltipContainerStyle = (props) => ({
|
|
7081
7227
|
top: css6`
|
|
7082
7228
|
bottom: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
@@ -7189,7 +7335,7 @@ var Arrow = memo24(function Arrow2(props) {
|
|
|
7189
7335
|
[props, theme2]
|
|
7190
7336
|
);
|
|
7191
7337
|
const borderWidth = theme2.styles.borderWidth;
|
|
7192
|
-
return /* @__PURE__ */
|
|
7338
|
+
return /* @__PURE__ */ jsx25(
|
|
7193
7339
|
Div_default,
|
|
7194
7340
|
{
|
|
7195
7341
|
position: "absolute",
|
|
@@ -7197,7 +7343,7 @@ var Arrow = memo24(function Arrow2(props) {
|
|
|
7197
7343
|
height: 0,
|
|
7198
7344
|
border: `${size}px solid transparent`,
|
|
7199
7345
|
...arrowStyle(outerProps)[position],
|
|
7200
|
-
children: /* @__PURE__ */
|
|
7346
|
+
children: /* @__PURE__ */ jsx25(
|
|
7201
7347
|
Div_default,
|
|
7202
7348
|
{
|
|
7203
7349
|
position: "absolute",
|
|
@@ -7327,7 +7473,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
7327
7473
|
onMouseEnter,
|
|
7328
7474
|
onMouseLeave,
|
|
7329
7475
|
children: [
|
|
7330
|
-
/* @__PURE__ */
|
|
7476
|
+
/* @__PURE__ */ jsx25(
|
|
7331
7477
|
Div_default,
|
|
7332
7478
|
{
|
|
7333
7479
|
width: childrenWrapperWidth,
|
|
@@ -7337,7 +7483,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
7337
7483
|
children
|
|
7338
7484
|
}
|
|
7339
7485
|
),
|
|
7340
|
-
/* @__PURE__ */
|
|
7486
|
+
/* @__PURE__ */ jsx25(
|
|
7341
7487
|
TooltipContainer,
|
|
7342
7488
|
{
|
|
7343
7489
|
theme: theme2,
|
|
@@ -7351,7 +7497,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
7351
7497
|
role: "tooltip",
|
|
7352
7498
|
ref: tooltipContainerRef,
|
|
7353
7499
|
children: (isOpen || isOpenLate) && /* @__PURE__ */ jsxs21(Div_default, { position: "relative", ref: contentRef, children: [
|
|
7354
|
-
/* @__PURE__ */
|
|
7500
|
+
/* @__PURE__ */ jsx25(
|
|
7355
7501
|
Div_default.box,
|
|
7356
7502
|
{
|
|
7357
7503
|
position: "relative",
|
|
@@ -7365,7 +7511,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
7365
7511
|
children: content
|
|
7366
7512
|
}
|
|
7367
7513
|
),
|
|
7368
|
-
/* @__PURE__ */
|
|
7514
|
+
/* @__PURE__ */ jsx25(
|
|
7369
7515
|
Div_default,
|
|
7370
7516
|
{
|
|
7371
7517
|
position: "absolute",
|
|
@@ -7379,7 +7525,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
7379
7525
|
borderTopRightRadius: 999
|
|
7380
7526
|
}
|
|
7381
7527
|
),
|
|
7382
|
-
withArrow && /* @__PURE__ */
|
|
7528
|
+
withArrow && /* @__PURE__ */ jsx25(
|
|
7383
7529
|
Arrow,
|
|
7384
7530
|
{
|
|
7385
7531
|
position,
|
|
@@ -7429,10 +7575,10 @@ TooltipComponent.item = forwardRef16(function Item({
|
|
|
7429
7575
|
onClickWithValue: !disabled ? onClickWithValue : void 0,
|
|
7430
7576
|
ref,
|
|
7431
7577
|
children: [
|
|
7432
|
-
icon && /* @__PURE__ */
|
|
7578
|
+
icon && /* @__PURE__ */ jsx25(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme2.colors.textSecondary : void 0) }),
|
|
7433
7579
|
/* @__PURE__ */ jsxs21(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
7434
|
-
/* @__PURE__ */
|
|
7435
|
-
description && /* @__PURE__ */
|
|
7580
|
+
/* @__PURE__ */ jsx25(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme2.colors.textPrimary, children: text }),
|
|
7581
|
+
description && /* @__PURE__ */ jsx25(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: description })
|
|
7436
7582
|
] })
|
|
7437
7583
|
]
|
|
7438
7584
|
}
|
|
@@ -7440,7 +7586,7 @@ TooltipComponent.item = forwardRef16(function Item({
|
|
|
7440
7586
|
});
|
|
7441
7587
|
TooltipComponent.divider = forwardRef16(function DividerComponent(props, ref) {
|
|
7442
7588
|
const theme2 = useTheme26();
|
|
7443
|
-
return /* @__PURE__ */
|
|
7589
|
+
return /* @__PURE__ */ jsx25(
|
|
7444
7590
|
Divider_default.horizontal,
|
|
7445
7591
|
{
|
|
7446
7592
|
width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth,
|
|
@@ -7452,7 +7598,7 @@ TooltipComponent.divider = forwardRef16(function DividerComponent(props, ref) {
|
|
|
7452
7598
|
});
|
|
7453
7599
|
TooltipComponent.sectionTitle = forwardRef16(function SectionTitle({ text, ...props }, ref) {
|
|
7454
7600
|
const theme2 = useTheme26();
|
|
7455
|
-
return /* @__PURE__ */
|
|
7601
|
+
return /* @__PURE__ */ jsx25(
|
|
7456
7602
|
Text_default,
|
|
7457
7603
|
{
|
|
7458
7604
|
fontSize: 12,
|
|
@@ -7475,7 +7621,7 @@ var Tooltip_default = Tooltip2;
|
|
|
7475
7621
|
// src/components/Tabs.tsx
|
|
7476
7622
|
import { forwardRef as forwardRef17, memo as memo25, useCallback as useCallback16, useEffect as useEffect14, useImperativeHandle as useImperativeHandle4, useMemo as useMemo11, useRef as useRef8, useState as useState13 } from "react";
|
|
7477
7623
|
import { useTheme as useTheme27 } from "react-better-core";
|
|
7478
|
-
import { jsx as
|
|
7624
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
7479
7625
|
var tabBottomLineWidth = 2;
|
|
7480
7626
|
var tabDotSize = 6;
|
|
7481
7627
|
var defaultTabName = "tab";
|
|
@@ -7485,6 +7631,7 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7485
7631
|
accentColor,
|
|
7486
7632
|
style = "default",
|
|
7487
7633
|
gap,
|
|
7634
|
+
borderRadius,
|
|
7488
7635
|
noBottomLine,
|
|
7489
7636
|
keepUrlHistory = true,
|
|
7490
7637
|
onChange,
|
|
@@ -7494,10 +7641,10 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7494
7641
|
const reactRouterDomPlugin2 = usePlugin("react-router-dom");
|
|
7495
7642
|
const theme2 = useTheme27();
|
|
7496
7643
|
const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
|
|
7497
|
-
const { componentsState } = useBetterHtmlContextInternal();
|
|
7644
|
+
const { language, componentsState } = useBetterHtmlContextInternal();
|
|
7498
7645
|
const firstRenderPassedRef = useRef8(false);
|
|
7499
7646
|
const tabsRef = useRef8({});
|
|
7500
|
-
const tabsGap = gap ?? (style === "box" ? theme2.styles.gap / 2 : 0);
|
|
7647
|
+
const tabsGap = gap ?? (style === "box" || style === "bubble" ? theme2.styles.gap / 2 : 0);
|
|
7501
7648
|
const [selectedTabId, setSelectedTabId] = useState13(() => {
|
|
7502
7649
|
const selectedTabId2 = tabs[0];
|
|
7503
7650
|
if (!selectedTabId2) return "";
|
|
@@ -7536,7 +7683,7 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7536
7683
|
if (index < selectedTabIndex) spacing += (tab?.getBoundingClientRect().width ?? 0) + tabsGap;
|
|
7537
7684
|
});
|
|
7538
7685
|
return spacing;
|
|
7539
|
-
}, [selectedTabId, tabs, tabsGap]);
|
|
7686
|
+
}, [rerenderState, selectedTabId, tabs, tabsGap]);
|
|
7540
7687
|
useEffect14(() => {
|
|
7541
7688
|
const timeout = setTimeout(() => {
|
|
7542
7689
|
setRerenderState(Math.random());
|
|
@@ -7545,7 +7692,7 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7545
7692
|
return () => {
|
|
7546
7693
|
clearTimeout(timeout);
|
|
7547
7694
|
};
|
|
7548
|
-
}, []);
|
|
7695
|
+
}, [language]);
|
|
7549
7696
|
useEffect14(() => {
|
|
7550
7697
|
componentsState.tabs.setTabGroups((oldValue) => {
|
|
7551
7698
|
const thisTabGroup = oldValue.find((item) => item.name === (name ?? defaultTabName));
|
|
@@ -7589,9 +7736,10 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7589
7736
|
selectTab: onClickTab
|
|
7590
7737
|
};
|
|
7591
7738
|
}, [selectedTabId, onClickTab]);
|
|
7739
|
+
const readyBorderRadius = borderRadius ?? (style === "bubble" ? theme2.styles.borderRadius : void 0);
|
|
7592
7740
|
return /* @__PURE__ */ jsxs22(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
|
|
7593
7741
|
/* @__PURE__ */ jsxs22(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
|
|
7594
|
-
/* @__PURE__ */
|
|
7742
|
+
/* @__PURE__ */ jsx26(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", zIndex: 2, children: tabs.map((tab) => {
|
|
7595
7743
|
const selected = tab.id === selectedTabId;
|
|
7596
7744
|
return /* @__PURE__ */ jsxs22(
|
|
7597
7745
|
Div_default,
|
|
@@ -7599,8 +7747,9 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7599
7747
|
className: `react-better-html-tabs-tab${selected ? " react-better-html-tabs-tab-selected" : ""}`,
|
|
7600
7748
|
position: "relative",
|
|
7601
7749
|
width: "fit-content",
|
|
7602
|
-
backgroundColor: style === "box" ? selected ? accentColor ?? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
7603
|
-
|
|
7750
|
+
backgroundColor: style === "bubble" ? theme2.colors.textPrimary + "00" : style === "box" ? selected ? accentColor ?? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
7751
|
+
backgroundColorHover: style === "bubble" ? theme2.colors.textPrimary + "20" : void 0,
|
|
7752
|
+
borderRadius: readyBorderRadius ?? (style === "box" ? theme2.styles.borderRadius : void 0),
|
|
7604
7753
|
borderTopLeftRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
|
|
7605
7754
|
borderTopRightRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
|
|
7606
7755
|
border: style === "box" ? `${theme2.styles.borderWidth}px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
|
|
@@ -7616,7 +7765,7 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7616
7765
|
tabsRef.current[tab.id] = ref2;
|
|
7617
7766
|
},
|
|
7618
7767
|
children: [
|
|
7619
|
-
componentsState.tabs.tabsWithDots.includes(tab.id) && /* @__PURE__ */
|
|
7768
|
+
componentsState.tabs.tabsWithDots.includes(tab.id) && /* @__PURE__ */ jsx26(
|
|
7620
7769
|
Div_default,
|
|
7621
7770
|
{
|
|
7622
7771
|
position: "absolute",
|
|
@@ -7629,11 +7778,11 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7629
7778
|
transition: theme2.styles.transition
|
|
7630
7779
|
}
|
|
7631
7780
|
),
|
|
7632
|
-
/* @__PURE__ */
|
|
7781
|
+
/* @__PURE__ */ jsx26(
|
|
7633
7782
|
Text_default,
|
|
7634
7783
|
{
|
|
7635
7784
|
fontWeight: 700,
|
|
7636
|
-
color: !selected ? theme2.colors.textSecondary : style === "box" ? theme2.colors.base : void 0,
|
|
7785
|
+
color: !selected ? theme2.colors.textSecondary : style === "box" || style === "bubble" ? theme2.colors.base : void 0,
|
|
7637
7786
|
transition: theme2.styles.transition,
|
|
7638
7787
|
whiteSpace: "nowrap",
|
|
7639
7788
|
children: tab.label ?? tab.id
|
|
@@ -7644,7 +7793,20 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7644
7793
|
tab.id
|
|
7645
7794
|
);
|
|
7646
7795
|
}) }),
|
|
7647
|
-
style !== "box" && !noBottomLine && /* @__PURE__ */
|
|
7796
|
+
style !== "box" && !noBottomLine && (style === "bubble" ? /* @__PURE__ */ jsx26(
|
|
7797
|
+
Div_default,
|
|
7798
|
+
{
|
|
7799
|
+
position: "absolute",
|
|
7800
|
+
width,
|
|
7801
|
+
height: "100%",
|
|
7802
|
+
bottom: 0,
|
|
7803
|
+
left: leftSpacing,
|
|
7804
|
+
backgroundColor: accentColor ?? theme2.colors.primary,
|
|
7805
|
+
borderRadius: readyBorderRadius,
|
|
7806
|
+
transition: firstRenderPassedRef.current ? theme2.styles.transition : "none",
|
|
7807
|
+
zIndex: 1
|
|
7808
|
+
}
|
|
7809
|
+
) : /* @__PURE__ */ jsx26(
|
|
7648
7810
|
Div_default,
|
|
7649
7811
|
{
|
|
7650
7812
|
position: "absolute",
|
|
@@ -7653,11 +7815,12 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7653
7815
|
bottom: 0,
|
|
7654
7816
|
left: leftSpacing,
|
|
7655
7817
|
backgroundColor: accentColor ?? theme2.colors.primary,
|
|
7656
|
-
transition: firstRenderPassedRef.current ? theme2.styles.transition : "none"
|
|
7818
|
+
transition: firstRenderPassedRef.current ? theme2.styles.transition : "none",
|
|
7819
|
+
zIndex: 2
|
|
7657
7820
|
}
|
|
7658
|
-
)
|
|
7821
|
+
))
|
|
7659
7822
|
] }),
|
|
7660
|
-
children && /* @__PURE__ */
|
|
7823
|
+
children && /* @__PURE__ */ jsx26(Div_default, { width: "100%", children })
|
|
7661
7824
|
] });
|
|
7662
7825
|
});
|
|
7663
7826
|
TabsComponent.content = function Content({ tabId, tabWithDot, tabsGroupName, isInitialTab, children }) {
|
|
@@ -7677,7 +7840,7 @@ TabsComponent.content = function Content({ tabId, tabWithDot, tabsGroupName, isI
|
|
|
7677
7840
|
);
|
|
7678
7841
|
}
|
|
7679
7842
|
}, [tabWithDot]);
|
|
7680
|
-
return (thisTabGroupData ? thisTabGroupData.selectedTab === tabId : isInitialTab) ? /* @__PURE__ */
|
|
7843
|
+
return (thisTabGroupData ? thisTabGroupData.selectedTab === tabId : isInitialTab) ? /* @__PURE__ */ jsx26(Div_default, { width: "100%", children }) : void 0;
|
|
7681
7844
|
};
|
|
7682
7845
|
var Tabs2 = memo25(TabsComponent);
|
|
7683
7846
|
Tabs2.content = TabsComponent.content;
|
|
@@ -7686,12 +7849,13 @@ var Tabs_default = Tabs2;
|
|
|
7686
7849
|
// src/components/Foldable.tsx
|
|
7687
7850
|
import { forwardRef as forwardRef18, memo as memo26, useCallback as useCallback17, useEffect as useEffect15, useImperativeHandle as useImperativeHandle5, useRef as useRef9, useState as useState14 } from "react";
|
|
7688
7851
|
import { useBooleanState as useBooleanState7, useTheme as useTheme28 } from "react-better-core";
|
|
7689
|
-
import { jsx as
|
|
7852
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
7690
7853
|
var animationDurationClose = 0.15;
|
|
7691
7854
|
var animationDurationOpen = animationDurationClose * 2;
|
|
7692
7855
|
var FoldableComponent = forwardRef18(function Foldable({
|
|
7693
7856
|
isOpen: controlledIsOpen,
|
|
7694
7857
|
defaultOpen = false,
|
|
7858
|
+
withoutLine,
|
|
7695
7859
|
icon,
|
|
7696
7860
|
iconColor,
|
|
7697
7861
|
iconSize,
|
|
@@ -7766,7 +7930,7 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
7766
7930
|
isOpen
|
|
7767
7931
|
};
|
|
7768
7932
|
}, [open, close, toggleOpen, isOpen]);
|
|
7769
|
-
const arrow = /* @__PURE__ */
|
|
7933
|
+
const arrow = /* @__PURE__ */ jsx27(Icon_default, { name: "chevronDown", transform: `rotate(${isOpen ? 180 : 0}deg)`, transition: theme2.styles.transition });
|
|
7770
7934
|
return /* @__PURE__ */ jsxs23(Div_default.column, { width: "100%", ...props, children: [
|
|
7771
7935
|
renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */ jsxs23(
|
|
7772
7936
|
Div_default.row,
|
|
@@ -7781,7 +7945,7 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
7781
7945
|
userSelect: "none",
|
|
7782
7946
|
children: [
|
|
7783
7947
|
arrowPosition === "left" && arrow,
|
|
7784
|
-
/* @__PURE__ */
|
|
7948
|
+
/* @__PURE__ */ jsx27(Div_default, { flex: 1, children: /* @__PURE__ */ jsx27(
|
|
7785
7949
|
PageHeader_default,
|
|
7786
7950
|
{
|
|
7787
7951
|
icon,
|
|
@@ -7809,8 +7973,8 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
7809
7973
|
]
|
|
7810
7974
|
}
|
|
7811
7975
|
),
|
|
7812
|
-
/* @__PURE__ */
|
|
7813
|
-
/* @__PURE__ */
|
|
7976
|
+
!withoutLine && /* @__PURE__ */ jsx27(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx27(Divider_default.horizontal, { width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth }) }),
|
|
7977
|
+
/* @__PURE__ */ jsx27(
|
|
7814
7978
|
Div_default,
|
|
7815
7979
|
{
|
|
7816
7980
|
maxHeight: isOpen ? bodyVirtualHeight : 0,
|
|
@@ -7819,14 +7983,14 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
7819
7983
|
overflow: !isOpen ? "hidden" : void 0,
|
|
7820
7984
|
pointerEvents: !isOpen ? "none" : void 0,
|
|
7821
7985
|
ref: bodyRef,
|
|
7822
|
-
children: /* @__PURE__ */
|
|
7986
|
+
children: /* @__PURE__ */ jsx27(Div_default, { paddingBlock: theme2.styles.gap, paddingInline: headerPaddingInline, children })
|
|
7823
7987
|
}
|
|
7824
7988
|
)
|
|
7825
7989
|
] });
|
|
7826
7990
|
});
|
|
7827
7991
|
FoldableComponent.box = forwardRef18(function Box3({ ...props }, ref) {
|
|
7828
7992
|
const theme2 = useTheme28();
|
|
7829
|
-
return /* @__PURE__ */
|
|
7993
|
+
return /* @__PURE__ */ jsx27(
|
|
7830
7994
|
FoldableComponent,
|
|
7831
7995
|
{
|
|
7832
7996
|
backgroundColor: theme2.colors.backgroundContent,
|
|
@@ -7852,7 +8016,7 @@ import {
|
|
|
7852
8016
|
useBooleanState as useBooleanState8,
|
|
7853
8017
|
useTheme as useTheme29
|
|
7854
8018
|
} from "react-better-core";
|
|
7855
|
-
import { Fragment as
|
|
8019
|
+
import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
7856
8020
|
var tabDotSize2 = 6;
|
|
7857
8021
|
var sideMenuContext = createContext2(void 0);
|
|
7858
8022
|
var SideMenuContextProvider = sideMenuContext.Provider;
|
|
@@ -7904,12 +8068,12 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
7904
8068
|
const lineWidth = 2;
|
|
7905
8069
|
const lineEndRadius = iconSize / 2 + iconGap * 2;
|
|
7906
8070
|
const backgroundColorContrast = activeItemColor ? calculateColorContrast(activeItemColor, theme2.colors.primary) : 21;
|
|
7907
|
-
const content = /* @__PURE__ */
|
|
8071
|
+
const content = /* @__PURE__ */ jsx28(
|
|
7908
8072
|
Tooltip_default,
|
|
7909
8073
|
{
|
|
7910
8074
|
content: /* @__PURE__ */ jsxs24(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
7911
|
-
/* @__PURE__ */
|
|
7912
|
-
item.children && /* @__PURE__ */
|
|
8075
|
+
/* @__PURE__ */ jsx28(Text_default, { whiteSpace: "nowrap", children: item.text }),
|
|
8076
|
+
item.children && /* @__PURE__ */ jsx28(Icon_default, { name: "chevronDown", color: theme2.colors.textSecondary, size: 14 })
|
|
7913
8077
|
] }),
|
|
7914
8078
|
contentPointerEvents: "none",
|
|
7915
8079
|
withArrow: true,
|
|
@@ -7934,7 +8098,7 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
7934
8098
|
opacity: item.disabled ? 0.6 : void 0,
|
|
7935
8099
|
onClick: onClickElement,
|
|
7936
8100
|
children: [
|
|
7937
|
-
/* @__PURE__ */
|
|
8101
|
+
/* @__PURE__ */ jsx28(
|
|
7938
8102
|
Icon_default,
|
|
7939
8103
|
{
|
|
7940
8104
|
name: item.iconName,
|
|
@@ -7943,7 +8107,7 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
7943
8107
|
flexShrink: 0
|
|
7944
8108
|
}
|
|
7945
8109
|
),
|
|
7946
|
-
/* @__PURE__ */
|
|
8110
|
+
/* @__PURE__ */ jsx28(
|
|
7947
8111
|
Text_default,
|
|
7948
8112
|
{
|
|
7949
8113
|
flex: 1,
|
|
@@ -7954,7 +8118,7 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
7954
8118
|
children: item.text
|
|
7955
8119
|
}
|
|
7956
8120
|
),
|
|
7957
|
-
item.children && /* @__PURE__ */
|
|
8121
|
+
item.children && /* @__PURE__ */ jsx28(
|
|
7958
8122
|
Icon_default,
|
|
7959
8123
|
{
|
|
7960
8124
|
name: "chevronDown",
|
|
@@ -7964,7 +8128,7 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
7964
8128
|
transition: theme2.styles.transition
|
|
7965
8129
|
}
|
|
7966
8130
|
),
|
|
7967
|
-
/* @__PURE__ */
|
|
8131
|
+
/* @__PURE__ */ jsx28(
|
|
7968
8132
|
Div_default,
|
|
7969
8133
|
{
|
|
7970
8134
|
position: "absolute",
|
|
@@ -8006,8 +8170,8 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
8006
8170
|
setIsOpened.setFalse();
|
|
8007
8171
|
}, [isCollapsed]);
|
|
8008
8172
|
const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
|
|
8009
|
-
return /* @__PURE__ */ jsxs24(
|
|
8010
|
-
item.href ? /* @__PURE__ */
|
|
8173
|
+
return /* @__PURE__ */ jsxs24(Fragment10, { children: [
|
|
8174
|
+
item.href ? /* @__PURE__ */ jsx28(LinkComponentTag, { to: item.href, href: item.href, onClick: onClickElement, children: content }) : content,
|
|
8011
8175
|
item.children && /* @__PURE__ */ jsxs24(
|
|
8012
8176
|
Div_default.column,
|
|
8013
8177
|
{
|
|
@@ -8019,7 +8183,7 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
8019
8183
|
overflow: "hidden",
|
|
8020
8184
|
transition: `max-height ${theme2.styles.transition}, margin-top ${theme2.styles.transition}`,
|
|
8021
8185
|
children: [
|
|
8022
|
-
item.children.map((child) => /* @__PURE__ */
|
|
8186
|
+
item.children.map((child) => /* @__PURE__ */ jsx28(
|
|
8023
8187
|
MenuItemComponent,
|
|
8024
8188
|
{
|
|
8025
8189
|
item: child,
|
|
@@ -8038,7 +8202,7 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
8038
8202
|
left: paddingLeft + iconSize / 2,
|
|
8039
8203
|
zIndex: -1,
|
|
8040
8204
|
children: [
|
|
8041
|
-
/* @__PURE__ */
|
|
8205
|
+
/* @__PURE__ */ jsx28(
|
|
8042
8206
|
Div_default,
|
|
8043
8207
|
{
|
|
8044
8208
|
position: "relative",
|
|
@@ -8048,7 +8212,7 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
|
|
|
8048
8212
|
zIndex: 1
|
|
8049
8213
|
}
|
|
8050
8214
|
),
|
|
8051
|
-
/* @__PURE__ */
|
|
8215
|
+
/* @__PURE__ */ jsx28(
|
|
8052
8216
|
Div_default,
|
|
8053
8217
|
{
|
|
8054
8218
|
position: "absolute",
|
|
@@ -8078,7 +8242,7 @@ var MenuItemTypeDivider = memo27(function MenuItemTypeDivider2({ item }) {
|
|
|
8078
8242
|
const { items } = useSideMenuContext();
|
|
8079
8243
|
const isCollapsed = sideMenuIsCollapsed && !item.shortText;
|
|
8080
8244
|
const isFirst = items[0]?.type === item.type && items[0]?.text === item.text;
|
|
8081
|
-
return /* @__PURE__ */
|
|
8245
|
+
return /* @__PURE__ */ jsx28(
|
|
8082
8246
|
Div_default.row,
|
|
8083
8247
|
{
|
|
8084
8248
|
maxHeight: !isCollapsed ? 30 : theme2.styles.gap + 1,
|
|
@@ -8086,7 +8250,7 @@ var MenuItemTypeDivider = memo27(function MenuItemTypeDivider2({ item }) {
|
|
|
8086
8250
|
paddingInline: theme2.styles.gap,
|
|
8087
8251
|
overflow: "hidden",
|
|
8088
8252
|
transition: `max-height ${theme2.styles.transition}, padding-top ${theme2.styles.transition}`,
|
|
8089
|
-
children: sideMenuIsCollapsed && item.shortText || !sideMenuIsCollapsed ? /* @__PURE__ */
|
|
8253
|
+
children: sideMenuIsCollapsed && item.shortText || !sideMenuIsCollapsed ? /* @__PURE__ */ jsx28(
|
|
8090
8254
|
Text_default,
|
|
8091
8255
|
{
|
|
8092
8256
|
width: "100%",
|
|
@@ -8098,17 +8262,18 @@ var MenuItemTypeDivider = memo27(function MenuItemTypeDivider2({ item }) {
|
|
|
8098
8262
|
whiteSpace: "nowrap",
|
|
8099
8263
|
children: sideMenuIsCollapsed ? item.shortText : item.text
|
|
8100
8264
|
}
|
|
8101
|
-
) : !isFirst ? /* @__PURE__ */
|
|
8265
|
+
) : !isFirst ? /* @__PURE__ */ jsx28(Divider_default.horizontal, {}) : void 0
|
|
8102
8266
|
}
|
|
8103
8267
|
);
|
|
8104
8268
|
});
|
|
8105
8269
|
var MenuItemComponent = memo27(function MenuItemComponent2({ item, ...props }) {
|
|
8106
|
-
return /* @__PURE__ */
|
|
8270
|
+
return /* @__PURE__ */ jsx28(Div_default, { width: "100%", children: item.type === "item" ? /* @__PURE__ */ jsx28(MenuItemTypeItem, { item, ...props }) : item.type === "divider" ? /* @__PURE__ */ jsx28(MenuItemTypeDivider, { item }) : void 0 });
|
|
8107
8271
|
});
|
|
8108
8272
|
var SideMenuComponent = function SideMenu({
|
|
8109
8273
|
items,
|
|
8110
8274
|
bottomItems,
|
|
8111
8275
|
location,
|
|
8276
|
+
position = "left",
|
|
8112
8277
|
topSpace = 0,
|
|
8113
8278
|
logoAssetName,
|
|
8114
8279
|
logoUrl,
|
|
@@ -8121,6 +8286,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8121
8286
|
itemsAdditionalComponent,
|
|
8122
8287
|
betweenItemsAdditionalComponent,
|
|
8123
8288
|
bottomItemsAdditionalComponent,
|
|
8289
|
+
border,
|
|
8124
8290
|
isLoading,
|
|
8125
8291
|
backgroundColor,
|
|
8126
8292
|
activeItemColor,
|
|
@@ -8129,8 +8295,10 @@ var SideMenuComponent = function SideMenu({
|
|
|
8129
8295
|
paddingTop,
|
|
8130
8296
|
paddingBottom,
|
|
8131
8297
|
mobileFoldToPosition = "left",
|
|
8298
|
+
sideBar,
|
|
8132
8299
|
renderItemsHolder,
|
|
8133
|
-
renderBottomItemsHolder
|
|
8300
|
+
renderBottomItemsHolder,
|
|
8301
|
+
children
|
|
8134
8302
|
}) {
|
|
8135
8303
|
const theme2 = useTheme29();
|
|
8136
8304
|
const mediaQuery = useMediaQuery();
|
|
@@ -8148,24 +8316,28 @@ var SideMenuComponent = function SideMenu({
|
|
|
8148
8316
|
activeItem,
|
|
8149
8317
|
setActiveItem,
|
|
8150
8318
|
items: itemsState,
|
|
8151
|
-
bottomItems: bottomItemsState
|
|
8319
|
+
bottomItems: bottomItemsState,
|
|
8320
|
+
position
|
|
8152
8321
|
}),
|
|
8153
|
-
[activeItem, itemsState, bottomItemsState]
|
|
8322
|
+
[activeItem, itemsState, bottomItemsState, position]
|
|
8154
8323
|
);
|
|
8155
8324
|
const isCollapsable = collapsable && !mediaQuery.size1000;
|
|
8156
8325
|
const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
|
|
8157
8326
|
const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
|
|
8158
8327
|
const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
|
|
8159
8328
|
const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
|
|
8329
|
+
const sideBarWidth = components.sideMenu?.width ?? defaultSideBarWidth;
|
|
8160
8330
|
const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
|
|
8161
8331
|
const logoSize = sideMenuCollapsedWidth - theme2.styles.space * 2;
|
|
8332
|
+
const readyBorder = border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`;
|
|
8333
|
+
const readyTransition = mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition;
|
|
8162
8334
|
useEffect16(() => {
|
|
8163
8335
|
setItemsState(items);
|
|
8164
8336
|
}, [items]);
|
|
8165
8337
|
useEffect16(() => {
|
|
8166
8338
|
setBottomItemsState(bottomItems);
|
|
8167
8339
|
}, [bottomItems]);
|
|
8168
|
-
const itemsComponent = /* @__PURE__ */
|
|
8340
|
+
const itemsComponent = /* @__PURE__ */ jsx28(
|
|
8169
8341
|
Div_default.column,
|
|
8170
8342
|
{
|
|
8171
8343
|
width: "100%",
|
|
@@ -8173,7 +8345,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8173
8345
|
overflowY: !isCollapsed ? "auto" : void 0,
|
|
8174
8346
|
paddingInline: !renderItemsHolder ? theme2.styles.space : void 0,
|
|
8175
8347
|
paddingBottom: !renderItemsHolder ? !isCollapsable && !readyBottomItems ? theme2.styles.space : void 0 : void 0,
|
|
8176
|
-
children: /* @__PURE__ */
|
|
8348
|
+
children: /* @__PURE__ */ jsx28(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx28(
|
|
8177
8349
|
MenuItemComponent,
|
|
8178
8350
|
{
|
|
8179
8351
|
item,
|
|
@@ -8183,11 +8355,11 @@ var SideMenuComponent = function SideMenu({
|
|
|
8183
8355
|
location,
|
|
8184
8356
|
onClick: onClickXButton
|
|
8185
8357
|
},
|
|
8186
|
-
item.text
|
|
8358
|
+
item.type + item.text
|
|
8187
8359
|
)) })
|
|
8188
8360
|
}
|
|
8189
8361
|
);
|
|
8190
|
-
const bottomItemsComponent = /* @__PURE__ */
|
|
8362
|
+
const bottomItemsComponent = /* @__PURE__ */ jsx28(
|
|
8191
8363
|
Div_default.column,
|
|
8192
8364
|
{
|
|
8193
8365
|
borderTop: mediaQuery.size1000 ? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
|
|
@@ -8196,7 +8368,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8196
8368
|
paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
|
|
8197
8369
|
paddingInline: !renderItemsHolder ? theme2.styles.space : void 0,
|
|
8198
8370
|
paddingBottom: !renderItemsHolder ? !isCollapsable ? theme2.styles.space : void 0 : void 0,
|
|
8199
|
-
children: readyBottomItems?.map((item) => /* @__PURE__ */
|
|
8371
|
+
children: readyBottomItems?.map((item) => /* @__PURE__ */ jsx28(
|
|
8200
8372
|
MenuItemComponent,
|
|
8201
8373
|
{
|
|
8202
8374
|
item,
|
|
@@ -8206,143 +8378,172 @@ var SideMenuComponent = function SideMenu({
|
|
|
8206
8378
|
location,
|
|
8207
8379
|
onClick: onClickXButton
|
|
8208
8380
|
},
|
|
8209
|
-
item.text
|
|
8381
|
+
item.type + item.text
|
|
8210
8382
|
))
|
|
8211
8383
|
}
|
|
8212
8384
|
);
|
|
8213
|
-
|
|
8214
|
-
Div_default
|
|
8385
|
+
const sideBarComponent = sideBar ? /* @__PURE__ */ jsx28(
|
|
8386
|
+
Div_default,
|
|
8215
8387
|
{
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
{
|
|
8245
|
-
name: logoAssetName,
|
|
8246
|
-
src: logoUrl,
|
|
8247
|
-
width: logoSize,
|
|
8248
|
-
height: logoSize,
|
|
8249
|
-
objectFit: "contain"
|
|
8250
|
-
}
|
|
8251
|
-
),
|
|
8252
|
-
logoText && /* @__PURE__ */ jsx27(
|
|
8253
|
-
Text_default,
|
|
8254
|
-
{
|
|
8255
|
-
fontFamily: logoFontFamily,
|
|
8256
|
-
fontSize: 22,
|
|
8257
|
-
fontWeight: 800,
|
|
8258
|
-
opacity: !isCollapsed ? 1 : 0,
|
|
8259
|
-
transition: theme2.styles.transition,
|
|
8260
|
-
userSelect: "none",
|
|
8261
|
-
children: logoText
|
|
8262
|
-
}
|
|
8263
|
-
)
|
|
8264
|
-
]
|
|
8265
|
-
}
|
|
8266
|
-
) }),
|
|
8267
|
-
withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx27(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
|
|
8268
|
-
] }),
|
|
8269
|
-
itemsAdditionalComponent,
|
|
8270
|
-
!isLoading ? /* @__PURE__ */ jsxs24(Fragment8, { children: [
|
|
8271
|
-
renderItemsHolder ? renderItemsHolder(itemsComponent) : itemsComponent,
|
|
8272
|
-
betweenItemsAdditionalComponent,
|
|
8273
|
-
readyBottomItems && /* @__PURE__ */ jsx27(Fragment8, { children: renderBottomItemsHolder ? renderBottomItemsHolder(bottomItemsComponent) : bottomItemsComponent })
|
|
8274
|
-
] }) : /* @__PURE__ */ jsx27(Div_default, { flex: 1, children: /* @__PURE__ */ jsx27(Loader_default.box, { text: isCollapsed ? "" : void 0 }) }),
|
|
8275
|
-
bottomItemsAdditionalComponent,
|
|
8276
|
-
isCollapsable && /* @__PURE__ */ jsx27(
|
|
8277
|
-
Div_default,
|
|
8388
|
+
width: sideBarWidth,
|
|
8389
|
+
height: "100%",
|
|
8390
|
+
flexShrink: 0,
|
|
8391
|
+
borderRight: position === "left" ? readyBorder : void 0,
|
|
8392
|
+
borderLeft: position === "right" ? border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
|
|
8393
|
+
children: sideBar
|
|
8394
|
+
}
|
|
8395
|
+
) : sideBar;
|
|
8396
|
+
return /* @__PURE__ */ jsxs24(SideMenuContextProvider, { value: contextValue, children: [
|
|
8397
|
+
/* @__PURE__ */ jsxs24(
|
|
8398
|
+
Div_default.row,
|
|
8399
|
+
{
|
|
8400
|
+
as: "aside",
|
|
8401
|
+
position: "fixed",
|
|
8402
|
+
width: mediaQuery.size1000 ? "100%" : (isCollapsed ? sideMenuCollapsedWidth : sideMenuWidth) + (sideBar ? sideBarWidth : 0),
|
|
8403
|
+
height: `calc(100svh - ${topSpace}px)`,
|
|
8404
|
+
top: topSpace,
|
|
8405
|
+
left: position === "left" ? 0 : void 0,
|
|
8406
|
+
right: position === "right" ? 0 : void 0,
|
|
8407
|
+
backgroundColor: readyBackgroundColor,
|
|
8408
|
+
transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : `translateX(${mobileFoldToPosition === "left" ? "-" : ""}100%)`,
|
|
8409
|
+
transition: readyTransition,
|
|
8410
|
+
userSelect: "none",
|
|
8411
|
+
zIndex: 10,
|
|
8412
|
+
children: [
|
|
8413
|
+
position === "left" && sideBarComponent,
|
|
8414
|
+
/* @__PURE__ */ jsxs24(
|
|
8415
|
+
Div_default.column,
|
|
8278
8416
|
{
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8417
|
+
width: mediaQuery.size1000 ? "100%" : isCollapsed ? sideMenuCollapsedWidth : sideMenuWidth,
|
|
8418
|
+
height: "100%",
|
|
8419
|
+
borderRight: position === "left" ? readyBorder : void 0,
|
|
8420
|
+
borderLeft: position === "right" ? border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
|
|
8421
|
+
flexShrink: 0,
|
|
8422
|
+
paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space),
|
|
8423
|
+
paddingBottom,
|
|
8424
|
+
transition: readyTransition,
|
|
8425
|
+
children: [
|
|
8426
|
+
/* @__PURE__ */ jsxs24(Div_default.column, { width: "100%", height: "100%", gap: gap ?? theme2.styles.space, children: [
|
|
8427
|
+
(logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs24(Div_default.row, { alignItems: "center", paddingInline: theme2.styles.space, children: [
|
|
8428
|
+
(logoAssetName || logoUrl) && /* @__PURE__ */ jsx28(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs24(
|
|
8429
|
+
Div_default.row,
|
|
8430
|
+
{
|
|
8431
|
+
alignItems: "center",
|
|
8432
|
+
width: sideMenuCollapsedWidth ? logoSize : void 0,
|
|
8433
|
+
height: logoSize,
|
|
8434
|
+
whiteSpace: "nowrap",
|
|
8435
|
+
gap: theme2.styles.gap,
|
|
8436
|
+
children: [
|
|
8437
|
+
/* @__PURE__ */ jsx28(
|
|
8438
|
+
Image_default,
|
|
8439
|
+
{
|
|
8440
|
+
name: logoAssetName,
|
|
8441
|
+
src: logoUrl,
|
|
8442
|
+
width: logoSize,
|
|
8443
|
+
height: logoSize,
|
|
8444
|
+
objectFit: "contain"
|
|
8445
|
+
}
|
|
8446
|
+
),
|
|
8447
|
+
logoText && /* @__PURE__ */ jsx28(
|
|
8448
|
+
Text_default,
|
|
8449
|
+
{
|
|
8450
|
+
fontFamily: logoFontFamily,
|
|
8451
|
+
fontSize: 22,
|
|
8452
|
+
fontWeight: 800,
|
|
8453
|
+
opacity: !isCollapsed ? 1 : 0,
|
|
8454
|
+
transition: theme2.styles.transition,
|
|
8455
|
+
userSelect: "none",
|
|
8456
|
+
children: logoText
|
|
8457
|
+
}
|
|
8458
|
+
)
|
|
8459
|
+
]
|
|
8460
|
+
}
|
|
8461
|
+
) }),
|
|
8462
|
+
withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx28(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
|
|
8463
|
+
] }),
|
|
8464
|
+
itemsAdditionalComponent,
|
|
8465
|
+
!isLoading ? /* @__PURE__ */ jsxs24(Fragment10, { children: [
|
|
8466
|
+
renderItemsHolder ? renderItemsHolder(itemsComponent) : itemsComponent,
|
|
8467
|
+
betweenItemsAdditionalComponent,
|
|
8468
|
+
readyBottomItems && /* @__PURE__ */ jsx28(Fragment10, { children: renderBottomItemsHolder ? renderBottomItemsHolder(bottomItemsComponent) : bottomItemsComponent })
|
|
8469
|
+
] }) : /* @__PURE__ */ jsx28(Div_default, { flex: 1, children: /* @__PURE__ */ jsx28(Loader_default.box, { text: isCollapsed ? "" : void 0 }) }),
|
|
8470
|
+
bottomItemsAdditionalComponent,
|
|
8471
|
+
isCollapsable && /* @__PURE__ */ jsx28(
|
|
8472
|
+
Div_default,
|
|
8297
8473
|
{
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8474
|
+
borderTop: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
|
|
8475
|
+
marginTop: !readyBottomItems ? "auto" : void 0,
|
|
8476
|
+
paddingInline: theme2.styles.space,
|
|
8477
|
+
paddingBlock: theme2.styles.space,
|
|
8478
|
+
children: /* @__PURE__ */ jsx28(
|
|
8479
|
+
Div_default.row,
|
|
8480
|
+
{
|
|
8481
|
+
alignItems: "center",
|
|
8482
|
+
justifyContent: "center",
|
|
8483
|
+
backgroundColor: readyBackgroundColor,
|
|
8484
|
+
borderRadius: theme2.styles.borderRadius,
|
|
8485
|
+
cursor: "pointer",
|
|
8486
|
+
filterHover: filterHover().z1,
|
|
8487
|
+
isTabAccessed: true,
|
|
8488
|
+
paddingBlock: theme2.styles.gap,
|
|
8489
|
+
onClick: setSideMenuIsCollapsed.toggle,
|
|
8490
|
+
children: /* @__PURE__ */ jsx28(
|
|
8491
|
+
Icon_default,
|
|
8492
|
+
{
|
|
8493
|
+
name: position === "left" ? "chevronRight" : "chevronLeft",
|
|
8494
|
+
size: 20,
|
|
8495
|
+
color: theme2.colors.textSecondary,
|
|
8496
|
+
transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
|
|
8497
|
+
transition: theme2.styles.transition
|
|
8498
|
+
}
|
|
8499
|
+
)
|
|
8500
|
+
}
|
|
8501
|
+
)
|
|
8303
8502
|
}
|
|
8304
8503
|
)
|
|
8305
|
-
}
|
|
8306
|
-
|
|
8504
|
+
] }),
|
|
8505
|
+
widthMobileHandle && /* @__PURE__ */ jsx28(
|
|
8506
|
+
Div_default.row,
|
|
8507
|
+
{
|
|
8508
|
+
position: "absolute",
|
|
8509
|
+
top: theme2.styles.space,
|
|
8510
|
+
left: "100%",
|
|
8511
|
+
backgroundColor: readyBackgroundColor,
|
|
8512
|
+
border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
|
|
8513
|
+
borderLeft: "none",
|
|
8514
|
+
borderTopRightRadius: theme2.styles.borderRadius,
|
|
8515
|
+
borderBottomRightRadius: theme2.styles.borderRadius,
|
|
8516
|
+
alignItems: "center",
|
|
8517
|
+
cursor: "pointer",
|
|
8518
|
+
opacity: !mediaQuery.size1000 ? 0 : void 0,
|
|
8519
|
+
pointerEvents: !mediaQuery.size1000 ? "none" : void 0,
|
|
8520
|
+
padding: theme2.styles.gap,
|
|
8521
|
+
paddingRight: (theme2.styles.space + theme2.styles.gap) / 2,
|
|
8522
|
+
transform: !mediaQuery.size1000 ? "translateX(-100%)" : void 0,
|
|
8523
|
+
transition: theme2.styles.transition,
|
|
8524
|
+
onClick: setSideMenuIsOpenMobile.toggle,
|
|
8525
|
+
children: /* @__PURE__ */ jsx28(
|
|
8526
|
+
Icon_default,
|
|
8527
|
+
{
|
|
8528
|
+
name: "chevronRight",
|
|
8529
|
+
size: 20,
|
|
8530
|
+
color: theme2.colors.textSecondary,
|
|
8531
|
+
transform: sideMenuIsOpenMobile ? "rotate(180deg)" : void 0,
|
|
8532
|
+
transition: theme2.styles.transition
|
|
8533
|
+
}
|
|
8534
|
+
)
|
|
8535
|
+
}
|
|
8536
|
+
),
|
|
8537
|
+
absoluteComponent && /* @__PURE__ */ jsx28(Div_default, { position: "absolute", top: 0, left: 0, pointerEvents: "none", zIndex: 2, children: /* @__PURE__ */ jsx28(Div_default, { pointerEvents: "all", children: absoluteComponent }) })
|
|
8538
|
+
]
|
|
8307
8539
|
}
|
|
8308
|
-
)
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
left: "100%",
|
|
8316
|
-
backgroundColor: readyBackgroundColor,
|
|
8317
|
-
border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
|
|
8318
|
-
borderLeft: "none",
|
|
8319
|
-
borderTopRightRadius: theme2.styles.borderRadius,
|
|
8320
|
-
borderBottomRightRadius: theme2.styles.borderRadius,
|
|
8321
|
-
alignItems: "center",
|
|
8322
|
-
cursor: "pointer",
|
|
8323
|
-
opacity: !mediaQuery.size1000 ? 0 : void 0,
|
|
8324
|
-
pointerEvents: !mediaQuery.size1000 ? "none" : void 0,
|
|
8325
|
-
padding: theme2.styles.gap,
|
|
8326
|
-
paddingRight: (theme2.styles.space + theme2.styles.gap) / 2,
|
|
8327
|
-
transform: !mediaQuery.size1000 ? "translateX(-100%)" : void 0,
|
|
8328
|
-
transition: theme2.styles.transition,
|
|
8329
|
-
onClick: setSideMenuIsOpenMobile.toggle,
|
|
8330
|
-
children: /* @__PURE__ */ jsx27(
|
|
8331
|
-
Icon_default,
|
|
8332
|
-
{
|
|
8333
|
-
name: "chevronRight",
|
|
8334
|
-
size: 20,
|
|
8335
|
-
color: theme2.colors.textSecondary,
|
|
8336
|
-
transform: sideMenuIsOpenMobile ? "rotate(180deg)" : void 0,
|
|
8337
|
-
transition: theme2.styles.transition
|
|
8338
|
-
}
|
|
8339
|
-
)
|
|
8340
|
-
}
|
|
8341
|
-
),
|
|
8342
|
-
absoluteComponent && /* @__PURE__ */ jsx27(Div_default, { position: "absolute", top: 0, left: 0, pointerEvents: "none", zIndex: 2, children: /* @__PURE__ */ jsx27(Div_default, { pointerEvents: "all", children: absoluteComponent }) })
|
|
8343
|
-
]
|
|
8344
|
-
}
|
|
8345
|
-
) });
|
|
8540
|
+
),
|
|
8541
|
+
position === "right" && sideBarComponent
|
|
8542
|
+
]
|
|
8543
|
+
}
|
|
8544
|
+
),
|
|
8545
|
+
children
|
|
8546
|
+
] });
|
|
8346
8547
|
};
|
|
8347
8548
|
SideMenuComponent.pageHolder = function SideMenuPageHolder({
|
|
8348
8549
|
additionalTopComponent,
|
|
@@ -8352,18 +8553,21 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({
|
|
|
8352
8553
|
const theme2 = useTheme29();
|
|
8353
8554
|
const mediaQuery = useMediaQuery();
|
|
8354
8555
|
const { components, sideMenuIsCollapsed } = useBetterHtmlContextInternal();
|
|
8556
|
+
const { position } = useSideMenuContext();
|
|
8355
8557
|
const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
|
|
8356
8558
|
const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
|
|
8559
|
+
const sideSpace = !mediaQuery.size1000 ? !sideMenuIsCollapsed ? sideMenuWidth : sideMenuCollapsedWidth : void 0;
|
|
8357
8560
|
return /* @__PURE__ */ jsxs24(
|
|
8358
8561
|
Div_default,
|
|
8359
8562
|
{
|
|
8360
8563
|
position: "relative",
|
|
8361
8564
|
width: "100%",
|
|
8362
|
-
paddingLeft:
|
|
8565
|
+
paddingLeft: position === "left" ? sideSpace : void 0,
|
|
8566
|
+
paddingRight: position === "right" ? sideSpace : void 0,
|
|
8363
8567
|
transition: theme2.styles.transition,
|
|
8364
8568
|
children: [
|
|
8365
8569
|
additionalTopComponent,
|
|
8366
|
-
/* @__PURE__ */
|
|
8570
|
+
/* @__PURE__ */ jsx28(PageHolder_default, { ...props }),
|
|
8367
8571
|
additionalBottomComponent
|
|
8368
8572
|
]
|
|
8369
8573
|
}
|
|
@@ -8390,7 +8594,7 @@ SideMenuComponent.burgerButton = function BurgerButton({ position = "left", onCl
|
|
|
8390
8594
|
onMouseOut: setIsHovered.setFalse,
|
|
8391
8595
|
onClick: onClickElement,
|
|
8392
8596
|
children: [
|
|
8393
|
-
/* @__PURE__ */
|
|
8597
|
+
/* @__PURE__ */ jsx28(
|
|
8394
8598
|
Div_default,
|
|
8395
8599
|
{
|
|
8396
8600
|
position: "absolute",
|
|
@@ -8405,7 +8609,7 @@ SideMenuComponent.burgerButton = function BurgerButton({ position = "left", onCl
|
|
|
8405
8609
|
transition: theme2.styles.transition
|
|
8406
8610
|
}
|
|
8407
8611
|
),
|
|
8408
|
-
/* @__PURE__ */
|
|
8612
|
+
/* @__PURE__ */ jsx28(
|
|
8409
8613
|
Div_default,
|
|
8410
8614
|
{
|
|
8411
8615
|
position: "absolute",
|
|
@@ -8421,7 +8625,7 @@ SideMenuComponent.burgerButton = function BurgerButton({ position = "left", onCl
|
|
|
8421
8625
|
transition: theme2.styles.transition
|
|
8422
8626
|
}
|
|
8423
8627
|
),
|
|
8424
|
-
/* @__PURE__ */
|
|
8628
|
+
/* @__PURE__ */ jsx28(
|
|
8425
8629
|
Div_default,
|
|
8426
8630
|
{
|
|
8427
8631
|
position: "absolute",
|
|
@@ -8487,6 +8691,7 @@ export {
|
|
|
8487
8691
|
formatPhoneNumber,
|
|
8488
8692
|
generateApi,
|
|
8489
8693
|
generateEventEmitter,
|
|
8694
|
+
generateI18n,
|
|
8490
8695
|
generateLocalStorage,
|
|
8491
8696
|
generateRandomString,
|
|
8492
8697
|
getBrowser,
|