react-better-html 1.1.102 → 1.1.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +30 -13
- package/dist/index.d.ts +30 -13
- package/dist/index.js +101 -83
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +148 -130
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2751,40 +2751,39 @@ Button2.upload = ButtonComponent.upload;
|
|
|
2751
2751
|
var Button_default = Button2;
|
|
2752
2752
|
|
|
2753
2753
|
// src/components/Divider.tsx
|
|
2754
|
-
import { memo as memo8 } from "react";
|
|
2754
|
+
import { forwardRef as forwardRef5, memo as memo8 } from "react";
|
|
2755
2755
|
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2756
2756
|
var Divider_default = {
|
|
2757
|
-
vertical: memo8(
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
textColor,
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
})
|
|
2757
|
+
vertical: memo8(
|
|
2758
|
+
forwardRef5(function Divider({ width = 1, backgroundColor, height, ...props }, ref) {
|
|
2759
|
+
const theme2 = useTheme();
|
|
2760
|
+
return /* @__PURE__ */ jsx8(
|
|
2761
|
+
Div_default,
|
|
2762
|
+
{
|
|
2763
|
+
width,
|
|
2764
|
+
height: height ?? "100%",
|
|
2765
|
+
flexShrink: 0,
|
|
2766
|
+
backgroundColor: backgroundColor ?? theme2.colors.border,
|
|
2767
|
+
...props,
|
|
2768
|
+
ref
|
|
2769
|
+
}
|
|
2770
|
+
);
|
|
2771
|
+
})
|
|
2772
|
+
),
|
|
2773
|
+
horizontal: memo8(
|
|
2774
|
+
forwardRef5(function Divider2({ width = 1, backgroundColor, text, textColor, ...props }, ref) {
|
|
2775
|
+
const theme2 = useTheme();
|
|
2776
|
+
return /* @__PURE__ */ jsxs4(Div_default.row, { width: "100%", alignItems: "center", gap: text ? theme2.styles.space : void 0, ...props, ref, children: [
|
|
2777
|
+
/* @__PURE__ */ jsx8(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border }),
|
|
2778
|
+
text && /* @__PURE__ */ jsx8(Text_default, { color: textColor ?? theme2.colors.textSecondary, children: text }),
|
|
2779
|
+
/* @__PURE__ */ jsx8(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border })
|
|
2780
|
+
] });
|
|
2781
|
+
})
|
|
2782
|
+
)
|
|
2784
2783
|
};
|
|
2785
2784
|
|
|
2786
2785
|
// src/components/Modal.tsx
|
|
2787
|
-
import { memo as memo9, useCallback as useCallback5, forwardRef as
|
|
2786
|
+
import { memo as memo9, useCallback as useCallback5, forwardRef as forwardRef6, useImperativeHandle, useRef as useRef2, useState as useState3 } from "react";
|
|
2788
2787
|
import styled7 from "styled-components";
|
|
2789
2788
|
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2790
2789
|
var DialogStylesElement = styled7.dialog.withConfig({
|
|
@@ -2827,7 +2826,7 @@ var DialogStylesElement = styled7.dialog.withConfig({
|
|
|
2827
2826
|
}
|
|
2828
2827
|
}
|
|
2829
2828
|
`;
|
|
2830
|
-
var ModalComponent =
|
|
2829
|
+
var ModalComponent = forwardRef6(function Modal({
|
|
2831
2830
|
maxWidth,
|
|
2832
2831
|
title,
|
|
2833
2832
|
titleColor,
|
|
@@ -2978,7 +2977,7 @@ var ModalComponent = forwardRef5(function Modal({
|
|
|
2978
2977
|
}
|
|
2979
2978
|
);
|
|
2980
2979
|
});
|
|
2981
|
-
ModalComponent.confirmation =
|
|
2980
|
+
ModalComponent.confirmation = forwardRef6(function Confirmation({ continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
|
|
2982
2981
|
const theme2 = useTheme();
|
|
2983
2982
|
const modalRef = useRef2(null);
|
|
2984
2983
|
const onCancelElement = useCallback5(() => {
|
|
@@ -3007,7 +3006,7 @@ ModalComponent.confirmation = forwardRef5(function Confirmation({ continueButton
|
|
|
3007
3006
|
)
|
|
3008
3007
|
] });
|
|
3009
3008
|
});
|
|
3010
|
-
ModalComponent.destructive =
|
|
3009
|
+
ModalComponent.destructive = forwardRef6(function Destructive2({ deleteButtonLoaderName, onDelete, onCancel, ...props }, ref) {
|
|
3011
3010
|
const theme2 = useTheme();
|
|
3012
3011
|
const modalRef = useRef2(null);
|
|
3013
3012
|
const onCancelElement = useCallback5(() => {
|
|
@@ -3050,9 +3049,9 @@ Modal2.destructive = ModalComponent.destructive;
|
|
|
3050
3049
|
var Modal_default = Modal2;
|
|
3051
3050
|
|
|
3052
3051
|
// src/components/PageHolder.tsx
|
|
3053
|
-
import { memo as memo10 } from "react";
|
|
3054
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
3055
|
-
function PageHolder({ noMaxContentWidth, children, ...props }) {
|
|
3052
|
+
import { forwardRef as forwardRef7, memo as memo10 } from "react";
|
|
3053
|
+
import { Fragment as Fragment3, jsx as jsx10 } from "react/jsx-runtime";
|
|
3054
|
+
var PageHolderComponent = forwardRef7(function PageHolder({ noMaxContentWidth, backgroundColor, children, ...props }, ref) {
|
|
3056
3055
|
const theme2 = useTheme();
|
|
3057
3056
|
const { app } = useBetterHtmlContextInternal();
|
|
3058
3057
|
return /* @__PURE__ */ jsx10(
|
|
@@ -3061,19 +3060,26 @@ function PageHolder({ noMaxContentWidth, children, ...props }) {
|
|
|
3061
3060
|
as: "main",
|
|
3062
3061
|
width: "100%",
|
|
3063
3062
|
maxWidth: !noMaxContentWidth ? app.contentMaxWidth : void 0,
|
|
3063
|
+
backgroundColor,
|
|
3064
3064
|
margin: "0px auto",
|
|
3065
3065
|
padding: theme2.styles.space,
|
|
3066
3066
|
...props,
|
|
3067
|
+
ref,
|
|
3067
3068
|
children
|
|
3068
3069
|
}
|
|
3069
3070
|
);
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3071
|
+
});
|
|
3072
|
+
PageHolderComponent.center = forwardRef7(function Center(props, ref) {
|
|
3073
|
+
return /* @__PURE__ */ jsx10(Fragment3, {});
|
|
3074
|
+
});
|
|
3075
|
+
var PageHolder2 = memo10(PageHolderComponent);
|
|
3076
|
+
PageHolder2.center = PageHolderComponent.center;
|
|
3077
|
+
var PageHolder_default = PageHolder2;
|
|
3072
3078
|
|
|
3073
3079
|
// src/components/PageHeader.tsx
|
|
3074
|
-
import { memo as memo11 } from "react";
|
|
3080
|
+
import { forwardRef as forwardRef8, memo as memo11 } from "react";
|
|
3075
3081
|
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3076
|
-
function PageHeader({
|
|
3082
|
+
var PageHeaderComponent = forwardRef8(function PageHeader({
|
|
3077
3083
|
imageUrl,
|
|
3078
3084
|
imageSize = 60,
|
|
3079
3085
|
title,
|
|
@@ -3084,59 +3090,69 @@ function PageHeader({
|
|
|
3084
3090
|
rightElement,
|
|
3085
3091
|
lightMode,
|
|
3086
3092
|
marginBottom
|
|
3087
|
-
}) {
|
|
3093
|
+
}, ref) {
|
|
3088
3094
|
const theme2 = useTheme();
|
|
3089
3095
|
const { app } = useBetterHtmlContextInternal();
|
|
3090
3096
|
const mediaQuery = useMediaQuery();
|
|
3091
|
-
return /* @__PURE__ */ jsxs6(
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3097
|
+
return /* @__PURE__ */ jsxs6(
|
|
3098
|
+
Div_default.row,
|
|
3099
|
+
{
|
|
3100
|
+
alignItems: "center",
|
|
3101
|
+
gap: theme2.styles.space,
|
|
3102
|
+
marginBottom: marginBottom ?? theme2.styles.space * 2,
|
|
3103
|
+
ref,
|
|
3104
|
+
children: [
|
|
3105
|
+
imageUrl && /* @__PURE__ */ jsx11(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
|
|
3106
|
+
/* @__PURE__ */ jsxs6(
|
|
3107
|
+
Div_default.column,
|
|
3108
|
+
{
|
|
3109
|
+
alignItems: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3110
|
+
flex: 1,
|
|
3111
|
+
gap: theme2.styles.gap / 2,
|
|
3112
|
+
children: [
|
|
3113
|
+
/* @__PURE__ */ jsxs6(
|
|
3114
|
+
Div_default.row,
|
|
3115
|
+
{
|
|
3116
|
+
alignItems: "center",
|
|
3117
|
+
justifyContent: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3118
|
+
gap: theme2.styles.space,
|
|
3119
|
+
children: [
|
|
3120
|
+
/* @__PURE__ */ jsx11(
|
|
3121
|
+
Text_default,
|
|
3122
|
+
{
|
|
3123
|
+
as: titleAs ?? "h1",
|
|
3124
|
+
textAlign,
|
|
3125
|
+
color: lightMode ? theme2.colors.base : theme2.colors.textPrimary,
|
|
3126
|
+
children: title
|
|
3127
|
+
}
|
|
3128
|
+
),
|
|
3129
|
+
titleRightElement
|
|
3130
|
+
]
|
|
3131
|
+
}
|
|
3132
|
+
),
|
|
3133
|
+
description && /* @__PURE__ */ jsx11(
|
|
3134
|
+
Text_default,
|
|
3135
|
+
{
|
|
3136
|
+
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
3137
|
+
textAlign,
|
|
3138
|
+
color: lightMode ? theme2.colors.base : theme2.colors.textSecondary,
|
|
3139
|
+
opacity: lightMode ? 0.7 : void 0,
|
|
3140
|
+
children: description
|
|
3141
|
+
}
|
|
3142
|
+
)
|
|
3143
|
+
]
|
|
3144
|
+
}
|
|
3145
|
+
),
|
|
3146
|
+
rightElement
|
|
3147
|
+
]
|
|
3148
|
+
}
|
|
3149
|
+
);
|
|
3150
|
+
});
|
|
3151
|
+
var PageHeader2 = memo11(PageHeaderComponent);
|
|
3152
|
+
var PageHeader_default = PageHeader2;
|
|
3137
3153
|
|
|
3138
3154
|
// src/components/Chip.tsx
|
|
3139
|
-
import { forwardRef as
|
|
3155
|
+
import { forwardRef as forwardRef9, memo as memo12 } from "react";
|
|
3140
3156
|
|
|
3141
3157
|
// src/utils/colorManipulation.ts
|
|
3142
3158
|
var rgbToHsl = (r, g, b) => {
|
|
@@ -3258,7 +3274,7 @@ var desaturateColor = (hexColor, amount) => {
|
|
|
3258
3274
|
|
|
3259
3275
|
// src/components/Chip.tsx
|
|
3260
3276
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
3261
|
-
var ChipComponent =
|
|
3277
|
+
var ChipComponent = forwardRef9(function Chip({ text, color, backgroundColor, borderRadius, isCircle, ...props }, ref) {
|
|
3262
3278
|
const theme2 = useTheme();
|
|
3263
3279
|
return /* @__PURE__ */ jsx12(
|
|
3264
3280
|
Div_default,
|
|
@@ -3274,7 +3290,7 @@ var ChipComponent = forwardRef6(function Chip({ text, color, backgroundColor, bo
|
|
|
3274
3290
|
}
|
|
3275
3291
|
);
|
|
3276
3292
|
});
|
|
3277
|
-
ChipComponent.colored =
|
|
3293
|
+
ChipComponent.colored = forwardRef9(function Colored({ color, ...props }, ref) {
|
|
3278
3294
|
const theme2 = useTheme();
|
|
3279
3295
|
const { colorTheme } = useBetterHtmlContextInternal();
|
|
3280
3296
|
const readyColor = color ?? theme2.colors.textSecondary;
|
|
@@ -3294,7 +3310,7 @@ Chip2.colored = ChipComponent.colored;
|
|
|
3294
3310
|
var Chip_default = Chip2;
|
|
3295
3311
|
|
|
3296
3312
|
// src/components/InputField.tsx
|
|
3297
|
-
import { forwardRef as
|
|
3313
|
+
import { forwardRef as forwardRef11, memo as memo16, useCallback as useCallback8, useState as useState6, useEffect as useEffect7, useMemo as useMemo5, useRef as useRef4, useId } from "react";
|
|
3298
3314
|
import styled8 from "styled-components";
|
|
3299
3315
|
|
|
3300
3316
|
// src/constants/countries.ts
|
|
@@ -4868,9 +4884,9 @@ function Label({ text, required, isError, color, htmlFor }) {
|
|
|
4868
4884
|
var Label_default = memo13(Label);
|
|
4869
4885
|
|
|
4870
4886
|
// src/components/Dropdown.tsx
|
|
4871
|
-
import { forwardRef as
|
|
4872
|
-
import { Fragment as
|
|
4873
|
-
var DropdownComponent =
|
|
4887
|
+
import { forwardRef as forwardRef10, memo as memo14, useCallback as useCallback6, useEffect as useEffect5, useMemo as useMemo3, useRef as useRef3, useState as useState4 } from "react";
|
|
4888
|
+
import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4889
|
+
var DropdownComponent = forwardRef10(function Dropdown({
|
|
4874
4890
|
label,
|
|
4875
4891
|
labelColor,
|
|
4876
4892
|
errorText,
|
|
@@ -5103,7 +5119,7 @@ var DropdownComponent = forwardRef7(function Dropdown({
|
|
|
5103
5119
|
transition: theme2.styles.transition,
|
|
5104
5120
|
role: "listbox",
|
|
5105
5121
|
"aria-label": label,
|
|
5106
|
-
children: isLoadingDebouncedSearchQuery || debounceIsLoading ? /* @__PURE__ */ jsx13(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ jsx13(Loader_default.text, {}) }) : filteredOptions.length ? /* @__PURE__ */ jsx13(
|
|
5122
|
+
children: isLoadingDebouncedSearchQuery || debounceIsLoading ? /* @__PURE__ */ jsx13(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ jsx13(Loader_default.text, {}) }) : filteredOptions.length ? /* @__PURE__ */ jsx13(Fragment4, { children: (withoutRenderingOptionsWhenClosed ? isOpen || isOpenLate : true) ? renderedOptions : void 0 }) : /* @__PURE__ */ jsx13(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ jsx13(Text_default.unknown, { textAlign: "left", children: debounceMinimumSymbolsRequired !== void 0 && searchQuery.length < debounceMinimumSymbolsRequired ? `Enter at least ${debounceMinimumSymbolsRequired} characters` : "No options" }) })
|
|
5107
5123
|
}
|
|
5108
5124
|
),
|
|
5109
5125
|
role: "combobox",
|
|
@@ -5161,7 +5177,7 @@ var DropdownComponent = forwardRef7(function Dropdown({
|
|
|
5161
5177
|
)
|
|
5162
5178
|
] }) });
|
|
5163
5179
|
});
|
|
5164
|
-
DropdownComponent.countries =
|
|
5180
|
+
DropdownComponent.countries = forwardRef10(function Countries({ ...props }, ref) {
|
|
5165
5181
|
const theme2 = useTheme();
|
|
5166
5182
|
const renderOption = useCallback6(
|
|
5167
5183
|
(option, index, isSelected) => /* @__PURE__ */ jsxs8(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
@@ -5516,7 +5532,7 @@ var TextareaElement = styled8.textarea.withConfig({
|
|
|
5516
5532
|
`;
|
|
5517
5533
|
var hours = Array.from({ length: 24 }, (_, index) => index);
|
|
5518
5534
|
var minutes = Array.from({ length: 60 }, (_, index) => index);
|
|
5519
|
-
var InputFieldComponent =
|
|
5535
|
+
var InputFieldComponent = forwardRef11(function InputField({
|
|
5520
5536
|
label,
|
|
5521
5537
|
labelColor,
|
|
5522
5538
|
errorText,
|
|
@@ -5637,7 +5653,7 @@ var InputFieldComponent = forwardRef8(function InputField({
|
|
|
5637
5653
|
)
|
|
5638
5654
|
] });
|
|
5639
5655
|
});
|
|
5640
|
-
InputFieldComponent.multiline =
|
|
5656
|
+
InputFieldComponent.multiline = forwardRef11(function Multiline({
|
|
5641
5657
|
label,
|
|
5642
5658
|
placeholder,
|
|
5643
5659
|
errorText,
|
|
@@ -5731,7 +5747,7 @@ InputFieldComponent.multiline = forwardRef8(function Multiline({
|
|
|
5731
5747
|
)
|
|
5732
5748
|
] });
|
|
5733
5749
|
});
|
|
5734
|
-
InputFieldComponent.email =
|
|
5750
|
+
InputFieldComponent.email = forwardRef11(function Email({ ...props }, ref) {
|
|
5735
5751
|
return /* @__PURE__ */ jsx15(
|
|
5736
5752
|
InputFieldComponent,
|
|
5737
5753
|
{
|
|
@@ -5745,7 +5761,7 @@ InputFieldComponent.email = forwardRef8(function Email({ ...props }, ref) {
|
|
|
5745
5761
|
}
|
|
5746
5762
|
);
|
|
5747
5763
|
});
|
|
5748
|
-
InputFieldComponent.password =
|
|
5764
|
+
InputFieldComponent.password = forwardRef11(function Password({ ...props }, ref) {
|
|
5749
5765
|
const [isPassword, setIsPassword] = useBooleanState(true);
|
|
5750
5766
|
return /* @__PURE__ */ jsx15(
|
|
5751
5767
|
InputFieldComponent,
|
|
@@ -5762,10 +5778,10 @@ InputFieldComponent.password = forwardRef8(function Password({ ...props }, ref)
|
|
|
5762
5778
|
}
|
|
5763
5779
|
);
|
|
5764
5780
|
});
|
|
5765
|
-
InputFieldComponent.search =
|
|
5781
|
+
InputFieldComponent.search = forwardRef11(function Search({ ...props }, ref) {
|
|
5766
5782
|
return /* @__PURE__ */ jsx15(InputFieldComponent, { leftIcon: "magnifyingGlass", placeholder: "Search...", ref, ...props });
|
|
5767
5783
|
});
|
|
5768
|
-
InputFieldComponent.phoneNumber =
|
|
5784
|
+
InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, value, onChangeValue, labelColor, id, ...props }, ref) {
|
|
5769
5785
|
const theme2 = useTheme();
|
|
5770
5786
|
const internalId = useId();
|
|
5771
5787
|
const [dropdownValue, setDropdownValue] = useState6();
|
|
@@ -5840,6 +5856,7 @@ InputFieldComponent.phoneNumber = forwardRef8(function PhoneNumber({ label, valu
|
|
|
5840
5856
|
inputFieldClassName: "react-better-html-phone-number-holder",
|
|
5841
5857
|
defaultValue,
|
|
5842
5858
|
value: dropdownValue,
|
|
5859
|
+
disabled: props.disabled,
|
|
5843
5860
|
onChange: setDropdownValue,
|
|
5844
5861
|
withoutClearButton: true
|
|
5845
5862
|
}
|
|
@@ -5859,7 +5876,7 @@ InputFieldComponent.phoneNumber = forwardRef8(function PhoneNumber({ label, valu
|
|
|
5859
5876
|
] })
|
|
5860
5877
|
] });
|
|
5861
5878
|
});
|
|
5862
|
-
InputFieldComponent.date =
|
|
5879
|
+
InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, ...props }, ref) {
|
|
5863
5880
|
const theme2 = useTheme();
|
|
5864
5881
|
const holderRef = useRef4(null);
|
|
5865
5882
|
const isMobileIOS = isMobileDevice && getBrowser() === "safari";
|
|
@@ -5898,7 +5915,7 @@ InputFieldComponent.date = forwardRef8(function Date2({ minDate, maxDate, ...pro
|
|
|
5898
5915
|
}
|
|
5899
5916
|
);
|
|
5900
5917
|
});
|
|
5901
|
-
InputFieldComponent.dateTime =
|
|
5918
|
+
InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate, ...props }, ref) {
|
|
5902
5919
|
const theme2 = useTheme();
|
|
5903
5920
|
const holderRef = useRef4(null);
|
|
5904
5921
|
const selectedHourRef = useRef4(null);
|
|
@@ -6051,7 +6068,7 @@ InputFieldComponent.dateTime = forwardRef8(function DateTime({ minDate, maxDate,
|
|
|
6051
6068
|
}
|
|
6052
6069
|
);
|
|
6053
6070
|
});
|
|
6054
|
-
InputFieldComponent.time =
|
|
6071
|
+
InputFieldComponent.time = forwardRef11(function Time({ ...props }, ref) {
|
|
6055
6072
|
const theme2 = useTheme();
|
|
6056
6073
|
const holderRef = useRef4(null);
|
|
6057
6074
|
const selectedHourRef = useRef4(null);
|
|
@@ -6153,7 +6170,7 @@ InputFieldComponent.time = forwardRef8(function Time({ ...props }, ref) {
|
|
|
6153
6170
|
}
|
|
6154
6171
|
);
|
|
6155
6172
|
});
|
|
6156
|
-
InputFieldComponent.color =
|
|
6173
|
+
InputFieldComponent.color = forwardRef11(function Color2({ value, onChangeValue, ...props }, ref) {
|
|
6157
6174
|
const [inputFieldValue, setInputFieldValue] = useState6(value ?? "#000000");
|
|
6158
6175
|
const onChangeValueElement = useCallback8(
|
|
6159
6176
|
(value2) => {
|
|
@@ -6204,7 +6221,7 @@ InputField2.color = InputFieldComponent.color;
|
|
|
6204
6221
|
var InputField_default = InputField2;
|
|
6205
6222
|
|
|
6206
6223
|
// src/components/ToggleInput.tsx
|
|
6207
|
-
import { forwardRef as
|
|
6224
|
+
import { forwardRef as forwardRef12, useCallback as useCallback9, useId as useId2, useState as useState7 } from "react";
|
|
6208
6225
|
import styled9 from "styled-components";
|
|
6209
6226
|
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6210
6227
|
var componentSize = 26;
|
|
@@ -6299,7 +6316,7 @@ var SwitchElement = styled9.div.withConfig({
|
|
|
6299
6316
|
${(props) => props.hoverStyle}
|
|
6300
6317
|
}
|
|
6301
6318
|
`;
|
|
6302
|
-
var ToggleInputComponent =
|
|
6319
|
+
var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
6303
6320
|
label,
|
|
6304
6321
|
labelColor,
|
|
6305
6322
|
text,
|
|
@@ -6405,13 +6422,13 @@ var ToggleInputComponent = forwardRef9(function ToggleInput({
|
|
|
6405
6422
|
] });
|
|
6406
6423
|
});
|
|
6407
6424
|
var ToggleInput_default = {
|
|
6408
|
-
checkbox:
|
|
6425
|
+
checkbox: forwardRef12(function Checkbox(props, ref) {
|
|
6409
6426
|
return /* @__PURE__ */ jsx16(ToggleInputComponent, { type: "checkbox", ref, ...props });
|
|
6410
6427
|
}),
|
|
6411
|
-
radiobutton:
|
|
6428
|
+
radiobutton: forwardRef12(function RadioButton(props, ref) {
|
|
6412
6429
|
return /* @__PURE__ */ jsx16(ToggleInputComponent, { type: "radio", ref, ...props });
|
|
6413
6430
|
}),
|
|
6414
|
-
switch:
|
|
6431
|
+
switch: forwardRef12(function Switch({
|
|
6415
6432
|
label,
|
|
6416
6433
|
labelColor,
|
|
6417
6434
|
errorText,
|
|
@@ -6489,9 +6506,9 @@ var ToggleInput_default = {
|
|
|
6489
6506
|
};
|
|
6490
6507
|
|
|
6491
6508
|
// src/components/Form.tsx
|
|
6492
|
-
import { Children, Fragment as
|
|
6509
|
+
import { Children, forwardRef as forwardRef13, Fragment as Fragment5, memo as memo17, useMemo as useMemo6 } from "react";
|
|
6493
6510
|
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6494
|
-
function Form({
|
|
6511
|
+
var FormComponent = forwardRef13(function Form({
|
|
6495
6512
|
form,
|
|
6496
6513
|
submitButtonText,
|
|
6497
6514
|
submitButtonLoaderName,
|
|
@@ -6506,7 +6523,7 @@ function Form({
|
|
|
6506
6523
|
onSubmit,
|
|
6507
6524
|
children,
|
|
6508
6525
|
...props
|
|
6509
|
-
}) {
|
|
6526
|
+
}, ref) {
|
|
6510
6527
|
const theme2 = useTheme();
|
|
6511
6528
|
const submitButtonIsDisabledInternal = useMemo6(() => {
|
|
6512
6529
|
if (!form || !form.requiredFields) return false;
|
|
@@ -6516,8 +6533,8 @@ function Form({
|
|
|
6516
6533
|
}, [form]);
|
|
6517
6534
|
const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
|
|
6518
6535
|
const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
|
|
6519
|
-
return /* @__PURE__ */ jsx17(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs12("form", { onSubmit: onSubmit ?? form?.onSubmit, children: [
|
|
6520
|
-
gap !== void 0 || withDividers ? /* @__PURE__ */ jsx17(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs12(
|
|
6536
|
+
return /* @__PURE__ */ jsx17(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs12("form", { onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
|
|
6537
|
+
gap !== void 0 || withDividers ? /* @__PURE__ */ jsx17(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
6521
6538
|
child,
|
|
6522
6539
|
index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx17(Divider_default.horizontal, {})
|
|
6523
6540
|
] }, index)) : children }) : children,
|
|
@@ -6545,13 +6562,14 @@ function Form({
|
|
|
6545
6562
|
}
|
|
6546
6563
|
)
|
|
6547
6564
|
] }) });
|
|
6548
|
-
}
|
|
6549
|
-
var
|
|
6565
|
+
});
|
|
6566
|
+
var Form2 = memo17(FormComponent);
|
|
6567
|
+
var Form_default = Form2;
|
|
6550
6568
|
|
|
6551
6569
|
// src/components/FormRow.tsx
|
|
6552
|
-
import { forwardRef as
|
|
6570
|
+
import { forwardRef as forwardRef14, memo as memo18 } from "react";
|
|
6553
6571
|
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6554
|
-
var FormRowComponent =
|
|
6572
|
+
var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPoint, gap, children, ...props }, ref) {
|
|
6555
6573
|
const theme2 = useTheme();
|
|
6556
6574
|
const mediaQuery = useMediaQuery();
|
|
6557
6575
|
const breakingPoint = !noBreakingPoint ? mediaQuery.size900 : false;
|
|
@@ -6561,7 +6579,7 @@ var FormRowComponent = forwardRef10(function FormRow({ oneItemOnly, noBreakingPo
|
|
|
6561
6579
|
oneItemOnly && /* @__PURE__ */ jsx18(Div_default, { width: "100%" })
|
|
6562
6580
|
] });
|
|
6563
6581
|
});
|
|
6564
|
-
FormRowComponent.withTitle =
|
|
6582
|
+
FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
6565
6583
|
icon,
|
|
6566
6584
|
title,
|
|
6567
6585
|
description,
|
|
@@ -6665,9 +6683,9 @@ ColorThemeSwitch2.withText = ColorThemeSwitchComponent.withText;
|
|
|
6665
6683
|
var ColorThemeSwitch_default = ColorThemeSwitch2;
|
|
6666
6684
|
|
|
6667
6685
|
// src/components/Table.tsx
|
|
6668
|
-
import { forwardRef as
|
|
6686
|
+
import { forwardRef as forwardRef15, memo as memo20, useCallback as useCallback10, useMemo as useMemo7, useState as useState8 } from "react";
|
|
6669
6687
|
import styled10, { css as css2 } from "styled-components";
|
|
6670
|
-
import { Fragment as
|
|
6688
|
+
import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
6671
6689
|
var defaultImageWidth = 120;
|
|
6672
6690
|
var TableStyledComponent = styled10.table.withConfig({
|
|
6673
6691
|
shouldForwardProp: (prop) => !["isStriped", "withHover", "withStickyHeader", "colorTheme", "theme"].includes(prop)
|
|
@@ -6732,7 +6750,7 @@ var TdStyledComponent = styled10.td.withConfig({
|
|
|
6732
6750
|
})`
|
|
6733
6751
|
${(props) => props.textAlign ? `text-align: ${props.textAlign} !important;` : ""}
|
|
6734
6752
|
`;
|
|
6735
|
-
var TableComponent =
|
|
6753
|
+
var TableComponent = forwardRef15(function Table({
|
|
6736
6754
|
columns,
|
|
6737
6755
|
data,
|
|
6738
6756
|
isStriped,
|
|
@@ -6754,7 +6772,7 @@ var TableComponent = forwardRef11(function Table({
|
|
|
6754
6772
|
return column.format ? column.format(item, index) : String(value ?? "");
|
|
6755
6773
|
}
|
|
6756
6774
|
case "element": {
|
|
6757
|
-
return column.render?.(item, index) ?? /* @__PURE__ */ jsx20(
|
|
6775
|
+
return column.render?.(item, index) ?? /* @__PURE__ */ jsx20(Fragment6, {});
|
|
6758
6776
|
}
|
|
6759
6777
|
case "image": {
|
|
6760
6778
|
const { type, keyName, ...props2 } = column;
|
|
@@ -6779,7 +6797,7 @@ var TableComponent = forwardRef11(function Table({
|
|
|
6779
6797
|
);
|
|
6780
6798
|
}
|
|
6781
6799
|
default: {
|
|
6782
|
-
return /* @__PURE__ */ jsx20(
|
|
6800
|
+
return /* @__PURE__ */ jsx20(Fragment6, {});
|
|
6783
6801
|
}
|
|
6784
6802
|
}
|
|
6785
6803
|
},
|
|
@@ -6854,12 +6872,12 @@ var Table2 = memo20(TableComponent);
|
|
|
6854
6872
|
var Table_default = Table2;
|
|
6855
6873
|
|
|
6856
6874
|
// src/components/Tabs.tsx
|
|
6857
|
-
import { forwardRef as
|
|
6875
|
+
import { forwardRef as forwardRef16, memo as memo21, useCallback as useCallback11, useEffect as useEffect9, useImperativeHandle as useImperativeHandle2, useMemo as useMemo8, useRef as useRef5, useState as useState9 } from "react";
|
|
6858
6876
|
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6859
6877
|
var tabBottomLineWidth = 2;
|
|
6860
6878
|
var tabDotSize = 6;
|
|
6861
6879
|
var defaultTabName = "tab";
|
|
6862
|
-
var TabsComponent =
|
|
6880
|
+
var TabsComponent = forwardRef16(function Tabs({ tabs, name, accentColor, style = "default", onChange, children, ...props }, ref) {
|
|
6863
6881
|
const reactRouterDomPlugin2 = usePlugin("react-router-dom");
|
|
6864
6882
|
const theme2 = useTheme();
|
|
6865
6883
|
const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
|
|
@@ -7045,11 +7063,11 @@ Tabs2.content = TabsComponent.content;
|
|
|
7045
7063
|
var Tabs_default = Tabs2;
|
|
7046
7064
|
|
|
7047
7065
|
// src/components/Foldable.tsx
|
|
7048
|
-
import { forwardRef as
|
|
7066
|
+
import { forwardRef as forwardRef17, memo as memo22, useCallback as useCallback12, useEffect as useEffect10, useImperativeHandle as useImperativeHandle3, useRef as useRef6, useState as useState10 } from "react";
|
|
7049
7067
|
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7050
7068
|
var animationDurationClose = 0.15;
|
|
7051
7069
|
var animationDurationOpen = animationDurationClose * 2;
|
|
7052
|
-
var FoldableComponent =
|
|
7070
|
+
var FoldableComponent = forwardRef17(function Foldable({
|
|
7053
7071
|
isOpen: controlledIsOpen,
|
|
7054
7072
|
defaultOpen = false,
|
|
7055
7073
|
title,
|
|
@@ -7143,7 +7161,7 @@ var FoldableComponent = forwardRef13(function Foldable({
|
|
|
7143
7161
|
)
|
|
7144
7162
|
] });
|
|
7145
7163
|
});
|
|
7146
|
-
FoldableComponent.box =
|
|
7164
|
+
FoldableComponent.box = forwardRef17(function Box3({ ...props }, ref) {
|
|
7147
7165
|
const theme2 = useTheme();
|
|
7148
7166
|
return /* @__PURE__ */ jsx22(
|
|
7149
7167
|
FoldableComponent,
|