@arkyn/components 3.0.1-beta.143 → 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 (206) hide show
  1. package/dist/components/alert/alertContainer/index.d.ts +27 -43
  2. package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
  3. package/dist/components/alert/alertContainer/index.js +20 -40
  4. package/dist/components/alert/alertContent/index.d.ts +11 -36
  5. package/dist/components/alert/alertContent/index.d.ts.map +1 -1
  6. package/dist/components/alert/alertContent/index.js +11 -31
  7. package/dist/components/alert/alertDescription/index.d.ts +10 -38
  8. package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
  9. package/dist/components/alert/alertDescription/index.js +10 -33
  10. package/dist/components/alert/alertIcon/index.d.ts +14 -38
  11. package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
  12. package/dist/components/alert/alertIcon/index.js +14 -32
  13. package/dist/components/alert/alertTitle/index.d.ts +12 -35
  14. package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
  15. package/dist/components/alert/alertTitle/index.js +12 -27
  16. package/dist/components/audioPlayer/index.d.ts +24 -32
  17. package/dist/components/audioPlayer/index.d.ts.map +1 -1
  18. package/dist/components/audioPlayer/index.js +15 -18
  19. package/dist/components/audioUpload/index.d.ts +37 -48
  20. package/dist/components/audioUpload/index.d.ts.map +1 -1
  21. package/dist/components/audioUpload/index.js +23 -48
  22. package/dist/components/badge/index.d.ts +31 -22
  23. package/dist/components/badge/index.d.ts.map +1 -1
  24. package/dist/components/badge/index.js +14 -22
  25. package/dist/components/button/index.d.ts +38 -28
  26. package/dist/components/button/index.d.ts.map +1 -1
  27. package/dist/components/button/index.js +18 -28
  28. package/dist/components/cardTab/cardTabButton/index.d.ts +14 -52
  29. package/dist/components/cardTab/cardTabButton/index.d.ts.map +1 -1
  30. package/dist/components/cardTab/cardTabButton/index.js +12 -52
  31. package/dist/components/cardTab/cardTabContainer/index.d.ts +16 -58
  32. package/dist/components/cardTab/cardTabContainer/index.d.ts.map +1 -1
  33. package/dist/components/cardTab/cardTabContainer/index.js +12 -58
  34. package/dist/components/checkbox/index.d.ts +38 -37
  35. package/dist/components/checkbox/index.d.ts.map +1 -1
  36. package/dist/components/checkbox/index.js +21 -37
  37. package/dist/components/clientOnly.d.ts +13 -66
  38. package/dist/components/clientOnly.d.ts.map +1 -1
  39. package/dist/components/clientOnly.js +11 -66
  40. package/dist/components/currencyInput/index.d.ts +67 -50
  41. package/dist/components/currencyInput/index.d.ts.map +1 -1
  42. package/dist/components/currencyInput/index.js +28 -50
  43. package/dist/components/divider/index.d.ts +12 -25
  44. package/dist/components/divider/index.d.ts.map +1 -1
  45. package/dist/components/divider/index.js +8 -25
  46. package/dist/components/drawer/drawerContainer/index.d.ts +16 -50
  47. package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
  48. package/dist/components/drawer/drawerContainer/index.js +13 -50
  49. package/dist/components/drawer/drawerHeader/index.d.ts +9 -33
  50. package/dist/components/drawer/drawerHeader/index.d.ts.map +1 -1
  51. package/dist/components/drawer/drawerHeader/index.js +8 -33
  52. package/dist/components/facebookPixel/index.d.ts +47 -0
  53. package/dist/components/facebookPixel/index.d.ts.map +1 -1
  54. package/dist/components/facebookPixel/index.js +35 -0
  55. package/dist/components/fieldError/index.d.ts +4 -11
  56. package/dist/components/fieldError/index.d.ts.map +1 -1
  57. package/dist/components/fieldError/index.js +4 -11
  58. package/dist/components/fieldLabel/index.d.ts +6 -21
  59. package/dist/components/fieldLabel/index.d.ts.map +1 -1
  60. package/dist/components/fieldLabel/index.js +5 -21
  61. package/dist/components/fieldWrapper/index.d.ts +12 -22
  62. package/dist/components/fieldWrapper/index.d.ts.map +1 -1
  63. package/dist/components/fieldWrapper/index.js +7 -22
  64. package/dist/components/fileUpload/index.d.ts +36 -61
  65. package/dist/components/fileUpload/index.d.ts.map +1 -1
  66. package/dist/components/fileUpload/index.js +23 -61
  67. package/dist/components/googleAnalytics/index.d.ts +11 -7
  68. package/dist/components/googleAnalytics/index.d.ts.map +1 -1
  69. package/dist/components/googleAnalytics/index.js +9 -7
  70. package/dist/components/googleTagManager/index.d.ts +27 -21
  71. package/dist/components/googleTagManager/index.d.ts.map +1 -1
  72. package/dist/components/googleTagManager/index.js +20 -21
  73. package/dist/components/iconButton/index.d.ts +31 -15
  74. package/dist/components/iconButton/index.d.ts.map +1 -1
  75. package/dist/components/iconButton/index.js +12 -15
  76. package/dist/components/imageUpload/index.d.ts +47 -75
  77. package/dist/components/imageUpload/index.d.ts.map +1 -1
  78. package/dist/components/imageUpload/index.js +27 -75
  79. package/dist/components/input/index.d.ts +51 -44
  80. package/dist/components/input/index.d.ts.map +1 -1
  81. package/dist/components/input/index.js +24 -44
  82. package/dist/components/mapView/index.d.ts +44 -0
  83. package/dist/components/mapView/index.d.ts.map +1 -1
  84. package/dist/components/mapView/index.js +35 -0
  85. package/dist/components/maskedInput/index.d.ts +66 -51
  86. package/dist/components/maskedInput/index.d.ts.map +1 -1
  87. package/dist/components/maskedInput/index.js +28 -51
  88. package/dist/components/modal/modalContainer/index.d.ts +17 -57
  89. package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
  90. package/dist/components/modal/modalContainer/index.js +15 -57
  91. package/dist/components/modal/modalFooter/index.d.ts +17 -50
  92. package/dist/components/modal/modalFooter/index.d.ts.map +1 -1
  93. package/dist/components/modal/modalFooter/index.js +10 -50
  94. package/dist/components/modal/modalHeader/index.d.ts +13 -47
  95. package/dist/components/modal/modalHeader/index.d.ts.map +1 -1
  96. package/dist/components/modal/modalHeader/index.js +12 -47
  97. package/dist/components/multiSelect/index.d.ts +67 -62
  98. package/dist/components/multiSelect/index.d.ts.map +1 -1
  99. package/dist/components/multiSelect/index.js +28 -62
  100. package/dist/components/pagination/index.d.ts +18 -9
  101. package/dist/components/pagination/index.d.ts.map +1 -1
  102. package/dist/components/pagination/index.js +18 -9
  103. package/dist/components/phoneInput/index.d.ts +65 -30
  104. package/dist/components/phoneInput/index.d.ts.map +1 -1
  105. package/dist/components/phoneInput/index.js +35 -30
  106. package/dist/components/popover/index.d.ts +34 -114
  107. package/dist/components/popover/index.d.ts.map +1 -1
  108. package/dist/components/popover/index.js +25 -114
  109. package/dist/components/radio/radioBox/index.d.ts +17 -65
  110. package/dist/components/radio/radioBox/index.d.ts.map +1 -1
  111. package/dist/components/radio/radioBox/index.js +14 -65
  112. package/dist/components/radio/radioGroup/index.d.ts +36 -67
  113. package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
  114. package/dist/components/radio/radioGroup/index.js +25 -67
  115. package/dist/components/richText/index.d.ts +33 -47
  116. package/dist/components/richText/index.d.ts.map +1 -1
  117. package/dist/components/richText/index.js +30 -44
  118. package/dist/components/searchPlaces.d.ts +52 -50
  119. package/dist/components/searchPlaces.d.ts.map +1 -1
  120. package/dist/components/searchPlaces.js +23 -30
  121. package/dist/components/select/index.d.ts +68 -63
  122. package/dist/components/select/index.d.ts.map +1 -1
  123. package/dist/components/select/index.js +29 -63
  124. package/dist/components/slider/index.d.ts +20 -34
  125. package/dist/components/slider/index.d.ts.map +1 -1
  126. package/dist/components/slider/index.js +15 -33
  127. package/dist/components/switch/index.d.ts +42 -58
  128. package/dist/components/switch/index.d.ts.map +1 -1
  129. package/dist/components/switch/index.js +24 -58
  130. package/dist/components/tab/tabButton/index.d.ts +14 -52
  131. package/dist/components/tab/tabButton/index.d.ts.map +1 -1
  132. package/dist/components/tab/tabButton/index.js +12 -52
  133. package/dist/components/tab/tabContainer/index.d.ts +16 -58
  134. package/dist/components/tab/tabContainer/index.d.ts.map +1 -1
  135. package/dist/components/tab/tabContainer/index.js +12 -58
  136. package/dist/components/table/tableBody/index.d.ts +13 -47
  137. package/dist/components/table/tableBody/index.d.ts.map +1 -1
  138. package/dist/components/table/tableBody/index.js +12 -47
  139. package/dist/components/table/tableCaption/index.d.ts +6 -46
  140. package/dist/components/table/tableCaption/index.d.ts.map +1 -1
  141. package/dist/components/table/tableCaption/index.js +6 -46
  142. package/dist/components/table/tableContainer/index.d.ts +12 -41
  143. package/dist/components/table/tableContainer/index.d.ts.map +1 -1
  144. package/dist/components/table/tableContainer/index.js +12 -41
  145. package/dist/components/table/tableFooter/index.d.ts +5 -29
  146. package/dist/components/table/tableFooter/index.d.ts.map +1 -1
  147. package/dist/components/table/tableFooter/index.js +5 -29
  148. package/dist/components/table/tableHeader/index.d.ts +4 -25
  149. package/dist/components/table/tableHeader/index.d.ts.map +1 -1
  150. package/dist/components/table/tableHeader/index.js +4 -25
  151. package/dist/components/textarea/index.d.ts +32 -64
  152. package/dist/components/textarea/index.d.ts.map +1 -1
  153. package/dist/components/textarea/index.js +16 -64
  154. package/dist/components/tooltip/index.d.ts +27 -55
  155. package/dist/components/tooltip/index.d.ts.map +1 -1
  156. package/dist/components/tooltip/index.js +16 -55
  157. package/dist/hooks/useAutomation.d.ts +18 -26
  158. package/dist/hooks/useAutomation.d.ts.map +1 -1
  159. package/dist/hooks/useAutomation.js +18 -26
  160. package/dist/hooks/useDrawer.d.ts +19 -64
  161. package/dist/hooks/useDrawer.d.ts.map +1 -1
  162. package/dist/hooks/useForm.d.ts +12 -29
  163. package/dist/hooks/useForm.d.ts.map +1 -1
  164. package/dist/hooks/useForm.js +12 -29
  165. package/dist/hooks/useHydrated.d.ts +8 -63
  166. package/dist/hooks/useHydrated.d.ts.map +1 -1
  167. package/dist/hooks/useHydrated.js +8 -63
  168. package/dist/hooks/useModal.d.ts +19 -59
  169. package/dist/hooks/useModal.d.ts.map +1 -1
  170. package/dist/hooks/useScopedParams.d.ts +17 -69
  171. package/dist/hooks/useScopedParams.d.ts.map +1 -1
  172. package/dist/hooks/useScopedParams.js +17 -69
  173. package/dist/hooks/useScrollLock.d.ts +11 -27
  174. package/dist/hooks/useScrollLock.d.ts.map +1 -1
  175. package/dist/hooks/useScrollLock.js +11 -33
  176. package/dist/hooks/useSearchAutomation.d.ts +16 -34
  177. package/dist/hooks/useSearchAutomation.d.ts.map +1 -1
  178. package/dist/hooks/useSearchAutomation.js +16 -34
  179. package/dist/hooks/useSlider.d.ts +5 -19
  180. package/dist/hooks/useSlider.d.ts.map +1 -1
  181. package/dist/hooks/useSlider.js +5 -19
  182. package/dist/hooks/useToast.d.ts +8 -52
  183. package/dist/hooks/useToast.d.ts.map +1 -1
  184. package/dist/hooks/useToast.js +8 -52
  185. package/dist/providers/drawerProvider.d.ts +15 -81
  186. package/dist/providers/drawerProvider.d.ts.map +1 -1
  187. package/dist/providers/drawerProvider.js +15 -81
  188. package/dist/providers/formProvider.d.ts +17 -53
  189. package/dist/providers/formProvider.d.ts.map +1 -1
  190. package/dist/providers/formProvider.js +17 -53
  191. package/dist/providers/modalProvider.d.ts +16 -77
  192. package/dist/providers/modalProvider.d.ts.map +1 -1
  193. package/dist/providers/modalProvider.js +16 -77
  194. package/dist/providers/placesProvider.d.ts +16 -11
  195. package/dist/providers/placesProvider.d.ts.map +1 -1
  196. package/dist/providers/placesProvider.js +16 -11
  197. package/dist/providers/toastProvider.d.ts +10 -21
  198. package/dist/providers/toastProvider.d.ts.map +1 -1
  199. package/dist/providers/toastProvider.js +10 -21
  200. package/dist/services/toHtml.d.ts +11 -10
  201. package/dist/services/toHtml.d.ts.map +1 -1
  202. package/dist/services/toHtml.js +11 -10
  203. package/dist/services/toRichTextValue.d.ts +11 -17
  204. package/dist/services/toRichTextValue.d.ts.map +1 -1
  205. package/dist/services/toRichTextValue.js +11 -17
  206. package/package.json +1 -1
@@ -2,42 +2,18 @@ import { HTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type TableFooterProps = HTMLAttributes<HTMLTableSectionElement>;
4
4
  /**
5
- * TableFooter component - used to render the footer section of a table with content container
5
+ * TableFooter `<tfoot>` section with an automatic spacing row above the content.
6
6
  *
7
- * @param props - TableFooter component properties
7
+ * Children span all columns via `colSpan={100}`. Commonly used for `Pagination`.
8
+ * Accepts all standard HTML `<tfoot>` attributes.
8
9
  *
9
- * **...All valid HTML properties for tfoot element**
10
- *
11
- * @returns TableFooter JSX element
10
+ * @returns TableFooter JSX element.
12
11
  *
13
12
  * @example
14
13
  * ```tsx
15
- * // Basic table footer with pagination
16
14
  * <TableFooter>
17
- * <div>Showing 1-10 of 100 results</div>
18
- * <Pagination />
19
- * </TableFooter>
20
- *
21
- * // Table footer with custom styling
22
- * <TableFooter className="custom-footer">
23
- * <Button>Load More</Button>
15
+ * <Pagination currentPage={page} totalPages={totalPages} onChange={setPage} />
24
16
  * </TableFooter>
25
- *
26
- * // Complete table usage
27
- * <TableContainer>
28
- * <TableHeader>
29
- * <th>Name</th>
30
- * <th>Email</th>
31
- * </TableHeader>
32
- * <TableBody>
33
- * // table rows...
34
- * </TableBody>
35
- * <TableFooter>
36
- * <div className="pagination-info">
37
- * Total: 250 items
38
- * </div>
39
- * </TableFooter>
40
- * </TableContainer>
41
17
  * ```
42
18
  */
43
19
  declare function TableFooter(props: TableFooterProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableFooter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,uBAAuB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAc3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableFooter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,uBAAuB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;GAcG;AAEH,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAc3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,42 +1,18 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  /**
4
- * TableFooter component - used to render the footer section of a table with content container
4
+ * TableFooter `<tfoot>` section with an automatic spacing row above the content.
5
5
  *
6
- * @param props - TableFooter component properties
6
+ * Children span all columns via `colSpan={100}`. Commonly used for `Pagination`.
7
+ * Accepts all standard HTML `<tfoot>` attributes.
7
8
  *
8
- * **...All valid HTML properties for tfoot element**
9
- *
10
- * @returns TableFooter JSX element
9
+ * @returns TableFooter JSX element.
11
10
  *
12
11
  * @example
13
12
  * ```tsx
14
- * // Basic table footer with pagination
15
13
  * <TableFooter>
16
- * <div>Showing 1-10 of 100 results</div>
17
- * <Pagination />
18
- * </TableFooter>
19
- *
20
- * // Table footer with custom styling
21
- * <TableFooter className="custom-footer">
22
- * <Button>Load More</Button>
14
+ * <Pagination currentPage={page} totalPages={totalPages} onChange={setPage} />
23
15
  * </TableFooter>
24
- *
25
- * // Complete table usage
26
- * <TableContainer>
27
- * <TableHeader>
28
- * <th>Name</th>
29
- * <th>Email</th>
30
- * </TableHeader>
31
- * <TableBody>
32
- * // table rows...
33
- * </TableBody>
34
- * <TableFooter>
35
- * <div className="pagination-info">
36
- * Total: 250 items
37
- * </div>
38
- * </TableFooter>
39
- * </TableContainer>
40
16
  * ```
41
17
  */
42
18
  function TableFooter(props) {
@@ -2,41 +2,20 @@ import { HTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
4
4
  /**
5
- * TableHeader component - used to render the header section of a table with automatic spacing
5
+ * TableHeader `<thead>` section with an automatic spacing row below the header row.
6
6
  *
7
- * @param props - TableHeader component properties
7
+ * Pass `<th>` elements as children — they are wrapped in a `<tr>` automatically.
8
+ * Accepts all standard HTML `<thead>` attributes.
8
9
  *
9
- * **...All valid HTML properties for thead element**
10
- *
11
- * @returns TableHeader JSX element
10
+ * @returns TableHeader JSX element.
12
11
  *
13
12
  * @example
14
13
  * ```tsx
15
- * // Basic table header
16
14
  * <TableHeader>
17
15
  * <th>Name</th>
18
16
  * <th>Email</th>
19
17
  * <th>Actions</th>
20
18
  * </TableHeader>
21
- *
22
- * // Table header with custom styling
23
- * <TableHeader className="custom-header">
24
- * <th>Product</th>
25
- * <th>Price</th>
26
- * <th>Stock</th>
27
- * </TableHeader>
28
- *
29
- * // Complete table usage
30
- * <TableContainer>
31
- * <TableHeader>
32
- * <th>ID</th>
33
- * <th>User</th>
34
- * <th>Status</th>
35
- * </TableHeader>
36
- * <TableBody>
37
- * // table rows...
38
- * </TableBody>
39
- * </TableContainer>
40
19
  * ```
41
20
  */
42
21
  declare function TableHeader(props: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,uBAAuB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAU3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,uBAAuB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;GAgBG;AAEH,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAU3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,41 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  /**
4
- * TableHeader component - used to render the header section of a table with automatic spacing
4
+ * TableHeader `<thead>` section with an automatic spacing row below the header row.
5
5
  *
6
- * @param props - TableHeader component properties
6
+ * Pass `<th>` elements as children — they are wrapped in a `<tr>` automatically.
7
+ * Accepts all standard HTML `<thead>` attributes.
7
8
  *
8
- * **...All valid HTML properties for thead element**
9
- *
10
- * @returns TableHeader JSX element
9
+ * @returns TableHeader JSX element.
11
10
  *
12
11
  * @example
13
12
  * ```tsx
14
- * // Basic table header
15
13
  * <TableHeader>
16
14
  * <th>Name</th>
17
15
  * <th>Email</th>
18
16
  * <th>Actions</th>
19
17
  * </TableHeader>
20
- *
21
- * // Table header with custom styling
22
- * <TableHeader className="custom-header">
23
- * <th>Product</th>
24
- * <th>Price</th>
25
- * <th>Stock</th>
26
- * </TableHeader>
27
- *
28
- * // Complete table usage
29
- * <TableContainer>
30
- * <TableHeader>
31
- * <th>ID</th>
32
- * <th>User</th>
33
- * <th>Status</th>
34
- * </TableHeader>
35
- * <TableBody>
36
- * // table rows...
37
- * </TableBody>
38
- * </TableContainer>
39
18
  * ```
40
19
  */
41
20
  function TableHeader(props) {
@@ -1,36 +1,53 @@
1
1
  import { TextareaHTMLAttributes } from "react";
2
2
  import "./styles.css";
3
3
  type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "name" | "value" | "defaultValue"> & {
4
+ /** Field name for form submission. Required. */
4
5
  name: string;
6
+ /** Optional label text displayed above the textarea. */
5
7
  label?: string;
8
+ /** Displays an asterisk on the label to signal a required field. */
6
9
  showAsterisk?: boolean;
10
+ /** Validation error message displayed below the textarea. */
7
11
  errorMessage?: string;
12
+ /**
13
+ * Textarea size.
14
+ * @default "md"
15
+ */
8
16
  size?: "md" | "lg";
17
+ /**
18
+ * Visual style variant.
19
+ * - `solid`: filled background.
20
+ * - `outline`: bordered, transparent background.
21
+ * @default "solid"
22
+ */
9
23
  variant?: "solid" | "outline";
24
+ /** Controlled value. */
10
25
  value?: string;
26
+ /** Uncontrolled default value. */
11
27
  defaultValue?: string;
12
28
  };
13
29
  /**
14
- * Textarea component - used for multi-line text input with customizable styling and validation
30
+ * Textarea multi-line text input with label, validation, and form integration.
15
31
  *
16
- * @param props - Textarea component properties
17
- * @param props.name - Required field name for form handling and textarea identification
18
- * @param props.label - Optional label text to display above the textarea
19
- * @param props.showAsterisk - Whether to show asterisk on label for required fields
20
- * @param props.errorMessage - Error message to display below the textarea
21
- * @param props.size - Size variant of the textarea. Default: "md"
22
- * @param props.variant - Visual variant of the textarea. Default: "solid"
32
+ * Integrates with `useForm` to display validation errors by field name.
23
33
  *
24
- * **...Other valid HTML properties for textarea element (except name)**
34
+ * @param props.name - Field name for form submission. Required.
35
+ * @param props.label - Label text displayed above the textarea.
36
+ * @param props.showAsterisk - Appends `*` to the label.
37
+ * @param props.errorMessage - Validation error message.
38
+ * @param props.size - Textarea size (`md` | `lg`). Default: "md"
39
+ * @param props.variant - Visual style variant. Default: "solid"
25
40
  *
26
- * @returns Textarea JSX element wrapped in FieldWrapper with optional label and error message
41
+ * **...Other valid HTML properties for `<textarea>`**
42
+ *
43
+ * @returns Textarea JSX element wrapped in `FieldWrapper`.
27
44
  *
28
45
  * @example
29
46
  * ```tsx
30
- * // Basic textarea
47
+ * // Basic
31
48
  * <Textarea name="description" placeholder="Enter description..." />
32
49
  *
33
- * // Textarea with label and validation
50
+ * // With label and validation
34
51
  * <Textarea
35
52
  * name="bio"
36
53
  * label="Biography"
@@ -39,64 +56,15 @@ type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "name" |
39
56
  * errorMessage="Biography is required"
40
57
  * />
41
58
  *
42
- * // Large textarea with outline variant
43
- * <Textarea
44
- * name="comments"
45
- * label="Comments"
46
- * size="lg"
47
- * variant="outline"
48
- * placeholder="Enter your comments here..."
49
- * rows={6}
50
- * />
51
- *
52
- * // Textarea with character limit and custom styling
53
- * <Textarea
54
- * name="feedback"
55
- * label="Feedback"
56
- * placeholder="Share your feedback (max 500 characters)"
57
- * maxLength={500}
58
- * rows={4}
59
- * className="feedback-textarea"
60
- * />
61
- *
62
- * // Read-only textarea for display
63
- * <Textarea
64
- * name="terms"
65
- * label="Terms and Conditions"
66
- * value={termsContent}
67
- * readOnly
68
- * rows={10}
69
- * variant="outline"
70
- * />
71
- *
72
- * // Disabled textarea
73
- * <Textarea
74
- * name="disabled_field"
75
- * label="Disabled Field"
76
- * value="This field is disabled"
77
- * disabled
78
- * placeholder="Cannot edit this field"
79
- * />
80
- *
81
- * // Textarea with controlled value and change handler
59
+ * // Controlled with custom rows
82
60
  * <Textarea
83
61
  * name="message"
84
62
  * label="Message"
85
63
  * value={message}
86
64
  * onChange={(e) => setMessage(e.target.value)}
87
- * placeholder="Type your message..."
88
65
  * rows={5}
89
- * showAsterisk
90
- * />
91
- *
92
- * // Textarea with resize control
93
- * <Textarea
94
- * name="notes"
95
- * label="Notes"
96
- * placeholder="Enter your notes..."
97
- * style={{ resize: 'vertical' }}
98
- * rows={3}
99
- * cols={50}
66
+ * size="lg"
67
+ * variant="outline"
100
68
  * />
101
69
  * ```
102
70
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAIvB,MAAM,OAAO,CAAC;AAOf,OAAO,cAAc,CAAC;AAEtB,KAAK,aAAa,GAAG,IAAI,CACvB,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,MAAM,GAAG,OAAO,GAAG,cAAc,CAClC,GAAG;IACF,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAmFrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAIvB,MAAM,OAAO,CAAC;AAOf,OAAO,cAAc,CAAC;AAEtB,KAAK,aAAa,GAAG,IAAI,CACvB,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,MAAM,GAAG,OAAO,GAAG,cAAc,CAClC,GAAG;IACF,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAmFrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -6,26 +6,27 @@ import { FieldWrapper } from "../fieldWrapper";
6
6
  import { FieldError } from "../fieldError";
7
7
  import "./styles.css";
8
8
  /**
9
- * Textarea component - used for multi-line text input with customizable styling and validation
9
+ * Textarea multi-line text input with label, validation, and form integration.
10
10
  *
11
- * @param props - Textarea component properties
12
- * @param props.name - Required field name for form handling and textarea identification
13
- * @param props.label - Optional label text to display above the textarea
14
- * @param props.showAsterisk - Whether to show asterisk on label for required fields
15
- * @param props.errorMessage - Error message to display below the textarea
16
- * @param props.size - Size variant of the textarea. Default: "md"
17
- * @param props.variant - Visual variant of the textarea. Default: "solid"
11
+ * Integrates with `useForm` to display validation errors by field name.
18
12
  *
19
- * **...Other valid HTML properties for textarea element (except name)**
13
+ * @param props.name - Field name for form submission. Required.
14
+ * @param props.label - Label text displayed above the textarea.
15
+ * @param props.showAsterisk - Appends `*` to the label.
16
+ * @param props.errorMessage - Validation error message.
17
+ * @param props.size - Textarea size (`md` | `lg`). Default: "md"
18
+ * @param props.variant - Visual style variant. Default: "solid"
20
19
  *
21
- * @returns Textarea JSX element wrapped in FieldWrapper with optional label and error message
20
+ * **...Other valid HTML properties for `<textarea>`**
21
+ *
22
+ * @returns Textarea JSX element wrapped in `FieldWrapper`.
22
23
  *
23
24
  * @example
24
25
  * ```tsx
25
- * // Basic textarea
26
+ * // Basic
26
27
  * <Textarea name="description" placeholder="Enter description..." />
27
28
  *
28
- * // Textarea with label and validation
29
+ * // With label and validation
29
30
  * <Textarea
30
31
  * name="bio"
31
32
  * label="Biography"
@@ -34,64 +35,15 @@ import "./styles.css";
34
35
  * errorMessage="Biography is required"
35
36
  * />
36
37
  *
37
- * // Large textarea with outline variant
38
- * <Textarea
39
- * name="comments"
40
- * label="Comments"
41
- * size="lg"
42
- * variant="outline"
43
- * placeholder="Enter your comments here..."
44
- * rows={6}
45
- * />
46
- *
47
- * // Textarea with character limit and custom styling
48
- * <Textarea
49
- * name="feedback"
50
- * label="Feedback"
51
- * placeholder="Share your feedback (max 500 characters)"
52
- * maxLength={500}
53
- * rows={4}
54
- * className="feedback-textarea"
55
- * />
56
- *
57
- * // Read-only textarea for display
58
- * <Textarea
59
- * name="terms"
60
- * label="Terms and Conditions"
61
- * value={termsContent}
62
- * readOnly
63
- * rows={10}
64
- * variant="outline"
65
- * />
66
- *
67
- * // Disabled textarea
68
- * <Textarea
69
- * name="disabled_field"
70
- * label="Disabled Field"
71
- * value="This field is disabled"
72
- * disabled
73
- * placeholder="Cannot edit this field"
74
- * />
75
- *
76
- * // Textarea with controlled value and change handler
38
+ * // Controlled with custom rows
77
39
  * <Textarea
78
40
  * name="message"
79
41
  * label="Message"
80
42
  * value={message}
81
43
  * onChange={(e) => setMessage(e.target.value)}
82
- * placeholder="Type your message..."
83
44
  * rows={5}
84
- * showAsterisk
85
- * />
86
- *
87
- * // Textarea with resize control
88
- * <Textarea
89
- * name="notes"
90
- * label="Notes"
91
- * placeholder="Enter your notes..."
92
- * style={{ resize: 'vertical' }}
93
- * rows={3}
94
- * cols={50}
45
+ * size="lg"
46
+ * variant="outline"
95
47
  * />
96
48
  * ```
97
49
  */
@@ -1,78 +1,50 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
2
  import "./styles.css";
3
3
  type TooltipProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
4
+ /** Text rendered inside the tooltip bubble. Supports inline HTML. Required. */
4
5
  text: string;
6
+ /** Element that triggers the tooltip on hover. Required. */
5
7
  children: ReactNode;
8
+ /**
9
+ * Preferred position of the tooltip relative to the trigger element.
10
+ * Automatically flips to the opposite side if the tooltip would overflow the viewport.
11
+ * @default "top"
12
+ */
6
13
  orientation?: "top" | "right" | "bottom" | "left";
14
+ /**
15
+ * Tooltip size.
16
+ * @default "lg"
17
+ */
7
18
  size?: "md" | "lg";
8
19
  };
9
20
  /**
10
- * Tooltip component - displays contextual information on hover with smart positioning
21
+ * Tooltip shows a contextual text bubble on hover with smart viewport-aware positioning.
11
22
  *
12
- * @param props - Tooltip component properties
13
- * @param props.text - Text content to display in the tooltip
14
- * @param props.children - Element that triggers the tooltip on hover
15
- * @param props.orientation - Preferred tooltip position relative to trigger element. Default: "top"
16
- * @param props.size - Tooltip size variant. Default: "lg"
23
+ * The tooltip automatically flips to the opposite side when it would overflow the viewport.
17
24
  *
18
- * **...Other valid HTML properties for div element**
25
+ * @param props.text - Text (or HTML) to display in the tooltip. Required.
26
+ * @param props.children - Trigger element. Required.
27
+ * @param props.orientation - Preferred position relative to the trigger. Default: "top"
28
+ * @param props.size - Tooltip size. Default: "lg"
19
29
  *
20
- * @returns Tooltip JSX element
30
+ * **...Other valid HTML properties for `<div>`**
31
+ *
32
+ * @returns Tooltip JSX element.
21
33
  *
22
34
  * @example
23
35
  * ```tsx
24
- * // Basic tooltip
25
- * <Tooltip text="This is a helpful tip">
26
- * <button>Hover me</button>
27
- * </Tooltip>
28
- *
29
- * // Tooltip with different orientations
30
- * <Tooltip text="Left tooltip" orientation="left">
31
- * <span>Hover for left tooltip</span>
32
- * </Tooltip>
33
- *
34
- * <Tooltip text="Right tooltip" orientation="right">
35
- * <span>Hover for right tooltip</span>
36
- * </Tooltip>
37
- *
38
- * // Different sizes
39
- * <Tooltip text="Small tooltip" size="md">
40
- * <button>Small tooltip</button>
41
- * </Tooltip>
42
- *
43
- * <Tooltip text="Large tooltip" size="lg">
44
- * <button>Large tooltip</button>
36
+ * <Tooltip text="Save changes before leaving">
37
+ * <IconButton icon={SaveIcon} aria-label="Save" />
45
38
  * </Tooltip>
46
39
  *
47
- * // Smart positioning - automatically adjusts if doesn't fit
48
- * <Tooltip text="This tooltip will auto-adjust position" orientation="left">
49
- * <button className="near-edge">Smart positioning</button>
40
+ * // Toolbar with bottom-oriented tooltips
41
+ * <Tooltip text="Add item" orientation="bottom">
42
+ * <IconButton icon={Plus} aria-label="Add" />
50
43
  * </Tooltip>
51
44
  *
52
- * // Complete example with custom styling
53
- * <Tooltip
54
- * text="Save your changes before proceeding"
55
- * orientation="bottom"
56
- * size="lg"
57
- * className="custom-tooltip"
58
- * >
59
- * <IconButton icon={SaveIcon} />
45
+ * <Tooltip text="Delete" orientation="bottom" size="md">
46
+ * <IconButton icon={Trash2} aria-label="Delete" scheme="danger" />
60
47
  * </Tooltip>
61
- *
62
- * // Multiple tooltips on same page
63
- * <div className="toolbar">
64
- * <Tooltip text="Create new file" orientation="bottom">
65
- * <IconButton icon={PlusIcon} />
66
- * </Tooltip>
67
- *
68
- * <Tooltip text="Open existing file" orientation="bottom">
69
- * <IconButton icon={FolderIcon} />
70
- * </Tooltip>
71
- *
72
- * <Tooltip text="Delete selected file" orientation="bottom">
73
- * <IconButton icon={TrashIcon} />
74
- * </Tooltip>
75
- * </div>
76
48
  * ```
77
49
  */
78
50
  declare function Tooltip(props: TooltipProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EAKV,MAAM,OAAO,CAAC;AACf,OAAO,cAAc,CAAC;AAEtB,KAAK,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,2CAqFnC;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EAKV,MAAM,OAAO,CAAC;AACf,OAAO,cAAc,CAAC;AAEtB,KAAK,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClD;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,2CAqFnC;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -2,72 +2,33 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useId, useRef, useState, } from "react";
3
3
  import "./styles.css";
4
4
  /**
5
- * Tooltip component - displays contextual information on hover with smart positioning
5
+ * Tooltip shows a contextual text bubble on hover with smart viewport-aware positioning.
6
6
  *
7
- * @param props - Tooltip component properties
8
- * @param props.text - Text content to display in the tooltip
9
- * @param props.children - Element that triggers the tooltip on hover
10
- * @param props.orientation - Preferred tooltip position relative to trigger element. Default: "top"
11
- * @param props.size - Tooltip size variant. Default: "lg"
7
+ * The tooltip automatically flips to the opposite side when it would overflow the viewport.
12
8
  *
13
- * **...Other valid HTML properties for div element**
9
+ * @param props.text - Text (or HTML) to display in the tooltip. Required.
10
+ * @param props.children - Trigger element. Required.
11
+ * @param props.orientation - Preferred position relative to the trigger. Default: "top"
12
+ * @param props.size - Tooltip size. Default: "lg"
14
13
  *
15
- * @returns Tooltip JSX element
14
+ * **...Other valid HTML properties for `<div>`**
15
+ *
16
+ * @returns Tooltip JSX element.
16
17
  *
17
18
  * @example
18
19
  * ```tsx
19
- * // Basic tooltip
20
- * <Tooltip text="This is a helpful tip">
21
- * <button>Hover me</button>
22
- * </Tooltip>
23
- *
24
- * // Tooltip with different orientations
25
- * <Tooltip text="Left tooltip" orientation="left">
26
- * <span>Hover for left tooltip</span>
27
- * </Tooltip>
28
- *
29
- * <Tooltip text="Right tooltip" orientation="right">
30
- * <span>Hover for right tooltip</span>
31
- * </Tooltip>
32
- *
33
- * // Different sizes
34
- * <Tooltip text="Small tooltip" size="md">
35
- * <button>Small tooltip</button>
36
- * </Tooltip>
37
- *
38
- * <Tooltip text="Large tooltip" size="lg">
39
- * <button>Large tooltip</button>
20
+ * <Tooltip text="Save changes before leaving">
21
+ * <IconButton icon={SaveIcon} aria-label="Save" />
40
22
  * </Tooltip>
41
23
  *
42
- * // Smart positioning - automatically adjusts if doesn't fit
43
- * <Tooltip text="This tooltip will auto-adjust position" orientation="left">
44
- * <button className="near-edge">Smart positioning</button>
24
+ * // Toolbar with bottom-oriented tooltips
25
+ * <Tooltip text="Add item" orientation="bottom">
26
+ * <IconButton icon={Plus} aria-label="Add" />
45
27
  * </Tooltip>
46
28
  *
47
- * // Complete example with custom styling
48
- * <Tooltip
49
- * text="Save your changes before proceeding"
50
- * orientation="bottom"
51
- * size="lg"
52
- * className="custom-tooltip"
53
- * >
54
- * <IconButton icon={SaveIcon} />
29
+ * <Tooltip text="Delete" orientation="bottom" size="md">
30
+ * <IconButton icon={Trash2} aria-label="Delete" scheme="danger" />
55
31
  * </Tooltip>
56
- *
57
- * // Multiple tooltips on same page
58
- * <div className="toolbar">
59
- * <Tooltip text="Create new file" orientation="bottom">
60
- * <IconButton icon={PlusIcon} />
61
- * </Tooltip>
62
- *
63
- * <Tooltip text="Open existing file" orientation="bottom">
64
- * <IconButton icon={FolderIcon} />
65
- * </Tooltip>
66
- *
67
- * <Tooltip text="Delete selected file" orientation="bottom">
68
- * <IconButton icon={TrashIcon} />
69
- * </Tooltip>
70
- * </div>
71
32
  * ```
72
33
  */
73
34
  function Tooltip(props) {