@televet/kibble-ui 4.0.0-beta.49 → 4.0.0-beta.51

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 (157) hide show
  1. package/dist/chunks/{alert.component-xIg594Bw.js → alert.component-g3HPaEm9.js} +3 -3
  2. package/dist/chunks/{alert.component-xIg594Bw.js.map → alert.component-g3HPaEm9.js.map} +1 -1
  3. package/dist/chunks/{avatar.component-B7rggLqO.js → avatar.component-oOJ66hzm.js} +11 -11
  4. package/dist/chunks/{avatar.component-B7rggLqO.js.map → avatar.component-oOJ66hzm.js.map} +1 -1
  5. package/dist/chunks/{avatarGroup.component-BxK-Fntw.js → avatarGroup.component-BOzKnzZu.js} +2 -2
  6. package/dist/chunks/{avatarGroup.component-BxK-Fntw.js.map → avatarGroup.component-BOzKnzZu.js.map} +1 -1
  7. package/dist/chunks/{buttonGroup.component-B_5ioQ76.js → buttonGroup.component-CESNUX_O.js} +2 -2
  8. package/dist/chunks/{buttonGroup.component-B_5ioQ76.js.map → buttonGroup.component-CESNUX_O.js.map} +1 -1
  9. package/dist/chunks/{characterCounter.component-Bmd3imRK.js → characterCounter.component-BFw6saPi.js} +2 -2
  10. package/dist/chunks/{characterCounter.component-Bmd3imRK.js.map → characterCounter.component-BFw6saPi.js.map} +1 -1
  11. package/dist/chunks/{checkbox.component-C99uwLFM.js → checkbox.component-DGQYgNkB.js} +12 -12
  12. package/dist/chunks/{checkbox.component-C99uwLFM.js.map → checkbox.component-DGQYgNkB.js.map} +1 -1
  13. package/dist/chunks/{checkbox.records-BBV1vniy.js → checkbox.records-7WQ70CZr.js} +4 -4
  14. package/dist/chunks/{checkbox.records-BBV1vniy.js.map → checkbox.records-7WQ70CZr.js.map} +1 -1
  15. package/dist/chunks/{checkboxGroup.component-DwICStpY.js → checkboxGroup.component-DAMxeo3c.js} +3 -3
  16. package/dist/chunks/{checkboxGroup.component-DwICStpY.js.map → checkboxGroup.component-DAMxeo3c.js.map} +1 -1
  17. package/dist/chunks/{conversationCard.component-CiDSMTUO.js → conversationCard.component-CiFdjzC0.js} +7 -7
  18. package/dist/chunks/{conversationCard.component-CiDSMTUO.js.map → conversationCard.component-CiFdjzC0.js.map} +1 -1
  19. package/dist/chunks/{datePicker.component-DKDgsGci.js → datePicker.component-D7J1Ft-p.js} +7 -7
  20. package/dist/chunks/{datePicker.component-DKDgsGci.js.map → datePicker.component-D7J1Ft-p.js.map} +1 -1
  21. package/dist/chunks/{dialog-trigger-sGBMGLMB.js → dialog-trigger-CKEZLJZ6.js} +13 -13
  22. package/dist/chunks/{dialog-trigger-sGBMGLMB.js.map → dialog-trigger-CKEZLJZ6.js.map} +1 -1
  23. package/dist/chunks/{heading.component-DIST7ncC.js → heading.component-CVm2LGDL.js} +2 -2
  24. package/dist/chunks/{heading.component-DIST7ncC.js.map → heading.component-CVm2LGDL.js.map} +1 -1
  25. package/dist/chunks/{index-DLvqBeH6.js → index-B8d8Hi2Q.js} +35 -35
  26. package/dist/chunks/{index-DLvqBeH6.js.map → index-B8d8Hi2Q.js.map} +1 -1
  27. package/dist/chunks/{index-ByhnCBwf.js → index-BE2MBRYo.js} +4 -4
  28. package/dist/chunks/{index-ByhnCBwf.js.map → index-BE2MBRYo.js.map} +1 -1
  29. package/dist/chunks/{index-Dn2nvQ5m.js → index-BavQMU2I.js} +4 -4
  30. package/dist/chunks/{index-Dn2nvQ5m.js.map → index-BavQMU2I.js.map} +1 -1
  31. package/dist/chunks/{index-sWaESJRS.js → index-BsfW-qzE.js} +35 -35
  32. package/dist/chunks/{index-sWaESJRS.js.map → index-BsfW-qzE.js.map} +1 -1
  33. package/dist/chunks/{index-D79JhErY.js → index-CJ_SaUFt.js} +7 -7
  34. package/dist/chunks/{index-D79JhErY.js.map → index-CJ_SaUFt.js.map} +1 -1
  35. package/dist/chunks/{index-63NGUyr9.js → index-COcjj2r_.js} +4 -4
  36. package/dist/chunks/{index-63NGUyr9.js.map → index-COcjj2r_.js.map} +1 -1
  37. package/dist/chunks/{index-C3d8HKg_.js → index-CVMzOz4r.js} +7 -7
  38. package/dist/chunks/{index-C3d8HKg_.js.map → index-CVMzOz4r.js.map} +1 -1
  39. package/dist/chunks/{index-C1_01X--.js → index-Dw9PbX_m.js} +80 -80
  40. package/dist/chunks/{index-C1_01X--.js.map → index-Dw9PbX_m.js.map} +1 -1
  41. package/dist/chunks/{index-Bcp83GlU.js → index-X8K9tzgE.js} +10 -10
  42. package/dist/chunks/{index-Bcp83GlU.js.map → index-X8K9tzgE.js.map} +1 -1
  43. package/dist/chunks/{index-Kw3RO_3f.js → index-bYxdnAxK.js} +3 -3
  44. package/dist/chunks/{index-Kw3RO_3f.js.map → index-bYxdnAxK.js.map} +1 -1
  45. package/dist/chunks/{index-Cz4pncg8.js → index-xa8tmbbH.js} +25 -25
  46. package/dist/chunks/{index-Cz4pncg8.js.map → index-xa8tmbbH.js.map} +1 -1
  47. package/dist/chunks/{link.component-DYNc5XEj.js → link.component-B8MuH7tM.js} +2 -2
  48. package/dist/chunks/{link.component-DYNc5XEj.js.map → link.component-B8MuH7tM.js.map} +1 -1
  49. package/dist/chunks/menu.component-Bi2JPazM.js.map +1 -1
  50. package/dist/chunks/{menu.component-DbVIiM3g.js → menu.component-DZoyME_s.js} +22 -22
  51. package/dist/chunks/{menu.component-DbVIiM3g.js.map → menu.component-DZoyME_s.js.map} +1 -1
  52. package/dist/chunks/{modal.types-CdZepugS.js → modal.types-3KGURq43.js} +5 -5
  53. package/dist/chunks/{modal.types-CdZepugS.js.map → modal.types-3KGURq43.js.map} +1 -1
  54. package/dist/chunks/{pinInput.types-Ov7NqPQG.js → pinInput.types-Q3gBjJrF.js} +8 -8
  55. package/dist/chunks/{pinInput.types-Ov7NqPQG.js.map → pinInput.types-Q3gBjJrF.js.map} +1 -1
  56. package/dist/chunks/{popover-Q1b5Ou9h.js → popover-BBhgGw0a.js} +12 -12
  57. package/dist/chunks/{popover-Q1b5Ou9h.js.map → popover-BBhgGw0a.js.map} +1 -1
  58. package/dist/chunks/{popover-root-provider-_dExZRNY.js → popover-root-provider-CKQPoRvU.js} +8 -8
  59. package/dist/chunks/{popover-root-provider-_dExZRNY.js.map → popover-root-provider-CKQPoRvU.js.map} +1 -1
  60. package/dist/chunks/{popover.component-LH8cQ5xp.js → popover.component-D-UQ63DB.js} +15 -15
  61. package/dist/chunks/{popover.component-LH8cQ5xp.js.map → popover.component-D-UQ63DB.js.map} +1 -1
  62. package/dist/chunks/{popover.recipe-BwEAIvNr.js → popover.recipe-BVdiJdJk.js} +6 -6
  63. package/dist/chunks/{popover.recipe-BwEAIvNr.js.map → popover.recipe-BVdiJdJk.js.map} +1 -1
  64. package/dist/chunks/{radio.records-BEcLVP_S.js → radio.records-EtuVQX6z.js} +4 -4
  65. package/dist/chunks/{radio.records-BEcLVP_S.js.map → radio.records-EtuVQX6z.js.map} +1 -1
  66. package/dist/chunks/{radioGroup.component-VgKW4-P2.js → radioGroup.component-sOmiKjNM.js} +19 -19
  67. package/dist/chunks/{radioGroup.component-VgKW4-P2.js.map → radioGroup.component-sOmiKjNM.js.map} +1 -1
  68. package/dist/chunks/{ratingDots.component-CgBG_tvz.js → ratingDots.component-CMDKq3_T.js} +3 -3
  69. package/dist/chunks/{ratingDots.component-CgBG_tvz.js.map → ratingDots.component-CMDKq3_T.js.map} +1 -1
  70. package/dist/chunks/{render-strategy-Cr139kIz.js → render-strategy-DBmKAZIM.js} +2 -2
  71. package/dist/chunks/{render-strategy-Cr139kIz.js.map → render-strategy-DBmKAZIM.js.map} +1 -1
  72. package/dist/chunks/{select.component-BSZd60MZ.js → select.component-BOSAKx8m.js} +36 -36
  73. package/dist/chunks/{select.component-BSZd60MZ.js.map → select.component-BOSAKx8m.js.map} +1 -1
  74. package/dist/chunks/{select.component-BDLdQaL2.js → select.component-C9Vj7Sk7.js} +2 -2
  75. package/dist/chunks/{select.component-BDLdQaL2.js.map → select.component-C9Vj7Sk7.js.map} +1 -1
  76. package/dist/chunks/{sortableList.component-BRToMbfY.js → sortableList.component-BEc4_tAM.js} +3 -3
  77. package/dist/chunks/{sortableList.component-BRToMbfY.js.map → sortableList.component-BEc4_tAM.js.map} +1 -1
  78. package/dist/chunks/{spinner.component-DCSsW51J.js → spinner.component-DNrNcGw9.js} +2 -2
  79. package/dist/chunks/{spinner.component-DCSsW51J.js.map → spinner.component-DNrNcGw9.js.map} +1 -1
  80. package/dist/chunks/{styledAvatar.types-b9eWaeJ6.js → styledAvatar.types-DgeupAct.js} +2 -2
  81. package/dist/chunks/{styledAvatar.types-b9eWaeJ6.js.map → styledAvatar.types-DgeupAct.js.map} +1 -1
  82. package/dist/chunks/{switch.component-B2vWRrP_.js → switch.component-BQ9rEKP6.js} +9 -9
  83. package/dist/chunks/{switch.component-B2vWRrP_.js.map → switch.component-BQ9rEKP6.js.map} +1 -1
  84. package/dist/chunks/{tabs.component-DlaP-qhJ.js → tabs.component-BuknlGMy.js} +41 -41
  85. package/dist/chunks/{tabs.component-DlaP-qhJ.js.map → tabs.component-BuknlGMy.js.map} +1 -1
  86. package/dist/chunks/{tagBlock.component-DpcWXFLP.js → tagBlock.component-BZtyjaQk.js} +5 -5
  87. package/dist/chunks/{tagBlock.component-DpcWXFLP.js.map → tagBlock.component-BZtyjaQk.js.map} +1 -1
  88. package/dist/chunks/{text.component-D3E0SdX1.js → text.component-ByshUroO.js} +2 -2
  89. package/dist/chunks/{text.component-D3E0SdX1.js.map → text.component-ByshUroO.js.map} +1 -1
  90. package/dist/chunks/{textInput.component-BpCIE07n.js → textInput.component-BYpBgS2h.js} +12 -12
  91. package/dist/chunks/{textInput.component-BpCIE07n.js.map → textInput.component-BYpBgS2h.js.map} +1 -1
  92. package/dist/chunks/{textarea.component-B5AsA90v.js → textarea.component-B8X86Tqw.js} +6 -6
  93. package/dist/chunks/{textarea.component-B5AsA90v.js.map → textarea.component-B8X86Tqw.js.map} +1 -1
  94. package/dist/chunks/{theme.provider-B9PPowSI.js → theme.provider-C13bkPxl.js} +18 -18
  95. package/dist/chunks/{theme.provider-B9PPowSI.js.map → theme.provider-C13bkPxl.js.map} +1 -1
  96. package/dist/chunks/{timePicker.component-BFa1h4Gv.js → timePicker.component-BwmHvV_9.js} +3 -3
  97. package/dist/chunks/{timePicker.component-BFa1h4Gv.js.map → timePicker.component-BwmHvV_9.js.map} +1 -1
  98. package/dist/chunks/{timeRange.component-DuKclNl6.js → timeRange.component-Du_CkwPc.js} +2 -2
  99. package/dist/chunks/{timeRange.component-DuKclNl6.js.map → timeRange.component-Du_CkwPc.js.map} +1 -1
  100. package/dist/chunks/{timestamp.component-BouqsJZM.js → timestamp.component-CA-gdN9e.js} +3 -3
  101. package/dist/chunks/{timestamp.component-BouqsJZM.js.map → timestamp.component-CA-gdN9e.js.map} +1 -1
  102. package/dist/chunks/{toaster.records-BSRUGTiS.js → toaster.records-DuvFE6c1.js} +10 -10
  103. package/dist/chunks/{toaster.records-BSRUGTiS.js.map → toaster.records-DuvFE6c1.js.map} +1 -1
  104. package/dist/chunks/{tooltip.component-DYBYGsfe.js → tooltip.component-B0iqN7WJ.js} +40 -40
  105. package/dist/chunks/{tooltip.component-DYBYGsfe.js.map → tooltip.component-B0iqN7WJ.js.map} +1 -1
  106. package/dist/chunks/{typography.records-DA6XZIsX.js → typography.records-BS1CFpJg.js} +2 -2
  107. package/dist/chunks/{typography.records-DA6XZIsX.js.map → typography.records-BS1CFpJg.js.map} +1 -1
  108. package/dist/chunks/{use-field-context-B8ygn96q.js → use-field-context-Bxg2bkx0.js} +2 -2
  109. package/dist/chunks/{use-field-context-B8ygn96q.js.map → use-field-context-Bxg2bkx0.js.map} +1 -1
  110. package/dist/chunks/{use-locale-context-zakBNK5b.js → use-locale-context-BnlMA8su.js} +58 -58
  111. package/dist/chunks/{use-locale-context-zakBNK5b.js.map → use-locale-context-BnlMA8su.js.map} +1 -1
  112. package/dist/chunks/{withFormControl-Vf_flDYv.js → withFormControl-BRVK_J11.js} +26 -26
  113. package/dist/chunks/{withFormControl-Vf_flDYv.js.map → withFormControl-BRVK_J11.js.map} +1 -1
  114. package/dist/chunks/{withTruncation-BNm_JUdt.js → withTruncation-C3gfaeh3.js} +2 -2
  115. package/dist/chunks/{withTruncation-BNm_JUdt.js.map → withTruncation-C3gfaeh3.js.map} +1 -1
  116. package/dist/cjs/chakra/index.cjs +1 -1
  117. package/dist/cjs/components/Select/index.cjs +1 -1
  118. package/dist/cjs/components/index.cjs +1 -1
  119. package/dist/cjs/index.cjs +1 -1
  120. package/dist/esm/chakra/index.js +115 -114
  121. package/dist/esm/components/Alert/index.js +1 -1
  122. package/dist/esm/components/Avatar/index.js +1 -1
  123. package/dist/esm/components/AvatarGroup/index.js +1 -1
  124. package/dist/esm/components/ButtonGroup/index.js +1 -1
  125. package/dist/esm/components/CharacterCounter/index.js +1 -1
  126. package/dist/esm/components/Checkbox/index.js +1 -1
  127. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  128. package/dist/esm/components/ConversationCard/index.js +1 -1
  129. package/dist/esm/components/DatePicker/index.js +1 -1
  130. package/dist/esm/components/Heading/index.js +1 -1
  131. package/dist/esm/components/Link/index.js +1 -1
  132. package/dist/esm/components/Menu/index.js +1 -1
  133. package/dist/esm/components/Modal/index.js +1 -1
  134. package/dist/esm/components/PinInput/index.js +1 -1
  135. package/dist/esm/components/Popover/index.js +1 -1
  136. package/dist/esm/components/RadioGroup/index.js +1 -1
  137. package/dist/esm/components/RatingDots/index.js +1 -1
  138. package/dist/esm/components/Select/index.js +1 -1
  139. package/dist/esm/components/SortableList/index.js +1 -1
  140. package/dist/esm/components/Spinner/index.js +1 -1
  141. package/dist/esm/components/StyledAvatar/index.js +1 -1
  142. package/dist/esm/components/Switch/index.js +1 -1
  143. package/dist/esm/components/Tabs/index.js +1 -1
  144. package/dist/esm/components/TagBlock/index.js +1 -1
  145. package/dist/esm/components/Text/index.js +1 -1
  146. package/dist/esm/components/TextInput/index.js +1 -1
  147. package/dist/esm/components/Textarea/index.js +1 -1
  148. package/dist/esm/components/TimePicker/index.js +1 -1
  149. package/dist/esm/components/TimeRange/index.js +1 -1
  150. package/dist/esm/components/Timestamp/index.js +1 -1
  151. package/dist/esm/components/Toast/index.js +1 -1
  152. package/dist/esm/components/Tooltip/index.js +1 -1
  153. package/dist/esm/components/index.js +31 -31
  154. package/dist/esm/index.js +32 -32
  155. package/dist/esm/theme/index.js +1 -1
  156. package/dist/types/chakra/index.d.ts +1 -1
  157. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
- import { W as c } from "./text.component-D3E0SdX1.js";
2
+ import { W as c } from "./text.component-ByshUroO.js";
3
3
  import { t as n } from "./typography-Cqrokog3.js";
4
4
  import { a as d } from "./config-C4FE-eBu.js";
5
5
  import { u as b } from "./use-slot-recipe-BVIotsqX.js";
@@ -177,4 +177,4 @@ const S = ["root", "spinner", "label"], u = {
177
177
  export {
178
178
  V as S
179
179
  };
180
- //# sourceMappingURL=spinner.component-DCSsW51J.js.map
180
+ //# sourceMappingURL=spinner.component-DNrNcGw9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.component-DCSsW51J.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 as=\"p\"\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;A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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,IAAG;AAAA,YACH,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
+ {"version":3,"file":"spinner.component-DNrNcGw9.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 as=\"p\"\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;A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AA,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,IAAG;AAAA,YACH,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,5 +1,5 @@
1
1
  import { j as c } from "./jsx-runtime-C5mzlN2N.js";
2
- import { A as p } from "./avatar.component-B7rggLqO.js";
2
+ import { A as p } from "./avatar.component-oOJ66hzm.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-b9eWaeJ6.js.map
64
+ //# sourceMappingURL=styledAvatar.types-DgeupAct.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styledAvatar.types-b9eWaeJ6.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-DgeupAct.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,13 +1,13 @@
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-Vf_flDYv.js";
3
+ import { w as I } from "./withFormControl-BRVK_J11.js";
4
4
  import { d as u } from "./attr-sm10PXOd.js";
5
5
  import { c as A } from "./create-slot-recipe-context-DJkLYvCT.js";
6
6
  import { c as w } from "./factory-gZxMesut.js";
7
- import { a as L, f as d, i as T, j as _, k as $, n as H, b as S } from "./use-locale-context-zakBNK5b.js";
8
- import { u as f } from "./use-field-context-B8ygn96q.js";
9
- import { U as l } from "./index-DLvqBeH6.js";
10
- import { m as O, c as q } from "./index-ByhnCBwf.js";
7
+ import { a as L, f as d, i as T, j as _, k as $, n as H, b as S } from "./use-locale-context-BnlMA8su.js";
8
+ import { u as f } from "./use-field-context-Bxg2bkx0.js";
9
+ import { Y as l } from "./index-B8d8Hi2Q.js";
10
+ import { m as O, c as q } from "./index-BE2MBRYo.js";
11
11
  const [b, h] = L({
12
12
  name: "SwitchContext",
13
13
  hookName: "useSwitchContext",
@@ -115,7 +115,7 @@ n(function(t, e) {
115
115
  const s = h(), { fallback: r, children: i, ...a } = t;
116
116
  return /* @__PURE__ */ c.jsx(w.span, { ref: e, "data-checked": u(s.checked), ...a, children: s.checked ? i : r });
117
117
  });
118
- const U = C, V = I(
118
+ const V = C, Y = I(
119
119
  ({
120
120
  children: o,
121
121
  indeterminate: t = !1,
@@ -138,7 +138,7 @@ const U = C, V = I(
138
138
  ...a,
139
139
  children: [
140
140
  /* @__PURE__ */ c.jsx(
141
- U,
141
+ V,
142
142
  {
143
143
  className: "Switch_Input",
144
144
  "data-testid": "kibble-switch-input"
@@ -157,10 +157,10 @@ const U = C, V = I(
157
157
  );
158
158
  }
159
159
  ), B = g.forwardRef(
160
- (o, t) => /* @__PURE__ */ c.jsx(V, { switchRef: t, ...o })
160
+ (o, t) => /* @__PURE__ */ c.jsx(Y, { switchRef: t, ...o })
161
161
  );
162
162
  B.displayName = "Switch";
163
163
  export {
164
164
  B as W
165
165
  };
166
- //# sourceMappingURL=switch.component-B2vWRrP_.js.map
166
+ //# sourceMappingURL=switch.component-BQ9rEKP6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component-B2vWRrP_.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,gBAAA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YAAAC;AAAA;AAAA,IAEA,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,GAAGV;AAAA,EAAA,MACiC;AAC9B,UAAAW,IAAmBC,EAAQ,MAC3BN,IACKC,IAAa,4BAA4B,kBAEzCA,IAAa,eAAe,WAEpC,CAACD,GAAeC,CAAU,CAAC;AAG5B,WAAAM,gBAAAA,EAAA;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,KAAKJ;AAAA,QACL,MAAAD;AAAA,QACA,SAASE;AAAA,QACR,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-BQ9rEKP6.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,GA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AAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,GAAGV;AAAA,EAAA,MACiC;AAC9B,UAAAW,IAAmBC,EAAQ,MAC3BN,IACKC,IAAa,4BAA4B,kBAEzCA,IAAa,eAAe,WAEpC,CAACD,GAAeC,CAAU,CAAC;AAG5B,WAAAM,gBAAAA,EAAA;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,KAAKJ;AAAA,QACL,MAAAD;AAAA,QACA,SAASE;AAAA,QACR,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,15 +1,15 @@
1
1
  import { j as c } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { I as S } from "./icon.component-BmcWaysM.js";
3
- import { N as G } from "./notificationCounter.component-CG5067PO.js";
4
- import { W as Y } from "./heading.component-DIST7ncC.js";
5
- import { c as Z } from "./create-slot-recipe-context-DJkLYvCT.js";
6
- import { useState as J, useEffect as Q, forwardRef as T, useId as ee } from "react";
7
- import { a as te, b as x, l as ae, m as se, f as m, h as oe, c as _, i as re, j as ne, k as ie, n as ce } from "./use-locale-context-zakBNK5b.js";
8
- import { u as le, s as O, R as B } from "./render-strategy-Cr139kIz.js";
9
- import { U as y, f as ue, e as f, i as de, L as ge, x as fe, z as be, c as pe, a as ve, V as Te, E as me, aq as ye, r as v, aj as he, ar as Re, as as Ce, W as Ee, X as Pe, Z as Ve, at as Ie, D as Ae } from "./index-DLvqBeH6.js";
3
+ import { N as z } from "./notificationCounter.component-CG5067PO.js";
4
+ import { W as G } from "./heading.component-CVm2LGDL.js";
5
+ import { c as Q } from "./create-slot-recipe-context-DJkLYvCT.js";
6
+ import { useState as J, useEffect as Z, forwardRef as T, useId as ee } from "react";
7
+ import { a as te, b as x, l as ae, m as se, f as m, h as oe, c as _, i as re, j as ne, k as ie, n as ce } from "./use-locale-context-BnlMA8su.js";
8
+ import { u as le, s as O, R as B } from "./render-strategy-DBmKAZIM.js";
9
+ import { Y as y, c as ue, a as de, a0 as ge, E as fe, aq as be, r as v, ar as pe, as as ve, S as Te, f as me, e as f, i as ye, L as he, x as Re, z as Ce, at as Ee, D as Pe, aj as Ve, P as Ie, Q as Ae } from "./index-B8d8Hi2Q.js";
10
10
  function xe(e, t) {
11
11
  const [s, a] = J(e);
12
- return Q(() => {
12
+ return Z(() => {
13
13
  const r = setTimeout(() => {
14
14
  a(e);
15
15
  }, t);
@@ -46,18 +46,18 @@ const W = T((e, t) => {
46
46
  return /* @__PURE__ */ c.jsx(m.button, { ...o, ref: t });
47
47
  });
48
48
  W.displayName = "TabTrigger";
49
- var Fe = ue("tabs").parts("root", "list", "trigger", "content", "indicator"), h = Fe.build(), Ne = (e) => e.ids?.root ?? `tabs:${e.id}`, R = (e) => e.ids?.list ?? `tabs:${e.id}:list`, N = (e, t) => e.ids?.content ?? `tabs:${e.id}:content-${t}`, b = (e, t) => e.ids?.trigger ?? `tabs:${e.id}:trigger-${t}`, M = (e) => e.ids?.indicator ?? `tabs:${e.id}:indicator`, _e = (e) => e.getById(R(e)), we = (e, t) => e.getById(N(e, t)), A = (e, t) => e.getById(b(e, t)), j = (e) => e.getById(M(e)), C = (e) => {
49
+ var Fe = me("tabs").parts("root", "list", "trigger", "content", "indicator"), h = Fe.build(), Ne = (e) => e.ids?.root ?? `tabs:${e.id}`, R = (e) => e.ids?.list ?? `tabs:${e.id}:list`, N = (e, t) => e.ids?.content ?? `tabs:${e.id}:content-${t}`, b = (e, t) => e.ids?.trigger ?? `tabs:${e.id}:trigger-${t}`, M = (e) => e.ids?.indicator ?? `tabs:${e.id}:indicator`, _e = (e) => e.getById(R(e)), we = (e, t) => e.getById(N(e, t)), A = (e, t) => e.getById(b(e, t)), j = (e) => e.getById(M(e)), C = (e) => {
50
50
  const s = `[role=tab][data-ownedby='${CSS.escape(R(e))}']:not([disabled])`;
51
- return Ae(_e(e), s);
52
- }, Le = (e) => Pe(C(e)), Se = (e) => Ee(C(e)), je = (e, t) => Ce(C(e), b(e, t.value), t.loopFocus), Oe = (e, t) => Re(C(e), b(e, t.value), t.loopFocus), X = (e) => ({
51
+ return Pe(_e(e), s);
52
+ }, Le = (e) => Ae(C(e)), Se = (e) => Ie(C(e)), je = (e, t) => ve(C(e), b(e, t.value), t.loopFocus), Oe = (e, t) => pe(C(e), b(e, t.value), t.loopFocus), H = (e) => ({
53
53
  left: e?.offsetLeft ?? 0,
54
54
  top: e?.offsetTop ?? 0,
55
55
  width: e?.offsetWidth ?? 0,
56
56
  height: e?.offsetHeight ?? 0
57
57
  }), Be = (e, t) => {
58
- const s = Ie(C(e), b(e, t));
59
- return H(X(s));
60
- }, H = (e) => ({
58
+ const s = Ee(C(e), b(e, t));
59
+ return X(H(s));
60
+ }, X = (e) => ({
61
61
  width: `${e.width}px`,
62
62
  height: `${e.height}px`,
63
63
  left: `${e.left}px`,
@@ -118,7 +118,7 @@ function ke(e, t) {
118
118
  "data-orientation": o("orientation"),
119
119
  "aria-label": u?.listLabel,
120
120
  onKeyDown(i) {
121
- if (i.defaultPrevented || !ge(i) || fe(i)) return;
121
+ if (i.defaultPrevented || !he(i) || Re(i)) return;
122
122
  const l = {
123
123
  ArrowDown() {
124
124
  V || a({ type: "ARROW_NEXT", key: "ArrowDown" });
@@ -142,7 +142,7 @@ function ke(e, t) {
142
142
  a({ type: "ENTER" });
143
143
  }
144
144
  };
145
- let d = be(i, {
145
+ let d = Ce(i, {
146
146
  dir: o("dir"),
147
147
  orientation: o("orientation")
148
148
  });
@@ -179,7 +179,7 @@ function ke(e, t) {
179
179
  I.relatedTarget?.getAttribute("role") !== "tab" && a({ type: "TAB_BLUR" });
180
180
  },
181
181
  onClick(I) {
182
- I.defaultPrevented || d || (de() && I.currentTarget.focus(), a({ type: "TAB_CLICK", value: l }));
182
+ I.defaultPrevented || d || (ye() && I.currentTarget.focus(), a({ type: "TAB_CLICK", value: l }));
183
183
  }
184
184
  });
185
185
  },
@@ -222,7 +222,7 @@ function ke(e, t) {
222
222
  }
223
223
  };
224
224
  }
225
- var { not: $e } = ve(), De = pe({
225
+ var { not: $e } = de(), De = ue({
226
226
  props({ props: e }) {
227
227
  return {
228
228
  dir: "ltr",
@@ -231,7 +231,7 @@ var { not: $e } = ve(), De = pe({
231
231
  loopFocus: !0,
232
232
  composite: !0,
233
233
  navigate(t) {
234
- Ve(t.node);
234
+ Te(t.node);
235
235
  },
236
236
  defaultValue: null,
237
237
  ...e
@@ -421,7 +421,7 @@ var { not: $e } = ve(), De = pe({
421
421
  if (!s) return;
422
422
  const a = we(t, s);
423
423
  if (!a) return;
424
- he(a).length > 0 ? a.removeAttribute("tabindex") : a.setAttribute("tabindex", "0");
424
+ Ve(a).length > 0 ? a.removeAttribute("tabindex") : a.setAttribute("tabindex", "0");
425
425
  });
426
426
  },
427
427
  cleanupObserver({ refs: e }) {
@@ -438,7 +438,7 @@ var { not: $e } = ve(), De = pe({
438
438
  e.set("indicatorTransition", !1);
439
439
  return;
440
440
  }
441
- A(s, a) && (e.set("indicatorRect", Be(s, a)), ye(() => {
441
+ A(s, a) && (e.set("indicatorRect", Be(s, a)), be(() => {
442
442
  e.set("indicatorTransition", !1);
443
443
  }));
444
444
  },
@@ -455,13 +455,13 @@ var { not: $e } = ve(), De = pe({
455
455
  }
456
456
  const o = A(s, r), n = j(s);
457
457
  if (!o || !n) return;
458
- const u = me([o], {
458
+ const u = fe([o], {
459
459
  measure(p) {
460
- return X(p);
460
+ return H(p);
461
461
  },
462
462
  onEntry({ rects: p }) {
463
463
  const [P] = p;
464
- e.set("indicatorRect", H(P));
464
+ e.set("indicatorRect", X(P));
465
465
  }
466
466
  });
467
467
  t.set("indicatorCleanup", u);
@@ -470,7 +470,7 @@ var { not: $e } = ve(), De = pe({
470
470
  const a = e.get("value");
471
471
  if (!a) return;
472
472
  const r = A(s, a);
473
- Te(r) && t("navigate")?.({ value: a, node: r, href: r.href });
473
+ ge(r) && t("navigate")?.({ value: a, node: r, href: r.href });
474
474
  }
475
475
  }
476
476
  }
@@ -521,17 +521,17 @@ const Ue = (e) => {
521
521
  return /* @__PURE__ */ c.jsx(k, { value: n, children: /* @__PURE__ */ c.jsx(B, { value: s, children: /* @__PURE__ */ c.jsx(m.div, { ...u, ref: t }) }) });
522
522
  });
523
523
  K.displayName = "TabsRoot";
524
- const q = T((e, t) => {
524
+ const Y = T((e, t) => {
525
525
  const [s, a] = O(e), [{ value: r }, o] = x()(a, ["value"]), n = y(r.getRootProps(), o);
526
526
  return /* @__PURE__ */ c.jsx(k, { value: r, children: /* @__PURE__ */ c.jsx(B, { value: s, children: /* @__PURE__ */ c.jsx(m.div, { ...n, ref: t }) }) });
527
527
  });
528
- q.displayName = "TabsRootProvider";
528
+ Y.displayName = "TabsRootProvider";
529
529
  const {
530
- withProvider: z,
530
+ withProvider: q,
531
531
  withContext: E
532
- } = Z({ key: "tabs" });
533
- z(q, "root", { forwardAsChild: !0 });
534
- const We = z(
532
+ } = Q({ key: "tabs" });
533
+ q(Y, "root", { forwardAsChild: !0 });
534
+ const We = q(
535
535
  K,
536
536
  "root",
537
537
  { forwardAsChild: !0 }
@@ -539,13 +539,13 @@ const We = z(
539
539
  W,
540
540
  "trigger",
541
541
  { forwardAsChild: !0 }
542
- ), Xe = E(
542
+ ), He = E(
543
543
  $,
544
544
  "content",
545
545
  { forwardAsChild: !0 }
546
546
  );
547
547
  E("div", "contentGroup");
548
- const He = E(
548
+ const Xe = E(
549
549
  U,
550
550
  "list",
551
551
  { forwardAsChild: !0 }
@@ -560,12 +560,12 @@ const Ke = {
560
560
  sm: "md",
561
561
  md: "md",
562
562
  lg: "lg"
563
- }, qe = {
563
+ }, Ye = {
564
564
  xs: "xs",
565
565
  sm: "xs",
566
566
  md: "sm",
567
567
  lg: "md"
568
- }, ze = ({
568
+ }, qe = ({
569
569
  iconName: e,
570
570
  iconPosition: t = "left",
571
571
  label: s,
@@ -585,11 +585,11 @@ const Ke = {
585
585
  }
586
586
  ),
587
587
  /* @__PURE__ */ c.jsx(
588
- Y,
588
+ G,
589
589
  {
590
590
  className: "Tab__Label",
591
591
  "data-testid": "kibble-tab-label",
592
- size: qe[o],
592
+ size: Ye[o],
593
593
  children: s
594
594
  }
595
595
  ),
@@ -603,7 +603,7 @@ const Ke = {
603
603
  }
604
604
  ),
605
605
  r && /* @__PURE__ */ c.jsx(
606
- G,
606
+ z,
607
607
  {
608
608
  className: "Tab__NotificationCounter",
609
609
  "data-testid": "kibble-tab-notification-counter",
@@ -628,12 +628,12 @@ const Ke = {
628
628
  onValueChange: ({ value: n }) => t?.(n),
629
629
  ...o,
630
630
  children: [
631
- /* @__PURE__ */ c.jsx(He, { className: "Tabs__List", "data-testid": "kibble-tabs-list", children: a.map((n, u) => /* @__PURE__ */ c.jsx(ze, { ...n }, `tab-${u}`)) }),
632
- !!r && r.map((n, u) => /* @__PURE__ */ c.jsx(Xe, { ...n }, `tabContent-${u}`))
631
+ /* @__PURE__ */ c.jsx(Xe, { className: "Tabs__List", "data-testid": "kibble-tabs-list", children: a.map((n, u) => /* @__PURE__ */ c.jsx(qe, { ...n }, `tab-${u}`)) }),
632
+ !!r && r.map((n, u) => /* @__PURE__ */ c.jsx(He, { ...n }, `tabContent-${u}`))
633
633
  ]
634
634
  }
635
635
  );
636
636
  export {
637
637
  rt as T
638
638
  };
639
- //# sourceMappingURL=tabs.component-DlaP-qhJ.js.map
639
+ //# sourceMappingURL=tabs.component-BuknlGMy.js.map