react-better-html 1.1.204 → 1.1.206
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 +18 -8
- package/dist/index.d.ts +18 -8
- package/dist/index.js +212 -149
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +211 -149
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -73,6 +73,7 @@ __export(index_exports, {
|
|
|
73
73
|
generateRandomString: () => generateRandomString,
|
|
74
74
|
getBrowser: () => getBrowser,
|
|
75
75
|
getFormErrorObject: () => getFormErrorObject,
|
|
76
|
+
getPluralWord: () => getPluralWord,
|
|
76
77
|
isMobileDevice: () => isMobileDevice,
|
|
77
78
|
lightenColor: () => lightenColor,
|
|
78
79
|
loaderControls: () => loaderControls,
|
|
@@ -1914,6 +1915,7 @@ Image.profileImage = (0, import_react5.forwardRef)(function ProfileImage({ size
|
|
|
1914
1915
|
width: size,
|
|
1915
1916
|
height: size,
|
|
1916
1917
|
backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
|
|
1918
|
+
border: `solid 1px ${theme2.colors.border}`,
|
|
1917
1919
|
borderRadius: 999,
|
|
1918
1920
|
alignItems: "center",
|
|
1919
1921
|
justifyContent: "center",
|
|
@@ -5752,6 +5754,12 @@ var decryptString = (text) => {
|
|
|
5752
5754
|
});
|
|
5753
5755
|
return decrypted.toString(import_crypto_js.default.enc.Utf8);
|
|
5754
5756
|
};
|
|
5757
|
+
var getPluralWord = (word, count) => {
|
|
5758
|
+
if (count === 1) return word;
|
|
5759
|
+
const needChangeY = word.slice(-1) === "y" && !["a", "e", "o", "u", "i"].includes(word.slice(-2, -1));
|
|
5760
|
+
const pluralWord = needChangeY ? word.slice(0, -1) + "ies" : word.slice(-1) === "s" ? word + "es" : word + "s";
|
|
5761
|
+
return pluralWord;
|
|
5762
|
+
};
|
|
5755
5763
|
|
|
5756
5764
|
// src/components/Label.tsx
|
|
5757
5765
|
var import_react17 = require("react");
|
|
@@ -5808,6 +5816,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
5808
5816
|
onChangeSearch,
|
|
5809
5817
|
renderOption,
|
|
5810
5818
|
renderOptionDivider,
|
|
5819
|
+
withMultiselect,
|
|
5811
5820
|
id,
|
|
5812
5821
|
...props
|
|
5813
5822
|
}, ref) {
|
|
@@ -5842,8 +5851,10 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
5842
5851
|
if (isOpen && filteredOptions.length > 0 && focusedOptionIndex !== void 0) {
|
|
5843
5852
|
const option = filteredOptions[focusedOptionIndex];
|
|
5844
5853
|
if (!option.disabled) {
|
|
5845
|
-
|
|
5846
|
-
|
|
5854
|
+
const clickedValue = option.value;
|
|
5855
|
+
const newValue = withMultiselect ? Array.isArray(internalValue) ? internalValue?.includes(clickedValue) ? internalValue.filter((value2) => value2 !== clickedValue) : [...internalValue, clickedValue] : [clickedValue] : clickedValue;
|
|
5856
|
+
if (controlledValue === void 0) setInternalValue(newValue);
|
|
5857
|
+
onChange?.(newValue);
|
|
5847
5858
|
setIsOpen.setFalse();
|
|
5848
5859
|
inputRef.current?.blur();
|
|
5849
5860
|
setSearchQuery("");
|
|
@@ -5872,20 +5883,32 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
5872
5883
|
}
|
|
5873
5884
|
}
|
|
5874
5885
|
},
|
|
5875
|
-
[
|
|
5886
|
+
[
|
|
5887
|
+
disabled,
|
|
5888
|
+
withSearch,
|
|
5889
|
+
isOpen,
|
|
5890
|
+
filteredOptions,
|
|
5891
|
+
focusedOptionIndex,
|
|
5892
|
+
internalValue,
|
|
5893
|
+
controlledValue,
|
|
5894
|
+
onChange,
|
|
5895
|
+
withMultiselect
|
|
5896
|
+
]
|
|
5876
5897
|
);
|
|
5877
5898
|
const onClickOption = (0, import_react18.useCallback)(
|
|
5878
5899
|
(option) => {
|
|
5879
5900
|
if (!option.disabled) {
|
|
5880
|
-
|
|
5881
|
-
|
|
5901
|
+
const clickedValue = option.value;
|
|
5902
|
+
const newValue = withMultiselect ? Array.isArray(internalValue) ? internalValue?.includes(clickedValue) ? internalValue.filter((value2) => value2 !== clickedValue) : [...internalValue, clickedValue] : [clickedValue] : clickedValue;
|
|
5903
|
+
if (controlledValue === void 0) setInternalValue(newValue);
|
|
5904
|
+
onChange?.(newValue);
|
|
5882
5905
|
setIsOpen.setFalse();
|
|
5883
5906
|
inputRef.current?.blur();
|
|
5884
5907
|
setSearchQuery("");
|
|
5885
5908
|
setFocusedOptionIndex(void 0);
|
|
5886
5909
|
}
|
|
5887
5910
|
},
|
|
5888
|
-
[onChange, controlledValue]
|
|
5911
|
+
[onChange, internalValue, controlledValue, withMultiselect]
|
|
5889
5912
|
);
|
|
5890
5913
|
const onClickClearButton = (0, import_react18.useCallback)(
|
|
5891
5914
|
(event) => {
|
|
@@ -5907,12 +5930,15 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
5907
5930
|
},
|
|
5908
5931
|
[withDebounce, onChangeSearch]
|
|
5909
5932
|
);
|
|
5910
|
-
const selectedOption = (0, import_react18.useMemo)(
|
|
5933
|
+
const selectedOption = (0, import_react18.useMemo)(
|
|
5934
|
+
() => withMultiselect ? options.filter((option) => Array.isArray(value) ? value.includes(option.value) : false) : options.find((option) => option.value === value),
|
|
5935
|
+
[options, value]
|
|
5936
|
+
);
|
|
5911
5937
|
const renderedOptions = (0, import_react18.useMemo)(
|
|
5912
5938
|
() => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
5913
5939
|
renderOptionDivider ? renderOptionDivider(void 0, filteredOptions[0], -1, 0) : void 0,
|
|
5914
5940
|
filteredOptions.map((option, index) => {
|
|
5915
|
-
const isSelected = option.value === value;
|
|
5941
|
+
const isSelected = withMultiselect ? Array.isArray(value) ? value.includes(option.value) : false : option.value === value;
|
|
5916
5942
|
const isDisabled = option.disabled;
|
|
5917
5943
|
const isFocused2 = index === focusedOptionIndex;
|
|
5918
5944
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react18.Fragment, { children: [
|
|
@@ -5943,7 +5969,16 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
5943
5969
|
] }, JSON.stringify(option));
|
|
5944
5970
|
})
|
|
5945
5971
|
] }),
|
|
5946
|
-
[
|
|
5972
|
+
[
|
|
5973
|
+
withMultiselect,
|
|
5974
|
+
filteredOptions,
|
|
5975
|
+
value,
|
|
5976
|
+
focusedOptionIndex,
|
|
5977
|
+
theme2.colors,
|
|
5978
|
+
onClickOption,
|
|
5979
|
+
renderOption,
|
|
5980
|
+
renderOptionDivider
|
|
5981
|
+
]
|
|
5947
5982
|
);
|
|
5948
5983
|
(0, import_react18.useEffect)(() => {
|
|
5949
5984
|
setInternalValue(controlledValue);
|
|
@@ -5981,34 +6016,50 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
5981
6016
|
if (!withDebounce) return;
|
|
5982
6017
|
onChangeSearch?.(debouncedSearchQuery);
|
|
5983
6018
|
}, [withDebounce, onChangeSearch, debouncedSearchQuery]);
|
|
5984
|
-
const displayValue = withSearch && isFocused ? searchQuery : selectedOption?.label ?? "";
|
|
5985
|
-
const withClearButton = isOpen && selectedOption;
|
|
5986
|
-
const readyPlaceholder = placeholder ?? `Select an ${label?.toLowerCase() ?? "option"}`;
|
|
5987
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Div_default.column, { width: "100%", position: "relative", userSelect: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6019
|
+
const displayValue = (withSearch && isFocused && searchQuery.length > 0 ? searchQuery : !Array.isArray(selectedOption) ? selectedOption?.label : void 0) ?? "";
|
|
6020
|
+
const withClearButton = isOpen && (Array.isArray(selectedOption) ? selectedOption.length > 0 : selectedOption);
|
|
6021
|
+
const readyPlaceholder = placeholder ?? `Select ${!withMultiselect ? "an " : ""}${label?.toLowerCase() ?? getPluralWord("option", withMultiselect ? 2 : 1)}`;
|
|
6022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Div_default.column, { width: "100%", position: "relative", userSelect: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6023
|
+
InputField_default,
|
|
6024
|
+
{
|
|
6025
|
+
label,
|
|
6026
|
+
labelColor,
|
|
6027
|
+
errorText,
|
|
6028
|
+
infoText,
|
|
6029
|
+
required: withMultiselect ? (Array.isArray(value) ? value.length > 0 : value !== void 0) ? false : required : required,
|
|
6030
|
+
name,
|
|
6031
|
+
disabled,
|
|
6032
|
+
readOnly: !withSearch,
|
|
6033
|
+
value: displayValue,
|
|
6034
|
+
id,
|
|
6035
|
+
cursor: !withSearch ? "pointer" : void 0,
|
|
6036
|
+
placeholder: withSearch ? selectedOption && !Array.isArray(selectedOption) ? selectedOption.label : readyPlaceholder : readyPlaceholder,
|
|
6037
|
+
leftIcon,
|
|
6038
|
+
autoComplete: "off",
|
|
6039
|
+
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}` : ""}`,
|
|
6040
|
+
onClick: !disabled ? setIsOpen.toggle : void 0,
|
|
6041
|
+
onFocus: setIsFocused.setTrue,
|
|
6042
|
+
onBlur: setIsFocused.setFalse,
|
|
6043
|
+
onKeyDown: onKeyDownInputField,
|
|
6044
|
+
onChangeValue: withSearch ? onChangeValue : void 0,
|
|
6045
|
+
insideInputFieldBeforeComponent: Array.isArray(selectedOption) && selectedOption.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6046
|
+
Div_default,
|
|
6047
|
+
{
|
|
6048
|
+
width: "100%",
|
|
6049
|
+
backgroundColor: theme2.colors.backgroundContent,
|
|
6050
|
+
border: `solid 1px ${theme2.colors.border}`,
|
|
6051
|
+
borderColor: isFocused ? theme2.colors.primary : void 0,
|
|
6052
|
+
borderBottom: "none",
|
|
6053
|
+
borderTopLeftRadius: theme2.styles.borderRadius,
|
|
6054
|
+
borderTopRightRadius: theme2.styles.borderRadius,
|
|
6055
|
+
paddingBlock: theme2.styles.gap,
|
|
6056
|
+
paddingInline: (theme2.styles.space + theme2.styles.gap) / 2,
|
|
6057
|
+
transition: theme2.styles.transition,
|
|
6058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Div_default.row, { width: "100%", flexWrap: "wrap", gap: theme2.styles.gap, children: selectedOption.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Chip_default, { text: option.label }, JSON.stringify(option))) })
|
|
6059
|
+
}
|
|
6060
|
+
) : void 0,
|
|
6061
|
+
insideInputFieldAfterComponent: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
6062
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6012
6063
|
Div_default,
|
|
6013
6064
|
{
|
|
6014
6065
|
position: "absolute",
|
|
@@ -6033,60 +6084,61 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
6033
6084
|
children: isLoadingDebouncedSearchQuery || debounceIsLoading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Loader_default.text, {}) }) : filteredOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: (withoutRenderingOptionsWhenClosed ? isOpen || isOpenLate : true) ? renderedOptions : void 0 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default.unknown, { textAlign: "left", children: debounceMinimumSymbolsRequired !== void 0 && searchQuery.length < debounceMinimumSymbolsRequired ? `Enter at least ${debounceMinimumSymbolsRequired} characters` : "No options" }) })
|
|
6034
6085
|
}
|
|
6035
6086
|
),
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6087
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
6088
|
+
Div_default.row,
|
|
6089
|
+
{
|
|
6090
|
+
position: "absolute",
|
|
6091
|
+
top: 46 / 2,
|
|
6092
|
+
right: theme2.styles.space + 1,
|
|
6093
|
+
alignItems: "center",
|
|
6094
|
+
gap: theme2.styles.gap,
|
|
6095
|
+
transform: "translateY(-50%)",
|
|
6096
|
+
pointerEvents: "none",
|
|
6097
|
+
filter: disabled ? "brightness(0.9)" : void 0,
|
|
6098
|
+
opacity: disabled ? 0.6 : void 0,
|
|
6099
|
+
zIndex: isOpen || isOpenLate ? 1001 : void 0,
|
|
6100
|
+
ref: buttonsRef,
|
|
6101
|
+
children: [
|
|
6102
|
+
!withoutClearButton && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6103
|
+
Button_default.icon,
|
|
6104
|
+
{
|
|
6105
|
+
icon: "XMark",
|
|
6106
|
+
position: "relative",
|
|
6107
|
+
size: 10,
|
|
6108
|
+
iconSize: 14,
|
|
6109
|
+
opacity: !withClearButton ? 0 : void 0,
|
|
6110
|
+
pointerEvents: withClearButton ? "all" : void 0,
|
|
6111
|
+
onClick: onClickClearButton,
|
|
6112
|
+
disabled: !withClearButton
|
|
6113
|
+
}
|
|
6114
|
+
),
|
|
6115
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6116
|
+
Icon_default,
|
|
6117
|
+
{
|
|
6118
|
+
name: "chevronDown",
|
|
6119
|
+
position: "relative",
|
|
6120
|
+
size: 16,
|
|
6121
|
+
color: theme2.colors.textSecondary,
|
|
6122
|
+
transform: `rotate(${isOpen ? 180 : 0}deg)`,
|
|
6123
|
+
transition: theme2.styles.transition,
|
|
6124
|
+
pointerEvents: "none",
|
|
6125
|
+
"aria-hidden": true
|
|
6126
|
+
}
|
|
6127
|
+
)
|
|
6128
|
+
]
|
|
6129
|
+
}
|
|
6130
|
+
)
|
|
6131
|
+
] }),
|
|
6132
|
+
role: "combobox",
|
|
6133
|
+
"aria-expanded": isOpen,
|
|
6134
|
+
"aria-controls": "dropdown-list",
|
|
6135
|
+
"aria-multiselectable": withMultiselect ? "true" : "false",
|
|
6136
|
+
"aria-haspopup": "listbox",
|
|
6137
|
+
"aria-label": label,
|
|
6138
|
+
holderRef: inputFieldHolderRef,
|
|
6139
|
+
ref: inputRef
|
|
6140
|
+
}
|
|
6141
|
+
) });
|
|
6090
6142
|
});
|
|
6091
6143
|
DropdownComponent.countries = (0, import_react18.forwardRef)(function Countries({ ...props }, ref) {
|
|
6092
6144
|
const theme2 = useTheme();
|
|
@@ -6441,6 +6493,12 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
6441
6493
|
&.react-better-html-dropdown {
|
|
6442
6494
|
padding-right: ${(props) => props.theme.styles.space + 16 + props.theme.styles.space - 1}px;
|
|
6443
6495
|
|
|
6496
|
+
&.react-better-html-dropdown-multiselect {
|
|
6497
|
+
border-top: none;
|
|
6498
|
+
border-top-left-radius: 0px;
|
|
6499
|
+
border-top-right-radius: 0px;
|
|
6500
|
+
}
|
|
6501
|
+
|
|
6444
6502
|
&.react-better-html-dropdown-open {
|
|
6445
6503
|
border-bottom-left-radius: 0px;
|
|
6446
6504
|
border-bottom-right-radius: 0px;
|
|
@@ -6513,7 +6571,8 @@ var InputFieldComponent = (0, import_react20.forwardRef)(function InputField({
|
|
|
6513
6571
|
prefixBackgroundColor,
|
|
6514
6572
|
suffix,
|
|
6515
6573
|
suffixBackgroundColor,
|
|
6516
|
-
|
|
6574
|
+
insideInputFieldBeforeComponent,
|
|
6575
|
+
insideInputFieldAfterComponent,
|
|
6517
6576
|
withDebounce,
|
|
6518
6577
|
debounceDelay = 0.5,
|
|
6519
6578
|
onChange,
|
|
@@ -6579,59 +6638,62 @@ var InputFieldComponent = (0, import_react20.forwardRef)(function InputField({
|
|
|
6579
6638
|
}
|
|
6580
6639
|
),
|
|
6581
6640
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Div_default, { position: "relative", width: "100%", height: "fit-content", ref: holderRef, children: [
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
icon
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6641
|
+
insideInputFieldBeforeComponent,
|
|
6642
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Div_default, { position: "relative", width: "100%", height: "fit-content", children: [
|
|
6643
|
+
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6644
|
+
Icon_default,
|
|
6645
|
+
{
|
|
6646
|
+
name: leftIcon,
|
|
6647
|
+
position: "absolute",
|
|
6648
|
+
top: (props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 46) / 2,
|
|
6649
|
+
left: theme2.styles.space + 1,
|
|
6650
|
+
transform: "translateY(-50%)",
|
|
6651
|
+
pointerEvents: "none",
|
|
6652
|
+
zIndex: leftIconZIndex
|
|
6653
|
+
}
|
|
6654
|
+
),
|
|
6655
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6656
|
+
InputElement,
|
|
6657
|
+
{
|
|
6658
|
+
theme: theme2,
|
|
6659
|
+
withLeftIcon: leftIcon !== void 0,
|
|
6660
|
+
withRightIcon: rightIcon !== void 0,
|
|
6661
|
+
withPrefix: prefix !== void 0,
|
|
6662
|
+
withSuffix: suffix !== void 0,
|
|
6663
|
+
required,
|
|
6664
|
+
placeholder: placeholder ?? label,
|
|
6665
|
+
id: readyId,
|
|
6666
|
+
onChange: onChangeElement,
|
|
6667
|
+
...styledComponentStylesWithoutExcluded,
|
|
6668
|
+
...dataProps,
|
|
6669
|
+
...ariaProps,
|
|
6670
|
+
...restProps,
|
|
6671
|
+
ref
|
|
6672
|
+
}
|
|
6673
|
+
),
|
|
6674
|
+
rightIcon ? onClickRightIcon ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6675
|
+
Button_default.icon,
|
|
6676
|
+
{
|
|
6677
|
+
icon: rightIcon,
|
|
6678
|
+
position: "absolute",
|
|
6679
|
+
top: 46 / 2,
|
|
6680
|
+
right: theme2.styles.space + 1 - theme2.styles.space / 2,
|
|
6681
|
+
transform: "translateY(-50%)",
|
|
6682
|
+
onClick: onClickRightIcon
|
|
6683
|
+
}
|
|
6684
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6685
|
+
Icon_default,
|
|
6686
|
+
{
|
|
6687
|
+
name: rightIcon,
|
|
6688
|
+
position: "absolute",
|
|
6689
|
+
top: 46 / 2,
|
|
6690
|
+
right: theme2.styles.space + 1,
|
|
6691
|
+
transform: "translateY(-50%)",
|
|
6692
|
+
pointerEvents: "none"
|
|
6693
|
+
}
|
|
6694
|
+
) : void 0,
|
|
6695
|
+
insideInputFieldAfterComponent
|
|
6696
|
+
] })
|
|
6635
6697
|
] }),
|
|
6636
6698
|
suffix && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6637
6699
|
Div_default.row,
|
|
@@ -6947,7 +7009,7 @@ InputFieldComponent.date = (0, import_react20.forwardRef)(function Date2({ minDa
|
|
|
6947
7009
|
InputFieldComponent,
|
|
6948
7010
|
{
|
|
6949
7011
|
type: "date",
|
|
6950
|
-
|
|
7012
|
+
insideInputFieldAfterComponent: !isMobileIOS ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6951
7013
|
Div_default,
|
|
6952
7014
|
{
|
|
6953
7015
|
position: "absolute",
|
|
@@ -7018,7 +7080,7 @@ InputFieldComponent.dateTime = (0, import_react20.forwardRef)(function DateTime(
|
|
|
7018
7080
|
InputFieldComponent,
|
|
7019
7081
|
{
|
|
7020
7082
|
type: "datetime-local",
|
|
7021
|
-
|
|
7083
|
+
insideInputFieldAfterComponent: !isMobileIOS ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7022
7084
|
Div_default,
|
|
7023
7085
|
{
|
|
7024
7086
|
position: "absolute",
|
|
@@ -7159,7 +7221,7 @@ InputFieldComponent.time = (0, import_react20.forwardRef)(function Time({ ...pro
|
|
|
7159
7221
|
InputFieldComponent,
|
|
7160
7222
|
{
|
|
7161
7223
|
type: "time",
|
|
7162
|
-
|
|
7224
|
+
insideInputFieldAfterComponent: !isMobileIOS ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7163
7225
|
Div_default,
|
|
7164
7226
|
{
|
|
7165
7227
|
position: "absolute",
|
|
@@ -7262,7 +7324,7 @@ InputFieldComponent.color = (0, import_react20.forwardRef)(function Color2({ val
|
|
|
7262
7324
|
InputFieldComponent,
|
|
7263
7325
|
{
|
|
7264
7326
|
type: "color",
|
|
7265
|
-
|
|
7327
|
+
insideInputFieldAfterComponent: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7266
7328
|
Div_default.row,
|
|
7267
7329
|
{
|
|
7268
7330
|
position: "absolute",
|
|
@@ -10052,6 +10114,7 @@ function generateLocalStorage() {
|
|
|
10052
10114
|
generateRandomString,
|
|
10053
10115
|
getBrowser,
|
|
10054
10116
|
getFormErrorObject,
|
|
10117
|
+
getPluralWord,
|
|
10055
10118
|
isMobileDevice,
|
|
10056
10119
|
lightenColor,
|
|
10057
10120
|
loaderControls,
|