@televet/kibble-ui 4.0.0-beta.63 → 4.0.0-beta.64

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 (191) hide show
  1. package/dist/chunks/{alert.types-QjdV89J8.js → alert.types-BdMaGbwu.js} +3 -3
  2. package/dist/chunks/{alert.types-QjdV89J8.js.map → alert.types-BdMaGbwu.js.map} +1 -1
  3. package/dist/chunks/{alert.types-D-Oi8lzU.js → alert.types-C1GVh2D6.js} +2 -2
  4. package/dist/chunks/{alert.types-D-Oi8lzU.js.map → alert.types-C1GVh2D6.js.map} +1 -1
  5. package/dist/chunks/{avatar.component-DhnsK_Su.js → avatar.component-BKp_pbGA.js} +2 -2
  6. package/dist/chunks/{avatar.component-DhnsK_Su.js.map → avatar.component-BKp_pbGA.js.map} +1 -1
  7. package/dist/chunks/{avatar.component-Bx-G6wRN.js → avatar.component-BRjxOsjQ.js} +2 -2
  8. package/dist/chunks/{avatar.component-Bx-G6wRN.js.map → avatar.component-BRjxOsjQ.js.map} +1 -1
  9. package/dist/chunks/{avatarGroup.component-DQ-llmL4.js → avatarGroup.component-B3cA6J2Z.js} +2 -2
  10. package/dist/chunks/{avatarGroup.component-DQ-llmL4.js.map → avatarGroup.component-B3cA6J2Z.js.map} +1 -1
  11. package/dist/chunks/{avatarGroup.component-BuIOss-r.js → avatarGroup.component-DIfCXmiw.js} +2 -2
  12. package/dist/chunks/{avatarGroup.component-BuIOss-r.js.map → avatarGroup.component-DIfCXmiw.js.map} +1 -1
  13. package/dist/chunks/{buttonGroup.component-CUgf40bo.js → buttonGroup.component-CLTkO5BF.js} +2 -2
  14. package/dist/chunks/{buttonGroup.component-CUgf40bo.js.map → buttonGroup.component-CLTkO5BF.js.map} +1 -1
  15. package/dist/chunks/{buttonGroup.component-BniN5aY0.js → buttonGroup.component-DuNSCwga.js} +2 -2
  16. package/dist/chunks/{buttonGroup.component-BniN5aY0.js.map → buttonGroup.component-DuNSCwga.js.map} +1 -1
  17. package/dist/chunks/{characterCounter.component-0krhcDgO.js → characterCounter.component-BEg4MItI.js} +2 -2
  18. package/dist/chunks/{characterCounter.component-0krhcDgO.js.map → characterCounter.component-BEg4MItI.js.map} +1 -1
  19. package/dist/chunks/{characterCounter.component-C5Ju67wX.js → characterCounter.component-C2e2l-WJ.js} +2 -2
  20. package/dist/chunks/{characterCounter.component-C5Ju67wX.js.map → characterCounter.component-C2e2l-WJ.js.map} +1 -1
  21. package/dist/chunks/{checkbox.component-CanZsQHo.js → checkbox.component-CYpG_LI3.js} +2 -2
  22. package/dist/chunks/{checkbox.component-CanZsQHo.js.map → checkbox.component-CYpG_LI3.js.map} +1 -1
  23. package/dist/chunks/{checkbox.component-D1hf8o_B.js → checkbox.component-Dxvk8exv.js} +3 -3
  24. package/dist/chunks/{checkbox.component-D1hf8o_B.js.map → checkbox.component-Dxvk8exv.js.map} +1 -1
  25. package/dist/chunks/{checkboxGroup.component-yDUy5BQi.js → checkboxGroup.component-CCY-tnlz.js} +3 -3
  26. package/dist/chunks/{checkboxGroup.component-yDUy5BQi.js.map → checkboxGroup.component-CCY-tnlz.js.map} +1 -1
  27. package/dist/chunks/{checkboxGroup.component-CfynWbnU.js → checkboxGroup.component-DXuYKyDD.js} +2 -2
  28. package/dist/chunks/{checkboxGroup.component-CfynWbnU.js.map → checkboxGroup.component-DXuYKyDD.js.map} +1 -1
  29. package/dist/chunks/{conversationCard.component-C5lvyhtU.js → conversationCard.component-BbV9kzvn.js} +2 -2
  30. package/dist/chunks/{conversationCard.component-C5lvyhtU.js.map → conversationCard.component-BbV9kzvn.js.map} +1 -1
  31. package/dist/chunks/{conversationCard.component-E9e_Kl-G.js → conversationCard.component-DvUZFdws.js} +6 -6
  32. package/dist/chunks/{conversationCard.component-E9e_Kl-G.js.map → conversationCard.component-DvUZFdws.js.map} +1 -1
  33. package/dist/chunks/{datePicker.component-DabILO51.js → datePicker.component-CaX-nDYU.js} +2 -2
  34. package/dist/chunks/{datePicker.component-DabILO51.js.map → datePicker.component-CaX-nDYU.js.map} +1 -1
  35. package/dist/chunks/{datePicker.component-Cv88ibpq.js → datePicker.component-CfULnyaz.js} +4 -4
  36. package/dist/chunks/{datePicker.component-Cv88ibpq.js.map → datePicker.component-CfULnyaz.js.map} +1 -1
  37. package/dist/chunks/{heading.component-DZ7kmGcE.js → heading.component-CUa8MRJt.js} +2 -2
  38. package/dist/chunks/{heading.component-DZ7kmGcE.js.map → heading.component-CUa8MRJt.js.map} +1 -1
  39. package/dist/chunks/{heading.component-CcrIqjxB.js → heading.component-Cuqs0DsG.js} +2 -2
  40. package/dist/chunks/{heading.component-CcrIqjxB.js.map → heading.component-Cuqs0DsG.js.map} +1 -1
  41. package/dist/chunks/{menu.component-bdDcCEay.js → menu.component-DuEKWjJe.js} +5 -5
  42. package/dist/chunks/{menu.component-bdDcCEay.js.map → menu.component-DuEKWjJe.js.map} +1 -1
  43. package/dist/chunks/{menu.component-BsIFHOah.js → menu.component-DzEdcGnQ.js} +2 -2
  44. package/dist/chunks/{menu.component-BsIFHOah.js.map → menu.component-DzEdcGnQ.js.map} +1 -1
  45. package/dist/chunks/{modal.types-vrGXh5fF.js → modal.types-Cg8WeIe5.js} +2 -2
  46. package/dist/chunks/{modal.types-vrGXh5fF.js.map → modal.types-Cg8WeIe5.js.map} +1 -1
  47. package/dist/chunks/{modal.types-DYw_hPtT.js → modal.types-SzYLypgs.js} +2 -2
  48. package/dist/chunks/{modal.types-DYw_hPtT.js.map → modal.types-SzYLypgs.js.map} +1 -1
  49. package/dist/chunks/{pinInput.types-DHBICngh.js → pinInput.types-D73AXb6j.js} +2 -2
  50. package/dist/chunks/{pinInput.types-DHBICngh.js.map → pinInput.types-D73AXb6j.js.map} +1 -1
  51. package/dist/chunks/{pinInput.types-jvCDRIOC.js → pinInput.types-DzJ8G-cv.js} +2 -2
  52. package/dist/chunks/{pinInput.types-jvCDRIOC.js.map → pinInput.types-DzJ8G-cv.js.map} +1 -1
  53. package/dist/chunks/{popover.component-BmB0qwpj.js → popover.component-BNH2Qyh6.js} +3 -3
  54. package/dist/chunks/{popover.component-BmB0qwpj.js.map → popover.component-BNH2Qyh6.js.map} +1 -1
  55. package/dist/chunks/{popover.component-DUX4fJNk.js → popover.component-DXcu1TE5.js} +2 -2
  56. package/dist/chunks/{popover.component-DUX4fJNk.js.map → popover.component-DXcu1TE5.js.map} +1 -1
  57. package/dist/chunks/{radioGroup.component-BhR1aKj7.js → radioGroup.component-6Sb4sfkk.js} +2 -2
  58. package/dist/chunks/{radioGroup.component-BhR1aKj7.js.map → radioGroup.component-6Sb4sfkk.js.map} +1 -1
  59. package/dist/chunks/{radioGroup.component-CyJiJHx5.js → radioGroup.component-Dy-hsu8-.js} +4 -4
  60. package/dist/chunks/{radioGroup.component-CyJiJHx5.js.map → radioGroup.component-Dy-hsu8-.js.map} +1 -1
  61. package/dist/chunks/{ratingDots.component-BKUKL6Mz.js → ratingDots.component-DMe19wON.js} +2 -2
  62. package/dist/chunks/{ratingDots.component-BKUKL6Mz.js.map → ratingDots.component-DMe19wON.js.map} +1 -1
  63. package/dist/chunks/{ratingDots.component-HUIKoSFb.js → ratingDots.component-k9LJL9Eu.js} +3 -3
  64. package/dist/chunks/{ratingDots.component-HUIKoSFb.js.map → ratingDots.component-k9LJL9Eu.js.map} +1 -1
  65. package/dist/chunks/{select.component-8ukrnBdk.js → select.component-CuiKCzV4.js} +2 -2
  66. package/dist/chunks/{select.component-8ukrnBdk.js.map → select.component-CuiKCzV4.js.map} +1 -1
  67. package/dist/chunks/{select.component-DLt_2xlg.js → select.component-InxmAsNH.js} +5 -5
  68. package/dist/chunks/{select.component-DLt_2xlg.js.map → select.component-InxmAsNH.js.map} +1 -1
  69. package/dist/chunks/{sortableList.component-B_7TyrzG.js → sortableList.component-B9CPjKG7.js} +2 -2
  70. package/dist/chunks/{sortableList.component-B_7TyrzG.js.map → sortableList.component-B9CPjKG7.js.map} +1 -1
  71. package/dist/chunks/{sortableList.component-CR53llzt.js → sortableList.component-CaPRUdXt.js} +2 -2
  72. package/dist/chunks/{sortableList.component-CR53llzt.js.map → sortableList.component-CaPRUdXt.js.map} +1 -1
  73. package/dist/chunks/{spinner.component-DIyDNcWp.js → spinner.component-CWdZsQ1n.js} +2 -2
  74. package/dist/chunks/{spinner.component-DIyDNcWp.js.map → spinner.component-CWdZsQ1n.js.map} +1 -1
  75. package/dist/chunks/{spinner.component-Bir81DbZ.js → spinner.component-DWZ_4aTj.js} +2 -2
  76. package/dist/chunks/{spinner.component-Bir81DbZ.js.map → spinner.component-DWZ_4aTj.js.map} +1 -1
  77. package/dist/chunks/{styledAvatar.types-BjuO516j.js → styledAvatar.types-BXftd-Wf.js} +2 -2
  78. package/dist/chunks/{styledAvatar.types-BjuO516j.js.map → styledAvatar.types-BXftd-Wf.js.map} +1 -1
  79. package/dist/chunks/{styledAvatar.types-CbfoVHIB.js → styledAvatar.types-D4XrEFve.js} +2 -2
  80. package/dist/chunks/{styledAvatar.types-CbfoVHIB.js.map → styledAvatar.types-D4XrEFve.js.map} +1 -1
  81. package/dist/chunks/{switch.component-CPhSaMqG.js → switch.component-Ct8hEoT2.js} +2 -2
  82. package/dist/chunks/{switch.component-CPhSaMqG.js.map → switch.component-Ct8hEoT2.js.map} +1 -1
  83. package/dist/chunks/{switch.component-Dpu_wRns.js → switch.component-vDh8eC0O.js} +2 -2
  84. package/dist/chunks/{switch.component-Dpu_wRns.js.map → switch.component-vDh8eC0O.js.map} +1 -1
  85. package/dist/chunks/{tabs.component-BHGBxzEH.js → tabs.component-CuCzoee6.js} +2 -2
  86. package/dist/chunks/{tabs.component-BHGBxzEH.js.map → tabs.component-CuCzoee6.js.map} +1 -1
  87. package/dist/chunks/{tabs.component-CY9u7o56.js → tabs.component-DDmnq9Yj.js} +2 -2
  88. package/dist/chunks/{tabs.component-CY9u7o56.js.map → tabs.component-DDmnq9Yj.js.map} +1 -1
  89. package/dist/chunks/{tagBlock.component-LnQADvWP.js → tagBlock.component-Cvlqt0tt.js} +2 -2
  90. package/dist/chunks/{tagBlock.component-LnQADvWP.js.map → tagBlock.component-Cvlqt0tt.js.map} +1 -1
  91. package/dist/chunks/{tagBlock.component-3imRPwFH.js → tagBlock.component-LJYc9GiQ.js} +5 -5
  92. package/dist/chunks/{tagBlock.component-3imRPwFH.js.map → tagBlock.component-LJYc9GiQ.js.map} +1 -1
  93. package/dist/chunks/{textInput.component-4YWnSJOZ.js → textInput.component--WvGHJxt.js} +3 -3
  94. package/dist/chunks/{textInput.component-4YWnSJOZ.js.map → textInput.component--WvGHJxt.js.map} +1 -1
  95. package/dist/chunks/{textInput.component-BJ3ija0b.js → textInput.component-HHNykQ9Q.js} +2 -2
  96. package/dist/chunks/{textInput.component-BJ3ija0b.js.map → textInput.component-HHNykQ9Q.js.map} +1 -1
  97. package/dist/chunks/{textarea.component-GhlEwhHu.js → textarea.component--AjIMSc1.js} +3 -3
  98. package/dist/chunks/{textarea.component-GhlEwhHu.js.map → textarea.component--AjIMSc1.js.map} +1 -1
  99. package/dist/chunks/{textarea.component-zej8Yk62.js → textarea.component-FFs6Uln9.js} +2 -2
  100. package/dist/chunks/{textarea.component-zej8Yk62.js.map → textarea.component-FFs6Uln9.js.map} +1 -1
  101. package/dist/chunks/{theme.provider-CkBtkwtf.js → theme.provider-BEb3gD55.js} +2 -2
  102. package/dist/chunks/{theme.provider-CkBtkwtf.js.map → theme.provider-BEb3gD55.js.map} +1 -1
  103. package/dist/chunks/{theme.provider-D_vTiS-g.js → theme.provider-C5Ltz2zj.js} +2 -2
  104. package/dist/chunks/{theme.provider-D_vTiS-g.js.map → theme.provider-C5Ltz2zj.js.map} +1 -1
  105. package/dist/chunks/{timePicker.component-DBzIM9G4.js → timePicker.component-Bah1y2Pc.js} +3 -3
  106. package/dist/chunks/{timePicker.component-DBzIM9G4.js.map → timePicker.component-Bah1y2Pc.js.map} +1 -1
  107. package/dist/chunks/{timePicker.component-C7StGDmo.js → timePicker.component-BxmUXWNg.js} +2 -2
  108. package/dist/chunks/{timePicker.component-C7StGDmo.js.map → timePicker.component-BxmUXWNg.js.map} +1 -1
  109. package/dist/chunks/{timeRange.component-BceK2COI.js → timeRange.component-BhdUqy0y.js} +2 -2
  110. package/dist/chunks/{timeRange.component-BceK2COI.js.map → timeRange.component-BhdUqy0y.js.map} +1 -1
  111. package/dist/chunks/{timeRange.component-CNLSxsSZ.js → timeRange.component-C0ZHjvEa.js} +2 -2
  112. package/dist/chunks/{timeRange.component-CNLSxsSZ.js.map → timeRange.component-C0ZHjvEa.js.map} +1 -1
  113. package/dist/chunks/{timestamp.component-CbhzpqAt.js → timestamp.component-BOksAchA.js} +2 -2
  114. package/dist/chunks/{timestamp.component-CbhzpqAt.js.map → timestamp.component-BOksAchA.js.map} +1 -1
  115. package/dist/chunks/{timestamp.component-DWGPmV_e.js → timestamp.component-DLh53lam.js} +2 -2
  116. package/dist/chunks/{timestamp.component-DWGPmV_e.js.map → timestamp.component-DLh53lam.js.map} +1 -1
  117. package/dist/chunks/{withFormControl-Cb632r_x.js → withFormControl-3s6IRbl0.js} +2 -2
  118. package/dist/chunks/{withFormControl-Cb632r_x.js.map → withFormControl-3s6IRbl0.js.map} +1 -1
  119. package/dist/chunks/{withFormControl-BI8pqhZl.js → withFormControl-DhWavZor.js} +2 -2
  120. package/dist/chunks/{withFormControl-BI8pqhZl.js.map → withFormControl-DhWavZor.js.map} +1 -1
  121. package/dist/chunks/{withTruncation-CDgWfFpO.js → withTruncation-D8W737TN.js} +2 -2
  122. package/dist/chunks/{withTruncation-CDgWfFpO.js.map → withTruncation-D8W737TN.js.map} +1 -1
  123. package/dist/chunks/{withTruncation-XdRr8uDJ.js → withTruncation-nuzHzFsq.js} +2 -2
  124. package/dist/chunks/{withTruncation-XdRr8uDJ.js.map → withTruncation-nuzHzFsq.js.map} +1 -1
  125. package/dist/cjs/components/Alert/index.cjs +1 -1
  126. package/dist/cjs/components/Avatar/index.cjs +1 -1
  127. package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
  128. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  129. package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
  130. package/dist/cjs/components/Checkbox/index.cjs +1 -1
  131. package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
  132. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  133. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  134. package/dist/cjs/components/Heading/index.cjs +1 -1
  135. package/dist/cjs/components/Menu/index.cjs +1 -1
  136. package/dist/cjs/components/Modal/index.cjs +1 -1
  137. package/dist/cjs/components/PinInput/index.cjs +1 -1
  138. package/dist/cjs/components/Popover/index.cjs +1 -1
  139. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  140. package/dist/cjs/components/RatingDots/index.cjs +1 -1
  141. package/dist/cjs/components/Select/index.cjs +1 -1
  142. package/dist/cjs/components/SortableList/index.cjs +1 -1
  143. package/dist/cjs/components/Spinner/index.cjs +1 -1
  144. package/dist/cjs/components/StyledAvatar/index.cjs +1 -1
  145. package/dist/cjs/components/Switch/index.cjs +1 -1
  146. package/dist/cjs/components/Tabs/index.cjs +1 -1
  147. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  148. package/dist/cjs/components/Text/index.cjs +1 -1
  149. package/dist/cjs/components/TextInput/index.cjs +1 -1
  150. package/dist/cjs/components/Textarea/index.cjs +1 -1
  151. package/dist/cjs/components/TimePicker/index.cjs +1 -1
  152. package/dist/cjs/components/TimeRange/index.cjs +1 -1
  153. package/dist/cjs/components/Timestamp/index.cjs +1 -1
  154. package/dist/cjs/components/Tooltip/index.cjs +1 -1
  155. package/dist/cjs/components/index.cjs +1 -1
  156. package/dist/cjs/index.cjs +1 -1
  157. package/dist/cjs/theme/index.cjs +1 -1
  158. package/dist/esm/components/Alert/index.js +1 -1
  159. package/dist/esm/components/Avatar/index.js +1 -1
  160. package/dist/esm/components/AvatarGroup/index.js +1 -1
  161. package/dist/esm/components/ButtonGroup/index.js +1 -1
  162. package/dist/esm/components/CharacterCounter/index.js +1 -1
  163. package/dist/esm/components/Checkbox/index.js +1 -1
  164. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  165. package/dist/esm/components/ConversationCard/index.js +1 -1
  166. package/dist/esm/components/DatePicker/index.js +1 -1
  167. package/dist/esm/components/Heading/index.js +1 -1
  168. package/dist/esm/components/Menu/index.js +1 -1
  169. package/dist/esm/components/Modal/index.js +1 -1
  170. package/dist/esm/components/PinInput/index.js +1 -1
  171. package/dist/esm/components/Popover/index.js +1 -1
  172. package/dist/esm/components/RadioGroup/index.js +1 -1
  173. package/dist/esm/components/RatingDots/index.js +1 -1
  174. package/dist/esm/components/Select/index.js +1 -1
  175. package/dist/esm/components/SortableList/index.js +1 -1
  176. package/dist/esm/components/Spinner/index.js +1 -1
  177. package/dist/esm/components/StyledAvatar/index.js +1 -1
  178. package/dist/esm/components/Switch/index.js +1 -1
  179. package/dist/esm/components/Tabs/index.js +1 -1
  180. package/dist/esm/components/TagBlock/index.js +1 -1
  181. package/dist/esm/components/Text/index.js +1 -1
  182. package/dist/esm/components/TextInput/index.js +1 -1
  183. package/dist/esm/components/Textarea/index.js +1 -1
  184. package/dist/esm/components/TimePicker/index.js +1 -1
  185. package/dist/esm/components/TimeRange/index.js +1 -1
  186. package/dist/esm/components/Timestamp/index.js +1 -1
  187. package/dist/esm/components/Tooltip/index.js +1 -1
  188. package/dist/esm/components/index.js +29 -29
  189. package/dist/esm/index.js +30 -30
  190. package/dist/esm/theme/index.js +1 -1
  191. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./jsx-runtime-BjDatQAs.js"),c=require("./withTruncation-XdRr8uDJ.js"),n=require("./typography-CtiaGoJG.js"),y=require("./config-BFcXpdZo.js"),S=require("./use-slot-recipe-8liupslO.js"),h=require("./v-stack-DxjgpeJ0.js"),u=require("./spinner-BnpL14kK.js"),d=["root","spinner","label"],g={xs:{spinner:{h:3,w:3},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"}}},b={accent:{spinner:n.typographyVariantStyles.accent},accentSubtle:{spinner:n.typographyVariantStyles.accentSubtle},brand:{spinner:n.typographyVariantStyles.brand},brandOnContrast:{spinner:n.typographyVariantStyles.brandOnContrast},danger:{spinner:n.typographyVariantStyles.danger},dangerOnContrast:{spinner:n.typographyVariantStyles.dangerOnContrast},default:{spinner:n.typographyVariantStyles.default},info:{spinner:n.typographyVariantStyles.info},interactive:{spinner:n.typographyVariantStyles.interactive},interactiveOnContrast:{spinner:n.typographyVariantStyles.interactiveOnContrast},onContrast:{spinner:n.typographyVariantStyles.onContrast},placeholder:{spinner:n.typographyVariantStyles.placeholder},placeholderOnContrast:{spinner:n.typographyVariantStyles.placeholderOnContrast},subtle:{spinner:n.typographyVariantStyles.subtle},subtleOnContrast:{spinner:n.typographyVariantStyles.subtleOnContrast},success:{spinner:n.typographyVariantStyles.success},warning:{spinner:n.typographyVariantStyles.warning}},V=y.defineSlotRecipe({slots:d,base:{root:{alignItems:"center",justifyContent:"center"}},variants:{variant:b,size:g,fullScreen:{true:{root:{h:"100%",left:0,top:0,position:"absolute",w:"100%",zIndex:"tooltipExtra"}},false:{root:{h:"max-content",w:"max-content"}}}},defaultVariants:{fullScreen:!1,size:"md",variant:"brand"}}),f=({backdropColor:s="background.alpha.pressed",fullScreen:r=!1,label:a="Loading...",labelProps:i,showLabel:p=!1,size:o="md",variant:l="accent"})=>{const e=S.useSlotRecipe({recipe:V})({variant:l,size:o,fullScreen:r});return t.jsxRuntimeExports.jsxs(h.VStack,{className:"Spinner","data-testid":"kibble-spinner",css:e.root,...r&&{bg:s},children:[t.jsxRuntimeExports.jsx(u.Spinner,{css:e.spinner}),p&&t.jsxRuntimeExports.jsx(c.WrappedText,{className:"Spinner__Label","data-testid":"kibble-spinner-label",variant:"subtle",css:e.label,...i,children:a})]})};exports.Spinner=f;
2
- //# sourceMappingURL=spinner.component-DIyDNcWp.js.map
1
+ "use strict";const t=require("./jsx-runtime-BjDatQAs.js"),c=require("./withTruncation-nuzHzFsq.js"),n=require("./typography-CtiaGoJG.js"),y=require("./config-BFcXpdZo.js"),S=require("./use-slot-recipe-8liupslO.js"),h=require("./v-stack-DxjgpeJ0.js"),u=require("./spinner-BnpL14kK.js"),d=["root","spinner","label"],g={xs:{spinner:{h:3,w:3},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"}}},b={accent:{spinner:n.typographyVariantStyles.accent},accentSubtle:{spinner:n.typographyVariantStyles.accentSubtle},brand:{spinner:n.typographyVariantStyles.brand},brandOnContrast:{spinner:n.typographyVariantStyles.brandOnContrast},danger:{spinner:n.typographyVariantStyles.danger},dangerOnContrast:{spinner:n.typographyVariantStyles.dangerOnContrast},default:{spinner:n.typographyVariantStyles.default},info:{spinner:n.typographyVariantStyles.info},interactive:{spinner:n.typographyVariantStyles.interactive},interactiveOnContrast:{spinner:n.typographyVariantStyles.interactiveOnContrast},onContrast:{spinner:n.typographyVariantStyles.onContrast},placeholder:{spinner:n.typographyVariantStyles.placeholder},placeholderOnContrast:{spinner:n.typographyVariantStyles.placeholderOnContrast},subtle:{spinner:n.typographyVariantStyles.subtle},subtleOnContrast:{spinner:n.typographyVariantStyles.subtleOnContrast},success:{spinner:n.typographyVariantStyles.success},warning:{spinner:n.typographyVariantStyles.warning}},V=y.defineSlotRecipe({slots:d,base:{root:{alignItems:"center",justifyContent:"center"}},variants:{variant:b,size:g,fullScreen:{true:{root:{h:"100%",left:0,top:0,position:"absolute",w:"100%",zIndex:"tooltipExtra"}},false:{root:{h:"max-content",w:"max-content"}}}},defaultVariants:{fullScreen:!1,size:"md",variant:"brand"}}),f=({backdropColor:s="background.alpha.pressed",fullScreen:r=!1,label:a="Loading...",labelProps:i,showLabel:p=!1,size:o="md",variant:l="accent"})=>{const e=S.useSlotRecipe({recipe:V})({variant:l,size:o,fullScreen:r});return t.jsxRuntimeExports.jsxs(h.VStack,{className:"Spinner","data-testid":"kibble-spinner",css:e.root,...r&&{bg:s},children:[t.jsxRuntimeExports.jsx(u.Spinner,{css:e.spinner}),p&&t.jsxRuntimeExports.jsx(c.WrappedText,{className:"Spinner__Label","data-testid":"kibble-spinner-label",variant:"subtle",css:e.label,...i,children:a})]})};exports.Spinner=f;
2
+ //# sourceMappingURL=spinner.component-CWdZsQ1n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.component-DIyDNcWp.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import {\n defineSlotRecipe,\n SystemStyleObject,\n} 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: 3,\n w: 3,\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 },\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 backdropColor?: SemanticBackgroundColorToken;\n fullScreen?: boolean;\n label?: string;\n labelProps?: Omit<TextProps, \"chilren\">;\n showLabel?: boolean;\n size?: SpinnerSize;\n variant?: TypographyVariant;\n}\n\nexport const Spinner = ({\n backdropColor = \"background.alpha.pressed\",\n fullScreen = false,\n label = \"Loading...\",\n labelProps,\n showLabel = false,\n size = \"md\",\n variant = \"accent\",\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen });\n\n return (\n <VStack\n className=\"Spinner\"\n data-testid=\"kibble-spinner\"\n css={styles.root}\n {...(fullScreen && { bg: backdropColor })}\n >\n <CSpinner css={styles.spinner} />\n {showLabel && (\n <Text\n className=\"Spinner__Label\"\n data-testid=\"kibble-spinner-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","showLabel","size","variant","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":"6RAQMA,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,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L,CACF,CAEJ,EACA,gBAAiB,CACf,WAAY,GACZ,KAAM,KACN,QAAS,OAAA,CAEb,CAAC,ECpIYK,EAAU,CAAC,CACtB,cAAAC,EAAgB,2BAChB,WAAAC,EAAa,GACb,MAAAC,EAAQ,aACR,WAAAC,EACA,UAAAC,EAAY,GACZ,KAAAC,EAAO,KACP,QAAAC,EAAU,QACZ,IAAuC,CAErC,MAAMC,EADSC,EAAA,cAAc,CAAE,OAAQX,EAAe,EAChC,CAAE,QAAAS,EAAS,KAAAD,EAAM,WAAAJ,EAAY,EAGjD,OAAAQ,EAAA,kBAAA,KAACC,EAAA,OAAA,CACC,UAAU,UACV,cAAY,iBACZ,IAAKH,EAAO,KACX,GAAIN,GAAc,CAAE,GAAID,CAAc,EAEvC,SAAA,CAACW,EAAAA,kBAAAA,IAAAC,EAAAA,QAAA,CAAS,IAAKL,EAAO,OAAS,CAAA,EAC9BH,GACCO,EAAA,kBAAA,IAACE,EAAA,YAAA,CACC,UAAU,iBACV,cAAY,uBACZ,QAAQ,SACR,IAAKN,EAAO,MACX,GAAGJ,EAEH,SAAAD,CAAA,CAAA,CACH,CAAA,CAEJ,CAEJ"}
1
+ {"version":3,"file":"spinner.component-CWdZsQ1n.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import {\n defineSlotRecipe,\n SystemStyleObject,\n} 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: 3,\n w: 3,\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 },\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 backdropColor?: SemanticBackgroundColorToken;\n fullScreen?: boolean;\n label?: string;\n labelProps?: Omit<TextProps, \"chilren\">;\n showLabel?: boolean;\n size?: SpinnerSize;\n variant?: TypographyVariant;\n}\n\nexport const Spinner = ({\n backdropColor = \"background.alpha.pressed\",\n fullScreen = false,\n label = \"Loading...\",\n labelProps,\n showLabel = false,\n size = \"md\",\n variant = \"accent\",\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen });\n\n return (\n <VStack\n className=\"Spinner\"\n data-testid=\"kibble-spinner\"\n css={styles.root}\n {...(fullScreen && { bg: backdropColor })}\n >\n <CSpinner css={styles.spinner} />\n {showLabel && (\n <Text\n className=\"Spinner__Label\"\n data-testid=\"kibble-spinner-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","showLabel","size","variant","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":"6RAQMA,EAAe,CAAC,OAAQ,UAAW,OAAO,EAM1CC,EAA4D,CAChE,GAAI,CACF,Q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AC5C,MAAOL,EACP,KAAM,CACJ,KAAM,CACJ,WAAY,SACZ,eAAgB,QAAA,CAEpB,EACA,SAAU,CACR,QAASE,EACT,KAAMD,EACN,WAAY,CACV,KAAM,CACJ,KAAM,CACJ,EAAG,OACH,KAAM,EACN,IAAK,EACL,SAAU,WACV,EAAG,OACH,OAAQ,cAAA,CAEZ,EACA,MAAO,CACL,KAAM,CACJ,EAAG,cACH,EAAG,aAAA,CACL,CACF,CAEJ,EACA,gBAAiB,CACf,WAAY,GACZ,KAAM,KACN,QAAS,OAAA,CAEb,CAAC,ECpIYK,EAAU,CAAC,CACtB,cAAAC,EAAgB,2BAChB,WAAAC,EAAa,GACb,MAAAC,EAAQ,aACR,WAAAC,EACA,UAAAC,EAAY,GACZ,KAAAC,EAAO,KACP,QAAAC,EAAU,QACZ,IAAuC,CAErC,MAAMC,EADSC,EAAA,cAAc,CAAE,OAAQX,EAAe,EAChC,CAAE,QAAAS,EAAS,KAAAD,EAAM,WAAAJ,EAAY,EAGjD,OAAAQ,EAAA,kBAAA,KAACC,EAAA,OAAA,CACC,UAAU,UACV,cAAY,iBACZ,IAAKH,EAAO,KACX,GAAIN,GAAc,CAAE,GAAID,CAAc,EAEvC,SAAA,CAACW,EAAAA,kBAAAA,IAAAC,EAAAA,QAAA,CAAS,IAAKL,EAAO,OAAS,CAAA,EAC9BH,GACCO,EAAA,kBAAA,IAACE,EAAA,YAAA,CACC,UAAU,iBACV,cAAY,uBACZ,QAAQ,SACR,IAAKN,EAAO,MACX,GAAGJ,EAEH,SAAAD,CAAA,CAAA,CACH,CAAA,CAEJ,CAEJ"}
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
- import { W as c } from "./withTruncation-CDgWfFpO.js";
2
+ import { W as c } from "./withTruncation-D8W737TN.js";
3
3
  import { t as n } from "./typography-Cqrokog3.js";
4
4
  import { d } from "./config-B1FINd7s.js";
5
5
  import { u as b } from "./use-slot-recipe-DhtQ1j_5.js";
@@ -176,4 +176,4 @@ const S = ["root", "spinner", "label"], u = {
176
176
  export {
177
177
  V as S
178
178
  };
179
- //# sourceMappingURL=spinner.component-Bir81DbZ.js.map
179
+ //# sourceMappingURL=spinner.component-DWZ_4aTj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.component-Bir81DbZ.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import {\n defineSlotRecipe,\n SystemStyleObject,\n} 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: 3,\n w: 3,\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 },\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 backdropColor?: SemanticBackgroundColorToken;\n fullScreen?: boolean;\n label?: string;\n labelProps?: Omit<TextProps, \"chilren\">;\n showLabel?: boolean;\n size?: SpinnerSize;\n variant?: TypographyVariant;\n}\n\nexport const Spinner = ({\n backdropColor = \"background.alpha.pressed\",\n fullScreen = false,\n label = \"Loading...\",\n labelProps,\n showLabel = false,\n size = \"md\",\n variant = \"accent\",\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen });\n\n return (\n <VStack\n className=\"Spinner\"\n data-testid=\"kibble-spinner\"\n css={styles.root}\n {...(fullScreen && { bg: backdropColor })}\n >\n <CSpinner css={styles.spinner} />\n {showLabel && (\n <Text\n className=\"Spinner__Label\"\n data-testid=\"kibble-spinner-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","showLabel","size","variant","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":";;;;;;;AAQA,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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EJ;"}
1
+ {"version":3,"file":"spinner.component-DWZ_4aTj.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import {\n defineSlotRecipe,\n SystemStyleObject,\n} 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: 3,\n w: 3,\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 },\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 backdropColor?: SemanticBackgroundColorToken;\n fullScreen?: boolean;\n label?: string;\n labelProps?: Omit<TextProps, \"chilren\">;\n showLabel?: boolean;\n size?: SpinnerSize;\n variant?: TypographyVariant;\n}\n\nexport const Spinner = ({\n backdropColor = \"background.alpha.pressed\",\n fullScreen = false,\n label = \"Loading...\",\n labelProps,\n showLabel = false,\n size = \"md\",\n variant = \"accent\",\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen });\n\n return (\n <VStack\n className=\"Spinner\"\n data-testid=\"kibble-spinner\"\n css={styles.root}\n {...(fullScreen && { bg: backdropColor })}\n >\n <CSpinner css={styles.spinner} />\n {showLabel && (\n <Text\n className=\"Spinner__Label\"\n data-testid=\"kibble-spinner-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","showLabel","size","variant","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":";;;;;;;AAQA,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,IAAq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AA,UACL,UAAU;AAAA,UACV,GAAG;AAAA,UACH,QAAQ;AAAA,QAAA;AAAA,MAEZ;AAAA,MACA,OAAO;AAAA,QACL,MAAM;AAAA,UACJ,GAAG;AAAA,UACH,GAAG;AAAA,QAAA;AAAA,MACL;AAAA,IACF;AAAA,EAEJ;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb,CAAC,GCpIYK,IAAU,CAAC;AAAA,EACtB,eAAAC,IAAgB;AAAA,EAChB,YAAAC,IAAa;AAAA,EACb,OAAAC,IAAQ;AAAA,EACR,YAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AACZ,MAAuC;AAErC,QAAMC,IADSC,EAAc,EAAE,QAAQX,GAAe,EAChC,EAAE,SAAAS,GAAS,MAAAD,GAAM,YAAAJ,GAAY;AAGjD,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,KAAKH,EAAO;AAAA,MACX,GAAIN,KAAc,EAAE,IAAID,EAAc;AAAA,MAEvC,UAAA;AAAA,QAACW,gBAAAA,EAAAA,IAAAC,GAAA,EAAS,KAAKL,EAAO,QAAS,CAAA;AAAA,QAC9BH,KACCO,gBAAAA,EAAA;AAAA,UAACE;AAAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,eAAY;AAAA,YACZ,SAAQ;AAAA,YACR,KAAKN,EAAO;AAAA,YACX,GAAGJ;AAAA,YAEH,UAAAD;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("./jsx-runtime-BjDatQAs.js"),p=require("./avatar.component-Bx-G6wRN.js"),m=({type:l="Client",...e})=>{const{name:o,tooltipProps:t={placement:"top",...e.tooltipProps},onClick:s}=e,n={variant:"outlineYellow",tooltipProps:{...t,label:t?.label||`${o} (Test Client)`}},r={iconName:"cellphone",tooltipProps:{...t,label:t?.label||`Text messages sent from ${o||"unknown number"}`}},i={Automated:{iconName:"robot",backgroundColor:"background.primary",hideBorder:!0,color:"text.contrast",size:"sm",showTooltip:!1,cursor:"default"},Client:{},Clinic:{variant:"outlineAccent",name:o||"Sys"},SMS:r,TestClient:n};return c.jsxRuntimeExports.jsx(p.Avatar,{className:"StyledAvatar","data-testid":`kibble-styled-avatar-${l}`,onClick:a=>{a.stopPropagation(),s&&s(a)},...e,...i[l]})},u=["Client","SMS","TestClient","Automated","Clinic"];exports.StyledAvatar=m;exports.styledAvatarTypes=u;
2
- //# sourceMappingURL=styledAvatar.types-BjuO516j.js.map
1
+ "use strict";const c=require("./jsx-runtime-BjDatQAs.js"),p=require("./avatar.component-BRjxOsjQ.js"),m=({type:l="Client",...e})=>{const{name:o,tooltipProps:t={placement:"top",...e.tooltipProps},onClick:s}=e,n={variant:"outlineYellow",tooltipProps:{...t,label:t?.label||`${o} (Test Client)`}},r={iconName:"cellphone",tooltipProps:{...t,label:t?.label||`Text messages sent from ${o||"unknown number"}`}},i={Automated:{iconName:"robot",backgroundColor:"background.primary",hideBorder:!0,color:"text.contrast",size:"sm",showTooltip:!1,cursor:"default"},Client:{},Clinic:{variant:"outlineAccent",name:o||"Sys"},SMS:r,TestClient:n};return c.jsxRuntimeExports.jsx(p.Avatar,{className:"StyledAvatar","data-testid":`kibble-styled-avatar-${l}`,onClick:a=>{a.stopPropagation(),s&&s(a)},...e,...i[l]})},u=["Client","SMS","TestClient","Automated","Clinic"];exports.StyledAvatar=m;exports.styledAvatarTypes=u;
2
+ //# sourceMappingURL=styledAvatar.types-BXftd-Wf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styledAvatar.types-BjuO516j.js","sources":["../../src/components/StyledAvatar/styledAvatar.component.tsx","../../src/components/StyledAvatar/styledAvatar.types.ts"],"sourcesContent":["import React from \"react\";\nimport { Avatar, AvatarProps } from \"components/Avatar/avatar.component\";\nimport { StyledAvatarType } from \"./styledAvatar.types\";\n\nexport interface StyledAvatarProps extends AvatarProps {\n type?: StyledAvatarType;\n}\n\nexport const StyledAvatar = ({\n type = \"Client\",\n ...rest\n}: StyledAvatarProps): React.JSX.Element => {\n const {\n name,\n tooltipProps = { placement: \"top\", ...rest.tooltipProps },\n onClick,\n } = rest;\n\n const testClientStyleProps: Partial<AvatarProps> = {\n variant: \"outlineYellow\",\n tooltipProps: {\n ...tooltipProps,\n label: tooltipProps?.label || `${name} (Test Client)`,\n },\n };\n\n const smsStyleProps: Partial<AvatarProps> = {\n iconName: \"cellphone\",\n tooltipProps: {\n ...tooltipProps,\n label:\n tooltipProps?.label ||\n `Text messages sent from ${name || \"unknown number\"}`,\n },\n };\n\n const automatedStyleProps: Partial<AvatarProps> = {\n iconName: \"robot\",\n backgroundColor: \"background.primary\",\n hideBorder: true,\n color: \"text.contrast\",\n size: \"sm\",\n showTooltip: false,\n cursor: \"default\",\n };\n\n const clinicStyleProps: Partial<AvatarProps> = {\n variant: \"outlineAccent\",\n name: name || \"Sys\",\n };\n\n const styleProps: Record<StyledAvatarType, Partial<AvatarProps>> = {\n Automated: automatedStyleProps,\n Client: {},\n Clinic: clinicStyleProps,\n SMS: smsStyleProps,\n TestClient: testClientStyleProps,\n };\n\n return (\n <Avatar\n className=\"StyledAvatar\"\n data-testid={`kibble-styled-avatar-${type}`}\n onClick={(e): void => {\n e.stopPropagation();\n if (onClick) {\n onClick(e);\n }\n }}\n {...rest}\n {...styleProps[type]}\n />\n );\n};\n","export const styledAvatarTypes = [\n \"Client\",\n \"SMS\",\n \"TestClient\",\n \"Automated\",\n \"Clinic\",\n] as const;\nexport type StyledAvatarType = (typeof styledAvatarTypes)[number];\n"],"names":["StyledAvatar","type","rest","name","tooltipProps","onClick","testClientStyleProps","smsStyleProps","styleProps","jsx","Avatar","e","styledAvatarTypes"],"mappings":"sGAQaA,EAAe,CAAC,CAC3B,KAAAC,EAAO,SACP,GAAGC,CACL,IAA4C,CACpC,KAAA,CACJ,KAAAC,EACA,aAAAC,EAAe,CAAE,UAAW,MAAO,GAAGF,EAAK,YAAa,EACxD,QAAAG,CAAA,EACEH,EAEEI,EAA6C,CACjD,QAAS,gBACT,aAAc,CACZ,GAAGF,EACH,MAAOA,GAAc,OAAS,GAAGD,CAAI,gBAAA,CAEzC,EAEMI,EAAsC,CAC1C,SAAU,YACV,aAAc,CACZ,GAAGH,EACH,MACEA,GAAc,OACd,2BAA2BD,GAAQ,gBAAgB,EAAA,CAEzD,EAiBMK,EAA6D,CACjE,UAhBgD,CAChD,SAAU,QACV,gBAAiB,qBACjB,WAAY,GACZ,MAAO,gBACP,KAAM,KACN,YAAa,GACb,OAAQ,SACV,EASE,OAAQ,CAAC,EACT,OAR6C,CAC7C,QAAS,gBACT,KAAML,GAAQ,KAChB,EAME,IAAKI,EACL,WAAYD,CACd,EAGE,OAAAG,EAAA,kBAAA,IAACC,EAAA,OAAA,CACC,UAAU,eACV,cAAa,wBAAwBT,CAAI,GACzC,QAAUU,GAAY,CACpBA,EAAE,gBAAgB,EACdN,GACFA,EAAQM,CAAC,CAEb,EACC,GAAGT,EACH,GAAGM,EAAWP,CAAI,CAAA,CACrB,CAEJ,ECzEaW,EAAoB,CAC/B,SACA,MACA,aACA,YACA,QACF"}
1
+ {"version":3,"file":"styledAvatar.types-BXftd-Wf.js","sources":["../../src/components/StyledAvatar/styledAvatar.component.tsx","../../src/components/StyledAvatar/styledAvatar.types.ts"],"sourcesContent":["import React from \"react\";\nimport { Avatar, AvatarProps } from \"components/Avatar/avatar.component\";\nimport { StyledAvatarType } from \"./styledAvatar.types\";\n\nexport interface StyledAvatarProps extends AvatarProps {\n type?: StyledAvatarType;\n}\n\nexport const StyledAvatar = ({\n type = \"Client\",\n ...rest\n}: StyledAvatarProps): React.JSX.Element => {\n const {\n name,\n tooltipProps = { placement: \"top\", ...rest.tooltipProps },\n onClick,\n } = rest;\n\n const testClientStyleProps: Partial<AvatarProps> = {\n variant: \"outlineYellow\",\n tooltipProps: {\n ...tooltipProps,\n label: tooltipProps?.label || `${name} (Test Client)`,\n },\n };\n\n const smsStyleProps: Partial<AvatarProps> = {\n iconName: \"cellphone\",\n tooltipProps: {\n ...tooltipProps,\n label:\n tooltipProps?.label ||\n `Text messages sent from ${name || \"unknown number\"}`,\n },\n };\n\n const automatedStyleProps: Partial<AvatarProps> = {\n iconName: \"robot\",\n backgroundColor: \"background.primary\",\n hideBorder: true,\n color: \"text.contrast\",\n size: \"sm\",\n showTooltip: false,\n cursor: \"default\",\n };\n\n const clinicStyleProps: Partial<AvatarProps> = {\n variant: \"outlineAccent\",\n name: name || \"Sys\",\n };\n\n const styleProps: Record<StyledAvatarType, Partial<AvatarProps>> = {\n Automated: automatedStyleProps,\n Client: {},\n Clinic: clinicStyleProps,\n SMS: smsStyleProps,\n TestClient: testClientStyleProps,\n };\n\n return (\n <Avatar\n className=\"StyledAvatar\"\n data-testid={`kibble-styled-avatar-${type}`}\n onClick={(e): void => {\n e.stopPropagation();\n if (onClick) {\n onClick(e);\n }\n }}\n {...rest}\n {...styleProps[type]}\n />\n );\n};\n","export const styledAvatarTypes = [\n \"Client\",\n \"SMS\",\n \"TestClient\",\n \"Automated\",\n \"Clinic\",\n] as const;\nexport type StyledAvatarType = (typeof styledAvatarTypes)[number];\n"],"names":["StyledAvatar","type","rest","name","tooltipProps","onClick","testClientStyleProps","smsStyleProps","styleProps","jsx","Avatar","e","styledAvatarTypes"],"mappings":"sGAQaA,EAAe,CAAC,CAC3B,KAAAC,EAAO,SACP,GAAGC,CACL,IAA4C,CACpC,KAAA,CACJ,KAAAC,EACA,aAAAC,EAAe,CAAE,UAAW,MAAO,GAAGF,EAAK,YAAa,EACxD,QAAAG,CAAA,EACEH,EAEEI,EAA6C,CACjD,QAAS,gBACT,aAAc,CACZ,GAAGF,EACH,MAAOA,GAAc,OAAS,GAAGD,CAAI,gBAAA,CAEzC,EAEMI,EAAsC,CAC1C,SAAU,YACV,aAAc,CACZ,GAAGH,EACH,MACEA,GAAc,OACd,2BAA2BD,GAAQ,gBAAgB,EAAA,CAEzD,EAiBMK,EAA6D,CACjE,UAhBgD,CAChD,SAAU,QACV,gBAAiB,qBACjB,WAAY,GACZ,MAAO,gBACP,KAAM,KACN,YAAa,GACb,OAAQ,SACV,EASE,OAAQ,CAAC,EACT,OAR6C,CAC7C,QAAS,gBACT,KAAML,GAAQ,KAChB,EAME,IAAKI,EACL,WAAYD,CACd,EAGE,OAAAG,EAAA,kBAAA,IAACC,EAAA,OAAA,CACC,UAAU,eACV,cAAa,wBAAwBT,CAAI,GACzC,QAAUU,GAAY,CACpBA,EAAE,gBAAgB,EACdN,GACFA,EAAQM,CAAC,CAEb,EACC,GAAGT,EACH,GAAGM,EAAWP,CAAI,CAAA,CACrB,CAEJ,ECzEaW,EAAoB,CAC/B,SACA,MACA,aACA,YACA,QACF"}
@@ -1,5 +1,5 @@
1
1
  import { j as c } from "./jsx-runtime-C5mzlN2N.js";
2
- import { A as p } from "./avatar.component-DhnsK_Su.js";
2
+ import { A as p } from "./avatar.component-BKp_pbGA.js";
3
3
  const y = ({
4
4
  type: l = "Client",
5
5
  ...o
@@ -61,4 +61,4 @@ export {
61
61
  y as S,
62
62
  C as s
63
63
  };
64
- //# sourceMappingURL=styledAvatar.types-CbfoVHIB.js.map
64
+ //# sourceMappingURL=styledAvatar.types-D4XrEFve.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styledAvatar.types-CbfoVHIB.js","sources":["../../src/components/StyledAvatar/styledAvatar.component.tsx","../../src/components/StyledAvatar/styledAvatar.types.ts"],"sourcesContent":["import React from \"react\";\nimport { Avatar, AvatarProps } from \"components/Avatar/avatar.component\";\nimport { StyledAvatarType } from \"./styledAvatar.types\";\n\nexport interface StyledAvatarProps extends AvatarProps {\n type?: StyledAvatarType;\n}\n\nexport const StyledAvatar = ({\n type = \"Client\",\n ...rest\n}: StyledAvatarProps): React.JSX.Element => {\n const {\n name,\n tooltipProps = { placement: \"top\", ...rest.tooltipProps },\n onClick,\n } = rest;\n\n const testClientStyleProps: Partial<AvatarProps> = {\n variant: \"outlineYellow\",\n tooltipProps: {\n ...tooltipProps,\n label: tooltipProps?.label || `${name} (Test Client)`,\n },\n };\n\n const smsStyleProps: Partial<AvatarProps> = {\n iconName: \"cellphone\",\n tooltipProps: {\n ...tooltipProps,\n label:\n tooltipProps?.label ||\n `Text messages sent from ${name || \"unknown number\"}`,\n },\n };\n\n const automatedStyleProps: Partial<AvatarProps> = {\n iconName: \"robot\",\n backgroundColor: \"background.primary\",\n hideBorder: true,\n color: \"text.contrast\",\n size: \"sm\",\n showTooltip: false,\n cursor: \"default\",\n };\n\n const clinicStyleProps: Partial<AvatarProps> = {\n variant: \"outlineAccent\",\n name: name || \"Sys\",\n };\n\n const styleProps: Record<StyledAvatarType, Partial<AvatarProps>> = {\n Automated: automatedStyleProps,\n Client: {},\n Clinic: clinicStyleProps,\n SMS: smsStyleProps,\n TestClient: testClientStyleProps,\n };\n\n return (\n <Avatar\n className=\"StyledAvatar\"\n data-testid={`kibble-styled-avatar-${type}`}\n onClick={(e): void => {\n e.stopPropagation();\n if (onClick) {\n onClick(e);\n }\n }}\n {...rest}\n {...styleProps[type]}\n />\n );\n};\n","export const styledAvatarTypes = [\n \"Client\",\n \"SMS\",\n \"TestClient\",\n \"Automated\",\n \"Clinic\",\n] as const;\nexport type StyledAvatarType = (typeof styledAvatarTypes)[number];\n"],"names":["StyledAvatar","type","rest","name","tooltipProps","onClick","testClientStyleProps","smsStyleProps","styleProps","jsx","Avatar","e","styledAvatarTypes"],"mappings":";;AAQO,MAAMA,IAAe,CAAC;AAAA,EAC3B,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,MAA4C;AACpC,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,cAAAC,IAAe,EAAE,WAAW,OAAO,GAAGF,EAAK,aAAa;AAAA,IACxD,SAAAG;AAAA,EAAA,IACEH,GAEEI,IAA6C;AAAA,IACjD,SAAS;AAAA,IACT,cAAc;AAAA,MACZ,GAAGF;AAAA,MACH,OAAOA,GAAc,SAAS,GAAGD,CAAI;AAAA,IAAA;AAAA,EAEzC,GAEMI,IAAsC;AAAA,IAC1C,UAAU;AAAA,IACV,cAAc;AAAA,MACZ,GAAGH;AAAA,MACH,OACEA,GAAc,SACd,2BAA2BD,KAAQ,gBAAgB;AAAA,IAAA;AAAA,EAEzD,GAiBMK,IAA6D;AAAA,IACjE,WAhBgD;AAAA,MAChD,UAAU;AAAA,MACV,iBAAiB;AAAA,MACjB,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ;AAAA,IACV;AAAA,IASE,QAAQ,CAAC;AAAA,IACT,QAR6C;AAAA,MAC7C,SAAS;AAAA,MACT,MAAML,KAAQ;AAAA,IAChB;AAAA,IAME,KAAKI;AAAA,IACL,YAAYD;AAAA,EACd;AAGE,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,eAAa,wBAAwBT,CAAI;AAAA,MACzC,SAAS,CAACU,MAAY;AACpB,QAAAA,EAAE,gBAAgB,GACdN,KACFA,EAAQM,CAAC;AAAA,MAEb;AAAA,MACC,GAAGT;AAAA,MACH,GAAGM,EAAWP,CAAI;AAAA,IAAA;AAAA,EACrB;AAEJ,GCzEaW,IAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
1
+ {"version":3,"file":"styledAvatar.types-D4XrEFve.js","sources":["../../src/components/StyledAvatar/styledAvatar.component.tsx","../../src/components/StyledAvatar/styledAvatar.types.ts"],"sourcesContent":["import React from \"react\";\nimport { Avatar, AvatarProps } from \"components/Avatar/avatar.component\";\nimport { StyledAvatarType } from \"./styledAvatar.types\";\n\nexport interface StyledAvatarProps extends AvatarProps {\n type?: StyledAvatarType;\n}\n\nexport const StyledAvatar = ({\n type = \"Client\",\n ...rest\n}: StyledAvatarProps): React.JSX.Element => {\n const {\n name,\n tooltipProps = { placement: \"top\", ...rest.tooltipProps },\n onClick,\n } = rest;\n\n const testClientStyleProps: Partial<AvatarProps> = {\n variant: \"outlineYellow\",\n tooltipProps: {\n ...tooltipProps,\n label: tooltipProps?.label || `${name} (Test Client)`,\n },\n };\n\n const smsStyleProps: Partial<AvatarProps> = {\n iconName: \"cellphone\",\n tooltipProps: {\n ...tooltipProps,\n label:\n tooltipProps?.label ||\n `Text messages sent from ${name || \"unknown number\"}`,\n },\n };\n\n const automatedStyleProps: Partial<AvatarProps> = {\n iconName: \"robot\",\n backgroundColor: \"background.primary\",\n hideBorder: true,\n color: \"text.contrast\",\n size: \"sm\",\n showTooltip: false,\n cursor: \"default\",\n };\n\n const clinicStyleProps: Partial<AvatarProps> = {\n variant: \"outlineAccent\",\n name: name || \"Sys\",\n };\n\n const styleProps: Record<StyledAvatarType, Partial<AvatarProps>> = {\n Automated: automatedStyleProps,\n Client: {},\n Clinic: clinicStyleProps,\n SMS: smsStyleProps,\n TestClient: testClientStyleProps,\n };\n\n return (\n <Avatar\n className=\"StyledAvatar\"\n data-testid={`kibble-styled-avatar-${type}`}\n onClick={(e): void => {\n e.stopPropagation();\n if (onClick) {\n onClick(e);\n }\n }}\n {...rest}\n {...styleProps[type]}\n />\n );\n};\n","export const styledAvatarTypes = [\n \"Client\",\n \"SMS\",\n \"TestClient\",\n \"Automated\",\n \"Clinic\",\n] as const;\nexport type StyledAvatarType = (typeof styledAvatarTypes)[number];\n"],"names":["StyledAvatar","type","rest","name","tooltipProps","onClick","testClientStyleProps","smsStyleProps","styleProps","jsx","Avatar","e","styledAvatarTypes"],"mappings":";;AAQO,MAAMA,IAAe,CAAC;AAAA,EAC3B,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,MAA4C;AACpC,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,cAAAC,IAAe,EAAE,WAAW,OAAO,GAAGF,EAAK,aAAa;AAAA,IACxD,SAAAG;AAAA,EAAA,IACEH,GAEEI,IAA6C;AAAA,IACjD,SAAS;AAAA,IACT,cAAc;AAAA,MACZ,GAAGF;AAAA,MACH,OAAOA,GAAc,SAAS,GAAGD,CAAI;AAAA,IAAA;AAAA,EAEzC,GAEMI,IAAsC;AAAA,IAC1C,UAAU;AAAA,IACV,cAAc;AAAA,MACZ,GAAGH;AAAA,MACH,OACEA,GAAc,SACd,2BAA2BD,KAAQ,gBAAgB;AAAA,IAAA;AAAA,EAEzD,GAiBMK,IAA6D;AAAA,IACjE,WAhBgD;AAAA,MAChD,UAAU;AAAA,MACV,iBAAiB;AAAA,MACjB,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ;AAAA,IACV;AAAA,IASE,QAAQ,CAAC;AAAA,IACT,QAR6C;AAAA,MAC7C,SAAS;AAAA,MACT,MAAML,KAAQ;AAAA,IAChB;AAAA,IAME,KAAKI;AAAA,IACL,YAAYD;AAAA,EACd;AAGE,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,eAAa,wBAAwBT,CAAI;AAAA,MACzC,SAAS,CAACU,MAAY;AACpB,QAAAA,EAAE,gBAAgB,GACdN,KACFA,EAAQM,CAAC;AAAA,MAEb;AAAA,MACC,GAAGT;AAAA,MACH,GAAGM,EAAWP,CAAI;AAAA,IAAA;AAAA,EACrB;AAEJ,GCzEaW,IAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const i=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),y=require("./withFormControl-BI8pqhZl.js"),w=require("./attr-BMs6szZx.js"),E=require("./create-slot-recipe-context-IwVIgtBt.js"),m=require("./factory-D6tdBUPG.js"),n=require("./portal-TWtD47zg.js"),f=require("./use-field-context-xBX4EpFz.js"),l=require("./index-BlGAWSIX.js"),x=require("./index-5cRW642o.js"),q=t=>t&&t.__esModule?t:{default:t},N=q(c),[R,u]=n.createContext({name:"SwitchContext",hookName:"useSwitchContext",providerName:"<SwitchProvider />"}),S=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getControlProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});S.displayName="SwitchControl";const j=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getHiddenInputProps(),t),o=f.useFieldContext();return i.jsxRuntimeExports.jsx(n.ark.input,{"aria-describedby":o?.ariaDescribedby,...s,ref:e})});j.displayName="SwitchHiddenInput";const b=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getLabelProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});b.displayName="SwitchLabel";const I=t=>{const e=c.useId(),{getRootNode:r}=n.useEnvironmentContext(),{dir:s}=n.useLocaleContext(),o=f.useFieldContext(),a={id:e,ids:{label:o?.ids.label,hiddenInput:o?.ids.control},dir:s,disabled:o?.disabled,readOnly:o?.readOnly,invalid:o?.invalid,required:o?.required,getRootNode:r,...t},d=n.useMachine(x.machine,a);return x.connect(d,n.normalizeProps)},C=c.forwardRef((t,e)=>{const[r,s]=n.createSplitProps()(t,["checked","defaultChecked","disabled","form","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),o=I(r),a=l.mergeProps(o.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:o,children:i.jsxRuntimeExports.jsx(n.ark.label,{...a,ref:e})})});C.displayName="SwitchRoot";const P=c.forwardRef((t,e)=>{const[{value:r},s]=n.createSplitProps()(t,["value"]),o=l.mergeProps(r.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:r,children:i.jsxRuntimeExports.jsx(n.ark.label,{...o,ref:e})})});P.displayName="SwitchRootProvider";const k=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getThumbProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});k.displayName="SwitchThumb";const{withProvider:g,withContext:p,useStyles:_}=E.createSlotRecipeContext({key:"switch"});g(P,"root",{forwardAsChild:!0});const A=g(C,"root",{forwardAsChild:!0}),$=p(b,"label",{forwardAsChild:!0}),F=p(k,"thumb",{forwardAsChild:!0}),L=p(S,"control",{forwardAsChild:!0,defaultProps:{children:i.jsxRuntimeExports.jsx(F,{})}});c.forwardRef(function(e,r){const s=u(),o=_(),{fallback:a,children:d,...h}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...h,css:[o.indicator,e.css],children:s.checked?d:a})});c.forwardRef(function(e,r){const s=u(),{fallback:o,children:a,...d}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...d,children:s.checked?a:o})});const T=j,H=y.withFormControl(({children:t,indeterminate:e=!1,onContrast:r,label:s,size:o="md",switchRef:a,...d})=>{const h=c.useMemo(()=>e?r?"indeterminateOnContrast":"indeterminate":r?"onContrast":"default",[e,r]);return i.jsxRuntimeExports.jsxs(A,{className:"Switch","data-testid":"kibble-switch",ref:a,size:o,variant:h,...d,children:[i.jsxRuntimeExports.jsx(T,{className:"Switch_Input","data-testid":"kibble-switch-input"}),i.jsxRuntimeExports.jsx(L,{className:"Switch_Control","data-testid":"kibble-switch-control"}),!!t&&i.jsxRuntimeExports.jsx($,{children:t})]})}),v=N.default.forwardRef((t,e)=>i.jsxRuntimeExports.jsx(H,{switchRef:e,...t}));v.displayName="Switch";exports.WrappedSwitch=v;
2
- //# sourceMappingURL=switch.component-CPhSaMqG.js.map
1
+ "use strict";const i=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),y=require("./withFormControl-DhWavZor.js"),w=require("./attr-BMs6szZx.js"),E=require("./create-slot-recipe-context-IwVIgtBt.js"),m=require("./factory-D6tdBUPG.js"),n=require("./portal-TWtD47zg.js"),f=require("./use-field-context-xBX4EpFz.js"),l=require("./index-BlGAWSIX.js"),x=require("./index-5cRW642o.js"),q=t=>t&&t.__esModule?t:{default:t},N=q(c),[R,u]=n.createContext({name:"SwitchContext",hookName:"useSwitchContext",providerName:"<SwitchProvider />"}),S=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getControlProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});S.displayName="SwitchControl";const j=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getHiddenInputProps(),t),o=f.useFieldContext();return i.jsxRuntimeExports.jsx(n.ark.input,{"aria-describedby":o?.ariaDescribedby,...s,ref:e})});j.displayName="SwitchHiddenInput";const b=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getLabelProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});b.displayName="SwitchLabel";const I=t=>{const e=c.useId(),{getRootNode:r}=n.useEnvironmentContext(),{dir:s}=n.useLocaleContext(),o=f.useFieldContext(),a={id:e,ids:{label:o?.ids.label,hiddenInput:o?.ids.control},dir:s,disabled:o?.disabled,readOnly:o?.readOnly,invalid:o?.invalid,required:o?.required,getRootNode:r,...t},d=n.useMachine(x.machine,a);return x.connect(d,n.normalizeProps)},C=c.forwardRef((t,e)=>{const[r,s]=n.createSplitProps()(t,["checked","defaultChecked","disabled","form","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),o=I(r),a=l.mergeProps(o.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:o,children:i.jsxRuntimeExports.jsx(n.ark.label,{...a,ref:e})})});C.displayName="SwitchRoot";const P=c.forwardRef((t,e)=>{const[{value:r},s]=n.createSplitProps()(t,["value"]),o=l.mergeProps(r.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:r,children:i.jsxRuntimeExports.jsx(n.ark.label,{...o,ref:e})})});P.displayName="SwitchRootProvider";const k=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getThumbProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});k.displayName="SwitchThumb";const{withProvider:g,withContext:p,useStyles:_}=E.createSlotRecipeContext({key:"switch"});g(P,"root",{forwardAsChild:!0});const A=g(C,"root",{forwardAsChild:!0}),$=p(b,"label",{forwardAsChild:!0}),F=p(k,"thumb",{forwardAsChild:!0}),L=p(S,"control",{forwardAsChild:!0,defaultProps:{children:i.jsxRuntimeExports.jsx(F,{})}});c.forwardRef(function(e,r){const s=u(),o=_(),{fallback:a,children:d,...h}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...h,css:[o.indicator,e.css],children:s.checked?d:a})});c.forwardRef(function(e,r){const s=u(),{fallback:o,children:a,...d}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...d,children:s.checked?a:o})});const T=j,H=y.withFormControl(({children:t,indeterminate:e=!1,onContrast:r,label:s,size:o="md",switchRef:a,...d})=>{const h=c.useMemo(()=>e?r?"indeterminateOnContrast":"indeterminate":r?"onContrast":"default",[e,r]);return i.jsxRuntimeExports.jsxs(A,{className:"Switch","data-testid":"kibble-switch",ref:a,size:o,variant:h,...d,children:[i.jsxRuntimeExports.jsx(T,{className:"Switch_Input","data-testid":"kibble-switch-input"}),i.jsxRuntimeExports.jsx(L,{className:"Switch_Control","data-testid":"kibble-switch-control"}),!!t&&i.jsxRuntimeExports.jsx($,{children:t})]})}),v=N.default.forwardRef((t,e)=>i.jsxRuntimeExports.jsx(H,{switchRef:e,...t}));v.displayName="Switch";exports.WrappedSwitch=v;
2
+ //# sourceMappingURL=switch.component-Ct8hEoT2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component-CPhSaMqG.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, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, 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, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): 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=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"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","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"mappings":"4aAGM,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,gB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EAAa,0BAA4B,gBAEzCA,EAAa,aAAe,UAEpC,CAACD,EAAeC,CAAU,CAAC,EAG5B,OAAAM,EAAA,kBAAA,KAACC,EAAA,CACC,UAAU,SACV,cAAY,gBACZ,IAAKJ,EACL,KAAAD,EACA,QAASE,EACR,GAAGX,EAEJ,SAAA,CAAAtC,EAAA,kBAAA,IAACqD,EAAA,CACC,UAAU,eACV,cAAY,qBAAA,CACd,EACArD,EAAA,kBAAA,IAACsD,EAAA,CACC,UAAU,iBACV,cAAY,uBAAA,CACd,EACC,CAAC,CAACjB,2BAAakB,EAAA,CAAe,SAAAlB,CAAS,CAAA,CAAA,CAAA,CAC1C,CAAA,CAGN,EAEMmB,EAAgBC,EAAM,QAAA,WAC1B,CAAC9D,EAAoBC,IACnBI,wBAAC0C,GAAO,UAAW9C,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA6D,EAAc,YAAc","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
1
+ {"version":3,"file":"switch.component-Ct8hEoT2.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, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, 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, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): 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=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"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","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"mappings":"4aAGM,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,E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,EAAM,QAAA,WAC1B,CAAC9D,EAAoBC,IACnBI,wBAAC0C,GAAO,UAAW9C,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA6D,EAAc,YAAc","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 g, { forwardRef as n, useId as R, useMemo as N } from "react";
3
- import { w as I } from "./withFormControl-Cb632r_x.js";
3
+ import { w as I } from "./withFormControl-3s6IRbl0.js";
4
4
  import { d as u } from "./attr-sm10PXOd.js";
5
5
  import { c as A } from "./create-slot-recipe-context-BJmsuxih.js";
6
6
  import { c as w } from "./factory-Ctbv0Ozn.js";
@@ -163,4 +163,4 @@ G.displayName = "Switch";
163
163
  export {
164
164
  G as W
165
165
  };
166
- //# sourceMappingURL=switch.component-Dpu_wRns.js.map
166
+ //# sourceMappingURL=switch.component-vDh8eC0O.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component-Dpu_wRns.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, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, 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, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): 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=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"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","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"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,EAAk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ACR,GAAGX;AAAA,QAEJ,UAAA;AAAA,UAAAtC,gBAAAA,EAAA;AAAA,YAACqD;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAY;AAAA,YAAA;AAAA,UACd;AAAA,UACArD,gBAAAA,EAAA;AAAA,YAACsD;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAY;AAAA,YAAA;AAAA,UACd;AAAA,UACC,CAAC,CAACjB,2BAAakB,GAAA,EAAe,UAAAlB,EAAS,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1C;AAAA,EAAA;AAGN,GAEMmB,IAAgBC,EAAM;AAAA,EAC1B,CAAC9D,GAAoBC,MACnBI,gBAAAA,MAAC0C,KAAO,WAAW9C,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA6D,EAAc,cAAc;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
1
+ {"version":3,"file":"switch.component-vDh8eC0O.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, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, 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, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): 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=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"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","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"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,GAA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BAAAA,EAAA;AAAA,YAACqD;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAY;AAAA,YAAA;AAAA,UACd;AAAA,UACArD,gBAAAA,EAAA;AAAA,YAACsD;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAY;AAAA,YAAA;AAAA,UACd;AAAA,UACC,CAAC,CAACjB,2BAAakB,GAAA,EAAe,UAAAlB,EAAS,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1C;AAAA,EAAA;AAGN,GAEMmB,IAAgBC,EAAM;AAAA,EAC1B,CAAC9D,GAAoBC,MACnBI,gBAAAA,MAAC0C,KAAO,WAAW9C,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA6D,EAAc,cAAc;","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 S } from "./icon.component-DGNCL1Yc.js";
3
3
  import { N as G } from "./notificationCounter.component-DMr4Mlm9.js";
4
- import { W as Y } from "./heading.component-DZ7kmGcE.js";
4
+ import { W as Y } from "./heading.component-CUa8MRJt.js";
5
5
  import { c as J } from "./create-slot-recipe-context-BJmsuxih.js";
6
6
  import { useState as Q, useEffect as Z, forwardRef as T, useId as ee } from "react";
7
7
  import { c as te, a as F, l as ae, m as se, f as m, h as oe, b as _, i as re, j as ne, k as ie, n as ce } from "./portal-D2KZrSzZ.js";
@@ -636,4 +636,4 @@ const Ke = {
636
636
  export {
637
637
  rt as T
638
638
  };
639
- //# sourceMappingURL=tabs.component-BHGBxzEH.js.map
639
+ //# sourceMappingURL=tabs.component-CuCzoee6.js.map