@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,2 +1,2 @@
1
- "use strict";const n=require("./jsx-runtime-BjDatQAs.js"),S=require("./text.component-BDDz5KQP.js"),t=require("./typography-CtiaGoJG.js"),u=require("./config-jChwZPSv.js"),d=require("./create-slot-recipe-context-HXE1VazG.js"),g=require("./v-stack-Bz-79Toq.js"),h=require("./spinner-CBTcw_Tk.js"),b=["root","spinner","label"],f={xs:{spinner:{h:2,w:2},label:{fontSize:"xs"}},sm:{spinner:{h:4,w:4},label:{fontSize:"sm"}},md:{spinner:{h:6,w:6,"--spinner-size":6},label:{fontSize:"md"}},lg:{spinner:{h:8,w:8},label:{fontSize:"lg"}},xl:{spinner:{h:12,w:12},label:{fontSize:"xl"}}},x={accent:{spinner:t.typographyVariantStyles.accent},accentSubtle:{spinner:t.typographyVariantStyles.accentSubtle},brand:{spinner:t.typographyVariantStyles.brand},brandOnContrast:{spinner:t.typographyVariantStyles.brandOnContrast},danger:{spinner:t.typographyVariantStyles.danger},dangerOnContrast:{spinner:t.typographyVariantStyles.dangerOnContrast},default:{spinner:t.typographyVariantStyles.default},info:{spinner:t.typographyVariantStyles.info},interactive:{spinner:t.typographyVariantStyles.interactive},interactiveOnContrast:{spinner:t.typographyVariantStyles.interactiveOnContrast},onContrast:{spinner:t.typographyVariantStyles.onContrast},placeholder:{spinner:t.typographyVariantStyles.placeholder},placeholderOnContrast:{spinner:t.typographyVariantStyles.placeholderOnContrast},subtle:{spinner:t.typographyVariantStyles.subtle},subtleOnContrast:{spinner:t.typographyVariantStyles.subtleOnContrast},success:{spinner:t.typographyVariantStyles.success},warning:{spinner:t.typographyVariantStyles.warning}},V=u.defineSlotRecipe({slots:b,base:{root:{alignItems:"center",justifyContent:"center"}},variants:{variant:x,size:f,fullScreen:{true:{root:{h:"100%",left:0,top:0,position:"absolute",w:"100%",zIndex:"tooltipExtra"}},false:{root:{h:"max-content",w:"max-content"}}},centered:{true:{root:{alignItems:"center",justifyContent:"center",w:"100%"}},false:{root:{alignItems:"flex-start",justifyContent:"flex-start"}}}},defaultVariants:{fullScreen:!1,size:"md",variant:"brand"}}),m=({backdropColor:i="background.alpha.pressed",fullScreen:r=!1,label:s,labelProps:o,size:p="md",variant:l="accent",color:c,centered:y=!0,["data-testid"]:a="kibble-spinner"})=>{const e=d.useSlotRecipe({recipe:V})({variant:l,size:p,fullScreen:r,centered:y});return n.jsxRuntimeExports.jsxs(g.VStack,{className:"Spinner","data-testid":a,css:e.root,...r&&{bg:i},children:[n.jsxRuntimeExports.jsx(h.Spinner,{css:e.spinner,color:c}),s&&n.jsxRuntimeExports.jsx(S.WrappedText,{className:"Spinner__Label","data-testid":`${a}-label`,variant:"subtle",css:e.label,...o,children:s})]})};exports.Spinner=m;
2
- //# sourceMappingURL=spinner.component-Dq6u4vVL.js.map
1
+ "use strict";const n=require("./jsx-runtime-BjDatQAs.js"),S=require("./text.component-D5GpbfNx.js"),t=require("./typography-CtiaGoJG.js"),u=require("./config-jChwZPSv.js"),d=require("./create-slot-recipe-context-HXE1VazG.js"),g=require("./v-stack-Bz-79Toq.js"),h=require("./spinner-CBTcw_Tk.js"),b=["root","spinner","label"],f={xs:{spinner:{h:2,w:2},label:{fontSize:"xs"}},sm:{spinner:{h:4,w:4},label:{fontSize:"sm"}},md:{spinner:{h:6,w:6,"--spinner-size":6},label:{fontSize:"md"}},lg:{spinner:{h:8,w:8},label:{fontSize:"lg"}},xl:{spinner:{h:12,w:12},label:{fontSize:"xl"}}},x={accent:{spinner:t.typographyVariantStyles.accent},accentSubtle:{spinner:t.typographyVariantStyles.accentSubtle},brand:{spinner:t.typographyVariantStyles.brand},brandOnContrast:{spinner:t.typographyVariantStyles.brandOnContrast},danger:{spinner:t.typographyVariantStyles.danger},dangerOnContrast:{spinner:t.typographyVariantStyles.dangerOnContrast},default:{spinner:t.typographyVariantStyles.default},info:{spinner:t.typographyVariantStyles.info},interactive:{spinner:t.typographyVariantStyles.interactive},interactiveOnContrast:{spinner:t.typographyVariantStyles.interactiveOnContrast},onContrast:{spinner:t.typographyVariantStyles.onContrast},placeholder:{spinner:t.typographyVariantStyles.placeholder},placeholderOnContrast:{spinner:t.typographyVariantStyles.placeholderOnContrast},subtle:{spinner:t.typographyVariantStyles.subtle},subtleOnContrast:{spinner:t.typographyVariantStyles.subtleOnContrast},success:{spinner:t.typographyVariantStyles.success},warning:{spinner:t.typographyVariantStyles.warning}},V=u.defineSlotRecipe({slots:b,base:{root:{alignItems:"center",justifyContent:"center"}},variants:{variant:x,size:f,fullScreen:{true:{root:{h:"100%",left:0,top:0,position:"absolute",w:"100%",zIndex:"tooltipExtra"}},false:{root:{h:"max-content",w:"max-content"}}},centered:{true:{root:{alignItems:"center",justifyContent:"center",w:"100%"}},false:{root:{alignItems:"flex-start",justifyContent:"flex-start"}}}},defaultVariants:{fullScreen:!1,size:"md",variant:"brand"}}),m=({backdropColor:i="background.alpha.pressed",fullScreen:r=!1,label:s,labelProps:o,size:p="md",variant:l="accent",color:c,centered:y=!0,["data-testid"]:a="kibble-spinner"})=>{const e=d.useSlotRecipe({recipe:V})({variant:l,size:p,fullScreen:r,centered:y});return n.jsxRuntimeExports.jsxs(g.VStack,{className:"Spinner","data-testid":a,css:e.root,...r&&{bg:i},children:[n.jsxRuntimeExports.jsx(h.Spinner,{css:e.spinner,color:c}),s&&n.jsxRuntimeExports.jsx(S.WrappedText,{className:"Spinner__Label","data-testid":`${a}-label`,variant:"subtle",css:e.label,...o,children:s})]})};exports.Spinner=m;
2
+ //# sourceMappingURL=spinner.component-0tE7mnxi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.component-Dq6u4vVL.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { SpinnerSize } from './spinner.types';\nimport { TypographyVariant } from 'shared/types';\nimport { typographyVariantStyles } from '../../shared/records/typography';\n\nconst spinnerSlots = ['root', 'spinner', 'label'] as const;\ntype SpinnerSlot = (typeof spinnerSlots)[number];\ntype SpinnerSlotStyles = {\n [key in SpinnerSlot]?: SystemStyleObject;\n};\n\nconst spinnerSizeStyles: Record<SpinnerSize, SpinnerSlotStyles> = {\n xs: {\n spinner: {\n h: 2,\n w: 2,\n },\n label: {\n fontSize: 'xs',\n },\n },\n sm: {\n spinner: {\n h: 4,\n w: 4,\n },\n label: {\n fontSize: 'sm',\n },\n },\n md: {\n spinner: {\n h: 6,\n w: 6,\n '--spinner-size': 6,\n },\n label: {\n fontSize: 'md',\n },\n },\n lg: {\n spinner: {\n h: 8,\n w: 8,\n },\n label: {\n fontSize: 'lg',\n },\n },\n xl: {\n spinner: {\n h: 12,\n w: 12,\n },\n label: {\n fontSize: 'xl',\n },\n },\n};\n\nconst spinnerVariantStyles: Record<TypographyVariant, SpinnerSlotStyles> = {\n accent: {\n spinner: typographyVariantStyles.accent,\n },\n accentSubtle: {\n spinner: typographyVariantStyles.accentSubtle,\n },\n brand: {\n spinner: typographyVariantStyles.brand,\n },\n brandOnContrast: {\n spinner: typographyVariantStyles.brandOnContrast,\n },\n danger: {\n spinner: typographyVariantStyles.danger,\n },\n dangerOnContrast: {\n spinner: typographyVariantStyles.dangerOnContrast,\n },\n default: {\n spinner: typographyVariantStyles.default,\n },\n info: {\n spinner: typographyVariantStyles.info,\n },\n interactive: {\n spinner: typographyVariantStyles.interactive,\n },\n interactiveOnContrast: {\n spinner: typographyVariantStyles.interactiveOnContrast,\n },\n onContrast: {\n spinner: typographyVariantStyles.onContrast,\n },\n placeholder: {\n spinner: typographyVariantStyles.placeholder,\n },\n placeholderOnContrast: {\n spinner: typographyVariantStyles.placeholderOnContrast,\n },\n subtle: {\n spinner: typographyVariantStyles.subtle,\n },\n subtleOnContrast: {\n spinner: typographyVariantStyles.subtleOnContrast,\n },\n success: {\n spinner: typographyVariantStyles.success,\n },\n warning: {\n spinner: typographyVariantStyles.warning,\n },\n};\n\nexport const spinnerRecipe = defineSlotRecipe({\n slots: spinnerSlots,\n base: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n },\n variants: {\n variant: spinnerVariantStyles,\n size: spinnerSizeStyles,\n fullScreen: {\n true: {\n root: {\n h: '100%',\n left: 0,\n top: 0,\n position: 'absolute',\n w: '100%',\n zIndex: 'tooltipExtra',\n },\n },\n false: {\n root: {\n h: 'max-content',\n w: 'max-content',\n },\n },\n },\n centered: {\n true: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n w: '100%',\n },\n },\n false: {\n root: {\n alignItems: 'flex-start',\n justifyContent: 'flex-start',\n },\n },\n },\n },\n defaultVariants: {\n fullScreen: false,\n size: 'md',\n variant: 'brand',\n },\n});\n","import React from 'react';\nimport { Spinner as CSpinner } from '@chakra-ui/react/spinner';\nimport { VStack } from '@chakra-ui/react/stack';\nimport { SpinnerSize } from './spinner.types';\nimport { Text, TextProps } from 'components/Text/text.component';\nimport { TypographyVariant } from 'shared/types';\nimport { useSlotRecipe } from '@chakra-ui/react';\nimport { spinnerRecipe } from './spinner.recipe';\nimport { SemanticBackgroundColorToken } from 'theme/semanticTokens';\n\nexport interface SpinnerProps {\n /**\n * The background color for the full size spinner.\n * @default background.alpha.pressed\n */\n backdropColor?: SemanticBackgroundColorToken;\n /**\n * Whether the spinner should cover the entire screen.\n * @default false\n */\n fullScreen?: boolean;\n /** Optional label to display below the spinner. */\n label?: string;\n /** Props to customize the label of the spinner. See `Text` for more information. */\n labelProps?: Omit<TextProps, 'chilren'>;\n /** The size of the spinner. */\n size?: SpinnerSize;\n /**\n * The color variant of the spinner.\n * @default brand\n */\n variant?: TypographyVariant;\n /** The color of the spinner. If this value is provided, the variant prop will be ignored. */\n color?: string;\n /**\n * Data test id for the spinner.\n * @default kibble-spinner\n */\n 'data-testid'?: string;\n /**\n * Whether the spinner should be centered in the container.\n * @default true\n */\n centered?: boolean;\n}\n\nexport const Spinner = ({\n backdropColor = 'background.alpha.pressed',\n fullScreen = false,\n label,\n labelProps,\n size = 'md',\n variant = 'accent',\n color,\n centered = true,\n ['data-testid']: dataTestId = 'kibble-spinner',\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen, centered });\n\n return (\n <VStack className=\"Spinner\" data-testid={dataTestId} css={styles.root} {...(fullScreen && { bg: backdropColor })}>\n <CSpinner css={styles.spinner} color={color} />\n {label && (\n <Text\n className=\"Spinner__Label\"\n data-testid={`${dataTestId}-label`}\n variant=\"subtle\"\n css={styles.label}\n {...labelProps}\n >\n {label}\n </Text>\n )}\n </VStack>\n );\n};\n"],"names":["spinnerSlots","spinnerSizeStyles","spinnerVariantStyles","typographyVariantStyles","spinnerRecipe","defineSlotRecipe","Spinner","backdropColor","fullScreen","label","labelProps","size","variant","color","centered","dataTestId","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":"wSAKMA,EAAe,CAAC,OAAQ,UAAW,OAAO,EAM1CC,EAA4D,CAChE,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,EACH,iBAAkB,CACpB,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,GACH,EAAG,EACL,EACA,MAAO,CACL,SAAU,IAAA,CACZ,CAEJ,EAEMC,EAAqE,CACzE,OAAQ,CACN,QAASC,EAAAA,wBAAwB,MACnC,EACA,aAAc,CACZ,QAASA,EAAAA,wBAAwB,YACnC,EACA,MAAO,CACL,QAASA,EAAAA,wBAAwB,KACnC,EACA,gBAAiB,CACf,QAASA,EAAAA,wBAAwB,eACnC,EACA,OAAQ,CACN,QAASA,EAAAA,wBAAwB,MACnC,EACA,iBAAkB,CAChB,QAASA,EAAAA,wBAAwB,gBACnC,EACA,QAAS,CACP,QAASA,EAAAA,wBAAwB,OACnC,EACA,KAAM,CACJ,QAASA,EAAAA,wBAAwB,IACnC,EACA,YAAa,CACX,QAASA,EAAAA,wBAAwB,WACnC,EACA,sBAAuB,CACrB,QAASA,EAAAA,wBAAwB,qBACnC,EACA,WAAY,CACV,QAASA,EAAAA,wBAAwB,UACnC,EACA,YAAa,CACX,QAASA,EAAAA,wBAAwB,WACnC,EACA,sBAAuB,CACrB,QAASA,EAAAA,wBAAwB,qBACnC,EACA,OAAQ,CACN,QAASA,EAAAA,wBAAwB,MACnC,EACA,iBAAkB,CAChB,QAASA,EAAAA,wBAAwB,gBACnC,EACA,QAAS,CAC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C1B,QAAQ,SACR,IAAKC,EAAO,MACX,GAAGN,EAEH,SAAAD,CAAA,CAAA,CACH,EAEJ,CAEJ"}
1
+ {"version":3,"file":"spinner.component-0tE7mnxi.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { SpinnerSize } from './spinner.types';\nimport { TypographyVariant } from 'shared/types';\nimport { typographyVariantStyles } from '../../shared/records/typography';\n\nconst spinnerSlots = ['root', 'spinner', 'label'] as const;\ntype SpinnerSlot = (typeof spinnerSlots)[number];\ntype SpinnerSlotStyles = {\n [key in SpinnerSlot]?: SystemStyleObject;\n};\n\nconst spinnerSizeStyles: Record<SpinnerSize, SpinnerSlotStyles> = {\n xs: {\n spinner: {\n h: 2,\n w: 2,\n },\n label: {\n fontSize: 'xs',\n },\n },\n sm: {\n spinner: {\n h: 4,\n w: 4,\n },\n label: {\n fontSize: 'sm',\n },\n },\n md: {\n spinner: {\n h: 6,\n w: 6,\n '--spinner-size': 6,\n },\n label: {\n fontSize: 'md',\n },\n },\n lg: {\n spinner: {\n h: 8,\n w: 8,\n },\n label: {\n fontSize: 'lg',\n },\n },\n xl: {\n spinner: {\n h: 12,\n w: 12,\n },\n label: {\n fontSize: 'xl',\n },\n },\n};\n\nconst spinnerVariantStyles: Record<TypographyVariant, SpinnerSlotStyles> = {\n accent: {\n spinner: typographyVariantStyles.accent,\n },\n accentSubtle: {\n spinner: typographyVariantStyles.accentSubtle,\n },\n brand: {\n spinner: typographyVariantStyles.brand,\n },\n brandOnContrast: {\n spinner: typographyVariantStyles.brandOnContrast,\n },\n danger: {\n spinner: typographyVariantStyles.danger,\n },\n dangerOnContrast: {\n spinner: typographyVariantStyles.dangerOnContrast,\n },\n default: {\n spinner: typographyVariantStyles.default,\n },\n info: {\n spinner: typographyVariantStyles.info,\n },\n interactive: {\n spinner: typographyVariantStyles.interactive,\n },\n interactiveOnContrast: {\n spinner: typographyVariantStyles.interactiveOnContrast,\n },\n onContrast: {\n spinner: typographyVariantStyles.onContrast,\n },\n placeholder: {\n spinner: typographyVariantStyles.placeholder,\n },\n placeholderOnContrast: {\n spinner: typographyVariantStyles.placeholderOnContrast,\n },\n subtle: {\n spinner: typographyVariantStyles.subtle,\n },\n subtleOnContrast: {\n spinner: typographyVariantStyles.subtleOnContrast,\n },\n success: {\n spinner: typographyVariantStyles.success,\n },\n warning: {\n spinner: typographyVariantStyles.warning,\n },\n};\n\nexport const spinnerRecipe = defineSlotRecipe({\n slots: spinnerSlots,\n base: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n },\n variants: {\n variant: spinnerVariantStyles,\n size: spinnerSizeStyles,\n fullScreen: {\n true: {\n root: {\n h: '100%',\n left: 0,\n top: 0,\n position: 'absolute',\n w: '100%',\n zIndex: 'tooltipExtra',\n },\n },\n false: {\n root: {\n h: 'max-content',\n w: 'max-content',\n },\n },\n },\n centered: {\n true: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n w: '100%',\n },\n },\n false: {\n root: {\n alignItems: 'flex-start',\n justifyContent: 'flex-start',\n },\n },\n },\n },\n defaultVariants: {\n fullScreen: false,\n size: 'md',\n variant: 'brand',\n },\n});\n","import React from 'react';\nimport { Spinner as CSpinner } from '@chakra-ui/react/spinner';\nimport { VStack } from '@chakra-ui/react/stack';\nimport { SpinnerSize } from './spinner.types';\nimport { Text, TextProps } from 'components/Text/text.component';\nimport { TypographyVariant } from 'shared/types';\nimport { useSlotRecipe } from '@chakra-ui/react';\nimport { spinnerRecipe } from './spinner.recipe';\nimport { SemanticBackgroundColorToken } from 'theme/semanticTokens';\n\nexport interface SpinnerProps {\n /**\n * The background color for the full size spinner.\n * @default background.alpha.pressed\n */\n backdropColor?: SemanticBackgroundColorToken;\n /**\n * Whether the spinner should cover the entire screen.\n * @default false\n */\n fullScreen?: boolean;\n /** Optional label to display below the spinner. */\n label?: string;\n /** Props to customize the label of the spinner. See `Text` for more information. */\n labelProps?: Omit<TextProps, 'chilren'>;\n /** The size of the spinner. */\n size?: SpinnerSize;\n /**\n * The color variant of the spinner.\n * @default brand\n */\n variant?: TypographyVariant;\n /** The color of the spinner. If this value is provided, the variant prop will be ignored. */\n color?: string;\n /**\n * Data test id for the spinner.\n * @default kibble-spinner\n */\n 'data-testid'?: string;\n /**\n * Whether the spinner should be centered in the container.\n * @default true\n */\n centered?: boolean;\n}\n\nexport const Spinner = ({\n backdropColor = 'background.alpha.pressed',\n fullScreen = false,\n label,\n labelProps,\n size = 'md',\n variant = 'accent',\n color,\n centered = true,\n ['data-testid']: dataTestId = 'kibble-spinner',\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen, centered });\n\n return (\n <VStack className=\"Spinner\" data-testid={dataTestId} css={styles.root} {...(fullScreen && { bg: backdropColor })}>\n <CSpinner css={styles.spinner} color={color} />\n {label && (\n <Text\n className=\"Spinner__Label\"\n data-testid={`${dataTestId}-label`}\n variant=\"subtle\"\n css={styles.label}\n {...labelProps}\n >\n {label}\n </Text>\n )}\n </VStack>\n );\n};\n"],"names":["spinnerSlots","spinnerSizeStyles","spinnerVariantStyles","typographyVariantStyles","spinnerRecipe","defineSlotRecipe","Spinner","backdropColor","fullScreen","label","labelProps","size","variant","color","centered","dataTestId","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":"wSAKMA,EAAe,CAAC,OAAQ,UAAW,OAAO,EAM1CC,EAA4D,CAChE,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,EACH,iBAAkB,CACpB,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,G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,EAAG,cACH,EAAG,aAAA,CACL,CAEJ,EACA,SAAU,CACR,KAAM,CACJ,KAAM,CACJ,WAAY,SACZ,eAAgB,SAChB,EAAG,MAAA,CAEP,EACA,MAAO,CACL,KAAM,CACJ,WAAY,aACZ,eAAgB,YAAA,CAClB,CACF,CAEJ,EACA,gBAAiB,CACf,WAAY,GACZ,KAAM,KACN,QAAS,OAAA,CAEb,CAAC,ECtHYK,EAAU,CAAC,CACtB,cAAAC,EAAgB,2BAChB,WAAAC,EAAa,GACb,MAAAC,EACA,WAAAC,EACA,KAAAC,EAAO,KACP,QAAAC,EAAU,SACV,MAAAC,EACA,SAAAC,EAAW,GACX,CAAC,eAAgBC,EAAa,gBAChC,IAAuC,CAErC,MAAMC,EADSC,EAAA,cAAc,CAAE,OAAQb,EAAe,EAChC,CAAE,QAAAQ,EAAS,KAAAD,EAAM,WAAAH,EAAY,SAAAM,EAAU,EAE7D,OACGI,EAAAA,kBAAAA,KAAAC,EAAAA,OAAA,CAAO,UAAU,UAAU,cAAaJ,EAAY,IAAKC,EAAO,KAAO,GAAIR,GAAc,CAAE,GAAID,CAC9F,EAAA,SAAA,CAAAa,EAAA,kBAAA,IAACC,EAAS,QAAA,CAAA,IAAKL,EAAO,QAAS,MAAAH,EAAc,EAC5CJ,GACCW,EAAA,kBAAA,IAACE,EAAA,YAAA,CACC,UAAU,iBACV,cAAa,GAAGP,CAAU,SAC1B,QAAQ,SACR,IAAKC,EAAO,MACX,GAAGN,EAEH,SAAAD,CAAA,CAAA,CACH,EAEJ,CAEJ"}
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
- import { W as f } from "./text.component-DhuUgP3j.js";
2
+ import { W as f } from "./text.component-C9jh_JMO.js";
3
3
  import { t as n } from "./typography-Cqrokog3.js";
4
4
  import { d as m } from "./config-Djkl1N81.js";
5
5
  import { u as b } from "./create-slot-recipe-context-D_FXDJGp.js";
@@ -184,4 +184,4 @@ const x = ["root", "spinner", "label"], h = {
184
184
  export {
185
185
  k as S
186
186
  };
187
- //# sourceMappingURL=spinner.component-CNHQ8UDz.js.map
187
+ //# sourceMappingURL=spinner.component-CQ-JWUon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.component-CNHQ8UDz.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { SpinnerSize } from './spinner.types';\nimport { TypographyVariant } from 'shared/types';\nimport { typographyVariantStyles } from '../../shared/records/typography';\n\nconst spinnerSlots = ['root', 'spinner', 'label'] as const;\ntype SpinnerSlot = (typeof spinnerSlots)[number];\ntype SpinnerSlotStyles = {\n [key in SpinnerSlot]?: SystemStyleObject;\n};\n\nconst spinnerSizeStyles: Record<SpinnerSize, SpinnerSlotStyles> = {\n xs: {\n spinner: {\n h: 2,\n w: 2,\n },\n label: {\n fontSize: 'xs',\n },\n },\n sm: {\n spinner: {\n h: 4,\n w: 4,\n },\n label: {\n fontSize: 'sm',\n },\n },\n md: {\n spinner: {\n h: 6,\n w: 6,\n '--spinner-size': 6,\n },\n label: {\n fontSize: 'md',\n },\n },\n lg: {\n spinner: {\n h: 8,\n w: 8,\n },\n label: {\n fontSize: 'lg',\n },\n },\n xl: {\n spinner: {\n h: 12,\n w: 12,\n },\n label: {\n fontSize: 'xl',\n },\n },\n};\n\nconst spinnerVariantStyles: Record<TypographyVariant, SpinnerSlotStyles> = {\n accent: {\n spinner: typographyVariantStyles.accent,\n },\n accentSubtle: {\n spinner: typographyVariantStyles.accentSubtle,\n },\n brand: {\n spinner: typographyVariantStyles.brand,\n },\n brandOnContrast: {\n spinner: typographyVariantStyles.brandOnContrast,\n },\n danger: {\n spinner: typographyVariantStyles.danger,\n },\n dangerOnContrast: {\n spinner: typographyVariantStyles.dangerOnContrast,\n },\n default: {\n spinner: typographyVariantStyles.default,\n },\n info: {\n spinner: typographyVariantStyles.info,\n },\n interactive: {\n spinner: typographyVariantStyles.interactive,\n },\n interactiveOnContrast: {\n spinner: typographyVariantStyles.interactiveOnContrast,\n },\n onContrast: {\n spinner: typographyVariantStyles.onContrast,\n },\n placeholder: {\n spinner: typographyVariantStyles.placeholder,\n },\n placeholderOnContrast: {\n spinner: typographyVariantStyles.placeholderOnContrast,\n },\n subtle: {\n spinner: typographyVariantStyles.subtle,\n },\n subtleOnContrast: {\n spinner: typographyVariantStyles.subtleOnContrast,\n },\n success: {\n spinner: typographyVariantStyles.success,\n },\n warning: {\n spinner: typographyVariantStyles.warning,\n },\n};\n\nexport const spinnerRecipe = defineSlotRecipe({\n slots: spinnerSlots,\n base: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n },\n variants: {\n variant: spinnerVariantStyles,\n size: spinnerSizeStyles,\n fullScreen: {\n true: {\n root: {\n h: '100%',\n left: 0,\n top: 0,\n position: 'absolute',\n w: '100%',\n zIndex: 'tooltipExtra',\n },\n },\n false: {\n root: {\n h: 'max-content',\n w: 'max-content',\n },\n },\n },\n centered: {\n true: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n w: '100%',\n },\n },\n false: {\n root: {\n alignItems: 'flex-start',\n justifyContent: 'flex-start',\n },\n },\n },\n },\n defaultVariants: {\n fullScreen: false,\n size: 'md',\n variant: 'brand',\n },\n});\n","import React from 'react';\nimport { Spinner as CSpinner } from '@chakra-ui/react/spinner';\nimport { VStack } from '@chakra-ui/react/stack';\nimport { SpinnerSize } from './spinner.types';\nimport { Text, TextProps } from 'components/Text/text.component';\nimport { TypographyVariant } from 'shared/types';\nimport { useSlotRecipe } from '@chakra-ui/react';\nimport { spinnerRecipe } from './spinner.recipe';\nimport { SemanticBackgroundColorToken } from 'theme/semanticTokens';\n\nexport interface SpinnerProps {\n /**\n * The background color for the full size spinner.\n * @default background.alpha.pressed\n */\n backdropColor?: SemanticBackgroundColorToken;\n /**\n * Whether the spinner should cover the entire screen.\n * @default false\n */\n fullScreen?: boolean;\n /** Optional label to display below the spinner. */\n label?: string;\n /** Props to customize the label of the spinner. See `Text` for more information. */\n labelProps?: Omit<TextProps, 'chilren'>;\n /** The size of the spinner. */\n size?: SpinnerSize;\n /**\n * The color variant of the spinner.\n * @default brand\n */\n variant?: TypographyVariant;\n /** The color of the spinner. If this value is provided, the variant prop will be ignored. */\n color?: string;\n /**\n * Data test id for the spinner.\n * @default kibble-spinner\n */\n 'data-testid'?: string;\n /**\n * Whether the spinner should be centered in the container.\n * @default true\n */\n centered?: boolean;\n}\n\nexport const Spinner = ({\n backdropColor = 'background.alpha.pressed',\n fullScreen = false,\n label,\n labelProps,\n size = 'md',\n variant = 'accent',\n color,\n centered = true,\n ['data-testid']: dataTestId = 'kibble-spinner',\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen, centered });\n\n return (\n <VStack className=\"Spinner\" data-testid={dataTestId} css={styles.root} {...(fullScreen && { bg: backdropColor })}>\n <CSpinner css={styles.spinner} color={color} />\n {label && (\n <Text\n className=\"Spinner__Label\"\n data-testid={`${dataTestId}-label`}\n variant=\"subtle\"\n css={styles.label}\n {...labelProps}\n >\n {label}\n </Text>\n )}\n </VStack>\n );\n};\n"],"names":["spinnerSlots","spinnerSizeStyles","spinnerVariantStyles","typographyVariantStyles","spinnerRecipe","defineSlotRecipe","Spinner","backdropColor","fullScreen","label","labelProps","size","variant","color","centered","dataTestId","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":";;;;;;;AAKA,MAAMA,IAAe,CAAC,QAAQ,WAAW,OAAO,GAM1CC,IAA4D;AAAA,EAChE,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAA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IAAW;AAAA,EACX,CAAC,gBAAgBC,IAAa;AAChC,MAAuC;AAErC,QAAMC,IADSC,EAAc,EAAE,QAAQb,GAAe,EAChC,EAAE,SAAAQ,GAAS,MAAAD,GAAM,YAAAH,GAAY,UAAAM,GAAU;AAE7D,SACGI,gBAAAA,EAAAA,KAAAC,GAAA,EAAO,WAAU,WAAU,eAAaJ,GAAY,KAAKC,EAAO,MAAO,GAAIR,KAAc,EAAE,IAAID,EAC9F,GAAA,UAAA;AAAA,IAAAa,gBAAAA,EAAA,IAACC,GAAS,EAAA,KAAKL,EAAO,SAAS,OAAAH,GAAc;AAAA,IAC5CJ,KACCW,gBAAAA,EAAA;AAAA,MAACE;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAa,GAAGP,CAAU;AAAA,QAC1B,SAAQ;AAAA,QACR,KAAKC,EAAO;AAAA,QACX,GAAGN;AAAA,QAEH,UAAAD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"spinner.component-CQ-JWUon.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import { defineSlotRecipe, SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { SpinnerSize } from './spinner.types';\nimport { TypographyVariant } from 'shared/types';\nimport { typographyVariantStyles } from '../../shared/records/typography';\n\nconst spinnerSlots = ['root', 'spinner', 'label'] as const;\ntype SpinnerSlot = (typeof spinnerSlots)[number];\ntype SpinnerSlotStyles = {\n [key in SpinnerSlot]?: SystemStyleObject;\n};\n\nconst spinnerSizeStyles: Record<SpinnerSize, SpinnerSlotStyles> = {\n xs: {\n spinner: {\n h: 2,\n w: 2,\n },\n label: {\n fontSize: 'xs',\n },\n },\n sm: {\n spinner: {\n h: 4,\n w: 4,\n },\n label: {\n fontSize: 'sm',\n },\n },\n md: {\n spinner: {\n h: 6,\n w: 6,\n '--spinner-size': 6,\n },\n label: {\n fontSize: 'md',\n },\n },\n lg: {\n spinner: {\n h: 8,\n w: 8,\n },\n label: {\n fontSize: 'lg',\n },\n },\n xl: {\n spinner: {\n h: 12,\n w: 12,\n },\n label: {\n fontSize: 'xl',\n },\n },\n};\n\nconst spinnerVariantStyles: Record<TypographyVariant, SpinnerSlotStyles> = {\n accent: {\n spinner: typographyVariantStyles.accent,\n },\n accentSubtle: {\n spinner: typographyVariantStyles.accentSubtle,\n },\n brand: {\n spinner: typographyVariantStyles.brand,\n },\n brandOnContrast: {\n spinner: typographyVariantStyles.brandOnContrast,\n },\n danger: {\n spinner: typographyVariantStyles.danger,\n },\n dangerOnContrast: {\n spinner: typographyVariantStyles.dangerOnContrast,\n },\n default: {\n spinner: typographyVariantStyles.default,\n },\n info: {\n spinner: typographyVariantStyles.info,\n },\n interactive: {\n spinner: typographyVariantStyles.interactive,\n },\n interactiveOnContrast: {\n spinner: typographyVariantStyles.interactiveOnContrast,\n },\n onContrast: {\n spinner: typographyVariantStyles.onContrast,\n },\n placeholder: {\n spinner: typographyVariantStyles.placeholder,\n },\n placeholderOnContrast: {\n spinner: typographyVariantStyles.placeholderOnContrast,\n },\n subtle: {\n spinner: typographyVariantStyles.subtle,\n },\n subtleOnContrast: {\n spinner: typographyVariantStyles.subtleOnContrast,\n },\n success: {\n spinner: typographyVariantStyles.success,\n },\n warning: {\n spinner: typographyVariantStyles.warning,\n },\n};\n\nexport const spinnerRecipe = defineSlotRecipe({\n slots: spinnerSlots,\n base: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n },\n variants: {\n variant: spinnerVariantStyles,\n size: spinnerSizeStyles,\n fullScreen: {\n true: {\n root: {\n h: '100%',\n left: 0,\n top: 0,\n position: 'absolute',\n w: '100%',\n zIndex: 'tooltipExtra',\n },\n },\n false: {\n root: {\n h: 'max-content',\n w: 'max-content',\n },\n },\n },\n centered: {\n true: {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n w: '100%',\n },\n },\n false: {\n root: {\n alignItems: 'flex-start',\n justifyContent: 'flex-start',\n },\n },\n },\n },\n defaultVariants: {\n fullScreen: false,\n size: 'md',\n variant: 'brand',\n },\n});\n","import React from 'react';\nimport { Spinner as CSpinner } from '@chakra-ui/react/spinner';\nimport { VStack } from '@chakra-ui/react/stack';\nimport { SpinnerSize } from './spinner.types';\nimport { Text, TextProps } from 'components/Text/text.component';\nimport { TypographyVariant } from 'shared/types';\nimport { useSlotRecipe } from '@chakra-ui/react';\nimport { spinnerRecipe } from './spinner.recipe';\nimport { SemanticBackgroundColorToken } from 'theme/semanticTokens';\n\nexport interface SpinnerProps {\n /**\n * The background color for the full size spinner.\n * @default background.alpha.pressed\n */\n backdropColor?: SemanticBackgroundColorToken;\n /**\n * Whether the spinner should cover the entire screen.\n * @default false\n */\n fullScreen?: boolean;\n /** Optional label to display below the spinner. */\n label?: string;\n /** Props to customize the label of the spinner. See `Text` for more information. */\n labelProps?: Omit<TextProps, 'chilren'>;\n /** The size of the spinner. */\n size?: SpinnerSize;\n /**\n * The color variant of the spinner.\n * @default brand\n */\n variant?: TypographyVariant;\n /** The color of the spinner. If this value is provided, the variant prop will be ignored. */\n color?: string;\n /**\n * Data test id for the spinner.\n * @default kibble-spinner\n */\n 'data-testid'?: string;\n /**\n * Whether the spinner should be centered in the container.\n * @default true\n */\n centered?: boolean;\n}\n\nexport const Spinner = ({\n backdropColor = 'background.alpha.pressed',\n fullScreen = false,\n label,\n labelProps,\n size = 'md',\n variant = 'accent',\n color,\n centered = true,\n ['data-testid']: dataTestId = 'kibble-spinner',\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen, centered });\n\n return (\n <VStack className=\"Spinner\" data-testid={dataTestId} css={styles.root} {...(fullScreen && { bg: backdropColor })}>\n <CSpinner css={styles.spinner} color={color} />\n {label && (\n <Text\n className=\"Spinner__Label\"\n data-testid={`${dataTestId}-label`}\n variant=\"subtle\"\n css={styles.label}\n {...labelProps}\n >\n {label}\n </Text>\n )}\n </VStack>\n );\n};\n"],"names":["spinnerSlots","spinnerSizeStyles","spinnerVariantStyles","typographyVariantStyles","spinnerRecipe","defineSlotRecipe","Spinner","backdropColor","fullScreen","label","labelProps","size","variant","color","centered","dataTestId","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":";;;;;;;AAKA,MAAMA,IAAe,CAAC,QAAQ,WAAW,OAAO,GAM1CC,IAA4D;AAAA,EAChE,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,MACH,kBAAkB;AAAA,IACpB;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ,GAEMC,IAAqE;AAAA,EACzE,QAAQ;AAAA,IACN,SAASC,EAAwB;AAAA,EACnC;AAAA,EACA,cAAc;AAAA,IACZ,SAASA,EAAwB;AAAA,EACnC;AAAA,EACA,OAAO;AAAA,IACL,SAASA,EAAwB;AAAA,EACnC;AAAA,EACA,iBAAiB;AAAA,IACf,SAASA,EAAwB;AAAA,EACnC;AAAA,EACA,QA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AA,UACJ,YAAY;AAAA,UACZ,gBAAgB;AAAA,UAChB,GAAG;AAAA,QAAA;AAAA,MAEP;AAAA,MACA,OAAO;AAAA,QACL,MAAM;AAAA,UACJ,YAAY;AAAA,UACZ,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,IACF;AAAA,EAEJ;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb,CAAC,GCtHYK,IAAU,CAAC;AAAA,EACtB,eAAAC,IAAgB;AAAA,EAChB,YAAAC,IAAa;AAAA,EACb,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,CAAC,gBAAgBC,IAAa;AAChC,MAAuC;AAErC,QAAMC,IADSC,EAAc,EAAE,QAAQb,GAAe,EAChC,EAAE,SAAAQ,GAAS,MAAAD,GAAM,YAAAH,GAAY,UAAAM,GAAU;AAE7D,SACGI,gBAAAA,EAAAA,KAAAC,GAAA,EAAO,WAAU,WAAU,eAAaJ,GAAY,KAAKC,EAAO,MAAO,GAAIR,KAAc,EAAE,IAAID,EAC9F,GAAA,UAAA;AAAA,IAAAa,gBAAAA,EAAA,IAACC,GAAS,EAAA,KAAKL,EAAO,SAAS,OAAAH,GAAc;AAAA,IAC5CJ,KACCW,gBAAAA,EAAA;AAAA,MAACE;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAa,GAAGP,CAAU;AAAA,QAC1B,SAAQ;AAAA,QACR,KAAKC,EAAO;AAAA,QACX,GAAGN;AAAA,QAEH,UAAAD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),N=require("./withFormControl-QV_Jridv.js"),w=require("./attr-BMs6szZx.js"),$=require("./create-slot-recipe-context-HXE1VazG.js"),f=require("./factory-a2SJjEvR.js"),i=require("./use-locale-context-ym21RUxU.js"),S=require("./use-field-context-Cm29IQ7H.js"),u=require("./index-CQURjLlA.js"),m=require("./index-DLe40do7.js"),_=t=>t&&t.__esModule?t:{default:t},A=_(c),[R,h]=i.createContext({name:"SwitchContext",hookName:"useSwitchContext",providerName:"<SwitchProvider />"}),C=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getControlProps(),t);return n.jsxRuntimeExports.jsx(i.ark.span,{...s,ref:r})});C.displayName="SwitchControl";const j=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getHiddenInputProps(),t),o=S.useFieldContext();return n.jsxRuntimeExports.jsx(i.ark.input,{"aria-describedby":o?.ariaDescribedby,...s,ref:r})});j.displayName="SwitchHiddenInput";const P=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getLabelProps(),t);return n.jsxRuntimeExports.jsx(i.ark.span,{...s,ref:r})});P.displayName="SwitchLabel";const I=t=>{const r=c.useId(),{getRootNode:e}=i.useEnvironmentContext(),{dir:s}=i.useLocaleContext(),o=S.useFieldContext(),a={id:r,ids:{label:o?.ids.label,hiddenInput:o?.ids.control},dir:s,disabled:o?.disabled,readOnly:o?.readOnly,invalid:o?.invalid,required:o?.required,getRootNode:e,...t},d=i.useMachine(m.machine,a);return m.connect(d,i.normalizeProps)},b=c.forwardRef((t,r)=>{const[e,s]=i.createSplitProps()(t,["checked","defaultChecked","disabled","form","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),o=I(e),a=u.mergeProps(o.getRootProps(),s);return n.jsxRuntimeExports.jsx(R,{value:o,children:n.jsxRuntimeExports.jsx(i.ark.label,{...a,ref:r})})});b.displayName="SwitchRoot";const k=c.forwardRef((t,r)=>{const[{value:e},s]=i.createSplitProps()(t,["value"]),o=u.mergeProps(e.getRootProps(),s);return n.jsxRuntimeExports.jsx(R,{value:e,children:n.jsxRuntimeExports.jsx(i.ark.label,{...o,ref:r})})});k.displayName="SwitchRootProvider";const g=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getThumbProps(),t);return n.jsxRuntimeExports.jsx(i.ark.span,{...s,ref:r})});g.displayName="SwitchThumb";const{withProvider:v,withContext:x,useStyles:L}=$.createSlotRecipeContext({key:"switch"});v(k,"root",{forwardAsChild:!0});const F=v(b,"root",{forwardAsChild:!0}),H=x(P,"label",{forwardAsChild:!0}),O=x(g,"thumb",{forwardAsChild:!0}),M=x(C,"control",{forwardAsChild:!0,defaultProps:{children:n.jsxRuntimeExports.jsx(O,{})}});c.forwardRef(function(r,e){const s=h(),o=L(),{fallback:a,children:d,unstyled:l,...p}=r;return n.jsxRuntimeExports.jsx(f.chakra.span,{ref:e,"data-checked":w.dataAttr(s.checked),...p,css:[l?void 0:o.indicator,r.css],children:s.checked?d:a})});c.forwardRef(function(r,e){const s=h(),{fallback:o,children:a,...d}=r;return n.jsxRuntimeExports.jsx(f.chakra.span,{ref:e,"data-checked":w.dataAttr(s.checked),...d,children:s.checked?a:o})});const D=j,y=A.default.forwardRef(({children:t,indeterminate:r=!1,onContrast:e,label:s,rootRef:o,size:a="md",switchRef:d,["data-testid"]:l="kibble-switch",...p},E)=>{const q=c.useMemo(()=>r?e?"indeterminateOnContrast":"indeterminate":e?"onContrast":"default",[r,e]);return n.jsxRuntimeExports.jsxs(F,{className:"Switch","data-testid":l,ref:o,size:a,variant:q,...p,children:[n.jsxRuntimeExports.jsx(D,{className:"Switch_Input","data-testid":`${l}-input`,ref:d||E}),n.jsxRuntimeExports.jsx(M,{className:"Switch_Control","data-testid":`${l}-control`}),!!t&&n.jsxRuntimeExports.jsx(H,{"data-testid":`${l}-label`,children:t})]})});y.displayName="Switch";const T=N.withFormControl(y);exports.WrappedSwitch=T;
2
- //# sourceMappingURL=switch.component-BYEMhBCA.js.map
1
+ "use strict";const n=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),N=require("./withFormControl-d2CEvsH2.js"),w=require("./attr-BMs6szZx.js"),$=require("./create-slot-recipe-context-HXE1VazG.js"),f=require("./factory-a2SJjEvR.js"),i=require("./use-locale-context-ym21RUxU.js"),S=require("./use-field-context-Cm29IQ7H.js"),u=require("./index-CQURjLlA.js"),m=require("./index-DLe40do7.js"),_=t=>t&&t.__esModule?t:{default:t},A=_(c),[R,h]=i.createContext({name:"SwitchContext",hookName:"useSwitchContext",providerName:"<SwitchProvider />"}),C=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getControlProps(),t);return n.jsxRuntimeExports.jsx(i.ark.span,{...s,ref:r})});C.displayName="SwitchControl";const j=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getHiddenInputProps(),t),o=S.useFieldContext();return n.jsxRuntimeExports.jsx(i.ark.input,{"aria-describedby":o?.ariaDescribedby,...s,ref:r})});j.displayName="SwitchHiddenInput";const P=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getLabelProps(),t);return n.jsxRuntimeExports.jsx(i.ark.span,{...s,ref:r})});P.displayName="SwitchLabel";const I=t=>{const r=c.useId(),{getRootNode:e}=i.useEnvironmentContext(),{dir:s}=i.useLocaleContext(),o=S.useFieldContext(),a={id:r,ids:{label:o?.ids.label,hiddenInput:o?.ids.control},dir:s,disabled:o?.disabled,readOnly:o?.readOnly,invalid:o?.invalid,required:o?.required,getRootNode:e,...t},d=i.useMachine(m.machine,a);return m.connect(d,i.normalizeProps)},b=c.forwardRef((t,r)=>{const[e,s]=i.createSplitProps()(t,["checked","defaultChecked","disabled","form","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),o=I(e),a=u.mergeProps(o.getRootProps(),s);return n.jsxRuntimeExports.jsx(R,{value:o,children:n.jsxRuntimeExports.jsx(i.ark.label,{...a,ref:r})})});b.displayName="SwitchRoot";const k=c.forwardRef((t,r)=>{const[{value:e},s]=i.createSplitProps()(t,["value"]),o=u.mergeProps(e.getRootProps(),s);return n.jsxRuntimeExports.jsx(R,{value:e,children:n.jsxRuntimeExports.jsx(i.ark.label,{...o,ref:r})})});k.displayName="SwitchRootProvider";const g=c.forwardRef((t,r)=>{const e=h(),s=u.mergeProps(e.getThumbProps(),t);return n.jsxRuntimeExports.jsx(i.ark.span,{...s,ref:r})});g.displayName="SwitchThumb";const{withProvider:v,withContext:x,useStyles:L}=$.createSlotRecipeContext({key:"switch"});v(k,"root",{forwardAsChild:!0});const F=v(b,"root",{forwardAsChild:!0}),H=x(P,"label",{forwardAsChild:!0}),O=x(g,"thumb",{forwardAsChild:!0}),M=x(C,"control",{forwardAsChild:!0,defaultProps:{children:n.jsxRuntimeExports.jsx(O,{})}});c.forwardRef(function(r,e){const s=h(),o=L(),{fallback:a,children:d,unstyled:l,...p}=r;return n.jsxRuntimeExports.jsx(f.chakra.span,{ref:e,"data-checked":w.dataAttr(s.checked),...p,css:[l?void 0:o.indicator,r.css],children:s.checked?d:a})});c.forwardRef(function(r,e){const s=h(),{fallback:o,children:a,...d}=r;return n.jsxRuntimeExports.jsx(f.chakra.span,{ref:e,"data-checked":w.dataAttr(s.checked),...d,children:s.checked?a:o})});const D=j,y=A.default.forwardRef(({children:t,indeterminate:r=!1,onContrast:e,label:s,rootRef:o,size:a="md",switchRef:d,["data-testid"]:l="kibble-switch",...p},E)=>{const q=c.useMemo(()=>r?e?"indeterminateOnContrast":"indeterminate":e?"onContrast":"default",[r,e]);return n.jsxRuntimeExports.jsxs(F,{className:"Switch","data-testid":l,ref:o,size:a,variant:q,...p,children:[n.jsxRuntimeExports.jsx(D,{className:"Switch_Input","data-testid":`${l}-input`,ref:d||E}),n.jsxRuntimeExports.jsx(M,{className:"Switch_Control","data-testid":`${l}-control`}),!!t&&n.jsxRuntimeExports.jsx(H,{"data-testid":`${l}-label`,children:t})]})});y.displayName="Switch";const T=N.withFormControl(y);exports.WrappedSwitch=T;
2
+ //# sourceMappingURL=switch.component-BKahX4Bw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component-BYEMhBCA.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\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 useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\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 { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\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 { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, unstyled, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [!unstyled ? styles.indicator : void 0, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { useMemo } from 'react';\nimport { Switch as CSwitch } from '@chakra-ui/react/switch';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\n\nexport interface SwitchProps extends WithFormControlProps, Omit<CSwitch.RootProps, 'label' | 'onChange'> {\n /**\n * If true, the switch will be indeterminate. This only affects the switch visually and does not modify the checked property.\n * @default false\n */\n indeterminate?: boolean;\n /** Ref to the switch component. */\n rootRef?: React.Ref<HTMLLabelElement | null>;\n /**\n * Size of the switch.\n * @default md\n */\n size?: FormControlSize;\n /** Ref to the hiddeninput element. */\n switchRef?: React.Ref<HTMLInputElement | null>;\n /**\n * Data test id for the switch.\n * @default kibble-switch\n */\n 'data-testid'?: string;\n}\n\nconst Switch = React.forwardRef<HTMLInputElement, SwitchProps>(\n (\n {\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n rootRef,\n size = 'md',\n switchRef,\n ['data-testid']: dataTestId = 'kibble-switch',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? 'indeterminateOnContrast' : 'indeterminate';\n } else {\n return onContrast ? 'onContrast' : 'default';\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid={dataTestId}\n ref={rootRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput className=\"Switch_Input\" data-testid={`${dataTestId}-input`} ref={switchRef || ref} />\n <CSwitch.Control className=\"Switch_Control\" data-testid={`${dataTestId}-control`} />\n {!!children && <CSwitch.Label data-testid={`${dataTestId}-label`}>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\nconst WrappedSwitch = withFormControl<SwitchProps>(Switch);\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","unstyled","rest","chakra","dataAttr","Switch.HiddenInput","Switch","React","indeterminate","onContrast","label","rootRef","size","switchRef","dataTestId","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","withFormControl"],"mappings":"wbAGM,CAACA,EAAgBC,CAAgB,EAAIC,gBAAc,CACvD,KAAM,gBACN,SAAU,mBACV,aAAc,oBAChB,CAAC,ECAKC,EAAgBC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC/C,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,gBAAe,EAAIF,CAAK,EACrE,OAAuBK,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAC9D,CAAC,EACDH,EAAc,YAAc,gBCJ5B,MAAMS,EAAoBR,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACnD,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,oBAAmB,EAAIF,CAAK,EACnEQ,EAAQC,EAAAA,gBAAiB,EAC/B,OAAuBJ,EAAG,kBAAA,IAACC,MAAI,MAAO,CAAE,mBAAoBE,GAAO,gBAAiB,GAAGL,EAAa,IAAAF,EAAK,CAC3G,CAAC,EACDM,EAAkB,YAAc,oBCPhC,MAAMG,EAAcX,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC7C,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,cAAa,EAAIF,CAAK,EACnE,OAAuBK,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAC9D,CAAC,EACDS,EAAY,YAAc,cCJ1B,MAAMC,EAAaX,GAAU,CAC3B,MAAMY,EAAKC,EAAAA,MAAO,EACZ,CAAE,YAAAC,CAAa,EAAGC,wBAAuB,EACzC,CAAE,IAAAC,CAAK,EAAGC,mBAAkB,EAC5BT,EAAQC,E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OAAuBK,EAAAA,kBAAAA,IAAIwC,EAAAA,OAAO,KAAM,CAAE,IAAA5C,EAAK,eAAgB6C,EAAAA,SAASjB,EAAI,OAAO,EAAG,GAAGe,EAAM,SAAUf,EAAI,QAAUa,EAAWD,EAAU,CAC9I,CAAC,EAED,MAAMlC,EAAoBwC,EClCpBC,EAASC,EAAM,QAAA,WACnB,CACE,CACE,SAAAP,EACA,cAAAQ,EAAgB,GAChB,WAAAC,EAEA,MAAAC,EACA,QAAAC,EACA,KAAAC,EAAO,KACP,UAAAC,EACA,CAAC,eAAgBC,EAAa,gBAC9B,GAAGZ,GAEL3C,IACsB,CAChB,MAAAwD,EAAmBC,EAAAA,QAAQ,IAC3BR,EACKC,EAAa,0BAA4B,gBAEzCA,EAAa,aAAe,UAEpC,CAACD,EAAeC,CAAU,CAAC,EAG5B,OAAAQ,EAAA,kBAAA,KAACC,EAAA,CACC,UAAU,SACV,cAAaJ,EACb,IAAKH,EACL,KAAAC,EACA,QAASG,EACR,GAAGb,EAEJ,SAAA,CAACvC,EAAAA,kBAAAA,IAAAwD,EAAA,CAAoB,UAAU,eAAe,cAAa,GAAGL,CAAU,SAAU,IAAKD,GAAatD,CAAK,CAAA,EACzGI,wBAACyD,EAAA,CAAgB,UAAU,iBAAiB,cAAa,GAAGN,CAAU,WAAY,EACjF,CAAC,CAACd,GAAarC,EAAA,kBAAA,IAAA0D,EAAA,CAAc,cAAa,GAAGP,CAAU,SAAW,SAAAd,CAAS,CAAA,CAAA,CAAA,CAC9E,CAAA,CAGN,EAEAM,EAAO,YAAc,SACf,MAAAgB,EAAgBC,kBAA6BjB,CAAM","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
1
+ {"version":3,"file":"switch.component-BKahX4Bw.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\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 useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\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 { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\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 { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, unstyled, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [!unstyled ? styles.indicator : void 0, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { useMemo } from 'react';\nimport { Switch as CSwitch } from '@chakra-ui/react/switch';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\n\nexport interface SwitchProps extends WithFormControlProps, Omit<CSwitch.RootProps, 'label' | 'onChange'> {\n /**\n * If true, the switch will be indeterminate. This only affects the switch visually and does not modify the checked property.\n * @default false\n */\n indeterminate?: boolean;\n /** Ref to the switch component. */\n rootRef?: React.Ref<HTMLLabelElement | null>;\n /**\n * Size of the switch.\n * @default md\n */\n size?: FormControlSize;\n /** Ref to the hiddeninput element. */\n switchRef?: React.Ref<HTMLInputElement | null>;\n /**\n * Data test id for the switch.\n * @default kibble-switch\n */\n 'data-testid'?: string;\n}\n\nconst Switch = React.forwardRef<HTMLInputElement, SwitchProps>(\n (\n {\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n rootRef,\n size = 'md',\n switchRef,\n ['data-testid']: dataTestId = 'kibble-switch',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? 'indeterminateOnContrast' : 'indeterminate';\n } else {\n return onContrast ? 'onContrast' : 'default';\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid={dataTestId}\n ref={rootRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput className=\"Switch_Input\" data-testid={`${dataTestId}-input`} ref={switchRef || ref} />\n <CSwitch.Control className=\"Switch_Control\" data-testid={`${dataTestId}-control`} />\n {!!children && <CSwitch.Label data-testid={`${dataTestId}-label`}>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\nconst WrappedSwitch = withFormControl<SwitchProps>(Switch);\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","unstyled","rest","chakra","dataAttr","Switch.HiddenInput","Switch","React","indeterminate","onContrast","label","rootRef","size","switchRef","dataTestId","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","W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,EAAI,QAAUa,EAAWD,EAAU,CAC9I,CAAC,EAED,MAAMlC,EAAoBwC,EClCpBC,EAASC,EAAM,QAAA,WACnB,CACE,CACE,SAAAP,EACA,cAAAQ,EAAgB,GAChB,WAAAC,EAEA,MAAAC,EACA,QAAAC,EACA,KAAAC,EAAO,KACP,UAAAC,EACA,CAAC,eAAgBC,EAAa,gBAC9B,GAAGZ,GAEL3C,IACsB,CAChB,MAAAwD,EAAmBC,EAAAA,QAAQ,IAC3BR,EACKC,EAAa,0BAA4B,gBAEzCA,EAAa,aAAe,UAEpC,CAACD,EAAeC,CAAU,CAAC,EAG5B,OAAAQ,EAAA,kBAAA,KAACC,EAAA,CACC,UAAU,SACV,cAAaJ,EACb,IAAKH,EACL,KAAAC,EACA,QAASG,EACR,GAAGb,EAEJ,SAAA,CAACvC,EAAAA,kBAAAA,IAAAwD,EAAA,CAAoB,UAAU,eAAe,cAAa,GAAGL,CAAU,SAAU,IAAKD,GAAatD,CAAK,CAAA,EACzGI,wBAACyD,EAAA,CAAgB,UAAU,iBAAiB,cAAa,GAAGN,CAAU,WAAY,EACjF,CAAC,CAACd,GAAarC,EAAA,kBAAA,IAAA0D,EAAA,CAAc,cAAa,GAAGP,CAAU,SAAW,SAAAd,CAAS,CAAA,CAAA,CAAA,CAC9E,CAAA,CAGN,EAEAM,EAAO,YAAc,SACf,MAAAgB,EAAgBC,kBAA6BjB,CAAM","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
@@ -1,6 +1,6 @@
1
1
  import { j as c } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import A, { forwardRef as n, useId as I, useMemo as L } from "react";
3
- import { w as _ } from "./withFormControl-DW9A6BSL.js";
3
+ import { w as _ } from "./withFormControl-DVeqCX53.js";
4
4
  import { d as w } from "./attr-sm10PXOd.js";
5
5
  import { c as H } from "./create-slot-recipe-context-D_FXDJGp.js";
6
6
  import { c as S } from "./factory-BQshv7_b.js";
@@ -152,4 +152,4 @@ const ct = _(N);
152
152
  export {
153
153
  ct as W
154
154
  };
155
- //# sourceMappingURL=switch.component-DjN67nap.js.map
155
+ //# sourceMappingURL=switch.component-WMd5cinZ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component-DjN67nap.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\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 useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\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 { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\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 { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, unstyled, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [!unstyled ? styles.indicator : void 0, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { useMemo } from 'react';\nimport { Switch as CSwitch } from '@chakra-ui/react/switch';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\n\nexport interface SwitchProps extends WithFormControlProps, Omit<CSwitch.RootProps, 'label' | 'onChange'> {\n /**\n * If true, the switch will be indeterminate. This only affects the switch visually and does not modify the checked property.\n * @default false\n */\n indeterminate?: boolean;\n /** Ref to the switch component. */\n rootRef?: React.Ref<HTMLLabelElement | null>;\n /**\n * Size of the switch.\n * @default md\n */\n size?: FormControlSize;\n /** Ref to the hiddeninput element. */\n switchRef?: React.Ref<HTMLInputElement | null>;\n /**\n * Data test id for the switch.\n * @default kibble-switch\n */\n 'data-testid'?: string;\n}\n\nconst Switch = React.forwardRef<HTMLInputElement, SwitchProps>(\n (\n {\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n rootRef,\n size = 'md',\n switchRef,\n ['data-testid']: dataTestId = 'kibble-switch',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? 'indeterminateOnContrast' : 'indeterminate';\n } else {\n return onContrast ? 'onContrast' : 'default';\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid={dataTestId}\n ref={rootRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput className=\"Switch_Input\" data-testid={`${dataTestId}-input`} ref={switchRef || ref} />\n <CSwitch.Control className=\"Switch_Control\" data-testid={`${dataTestId}-control`} />\n {!!children && <CSwitch.Label data-testid={`${dataTestId}-label`}>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\nconst WrappedSwitch = withFormControl<SwitchProps>(Switch);\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","unstyled","rest","chakra","dataAttr","Switch.HiddenInput","Switch","React","indeterminate","onContrast","label","rootRef","size","switchRef","dataTestId","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","withFormControl"],"mappings":";;;;;;;;;;AAGA,MAAM,CAACA,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAgBC,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,gBAAe,GAAIF,CAAK;AACrE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC9D,CAAC;AACDH,EAAc,cAAc;ACJ5B,MAAMS,IAAoBR,EAAW,CAACC,GAAOC,MAAQ;AACnD,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,oBAAmB,GAAIF,CAAK,GACnEQ,IAAQC,EAAiB;AAC/B,SAAuBJ,gBAAAA,EAAG,IAACC,EAAI,OAAO,EAAE,oBAAoBE,GAAO,iBAAiB,GAAGL,GAAa,KAAAF,GAAK;AAC3G,CAAC;AACDM,EAAkB,cAAc;ACPhC,MAAMG,IAAcX,EAAW,CAACC,GAAOC,MAAQ;AAC7C,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,cAAa,GAAIF,CAAK;AACnE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC9D,CAAC;AACDS,EAAY,cAAc;ACJ1B,MAAMC,IAAY,C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AAA,EAAgB,WAAU,kBAAiB,eAAa,GAAGN,CAAU,YAAY;AAAA,UACjF,CAAC,CAACd,KAAarC,gBAAAA,EAAA,IAAA0D,GAAA,EAAc,eAAa,GAAGP,CAAU,UAAW,UAAAd,EAAS,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC9E;AAAA,EAAA;AAGN;AAEAM,EAAO,cAAc;AACf,MAAAgB,KAAgBC,EAA6BjB,CAAM;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
1
+ {"version":3,"file":"switch.component-WMd5cinZ.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\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 useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\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 { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\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 { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, unstyled, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [!unstyled ? styles.indicator : void 0, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { useMemo } from 'react';\nimport { Switch as CSwitch } from '@chakra-ui/react/switch';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\n\nexport interface SwitchProps extends WithFormControlProps, Omit<CSwitch.RootProps, 'label' | 'onChange'> {\n /**\n * If true, the switch will be indeterminate. This only affects the switch visually and does not modify the checked property.\n * @default false\n */\n indeterminate?: boolean;\n /** Ref to the switch component. */\n rootRef?: React.Ref<HTMLLabelElement | null>;\n /**\n * Size of the switch.\n * @default md\n */\n size?: FormControlSize;\n /** Ref to the hiddeninput element. */\n switchRef?: React.Ref<HTMLInputElement | null>;\n /**\n * Data test id for the switch.\n * @default kibble-switch\n */\n 'data-testid'?: string;\n}\n\nconst Switch = React.forwardRef<HTMLInputElement, SwitchProps>(\n (\n {\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n rootRef,\n size = 'md',\n switchRef,\n ['data-testid']: dataTestId = 'kibble-switch',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? 'indeterminateOnContrast' : 'indeterminate';\n } else {\n return onContrast ? 'onContrast' : 'default';\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid={dataTestId}\n ref={rootRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput className=\"Switch_Input\" data-testid={`${dataTestId}-input`} ref={switchRef || ref} />\n <CSwitch.Control className=\"Switch_Control\" data-testid={`${dataTestId}-control`} />\n {!!children && <CSwitch.Label data-testid={`${dataTestId}-label`}>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\nconst WrappedSwitch = withFormControl<SwitchProps>(Switch);\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","unstyled","rest","chakra","dataAttr","Switch.HiddenInput","Switch","React","indeterminate","onContrast","label","rootRef","size","switchRef","dataTestId","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","withFormControl"],"mappings":";;;;;;;;;;AAGA,MAAM,CAACA,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAgBC,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,gBAAe,GAAIF,CAAK;AACrE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC9D,CAAC;AACDH,EAAc,cAAc;ACJ5B,MAAMS,IAAoBR,EAAW,CAACC,GAAOC,MAAQ;AACnD,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,oBAAmB,GAAIF,CAAK,GACnEQ,IAAQC,EAAiB;AAC/B,SAAuBJ,gBAAAA,EAAG,IAACC,EAAI,OAAO,EAAE,oBAAoBE,GAAO,iBAAiB,GAAGL,GAAa,KAAAF,GAAK;AAC3G,CAAC;AACDM,EAAkB,cAAc;ACPhC,MAAMG,IAAcX,EAAW,CAACC,GAAOC,MAAQ;AAC7C,QAAMC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AAAA,QACA,SAASG;AAAA,QACR,GAAGb;AAAA,QAEJ,UAAA;AAAA,UAACvC,gBAAAA,EAAAA,IAAAwD,GAAA,EAAoB,WAAU,gBAAe,eAAa,GAAGL,CAAU,UAAU,KAAKD,KAAatD,EAAK,CAAA;AAAA,UACzGI,gBAAAA,MAACyD,GAAA,EAAgB,WAAU,kBAAiB,eAAa,GAAGN,CAAU,YAAY;AAAA,UACjF,CAAC,CAACd,KAAarC,gBAAAA,EAAA,IAAA0D,GAAA,EAAc,eAAa,GAAGP,CAAU,UAAW,UAAAd,EAAS,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC9E;AAAA,EAAA;AAGN;AAEAM,EAAO,cAAc;AACf,MAAAgB,KAAgBC,EAA6BjB,CAAM;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
@@ -1,7 +1,7 @@
1
1
  import { j as c } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { I as L } from "./icon.component-PV_nHBId.js";
3
- import { N as Y } from "./notificationCounter.component-6Q3q8jWj.js";
4
- import { W as G } from "./heading.component-CpSAN3cv.js";
3
+ import { N as Y } from "./notificationCounter.component-DhfVkkOQ.js";
4
+ import { W as G } from "./heading.component-BBTU00_w.js";
5
5
  import { c as J } from "./create-slot-recipe-context-D_FXDJGp.js";
6
6
  import { useState as Q, useEffect as Z, forwardRef as y, useId as ee } from "react";
7
7
  import { a as te, b as x, d as h, e as ae, c as N, u as se, f as oe, g as re, n as ne } from "./use-locale-context-DmcfCmf9.js";
@@ -641,4 +641,4 @@ export {
641
641
  ut as a,
642
642
  lt as t
643
643
  };
644
- //# sourceMappingURL=tab.types-JAJ5Xxff.js.map
644
+ //# sourceMappingURL=tab.types-CTlxVEvQ.js.map