@televet/kibble-ui 4.0.0-beta.96 → 4.0.0-beta.98

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 (166) hide show
  1. package/dist/chunks/{alert.types-DeHWvQla.js → alert.types-DEe0eEG4.js} +3 -3
  2. package/dist/chunks/{alert.types-DeHWvQla.js.map → alert.types-DEe0eEG4.js.map} +1 -1
  3. package/dist/chunks/{avatar.component-CV_95YCj.js → avatar.component-CvE1vv5L.js} +5 -5
  4. package/dist/chunks/{avatar.component-CV_95YCj.js.map → avatar.component-CvE1vv5L.js.map} +1 -1
  5. package/dist/chunks/{avatarGroup.component-CPTXS5Mp.js → avatarGroup.component-SoAj9p5n.js} +2 -2
  6. package/dist/chunks/{avatarGroup.component-CPTXS5Mp.js.map → avatarGroup.component-SoAj9p5n.js.map} +1 -1
  7. package/dist/chunks/{buttonGroup.component-BJl5t4CV.js → buttonGroup.component-Bp2YbVtj.js} +2 -2
  8. package/dist/chunks/{buttonGroup.component-BJl5t4CV.js.map → buttonGroup.component-Bp2YbVtj.js.map} +1 -1
  9. package/dist/chunks/{characterCounter.component-C4sKYWJ2.js → characterCounter.component-Lya4VMgB.js} +2 -2
  10. package/dist/chunks/{characterCounter.component-C4sKYWJ2.js.map → characterCounter.component-Lya4VMgB.js.map} +1 -1
  11. package/dist/chunks/{checkbox.component-BpSGOInE.js → checkbox.component-PmkaXzNs.js} +7 -7
  12. package/dist/chunks/{checkbox.component-BpSGOInE.js.map → checkbox.component-PmkaXzNs.js.map} +1 -1
  13. package/dist/chunks/{checkbox.records-CTlAD-2Q.js → checkbox.records-Ds6SvFdm.js} +4 -4
  14. package/dist/chunks/{checkbox.records-CTlAD-2Q.js.map → checkbox.records-Ds6SvFdm.js.map} +1 -1
  15. package/dist/chunks/{checkboxGroup.component-B154cVx5.js → checkboxGroup.component-DXWrZuhZ.js} +3 -3
  16. package/dist/chunks/{checkboxGroup.component-B154cVx5.js.map → checkboxGroup.component-DXWrZuhZ.js.map} +1 -1
  17. package/dist/chunks/{conversationCard.component-DCpGDLwc.js → conversationCard.component-D3WN8rhl.js} +7 -7
  18. package/dist/chunks/{conversationCard.component-DCpGDLwc.js.map → conversationCard.component-D3WN8rhl.js.map} +1 -1
  19. package/dist/chunks/{datePicker.component-DSEMVYWG.js → datePicker.component-BSzcmQ9c.js} +7 -7
  20. package/dist/chunks/{datePicker.component-DSEMVYWG.js.map → datePicker.component-BSzcmQ9c.js.map} +1 -1
  21. package/dist/chunks/{dialog-trigger-eqGXDXGQ.js → dialog-trigger-Crrp0YGG.js} +5 -5
  22. package/dist/chunks/{dialog-trigger-eqGXDXGQ.js.map → dialog-trigger-Crrp0YGG.js.map} +1 -1
  23. package/dist/chunks/{heading.component-BHha3j1I.js → heading.component-73t_EqZx.js} +2 -2
  24. package/dist/chunks/{heading.component-BHha3j1I.js.map → heading.component-73t_EqZx.js.map} +1 -1
  25. package/dist/chunks/{index-C_AXAeNS.js → index-B3d3tRic.js} +4 -4
  26. package/dist/chunks/{index-C_AXAeNS.js.map → index-B3d3tRic.js.map} +1 -1
  27. package/dist/chunks/{index-Cbkb_94C.js → index-BBxAd1xM.js} +3 -3
  28. package/dist/chunks/{index-Cbkb_94C.js.map → index-BBxAd1xM.js.map} +1 -1
  29. package/dist/chunks/{index-CJLttzPM.js → index-BODNpj2d.js} +3 -3
  30. package/dist/chunks/{index-CJLttzPM.js.map → index-BODNpj2d.js.map} +1 -1
  31. package/dist/chunks/{index-cSjUS7Xj.js → index-BRBNqTA7.js} +3 -3
  32. package/dist/chunks/{index-cSjUS7Xj.js.map → index-BRBNqTA7.js.map} +1 -1
  33. package/dist/chunks/{index-Bff1r_rH.js → index-BpQwMKfa.js} +2 -2
  34. package/dist/chunks/{index-Bff1r_rH.js.map → index-BpQwMKfa.js.map} +1 -1
  35. package/dist/chunks/{index-DVNjUEDJ.js → index-C-m6RNXT.js} +4 -4
  36. package/dist/chunks/{index-DVNjUEDJ.js.map → index-C-m6RNXT.js.map} +1 -1
  37. package/dist/chunks/{index-OpolRlgD.js → index-CX3yrbBD.js} +3 -3
  38. package/dist/chunks/{index-OpolRlgD.js.map → index-CX3yrbBD.js.map} +1 -1
  39. package/dist/chunks/{index-DUY19L6M.js → index-CYHDITxm.js} +3196 -1649
  40. package/dist/chunks/index-CYHDITxm.js.map +1 -0
  41. package/dist/chunks/{index-Bz8HDeWA.js → index-Cd-5e4RS.js} +2 -2
  42. package/dist/chunks/{index-Bz8HDeWA.js.map → index-Cd-5e4RS.js.map} +1 -1
  43. package/dist/chunks/index-ClcMgyeA.js +10 -0
  44. package/dist/chunks/index-ClcMgyeA.js.map +1 -0
  45. package/dist/chunks/{index-YtNA0Ueo.js → index-Ztgrae6O.js} +49 -49
  46. package/dist/chunks/{index-YtNA0Ueo.js.map → index-Ztgrae6O.js.map} +1 -1
  47. package/dist/chunks/{index-L197Dry5.js → index-mndLieJA.js} +4 -4
  48. package/dist/chunks/{index-L197Dry5.js.map → index-mndLieJA.js.map} +1 -1
  49. package/dist/chunks/{menu.component-D38vU6MX.js → menu.component-CYoNg8cG.js} +8 -8
  50. package/dist/chunks/{menu.component-D38vU6MX.js.map → menu.component-CYoNg8cG.js.map} +1 -1
  51. package/dist/chunks/{modal.types-mGxpGfVt.js → modal.types-hyW2Nhp9.js} +4 -4
  52. package/dist/chunks/{modal.types-mGxpGfVt.js.map → modal.types-hyW2Nhp9.js.map} +1 -1
  53. package/dist/chunks/{pinInput.types-CD_tKvQm.js → pinInput.types-DI4tGMSB.js} +6 -6
  54. package/dist/chunks/{pinInput.types-CD_tKvQm.js.map → pinInput.types-DI4tGMSB.js.map} +1 -1
  55. package/dist/chunks/{popover-root-provider-BErev2-N.js → popover-root-provider-R2bRQ-xz.js} +4 -4
  56. package/dist/chunks/{popover-root-provider-BErev2-N.js.map → popover-root-provider-R2bRQ-xz.js.map} +1 -1
  57. package/dist/chunks/{popover.component-UkDDe5Dh.js → popover.component-CV6ZJKNL.js} +7 -7
  58. package/dist/chunks/{popover.component-UkDDe5Dh.js.map → popover.component-CV6ZJKNL.js.map} +1 -1
  59. package/dist/chunks/{popover.recipe-DlJtOeLy.js → popover.recipe-DDKba5kq.js} +4 -4
  60. package/dist/chunks/{popover.recipe-DlJtOeLy.js.map → popover.recipe-DDKba5kq.js.map} +1 -1
  61. package/dist/chunks/{radio.records-4ih1q8nO.js → radio.records-muLWVHhG.js} +4 -4
  62. package/dist/chunks/{radio.records-4ih1q8nO.js.map → radio.records-muLWVHhG.js.map} +1 -1
  63. package/dist/chunks/{radioGroup.component-DJsYK4YT.js → radioGroup.component-BUFZGQ-P.js} +7 -7
  64. package/dist/chunks/{radioGroup.component-DJsYK4YT.js.map → radioGroup.component-BUFZGQ-P.js.map} +1 -1
  65. package/dist/chunks/{ratingDots.component-BdUvoShh.js → ratingDots.component-CtmqAmV5.js} +3 -3
  66. package/dist/chunks/{ratingDots.component-BdUvoShh.js.map → ratingDots.component-CtmqAmV5.js.map} +1 -1
  67. package/dist/chunks/{render-strategy-CHp7lb6C.js → render-strategy-D5Z6LZ1V.js} +2 -2
  68. package/dist/chunks/{render-strategy-CHp7lb6C.js.map → render-strategy-D5Z6LZ1V.js.map} +1 -1
  69. package/dist/chunks/{select.component-BNMyz5Nm.js → select.component-Fq8Hh2MP.js} +9 -9
  70. package/dist/chunks/{select.component-BNMyz5Nm.js.map → select.component-Fq8Hh2MP.js.map} +1 -1
  71. package/dist/chunks/{sortableList.component-BKthQS8R.js → sortableList.component-Dl8iDhRd.js} +3 -3
  72. package/dist/chunks/{sortableList.component-BKthQS8R.js.map → sortableList.component-Dl8iDhRd.js.map} +1 -1
  73. package/dist/chunks/{spinner.component-CzTRzWbL.js → spinner.component-katjnJzv.js} +2 -2
  74. package/dist/chunks/{spinner.component-CzTRzWbL.js.map → spinner.component-katjnJzv.js.map} +1 -1
  75. package/dist/chunks/{styledAvatar.types-DXwe2DPH.js → styledAvatar.types-C8U-V56j.js} +2 -2
  76. package/dist/chunks/{styledAvatar.types-DXwe2DPH.js.map → styledAvatar.types-C8U-V56j.js.map} +1 -1
  77. package/dist/chunks/{switch.component-DVHjLc9H.js → switch.component-U2g70Pc5.js} +6 -6
  78. package/dist/chunks/{switch.component-DVHjLc9H.js.map → switch.component-U2g70Pc5.js.map} +1 -1
  79. package/dist/chunks/{tabs.component-b8VxTs-T.js → tabs.component-P5GKt5Sv.js} +5 -5
  80. package/dist/chunks/{tabs.component-b8VxTs-T.js.map → tabs.component-P5GKt5Sv.js.map} +1 -1
  81. package/dist/chunks/{tagBlock.component-CfxiQgjI.js → tagBlock.component-CF3z8rKF.js} +5 -5
  82. package/dist/chunks/{tagBlock.component-CfxiQgjI.js.map → tagBlock.component-CF3z8rKF.js.map} +1 -1
  83. package/dist/chunks/{text.component-DJW--Vty.js → text.component-DKtdjH7k.js} +2 -2
  84. package/dist/chunks/{text.component-DJW--Vty.js.map → text.component-DKtdjH7k.js.map} +1 -1
  85. package/dist/chunks/{textInput.component-evu71Hys.js → textInput.component-DSVsTHqO.js} +6 -6
  86. package/dist/chunks/{textInput.component-evu71Hys.js.map → textInput.component-DSVsTHqO.js.map} +1 -1
  87. package/dist/chunks/{textarea.component-CZQMAMYT.js → textarea.component-Cbo5Vs-6.js} +6 -6
  88. package/dist/chunks/{textarea.component-CZQMAMYT.js.map → textarea.component-Cbo5Vs-6.js.map} +1 -1
  89. package/dist/chunks/{theme.provider-DHvMwBwG.js → theme.provider-BHh_9yV5.js} +1138 -2679
  90. package/dist/chunks/theme.provider-BHh_9yV5.js.map +1 -0
  91. package/dist/chunks/theme.provider-Ey-yIBM6.js +24 -0
  92. package/dist/chunks/theme.provider-Ey-yIBM6.js.map +1 -0
  93. package/dist/chunks/{timePicker.component-DXkOhFKy.js → timePicker.component-BSuNH0Ze.js} +3 -3
  94. package/dist/chunks/{timePicker.component-DXkOhFKy.js.map → timePicker.component-BSuNH0Ze.js.map} +1 -1
  95. package/dist/chunks/{timeRange.component-BTmY7o_y.js → timeRange.component-SMQArMaf.js} +2 -2
  96. package/dist/chunks/{timeRange.component-BTmY7o_y.js.map → timeRange.component-SMQArMaf.js.map} +1 -1
  97. package/dist/chunks/{timestamp.component-DLqT7x-O.js → timestamp.component-DAa3tXHL.js} +3 -3
  98. package/dist/chunks/{timestamp.component-DLqT7x-O.js.map → timestamp.component-DAa3tXHL.js.map} +1 -1
  99. package/dist/chunks/{toaster.records-Bb46MMbZ.js → toaster.records-DcadVT_W.js} +2 -2
  100. package/dist/chunks/{toaster.records-Bb46MMbZ.js.map → toaster.records-DcadVT_W.js.map} +1 -1
  101. package/dist/chunks/{tooltip.component-Cr_en1NQ.js → tooltip.component-XxpjNATA.js} +3 -3
  102. package/dist/chunks/{tooltip.component-Cr_en1NQ.js.map → tooltip.component-XxpjNATA.js.map} +1 -1
  103. package/dist/chunks/{typography.records-H4aA5AOA.js → typography.records-DDZuRT8J.js} +2 -2
  104. package/dist/chunks/{typography.records-H4aA5AOA.js.map → typography.records-DDZuRT8J.js.map} +1 -1
  105. package/dist/chunks/{use-field-context-Cm3grEyV.js → use-field-context-BZaIHuSQ.js} +2 -2
  106. package/dist/chunks/{use-field-context-Cm3grEyV.js.map → use-field-context-BZaIHuSQ.js.map} +1 -1
  107. package/dist/chunks/{use-locale-context-BiiNTYMT.js → use-locale-context-BNU4MHrO.js} +71 -71
  108. package/dist/chunks/{use-locale-context-BiiNTYMT.js.map → use-locale-context-BNU4MHrO.js.map} +1 -1
  109. package/dist/chunks/{withFormControl-l2C92-pT.js → withFormControl-BJbzRb4N.js} +6 -6
  110. package/dist/chunks/{withFormControl-l2C92-pT.js.map → withFormControl-BJbzRb4N.js.map} +1 -1
  111. package/dist/chunks/{withTruncation-CQ7mmyn9.js → withTruncation-CR8pGwFg.js} +2 -2
  112. package/dist/chunks/{withTruncation-CQ7mmyn9.js.map → withTruncation-CR8pGwFg.js.map} +1 -1
  113. package/dist/cjs/chakra/index.cjs +1 -1
  114. package/dist/cjs/chakra/index.cjs.map +1 -1
  115. package/dist/cjs/cli/generate-theme-types.cjs +4 -4
  116. package/dist/cjs/cli/generate-theme-types.cjs.map +1 -1
  117. package/dist/cjs/index.cjs +1 -1
  118. package/dist/cjs/theme/index.cjs +1 -1
  119. package/dist/esm/chakra/index.js +165 -162
  120. package/dist/esm/chakra/index.js.map +1 -1
  121. package/dist/esm/cli/generate-theme-types.js +2 -2
  122. package/dist/esm/cli/generate-theme-types.js.map +1 -1
  123. package/dist/esm/components/Alert/index.js +1 -1
  124. package/dist/esm/components/Avatar/index.js +1 -1
  125. package/dist/esm/components/AvatarGroup/index.js +1 -1
  126. package/dist/esm/components/ButtonGroup/index.js +1 -1
  127. package/dist/esm/components/CharacterCounter/index.js +1 -1
  128. package/dist/esm/components/Checkbox/index.js +1 -1
  129. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  130. package/dist/esm/components/ConversationCard/index.js +1 -1
  131. package/dist/esm/components/DatePicker/index.js +1 -1
  132. package/dist/esm/components/Heading/index.js +1 -1
  133. package/dist/esm/components/Menu/index.js +1 -1
  134. package/dist/esm/components/Modal/index.js +1 -1
  135. package/dist/esm/components/PinInput/index.js +1 -1
  136. package/dist/esm/components/Popover/index.js +1 -1
  137. package/dist/esm/components/RadioGroup/index.js +1 -1
  138. package/dist/esm/components/RatingDots/index.js +1 -1
  139. package/dist/esm/components/Select/index.js +1 -1
  140. package/dist/esm/components/SortableList/index.js +1 -1
  141. package/dist/esm/components/Spinner/index.js +1 -1
  142. package/dist/esm/components/StyledAvatar/index.js +1 -1
  143. package/dist/esm/components/Switch/index.js +1 -1
  144. package/dist/esm/components/Tabs/index.js +1 -1
  145. package/dist/esm/components/TagBlock/index.js +1 -1
  146. package/dist/esm/components/Text/index.js +1 -1
  147. package/dist/esm/components/TextInput/index.js +1 -1
  148. package/dist/esm/components/Textarea/index.js +1 -1
  149. package/dist/esm/components/TimePicker/index.js +1 -1
  150. package/dist/esm/components/TimeRange/index.js +1 -1
  151. package/dist/esm/components/Timestamp/index.js +1 -1
  152. package/dist/esm/components/Toast/index.js +1 -1
  153. package/dist/esm/components/Tooltip/index.js +1 -1
  154. package/dist/esm/components/index.js +30 -30
  155. package/dist/esm/index.js +60 -59
  156. package/dist/esm/theme/index.js +4 -3
  157. package/dist/types/chakra/index.d.ts +1 -1
  158. package/dist/types/theme/index.d.ts +1 -1
  159. package/dist/types/theme/theme.config.d.ts +3 -2
  160. package/package.json +1 -21
  161. package/dist/chunks/index-DUY19L6M.js.map +0 -1
  162. package/dist/chunks/index-iaug4k6v.js +0 -8
  163. package/dist/chunks/index-iaug4k6v.js.map +0 -1
  164. package/dist/chunks/theme.provider-Bt7Zc9PF.js +0 -26
  165. package/dist/chunks/theme.provider-Bt7Zc9PF.js.map +0 -1
  166. package/dist/chunks/theme.provider-DHvMwBwG.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"text.component-DJW--Vty.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/typography/text.js","../../src/components/Text/text.component.tsx"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"text\"\n});\nconst Text = withContext(\"p\");\nconst TextPropsProvider = PropsProvider;\n\nexport { Text, TextPropsProvider };\n","import React from 'react';\nimport { Text as CText, TextProps as CTextProps } from '@chakra-ui/react/typography';\nimport { withTruncation, WithTruncationProps } from 'hocs/withTruncation';\nimport { TextSize } from './text.types';\nimport { TypographyVariant } from 'shared/types/typography';\n\nexport interface TextProps extends WithTruncationProps, CTextProps {\n size?: TextSize;\n variant?: TypographyVariant;\n}\n\nconst Text = ({ children, ...rest }: TextProps): React.JSX.Element => {\n return (\n <CText className=\"Text\" data-testid=\"kibble-text\" {...rest}>\n {children}\n </CText>\n );\n};\n\nText.displayName = 'Text';\n\nconst WrappedText = withTruncation(Text);\n\nexport { WrappedText as Text };\n"],"names":["withContext","createRecipeContext","Text","children","rest","jsx","CText","WrappedText","withTruncation"],"mappings":";;;AAIA,MAAM,EAAE,aAAAA,EAA2B,IAAIC,EAAoB;AAAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAOF,EAAY,GAAG,GCItBE,IAAO,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAEzBC,gBAAAA,EAAA,IAACC,KAAM,WAAU,QAAO,eAAY,eAAe,GAAGF,GACnD,UAAAD,GACH;AAIJD,EAAK,cAAc;AAEb,MAAAK,IAAcC,EAAeN,CAAI;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"text.component-DKtdjH7k.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/typography/text.js","../../src/components/Text/text.component.tsx"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"text\"\n});\nconst Text = withContext(\"p\");\nconst TextPropsProvider = PropsProvider;\n\nexport { Text, TextPropsProvider };\n","import React from 'react';\nimport { Text as CText, TextProps as CTextProps } from '@chakra-ui/react/typography';\nimport { withTruncation, WithTruncationProps } from 'hocs/withTruncation';\nimport { TextSize } from './text.types';\nimport { TypographyVariant } from 'shared/types/typography';\n\nexport interface TextProps extends WithTruncationProps, CTextProps {\n size?: TextSize;\n variant?: TypographyVariant;\n}\n\nconst Text = ({ children, ...rest }: TextProps): React.JSX.Element => {\n return (\n <CText className=\"Text\" data-testid=\"kibble-text\" {...rest}>\n {children}\n </CText>\n );\n};\n\nText.displayName = 'Text';\n\nconst WrappedText = withTruncation(Text);\n\nexport { WrappedText as Text };\n"],"names":["withContext","createRecipeContext","Text","children","rest","jsx","CText","WrappedText","withTruncation"],"mappings":";;;AAIA,MAAM,EAAE,aAAAA,EAA2B,IAAIC,EAAoB;AAAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAOF,EAAY,GAAG,GCItBE,IAAO,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAEzBC,gBAAAA,EAAA,IAACC,KAAM,WAAU,QAAO,eAAY,eAAe,GAAGF,GACnD,UAAAD,GACH;AAIJD,EAAK,cAAc;AAEb,MAAAK,IAAcC,EAAeN,CAAI;","x_google_ignoreList":[0]}
@@ -1,17 +1,17 @@
1
1
  import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import b, { forwardRef as j, Children as T, cloneElement as k, useMemo as A } from "react";
3
- import { w as v } from "./withFormControl-l2C92-pT.js";
3
+ import { w as v } from "./withFormControl-BJbzRb4N.js";
4
4
  import { B as w } from "./button.component-DOAhnxbj.js";
5
- import { C as N } from "./characterCounter.component-C4sKYWJ2.js";
5
+ import { C as N } from "./characterCounter.component-Lya4VMgB.js";
6
6
  import { B } from "./box-Ck9I7FYv.js";
7
7
  import { E as S } from "./empty-BU2EAux9.js";
8
8
  import { c as E } from "./factory-Ctbv0Ozn.js";
9
9
  import { u as R } from "./use-recipe-d63ABaZ3.js";
10
10
  import { G } from "./group-DPCVolOl.js";
11
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";
12
+ import { f as z } from "./use-locale-context-BNU4MHrO.js";
13
+ import { u as M } from "./use-field-context-BZaIHuSQ.js";
14
+ import { a1 as O } from "./index-Ztgrae6O.js";
15
15
  const P = j((a, r) => {
16
16
  const e = M(), n = O(e?.getInputProps(), a);
17
17
  return /* @__PURE__ */ t.jsx(z.input, { ...n, ref: r });
@@ -166,4 +166,4 @@ const rt = v(_);
166
166
  export {
167
167
  rt as W
168
168
  };
169
- //# sourceMappingURL=textInput.component-evu71Hys.js.map
169
+ //# sourceMappingURL=textInput.component-DSVsTHqO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textInput.component-evu71Hys.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 { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { Input as CInput, InputProps as CInputProps, InputGroup } 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(() => value?.toString()?.length || 0, [value]);\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 && <CharacterCounter withLimit={true} limit={charLimit} currentCount={currentCharCount} />}\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,EAA2B,IAAIC,EAAoB;AAAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAQF,EAAYG,CAAW,GCA/BC,IAAab;AAAA,EACjB,SAAqB,EAAE,UAAAc,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+ {"version":3,"file":"textInput.component-DSVsTHqO.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 { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { Input as CInput, InputProps as CInputProps, InputGroup } 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(() => value?.toString()?.length || 0, [value]);\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 && <CharacterCounter withLimit={true} limit={charLimit} currentCount={currentCharCount} />}\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;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AW,cAAce,EAAkB,CAAA;AAAA,IAAA,GACvG;AAAA,EAAA;AAGN;AAEAjB,EAAU,cAAc;AAClB,MAAAsB,KAAmBC,EAAgCvB,CAAS;","x_google_ignoreList":[0,1,2,3,4]}
@@ -1,12 +1,12 @@
1
1
  import { j as p } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import u, { forwardRef as l, useRef as x, useEffect as v, useMemo as g } from "react";
3
- import { w as h } from "./withFormControl-l2C92-pT.js";
4
- import { C as w } from "./characterCounter.component-C4sKYWJ2.js";
3
+ import { w as h } from "./withFormControl-BJbzRb4N.js";
4
+ import { C as w } from "./characterCounter.component-Lya4VMgB.js";
5
5
  import { F as b } from "./flex-smlF8uQG.js";
6
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";
7
+ import { e as y, F as C, G as T, a1 as j } from "./index-Ztgrae6O.js";
8
+ import { f as O, h as R } from "./use-locale-context-BNU4MHrO.js";
9
+ import { u as E } from "./use-field-context-BZaIHuSQ.js";
10
10
  var P = (e) => {
11
11
  if (!e) return;
12
12
  const t = y(e), o = C(e), n = T(e), r = () => {
@@ -76,4 +76,4 @@ const B = h(f);
76
76
  export {
77
77
  B as W
78
78
  };
79
- //# sourceMappingURL=textarea.component-CZQMAMYT.js.map
79
+ //# sourceMappingURL=textarea.component-Cbo5Vs-6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.component-CZQMAMYT.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 { 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 charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement | null>;\n size?: FormControlSize;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n { charLimit = undefined, invalid, onContrast, resize = 'none', textareaRef, value, ...rest },\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\" 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 && <CharacterCounter withLimit={true} limit={charLimit} currentCount={currentCharCount} />}\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,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,UAAUO,IAAY,WAAWP,EAAM,SAAS,KAClEA,EAAM,cAAc,aACtBD,EAAG,MAAM,YAAY,WAEvBQ,IAAY,WAAWP,EAAM,SAAS,KAC7BA,EAAM,cAAc,aAC7BD,EAAG,MAAM,YAAY,WAEvBA,EAAG,MAAM,SAAS,GAAGQ,CAAS;AAAA,IACpC,CAAK;AAAA,EACF;AACD,EAAAR,EAAG,iBAAiB,SAASO,CAAM,GACnCP,EAAG,MAAM,iBAAiB,SAASO,CAAM;AACzC,QAAME,IAAmB,OAAO,eAAeT,CAAE,GAC3CU,IAAa,OAAO,yBA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AAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAWF;AAAA,EACfG;AACF,GCGMD,IAAWE,EAAM;AAAA,EACrB,CACE,EAAE,WAAAC,IAAY,QAAW,SAAAC,GAAS,YAAAC,GAAY,QAAA7B,IAAS,QAAQ,aAAAY,GAAa,OAAAkB,GAAO,GAAGC,EAAA,GACtFtB,MACsB;AAChB,UAAAuB,IAAmBH,IAAa,eAAe,WAE/CI,IAAmBC,EAAQ,MAAMJ,GAAO,YAAY,UAAU,GAAG,CAACA,CAAK,CAAC;AAE9E,kCACGK,GAAK,EAAA,WAAU,qBAAoB,UAAS,YAAW,GAAE,QACxD,UAAA;AAAA,MAAAhB,gBAAAA,EAAA;AAAA,QAACiB;AAAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,eAAY;AAAA,UACZ,KAAKxB,KAAeH;AAAA,UACpB,QAAAT;AAAA,UACA,SAASgC;AAAA,UACT,OAAAF;AAAA,UACC,GAAIF,KAAW,EAAE,gBAAgB,GAAK;AAAA,UACvC,MAAK;AAAA,UACJ,GAAGG;AAAA,QAAA;AAAA,MACN;AAAA,MACC,CAAC,CAACJ,KAAcR,gBAAAA,MAAAkB,GAAA,EAAiB,WAAW,IAAM,OAAOV,GAAW,cAAcM,EAAkB,CAAA;AAAA,IAAA,GACvG;AAAA,EAAA;AAGN;AAEAT,EAAS,cAAc;AACjB,MAAAc,IAAkBC,EAA+Bf,CAAQ;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"textarea.component-Cbo5Vs-6.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 { 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 charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement | null>;\n size?: FormControlSize;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n { charLimit = undefined, invalid, onContrast, resize = 'none', textareaRef, value, ...rest },\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\" 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 && <CharacterCounter withLimit={true} limit={charLimit} currentCount={currentCharCount} />}\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,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,UAAUO,IAAY,WAAWP,EAAM,SAAS,KAClEA,EAAM,cAAc,aACtBD,EAAG,MAAM,YAAY,WAEvBQ,IAAY,WAAWP,EAAM,SAAS,KAC7BA,EAAM,cAAc,aAC7BD,EAAG,MAAM,YAAY,WAEvBA,EAAG,MAAM,SAAS,GAAGQ,CAAS;AAAA,IACpC,CAAK;AAAA,EACF;AACD,EAAAR,EAAG,iBAAiB,SAASO,CAAM,GACnCP,EAAG,MAAM,iBAAiB,SAASO,CAAM;AACzC,QAAME,IAAmB,OAAO,eAAeT,CAAE,GAC3CU,IAAa,OAAO,yBAAyBD,GAAkB,OAAO;AAC5E,SAAO,eAAeT,GAAI,SAAS;AAA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