@arkyn/components 3.0.1-beta.144 → 3.0.1-beta.145
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/bundle.js
CHANGED
|
@@ -2564,7 +2564,7 @@ var Pn = An(jn.NINE).length, Fn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
2564
2564
|
//#endregion
|
|
2565
2565
|
//#region src/components/phoneInput/index.tsx
|
|
2566
2566
|
function Ln(e) {
|
|
2567
|
-
let { defaultCountryIso: t, value: n, label: r, className: i = "", disabled: a = !1, errorMessage: o, isLoading: c = !1, readOnly: d = !1, size: f = "md", defaultValue: h = "", variant: g = "solid", showAsterisk: _, name: v, onChange: y, searchCountryPlaceholder: b = "Pesquisar país", notFoundCountryText: x = "Nenhum país encontrado", id: S, unShowFieldTemplate: C = !1, orientation: w = "
|
|
2567
|
+
let { defaultCountryIso: t, value: n, label: r, className: i = "", disabled: a = !1, errorMessage: o, isLoading: c = !1, readOnly: d = !1, size: f = "md", defaultValue: h = "", variant: g = "solid", showAsterisk: _, name: v, onChange: y, searchCountryPlaceholder: b = "Pesquisar país", notFoundCountryText: x = "Nenhum país encontrado", id: S, unShowFieldTemplate: C = !1, orientation: w = "vertical" } = e, T = ce.find((e) => e.iso === "BR"), E = h ? ne(h) : "", D = h ? ee(h)[1] : T, [O, k] = u(!1), [A, j] = u(""), [M, N] = u(!1), [P, F] = u(E), I = n === void 0 ? P : n, [L, R] = u(D), { fieldErrors: z } = X(), B = l(null), V = S || s(), H = o || z?.[v], U = !!H, W = a || c, G = l(null);
|
|
2568
2568
|
function K() {
|
|
2569
2569
|
W || O || M || (k(!0), G.current && G.current.focus());
|
|
2570
2570
|
}
|
|
@@ -46,7 +46,7 @@ type PhoneInputProps = {
|
|
|
46
46
|
unShowFieldTemplate?: boolean;
|
|
47
47
|
/**
|
|
48
48
|
* Layout direction forwarded to `FieldTemplate`.
|
|
49
|
-
* @default "
|
|
49
|
+
* @default "vertical"
|
|
50
50
|
*/
|
|
51
51
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
52
52
|
};
|
|
@@ -72,7 +72,7 @@ type PhoneInputProps = {
|
|
|
72
72
|
* @param props.defaultCountryIso - ISO code of the initially selected country. Default: "BR"
|
|
73
73
|
* @param props.searchCountryPlaceholder - Placeholder for country search. Default: "Pesquisar país"
|
|
74
74
|
* @param props.notFoundCountryText - Text shown when no country matches. Default: "Nenhum país encontrado"
|
|
75
|
-
* @param props.orientation - Layout direction. Default: "
|
|
75
|
+
* @param props.orientation - Layout direction. Default: "vertical"
|
|
76
76
|
* @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false
|
|
77
77
|
*
|
|
78
78
|
* @returns PhoneInput JSX element wrapped in `FieldTemplate`.
|
|
@@ -32,7 +32,7 @@ import { PhoneInputMask } from "./phoneInputMask";
|
|
|
32
32
|
* @param props.defaultCountryIso - ISO code of the initially selected country. Default: "BR"
|
|
33
33
|
* @param props.searchCountryPlaceholder - Placeholder for country search. Default: "Pesquisar país"
|
|
34
34
|
* @param props.notFoundCountryText - Text shown when no country matches. Default: "Nenhum país encontrado"
|
|
35
|
-
* @param props.orientation - Layout direction. Default: "
|
|
35
|
+
* @param props.orientation - Layout direction. Default: "vertical"
|
|
36
36
|
* @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false
|
|
37
37
|
*
|
|
38
38
|
* @returns PhoneInput JSX element wrapped in `FieldTemplate`.
|
|
@@ -62,7 +62,7 @@ import { PhoneInputMask } from "./phoneInputMask";
|
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
64
|
function PhoneInput(props) {
|
|
65
|
-
const { defaultCountryIso, value: rawValue, label, className: wrapperClassName = "", disabled = false, errorMessage: baseErrorMessage, isLoading = false, readOnly = false, size = "md", defaultValue = "", variant = "solid", showAsterisk, name, onChange, searchCountryPlaceholder = "Pesquisar país", notFoundCountryText = "Nenhum país encontrado", id, unShowFieldTemplate = false, orientation = "
|
|
65
|
+
const { defaultCountryIso, value: rawValue, label, className: wrapperClassName = "", disabled = false, errorMessage: baseErrorMessage, isLoading = false, readOnly = false, size = "md", defaultValue = "", variant = "solid", showAsterisk, name, onChange, searchCountryPlaceholder = "Pesquisar país", notFoundCountryText = "Nenhum país encontrado", id, unShowFieldTemplate = false, orientation = "vertical", } = props;
|
|
66
66
|
const brasilCountry = countries.find((country) => country.iso === "BR");
|
|
67
67
|
const defaultData = defaultValue ? formatToPhone(defaultValue) : "";
|
|
68
68
|
const defaultCountry = defaultValue
|