@televet/kibble-ui 4.0.0-beta.83 → 4.0.0-beta.85

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 (296) hide show
  1. package/dist/chunks/{alert.types-ChLcWuel.js → alert.types-BoVquQLV.js} +2 -2
  2. package/dist/chunks/{alert.types-ChLcWuel.js.map → alert.types-BoVquQLV.js.map} +1 -1
  3. package/dist/chunks/{alert.types-BuRcGwVs.js → alert.types-DPhgsCv5.js} +3 -3
  4. package/dist/chunks/{alert.types-BuRcGwVs.js.map → alert.types-DPhgsCv5.js.map} +1 -1
  5. package/dist/chunks/{avatar.component-CStlz24o.js → avatar.component-1VnTGefU.js} +2 -2
  6. package/dist/chunks/{avatar.component-CStlz24o.js.map → avatar.component-1VnTGefU.js.map} +1 -1
  7. package/dist/chunks/{avatar.component-xigxcdOe.js → avatar.component-C5SZVG16.js} +2 -2
  8. package/dist/chunks/{avatar.component-xigxcdOe.js.map → avatar.component-C5SZVG16.js.map} +1 -1
  9. package/dist/chunks/{avatarGroup.component-NNkXQT3H.js → avatarGroup.component-3tZR7cET.js} +2 -2
  10. package/dist/chunks/{avatarGroup.component-NNkXQT3H.js.map → avatarGroup.component-3tZR7cET.js.map} +1 -1
  11. package/dist/chunks/{avatarGroup.component-B0lzqxW5.js → avatarGroup.component-pSM7Kbli.js} +2 -2
  12. package/dist/chunks/{avatarGroup.component-B0lzqxW5.js.map → avatarGroup.component-pSM7Kbli.js.map} +1 -1
  13. package/dist/chunks/button.component-BpF3MzbZ.js.map +1 -1
  14. package/dist/chunks/button.component-Dd9AfGox.js.map +1 -1
  15. package/dist/chunks/{buttonGroup.component-VJL0Cunk.js → buttonGroup.component-C0yhMC9f.js} +2 -2
  16. package/dist/chunks/{buttonGroup.component-VJL0Cunk.js.map → buttonGroup.component-C0yhMC9f.js.map} +1 -1
  17. package/dist/chunks/{buttonGroup.component-B_QtRowk.js → buttonGroup.component-YRADr8Ih.js} +2 -2
  18. package/dist/chunks/{buttonGroup.component-B_QtRowk.js.map → buttonGroup.component-YRADr8Ih.js.map} +1 -1
  19. package/dist/chunks/{characterCounter.component-DbKKr4Cl.js → characterCounter.component-CleCgrM2.js} +2 -2
  20. package/dist/chunks/{characterCounter.component-DbKKr4Cl.js.map → characterCounter.component-CleCgrM2.js.map} +1 -1
  21. package/dist/chunks/{characterCounter.component-D4gbtPgf.js → characterCounter.component-DPDfdrN8.js} +2 -2
  22. package/dist/chunks/{characterCounter.component-D4gbtPgf.js.map → characterCounter.component-DPDfdrN8.js.map} +1 -1
  23. package/dist/chunks/checkbox.component-BlsLcspc.js +311 -0
  24. package/dist/chunks/{checkbox.component-DhXTRoeP.js.map → checkbox.component-BlsLcspc.js.map} +1 -1
  25. package/dist/chunks/checkbox.component-lMOGjCYC.js +2 -0
  26. package/dist/chunks/{checkbox.component-CKLGUOSX.js.map → checkbox.component-lMOGjCYC.js.map} +1 -1
  27. package/dist/chunks/{checkbox.records-4j704fMI.js → checkbox.records-CTlAD-2Q.js} +9 -9
  28. package/dist/chunks/{checkbox.records-4j704fMI.js.map → checkbox.records-CTlAD-2Q.js.map} +1 -1
  29. package/dist/chunks/{checkboxGroup.component-BE3s9USP.js → checkboxGroup.component-DLYU9ENF.js} +3 -3
  30. package/dist/chunks/{checkboxGroup.component-BE3s9USP.js.map → checkboxGroup.component-DLYU9ENF.js.map} +1 -1
  31. package/dist/chunks/{checkboxGroup.component-C7Nn0xjJ.js → checkboxGroup.component-_0rAYGE9.js} +2 -2
  32. package/dist/chunks/{checkboxGroup.component-C7Nn0xjJ.js.map → checkboxGroup.component-_0rAYGE9.js.map} +1 -1
  33. package/dist/chunks/{conversationCard.component-CAFi2W7w.js → conversationCard.component-BDy_K3a2.js} +8 -8
  34. package/dist/chunks/{conversationCard.component-CAFi2W7w.js.map → conversationCard.component-BDy_K3a2.js.map} +1 -1
  35. package/dist/chunks/{conversationCard.component-CnMm11fG.js → conversationCard.component-C8IIc07P.js} +2 -2
  36. package/dist/chunks/{conversationCard.component-CnMm11fG.js.map → conversationCard.component-C8IIc07P.js.map} +1 -1
  37. package/dist/chunks/datePicker.component-C6lCcMe6.js +15 -0
  38. package/dist/chunks/datePicker.component-C6lCcMe6.js.map +1 -0
  39. package/dist/chunks/{datePicker.component-Br_RW3fw.js → datePicker.component-_6xDNedH.js} +530 -581
  40. package/dist/chunks/datePicker.component-_6xDNedH.js.map +1 -0
  41. package/dist/chunks/{heading.component-B-FrSa28.js → heading.component-B5WajDE0.js} +2 -2
  42. package/dist/chunks/{heading.component-B-FrSa28.js.map → heading.component-B5WajDE0.js.map} +1 -1
  43. package/dist/chunks/{heading.component-CoM9gWlU.js → heading.component-BX2ec0zU.js} +2 -2
  44. package/dist/chunks/{heading.component-CoM9gWlU.js.map → heading.component-BX2ec0zU.js.map} +1 -1
  45. package/dist/chunks/isSymbol-BQN49XhJ.js +67 -0
  46. package/dist/chunks/isSymbol-BQN49XhJ.js.map +1 -0
  47. package/dist/chunks/isSymbol-BdGeV_e0.js +2 -0
  48. package/dist/chunks/isSymbol-BdGeV_e0.js.map +1 -0
  49. package/dist/chunks/link.component-BlCMfkSE.js +2 -0
  50. package/dist/chunks/link.component-BlCMfkSE.js.map +1 -0
  51. package/dist/chunks/link.component-Dk9j8As1.js +60 -0
  52. package/dist/chunks/link.component-Dk9j8As1.js.map +1 -0
  53. package/dist/chunks/{menu.component-DEnxu0vh.js → menu.component-C90cnsKe.js} +6 -6
  54. package/dist/chunks/{menu.component-DEnxu0vh.js.map → menu.component-C90cnsKe.js.map} +1 -1
  55. package/dist/chunks/menu.component-a9CU6Xdc.js +2 -0
  56. package/dist/chunks/{menu.component-BPtwVqUh.js.map → menu.component-a9CU6Xdc.js.map} +1 -1
  57. package/dist/chunks/{modal.types-XDLmSWyz.js → modal.types-Bz9iDbzg.js} +68 -71
  58. package/dist/chunks/modal.types-Bz9iDbzg.js.map +1 -0
  59. package/dist/chunks/modal.types-COCCoM45.js +2 -0
  60. package/dist/chunks/modal.types-COCCoM45.js.map +1 -0
  61. package/dist/chunks/pinInput.types-6wtKOTSv.js +2 -0
  62. package/dist/chunks/{pinInput.types-DSMdiVB_.js.map → pinInput.types-6wtKOTSv.js.map} +1 -1
  63. package/dist/chunks/pinInput.types-DFAg0pcH.js +161 -0
  64. package/dist/chunks/{pinInput.types-D8CEzrAw.js.map → pinInput.types-DFAg0pcH.js.map} +1 -1
  65. package/dist/chunks/popover.component-CEgqymGx.js +2 -0
  66. package/dist/chunks/popover.component-CEgqymGx.js.map +1 -0
  67. package/dist/chunks/popover.component-mpL0KcDz.js +260 -0
  68. package/dist/chunks/popover.component-mpL0KcDz.js.map +1 -0
  69. package/dist/chunks/popover.recipe--wfvH9po.js +236 -0
  70. package/dist/chunks/popover.recipe--wfvH9po.js.map +1 -0
  71. package/dist/chunks/popover.recipe-CAAwv6E3.js +2 -0
  72. package/dist/chunks/popover.recipe-CAAwv6E3.js.map +1 -0
  73. package/dist/chunks/radioGroup.component-CwPoKOrk.js +2 -0
  74. package/dist/chunks/radioGroup.component-CwPoKOrk.js.map +1 -0
  75. package/dist/chunks/radioGroup.component-L6mmgjJV.js +275 -0
  76. package/dist/chunks/radioGroup.component-L6mmgjJV.js.map +1 -0
  77. package/dist/chunks/ratingDots.component-BuxEbJLF.js +158 -0
  78. package/dist/chunks/ratingDots.component-BuxEbJLF.js.map +1 -0
  79. package/dist/chunks/ratingDots.component-D7WpH-ln.js +2 -0
  80. package/dist/chunks/ratingDots.component-D7WpH-ln.js.map +1 -0
  81. package/dist/chunks/select.component-CmG-5MFZ.js +1087 -0
  82. package/dist/chunks/select.component-CmG-5MFZ.js.map +1 -0
  83. package/dist/chunks/select.component-DYLk5hRh.js +2 -0
  84. package/dist/chunks/select.component-DYLk5hRh.js.map +1 -0
  85. package/dist/chunks/{sortableList.component-BDk7gDEa.js → sortableList.component-B4m7mF30.js} +2 -2
  86. package/dist/chunks/{sortableList.component-BDk7gDEa.js.map → sortableList.component-B4m7mF30.js.map} +1 -1
  87. package/dist/chunks/{sortableList.component-Bfb0hpZP.js → sortableList.component-SD4XVxo_.js} +2 -2
  88. package/dist/chunks/{sortableList.component-Bfb0hpZP.js.map → sortableList.component-SD4XVxo_.js.map} +1 -1
  89. package/dist/chunks/{spinner.component-BGFAakzz.js → spinner.component-ByAZ85b0.js} +2 -2
  90. package/dist/chunks/{spinner.component-BGFAakzz.js.map → spinner.component-ByAZ85b0.js.map} +1 -1
  91. package/dist/chunks/{spinner.component-kakTjXFe.js → spinner.component-DLmqMH1X.js} +2 -2
  92. package/dist/chunks/{spinner.component-kakTjXFe.js.map → spinner.component-DLmqMH1X.js.map} +1 -1
  93. package/dist/chunks/{styledAvatar.types-Bl_YAWyY.js → styledAvatar.types-DN31UUxr.js} +2 -2
  94. package/dist/chunks/{styledAvatar.types-Bl_YAWyY.js.map → styledAvatar.types-DN31UUxr.js.map} +1 -1
  95. package/dist/chunks/{styledAvatar.types-DpZkDaUD.js → styledAvatar.types-ITDQ7mOq.js} +2 -2
  96. package/dist/chunks/{styledAvatar.types-DpZkDaUD.js.map → styledAvatar.types-ITDQ7mOq.js.map} +1 -1
  97. package/dist/chunks/switch.component-BXDOMTzk.js +167 -0
  98. package/dist/chunks/{switch.component-DmwKAQWj.js.map → switch.component-BXDOMTzk.js.map} +1 -1
  99. package/dist/chunks/switch.component-BtiTaRED.js +2 -0
  100. package/dist/chunks/{switch.component-BIe8tduL.js.map → switch.component-BtiTaRED.js.map} +1 -1
  101. package/dist/chunks/{tabs.component-B6PT0IQT.js → tabs.component-BdGlS5MX.js} +2 -2
  102. package/dist/chunks/{tabs.component-B6PT0IQT.js.map → tabs.component-BdGlS5MX.js.map} +1 -1
  103. package/dist/chunks/{tabs.component-BSK85MmR.js → tabs.component-nYhuZwIl.js} +2 -2
  104. package/dist/chunks/{tabs.component-BSK85MmR.js.map → tabs.component-nYhuZwIl.js.map} +1 -1
  105. package/dist/chunks/tag.component-BAH11mPX.js +82 -0
  106. package/dist/chunks/tag.component-BAH11mPX.js.map +1 -0
  107. package/dist/chunks/tag.component-DcEASytC.js +2 -0
  108. package/dist/chunks/tag.component-DcEASytC.js.map +1 -0
  109. package/dist/chunks/{tagBlock.component-plcpLvwr.js → tagBlock.component-BRHnXvSa.js} +2 -2
  110. package/dist/chunks/{tagBlock.component-plcpLvwr.js.map → tagBlock.component-BRHnXvSa.js.map} +1 -1
  111. package/dist/chunks/{tagBlock.component-EeXuPoQR.js → tagBlock.component-C4v3cZHR.js} +6 -6
  112. package/dist/chunks/{tagBlock.component-EeXuPoQR.js.map → tagBlock.component-C4v3cZHR.js.map} +1 -1
  113. package/dist/chunks/{text.component-2XEOQ18v.js → text.component-C9eIXYn5.js} +2 -2
  114. package/dist/chunks/{text.component-2XEOQ18v.js.map → text.component-C9eIXYn5.js.map} +1 -1
  115. package/dist/chunks/{text.component-DwVoyMgc.js → text.component-CcMdvaZu.js} +2 -2
  116. package/dist/chunks/{text.component-DwVoyMgc.js.map → text.component-CcMdvaZu.js.map} +1 -1
  117. package/dist/chunks/textInput.component-B3fTdDHM.js +2 -0
  118. package/dist/chunks/textInput.component-B3fTdDHM.js.map +1 -0
  119. package/dist/chunks/textInput.component-DVGEbAZW.js +179 -0
  120. package/dist/chunks/textInput.component-DVGEbAZW.js.map +1 -0
  121. package/dist/chunks/textarea.component-Bfu6gH08.js +97 -0
  122. package/dist/chunks/{textarea.component-CvMV-9vc.js.map → textarea.component-Bfu6gH08.js.map} +1 -1
  123. package/dist/chunks/textarea.component-Dwb7sCt5.js +2 -0
  124. package/dist/chunks/{textarea.component-DKeXxrXq.js.map → textarea.component-Dwb7sCt5.js.map} +1 -1
  125. package/dist/chunks/{theme.provider-DlstBFnh.js → theme.provider-CRQB6gnt.js} +4 -4
  126. package/dist/chunks/{theme.provider-DlstBFnh.js.map → theme.provider-CRQB6gnt.js.map} +1 -1
  127. package/dist/chunks/{theme.provider-CjJqbp24.js → theme.provider-I45hIZ38.js} +746 -736
  128. package/dist/chunks/{theme.provider-CjJqbp24.js.map → theme.provider-I45hIZ38.js.map} +1 -1
  129. package/dist/chunks/{timePicker.component-DijlbrK2.js → timePicker.component-BdjeeKLB.js} +3 -3
  130. package/dist/chunks/{timePicker.component-DijlbrK2.js.map → timePicker.component-BdjeeKLB.js.map} +1 -1
  131. package/dist/chunks/{timePicker.component-BxtPrkRt.js → timePicker.component-CPAwAqZz.js} +2 -2
  132. package/dist/chunks/{timePicker.component-BxtPrkRt.js.map → timePicker.component-CPAwAqZz.js.map} +1 -1
  133. package/dist/chunks/{timeRange.component-DHf3so2g.js → timeRange.component--KYrOpO6.js} +2 -2
  134. package/dist/chunks/{timeRange.component-DHf3so2g.js.map → timeRange.component--KYrOpO6.js.map} +1 -1
  135. package/dist/chunks/{timeRange.component-BMwIQDLl.js → timeRange.component-A6MsbQya.js} +2 -2
  136. package/dist/chunks/{timeRange.component-BMwIQDLl.js.map → timeRange.component-A6MsbQya.js.map} +1 -1
  137. package/dist/chunks/{timestamp.component-WaxLNLaH.js → timestamp.component-DyVh49xt.js} +2 -2
  138. package/dist/chunks/{timestamp.component-WaxLNLaH.js.map → timestamp.component-DyVh49xt.js.map} +1 -1
  139. package/dist/chunks/{timestamp.component-YL3kdwx3.js → timestamp.component-jMwqadDM.js} +3 -3
  140. package/dist/chunks/{timestamp.component-YL3kdwx3.js.map → timestamp.component-jMwqadDM.js.map} +1 -1
  141. package/dist/chunks/{toaster.records-CcwOeMM7.js → toaster.records-BIYC2Ue0.js} +2 -1
  142. package/dist/chunks/{toaster.records-CcwOeMM7.js.map → toaster.records-BIYC2Ue0.js.map} +1 -1
  143. package/dist/chunks/{toaster.records-zJfplz5w.js → toaster.records-CDCJPDWP.js} +2 -2
  144. package/dist/chunks/{toaster.records-zJfplz5w.js.map → toaster.records-CDCJPDWP.js.map} +1 -1
  145. package/dist/chunks/{tooltip.component-C8Z7lI4c.js → tooltip.component-9qe1CRgu.js} +92 -92
  146. package/dist/chunks/{tooltip.component-C8Z7lI4c.js.map → tooltip.component-9qe1CRgu.js.map} +1 -1
  147. package/dist/chunks/{tooltip.component-tPcICCNY.js → tooltip.component-DlxNjrpO.js} +2 -2
  148. package/dist/chunks/{tooltip.component-tPcICCNY.js.map → tooltip.component-DlxNjrpO.js.map} +1 -1
  149. package/dist/chunks/{modal.context-EJ67QNzq.js → usePortalContentRef-CTrvBQ7I.js} +2 -2
  150. package/dist/chunks/usePortalContentRef-CTrvBQ7I.js.map +1 -0
  151. package/dist/chunks/{modal.context-DSKLfsJK.js → usePortalContentRef-KaU-iIV0.js} +2 -2
  152. package/dist/chunks/usePortalContentRef-KaU-iIV0.js.map +1 -0
  153. package/dist/chunks/{withFormControl-mCCJK8wX.js → withFormControl-C4OizqXz.js} +2 -2
  154. package/dist/chunks/{withFormControl-mCCJK8wX.js.map → withFormControl-C4OizqXz.js.map} +1 -1
  155. package/dist/chunks/{withFormControl-BcHQTSnc.js → withFormControl-D7WX39-P.js} +2 -2
  156. package/dist/chunks/{withFormControl-BcHQTSnc.js.map → withFormControl-D7WX39-P.js.map} +1 -1
  157. package/dist/chunks/{withTruncation-elowYDE4.js → withTruncation-D28HXn8p.js} +2 -2
  158. package/dist/chunks/{withTruncation-elowYDE4.js.map → withTruncation-D28HXn8p.js.map} +1 -1
  159. package/dist/chunks/{withTruncation-DpfcIWal.js → withTruncation-kHq-K8i9.js} +2 -2
  160. package/dist/chunks/{withTruncation-DpfcIWal.js.map → withTruncation-kHq-K8i9.js.map} +1 -1
  161. package/dist/cjs/components/Alert/index.cjs +1 -1
  162. package/dist/cjs/components/Avatar/index.cjs +1 -1
  163. package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
  164. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  165. package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
  166. package/dist/cjs/components/Checkbox/index.cjs +1 -1
  167. package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
  168. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  169. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  170. package/dist/cjs/components/Heading/index.cjs +1 -1
  171. package/dist/cjs/components/Link/index.cjs +1 -1
  172. package/dist/cjs/components/Menu/index.cjs +1 -1
  173. package/dist/cjs/components/Modal/index.cjs +1 -1
  174. package/dist/cjs/components/PinInput/index.cjs +1 -1
  175. package/dist/cjs/components/Popover/index.cjs +1 -1
  176. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  177. package/dist/cjs/components/RatingDots/index.cjs +1 -1
  178. package/dist/cjs/components/Select/index.cjs +1 -1
  179. package/dist/cjs/components/SortableList/index.cjs +1 -1
  180. package/dist/cjs/components/Spinner/index.cjs +1 -1
  181. package/dist/cjs/components/StyledAvatar/index.cjs +1 -1
  182. package/dist/cjs/components/Switch/index.cjs +1 -1
  183. package/dist/cjs/components/Tabs/index.cjs +1 -1
  184. package/dist/cjs/components/Tag/index.cjs +1 -1
  185. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  186. package/dist/cjs/components/Text/index.cjs +1 -1
  187. package/dist/cjs/components/TextInput/index.cjs +1 -1
  188. package/dist/cjs/components/Textarea/index.cjs +1 -1
  189. package/dist/cjs/components/TimePicker/index.cjs +1 -1
  190. package/dist/cjs/components/TimeRange/index.cjs +1 -1
  191. package/dist/cjs/components/Timestamp/index.cjs +1 -1
  192. package/dist/cjs/components/Toast/index.cjs +1 -1
  193. package/dist/cjs/components/Toast/index.cjs.map +1 -1
  194. package/dist/cjs/components/Tooltip/index.cjs +1 -1
  195. package/dist/cjs/components/index.cjs +1 -1
  196. package/dist/cjs/index.cjs +1 -1
  197. package/dist/cjs/theme/index.cjs +1 -1
  198. package/dist/esm/components/Alert/index.js +1 -1
  199. package/dist/esm/components/Avatar/index.js +1 -1
  200. package/dist/esm/components/AvatarGroup/index.js +1 -1
  201. package/dist/esm/components/ButtonGroup/index.js +1 -1
  202. package/dist/esm/components/CharacterCounter/index.js +1 -1
  203. package/dist/esm/components/Checkbox/index.js +1 -1
  204. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  205. package/dist/esm/components/ConversationCard/index.js +1 -1
  206. package/dist/esm/components/DatePicker/index.js +1 -1
  207. package/dist/esm/components/Heading/index.js +1 -1
  208. package/dist/esm/components/Link/index.js +1 -1
  209. package/dist/esm/components/Menu/index.js +1 -1
  210. package/dist/esm/components/Modal/index.js +1 -1
  211. package/dist/esm/components/PinInput/index.js +1 -1
  212. package/dist/esm/components/Popover/index.js +1 -1
  213. package/dist/esm/components/RadioGroup/index.js +1 -1
  214. package/dist/esm/components/RatingDots/index.js +1 -1
  215. package/dist/esm/components/Select/index.js +1 -1
  216. package/dist/esm/components/SortableList/index.js +1 -1
  217. package/dist/esm/components/Spinner/index.js +1 -1
  218. package/dist/esm/components/StyledAvatar/index.js +1 -1
  219. package/dist/esm/components/Switch/index.js +1 -1
  220. package/dist/esm/components/Tabs/index.js +1 -1
  221. package/dist/esm/components/Tag/index.js +1 -1
  222. package/dist/esm/components/TagBlock/index.js +1 -1
  223. package/dist/esm/components/Text/index.js +1 -1
  224. package/dist/esm/components/TextInput/index.js +1 -1
  225. package/dist/esm/components/Textarea/index.js +1 -1
  226. package/dist/esm/components/TimePicker/index.js +1 -1
  227. package/dist/esm/components/TimeRange/index.js +1 -1
  228. package/dist/esm/components/Timestamp/index.js +1 -1
  229. package/dist/esm/components/Toast/index.js +2 -2
  230. package/dist/esm/components/Toast/index.js.map +1 -1
  231. package/dist/esm/components/Tooltip/index.js +1 -1
  232. package/dist/esm/components/index.js +35 -35
  233. package/dist/esm/index.js +33 -33
  234. package/dist/esm/theme/index.js +1 -1
  235. package/dist/types/components/Checkbox/checkbox.component.d.ts +4 -3
  236. package/dist/types/components/PinInput/pinInput.component.d.ts +5 -3
  237. package/dist/types/components/Popover/popover.component.d.ts +1 -1
  238. package/dist/types/components/RadioGroup/components/Radio/radio.component.d.ts +5 -3
  239. package/dist/types/components/RatingDots/ratingDots.component.d.ts +2 -1
  240. package/dist/types/components/Select/select.component.d.ts +6 -4
  241. package/dist/types/components/Select/select.types.d.ts +2 -1
  242. package/dist/types/components/Switch/switch.component.d.ts +3 -2
  243. package/dist/types/components/TextInput/textInput.component.d.ts +4 -4
  244. package/dist/types/components/Textarea/textarea.component.d.ts +3 -3
  245. package/dist/types/hooks/usePortalContentRef.d.ts +6 -0
  246. package/package.json +1 -1
  247. package/dist/chunks/checkbox.component-CKLGUOSX.js +0 -2
  248. package/dist/chunks/checkbox.component-DhXTRoeP.js +0 -310
  249. package/dist/chunks/datePicker.component-Br_RW3fw.js.map +0 -1
  250. package/dist/chunks/datePicker.component-CjxszEi6.js +0 -15
  251. package/dist/chunks/datePicker.component-CjxszEi6.js.map +0 -1
  252. package/dist/chunks/link.component-CCFg-LIe.js +0 -2
  253. package/dist/chunks/link.component-CCFg-LIe.js.map +0 -1
  254. package/dist/chunks/link.component-DprieyUG.js +0 -60
  255. package/dist/chunks/link.component-DprieyUG.js.map +0 -1
  256. package/dist/chunks/menu.component-BPtwVqUh.js +0 -2
  257. package/dist/chunks/modal.context-DSKLfsJK.js.map +0 -1
  258. package/dist/chunks/modal.context-EJ67QNzq.js.map +0 -1
  259. package/dist/chunks/modal.types-Uq7F3jX9.js +0 -2
  260. package/dist/chunks/modal.types-Uq7F3jX9.js.map +0 -1
  261. package/dist/chunks/modal.types-XDLmSWyz.js.map +0 -1
  262. package/dist/chunks/pinInput.types-D8CEzrAw.js +0 -161
  263. package/dist/chunks/pinInput.types-DSMdiVB_.js +0 -2
  264. package/dist/chunks/popover-BSBYgvs4.js +0 -2
  265. package/dist/chunks/popover-BSBYgvs4.js.map +0 -1
  266. package/dist/chunks/popover-DNKVYG-J.js +0 -110
  267. package/dist/chunks/popover-DNKVYG-J.js.map +0 -1
  268. package/dist/chunks/popover.component-BnHUHa9S.js +0 -2
  269. package/dist/chunks/popover.component-BnHUHa9S.js.map +0 -1
  270. package/dist/chunks/popover.component-DT2gq3KB.js +0 -387
  271. package/dist/chunks/popover.component-DT2gq3KB.js.map +0 -1
  272. package/dist/chunks/radioGroup.component-3KGZ0rr_.js +0 -275
  273. package/dist/chunks/radioGroup.component-3KGZ0rr_.js.map +0 -1
  274. package/dist/chunks/radioGroup.component-DWMMKXA1.js +0 -2
  275. package/dist/chunks/radioGroup.component-DWMMKXA1.js.map +0 -1
  276. package/dist/chunks/ratingDots.component-BAwBMoag.js +0 -2
  277. package/dist/chunks/ratingDots.component-BAwBMoag.js.map +0 -1
  278. package/dist/chunks/ratingDots.component-BTtsR95a.js +0 -158
  279. package/dist/chunks/ratingDots.component-BTtsR95a.js.map +0 -1
  280. package/dist/chunks/select.component-LTpdnqVb.js +0 -391
  281. package/dist/chunks/select.component-LTpdnqVb.js.map +0 -1
  282. package/dist/chunks/select.component-Vl8xEr6A.js +0 -2
  283. package/dist/chunks/select.component-Vl8xEr6A.js.map +0 -1
  284. package/dist/chunks/switch.component-BIe8tduL.js +0 -2
  285. package/dist/chunks/switch.component-DmwKAQWj.js +0 -166
  286. package/dist/chunks/tag.component-C6a6EzZB.js +0 -2
  287. package/dist/chunks/tag.component-C6a6EzZB.js.map +0 -1
  288. package/dist/chunks/tag.component-pexJ0TAT.js +0 -82
  289. package/dist/chunks/tag.component-pexJ0TAT.js.map +0 -1
  290. package/dist/chunks/textInput.component-C9OmzJd9.js +0 -180
  291. package/dist/chunks/textInput.component-C9OmzJd9.js.map +0 -1
  292. package/dist/chunks/textInput.component-rWxcxFXP.js +0 -2
  293. package/dist/chunks/textInput.component-rWxcxFXP.js.map +0 -1
  294. package/dist/chunks/textarea.component-CvMV-9vc.js +0 -98
  295. package/dist/chunks/textarea.component-DKeXxrXq.js +0 -2
  296. package/dist/types/components/Modal/context/modal.context.d.ts +0 -6
@@ -0,0 +1,2 @@
1
+ "use strict";const t=require("./jsx-runtime-BjDatQAs.js"),u=require("react"),y=require("./withFormControl-D7WX39-P.js"),P=require("./button.component-Dd9AfGox.js"),b=require("./characterCounter.component-CleCgrM2.js"),T=require("./box-Baq7UBls.js"),k=require("./empty-B5_AO6Pg.js"),C=require("./factory-D6tdBUPG.js"),w=require("./use-recipe-DaPWl_pL.js"),A=require("./group-Cv7AQw1b.js"),v=require("./create-recipe-context-sESms8Eo.js"),N=require("./use-locale-context-D0LByRu9.js"),S=require("./use-field-context-CArmgHPP.js"),F=require("./index-CHIISuTq.js"),B=e=>e&&e.__esModule?e:{default:e},G=B(u),_=u.forwardRef((e,o)=>{const n=S.useFieldContext(),r=F.mergeProps(n?.getInputProps(),e);return t.jsxRuntimeExports.jsx(N.ark.input,{...r,ref:o})});_.displayName="FieldInput";const{withContext:M}=v.createRecipeContext({key:"input"}),z=M(_),R=u.forwardRef(function({unstyled:o,...n},r){const p=w.useRecipe({key:"inputAddon",recipe:n.recipe}),[i,a]=p.splitVariantProps(n),s=o?k.EMPTY_SLOT_STYLES:p(i);return t.jsxRuntimeExports.jsx(C.chakra.div,{ref:r,...a,css:[s,n.css]})}),I=C.chakra("div",{base:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",zIndex:2,color:"fg.muted",height:"full",fontSize:"sm",px:"3"},variants:{placement:{start:{insetInlineStart:"0"},end:{insetInlineEnd:"0"}}}}),D=u.forwardRef(function(o,n){const{startElement:r,startElementProps:p,endElement:i,endElementProps:a,startAddon:s,startAddonProps:m,endAddon:d,endAddonProps:x,children:l,startOffset:c="0px",endOffset:f="0px",...h}=o,j=u.Children.only(l),E=!!(s||d);return t.jsxRuntimeExports.jsxs(A.Group,{width:"full",ref:n,attached:E,skip:q=>q.type===I,...h,children:[s&&t.jsxRuntimeExports.jsx(R,{...m,children:s}),r&&t.jsxRuntimeExports.jsx(I,{pointerEvents:"none",...p,children:r}),u.cloneElement(j,{...r&&{ps:`calc(var(--input-height) - ${c})`},...i&&{pe:`calc(var(--input-height) - ${f})`},...l.props}),i&&t.jsxRuntimeExports.jsx(I,{placement:"end",...a,children:i}),d&&t.jsxRuntimeExports.jsx(R,{...x,children:d})]})}),L={sm:"xs",md:"sm",lg:"md"},g=G.default.forwardRef(({charLimit:e=void 0,clearable:o=!1,disabled:n=!1,inputRef:r,invalid:p,leftAddon:i,leftElement:a,onClear:s,onContrast:m,rightAddon:d,rightElement:x,size:l="md",value:c,...f},h)=>{const j=()=>{s&&s(c||"")};o&&c&&!n&&(x=t.jsxRuntimeExports.jsx(P.Button,{className:"TextInput__ClearButton","data-testid":"kibble-text-input-clear-button",size:L[l],variant:"ghostNeutral",onClick:j,iconName:"close"}));const E=u.useMemo(()=>c?.toString()?.length||0,[c]);return t.jsxRuntimeExports.jsxs(T.Box,{className:"TextInput__Wrapper",position:"relative",w:"100%",children:[t.jsxRuntimeExports.jsx(D,{className:"TextInput__InputGroup","data-testid":"kibble-text-input-group",startElement:a,startElementProps:{color:"inherit",_groupDisabled:{opacity:.6}},endElement:x,endElementProps:{color:"inherit",paddingInline:1.5,_groupDisabled:{opacity:.6}},startAddon:i,endAddon:d,children:t.jsxRuntimeExports.jsx(z,{"data-testid":"kibble-text-input",className:"TextInput",ref:r||h,value:c,size:l,disabled:n,...p&&{"aria-invalid":!0},variant:m?"onContrast":"default",...f})}),!!e&&t.jsxRuntimeExports.jsx(b.CharacterCounter,{withLimit:!0,limit:e,currentCount:E})]})});g.displayName="TextInput";const O=y.withFormControl(g);exports.WrappedTextInput=O;
2
+ //# sourceMappingURL=textInput.component-B3fTdDHM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textInput.component-B3fTdDHM.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-addon.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-element.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-group.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { EMPTY_SLOT_STYLES } from '../../styled-system/empty.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { useRecipe } from '../../styled-system/use-recipe.js';\n\nconst InputAddon = forwardRef(\n function InputAddon2({ unstyled, ...props }, ref) {\n const recipe = useRecipe({ key: \"inputAddon\", recipe: props.recipe });\n const [variantProps, localProps] = recipe.splitVariantProps(props);\n const styles = unstyled ? EMPTY_SLOT_STYLES : recipe(variantProps);\n return /* @__PURE__ */ jsx(chakra.div, { ref, ...localProps, css: [styles, props.css] });\n }\n);\n\nexport { InputAddon };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst InputElement = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n zIndex: 2,\n color: \"fg.muted\",\n height: \"full\",\n fontSize: \"sm\",\n px: \"3\"\n },\n variants: {\n placement: {\n start: {\n insetInlineStart: \"0\"\n },\n end: {\n insetInlineEnd: \"0\"\n }\n }\n }\n});\n\nexport { InputElement };\n","\"use strict\";\n\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, Children, cloneElement } from 'react';\nimport { InputAddon } from './input-addon.js';\nimport { InputElement } from './input-element.js';\nimport { Group } from '../group/group.js';\n\nconst InputGroup = forwardRef(\n function InputGroup2(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n startAddon,\n startAddonProps,\n endAddon,\n endAddonProps,\n children,\n startOffset = \"0px\",\n endOffset = \"0px\",\n ...rest\n } = props;\n const child = Children.only(children);\n const attached = Boolean(startAddon || endAddon);\n return /* @__PURE__ */ jsxs(\n Group,\n {\n width: \"full\",\n ref,\n attached,\n skip: (el) => el.type === InputElement,\n ...rest,\n children: [\n startAddon && /* @__PURE__ */ jsx(InputAddon, { ...startAddonProps, children: startAddon }),\n startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: \"none\", ...startElementProps, children: startElement }),\n cloneElement(child, {\n ...startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`\n },\n ...endElement && { pe: `calc(var(--input-height) - ${endOffset})` },\n ...children.props\n }),\n endElement && /* @__PURE__ */ jsx(InputElement, { placement: \"end\", ...endElementProps, children: endElement }),\n endAddon && /* @__PURE__ */ jsx(InputAddon, { ...endAddonProps, children: endAddon })\n ]\n }\n );\n }\n);\n\nexport { InputGroup };\n","import { ButtonSize } from \"components/Button/button.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: \"xs\",\n md: \"sm\",\n lg: \"md\",\n};\n","import React, { useMemo } from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport {\n Input as CInput,\n InputProps as CInputProps,\n InputGroup,\n} from \"@chakra-ui/react/input\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { Button } from \"components/Button/button.component\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\nimport { closeButtonSizeMap } from \"./textInput.records\";\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n charLimit?: number;\n inputRef?: React.RefObject<HTMLInputElement | null>;\n leftAddon?: React.ReactNode;\n leftElement?: React.ReactNode;\n onContrast?: boolean;\n rightAddon?: React.ReactNode;\n rightElement?: React.ReactNode;\n size?: FormControlSize;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n clearable?: never;\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n clearable?: boolean;\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(\n (\n {\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = \"md\",\n value,\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || \"\");\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid=\"kibble-text-input-clear-button\"\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Box className=\"TextInput__Wrapper\" position=\"relative\" w=\"100%\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid=\"kibble-text-input-group\"\n startElement={leftElement}\n startElementProps={{\n color: \"inherit\",\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: \"inherit\",\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid=\"kibble-text-input\"\n className=\"TextInput\"\n ref={inputRef || ref}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { \"aria-invalid\": true })}\n variant={onContrast ? \"onContrast\" : \"default\"}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Box>\n );\n },\n);\n\nTextInput.displayName = \"TextInput\";\nconst WrappedTextInput = withFormControl<TextInputProps>(TextInput);\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","InputAddon","unstyled","recipe","useRecipe","variantProps","localProps","styles","EMPTY_SLOT_STYLES","chakra","InputElement","InputGroup","startElement","startElementProps","endElement","endElementProps","startAddon","startAddonProps","endAddon","endAddonProps","children","startOffset","endOffset","rest","child","Children","attached","jsxs","Group","el","cloneElement","closeButtonSizeMap","TextInput","React","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","handleClear","Button","currentCharCount","useMemo","Box","CInput","CharacterCounter","WrappedTextInput","withFormControl"],"mappings":"2lBAOMA,EAAaC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC5C,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,GAAO,cAAa,EAAIF,CAAK,EAC5D,OAAuBM,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,MAAO,CAAE,GAAGH,EAAa,IAAAH,EAAK,CAC/D,CAAC,EACDH,EAAW,YAAc,aCPzB,KAAM,CAAE,YAAAU,CAA2B,EAAIC,sBAAoB,CACzD,IAAK,OACP,CAAC,EACKC,EAAQF,EAAYG,CAAW,ECA/BC,EAAab,EAAU,WAC3B,SAAqB,CAAE,SAAAc,EAAU,GAAGb,CAAK,EAAIC,EAAK,CAChD,MAAMa,EAASC,EAAS,UAAC,CAAE,IAAK,aAAc,OAAQf,EAAM,OAAQ,EAC9D,CAACgB,EAAcC,CAAU,EAAIH,EAAO,kBAAkBd,CAAK,EAC3DkB,EAASL,EAAWM,oBAAoBL,E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ACC,GAAIE,GAAW,CAAE,eAAgB,EAAK,EACvC,QAASI,EAAa,aAAe,UACpC,GAAGnB,CAAA,CAAA,CACN,CACF,EACC,CAAC,CAACW,GACDvC,EAAA,kBAAA,IAAC0D,EAAA,iBAAA,CACC,UAAW,GACX,MAAOnB,EACP,aAAce,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEAjB,EAAU,YAAc,YAClB,MAAAsB,EAAmBC,kBAAgCvB,CAAS","x_google_ignoreList":[0,1,2,3,4]}
@@ -0,0 +1,179 @@
1
+ import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
+ import b, { forwardRef as j, Children as T, cloneElement as k, useMemo as A } from "react";
3
+ import { w as v } from "./withFormControl-C4OizqXz.js";
4
+ import { B as w } from "./button.component-BpF3MzbZ.js";
5
+ import { C as N } from "./characterCounter.component-DPDfdrN8.js";
6
+ import { B } from "./box-Ck9I7FYv.js";
7
+ import { E as S } from "./empty-BU2EAux9.js";
8
+ import { c as E } from "./factory-Ctbv0Ozn.js";
9
+ import { u as R } from "./use-recipe-d63ABaZ3.js";
10
+ import { G } from "./group-DPCVolOl.js";
11
+ import { c as F } from "./create-recipe-context-D7FewUR4.js";
12
+ import { f as z } from "./use-locale-context-BiiNTYMT.js";
13
+ import { u as M } from "./use-field-context-Cm3grEyV.js";
14
+ import { a1 as O } from "./index-YtNA0Ueo.js";
15
+ const P = j((a, r) => {
16
+ const e = M(), n = O(e?.getInputProps(), a);
17
+ return /* @__PURE__ */ t.jsx(z.input, { ...n, ref: r });
18
+ });
19
+ P.displayName = "FieldInput";
20
+ const { withContext: W } = F({
21
+ key: "input"
22
+ }), D = W(P), C = j(
23
+ function({ unstyled: r, ...e }, n) {
24
+ const p = R({ key: "inputAddon", recipe: e.recipe }), [s, d] = p.splitVariantProps(e), o = r ? S : p(s);
25
+ return /* @__PURE__ */ t.jsx(E.div, { ref: n, ...d, css: [o, e.css] });
26
+ }
27
+ ), g = E("div", {
28
+ base: {
29
+ display: "flex",
30
+ alignItems: "center",
31
+ justifyContent: "center",
32
+ position: "absolute",
33
+ zIndex: 2,
34
+ color: "fg.muted",
35
+ height: "full",
36
+ fontSize: "sm",
37
+ px: "3"
38
+ },
39
+ variants: {
40
+ placement: {
41
+ start: {
42
+ insetInlineStart: "0"
43
+ },
44
+ end: {
45
+ insetInlineEnd: "0"
46
+ }
47
+ }
48
+ }
49
+ }), L = j(
50
+ function(r, e) {
51
+ const {
52
+ startElement: n,
53
+ startElementProps: p,
54
+ endElement: s,
55
+ endElementProps: d,
56
+ startAddon: o,
57
+ startAddonProps: u,
58
+ endAddon: l,
59
+ endAddonProps: m,
60
+ children: c,
61
+ startOffset: i = "0px",
62
+ endOffset: f = "0px",
63
+ ...x
64
+ } = r, h = T.only(c), I = !!(o || l);
65
+ return /* @__PURE__ */ t.jsxs(
66
+ G,
67
+ {
68
+ width: "full",
69
+ ref: e,
70
+ attached: I,
71
+ skip: (y) => y.type === g,
72
+ ...x,
73
+ children: [
74
+ o && /* @__PURE__ */ t.jsx(C, { ...u, children: o }),
75
+ n && /* @__PURE__ */ t.jsx(g, { pointerEvents: "none", ...p, children: n }),
76
+ k(h, {
77
+ ...n && {
78
+ ps: `calc(var(--input-height) - ${i})`
79
+ },
80
+ ...s && { pe: `calc(var(--input-height) - ${f})` },
81
+ ...c.props
82
+ }),
83
+ s && /* @__PURE__ */ t.jsx(g, { placement: "end", ...d, children: s }),
84
+ l && /* @__PURE__ */ t.jsx(C, { ...m, children: l })
85
+ ]
86
+ }
87
+ );
88
+ }
89
+ ), Y = {
90
+ sm: "xs",
91
+ md: "sm",
92
+ lg: "md"
93
+ }, _ = b.forwardRef(
94
+ ({
95
+ charLimit: a = void 0,
96
+ clearable: r = !1,
97
+ disabled: e = !1,
98
+ inputRef: n,
99
+ invalid: p,
100
+ leftAddon: s,
101
+ leftElement: d,
102
+ onClear: o,
103
+ onContrast: u,
104
+ rightAddon: l,
105
+ rightElement: m,
106
+ size: c = "md",
107
+ value: i,
108
+ ...f
109
+ }, x) => {
110
+ const h = () => {
111
+ o && o(i || "");
112
+ };
113
+ r && i && !e && (m = /* @__PURE__ */ t.jsx(
114
+ w,
115
+ {
116
+ className: "TextInput__ClearButton",
117
+ "data-testid": "kibble-text-input-clear-button",
118
+ size: Y[c],
119
+ variant: "ghostNeutral",
120
+ onClick: h,
121
+ iconName: "close"
122
+ }
123
+ ));
124
+ const I = A(
125
+ () => i?.toString()?.length || 0,
126
+ [i]
127
+ );
128
+ return /* @__PURE__ */ t.jsxs(B, { className: "TextInput__Wrapper", position: "relative", w: "100%", children: [
129
+ /* @__PURE__ */ t.jsx(
130
+ L,
131
+ {
132
+ className: "TextInput__InputGroup",
133
+ "data-testid": "kibble-text-input-group",
134
+ startElement: d,
135
+ startElementProps: {
136
+ color: "inherit",
137
+ _groupDisabled: { opacity: 0.6 }
138
+ },
139
+ endElement: m,
140
+ endElementProps: {
141
+ color: "inherit",
142
+ paddingInline: 1.5,
143
+ _groupDisabled: { opacity: 0.6 }
144
+ },
145
+ startAddon: s,
146
+ endAddon: l,
147
+ children: /* @__PURE__ */ t.jsx(
148
+ D,
149
+ {
150
+ "data-testid": "kibble-text-input",
151
+ className: "TextInput",
152
+ ref: n || x,
153
+ value: i,
154
+ size: c,
155
+ disabled: e,
156
+ ...p && { "aria-invalid": !0 },
157
+ variant: u ? "onContrast" : "default",
158
+ ...f
159
+ }
160
+ )
161
+ }
162
+ ),
163
+ !!a && /* @__PURE__ */ t.jsx(
164
+ N,
165
+ {
166
+ withLimit: !0,
167
+ limit: a,
168
+ currentCount: I
169
+ }
170
+ )
171
+ ] });
172
+ }
173
+ );
174
+ _.displayName = "TextInput";
175
+ const rt = v(_);
176
+ export {
177
+ rt as W
178
+ };
179
+ //# sourceMappingURL=textInput.component-DVGEbAZW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textInput.component-DVGEbAZW.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-addon.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-element.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-group.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { EMPTY_SLOT_STYLES } from '../../styled-system/empty.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { useRecipe } from '../../styled-system/use-recipe.js';\n\nconst InputAddon = forwardRef(\n function InputAddon2({ unstyled, ...props }, ref) {\n const recipe = useRecipe({ key: \"inputAddon\", recipe: props.recipe });\n const [variantProps, localProps] = recipe.splitVariantProps(props);\n const styles = unstyled ? EMPTY_SLOT_STYLES : recipe(variantProps);\n return /* @__PURE__ */ jsx(chakra.div, { ref, ...localProps, css: [styles, props.css] });\n }\n);\n\nexport { InputAddon };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst InputElement = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n zIndex: 2,\n color: \"fg.muted\",\n height: \"full\",\n fontSize: \"sm\",\n px: \"3\"\n },\n variants: {\n placement: {\n start: {\n insetInlineStart: \"0\"\n },\n end: {\n insetInlineEnd: \"0\"\n }\n }\n }\n});\n\nexport { InputElement };\n","\"use strict\";\n\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, Children, cloneElement } from 'react';\nimport { InputAddon } from './input-addon.js';\nimport { InputElement } from './input-element.js';\nimport { Group } from '../group/group.js';\n\nconst InputGroup = forwardRef(\n function InputGroup2(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n startAddon,\n startAddonProps,\n endAddon,\n endAddonProps,\n children,\n startOffset = \"0px\",\n endOffset = \"0px\",\n ...rest\n } = props;\n const child = Children.only(children);\n const attached = Boolean(startAddon || endAddon);\n return /* @__PURE__ */ jsxs(\n Group,\n {\n width: \"full\",\n ref,\n attached,\n skip: (el) => el.type === InputElement,\n ...rest,\n children: [\n startAddon && /* @__PURE__ */ jsx(InputAddon, { ...startAddonProps, children: startAddon }),\n startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: \"none\", ...startElementProps, children: startElement }),\n cloneElement(child, {\n ...startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`\n },\n ...endElement && { pe: `calc(var(--input-height) - ${endOffset})` },\n ...children.props\n }),\n endElement && /* @__PURE__ */ jsx(InputElement, { placement: \"end\", ...endElementProps, children: endElement }),\n endAddon && /* @__PURE__ */ jsx(InputAddon, { ...endAddonProps, children: endAddon })\n ]\n }\n );\n }\n);\n\nexport { InputGroup };\n","import { ButtonSize } from \"components/Button/button.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: \"xs\",\n md: \"sm\",\n lg: \"md\",\n};\n","import React, { useMemo } from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport {\n Input as CInput,\n InputProps as CInputProps,\n InputGroup,\n} from \"@chakra-ui/react/input\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { Button } from \"components/Button/button.component\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\nimport { closeButtonSizeMap } from \"./textInput.records\";\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n charLimit?: number;\n inputRef?: React.RefObject<HTMLInputElement | null>;\n leftAddon?: React.ReactNode;\n leftElement?: React.ReactNode;\n onContrast?: boolean;\n rightAddon?: React.ReactNode;\n rightElement?: React.ReactNode;\n size?: FormControlSize;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n clearable?: never;\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n clearable?: boolean;\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(\n (\n {\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = \"md\",\n value,\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || \"\");\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid=\"kibble-text-input-clear-button\"\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Box className=\"TextInput__Wrapper\" position=\"relative\" w=\"100%\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid=\"kibble-text-input-group\"\n startElement={leftElement}\n startElementProps={{\n color: \"inherit\",\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: \"inherit\",\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid=\"kibble-text-input\"\n className=\"TextInput\"\n ref={inputRef || ref}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { \"aria-invalid\": true })}\n variant={onContrast ? \"onContrast\" : \"default\"}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Box>\n );\n },\n);\n\nTextInput.displayName = \"TextInput\";\nconst WrappedTextInput = withFormControl<TextInputProps>(TextInput);\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","InputAddon","unstyled","recipe","useRecipe","variantProps","localProps","styles","EMPTY_SLOT_STYLES","chakra","InputElement","InputGroup","startElement","startElementProps","endElement","endElementProps","startAddon","startAddonProps","endAddon","endAddonProps","children","startOffset","endOffset","rest","child","Children","attached","jsxs","Group","el","cloneElement","closeButtonSizeMap","TextInput","React","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","handleClear","Button","currentCharCount","useMemo","Box","CInput","CharacterCounter","WrappedTextInput","withFormControl"],"mappings":";;;;;;;;;;;;;;AAOA,MAAMA,IAAaC,EAAW,CAACC,GAAOC,MAAQ;AAC5C,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,GAAO,cAAa,GAAIF,CAAK;AAC5D,SAAuBM,gBAAAA,EAAAA,IAAIC,EAAI,OAAO,EAAE,GAAGH,GAAa,KAAAH,GAAK;AAC/D,CAAC;AACDH,EAAW,cAAc;ACPzB,MAAM,EAAE,aAAAU,EAA2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AAOnB;AAAA,UACP,cAAce;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN;AAEAjB,EAAU,cAAc;AAClB,MAAAsB,KAAmBC,EAAgCvB,CAAS;","x_google_ignoreList":[0,1,2,3,4]}
@@ -0,0 +1,97 @@
1
+ import { j as p } from "./jsx-runtime-C5mzlN2N.js";
2
+ import u, { forwardRef as l, useRef as x, useEffect as v, useMemo as g } from "react";
3
+ import { w as h } from "./withFormControl-C4OizqXz.js";
4
+ import { C as w } from "./characterCounter.component-DPDfdrN8.js";
5
+ import { F as b } from "./flex-smlF8uQG.js";
6
+ import { c as F } from "./create-recipe-context-D7FewUR4.js";
7
+ import { e as y, F as C, G as T, a1 as j } from "./index-YtNA0Ueo.js";
8
+ import { f as O, h as R } from "./use-locale-context-BiiNTYMT.js";
9
+ import { u as E } from "./use-field-context-Cm3grEyV.js";
10
+ var P = (e) => {
11
+ if (!e) return;
12
+ const t = y(e), o = C(e), n = T(e), r = () => {
13
+ requestAnimationFrame(() => {
14
+ e.style.height = "auto";
15
+ let s;
16
+ t.boxSizing === "content-box" ? s = e.scrollHeight - (parseFloat(t.paddingTop) + parseFloat(t.paddingBottom)) : s = e.scrollHeight + parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth), t.maxHeight !== "none" && s > parseFloat(t.maxHeight) ? (t.overflowY === "hidden" && (e.style.overflowY = "scroll"), s = parseFloat(t.maxHeight)) : t.overflowY !== "hidden" && (e.style.overflowY = "hidden"), e.style.height = `${s}px`;
17
+ });
18
+ };
19
+ e.addEventListener("input", r), e.form?.addEventListener("reset", r);
20
+ const a = Object.getPrototypeOf(e), i = Object.getOwnPropertyDescriptor(a, "value");
21
+ Object.defineProperty(e, "value", {
22
+ ...i,
23
+ set() {
24
+ i?.set?.apply(this, arguments), r();
25
+ }
26
+ });
27
+ const d = new o.ResizeObserver(() => {
28
+ requestAnimationFrame(() => r());
29
+ });
30
+ d.observe(e);
31
+ const m = new o.MutationObserver(() => r());
32
+ return m.observe(e, { attributes: !0, attributeFilter: ["rows", "placeholder"] }), n.fonts?.addEventListener("loadingdone", r), () => {
33
+ e.removeEventListener("input", r), e.form?.removeEventListener("reset", r), n.fonts?.removeEventListener("loadingdone", r), d.disconnect(), m.disconnect();
34
+ };
35
+ };
36
+ const c = l((e, t) => {
37
+ const { autoresize: o, ...n } = e, r = x(null), a = E(), i = j(
38
+ a?.getTextareaProps(),
39
+ { style: { resize: o ? "none" : void 0 } },
40
+ n
41
+ );
42
+ return v(() => {
43
+ if (o)
44
+ return P(r.current);
45
+ }, [o]), /* @__PURE__ */ p.jsx(O.textarea, { ...i, ref: R(t, r) });
46
+ });
47
+ c.displayName = "FieldTextarea";
48
+ const { withContext: z } = F({
49
+ key: "textarea"
50
+ }), H = z(
51
+ c
52
+ ), f = u.forwardRef(
53
+ ({
54
+ charLimit: e = void 0,
55
+ invalid: t,
56
+ onContrast: o,
57
+ resize: n = "none",
58
+ textareaRef: r,
59
+ value: a,
60
+ ...i
61
+ }, d) => {
62
+ const m = o ? "onContrast" : "default", s = g(
63
+ () => a?.toString()?.length || 0,
64
+ [a]
65
+ );
66
+ return /* @__PURE__ */ p.jsxs(b, { className: "Textarea__Wrapper", position: "relative", w: "100%", children: [
67
+ /* @__PURE__ */ p.jsx(
68
+ H,
69
+ {
70
+ className: "Textarea",
71
+ "data-testid": "kibble-textarea",
72
+ ref: r || d,
73
+ resize: n,
74
+ variant: m,
75
+ value: a,
76
+ ...t && { "aria-invalid": !0 },
77
+ minH: "140px",
78
+ ...i
79
+ }
80
+ ),
81
+ !!e && /* @__PURE__ */ p.jsx(
82
+ w,
83
+ {
84
+ withLimit: !0,
85
+ limit: e,
86
+ currentCount: s
87
+ }
88
+ )
89
+ ] });
90
+ }
91
+ );
92
+ f.displayName = "Textarea";
93
+ const B = h(f);
94
+ export {
95
+ B as W
96
+ };
97
+ //# sourceMappingURL=textarea.component-Bfu6gH08.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.component-CvMV-9vc.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement>;\n size?: FormControlSize;\n}\n\nconst Textarea = withFormControl(\n ({\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n }: TextareaProps): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n ref={textareaRef}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nconst WrappedTextArea = React.forwardRef(\n (props: TextareaProps, ref: ForwardedRef<HTMLTextAreaElement>) => (\n <Textarea textareaRef={ref} {...props} />\n ),\n);\n\nWrappedTextArea.displayName = \"Textarea\";\n\nexport { WrappedTextArea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","withFormControl","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextArea","React"],"mappings":";;;;;;;;;AAwCA,IAAIA,IAAqB,CAACC,MAAO;AAC/B,MAAI,CAACA,EAAI;AACT,QAAMC,IAAQC,EAAiBF,CAAE,GAC3BG,IAAMC,EAAUJ,CAAE,GAClBK,IAAMC,EAAYN,CAAE,GACpBO,IAAS,MAAM;AACnB,0BAAsB,MAAM;AAC1B,MAAAP,EAAG,MAAM,SAAS;AAClB,UAAIQ;AACJ,MAAIP,EAAM,cAAc,gBACtBO,IAAYR,EAAG,gBAAgB,WAAWC,EAAM,UAAU,IAAI,WAAWA,EAAM,aAAa,KAE5FO,IAAYR,EAAG,eAAe,WAAWC,EAAM,cAAc,IAAI,WAAWA,EAAM,iBAAiB,GAEjGA,EAAM,cAAc,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,IAChB,GAEJ;AAAA,EAAA;AAGN,GAEMK,IAAkBC,EAAM;AAAA,EAC5B,CAAC/B,GAAsBC,MACrBU,gBAAAA,MAACK,KAAS,aAAaf,GAAM,GAAGD,EAAO,CAAA;AAE3C;AAEA8B,EAAgB,cAAc;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"textarea.component-Bfu6gH08.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement | null>;\n size?: FormControlSize;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n ref={textareaRef || ref}\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextarea.displayName = \"Textarea\";\nconst WrappedTextarea = withFormControl<TextareaProps>(Textarea);\n\nexport { WrappedTextarea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","React","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextarea","withFormControl"],"mappings":";;;;;;;;;AAwCA,IAAIA,IAAqB,CAACC,MAAO;AAC/B,MAAI,CAACA,EAAI;AACT,QAAMC,IAAQC,EAAiBF,CAAE,GAC3BG,IAAMC,EAAUJ,CAAE,GAClBK,IAAMC,EAAYN,CAAE,GACpBO,IAAS,MAAM;AACnB,0BAAsB,MAAM;AAC1B,MAAAP,EAAG,MAAM,SAAS;AAClB,UAAIQ;AACJ,MAAIP,EAAM,cAA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,UACJ,GAAGG;AAAA,QAAA;AAAA,MACN;AAAA,MACC,CAAC,CAACJ,KACDR,gBAAAA,EAAA;AAAA,QAACkB;AAAA,QAAA;AAAA,UACC,WAAW;AAAA,UACX,OAAOV;AAAA,UACP,cAAcM;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN;AAEAT,EAAS,cAAc;AACjB,MAAAc,IAAkBC,EAA+Bf,CAAQ;","x_google_ignoreList":[0,1,2]}
@@ -0,0 +1,2 @@
1
+ "use strict";const p=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),h=require("./withFormControl-D7WX39-P.js"),v=require("./characterCounter.component-CleCgrM2.js"),g=require("./flex-D14H6HbP.js"),w=require("./create-recipe-context-sESms8Eo.js"),x=require("./index-CHIISuTq.js"),l=require("./use-locale-context-D0LByRu9.js"),b=require("./use-field-context-CArmgHPP.js"),C=e=>e&&e.__esModule?e:{default:e},F=C(c);var y=e=>{if(!e)return;const t=x.getComputedStyle(e),o=x.getWindow(e),a=x.getDocument(e),r=()=>{requestAnimationFrame(()=>{e.style.height="auto";let s;t.boxSizing==="content-box"?s=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):s=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&s>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),s=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${s}px`})};e.addEventListener("input",r),e.form?.addEventListener("reset",r);const n=Object.getPrototypeOf(e),i=Object.getOwnPropertyDescriptor(n,"value");Object.defineProperty(e,"value",{...i,set(){i?.set?.apply(this,arguments),r()}});const u=new o.ResizeObserver(()=>{requestAnimationFrame(()=>r())});u.observe(e);const d=new o.MutationObserver(()=>r());return d.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),a.fonts?.addEventListener("loadingdone",r),()=>{e.removeEventListener("input",r),e.form?.removeEventListener("reset",r),a.fonts?.removeEventListener("loadingdone",r),u.disconnect(),d.disconnect()}};const m=c.forwardRef((e,t)=>{const{autoresize:o,...a}=e,r=c.useRef(null),n=b.useFieldContext(),i=x.mergeProps(n?.getTextareaProps(),{style:{resize:o?"none":void 0}},a);return c.useEffect(()=>{if(o)return y(r.current)},[o]),p.jsxRuntimeExports.jsx(l.ark.textarea,{...i,ref:l.composeRefs(t,r)})});m.displayName="FieldTextarea";const{withContext:R}=w.createRecipeContext({key:"textarea"}),T=R(m),f=F.default.forwardRef(({charLimit:e=void 0,invalid:t,onContrast:o,resize:a="none",textareaRef:r,value:n,...i},u)=>{const d=o?"onContrast":"default",s=c.useMemo(()=>n?.toString()?.length||0,[n]);return p.jsxRuntimeExports.jsxs(g.Flex,{className:"Textarea__Wrapper",position:"relative",w:"100%",children:[p.jsxRuntimeExports.jsx(T,{className:"Textarea","data-testid":"kibble-textarea",ref:r||u,resize:a,variant:d,value:n,...t&&{"aria-invalid":!0},minH:"140px",...i}),!!e&&p.jsxRuntimeExports.jsx(v.CharacterCounter,{withLimit:!0,limit:e,currentCount:s})]})});f.displayName="Textarea";const j=h.withFormControl(f);exports.WrappedTextarea=j;
2
+ //# sourceMappingURL=textarea.component-Dwb7sCt5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.component-DKeXxrXq.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement>;\n size?: FormControlSize;\n}\n\nconst Textarea = withFormControl(\n ({\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n }: TextareaProps): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n ref={textareaRef}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nconst WrappedTextArea = React.forwardRef(\n (props: TextareaProps, ref: ForwardedRef<HTMLTextAreaElement>) => (\n <Textarea textareaRef={ref} {...props} />\n ),\n);\n\nWrappedTextArea.displayName = \"Textarea\";\n\nexport { WrappedTextArea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","withFormControl","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextArea","React"],"mappings":"qaAwCA,IAAIA,EAAsBC,GAAO,CAC/B,GAAI,CAACA,EAAI,OACT,MAAMC,EAAQC,EAAgB,iBAACF,CAAE,EAC3BG,EAAMC,EAAS,UAACJ,CAAE,EAClBK,EAAMC,EAAW,YAACN,CAAE,EACpBO,EAAS,IAAM,CACnB,sBAAsB,IAAM,CAC1BP,EAAG,MAAM,OAAS,OAClB,IAAIQ,EACAP,EAAM,YAAc,cACtBO,EAAYR,EAAG,cAAgB,WAAWC,EAAM,UAAU,EAAI,WAAWA,EAAM,aAAa,GAE5FO,EAAYR,EAAG,aAAe,WAAWC,EAAM,cAAc,EAAI,WAAWA,EAAM,iBAAiB,EAEjGA,EAAM,YAAc,QAAUO,EAAY,WAAWP,EAAM,SAAS,GAClEA,EAAM,YAAc,WACtBD,EAAG,MAAM,UAAY,UAEvBQ,EAAY,WAAWP,EAAM,SAAS,GAC7BA,EAAM,YAAc,WAC7BD,EAAG,MAAM,UAAY,UAEvBA,EAAG,MAAM,OAAS,GAAGQ,CAAS,IACpC,CAAK,CACF,EACDR,EAAG,iBAAiB,QAASO,CAAM,EACnCP,EAAG,MAAM,iBAAiB,QAASO,CAAM,EACzC,MAAME,EAAmB,OAAO,eAAeT,CAAE,EAC3CU,EAAa,OAAO,yBAAyBD,EAAkB,OAAO,EAC5E,OAAO,eAAeT,EAAI,QAAS,CACjC,GAAGU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ACA,WAAAC,EACA,OAAA7B,EAAS,OACT,YAAAY,EACA,MAAAkB,EACA,GAAGC,CAAA,IACmC,CAChC,MAAAC,EAAmBH,EAAa,aAAe,UAE/CI,EAAmBC,EAAA,QACvB,IAAMJ,GAAO,YAAY,QAAU,EACnC,CAACA,CAAK,CACR,EAEA,gCACGK,OAAK,CAAA,UAAU,oBAAoB,SAAS,WAAW,EAAE,OACxD,SAAA,CAAAhB,EAAA,kBAAA,IAACiB,EAAA,CACC,UAAU,WACV,cAAY,kBACZ,OAAApC,EACA,QAASgC,EACT,MAAAF,EACC,GAAIF,GAAW,CAAE,eAAgB,EAAK,EACvC,KAAK,QACJ,GAAGG,EACJ,IAAKnB,CAAA,CACP,EACC,CAAC,CAACe,GACDR,EAAA,kBAAA,IAACkB,EAAA,iBAAA,CACC,UAAW,GACX,MAAOV,EACP,aAAcM,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEMK,EAAkBC,EAAM,QAAA,WAC5B,CAAC/B,EAAsBC,IACrBU,wBAACK,GAAS,YAAaf,EAAM,GAAGD,CAAO,CAAA,CAE3C,EAEA8B,EAAgB,YAAc","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"textarea.component-Dwb7sCt5.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement | null>;\n size?: FormControlSize;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n ref={textareaRef || ref}\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextarea.displayName = \"Textarea\";\nconst WrappedTextarea = withFormControl<TextareaProps>(Textarea);\n\nexport { WrappedTextarea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","React","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextarea","withFormControl"],"mappings":"qaAwCA,IAAIA,EAAsBC,GAAO,CAC/B,GAAI,CAACA,EAAI,OACT,MAAMC,EAAQC,EAAgB,iBAACF,CAAE,EAC3BG,EAAMC,EAAS,UAACJ,CAAE,EAClBK,EAAMC,EAAW,YAACN,CAAE,EACpBO,EAAS,IAAM,CACnB,sBAAsB,IAAM,CAC1BP,EAAG,MAAM,OAAS,OAClB,IAAIQ,EACAP,EAAM,YAAc,cACtBO,EAAYR,EAAG,cAAgB,WAAWC,EAAM,UAAU,EAAI,WAAWA,EAAM,aAAa,GAE5FO,EAAYR,EAAG,aAAe,WAAWC,EAAM,cAAc,EAAI,WAAWA,EAAM,iBAAiB,EAEjGA,EAAM,YAAc,QAAUO,EAAY,WAAWP,EAAM,SAAS,GAClEA,EAAM,YAAc,WACtBD,EAAG,MAAM,UAAY,UAEvBQ,EAAY,WAAWP,EAAM,SAAS,GAC7BA,EAAM,YAAc,WAC7BD,EAAG,MAAM,UAAY,UAEvBA,EAAG,MAAM,OAAS,GAAGQ,CAAS,IACpC,CAAK,CACF,EACDR,EAAG,iBAAiB,QAASO,CAAM,EACnCP,EAAG,MAAM,iBAAiB,QAASO,CAAM,EACzC,MAAME,EAAmB,OAAO,eAAeT,CAAE,EAC3CU,EAAa,OAAO,yBAAyBD,EAAkB,OAAO,EAC5E,OAAO,eAAeT,EAAI,QAAS,CACjC,GAAGU,EACH,KAAM,CACJA,GAAY,KAAK,MAAM,KAAM,SAAS,EACtCH,EAAQ,CACd,CACA,CAAG,EACD,MAAMI,EAAiB,IAAIR,EAAI,eAAe,IAAM,CA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