@arkyn/components 3.0.1-beta.143 → 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.
Files changed (207) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/components/alert/alertContainer/index.d.ts +27 -43
  3. package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
  4. package/dist/components/alert/alertContainer/index.js +20 -40
  5. package/dist/components/alert/alertContent/index.d.ts +11 -36
  6. package/dist/components/alert/alertContent/index.d.ts.map +1 -1
  7. package/dist/components/alert/alertContent/index.js +11 -31
  8. package/dist/components/alert/alertDescription/index.d.ts +10 -38
  9. package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
  10. package/dist/components/alert/alertDescription/index.js +10 -33
  11. package/dist/components/alert/alertIcon/index.d.ts +14 -38
  12. package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
  13. package/dist/components/alert/alertIcon/index.js +14 -32
  14. package/dist/components/alert/alertTitle/index.d.ts +12 -35
  15. package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
  16. package/dist/components/alert/alertTitle/index.js +12 -27
  17. package/dist/components/audioPlayer/index.d.ts +24 -32
  18. package/dist/components/audioPlayer/index.d.ts.map +1 -1
  19. package/dist/components/audioPlayer/index.js +15 -18
  20. package/dist/components/audioUpload/index.d.ts +37 -48
  21. package/dist/components/audioUpload/index.d.ts.map +1 -1
  22. package/dist/components/audioUpload/index.js +23 -48
  23. package/dist/components/badge/index.d.ts +31 -22
  24. package/dist/components/badge/index.d.ts.map +1 -1
  25. package/dist/components/badge/index.js +14 -22
  26. package/dist/components/button/index.d.ts +38 -28
  27. package/dist/components/button/index.d.ts.map +1 -1
  28. package/dist/components/button/index.js +18 -28
  29. package/dist/components/cardTab/cardTabButton/index.d.ts +14 -52
  30. package/dist/components/cardTab/cardTabButton/index.d.ts.map +1 -1
  31. package/dist/components/cardTab/cardTabButton/index.js +12 -52
  32. package/dist/components/cardTab/cardTabContainer/index.d.ts +16 -58
  33. package/dist/components/cardTab/cardTabContainer/index.d.ts.map +1 -1
  34. package/dist/components/cardTab/cardTabContainer/index.js +12 -58
  35. package/dist/components/checkbox/index.d.ts +38 -37
  36. package/dist/components/checkbox/index.d.ts.map +1 -1
  37. package/dist/components/checkbox/index.js +21 -37
  38. package/dist/components/clientOnly.d.ts +13 -66
  39. package/dist/components/clientOnly.d.ts.map +1 -1
  40. package/dist/components/clientOnly.js +11 -66
  41. package/dist/components/currencyInput/index.d.ts +67 -50
  42. package/dist/components/currencyInput/index.d.ts.map +1 -1
  43. package/dist/components/currencyInput/index.js +28 -50
  44. package/dist/components/divider/index.d.ts +12 -25
  45. package/dist/components/divider/index.d.ts.map +1 -1
  46. package/dist/components/divider/index.js +8 -25
  47. package/dist/components/drawer/drawerContainer/index.d.ts +16 -50
  48. package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
  49. package/dist/components/drawer/drawerContainer/index.js +13 -50
  50. package/dist/components/drawer/drawerHeader/index.d.ts +9 -33
  51. package/dist/components/drawer/drawerHeader/index.d.ts.map +1 -1
  52. package/dist/components/drawer/drawerHeader/index.js +8 -33
  53. package/dist/components/facebookPixel/index.d.ts +47 -0
  54. package/dist/components/facebookPixel/index.d.ts.map +1 -1
  55. package/dist/components/facebookPixel/index.js +35 -0
  56. package/dist/components/fieldError/index.d.ts +4 -11
  57. package/dist/components/fieldError/index.d.ts.map +1 -1
  58. package/dist/components/fieldError/index.js +4 -11
  59. package/dist/components/fieldLabel/index.d.ts +6 -21
  60. package/dist/components/fieldLabel/index.d.ts.map +1 -1
  61. package/dist/components/fieldLabel/index.js +5 -21
  62. package/dist/components/fieldWrapper/index.d.ts +12 -22
  63. package/dist/components/fieldWrapper/index.d.ts.map +1 -1
  64. package/dist/components/fieldWrapper/index.js +7 -22
  65. package/dist/components/fileUpload/index.d.ts +36 -61
  66. package/dist/components/fileUpload/index.d.ts.map +1 -1
  67. package/dist/components/fileUpload/index.js +23 -61
  68. package/dist/components/googleAnalytics/index.d.ts +11 -7
  69. package/dist/components/googleAnalytics/index.d.ts.map +1 -1
  70. package/dist/components/googleAnalytics/index.js +9 -7
  71. package/dist/components/googleTagManager/index.d.ts +27 -21
  72. package/dist/components/googleTagManager/index.d.ts.map +1 -1
  73. package/dist/components/googleTagManager/index.js +20 -21
  74. package/dist/components/iconButton/index.d.ts +31 -15
  75. package/dist/components/iconButton/index.d.ts.map +1 -1
  76. package/dist/components/iconButton/index.js +12 -15
  77. package/dist/components/imageUpload/index.d.ts +47 -75
  78. package/dist/components/imageUpload/index.d.ts.map +1 -1
  79. package/dist/components/imageUpload/index.js +27 -75
  80. package/dist/components/input/index.d.ts +51 -44
  81. package/dist/components/input/index.d.ts.map +1 -1
  82. package/dist/components/input/index.js +24 -44
  83. package/dist/components/mapView/index.d.ts +44 -0
  84. package/dist/components/mapView/index.d.ts.map +1 -1
  85. package/dist/components/mapView/index.js +35 -0
  86. package/dist/components/maskedInput/index.d.ts +66 -51
  87. package/dist/components/maskedInput/index.d.ts.map +1 -1
  88. package/dist/components/maskedInput/index.js +28 -51
  89. package/dist/components/modal/modalContainer/index.d.ts +17 -57
  90. package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
  91. package/dist/components/modal/modalContainer/index.js +15 -57
  92. package/dist/components/modal/modalFooter/index.d.ts +17 -50
  93. package/dist/components/modal/modalFooter/index.d.ts.map +1 -1
  94. package/dist/components/modal/modalFooter/index.js +10 -50
  95. package/dist/components/modal/modalHeader/index.d.ts +13 -47
  96. package/dist/components/modal/modalHeader/index.d.ts.map +1 -1
  97. package/dist/components/modal/modalHeader/index.js +12 -47
  98. package/dist/components/multiSelect/index.d.ts +67 -62
  99. package/dist/components/multiSelect/index.d.ts.map +1 -1
  100. package/dist/components/multiSelect/index.js +28 -62
  101. package/dist/components/pagination/index.d.ts +18 -9
  102. package/dist/components/pagination/index.d.ts.map +1 -1
  103. package/dist/components/pagination/index.js +18 -9
  104. package/dist/components/phoneInput/index.d.ts +65 -30
  105. package/dist/components/phoneInput/index.d.ts.map +1 -1
  106. package/dist/components/phoneInput/index.js +36 -31
  107. package/dist/components/popover/index.d.ts +34 -114
  108. package/dist/components/popover/index.d.ts.map +1 -1
  109. package/dist/components/popover/index.js +25 -114
  110. package/dist/components/radio/radioBox/index.d.ts +17 -65
  111. package/dist/components/radio/radioBox/index.d.ts.map +1 -1
  112. package/dist/components/radio/radioBox/index.js +14 -65
  113. package/dist/components/radio/radioGroup/index.d.ts +36 -67
  114. package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
  115. package/dist/components/radio/radioGroup/index.js +25 -67
  116. package/dist/components/richText/index.d.ts +33 -47
  117. package/dist/components/richText/index.d.ts.map +1 -1
  118. package/dist/components/richText/index.js +30 -44
  119. package/dist/components/searchPlaces.d.ts +52 -50
  120. package/dist/components/searchPlaces.d.ts.map +1 -1
  121. package/dist/components/searchPlaces.js +23 -30
  122. package/dist/components/select/index.d.ts +68 -63
  123. package/dist/components/select/index.d.ts.map +1 -1
  124. package/dist/components/select/index.js +29 -63
  125. package/dist/components/slider/index.d.ts +20 -34
  126. package/dist/components/slider/index.d.ts.map +1 -1
  127. package/dist/components/slider/index.js +15 -33
  128. package/dist/components/switch/index.d.ts +42 -58
  129. package/dist/components/switch/index.d.ts.map +1 -1
  130. package/dist/components/switch/index.js +24 -58
  131. package/dist/components/tab/tabButton/index.d.ts +14 -52
  132. package/dist/components/tab/tabButton/index.d.ts.map +1 -1
  133. package/dist/components/tab/tabButton/index.js +12 -52
  134. package/dist/components/tab/tabContainer/index.d.ts +16 -58
  135. package/dist/components/tab/tabContainer/index.d.ts.map +1 -1
  136. package/dist/components/tab/tabContainer/index.js +12 -58
  137. package/dist/components/table/tableBody/index.d.ts +13 -47
  138. package/dist/components/table/tableBody/index.d.ts.map +1 -1
  139. package/dist/components/table/tableBody/index.js +12 -47
  140. package/dist/components/table/tableCaption/index.d.ts +6 -46
  141. package/dist/components/table/tableCaption/index.d.ts.map +1 -1
  142. package/dist/components/table/tableCaption/index.js +6 -46
  143. package/dist/components/table/tableContainer/index.d.ts +12 -41
  144. package/dist/components/table/tableContainer/index.d.ts.map +1 -1
  145. package/dist/components/table/tableContainer/index.js +12 -41
  146. package/dist/components/table/tableFooter/index.d.ts +5 -29
  147. package/dist/components/table/tableFooter/index.d.ts.map +1 -1
  148. package/dist/components/table/tableFooter/index.js +5 -29
  149. package/dist/components/table/tableHeader/index.d.ts +4 -25
  150. package/dist/components/table/tableHeader/index.d.ts.map +1 -1
  151. package/dist/components/table/tableHeader/index.js +4 -25
  152. package/dist/components/textarea/index.d.ts +32 -64
  153. package/dist/components/textarea/index.d.ts.map +1 -1
  154. package/dist/components/textarea/index.js +16 -64
  155. package/dist/components/tooltip/index.d.ts +27 -55
  156. package/dist/components/tooltip/index.d.ts.map +1 -1
  157. package/dist/components/tooltip/index.js +16 -55
  158. package/dist/hooks/useAutomation.d.ts +18 -26
  159. package/dist/hooks/useAutomation.d.ts.map +1 -1
  160. package/dist/hooks/useAutomation.js +18 -26
  161. package/dist/hooks/useDrawer.d.ts +19 -64
  162. package/dist/hooks/useDrawer.d.ts.map +1 -1
  163. package/dist/hooks/useForm.d.ts +12 -29
  164. package/dist/hooks/useForm.d.ts.map +1 -1
  165. package/dist/hooks/useForm.js +12 -29
  166. package/dist/hooks/useHydrated.d.ts +8 -63
  167. package/dist/hooks/useHydrated.d.ts.map +1 -1
  168. package/dist/hooks/useHydrated.js +8 -63
  169. package/dist/hooks/useModal.d.ts +19 -59
  170. package/dist/hooks/useModal.d.ts.map +1 -1
  171. package/dist/hooks/useScopedParams.d.ts +17 -69
  172. package/dist/hooks/useScopedParams.d.ts.map +1 -1
  173. package/dist/hooks/useScopedParams.js +17 -69
  174. package/dist/hooks/useScrollLock.d.ts +11 -27
  175. package/dist/hooks/useScrollLock.d.ts.map +1 -1
  176. package/dist/hooks/useScrollLock.js +11 -33
  177. package/dist/hooks/useSearchAutomation.d.ts +16 -34
  178. package/dist/hooks/useSearchAutomation.d.ts.map +1 -1
  179. package/dist/hooks/useSearchAutomation.js +16 -34
  180. package/dist/hooks/useSlider.d.ts +5 -19
  181. package/dist/hooks/useSlider.d.ts.map +1 -1
  182. package/dist/hooks/useSlider.js +5 -19
  183. package/dist/hooks/useToast.d.ts +8 -52
  184. package/dist/hooks/useToast.d.ts.map +1 -1
  185. package/dist/hooks/useToast.js +8 -52
  186. package/dist/providers/drawerProvider.d.ts +15 -81
  187. package/dist/providers/drawerProvider.d.ts.map +1 -1
  188. package/dist/providers/drawerProvider.js +15 -81
  189. package/dist/providers/formProvider.d.ts +17 -53
  190. package/dist/providers/formProvider.d.ts.map +1 -1
  191. package/dist/providers/formProvider.js +17 -53
  192. package/dist/providers/modalProvider.d.ts +16 -77
  193. package/dist/providers/modalProvider.d.ts.map +1 -1
  194. package/dist/providers/modalProvider.js +16 -77
  195. package/dist/providers/placesProvider.d.ts +16 -11
  196. package/dist/providers/placesProvider.d.ts.map +1 -1
  197. package/dist/providers/placesProvider.js +16 -11
  198. package/dist/providers/toastProvider.d.ts +10 -21
  199. package/dist/providers/toastProvider.d.ts.map +1 -1
  200. package/dist/providers/toastProvider.js +10 -21
  201. package/dist/services/toHtml.d.ts +11 -10
  202. package/dist/services/toHtml.d.ts.map +1 -1
  203. package/dist/services/toHtml.js +11 -10
  204. package/dist/services/toRichTextValue.d.ts +11 -17
  205. package/dist/services/toRichTextValue.d.ts.map +1 -1
  206. package/dist/services/toRichTextValue.js +11 -17
  207. package/package.json +1 -1
@@ -1,69 +1,104 @@
1
1
  import { countries } from "@arkyn/templates";
2
2
  type PhoneInputProps = {
3
+ /** Optional HTML id for the visible phone text input. */
3
4
  id?: string;
5
+ /** Disables all interactions. @default false */
4
6
  disabled?: boolean;
7
+ /** Prevents value changes while keeping the current value visible. @default false */
5
8
  readOnly?: boolean;
9
+ /** Validation error message (overrides the `useForm` context error for this field). */
6
10
  errorMessage?: string;
11
+ /** Optional label text displayed above the input. */
7
12
  label?: string;
13
+ /** Displays an asterisk on the label to signal a required field. */
8
14
  showAsterisk?: boolean;
15
+ /** Shows a loading state and disables interactions. @default false */
9
16
  isLoading?: boolean;
17
+ /**
18
+ * Input size.
19
+ * @default "md"
20
+ */
10
21
  size?: "md" | "lg";
22
+ /**
23
+ * Visual style variant.
24
+ * - `solid`: filled background.
25
+ * - `outline`: bordered, transparent background.
26
+ * @default "solid"
27
+ */
11
28
  variant?: "solid" | "outline";
29
+ /** Additional CSS class applied to the field wrapper. */
12
30
  className?: string;
31
+ /** Uncontrolled default phone value (numeric string with or without country code). @default "" */
13
32
  defaultValue?: string;
33
+ /** Text displayed when no country matches the search query. @default "Nenhum país encontrado" */
14
34
  notFoundCountryText?: string;
35
+ /** Field name for form submission (stored as numeric string with country code). Required. */
15
36
  name: string;
37
+ /** Placeholder for the country search input. @default "Pesquisar país" */
16
38
  searchCountryPlaceholder?: string;
39
+ /** ISO 3166-1 alpha-2 code of the initially selected country. @default "BR" */
17
40
  defaultCountryIso?: (typeof countries)[number]["iso"];
41
+ /** Callback fired on value change. Receives a numeric string prefixed with the country dial code. */
18
42
  onChange?: (e: string) => void;
43
+ /** Controlled phone value (without country code). */
19
44
  value?: string;
45
+ /** When true, skips `FieldTemplate` wrapper (label and error text). @default false */
20
46
  unShowFieldTemplate?: boolean;
47
+ /**
48
+ * Layout direction forwarded to `FieldTemplate`.
49
+ * @default "vertical"
50
+ */
21
51
  orientation?: "horizontal" | "vertical" | "horizontalReverse";
22
52
  };
23
53
  /**
24
- * Phone input with country selector, mask formatting, and hidden form value.
54
+ * PhoneInput phone number field with an integrated country selector and automatic mask formatting.
25
55
  *
26
- * The component formats the visible value according to the selected country mask,
27
- * while the hidden input stores a numeric string prefixed with the country code.
28
- * It also integrates with `useForm` to display validation errors by field name.
56
+ * The visible input is masked according to the selected country's phone format.
57
+ * The hidden `<input>` stores a numeric string prefixed with the country dial code for form submission.
58
+ * Integrates with `useForm` to display validation errors by field name.
29
59
  *
30
- * @param {PhoneInputProps} props Component properties.
31
- * @param {string} props.name Hidden input name used in form submission.
32
- * @param {string} [props.label] Optional field label.
33
- * @param {boolean} [props.showAsterisk] Displays required marker in the label.
34
- * @param {string} [props.errorMessage] Custom error message (overrides form context error).
35
- * @param {"md" | "lg"} [props.size="md"] Visual size.
36
- * @param {"solid" | "outline"} [props.variant="solid"] Visual variant.
37
- * @param {boolean} [props.disabled=false] Disables interactions.
38
- * @param {boolean} [props.readOnly=false] Prevents editing while keeping value visible.
39
- * @param {boolean} [props.isLoading=false] Applies loading state and disables interactions.
40
- * @param {string} [props.defaultValue=""] Initial phone value for uncontrolled usage.
41
- * @param {string} [props.value] Controlled phone value.
42
- * @param {(value: string) => void} [props.onChange] Callback with numeric value including country code.
43
- * @param {(typeof countries)[number]["iso"]} [props.defaultCountryIso] Reserved prop for default country ISO.
44
- * @param {string} [props.searchCountryPlaceholder="Pesquisar país"] Placeholder for country search input.
45
- * @param {string} [props.notFoundCountryText="Nenhum país encontrado"] Text shown when no country matches search.
46
- * @param {string} [props.className] Class applied to the field wrapper.
47
- * @param {string} [props.id] Optional id for the visible phone input.
48
- * @param {boolean} [props.unShowFieldTemplate=false] When `true`, skips wrapper/label/error rendering from `FieldTemplate`.
49
- * @param {"horizontal" | "vertical" | "horizontalReverse"} [props.orientation="horizontal"] Layout direction forwarded to `FieldTemplate`/`FieldWrapper`.
60
+ * @param props.name - Field name for form submission. Required.
61
+ * @param props.label - Label text displayed above the input.
62
+ * @param props.showAsterisk - Appends `*` to the label.
63
+ * @param props.errorMessage - Validation error message.
64
+ * @param props.size - Input size (`md` | `lg`). Default: "md"
65
+ * @param props.variant - Visual style variant. Default: "solid"
66
+ * @param props.disabled - Disables all interactions. Default: false
67
+ * @param props.readOnly - Prevents editing. Default: false
68
+ * @param props.isLoading - Shows loading state and disables interactions. Default: false
69
+ * @param props.defaultValue - Uncontrolled default phone value.
70
+ * @param props.value - Controlled phone value (without country code).
71
+ * @param props.onChange - Callback fired on change — receives numeric string with country code.
72
+ * @param props.defaultCountryIso - ISO code of the initially selected country. Default: "BR"
73
+ * @param props.searchCountryPlaceholder - Placeholder for country search. Default: "Pesquisar país"
74
+ * @param props.notFoundCountryText - Text shown when no country matches. Default: "Nenhum país encontrado"
75
+ * @param props.orientation - Layout direction. Default: "vertical"
76
+ * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false
50
77
  *
51
- * @returns {JSX.Element} Phone input field with country picker and hidden input for form submission.
78
+ * @returns PhoneInput JSX element wrapped in `FieldTemplate`.
52
79
  *
53
80
  * @example
54
81
  * ```tsx
55
- * <PhoneInput name="phone" label="Telefone" />
56
- * ```
82
+ * // Basic
83
+ * <PhoneInput name="phone" label="Phone" />
57
84
  *
58
- * @example
59
- * ```tsx
85
+ * // Controlled with outline variant
60
86
  * <PhoneInput
61
87
  * name="contactPhone"
88
+ * label="Contact Phone"
62
89
  * value={phone}
63
- * onChange={setPhone}
90
+ * onChange={(v) => setPhone(v)}
64
91
  * variant="outline"
65
92
  * size="lg"
66
93
  * />
94
+ *
95
+ * // Pre-selected country (US)
96
+ * <PhoneInput
97
+ * name="phone"
98
+ * label="Phone"
99
+ * defaultCountryIso="US"
100
+ * showAsterisk
101
+ * />
67
102
  * ```
68
103
  */
69
104
  declare function PhoneInput(props: PhoneInputProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/phoneInput/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,KAAK,eAAe,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,iBAAiB,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;CAC/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CAuKzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/phoneInput/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,KAAK,eAAe,GAAG;IACrB,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACtD,qGAAqG;IACrG,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;CAC/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CAuKzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -11,53 +11,58 @@ import { PhoneInputCountryOptionsContainer } from "./phoneInputCountryOptionsCon
11
11
  import { PhoneInputCountrySelector } from "./phoneInputCountrySelector";
12
12
  import { PhoneInputMask } from "./phoneInputMask";
13
13
  /**
14
- * Phone input with country selector, mask formatting, and hidden form value.
14
+ * PhoneInput phone number field with an integrated country selector and automatic mask formatting.
15
15
  *
16
- * The component formats the visible value according to the selected country mask,
17
- * while the hidden input stores a numeric string prefixed with the country code.
18
- * It also integrates with `useForm` to display validation errors by field name.
16
+ * The visible input is masked according to the selected country's phone format.
17
+ * The hidden `<input>` stores a numeric string prefixed with the country dial code for form submission.
18
+ * Integrates with `useForm` to display validation errors by field name.
19
19
  *
20
- * @param {PhoneInputProps} props Component properties.
21
- * @param {string} props.name Hidden input name used in form submission.
22
- * @param {string} [props.label] Optional field label.
23
- * @param {boolean} [props.showAsterisk] Displays required marker in the label.
24
- * @param {string} [props.errorMessage] Custom error message (overrides form context error).
25
- * @param {"md" | "lg"} [props.size="md"] Visual size.
26
- * @param {"solid" | "outline"} [props.variant="solid"] Visual variant.
27
- * @param {boolean} [props.disabled=false] Disables interactions.
28
- * @param {boolean} [props.readOnly=false] Prevents editing while keeping value visible.
29
- * @param {boolean} [props.isLoading=false] Applies loading state and disables interactions.
30
- * @param {string} [props.defaultValue=""] Initial phone value for uncontrolled usage.
31
- * @param {string} [props.value] Controlled phone value.
32
- * @param {(value: string) => void} [props.onChange] Callback with numeric value including country code.
33
- * @param {(typeof countries)[number]["iso"]} [props.defaultCountryIso] Reserved prop for default country ISO.
34
- * @param {string} [props.searchCountryPlaceholder="Pesquisar país"] Placeholder for country search input.
35
- * @param {string} [props.notFoundCountryText="Nenhum país encontrado"] Text shown when no country matches search.
36
- * @param {string} [props.className] Class applied to the field wrapper.
37
- * @param {string} [props.id] Optional id for the visible phone input.
38
- * @param {boolean} [props.unShowFieldTemplate=false] When `true`, skips wrapper/label/error rendering from `FieldTemplate`.
39
- * @param {"horizontal" | "vertical" | "horizontalReverse"} [props.orientation="horizontal"] Layout direction forwarded to `FieldTemplate`/`FieldWrapper`.
20
+ * @param props.name - Field name for form submission. Required.
21
+ * @param props.label - Label text displayed above the input.
22
+ * @param props.showAsterisk - Appends `*` to the label.
23
+ * @param props.errorMessage - Validation error message.
24
+ * @param props.size - Input size (`md` | `lg`). Default: "md"
25
+ * @param props.variant - Visual style variant. Default: "solid"
26
+ * @param props.disabled - Disables all interactions. Default: false
27
+ * @param props.readOnly - Prevents editing. Default: false
28
+ * @param props.isLoading - Shows loading state and disables interactions. Default: false
29
+ * @param props.defaultValue - Uncontrolled default phone value.
30
+ * @param props.value - Controlled phone value (without country code).
31
+ * @param props.onChange - Callback fired on change — receives numeric string with country code.
32
+ * @param props.defaultCountryIso - ISO code of the initially selected country. Default: "BR"
33
+ * @param props.searchCountryPlaceholder - Placeholder for country search. Default: "Pesquisar país"
34
+ * @param props.notFoundCountryText - Text shown when no country matches. Default: "Nenhum país encontrado"
35
+ * @param props.orientation - Layout direction. Default: "vertical"
36
+ * @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false
40
37
  *
41
- * @returns {JSX.Element} Phone input field with country picker and hidden input for form submission.
38
+ * @returns PhoneInput JSX element wrapped in `FieldTemplate`.
42
39
  *
43
40
  * @example
44
41
  * ```tsx
45
- * <PhoneInput name="phone" label="Telefone" />
46
- * ```
42
+ * // Basic
43
+ * <PhoneInput name="phone" label="Phone" />
47
44
  *
48
- * @example
49
- * ```tsx
45
+ * // Controlled with outline variant
50
46
  * <PhoneInput
51
47
  * name="contactPhone"
48
+ * label="Contact Phone"
52
49
  * value={phone}
53
- * onChange={setPhone}
50
+ * onChange={(v) => setPhone(v)}
54
51
  * variant="outline"
55
52
  * size="lg"
56
53
  * />
54
+ *
55
+ * // Pre-selected country (US)
56
+ * <PhoneInput
57
+ * name="phone"
58
+ * label="Phone"
59
+ * defaultCountryIso="US"
60
+ * showAsterisk
61
+ * />
57
62
  * ```
58
63
  */
59
64
  function PhoneInput(props) {
60
- 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 = "horizontal", } = 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 = "vertical", } = props;
61
66
  const brasilCountry = countries.find((country) => country.iso === "BR");
62
67
  const defaultData = defaultValue ? formatToPhone(defaultValue) : "";
63
68
  const defaultCountry = defaultValue
@@ -2,144 +2,64 @@ import { ReactNode } from "react";
2
2
  import "./styles.css";
3
3
  type OrientationProps = "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "top" | "left" | "bottom" | "right";
4
4
  type PopoverProps = {
5
+ /** Content rendered inside the floating panel. Required. */
5
6
  children: ReactNode;
7
+ /** Trigger element — clicking it opens the popover. Required. */
6
8
  button: ReactNode;
9
+ /** When true, clicking the popover content also closes it. @default false */
7
10
  closeOnClick?: boolean;
11
+ /**
12
+ * Position of the floating panel relative to the trigger.
13
+ * Options: `"bottomLeft"` | `"bottomRight"` | `"topLeft"` | `"topRight"` | `"top"` | `"bottom"` | `"left"` | `"right"`.
14
+ * @default "bottomLeft"
15
+ */
8
16
  orientation?: OrientationProps;
17
+ /** Additional CSS class applied to the popover root element. */
9
18
  className?: string;
10
19
  };
11
20
  /**
12
- * Popover component - used for displaying contextual content in a floating container that appears relative to a trigger button
21
+ * Popover floating panel that appears relative to a trigger element.
13
22
  *
14
- * @param props - Popover component properties
15
- * @param props.children - Required content to display inside the popover when opened
16
- * @param props.button - Required trigger element that opens the popover when clicked
17
- * @param props.closeOnClick - Whether the popover should close when clicking on its content. Default: undefined (remains open)
18
- * @param props.orientation - Position where the popover appears relative to the trigger button. Default: "bottomLeft"
19
- * @param props.className - Additional CSS classes for styling the popover container
23
+ * Clicking outside the popover (or clicking the content when `closeOnClick` is set)
24
+ * dismisses it. Locks body scroll while open.
20
25
  *
21
- * @returns Popover JSX element with trigger button, animated content, and overlay for outside click handling
26
+ * @param props.children - Content to display inside the panel. Required.
27
+ * @param props.button - Trigger element that opens the popover. Required.
28
+ * @param props.closeOnClick - Clicking the content also closes the popover. Default: false
29
+ * @param props.orientation - Panel position relative to the trigger. Default: "bottomLeft"
30
+ * @param props.className - Additional CSS class for the root element.
31
+ *
32
+ * @returns Popover JSX element with trigger, animated panel, and outside-click overlay.
22
33
  *
23
34
  * @example
24
35
  * ```tsx
25
- * // Basic popover with default orientation
26
- * <Popover
27
- * button={<button>Click me</button>}
28
- * >
29
- * <div>Popover content here</div>
30
- * </Popover>
31
- *
32
- * // Popover with custom orientation
33
- * <Popover
34
- * button={<IconButton icon="menu" />}
35
- * orientation="topRight"
36
- * >
37
- * <nav>
38
- * <a href="/profile">Profile</a>
39
- * <a href="/settings">Settings</a>
40
- * <a href="/logout">Logout</a>
41
- * </nav>
42
- * </Popover>
43
- *
44
- * // Popover that closes when content is clicked
45
- * <Popover
46
- * button={<Button>Select Option</Button>}
47
- * closeOnClick
48
- * orientation="bottom"
49
- * >
36
+ * // Basic dropdown menu
37
+ * <Popover button={<Button>Options</Button>} closeOnClick>
50
38
  * <ul>
51
- * <li onClick={() => selectOption('option1')}>Option 1</li>
52
- * <li onClick={() => selectOption('option2')}>Option 2</li>
53
- * <li onClick={() => selectOption('option3')}>Option 3</li>
39
+ * <li onClick={handleEdit}>Edit</li>
40
+ * <li onClick={handleDelete}>Delete</li>
54
41
  * </ul>
55
42
  * </Popover>
56
43
  *
57
- * // Popover with custom styling and left orientation
44
+ * // User profile menu (bottom-right)
58
45
  * <Popover
59
- * button={<Button variant="outline">Info</Button>}
60
- * orientation="left"
61
- * className="custom-popover"
62
- * >
63
- * <div className="info-panel">
64
- * <h3>Additional Information</h3>
65
- * <p>This is some helpful information that appears in a popover.</p>
66
- * <Button size="sm">Learn More</Button>
67
- * </div>
68
- * </Popover>
69
- *
70
- * // Popover with form content and top-right positioning
71
- * <Popover
72
- * button={<Badge>Filter</Badge>}
73
- * orientation="topRight"
74
- * >
75
- * <form className="filter-form">
76
- * <Input name="search" placeholder="Search..." />
77
- * <Select name="category" options={categories} />
78
- * <Button type="submit">Apply Filters</Button>
79
- * </form>
80
- * </Popover>
81
- *
82
- * // Popover with complex content and bottom-right positioning
83
- * <Popover
84
- * button={<Avatar src="/user.jpg" />}
46
+ * button={<IconButton icon={User} aria-label="Account" />}
85
47
  * orientation="bottomRight"
86
48
  * closeOnClick
87
49
  * >
88
- * <div className="user-menu">
89
- * <div className="user-info">
90
- * <img src="/user.jpg" alt="User" />
91
- * <div>
92
- * <h4>John Doe</h4>
93
- * <p>john@example.com</p>
94
- * </div>
95
- * </div>
96
- * <Divider />
97
- * <MenuItem icon="user">Profile</MenuItem>
98
- * <MenuItem icon="settings">Settings</MenuItem>
99
- * <MenuItem icon="logout">Sign Out</MenuItem>
100
- * </div>
101
- * </Popover>
102
- *
103
- * // Popover for context menu with right orientation
104
- * <Popover
105
- * button={<Button variant="ghost" size="sm">⋮</Button>}
106
- * orientation="right"
107
- * closeOnClick
108
- * >
109
- * <div className="context-menu">
110
- * <button onClick={() => editItem()}>Edit</button>
111
- * <button onClick={() => duplicateItem()}>Duplicate</button>
112
- * <button onClick={() => deleteItem()}>Delete</button>
113
- * </div>
50
+ * <nav>
51
+ * <a href="/profile">Profile</a>
52
+ * <a href="/settings">Settings</a>
53
+ * <a href="/logout">Sign out</a>
54
+ * </nav>
114
55
  * </Popover>
115
56
  *
116
- * // Popover with notification content and top positioning
117
- * <Popover
118
- * button={<Badge count={3}>🔔</Badge>}
119
- * orientation="top"
120
- * >
121
- * <div className="notifications">
122
- * <h3>Recent Notifications</h3>
123
- * <div className="notification-item">New message received</div>
124
- * <div className="notification-item">Task completed</div>
125
- * <div className="notification-item">Meeting reminder</div>
126
- * <Button variant="ghost" size="sm">View All</Button>
127
- * </div>
57
+ * // Filter panel (top-left)
58
+ * <Popover button={<Badge>Filters</Badge>} orientation="topLeft">
59
+ * <Input name="search" placeholder="Search..." />
60
+ * <Select name="status" options={statusOptions} />
128
61
  * </Popover>
129
62
  * ```
130
- *
131
- * @remarks
132
- * This component provides:
133
- * - 8 different orientation options for flexible positioning (bottomLeft, bottomRight, topLeft, topRight, top, left, bottom, right)
134
- * - Smooth fade animation using Framer Motion for opening and closing
135
- * - Automatic scroll lock when popover is open to prevent background scrolling
136
- * - Click-outside-to-close functionality via overlay
137
- * - Optional click-on-content-to-close behavior
138
- * - Full accessibility support for keyboard navigation and screen readers
139
- *
140
- * The popover automatically handles positioning, animations, and user interactions.
141
- * It uses CSS classes for styling and can be customized through the className prop.
142
- * The component is ideal for dropdowns, context menus, tooltips, and any contextual UI elements.
143
63
  */
144
64
  declare function Popover(props: PopoverProps): import("react/jsx-runtime").JSX.Element;
145
65
  export { Popover };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GACjB,YAAY,GACZ,aAAa,GACb,SAAS,GACT,UAAU,GACV,KAAK,GACL,MAAM,GACN,QAAQ,GACR,OAAO,CAAC;AAEZ,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoIG;AAEH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,2CAwCnC;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GACjB,YAAY,GACZ,aAAa,GACb,SAAS,GACT,UAAU,GACV,KAAK,GACL,MAAM,GACN,QAAQ,GACR,OAAO,CAAC;AAEZ,KAAK,YAAY,GAAG;IAClB,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,iEAAiE;IACjE,MAAM,EAAE,SAAS,CAAC;IAClB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,2CAwCnC;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -4,137 +4,48 @@ import { useState } from "react";
4
4
  import { useScrollLock } from "../../hooks/useScrollLock";
5
5
  import "./styles.css";
6
6
  /**
7
- * Popover component - used for displaying contextual content in a floating container that appears relative to a trigger button
7
+ * Popover floating panel that appears relative to a trigger element.
8
8
  *
9
- * @param props - Popover component properties
10
- * @param props.children - Required content to display inside the popover when opened
11
- * @param props.button - Required trigger element that opens the popover when clicked
12
- * @param props.closeOnClick - Whether the popover should close when clicking on its content. Default: undefined (remains open)
13
- * @param props.orientation - Position where the popover appears relative to the trigger button. Default: "bottomLeft"
14
- * @param props.className - Additional CSS classes for styling the popover container
9
+ * Clicking outside the popover (or clicking the content when `closeOnClick` is set)
10
+ * dismisses it. Locks body scroll while open.
15
11
  *
16
- * @returns Popover JSX element with trigger button, animated content, and overlay for outside click handling
12
+ * @param props.children - Content to display inside the panel. Required.
13
+ * @param props.button - Trigger element that opens the popover. Required.
14
+ * @param props.closeOnClick - Clicking the content also closes the popover. Default: false
15
+ * @param props.orientation - Panel position relative to the trigger. Default: "bottomLeft"
16
+ * @param props.className - Additional CSS class for the root element.
17
+ *
18
+ * @returns Popover JSX element with trigger, animated panel, and outside-click overlay.
17
19
  *
18
20
  * @example
19
21
  * ```tsx
20
- * // Basic popover with default orientation
21
- * <Popover
22
- * button={<button>Click me</button>}
23
- * >
24
- * <div>Popover content here</div>
25
- * </Popover>
26
- *
27
- * // Popover with custom orientation
28
- * <Popover
29
- * button={<IconButton icon="menu" />}
30
- * orientation="topRight"
31
- * >
32
- * <nav>
33
- * <a href="/profile">Profile</a>
34
- * <a href="/settings">Settings</a>
35
- * <a href="/logout">Logout</a>
36
- * </nav>
37
- * </Popover>
38
- *
39
- * // Popover that closes when content is clicked
40
- * <Popover
41
- * button={<Button>Select Option</Button>}
42
- * closeOnClick
43
- * orientation="bottom"
44
- * >
22
+ * // Basic dropdown menu
23
+ * <Popover button={<Button>Options</Button>} closeOnClick>
45
24
  * <ul>
46
- * <li onClick={() => selectOption('option1')}>Option 1</li>
47
- * <li onClick={() => selectOption('option2')}>Option 2</li>
48
- * <li onClick={() => selectOption('option3')}>Option 3</li>
25
+ * <li onClick={handleEdit}>Edit</li>
26
+ * <li onClick={handleDelete}>Delete</li>
49
27
  * </ul>
50
28
  * </Popover>
51
29
  *
52
- * // Popover with custom styling and left orientation
30
+ * // User profile menu (bottom-right)
53
31
  * <Popover
54
- * button={<Button variant="outline">Info</Button>}
55
- * orientation="left"
56
- * className="custom-popover"
57
- * >
58
- * <div className="info-panel">
59
- * <h3>Additional Information</h3>
60
- * <p>This is some helpful information that appears in a popover.</p>
61
- * <Button size="sm">Learn More</Button>
62
- * </div>
63
- * </Popover>
64
- *
65
- * // Popover with form content and top-right positioning
66
- * <Popover
67
- * button={<Badge>Filter</Badge>}
68
- * orientation="topRight"
69
- * >
70
- * <form className="filter-form">
71
- * <Input name="search" placeholder="Search..." />
72
- * <Select name="category" options={categories} />
73
- * <Button type="submit">Apply Filters</Button>
74
- * </form>
75
- * </Popover>
76
- *
77
- * // Popover with complex content and bottom-right positioning
78
- * <Popover
79
- * button={<Avatar src="/user.jpg" />}
32
+ * button={<IconButton icon={User} aria-label="Account" />}
80
33
  * orientation="bottomRight"
81
34
  * closeOnClick
82
35
  * >
83
- * <div className="user-menu">
84
- * <div className="user-info">
85
- * <img src="/user.jpg" alt="User" />
86
- * <div>
87
- * <h4>John Doe</h4>
88
- * <p>john@example.com</p>
89
- * </div>
90
- * </div>
91
- * <Divider />
92
- * <MenuItem icon="user">Profile</MenuItem>
93
- * <MenuItem icon="settings">Settings</MenuItem>
94
- * <MenuItem icon="logout">Sign Out</MenuItem>
95
- * </div>
96
- * </Popover>
97
- *
98
- * // Popover for context menu with right orientation
99
- * <Popover
100
- * button={<Button variant="ghost" size="sm">⋮</Button>}
101
- * orientation="right"
102
- * closeOnClick
103
- * >
104
- * <div className="context-menu">
105
- * <button onClick={() => editItem()}>Edit</button>
106
- * <button onClick={() => duplicateItem()}>Duplicate</button>
107
- * <button onClick={() => deleteItem()}>Delete</button>
108
- * </div>
36
+ * <nav>
37
+ * <a href="/profile">Profile</a>
38
+ * <a href="/settings">Settings</a>
39
+ * <a href="/logout">Sign out</a>
40
+ * </nav>
109
41
  * </Popover>
110
42
  *
111
- * // Popover with notification content and top positioning
112
- * <Popover
113
- * button={<Badge count={3}>🔔</Badge>}
114
- * orientation="top"
115
- * >
116
- * <div className="notifications">
117
- * <h3>Recent Notifications</h3>
118
- * <div className="notification-item">New message received</div>
119
- * <div className="notification-item">Task completed</div>
120
- * <div className="notification-item">Meeting reminder</div>
121
- * <Button variant="ghost" size="sm">View All</Button>
122
- * </div>
43
+ * // Filter panel (top-left)
44
+ * <Popover button={<Badge>Filters</Badge>} orientation="topLeft">
45
+ * <Input name="search" placeholder="Search..." />
46
+ * <Select name="status" options={statusOptions} />
123
47
  * </Popover>
124
48
  * ```
125
- *
126
- * @remarks
127
- * This component provides:
128
- * - 8 different orientation options for flexible positioning (bottomLeft, bottomRight, topLeft, topRight, top, left, bottom, right)
129
- * - Smooth fade animation using Framer Motion for opening and closing
130
- * - Automatic scroll lock when popover is open to prevent background scrolling
131
- * - Click-outside-to-close functionality via overlay
132
- * - Optional click-on-content-to-close behavior
133
- * - Full accessibility support for keyboard navigation and screen readers
134
- *
135
- * The popover automatically handles positioning, animations, and user interactions.
136
- * It uses CSS classes for styling and can be customized through the className prop.
137
- * The component is ideal for dropdowns, context menus, tooltips, and any contextual UI elements.
138
49
  */
139
50
  function Popover(props) {
140
51
  const { children, button, closeOnClick, className: baseClassName = "", orientation = "bottomLeft", } = props;