easy-email-extensions 4.3.1 → 4.3.2
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/lib/index2.js +0 -42
- package/lib/index2.js.map +1 -1
- package/package.json +2 -2
package/lib/index2.js
CHANGED
@@ -36140,22 +36140,6 @@ function Input(props) {
|
|
36140
36140
|
onKeyDown
|
36141
36141
|
}));
|
36142
36142
|
}
|
36143
|
-
const defaultUnitOptions = [
|
36144
|
-
{
|
36145
|
-
value: "px",
|
36146
|
-
label: "px"
|
36147
|
-
}
|
36148
|
-
];
|
36149
|
-
const percentUnitOptions = [
|
36150
|
-
{
|
36151
|
-
value: "px",
|
36152
|
-
label: "px"
|
36153
|
-
},
|
36154
|
-
{
|
36155
|
-
value: "%",
|
36156
|
-
label: "%"
|
36157
|
-
}
|
36158
|
-
];
|
36159
36143
|
function InputWithUnit(props) {
|
36160
36144
|
const _a = props, {
|
36161
36145
|
value = "",
|
@@ -36166,32 +36150,6 @@ function InputWithUnit(props) {
|
|
36166
36150
|
"onKeyDown",
|
36167
36151
|
"unitOptions"
|
36168
36152
|
]);
|
36169
|
-
const unitOptions = useMemo(() => {
|
36170
|
-
if (propsUnitOptions === "percent")
|
36171
|
-
return percentUnitOptions;
|
36172
|
-
if (Array.isArray(propsUnitOptions))
|
36173
|
-
return propsUnitOptions;
|
36174
|
-
return defaultUnitOptions;
|
36175
|
-
}, [propsUnitOptions]);
|
36176
|
-
useMemo(() => {
|
36177
|
-
if (Number(value) === parseFloat(value)) {
|
36178
|
-
return {
|
36179
|
-
text: value,
|
36180
|
-
unit: ""
|
36181
|
-
};
|
36182
|
-
}
|
36183
|
-
if (isNaN(Number(value)) && isNaN(parseFloat(value)) && unitOptions.some((u) => u.value === value)) {
|
36184
|
-
return {
|
36185
|
-
text: "",
|
36186
|
-
unit: value
|
36187
|
-
};
|
36188
|
-
}
|
36189
|
-
const arr = value.split(/(\d+(\.\d+)?)(\D+)$/);
|
36190
|
-
return {
|
36191
|
-
text: arr[1] || "",
|
36192
|
-
unit: arr[3] || unitOptions[0].value
|
36193
|
-
};
|
36194
|
-
}, [value, unitOptions]);
|
36195
36153
|
return /* @__PURE__ */ React__default.createElement(Input, __spreadProps(__spreadValues({
|
36196
36154
|
value
|
36197
36155
|
}, restProps), {
|