@televet/kibble-ui 5.0.28-rb.0 → 5.0.28

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 (262) hide show
  1. package/dist/chunks/{alert.component-nhRTQ5KK.js → alert.component-B0gDwaKQ.js} +2 -2
  2. package/dist/chunks/{alert.component-nhRTQ5KK.js.map → alert.component-B0gDwaKQ.js.map} +1 -1
  3. package/dist/chunks/{alert.component-OcRbeRJa.js → alert.component-B2kzYzhv.js} +3 -3
  4. package/dist/chunks/{alert.component-OcRbeRJa.js.map → alert.component-B2kzYzhv.js.map} +1 -1
  5. package/dist/chunks/{avatarGroup.component-CJCQSIyr.js → avatarGroup.component-CUOKTQHZ.js} +2 -2
  6. package/dist/chunks/{avatarGroup.component-CJCQSIyr.js.map → avatarGroup.component-CUOKTQHZ.js.map} +1 -1
  7. package/dist/chunks/{avatarGroup.component-BPhQpVYM.js → avatarGroup.component-z6SzTzKR.js} +3 -3
  8. package/dist/chunks/{avatarGroup.component-BPhQpVYM.js.map → avatarGroup.component-z6SzTzKR.js.map} +1 -1
  9. package/dist/chunks/{buttonGroup.component-pR0mvmm7.js → buttonGroup.component-CHbRCpMI.js} +2 -2
  10. package/dist/chunks/{buttonGroup.component-pR0mvmm7.js.map → buttonGroup.component-CHbRCpMI.js.map} +1 -1
  11. package/dist/chunks/{buttonGroup.component-CO5lC36l.js → buttonGroup.component-CYJxaqK1.js} +2 -2
  12. package/dist/chunks/{buttonGroup.component-CO5lC36l.js.map → buttonGroup.component-CYJxaqK1.js.map} +1 -1
  13. package/dist/chunks/calendar.component-BpDNoBAZ.js +62 -0
  14. package/dist/chunks/calendar.component-BpDNoBAZ.js.map +1 -0
  15. package/dist/chunks/calendar.component-C2bzItDq.js +2 -0
  16. package/dist/chunks/calendar.component-C2bzItDq.js.map +1 -0
  17. package/dist/chunks/{characterCounter.component-BRHLt929.js → characterCounter.component-CczgC612.js} +2 -2
  18. package/dist/chunks/{characterCounter.component-BRHLt929.js.map → characterCounter.component-CczgC612.js.map} +1 -1
  19. package/dist/chunks/{characterCounter.component-DI_FQNUR.js → characterCounter.component-Cm9yEHjz.js} +2 -2
  20. package/dist/chunks/{characterCounter.component-DI_FQNUR.js.map → characterCounter.component-Cm9yEHjz.js.map} +1 -1
  21. package/dist/chunks/{checkbox.component-DUJCiZr2.js → checkbox.component-Bytw6Mk1.js} +3 -3
  22. package/dist/chunks/{checkbox.component-DUJCiZr2.js.map → checkbox.component-Bytw6Mk1.js.map} +1 -1
  23. package/dist/chunks/{checkbox.component-C132vkan.js → checkbox.component-CrTnnQ30.js} +2 -2
  24. package/dist/chunks/{checkbox.component-C132vkan.js.map → checkbox.component-CrTnnQ30.js.map} +1 -1
  25. package/dist/chunks/{checkboxGroup.component-DW9qUlSm.js → checkboxGroup.component-Bf_yc-Fl.js} +3 -3
  26. package/dist/chunks/{checkboxGroup.component-DW9qUlSm.js.map → checkboxGroup.component-Bf_yc-Fl.js.map} +1 -1
  27. package/dist/chunks/{checkboxGroup.component-2U0ZW1TD.js → checkboxGroup.component-CndHvReL.js} +2 -2
  28. package/dist/chunks/{checkboxGroup.component-2U0ZW1TD.js.map → checkboxGroup.component-CndHvReL.js.map} +1 -1
  29. package/dist/chunks/{conversationCard.component-CscMIq51.js → conversationCard.component-BKXSq7NS.js} +2 -2
  30. package/dist/chunks/{conversationCard.component-CscMIq51.js.map → conversationCard.component-BKXSq7NS.js.map} +1 -1
  31. package/dist/chunks/{conversationCard.component-DByFo4jj.js → conversationCard.component-Mn3eYMW_.js} +6 -6
  32. package/dist/chunks/{conversationCard.component-DByFo4jj.js.map → conversationCard.component-Mn3eYMW_.js.map} +1 -1
  33. package/dist/chunks/{datePicker.component-CLTjEX7i.js → datePicker.component-CHBO_Jrk.js} +5 -5
  34. package/dist/chunks/{datePicker.component-CLTjEX7i.js.map → datePicker.component-CHBO_Jrk.js.map} +1 -1
  35. package/dist/chunks/{datePicker.component-BuGpHTzS.js → datePicker.component-DQ0a5vhA.js} +2 -2
  36. package/dist/chunks/{datePicker.component-BuGpHTzS.js.map → datePicker.component-DQ0a5vhA.js.map} +1 -1
  37. package/dist/chunks/{datePicker.provider-i35-VNAb.js → datePicker.provider-CDhsnFSD.js} +2 -2
  38. package/dist/chunks/{datePicker.provider-i35-VNAb.js.map → datePicker.provider-CDhsnFSD.js.map} +1 -1
  39. package/dist/chunks/{datePicker.provider-CttuPiiS.js → datePicker.provider-o-sEPUJe.js} +7 -7
  40. package/dist/chunks/{datePicker.provider-CttuPiiS.js.map → datePicker.provider-o-sEPUJe.js.map} +1 -1
  41. package/dist/chunks/dateTimePicker.component-B1tTKUZU.js +306 -0
  42. package/dist/chunks/dateTimePicker.component-B1tTKUZU.js.map +1 -0
  43. package/dist/chunks/dateTimePicker.component-oLZ5KXWa.js +2 -0
  44. package/dist/chunks/dateTimePicker.component-oLZ5KXWa.js.map +1 -0
  45. package/dist/chunks/endOfMonth-ClO3w4vF.js +2 -0
  46. package/dist/chunks/endOfMonth-ClO3w4vF.js.map +1 -0
  47. package/dist/chunks/endOfMonth-D0kCU08_.js +19 -0
  48. package/dist/chunks/endOfMonth-D0kCU08_.js.map +1 -0
  49. package/dist/chunks/{format-CqTHHSak.js → format-dJJ72A--.js} +3 -3
  50. package/dist/chunks/{format-CqTHHSak.js.map → format-dJJ72A--.js.map} +1 -1
  51. package/dist/chunks/{heading.component-CpSAN3cv.js → heading.component-BBTU00_w.js} +2 -2
  52. package/dist/chunks/{heading.component-CpSAN3cv.js.map → heading.component-BBTU00_w.js.map} +1 -1
  53. package/dist/chunks/{heading.component-DnoZOXdz.js → heading.component-DeM4h5rY.js} +2 -2
  54. package/dist/chunks/{heading.component-DnoZOXdz.js.map → heading.component-DeM4h5rY.js.map} +1 -1
  55. package/dist/chunks/isToday-Q8lj3mkM.js +23 -0
  56. package/dist/chunks/{isToday-iCYsPDMT.js.map → isToday-Q8lj3mkM.js.map} +1 -1
  57. package/dist/chunks/{maintenanceBanner.types-DerZF_8G.js → maintenanceBanner.types-BiSgtHkP.js} +2 -2
  58. package/dist/chunks/{maintenanceBanner.types-DerZF_8G.js.map → maintenanceBanner.types-BiSgtHkP.js.map} +1 -1
  59. package/dist/chunks/{maintenanceBanner.types-BsNjAlXa.js → maintenanceBanner.types-CfHYj6Nu.js} +2 -2
  60. package/dist/chunks/{maintenanceBanner.types-BsNjAlXa.js.map → maintenanceBanner.types-CfHYj6Nu.js.map} +1 -1
  61. package/dist/chunks/{menu.component-D2V9Q1Y5.js → menu.component-CNbEm3SL.js} +2 -2
  62. package/dist/chunks/{menu.component-D2V9Q1Y5.js.map → menu.component-CNbEm3SL.js.map} +1 -1
  63. package/dist/chunks/{menu.component-WHzMw5ZI.js → menu.component-DwnU1N2a.js} +5 -5
  64. package/dist/chunks/{menu.component-WHzMw5ZI.js.map → menu.component-DwnU1N2a.js.map} +1 -1
  65. package/dist/chunks/{modal.types-Bj6PrItn.js → modal.types-CfN8ElV6.js} +2 -2
  66. package/dist/chunks/{modal.types-Bj6PrItn.js.map → modal.types-CfN8ElV6.js.map} +1 -1
  67. package/dist/chunks/{modal.types-rx31rD9D.js → modal.types-DlvB1lQC.js} +2 -2
  68. package/dist/chunks/{modal.types-rx31rD9D.js.map → modal.types-DlvB1lQC.js.map} +1 -1
  69. package/dist/chunks/{notificationCounter.component-CBwi5vXa.js → notificationCounter.component-BUxWlpKh.js} +2 -2
  70. package/dist/chunks/{notificationCounter.component-CBwi5vXa.js.map → notificationCounter.component-BUxWlpKh.js.map} +1 -1
  71. package/dist/chunks/{notificationCounter.component-6Q3q8jWj.js → notificationCounter.component-DhfVkkOQ.js} +2 -2
  72. package/dist/chunks/{notificationCounter.component-6Q3q8jWj.js.map → notificationCounter.component-DhfVkkOQ.js.map} +1 -1
  73. package/dist/chunks/{numberInput.component-DGPEz0Fv.js → numberInput.component-B0P7w6Av.js} +2 -2
  74. package/dist/chunks/{numberInput.component-DGPEz0Fv.js.map → numberInput.component-B0P7w6Av.js.map} +1 -1
  75. package/dist/chunks/{numberInput.component-CRDRjrTH.js → numberInput.component-Bpl3NGJU.js} +2 -2
  76. package/dist/chunks/{numberInput.component-CRDRjrTH.js.map → numberInput.component-Bpl3NGJU.js.map} +1 -1
  77. package/dist/chunks/{pinInput.types-bIGh7aUS.js → pinInput.types-B0WLZ-4e.js} +2 -2
  78. package/dist/chunks/{pinInput.types-bIGh7aUS.js.map → pinInput.types-B0WLZ-4e.js.map} +1 -1
  79. package/dist/chunks/{pinInput.types-Can9f1Eu.js → pinInput.types-xxX7jDUo.js} +2 -2
  80. package/dist/chunks/{pinInput.types-Can9f1Eu.js.map → pinInput.types-xxX7jDUo.js.map} +1 -1
  81. package/dist/chunks/{popover.component-DIYT1Lc0.js → popover.component-65oNmbmB.js} +3 -3
  82. package/dist/chunks/{popover.component-DIYT1Lc0.js.map → popover.component-65oNmbmB.js.map} +1 -1
  83. package/dist/chunks/{popover.component-DTjA1GSd.js → popover.component-Cw6-018C.js} +2 -2
  84. package/dist/chunks/{popover.component-DTjA1GSd.js.map → popover.component-Cw6-018C.js.map} +1 -1
  85. package/dist/chunks/{radioGroup.types-U1ep9nrN.js → radioGroup.types-4D0zmi0v.js} +2 -2
  86. package/dist/chunks/{radioGroup.types-U1ep9nrN.js.map → radioGroup.types-4D0zmi0v.js.map} +1 -1
  87. package/dist/chunks/{radioGroup.types-DzSpA07h.js → radioGroup.types-Dbfon_Lr.js} +4 -4
  88. package/dist/chunks/{radioGroup.types-DzSpA07h.js.map → radioGroup.types-Dbfon_Lr.js.map} +1 -1
  89. package/dist/chunks/{rating.component-DsHkKmA7.js → rating.component-DOUCmD0Y.js} +2 -2
  90. package/dist/chunks/{rating.component-DsHkKmA7.js.map → rating.component-DOUCmD0Y.js.map} +1 -1
  91. package/dist/chunks/{rating.component-BWBPSEEk.js → rating.component-DlCpQ5GH.js} +2 -2
  92. package/dist/chunks/{rating.component-BWBPSEEk.js.map → rating.component-DlCpQ5GH.js.map} +1 -1
  93. package/dist/chunks/{ratingDots.component-BhWM7kTg.js → ratingDots.component-Qk8qlPmN.js} +3 -3
  94. package/dist/chunks/{ratingDots.component-BhWM7kTg.js.map → ratingDots.component-Qk8qlPmN.js.map} +1 -1
  95. package/dist/chunks/{ratingDots.component-CZ370iI3.js → ratingDots.component-pc5p1mua.js} +2 -2
  96. package/dist/chunks/{ratingDots.component-CZ370iI3.js.map → ratingDots.component-pc5p1mua.js.map} +1 -1
  97. package/dist/chunks/{select.component-OrsHXCMz.js → select.component-CzyXxbhS.js} +2 -2
  98. package/dist/chunks/{select.component-OrsHXCMz.js.map → select.component-CzyXxbhS.js.map} +1 -1
  99. package/dist/chunks/{select.component-DckP-f8y.js → select.component-DIrbeCPd.js} +5 -5
  100. package/dist/chunks/{select.component-DckP-f8y.js.map → select.component-DIrbeCPd.js.map} +1 -1
  101. package/dist/chunks/{semanticTokens.records-YFGbKTL1.js → semanticTokens.records-CmeaObFQ.js} +2 -2
  102. package/dist/chunks/{semanticTokens.records-YFGbKTL1.js.map → semanticTokens.records-CmeaObFQ.js.map} +1 -1
  103. package/dist/chunks/{semanticTokens.records-C_ewkfqj.js → semanticTokens.records-Di2_gv9n.js} +9 -9
  104. package/dist/chunks/{semanticTokens.records-C_ewkfqj.js.map → semanticTokens.records-Di2_gv9n.js.map} +1 -1
  105. package/dist/chunks/{sortableList.component-CbxbBLVQ.js → sortableList.component-05kG3QEM.js} +2 -2
  106. package/dist/chunks/{sortableList.component-CbxbBLVQ.js.map → sortableList.component-05kG3QEM.js.map} +1 -1
  107. package/dist/chunks/{sortableList.component-2yX2pXs7.js → sortableList.component-DX9EP39N.js} +2 -2
  108. package/dist/chunks/{sortableList.component-2yX2pXs7.js.map → sortableList.component-DX9EP39N.js.map} +1 -1
  109. package/dist/chunks/{spinner.component-Dq6u4vVL.js → spinner.component-0tE7mnxi.js} +2 -2
  110. package/dist/chunks/{spinner.component-Dq6u4vVL.js.map → spinner.component-0tE7mnxi.js.map} +1 -1
  111. package/dist/chunks/{spinner.component-CNHQ8UDz.js → spinner.component-CQ-JWUon.js} +2 -2
  112. package/dist/chunks/{spinner.component-CNHQ8UDz.js.map → spinner.component-CQ-JWUon.js.map} +1 -1
  113. package/dist/chunks/{switch.component-BYEMhBCA.js → switch.component-BKahX4Bw.js} +2 -2
  114. package/dist/chunks/{switch.component-BYEMhBCA.js.map → switch.component-BKahX4Bw.js.map} +1 -1
  115. package/dist/chunks/{switch.component-DjN67nap.js → switch.component-WMd5cinZ.js} +2 -2
  116. package/dist/chunks/{switch.component-DjN67nap.js.map → switch.component-WMd5cinZ.js.map} +1 -1
  117. package/dist/chunks/{tab.types-JAJ5Xxff.js → tab.types-CTlxVEvQ.js} +3 -3
  118. package/dist/chunks/{tab.types-JAJ5Xxff.js.map → tab.types-CTlxVEvQ.js.map} +1 -1
  119. package/dist/chunks/{tab.types-DSPWRVCF.js → tab.types-xN2lQJLC.js} +2 -2
  120. package/dist/chunks/{tab.types-DSPWRVCF.js.map → tab.types-xN2lQJLC.js.map} +1 -1
  121. package/dist/chunks/{tagBlock.component-CT7_RyJ-.js → tagBlock.component-CNwLyYYb.js} +5 -5
  122. package/dist/chunks/{tagBlock.component-CT7_RyJ-.js.map → tagBlock.component-CNwLyYYb.js.map} +1 -1
  123. package/dist/chunks/{tagBlock.component-B899iqQP.js → tagBlock.component-fnt27QP6.js} +2 -2
  124. package/dist/chunks/{tagBlock.component-B899iqQP.js.map → tagBlock.component-fnt27QP6.js.map} +1 -1
  125. package/dist/chunks/{text.component-DhuUgP3j.js → text.component-C9jh_JMO.js} +2 -2
  126. package/dist/chunks/{text.component-DhuUgP3j.js.map → text.component-C9jh_JMO.js.map} +1 -1
  127. package/dist/chunks/{text.component-BDDz5KQP.js → text.component-D5GpbfNx.js} +2 -2
  128. package/dist/chunks/{text.component-BDDz5KQP.js.map → text.component-D5GpbfNx.js.map} +1 -1
  129. package/dist/chunks/{textInput.component-CwTc0h_F.js → textInput.component-BDJuvT1c.js} +2 -2
  130. package/dist/chunks/{textInput.component-CwTc0h_F.js.map → textInput.component-BDJuvT1c.js.map} +1 -1
  131. package/dist/chunks/{textInput.component-BeiTxTkS.js → textInput.component-DAan7BwF.js} +3 -3
  132. package/dist/chunks/{textInput.component-BeiTxTkS.js.map → textInput.component-DAan7BwF.js.map} +1 -1
  133. package/dist/chunks/{textarea.component-BIg_XX_R.js → textarea.component-1Gvjelye.js} +2 -2
  134. package/dist/chunks/{textarea.component-BIg_XX_R.js.map → textarea.component-1Gvjelye.js.map} +1 -1
  135. package/dist/chunks/{textarea.component-C6Wt1Pk8.js → textarea.component-B-tQg_4m.js} +3 -3
  136. package/dist/chunks/{textarea.component-C6Wt1Pk8.js.map → textarea.component-B-tQg_4m.js.map} +1 -1
  137. package/dist/chunks/theme-BFbOz0Jj.js.map +1 -1
  138. package/dist/chunks/theme-BOK659O0.js.map +1 -1
  139. package/dist/chunks/{theme.provider-BeSlhtUQ.js → theme.provider-CD72J0A7.js} +17 -6
  140. package/dist/chunks/{theme.provider-BeSlhtUQ.js.map → theme.provider-CD72J0A7.js.map} +1 -1
  141. package/dist/chunks/{theme.provider-DYehMUhm.js → theme.provider-DpFjsbLx.js} +2 -2
  142. package/dist/chunks/{theme.provider-DYehMUhm.js.map → theme.provider-DpFjsbLx.js.map} +1 -1
  143. package/dist/chunks/{timePicker.component-BCMX6aqb.js → timePicker.component-CvQ9kF_7.js} +4 -4
  144. package/dist/chunks/{timePicker.component-BCMX6aqb.js.map → timePicker.component-CvQ9kF_7.js.map} +1 -1
  145. package/dist/chunks/{timePicker.component-D5hw80VV.js → timePicker.component-D2gDf5fp.js} +2 -2
  146. package/dist/chunks/{timePicker.component-D5hw80VV.js.map → timePicker.component-D2gDf5fp.js.map} +1 -1
  147. package/dist/chunks/{timeRange.component-D3Db8lvh.js → timeRange.component-DL2vskjy.js} +2 -2
  148. package/dist/chunks/{timeRange.component-D3Db8lvh.js.map → timeRange.component-DL2vskjy.js.map} +1 -1
  149. package/dist/chunks/{timeRange.component-BZHpZeAX.js → timeRange.component-DfOq2mGR.js} +2 -2
  150. package/dist/chunks/{timeRange.component-BZHpZeAX.js.map → timeRange.component-DfOq2mGR.js.map} +1 -1
  151. package/dist/chunks/{timestamp.component-BfmZPfy5.js → timestamp.component-CRTYMLmn.js} +2 -2
  152. package/dist/chunks/{timestamp.component-BfmZPfy5.js.map → timestamp.component-CRTYMLmn.js.map} +1 -1
  153. package/dist/chunks/{timestamp.component-DkLjxUsy.js → timestamp.component-CRz-1i68.js} +4 -4
  154. package/dist/chunks/{timestamp.component-DkLjxUsy.js.map → timestamp.component-CRz-1i68.js.map} +1 -1
  155. package/dist/chunks/{withFormControl-DW9A6BSL.js → withFormControl-DVeqCX53.js} +2 -2
  156. package/dist/chunks/{withFormControl-DW9A6BSL.js.map → withFormControl-DVeqCX53.js.map} +1 -1
  157. package/dist/chunks/{withFormControl-QV_Jridv.js → withFormControl-d2CEvsH2.js} +2 -2
  158. package/dist/chunks/{withFormControl-QV_Jridv.js.map → withFormControl-d2CEvsH2.js.map} +1 -1
  159. package/dist/chunks/withTruncation-D0mlwwep.js +2 -0
  160. package/dist/chunks/{withTruncation-B2GhwmHG.js.map → withTruncation-D0mlwwep.js.map} +1 -1
  161. package/dist/chunks/withTruncation-DW62mTHW.js +103 -0
  162. package/dist/chunks/withTruncation-DW62mTHW.js.map +1 -0
  163. package/dist/cjs/components/Alert/index.cjs +1 -1
  164. package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
  165. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  166. package/dist/cjs/components/Calendar/index.cjs +1 -1
  167. package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
  168. package/dist/cjs/components/Checkbox/index.cjs +1 -1
  169. package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
  170. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  171. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  172. package/dist/cjs/components/DateTimePicker/index.cjs +1 -1
  173. package/dist/cjs/components/Heading/index.cjs +1 -1
  174. package/dist/cjs/components/MaintenanceBanner/index.cjs +1 -1
  175. package/dist/cjs/components/Menu/index.cjs +1 -1
  176. package/dist/cjs/components/Modal/index.cjs +1 -1
  177. package/dist/cjs/components/NotificationCounter/index.cjs +1 -1
  178. package/dist/cjs/components/NumberInput/index.cjs +1 -1
  179. package/dist/cjs/components/PinInput/index.cjs +1 -1
  180. package/dist/cjs/components/Popover/index.cjs +1 -1
  181. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  182. package/dist/cjs/components/Rating/index.cjs +1 -1
  183. package/dist/cjs/components/RatingDots/index.cjs +1 -1
  184. package/dist/cjs/components/Select/index.cjs +1 -1
  185. package/dist/cjs/components/SortableList/index.cjs +1 -1
  186. package/dist/cjs/components/Spinner/index.cjs +1 -1
  187. package/dist/cjs/components/Switch/index.cjs +1 -1
  188. package/dist/cjs/components/Tabs/index.cjs +1 -1
  189. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  190. package/dist/cjs/components/Text/index.cjs +1 -1
  191. package/dist/cjs/components/TextInput/index.cjs +1 -1
  192. package/dist/cjs/components/Textarea/index.cjs +1 -1
  193. package/dist/cjs/components/TimePicker/index.cjs +1 -1
  194. package/dist/cjs/components/TimeRange/index.cjs +1 -1
  195. package/dist/cjs/components/Timestamp/index.cjs +1 -1
  196. package/dist/cjs/components/index.cjs +1 -1
  197. package/dist/cjs/index.cjs +1 -1
  198. package/dist/cjs/theme/index.cjs +1 -1
  199. package/dist/cjs/theme/semanticTokens/index.cjs +1 -1
  200. package/dist/cjs/theme/semanticTokens/index.cjs.map +1 -1
  201. package/dist/esm/components/Alert/index.js +1 -1
  202. package/dist/esm/components/AvatarGroup/index.js +1 -1
  203. package/dist/esm/components/ButtonGroup/index.js +1 -1
  204. package/dist/esm/components/Calendar/index.js +4 -2
  205. package/dist/esm/components/CharacterCounter/index.js +1 -1
  206. package/dist/esm/components/Checkbox/index.js +1 -1
  207. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  208. package/dist/esm/components/ConversationCard/index.js +1 -1
  209. package/dist/esm/components/DatePicker/index.js +2 -2
  210. package/dist/esm/components/DateTimePicker/index.js +1 -1
  211. package/dist/esm/components/Heading/index.js +1 -1
  212. package/dist/esm/components/MaintenanceBanner/index.js +1 -1
  213. package/dist/esm/components/Menu/index.js +1 -1
  214. package/dist/esm/components/Modal/index.js +1 -1
  215. package/dist/esm/components/NotificationCounter/index.js +1 -1
  216. package/dist/esm/components/NumberInput/index.js +1 -1
  217. package/dist/esm/components/PinInput/index.js +1 -1
  218. package/dist/esm/components/Popover/index.js +1 -1
  219. package/dist/esm/components/RadioGroup/index.js +1 -1
  220. package/dist/esm/components/Rating/index.js +1 -1
  221. package/dist/esm/components/RatingDots/index.js +1 -1
  222. package/dist/esm/components/Select/index.js +1 -1
  223. package/dist/esm/components/SortableList/index.js +1 -1
  224. package/dist/esm/components/Spinner/index.js +1 -1
  225. package/dist/esm/components/Switch/index.js +1 -1
  226. package/dist/esm/components/Tabs/index.js +1 -1
  227. package/dist/esm/components/TagBlock/index.js +1 -1
  228. package/dist/esm/components/Text/index.js +1 -1
  229. package/dist/esm/components/TextInput/index.js +1 -1
  230. package/dist/esm/components/Textarea/index.js +1 -1
  231. package/dist/esm/components/TimePicker/index.js +1 -1
  232. package/dist/esm/components/TimeRange/index.js +1 -1
  233. package/dist/esm/components/Timestamp/index.js +1 -1
  234. package/dist/esm/components/index.js +127 -125
  235. package/dist/esm/index.js +155 -153
  236. package/dist/esm/theme/index.js +1 -1
  237. package/dist/esm/theme/semanticTokens/index.js +39 -15
  238. package/dist/esm/theme/semanticTokens/index.js.map +1 -1
  239. package/dist/types/components/Calendar/calendar.component.d.ts +19 -1
  240. package/dist/types/components/Calendar/calendar.utils.d.ts +3 -0
  241. package/dist/types/components/Calendar/calendarFooterButton.component.d.ts +41 -0
  242. package/dist/types/components/Calendar/index.d.ts +2 -0
  243. package/dist/types/components/Heading/heading.recipe.d.ts +1 -1
  244. package/dist/types/components/Link/link.recipe.d.ts +1 -1
  245. package/dist/types/components/Modal/modal.recipe.d.ts +1 -1
  246. package/dist/types/components/Text/text.recipe.d.ts +1 -1
  247. package/dist/types/shared/types/theme.d.ts +1 -1
  248. package/dist/types/theme/semanticTokens/semanticTokens.config.d.ts +37 -37
  249. package/dist/types/theme/tokens/colors/colors.config.d.ts +1 -1
  250. package/package.json +1 -1
  251. package/dist/chunks/calendar.component-BFSyxaB6.js +0 -2
  252. package/dist/chunks/calendar.component-BFSyxaB6.js.map +0 -1
  253. package/dist/chunks/calendar.component-CegJR9ey.js +0 -18
  254. package/dist/chunks/calendar.component-CegJR9ey.js.map +0 -1
  255. package/dist/chunks/dateTimePicker.component-BlWhC5aT.js +0 -2
  256. package/dist/chunks/dateTimePicker.component-BlWhC5aT.js.map +0 -1
  257. package/dist/chunks/dateTimePicker.component-CLAI_Q6e.js +0 -317
  258. package/dist/chunks/dateTimePicker.component-CLAI_Q6e.js.map +0 -1
  259. package/dist/chunks/isToday-iCYsPDMT.js +0 -23
  260. package/dist/chunks/withTruncation-B2GhwmHG.js +0 -92
  261. package/dist/chunks/withTruncation-pzYbtqYw.js +0 -2
  262. package/dist/chunks/withTruncation-pzYbtqYw.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"modal.types-rx31rD9D.js","sources":["../../src/components/Modal/components/ModalFooter/modalFooter.component.tsx","../../src/components/Modal/modal.component.tsx","../../src/components/Modal/modal.types.ts"],"sourcesContent":["import React from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { Button } from 'components/Button/button.component';\n\nexport interface ModalFooterProps extends Dialog.FooterProps {\n /** Content to be rendered in the footer. */\n children?: React.ReactNode;\n /** If true, the submit button will be displayed as a destructive button.\n * @default false\n */\n destructive?: boolean;\n /** If true, the footer will be disabled. */\n disabled?: boolean;\n /** If true, the cancel button will not be displayed.\n * @default false\n */\n hideCancel?: boolean;\n /** If true, the submit button will be displayed with a loading state. */\n loading?: boolean;\n /** Text to display in the loading state. */\n loadingText?: string;\n /** Text to display in the cancel button. */\n cancelText?: string;\n /** Callback function to be called when the cancel button is clicked. */\n onCancel?: () => void;\n /** Callback function to be called when the submit button is clicked. */\n onSubmit?: () => void | Promise<void>;\n /** Text to display in the submit button. */\n submitText?: string;\n /** Position of the buttons.\n * @default space-between\n */\n buttonPosition?: 'start' | 'end' | 'space-between';\n /** Data test id for the footer.\n * @default kibble-modal-footer\n */\n 'data-testid'?: string;\n}\n\nexport const ModalFooter = ({\n children,\n destructive,\n disabled,\n hideCancel = false,\n loading,\n loadingText,\n onCancel,\n onSubmit,\n submitText = 'Submit',\n cancelText = 'Cancel',\n buttonPosition = 'space-between',\n ['data-testid']: dataTestId = 'kibble-modal-footer',\n ...rest\n}: ModalFooterProps): React.JSX.Element => {\n return (\n <Dialog.Footer className=\"Modal__Footer\" data-testid={dataTestId} {...rest}>\n {children ? (\n children\n ) : (\n <Flex alignItems=\"center\" justifyContent={buttonPosition} w=\"100%\">\n {!hideCancel && (\n <Dialog.ActionTrigger asChild className=\"Modal__CancelButton\" data-testid={`${dataTestId}-cancel-button`}>\n <Button variant=\"tertiary\" onClick={onCancel}>\n {cancelText}\n </Button>\n </Dialog.ActionTrigger>\n )}\n <Button\n className=\"Modal__SubmitButton\"\n data-testid={`${dataTestId}-submit-button`}\n onClick={onSubmit}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n type=\"submit\"\n variant={destructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n )}\n </Dialog.Footer>\n );\n};\n","import React, { useRef, useState } from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\nimport { ModalFooter, ModalFooterProps } from './components/ModalFooter/modalFooter.component';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { ModalMotionPreset, ModalPlacement, ModalSize } from './modal.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { useBreakpointValue } from '@chakra-ui/react';\nimport { PortalContext, usePortalContentRef } from 'hooks/usePortalContentRef';\n\nexport interface ModalProps extends Dialog.RootProps {\n /** Props to customize the default footer. If a custom footer is needed, you can use the `children` prop to build your own. */\n footerProps?: ModalFooterProps;\n /**\n * Whether to use full screen on mobile devices.\n * @default true\n */\n fullScreenMobile?: boolean;\n /** The header of the modal. */\n header?: React.ReactNode;\n /** Props to customize the header when passed as a string. */\n headerProps?: HeadingProps;\n /**\n * Whether to hide the close button.\n * @default false\n */\n hideCloseButton?: boolean;\n /** Props to customize the close button. */\n closeButtonProps?: Omit<ButtonProps, 'iconName' | 'onClick'>;\n /**\n * Whether to hide the modal footer.\n * @default false\n */\n hideFooter?: boolean;\n /** The animation preset for the modal.\n * @default slide-in-bottom\n */\n motionPreset?: ModalMotionPreset;\n /** The placement of the modal.\n * @default center\n */\n placement?: ModalPlacement;\n /**\n * Whether to show the expand button.\n * @default false\n */\n showExpandButton?: boolean;\n /** The size of the modal.\n * @default md\n */\n size?: ConditionalValue<ModalSize>;\n /** The element used to open the modal. If no trigger is provided, the modal will need to be controlled with the `open` and `onOpenChange` props. */\n trigger?: React.ReactNode;\n /**\n * Whether to render the modal in a portal. Set to false if this modal is nested inside another modal.\n * @default true\n */\n portalled?: boolean;\n /** Props to customize the content of the modal. */\n contentProps?: Dialog.ContentProps;\n /** Props to customize the positioner of the modal. */\n positionerProps?: Dialog.PositionerProps;\n /** Data test id for the modal.\n * @default kibble-modal\n */\n 'data-testid'?: string;\n}\n\nexport const Modal = ({\n children,\n footerProps,\n fullScreenMobile = true,\n header,\n headerProps,\n hideCloseButton = false,\n closeButtonProps,\n hideFooter = false,\n motionPreset = 'slide-in-bottom',\n placement = 'center',\n showExpandButton = false,\n size = 'md',\n trigger,\n ['data-testid']: dataTestId = 'kibble-modal',\n portalled = true,\n contentProps,\n positionerProps,\n ...rest\n}: ModalProps): React.JSX.Element => {\n const { contentRef: parentContentRef } = usePortalContentRef();\n const modalContentRef = useRef<HTMLDivElement>(null!);\n const contextValue = { contentRef: modalContentRef };\n const [isExpanded, setIsExpanded] = useState(false);\n const computedSize = useBreakpointValue({\n base: fullScreenMobile ? 'full' : size,\n md: size,\n });\n\n return (\n <Dialog.Root\n motionPreset={motionPreset}\n placement={placement}\n size={computedSize}\n expanded={isExpanded}\n data-testid={`${dataTestId}-root`}\n {...rest}\n >\n {trigger && <Dialog.Trigger asChild>{trigger}</Dialog.Trigger>}\n <Portal disabled={!portalled} container={parentContentRef || undefined}>\n <Dialog.Backdrop />\n <Dialog.Positioner {...positionerProps}>\n <Dialog.Content\n className=\"Modal\"\n data-testid={`${dataTestId}-content`}\n {...contentProps}\n ref={modalContentRef}\n >\n <PortalContext.Provider value={contextValue}>\n {!hideCloseButton && (\n <Dialog.CloseTrigger asChild className=\"Modal__CloseButton\" data-testid=\"kibble-modal-close-button\">\n <Button iconName=\"close\" variant=\"ghostNeutral\" {...closeButtonProps} />\n </Dialog.CloseTrigger>\n )}\n {showExpandButton && (\n <Button\n className=\"Modal__ExpandButton\"\n data-testid={`${dataTestId}-expand-button`}\n variant=\"ghostNeutral\"\n iconName={isExpanded ? 'arrowsIn' : 'arrowsOut'}\n position=\"absolute\"\n top={2}\n right={12}\n onClick={() => setIsExpanded((prev) => !prev)}\n />\n )}\n <Dialog.Header className=\"Modal__Header\" data-testid={`${dataTestId}-header`}>\n {header &&\n (typeof header === 'string' ? (\n <Dialog.Title className=\"Modal__Title\" data-testid={`${dataTestId}-title`} asChild>\n <Heading p={0} size=\"md\" {...headerProps}>\n {header}\n </Heading>\n </Dialog.Title>\n ) : (\n <Dialog.Title className=\"Modal__Title\" data-testid={`${dataTestId}-title`}>\n {header}\n </Dialog.Title>\n ))}\n </Dialog.Header>\n <Dialog.Body className=\"Modal__Body\" data-testid={`${dataTestId}-body`}>\n {children}\n </Dialog.Body>\n {!hideFooter && <ModalFooter {...footerProps} />}\n </PortalContext.Provider>\n </Dialog.Content>\n </Dialog.Positioner>\n </Portal>\n </Dialog.Root>\n );\n};\n","export const modalSizes = ['xs', 'sm', 'md', 'lg', 'cover', 'full'] as const;\nexport type ModalSize = (typeof modalSizes)[number];\n\nexport const modalPlacements = ['center', 'top', 'bottom'] as const;\nexport type ModalPlacement = (typeof modalPlacements)[number];\n\nexport const modalScrollBehaviors = ['inside', 'outside'] as const;\nexport type ModalScrollBehavior = (typeof modalScrollBehaviors)[number];\n\nexport const modalMotionPresets = [\n 'scale',\n 'slide-in-bottom',\n 'slide-in-top',\n 'slide-in-left',\n 'slide-in-right',\n 'none',\n] as const;\nexport type ModalMotionPreset = (typeof modalMotionPresets)[number];\n"],"names":["ModalFooter","children","destructive","disabled","hideCancel","loading","loadingText","onCancel","onSubmit","submitText","cancelText","buttonPosition","dataTestId","rest","Dialog.Footer","Flex","Dialog.ActionTrigger","Button","jsx","Modal","footerProps","fullScreenMobile","header","headerProps","hideCloseButton","closeButtonProps","hideFooter","motionPreset","placement","showExpandButton","size","trigger","portalled","contentProps","positionerProps","parentContentRef","usePortalContentRef","modalContentRef","useRef","contextValue","isExpanded","setIsExpanded","useState","computedSize","useBreakpointValue","jsxs","Dialog.Root","Dialog.Trigger","Portal","Dialog.Backdrop","Dialog.Positioner","Dialog.Content","PortalContext","Dialog.CloseTrigger","prev","Dialog.Header","Dialog.Title","Heading","Dialog.Body","modalSizes","modalPlacements","modalScrollBehaviors","modalMotionPresets"],"mappings":";;;;;;;;;AAwCO,MAAMA,IAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AAAA,EACb,gBAAAC,IAAiB;AAAA,EACjB,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,GAAGC;AACL,4BAEKC,GAAA,EAAc,WAA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BAAgB,eAAa,GAAG3C,CAAU,WAChE,UAAAU,MACE,OAAOA,KAAW,iCAChBkC,GAAA,EAAa,WAAU,gBAAe,eAAa,GAAG5C,CAAU,UAAU,SAAO,IAChF,UAAAM,gBAAAA,EAAA,IAACuC,KAAQ,GAAG,GAAG,MAAK,MAAM,GAAGlC,GAC1B,UAAAD,EACH,CAAA,EACF,CAAA,0BAECkC,GAAA,EAAa,WAAU,gBAAe,eAAa,GAAG5C,CAAU,UAC9D,UAAAU,EACH,CAAA,GAEN,CAAA;AAAA,gBACAJ,gBAAAA,EAAAA,IAACwC,GAAA,EAAY,WAAU,eAAc,eAAa,GAAG9C,CAAU,SAC5D,UAAAX,GACH;AAAA,gBACC,CAACyB,KAAeR,gBAAAA,EAAA,IAAAlB,GAAA,EAAa,GAAGoB,EAAa,CAAA;AAAA,cAAA,EAChD,CAAA;AAAA,YAAA;AAAA,UAAA,EAEJ,CAAA;AAAA,QAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ,GC/JauC,KAAa,CAAC,MAAM,MAAM,MAAM,MAAM,SAAS,MAAM,GAGrDC,KAAkB,CAAC,UAAU,OAAO,QAAQ,GAG5CC,KAAuB,CAAC,UAAU,SAAS,GAG3CC,KAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
1
+ {"version":3,"file":"modal.types-DlvB1lQC.js","sources":["../../src/components/Modal/components/ModalFooter/modalFooter.component.tsx","../../src/components/Modal/modal.component.tsx","../../src/components/Modal/modal.types.ts"],"sourcesContent":["import React from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { Button } from 'components/Button/button.component';\n\nexport interface ModalFooterProps extends Dialog.FooterProps {\n /** Content to be rendered in the footer. */\n children?: React.ReactNode;\n /** If true, the submit button will be displayed as a destructive button.\n * @default false\n */\n destructive?: boolean;\n /** If true, the footer will be disabled. */\n disabled?: boolean;\n /** If true, the cancel button will not be displayed.\n * @default false\n */\n hideCancel?: boolean;\n /** If true, the submit button will be displayed with a loading state. */\n loading?: boolean;\n /** Text to display in the loading state. */\n loadingText?: string;\n /** Text to display in the cancel button. */\n cancelText?: string;\n /** Callback function to be called when the cancel button is clicked. */\n onCancel?: () => void;\n /** Callback function to be called when the submit button is clicked. */\n onSubmit?: () => void | Promise<void>;\n /** Text to display in the submit button. */\n submitText?: string;\n /** Position of the buttons.\n * @default space-between\n */\n buttonPosition?: 'start' | 'end' | 'space-between';\n /** Data test id for the footer.\n * @default kibble-modal-footer\n */\n 'data-testid'?: string;\n}\n\nexport const ModalFooter = ({\n children,\n destructive,\n disabled,\n hideCancel = false,\n loading,\n loadingText,\n onCancel,\n onSubmit,\n submitText = 'Submit',\n cancelText = 'Cancel',\n buttonPosition = 'space-between',\n ['data-testid']: dataTestId = 'kibble-modal-footer',\n ...rest\n}: ModalFooterProps): React.JSX.Element => {\n return (\n <Dialog.Footer className=\"Modal__Footer\" data-testid={dataTestId} {...rest}>\n {children ? (\n children\n ) : (\n <Flex alignItems=\"center\" justifyContent={buttonPosition} w=\"100%\">\n {!hideCancel && (\n <Dialog.ActionTrigger asChild className=\"Modal__CancelButton\" data-testid={`${dataTestId}-cancel-button`}>\n <Button variant=\"tertiary\" onClick={onCancel}>\n {cancelText}\n </Button>\n </Dialog.ActionTrigger>\n )}\n <Button\n className=\"Modal__SubmitButton\"\n data-testid={`${dataTestId}-submit-button`}\n onClick={onSubmit}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n type=\"submit\"\n variant={destructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n )}\n </Dialog.Footer>\n );\n};\n","import React, { useRef, useState } from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\nimport { ModalFooter, ModalFooterProps } from './components/ModalFooter/modalFooter.component';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { ModalMotionPreset, ModalPlacement, ModalSize } from './modal.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { useBreakpointValue } from '@chakra-ui/react';\nimport { PortalContext, usePortalContentRef } from 'hooks/usePortalContentRef';\n\nexport interface ModalProps extends Dialog.RootProps {\n /** Props to customize the default footer. If a custom footer is needed, you can use the `children` prop to build your own. */\n footerProps?: ModalFooterProps;\n /**\n * Whether to use full screen on mobile devices.\n * @default true\n */\n fullScreenMobile?: boolean;\n /** The header of the modal. */\n header?: React.ReactNode;\n /** Props to customize the header when passed as a string. */\n headerProps?: HeadingProps;\n /**\n * Whether to hide the close button.\n * @default false\n */\n hideCloseButton?: boolean;\n /** Props to customize the close button. */\n closeButtonProps?: Omit<ButtonProps, 'iconName' | 'onClick'>;\n /**\n * Whether to hide the modal footer.\n * @default false\n */\n hideFooter?: boolean;\n /** The animation preset for the modal.\n * @default slide-in-bottom\n */\n motionPreset?: ModalMotionPreset;\n /** The placement of the modal.\n * @default center\n */\n placement?: ModalPlacement;\n /**\n * Whether to show the expand button.\n * @default false\n */\n showExpandButton?: boolean;\n /** The size of the modal.\n * @default md\n */\n size?: ConditionalValue<ModalSize>;\n /** The element used to open the modal. If no trigger is provided, the modal will need to be controlled with the `open` and `onOpenChange` props. */\n trigger?: React.ReactNode;\n /**\n * Whether to render the modal in a portal. Set to false if this modal is nested inside another modal.\n * @default true\n */\n portalled?: boolean;\n /** Props to customize the content of the modal. */\n contentProps?: Dialog.ContentProps;\n /** Props to customize the positioner of the modal. */\n positionerProps?: Dialog.PositionerProps;\n /** Data test id for the modal.\n * @default kibble-modal\n */\n 'data-testid'?: string;\n}\n\nexport const Modal = ({\n children,\n footerProps,\n fullScreenMobile = true,\n header,\n headerProps,\n hideCloseButton = false,\n closeButtonProps,\n hideFooter = false,\n motionPreset = 'slide-in-bottom',\n placement = 'center',\n showExpandButton = false,\n size = 'md',\n trigger,\n ['data-testid']: dataTestId = 'kibble-modal',\n portalled = true,\n contentProps,\n positionerProps,\n ...rest\n}: ModalProps): React.JSX.Element => {\n const { contentRef: parentContentRef } = usePortalContentRef();\n const modalContentRef = useRef<HTMLDivElement>(null!);\n const contextValue = { contentRef: modalContentRef };\n const [isExpanded, setIsExpanded] = useState(false);\n const computedSize = useBreakpointValue({\n base: fullScreenMobile ? 'full' : size,\n md: size,\n });\n\n return (\n <Dialog.Root\n motionPreset={motionPreset}\n placement={placement}\n size={computedSize}\n expanded={isExpanded}\n data-testid={`${dataTestId}-root`}\n {...rest}\n >\n {trigger && <Dialog.Trigger asChild>{trigger}</Dialog.Trigger>}\n <Portal disabled={!portalled} container={parentContentRef || undefined}>\n <Dialog.Backdrop />\n <Dialog.Positioner {...positionerProps}>\n <Dialog.Content\n className=\"Modal\"\n data-testid={`${dataTestId}-content`}\n {...contentProps}\n ref={modalContentRef}\n >\n <PortalContext.Provider value={contextValue}>\n {!hideCloseButton && (\n <Dialog.CloseTrigger asChild className=\"Modal__CloseButton\" data-testid=\"kibble-modal-close-button\">\n <Button iconName=\"close\" variant=\"ghostNeutral\" {...closeButtonProps} />\n </Dialog.CloseTrigger>\n )}\n {showExpandButton && (\n <Button\n className=\"Modal__ExpandButton\"\n data-testid={`${dataTestId}-expand-button`}\n variant=\"ghostNeutral\"\n iconName={isExpanded ? 'arrowsIn' : 'arrowsOut'}\n position=\"absolute\"\n top={2}\n right={12}\n onClick={() => setIsExpanded((prev) => !prev)}\n />\n )}\n <Dialog.Header className=\"Modal__Header\" data-testid={`${dataTestId}-header`}>\n {header &&\n (typeof header === 'string' ? (\n <Dialog.Title className=\"Modal__Title\" data-testid={`${dataTestId}-title`} asChild>\n <Heading p={0} size=\"md\" {...headerProps}>\n {header}\n </Heading>\n </Dialog.Title>\n ) : (\n <Dialog.Title className=\"Modal__Title\" data-testid={`${dataTestId}-title`}>\n {header}\n </Dialog.Title>\n ))}\n </Dialog.Header>\n <Dialog.Body className=\"Modal__Body\" data-testid={`${dataTestId}-body`}>\n {children}\n </Dialog.Body>\n {!hideFooter && <ModalFooter {...footerProps} />}\n </PortalContext.Provider>\n </Dialog.Content>\n </Dialog.Positioner>\n </Portal>\n </Dialog.Root>\n );\n};\n","export const modalSizes = ['xs', 'sm', 'md', 'lg', 'cover', 'full'] as const;\nexport type ModalSize = (typeof modalSizes)[number];\n\nexport const modalPlacements = ['center', 'top', 'bottom'] as const;\nexport type ModalPlacement = (typeof modalPlacements)[number];\n\nexport const modalScrollBehaviors = ['inside', 'outside'] as const;\nexport type ModalScrollBehavior = (typeof modalScrollBehaviors)[number];\n\nexport const modalMotionPresets = [\n 'scale',\n 'slide-in-bottom',\n 'slide-in-top',\n 'slide-in-left',\n 'slide-in-right',\n 'none',\n] as const;\nexport type ModalMotionPreset = (typeof modalMotionPresets)[number];\n"],"names":["ModalFooter","children","destructive","disabled","hideCancel","loading","loadingText","onCancel","onSubmit","submitText","cancelText","buttonPosition","dataTestId","rest","Dialog.Footer","Flex","Dialog.ActionTrigger","Button","jsx","Modal","footerProps","fullScreenMobile","header","headerProps","hideCloseButton","closeButtonProps","hideFooter","motionPreset","placement","showExpandButton","size","trigger","portalled","contentProps","positionerProps","parentContentRef","usePortalContentRef","modalContentRef","useRef","contextValue","isExpanded","setIsExpanded","useState","computedSize","useBreakpointValue","jsxs","Dialog.Root","Dialog.Trigger","Portal","Dialog.Backdrop","Dialog.Positioner","Dialog.Content","PortalContext","Dialog.CloseTrigger","prev","Dialog.Header","Dialog.Title","Heading","Dialog.Body","modalSizes","modalPlacements","modalScrollBehaviors","modalMotionPresets"],"mappings":";;;;;;;;;AAwCO,MAAMA,IAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AA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ACa,MAAS,CAACA,CAAI;AAAA,kBAAA;AAAA,gBAC9C;AAAA,gBAEFpC,gBAAAA,EAAAA,IAACqC,GAAA,EAAc,WAAU,iBAAgB,eAAa,GAAG3C,CAAU,WAChE,UAAAU,MACE,OAAOA,KAAW,iCAChBkC,GAAA,EAAa,WAAU,gBAAe,eAAa,GAAG5C,CAAU,UAAU,SAAO,IAChF,UAAAM,gBAAAA,EAAA,IAACuC,KAAQ,GAAG,GAAG,MAAK,MAAM,GAAGlC,GAC1B,UAAAD,EACH,CAAA,EACF,CAAA,0BAECkC,GAAA,EAAa,WAAU,gBAAe,eAAa,GAAG5C,CAAU,UAC9D,UAAAU,EACH,CAAA,GAEN,CAAA;AAAA,gBACAJ,gBAAAA,EAAAA,IAACwC,GAAA,EAAY,WAAU,eAAc,eAAa,GAAG9C,CAAU,SAC5D,UAAAX,GACH;AAAA,gBACC,CAACyB,KAAeR,gBAAAA,EAAA,IAAAlB,GAAA,EAAa,GAAGoB,EAAa,CAAA;AAAA,cAAA,EAChD,CAAA;AAAA,YAAA;AAAA,UAAA,EAEJ,CAAA;AAAA,QAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ,GC/JauC,KAAa,CAAC,MAAM,MAAM,MAAM,MAAM,SAAS,MAAM,GAGrDC,KAAkB,CAAC,UAAU,OAAO,QAAQ,GAG5CC,KAAuB,CAAC,UAAU,SAAS,GAG3CC,KAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./jsx-runtime-BjDatQAs.js"),d=require("react"),g=require("./config-jChwZPSv.js"),h=require("./spinner.component-Dq6u4vVL.js"),C=require("./index-BQRnVsAg.js"),b=require("./create-slot-recipe-context-HXE1VazG.js"),f=require("./flex-BOU6tYUd.js"),p=["root","maxElement"],S={blue:{root:{bgColor:"background.accent",color:"text.contrast"},maxElement:{bgColor:"text.contrast"}},green:{root:{bgColor:"background.success.contrast",color:"text.contrast"},maxElement:{bgColor:"text.contrast"}},neutral:{root:{bgColor:"background.subtle.less",color:"text"},maxElement:{bgColor:"text"}},red:{root:{bgColor:"background.danger.contrast",color:"text.contrast"},maxElement:{bgColor:"text.contrast"}}},E={xs:{root:{fontSize:"8px",height:3,width:3},maxElement:{height:"1px",width:"1px"}},sm:{root:{fontSize:"10px",height:4,width:4},maxElement:{height:"2px",width:"2px"}},md:{root:{fontSize:"xs",height:5,width:5},maxElement:{height:"3px",width:"3px"}},lg:{root:{fontSize:"sm",height:6,width:6},maxElement:{height:1,width:1}}},R=g.defineSlotRecipe({slots:p,base:{root:{alignItems:"center",border:"1px",borderColor:"background",borderRadius:"full",fontWeight:"semibold",justifyContent:"center"},maxElement:{borderRadius:"full"}},variants:{size:E,variant:S},defaultVariants:{size:"md",variant:"red"}}),w=99,j={xs:null,sm:"xs",md:"xs",lg:"sm"},q={red:"dangerOnContrast",blue:"interactiveOnContrast",green:"brandOnContrast",neutral:"subtleOnContrast"},z=({count:t,loading:i=!1,showCount:a=!0,size:e="md",variant:o="red",["data-testid"]:c="kibble-notification-counter",...l})=>{const n=b.useSlotRecipe({recipe:R})({size:e,variant:o}),u=e!=="xs"&&a,x=d.useMemo(()=>{const s=j[e],m=q[o];return i&&s?r.jsxRuntimeExports.jsx(h.Spinner,{variant:m,size:s}):t==null?null:t>w?r.jsxRuntimeExports.jsx(C.Box,{css:n.maxElement}):t},[e,o,i,t,n.maxElement]);return r.jsxRuntimeExports.jsx(f.Flex,{className:"NotificationCounter","data-testid":c,css:n.root,...l,children:u&&x})};exports.NotificationCounter=z;
2
- //# sourceMappingURL=notificationCounter.component-CBwi5vXa.js.map
1
+ "use strict";const r=require("./jsx-runtime-BjDatQAs.js"),d=require("react"),g=require("./config-jChwZPSv.js"),h=require("./spinner.component-0tE7mnxi.js"),C=require("./index-BQRnVsAg.js"),b=require("./create-slot-recipe-context-HXE1VazG.js"),f=require("./flex-BOU6tYUd.js"),p=["root","maxElement"],S={blue:{root:{bgColor:"background.accent",color:"text.contrast"},maxElement:{bgColor:"text.contrast"}},green:{root:{bgColor:"background.success.contrast",color:"text.contrast"},maxElement:{bgColor:"text.contrast"}},neutral:{root:{bgColor:"background.subtle.less",color:"text"},maxElement:{bgColor:"text"}},red:{root:{bgColor:"background.danger.contrast",color:"text.contrast"},maxElement:{bgColor:"text.contrast"}}},E={xs:{root:{fontSize:"8px",height:3,width:3},maxElement:{height:"1px",width:"1px"}},sm:{root:{fontSize:"10px",height:4,width:4},maxElement:{height:"2px",width:"2px"}},md:{root:{fontSize:"xs",height:5,width:5},maxElement:{height:"3px",width:"3px"}},lg:{root:{fontSize:"sm",height:6,width:6},maxElement:{height:1,width:1}}},R=g.defineSlotRecipe({slots:p,base:{root:{alignItems:"center",border:"1px",borderColor:"background",borderRadius:"full",fontWeight:"semibold",justifyContent:"center"},maxElement:{borderRadius:"full"}},variants:{size:E,variant:S},defaultVariants:{size:"md",variant:"red"}}),w=99,j={xs:null,sm:"xs",md:"xs",lg:"sm"},q={red:"dangerOnContrast",blue:"interactiveOnContrast",green:"brandOnContrast",neutral:"subtleOnContrast"},z=({count:t,loading:i=!1,showCount:a=!0,size:e="md",variant:o="red",["data-testid"]:c="kibble-notification-counter",...l})=>{const n=b.useSlotRecipe({recipe:R})({size:e,variant:o}),u=e!=="xs"&&a,x=d.useMemo(()=>{const s=j[e],m=q[o];return i&&s?r.jsxRuntimeExports.jsx(h.Spinner,{variant:m,size:s}):t==null?null:t>w?r.jsxRuntimeExports.jsx(C.Box,{css:n.maxElement}):t},[e,o,i,t,n.maxElement]);return r.jsxRuntimeExports.jsx(f.Flex,{className:"NotificationCounter","data-testid":c,css:n.root,...l,children:u&&x})};exports.NotificationCounter=z;
2
+ //# sourceMappingURL=notificationCounter.component-BUxWlpKh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notificationCounter.component-CBwi5vXa.js","sources":["../../src/components/NotificationCounter/notificationCounter.recipe.ts","../../src/components/NotificationCounter/notificationCounter.records.ts","../../src/components/NotificationCounter/notificationCounter.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\n\nconst notificationCounterSlots = ['root', 'maxElement'] as const;\ntype NotificationCounterSlot = (typeof notificationCounterSlots)[number];\n\nconst notificationCounterVariantStyles: Record<\n NotificationCounterVariant,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n blue: {\n root: {\n bgColor: 'background.accent',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n green: {\n root: {\n bgColor: 'background.success.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n neutral: {\n root: {\n bgColor: 'background.subtle.less',\n color: 'text',\n },\n maxElement: {\n bgColor: 'text',\n },\n },\n red: {\n root: {\n bgColor: 'background.danger.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n};\n\nconst notificationCounterSizeStyles: Record<\n NotificationCounterSize,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n xs: {\n root: {\n fontSize: '8px',\n height: 3,\n width: 3,\n },\n maxElement: {\n height: '1px',\n width: '1px',\n },\n },\n sm: {\n root: { fontSize: '10px', height: 4, width: 4 },\n maxElement: {\n height: '2px',\n width: '2px',\n },\n },\n md: {\n root: {\n fontSize: 'xs',\n height: 5,\n width: 5,\n },\n maxElement: {\n height: '3px',\n width: '3px',\n },\n },\n lg: {\n root: {\n fontSize: 'sm',\n height: 6,\n width: 6,\n },\n maxElement: {\n height: 1,\n width: 1,\n },\n },\n};\n\nexport const notificationCounterRecipe = defineSlotRecipe({\n slots: notificationCounterSlots,\n base: {\n root: {\n alignItems: 'center',\n border: '1px',\n borderColor: 'background',\n borderRadius: 'full',\n fontWeight: 'semibold',\n justifyContent: 'center',\n },\n maxElement: {\n borderRadius: 'full',\n },\n },\n variants: {\n size: notificationCounterSizeStyles,\n variant: notificationCounterVariantStyles,\n },\n defaultVariants: {\n size: 'md',\n variant: 'red',\n },\n});\n","import { SpinnerSize } from 'components/Spinner/spinner.types';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { TypographyVariant } from 'shared/types';\n\nexport const MAX_COUNT = 99;\n\nexport const notificationCounterSpinnerSize: Record<NotificationCounterSize, SpinnerSize | null> = {\n xs: null, // The xs size doesn't show a spinner\n sm: 'xs',\n md: 'xs',\n lg: 'sm',\n};\n\nexport const spinnerVariantToNotificationCounterVariant: Record<NotificationCounterVariant, TypographyVariant> = {\n red: 'dangerOnContrast',\n blue: 'interactiveOnContrast',\n green: 'brandOnContrast',\n neutral: 'subtleOnContrast',\n};\n","import React, { useMemo } from 'react';\nimport { Flex, FlexProps } from '@chakra-ui/react/flex';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { notificationCounterRecipe } from './notificationCounter.recipe';\nimport {\n MAX_COUNT,\n notificationCounterSpinnerSize,\n spinnerVariantToNotificationCounterVariant,\n} from './notificationCounter.records';\nimport { Spinner } from 'components/Spinner/spinner.component';\nimport { Box } from '@chakra-ui/react/box';\n\nexport interface NotificationCounterProps extends FlexProps {\n /** Value of the notification counter. If count is greater than 99, the count will be hidden and a special indicator will take its place. */\n count?: number;\n /** If true, the notification counter will show a spinner.\n * @default false\n */\n loading?: boolean;\n /** Whether or not to show the counter label. If the size is xs, by default the count label won't be shown.\n * @default true\n */\n showCount?: boolean;\n /** Size of the notification counter\n * @default md\n */\n size?: NotificationCounterSize;\n /** Color variant for the notification counter\n * @default red\n */\n variant?: NotificationCounterVariant;\n /** Data test id for the notification counter.\n * @default kibble-notification-counter\n */\n 'data-testid'?: string;\n}\n\nexport const NotificationCounter = ({\n count,\n loading = false,\n showCount = true,\n size = 'md',\n variant = 'red',\n ['data-testid']: dataTestId = 'kibble-notification-counter',\n ...rest\n}: NotificationCounterProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: notificationCounterRecipe });\n const styles = recipe({ size, variant });\n const shouldShowCount = size !== 'xs' && showCount;\n\n const counterContent = useMemo(() => {\n const _spinnerSize = notificationCounterSpinnerSize[size];\n const _spinnerVariant = spinnerVariantToNotificationCounterVariant[variant];\n\n if (loading && !!_spinnerSize) return <Spinner variant={_spinnerVariant} size={_spinnerSize} />;\n\n if (count == null) return null; // Handle undefined or null count\n\n if (count > MAX_COUNT) return <Box css={styles.maxElement} />;\n\n return count;\n }, [size, variant, loading, count, styles.maxElement]);\n\n return (\n <Flex className=\"NotificationCounter\" data-testid={dataTestId} css={styles.root} {...rest}>\n {shouldShowCount && counterContent}\n </Flex>\n );\n};\n"],"names":["notificationCounterSlots","notificationCounterVariantStyles","notificationCounterSizeStyles","notificationCounterRecipe","defineSlotRecipe","MAX_COUNT","notificationCounterSpinnerSize","spinnerVariantToNotificationCounterVariant","NotificationCounter","count","loading","showCount","size","variant","dataTestId","rest","styles","useSlotRecipe","shouldShowCount","counterContent","useMemo","_spinnerSize","_spinnerVariant","Spinner","Box","jsx","Flex"],"mappings":"mRAGMA,EAA2B,CAAC,OAAQ,YAAY,EAGhDC,EAGF,CACF,KAAM,CACJ,KAAM,CACJ,QAAS,oBACT,MAAO,eACT,EACA,WAAY,CACV,QAAS,eAAA,CAEb,EACA,MAAO,CACL,KAAM,CACJ,QAAS,8BACT,MAAO,eACT,EACA,WAAY,CACV,QAAS,eAAA,CAEb,EACA,QAAS,CACP,KAAM,CACJ,QAAS,yBACT,MAAO,MACT,EACA,WAAY,CACV,QAAS,MAAA,CAEb,EACA,IAAK,CACH,KAAM,CACJ,QAAS,6BACT,MAAO,eACT,EACA,WAAY,CACV,QAAS,eAAA,CACX,CAEJ,EAEMC,EAGF,CACF,GAAI,CACF,KAAM,CACJ,SAAU,MACV,OAAQ,EACR,MAAO,CACT,EACA,WAAY,CACV,OAAQ,M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c,CAAA,EAEzFZ,GAAS,KAAa,KAEtBA,EAAQJ,0BAAmBmB,EAAI,IAAA,CAAA,IAAKR,EAAO,WAAY,EAEpDP,CAAA,EACN,CAACG,EAAMC,EAASH,EAASD,EAAOO,EAAO,UAAU,CAAC,EAErD,OACGS,EAAAA,kBAAAA,IAAAC,EAAAA,KAAA,CAAK,UAAU,sBAAsB,cAAaZ,EAAY,IAAKE,EAAO,KAAO,GAAGD,EAClF,SAAAG,GAAmBC,EACtB,CAEJ"}
1
+ {"version":3,"file":"notificationCounter.component-BUxWlpKh.js","sources":["../../src/components/NotificationCounter/notificationCounter.recipe.ts","../../src/components/NotificationCounter/notificationCounter.records.ts","../../src/components/NotificationCounter/notificationCounter.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\n\nconst notificationCounterSlots = ['root', 'maxElement'] as const;\ntype NotificationCounterSlot = (typeof notificationCounterSlots)[number];\n\nconst notificationCounterVariantStyles: Record<\n NotificationCounterVariant,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n blue: {\n root: {\n bgColor: 'background.accent',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n green: {\n root: {\n bgColor: 'background.success.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n neutral: {\n root: {\n bgColor: 'background.subtle.less',\n color: 'text',\n },\n maxElement: {\n bgColor: 'text',\n },\n },\n red: {\n root: {\n bgColor: 'background.danger.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n};\n\nconst notificationCounterSizeStyles: Record<\n NotificationCounterSize,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n xs: {\n root: {\n fontSize: '8px',\n height: 3,\n width: 3,\n },\n maxElement: {\n height: '1px',\n width: '1px',\n },\n },\n sm: {\n root: { fontSize: '10px', height: 4, width: 4 },\n maxElement: {\n height: '2px',\n width: '2px',\n },\n },\n md: {\n root: {\n fontSize: 'xs',\n height: 5,\n width: 5,\n },\n maxElement: {\n height: '3px',\n width: '3px',\n },\n },\n lg: {\n root: {\n fontSize: 'sm',\n height: 6,\n width: 6,\n },\n maxElement: {\n height: 1,\n width: 1,\n },\n },\n};\n\nexport const notificationCounterRecipe = defineSlotRecipe({\n slots: notificationCounterSlots,\n base: {\n root: {\n alignItems: 'center',\n border: '1px',\n borderColor: 'background',\n borderRadius: 'full',\n fontWeight: 'semibold',\n justifyContent: 'center',\n },\n maxElement: {\n borderRadius: 'full',\n },\n },\n variants: {\n size: notificationCounterSizeStyles,\n variant: notificationCounterVariantStyles,\n },\n defaultVariants: {\n size: 'md',\n variant: 'red',\n },\n});\n","import { SpinnerSize } from 'components/Spinner/spinner.types';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { TypographyVariant } from 'shared/types';\n\nexport const MAX_COUNT = 99;\n\nexport const notificationCounterSpinnerSize: Record<NotificationCounterSize, SpinnerSize | null> = {\n xs: null, // The xs size doesn't show a spinner\n sm: 'xs',\n md: 'xs',\n lg: 'sm',\n};\n\nexport const spinnerVariantToNotificationCounterVariant: Record<NotificationCounterVariant, TypographyVariant> = {\n red: 'dangerOnContrast',\n blue: 'interactiveOnContrast',\n green: 'brandOnContrast',\n neutral: 'subtleOnContrast',\n};\n","import React, { useMemo } from 'react';\nimport { Flex, FlexProps } from '@chakra-ui/react/flex';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { notificationCounterRecipe } from './notificationCounter.recipe';\nimport {\n MAX_COUNT,\n notificationCounterSpinnerSize,\n spinnerVariantToNotificationCounterVariant,\n} from './notificationCounter.records';\nimport { Spinner } from 'components/Spinner/spinner.component';\nimport { Box } from '@chakra-ui/react/box';\n\nexport interface NotificationCounterProps extends FlexProps {\n /** Value of the notification counter. If count is greater than 99, the count will be hidden and a special indicator will take its place. */\n count?: number;\n /** If true, the notification counter will show a spinner.\n * @default false\n */\n loading?: boolean;\n /** Whether or not to show the counter label. If the size is xs, by default the count label won't be shown.\n * @default true\n */\n showCount?: boolean;\n /** Size of the notification counter\n * @default md\n */\n size?: NotificationCounterSize;\n /** Color variant for the notification counter\n * @default red\n */\n variant?: NotificationCounterVariant;\n /** Data test id for the notification counter.\n * @default kibble-notification-counter\n */\n 'data-testid'?: string;\n}\n\nexport const NotificationCounter = ({\n count,\n loading = false,\n showCount = true,\n size = 'md',\n variant = 'red',\n ['data-testid']: dataTestId = 'kibble-notification-counter',\n ...rest\n}: NotificationCounterProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: notificationCounterRecipe });\n const styles = recipe({ size, variant });\n const shouldShowCount = size !== 'xs' && showCount;\n\n const counterContent = useMemo(() => {\n const _spinnerSize = notificationCounterSpinnerSize[size];\n const _spinnerVariant = spinnerVariantToNotificationCounterVariant[variant];\n\n if (loading && !!_spinnerSize) return <Spinner variant={_spinnerVariant} size={_spinnerSize} />;\n\n if (count == null) return null; // Handle undefined or null count\n\n if (count > MAX_COUNT) return <Box css={styles.maxElement} />;\n\n return count;\n }, [size, variant, loading, count, styles.maxElement]);\n\n return (\n <Flex className=\"NotificationCounter\" data-testid={dataTestId} css={styles.root} {...rest}>\n {shouldShowCount && counterContent}\n </Flex>\n );\n};\n"],"names":["notificationCounterSlots","notificationCounterVariantStyles","notificationCounterSizeStyles","notificationCounterRecipe","defineSlotRecipe","MAX_COUNT","notificationCounterSpinnerSize","spinnerVariantToNotificationCounterVariant","NotificationCounter","count","loading","showCount","size","variant","dataTestId","rest","styles","useSlotRecipe","shouldShowCount","counterContent","useMemo","_spinnerSize","_spinnerVariant","Spinner","Box","jsx","Flex"],"mappings":"mRAGMA,EAA2B,CAAC,OAAQ,YAAY,EAGhDC,EAGF,CACF,KAAM,CACJ,KAAM,CACJ,QAAS,oBACT,MAAO,eACT,EACA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AY,GACZ,KAAAC,EAAO,KACP,QAAAC,EAAU,MACV,CAAC,eAAgBC,EAAa,8BAC9B,GAAGC,CACL,IAAmD,CAEjD,MAAMC,EADSC,EAAA,cAAc,CAAE,OAAQd,EAA2B,EAC5C,CAAE,KAAAS,EAAM,QAAAC,EAAS,EACjCK,EAAkBN,IAAS,MAAQD,EAEnCQ,EAAiBC,EAAAA,QAAQ,IAAM,CAC7B,MAAAC,EAAef,EAA+BM,CAAI,EAClDU,EAAkBf,EAA2CM,CAAO,EAEtE,OAAAH,GAAaW,0BAAsBE,UAAQ,CAAA,QAASD,EAAiB,KAAMD,CAAc,CAAA,EAEzFZ,GAAS,KAAa,KAEtBA,EAAQJ,0BAAmBmB,EAAI,IAAA,CAAA,IAAKR,EAAO,WAAY,EAEpDP,CAAA,EACN,CAACG,EAAMC,EAASH,EAASD,EAAOO,EAAO,UAAU,CAAC,EAErD,OACGS,EAAAA,kBAAAA,IAAAC,EAAAA,KAAA,CAAK,UAAU,sBAAsB,cAAaZ,EAAY,IAAKE,EAAO,KAAO,GAAGD,EAClF,SAAAG,GAAmBC,EACtB,CAEJ"}
@@ -1,7 +1,7 @@
1
1
  import { j as r } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { useMemo as d } from "react";
3
3
  import { d as f } from "./config-Djkl1N81.js";
4
- import { S as p } from "./spinner.component-CNHQ8UDz.js";
4
+ import { S as p } from "./spinner.component-CQ-JWUon.js";
5
5
  import { B as g } from "./index-9BerxEcw.js";
6
6
  import { u as h } from "./create-slot-recipe-context-D_FXDJGp.js";
7
7
  import { F as b } from "./flex-CX-8gE9T.js";
@@ -135,4 +135,4 @@ const C = ["root", "maxElement"], S = {
135
135
  export {
136
136
  F as N
137
137
  };
138
- //# sourceMappingURL=notificationCounter.component-6Q3q8jWj.js.map
138
+ //# sourceMappingURL=notificationCounter.component-DhfVkkOQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notificationCounter.component-6Q3q8jWj.js","sources":["../../src/components/NotificationCounter/notificationCounter.recipe.ts","../../src/components/NotificationCounter/notificationCounter.records.ts","../../src/components/NotificationCounter/notificationCounter.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\n\nconst notificationCounterSlots = ['root', 'maxElement'] as const;\ntype NotificationCounterSlot = (typeof notificationCounterSlots)[number];\n\nconst notificationCounterVariantStyles: Record<\n NotificationCounterVariant,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n blue: {\n root: {\n bgColor: 'background.accent',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n green: {\n root: {\n bgColor: 'background.success.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n neutral: {\n root: {\n bgColor: 'background.subtle.less',\n color: 'text',\n },\n maxElement: {\n bgColor: 'text',\n },\n },\n red: {\n root: {\n bgColor: 'background.danger.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n};\n\nconst notificationCounterSizeStyles: Record<\n NotificationCounterSize,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n xs: {\n root: {\n fontSize: '8px',\n height: 3,\n width: 3,\n },\n maxElement: {\n height: '1px',\n width: '1px',\n },\n },\n sm: {\n root: { fontSize: '10px', height: 4, width: 4 },\n maxElement: {\n height: '2px',\n width: '2px',\n },\n },\n md: {\n root: {\n fontSize: 'xs',\n height: 5,\n width: 5,\n },\n maxElement: {\n height: '3px',\n width: '3px',\n },\n },\n lg: {\n root: {\n fontSize: 'sm',\n height: 6,\n width: 6,\n },\n maxElement: {\n height: 1,\n width: 1,\n },\n },\n};\n\nexport const notificationCounterRecipe = defineSlotRecipe({\n slots: notificationCounterSlots,\n base: {\n root: {\n alignItems: 'center',\n border: '1px',\n borderColor: 'background',\n borderRadius: 'full',\n fontWeight: 'semibold',\n justifyContent: 'center',\n },\n maxElement: {\n borderRadius: 'full',\n },\n },\n variants: {\n size: notificationCounterSizeStyles,\n variant: notificationCounterVariantStyles,\n },\n defaultVariants: {\n size: 'md',\n variant: 'red',\n },\n});\n","import { SpinnerSize } from 'components/Spinner/spinner.types';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { TypographyVariant } from 'shared/types';\n\nexport const MAX_COUNT = 99;\n\nexport const notificationCounterSpinnerSize: Record<NotificationCounterSize, SpinnerSize | null> = {\n xs: null, // The xs size doesn't show a spinner\n sm: 'xs',\n md: 'xs',\n lg: 'sm',\n};\n\nexport const spinnerVariantToNotificationCounterVariant: Record<NotificationCounterVariant, TypographyVariant> = {\n red: 'dangerOnContrast',\n blue: 'interactiveOnContrast',\n green: 'brandOnContrast',\n neutral: 'subtleOnContrast',\n};\n","import React, { useMemo } from 'react';\nimport { Flex, FlexProps } from '@chakra-ui/react/flex';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { notificationCounterRecipe } from './notificationCounter.recipe';\nimport {\n MAX_COUNT,\n notificationCounterSpinnerSize,\n spinnerVariantToNotificationCounterVariant,\n} from './notificationCounter.records';\nimport { Spinner } from 'components/Spinner/spinner.component';\nimport { Box } from '@chakra-ui/react/box';\n\nexport interface NotificationCounterProps extends FlexProps {\n /** Value of the notification counter. If count is greater than 99, the count will be hidden and a special indicator will take its place. */\n count?: number;\n /** If true, the notification counter will show a spinner.\n * @default false\n */\n loading?: boolean;\n /** Whether or not to show the counter label. If the size is xs, by default the count label won't be shown.\n * @default true\n */\n showCount?: boolean;\n /** Size of the notification counter\n * @default md\n */\n size?: NotificationCounterSize;\n /** Color variant for the notification counter\n * @default red\n */\n variant?: NotificationCounterVariant;\n /** Data test id for the notification counter.\n * @default kibble-notification-counter\n */\n 'data-testid'?: string;\n}\n\nexport const NotificationCounter = ({\n count,\n loading = false,\n showCount = true,\n size = 'md',\n variant = 'red',\n ['data-testid']: dataTestId = 'kibble-notification-counter',\n ...rest\n}: NotificationCounterProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: notificationCounterRecipe });\n const styles = recipe({ size, variant });\n const shouldShowCount = size !== 'xs' && showCount;\n\n const counterContent = useMemo(() => {\n const _spinnerSize = notificationCounterSpinnerSize[size];\n const _spinnerVariant = spinnerVariantToNotificationCounterVariant[variant];\n\n if (loading && !!_spinnerSize) return <Spinner variant={_spinnerVariant} size={_spinnerSize} />;\n\n if (count == null) return null; // Handle undefined or null count\n\n if (count > MAX_COUNT) return <Box css={styles.maxElement} />;\n\n return count;\n }, [size, variant, loading, count, styles.maxElement]);\n\n return (\n <Flex className=\"NotificationCounter\" data-testid={dataTestId} css={styles.root} {...rest}>\n {shouldShowCount && counterContent}\n </Flex>\n );\n};\n"],"names":["notificationCounterSlots","notificationCounterVariantStyles","notificationCounterSizeStyles","notificationCounterRecipe","defineSlotRecipe","MAX_COUNT","notificationCounterSpinnerSize","spinnerVariantToNotificationCounterVariant","NotificationCounter","count","loading","showCount","size","variant","dataTestId","rest","styles","useSlotRecipe","shouldShowCount","counterContent","useMemo","_spinnerSize","_spinnerVariant","Spinner","Box","jsx","Flex"],"mappings":";;;;;;;AAGA,MAAMA,IAA2B,CAAC,QAAQ,YAAY,GAGhDC,IAGF;AAAA,EACF,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EAEb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C,GCjHYI,IAAY,IAEZC,IAAsF;AAAA,EACjG,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAoG;AAAA,EAC/G,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AACX,GCoBaC,IAAsB,CAAC;AAAA,EAClC,OAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,GAAGC;AACL,MAAmD;AAEjD,QAAMC,IADSC,EAAc,EAAE,QAAQd,GAA2B,EAC5C,EAAE,MAAAS,GAAM,SAAAC,GAAS,GACjCK,IAAkBN,MAAS,QAAQD,GAEnCQ,IAAiBC,EAAQ,MAAM;AAC7B,UAAAC,IAAef,EAA+BM,CAAI,GAClDU,IAAkBf,EAA2CM,CAAO;AAEtE,WAAAH,KAAaW,0BAAsBE,GAAQ,EAAA,SAASD,GAAiB,MAAMD,EAAc,CAAA,IAEzFZ,KAAS,OAAa,OAEtBA,IAAQJ,0BAAmBmB,GAAI,EAAA,KAAKR,EAAO,YAAY,IAEpDP;AAAA,EAAA,GACN,CAACG,GAAMC,GAASH,GAASD,GAAOO,EAAO,UAAU,CAAC;AAErD,SACGS,gBAAAA,EAAAA,IAAAC,GAAA,EAAK,WAAU,uBAAsB,eAAaZ,GAAY,KAAKE,EAAO,MAAO,GAAGD,GAClF,UAAAG,KAAmBC,GACtB;AAEJ;"}
1
+ {"version":3,"file":"notificationCounter.component-DhfVkkOQ.js","sources":["../../src/components/NotificationCounter/notificationCounter.recipe.ts","../../src/components/NotificationCounter/notificationCounter.records.ts","../../src/components/NotificationCounter/notificationCounter.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\n\nconst notificationCounterSlots = ['root', 'maxElement'] as const;\ntype NotificationCounterSlot = (typeof notificationCounterSlots)[number];\n\nconst notificationCounterVariantStyles: Record<\n NotificationCounterVariant,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n blue: {\n root: {\n bgColor: 'background.accent',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n green: {\n root: {\n bgColor: 'background.success.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n neutral: {\n root: {\n bgColor: 'background.subtle.less',\n color: 'text',\n },\n maxElement: {\n bgColor: 'text',\n },\n },\n red: {\n root: {\n bgColor: 'background.danger.contrast',\n color: 'text.contrast',\n },\n maxElement: {\n bgColor: 'text.contrast',\n },\n },\n};\n\nconst notificationCounterSizeStyles: Record<\n NotificationCounterSize,\n Record<NotificationCounterSlot, SystemStyleObject>\n> = {\n xs: {\n root: {\n fontSize: '8px',\n height: 3,\n width: 3,\n },\n maxElement: {\n height: '1px',\n width: '1px',\n },\n },\n sm: {\n root: { fontSize: '10px', height: 4, width: 4 },\n maxElement: {\n height: '2px',\n width: '2px',\n },\n },\n md: {\n root: {\n fontSize: 'xs',\n height: 5,\n width: 5,\n },\n maxElement: {\n height: '3px',\n width: '3px',\n },\n },\n lg: {\n root: {\n fontSize: 'sm',\n height: 6,\n width: 6,\n },\n maxElement: {\n height: 1,\n width: 1,\n },\n },\n};\n\nexport const notificationCounterRecipe = defineSlotRecipe({\n slots: notificationCounterSlots,\n base: {\n root: {\n alignItems: 'center',\n border: '1px',\n borderColor: 'background',\n borderRadius: 'full',\n fontWeight: 'semibold',\n justifyContent: 'center',\n },\n maxElement: {\n borderRadius: 'full',\n },\n },\n variants: {\n size: notificationCounterSizeStyles,\n variant: notificationCounterVariantStyles,\n },\n defaultVariants: {\n size: 'md',\n variant: 'red',\n },\n});\n","import { SpinnerSize } from 'components/Spinner/spinner.types';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { TypographyVariant } from 'shared/types';\n\nexport const MAX_COUNT = 99;\n\nexport const notificationCounterSpinnerSize: Record<NotificationCounterSize, SpinnerSize | null> = {\n xs: null, // The xs size doesn't show a spinner\n sm: 'xs',\n md: 'xs',\n lg: 'sm',\n};\n\nexport const spinnerVariantToNotificationCounterVariant: Record<NotificationCounterVariant, TypographyVariant> = {\n red: 'dangerOnContrast',\n blue: 'interactiveOnContrast',\n green: 'brandOnContrast',\n neutral: 'subtleOnContrast',\n};\n","import React, { useMemo } from 'react';\nimport { Flex, FlexProps } from '@chakra-ui/react/flex';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { notificationCounterRecipe } from './notificationCounter.recipe';\nimport {\n MAX_COUNT,\n notificationCounterSpinnerSize,\n spinnerVariantToNotificationCounterVariant,\n} from './notificationCounter.records';\nimport { Spinner } from 'components/Spinner/spinner.component';\nimport { Box } from '@chakra-ui/react/box';\n\nexport interface NotificationCounterProps extends FlexProps {\n /** Value of the notification counter. If count is greater than 99, the count will be hidden and a special indicator will take its place. */\n count?: number;\n /** If true, the notification counter will show a spinner.\n * @default false\n */\n loading?: boolean;\n /** Whether or not to show the counter label. If the size is xs, by default the count label won't be shown.\n * @default true\n */\n showCount?: boolean;\n /** Size of the notification counter\n * @default md\n */\n size?: NotificationCounterSize;\n /** Color variant for the notification counter\n * @default red\n */\n variant?: NotificationCounterVariant;\n /** Data test id for the notification counter.\n * @default kibble-notification-counter\n */\n 'data-testid'?: string;\n}\n\nexport const NotificationCounter = ({\n count,\n loading = false,\n showCount = true,\n size = 'md',\n variant = 'red',\n ['data-testid']: dataTestId = 'kibble-notification-counter',\n ...rest\n}: NotificationCounterProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: notificationCounterRecipe });\n const styles = recipe({ size, variant });\n const shouldShowCount = size !== 'xs' && showCount;\n\n const counterContent = useMemo(() => {\n const _spinnerSize = notificationCounterSpinnerSize[size];\n const _spinnerVariant = spinnerVariantToNotificationCounterVariant[variant];\n\n if (loading && !!_spinnerSize) return <Spinner variant={_spinnerVariant} size={_spinnerSize} />;\n\n if (count == null) return null; // Handle undefined or null count\n\n if (count > MAX_COUNT) return <Box css={styles.maxElement} />;\n\n return count;\n }, [size, variant, loading, count, styles.maxElement]);\n\n return (\n <Flex className=\"NotificationCounter\" data-testid={dataTestId} css={styles.root} {...rest}>\n {shouldShowCount && counterContent}\n </Flex>\n );\n};\n"],"names":["notificationCounterSlots","notificationCounterVariantStyles","notificationCounterSizeStyles","notificationCounterRecipe","defineSlotRecipe","MAX_COUNT","notificationCounterSpinnerSize","spinnerVariantToNotificationCounterVariant","NotificationCounter","count","loading","showCount","size","variant","dataTestId","rest","styles","useSlotRecipe","shouldShowCount","counterContent","useMemo","_spinnerSize","_spinnerVariant","Spinner","Box","jsx","Flex"],"mappings":";;;;;;;AAGA,MAAMA,IAA2B,CAAC,QAAQ,YAAY,GAGhDC,IAGF;AAAA,EACF,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ,GAEMC,IAGF;AAAA,EACF,IAAI;AAAA,I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AAAA,EACP,SAAS;AACX,GCoBaC,IAAsB,CAAC;AAAA,EAClC,OAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,GAAGC;AACL,MAAmD;AAEjD,QAAMC,IADSC,EAAc,EAAE,QAAQd,GAA2B,EAC5C,EAAE,MAAAS,GAAM,SAAAC,GAAS,GACjCK,IAAkBN,MAAS,QAAQD,GAEnCQ,IAAiBC,EAAQ,MAAM;AAC7B,UAAAC,IAAef,EAA+BM,CAAI,GAClDU,IAAkBf,EAA2CM,CAAO;AAEtE,WAAAH,KAAaW,0BAAsBE,GAAQ,EAAA,SAASD,GAAiB,MAAMD,EAAc,CAAA,IAEzFZ,KAAS,OAAa,OAEtBA,IAAQJ,0BAAmBmB,GAAI,EAAA,KAAKR,EAAO,YAAY,IAEpDP;AAAA,EAAA,GACN,CAACG,GAAMC,GAASH,GAASD,GAAOO,EAAO,UAAU,CAAC;AAErD,SACGS,gBAAAA,EAAAA,IAAAC,GAAA,EAAK,WAAU,uBAAsB,eAAaZ,GAAY,KAAKE,EAAO,MAAO,GAAGD,GAClF,UAAAG,KAAmBC,GACtB;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./jsx-runtime-BjDatQAs.js"),p=require("react"),V=require("./index-BQRnVsAg.js"),L=require("./withFormControl-QV_Jridv.js"),b=require("./icon.component-B1hr5lLa.js"),M=require("./input-group-DUdSDk4o.js"),W=require("./create-slot-recipe-context-HXE1VazG.js"),N=require("./icons-B6Nwr9di.js"),s=require("./use-locale-context-ym21RUxU.js"),I=require("./index-DVyODQn6.js"),g=require("./use-field-context-Cm29IQ7H.js"),a=require("./index-CQURjLlA.js"),G=e=>e&&e.__esModule?e:{default:e},B=G(p),[j,m]=s.createContext({name:"NumberInputContext",hookName:"useNumberInputContext",providerName:"<NumberInputProvider />"}),U=e=>e.children(m()),R=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getControlProps(),e);return r.jsxRuntimeExports.jsx(s.ark.div,{...o,ref:n})});R.displayName="NumberInputControl";const f=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getDecrementTriggerProps(),e);return r.jsxRuntimeExports.jsx(s.ark.button,{...o,ref:n})});f.displayName="NumberInputDecrementTrigger";const P=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getIncrementTriggerProps(),e);return r.jsxRuntimeExports.jsx(s.ark.button,{...o,ref:n})});P.displayName="NumberInputIncrementTrigger";const h=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getInputProps(),e),u=g.useFieldContext();return r.jsxRuntimeExports.jsx(s.ark.input,{"aria-describedby":u?.ariaDescribedby,...o,ref:n})});h.displayName="NumberInputInput";const C=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getLabelProps(),e);return r.jsxRuntimeExports.jsx(s.ark.label,{...o,ref:n})});C.displayName="NumberInputLabel";const z=e=>{const n=p.useId(),{getRootNode:t}=s.useEnvironmentContext(),{dir:o,locale:u}=s.useLocaleContext(),i=g.useFieldContext(),l={id:n,ids:{label:i?.ids.label,input:i?.ids.control},disabled:i?.disabled,readOnly:i?.readOnly,required:i?.required,invalid:i?.invalid,dir:o,locale:u,getRootNode:t,...e},x=s.useMachine(I.machine,l);return I.connect(x,s.normalizeProps)},v=p.forwardRef((e,n)=>{const[t,o]=s.createSplitProps()(e,["allowMouseWheel","allowOverflow","clampValueOnBlur","defaultValue","disabled","focusInputOnChange","form","formatOptions","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","readOnly","required","spinOnPress","step","translations","value"]),u=z(t),i=a.mergeProps(u.getRootProps(),o);return r.jsxRuntimeExports.jsx(j,{value:u,children:r.jsxRuntimeExports.jsx(s.ark.div,{...i,ref:n})})});v.displayName="NumberInputRoot";const E=p.forwardRef((e,n)=>{const[{value:t},o]=s.createSplitProps()(e,["value"]),u=a.mergeProps(t.getRootProps(),o);return r.jsxRuntimeExports.jsx(j,{value:t,children:r.jsxRuntimeExports.jsx(s.ark.div,{...u,ref:n})})});E.displayName="NumberInputRootProvider";const w=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getScrubberProps(),e);return r.jsxRuntimeExports.jsx(s.ark.div,{...o,ref:n})});w.displayName="NumberInputScrubber";const _=p.forwardRef((e,n)=>{const{children:t,...o}=e,u=m(),i=a.mergeProps(u.getValueTextProps(),o);return r.jsxRuntimeExports.jsx(s.ark.span,{...i,ref:n,children:t||u.value})});_.displayName="NumberInputValueText";const{withProvider:y,withContext:d}=W.createSlotRecipeContext({key:"numberInput"});y(E,"root",{forwardAsChild:!0});const H=y(v,"root",{forwardAsChild:!0});d(C,"label",{forwardAsChild:!0});const J=d(h,"input",{forwardAsChild:!0}),q=d(P,"incrementTrigger",{forwardAsChild:!0,defaultProps:{children:r.jsxRuntimeExports.jsx(N.ChevronUpIcon,{})}}),$=d(f,"decrementTrigger",{forwardAsChild:!0,defaultProps:{children:r.jsxRuntimeExports.jsx(N.ChevronDownIcon,{})}}),K=d(R,"control",{forwardAsChild:!0,defaultProps:{children:r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(q,{}),r.jsxRuntimeExports.jsx($,{})]})}});d(w,"scrubber",{forwardAsChild:!0});d(_,"valueText",{forwardAsChild:!0});const Q=U,k=B.default.forwardRef(({disabled:e=!1,inputRef:n,leftAddon:t,leftElement:o,onContrast:u,placeholder:i,rightAddon:l,rightElement:x,showControls:A=!1,size:D="md",value:T,["data-testid"]:c="kibble-number-input",...O},F)=>r.jsxRuntimeExports.jsx(V.Box,{className:"NumberInput__Wrapper",position:"relative",w:"100%",children:r.jsxRuntimeExports.jsxs(H,{className:"NumberInput","data-testid":c,ref:F,value:T,size:D,disabled:e,variant:u?"onContrast":"default",...O,children:[r.jsxRuntimeExports.jsx(M.InputGroup,{className:"NumberInput__InputGroup","data-testid":`${c}-input-group`,startElement:o,startElementProps:{color:"inherit",_groupDisabled:{opacity:.6}},endElement:x,endElementProps:{color:"inherit",paddingInline:1.5,_groupDisabled:{opacity:.6}},startAddon:t,endAddon:l,children:r.jsxRuntimeExports.jsx(J,{className:"NumberInput__Input","data-testid":`${c}-input`,ref:n,placeholder:i})}),r.jsxRuntimeExports.jsx(Q,{children:S=>r.jsxRuntimeExports.jsx("input",{className:"NumberInput__HiddenInput","data-testid":`${c}-hidden-input`,type:"hidden",name:"amount",value:S.valueAsNumber})}),A&&r.jsxRuntimeExports.jsxs(K,{className:"NumberInput__Control","data-testid":`${c}-control`,children:[r.jsxRuntimeExports.jsx(q,{className:"NumberInput__IncrementTrigger","data-testid":`${c}-increment-trigger`,children:r.jsxRuntimeExports.jsx(b.Icon,{name:"chevronUp",variant:u?"onContrast":"default"})}),r.jsxRuntimeExports.jsx($,{className:"NumberInput__DecrementTrigger","data-testid":`${c}-decrement-trigger`,children:r.jsxRuntimeExports.jsx(b.Icon,{name:"chevronDown",variant:u?"onContrast":"default"})})]})]})}));k.displayName="NumberInput";const X=L.withFormControl(k);exports.WrappedNumberInput=X;
2
- //# sourceMappingURL=numberInput.component-DGPEz0Fv.js.map
1
+ "use strict";const r=require("./jsx-runtime-BjDatQAs.js"),p=require("react"),V=require("./index-BQRnVsAg.js"),L=require("./withFormControl-d2CEvsH2.js"),b=require("./icon.component-B1hr5lLa.js"),M=require("./input-group-DUdSDk4o.js"),W=require("./create-slot-recipe-context-HXE1VazG.js"),N=require("./icons-B6Nwr9di.js"),s=require("./use-locale-context-ym21RUxU.js"),I=require("./index-DVyODQn6.js"),g=require("./use-field-context-Cm29IQ7H.js"),a=require("./index-CQURjLlA.js"),G=e=>e&&e.__esModule?e:{default:e},B=G(p),[j,m]=s.createContext({name:"NumberInputContext",hookName:"useNumberInputContext",providerName:"<NumberInputProvider />"}),U=e=>e.children(m()),R=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getControlProps(),e);return r.jsxRuntimeExports.jsx(s.ark.div,{...o,ref:n})});R.displayName="NumberInputControl";const f=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getDecrementTriggerProps(),e);return r.jsxRuntimeExports.jsx(s.ark.button,{...o,ref:n})});f.displayName="NumberInputDecrementTrigger";const P=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getIncrementTriggerProps(),e);return r.jsxRuntimeExports.jsx(s.ark.button,{...o,ref:n})});P.displayName="NumberInputIncrementTrigger";const h=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getInputProps(),e),u=g.useFieldContext();return r.jsxRuntimeExports.jsx(s.ark.input,{"aria-describedby":u?.ariaDescribedby,...o,ref:n})});h.displayName="NumberInputInput";const C=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getLabelProps(),e);return r.jsxRuntimeExports.jsx(s.ark.label,{...o,ref:n})});C.displayName="NumberInputLabel";const z=e=>{const n=p.useId(),{getRootNode:t}=s.useEnvironmentContext(),{dir:o,locale:u}=s.useLocaleContext(),i=g.useFieldContext(),l={id:n,ids:{label:i?.ids.label,input:i?.ids.control},disabled:i?.disabled,readOnly:i?.readOnly,required:i?.required,invalid:i?.invalid,dir:o,locale:u,getRootNode:t,...e},x=s.useMachine(I.machine,l);return I.connect(x,s.normalizeProps)},v=p.forwardRef((e,n)=>{const[t,o]=s.createSplitProps()(e,["allowMouseWheel","allowOverflow","clampValueOnBlur","defaultValue","disabled","focusInputOnChange","form","formatOptions","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","readOnly","required","spinOnPress","step","translations","value"]),u=z(t),i=a.mergeProps(u.getRootProps(),o);return r.jsxRuntimeExports.jsx(j,{value:u,children:r.jsxRuntimeExports.jsx(s.ark.div,{...i,ref:n})})});v.displayName="NumberInputRoot";const E=p.forwardRef((e,n)=>{const[{value:t},o]=s.createSplitProps()(e,["value"]),u=a.mergeProps(t.getRootProps(),o);return r.jsxRuntimeExports.jsx(j,{value:t,children:r.jsxRuntimeExports.jsx(s.ark.div,{...u,ref:n})})});E.displayName="NumberInputRootProvider";const w=p.forwardRef((e,n)=>{const t=m(),o=a.mergeProps(t.getScrubberProps(),e);return r.jsxRuntimeExports.jsx(s.ark.div,{...o,ref:n})});w.displayName="NumberInputScrubber";const _=p.forwardRef((e,n)=>{const{children:t,...o}=e,u=m(),i=a.mergeProps(u.getValueTextProps(),o);return r.jsxRuntimeExports.jsx(s.ark.span,{...i,ref:n,children:t||u.value})});_.displayName="NumberInputValueText";const{withProvider:y,withContext:d}=W.createSlotRecipeContext({key:"numberInput"});y(E,"root",{forwardAsChild:!0});const H=y(v,"root",{forwardAsChild:!0});d(C,"label",{forwardAsChild:!0});const J=d(h,"input",{forwardAsChild:!0}),q=d(P,"incrementTrigger",{forwardAsChild:!0,defaultProps:{children:r.jsxRuntimeExports.jsx(N.ChevronUpIcon,{})}}),$=d(f,"decrementTrigger",{forwardAsChild:!0,defaultProps:{children:r.jsxRuntimeExports.jsx(N.ChevronDownIcon,{})}}),K=d(R,"control",{forwardAsChild:!0,defaultProps:{children:r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(q,{}),r.jsxRuntimeExports.jsx($,{})]})}});d(w,"scrubber",{forwardAsChild:!0});d(_,"valueText",{forwardAsChild:!0});const Q=U,k=B.default.forwardRef(({disabled:e=!1,inputRef:n,leftAddon:t,leftElement:o,onContrast:u,placeholder:i,rightAddon:l,rightElement:x,showControls:A=!1,size:D="md",value:T,["data-testid"]:c="kibble-number-input",...O},F)=>r.jsxRuntimeExports.jsx(V.Box,{className:"NumberInput__Wrapper",position:"relative",w:"100%",children:r.jsxRuntimeExports.jsxs(H,{className:"NumberInput","data-testid":c,ref:F,value:T,size:D,disabled:e,variant:u?"onContrast":"default",...O,children:[r.jsxRuntimeExports.jsx(M.InputGroup,{className:"NumberInput__InputGroup","data-testid":`${c}-input-group`,startElement:o,startElementProps:{color:"inherit",_groupDisabled:{opacity:.6}},endElement:x,endElementProps:{color:"inherit",paddingInline:1.5,_groupDisabled:{opacity:.6}},startAddon:t,endAddon:l,children:r.jsxRuntimeExports.jsx(J,{className:"NumberInput__Input","data-testid":`${c}-input`,ref:n,placeholder:i})}),r.jsxRuntimeExports.jsx(Q,{children:S=>r.jsxRuntimeExports.jsx("input",{className:"NumberInput__HiddenInput","data-testid":`${c}-hidden-input`,type:"hidden",name:"amount",value:S.valueAsNumber})}),A&&r.jsxRuntimeExports.jsxs(K,{className:"NumberInput__Control","data-testid":`${c}-control`,children:[r.jsxRuntimeExports.jsx(q,{className:"NumberInput__IncrementTrigger","data-testid":`${c}-increment-trigger`,children:r.jsxRuntimeExports.jsx(b.Icon,{name:"chevronUp",variant:u?"onContrast":"default"})}),r.jsxRuntimeExports.jsx($,{className:"NumberInput__DecrementTrigger","data-testid":`${c}-decrement-trigger`,children:r.jsxRuntimeExports.jsx(b.Icon,{name:"chevronDown",variant:u?"onContrast":"default"})})]})]})}));k.displayName="NumberInput";const X=L.withFormControl(k);exports.WrappedNumberInput=X;
2
+ //# sourceMappingURL=numberInput.component-B0P7w6Av.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"numberInput.component-DGPEz0Fv.js","sources":["../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-control.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-decrement-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-increment-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-label.js","../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root-provider.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-scrubber.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/number-input/number-input.js","../../src/components/NumberInput/numberInput.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [NumberInputProvider, useNumberInputContext] = createContext({\n name: \"NumberInputContext\",\n hookName: \"useNumberInputContext\",\n providerName: \"<NumberInputProvider />\"\n});\n\nexport { NumberInputProvider, useNumberInputContext };\n","'use client';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputContext = (props) => props.children(useNumberInputContext());\n\nexport { NumberInputContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputControl = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputControl.displayName = \"NumberInputControl\";\n\nexport { NumberInputControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputDecrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getDecrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputDecrementTrigger.displayName = \"NumberInputDecrementTrigger\";\n\nexport { NumberInputDecrementTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputIncrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getIncrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputIncrementTrigger.displayName = \"NumberInputIncrementTrigger\";\n\nexport { NumberInputIncrementTrigger };\n","'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 '../field/use-field-context.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputInput = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nNumberInputInput.displayName = \"NumberInputInput\";\n\nexport { NumberInputInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputLabel = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nNumberInputLabel.displayName = \"NumberInputLabel\";\n\nexport { NumberInputLabel };\n","'use client';\nimport * as numberInput from '@zag-js/number-input';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useNumberInput = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir, locale } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n input: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n required: field?.required,\n invalid: field?.invalid,\n dir,\n locale,\n getRootNode,\n ...props\n };\n const service = useMachine(numberInput.machine, machineProps);\n return numberInput.connect(service, normalizeProps);\n};\n\nexport { useNumberInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useNumberInput } from './use-number-input.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRoot = forwardRef((props, ref) => {\n const [useNumberInputProps, localProps] = createSplitProps()(props, [\n \"allowMouseWheel\",\n \"allowOverflow\",\n \"clampValueOnBlur\",\n \"defaultValue\",\n \"disabled\",\n \"focusInputOnChange\",\n \"form\",\n \"formatOptions\",\n \"id\",\n \"ids\",\n \"inputMode\",\n \"invalid\",\n \"locale\",\n \"max\",\n \"min\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"onValueInvalid\",\n \"pattern\",\n \"readOnly\",\n \"required\",\n \"spinOnPress\",\n \"step\",\n \"translations\",\n \"value\"\n ]);\n const numberInput = useNumberInput(useNumberInputProps);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRoot.displayName = \"NumberInputRoot\";\n\nexport { NumberInputRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRootProvider = forwardRef((props, ref) => {\n const [{ value: numberInput }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRootProvider.displayName = \"NumberInputRootProvider\";\n\nexport { NumberInputRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputScrubber = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getScrubberProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputScrubber.displayName = \"NumberInputScrubber\";\n\nexport { NumberInputScrubber };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputValueText = forwardRef((props, ref) => {\n const { children, ...localProps } = props;\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getValueTextProps(), localProps);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || numberInput.value });\n});\nNumberInputValueText.displayName = \"NumberInputValueText\";\n\nexport { NumberInputValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { NumberInput } from '@ark-ui/react/number-input';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { ChevronUpIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useNumberInputStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"numberInput\" });\nconst NumberInputRootProvider = withProvider(NumberInput.RootProvider, \"root\", { forwardAsChild: true });\nconst NumberInputRoot = withProvider(NumberInput.Root, \"root\", { forwardAsChild: true });\nconst NumberInputPropsProvider = PropsProvider;\nconst NumberInputLabel = withContext(NumberInput.Label, \"label\", { forwardAsChild: true });\nconst NumberInputInput = withContext(NumberInput.Input, \"input\", { forwardAsChild: true });\nconst NumberInputIncrementTrigger = withContext(NumberInput.IncrementTrigger, \"incrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }\n});\nconst NumberInputDecrementTrigger = withContext(NumberInput.DecrementTrigger, \"decrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }\n});\nconst NumberInputControl = withContext(NumberInput.Control, \"control\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(NumberInputIncrementTrigger, {}),\n /* @__PURE__ */ jsx(NumberInputDecrementTrigger, {})\n ] })\n }\n});\nconst NumberInputScrubber = withContext(NumberInput.Scrubber, \"scrubber\", { forwardAsChild: true });\nconst NumberInputValueText = withContext(NumberInput.ValueText, \"valueText\", { forwardAsChild: true });\nconst NumberInputContext = NumberInput.Context;\n\nexport { NumberInputContext, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputPropsProvider, NumberInputRoot, NumberInputRootProvider, NumberInputScrubber, NumberInputValueText, useNumberInputStyles };\n","import React from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport {\n NumberInput as CNumberInput,\n NumberInputRootProps as CNumberInputRootProps,\n NumberInputValueChangeDetails,\n} from '@chakra-ui/react/number-input';\nimport { InputGroup } from '@chakra-ui/react/input-group';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { Icon } from 'components/Icon/icon.component';\n\nexport interface NumberInputProps extends WithFormControlProps, CNumberInputRootProps {\n /** Ref to the number input element. */\n inputRef?: React.Ref<HTMLInputElement | null>;\n /** Left addon element. */\n leftAddon?: React.ReactNode;\n /** Left element inside the input. */\n leftElement?: React.ReactNode;\n /**\n * If true, the input will render a contrasting variant.\n * @default false\n */\n onContrast?: boolean;\n /** Placeholder text for the number input field. */\n placeholder?: string;\n /** Right addon element. */\n rightAddon?: React.ReactNode;\n /** Right element inside the input. */\n rightElement?: React.ReactNode;\n /**\n * If true, the input will show the increment and decrement buttons.\n * @default false\n */\n showControls?: boolean;\n /** Size of the number input.\n * @default md\n */\n size?: FormControlSize;\n /** Data test id for the number input.\n * @default kibble-number-input\n */\n 'data-testid'?: string;\n /** Callback function when the input value changes. */\n onValueChange?: (details: NumberInputValueChangeDetails) => void;\n}\n\nconst NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n disabled = false,\n inputRef,\n leftAddon,\n leftElement,\n onContrast,\n placeholder,\n rightAddon,\n rightElement,\n showControls = false,\n size = 'md',\n value,\n ['data-testid']: dataTestId = 'kibble-number-input',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n return (\n <Box className=\"NumberInput__Wrapper\" position=\"relative\" w=\"100%\">\n <CNumberInput.Root\n className=\"NumberInput\"\n data-testid={dataTestId}\n ref={ref}\n value={value}\n size={size}\n disabled={disabled}\n variant={onContrast ? 'onContrast' : 'default'}\n {...rest}\n >\n <InputGroup\n className=\"NumberInput__InputGroup\"\n data-testid={`${dataTestId}-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 <CNumberInput.Input\n className=\"NumberInput__Input\"\n data-testid={`${dataTestId}-input`}\n ref={inputRef}\n placeholder={placeholder}\n />\n </InputGroup>\n <CNumberInput.Context>\n {(context) => (\n <input\n className=\"NumberInput__HiddenInput\"\n data-testid={`${dataTestId}-hidden-input`}\n type=\"hidden\"\n name=\"amount\"\n value={context.valueAsNumber}\n />\n )}\n </CNumberInput.Context>\n {showControls && (\n <CNumberInput.Control className=\"NumberInput__Control\" data-testid={`${dataTestId}-control`}>\n <CNumberInput.IncrementTrigger\n className=\"NumberInput__IncrementTrigger\"\n data-testid={`${dataTestId}-increment-trigger`}\n >\n <Icon name=\"chevronUp\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.IncrementTrigger>\n <CNumberInput.DecrementTrigger\n className=\"NumberInput__DecrementTrigger\"\n data-testid={`${dataTestId}-decrement-trigger`}\n >\n <Icon name=\"chevronDown\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.DecrementTrigger>\n </CNumberInput.Control>\n )}\n </CNumberInput.Root>\n </Box>\n );\n },\n);\n\nNumberInput.displayName = 'NumberInput';\nconst WrappedNumberInput = withFormControl<NumberInputProps>(NumberInput);\n\nexport { WrappedNumberInput as NumberInput };\n"],"names":["NumberInputProvider","useNumberInputContext","createContext","NumberInputContext","props","NumberInputControl","forwardRef","ref","numberInput","mergedProps","mergeProps","jsx","ark","NumberInputDecrementTrigger","NumberInputIncrementTrigger","NumberInputInput","field","useFieldContext","NumberInputLabel","useNumberInput","id","useId","getRootNode","useEnvironmentContext","dir","locale","useLocaleContext","machineProps","service","useMachine","numberInput.machine","numberInput.connect","normalizeProps","NumberInputRoot","useNumberInputProps","localProps","createSplitProps","NumberInputRootProvider","NumberInputScrubber","NumberInputValueText","children","withProvider","withContext","createSlotRecipeContext","NumberInput.RootProvider","NumberInput.Root","NumberInput.Label","NumberInput.Input","NumberInput.IncrementTrigger","ChevronUpIcon","NumberInput.DecrementTrigger","ChevronDownIcon","NumberInput.Control","jsxs","Fragment","NumberInput.Scrubber","NumberInput.ValueText","NumberInput.Context","NumberInput","React","disabled","inputRef","leftAddon","leftElement","onContrast","placeholder","rightAddon","rightElement","showControls","size","value","dataTestId","rest","Box","CNumberInput.Root","InputGroup","CNumberInput.Input","CNumberInput.Context","context","CNumberInput.Control","CNumberInput.Incr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,8,9,10,11,12]}
1
+ {"version":3,"file":"numberInput.component-B0P7w6Av.js","sources":["../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-control.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-decrement-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-increment-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-label.js","../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root-provider.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-scrubber.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/number-input/number-input.js","../../src/components/NumberInput/numberInput.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [NumberInputProvider, useNumberInputContext] = createContext({\n name: \"NumberInputContext\",\n hookName: \"useNumberInputContext\",\n providerName: \"<NumberInputProvider />\"\n});\n\nexport { NumberInputProvider, useNumberInputContext };\n","'use client';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputContext = (props) => props.children(useNumberInputContext());\n\nexport { NumberInputContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputControl = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputControl.displayName = \"NumberInputControl\";\n\nexport { NumberInputControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputDecrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getDecrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputDecrementTrigger.displayName = \"NumberInputDecrementTrigger\";\n\nexport { NumberInputDecrementTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputIncrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getIncrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputIncrementTrigger.displayName = \"NumberInputIncrementTrigger\";\n\nexport { NumberInputIncrementTrigger };\n","'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 '../field/use-field-context.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputInput = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nNumberInputInput.displayName = \"NumberInputInput\";\n\nexport { NumberInputInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputLabel = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nNumberInputLabel.displayName = \"NumberInputLabel\";\n\nexport { NumberInputLabel };\n","'use client';\nimport * as numberInput from '@zag-js/number-input';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useNumberInput = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir, locale } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n input: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n required: field?.required,\n invalid: field?.invalid,\n dir,\n locale,\n getRootNode,\n ...props\n };\n const service = useMachine(numberInput.machine, machineProps);\n return numberInput.connect(service, normalizeProps);\n};\n\nexport { useNumberInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useNumberInput } from './use-number-input.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRoot = forwardRef((props, ref) => {\n const [useNumberInputProps, localProps] = createSplitProps()(props, [\n \"allowMouseWheel\",\n \"allowOverflow\",\n \"clampValueOnBlur\",\n \"defaultValue\",\n \"disabled\",\n \"focusInputOnChange\",\n \"form\",\n \"formatOptions\",\n \"id\",\n \"ids\",\n \"inputMode\",\n \"invalid\",\n \"locale\",\n \"max\",\n \"min\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"onValueInvalid\",\n \"pattern\",\n \"readOnly\",\n \"required\",\n \"spinOnPress\",\n \"step\",\n \"translations\",\n \"value\"\n ]);\n const numberInput = useNumberInput(useNumberInputProps);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRoot.displayName = \"NumberInputRoot\";\n\nexport { NumberInputRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRootProvider = forwardRef((props, ref) => {\n const [{ value: numberInput }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRootProvider.displayName = \"NumberInputRootProvider\";\n\nexport { NumberInputRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputScrubber = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getScrubberProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputScrubber.displayName = \"NumberInputScrubber\";\n\nexport { NumberInputScrubber };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputValueText = forwardRef((props, ref) => {\n const { children, ...localProps } = props;\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getValueTextProps(), localProps);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || numberInput.value });\n});\nNumberInputValueText.displayName = \"NumberInputValueText\";\n\nexport { NumberInputValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { NumberInput } from '@ark-ui/react/number-input';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { ChevronUpIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useNumberInputStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"numberInput\" });\nconst NumberInputRootProvider = withProvider(NumberInput.RootProvider, \"root\", { forwardAsChild: true });\nconst NumberInputRoot = withProvider(NumberInput.Root, \"root\", { forwardAsChild: true });\nconst NumberInputPropsProvider = PropsProvider;\nconst NumberInputLabel = withContext(NumberInput.Label, \"label\", { forwardAsChild: true });\nconst NumberInputInput = withContext(NumberInput.Input, \"input\", { forwardAsChild: true });\nconst NumberInputIncrementTrigger = withContext(NumberInput.IncrementTrigger, \"incrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }\n});\nconst NumberInputDecrementTrigger = withContext(NumberInput.DecrementTrigger, \"decrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }\n});\nconst NumberInputControl = withContext(NumberInput.Control, \"control\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(NumberInputIncrementTrigger, {}),\n /* @__PURE__ */ jsx(NumberInputDecrementTrigger, {})\n ] })\n }\n});\nconst NumberInputScrubber = withContext(NumberInput.Scrubber, \"scrubber\", { forwardAsChild: true });\nconst NumberInputValueText = withContext(NumberInput.ValueText, \"valueText\", { forwardAsChild: true });\nconst NumberInputContext = NumberInput.Context;\n\nexport { NumberInputContext, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputPropsProvider, NumberInputRoot, NumberInputRootProvider, NumberInputScrubber, NumberInputValueText, useNumberInputStyles };\n","import React from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport {\n NumberInput as CNumberInput,\n NumberInputRootProps as CNumberInputRootProps,\n NumberInputValueChangeDetails,\n} from '@chakra-ui/react/number-input';\nimport { InputGroup } from '@chakra-ui/react/input-group';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { Icon } from 'components/Icon/icon.component';\n\nexport interface NumberInputProps extends WithFormControlProps, CNumberInputRootProps {\n /** Ref to the number input element. */\n inputRef?: React.Ref<HTMLInputElement | null>;\n /** Left addon element. */\n leftAddon?: React.ReactNode;\n /** Left element inside the input. */\n leftElement?: React.ReactNode;\n /**\n * If true, the input will render a contrasting variant.\n * @default false\n */\n onContrast?: boolean;\n /** Placeholder text for the number input field. */\n placeholder?: string;\n /** Right addon element. */\n rightAddon?: React.ReactNode;\n /** Right element inside the input. */\n rightElement?: React.ReactNode;\n /**\n * If true, the input will show the increment and decrement buttons.\n * @default false\n */\n showControls?: boolean;\n /** Size of the number input.\n * @default md\n */\n size?: FormControlSize;\n /** Data test id for the number input.\n * @default kibble-number-input\n */\n 'data-testid'?: string;\n /** Callback function when the input value changes. */\n onValueChange?: (details: NumberInputValueChangeDetails) => void;\n}\n\nconst NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n disabled = false,\n inputRef,\n leftAddon,\n leftElement,\n onContrast,\n placeholder,\n rightAddon,\n rightElement,\n showControls = false,\n size = 'md',\n value,\n ['data-testid']: dataTestId = 'kibble-number-input',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n return (\n <Box className=\"NumberInput__Wrapper\" position=\"relative\" w=\"100%\">\n <CNumberInput.Root\n className=\"NumberInput\"\n data-testid={dataTestId}\n ref={ref}\n value={value}\n size={size}\n disabled={disabled}\n variant={onContrast ? 'onContrast' : 'default'}\n {...rest}\n >\n <InputGroup\n className=\"NumberInput__InputGroup\"\n data-testid={`${dataTestId}-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 <CNumberInput.Input\n className=\"NumberInput__Input\"\n data-testid={`${dataTestId}-input`}\n ref={inputRef}\n placeholder={placeholder}\n />\n </InputGroup>\n <CNumberInput.Context>\n {(context) => (\n <input\n className=\"NumberInput__HiddenInput\"\n data-testid={`${dataTestId}-hidden-input`}\n type=\"hidden\"\n name=\"amount\"\n value={context.valueAsNumber}\n />\n )}\n </CNumberInput.Context>\n {showControls && (\n <CNumberInput.Control className=\"NumberInput__Control\" data-testid={`${dataTestId}-control`}>\n <CNumberInput.IncrementTrigger\n className=\"NumberInput__IncrementTrigger\"\n data-testid={`${dataTestId}-increment-trigger`}\n >\n <Icon name=\"chevronUp\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.IncrementTrigger>\n <CNumberInput.DecrementTrigger\n className=\"NumberInput__DecrementTrigger\"\n data-testid={`${dataTestId}-decrement-trigger`}\n >\n <Icon name=\"chevronDown\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.DecrementTrigger>\n </CNumberInput.Control>\n )}\n </CNumberInput.Root>\n </Box>\n );\n },\n);\n\nNumberInput.displayName = 'NumberInput';\nconst WrappedNumberInput = withFormControl<NumberInputProps>(NumberInput);\n\nexport { WrappedNumberInput as NumberInput };\n"],"names":["NumberInputProvider","useNumberInputContext","createContext","NumberInputContext","props","NumberInputControl","forwardRef","ref","numberInput","mergedProps","mergeProps","jsx","ark","NumberInputDecrementTrigger","NumberInputIncrementTrigger","NumberInputInput","field","useFieldContext","NumberInputLabel","useNumberInput","id","useId","getRootNode","useEnvironmentContext","dir","locale","useLocaleContext","machineProps","service","useMachine","numberInput.machine","numberInput.connect","normalizeProps","NumberInputRoot","useNumberInputProps","localProps","createSplitProps","NumberInputRootProvider","NumberInputScrubber","NumberInputValueText","children","withProvider","withContext","createSlotRecipeContext","NumberInput.RootProvider","NumberInput.Root","NumberInput.Label","NumberInput.Input","NumberInput.IncrementTrigger","ChevronUpIcon","NumberInput.DecrementTrigger","ChevronDownIcon","NumberInput.Control","jsxs","Fragment","NumberInput.Scrubber","NumberInput.ValueText","NumberInput.Context","NumberInput","React","disabled","inputRef","leftAddon","leftElement","onContrast","placeholder","rightAddon","rightElement","showControls","size","value","dataTestId","rest","Box","CNumberInput.Root","InputGroup","CNumberInput.Input","CNumberInput.Context","context","CNumberInput.Control","CNumberInput.IncrementTrigger","Icon","CNumberInput.DecrementTrigger","WrappedNumberInput","withFormControl"],"mappings":"wgBAGM,CAACA,EAAqBC,CAAqB,EAAIC,gBAAc,CACjE,KAAM,qBACN,SAAU,wBACV,aAAc,yBAChB,CAAC,ECJKC,EAAsBC,GAAUA,EAAM,SAASH,EAAqB,CAAE,ECItEI,EAAqBC,EAAU,WAAC,CAACF,EAAOG,IAAQ,CACpD,MAAMC,EAAcP,EAAuB,EACrCQ,EAAcC,EAAU,WAACF,EAAY,gBAAe,EAAIJ,CAAK,EACnE,OAAuBO,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,IAAK,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAC7D,CAAC,EACDF,EAAmB,YAAc,qBCLjC,MAAMQ,EAA8BP,EAAU,WAC5C,CAACF,EAAOG,IAAQ,CACd,MAAMC,EAAcP,EAAuB,EACrCQ,EAAcC,EAAU,WAACF,EAAY,yBAAwB,EAAIJ,CAAK,EAC5E,OAAuBO,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,OAAQ,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAClE,CACA,EACAM,EAA4B,YAAc,8BCP1C,MAAMC,EAA8BR,EAAU,WAC5C,CA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CAAU,WAC/E,SAAA,CAAA5D,EAAA,kBAAA,IAACqE,EAAA,CACC,UAAU,gCACV,cAAa,GAAGT,CAAU,qBAE1B,iCAACU,EAAK,KAAA,CAAA,KAAK,YAAY,QAASjB,EAAa,aAAe,SAAW,CAAA,CAAA,CACzE,EACArD,EAAA,kBAAA,IAACuE,EAAA,CACC,UAAU,gCACV,cAAa,GAAGX,CAAU,qBAE1B,iCAACU,EAAK,KAAA,CAAA,KAAK,cAAc,QAASjB,EAAa,aAAe,SAAW,CAAA,CAAA,CAAA,CAC3E,CACF,CAAA,CAAA,CAAA,CAAA,EAGN,CAGN,EAEAN,EAAY,YAAc,cACpB,MAAAyB,EAAqBC,kBAAkC1B,CAAW","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12]}
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import F, { forwardRef as a, useId as L } from "react";
3
3
  import { B as W } from "./index-9BerxEcw.js";
4
- import { w as q } from "./withFormControl-DW9A6BSL.js";
4
+ import { w as q } from "./withFormControl-DVeqCX53.js";
5
5
  import { I } from "./icon.component-PV_nHBId.js";
6
6
  import { I as B } from "./input-group-CFelIL63.js";
7
7
  import { c as M } from "./create-slot-recipe-context-D_FXDJGp.js";
@@ -224,4 +224,4 @@ const ge = q(D);
224
224
  export {
225
225
  ge as W
226
226
  };
227
- //# sourceMappingURL=numberInput.component-CRDRjrTH.js.map
227
+ //# sourceMappingURL=numberInput.component-Bpl3NGJU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"numberInput.component-CRDRjrTH.js","sources":["../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-control.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-decrement-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-increment-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-label.js","../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root-provider.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-scrubber.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/number-input/number-input.js","../../src/components/NumberInput/numberInput.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [NumberInputProvider, useNumberInputContext] = createContext({\n name: \"NumberInputContext\",\n hookName: \"useNumberInputContext\",\n providerName: \"<NumberInputProvider />\"\n});\n\nexport { NumberInputProvider, useNumberInputContext };\n","'use client';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputContext = (props) => props.children(useNumberInputContext());\n\nexport { NumberInputContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputControl = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputControl.displayName = \"NumberInputControl\";\n\nexport { NumberInputControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputDecrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getDecrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputDecrementTrigger.displayName = \"NumberInputDecrementTrigger\";\n\nexport { NumberInputDecrementTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputIncrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getIncrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputIncrementTrigger.displayName = \"NumberInputIncrementTrigger\";\n\nexport { NumberInputIncrementTrigger };\n","'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 '../field/use-field-context.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputInput = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nNumberInputInput.displayName = \"NumberInputInput\";\n\nexport { NumberInputInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputLabel = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nNumberInputLabel.displayName = \"NumberInputLabel\";\n\nexport { NumberInputLabel };\n","'use client';\nimport * as numberInput from '@zag-js/number-input';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useNumberInput = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir, locale } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n input: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n required: field?.required,\n invalid: field?.invalid,\n dir,\n locale,\n getRootNode,\n ...props\n };\n const service = useMachine(numberInput.machine, machineProps);\n return numberInput.connect(service, normalizeProps);\n};\n\nexport { useNumberInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useNumberInput } from './use-number-input.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRoot = forwardRef((props, ref) => {\n const [useNumberInputProps, localProps] = createSplitProps()(props, [\n \"allowMouseWheel\",\n \"allowOverflow\",\n \"clampValueOnBlur\",\n \"defaultValue\",\n \"disabled\",\n \"focusInputOnChange\",\n \"form\",\n \"formatOptions\",\n \"id\",\n \"ids\",\n \"inputMode\",\n \"invalid\",\n \"locale\",\n \"max\",\n \"min\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"onValueInvalid\",\n \"pattern\",\n \"readOnly\",\n \"required\",\n \"spinOnPress\",\n \"step\",\n \"translations\",\n \"value\"\n ]);\n const numberInput = useNumberInput(useNumberInputProps);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRoot.displayName = \"NumberInputRoot\";\n\nexport { NumberInputRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRootProvider = forwardRef((props, ref) => {\n const [{ value: numberInput }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRootProvider.displayName = \"NumberInputRootProvider\";\n\nexport { NumberInputRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputScrubber = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getScrubberProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputScrubber.displayName = \"NumberInputScrubber\";\n\nexport { NumberInputScrubber };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputValueText = forwardRef((props, ref) => {\n const { children, ...localProps } = props;\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getValueTextProps(), localProps);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || numberInput.value });\n});\nNumberInputValueText.displayName = \"NumberInputValueText\";\n\nexport { NumberInputValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { NumberInput } from '@ark-ui/react/number-input';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { ChevronUpIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useNumberInputStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"numberInput\" });\nconst NumberInputRootProvider = withProvider(NumberInput.RootProvider, \"root\", { forwardAsChild: true });\nconst NumberInputRoot = withProvider(NumberInput.Root, \"root\", { forwardAsChild: true });\nconst NumberInputPropsProvider = PropsProvider;\nconst NumberInputLabel = withContext(NumberInput.Label, \"label\", { forwardAsChild: true });\nconst NumberInputInput = withContext(NumberInput.Input, \"input\", { forwardAsChild: true });\nconst NumberInputIncrementTrigger = withContext(NumberInput.IncrementTrigger, \"incrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }\n});\nconst NumberInputDecrementTrigger = withContext(NumberInput.DecrementTrigger, \"decrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }\n});\nconst NumberInputControl = withContext(NumberInput.Control, \"control\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(NumberInputIncrementTrigger, {}),\n /* @__PURE__ */ jsx(NumberInputDecrementTrigger, {})\n ] })\n }\n});\nconst NumberInputScrubber = withContext(NumberInput.Scrubber, \"scrubber\", { forwardAsChild: true });\nconst NumberInputValueText = withContext(NumberInput.ValueText, \"valueText\", { forwardAsChild: true });\nconst NumberInputContext = NumberInput.Context;\n\nexport { NumberInputContext, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputPropsProvider, NumberInputRoot, NumberInputRootProvider, NumberInputScrubber, NumberInputValueText, useNumberInputStyles };\n","import React from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport {\n NumberInput as CNumberInput,\n NumberInputRootProps as CNumberInputRootProps,\n NumberInputValueChangeDetails,\n} from '@chakra-ui/react/number-input';\nimport { InputGroup } from '@chakra-ui/react/input-group';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { Icon } from 'components/Icon/icon.component';\n\nexport interface NumberInputProps extends WithFormControlProps, CNumberInputRootProps {\n /** Ref to the number input element. */\n inputRef?: React.Ref<HTMLInputElement | null>;\n /** Left addon element. */\n leftAddon?: React.ReactNode;\n /** Left element inside the input. */\n leftElement?: React.ReactNode;\n /**\n * If true, the input will render a contrasting variant.\n * @default false\n */\n onContrast?: boolean;\n /** Placeholder text for the number input field. */\n placeholder?: string;\n /** Right addon element. */\n rightAddon?: React.ReactNode;\n /** Right element inside the input. */\n rightElement?: React.ReactNode;\n /**\n * If true, the input will show the increment and decrement buttons.\n * @default false\n */\n showControls?: boolean;\n /** Size of the number input.\n * @default md\n */\n size?: FormControlSize;\n /** Data test id for the number input.\n * @default kibble-number-input\n */\n 'data-testid'?: string;\n /** Callback function when the input value changes. */\n onValueChange?: (details: NumberInputValueChangeDetails) => void;\n}\n\nconst NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n disabled = false,\n inputRef,\n leftAddon,\n leftElement,\n onContrast,\n placeholder,\n rightAddon,\n rightElement,\n showControls = false,\n size = 'md',\n value,\n ['data-testid']: dataTestId = 'kibble-number-input',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n return (\n <Box className=\"NumberInput__Wrapper\" position=\"relative\" w=\"100%\">\n <CNumberInput.Root\n className=\"NumberInput\"\n data-testid={dataTestId}\n ref={ref}\n value={value}\n size={size}\n disabled={disabled}\n variant={onContrast ? 'onContrast' : 'default'}\n {...rest}\n >\n <InputGroup\n className=\"NumberInput__InputGroup\"\n data-testid={`${dataTestId}-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 <CNumberInput.Input\n className=\"NumberInput__Input\"\n data-testid={`${dataTestId}-input`}\n ref={inputRef}\n placeholder={placeholder}\n />\n </InputGroup>\n <CNumberInput.Context>\n {(context) => (\n <input\n className=\"NumberInput__HiddenInput\"\n data-testid={`${dataTestId}-hidden-input`}\n type=\"hidden\"\n name=\"amount\"\n value={context.valueAsNumber}\n />\n )}\n </CNumberInput.Context>\n {showControls && (\n <CNumberInput.Control className=\"NumberInput__Control\" data-testid={`${dataTestId}-control`}>\n <CNumberInput.IncrementTrigger\n className=\"NumberInput__IncrementTrigger\"\n data-testid={`${dataTestId}-increment-trigger`}\n >\n <Icon name=\"chevronUp\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.IncrementTrigger>\n <CNumberInput.DecrementTrigger\n className=\"NumberInput__DecrementTrigger\"\n data-testid={`${dataTestId}-decrement-trigger`}\n >\n <Icon name=\"chevronDown\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.DecrementTrigger>\n </CNumberInput.Control>\n )}\n </CNumberInput.Root>\n </Box>\n );\n },\n);\n\nNumberInput.displayName = 'NumberInput';\nconst WrappedNumberInput = withFormControl<NumberInputProps>(NumberInput);\n\nexport { WrappedNumberInput as NumberInput };\n"],"names":["NumberInputProvider","useNumberInputContext","createContext","NumberInputContext","props","NumberInputControl","forwardRef","ref","numberInput","mergedProps","mergeProps","jsx","ark","NumberInputDecrementTrigger","NumberInputIncrementTrigger","NumberInputInput","field","useFieldContext","NumberInputLabel","useNumberInput","id","useId","getRootNode","useEnvironmentContext","dir","locale","useLocaleContext","machineProps","service","useMachine","numberInput.machine","numberInput.connect","normalizeProps","NumberInputRoot","useNumberInputProps","localProps","createSplitProps","NumberInputRootProvider","NumberInputScrubber","NumberInputValueText","children","withProvider","withContext","createSlotRecipeContext","NumberInput.RootProvider","NumberInput.Root","NumberInput.Label","NumberInput.Input","NumberInput.IncrementTrigger","ChevronUpIcon","NumberInput.DecrementTrigger","ChevronDownIcon","NumberInput.Control","jsxs","Fragment","NumberInput.Scrubber","NumberInput.ValueText","NumberInput.Context","NumberInput","React","disabled","inputRef","leftAddon","leftElement","onContrast","placeholder","rightAddon","rightElement","showControls","size","value","dataTestId","rest","Box","CNumberInput.Root","InputGroup","CNumberInput.Input","CNumberInput.Context","context","CNumberInput.Control","CNumberInput.IncrementTrigger","Icon","CNumberInput.DecrementTrigger","WrappedNumberInput","withFormControl"],"mappings":";;;;;;;;;;;;AAGA,MAAM,CAACA,GAAqBC,CAAqB,IAAIC,EAAc;AAAA,EACjE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCJKC,IAAqB,CAACC,MAAUA,EAAM,SAASH,EAAqB,CAAE,GCItEI,IAAqBC,EAAW,CAACF,GAAOG,MAAQ;AACpD,QAAMC,IAAcP,EAAuB,GACrCQ,IAAcC,EAAWF,EAAY,gBAAe,GAAIJ,CAAK;AACnE,SAAuBO,gBAAAA,EAAAA,IAAIC,EAAI,KAAK,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC7D,CAAC;AACDF,EAAmB,cAAc;ACLjC,MAAMQ,IAA8BP;AAAA,EAClC,CAACF,GAAOG,MAAQ;AACd,UAAMC,IAAcP,EAAuB,GACrCQ,IAAcC,EAAWF,EAAY,yBAAwB,GAAIJ,CAAK;AAC5E,WAAuBO,gBAAAA,EAAAA,IAAIC,EAAI,QAAQ,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAAA,EAClE;AACA;AACAM,EAA4B,cAAc;ACP1C,MAAMC,IAA8BR;AAAA,EAClC,CAACF,GAAOG,MAAQ;AACd,UAAMC,IAAcP,EAAuB,GACrCQ,IAAcC,EAAWF,EAAY,yBAAwB,GAAIJ,CAAK;AAC5E,WAAuBO,gBAAAA,EAAAA,IAAIC,EAAI,QAAQ,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAAA,EAClE;AACA;AACAO,EAA4B,cAAc;ACN1C,MAAMC,IAAmBT,EAAW,CAACF,GAAOG,MAAQ;AAClD,QAAMC,IAAc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AnE,gBAAAA,EAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,eAAa,GAAG4D,CAAU;AAAA,YAC1B,MAAK;AAAA,YACL,MAAK;AAAA,YACL,OAAOO,EAAQ;AAAA,UAAA;AAAA,QAAA,GAGrB;AAAA,QACCV,KACEf,gBAAAA,EAAA,KAAA0B,IAAA,EAAqB,WAAU,wBAAuB,eAAa,GAAGR,CAAU,YAC/E,UAAA;AAAA,UAAA5D,gBAAAA,EAAA;AAAA,YAACqE;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAa,GAAGT,CAAU;AAAA,cAE1B,gCAACU,GAAK,EAAA,MAAK,aAAY,SAASjB,IAAa,eAAe,UAAW,CAAA;AAAA,YAAA;AAAA,UACzE;AAAA,UACArD,gBAAAA,EAAA;AAAA,YAACuE;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAa,GAAGX,CAAU;AAAA,cAE1B,gCAACU,GAAK,EAAA,MAAK,eAAc,SAASjB,IAAa,eAAe,UAAW,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAC3E,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAGN;AAEAN,EAAY,cAAc;AACpB,MAAAyB,KAAqBC,EAAkC1B,CAAW;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12]}
1
+ {"version":3,"file":"numberInput.component-Bpl3NGJU.js","sources":["../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-context.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-control.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-decrement-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-increment-trigger.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-label.js","../../node_modules/@ark-ui/react/dist/components/number-input/use-number-input.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-root-provider.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-scrubber.js","../../node_modules/@ark-ui/react/dist/components/number-input/number-input-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/number-input/number-input.js","../../src/components/NumberInput/numberInput.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [NumberInputProvider, useNumberInputContext] = createContext({\n name: \"NumberInputContext\",\n hookName: \"useNumberInputContext\",\n providerName: \"<NumberInputProvider />\"\n});\n\nexport { NumberInputProvider, useNumberInputContext };\n","'use client';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputContext = (props) => props.children(useNumberInputContext());\n\nexport { NumberInputContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputControl = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputControl.displayName = \"NumberInputControl\";\n\nexport { NumberInputControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputDecrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getDecrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputDecrementTrigger.displayName = \"NumberInputDecrementTrigger\";\n\nexport { NumberInputDecrementTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputIncrementTrigger = forwardRef(\n (props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getIncrementTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n }\n);\nNumberInputIncrementTrigger.displayName = \"NumberInputIncrementTrigger\";\n\nexport { NumberInputIncrementTrigger };\n","'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 '../field/use-field-context.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputInput = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nNumberInputInput.displayName = \"NumberInputInput\";\n\nexport { NumberInputInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputLabel = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nNumberInputLabel.displayName = \"NumberInputLabel\";\n\nexport { NumberInputLabel };\n","'use client';\nimport * as numberInput from '@zag-js/number-input';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useNumberInput = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir, locale } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n input: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n required: field?.required,\n invalid: field?.invalid,\n dir,\n locale,\n getRootNode,\n ...props\n };\n const service = useMachine(numberInput.machine, machineProps);\n return numberInput.connect(service, normalizeProps);\n};\n\nexport { useNumberInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useNumberInput } from './use-number-input.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRoot = forwardRef((props, ref) => {\n const [useNumberInputProps, localProps] = createSplitProps()(props, [\n \"allowMouseWheel\",\n \"allowOverflow\",\n \"clampValueOnBlur\",\n \"defaultValue\",\n \"disabled\",\n \"focusInputOnChange\",\n \"form\",\n \"formatOptions\",\n \"id\",\n \"ids\",\n \"inputMode\",\n \"invalid\",\n \"locale\",\n \"max\",\n \"min\",\n \"name\",\n \"onFocusChange\",\n \"onValueChange\",\n \"onValueInvalid\",\n \"pattern\",\n \"readOnly\",\n \"required\",\n \"spinOnPress\",\n \"step\",\n \"translations\",\n \"value\"\n ]);\n const numberInput = useNumberInput(useNumberInputProps);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRoot.displayName = \"NumberInputRoot\";\n\nexport { NumberInputRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { NumberInputProvider } from './use-number-input-context.js';\n\nconst NumberInputRootProvider = forwardRef((props, ref) => {\n const [{ value: numberInput }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(numberInput.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(NumberInputProvider, { value: numberInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nNumberInputRootProvider.displayName = \"NumberInputRootProvider\";\n\nexport { NumberInputRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputScrubber = forwardRef((props, ref) => {\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getScrubberProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nNumberInputScrubber.displayName = \"NumberInputScrubber\";\n\nexport { NumberInputScrubber };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useNumberInputContext } from './use-number-input-context.js';\n\nconst NumberInputValueText = forwardRef((props, ref) => {\n const { children, ...localProps } = props;\n const numberInput = useNumberInputContext();\n const mergedProps = mergeProps(numberInput.getValueTextProps(), localProps);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || numberInput.value });\n});\nNumberInputValueText.displayName = \"NumberInputValueText\";\n\nexport { NumberInputValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { NumberInput } from '@ark-ui/react/number-input';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { ChevronUpIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useNumberInputStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"numberInput\" });\nconst NumberInputRootProvider = withProvider(NumberInput.RootProvider, \"root\", { forwardAsChild: true });\nconst NumberInputRoot = withProvider(NumberInput.Root, \"root\", { forwardAsChild: true });\nconst NumberInputPropsProvider = PropsProvider;\nconst NumberInputLabel = withContext(NumberInput.Label, \"label\", { forwardAsChild: true });\nconst NumberInputInput = withContext(NumberInput.Input, \"input\", { forwardAsChild: true });\nconst NumberInputIncrementTrigger = withContext(NumberInput.IncrementTrigger, \"incrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }\n});\nconst NumberInputDecrementTrigger = withContext(NumberInput.DecrementTrigger, \"decrementTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }\n});\nconst NumberInputControl = withContext(NumberInput.Control, \"control\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(NumberInputIncrementTrigger, {}),\n /* @__PURE__ */ jsx(NumberInputDecrementTrigger, {})\n ] })\n }\n});\nconst NumberInputScrubber = withContext(NumberInput.Scrubber, \"scrubber\", { forwardAsChild: true });\nconst NumberInputValueText = withContext(NumberInput.ValueText, \"valueText\", { forwardAsChild: true });\nconst NumberInputContext = NumberInput.Context;\n\nexport { NumberInputContext, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputPropsProvider, NumberInputRoot, NumberInputRootProvider, NumberInputScrubber, NumberInputValueText, useNumberInputStyles };\n","import React from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport {\n NumberInput as CNumberInput,\n NumberInputRootProps as CNumberInputRootProps,\n NumberInputValueChangeDetails,\n} from '@chakra-ui/react/number-input';\nimport { InputGroup } from '@chakra-ui/react/input-group';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { Icon } from 'components/Icon/icon.component';\n\nexport interface NumberInputProps extends WithFormControlProps, CNumberInputRootProps {\n /** Ref to the number input element. */\n inputRef?: React.Ref<HTMLInputElement | null>;\n /** Left addon element. */\n leftAddon?: React.ReactNode;\n /** Left element inside the input. */\n leftElement?: React.ReactNode;\n /**\n * If true, the input will render a contrasting variant.\n * @default false\n */\n onContrast?: boolean;\n /** Placeholder text for the number input field. */\n placeholder?: string;\n /** Right addon element. */\n rightAddon?: React.ReactNode;\n /** Right element inside the input. */\n rightElement?: React.ReactNode;\n /**\n * If true, the input will show the increment and decrement buttons.\n * @default false\n */\n showControls?: boolean;\n /** Size of the number input.\n * @default md\n */\n size?: FormControlSize;\n /** Data test id for the number input.\n * @default kibble-number-input\n */\n 'data-testid'?: string;\n /** Callback function when the input value changes. */\n onValueChange?: (details: NumberInputValueChangeDetails) => void;\n}\n\nconst NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n disabled = false,\n inputRef,\n leftAddon,\n leftElement,\n onContrast,\n placeholder,\n rightAddon,\n rightElement,\n showControls = false,\n size = 'md',\n value,\n ['data-testid']: dataTestId = 'kibble-number-input',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n return (\n <Box className=\"NumberInput__Wrapper\" position=\"relative\" w=\"100%\">\n <CNumberInput.Root\n className=\"NumberInput\"\n data-testid={dataTestId}\n ref={ref}\n value={value}\n size={size}\n disabled={disabled}\n variant={onContrast ? 'onContrast' : 'default'}\n {...rest}\n >\n <InputGroup\n className=\"NumberInput__InputGroup\"\n data-testid={`${dataTestId}-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 <CNumberInput.Input\n className=\"NumberInput__Input\"\n data-testid={`${dataTestId}-input`}\n ref={inputRef}\n placeholder={placeholder}\n />\n </InputGroup>\n <CNumberInput.Context>\n {(context) => (\n <input\n className=\"NumberInput__HiddenInput\"\n data-testid={`${dataTestId}-hidden-input`}\n type=\"hidden\"\n name=\"amount\"\n value={context.valueAsNumber}\n />\n )}\n </CNumberInput.Context>\n {showControls && (\n <CNumberInput.Control className=\"NumberInput__Control\" data-testid={`${dataTestId}-control`}>\n <CNumberInput.IncrementTrigger\n className=\"NumberInput__IncrementTrigger\"\n data-testid={`${dataTestId}-increment-trigger`}\n >\n <Icon name=\"chevronUp\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.IncrementTrigger>\n <CNumberInput.DecrementTrigger\n className=\"NumberInput__DecrementTrigger\"\n data-testid={`${dataTestId}-decrement-trigger`}\n >\n <Icon name=\"chevronDown\" variant={onContrast ? 'onContrast' : 'default'} />\n </CNumberInput.DecrementTrigger>\n </CNumberInput.Control>\n )}\n </CNumberInput.Root>\n </Box>\n );\n },\n);\n\nNumberInput.displayName = 'NumberInput';\nconst WrappedNumberInput = withFormControl<NumberInputProps>(NumberInput);\n\nexport { WrappedNumberInput as NumberInput };\n"],"names":["NumberInputProvider","useNumberInputContext","createContext","NumberInputContext","props","NumberInputControl","forwardRef","ref","numberInput","mergedProps","mergeProps","jsx","ark","NumberInputDecrementTrigger","NumberInputIncrementTrigger","NumberInputInput","field","useFieldContext","NumberInputLabel","useNumberInput","id","useId","getRootNode","useEnvironmentContext","dir","locale","useLocaleContext","machineProps","service","useMachine","numberInput.machine","numberInput.connect","normalizeProps","NumberInputRoot","useNumberInputProps","localProps","createSplitProps","NumberInputRootProvider","NumberInputScrubber","NumberInputValueText","children","withProvider","withContext","createSlotRecipeContext","NumberInput.RootProvider","NumberInput.Root","NumberInput.Label","NumberInput.Input","NumberInput.IncrementTrigger","ChevronUpIcon","NumberInput.DecrementTrigger","ChevronDownIcon","NumberInput.Control","jsxs","Fragment","NumberInput.Scrubber","NumberInput.ValueText","NumberInput.Context","NumberInput","React","disabled","inputRef","leftAddon","leftElement","onContrast","placeholder","rightAddon","rightElement","showControls","size","value","dataTestId","rest","Box","CNumberInput.Root","InputGroup","CNumberInput.Input","CNumberInput.Context","context","CNumberInput.Control","CNumberInput.IncrementTrigger","Icon","CNumberInput.DecrementTrigger","WrappedNumberInput","withFormControl"],"mappings":";;;;;;;;;;;;AAGA,MAAM,CAACA,GAAqBC,CAAqB,IAAIC,EAAc;AAAA,EACjE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCJKC,IAAqB,CAACC,MAAUA,EAAM,SAASH,EAAqB,CAAE,GCItEI,IAAqBC,EAAW,CAACF,GAAOG,MAAQ;AACpD,QAAMC,IAAcP,EAAuB,GACrCQ,IAAcC,EAAWF,EAAY,gBAAe,GAAIJ,CAAK;AACnE,SAAuBO,gBAAAA,EAAAA,IAAIC,EAAI,KAAK,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC7D,CAAC;AACDF,EAAmB,cAAc;ACLjC,MAAMQ,IAA8BP;AAAA,EAClC,CAACF,GAAOG,MAAQ;AACd,UAAMC,IAAcP,EAAuB,GACrCQ,IAAcC,EAAWF,EAAY,yBAAwB,GAAIJ,CAAK;AAC5E,WAAuBO,gBAAAA,EAAAA,IAAIC,EAAI,QAAQ,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAAA,EAClE;AACA;AACAM,EAA4B,cAAc;ACP1C,MAAMC,IAA8BR;AAAA,EAClC,CAACF,GAAOG,MAAQ;AACd,UAAMC,IAAcP,EAAuB,GACrCQ,IAAcC,EAAWF,EAAY,yBAAwB,GAAIJ,CAAK;AAC5E,WAAuBO,gBAAAA,EAAAA,IAAIC,EAAI,QAAQ,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAAA,EAClE;AACA;AACAO,EAA4B,cAAc;ACN1C,MAAMC,IAAmBT,EAAW,CAACF,GAAOG,MAAQ;AAClD,QAAMC,IAAcP,EAAuB,GACrCQ,IAAcC,EAAWF,EAAY,cAAa,GAAIJ,CAAK,GAC3DY,IAAQC,EAAiB;AAC/B,SA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AAAA,YAC1B,MAAK;AAAA,YACL,MAAK;AAAA,YACL,OAAOO,EAAQ;AAAA,UAAA;AAAA,QAAA,GAGrB;AAAA,QACCV,KACEf,gBAAAA,EAAA,KAAA0B,IAAA,EAAqB,WAAU,wBAAuB,eAAa,GAAGR,CAAU,YAC/E,UAAA;AAAA,UAAA5D,gBAAAA,EAAA;AAAA,YAACqE;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAa,GAAGT,CAAU;AAAA,cAE1B,gCAACU,GAAK,EAAA,MAAK,aAAY,SAASjB,IAAa,eAAe,UAAW,CAAA;AAAA,YAAA;AAAA,UACzE;AAAA,UACArD,gBAAAA,EAAA;AAAA,YAACuE;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAa,GAAGX,CAAU;AAAA,cAE1B,gCAACU,GAAK,EAAA,MAAK,eAAc,SAASjB,IAAa,eAAe,UAAW,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAC3E,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAGN;AAEAN,EAAY,cAAc;AACpB,MAAAyB,KAAqBC,EAAkC1B,CAAW;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12]}
@@ -1,6 +1,6 @@
1
1
  import { j as s } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import $, { forwardRef as a, useId as k } from "react";
3
- import { w as A } from "./withFormControl-DW9A6BSL.js";
3
+ import { w as A } from "./withFormControl-DVeqCX53.js";
4
4
  import { c as H } from "./create-slot-recipe-context-D_FXDJGp.js";
5
5
  import { a as O, d as p, b as P, u as V, f as F, g as L, n as q } from "./use-locale-context-DmcfCmf9.js";
6
6
  import { u as f } from "./use-field-context-BoqOeObh.js";
@@ -152,4 +152,4 @@ export {
152
152
  nn as W,
153
153
  tn as p
154
154
  };
155
- //# sourceMappingURL=pinInput.types-bIGh7aUS.js.map
155
+ //# sourceMappingURL=pinInput.types-B0WLZ-4e.js.map