@televet/kibble-ui 5.0.26-sc.2 → 5.0.26

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 (188) hide show
  1. package/dist/chunks/{anatomy-BsrdhlLN.js → anatomy-B0LtI6sf.js} +2 -2
  2. package/dist/chunks/{anatomy-BsrdhlLN.js.map → anatomy-B0LtI6sf.js.map} +1 -1
  3. package/dist/chunks/{anatomy-ByfITE1W.js → anatomy-DKlFmIC5.js} +11 -11
  4. package/dist/chunks/{anatomy-ByfITE1W.js.map → anatomy-DKlFmIC5.js.map} +1 -1
  5. package/dist/chunks/{avatarGroup.component-DgR3EqDJ.js → avatarGroup.component-BPhQpVYM.js} +2 -2
  6. package/dist/chunks/{avatarGroup.component-DgR3EqDJ.js.map → avatarGroup.component-BPhQpVYM.js.map} +1 -1
  7. package/dist/chunks/{avatarGroup.component-CIj4qETQ.js → avatarGroup.component-CJCQSIyr.js} +2 -2
  8. package/dist/chunks/{avatarGroup.component-CIj4qETQ.js.map → avatarGroup.component-CJCQSIyr.js.map} +1 -1
  9. package/dist/chunks/{buttonGroup.component-ITatUbCf.js → buttonGroup.component-CO5lC36l.js} +2 -2
  10. package/dist/chunks/{buttonGroup.component-ITatUbCf.js.map → buttonGroup.component-CO5lC36l.js.map} +1 -1
  11. package/dist/chunks/{buttonGroup.component-BDN5oxew.js → buttonGroup.component-pR0mvmm7.js} +2 -2
  12. package/dist/chunks/{buttonGroup.component-BDN5oxew.js.map → buttonGroup.component-pR0mvmm7.js.map} +1 -1
  13. package/dist/chunks/calendar.component-6Z5lc-eR.js +2 -0
  14. package/dist/chunks/calendar.component-6Z5lc-eR.js.map +1 -0
  15. package/dist/chunks/calendar.component-Dx7c4EIy.js +62 -0
  16. package/dist/chunks/calendar.component-Dx7c4EIy.js.map +1 -0
  17. package/dist/chunks/{checkbox.component-CId1KMX3.js → checkbox.component-C132vkan.js} +2 -2
  18. package/dist/chunks/{checkbox.component-CId1KMX3.js.map → checkbox.component-C132vkan.js.map} +1 -1
  19. package/dist/chunks/{checkbox.component-2QYi-1Um.js → checkbox.component-DUJCiZr2.js} +2 -2
  20. package/dist/chunks/{checkbox.component-2QYi-1Um.js.map → checkbox.component-DUJCiZr2.js.map} +1 -1
  21. package/dist/chunks/{checkboxGroup.component-7ACU5_4p.js → checkboxGroup.component-2U0ZW1TD.js} +2 -2
  22. package/dist/chunks/{checkboxGroup.component-7ACU5_4p.js.map → checkboxGroup.component-2U0ZW1TD.js.map} +1 -1
  23. package/dist/chunks/{checkboxGroup.component-MS4j5Kq3.js → checkboxGroup.component-DW9qUlSm.js} +3 -3
  24. package/dist/chunks/{checkboxGroup.component-MS4j5Kq3.js.map → checkboxGroup.component-DW9qUlSm.js.map} +1 -1
  25. package/dist/chunks/{conversationCard.component-9rv6mttl.js → conversationCard.component-CscMIq51.js} +2 -2
  26. package/dist/chunks/{conversationCard.component-9rv6mttl.js.map → conversationCard.component-CscMIq51.js.map} +1 -1
  27. package/dist/chunks/{conversationCard.component-DCLDx0JX.js → conversationCard.component-xIYvp6K5.js} +3 -3
  28. package/dist/chunks/{conversationCard.component-DCLDx0JX.js.map → conversationCard.component-xIYvp6K5.js.map} +1 -1
  29. package/dist/chunks/{datePicker.component-Dbxjqbki.js → datePicker.component-BuGpHTzS.js} +2 -2
  30. package/dist/chunks/{datePicker.component-Dbxjqbki.js.map → datePicker.component-BuGpHTzS.js.map} +1 -1
  31. package/dist/chunks/{datePicker.component-BkCLLBbA.js → datePicker.component-DeK6pPeC.js} +5 -5
  32. package/dist/chunks/{datePicker.component-BkCLLBbA.js.map → datePicker.component-DeK6pPeC.js.map} +1 -1
  33. package/dist/chunks/{datePicker.provider-u-PZcKWc.js → datePicker.provider-C1vLiJEb.js} +6 -6
  34. package/dist/chunks/{datePicker.provider-u-PZcKWc.js.map → datePicker.provider-C1vLiJEb.js.map} +1 -1
  35. package/dist/chunks/{datePicker.provider-CclRyVCb.js → datePicker.provider-i35-VNAb.js} +2 -2
  36. package/dist/chunks/{datePicker.provider-CclRyVCb.js.map → datePicker.provider-i35-VNAb.js.map} +1 -1
  37. package/dist/chunks/dateTimePicker.component-BwKD6TeU.js +306 -0
  38. package/dist/chunks/dateTimePicker.component-BwKD6TeU.js.map +1 -0
  39. package/dist/chunks/dateTimePicker.component-C7SFD9Py.js +2 -0
  40. package/dist/chunks/dateTimePicker.component-C7SFD9Py.js.map +1 -0
  41. package/dist/chunks/endOfMonth-ClO3w4vF.js +2 -0
  42. package/dist/chunks/endOfMonth-ClO3w4vF.js.map +1 -0
  43. package/dist/chunks/endOfMonth-D0kCU08_.js +19 -0
  44. package/dist/chunks/endOfMonth-D0kCU08_.js.map +1 -0
  45. package/dist/chunks/{format-CqTHHSak.js → format-dJJ72A--.js} +3 -3
  46. package/dist/chunks/{format-CqTHHSak.js.map → format-dJJ72A--.js.map} +1 -1
  47. package/dist/chunks/isToday-Q8lj3mkM.js +23 -0
  48. package/dist/chunks/{isToday-iCYsPDMT.js.map → isToday-Q8lj3mkM.js.map} +1 -1
  49. package/dist/chunks/{menu.component-B-8F68kW.js → menu.component-D2V9Q1Y5.js} +2 -2
  50. package/dist/chunks/{menu.component-B-8F68kW.js.map → menu.component-D2V9Q1Y5.js.map} +1 -1
  51. package/dist/chunks/{menu.component-C6x9T6yo.js → menu.component-WHzMw5ZI.js} +3 -3
  52. package/dist/chunks/{menu.component-C6x9T6yo.js.map → menu.component-WHzMw5ZI.js.map} +1 -1
  53. package/dist/chunks/{numberInput.component-DbvfT3X-.js → numberInput.component-CRDRjrTH.js} +2 -2
  54. package/dist/chunks/{numberInput.component-DbvfT3X-.js.map → numberInput.component-CRDRjrTH.js.map} +1 -1
  55. package/dist/chunks/{numberInput.component-DCqJn2Ct.js → numberInput.component-DGPEz0Fv.js} +2 -2
  56. package/dist/chunks/{numberInput.component-DCqJn2Ct.js.map → numberInput.component-DGPEz0Fv.js.map} +1 -1
  57. package/dist/chunks/{pinInput.types-CRndmftA.js → pinInput.types-Can9f1Eu.js} +2 -2
  58. package/dist/chunks/{pinInput.types-CRndmftA.js.map → pinInput.types-Can9f1Eu.js.map} +1 -1
  59. package/dist/chunks/{pinInput.types-DqQt83Gy.js → pinInput.types-bIGh7aUS.js} +2 -2
  60. package/dist/chunks/{pinInput.types-DqQt83Gy.js.map → pinInput.types-bIGh7aUS.js.map} +1 -1
  61. package/dist/chunks/{popover.component-C9PY02k_.js → popover.component-DIYT1Lc0.js} +2 -2
  62. package/dist/chunks/{popover.component-C9PY02k_.js.map → popover.component-DIYT1Lc0.js.map} +1 -1
  63. package/dist/chunks/{popover.component-CiRGriH0.js → popover.component-DTjA1GSd.js} +2 -2
  64. package/dist/chunks/{popover.component-CiRGriH0.js.map → popover.component-DTjA1GSd.js.map} +1 -1
  65. package/dist/chunks/{popover.recipe-DhiHO7Ev.js → popover.recipe-CtptsJg6.js} +2 -2
  66. package/dist/chunks/{popover.recipe-DhiHO7Ev.js.map → popover.recipe-CtptsJg6.js.map} +1 -1
  67. package/dist/chunks/{popover.recipe-Bg7XkURN.js → popover.recipe-DPwwsWLb.js} +2 -2
  68. package/dist/chunks/{popover.recipe-Bg7XkURN.js.map → popover.recipe-DPwwsWLb.js.map} +1 -1
  69. package/dist/chunks/{radioGroup.types-CAXsF2Kb.js → radioGroup.types-DzSpA07h.js} +3 -3
  70. package/dist/chunks/{radioGroup.types-CAXsF2Kb.js.map → radioGroup.types-DzSpA07h.js.map} +1 -1
  71. package/dist/chunks/{radioGroup.types-CJ0YVfw_.js → radioGroup.types-U1ep9nrN.js} +2 -2
  72. package/dist/chunks/{radioGroup.types-CJ0YVfw_.js.map → radioGroup.types-U1ep9nrN.js.map} +1 -1
  73. package/dist/chunks/{rating.component-BAZbrMUk.js → rating.component-BWBPSEEk.js} +2 -2
  74. package/dist/chunks/{rating.component-BAZbrMUk.js.map → rating.component-BWBPSEEk.js.map} +1 -1
  75. package/dist/chunks/{rating.component-zhZb2naU.js → rating.component-DsHkKmA7.js} +2 -2
  76. package/dist/chunks/{rating.component-zhZb2naU.js.map → rating.component-DsHkKmA7.js.map} +1 -1
  77. package/dist/chunks/{ratingDots.component-elJxBu6D.js → ratingDots.component-BhWM7kTg.js} +2 -2
  78. package/dist/chunks/{ratingDots.component-elJxBu6D.js.map → ratingDots.component-BhWM7kTg.js.map} +1 -1
  79. package/dist/chunks/{ratingDots.component-DdCKYqlJ.js → ratingDots.component-CZ370iI3.js} +2 -2
  80. package/dist/chunks/{ratingDots.component-DdCKYqlJ.js.map → ratingDots.component-CZ370iI3.js.map} +1 -1
  81. package/dist/chunks/{select.component-qfwHZeAS.js → select.component-DckP-f8y.js} +3 -3
  82. package/dist/chunks/{select.component-qfwHZeAS.js.map → select.component-DckP-f8y.js.map} +1 -1
  83. package/dist/chunks/{select.component-Bz5vEwHi.js → select.component-OrsHXCMz.js} +2 -2
  84. package/dist/chunks/{select.component-Bz5vEwHi.js.map → select.component-OrsHXCMz.js.map} +1 -1
  85. package/dist/chunks/{switch.component-BjQDRlc3.js → switch.component-BYEMhBCA.js} +2 -2
  86. package/dist/chunks/{switch.component-BjQDRlc3.js.map → switch.component-BYEMhBCA.js.map} +1 -1
  87. package/dist/chunks/{switch.component-B7aBQUCG.js → switch.component-DjN67nap.js} +2 -2
  88. package/dist/chunks/{switch.component-B7aBQUCG.js.map → switch.component-DjN67nap.js.map} +1 -1
  89. package/dist/chunks/{tagBlock.component-vtBWiOLi.js → tagBlock.component-B899iqQP.js} +2 -2
  90. package/dist/chunks/{tagBlock.component-vtBWiOLi.js.map → tagBlock.component-B899iqQP.js.map} +1 -1
  91. package/dist/chunks/{tagBlock.component-D--q_dqh.js → tagBlock.component-CT7_RyJ-.js} +2 -2
  92. package/dist/chunks/{tagBlock.component-D--q_dqh.js.map → tagBlock.component-CT7_RyJ-.js.map} +1 -1
  93. package/dist/chunks/{textInput.component-D3OYUjHL.js → textInput.component-BeiTxTkS.js} +2 -2
  94. package/dist/chunks/{textInput.component-D3OYUjHL.js.map → textInput.component-BeiTxTkS.js.map} +1 -1
  95. package/dist/chunks/{textInput.component-Cj9j8DqH.js → textInput.component-CwTc0h_F.js} +2 -2
  96. package/dist/chunks/{textInput.component-Cj9j8DqH.js.map → textInput.component-CwTc0h_F.js.map} +1 -1
  97. package/dist/chunks/{textarea.component-DnJ9y2v3.js → textarea.component-BIg_XX_R.js} +2 -2
  98. package/dist/chunks/{textarea.component-DnJ9y2v3.js.map → textarea.component-BIg_XX_R.js.map} +1 -1
  99. package/dist/chunks/{textarea.component-Cb3kTPuL.js → textarea.component-C6Wt1Pk8.js} +2 -2
  100. package/dist/chunks/{textarea.component-Cb3kTPuL.js.map → textarea.component-C6Wt1Pk8.js.map} +1 -1
  101. package/dist/chunks/theme.provider-C_F9M-W3.js +28 -0
  102. package/dist/chunks/{theme.provider-CUMlVRCg.js.map → theme.provider-C_F9M-W3.js.map} +1 -1
  103. package/dist/chunks/{theme.provider-BiwmZ1Gw.js → theme.provider-CtbJ04tc.js} +403 -414
  104. package/dist/chunks/{theme.provider-BiwmZ1Gw.js.map → theme.provider-CtbJ04tc.js.map} +1 -1
  105. package/dist/chunks/{timePicker.component-CkYqU0UZ.js → timePicker.component-CsvyXSRc.js} +4 -4
  106. package/dist/chunks/{timePicker.component-CkYqU0UZ.js.map → timePicker.component-CsvyXSRc.js.map} +1 -1
  107. package/dist/chunks/{timePicker.component-wuq0ZnAY.js → timePicker.component-D5hw80VV.js} +2 -2
  108. package/dist/chunks/{timePicker.component-wuq0ZnAY.js.map → timePicker.component-D5hw80VV.js.map} +1 -1
  109. package/dist/chunks/{timeRange.component-FoG-HHMx.js → timeRange.component-9Bs6kd18.js} +2 -2
  110. package/dist/chunks/{timeRange.component-FoG-HHMx.js.map → timeRange.component-9Bs6kd18.js.map} +1 -1
  111. package/dist/chunks/{timeRange.component-4vXrNask.js → timeRange.component-D3Db8lvh.js} +2 -2
  112. package/dist/chunks/{timeRange.component-4vXrNask.js.map → timeRange.component-D3Db8lvh.js.map} +1 -1
  113. package/dist/chunks/{timestamp.component-DkLjxUsy.js → timestamp.component-DiZwy6CA.js} +3 -3
  114. package/dist/chunks/{timestamp.component-DkLjxUsy.js.map → timestamp.component-DiZwy6CA.js.map} +1 -1
  115. package/dist/chunks/{withFormControl-tp8w4b63.js → withFormControl-DW9A6BSL.js} +25 -24
  116. package/dist/chunks/{withFormControl-tp8w4b63.js.map → withFormControl-DW9A6BSL.js.map} +1 -1
  117. package/dist/chunks/{withFormControl-BQWcby9D.js → withFormControl-QV_Jridv.js} +2 -2
  118. package/dist/chunks/{withFormControl-BQWcby9D.js.map → withFormControl-QV_Jridv.js.map} +1 -1
  119. package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
  120. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  121. package/dist/cjs/components/Calendar/index.cjs +1 -1
  122. package/dist/cjs/components/Checkbox/index.cjs +1 -1
  123. package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
  124. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  125. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  126. package/dist/cjs/components/DateTimePicker/index.cjs +1 -1
  127. package/dist/cjs/components/Menu/index.cjs +1 -1
  128. package/dist/cjs/components/NumberInput/index.cjs +1 -1
  129. package/dist/cjs/components/PinInput/index.cjs +1 -1
  130. package/dist/cjs/components/Popover/index.cjs +1 -1
  131. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  132. package/dist/cjs/components/Rating/index.cjs +1 -1
  133. package/dist/cjs/components/RatingDots/index.cjs +1 -1
  134. package/dist/cjs/components/Select/index.cjs +1 -1
  135. package/dist/cjs/components/Switch/index.cjs +1 -1
  136. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  137. package/dist/cjs/components/TextInput/index.cjs +1 -1
  138. package/dist/cjs/components/Textarea/index.cjs +1 -1
  139. package/dist/cjs/components/TimePicker/index.cjs +1 -1
  140. package/dist/cjs/components/TimeRange/index.cjs +1 -1
  141. package/dist/cjs/components/index.cjs +1 -1
  142. package/dist/cjs/index.cjs +1 -1
  143. package/dist/cjs/theme/index.cjs +1 -1
  144. package/dist/esm/cli/generate-theme-types.js +0 -0
  145. package/dist/esm/cli/postinstall.js +0 -0
  146. package/dist/esm/components/AvatarGroup/index.js +1 -1
  147. package/dist/esm/components/ButtonGroup/index.js +1 -1
  148. package/dist/esm/components/Calendar/index.js +4 -2
  149. package/dist/esm/components/Checkbox/index.js +1 -1
  150. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  151. package/dist/esm/components/ConversationCard/index.js +1 -1
  152. package/dist/esm/components/DatePicker/index.js +2 -2
  153. package/dist/esm/components/DateTimePicker/index.js +1 -1
  154. package/dist/esm/components/Menu/index.js +1 -1
  155. package/dist/esm/components/NumberInput/index.js +1 -1
  156. package/dist/esm/components/PinInput/index.js +1 -1
  157. package/dist/esm/components/Popover/index.js +1 -1
  158. package/dist/esm/components/RadioGroup/index.js +1 -1
  159. package/dist/esm/components/Rating/index.js +1 -1
  160. package/dist/esm/components/RatingDots/index.js +1 -1
  161. package/dist/esm/components/Select/index.js +1 -1
  162. package/dist/esm/components/Switch/index.js +1 -1
  163. package/dist/esm/components/TagBlock/index.js +1 -1
  164. package/dist/esm/components/TextInput/index.js +1 -1
  165. package/dist/esm/components/Textarea/index.js +1 -1
  166. package/dist/esm/components/TimePicker/index.js +1 -1
  167. package/dist/esm/components/TimeRange/index.js +1 -1
  168. package/dist/esm/components/Timestamp/index.js +1 -1
  169. package/dist/esm/components/index.js +126 -124
  170. package/dist/esm/index.js +154 -153
  171. package/dist/esm/theme/index.js +4 -5
  172. package/dist/types/components/Calendar/calendar.component.d.ts +19 -1
  173. package/dist/types/components/Calendar/calendar.utils.d.ts +3 -0
  174. package/dist/types/components/Calendar/calendarFooterButton.component.d.ts +31 -0
  175. package/dist/types/components/Calendar/calendarTodayButton.component.d.ts +10 -0
  176. package/dist/types/components/Calendar/index.d.ts +2 -0
  177. package/dist/types/theme/index.d.ts +0 -1
  178. package/package.json +1 -1
  179. package/dist/chunks/calendar.component-D-1uis5P.js +0 -18
  180. package/dist/chunks/calendar.component-D-1uis5P.js.map +0 -1
  181. package/dist/chunks/calendar.component-zZHTvsvc.js +0 -2
  182. package/dist/chunks/calendar.component-zZHTvsvc.js.map +0 -1
  183. package/dist/chunks/dateTimePicker.component-49q0KN3k.js +0 -2
  184. package/dist/chunks/dateTimePicker.component-49q0KN3k.js.map +0 -1
  185. package/dist/chunks/dateTimePicker.component-jPa4WzsR.js +0 -317
  186. package/dist/chunks/dateTimePicker.component-jPa4WzsR.js.map +0 -1
  187. package/dist/chunks/isToday-iCYsPDMT.js +0 -23
  188. package/dist/chunks/theme.provider-CUMlVRCg.js +0 -28
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.component-DnJ9y2v3.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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\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 ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\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 data-testid={`${dataTestId}-character-counter`}\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","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","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,CAClD,sBAAsB,IAAMI,GAAQ,CACxC,CAAG,EACDI,EAAe,QAAQX,CAAE,EACzB,MAAMY,EAAe,IAAIT,EA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CAAC,EAG5E,OAAAM,EAAA,kBAAA,KAACC,EAAK,KAAA,CAAA,UAAU,oBAAoB,cAAc,SAAS,EAAE,OAAO,IAAK,EAAG,WAAW,WACrF,SAAA,CAAAlB,EAAA,kBAAA,IAACmB,EAAA,CACC,UAAU,WACV,cAAaP,EACb,IAAKnB,GAAeH,EACpB,OAAAT,EACA,QAASiC,EACT,MAAAH,EACC,GAAIF,GAAW,CAAE,eAAgB,EAAK,EACvC,KAAK,QACJ,GAAGI,CAAA,CACN,EACC,CAAC,CAACL,GACDR,EAAA,kBAAA,IAACoB,EAAA,iBAAA,CACC,cAAa,GAAGR,CAAU,qBAC1B,UAAW,GACX,MAAOJ,EACP,aAAcO,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEAV,EAAS,YAAc,WACjB,MAAAgB,EAAkBC,kBAA+BjB,CAAQ","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"textarea.component-BIg_XX_R.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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\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 ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\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 data-testid={`${dataTestId}-character-counter`}\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","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","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,I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GC,GAELvB,IACsB,CAChB,MAAAwB,EAAmBJ,EAAa,aAAe,UAE/CK,EAAmBC,UAAQ,IAAML,GAAO,YAAY,QAAU,EAAG,CAACA,CAAK,CAAC,EAG5E,OAAAM,EAAA,kBAAA,KAACC,EAAK,KAAA,CAAA,UAAU,oBAAoB,cAAc,SAAS,EAAE,OAAO,IAAK,EAAG,WAAW,WACrF,SAAA,CAAAlB,EAAA,kBAAA,IAACmB,EAAA,CACC,UAAU,WACV,cAAaP,EACb,IAAKnB,GAAeH,EACpB,OAAAT,EACA,QAASiC,EACT,MAAAH,EACC,GAAIF,GAAW,CAAE,eAAgB,EAAK,EACvC,KAAK,QACJ,GAAGI,CAAA,CACN,EACC,CAAC,CAACL,GACDR,EAAA,kBAAA,IAACoB,EAAA,iBAAA,CACC,cAAa,GAAGR,CAAU,qBAC1B,UAAW,GACX,MAAOJ,EACP,aAAcO,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEAV,EAAS,YAAc,WACjB,MAAAgB,EAAkBC,kBAA+BjB,CAAQ","x_google_ignoreList":[0,1,2]}
@@ -1,6 +1,6 @@
1
1
  import { j as m } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import l, { forwardRef as x, useRef as g, useEffect as h, useMemo as v } from "react";
3
- import { w } from "./withFormControl-tp8w4b63.js";
3
+ import { w } from "./withFormControl-DW9A6BSL.js";
4
4
  import { C as b } from "./characterCounter.component-DI_FQNUR.js";
5
5
  import { F as y } from "./flex-CX-8gE9T.js";
6
6
  import { c as F } from "./create-recipe-context-DfQ-MTih.js";
@@ -93,4 +93,4 @@ const q = w(f);
93
93
  export {
94
94
  q as W
95
95
  };
96
- //# sourceMappingURL=textarea.component-Cb3kTPuL.js.map
96
+ //# sourceMappingURL=textarea.component-C6Wt1Pk8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.component-Cb3kTPuL.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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\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 ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\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 data-testid={`${dataTestId}-character-counter`}\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","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","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,cAAc,gBACtBO,IAAYR,EAAG,gBAAgB,WAAWC,EAAM,UAAU,IAAI,WAAWA,EAAM,aAAa,KAE5FO,IAAYR,EAAG,eAA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AAAA,MACC,CAAC,CAACL,KACDR,gBAAAA,EAAA;AAAA,QAACoB;AAAA,QAAA;AAAA,UACC,eAAa,GAAGR,CAAU;AAAA,UAC1B,WAAW;AAAA,UACX,OAAOJ;AAAA,UACP,cAAcO;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN;AAEAV,EAAS,cAAc;AACjB,MAAAgB,IAAkBC,EAA+BjB,CAAQ;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"textarea.component-C6Wt1Pk8.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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\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 ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\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 data-testid={`${dataTestId}-character-counter`}\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","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","Flex","CTextarea","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