@televet/kibble-ui 5.0.20-alpha.hunter.9 → 5.0.20

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 (259) hide show
  1. package/dist/chunks/{avatarGroup.component-BHchH_tF.js → avatarGroup.component-CJCQSIyr.js} +2 -2
  2. package/dist/chunks/{avatarGroup.component-BHchH_tF.js.map → avatarGroup.component-CJCQSIyr.js.map} +1 -1
  3. package/dist/chunks/{avatarGroup.component-Ba_rfWUg.js → avatarGroup.component-M84HNv2O.js} +2 -2
  4. package/dist/chunks/{avatarGroup.component-Ba_rfWUg.js.map → avatarGroup.component-M84HNv2O.js.map} +1 -1
  5. package/dist/chunks/{buttonGroup.component-BNOBvOyv.js → buttonGroup.component-HKh7TJ0v.js} +2 -2
  6. package/dist/chunks/{buttonGroup.component-BNOBvOyv.js.map → buttonGroup.component-HKh7TJ0v.js.map} +1 -1
  7. package/dist/chunks/{buttonGroup.component-BXiKIlPf.js → buttonGroup.component-pR0mvmm7.js} +2 -2
  8. package/dist/chunks/{buttonGroup.component-BXiKIlPf.js.map → buttonGroup.component-pR0mvmm7.js.map} +1 -1
  9. package/dist/chunks/{calendar.component-IbKgfA9K.js → calendar.component-BFSyxaB6.js} +2 -2
  10. package/dist/chunks/{calendar.component-IbKgfA9K.js.map → calendar.component-BFSyxaB6.js.map} +1 -1
  11. package/dist/chunks/{calendar.component-BG7_Kwgn.js → calendar.component-UUc8d3QQ.js} +2 -2
  12. package/dist/chunks/{calendar.component-BG7_Kwgn.js.map → calendar.component-UUc8d3QQ.js.map} +1 -1
  13. package/dist/chunks/{checkbox.component-DdOVYSSc.js → checkbox.component-C132vkan.js} +2 -2
  14. package/dist/chunks/{checkbox.component-DdOVYSSc.js.map → checkbox.component-C132vkan.js.map} +1 -1
  15. package/dist/chunks/{checkbox.component-DDsVfE4a.js → checkbox.component-DUJCiZr2.js} +2 -2
  16. package/dist/chunks/{checkbox.component-DDsVfE4a.js.map → checkbox.component-DUJCiZr2.js.map} +1 -1
  17. package/dist/chunks/{checkboxGroup.component-CvHKP7gd.js → checkboxGroup.component-2U0ZW1TD.js} +2 -2
  18. package/dist/chunks/{checkboxGroup.component-CvHKP7gd.js.map → checkboxGroup.component-2U0ZW1TD.js.map} +1 -1
  19. package/dist/chunks/{checkboxGroup.component-Cx2Gvii5.js → checkboxGroup.component-DW9qUlSm.js} +3 -3
  20. package/dist/chunks/{checkboxGroup.component-Cx2Gvii5.js.map → checkboxGroup.component-DW9qUlSm.js.map} +1 -1
  21. package/dist/chunks/{conversationCard.component-0D3jmvOf.js → conversationCard.component-CscMIq51.js} +2 -2
  22. package/dist/chunks/{conversationCard.component-0D3jmvOf.js.map → conversationCard.component-CscMIq51.js.map} +1 -1
  23. package/dist/chunks/{conversationCard.component-D7hpX-QG.js → conversationCard.component-HYxRoILR.js} +2 -2
  24. package/dist/chunks/{conversationCard.component-D7hpX-QG.js.map → conversationCard.component-HYxRoILR.js.map} +1 -1
  25. package/dist/chunks/{datePicker.component-BuHqzdy_.js → datePicker.component-BuGpHTzS.js} +2 -2
  26. package/dist/chunks/{datePicker.component-BuHqzdy_.js.map → datePicker.component-BuGpHTzS.js.map} +1 -1
  27. package/dist/chunks/{datePicker.component-BmmxcyyX.js → datePicker.component-Dq2vL7Mk.js} +3 -3
  28. package/dist/chunks/{datePicker.component-BmmxcyyX.js.map → datePicker.component-Dq2vL7Mk.js.map} +1 -1
  29. package/dist/chunks/{datePicker.provider-ElRAMKbN.js → datePicker.provider-CavuOZl4.js} +747 -750
  30. package/dist/chunks/{datePicker.provider-ElRAMKbN.js.map → datePicker.provider-CavuOZl4.js.map} +1 -1
  31. package/dist/chunks/datePicker.provider-i35-VNAb.js +15 -0
  32. package/dist/chunks/{datePicker.provider-B7-cWUkv.js.map → datePicker.provider-i35-VNAb.js.map} +1 -1
  33. package/dist/chunks/{dateTimePicker.component-CAYI8EOg.js → dateTimePicker.component-BlWhC5aT.js} +2 -2
  34. package/dist/chunks/{dateTimePicker.component-CAYI8EOg.js.map → dateTimePicker.component-BlWhC5aT.js.map} +1 -1
  35. package/dist/chunks/{dateTimePicker.component-Dnqx_xtK.js → dateTimePicker.component-DnYStcAJ.js} +4 -4
  36. package/dist/chunks/{dateTimePicker.component-Dnqx_xtK.js.map → dateTimePicker.component-DnYStcAJ.js.map} +1 -1
  37. package/dist/chunks/{menu.component-BEDMybmZ.js → menu.component-CV8eVKYt.js} +3 -3
  38. package/dist/chunks/{menu.component-BEDMybmZ.js.map → menu.component-CV8eVKYt.js.map} +1 -1
  39. package/dist/chunks/{menu.component-DypBuCwv.js → menu.component-D2V9Q1Y5.js} +2 -2
  40. package/dist/chunks/{menu.component-DypBuCwv.js.map → menu.component-D2V9Q1Y5.js.map} +1 -1
  41. package/dist/chunks/{numberInput.component-DG6IWAHs.js → numberInput.component-DGPEz0Fv.js} +2 -2
  42. package/dist/chunks/{numberInput.component-DG6IWAHs.js.map → numberInput.component-DGPEz0Fv.js.map} +1 -1
  43. package/dist/chunks/{numberInput.component-DFK4EYLV.js → numberInput.component-V6NQs14b.js} +2 -2
  44. package/dist/chunks/{numberInput.component-DFK4EYLV.js.map → numberInput.component-V6NQs14b.js.map} +1 -1
  45. package/dist/chunks/{pinInput.types-ftBwVMLj.js → pinInput.types-Can9f1Eu.js} +2 -2
  46. package/dist/chunks/{pinInput.types-ftBwVMLj.js.map → pinInput.types-Can9f1Eu.js.map} +1 -1
  47. package/dist/chunks/{pinInput.types-BmXYQb7O.js → pinInput.types-bIGh7aUS.js} +2 -2
  48. package/dist/chunks/{pinInput.types-BmXYQb7O.js.map → pinInput.types-bIGh7aUS.js.map} +1 -1
  49. package/dist/chunks/{radioGroup.types-CVFQ5dZ7.js → radioGroup.types-BVbxeB22.js} +3 -3
  50. package/dist/chunks/{radioGroup.types-CVFQ5dZ7.js.map → radioGroup.types-BVbxeB22.js.map} +1 -1
  51. package/dist/chunks/{radioGroup.types-DxRSugsr.js → radioGroup.types-U1ep9nrN.js} +2 -2
  52. package/dist/chunks/{radioGroup.types-DxRSugsr.js.map → radioGroup.types-U1ep9nrN.js.map} +1 -1
  53. package/dist/chunks/{rating.component-CQgpD-gS.js → rating.component-DeJY9G94.js} +2 -2
  54. package/dist/chunks/rating.component-DeJY9G94.js.map +1 -0
  55. package/dist/chunks/{rating.component-FYKS_NCl.js → rating.component-DsHkKmA7.js} +2 -2
  56. package/dist/chunks/rating.component-DsHkKmA7.js.map +1 -0
  57. package/dist/chunks/{ratingDots.component-C1KgTGWj.js → ratingDots.component-BhWM7kTg.js} +2 -2
  58. package/dist/chunks/{ratingDots.component-C1KgTGWj.js.map → ratingDots.component-BhWM7kTg.js.map} +1 -1
  59. package/dist/chunks/{ratingDots.component-DesbSj0q.js → ratingDots.component-CZ370iI3.js} +2 -2
  60. package/dist/chunks/{ratingDots.component-DesbSj0q.js.map → ratingDots.component-CZ370iI3.js.map} +1 -1
  61. package/dist/chunks/{select.component-BkDkYpf2.js → select.component-CIjEq1os.js} +3 -3
  62. package/dist/chunks/{select.component-BkDkYpf2.js.map → select.component-CIjEq1os.js.map} +1 -1
  63. package/dist/chunks/{select.component-DoFwe4lJ.js → select.component-OrsHXCMz.js} +2 -2
  64. package/dist/chunks/{select.component-DoFwe4lJ.js.map → select.component-OrsHXCMz.js.map} +1 -1
  65. package/dist/chunks/semanticTokens.records-CmeaObFQ.js +2 -0
  66. package/dist/chunks/semanticTokens.records-CmeaObFQ.js.map +1 -0
  67. package/dist/chunks/semanticTokens.records-CwC7zhMS.js +549 -0
  68. package/dist/chunks/semanticTokens.records-CwC7zhMS.js.map +1 -0
  69. package/dist/chunks/{switch.component-Bs-8D1pU.js → switch.component-BYEMhBCA.js} +2 -2
  70. package/dist/chunks/{switch.component-Bs-8D1pU.js.map → switch.component-BYEMhBCA.js.map} +1 -1
  71. package/dist/chunks/{switch.component-Cr8Abw0U.js → switch.component-DjN67nap.js} +2 -2
  72. package/dist/chunks/{switch.component-Cr8Abw0U.js.map → switch.component-DjN67nap.js.map} +1 -1
  73. package/dist/chunks/{tagBlock.component-BWXHnUPn.js → tagBlock.component-B899iqQP.js} +2 -2
  74. package/dist/chunks/{tagBlock.component-BWXHnUPn.js.map → tagBlock.component-B899iqQP.js.map} +1 -1
  75. package/dist/chunks/{tagBlock.component-DjbevH0J.js → tagBlock.component-R4FY7ytN.js} +2 -2
  76. package/dist/chunks/{tagBlock.component-DjbevH0J.js.map → tagBlock.component-R4FY7ytN.js.map} +1 -1
  77. package/dist/chunks/{textInput.component-C7kdQ8hF.js → textInput.component-BeiTxTkS.js} +2 -2
  78. package/dist/chunks/{textInput.component-C7kdQ8hF.js.map → textInput.component-BeiTxTkS.js.map} +1 -1
  79. package/dist/chunks/{textInput.component-DzUKTy1w.js → textInput.component-CwTc0h_F.js} +2 -2
  80. package/dist/chunks/{textInput.component-DzUKTy1w.js.map → textInput.component-CwTc0h_F.js.map} +1 -1
  81. package/dist/chunks/{textarea.component-DteG1L4y.js → textarea.component-BIg_XX_R.js} +2 -2
  82. package/dist/chunks/{textarea.component-DteG1L4y.js.map → textarea.component-BIg_XX_R.js.map} +1 -1
  83. package/dist/chunks/{textarea.component-W9VBnd4-.js → textarea.component-C6Wt1Pk8.js} +2 -2
  84. package/dist/chunks/{textarea.component-W9VBnd4-.js.map → textarea.component-C6Wt1Pk8.js.map} +1 -1
  85. package/dist/chunks/{theme.provider-Cl9_chOv.js → theme.provider-CvuSdLO6.js} +963 -1625
  86. package/dist/chunks/theme.provider-CvuSdLO6.js.map +1 -0
  87. package/dist/chunks/theme.provider-DwwXiHZn.js +28 -0
  88. package/dist/chunks/theme.provider-DwwXiHZn.js.map +1 -0
  89. package/dist/chunks/timePicker.component-BCMX6aqb.js +220 -0
  90. package/dist/chunks/timePicker.component-BCMX6aqb.js.map +1 -0
  91. package/dist/chunks/timePicker.component-D5hw80VV.js +2 -0
  92. package/dist/chunks/timePicker.component-D5hw80VV.js.map +1 -0
  93. package/dist/chunks/{timeRange.component-oc3ptJ_N.js → timeRange.component-BZHpZeAX.js} +2 -2
  94. package/dist/chunks/timeRange.component-BZHpZeAX.js.map +1 -0
  95. package/dist/chunks/{timeRange.component-LBzKy8H3.js → timeRange.component-D3Db8lvh.js} +2 -2
  96. package/dist/chunks/timeRange.component-D3Db8lvh.js.map +1 -0
  97. package/dist/chunks/{withFormControl-08PrhcOk.js → withFormControl-DW9A6BSL.js} +2 -2
  98. package/dist/chunks/{withFormControl-08PrhcOk.js.map → withFormControl-DW9A6BSL.js.map} +1 -1
  99. package/dist/chunks/withFormControl-QV_Jridv.js +2 -0
  100. package/dist/chunks/{withFormControl-BSlIlVY0.js.map → withFormControl-QV_Jridv.js.map} +1 -1
  101. package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
  102. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  103. package/dist/cjs/components/Calendar/index.cjs +1 -1
  104. package/dist/cjs/components/Checkbox/index.cjs +1 -1
  105. package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
  106. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  107. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  108. package/dist/cjs/components/DateTimePicker/index.cjs +1 -1
  109. package/dist/cjs/components/Menu/index.cjs +1 -1
  110. package/dist/cjs/components/NumberInput/index.cjs +1 -1
  111. package/dist/cjs/components/PinInput/index.cjs +1 -1
  112. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  113. package/dist/cjs/components/Rating/index.cjs +1 -1
  114. package/dist/cjs/components/RatingDots/index.cjs +1 -1
  115. package/dist/cjs/components/Select/index.cjs +1 -1
  116. package/dist/cjs/components/Switch/index.cjs +1 -1
  117. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  118. package/dist/cjs/components/TextInput/index.cjs +1 -1
  119. package/dist/cjs/components/Textarea/index.cjs +1 -1
  120. package/dist/cjs/components/TimePicker/index.cjs +1 -1
  121. package/dist/cjs/components/TimeRange/index.cjs +1 -1
  122. package/dist/cjs/components/index.cjs +1 -1
  123. package/dist/cjs/hooks/useBreakpoint/index.cjs.map +1 -1
  124. package/dist/cjs/hooks/useDeviceType/index.cjs.map +1 -1
  125. package/dist/cjs/index.cjs +1 -1
  126. package/dist/cjs/theme/index.cjs +1 -1
  127. package/dist/cjs/theme/semanticTokens/index.cjs +1 -1
  128. package/dist/cjs/theme/semanticTokens/index.cjs.map +1 -1
  129. package/dist/cjs/theme/tokens/blurs/index.cjs +1 -1
  130. package/dist/cjs/theme/tokens/blurs/index.cjs.map +1 -1
  131. package/dist/cjs/theme/tokens/borders/index.cjs +1 -1
  132. package/dist/cjs/theme/tokens/borders/index.cjs.map +1 -1
  133. package/dist/cjs/theme/tokens/colors/index.cjs.map +1 -1
  134. package/dist/cjs/theme/tokens/index.cjs +1 -1
  135. package/dist/cjs/theme/tokens/shadows/index.cjs +1 -1
  136. package/dist/cjs/theme/tokens/shadows/index.cjs.map +1 -1
  137. package/dist/cjs/theme/tokens/sizes/index.cjs +1 -1
  138. package/dist/cjs/theme/tokens/sizes/index.cjs.map +1 -1
  139. package/dist/cjs/theme/tokens/spacing/index.cjs +1 -1
  140. package/dist/cjs/theme/tokens/spacing/index.cjs.map +1 -1
  141. package/dist/cjs/theme/tokens/transitions/index.cjs +1 -1
  142. package/dist/cjs/theme/tokens/transitions/index.cjs.map +1 -1
  143. package/dist/cjs/theme/tokens/typography/index.cjs +1 -1
  144. package/dist/cjs/theme/tokens/typography/index.cjs.map +1 -1
  145. package/dist/cjs/theme/tokens/zIndices/index.cjs +1 -1
  146. package/dist/cjs/theme/tokens/zIndices/index.cjs.map +1 -1
  147. package/dist/esm/components/AvatarGroup/index.js +1 -1
  148. package/dist/esm/components/ButtonGroup/index.js +1 -1
  149. package/dist/esm/components/Calendar/index.js +1 -1
  150. package/dist/esm/components/Checkbox/index.js +1 -1
  151. package/dist/esm/components/CheckboxGroup/index.js +1 -1
  152. package/dist/esm/components/ConversationCard/index.js +1 -1
  153. package/dist/esm/components/DatePicker/index.js +2 -2
  154. package/dist/esm/components/DateTimePicker/index.js +1 -1
  155. package/dist/esm/components/Menu/index.js +1 -1
  156. package/dist/esm/components/NumberInput/index.js +1 -1
  157. package/dist/esm/components/PinInput/index.js +1 -1
  158. package/dist/esm/components/RadioGroup/index.js +1 -1
  159. package/dist/esm/components/Rating/index.js +1 -1
  160. package/dist/esm/components/RatingDots/index.js +1 -1
  161. package/dist/esm/components/Select/index.js +1 -1
  162. package/dist/esm/components/Switch/index.js +1 -1
  163. package/dist/esm/components/TagBlock/index.js +1 -1
  164. package/dist/esm/components/TextInput/index.js +1 -1
  165. package/dist/esm/components/Textarea/index.js +1 -1
  166. package/dist/esm/components/TimePicker/index.js +1 -1
  167. package/dist/esm/components/TimeRange/index.js +1 -1
  168. package/dist/esm/components/index.js +22 -22
  169. package/dist/esm/hooks/useBreakpoint/index.js.map +1 -1
  170. package/dist/esm/hooks/useDeviceType/index.js.map +1 -1
  171. package/dist/esm/index.js +23 -23
  172. package/dist/esm/theme/index.js +1 -1
  173. package/dist/esm/theme/semanticTokens/index.js +10 -4
  174. package/dist/esm/theme/semanticTokens/index.js.map +1 -1
  175. package/dist/esm/theme/tokens/blurs/index.js +13 -1
  176. package/dist/esm/theme/tokens/blurs/index.js.map +1 -1
  177. package/dist/esm/theme/tokens/borders/index.js +22 -1
  178. package/dist/esm/theme/tokens/borders/index.js.map +1 -1
  179. package/dist/esm/theme/tokens/colors/index.js.map +1 -1
  180. package/dist/esm/theme/tokens/index.js +26 -2
  181. package/dist/esm/theme/tokens/index.js.map +1 -1
  182. package/dist/esm/theme/tokens/shadows/index.js +55 -1
  183. package/dist/esm/theme/tokens/shadows/index.js.map +1 -1
  184. package/dist/esm/theme/tokens/sizes/index.js +28 -1
  185. package/dist/esm/theme/tokens/sizes/index.js.map +1 -1
  186. package/dist/esm/theme/tokens/spacing/index.js +38 -1
  187. package/dist/esm/theme/tokens/spacing/index.js.map +1 -1
  188. package/dist/esm/theme/tokens/transitions/index.js +17 -1
  189. package/dist/esm/theme/tokens/transitions/index.js.map +1 -1
  190. package/dist/esm/theme/tokens/typography/index.js +53 -1
  191. package/dist/esm/theme/tokens/typography/index.js.map +1 -1
  192. package/dist/esm/theme/tokens/zIndices/index.js +19 -1
  193. package/dist/esm/theme/tokens/zIndices/index.js.map +1 -1
  194. package/dist/types/components/DatePicker/context/datePicker.provider.d.ts +1 -2
  195. package/dist/types/components/Heading/heading.recipe.d.ts +1 -1
  196. package/dist/types/components/Link/link.recipe.d.ts +1 -1
  197. package/dist/types/components/Rating/rating.component.d.ts +1 -1
  198. package/dist/types/components/Text/text.recipe.d.ts +1 -1
  199. package/dist/types/components/TimePicker/timePicker.component.d.ts +1 -2
  200. package/dist/types/components/TimeRange/timeRange.component.d.ts +0 -1
  201. package/dist/types/theme/semanticTokens/aliasPurpose.records.d.ts +1 -1
  202. package/dist/types/theme/semanticTokens/index.d.ts +1 -2
  203. package/dist/types/theme/semanticTokens/semanticTokens.config.d.ts +37 -37
  204. package/dist/types/theme/semanticTokens/utils/flattenSemanticTokenRecord.d.ts +1 -1
  205. package/dist/types/theme/semanticTokens/utils/getSemanticColorToken.d.ts +1 -1
  206. package/dist/types/theme/tokens/blurs/index.d.ts +1 -1
  207. package/dist/types/theme/tokens/borders/index.d.ts +1 -1
  208. package/dist/types/theme/tokens/colors/colors.config.d.ts +1 -1
  209. package/dist/types/theme/tokens/colors/index.d.ts +1 -2
  210. package/dist/types/theme/tokens/shadows/index.d.ts +1 -1
  211. package/dist/types/theme/tokens/sizes/index.d.ts +1 -1
  212. package/dist/types/theme/tokens/spacing/index.d.ts +1 -1
  213. package/dist/types/theme/tokens/spacing/spacing.config.d.ts +2 -2
  214. package/dist/types/theme/tokens/transitions/index.d.ts +1 -1
  215. package/dist/types/theme/tokens/typography/index.d.ts +1 -1
  216. package/dist/types/theme/tokens/zIndices/index.d.ts +1 -1
  217. package/package.json +6 -3
  218. package/dist/chunks/datePicker.provider-B7-cWUkv.js +0 -15
  219. package/dist/chunks/invertToken-DkyAF_BY.js +0 -10
  220. package/dist/chunks/invertToken-DkyAF_BY.js.map +0 -1
  221. package/dist/chunks/invertToken-Em3s32gh.js +0 -2
  222. package/dist/chunks/invertToken-Em3s32gh.js.map +0 -1
  223. package/dist/chunks/rating.component-CQgpD-gS.js.map +0 -1
  224. package/dist/chunks/rating.component-FYKS_NCl.js.map +0 -1
  225. package/dist/chunks/theme.provider-BWhqnOFC.js +0 -28
  226. package/dist/chunks/theme.provider-BWhqnOFC.js.map +0 -1
  227. package/dist/chunks/theme.provider-Cl9_chOv.js.map +0 -1
  228. package/dist/chunks/timePicker.component-DIUqae3b.js +0 -2
  229. package/dist/chunks/timePicker.component-DIUqae3b.js.map +0 -1
  230. package/dist/chunks/timePicker.component-Dl3BE6eW.js +0 -230
  231. package/dist/chunks/timePicker.component-Dl3BE6eW.js.map +0 -1
  232. package/dist/chunks/timeRange.component-LBzKy8H3.js.map +0 -1
  233. package/dist/chunks/timeRange.component-oc3ptJ_N.js.map +0 -1
  234. package/dist/chunks/typography.records-BEd2lI_g.js +0 -54
  235. package/dist/chunks/typography.records-BEd2lI_g.js.map +0 -1
  236. package/dist/chunks/typography.records-Cg_lT1Z3.js +0 -2
  237. package/dist/chunks/typography.records-Cg_lT1Z3.js.map +0 -1
  238. package/dist/chunks/withFormControl-BSlIlVY0.js +0 -2
  239. package/dist/types/theme/semanticTokens/semanticTokens.records.d.ts +0 -419
  240. package/dist/types/theme/semanticTokens/semanticTokens.types.d.ts +0 -17
  241. package/dist/types/theme/semanticTokens/utils/invertToken.d.ts +0 -2
  242. package/dist/types/theme/tokens/blurs/blurs.records.d.ts +0 -2
  243. package/dist/types/theme/tokens/blurs/blurs.types.d.ts +0 -1
  244. package/dist/types/theme/tokens/borders/borders.records.d.ts +0 -3
  245. package/dist/types/theme/tokens/borders/borders.types.d.ts +0 -2
  246. package/dist/types/theme/tokens/colors/colors.records.d.ts +0 -2
  247. package/dist/types/theme/tokens/colors/colors.types.d.ts +0 -2
  248. package/dist/types/theme/tokens/shadows/shadows.records.d.ts +0 -6
  249. package/dist/types/theme/tokens/shadows/shadows.types.d.ts +0 -2
  250. package/dist/types/theme/tokens/sizes/sizes.records.d.ts +0 -3
  251. package/dist/types/theme/tokens/sizes/sizes.types.d.ts +0 -2
  252. package/dist/types/theme/tokens/spacing/spacing.records.d.ts +0 -2
  253. package/dist/types/theme/tokens/spacing/spacing.types.d.ts +0 -1
  254. package/dist/types/theme/tokens/transitions/transitions.records.d.ts +0 -3
  255. package/dist/types/theme/tokens/transitions/transitions.types.d.ts +0 -2
  256. package/dist/types/theme/tokens/typography/typography.records.d.ts +0 -6
  257. package/dist/types/theme/tokens/typography/typography.types.d.ts +0 -5
  258. package/dist/types/theme/tokens/zIndices/zIndices.records.d.ts +0 -2
  259. package/dist/types/theme/tokens/zIndices/zIndices.types.d.ts +0 -1
@@ -1,2 +0,0 @@
1
- "use strict";const n=require("./jsx-runtime-BjDatQAs.js"),t=require("react"),J=require("./textInput.component-DzUKTy1w.js"),K=require("./popover.component-DTjA1GSd.js"),Q=require("./icon.component-B1hr5lLa.js"),U=require("./useIconTextSizeMap-BXmABb54.js"),X=require("./format-CK7Imh-5.js"),_=require("./index-BQRnVsAg.js"),z=require("./config-jChwZPSv.js"),ee=require("./use-recipe-DaPWl_pL.js"),N=require("./create-slot-recipe-context-HXE1VazG.js"),w=require("date-fns-tz"),te=require("date-fns"),se=z.defineRecipe({base:{borderRadius:"4px",cursor:"pointer",fontSize:"sm",px:3,py:1,textAlign:"center"},variants:{selected:{true:{background:"background.secondary",color:"text.contrast",_hover:{background:"background.secondary.hover"}},false:{background:"background",color:"text.subtle",_hover:{background:"background.secondaryAlpha.hover"}}}},defaultVariants:{selected:!1}}),oe=({value:s,innerRef:i,onClick:c,selected:l,["data-testid"]:d="kibble-timepicker-option"})=>{const m=ee.useRecipe({recipe:se})({selected:l}),a=t.useCallback(p=>{const r=p.currentTarget.textContent||"";c(r)},[c]);return n.jsxRuntimeExports.jsx(_.Box,{className:"TimePicker__Option","data-testid":d,ref:i,onClick:a,css:m,children:s})},H=z.defineSlotRecipe({slots:["trigger","container","list"],base:{trigger:{width:"100%"},container:{display:"flex",gap:1.5,height:"186px",overflow:"hidden"},list:{display:"flex",flexDirection:"column",gap:1,overflowY:"auto","&::webkit-scrollbar":{display:"none"}}}}),$=({options:s,optionType:i,selectedValue:c,onClick:l,open:d=!1,["data-testid"]:h="kibble-timepicker-list"})=>{const a=N.useSlotRecipe({recipe:H})(),p=t.useRef(null);return t.useEffect(()=>{d&&p.current&&requestAnimationFrame(()=>{p.current&&p.current.scrollIntoView({block:"center"})})},[d,c]),n.jsxRuntimeExports.jsx(_.Box,{className:"TimePicker__List","data-testid":`${h}-${i}-list`,css:a.list,children:s.map(r=>{const f=r===c;return n.jsxRuntimeExports.jsx(oe,{innerRef:f?p:null,value:r,selected:r===c,onClick:l,"data-testid":`${h}-${i}-option-${r}`},`${i}-option-${r}`)})})};var u=(s=>(s.AM="AM",s.PM="PM",s))(u||{});const ne=({initialTime:s,inputProps:i,minuteInterval:c=5,onTimeChange:l,onClose:d,placement:h="bottom",timezone:m,["data-testid"]:a="kibble-timepicker"})=>{const r=N.useSlotRecipe({recipe:H})(),[f,D]=t.useState(!1),[M,y]=t.useState(s),[R,O]=t.useState(),[x,q]=t.useState(),[j,E]=t.useState(),V=t.useMemo(()=>M?X.format(M,"h:mm aa"):"",[M]),P=e=>{const o=e.toString();return o.length===1?`0${o}`:o},B=t.useMemo(()=>[12,1,2,3,4,5,6,7,8,9,10,11].map(e=>e.toString()),[]),F=t.useMemo(()=>{const e=[];for(let o=0;o<60;o+=c)e.push(o);return e.map(P)},[c]),I=[u.AM,u.PM],v=t.useCallback(({date:e,timezone:o,reverse:k})=>{const b=w.getTimezoneOffset(Intl.DateTimeFormat().resolvedOptions().timeZone),S=w.getTimezoneOffset(o),C=k?S-b:b-S;return te.add(e,{minutes:C/1e3/60})},[]),g=t.useCallback((e,o,k)=>{const b=e||"12",S=o||"00",C=k||"AM";let A=0;e||O("12"),o||q("00"),k||E("AM"),C===u.PM&&Number(b)<12&&(A=12),C===u.AM&&Number(b)===12&&(A=-12);const Z=Number(b)+A,G=new Date().setHours(Z,Number(S),0,0);let T=new Date(G);console.log("testing: "+m),m&&(T=v({date:T,timezone:m})),y(T),l&&l(T)},[l,m,v]),L=t.useCallback(e=>{O(e),g(e,x,j)},[g,j,x]),W=t.useCallback(e=>{q(e),g(R,e,j)},[g,R,j]),Y=t.useCallback(e=>{E(e),g(R,x,e)},[g,R,x]);return t.useEffect(()=>{if(s){const e=new Date(s),k=e.getHours()%12||12;y(s),O(k.toString()),q(e.getMinutes().toString()),E(e.getHours()>11?u.PM:u.AM)}},[s]),n.jsxRuntimeExports.jsx(K.Popover,{open:f,onOpenChange:({open:e})=>{D(e),!e&&d&&d(M)},anchor:n.jsxRuntimeExports.jsx(_.Box,{className:"TimePicker__Trigger","data-testid":`${a}-trigger`,css:r.trigger,children:n.jsxRuntimeExports.jsx(J.WrappedTextInput,{placeholder:"12:00 AM",rightElement:n.jsxRuntimeExports.jsx(Q.Icon,{size:U.useIconTextSizeMap(i?.size||"md"),name:"clock"}),value:V,readOnly:!0,cursor:"pointer",...i,...f&&{"data-focus":"true"}})}),contentProps:{w:"max-content"},placement:h,variant:i?.onContrast?"contrast":"default",showArrow:!1,children:n.jsxRuntimeExports.jsxs(_.Box,{className:"TimePicker__Container","data-testid":`${a}-container`,css:r.container,children:[n.jsxRuntimeExports.jsx($,{options:B,optionType:"hour",selectedValue:R,onClick:L,open:f,"data-testid":`${a}-hour-list`}),n.jsxRuntimeExports.jsx($,{options:F,optionType:"minute",selectedValue:x?P(x):void 0,onClick:W,open:f,"data-testid":`${a}-minute-list`}),n.jsxRuntimeExports.jsx($,{options:I,optionType:"meridiem",selectedValue:j,onClick:Y,open:f,"data-testid":`${a}-meridiem-list`})]})})};exports.Meridiem=u;exports.TimePicker=ne;
2
- //# sourceMappingURL=timePicker.component-DIUqae3b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timePicker.component-DIUqae3b.js","sources":["../../src/components/TimePicker/components/TimeOption/timeOption.recipe.ts","../../src/components/TimePicker/components/TimeOption/timeOption.component.tsx","../../src/components/TimePicker/timePicker.recipe.ts","../../src/components/TimePicker/components/TimeList/timeList.component.tsx","../../src/components/TimePicker/timePicker.types.ts","../../src/components/TimePicker/timePicker.component.tsx"],"sourcesContent":["import { defineRecipe } from '@chakra-ui/react/styled-system';\n\nexport const timeOptionRecipe = defineRecipe({\n base: {\n borderRadius: '4px',\n cursor: 'pointer',\n fontSize: 'sm',\n px: 3,\n py: 1,\n textAlign: 'center',\n },\n variants: {\n selected: {\n true: {\n background: 'background.secondary',\n color: 'text.contrast',\n _hover: {\n background: 'background.secondary.hover',\n },\n },\n false: {\n background: 'background',\n color: 'text.subtle',\n _hover: {\n background: 'background.secondaryAlpha.hover',\n },\n },\n },\n },\n defaultVariants: {\n selected: false,\n },\n});\n","import React, { useCallback } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { timeOptionRecipe } from './timeOption.recipe';\n\ninterface TimeOptionProps {\n /** Ref to the option component. */\n innerRef?: React.Ref<HTMLDivElement | null> | null;\n /** Callback function to be called when the option is clicked. */\n onClick: (selectedValue: string) => void;\n /** If true, the option will be selected. */\n selected: boolean;\n /** Value of the option. */\n value: string;\n /** Data test id for the option.\n * @default kibble-timepicker-option\n */\n 'data-testid'?: string;\n}\n\nexport const TimeOption = ({\n value,\n innerRef,\n onClick,\n selected,\n ['data-testid']: dataTestId = 'kibble-timepicker-option',\n}: TimeOptionProps): React.JSX.Element => {\n const recipe = useRecipe({ recipe: timeOptionRecipe });\n const styles = recipe({ selected });\n\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedValue = event.currentTarget.textContent || '';\n onClick(selectedValue);\n },\n [onClick],\n );\n\n return (\n <Box className=\"TimePicker__Option\" data-testid={dataTestId} ref={innerRef} onClick={handleClick} css={styles}>\n {value}\n </Box>\n );\n};\n","import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nexport const timePickerRecipe = defineSlotRecipe({\n slots: ['trigger', 'container', 'list'],\n base: {\n trigger: {\n width: '100%',\n },\n container: {\n display: 'flex',\n gap: 1.5,\n height: '186px',\n overflow: 'hidden',\n },\n list: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n overflowY: 'auto',\n '&::webkit-scrollbar': {\n display: 'none',\n },\n },\n },\n});\n","import React, { useEffect, useRef } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { TimeOption } from '../TimeOption/timeOption.component';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { timePickerRecipe } from '../../timePicker.recipe';\n\ninterface ScrollContainerProps {\n /** Options to display in the list. */\n options: string[];\n /** Type of the option. */\n optionType: 'hour' | 'minute' | 'meridiem';\n /** Selected value of the list. */\n selectedValue?: string;\n /** Callback function to be called when the option is clicked. */\n onClick: (value: string) => void;\n /** Determines if the list is open. */\n open: boolean;\n /** Data test id for the list.\n * @default kibble-timepicker-list\n */\n 'data-testid'?: string;\n}\n\nexport const TimeList = ({\n options,\n optionType,\n selectedValue,\n onClick,\n open = false,\n ['data-testid']: dataTestId = 'kibble-timepicker-list',\n}: ScrollContainerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: timePickerRecipe });\n const styles = recipe();\n const itemRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (open && itemRef.current) {\n requestAnimationFrame(() => {\n if (itemRef.current) {\n itemRef.current.scrollIntoView({ block: 'center' });\n }\n });\n }\n }, [open, selectedValue]);\n\n return (\n <Box className=\"TimePicker__List\" data-testid={`${dataTestId}-${optionType}-list`} css={styles.list}>\n {options.map((option) => {\n const isSelected = option === selectedValue;\n return (\n <TimeOption\n key={`${optionType}-option-${option}`}\n innerRef={isSelected ? itemRef : null}\n value={option}\n selected={option === selectedValue}\n onClick={onClick}\n data-testid={`${dataTestId}-${optionType}-option-${option}`}\n />\n );\n })}\n </Box>\n );\n};\n","export enum Meridiem {\n AM = 'AM',\n PM = 'PM',\n}\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { TextInput, TextInputProps } from 'components/TextInput/textInput.component';\nimport { Popover } from 'components/Popover/popover.component';\nimport { Icon } from 'components/Icon/icon.component';\nimport { useIconTextSizeMap } from 'hooks/useIconTextSizeMap';\nimport format from 'date-fns/format';\nimport { Box } from '@chakra-ui/react/box';\nimport { TimeList } from './components/TimeList/timeList.component';\nimport { Meridiem } from './timePicker.types';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { timePickerRecipe } from './timePicker.recipe';\nimport { Placement } from 'shared/types/placement';\nimport { getTimezoneOffset } from 'date-fns-tz';\nimport { add } from 'date-fns';\n\nexport interface TimePickerProps {\n /** Initial time to be displayed in the input field. */\n initialTime?: Date;\n /** Props to customize the input field. See `TextInput` for more information. */\n inputProps?: Omit<TextInputProps, 'onChange' | 'value' | 'isClearable' | 'onClear'>;\n /**\n * Interval of minutes to be displayed in the dropdown.\n * @default 5\n */\n minuteInterval?: number;\n /** Callback function triggered when the time is changed. */\n onTimeChange?: (time: Date) => void;\n /** Callback function triggered when the time picker is closed. */\n onClose?: (time?: Date) => void;\n /**\n * Placement of the dropdown relative to the input field.\n * @default bottom\n */\n placement?: Placement;\n timezone?: string;\n /**\n * Data test id for the time picker.\n * @default kibble-timepicker\n */\n 'data-testid'?: string;\n}\n\nexport const TimePicker = ({\n initialTime,\n inputProps,\n minuteInterval = 5,\n onTimeChange,\n onClose,\n placement = 'bottom',\n timezone,\n ['data-testid']: dataTestId = 'kibble-timepicker',\n}: TimePickerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: timePickerRecipe });\n const styles = recipe();\n const [isOpen, setIsOpen] = useState(false);\n const [selectedTime, setSelectedTime] = useState(initialTime);\n const [selectedHour, setSelectedHour] = useState<string | undefined>();\n const [selectedMinute, setSelectedMinute] = useState<string | undefined>();\n const [selectedMeridiem, setSelectedMeridiem] = useState<string | undefined>();\n\n const formattedTime = useMemo(() => {\n if (!selectedTime) return '';\n return format(selectedTime, 'h:mm aa');\n }, [selectedTime]);\n\n const formatNumber = (number: number | string): string => {\n const formattedValue = number.toString();\n if (formattedValue.length === 1) {\n return `0${formattedValue}`;\n }\n\n return formattedValue;\n };\n\n const hourOptions = useMemo(() => {\n return [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((hour) => hour.toString());\n }, []);\n\n const minuteOptions = useMemo(() => {\n const minutes = [];\n for (let i = 0; i < 60; i += minuteInterval) {\n minutes.push(i);\n }\n\n return minutes.map(formatNumber);\n }, [minuteInterval]);\n\n const meridiemOptions = [Meridiem.AM, Meridiem.PM];\n\n const localToClinicTimezone = useCallback(\n ({ date, timezone, reverse }: { date: Date; timezone: string; reverse?: boolean }): Date => {\n const localTzOffset = getTimezoneOffset(Intl.DateTimeFormat().resolvedOptions().timeZone);\n const clinicTzOffset = getTimezoneOffset(timezone);\n const offsetDiff = reverse ? clinicTzOffset - localTzOffset : localTzOffset - clinicTzOffset;\n return add(date, { minutes: offsetDiff / 1000 / 60 });\n },\n [],\n );\n\n const handleTimeChange = useCallback(\n (hour?: string, minute?: string, meridiem?: string) => {\n const _hour = hour || '12';\n const _minute = minute || '00';\n const _meridiem = meridiem || 'AM';\n let meridiemAdjustment = 0;\n\n if (!hour) {\n setSelectedHour('12');\n }\n if (!minute) {\n setSelectedMinute('00');\n }\n if (!meridiem) {\n setSelectedMeridiem('AM');\n }\n\n // set 1-11pm to 13-23. Don't set 12pm to 24\n if (_meridiem === Meridiem.PM && Number(_hour) < 12) {\n meridiemAdjustment = 12;\n }\n\n // set 12am to 00\n if (_meridiem === Meridiem.AM && Number(_hour) === 12) {\n meridiemAdjustment = -12;\n }\n\n const hours = Number(_hour) + meridiemAdjustment;\n const time = new Date().setHours(hours, Number(_minute), 0, 0);\n let date = new Date(time);\n console.log('testing: ' + timezone);\n if (timezone) {\n date = localToClinicTimezone({ date, timezone });\n }\n setSelectedTime(date);\n\n if (onTimeChange) {\n onTimeChange(date);\n }\n },\n [onTimeChange, timezone, localToClinicTimezone],\n );\n\n const handleHourClick = useCallback(\n (value: string) => {\n setSelectedHour(value);\n handleTimeChange(value, selectedMinute, selectedMeridiem);\n },\n [handleTimeChange, selectedMeridiem, selectedMinute],\n );\n\n const handleMinuteClick = useCallback(\n (value: string) => {\n setSelectedMinute(value);\n handleTimeChange(selectedHour, value, selectedMeridiem);\n },\n [handleTimeChange, selectedHour, selectedMeridiem],\n );\n\n const handleMeridiemClick = useCallback(\n (value: string) => {\n setSelectedMeridiem(value);\n handleTimeChange(selectedHour, selectedMinute, value);\n },\n [handleTimeChange, selectedHour, selectedMinute],\n );\n\n useEffect(() => {\n // Set default selections based on value passed in\n if (initialTime) {\n const localTime = new Date(initialTime);\n\n // calculate hours\n const hours = localTime.getHours();\n const adjustedHours = hours % 12 || 12;\n\n setSelectedTime(initialTime);\n setSelectedHour(adjustedHours.toString());\n setSelectedMinute(localTime.getMinutes().toString());\n setSelectedMeridiem(localTime.getHours() > 11 ? Meridiem.PM : Meridiem.AM);\n }\n }, [initialTime]);\n\n return (\n <Popover\n open={isOpen}\n onOpenChange={({ open }) => {\n setIsOpen(open);\n if (!open && onClose) {\n onClose(selectedTime);\n }\n }}\n anchor={\n <Box className=\"TimePicker__Trigger\" data-testid={`${dataTestId}-trigger`} css={styles.trigger}>\n <TextInput\n placeholder=\"12:00 AM\"\n rightElement={<Icon size={useIconTextSizeMap(inputProps?.size || 'md')} name=\"clock\" />}\n value={formattedTime}\n readOnly\n cursor=\"pointer\"\n {...inputProps}\n {...(isOpen && { 'data-focus': 'true' })}\n />\n </Box>\n }\n contentProps={{ w: 'max-content' }}\n placement={placement}\n variant={inputProps?.onContrast ? 'contrast' : 'default'}\n showArrow={false}\n >\n <Box className=\"TimePicker__Container\" data-testid={`${dataTestId}-container`} css={styles.container}>\n <TimeList\n options={hourOptions}\n optionType=\"hour\"\n selectedValue={selectedHour}\n onClick={handleHourClick}\n open={isOpen}\n data-testid={`${dataTestId}-hour-list`}\n />\n <TimeList\n options={minuteOptions}\n optionType=\"minute\"\n selectedValue={selectedMinute ? formatNumber(selectedMinute) : undefined}\n onClick={handleMinuteClick}\n open={isOpen}\n data-testid={`${dataTestId}-minute-list`}\n />\n <TimeList\n options={meridiemOptions}\n optionType=\"meridiem\"\n selectedValue={selectedMeridiem}\n onClick={handleMeridiemClick}\n open={isOpen}\n data-testid={`${dataTestId}-meridiem-list`}\n />\n </Box>\n </Popover>\n );\n};\n"],"names":["timeOptionRecipe","defineRecipe","TimeOption","value","innerRef","onClick","selected","dataTestId","styles","useRecipe","handleClick","useCallback","event","selectedValue","jsx","Box","timePickerRecipe","defineSlotRecipe","TimeList","options","optionType","open","useSlotRecipe","itemRef","useRef","useEffect","option","isSelected","Meridiem","TimePicker","initialTime","inputProps","minuteInterval","onTimeChange","onClose","placement","timezone","isOpen","setIsOpen","useState","selectedTime","setSelectedTime","selectedHour","setSelectedHour","selectedMinute","setSelectedMinute","selectedMeridiem","setSelectedMeridiem","formattedTime","useMemo","format","formatNumber","number","formattedValue","hourOptions","hour","minuteOptions","minutes","i","meridiemOptions","localToClinicTimezone","date","reverse","localTzOffset","getTimezoneOffset","clinicTzOffset","offsetDiff","add","handleTimeChange","minute","meridiem","_hour","_minute","_meridiem","meridiemAdjustment","hours","time","handleHourClick","handleMinuteClick","handleMeridiemClick","localTime","adjustedHours","Popover","TextInput","Icon","useIconTextSizeMap","jsxs"],"mappings":"mfAEaA,GAAmBC,EAAAA,aAAa,CAC3C,KAAM,CACJ,aAAc,MACd,OAAQ,UACR,SAAU,KACV,GAAI,EACJ,GAAI,EACJ,UAAW,QACb,EACA,SAAU,CACR,SAAU,CACR,KAAM,CACJ,WAAY,uBACZ,MAAO,gBACP,OAAQ,CACN,WAAY,4BAAA,CAEhB,EACA,MAAO,CACL,WAAY,aACZ,MAAO,cACP,OAAQ,CACN,WAAY,iCAAA,CACd,CACF,CA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,OAAA,CAAK,KAAMC,EAAA,mBAAmBtD,GAAY,MAAQ,IAAI,EAAG,KAAK,OAAQ,CAAA,EACrF,MAAOiB,EACP,SAAQ,GACR,OAAO,UACN,GAAGjB,EACH,GAAIM,GAAU,CAAE,aAAc,MAAO,CAAA,CAAA,EAE1C,EAEF,aAAc,CAAE,EAAG,aAAc,EACjC,UAAAF,EACA,QAASJ,GAAY,WAAa,WAAa,UAC/C,UAAW,GAEX,SAAAuD,EAAAA,kBAAAA,KAACvE,EAAAA,IAAI,CAAA,UAAU,wBAAwB,cAAa,GAAGR,CAAU,aAAc,IAAKC,EAAO,UACzF,SAAA,CAAAM,EAAA,kBAAA,IAACI,EAAA,CACC,QAASoC,EACT,WAAW,OACX,cAAeZ,EACf,QAASmC,EACT,KAAMxC,EACN,cAAa,GAAG9B,CAAU,YAAA,CAC5B,EACAO,EAAA,kBAAA,IAACI,EAAA,CACC,QAASsC,EACT,WAAW,SACX,cAAeZ,EAAiBO,EAAaP,CAAc,EAAI,OAC/D,QAASkC,EACT,KAAMzC,EACN,cAAa,GAAG9B,CAAU,cAAA,CAC5B,EACAO,EAAA,kBAAA,IAACI,EAAA,CACC,QAASyC,EACT,WAAW,WACX,cAAeb,EACf,QAASiC,EACT,KAAM1C,EACN,cAAa,GAAG9B,CAAU,gBAAA,CAAA,CAC5B,CACF,CAAA,CAAA,CACF,CAEJ"}
@@ -1,230 +0,0 @@
1
- import { j as r } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useCallback as b, useRef as Q, useEffect as V, useState as O, useMemo as R } from "react";
3
- import { W as U } from "./textInput.component-C7kdQ8hF.js";
4
- import { P as X } from "./popover.component-DIYT1Lc0.js";
5
- import { I as ee } from "./icon.component-PV_nHBId.js";
6
- import { u as te } from "./useIconTextSizeMap-BK-pUrQv.js";
7
- import { f as se } from "./format-CqTHHSak.js";
8
- import { B as $ } from "./index-9BerxEcw.js";
9
- import { a as re, d as oe } from "./config-Djkl1N81.js";
10
- import { u as ie } from "./use-recipe-d63ABaZ3.js";
11
- import { u as E } from "./create-slot-recipe-context-D_FXDJGp.js";
12
- import { getTimezoneOffset as D } from "date-fns-tz";
13
- import { add as ne } from "date-fns";
14
- const ce = re({
15
- base: {
16
- borderRadius: "4px",
17
- cursor: "pointer",
18
- fontSize: "sm",
19
- px: 3,
20
- py: 1,
21
- textAlign: "center"
22
- },
23
- variants: {
24
- selected: {
25
- true: {
26
- background: "background.secondary",
27
- color: "text.contrast",
28
- _hover: {
29
- background: "background.secondary.hover"
30
- }
31
- },
32
- false: {
33
- background: "background",
34
- color: "text.subtle",
35
- _hover: {
36
- background: "background.secondaryAlpha.hover"
37
- }
38
- }
39
- }
40
- },
41
- defaultVariants: {
42
- selected: !1
43
- }
44
- }), ae = ({
45
- value: t,
46
- innerRef: i,
47
- onClick: n,
48
- selected: a,
49
- ["data-testid"]: l = "kibble-timepicker-option"
50
- }) => {
51
- const m = ie({ recipe: ce })({ selected: a }), c = b(
52
- (d) => {
53
- const o = d.currentTarget.textContent || "";
54
- n(o);
55
- },
56
- [n]
57
- );
58
- return /* @__PURE__ */ r.jsx($, { className: "TimePicker__Option", "data-testid": l, ref: i, onClick: c, css: m, children: t });
59
- }, B = oe({
60
- slots: ["trigger", "container", "list"],
61
- base: {
62
- trigger: {
63
- width: "100%"
64
- },
65
- container: {
66
- display: "flex",
67
- gap: 1.5,
68
- height: "186px",
69
- overflow: "hidden"
70
- },
71
- list: {
72
- display: "flex",
73
- flexDirection: "column",
74
- gap: 1,
75
- overflowY: "auto",
76
- "&::webkit-scrollbar": {
77
- display: "none"
78
- }
79
- }
80
- }
81
- }), v = ({
82
- options: t,
83
- optionType: i,
84
- selectedValue: n,
85
- onClick: a,
86
- open: l = !1,
87
- ["data-testid"]: x = "kibble-timepicker-list"
88
- }) => {
89
- const c = E({ recipe: B })(), d = Q(null);
90
- return V(() => {
91
- l && d.current && requestAnimationFrame(() => {
92
- d.current && d.current.scrollIntoView({ block: "center" });
93
- });
94
- }, [l, n]), /* @__PURE__ */ r.jsx($, { className: "TimePicker__List", "data-testid": `${x}-${i}-list`, css: c.list, children: t.map((o) => {
95
- const u = o === n;
96
- return /* @__PURE__ */ r.jsx(
97
- ae,
98
- {
99
- innerRef: u ? d : null,
100
- value: o,
101
- selected: o === n,
102
- onClick: a,
103
- "data-testid": `${x}-${i}-option-${o}`
104
- },
105
- `${i}-option-${o}`
106
- );
107
- }) });
108
- };
109
- var p = /* @__PURE__ */ ((t) => (t.AM = "AM", t.PM = "PM", t))(p || {});
110
- const Oe = ({
111
- initialTime: t,
112
- inputProps: i,
113
- minuteInterval: n = 5,
114
- onTimeChange: a,
115
- onClose: l,
116
- placement: x = "bottom",
117
- timezone: m,
118
- ["data-testid"]: c = "kibble-timepicker"
119
- }) => {
120
- const o = E({ recipe: B })(), [u, F] = O(!1), [S, N] = O(t), [M, y] = O(), [f, P] = O(), [j, w] = O(), L = R(() => S ? se(S, "h:mm aa") : "", [S]), H = (e) => {
121
- const s = e.toString();
122
- return s.length === 1 ? `0${s}` : s;
123
- }, W = R(() => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((e) => e.toString()), []), q = R(() => {
124
- const e = [];
125
- for (let s = 0; s < 60; s += n)
126
- e.push(s);
127
- return e.map(H);
128
- }, [n]), I = [p.AM, p.PM], z = b(
129
- ({ date: e, timezone: s, reverse: h }) => {
130
- const k = D(Intl.DateTimeFormat().resolvedOptions().timeZone), A = D(s), T = h ? A - k : k - A;
131
- return ne(e, { minutes: T / 1e3 / 60 });
132
- },
133
- []
134
- ), g = b(
135
- (e, s, h) => {
136
- const k = e || "12", A = s || "00", T = h || "AM";
137
- let C = 0;
138
- e || y("12"), s || P("00"), h || w("AM"), T === p.PM && Number(k) < 12 && (C = 12), T === p.AM && Number(k) === 12 && (C = -12);
139
- const J = Number(k) + C, K = (/* @__PURE__ */ new Date()).setHours(J, Number(A), 0, 0);
140
- let _ = new Date(K);
141
- console.log("testing: " + m), m && (_ = z({ date: _, timezone: m })), N(_), a && a(_);
142
- },
143
- [a, m, z]
144
- ), Y = b(
145
- (e) => {
146
- y(e), g(e, f, j);
147
- },
148
- [g, j, f]
149
- ), Z = b(
150
- (e) => {
151
- P(e), g(M, e, j);
152
- },
153
- [g, M, j]
154
- ), G = b(
155
- (e) => {
156
- w(e), g(M, f, e);
157
- },
158
- [g, M, f]
159
- );
160
- return V(() => {
161
- if (t) {
162
- const e = new Date(t), h = e.getHours() % 12 || 12;
163
- N(t), y(h.toString()), P(e.getMinutes().toString()), w(e.getHours() > 11 ? p.PM : p.AM);
164
- }
165
- }, [t]), /* @__PURE__ */ r.jsx(
166
- X,
167
- {
168
- open: u,
169
- onOpenChange: ({ open: e }) => {
170
- F(e), !e && l && l(S);
171
- },
172
- anchor: /* @__PURE__ */ r.jsx($, { className: "TimePicker__Trigger", "data-testid": `${c}-trigger`, css: o.trigger, children: /* @__PURE__ */ r.jsx(
173
- U,
174
- {
175
- placeholder: "12:00 AM",
176
- rightElement: /* @__PURE__ */ r.jsx(ee, { size: te(i?.size || "md"), name: "clock" }),
177
- value: L,
178
- readOnly: !0,
179
- cursor: "pointer",
180
- ...i,
181
- ...u && { "data-focus": "true" }
182
- }
183
- ) }),
184
- contentProps: { w: "max-content" },
185
- placement: x,
186
- variant: i?.onContrast ? "contrast" : "default",
187
- showArrow: !1,
188
- children: /* @__PURE__ */ r.jsxs($, { className: "TimePicker__Container", "data-testid": `${c}-container`, css: o.container, children: [
189
- /* @__PURE__ */ r.jsx(
190
- v,
191
- {
192
- options: W,
193
- optionType: "hour",
194
- selectedValue: M,
195
- onClick: Y,
196
- open: u,
197
- "data-testid": `${c}-hour-list`
198
- }
199
- ),
200
- /* @__PURE__ */ r.jsx(
201
- v,
202
- {
203
- options: q,
204
- optionType: "minute",
205
- selectedValue: f ? H(f) : void 0,
206
- onClick: Z,
207
- open: u,
208
- "data-testid": `${c}-minute-list`
209
- }
210
- ),
211
- /* @__PURE__ */ r.jsx(
212
- v,
213
- {
214
- options: I,
215
- optionType: "meridiem",
216
- selectedValue: j,
217
- onClick: G,
218
- open: u,
219
- "data-testid": `${c}-meridiem-list`
220
- }
221
- )
222
- ] })
223
- }
224
- );
225
- };
226
- export {
227
- p as M,
228
- Oe as T
229
- };
230
- //# sourceMappingURL=timePicker.component-Dl3BE6eW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timePicker.component-Dl3BE6eW.js","sources":["../../src/components/TimePicker/components/TimeOption/timeOption.recipe.ts","../../src/components/TimePicker/components/TimeOption/timeOption.component.tsx","../../src/components/TimePicker/timePicker.recipe.ts","../../src/components/TimePicker/components/TimeList/timeList.component.tsx","../../src/components/TimePicker/timePicker.types.ts","../../src/components/TimePicker/timePicker.component.tsx"],"sourcesContent":["import { defineRecipe } from '@chakra-ui/react/styled-system';\n\nexport const timeOptionRecipe = defineRecipe({\n base: {\n borderRadius: '4px',\n cursor: 'pointer',\n fontSize: 'sm',\n px: 3,\n py: 1,\n textAlign: 'center',\n },\n variants: {\n selected: {\n true: {\n background: 'background.secondary',\n color: 'text.contrast',\n _hover: {\n background: 'background.secondary.hover',\n },\n },\n false: {\n background: 'background',\n color: 'text.subtle',\n _hover: {\n background: 'background.secondaryAlpha.hover',\n },\n },\n },\n },\n defaultVariants: {\n selected: false,\n },\n});\n","import React, { useCallback } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { timeOptionRecipe } from './timeOption.recipe';\n\ninterface TimeOptionProps {\n /** Ref to the option component. */\n innerRef?: React.Ref<HTMLDivElement | null> | null;\n /** Callback function to be called when the option is clicked. */\n onClick: (selectedValue: string) => void;\n /** If true, the option will be selected. */\n selected: boolean;\n /** Value of the option. */\n value: string;\n /** Data test id for the option.\n * @default kibble-timepicker-option\n */\n 'data-testid'?: string;\n}\n\nexport const TimeOption = ({\n value,\n innerRef,\n onClick,\n selected,\n ['data-testid']: dataTestId = 'kibble-timepicker-option',\n}: TimeOptionProps): React.JSX.Element => {\n const recipe = useRecipe({ recipe: timeOptionRecipe });\n const styles = recipe({ selected });\n\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const selectedValue = event.currentTarget.textContent || '';\n onClick(selectedValue);\n },\n [onClick],\n );\n\n return (\n <Box className=\"TimePicker__Option\" data-testid={dataTestId} ref={innerRef} onClick={handleClick} css={styles}>\n {value}\n </Box>\n );\n};\n","import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nexport const timePickerRecipe = defineSlotRecipe({\n slots: ['trigger', 'container', 'list'],\n base: {\n trigger: {\n width: '100%',\n },\n container: {\n display: 'flex',\n gap: 1.5,\n height: '186px',\n overflow: 'hidden',\n },\n list: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n overflowY: 'auto',\n '&::webkit-scrollbar': {\n display: 'none',\n },\n },\n },\n});\n","import React, { useEffect, useRef } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { TimeOption } from '../TimeOption/timeOption.component';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { timePickerRecipe } from '../../timePicker.recipe';\n\ninterface ScrollContainerProps {\n /** Options to display in the list. */\n options: string[];\n /** Type of the option. */\n optionType: 'hour' | 'minute' | 'meridiem';\n /** Selected value of the list. */\n selectedValue?: string;\n /** Callback function to be called when the option is clicked. */\n onClick: (value: string) => void;\n /** Determines if the list is open. */\n open: boolean;\n /** Data test id for the list.\n * @default kibble-timepicker-list\n */\n 'data-testid'?: string;\n}\n\nexport const TimeList = ({\n options,\n optionType,\n selectedValue,\n onClick,\n open = false,\n ['data-testid']: dataTestId = 'kibble-timepicker-list',\n}: ScrollContainerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: timePickerRecipe });\n const styles = recipe();\n const itemRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (open && itemRef.current) {\n requestAnimationFrame(() => {\n if (itemRef.current) {\n itemRef.current.scrollIntoView({ block: 'center' });\n }\n });\n }\n }, [open, selectedValue]);\n\n return (\n <Box className=\"TimePicker__List\" data-testid={`${dataTestId}-${optionType}-list`} css={styles.list}>\n {options.map((option) => {\n const isSelected = option === selectedValue;\n return (\n <TimeOption\n key={`${optionType}-option-${option}`}\n innerRef={isSelected ? itemRef : null}\n value={option}\n selected={option === selectedValue}\n onClick={onClick}\n data-testid={`${dataTestId}-${optionType}-option-${option}`}\n />\n );\n })}\n </Box>\n );\n};\n","export enum Meridiem {\n AM = 'AM',\n PM = 'PM',\n}\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { TextInput, TextInputProps } from 'components/TextInput/textInput.component';\nimport { Popover } from 'components/Popover/popover.component';\nimport { Icon } from 'components/Icon/icon.component';\nimport { useIconTextSizeMap } from 'hooks/useIconTextSizeMap';\nimport format from 'date-fns/format';\nimport { Box } from '@chakra-ui/react/box';\nimport { TimeList } from './components/TimeList/timeList.component';\nimport { Meridiem } from './timePicker.types';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { timePickerRecipe } from './timePicker.recipe';\nimport { Placement } from 'shared/types/placement';\nimport { getTimezoneOffset } from 'date-fns-tz';\nimport { add } from 'date-fns';\n\nexport interface TimePickerProps {\n /** Initial time to be displayed in the input field. */\n initialTime?: Date;\n /** Props to customize the input field. See `TextInput` for more information. */\n inputProps?: Omit<TextInputProps, 'onChange' | 'value' | 'isClearable' | 'onClear'>;\n /**\n * Interval of minutes to be displayed in the dropdown.\n * @default 5\n */\n minuteInterval?: number;\n /** Callback function triggered when the time is changed. */\n onTimeChange?: (time: Date) => void;\n /** Callback function triggered when the time picker is closed. */\n onClose?: (time?: Date) => void;\n /**\n * Placement of the dropdown relative to the input field.\n * @default bottom\n */\n placement?: Placement;\n timezone?: string;\n /**\n * Data test id for the time picker.\n * @default kibble-timepicker\n */\n 'data-testid'?: string;\n}\n\nexport const TimePicker = ({\n initialTime,\n inputProps,\n minuteInterval = 5,\n onTimeChange,\n onClose,\n placement = 'bottom',\n timezone,\n ['data-testid']: dataTestId = 'kibble-timepicker',\n}: TimePickerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: timePickerRecipe });\n const styles = recipe();\n const [isOpen, setIsOpen] = useState(false);\n const [selectedTime, setSelectedTime] = useState(initialTime);\n const [selectedHour, setSelectedHour] = useState<string | undefined>();\n const [selectedMinute, setSelectedMinute] = useState<string | undefined>();\n const [selectedMeridiem, setSelectedMeridiem] = useState<string | undefined>();\n\n const formattedTime = useMemo(() => {\n if (!selectedTime) return '';\n return format(selectedTime, 'h:mm aa');\n }, [selectedTime]);\n\n const formatNumber = (number: number | string): string => {\n const formattedValue = number.toString();\n if (formattedValue.length === 1) {\n return `0${formattedValue}`;\n }\n\n return formattedValue;\n };\n\n const hourOptions = useMemo(() => {\n return [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((hour) => hour.toString());\n }, []);\n\n const minuteOptions = useMemo(() => {\n const minutes = [];\n for (let i = 0; i < 60; i += minuteInterval) {\n minutes.push(i);\n }\n\n return minutes.map(formatNumber);\n }, [minuteInterval]);\n\n const meridiemOptions = [Meridiem.AM, Meridiem.PM];\n\n const localToClinicTimezone = useCallback(\n ({ date, timezone, reverse }: { date: Date; timezone: string; reverse?: boolean }): Date => {\n const localTzOffset = getTimezoneOffset(Intl.DateTimeFormat().resolvedOptions().timeZone);\n const clinicTzOffset = getTimezoneOffset(timezone);\n const offsetDiff = reverse ? clinicTzOffset - localTzOffset : localTzOffset - clinicTzOffset;\n return add(date, { minutes: offsetDiff / 1000 / 60 });\n },\n [],\n );\n\n const handleTimeChange = useCallback(\n (hour?: string, minute?: string, meridiem?: string) => {\n const _hour = hour || '12';\n const _minute = minute || '00';\n const _meridiem = meridiem || 'AM';\n let meridiemAdjustment = 0;\n\n if (!hour) {\n setSelectedHour('12');\n }\n if (!minute) {\n setSelectedMinute('00');\n }\n if (!meridiem) {\n setSelectedMeridiem('AM');\n }\n\n // set 1-11pm to 13-23. Don't set 12pm to 24\n if (_meridiem === Meridiem.PM && Number(_hour) < 12) {\n meridiemAdjustment = 12;\n }\n\n // set 12am to 00\n if (_meridiem === Meridiem.AM && Number(_hour) === 12) {\n meridiemAdjustment = -12;\n }\n\n const hours = Number(_hour) + meridiemAdjustment;\n const time = new Date().setHours(hours, Number(_minute), 0, 0);\n let date = new Date(time);\n console.log('testing: ' + timezone);\n if (timezone) {\n date = localToClinicTimezone({ date, timezone });\n }\n setSelectedTime(date);\n\n if (onTimeChange) {\n onTimeChange(date);\n }\n },\n [onTimeChange, timezone, localToClinicTimezone],\n );\n\n const handleHourClick = useCallback(\n (value: string) => {\n setSelectedHour(value);\n handleTimeChange(value, selectedMinute, selectedMeridiem);\n },\n [handleTimeChange, selectedMeridiem, selectedMinute],\n );\n\n const handleMinuteClick = useCallback(\n (value: string) => {\n setSelectedMinute(value);\n handleTimeChange(selectedHour, value, selectedMeridiem);\n },\n [handleTimeChange, selectedHour, selectedMeridiem],\n );\n\n const handleMeridiemClick = useCallback(\n (value: string) => {\n setSelectedMeridiem(value);\n handleTimeChange(selectedHour, selectedMinute, value);\n },\n [handleTimeChange, selectedHour, selectedMinute],\n );\n\n useEffect(() => {\n // Set default selections based on value passed in\n if (initialTime) {\n const localTime = new Date(initialTime);\n\n // calculate hours\n const hours = localTime.getHours();\n const adjustedHours = hours % 12 || 12;\n\n setSelectedTime(initialTime);\n setSelectedHour(adjustedHours.toString());\n setSelectedMinute(localTime.getMinutes().toString());\n setSelectedMeridiem(localTime.getHours() > 11 ? Meridiem.PM : Meridiem.AM);\n }\n }, [initialTime]);\n\n return (\n <Popover\n open={isOpen}\n onOpenChange={({ open }) => {\n setIsOpen(open);\n if (!open && onClose) {\n onClose(selectedTime);\n }\n }}\n anchor={\n <Box className=\"TimePicker__Trigger\" data-testid={`${dataTestId}-trigger`} css={styles.trigger}>\n <TextInput\n placeholder=\"12:00 AM\"\n rightElement={<Icon size={useIconTextSizeMap(inputProps?.size || 'md')} name=\"clock\" />}\n value={formattedTime}\n readOnly\n cursor=\"pointer\"\n {...inputProps}\n {...(isOpen && { 'data-focus': 'true' })}\n />\n </Box>\n }\n contentProps={{ w: 'max-content' }}\n placement={placement}\n variant={inputProps?.onContrast ? 'contrast' : 'default'}\n showArrow={false}\n >\n <Box className=\"TimePicker__Container\" data-testid={`${dataTestId}-container`} css={styles.container}>\n <TimeList\n options={hourOptions}\n optionType=\"hour\"\n selectedValue={selectedHour}\n onClick={handleHourClick}\n open={isOpen}\n data-testid={`${dataTestId}-hour-list`}\n />\n <TimeList\n options={minuteOptions}\n optionType=\"minute\"\n selectedValue={selectedMinute ? formatNumber(selectedMinute) : undefined}\n onClick={handleMinuteClick}\n open={isOpen}\n data-testid={`${dataTestId}-minute-list`}\n />\n <TimeList\n options={meridiemOptions}\n optionType=\"meridiem\"\n selectedValue={selectedMeridiem}\n onClick={handleMeridiemClick}\n open={isOpen}\n data-testid={`${dataTestId}-meridiem-list`}\n />\n </Box>\n </Popover>\n );\n};\n"],"names":["timeOptionRecipe","defineRecipe","TimeOption","value","innerRef","onClick","selected","dataTestId","styles","useRecipe","handleClick","useCallback","event","selectedValue","jsx","Box","timePickerRecipe","defineSlotRecipe","TimeList","options","optionType","open","useSlotRecipe","itemRef","useRef","useEffect","option","isSelected","Meridiem","TimePicker","initialTime","inputProps","minuteInterval","onTimeChange","onClose","placement","timezone","isOpen","setIsOpen","useState","selectedTime","setSelectedTime","selectedHour","setSelectedHour","selectedMinute","setSelectedMinute","selectedMeridiem","setSelectedMeridiem","formattedTime","useMemo","format","formatNumber","number","formattedValue","hourOptions","hour","minuteOptions","minutes","i","meridiemOptions","localToClinicTimezone","date","reverse","localTzOffset","getTimezoneOffset","clinicTzOffset","offsetDiff","add","handleTimeChange","minute","meridiem","_hour","_minute","_meridiem","meridiemAdjustment","hours","time","handleHourClick","handleMinuteClick","handleMeridiemClick","localTime","adjustedHours","Popover","TextInput","Icon","useIconTextSizeMap","jsxs"],"mappings":";;;;;;;;;;;;;AAEO,MAAMA,KAAmBC,GAAa;AAAA,EAC3C,MAAM;A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AEX,UAAAuD,gBAAAA,EAAAA,KAACvE,GAAI,EAAA,WAAU,yBAAwB,eAAa,GAAGR,CAAU,cAAc,KAAKC,EAAO,WACzF,UAAA;AAAA,QAAAM,gBAAAA,EAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAASoC;AAAA,YACT,YAAW;AAAA,YACX,eAAeZ;AAAA,YACf,SAASmC;AAAA,YACT,MAAMxC;AAAA,YACN,eAAa,GAAG9B,CAAU;AAAA,UAAA;AAAA,QAC5B;AAAA,QACAO,gBAAAA,EAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAASsC;AAAA,YACT,YAAW;AAAA,YACX,eAAeZ,IAAiBO,EAAaP,CAAc,IAAI;AAAA,YAC/D,SAASkC;AAAA,YACT,MAAMzC;AAAA,YACN,eAAa,GAAG9B,CAAU;AAAA,UAAA;AAAA,QAC5B;AAAA,QACAO,gBAAAA,EAAA;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAASyC;AAAA,YACT,YAAW;AAAA,YACX,eAAeb;AAAA,YACf,SAASiC;AAAA,YACT,MAAM1C;AAAA,YACN,eAAa,GAAG9B,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MAC5B,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeRange.component-LBzKy8H3.js","sources":["../../src/components/TimeRange/timeRange.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { Flex, FlexProps } from '@chakra-ui/react/flex';\nimport { TimePicker, TimePickerProps } from 'components/TimePicker/timePicker.component';\n\nexport interface TimeRangeProps extends FlexProps {\n /**\n * Element that separates the start and end time pickers. By default, a dash is used.\n * @default -\n */\n separator?: React.ReactNode;\n /** Props for the end time picker. See `TimePicker` for more information. */\n endTimePickerProps: TimePickerProps;\n /** Props for the start time picker. See `TimePicker` for more information. */\n startTimePickerProps: TimePickerProps;\n timezone?: string;\n /**\n * Data test id for the time range.\n * @default kibble-time-range\n */\n 'data-testid'?: string;\n}\n\nexport const TimeRange = ({\n endTimePickerProps,\n separator = '-',\n startTimePickerProps,\n ['data-testid']: dataTestId = 'kibble-time-range',\n ...rest\n}: TimeRangeProps): React.JSX.Element => {\n return (\n <Flex className=\"TimeRange\" data-testid={dataTestId} {...rest}>\n <TimePicker {...startTimePickerProps} data-testid={`${dataTestId}-start-time-picker`} />\n <Box alignSelf=\"center\" mx={1}>\n {separator}\n </Box>\n <TimePicker {...endTimePickerProps} data-testid={`${dataTestId}-end-time-picker`} />\n </Flex>\n );\n};\n"],"names":["TimeRange","endTimePickerProps","separator","startTimePickerProps","dataTestId","rest","Flex","jsx","TimePicker","Box"],"mappings":"2KAuBaA,EAAY,CAAC,CACxB,mBAAAC,EACA,UAAAC,EAAY,IACZ,qBAAAC,EACA,CAAC,eAAgBC,EAAa,oBAC9B,GAAGC,CACL,6BAEKC,OAAK,CAAA,UAAU,YAAY,cAAaF,EAAa,GAAGC,EACvD,SAAA,CAAAE,wBAACC,EAAAA,YAAY,GAAGL,EAAsB,cAAa,GAAGC,CAAU,qBAAsB,0BACrFK,EAAAA,IAAI,CAAA,UAAU,SAAS,GAAI,EACzB,SACHP,EAAA,0BACCM,EAAAA,WAAY,CAAA,GAAGP,EAAoB,cAAa,GAAGG,CAAU,kBAAoB,CAAA,CAAA,EACpF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeRange.component-oc3ptJ_N.js","sources":["../../src/components/TimeRange/timeRange.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { Flex, FlexProps } from '@chakra-ui/react/flex';\nimport { TimePicker, TimePickerProps } from 'components/TimePicker/timePicker.component';\n\nexport interface TimeRangeProps extends FlexProps {\n /**\n * Element that separates the start and end time pickers. By default, a dash is used.\n * @default -\n */\n separator?: React.ReactNode;\n /** Props for the end time picker. See `TimePicker` for more information. */\n endTimePickerProps: TimePickerProps;\n /** Props for the start time picker. See `TimePicker` for more information. */\n startTimePickerProps: TimePickerProps;\n timezone?: string;\n /**\n * Data test id for the time range.\n * @default kibble-time-range\n */\n 'data-testid'?: string;\n}\n\nexport const TimeRange = ({\n endTimePickerProps,\n separator = '-',\n startTimePickerProps,\n ['data-testid']: dataTestId = 'kibble-time-range',\n ...rest\n}: TimeRangeProps): React.JSX.Element => {\n return (\n <Flex className=\"TimeRange\" data-testid={dataTestId} {...rest}>\n <TimePicker {...startTimePickerProps} data-testid={`${dataTestId}-start-time-picker`} />\n <Box alignSelf=\"center\" mx={1}>\n {separator}\n </Box>\n <TimePicker {...endTimePickerProps} data-testid={`${dataTestId}-end-time-picker`} />\n </Flex>\n );\n};\n"],"names":["TimeRange","endTimePickerProps","separator","startTimePickerProps","dataTestId","rest","Flex","jsx","TimePicker","Box"],"mappings":";;;;AAuBO,MAAMA,IAAY,CAAC;AAAA,EACxB,oBAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,sBAAAC;AAAA,EACA,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,GAAGC;AACL,6BAEKC,GAAK,EAAA,WAAU,aAAY,eAAaF,GAAa,GAAGC,GACvD,UAAA;AAAA,EAAAE,gBAAAA,MAACC,KAAY,GAAGL,GAAsB,eAAa,GAAGC,CAAU,sBAAsB;AAAA,wBACrFK,GAAI,EAAA,WAAU,UAAS,IAAI,GACzB,UACHP,GAAA;AAAA,wBACCM,GAAY,EAAA,GAAGP,GAAoB,eAAa,GAAGG,CAAU,mBAAoB,CAAA;AAAA,GACpF;"}
@@ -1,54 +0,0 @@
1
- const e = {
2
- heading: "'aktiv-grotesk', sans-serif",
3
- body: "'aktiv-grotesk', sans-serif",
4
- mono: "LinearSans, Noto Sans, Arial, Helvetica, sans-serif"
5
- }, r = {
6
- xs: "0.75rem",
7
- sm: "0.875rem",
8
- md: "1rem",
9
- lg: "1.125rem",
10
- xl: "1.25rem",
11
- "2xl": "1.5rem",
12
- "3xl": "1.875rem",
13
- "4xl": "2.25rem",
14
- "5xl": "3rem",
15
- "6xl": "3.75rem",
16
- "7xl": "4.5rem",
17
- "8xl": "6rem",
18
- "9xl": "8rem"
19
- }, m = {
20
- normal: 400,
21
- semibold: 600,
22
- bold: 600
23
- }, s = {
24
- normal: "normal",
25
- none: 1,
26
- shorter: 1.25,
27
- short: 1.375,
28
- base: 1.5,
29
- tall: 1.625,
30
- taller: "2",
31
- 3: ".75rem",
32
- 4: "1rem",
33
- 5: "1.25rem",
34
- 6: "1.5rem",
35
- 7: "1.75rem",
36
- 8: "2rem",
37
- 9: "2.25rem",
38
- 10: "2.5rem"
39
- }, t = {
40
- tight: "-0.025em",
41
- tighter: "-0.05em",
42
- normal: "0em",
43
- wide: "0.025em",
44
- wider: "0.05em",
45
- widest: "0.1em"
46
- };
47
- export {
48
- e as a,
49
- m as b,
50
- t as c,
51
- r as f,
52
- s as l
53
- };
54
- //# sourceMappingURL=typography.records-BEd2lI_g.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typography.records-BEd2lI_g.js","sources":["../../src/theme/tokens/typography/typography.records.ts"],"sourcesContent":["import { Font, FontSize, FontWeight, LetterSpacing, LineHeight } from './typography.types';\n\nexport const fonts: Record<Font, string> = {\n heading: \"'aktiv-grotesk', sans-serif\",\n body: \"'aktiv-grotesk', sans-serif\",\n mono: 'LinearSans, Noto Sans, Arial, Helvetica, sans-serif',\n};\n\nexport const fontSizes: Record<FontSize, string> = {\n xs: '0.75rem',\n sm: '0.875rem',\n md: '1rem',\n lg: '1.125rem',\n xl: '1.25rem',\n '2xl': '1.5rem',\n '3xl': '1.875rem',\n '4xl': '2.25rem',\n '5xl': '3rem',\n '6xl': '3.75rem',\n '7xl': '4.5rem',\n '8xl': '6rem',\n '9xl': '8rem',\n};\n\nexport const fontWeights: Record<FontWeight, number> = {\n normal: 400,\n semibold: 600,\n bold: 600,\n};\n\nexport const lineHeights: Record<LineHeight, string | number> = {\n normal: 'normal',\n none: 1,\n shorter: 1.25,\n short: 1.375,\n base: 1.5,\n tall: 1.625,\n taller: '2',\n '3': '.75rem',\n '4': '1rem',\n '5': '1.25rem',\n '6': '1.5rem',\n '7': '1.75rem',\n '8': '2rem',\n '9': '2.25rem',\n '10': '2.5rem',\n};\n\nexport const letterSpacings: Record<LetterSpacing, string> = {\n tight: '-0.025em',\n tighter: '-0.05em',\n normal: '0em',\n wide: '0.025em',\n wider: '0.05em',\n widest: '0.1em',\n};\n"],"names":["fonts","fontSizes","fontWeights","lineHeights","letterSpacings"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AACR,GAEaC,IAAsC;AAAA,EACjD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT,GAEaC,IAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AACR,GAEaC,IAAmD;AAAA,EAC9D,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,GAAK;AAAA,EACL,GAAK;AAAA,EACL,GAAK;AAAA,EACL,GAAK;AAAA,EACL,GAAK;AAAA,EACL,GAAK;AAAA,EACL,GAAK;AAAA,EACL,IAAM;AACR,GAEaC,IAAgD;AAAA,EAC3D,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;"}
@@ -1,2 +0,0 @@
1
- "use strict";const e={heading:"'aktiv-grotesk', sans-serif",body:"'aktiv-grotesk', sans-serif",mono:"LinearSans, Noto Sans, Arial, Helvetica, sans-serif"},r={xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"},s={normal:400,semibold:600,bold:600},t={normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},m={tight:"-0.025em",tighter:"-0.05em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"};exports.fontSizes=r;exports.fontWeights=s;exports.fonts=e;exports.letterSpacings=m;exports.lineHeights=t;
2
- //# sourceMappingURL=typography.records-Cg_lT1Z3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typography.records-Cg_lT1Z3.js","sources":["../../src/theme/tokens/typography/typography.records.ts"],"sourcesContent":["import { Font, FontSize, FontWeight, LetterSpacing, LineHeight } from './typography.types';\n\nexport const fonts: Record<Font, string> = {\n heading: \"'aktiv-grotesk', sans-serif\",\n body: \"'aktiv-grotesk', sans-serif\",\n mono: 'LinearSans, Noto Sans, Arial, Helvetica, sans-serif',\n};\n\nexport const fontSizes: Record<FontSize, string> = {\n xs: '0.75rem',\n sm: '0.875rem',\n md: '1rem',\n lg: '1.125rem',\n xl: '1.25rem',\n '2xl': '1.5rem',\n '3xl': '1.875rem',\n '4xl': '2.25rem',\n '5xl': '3rem',\n '6xl': '3.75rem',\n '7xl': '4.5rem',\n '8xl': '6rem',\n '9xl': '8rem',\n};\n\nexport const fontWeights: Record<FontWeight, number> = {\n normal: 400,\n semibold: 600,\n bold: 600,\n};\n\nexport const lineHeights: Record<LineHeight, string | number> = {\n normal: 'normal',\n none: 1,\n shorter: 1.25,\n short: 1.375,\n base: 1.5,\n tall: 1.625,\n taller: '2',\n '3': '.75rem',\n '4': '1rem',\n '5': '1.25rem',\n '6': '1.5rem',\n '7': '1.75rem',\n '8': '2rem',\n '9': '2.25rem',\n '10': '2.5rem',\n};\n\nexport const letterSpacings: Record<LetterSpacing, string> = {\n tight: '-0.025em',\n tighter: '-0.05em',\n normal: '0em',\n wide: '0.025em',\n wider: '0.05em',\n widest: '0.1em',\n};\n"],"names":["fonts","fontSizes","fontWeights","lineHeights","letterSpacings"],"mappings":"aAEO,MAAMA,EAA8B,CACzC,QAAS,8BACT,KAAM,8BACN,KAAM,qDACR,EAEaC,EAAsC,CACjD,GAAI,UACJ,GAAI,WACJ,GAAI,OACJ,GAAI,WACJ,GAAI,UACJ,MAAO,SACP,MAAO,WACP,MAAO,UACP,MAAO,OACP,MAAO,UACP,MAAO,SACP,MAAO,OACP,MAAO,MACT,EAEaC,EAA0C,CACrD,OAAQ,IACR,SAAU,IACV,KAAM,GACR,EAEaC,EAAmD,CAC9D,OAAQ,SACR,KAAM,EACN,QAAS,KACT,MAAO,MACP,KAAM,IACN,KAAM,MACN,OAAQ,IACR,EAAK,SACL,EAAK,OACL,EAAK,UACL,EAAK,SACL,EAAK,UACL,EAAK,OACL,EAAK,UACL,GAAM,QACR,EAEaC,EAAgD,CAC3D,MAAO,WACP,QAAS,UACT,OAAQ,MACR,KAAM,UACN,MAAO,SACP,OAAQ,OACV"}
@@ -1,2 +0,0 @@
1
- "use strict";const n=require("./jsx-runtime-BjDatQAs.js"),J=require("./text.component-BDDz5KQP.js"),K=require("./typography.records-Cg_lT1Z3.js"),Q=require("./icon.component-B1hr5lLa.js"),U=require("./index-BQRnVsAg.js"),k=require("./flex-BOU6tYUd.js"),o=require("react"),w=require("./factory-a2SJjEvR.js"),V=require("./create-slot-recipe-context-HXE1VazG.js"),X=require("./create-recipe-context-CDw-39SC.js"),y=require("./use-field-context-Cm29IQ7H.js"),g=require("./use-locale-context-ym21RUxU.js"),u=require("./index-CQURjLlA.js"),R=require("./field.anatomy-Bhj7Mlr7.js");function Y(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ee=Y(o),H=o.forwardRef((e,t)=>{const r=y.useFieldContext(),s=u.mergeProps(r.getErrorTextProps(),e);return r?.invalid?n.jsxRuntimeExports.jsx(g.ark.span,{...s,ref:t}):null});H.displayName="FieldErrorText";const L=o.forwardRef((e,t)=>{const r=y.useFieldContext(),s=u.mergeProps(r?.getHelperTextProps(),e);return n.jsxRuntimeExports.jsx(g.ark.span,{...s,ref:t})});L.displayName="FieldHelperText";const O=o.forwardRef((e,t)=>{const r=y.useFieldContext(),s=u.mergeProps(r?.getLabelProps(),e);return n.jsxRuntimeExports.jsx(g.ark.label,{...s,ref:t})});O.displayName="FieldLabel";const te=typeof window<"u"?o.useLayoutEffect:o.useEffect,[Re,re]=g.createContext({name:"FieldsetContext",hookName:"useFieldsetContext",providerName:"<FieldsetProvider />",strict:!1}),oe=(e={})=>{const t=re(),r=g.useEnvironmentContext(),{ids:s,disabled:a=!!t?.disabled,invalid:i=!1,readOnly:c=!1,required:x=!1}=e,[m,N]=o.useState(!1),[F,P]=o.useState(!1),q=o.useId(),d=e.id??q,b=o.useRef(null),j=s?.control??`field::${d}`,f=s?.errorText??`field::${d}::error-text`,p=s?.helperText??`field::${d}::helper-text`,E=s?.label??`field::${d}::label`;te(()=>{const C=b.current;if(!C)return;const $=()=>{const T=r.getRootNode();N(!!T.getElementById(f)),P(!!T.getElementById(p))};$();const G=r.getWindow(),M=new G.MutationObserver($);return M.observe(C,{childList:!0,subtree:!0}),()=>M.disconnect()},[r,f,p]);const v=o.useMemo(()=>{const C=[];return m&&i&&C.push(f),F&&C.push(p),C.join(" ")||void 0},[i,f,p,m,F]),l=o.useMemo(()=>()=>({...R.parts.root.attrs,id:j,ref:b,role:"group","data-disabled":u.dataAttr(a),"data-invalid":u.dataAttr(i),"data-readonly":u.dataAttr(c)}),[a,i,c,j]),_=o.useMemo(()=>()=>({...R.parts.label.attrs,id:E,"data-disabled":u.dataAttr(a),"data-invalid":u.dataAttr(i),"data-readonly":u.dataAttr(c),htmlFor:d}),[a,i,c,d,E]),h=o.useMemo(()=>()=>({"aria-describedby":v,"aria-invalid":u.ariaAttr(i),"data-invalid":u.dataAttr(i),"data-required":u.dataAttr(x),"data-readonly":u.dataAttr(c),id:d,required:x,disabled:a,readOnly:c}),[v,i,x,c,d,a]),A=o.useMemo(()=>()=>({...h(),...R.parts.input.attrs}),[h]),B=o.useMemo(()=>()=>({...h(),...R.parts.textarea.attrs}),[h]),D=o.useMemo(()=>()=>({...h(),...R.parts.select.attrs}),[h]),z=o.useMemo(()=>()=>({id:p,...R.parts.helperText.attrs,"data-disabled":u.dataAttr(a)}),[a,p]),W=o.useMemo(()=>()=>({id:f,...R.parts.errorText.attrs,"aria-live":"polite"}),[f]),Z=o.useMemo(()=>()=>({"aria-hidden":!0,...R.parts.requiredIndicator.attrs}),[]);return{ariaDescribedby:v,ids:{root:j,control:d,label:E,errorText:f,helperText:p},refs:{rootRef:b},disabled:a,invalid:i,readOnly:c,required:x,getLabelProps:_,getRootProps:l,getInputProps:A,getTextareaProps:B,getSelectProps:D,getHelperTextProps:z,getErrorTextProps:W,getRequiredIndicatorProps:Z}},I=o.forwardRef((e,t)=>{const[r,s]=g.createSplitProps()(e,["id","ids","disabled","invalid","readOnly","required"]),a=oe(r),i=u.mergeProps(a.getRootProps(),s);return n.jsxRuntimeExports.jsx(y.FieldProvider,{value:a,children:n.jsxRuntimeExports.jsx(g.ark.div,{...i,ref:g.composeRefs(t,a.refs.rootRef)})})});I.displayName="FieldRoot";const{useRecipeResult:se}=X.createRecipeContext({key:"icon"}),ne=ee.forwardRef(function(t,r){const{styles:s,className:a,props:i}=se({asChild:!t.as,...t});return n.jsxRuntimeExports.jsx(w.chakra.svg,{ref:r,focusable:!1,"aria-hidden":"true",...i,css:[s,t.css],className:w.cx(a,t.className)})});function ae(e){const{viewBox:t="0 0 24 24",d:r,displayName:s,defaultProps:a={}}=e,i=o.Children.toArray(e.path),c=o.forwardRef((x,m)=>n.jsxRuntimeExports.jsx(ne,{ref:m,asChild:!1,viewBox:t,...a,...x,children:i.length?i:n.jsxRuntimeExports.jsx("path",{fill:"currentColor",d:r})}));return c.displayName=s,c}const{withProvider:ie,withContext:S,useStyles:le,useClassNames:ce}=V.createSlotRecipeContext({key:"field"}),de=ie(I,"root",{forwardAsChild:!0}),ue=S(O,"label",{forwardAsChild:!0}),xe=S(L,"helperText",{forwardAsChild:!0}),pe=S(H,"errorText",{forwardAsChild:!0});ae({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"});const me=o.forwardRef(function(t,r){const{fallback:s,children:a="*",...i}=t,c=y.useFieldContext(),x=ce(),m=le();return c?.required?n.jsxRuntimeExports.jsx(w.chakra.span,{ref:r,"aria-hidden":"true",...i,className:w.cx(x.requiredIndicator,t.className),css:[m.requiredIndicator,t.css],children:a}):s}),fe={sm:10,md:12,lg:14},he=e=>{const t=({disabled:r=!1,errorText:s="Field is invalid",formControlStyle:a,fullWidth:i=!0,helperText:c,inlineField:x=!1,invalid:m=!1,invalidIconColor:N="danger",label:F,labelPosition:P="start",labelStyle:q,onContrast:d=!1,readOnly:b=!1,required:j=!1,showOptionalElement:f=!1,size:p="md",useInvalidIcon:E=!1,useInvalidText:v=!0,["data-testid"]:l,..._})=>{const h=n.jsxRuntimeExports.jsxs(ue,{className:"FormControl__Label",color:d?"text.contrast":"text",display:"flex",flexDirection:"row",gap:1,fontSize:K.fontSizes[p],fontWeight:"semibold","data-testid":l?`${l}-form-control-label`:void 0,...q,onClick:A=>{A.stopPropagation()},children:[n.jsxRuntimeExports.jsx(U.Box,{as:"span",children:F}),n.jsxRuntimeExports.jsx(me,{className:"FormControl__RequiredIndicator","data-testid":l?`${l}-form-control-required-indicator`:void 0,color:d?"text.danger.contrast":"text.danger",...!j&&{fallback:f?n.jsxRuntimeExports.jsx(J.WrappedText,{as:"span",variant:d?"subtleOnContrast":"subtle",fontSize:fe[p],display:"contents",ml:1,children:"(Optional)"}):n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{})}})]});return n.jsxRuntimeExports.jsxs(de,{className:"FormControl group",disabled:r,invalid:m,readOnly:b,required:j,width:i?"100%":"auto","data-testid":l?`${l}-form-control-root`:void 0,...a,children:[n.jsxRuntimeExports.jsxs(k.Flex,{className:"FormControl__Container",flexDirection:x?"row":"column",w:x?"max-content":"100%",gap:2,alignItems:x?"center":"flex-start","data-testid":l?`${l}-form-control-container`:void 0,children:[F&&P==="start"&&h,n.jsxRuntimeExports.jsxs(k.Flex,{className:"FormControl__Content",alignItems:"center",gap:2,w:x?"max-content":"100%",children:[n.jsxRuntimeExports.jsx(e,{disabled:r,invalid:m,onContrast:d,readOnly:b,required:j,size:p,"data-testid":l?`${l}`:void 0,..._}),E&&m&&n.jsxRuntimeExports.jsx(Q.Icon,{className:"FormControl__InvalidIcon","data-testid":l?`${l}-form-control-invalid-icon`:void 0,name:"warningSign",variant:N,size:p})]}),F&&P==="end"&&h]}),v&&m&&n.jsxRuntimeExports.jsx(pe,{className:"FormControl__ErrorText",fontSize:"xs",color:d?"text.danger.contrast":"text.danger","data-testid":l?`${l}-form-control-error-text`:void 0,children:s}),c&&n.jsxRuntimeExports.jsx(xe,{className:"FormControl__HelperText",fontSize:"xs",color:d?"text.subtle.contrast":"text.subtle","data-testid":l?`${l}-form-control-helper-text`:void 0,children:c})]})};return t.displayName=`withFormControl(${e.displayName||e.name}`,t};exports.withFormControl=he;
2
- //# sourceMappingURL=withFormControl-BSlIlVY0.js.map