@asdp/ferryui 0.1.22-dev.9209 → 0.1.22-dev.9214
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -810,6 +810,7 @@ interface InputDynamicProps<T extends FieldValues = FieldValues> {
|
|
|
810
810
|
rows?: number;
|
|
811
811
|
min?: number | string;
|
|
812
812
|
max?: number | string;
|
|
813
|
+
onlyCountries?: string[];
|
|
813
814
|
step?: number | string;
|
|
814
815
|
isMultiSelect?: boolean;
|
|
815
816
|
selectScrollbarColor?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -810,6 +810,7 @@ interface InputDynamicProps<T extends FieldValues = FieldValues> {
|
|
|
810
810
|
rows?: number;
|
|
811
811
|
min?: number | string;
|
|
812
812
|
max?: number | string;
|
|
813
|
+
onlyCountries?: string[];
|
|
813
814
|
step?: number | string;
|
|
814
815
|
isMultiSelect?: boolean;
|
|
815
816
|
selectScrollbarColor?: string;
|
package/dist/index.js
CHANGED
|
@@ -3133,6 +3133,7 @@ var InputDynamic = ({
|
|
|
3133
3133
|
hasError = false,
|
|
3134
3134
|
autoComplete,
|
|
3135
3135
|
onInput,
|
|
3136
|
+
onlyCountries,
|
|
3136
3137
|
contentAfter,
|
|
3137
3138
|
onChange,
|
|
3138
3139
|
language = "id",
|
|
@@ -3710,6 +3711,10 @@ var InputDynamic = ({
|
|
|
3710
3711
|
return stringVal;
|
|
3711
3712
|
};
|
|
3712
3713
|
const cleanedFieldValue = cleanPhoneValue(field.value || "");
|
|
3714
|
+
const phoneInputProps = {};
|
|
3715
|
+
if (onlyCountries) {
|
|
3716
|
+
phoneInputProps.onlyCountries = onlyCountries;
|
|
3717
|
+
}
|
|
3713
3718
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3714
3719
|
"div",
|
|
3715
3720
|
{
|
|
@@ -3717,17 +3722,19 @@ var InputDynamic = ({
|
|
|
3717
3722
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3718
3723
|
PhoneInput,
|
|
3719
3724
|
{
|
|
3725
|
+
...phoneInputProps,
|
|
3726
|
+
onlyCountries,
|
|
3720
3727
|
country: defaultCountry.toLowerCase(),
|
|
3721
|
-
|
|
3728
|
+
disabled,
|
|
3729
|
+
disableSearchIcon: true,
|
|
3730
|
+
enableSearch: true,
|
|
3731
|
+
inputStyle: phoneInputSizeStyle,
|
|
3722
3732
|
onChange: (value, data) => {
|
|
3723
3733
|
const cleanedValue = cleanPhoneValue(value || "");
|
|
3724
3734
|
field.onChange(cleanedValue);
|
|
3725
3735
|
},
|
|
3726
3736
|
placeholder: placeholder || mergedLabels.phoneDefaultPlaceholder,
|
|
3727
|
-
|
|
3728
|
-
enableSearch: true,
|
|
3729
|
-
disableSearchIcon: true,
|
|
3730
|
-
inputStyle: phoneInputSizeStyle
|
|
3737
|
+
value: cleanedFieldValue
|
|
3731
3738
|
}
|
|
3732
3739
|
)
|
|
3733
3740
|
}
|