@arkyn/components 3.0.1-beta.142 → 3.0.1-beta.144

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.css +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 +35 -30
  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
@@ -3,100 +3,115 @@ import { LucideIcon } from "lucide-react";
3
3
  import { InputHTMLAttributes } from "react";
4
4
  import "./style.css";
5
5
  type MaskedInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix" | "name" | "type"> & {
6
+ /** Field name for form submission. Required. */
6
7
  name: string;
8
+ /**
9
+ * Mask pattern string. Use the replacement character as an editable placeholder.
10
+ * Example: `"(__) _____-____"` for a Brazilian mobile phone number.
11
+ * Required.
12
+ */
7
13
  mask: string;
14
+ /**
15
+ * Character or replacement map that marks editable positions in the mask.
16
+ * - String: `"_"` — every `_` in the mask becomes editable.
17
+ * - Object: `{ _: /\d/ }` — only accepts digits in those positions.
18
+ * Required.
19
+ */
8
20
  replacement: string | Replacement;
21
+ /**
22
+ * When true, strips mask characters from the underlying value,
23
+ * keeping only the user-typed characters.
24
+ */
9
25
  separate?: boolean;
26
+ /** When true, shows the full mask pattern in the input before the user types. */
10
27
  showMask?: boolean;
28
+ /** Optional label text displayed above the input. */
11
29
  label?: string;
30
+ /** Validation error message displayed below the input. */
12
31
  errorMessage?: string;
32
+ /** Shows a spinner and disables the input during async operations. @default false */
13
33
  isLoading?: boolean;
34
+ /**
35
+ * Input size.
36
+ * @default "md"
37
+ */
14
38
  size?: "md" | "lg";
39
+ /**
40
+ * Visual style variant.
41
+ * - `solid`: filled background.
42
+ * - `outline`: bordered, transparent background.
43
+ * - `underline`: bottom border only.
44
+ * @default "solid"
45
+ */
15
46
  variant?: "solid" | "outline" | "underline";
47
+ /** Text or icon rendered at the far left, outside the input area. */
16
48
  prefix?: string | LucideIcon;
49
+ /** Text or icon rendered at the far right, outside the input area. */
17
50
  suffix?: string | LucideIcon;
51
+ /** Displays an asterisk on the label to signal a required field. */
18
52
  showAsterisk?: boolean;
53
+ /** Lucide icon rendered inside the input on the left. */
19
54
  leftIcon?: LucideIcon;
55
+ /** Lucide icon rendered inside the input on the right. */
20
56
  rightIcon?: LucideIcon;
57
+ /** Controlled value. */
21
58
  value?: string;
59
+ /** Uncontrolled default value. */
22
60
  defaultValue?: string;
23
61
  };
24
62
  /**
25
- * MaskedInput component - used for text input fields with input masking support, labels, validation, icons, and loading states
63
+ * MaskedInput text input with a configurable mask for structured values (phones, CPF, credit cards, etc.).
26
64
  *
27
- * @param props - MaskedInput component properties
28
- * @param props.name - Required field name for form handling
29
- * @param props.mask - Input mask pattern (e.g., "___.___.___-__" for CPF)
30
- * @param props.replacement - Character or replacement configuration for mask positions
31
- * @param props.separate - Whether to separate mask characters from input value. Default: undefined
32
- * @param props.showMask - Whether to show the mask placeholder. Default: undefined
33
- * @param props.label - Optional label text to display above the input
34
- * @param props.errorMessage - Error message to display below the input
35
- * @param props.isLoading - Controls loading state with spinner. Default: false
36
- * @param props.size - Input size. Default: "md"
37
- * @param props.variant - Visual variant of the input. Default: "solid"
38
- * @param props.prefix - Text or icon to display at the beginning of the input
39
- * @param props.suffix - Text or icon to display at the end of the input
40
- * @param props.showAsterisk - Whether to show asterisk on label for required fields
41
- * @param props.leftIcon - Optional icon to display on the left side
42
- * @param props.rightIcon - Optional icon to display on the right side
65
+ * Built on `@react-input/mask`. Integrates with `useForm` to display validation errors by field name.
43
66
  *
44
- * **...Other valid HTML properties for input element (except 'type' which is controlled by the mask)**
67
+ * @param props.name - Field name for form submission. Required.
68
+ * @param props.mask - Mask pattern string. Required.
69
+ * @param props.replacement - Character or map that marks editable positions. Required.
70
+ * @param props.separate - Strips mask chars from the value, keeping only typed characters.
71
+ * @param props.showMask - Shows the full mask pattern before the user types.
72
+ * @param props.label - Label text displayed above the input.
73
+ * @param props.errorMessage - Validation error message.
74
+ * @param props.isLoading - Shows a spinner and disables the input. Default: false
75
+ * @param props.size - Input size (`md` | `lg`). Default: "md"
76
+ * @param props.variant - Visual style variant. Default: "solid"
77
+ * @param props.prefix - Text or icon at the far left.
78
+ * @param props.suffix - Text or icon at the far right.
79
+ * @param props.leftIcon - Lucide icon inside the input on the left.
80
+ * @param props.rightIcon - Lucide icon inside the input on the right.
81
+ * @param props.showAsterisk - Appends `*` to the label.
45
82
  *
46
- * @returns MaskedInput JSX element wrapped in FieldGroup with optional label and error
83
+ * **...Other valid HTML properties for `<input>` (except `type`)**
84
+ *
85
+ * @returns MaskedInput JSX element wrapped in `FieldWrapper`.
47
86
  *
48
87
  * @example
49
88
  * ```tsx
50
- * // Basic masked input for phone number
89
+ * // Brazilian mobile phone
51
90
  * <MaskedInput
52
91
  * name="phone"
53
92
  * mask="(__) _____-____"
54
93
  * replacement={{ _: /\d/ }}
55
- * placeholder="(00) 00000-0000"
94
+ * label="Phone"
56
95
  * />
57
96
  *
58
- * // CPF input with label and validation
97
+ * // CPF with mask visible and validation
59
98
  * <MaskedInput
60
99
  * name="cpf"
61
100
  * label="CPF"
62
101
  * mask="___.___.___-__"
63
102
  * replacement="_"
64
- * showAsterisk
65
- * errorMessage="Please enter a valid CPF"
66
103
  * showMask
104
+ * showAsterisk
105
+ * errorMessage="Invalid CPF"
67
106
  * />
68
107
  *
69
- * // Credit card input with icons and loading state
108
+ * // Credit card
70
109
  * <MaskedInput
71
- * name="creditCard"
110
+ * name="card"
72
111
  * label="Credit Card"
73
112
  * mask="____ ____ ____ ____"
74
113
  * replacement={{ _: /\d/ }}
75
- * leftIcon={CreditCardIcon}
76
- * rightIcon={ShieldIcon}
77
- * isLoading
78
- * />
79
- *
80
- * // Date input with prefix/suffix
81
- * <MaskedInput
82
- * name="birthDate"
83
- * label="Birth Date"
84
- * mask="__/__/____"
85
- * replacement="_"
86
- * prefix="📅"
87
- * variant="outline"
88
- * separate
89
- * />
90
- *
91
- * // Large masked input with underline variant
92
- * <MaskedInput
93
- * name="zipCode"
94
- * label="ZIP Code"
95
- * mask="_____-___"
96
- * replacement={{ _: /\d/ }}
97
- * size="lg"
98
- * variant="underline"
99
- * placeholder="00000-000"
114
+ * leftIcon={CreditCard}
100
115
  * />
101
116
  * ```
102
117
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/maskedInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAW,UAAU,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAEL,mBAAmB,EAKpB,MAAM,OAAO,CAAC;AASf,OAAO,aAAa,CAAC;AAErB,KAAK,gBAAgB,GAAG,IAAI,CAC1B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,QAAQ,GAAG,MAA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, ...props });
13
13
  });
14
14
  /**
15
- * MaskedInput component - used for text input fields with input masking support, labels, validation, icons, and loading states
15
+ * MaskedInput text input with a configurable mask for structured values (phones, CPF, credit cards, etc.).
16
16
  *
17
- * @param props - MaskedInput component properties
18
- * @param props.name - Required field name for form handling
19
- * @param props.mask - Input mask pattern (e.g., "___.___.___-__" for CPF)
20
- * @param props.replacement - Character or replacement configuration for mask positions
21
- * @param props.separate - Whether to separate mask characters from input value. Default: undefined
22
- * @param props.showMask - Whether to show the mask placeholder. Default: undefined
23
- * @param props.label - Optional label text to display above the input
24
- * @param props.errorMessage - Error message to display below the input
25
- * @param props.isLoading - Controls loading state with spinner. Default: false
26
- * @param props.size - Input size. Default: "md"
27
- * @param props.variant - Visual variant of the input. Default: "solid"
28
- * @param props.prefix - Text or icon to display at the beginning of the input
29
- * @param props.suffix - Text or icon to display at the end of the input
30
- * @param props.showAsterisk - Whether to show asterisk on label for required fields
31
- * @param props.leftIcon - Optional icon to display on the left side
32
- * @param props.rightIcon - Optional icon to display on the right side
17
+ * Built on `@react-input/mask`. Integrates with `useForm` to display validation errors by field name.
33
18
  *
34
- * **...Other valid HTML properties for input element (except 'type' which is controlled by the mask)**
19
+ * @param props.name - Field name for form submission. Required.
20
+ * @param props.mask - Mask pattern string. Required.
21
+ * @param props.replacement - Character or map that marks editable positions. Required.
22
+ * @param props.separate - Strips mask chars from the value, keeping only typed characters.
23
+ * @param props.showMask - Shows the full mask pattern before the user types.
24
+ * @param props.label - Label text displayed above the input.
25
+ * @param props.errorMessage - Validation error message.
26
+ * @param props.isLoading - Shows a spinner and disables the input. Default: false
27
+ * @param props.size - Input size (`md` | `lg`). Default: "md"
28
+ * @param props.variant - Visual style variant. Default: "solid"
29
+ * @param props.prefix - Text or icon at the far left.
30
+ * @param props.suffix - Text or icon at the far right.
31
+ * @param props.leftIcon - Lucide icon inside the input on the left.
32
+ * @param props.rightIcon - Lucide icon inside the input on the right.
33
+ * @param props.showAsterisk - Appends `*` to the label.
35
34
  *
36
- * @returns MaskedInput JSX element wrapped in FieldGroup with optional label and error
35
+ * **...Other valid HTML properties for `<input>` (except `type`)**
36
+ *
37
+ * @returns MaskedInput JSX element wrapped in `FieldWrapper`.
37
38
  *
38
39
  * @example
39
40
  * ```tsx
40
- * // Basic masked input for phone number
41
+ * // Brazilian mobile phone
41
42
  * <MaskedInput
42
43
  * name="phone"
43
44
  * mask="(__) _____-____"
44
45
  * replacement={{ _: /\d/ }}
45
- * placeholder="(00) 00000-0000"
46
+ * label="Phone"
46
47
  * />
47
48
  *
48
- * // CPF input with label and validation
49
+ * // CPF with mask visible and validation
49
50
  * <MaskedInput
50
51
  * name="cpf"
51
52
  * label="CPF"
52
53
  * mask="___.___.___-__"
53
54
  * replacement="_"
54
- * showAsterisk
55
- * errorMessage="Please enter a valid CPF"
56
55
  * showMask
56
+ * showAsterisk
57
+ * errorMessage="Invalid CPF"
57
58
  * />
58
59
  *
59
- * // Credit card input with icons and loading state
60
+ * // Credit card
60
61
  * <MaskedInput
61
- * name="creditCard"
62
+ * name="card"
62
63
  * label="Credit Card"
63
64
  * mask="____ ____ ____ ____"
64
65
  * replacement={{ _: /\d/ }}
65
- * leftIcon={CreditCardIcon}
66
- * rightIcon={ShieldIcon}
67
- * isLoading
68
- * />
69
- *
70
- * // Date input with prefix/suffix
71
- * <MaskedInput
72
- * name="birthDate"
73
- * label="Birth Date"
74
- * mask="__/__/____"
75
- * replacement="_"
76
- * prefix="📅"
77
- * variant="outline"
78
- * separate
79
- * />
80
- *
81
- * // Large masked input with underline variant
82
- * <MaskedInput
83
- * name="zipCode"
84
- * label="ZIP Code"
85
- * mask="_____-___"
86
- * replacement={{ _: /\d/ }}
87
- * size="lg"
88
- * variant="underline"
89
- * placeholder="00000-000"
66
+ * leftIcon={CreditCard}
90
67
  * />
91
68
  * ```
92
69
  */
@@ -1,76 +1,36 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type ModalContainerProps = HTMLAttributes<HTMLElement> & {
4
+ /** Controls whether the modal is visible. */
4
5
  isVisible: boolean;
6
+ /** Callback invoked when the backdrop overlay is clicked. */
5
7
  makeInvisible: () => void;
6
8
  };
7
9
  /**
8
- * ModalContainer component - animated overlay modal for dialogs and content
10
+ * ModalContainer animated centered modal rendered over a backdrop overlay.
9
11
  *
10
- * @param props - ModalContainer component properties
11
- * @param props.isVisible - Controls modal visibility state
12
- * @param props.makeInvisible - Callback function to hide the modal
12
+ * Locks body scroll while open. Closes when the overlay is clicked.
13
+ * Provides context consumed by `ModalHeader` (close button).
13
14
  *
14
- * **...Other valid HTML properties for aside element**
15
+ * @param props.isVisible - Whether the modal is open. Required.
16
+ * @param props.makeInvisible - Called when the overlay is clicked. Required.
15
17
  *
16
- * @returns ModalContainer JSX element
18
+ * **...Other valid HTML `<aside>` properties**
19
+ *
20
+ * @returns ModalContainer JSX element.
17
21
  *
18
22
  * @example
19
23
  * ```tsx
20
- * // Basic modal
21
24
  * const [isOpen, setIsOpen] = useState(false);
22
- * <ModalContainer
23
- * isVisible={isOpen}
24
- * makeInvisible={() => setIsOpen(false)}
25
- * >
26
- * <p>Modal content</p>
27
- * </ModalContainer>
28
25
  *
29
- * // Modal with custom styling
30
- * <ModalContainer
31
- * isVisible={isOpen}
32
- * makeInvisible={() => setIsOpen(false)}
33
- * className="custom-modal"
34
- * >
35
- * <div className="modal-content">
36
- * <h2>Confirmation</h2>
37
- * <p>Are you sure you want to proceed?</p>
38
- * </div>
26
+ * <ModalContainer isVisible={isOpen} makeInvisible={() => setIsOpen(false)}>
27
+ * <ModalHeader><h2>Confirm deletion</h2></ModalHeader>
28
+ * <main><p>This action cannot be undone.</p></main>
29
+ * <ModalFooter>
30
+ * <Button onClick={() => setIsOpen(false)}>Cancel</Button>
31
+ * <Button scheme="danger" onClick={handleDelete}>Delete</Button>
32
+ * </ModalFooter>
39
33
  * </ModalContainer>
40
- *
41
- * // Complete modal example
42
- * function ModalExample() {
43
- * const [isModalOpen, setIsModalOpen] = useState(false);
44
- *
45
- * return (
46
- * <>
47
- * <button onClick={() => setIsModalOpen(true)}>
48
- * Open Modal
49
- * </button>
50
- *
51
- * <ModalContainer
52
- * isVisible={isModalOpen}
53
- * makeInvisible={() => setIsModalOpen(false)}
54
- * >
55
- * <div className="modal-dialog">
56
- * <header>
57
- * <h2>Modal Title</h2>
58
- * </header>
59
- *
60
- * <main>
61
- * <p>This is the modal content.</p>
62
- * </main>
63
- *
64
- * <footer>
65
- * <button onClick={() => setIsModalOpen(false)}>
66
- * Close
67
- * </button>
68
- * </footer>
69
- * </div>
70
- * </ModalContainer>
71
- * </>
72
- * );
73
- * }
74
34
  * ```
75
35
  */
76
36
  declare function ModalContainer(args: ModalContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/modalContainer/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,cAAc,CAAC;AAEtB,KAAK,mBAAmB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,iBAAS,cAAc,CAAC,IAAI,EAAE,mBAAmB,2CA0ChD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/modalContainer/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,cAAc,CAAC;AAEtB,KAAK,mBAAmB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACvD,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,iBAAS,cAAc,CAAC,IAAI,EAAE,mBAAmB,2CA0ChD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -4,72 +4,30 @@ import { useScrollLock } from "../../../hooks/useScrollLock";
4
4
  import { ModalProvider } from "../modalContext";
5
5
  import "./styles.css";
6
6
  /**
7
- * ModalContainer component - animated overlay modal for dialogs and content
7
+ * ModalContainer animated centered modal rendered over a backdrop overlay.
8
8
  *
9
- * @param props - ModalContainer component properties
10
- * @param props.isVisible - Controls modal visibility state
11
- * @param props.makeInvisible - Callback function to hide the modal
9
+ * Locks body scroll while open. Closes when the overlay is clicked.
10
+ * Provides context consumed by `ModalHeader` (close button).
12
11
  *
13
- * **...Other valid HTML properties for aside element**
12
+ * @param props.isVisible - Whether the modal is open. Required.
13
+ * @param props.makeInvisible - Called when the overlay is clicked. Required.
14
14
  *
15
- * @returns ModalContainer JSX element
15
+ * **...Other valid HTML `<aside>` properties**
16
+ *
17
+ * @returns ModalContainer JSX element.
16
18
  *
17
19
  * @example
18
20
  * ```tsx
19
- * // Basic modal
20
21
  * const [isOpen, setIsOpen] = useState(false);
21
- * <ModalContainer
22
- * isVisible={isOpen}
23
- * makeInvisible={() => setIsOpen(false)}
24
- * >
25
- * <p>Modal content</p>
26
- * </ModalContainer>
27
22
  *
28
- * // Modal with custom styling
29
- * <ModalContainer
30
- * isVisible={isOpen}
31
- * makeInvisible={() => setIsOpen(false)}
32
- * className="custom-modal"
33
- * >
34
- * <div className="modal-content">
35
- * <h2>Confirmation</h2>
36
- * <p>Are you sure you want to proceed?</p>
37
- * </div>
23
+ * <ModalContainer isVisible={isOpen} makeInvisible={() => setIsOpen(false)}>
24
+ * <ModalHeader><h2>Confirm deletion</h2></ModalHeader>
25
+ * <main><p>This action cannot be undone.</p></main>
26
+ * <ModalFooter>
27
+ * <Button onClick={() => setIsOpen(false)}>Cancel</Button>
28
+ * <Button scheme="danger" onClick={handleDelete}>Delete</Button>
29
+ * </ModalFooter>
38
30
  * </ModalContainer>
39
- *
40
- * // Complete modal example
41
- * function ModalExample() {
42
- * const [isModalOpen, setIsModalOpen] = useState(false);
43
- *
44
- * return (
45
- * <>
46
- * <button onClick={() => setIsModalOpen(true)}>
47
- * Open Modal
48
- * </button>
49
- *
50
- * <ModalContainer
51
- * isVisible={isModalOpen}
52
- * makeInvisible={() => setIsModalOpen(false)}
53
- * >
54
- * <div className="modal-dialog">
55
- * <header>
56
- * <h2>Modal Title</h2>
57
- * </header>
58
- *
59
- * <main>
60
- * <p>This is the modal content.</p>
61
- * </main>
62
- *
63
- * <footer>
64
- * <button onClick={() => setIsModalOpen(false)}>
65
- * Close
66
- * </button>
67
- * </footer>
68
- * </div>
69
- * </ModalContainer>
70
- * </>
71
- * );
72
- * }
73
31
  * ```
74
32
  */
75
33
  function ModalContainer(args) {
@@ -1,70 +1,37 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type ModalFooterProps = HTMLAttributes<HTMLElement> & {
4
+ /**
5
+ * Horizontal alignment of footer content.
6
+ * - `left` / `center` / `right`: flex-start, center, flex-end.
7
+ * - `between`: space-between.
8
+ * - `around`: space-around.
9
+ * @default "right"
10
+ */
4
11
  alignment?: "left" | "center" | "right" | "between" | "around";
5
12
  };
6
13
  /**
7
- * ModalFooter component - footer section for modals with flexible alignment options
14
+ * ModalFooter action bar at the bottom of a modal dialog.
8
15
  *
9
- * @param props - ModalFooter component properties
10
- * @param props.alignment - Content alignment within the footer. Default: "right"
16
+ * @param props.alignment - Horizontal alignment of children. Default: `"right"`
11
17
  *
12
- * **...Other valid HTML properties for footer element**
18
+ * **...Other valid HTML `<footer>` properties**
13
19
  *
14
- * @returns ModalFooter JSX element
20
+ * @returns ModalFooter JSX element.
15
21
  *
16
22
  * @example
17
23
  * ```tsx
18
- * // Basic footer with right alignment (default)
24
+ * // Confirm / cancel pattern (right-aligned by default)
19
25
  * <ModalFooter>
20
- * <button>Cancel</button>
21
- * <button>Save</button>
26
+ * <Button variant="ghost" onClick={onClose}>Cancel</Button>
27
+ * <Button scheme="danger" onClick={onConfirm}>Delete</Button>
22
28
  * </ModalFooter>
23
29
  *
24
- * // Left aligned footer
25
- * <ModalFooter alignment="left">
26
- * <button>Delete</button>
27
- * </ModalFooter>
28
- *
29
- * // Center aligned footer
30
- * <ModalFooter alignment="center">
31
- * <button>OK</button>
32
- * </ModalFooter>
33
- *
34
- * // Space between buttons
30
+ * // Space-between layout (e.g. back / next in a wizard)
35
31
  * <ModalFooter alignment="between">
36
- * <button>Cancel</button>
37
- * <button>Confirm</button>
32
+ * <Button variant="outline" onClick={onBack}>Back</Button>
33
+ * <Button onClick={onNext}>Next</Button>
38
34
  * </ModalFooter>
39
- *
40
- * // Space around buttons
41
- * <ModalFooter alignment="around">
42
- * <button>Previous</button>
43
- * <button>Next</button>
44
- * <button>Finish</button>
45
- * </ModalFooter>
46
- *
47
- * // Complete modal example
48
- * <ModalContainer isVisible={isOpen} makeInvisible={() => setIsOpen(false)}>
49
- * <div className="modal-content">
50
- * <header>
51
- * <h2>Confirm Action</h2>
52
- * </header>
53
- *
54
- * <main>
55
- * <p>Are you sure you want to delete this item?</p>
56
- * </main>
57
- *
58
- * <ModalFooter alignment="right">
59
- * <button onClick={() => setIsOpen(false)}>
60
- * Cancel
61
- * </button>
62
- * <button onClick={handleDelete}>
63
- * Delete
64
- * </button>
65
- * </ModalFooter>
66
- * </div>
67
- * </ModalContainer>
68
35
  * ```
69
36
  */
70
37
  declare function ModalFooter(args: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/modalFooter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACpD,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;CAChE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,iBAAS,WAAW,CAAC,IAAI,EAAE,gBAAgB,2CAK1C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/modalFooter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACpD;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;CAChE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iBAAS,WAAW,CAAC,IAAI,EAAE,gBAAgB,2CAK1C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,67 +1,27 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  /**
4
- * ModalFooter component - footer section for modals with flexible alignment options
4
+ * ModalFooter action bar at the bottom of a modal dialog.
5
5
  *
6
- * @param props - ModalFooter component properties
7
- * @param props.alignment - Content alignment within the footer. Default: "right"
6
+ * @param props.alignment - Horizontal alignment of children. Default: `"right"`
8
7
  *
9
- * **...Other valid HTML properties for footer element**
8
+ * **...Other valid HTML `<footer>` properties**
10
9
  *
11
- * @returns ModalFooter JSX element
10
+ * @returns ModalFooter JSX element.
12
11
  *
13
12
  * @example
14
13
  * ```tsx
15
- * // Basic footer with right alignment (default)
14
+ * // Confirm / cancel pattern (right-aligned by default)
16
15
  * <ModalFooter>
17
- * <button>Cancel</button>
18
- * <button>Save</button>
16
+ * <Button variant="ghost" onClick={onClose}>Cancel</Button>
17
+ * <Button scheme="danger" onClick={onConfirm}>Delete</Button>
19
18
  * </ModalFooter>
20
19
  *
21
- * // Left aligned footer
22
- * <ModalFooter alignment="left">
23
- * <button>Delete</button>
24
- * </ModalFooter>
25
- *
26
- * // Center aligned footer
27
- * <ModalFooter alignment="center">
28
- * <button>OK</button>
29
- * </ModalFooter>
30
- *
31
- * // Space between buttons
20
+ * // Space-between layout (e.g. back / next in a wizard)
32
21
  * <ModalFooter alignment="between">
33
- * <button>Cancel</button>
34
- * <button>Confirm</button>
22
+ * <Button variant="outline" onClick={onBack}>Back</Button>
23
+ * <Button onClick={onNext}>Next</Button>
35
24
  * </ModalFooter>
36
- *
37
- * // Space around buttons
38
- * <ModalFooter alignment="around">
39
- * <button>Previous</button>
40
- * <button>Next</button>
41
- * <button>Finish</button>
42
- * </ModalFooter>
43
- *
44
- * // Complete modal example
45
- * <ModalContainer isVisible={isOpen} makeInvisible={() => setIsOpen(false)}>
46
- * <div className="modal-content">
47
- * <header>
48
- * <h2>Confirm Action</h2>
49
- * </header>
50
- *
51
- * <main>
52
- * <p>Are you sure you want to delete this item?</p>
53
- * </main>
54
- *
55
- * <ModalFooter alignment="right">
56
- * <button onClick={() => setIsOpen(false)}>
57
- * Cancel
58
- * </button>
59
- * <button onClick={handleDelete}>
60
- * Delete
61
- * </button>
62
- * </ModalFooter>
63
- * </div>
64
- * </ModalContainer>
65
25
  * ```
66
26
  */
67
27
  function ModalFooter(args) {