@arkyn/components 3.0.2 → 3.0.3

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.
Files changed (54) hide show
  1. package/dist/components/datePicker/datePickerCalendarContainer/index.d.ts +9 -0
  2. package/dist/components/datePicker/datePickerCalendarContainer/index.d.ts.map +1 -0
  3. package/dist/components/datePicker/datePickerChevron/index.d.ts +11 -0
  4. package/dist/components/datePicker/datePickerChevron/index.d.ts.map +1 -0
  5. package/dist/components/datePicker/datePickerContainer/index.d.ts +19 -0
  6. package/dist/components/datePicker/datePickerContainer/index.d.ts.map +1 -0
  7. package/dist/components/datePicker/datePickerContent/index.d.ts +9 -0
  8. package/dist/components/datePicker/datePickerContent/index.d.ts.map +1 -0
  9. package/dist/components/datePicker/datePickerOverlay/index.d.ts +8 -0
  10. package/dist/components/datePicker/datePickerOverlay/index.d.ts.map +1 -0
  11. package/dist/components/datePicker/datePickerSpinner/index.d.ts +8 -0
  12. package/dist/components/datePicker/datePickerSpinner/index.d.ts.map +1 -0
  13. package/dist/components/datePicker/index.d.ts +155 -0
  14. package/dist/components/datePicker/index.d.ts.map +1 -0
  15. package/dist/components/phoneInput/index.d.ts.map +1 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +642 -389
  19. package/dist/index.js.map +1 -1
  20. package/dist/modules/components/datePicker/datePickerCalendarContainer/index.js +25 -0
  21. package/dist/modules/components/datePicker/datePickerCalendarContainer/index.js.map +1 -0
  22. package/dist/modules/components/datePicker/datePickerCalendarContainer/styles.css +1 -0
  23. package/dist/modules/components/datePicker/datePickerChevron/index.js +21 -0
  24. package/dist/modules/components/datePicker/datePickerChevron/index.js.map +1 -0
  25. package/dist/modules/components/datePicker/datePickerChevron/styles.css +1 -0
  26. package/dist/modules/components/datePicker/datePickerContainer/index.js +16 -0
  27. package/dist/modules/components/datePicker/datePickerContainer/index.js.map +1 -0
  28. package/dist/modules/components/datePicker/datePickerContainer/styles.css +1 -0
  29. package/dist/modules/components/datePicker/datePickerContent/index.js +14 -0
  30. package/dist/modules/components/datePicker/datePickerContent/index.js.map +1 -0
  31. package/dist/modules/components/datePicker/datePickerContent/styles.css +1 -0
  32. package/dist/modules/components/datePicker/datePickerOverlay/index.js +14 -0
  33. package/dist/modules/components/datePicker/datePickerOverlay/index.js.map +1 -0
  34. package/dist/modules/components/datePicker/datePickerOverlay/styles.css +1 -0
  35. package/dist/modules/components/datePicker/datePickerSpinner/index.js +16 -0
  36. package/dist/modules/components/datePicker/datePickerSpinner/index.js.map +1 -0
  37. package/dist/modules/components/datePicker/datePickerSpinner/styles.css +1 -0
  38. package/dist/modules/components/datePicker/index.js +194 -0
  39. package/dist/modules/components/datePicker/index.js.map +1 -0
  40. package/dist/modules/components/datePicker/styles.css +79 -0
  41. package/dist/modules/components/phoneInput/index.js +75 -70
  42. package/dist/modules/components/phoneInput/index.js.map +1 -1
  43. package/dist/modules/providers/modalProvider.js +27 -33
  44. package/dist/modules/providers/modalProvider.js.map +1 -1
  45. package/dist/modules/services/fieldTemplate.js +1 -0
  46. package/dist/modules/services/fieldTemplate.js.map +1 -1
  47. package/dist/modules/utils/phoneInputUtilities.js +5 -5
  48. package/dist/modules/utils/phoneInputUtilities.js.map +1 -1
  49. package/dist/providers/modalProvider.d.ts.map +1 -1
  50. package/dist/services/fieldTemplate.d.ts.map +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/utils/phoneInputUtilities.d.ts +1 -1
  53. package/dist/utils/phoneInputUtilities.d.ts.map +1 -1
  54. package/package.json +17 -1
@@ -1,97 +1,102 @@
1
1
  import { useForm as e } from "../../hooks/useForm.js";
2
2
  import { FieldTemplate as t } from "../../services/fieldTemplate.js";
3
- import { PhoneInputContainer as n } from "./phoneInputContainer/index.js";
4
- import { PhoneInputCountriesOverlay as ee } from "./phoneInputCountriesOverlay/index.js";
5
- import { PhoneInputCountryOption as te } from "./phoneInputCountryOption/index.js";
6
- import { PhoneInputCountryOptionsContainer as ne } from "./phoneInputCountryOptionsContainer/index.js";
7
- import { PhoneInputCountrySelector as r } from "./phoneInputCountrySelector/index.js";
8
- import { PhoneInputMask as i } from "./phoneInputMask/index.js";
9
- import { useId as a, useRef as o, useState as s } from "react";
10
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
11
- import { findCountryMask as u, formatToPhone as d, removeNonNumeric as f } from "@arkyn/shared";
12
- import { countries as p } from "@arkyn/templates";
3
+ import { TYPES as n, applyMask as r, getMask as i } from "../../utils/phoneInputUtilities.js";
4
+ import { PhoneInputContainer as a } from "./phoneInputContainer/index.js";
5
+ import { PhoneInputCountriesOverlay as o } from "./phoneInputCountriesOverlay/index.js";
6
+ import { PhoneInputCountryOption as ee } from "./phoneInputCountryOption/index.js";
7
+ import { PhoneInputCountryOptionsContainer as s } from "./phoneInputCountryOptionsContainer/index.js";
8
+ import { PhoneInputCountrySelector as te } from "./phoneInputCountrySelector/index.js";
9
+ import { PhoneInputMask as c } from "./phoneInputMask/index.js";
10
+ import { useId as l, useRef as u, useState as d } from "react";
11
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
+ import { findCountryMask as ne, formatToPhone as re, removeNonNumeric as m } from "@arkyn/shared";
13
+ import { countries as h } from "@arkyn/templates";
13
14
  //#region src/components/phoneInput/index.tsx
14
- function m(m) {
15
- let { value: h, label: re, className: g = "", disabled: _ = !1, errorMessage: v, isLoading: y = !1, readOnly: b = !1, size: x = "md", defaultValue: S = "", variant: ie = "solid", showAsterisk: C, name: w, onChange: T, searchCountryPlaceholder: E = "Pesquisar país", notFoundCountryText: D = "Nenhum país encontrado", id: O, unShowFieldTemplate: k = !1, orientation: A = "vertical" } = m, j = p.find((e) => e.iso === "BR"), M = S ? d(S) : "", N = S ? u(S)[1] : j, [P, F] = s(!1), [I, L] = s(""), [R, z] = s(!1), [B, V] = s(M), H = h === void 0 ? B : h, [U, W] = s(N), { fieldErrors: G } = e(), K = o(null), q = a(), J = O || q, Y = v || G?.[w], ae = !!Y, X = _ || y, Z = o(null);
16
- function oe() {
17
- X || P || R || (F(!0), Z.current && Z.current.focus());
18
- }
19
- function se() {
20
- z(!0), F(!0);
21
- }
15
+ function g(e, t) {
16
+ let a = m(e);
17
+ return t.code === "+55" ? r(a, n[i(a)]) : r(a, typeof t.mask == "string" ? t.mask : t.mask[0], "_");
18
+ }
19
+ function _(n) {
20
+ let { value: r, label: i, className: _ = "", disabled: v = !1, errorMessage: y, isLoading: b = !1, readOnly: x = !1, size: S = "md", defaultValue: C = "", variant: ie = "solid", showAsterisk: ae, name: w, onChange: oe, searchCountryPlaceholder: T = "Pesquisar país", notFoundCountryText: E = "Nenhum país encontrado", id: D, unShowFieldTemplate: O = !1, orientation: k = "vertical" } = n, A = h.find((e) => e.iso === "BR"), j = C ? re(C) : "", M = C ? ne(C)[1] : A, [N, P] = d(!1), [F, I] = d(""), [L, R] = d(!1), [z, B] = d(j), [V, H] = d(M), U = r === void 0 ? z : g(r, V), { fieldErrors: W } = e(), G = u(null), K = l(), q = D || K, J = y || W?.[w], se = !!J, Y = v || b, X = u(null);
22
21
  function ce() {
23
- z(!1), F(!1);
22
+ Y || N || L || (P(!0), X.current && X.current.focus());
23
+ }
24
+ function Z() {
25
+ R(!0), P(!0);
24
26
  }
25
27
  function le() {
26
- F(!0);
28
+ R(!1), P(!1);
27
29
  }
28
30
  function ue() {
29
- F(!1);
31
+ P(!0);
32
+ }
33
+ function de() {
34
+ P(!1);
30
35
  }
31
36
  function Q(e) {
32
- return e.name.toLowerCase().includes(I.toLowerCase());
37
+ return e.name.toLowerCase().includes(F.toLowerCase());
33
38
  }
34
39
  function $(e) {
35
- let t = U.code;
36
- return t += f(e || H), t;
40
+ let t = V.code;
41
+ return t += m(e || U), t;
37
42
  }
38
- return /* @__PURE__ */ c(t, {
43
+ return /* @__PURE__ */ f(t, {
39
44
  name: w,
40
- label: re,
41
- showAsterisk: C,
42
- className: g,
43
- errorMessage: Y,
44
- unShowFieldTemplate: k,
45
- orientation: A,
46
- children: /* @__PURE__ */ l(n, {
47
- disabled: X,
48
- isError: ae,
49
- isLoading: y,
50
- isFocused: P,
51
- readOnly: b,
52
- size: x,
45
+ label: i,
46
+ showAsterisk: ae,
47
+ className: _,
48
+ errorMessage: J,
49
+ unShowFieldTemplate: O,
50
+ orientation: k,
51
+ children: /* @__PURE__ */ p(a, {
52
+ disabled: Y,
53
+ isError: se,
54
+ isLoading: b,
55
+ isFocused: N,
56
+ readOnly: x,
57
+ size: S,
53
58
  variant: ie,
54
- onFocus: oe,
59
+ onFocus: ce,
55
60
  children: [
56
- /* @__PURE__ */ c(r, {
57
- currentCountry: U,
58
- onClick: se,
59
- size: x
61
+ /* @__PURE__ */ f(te, {
62
+ currentCountry: V,
63
+ onClick: Z,
64
+ size: S
60
65
  }),
61
- /* @__PURE__ */ l(ne, {
62
- isOpen: X || b ? !1 : R,
63
- search: I,
64
- placeholder: E,
65
- onSearch: L,
66
- children: [p.filter((e) => Q(e)).map((e) => /* @__PURE__ */ c(te, {
66
+ /* @__PURE__ */ p(s, {
67
+ isOpen: Y || x ? !1 : L,
68
+ search: F,
69
+ placeholder: T,
70
+ onSearch: I,
71
+ children: [h.filter((e) => Q(e)).map((e) => /* @__PURE__ */ f(ee, {
67
72
  country: e,
68
73
  handleChangeValue: () => {
69
- W(e), z(!1), V("");
74
+ H(e), R(!1), B("");
70
75
  },
71
- isActive: e.iso === U.iso,
72
- size: x
73
- }, e.iso)), p.filter((e) => Q(e)).length === 0 && /* @__PURE__ */ c("p", { children: D })]
76
+ isActive: e.iso === V.iso,
77
+ size: S
78
+ }, e.iso)), h.filter((e) => Q(e)).length === 0 && /* @__PURE__ */ f("p", { children: E })]
74
79
  }),
75
- /* @__PURE__ */ c(ee, {
76
- isOpen: X || b ? !1 : R,
77
- onClick: ce
80
+ /* @__PURE__ */ f(o, {
81
+ isOpen: Y || x ? !1 : L,
82
+ onClick: le
78
83
  }),
79
- /* @__PURE__ */ c(i, {
80
- id: J,
81
- ref: Z,
82
- readonly: b,
83
- currentCountry: U,
84
- value: H,
85
- disabled: X,
86
- onBlur: ue,
87
- onFocus: le,
88
- size: x,
84
+ /* @__PURE__ */ f(c, {
85
+ id: q,
86
+ ref: X,
87
+ readonly: x,
88
+ currentCountry: V,
89
+ value: U,
90
+ disabled: Y,
91
+ onBlur: de,
92
+ onFocus: ue,
93
+ size: S,
89
94
  onChange: (e) => {
90
- V(e), T?.($(e));
95
+ B(e), oe?.($(e));
91
96
  }
92
97
  }),
93
- /* @__PURE__ */ c("input", {
94
- ref: K,
98
+ /* @__PURE__ */ f("input", {
99
+ ref: G,
95
100
  type: "hidden",
96
101
  name: w,
97
102
  value: $()
@@ -101,6 +106,6 @@ function m(m) {
101
106
  });
102
107
  }
103
108
  //#endregion
104
- export { m as PhoneInput };
109
+ export { _ as PhoneInput };
105
110
 
106
111
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/phoneInput/index.tsx"],"sourcesContent":["import {\n\tfindCountryMask,\n\tformatToPhone,\n\tremoveNonNumeric,\n} from \"@arkyn/shared\";\nimport { countries } from \"@arkyn/templates\";\nimport { useId, useRef, useState } from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\n\nimport { PhoneInputContainer } from \"./phoneInputContainer\";\nimport { PhoneInputCountriesOverlay } from \"./phoneInputCountriesOverlay\";\nimport { PhoneInputCountryOption } from \"./phoneInputCountryOption\";\nimport { PhoneInputCountryOptionsContainer } from \"./phoneInputCountryOptionsContainer\";\nimport { PhoneInputCountrySelector } from \"./phoneInputCountrySelector\";\nimport { PhoneInputMask } from \"./phoneInputMask\";\n\ntype CountryType = {\n\tname: string;\n\tcode: string;\n\tiso: string;\n\tflag: string;\n\tmask: string | string[];\n};\n\ntype PhoneInputProps = {\n\t/** Optional HTML id for the visible phone text input. */\n\tid?: string;\n\t/** Disables all interactions. @default false */\n\tdisabled?: boolean;\n\t/** Prevents value changes while keeping the current value visible. @default false */\n\treadOnly?: boolean;\n\t/** Validation error message (overrides the `useForm` context error for this field). */\n\terrorMessage?: string;\n\t/** Optional label text displayed above the input. */\n\tlabel?: string;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Shows a loading state and disables interactions. @default false */\n\tisLoading?: boolean;\n\t/**\n\t * Input size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\";\n\t/** Additional CSS class applied to the field wrapper. */\n\tclassName?: string;\n\t/** Uncontrolled default phone value (numeric string with or without country code). @default \"\" */\n\tdefaultValue?: string;\n\t/** Text displayed when no country matches the search query. @default \"Nenhum país encontrado\" */\n\tnotFoundCountryText?: string;\n\t/** Field name for form submission (stored as numeric string with country code). Required. */\n\tname: string;\n\t/** Placeholder for the country search input. @default \"Pesquisar país\" */\n\tsearchCountryPlaceholder?: string;\n\t/** ISO 3166-1 alpha-2 code of the initially selected country. @default \"BR\" */\n\tdefaultCountryIso?: (typeof countries)[number][\"iso\"];\n\t/** Callback fired on value change. Receives a numeric string prefixed with the country dial code. */\n\tonChange?: (e: string) => void;\n\t/** Controlled phone value (without country code). */\n\tvalue?: string;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"vertical\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n};\n\n/**\n * PhoneInput — phone number field with an integrated country selector and automatic mask formatting.\n *\n * The visible input is masked according to the selected country's phone format.\n * The hidden `<input>` stores a numeric string prefixed with the country dial code for form submission.\n * Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.label - Label text displayed above the input.\n * @param props.showAsterisk - Appends `*` to the label.\n * @param props.errorMessage - Validation error message.\n * @param props.size - Input size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.disabled - Disables all interactions. Default: false\n * @param props.readOnly - Prevents editing. Default: false\n * @param props.isLoading - Shows loading state and disables interactions. Default: false\n * @param props.defaultValue - Uncontrolled default phone value.\n * @param props.value - Controlled phone value (without country code).\n * @param props.onChange - Callback fired on change — receives numeric string with country code.\n * @param props.defaultCountryIso - ISO code of the initially selected country. Default: \"BR\"\n * @param props.searchCountryPlaceholder - Placeholder for country search. Default: \"Pesquisar país\"\n * @param props.notFoundCountryText - Text shown when no country matches. Default: \"Nenhum país encontrado\"\n * @param props.orientation - Layout direction. Default: \"vertical\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns PhoneInput JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <PhoneInput name=\"phone\" label=\"Phone\" />\n *\n * // Controlled with outline variant\n * <PhoneInput\n * name=\"contactPhone\"\n * label=\"Contact Phone\"\n * value={phone}\n * onChange={(v) => setPhone(v)}\n * variant=\"outline\"\n * size=\"lg\"\n * />\n *\n * // Pre-selected country (US)\n * <PhoneInput\n * name=\"phone\"\n * label=\"Phone\"\n * defaultCountryIso=\"US\"\n * showAsterisk\n * />\n * ```\n */\nfunction PhoneInput(props: PhoneInputProps) {\n\tconst {\n\t\tvalue: rawValue,\n\t\tlabel,\n\t\tclassName: wrapperClassName = \"\",\n\t\tdisabled = false,\n\t\terrorMessage: baseErrorMessage,\n\t\tisLoading = false,\n\t\treadOnly = false,\n\t\tsize = \"md\",\n\t\tdefaultValue = \"\",\n\t\tvariant = \"solid\",\n\t\tshowAsterisk,\n\t\tname,\n\t\tonChange,\n\t\tsearchCountryPlaceholder = \"Pesquisar país\",\n\t\tnotFoundCountryText = \"Nenhum país encontrado\",\n\t\tid,\n\t\tunShowFieldTemplate = false,\n\t\torientation = \"vertical\",\n\t} = props;\n\n\t// biome-ignore lint/style/noNonNullAssertion: \"BR\" is always present in the countries list\n\tconst brasilCountry = countries.find((country) => country.iso === \"BR\")!;\n\n\tconst defaultData = defaultValue ? formatToPhone(defaultValue) : \"\";\n\tconst defaultCountry: CountryType = defaultValue\n\t\t? findCountryMask(defaultValue)[1]\n\t\t: brasilCountry;\n\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [search, setSearch] = useState(\"\");\n\tconst [showCountryOptions, setShowCountryOptions] = useState(false);\n\tconst [internalValue, setValue] = useState(defaultData);\n\tconst value = rawValue !== undefined ? rawValue : internalValue;\n\n\tconst [currentCountry, setCurrentCountry] = useState(defaultCountry);\n\n\tconst { fieldErrors } = useForm();\n\n\tconst phoneInputRef = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst phoneInputId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst isDisabled = disabled || isLoading;\n\n\tconst inputPhoneMaskRef = useRef<HTMLInputElement>(null);\n\n\tfunction handleContainerFocus() {\n\t\tif (isDisabled) return;\n\t\tif (isFocused || showCountryOptions) return;\n\n\t\tsetIsFocused(true);\n\t\tif (inputPhoneMaskRef.current) inputPhoneMaskRef.current.focus();\n\t}\n\n\tfunction handleOpenCountryOptions() {\n\t\tsetShowCountryOptions(true);\n\t\tsetIsFocused(true);\n\t}\n\n\tfunction handleCloseCountryOptions() {\n\t\tsetShowCountryOptions(false);\n\t\tsetIsFocused(false);\n\t}\n\n\tfunction handleInputFocus() {\n\t\tsetIsFocused(true);\n\t}\n\n\tfunction handleInputBlur() {\n\t\tsetIsFocused(false);\n\t}\n\n\tfunction filterCountryFunction(country: CountryType) {\n\t\treturn country.name.toLowerCase().includes(search.toLowerCase());\n\t}\n\n\tfunction inputValue(props?: string) {\n\t\tlet returnValue = currentCountry.code;\n\t\treturnValue += removeNonNumeric(props || value);\n\t\treturn returnValue;\n\t}\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<PhoneInputContainer\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\tisError={isError}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tisFocused={isFocused}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tsize={size}\n\t\t\t\tvariant={variant}\n\t\t\t\tonFocus={handleContainerFocus}\n\t\t\t>\n\t\t\t\t<PhoneInputCountrySelector\n\t\t\t\t\tcurrentCountry={currentCountry}\n\t\t\t\t\tonClick={handleOpenCountryOptions}\n\t\t\t\t\tsize={size}\n\t\t\t\t/>\n\n\t\t\t\t<PhoneInputCountryOptionsContainer\n\t\t\t\t\tisOpen={isDisabled ? false : readOnly ? false : showCountryOptions}\n\t\t\t\t\tsearch={search}\n\t\t\t\t\tplaceholder={searchCountryPlaceholder}\n\t\t\t\t\tonSearch={setSearch}\n\t\t\t\t>\n\t\t\t\t\t{countries\n\t\t\t\t\t\t.filter((country) => filterCountryFunction(country))\n\t\t\t\t\t\t.map((country) => (\n\t\t\t\t\t\t\t<PhoneInputCountryOption\n\t\t\t\t\t\t\t\tkey={country.iso}\n\t\t\t\t\t\t\t\tcountry={country}\n\t\t\t\t\t\t\t\thandleChangeValue={() => {\n\t\t\t\t\t\t\t\t\tsetCurrentCountry(country);\n\t\t\t\t\t\t\t\t\tsetShowCountryOptions(false);\n\t\t\t\t\t\t\t\t\tsetValue(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tisActive={country.iso === currentCountry.iso}\n\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t{countries.filter((country) => filterCountryFunction(country))\n\t\t\t\t\t\t.length === 0 && <p>{notFoundCountryText}</p>}\n\t\t\t\t</PhoneInputCountryOptionsContainer>\n\n\t\t\t\t<PhoneInputCountriesOverlay\n\t\t\t\t\tisOpen={isDisabled ? false : readOnly ? false : showCountryOptions}\n\t\t\t\t\tonClick={handleCloseCountryOptions}\n\t\t\t\t/>\n\n\t\t\t\t<PhoneInputMask\n\t\t\t\t\tid={phoneInputId}\n\t\t\t\t\tref={inputPhoneMaskRef}\n\t\t\t\t\treadonly={readOnly}\n\t\t\t\t\tcurrentCountry={currentCountry}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tsetValue(e);\n\t\t\t\t\t\tonChange?.(inputValue(e));\n\t\t\t\t\t}}\n\t\t\t\t/>\n\n\t\t\t\t<input\n\t\t\t\t\tref={phoneInputRef}\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={inputValue()}\n\t\t\t\t/>\n\t\t\t</PhoneInputContainer>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { PhoneInput };\n"],"mappings":";;;;;;;;;;;;;AAiIA,SAAS,EAAW,GAAwB;CAC3C,IAAM,EACL,OAAO,GACP,WACA,WAAW,IAAmB,IAC9B,cAAW,IACX,cAAc,GACd,eAAY,IACZ,cAAW,IACX,UAAO,MACP,kBAAe,IACf,cAAU,SACV,iBACA,SACA,aACA,8BAA2B,kBAC3B,yBAAsB,0BACtB,OACA,yBAAsB,IACtB,iBAAc,eACX,GAGE,IAAgB,EAAU,MAAM,MAAY,EAAQ,QAAQ,IAAI,GAEhE,IAAc,IAAe,EAAc,CAAY,IAAI,IAC3D,IAA8B,IACjC,EAAgB,CAAY,CAAC,CAAC,KAC9B,GAEG,CAAC,GAAW,KAAgB,EAAS,EAAK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AC,CACnD,KAAK,MACL,kBAAC,IAAD;MAEU;MACT,yBAAyB;OAGxB,AAFA,EAAkB,CAAO,GACzB,EAAsB,EAAK,GAC3B,EAAS,EAAE;MACZ;MACA,UAAU,EAAQ,QAAQ,EAAe;MACnC;KACN,GATK,EAAQ,GASb,CACD,GAED,EAAU,QAAQ,MAAY,EAAsB,CAAO,CAAC,CAAC,CAC5D,WAAW,KAAK,kBAAC,KAAD,EAAA,UAAI,EAAuB,CAAA,CACX;;IAEnC,kBAAC,IAAD;KACC,QAAQ,KAAqB,IAAR,KAA2B;KAChD,SAAS;IACT,CAAA;IAED,kBAAC,GAAD;KACC,IAAI;KACJ,KAAK;KACL,UAAU;KACM;KACT;KACP,UAAU;KACV,QAAQ;KACR,SAAS;KACH;KACN,WAAW,MAAM;MAEhB,AADA,EAAS,CAAC,GACV,IAAW,EAAW,CAAC,CAAC;KACzB;IACA,CAAA;IAED,kBAAC,SAAD;KACC,KAAK;KACL,MAAK;KACC;KACN,OAAO,EAAW;IAClB,CAAA;GACmB;;CACP,CAAA;AAEjB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/phoneInput/index.tsx"],"sourcesContent":["import {\n\tfindCountryMask,\n\tformatToPhone,\n\tremoveNonNumeric,\n} from \"@arkyn/shared\";\nimport { countries } from \"@arkyn/templates\";\nimport { useId, useRef, useState } from \"react\";\n\nimport { useForm } from \"../../hooks/useForm\";\nimport { FieldTemplate } from \"../../services/fieldTemplate\";\nimport { applyMask, getMask, TYPES } from \"../../utils/phoneInputUtilities\";\n\nimport { PhoneInputContainer } from \"./phoneInputContainer\";\nimport { PhoneInputCountriesOverlay } from \"./phoneInputCountriesOverlay\";\nimport { PhoneInputCountryOption } from \"./phoneInputCountryOption\";\nimport { PhoneInputCountryOptionsContainer } from \"./phoneInputCountryOptionsContainer\";\nimport { PhoneInputCountrySelector } from \"./phoneInputCountrySelector\";\nimport { PhoneInputMask } from \"./phoneInputMask\";\n\ntype CountryType = {\n\tname: string;\n\tcode: string;\n\tiso: string;\n\tflag: string;\n\tmask: string | string[];\n};\n\ntype PhoneInputProps = {\n\t/** Optional HTML id for the visible phone text input. */\n\tid?: string;\n\t/** Disables all interactions. @default false */\n\tdisabled?: boolean;\n\t/** Prevents value changes while keeping the current value visible. @default false */\n\treadOnly?: boolean;\n\t/** Validation error message (overrides the `useForm` context error for this field). */\n\terrorMessage?: string;\n\t/** Optional label text displayed above the input. */\n\tlabel?: string;\n\t/** Displays an asterisk on the label to signal a required field. */\n\tshowAsterisk?: boolean;\n\t/** Shows a loading state and disables interactions. @default false */\n\tisLoading?: boolean;\n\t/**\n\t * Input size.\n\t * @default \"md\"\n\t */\n\tsize?: \"md\" | \"lg\";\n\t/**\n\t * Visual style variant.\n\t * - `solid`: filled background.\n\t * - `outline`: bordered, transparent background.\n\t * @default \"solid\"\n\t */\n\tvariant?: \"solid\" | \"outline\";\n\t/** Additional CSS class applied to the field wrapper. */\n\tclassName?: string;\n\t/** Uncontrolled default phone value (numeric string with or without country code). @default \"\" */\n\tdefaultValue?: string;\n\t/** Text displayed when no country matches the search query. @default \"Nenhum país encontrado\" */\n\tnotFoundCountryText?: string;\n\t/** Field name for form submission (stored as numeric string with country code). Required. */\n\tname: string;\n\t/** Placeholder for the country search input. @default \"Pesquisar país\" */\n\tsearchCountryPlaceholder?: string;\n\t/** ISO 3166-1 alpha-2 code of the initially selected country. @default \"BR\" */\n\tdefaultCountryIso?: (typeof countries)[number][\"iso\"];\n\t/** Callback fired on value change. Receives a numeric string prefixed with the country dial code. */\n\tonChange?: (e: string) => void;\n\t/** Controlled phone value (without country code). */\n\tvalue?: string;\n\t/** When true, skips `FieldTemplate` wrapper (label and error text). @default false */\n\tunShowFieldTemplate?: boolean;\n\t/**\n\t * Layout direction forwarded to `FieldTemplate`.\n\t * @default \"vertical\"\n\t */\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n};\n\nfunction formatLocalValue(rawValue: string, country: CountryType) {\n\tconst digits = removeNonNumeric(rawValue);\n\n\tif (country.code === \"+55\") {\n\t\treturn applyMask(digits, TYPES[getMask(digits)]);\n\t}\n\n\tconst mask =\n\t\ttypeof country.mask === \"string\" ? country.mask : country.mask[0];\n\treturn applyMask(digits, mask, \"_\");\n}\n\n/**\n * PhoneInput — phone number field with an integrated country selector and automatic mask formatting.\n *\n * The visible input is masked according to the selected country's phone format.\n * The hidden `<input>` stores a numeric string prefixed with the country dial code for form submission.\n * Integrates with `useForm` to display validation errors by field name.\n *\n * @param props.name - Field name for form submission. Required.\n * @param props.label - Label text displayed above the input.\n * @param props.showAsterisk - Appends `*` to the label.\n * @param props.errorMessage - Validation error message.\n * @param props.size - Input size (`md` | `lg`). Default: \"md\"\n * @param props.variant - Visual style variant. Default: \"solid\"\n * @param props.disabled - Disables all interactions. Default: false\n * @param props.readOnly - Prevents editing. Default: false\n * @param props.isLoading - Shows loading state and disables interactions. Default: false\n * @param props.defaultValue - Uncontrolled default phone value.\n * @param props.value - Controlled phone value (without country code).\n * @param props.onChange - Callback fired on change — receives numeric string with country code.\n * @param props.defaultCountryIso - ISO code of the initially selected country. Default: \"BR\"\n * @param props.searchCountryPlaceholder - Placeholder for country search. Default: \"Pesquisar país\"\n * @param props.notFoundCountryText - Text shown when no country matches. Default: \"Nenhum país encontrado\"\n * @param props.orientation - Layout direction. Default: \"vertical\"\n * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false\n *\n * @returns PhoneInput JSX element wrapped in `FieldTemplate`.\n *\n * @example\n * ```tsx\n * // Basic\n * <PhoneInput name=\"phone\" label=\"Phone\" />\n *\n * // Controlled with outline variant\n * <PhoneInput\n * name=\"contactPhone\"\n * label=\"Contact Phone\"\n * value={phone}\n * onChange={(v) => setPhone(v)}\n * variant=\"outline\"\n * size=\"lg\"\n * />\n *\n * // Pre-selected country (US)\n * <PhoneInput\n * name=\"phone\"\n * label=\"Phone\"\n * defaultCountryIso=\"US\"\n * showAsterisk\n * />\n * ```\n */\nfunction PhoneInput(props: PhoneInputProps) {\n\tconst {\n\t\tvalue: rawValue,\n\t\tlabel,\n\t\tclassName: wrapperClassName = \"\",\n\t\tdisabled = false,\n\t\terrorMessage: baseErrorMessage,\n\t\tisLoading = false,\n\t\treadOnly = false,\n\t\tsize = \"md\",\n\t\tdefaultValue = \"\",\n\t\tvariant = \"solid\",\n\t\tshowAsterisk,\n\t\tname,\n\t\tonChange,\n\t\tsearchCountryPlaceholder = \"Pesquisar país\",\n\t\tnotFoundCountryText = \"Nenhum país encontrado\",\n\t\tid,\n\t\tunShowFieldTemplate = false,\n\t\torientation = \"vertical\",\n\t} = props;\n\n\t// biome-ignore lint/style/noNonNullAssertion: \"BR\" is always present in the countries list\n\tconst brasilCountry = countries.find((country) => country.iso === \"BR\")!;\n\n\tconst defaultData = defaultValue ? formatToPhone(defaultValue) : \"\";\n\tconst defaultCountry: CountryType = defaultValue\n\t\t? findCountryMask(defaultValue)[1]\n\t\t: brasilCountry;\n\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [search, setSearch] = useState(\"\");\n\tconst [showCountryOptions, setShowCountryOptions] = useState(false);\n\tconst [internalValue, setValue] = useState(defaultData);\n\n\tconst [currentCountry, setCurrentCountry] = useState(defaultCountry);\n\n\tconst value =\n\t\trawValue !== undefined\n\t\t\t? formatLocalValue(rawValue, currentCountry)\n\t\t\t: internalValue;\n\n\tconst { fieldErrors } = useForm();\n\n\tconst phoneInputRef = useRef<HTMLInputElement>(null);\n\tconst generatedId = useId();\n\tconst phoneInputId = id || generatedId;\n\n\tconst errorMessage = baseErrorMessage || fieldErrors?.[name];\n\tconst isError = !!errorMessage;\n\tconst isDisabled = disabled || isLoading;\n\n\tconst inputPhoneMaskRef = useRef<HTMLInputElement>(null);\n\n\tfunction handleContainerFocus() {\n\t\tif (isDisabled) return;\n\t\tif (isFocused || showCountryOptions) return;\n\n\t\tsetIsFocused(true);\n\t\tif (inputPhoneMaskRef.current) inputPhoneMaskRef.current.focus();\n\t}\n\n\tfunction handleOpenCountryOptions() {\n\t\tsetShowCountryOptions(true);\n\t\tsetIsFocused(true);\n\t}\n\n\tfunction handleCloseCountryOptions() {\n\t\tsetShowCountryOptions(false);\n\t\tsetIsFocused(false);\n\t}\n\n\tfunction handleInputFocus() {\n\t\tsetIsFocused(true);\n\t}\n\n\tfunction handleInputBlur() {\n\t\tsetIsFocused(false);\n\t}\n\n\tfunction filterCountryFunction(country: CountryType) {\n\t\treturn country.name.toLowerCase().includes(search.toLowerCase());\n\t}\n\n\tfunction inputValue(props?: string) {\n\t\tlet returnValue = currentCountry.code;\n\t\treturnValue += removeNonNumeric(props || value);\n\t\treturn returnValue;\n\t}\n\n\treturn (\n\t\t<FieldTemplate\n\t\t\tname={name}\n\t\t\tlabel={label}\n\t\t\tshowAsterisk={showAsterisk}\n\t\t\tclassName={wrapperClassName}\n\t\t\terrorMessage={errorMessage}\n\t\t\tunShowFieldTemplate={unShowFieldTemplate}\n\t\t\torientation={orientation}\n\t\t>\n\t\t\t<PhoneInputContainer\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\tisError={isError}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tisFocused={isFocused}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tsize={size}\n\t\t\t\tvariant={variant}\n\t\t\t\tonFocus={handleContainerFocus}\n\t\t\t>\n\t\t\t\t<PhoneInputCountrySelector\n\t\t\t\t\tcurrentCountry={currentCountry}\n\t\t\t\t\tonClick={handleOpenCountryOptions}\n\t\t\t\t\tsize={size}\n\t\t\t\t/>\n\n\t\t\t\t<PhoneInputCountryOptionsContainer\n\t\t\t\t\tisOpen={isDisabled ? false : readOnly ? false : showCountryOptions}\n\t\t\t\t\tsearch={search}\n\t\t\t\t\tplaceholder={searchCountryPlaceholder}\n\t\t\t\t\tonSearch={setSearch}\n\t\t\t\t>\n\t\t\t\t\t{countries\n\t\t\t\t\t\t.filter((country) => filterCountryFunction(country))\n\t\t\t\t\t\t.map((country) => (\n\t\t\t\t\t\t\t<PhoneInputCountryOption\n\t\t\t\t\t\t\t\tkey={country.iso}\n\t\t\t\t\t\t\t\tcountry={country}\n\t\t\t\t\t\t\t\thandleChangeValue={() => {\n\t\t\t\t\t\t\t\t\tsetCurrentCountry(country);\n\t\t\t\t\t\t\t\t\tsetShowCountryOptions(false);\n\t\t\t\t\t\t\t\t\tsetValue(\"\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tisActive={country.iso === currentCountry.iso}\n\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t{countries.filter((country) => filterCountryFunction(country))\n\t\t\t\t\t\t.length === 0 && <p>{notFoundCountryText}</p>}\n\t\t\t\t</PhoneInputCountryOptionsContainer>\n\n\t\t\t\t<PhoneInputCountriesOverlay\n\t\t\t\t\tisOpen={isDisabled ? false : readOnly ? false : showCountryOptions}\n\t\t\t\t\tonClick={handleCloseCountryOptions}\n\t\t\t\t/>\n\n\t\t\t\t<PhoneInputMask\n\t\t\t\t\tid={phoneInputId}\n\t\t\t\t\tref={inputPhoneMaskRef}\n\t\t\t\t\treadonly={readOnly}\n\t\t\t\t\tcurrentCountry={currentCountry}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tsetValue(e);\n\t\t\t\t\t\tonChange?.(inputValue(e));\n\t\t\t\t\t}}\n\t\t\t\t/>\n\n\t\t\t\t<input\n\t\t\t\t\tref={phoneInputRef}\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={inputValue()}\n\t\t\t\t/>\n\t\t\t</PhoneInputContainer>\n\t\t</FieldTemplate>\n\t);\n}\n\nexport { PhoneInput };\n"],"mappings":";;;;;;;;;;;;;;AA+EA,SAAS,E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K;KACL,MAAK;KACC;KACN,OAAO,EAAW;IAClB,CAAA;GACmB;;CACP,CAAA;AAEjB"}
@@ -1,42 +1,36 @@
1
- import { createContext as e, useState as t } from "react";
2
- import { jsx as n } from "react/jsx-runtime";
1
+ import { createContext as e, useCallback as t, useMemo as n, useState as r } from "react";
2
+ import { jsx as i } from "react/jsx-runtime";
3
3
  //#region src/providers/modalProvider.tsx
4
- var r = e({});
5
- function i(e) {
6
- let { children: i = !1 } = e, [a, o] = t([]);
7
- function s(e) {
8
- return !!a.some((t) => t.key === e);
9
- }
10
- function c(e) {
11
- return a.find((t) => t.key === e)?.data;
12
- }
13
- function l(e, t) {
14
- s(e) ? o((n) => [...n.filter((t) => t.key !== e), {
15
- key: e,
16
- data: t
17
- }]) : o([...a, {
4
+ var a = e({});
5
+ function o(e) {
6
+ let { children: o = !1 } = e, [s, c] = r([]), l = t((e) => s.some((t) => t.key === e), [s]), u = t((e) => s.find((t) => t.key === e)?.data, [s]), d = t((e, t) => {
7
+ c((n) => [...n.filter((t) => t.key !== e), {
18
8
  key: e,
19
9
  data: t
20
10
  }]);
21
- }
22
- function u(e) {
23
- o(a.filter((t) => t.key !== e));
24
- }
25
- function d() {
26
- o([]);
27
- }
28
- return /* @__PURE__ */ n(r.Provider, {
29
- value: {
30
- modalIsOpen: s,
31
- modalData: c,
32
- openModal: l,
33
- closeModal: u,
34
- closeAll: d
35
- },
36
- children: i
11
+ }, []), f = t((e) => {
12
+ c((t) => t.filter((t) => t.key !== e));
13
+ }, []), p = t(() => {
14
+ c([]);
15
+ }, []), m = n(() => ({
16
+ modalIsOpen: l,
17
+ modalData: u,
18
+ openModal: d,
19
+ closeModal: f,
20
+ closeAll: p
21
+ }), [
22
+ l,
23
+ u,
24
+ d,
25
+ f,
26
+ p
27
+ ]);
28
+ return /* @__PURE__ */ i(a.Provider, {
29
+ value: m,
30
+ children: o
37
31
  });
38
32
  }
39
33
  //#endregion
40
- export { i as ModalProvider, r as modalContext };
34
+ export { o as ModalProvider, a as modalContext };
41
35
 
42
36
  //# sourceMappingURL=modalProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modalProvider.js","names":[],"sources":["../../../src/providers/modalProvider.tsx"],"sourcesContent":["import { createContext, type ReactNode, useState } from \"react\";\n\n// biome-ignore lint/suspicious/noExplicitAny: intentional\ntype ModalContextProps<T = any> = {\n\tmodalIsOpen(key: string): boolean;\n\tmodalData(key: string): T;\n\topenModal(key: string, data?: T): void;\n\tcloseModal(key: string): void;\n\tcloseAll(): void;\n};\n\ntype OpenedModals = {\n\tkey: string;\n\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\tdata?: any;\n}[];\n\ntype ModalProviderProps = {\n\tchildren: ReactNode;\n\tenableModalAutomation?: boolean;\n};\n\nconst modalContext = createContext({} as ModalContextProps);\n\n/**\n * ModalProvider — context provider that manages open/close state and data for named modals.\n *\n * Wrap your app (or a subtree) with this once. Any component in the tree can then call\n * `useModal(key)` to open, close, or read data for a specific modal. `closeAll()` is also\n * available (used by `useAutomation` to close all modals after a successful form action).\n *\n * @param props.children - Components that will have access to modal context.\n *\n * @returns ModalProvider JSX element.\n *\n * @example\n * ```tsx\n * // In your root layout\n * <ModalProvider>\n * <App />\n * </ModalProvider>\n *\n * // Opening a modal from anywhere in the tree\n * const { openModal } = useModal();\n * openModal('confirm-delete', { id: user.id });\n *\n * // Consuming in the modal component\n * const { modalIsOpen, modalData, closeModal } = useModal<{ id: number }>('confirm-delete');\n * ```\n */\n\nfunction ModalProvider(args: ModalProviderProps) {\n\tconst { children = false } = args;\n\tconst [openedModals, setOpenedModals] = useState<OpenedModals>([]);\n\n\tfunction modalIsOpen(key: string) {\n\t\treturn !!openedModals.some((modal) => modal.key === key);\n\t}\n\n\tfunction modalData(key: string) {\n\t\treturn openedModals.find((modal) => modal.key === key)?.data;\n\t}\n\n\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\tfunction openModal(key: string, data?: any) {\n\t\tconst alreadyExist = modalIsOpen(key);\n\t\tif (alreadyExist) {\n\t\t\tsetOpenedModals((old) => {\n\t\t\t\tconst filtered = old.filter((modal) => modal.key !== key);\n\t\t\t\treturn [...filtered, { key, data }];\n\t\t\t});\n\t\t} else setOpenedModals([...openedModals, { key, data }]);\n\t}\n\n\tfunction closeModal(key: string) {\n\t\tsetOpenedModals(openedModals.filter((modal) => modal.key !== key));\n\t}\n\n\tfunction closeAll() {\n\t\tsetOpenedModals([]);\n\t}\n\n\treturn (\n\t\t<modalContext.Provider\n\t\t\tvalue={{ modalIsOpen, modalData, openModal, closeModal, closeAll }}\n\t\t>\n\t\t\t{children}\n\t\t</modalContext.Provider>\n\t);\n}\n\nexport { type ModalContextProps, ModalProvider, modalContext };\n"],"mappings":";;;AAsBA,IAAM,IAAe,EAAc,CAAC,CAAsB;AA6B1D,SAAS,EAAc,GAA0B;CAChD,IAAM,EAAE,cAAW,OAAU,GACvB,CAAC,GAAc,KAAmB,EAAuB,CAAC,CAAC;CAEjE,SAAS,EAAY,GAAa;EACjC,OAAO,CAAC,CAAC,EAAa,MAAM,MAAU,EAAM,QAAQ,CAAG;CACxD;CAEA,SAAS,EAAU,GAAa;EAC/B,OAAO,EAAa,MAAM,MAAU,EAAM,QAAQ,CAAG,CAAC,EAAE;CACzD;CAGA,SAAS,EAAU,GAAa,GAAY;EAE3C,AADqB,EAAY,CAC7B,IACH,GAAiB,MAET,CAAC,GADS,EAAI,QAAQ,MAAU,EAAM,QAAQ,CAC1C,GAAU;GAAE;GAAK;EAAK,CAAC,CAClC,IACK,EAAgB,CAAC,GAAG,GAAc;GAAE;GAAK;EAAK,CAAC,CAAC;CACxD;CAEA,SAAS,EAAW,GAAa;EAChC,EAAgB,EAAa,QAAQ,MAAU,EAAM,QAAQ,CAAG,CAAC;CAClE;CAEA,SAAS,IAAW;EACnB,EAAgB,CAAC,CAAC;CACnB;CAEA,OACC,kBAAC,EAAa,UAAd;EACC,OAAO;GAAE;GAAa;GAAW;GAAW;GAAY;EAAS;EAEhE;CACqB,CAAA;AAEzB"}
1
+ {"version":3,"file":"modalProvider.js","names":[],"sources":["../../../src/providers/modalProvider.tsx"],"sourcesContent":["import {\n\tcreateContext,\n\ttype ReactNode,\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n} from \"react\";\n\n// biome-ignore lint/suspicious/noExplicitAny: intentional\ntype ModalContextProps<T = any> = {\n\tmodalIsOpen(key: string): boolean;\n\tmodalData(key: string): T;\n\topenModal(key: string, data?: T): void;\n\tcloseModal(key: string): void;\n\tcloseAll(): void;\n};\n\ntype OpenedModals = {\n\tkey: string;\n\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\tdata?: any;\n}[];\n\ntype ModalProviderProps = {\n\tchildren: ReactNode;\n\tenableModalAutomation?: boolean;\n};\n\nconst modalContext = createContext({} as ModalContextProps);\n\n/**\n * ModalProvider — context provider that manages open/close state and data for named modals.\n *\n * Wrap your app (or a subtree) with this once. Any component in the tree can then call\n * `useModal(key)` to open, close, or read data for a specific modal. `closeAll()` is also\n * available (used by `useAutomation` to close all modals after a successful form action).\n *\n * @param props.children - Components that will have access to modal context.\n *\n * @returns ModalProvider JSX element.\n *\n * @example\n * ```tsx\n * // In your root layout\n * <ModalProvider>\n * <App />\n * </ModalProvider>\n *\n * // Opening a modal from anywhere in the tree\n * const { openModal } = useModal();\n * openModal('confirm-delete', { id: user.id });\n *\n * // Consuming in the modal component\n * const { modalIsOpen, modalData, closeModal } = useModal<{ id: number }>('confirm-delete');\n * ```\n */\n\nfunction ModalProvider(args: ModalProviderProps) {\n\tconst { children = false } = args;\n\tconst [openedModals, setOpenedModals] = useState<OpenedModals>([]);\n\n\tconst modalIsOpen = useCallback(\n\t\t(key: string) => openedModals.some((modal) => modal.key === key),\n\t\t[openedModals],\n\t);\n\n\tconst modalData = useCallback(\n\t\t(key: string) => openedModals.find((modal) => modal.key === key)?.data,\n\t\t[openedModals],\n\t);\n\n\tconst openModal = useCallback(\n\t\t// biome-ignore lint/suspicious/noExplicitAny: intentional\n\t\t(key: string, data?: any) => {\n\t\t\tsetOpenedModals((old) => {\n\t\t\t\tconst filtered = old.filter((modal) => modal.key !== key);\n\t\t\t\treturn [...filtered, { key, data }];\n\t\t\t});\n\t\t},\n\t\t[],\n\t);\n\n\tconst closeModal = useCallback((key: string) => {\n\t\tsetOpenedModals((old) => old.filter((modal) => modal.key !== key));\n\t}, []);\n\n\tconst closeAll = useCallback(() => {\n\t\tsetOpenedModals([]);\n\t}, []);\n\n\tconst value = useMemo(\n\t\t() => ({ modalIsOpen, modalData, openModal, closeModal, closeAll }),\n\t\t[modalIsOpen, modalData, openModal, closeModal, closeAll],\n\t);\n\n\treturn (\n\t\t<modalContext.Provider value={value}>{children}</modalContext.Provider>\n\t);\n}\n\nexport { type ModalContextProps, ModalProvider, modalContext };\n"],"mappings":";;;AA4BA,IAAM,IAAe,EAAc,CAAC,CAAsB;AA6B1D,SAAS,EAAc,GAA0B;CAChD,IAAM,EAAE,cAAW,OAAU,GACvB,CAAC,GAAc,KAAmB,EAAuB,CAAC,CAAC,GAE3D,IAAc,GAClB,MAAgB,EAAa,MAAM,MAAU,EAAM,QAAQ,CAAG,GAC/D,CAAC,CAAY,CACd,GAEM,IAAY,GAChB,MAAgB,EAAa,MAAM,MAAU,EAAM,QAAQ,CAAG,CAAC,EAAE,MAClE,CAAC,CAAY,CACd,GAEM,IAAY,GAEhB,GAAa,MAAe;EAC5B,GAAiB,MAET,CAAC,GADS,EAAI,QAAQ,MAAU,EAAM,QAAQ,CAC1C,GAAU;GAAE;GAAK;EAAK,CAAC,CAClC;CACF,GACA,CAAC,CACF,GAEM,IAAa,GAAa,MAAgB;EAC/C,GAAiB,MAAQ,EAAI,QAAQ,MAAU,EAAM,QAAQ,CAAG,CAAC;CAClE,GAAG,CAAC,CAAC,GAEC,IAAW,QAAkB;EAClC,EAAgB,CAAC,CAAC;CACnB,GAAG,CAAC,CAAC,GAEC,IAAQ,SACN;EAAE;EAAa;EAAW;EAAW;EAAY;CAAS,IACjE;EAAC;EAAa;EAAW;EAAW;EAAY;CAAQ,CACzD;CAEA,OACC,kBAAC,EAAa,UAAd;EAA8B;EAAQ;CAAgC,CAAA;AAExE"}
@@ -11,6 +11,7 @@ function a(a) {
11
11
  orientation: p,
12
12
  children: [
13
13
  s && /* @__PURE__ */ r(t, {
14
+ htmlFor: o,
14
15
  showAsterisk: c,
15
16
  children: s
16
17
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"fieldTemplate.js","names":[],"sources":["../../../src/services/fieldTemplate.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { FieldError } from \"../components/fieldError\";\nimport { FieldLabel } from \"../components/fieldLabel\";\nimport { FieldWrapper } from \"../components/fieldWrapper\";\n\ntype FormRendererProps = {\n\tname?: string;\n\tlabel?: string;\n\tclassName?: string;\n\tshowAsterisk?: boolean;\n\tunShowFieldTemplate?: boolean;\n\terrorMessage?: string;\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n\tchildren: ReactNode;\n};\n\nfunction FieldTemplate(props: FormRendererProps) {\n\tconst {\n\t\tname,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\tclassName,\n\t\tunShowFieldTemplate,\n\t\terrorMessage,\n\t\tchildren,\n\t\torientation,\n\t} = props;\n\n\tif (unShowFieldTemplate) return children;\n\n\treturn (\n\t\t<FieldWrapper id={name} className={className} orientation={orientation}>\n\t\t\t{label && <FieldLabel showAsterisk={showAsterisk}>{label}</FieldLabel>}\n\t\t\t{children}\n\t\t\t{errorMessage && <FieldError>{errorMessage}</FieldError>}\n\t\t</FieldWrapper>\n\t);\n}\n\nexport { FieldTemplate };\n"],"mappings":";;;;;AAiBA,SAAS,EAAc,GAA0B;CAChD,IAAM,EACL,SACA,UACA,iBACA,cACA,wBACA,iBACA,aACA,mBACG;CAIJ,OAFI,IAA4B,IAG/B,kBAAC,GAAD;EAAc,IAAI;EAAiB;EAAwB;YAA3D;GACE,KAAS,kBAAC,GAAD;IAA0B;cAAe;GAAkB,CAAA;GACpE;GACA,KAAgB,kBAAC,GAAD,EAAA,UAAa,EAAyB,CAAA;EAC1C;;AAEhB"}
1
+ {"version":3,"file":"fieldTemplate.js","names":[],"sources":["../../../src/services/fieldTemplate.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { FieldError } from \"../components/fieldError\";\nimport { FieldLabel } from \"../components/fieldLabel\";\nimport { FieldWrapper } from \"../components/fieldWrapper\";\n\ntype FormRendererProps = {\n\tname?: string;\n\tlabel?: string;\n\tclassName?: string;\n\tshowAsterisk?: boolean;\n\tunShowFieldTemplate?: boolean;\n\terrorMessage?: string;\n\torientation?: \"horizontal\" | \"vertical\" | \"horizontalReverse\";\n\tchildren: ReactNode;\n};\n\nfunction FieldTemplate(props: FormRendererProps) {\n\tconst {\n\t\tname,\n\t\tlabel,\n\t\tshowAsterisk,\n\t\tclassName,\n\t\tunShowFieldTemplate,\n\t\terrorMessage,\n\t\tchildren,\n\t\torientation,\n\t} = props;\n\n\tif (unShowFieldTemplate) return children;\n\n\treturn (\n\t\t<FieldWrapper id={name} className={className} orientation={orientation}>\n\t\t\t{label && (\n\t\t\t\t<FieldLabel htmlFor={name} showAsterisk={showAsterisk}>\n\t\t\t\t\t{label}\n\t\t\t\t</FieldLabel>\n\t\t\t)}\n\n\t\t\t{children}\n\t\t\t{errorMessage && <FieldError>{errorMessage}</FieldError>}\n\t\t</FieldWrapper>\n\t);\n}\n\nexport { FieldTemplate };\n"],"mappings":";;;;;AAiBA,SAAS,EAAc,GAA0B;CAChD,IAAM,EACL,SACA,UACA,iBACA,cACA,wBACA,iBACA,aACA,mBACG;CAIJ,OAFI,IAA4B,IAG/B,kBAAC,GAAD;EAAc,IAAI;EAAiB;EAAwB;YAA3D;GACE,KACA,kBAAC,GAAD;IAAY,SAAS;IAAoB;cACvC;GACU,CAAA;GAGZ;GACA,KAAgB,kBAAC,GAAD,EAAA,UAAa,EAAyB,CAAA;EAC1C;;AAEhB"}
@@ -6,13 +6,13 @@ var t = {
6
6
  EIGHT: "(99) 9999-9999",
7
7
  NINE: "(99) 99999-9999"
8
8
  };
9
- function n(e, t) {
10
- let n = "", r = 0;
11
- for (let i = 0; i < t.length; i++) if (t[i] === "9") if (r < e.length) n += e[r], r++;
9
+ function n(e, t, n = "9") {
10
+ let r = "", i = 0;
11
+ for (let a = 0; a < t.length; a++) if (t[a] === n) if (i < e.length) r += e[i], i++;
12
12
  else break;
13
- else if (r < e.length) n += t[i];
13
+ else if (i < e.length) r += t[a];
14
14
  else break;
15
- return n;
15
+ return r;
16
16
  }
17
17
  function r(e) {
18
18
  return e.length > 10 ? "NINE" : "EIGHT";
@@ -1 +1 @@
1
- {"version":3,"file":"phoneInputUtilities.js","names":[],"sources":["../../../src/utils/phoneInputUtilities.ts"],"sourcesContent":["function clear(value: string) {\n\treturn value?.replace(/[^0-9]/g, \"\");\n}\n\nconst TYPES = {\n\tEIGHT: \"(99) 9999-9999\",\n\tNINE: \"(99) 99999-9999\",\n};\n\nfunction applyMask(value: string, maskPattern: string) {\n\tlet result = \"\";\n\tlet digitIndex = 0;\n\n\tfor (let i = 0; i < maskPattern.length; i++) {\n\t\tif (maskPattern[i] === \"9\") {\n\t\t\tif (digitIndex < value.length) {\n\t\t\t\tresult += value[digitIndex];\n\t\t\t\tdigitIndex++;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tif (digitIndex < value.length) {\n\t\t\t\tresult += maskPattern[i];\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction getMask(value: string): \"NINE\" | \"EIGHT\" {\n\tconst mask = value.length > 10 ? \"NINE\" : \"EIGHT\";\n\treturn mask;\n}\n\nconst MAX_LENGTH = clear(TYPES.NINE).length;\n\nexport { applyMask, clear, getMask, MAX_LENGTH, TYPES };\n"],"mappings":";AAAA,SAAS,EAAM,GAAe;CAC7B,OAAO,GAAO,QAAQ,WAAW,EAAE;AACpC;AAEA,IAAM,IAAQ;CACb,OAAO;CACP,MAAM;AACP;AAEA,SAAS,EAAU,GAAe,GAAqB;CACtD,IAAI,IAAS,IACT,IAAa;CAEjB,KAAK,IAAI,IAAI,GAAG,IAAI,EAAY,QAAQ,KACvC,IAAI,EAAY,OAAO,KACtB,IAAI,IAAa,EAAM,QAEtB,AADA,KAAU,EAAM,IAChB;MAEA;MAGD,IAAI,IAAa,EAAM,QACtB,KAAU,EAAY;MAEtB;CAKH,OAAO;AACR;AAEA,SAAS,EAAQ,GAAiC;CAEjD,OADa,EAAM,SAAS,KAAK,SAAS;AAE3C;AAEA,IAAM,IAAa,EAAM,EAAM,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"phoneInputUtilities.js","names":[],"sources":["../../../src/utils/phoneInputUtilities.ts"],"sourcesContent":["function clear(value: string) {\n\treturn value?.replace(/[^0-9]/g, \"\");\n}\n\nconst TYPES = {\n\tEIGHT: \"(99) 9999-9999\",\n\tNINE: \"(99) 99999-9999\",\n};\n\nfunction applyMask(value: string, maskPattern: string, placeholder = \"9\") {\n\tlet result = \"\";\n\tlet digitIndex = 0;\n\n\tfor (let i = 0; i < maskPattern.length; i++) {\n\t\tif (maskPattern[i] === placeholder) {\n\t\t\tif (digitIndex < value.length) {\n\t\t\t\tresult += value[digitIndex];\n\t\t\t\tdigitIndex++;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tif (digitIndex < value.length) {\n\t\t\t\tresult += maskPattern[i];\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction getMask(value: string): \"NINE\" | \"EIGHT\" {\n\tconst mask = value.length > 10 ? \"NINE\" : \"EIGHT\";\n\treturn mask;\n}\n\nconst MAX_LENGTH = clear(TYPES.NINE).length;\n\nexport { applyMask, clear, getMask, MAX_LENGTH, TYPES };\n"],"mappings":";AAAA,SAAS,EAAM,GAAe;CAC7B,OAAO,GAAO,QAAQ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E,aAAa,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"modalProvider.d.ts","sourceRoot":"","sources":["../../src/providers/modalProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;AAGf,KAAK,iBAAiB,CAAC,CAAC,GAAG,GAAG,IAAI;IACjC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;IAC1B,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACvC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,IAAI,IAAI,CAAC;CACjB,CAAC;AAQF,KAAK,kBAAkB,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,QAAA,MAAM,YAAY,iDAAyC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,iBAAS,aAAa,CAAC,IAAI,EAAE,kBAAkB,+BAyC9C;AAED,OAAO,EAAE,KAAK,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fieldTemplate.d.ts","sourceRoot":"","sources":["../../src/services/fieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,KAAK,iBAAiB,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;IAC9D,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,iBAAS,aAAa,CAAC,KAAK,EAAE,iBAAiB,+TAqB9C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"fieldTemplate.d.ts","sourceRoot":"","sources":["../../src/services/fieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,KAAK,iBAAiB,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;IAC9D,QAAQ,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,iBAAS,aAAa,CAAC,KAAK,EAAE,iBAAiB,+TA0B9C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}