ics-ui-kit 0.1.0-alpha.9 → 0.1.0

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 (995) hide show
  1. package/README.md +36 -0
  2. package/dist/AlertContext-CxjW1LVL.js +13 -0
  3. package/dist/AlertContext-CxjW1LVL.js.map +1 -0
  4. package/dist/AlertIcon-5B6AgZpe.js +96 -0
  5. package/dist/AlertIcon-5B6AgZpe.js.map +1 -0
  6. package/dist/Button-Dg89xRSi.js +36 -0
  7. package/dist/Button-Dg89xRSi.js.map +1 -0
  8. package/dist/ButtonBase-e6qyv6mD.js +158 -0
  9. package/dist/ButtonBase-e6qyv6mD.js.map +1 -0
  10. package/dist/CheckboxField-B6ojieD7.js +347 -0
  11. package/dist/CheckboxField-B6ojieD7.js.map +1 -0
  12. package/dist/Command-BhbfL5wm.js +554 -0
  13. package/dist/Command-BhbfL5wm.js.map +1 -0
  14. package/dist/ComponentVariantProvider-B0SFUaXB.js +8 -0
  15. package/dist/ComponentVariantProvider-B0SFUaXB.js.map +1 -0
  16. package/dist/DayPicker-4hE1QEvO.js +2452 -0
  17. package/dist/DayPicker-4hE1QEvO.js.map +1 -0
  18. package/dist/Description-BTPMlTT-.js +19 -0
  19. package/dist/Description-BTPMlTT-.js.map +1 -0
  20. package/dist/Dialog-ByiJIDhl.js +99 -0
  21. package/dist/Dialog-ByiJIDhl.js.map +1 -0
  22. package/dist/Divider-DPW5ZhZ8.js +24 -0
  23. package/dist/Divider-DPW5ZhZ8.js.map +1 -0
  24. package/dist/EmptyState-DRKjscH-.js +12 -0
  25. package/dist/EmptyState-DRKjscH-.js.map +1 -0
  26. package/dist/ErrorState-B26k67-z.js +11 -0
  27. package/dist/ErrorState-B26k67-z.js.map +1 -0
  28. package/dist/FeatureIcon-BGE0Orkc.js +23 -0
  29. package/dist/FeatureIcon-BGE0Orkc.js.map +1 -0
  30. package/dist/Field-CSvS9f_a.js +86 -0
  31. package/dist/Field-CSvS9f_a.js.map +1 -0
  32. package/dist/FieldLabel-BA0y5lhr.js +70 -0
  33. package/dist/FieldLabel-BA0y5lhr.js.map +1 -0
  34. package/dist/FolderSvg-cw0DxNVy.js +742 -0
  35. package/dist/FolderSvg-cw0DxNVy.js.map +1 -0
  36. package/dist/FormFooterTemplate-BPspyDbr.js +88 -0
  37. package/dist/FormFooterTemplate-BPspyDbr.js.map +1 -0
  38. package/dist/FormHeader--F6b2aRk.js +49 -0
  39. package/dist/FormHeader--F6b2aRk.js.map +1 -0
  40. package/dist/FormStack-DvlFQQiP.js +127 -0
  41. package/dist/FormStack-DvlFQQiP.js.map +1 -0
  42. package/dist/HintState-BxrCAWqq.js +12 -0
  43. package/dist/HintState-BxrCAWqq.js.map +1 -0
  44. package/dist/Icon-DH3ev9GK.js +22 -0
  45. package/dist/Icon-DH3ev9GK.js.map +1 -0
  46. package/dist/IconButton-DwkpNgn3.js +33 -0
  47. package/dist/IconButton-DwkpNgn3.js.map +1 -0
  48. package/dist/IconTooltip-DhkXc8Uy.js +11 -0
  49. package/dist/IconTooltip-DhkXc8Uy.js.map +1 -0
  50. package/dist/Indicator-AqxHWPA9.js +29 -0
  51. package/dist/Indicator-AqxHWPA9.js.map +1 -0
  52. package/dist/InputGroup-BvD9Igmt.js +137 -0
  53. package/dist/InputGroup-BvD9Igmt.js.map +1 -0
  54. package/dist/InputOTP-B2e1nfSO.js +259 -0
  55. package/dist/InputOTP-B2e1nfSO.js.map +1 -0
  56. package/dist/Loader-BpHiL6W-.js +58 -0
  57. package/dist/Loader-BpHiL6W-.js.map +1 -0
  58. package/dist/MenuItem-pvsONHlh.js +32 -0
  59. package/dist/MenuItem-pvsONHlh.js.map +1 -0
  60. package/dist/MenuItemShortcut-DgPol9Nz.js +21 -0
  61. package/dist/MenuItemShortcut-DgPol9Nz.js.map +1 -0
  62. package/dist/MenuItemText-7uPl9P3z.js +20 -0
  63. package/dist/MenuItemText-7uPl9P3z.js.map +1 -0
  64. package/dist/Overlay-2XMlxApi.js +28 -0
  65. package/dist/Overlay-2XMlxApi.js.map +1 -0
  66. package/dist/Popover-Dvr7y0YY.js +258 -0
  67. package/dist/Popover-Dvr7y0YY.js.map +1 -0
  68. package/dist/RichButton-DuPTenmS.js +49 -0
  69. package/dist/RichButton-DuPTenmS.js.map +1 -0
  70. package/dist/ScrollArea-CuuTeDn3.js +576 -0
  71. package/dist/ScrollArea-CuuTeDn3.js.map +1 -0
  72. package/dist/ScrollShadowContainer-DdrnF8qU.js +36 -0
  73. package/dist/ScrollShadowContainer-DdrnF8qU.js.map +1 -0
  74. package/dist/SearchSelectTag-DFCX9zT1.js +56 -0
  75. package/dist/SearchSelectTag-DFCX9zT1.js.map +1 -0
  76. package/dist/Select-DRwv6-eZ.js +980 -0
  77. package/dist/Select-DRwv6-eZ.js.map +1 -0
  78. package/dist/Sheet-rtwmzm2-.js +83 -0
  79. package/dist/Sheet-rtwmzm2-.js.map +1 -0
  80. package/dist/Shortcut-D8L15_ed.js +22 -0
  81. package/dist/Shortcut-D8L15_ed.js.map +1 -0
  82. package/dist/Skeleton-y6I-i9q5.js +21 -0
  83. package/dist/Skeleton-y6I-i9q5.js.map +1 -0
  84. package/dist/Tag-DdHXTyKF.js +199 -0
  85. package/dist/Tag-DdHXTyKF.js.map +1 -0
  86. package/dist/Text-DeBE8AKl.js +22 -0
  87. package/dist/Text-DeBE8AKl.js.map +1 -0
  88. package/dist/TextInput-Cj50ImXi.js +205 -0
  89. package/dist/TextInput-Cj50ImXi.js.map +1 -0
  90. package/dist/TextOverflowTooltip-DlUgic5y.js +36 -0
  91. package/dist/TextOverflowTooltip-DlUgic5y.js.map +1 -0
  92. package/dist/Toggle-v_HT3Gm2.js +40 -0
  93. package/dist/Toggle-v_HT3Gm2.js.map +1 -0
  94. package/dist/Tooltip-C4rVuWr4.js +473 -0
  95. package/dist/Tooltip-C4rVuWr4.js.map +1 -0
  96. package/dist/TriggerButton-CfDObWP9.js +33 -0
  97. package/dist/TriggerButton-CfDObWP9.js.map +1 -0
  98. package/dist/blocks/auth/otp-form/OTPForm.d.ts +47 -0
  99. package/dist/blocks/auth/otp-form/OTPForm.stories.d.ts +40 -0
  100. package/dist/blocks/auth/otp-form/components/EmailForm.d.ts +25 -0
  101. package/dist/blocks/auth/otp-form/components/OTPInputForm.d.ts +27 -0
  102. package/dist/blocks/auth/otp-form/components/ResendButton.d.ts +14 -0
  103. package/dist/blocks/auth/otp-form/index.d.ts +3 -0
  104. package/dist/blocks/auth/otp-form/utils/OTPError.d.ts +8 -0
  105. package/dist/blocks/auth/otp-form.d.ts +2 -0
  106. package/dist/blocks/auth/otp-form.js +309 -0
  107. package/dist/blocks/auth/otp-form.js.map +1 -0
  108. package/dist/buildMatchPatternFn-d7GTeGl_.js +68 -0
  109. package/dist/buildMatchPatternFn-d7GTeGl_.js.map +1 -0
  110. package/dist/{bundle-mjs-D6wdQkGI.js → bundle-mjs-CQ0w4GOB.js} +347 -338
  111. package/dist/{bundle-mjs-D6wdQkGI.js.map → bundle-mjs-CQ0w4GOB.js.map} +1 -1
  112. package/dist/{check-C-TqZgvb.js → check-CeyaOoZv.js} +2 -2
  113. package/dist/{check-C-TqZgvb.js.map → check-CeyaOoZv.js.map} +1 -1
  114. package/dist/chevron-down-CAOItu8X.js +14 -0
  115. package/dist/chevron-down-CAOItu8X.js.map +1 -0
  116. package/dist/chevron-left-D6FtXcdU.js +14 -0
  117. package/dist/chevron-left-D6FtXcdU.js.map +1 -0
  118. package/dist/chevron-right-D3juAhA-.js +14 -0
  119. package/dist/chevron-right-D3juAhA-.js.map +1 -0
  120. package/dist/chevron-up-UDiVTHo0.js +12 -0
  121. package/dist/chevron-up-UDiVTHo0.js.map +1 -0
  122. package/dist/circle-alert-CVIokIC7.js +16 -0
  123. package/dist/circle-alert-CVIokIC7.js.map +1 -0
  124. package/dist/circle-x-u75Rx3Tj.js +16 -0
  125. package/dist/circle-x-u75Rx3Tj.js.map +1 -0
  126. package/dist/{utils-2yE78m5l.js → cn-dsXlqdJg.js} +2 -2
  127. package/dist/cn-dsXlqdJg.js.map +1 -0
  128. package/dist/components/alert/Alert.d.ts +12 -0
  129. package/dist/components/alert/Alert.stories.d.ts +38 -0
  130. package/dist/components/alert/AlertContext.d.ts +16 -0
  131. package/dist/components/alert/components/AlertButton.d.ts +8 -0
  132. package/dist/components/alert/components/AlertDescription.d.ts +7 -0
  133. package/dist/components/alert/components/AlertIcon.d.ts +14 -0
  134. package/dist/components/alert/components/AlertTitle.d.ts +11 -0
  135. package/dist/components/alert/index.d.ts +6 -0
  136. package/dist/components/alert-dialog/AlertDialog.d.ts +69 -0
  137. package/dist/components/alert-dialog/AlertDialog.stories.d.ts +32 -0
  138. package/dist/components/alert-dialog/index.d.ts +1 -0
  139. package/dist/components/alert-dialog.d.ts +2 -0
  140. package/dist/components/alert-dialog.js +313 -0
  141. package/dist/components/alert-dialog.js.map +1 -0
  142. package/dist/components/alert.d.ts +2 -0
  143. package/dist/components/alert.js +50 -0
  144. package/dist/components/alert.js.map +1 -0
  145. package/dist/components/avatar/Avatar.d.ts +7 -0
  146. package/dist/components/avatar/Avatar.stories.d.ts +10 -0
  147. package/dist/components/avatar/avatar-fallback/AvatarFallback.d.ts +6 -0
  148. package/dist/components/avatar/avatar-icon/AvatarIcon.d.ts +6 -0
  149. package/dist/components/avatar/avatar-image/AvatarImage.d.ts +3 -0
  150. package/dist/components/avatar/avatar-indicator/AvatarIndicator.d.ts +5 -0
  151. package/dist/components/avatar/avatar-label/AvatarLabel.d.ts +5 -0
  152. package/dist/components/avatar/avatar-label/AvatarLabel.stories.d.ts +10 -0
  153. package/dist/components/avatar/avatar-label/AvatarLabelContext.d.ts +9 -0
  154. package/dist/components/avatar/avatar-label/components/avatar-label-avatar/AvatarLabelAvatar.d.ts +6 -0
  155. package/dist/components/avatar/avatar-label/components/avatar-label-description/AvatarLabelDescription.d.ts +10 -0
  156. package/dist/components/avatar/avatar-label/components/avatar-label-indicator/AvatarLabelIndicator.d.ts +6 -0
  157. package/dist/components/avatar/avatar-label/components/avatar-label-title/AvatarLabelTitle.d.ts +6 -0
  158. package/dist/components/avatar/index.d.ts +13 -0
  159. package/dist/components/avatar.d.ts +2 -0
  160. package/dist/components/avatar.js +432 -0
  161. package/dist/components/avatar.js.map +1 -0
  162. package/dist/components/badge/Badge.d.ts +7 -382
  163. package/dist/components/badge.js +24 -46
  164. package/dist/components/badge.js.map +1 -1
  165. package/dist/components/banner/Banner.d.ts +5 -0
  166. package/dist/components/banner/Banner.stories.d.ts +8 -0
  167. package/dist/components/banner/components/banner-description/BannerDescription.d.ts +5 -0
  168. package/dist/components/banner/components/banner-description/BannerDescription.stories.d.ts +14 -0
  169. package/dist/components/banner/components/banner-title/BannerTitle.d.ts +5 -0
  170. package/dist/components/banner/components/banner-title/BannerTitle.stories.d.ts +14 -0
  171. package/dist/components/banner/index.d.ts +3 -0
  172. package/dist/components/banner.d.ts +2 -0
  173. package/dist/components/banner.js +27 -0
  174. package/dist/components/banner.js.map +1 -0
  175. package/dist/components/breadcrumb/Breadcrumb.d.ts +19 -0
  176. package/dist/components/breadcrumb/Breadcrumb.stories.d.ts +10 -0
  177. package/dist/components/breadcrumb/index.d.ts +1 -0
  178. package/dist/components/breadcrumb.d.ts +2 -0
  179. package/dist/components/breadcrumb.js +78 -0
  180. package/dist/components/breadcrumb.js.map +1 -0
  181. package/dist/components/button/button/Button.d.ts +6 -167
  182. package/dist/components/button/button/Button.stories.d.ts +4 -164
  183. package/dist/components/button/button-base/ButtonBase.d.ts +7 -328
  184. package/dist/components/button/icon-button/IconButton.d.ts +5 -466
  185. package/dist/components/button/icon-button/IconButton.stories.d.ts +21 -2
  186. package/dist/components/button/index.d.ts +9 -0
  187. package/dist/components/button/rich-button/RichButton.d.ts +79 -0
  188. package/dist/components/button/rich-button/RichButton.stories.d.ts +46 -0
  189. package/dist/components/button/templates/loading-button/LoadingButtonTemplate.d.ts +12 -0
  190. package/dist/components/button/templates/loading-button/LoadingButtonTemplate.stories.d.ts +21 -0
  191. package/dist/components/button/trigger-button/TriggerButton.d.ts +13 -0
  192. package/dist/components/button/trigger-button/TriggerButton.stories.d.ts +7 -0
  193. package/dist/components/button.js +26 -6
  194. package/dist/components/button.js.map +1 -1
  195. package/dist/components/calendar/Calendar.d.ts +14 -0
  196. package/dist/components/calendar/Calendar.stories.d.ts +45 -0
  197. package/dist/components/calendar/components/calendar-chevron/CalendarChevron.d.ts +12 -0
  198. package/dist/components/calendar/components/calendar-day-button/CalendarDayButton.d.ts +26 -0
  199. package/dist/components/calendar/components/calendar-day-button/CalendarDayButton.stories.d.ts +18 -0
  200. package/dist/components/calendar/components/calendar-next-month-button/CalendarNextMonthButton.d.ts +11 -0
  201. package/dist/components/calendar/components/calendar-previous-month-button/CalendarPreviousMonthButton.d.ts +11 -0
  202. package/dist/components/calendar/components/calendar-root/CalendarRoot.d.ts +11 -0
  203. package/dist/components/calendar/components/calendar-week-day/CalendarWeekDay.d.ts +11 -0
  204. package/dist/components/calendar/components/calendar-week-day/CalendarWeekDay.stories.d.ts +7 -0
  205. package/dist/components/calendar/index.d.ts +3 -0
  206. package/dist/components/calendar.d.ts +2 -0
  207. package/dist/components/calendar.js +186 -0
  208. package/dist/components/calendar.js.map +1 -0
  209. package/dist/components/card/Card.d.ts +7 -0
  210. package/dist/components/card/Card.stories.d.ts +17 -0
  211. package/dist/components/card/components/ActionCard.d.ts +7 -0
  212. package/dist/components/card/components/CardFeature.d.ts +7 -0
  213. package/dist/components/card/components/CardFolder.d.ts +9 -0
  214. package/dist/components/card/components/CardFooter.d.ts +7 -0
  215. package/dist/components/card/components/CardMenuTrigger.d.ts +8 -0
  216. package/dist/components/card/components/CardSubTitle.d.ts +7 -0
  217. package/dist/components/card/components/CardTitle.d.ts +7 -0
  218. package/dist/components/card/components/CardVisualBadge.d.ts +7 -0
  219. package/dist/components/card/components/FolderSvg.d.ts +3 -0
  220. package/dist/components/card/index.d.ts +19 -0
  221. package/dist/components/card/styles.d.ts +2 -0
  222. package/dist/components/card.d.ts +2 -0
  223. package/dist/components/card.js +159 -0
  224. package/dist/components/card.js.map +1 -0
  225. package/dist/components/carousel/Carousel.d.ts +17 -0
  226. package/dist/components/carousel/Carousel.stories.d.ts +8 -0
  227. package/dist/components/carousel/components/carousel-buttons/CarouselButtons.d.ts +27 -0
  228. package/dist/components/carousel/components/carousel-item/CarouselItem.d.ts +3 -0
  229. package/dist/components/carousel/index.d.ts +4 -0
  230. package/dist/components/carousel/utils/CarouselContext.d.ts +13 -0
  231. package/dist/components/carousel/utils/useCarousel.d.ts +10 -0
  232. package/dist/components/carousel.d.ts +2 -0
  233. package/dist/components/carousel.js +1700 -0
  234. package/dist/components/carousel.js.map +1 -0
  235. package/dist/components/checkbox/Checkbox.d.ts +49 -2
  236. package/dist/components/checkbox/Checkbox.test.d.ts +1 -0
  237. package/dist/components/checkbox/checkbox-field/CheckboxField.d.ts +10 -456
  238. package/dist/components/checkbox/checkbox-field/CheckboxField.stories.d.ts +3 -228
  239. package/dist/components/checkbox/index.d.ts +2 -2
  240. package/dist/components/checkbox.js +4 -3
  241. package/dist/components/collapsible/Collapsible.d.ts +6 -0
  242. package/dist/components/collapsible/Collapsible.stories.d.ts +6 -0
  243. package/dist/components/collapsible/index.d.ts +1 -0
  244. package/dist/components/collapsible.d.ts +2 -0
  245. package/dist/components/collapsible.js +133 -0
  246. package/dist/components/collapsible.js.map +1 -0
  247. package/dist/components/color-tile/ColorTile.d.ts +9 -0
  248. package/dist/components/color-tile/ColorTile.stories.d.ts +6 -0
  249. package/dist/components/color-tile/index.d.ts +1 -0
  250. package/dist/components/color-tile.d.ts +2 -0
  251. package/dist/components/color-tile.js +26 -0
  252. package/dist/components/color-tile.js.map +1 -0
  253. package/dist/components/command/Command.d.ts +108 -0
  254. package/dist/components/command/Command.stories.d.ts +34 -0
  255. package/dist/components/command/index.d.ts +1 -0
  256. package/dist/components/command.d.ts +2 -0
  257. package/dist/components/command.js +15 -0
  258. package/dist/components/command.js.map +1 -0
  259. package/dist/components/container/Container.d.ts +29 -0
  260. package/dist/components/container/Container.stories.d.ts +6 -0
  261. package/dist/components/container/index.d.ts +1 -0
  262. package/dist/components/container.d.ts +2 -0
  263. package/dist/components/container.js +23 -0
  264. package/dist/components/container.js.map +1 -0
  265. package/dist/components/counter/Counter.d.ts +14 -0
  266. package/dist/components/counter/Counter.stories.d.ts +9 -0
  267. package/dist/components/counter/index.d.ts +1 -0
  268. package/dist/components/counter.d.ts +2 -0
  269. package/dist/components/counter.js +142 -0
  270. package/dist/components/counter.js.map +1 -0
  271. package/dist/components/data-table/DataTable.stories.d.ts +8 -0
  272. package/dist/components/description/Description.d.ts +5 -1
  273. package/dist/components/description/Description.stories.d.ts +10 -0
  274. package/dist/components/description.js +1 -1
  275. package/dist/components/dialog/Dialog.d.ts +51 -12
  276. package/dist/components/dialog/Dialog.stories.d.ts +26 -0
  277. package/dist/components/dialog/DialogTemplates.d.ts +24 -0
  278. package/dist/components/dialog/index.d.ts +4 -0
  279. package/dist/components/dialog.d.ts +2 -0
  280. package/dist/components/dialog.js +47 -0
  281. package/dist/components/dialog.js.map +1 -0
  282. package/dist/components/divider/Divider.d.ts +6 -118
  283. package/dist/components/divider/content-divider/ContentDivider.d.ts +15 -0
  284. package/dist/components/divider/content-divider/ContentDivider.stories.d.ts +7 -0
  285. package/dist/components/divider/index.d.ts +1 -0
  286. package/dist/components/divider.js +32 -1
  287. package/dist/components/divider.js.map +1 -1
  288. package/dist/components/drawer/Drawer.d.ts +13 -0
  289. package/dist/components/drawer/Drawer.stories.d.ts +25 -0
  290. package/dist/components/drawer/components/drawer-body/DrawerBody.d.ts +3 -0
  291. package/dist/components/drawer/components/drawer-content/DrawerContent.d.ts +19 -0
  292. package/dist/components/drawer/components/drawer-footer/DrawerFooter.d.ts +3 -0
  293. package/dist/components/drawer/components/drawer-handler/DrawerHandler.d.ts +2 -0
  294. package/dist/components/drawer/components/drawer-handler/DrawerHandlerSvg.d.ts +1 -0
  295. package/dist/components/drawer/components/drawer-header/DrawerHeader.d.ts +3 -0
  296. package/dist/components/drawer/components/drawer-overlay/DrawerOverlay.d.ts +7 -0
  297. package/dist/components/drawer/index.d.ts +9 -0
  298. package/dist/components/{modal/templates/footer-template/ModalFooterTemplate.d.ts → drawer/templates/drawer-footer-template/DrawerFooterTemplate.d.ts} +6 -6
  299. package/dist/components/drawer/templates/drawer-header-template/DrawerHeaderTemplate.d.ts +10 -0
  300. package/dist/components/drawer.d.ts +2 -0
  301. package/dist/components/drawer.js +1232 -0
  302. package/dist/components/drawer.js.map +1 -0
  303. package/dist/components/dropdown/Dropdown.d.ts +80 -0
  304. package/dist/components/dropdown/Dropdown.stories.d.ts +22 -0
  305. package/dist/components/dropdown/index.d.ts +3 -0
  306. package/dist/components/dropdown/useHoverDropdown.d.ts +68 -0
  307. package/dist/components/dropdown.d.ts +2 -0
  308. package/dist/components/dropdown.js +1152 -0
  309. package/dist/components/dropdown.js.map +1 -0
  310. package/dist/components/empty-state/EmptyState.d.ts +5 -0
  311. package/dist/components/empty-state/EmptyState.stories.d.ts +6 -0
  312. package/dist/components/empty-state/index.d.ts +1 -0
  313. package/dist/components/empty-state.d.ts +2 -0
  314. package/dist/components/empty-state.js +5 -0
  315. package/dist/components/empty-state.js.map +1 -0
  316. package/dist/components/error-state/ErrorState.d.ts +3 -0
  317. package/dist/components/error-state/ErrorState.stories.d.ts +6 -0
  318. package/dist/components/error-state/Retry.d.ts +10 -0
  319. package/dist/components/error-state/Retry.stories.d.ts +7 -0
  320. package/dist/components/error-state/index.d.ts +2 -0
  321. package/dist/components/error-state.d.ts +2 -0
  322. package/dist/components/error-state.js +16 -0
  323. package/dist/components/error-state.js.map +1 -0
  324. package/dist/components/field/Field.d.ts +38 -106
  325. package/dist/components/field/Field.stories.d.ts +1 -1
  326. package/dist/components/field.js +1 -1
  327. package/dist/components/file-upload/FileUpload.d.ts +24 -0
  328. package/dist/components/file-upload/FileUpload.stories.d.ts +19 -0
  329. package/dist/components/file-upload/components/file-upload-clear-button/FileUploadClearButton.d.ts +9 -0
  330. package/dist/components/file-upload/components/file-upload-compact-input-zone/FileUploadCompactInputZone.d.ts +9 -0
  331. package/dist/components/file-upload/components/file-upload-drop-area/FileUploadDropArea.d.ts +12 -0
  332. package/dist/components/file-upload/components/file-upload-drop-area/FileUploadDropArea.stories.d.ts +18 -0
  333. package/dist/components/file-upload/components/file-upload-drop-area-icon/FileUploadDropAreaIcon.d.ts +3 -0
  334. package/dist/components/file-upload/components/file-upload-drop-area-icon/FileUploadDropAreaIcon.stories.d.ts +14 -0
  335. package/dist/components/file-upload/components/file-upload-error/FileUploadError.d.ts +7 -0
  336. package/dist/components/file-upload/components/file-upload-error/FileUploadError.stories.d.ts +15 -0
  337. package/dist/components/file-upload/components/file-upload-icon/FileUploadIcon.d.ts +5 -0
  338. package/dist/components/file-upload/components/file-upload-icon/FileUploadIcon.stories.d.ts +13 -0
  339. package/dist/components/file-upload/components/file-upload-inline-drop-area/FileUploadInlineDropArea.d.ts +12 -0
  340. package/dist/components/file-upload/components/file-upload-inline-drop-area/FileUploadInlineDropArea.stories.d.ts +18 -0
  341. package/dist/components/file-upload/components/file-upload-input-zone/FileUploadInputZone.d.ts +9 -0
  342. package/dist/components/file-upload/components/file-upload-item/FileUploadItem.d.ts +12 -0
  343. package/dist/components/file-upload/components/file-upload-item/FileUploadItem.stories.d.ts +19 -0
  344. package/dist/components/file-upload/components/file-upload-item-compact/FileUploadItemCompact.d.ts +14 -0
  345. package/dist/components/file-upload/components/file-upload-item-compact/FileUploadItemCompact.stories.d.ts +19 -0
  346. package/dist/components/file-upload/file-upload-compact/FileUploadCompact.d.ts +19 -0
  347. package/dist/components/file-upload/file-upload-compact/FileUploadCompact.stories.d.ts +20 -0
  348. package/dist/components/file-upload/index.d.ts +11 -0
  349. package/dist/components/file-upload.d.ts +2 -0
  350. package/dist/components/file-upload.js +484 -0
  351. package/dist/components/file-upload.js.map +1 -0
  352. package/dist/components/form/Form.d.ts +27 -4
  353. package/dist/components/form/Form.stories.d.ts +22 -7
  354. package/dist/components/form/components/form-body/FormBody.d.ts +5 -0
  355. package/dist/components/form/components/form-divider/FormDivider.d.ts +6 -0
  356. package/dist/components/form/components/form-field/FormField.d.ts +21 -62
  357. package/dist/components/form/components/form-field/FormField.stories.d.ts +10 -0
  358. package/dist/components/form/components/form-field-set/FormFieldSet.d.ts +3 -0
  359. package/dist/components/form/components/form-footer/FormFooter.d.ts +5 -0
  360. package/dist/components/form/components/form-header/FormHeader.d.ts +16 -0
  361. package/dist/components/form/components/form-section-header-button/FormSectionHeaderButton.d.ts +17 -0
  362. package/dist/components/form/components/form-section-title/FormSectionTitle.d.ts +3 -1
  363. package/dist/components/form/components/form-stack/FormStack.d.ts +3 -0
  364. package/dist/components/form/index.d.ts +10 -1
  365. package/dist/components/form/templates/footer-template/FormFooterTemplate.d.ts +24 -0
  366. package/dist/components/form/templates/header-template/FormHeaderTemplate.d.ts +43 -0
  367. package/dist/components/form.js +59 -335
  368. package/dist/components/form.js.map +1 -1
  369. package/dist/components/hint-state/HintState.d.ts +3 -0
  370. package/dist/components/hint-state/HintState.stories.d.ts +6 -0
  371. package/dist/components/hint-state/index.d.ts +1 -0
  372. package/dist/components/hint-state.d.ts +2 -0
  373. package/dist/components/hint-state.js +5 -0
  374. package/dist/components/hint-state.js.map +1 -0
  375. package/dist/components/icon/Icon.d.ts +9 -48
  376. package/dist/components/icon/Icon.stories.d.ts +7 -4
  377. package/dist/components/icon/feature-icon/FeatureIcon.d.ts +4 -75
  378. package/dist/components/icon/feature-icon/FeatureIcon.stories.d.ts +16 -6
  379. package/dist/components/icon/index.d.ts +2 -0
  380. package/dist/components/icon-tooltip/IconTooltip.d.ts +5 -4
  381. package/dist/components/icon-tooltip/index.d.ts +2 -0
  382. package/dist/components/icon-tooltip.d.ts +2 -0
  383. package/dist/components/icon-tooltip.js +5 -0
  384. package/dist/components/icon-tooltip.js.map +1 -0
  385. package/dist/components/icon.d.ts +2 -0
  386. package/dist/components/icon.js +7 -0
  387. package/dist/components/icon.js.map +1 -0
  388. package/dist/components/image-placeholder/ImagePlaceholder.d.ts +6 -0
  389. package/dist/components/image-placeholder/ImagePlaceholder.stories.d.ts +6 -0
  390. package/dist/components/image-placeholder/index.d.ts +1 -0
  391. package/dist/components/image-placeholder.d.ts +2 -0
  392. package/dist/components/image-placeholder.js +22 -0
  393. package/dist/components/image-placeholder.js.map +1 -0
  394. package/dist/components/image-preview/ImagePreview.d.ts +23 -0
  395. package/dist/components/image-preview/ImagePreview.stories.d.ts +6 -0
  396. package/dist/components/image-preview/index.d.ts +1 -0
  397. package/dist/components/image-preview/utils.d.ts +1 -0
  398. package/dist/components/image-preview.d.ts +2 -0
  399. package/dist/components/image-preview.js +124 -0
  400. package/dist/components/image-preview.js.map +1 -0
  401. package/dist/components/image-uploader/ImageUploader.d.ts +27 -0
  402. package/dist/components/image-uploader/ImageUploader.stories.d.ts +6 -0
  403. package/dist/components/image-uploader/components/ImageCameraAddSvg.d.ts +5 -0
  404. package/dist/components/image-uploader/components/ImageUploaderButton.d.ts +8 -0
  405. package/dist/components/image-uploader/index.d.ts +1 -0
  406. package/dist/components/image-uploader.d.ts +2 -0
  407. package/dist/components/image-uploader.js +88 -0
  408. package/dist/components/image-uploader.js.map +1 -0
  409. package/dist/components/images/BoxSvg.d.ts +5 -0
  410. package/dist/components/images/BoxSvg.stories.d.ts +13 -0
  411. package/dist/components/images/FolderSvg.d.ts +5 -0
  412. package/dist/components/images/FolderSvg.stories.d.ts +13 -0
  413. package/dist/components/images/index.d.ts +2 -0
  414. package/dist/components/images.d.ts +2 -0
  415. package/dist/components/images.js +6 -0
  416. package/dist/components/images.js.map +1 -0
  417. package/dist/components/indicator/Indicator.d.ts +7 -0
  418. package/dist/components/indicator/Indicator.stories.d.ts +6 -0
  419. package/dist/components/indicator/index.d.ts +1 -0
  420. package/dist/components/indicator.d.ts +2 -0
  421. package/dist/components/indicator.js +5 -0
  422. package/dist/components/indicator.js.map +1 -0
  423. package/dist/components/input/components/clear-button/ClearButton.d.ts +3 -3
  424. package/dist/components/input/file-input/FileInput.d.ts +34 -0
  425. package/dist/components/input/file-input/FileInput.stories.d.ts +12 -0
  426. package/dist/components/input/index.d.ts +3 -0
  427. package/dist/components/input/input/Input.d.ts +5 -2
  428. package/dist/components/input/input/Input.stories.d.ts +3 -0
  429. package/dist/components/input/input-group/InputGroup.d.ts +37 -0
  430. package/dist/components/input/input-group/InputGroup.stories.d.ts +7 -0
  431. package/dist/components/input/secret-input/SecretInput.d.ts +14 -5
  432. package/dist/components/input/secret-input/SecretInput.stories.d.ts +4 -0
  433. package/dist/components/input/styles/inputBaseStyles.d.ts +3 -0
  434. package/dist/components/input/text-input/TextInput.d.ts +2 -2
  435. package/dist/components/input/text-input/TextInput.stories.d.ts +2 -2
  436. package/dist/components/input/web-input/WebInput.d.ts +15 -0
  437. package/dist/components/input/web-input/WebInput.stories.d.ts +14 -0
  438. package/dist/components/input-otp/InputOTP.d.ts +29 -0
  439. package/dist/components/input-otp/InputOTP.stories.d.ts +9 -0
  440. package/dist/components/input-otp/components/input-otp-group/InputOTPGroup.d.ts +2 -0
  441. package/dist/components/input-otp/components/input-otp-separator/InputOTPSeparator.d.ts +2 -0
  442. package/dist/components/input-otp/components/input-otp-slot/InputOTPSlot.d.ts +4 -0
  443. package/dist/components/input-otp/index.d.ts +4 -0
  444. package/dist/components/input-otp.d.ts +2 -0
  445. package/dist/components/input-otp.js +8 -0
  446. package/dist/components/input-otp.js.map +1 -0
  447. package/dist/components/input.js +223 -202
  448. package/dist/components/input.js.map +1 -1
  449. package/dist/components/label/Label.d.ts +1 -3
  450. package/dist/components/label/Label.stories.d.ts +1 -5
  451. package/dist/components/label/field-label/FieldLabel.d.ts +4 -47
  452. package/dist/components/label/field-label/FieldLabel.stories.d.ts +1 -0
  453. package/dist/components/label/field-label/components/RequiredIcon.d.ts +5 -0
  454. package/dist/components/label.js +1 -1
  455. package/dist/components/loader/Loader.d.ts +6 -0
  456. package/dist/components/loader/Loader.stories.d.ts +6 -0
  457. package/dist/components/loader/index.d.ts +1 -0
  458. package/dist/components/loader.d.ts +2 -0
  459. package/dist/components/loader.js +5 -0
  460. package/dist/components/loader.js.map +1 -0
  461. package/dist/components/menu-item/MenuItem.d.ts +31 -0
  462. package/dist/components/menu-item/MenuItem.stories.d.ts +6 -0
  463. package/dist/components/menu-item/MenuItemAction.d.ts +6 -0
  464. package/dist/components/menu-item/components/menu-item-button/MenuItemButton.d.ts +37 -0
  465. package/dist/components/menu-item/components/menu-item-button/MenuItemButton.stories.d.ts +7 -0
  466. package/dist/components/menu-item/components/menu-item-icon/MenuItemIcon.d.ts +7 -0
  467. package/dist/components/menu-item/components/menu-item-icon/MenuItemIcon.stories.d.ts +6 -0
  468. package/dist/components/menu-item/components/menu-item-icon-button/MenuItemIconButton.d.ts +5 -0
  469. package/dist/components/menu-item/components/menu-item-icon-button/MenuItemIconButton.stories.d.ts +7 -0
  470. package/dist/components/menu-item/components/menu-item-secondary-text/MenuItemSecondaryText.d.ts +21 -0
  471. package/dist/components/menu-item/components/menu-item-secondary-text/MenuItemSecondaryText.stories.d.ts +6 -0
  472. package/dist/components/menu-item/components/menu-item-shortcut/MenuItemShortcut.d.ts +21 -0
  473. package/dist/components/menu-item/components/menu-item-shortcut/MenuItemShortcut.stories.d.ts +6 -0
  474. package/dist/components/menu-item/components/menu-item-text/MenuItemText.d.ts +21 -0
  475. package/dist/components/menu-item/components/menu-item-text/MenuItemText.stories.d.ts +6 -0
  476. package/dist/components/menu-item/index.d.ts +13 -0
  477. package/dist/components/menu-item/templates/menu-item-action-template/MenuItemActionTemplate.d.ts +12 -0
  478. package/dist/components/menu-item/templates/menu-item-action-template/MenuItemActionTemplate.stories.d.ts +6 -0
  479. package/dist/components/menu-item/templates/menu-item-common-template/MenuItemCommonTemplate.d.ts +16 -0
  480. package/dist/components/menu-item/templates/menu-item-common-template/MenuItemCommonTemplate.stories.d.ts +6 -0
  481. package/dist/components/menu-item/templates/menu-item-info-template/MenuItemInfoTemplate.d.ts +13 -0
  482. package/dist/components/menu-item/templates/menu-item-info-template/MenuItemInfoTemplate.stories.d.ts +6 -0
  483. package/dist/components/menu-item/templates/menu-item-interactive-template/MenuItemInteractiveTemplate.d.ts +16 -0
  484. package/dist/components/menu-item/templates/menu-item-interactive-template/MenuItemInteractiveTemplate.stories.d.ts +6 -0
  485. package/dist/components/menu-item/templates/menu-item-rich-template/MenuItemRichTemplate.d.ts +11 -0
  486. package/dist/components/menu-item/templates/menu-item-rich-template/MenuItemRichTemplate.stories.d.ts +6 -0
  487. package/dist/components/menu-item.d.ts +2 -0
  488. package/dist/components/menu-item.js +243 -0
  489. package/dist/components/menu-item.js.map +1 -0
  490. package/dist/components/overflow-tooltip/OverflowTooltip.d.ts +29 -0
  491. package/dist/components/overflow-tooltip/OverflowTooltip.stories.d.ts +9 -0
  492. package/dist/components/overflow-tooltip/TextOverflowTooltip.d.ts +11 -0
  493. package/dist/components/overflow-tooltip/TextOverflowTooltip.stories.d.ts +6 -0
  494. package/dist/components/overflow-tooltip/index.d.ts +3 -0
  495. package/dist/components/overflow-tooltip/useOverflowTooltip.d.ts +6 -0
  496. package/dist/components/overflow-tooltip.d.ts +2 -0
  497. package/dist/components/overflow-tooltip.js +7 -0
  498. package/dist/components/overflow-tooltip.js.map +1 -0
  499. package/dist/components/overlay/Overlay.d.ts +45 -0
  500. package/dist/components/overlay/Overlay.stories.d.ts +6 -0
  501. package/dist/components/overlay/index.d.ts +1 -0
  502. package/dist/components/overlay.d.ts +2 -0
  503. package/dist/components/overlay.js +5 -0
  504. package/dist/components/overlay.js.map +1 -0
  505. package/dist/components/page-state/PageState.d.ts +8 -0
  506. package/dist/components/page-state/PageState.stories.d.ts +9 -0
  507. package/dist/components/page-state/components/PageStateAction.d.ts +14 -0
  508. package/dist/components/page-state/components/PageStateBoxSvg.d.ts +6 -0
  509. package/dist/components/page-state/components/PageStateButtonGroup.d.ts +3 -0
  510. package/dist/components/page-state/components/PageStateCancel.d.ts +14 -0
  511. package/dist/components/page-state/components/PageStateDescription.d.ts +8 -0
  512. package/dist/components/page-state/components/PageStateFeatureIcon.d.ts +7 -0
  513. package/dist/components/page-state/components/PageStateFolderSvg.d.ts +7 -0
  514. package/dist/components/page-state/components/PageStateTitle.d.ts +8 -0
  515. package/dist/components/page-state/context/PageStateContext.d.ts +12 -0
  516. package/dist/components/page-state/hooks/usePageStateButtonSize.d.ts +3 -0
  517. package/dist/components/page-state/index.d.ts +10 -0
  518. package/dist/components/page-state.d.ts +2 -0
  519. package/dist/components/page-state.js +173 -0
  520. package/dist/components/page-state.js.map +1 -0
  521. package/dist/components/popover/Popover.d.ts +31 -0
  522. package/dist/components/popover/Popover.stories.d.ts +24 -0
  523. package/dist/components/popover/index.d.ts +1 -0
  524. package/dist/components/popover.d.ts +2 -0
  525. package/dist/components/popover.js +9 -0
  526. package/dist/components/popover.js.map +1 -0
  527. package/dist/components/portal-container/PortalContainer.d.ts +10 -0
  528. package/dist/components/portal-container/index.d.ts +2 -0
  529. package/dist/components/portal-container/portalContainerEvents.d.ts +12 -0
  530. package/dist/components/portal-container/usePortalContainer.d.ts +10 -0
  531. package/dist/components/portal-container.d.ts +2 -0
  532. package/dist/components/portal-container.js +14 -0
  533. package/dist/components/portal-container.js.map +1 -0
  534. package/dist/components/progress/Progress.d.ts +15 -0
  535. package/dist/components/progress/Progress.stories.d.ts +9 -0
  536. package/dist/components/progress/ProgressBarStyles.d.ts +70 -0
  537. package/dist/components/progress/components/progress-icon/ProgressIcon.d.ts +5 -0
  538. package/dist/components/progress/components/progress-icon/ProgressIcon.stories.d.ts +6 -0
  539. package/dist/components/progress/components/progress-icon-button/ProgressIconButton.d.ts +5 -0
  540. package/dist/components/progress/components/progress-icon-button/ProgressIconButton.stories.d.ts +6 -0
  541. package/dist/components/progress/components/progress-text/ProgressText.d.ts +6 -0
  542. package/dist/components/progress/components/progress-text/ProgressText.stories.d.ts +6 -0
  543. package/dist/components/progress/index.d.ts +10 -0
  544. package/dist/components/progress/templates/ProgressBlockTemplate.d.ts +16 -0
  545. package/dist/components/progress/templates/ProgressBlockTemplate.stories.d.ts +7 -0
  546. package/dist/components/progress-circle/ProgressCircle.d.ts +186 -0
  547. package/dist/components/progress-circle/ProgressCircle.stories.d.ts +9 -0
  548. package/dist/components/progress-circle/components/progress-circle-description/ProgressCircleDescription.d.ts +5 -0
  549. package/dist/components/progress-circle/components/progress-circle-description/ProgressCircleDescription.stories.d.ts +6 -0
  550. package/dist/components/progress-circle/components/progress-circle-icon-button/ProgressCircleIconButton.d.ts +70 -0
  551. package/dist/components/progress-circle/components/progress-circle-icon-button/ProgressCircleIconButton.stories.d.ts +6 -0
  552. package/dist/components/progress-circle/components/progress-circle-text/ProgressCircleTitle.d.ts +56 -0
  553. package/dist/components/progress-circle/components/progress-circle-text/ProgressCircleTitle.stories.d.ts +6 -0
  554. package/dist/components/progress-circle/index.d.ts +5 -0
  555. package/dist/components/progress-circle/templates/ProgressCircleTemplate.d.ts +13 -0
  556. package/dist/components/progress-circle/templates/ProgressCircleTemplate.stories.d.ts +8 -0
  557. package/dist/components/progress-circle.d.ts +2 -0
  558. package/dist/components/progress-circle.js +187 -0
  559. package/dist/components/progress-circle.js.map +1 -0
  560. package/dist/components/progress.d.ts +2 -0
  561. package/dist/components/progress.js +262 -0
  562. package/dist/components/progress.js.map +1 -0
  563. package/dist/components/prose/Prose.d.ts +9 -0
  564. package/dist/components/prose/Prose.stories.d.ts +6 -0
  565. package/dist/components/prose/index.d.ts +1 -0
  566. package/dist/components/prose.d.ts +2 -0
  567. package/dist/components/prose.js +12 -0
  568. package/dist/components/prose.js.map +1 -0
  569. package/dist/components/radio-group/RadioGroup.d.ts +4 -0
  570. package/dist/components/radio-group/RadioGroup.stories.d.ts +11 -0
  571. package/dist/components/radio-group/components/RadioGroupItem.d.ts +43 -0
  572. package/dist/components/radio-group/index.d.ts +2 -0
  573. package/dist/components/radio-group.d.ts +2 -0
  574. package/dist/components/radio-group.js +271 -0
  575. package/dist/components/radio-group.js.map +1 -0
  576. package/dist/components/resizable/Resizable.d.ts +23 -0
  577. package/dist/components/resizable/Resizable.stories.d.ts +8 -0
  578. package/dist/components/resizable/index.d.ts +1 -0
  579. package/dist/components/resizable.d.ts +2 -0
  580. package/dist/components/resizable.js +1552 -0
  581. package/dist/components/resizable.js.map +1 -0
  582. package/dist/components/scheduler/components/day/Day.d.ts +4 -61
  583. package/dist/components/scheduler.js +1249 -1244
  584. package/dist/components/scheduler.js.map +1 -1
  585. package/dist/components/scroll-area/ScrollArea.d.ts +19 -2
  586. package/dist/components/scroll-area/ScrollArea.stories.d.ts +5 -2
  587. package/dist/components/scroll-area/index.d.ts +2 -0
  588. package/dist/components/scroll-area.d.ts +2 -0
  589. package/dist/components/scroll-area.js +6 -0
  590. package/dist/components/scroll-area.js.map +1 -0
  591. package/dist/components/scroll-shadow-container/ScrollShadowContainer.d.ts +2 -49
  592. package/dist/components/scroll-shadow-container/ScrollShadowContainer.stories.d.ts +1 -0
  593. package/dist/components/scroll-shadow-container/index.d.ts +1 -0
  594. package/dist/components/scroll-shadow-container.js +1 -1
  595. package/dist/components/search-select/async-search-select/AsyncSearchSelect.d.ts +2 -0
  596. package/dist/components/search-select/async-search-select/AsyncSearchSelect.stories.d.ts +20 -0
  597. package/dist/components/search-select/async-search-select/components/AsyncSearchSelectContent.d.ts +42 -0
  598. package/dist/components/search-select/async-search-select/components/AsyncSearchSelectPopoverContent.d.ts +7 -0
  599. package/dist/components/search-select/async-search-select/hooks/useAsyncDataLoader.d.ts +48 -0
  600. package/dist/components/search-select/async-search-select/types.d.ts +99 -0
  601. package/dist/components/search-select/components/SearchSelectPlaceholder.d.ts +7 -0
  602. package/dist/components/search-select/components/SearchSelectTag.d.ts +13 -0
  603. package/dist/components/search-select/components/SearchSelectTextValue.d.ts +7 -0
  604. package/dist/components/search-select/components/SearchSelectTrigger.d.ts +23 -0
  605. package/dist/components/search-select/index.d.ts +22 -0
  606. package/dist/components/search-select/multi-select/MultiSelect.d.ts +87 -0
  607. package/dist/components/search-select/multi-select/MultiSelect.stories.d.ts +18 -0
  608. package/dist/components/search-select/search-select/LazySearchSelect.d.ts +16 -0
  609. package/dist/components/search-select/search-select/LazySearchSelect.stories.d.ts +21 -0
  610. package/dist/components/search-select/search-select/SearchSelect.d.ts +80 -0
  611. package/dist/components/search-select/search-select/SearchSelect.stories.d.ts +16 -0
  612. package/dist/components/search-select/search-select/components/LoadMoreTrigger.d.ts +17 -0
  613. package/dist/components/search-select/search-select/components/SearchSelectContent.d.ts +10 -0
  614. package/dist/components/search-select/search-select/components/SearchSelectGroup.d.ts +12 -0
  615. package/dist/components/search-select/search-select/components/SearchSelectInput.d.ts +9 -0
  616. package/dist/components/search-select/search-select/components/SearchSelectSeparator.d.ts +12 -0
  617. package/dist/components/search-select/search-select/utils/fuzzyFilter.d.ts +9 -0
  618. package/dist/components/search-select.d.ts +2 -0
  619. package/dist/components/search-select.js +596 -0
  620. package/dist/components/search-select.js.map +1 -0
  621. package/dist/components/select/Select.d.ts +39 -27
  622. package/dist/components/select/Select.stories.d.ts +2 -0
  623. package/dist/components/select/components/SelectTriggerClearButton.d.ts +6 -0
  624. package/dist/components/select/index.d.ts +1 -1
  625. package/dist/components/select.js +14 -1032
  626. package/dist/components/select.js.map +1 -1
  627. package/dist/components/sheet/Sheet.d.ts +35 -0
  628. package/dist/components/sheet/Sheet.stories.d.ts +20 -0
  629. package/dist/components/sheet/index.d.ts +1 -0
  630. package/dist/components/sheet.d.ts +2 -0
  631. package/dist/components/sheet.js +14 -0
  632. package/dist/components/sheet.js.map +1 -0
  633. package/dist/components/shortcut/Shortcut.d.ts +8 -0
  634. package/dist/components/shortcut/Shortcut.stories.d.ts +22 -0
  635. package/dist/components/shortcut/index.d.ts +1 -0
  636. package/dist/components/shortcut.d.ts +2 -0
  637. package/dist/components/shortcut.js +5 -0
  638. package/dist/components/shortcut.js.map +1 -0
  639. package/dist/components/sidebar/Sidebar.d.ts +73 -0
  640. package/dist/components/sidebar/Sidebar.stories.d.ts +18 -0
  641. package/dist/components/sidebar/SidebarContext.d.ts +12 -0
  642. package/dist/components/sidebar/index.d.ts +3 -0
  643. package/dist/components/sidebar.d.ts +2 -0
  644. package/dist/components/sidebar.js +505 -0
  645. package/dist/components/sidebar.js.map +1 -0
  646. package/dist/components/skeleton/Skeleton.d.ts +6 -0
  647. package/dist/components/skeleton/Skeleton.stories.d.ts +9 -0
  648. package/dist/components/skeleton/index.d.ts +1 -0
  649. package/dist/components/skeleton.d.ts +2 -0
  650. package/dist/components/skeleton.js +5 -0
  651. package/dist/components/skeleton.js.map +1 -0
  652. package/dist/components/slider/Slider.d.ts +4 -0
  653. package/dist/components/slider/Slider.stories.d.ts +12 -0
  654. package/dist/components/slider/components/SliderRange.d.ts +4 -0
  655. package/dist/components/slider/components/SliderThumb.d.ts +4 -0
  656. package/dist/components/slider/components/SliderTrack.d.ts +4 -0
  657. package/dist/components/slider/index.d.ts +4 -0
  658. package/dist/components/slider.d.ts +2 -0
  659. package/dist/components/slider.js +458 -0
  660. package/dist/components/slider.js.map +1 -0
  661. package/dist/components/stepper/Stepper.d.ts +8 -0
  662. package/dist/components/stepper/Stepper.stories.d.ts +8 -0
  663. package/dist/components/stepper/StepperContext.d.ts +9 -0
  664. package/dist/components/stepper/components/stepper-description/StepperDescription.d.ts +1 -0
  665. package/dist/components/stepper/components/stepper-indicator/StepperIndicator.d.ts +4 -0
  666. package/dist/components/stepper/components/stepper-item/StepperItem.d.ts +7 -0
  667. package/dist/components/stepper/components/stepper-item/StepperItemContext.d.ts +11 -0
  668. package/dist/components/stepper/components/stepper-title/StepperTitle.d.ts +1 -0
  669. package/dist/components/stepper/components/stepper-trigger/StepperTrigger.d.ts +4 -0
  670. package/dist/components/stepper/index.d.ts +9 -0
  671. package/dist/components/stepper/stepper-separator/StepperSeparator.d.ts +1 -0
  672. package/dist/components/stepper.d.ts +2 -0
  673. package/dist/components/stepper.js +145 -0
  674. package/dist/components/stepper.js.map +1 -0
  675. package/dist/components/switch/Switch.d.ts +5 -180
  676. package/dist/components/switch/Switch.stories.d.ts +2 -90
  677. package/dist/components/switch/switch-field/SwitchField.d.ts +9 -315
  678. package/dist/components/switch/switch-field/SwitchField.stories.d.ts +4 -315
  679. package/dist/components/switch.js +139 -152
  680. package/dist/components/switch.js.map +1 -1
  681. package/dist/components/system-state/SystemState.d.ts +3 -0
  682. package/dist/components/system-state/SystemState.stories.d.ts +19 -0
  683. package/dist/components/system-state/components/SystemStateActions.d.ts +10 -0
  684. package/dist/components/system-state/components/SystemStateCode.d.ts +3 -0
  685. package/dist/components/system-state/components/SystemStateDescription.d.ts +3 -0
  686. package/dist/components/system-state/components/SystemStateTitle.d.ts +3 -0
  687. package/dist/components/system-state/index.d.ts +10 -0
  688. package/dist/components/system-state.d.ts +2 -0
  689. package/dist/components/system-state.js +51 -0
  690. package/dist/components/system-state.js.map +1 -0
  691. package/dist/components/table/Table.d.ts +18 -0
  692. package/dist/components/table/Table.stories.d.ts +15 -0
  693. package/dist/components/table/index.d.ts +1 -0
  694. package/dist/components/table.d.ts +2 -0
  695. package/dist/components/table.js +83 -0
  696. package/dist/components/table.js.map +1 -0
  697. package/dist/components/tabs/Tabs.d.ts +7 -0
  698. package/dist/components/tabs/Tabs.stories.d.ts +8 -0
  699. package/dist/components/tabs/index.d.ts +1 -0
  700. package/dist/components/tabs.d.ts +2 -0
  701. package/dist/components/tabs.js +178 -0
  702. package/dist/components/tabs.js.map +1 -0
  703. package/dist/components/tag/Tag.d.ts +59 -1103
  704. package/dist/components/tag/Tag.stories.d.ts +1 -0
  705. package/dist/components/tag/index.d.ts +1 -1
  706. package/dist/components/tag-input/TagInput.d.ts +42 -0
  707. package/dist/components/tag-input/TagInput.stories.d.ts +9 -0
  708. package/dist/components/tag-input/index.d.ts +2 -0
  709. package/dist/components/tag-input.d.ts +2 -0
  710. package/dist/components/tag-input.js +162 -0
  711. package/dist/components/tag-input.js.map +1 -0
  712. package/dist/components/tag.js +7 -189
  713. package/dist/components/tag.js.map +1 -1
  714. package/dist/components/text/Text.d.ts +9 -0
  715. package/dist/components/text/Text.stories.d.ts +24 -0
  716. package/dist/components/text/index.d.ts +1 -0
  717. package/dist/components/text.d.ts +2 -0
  718. package/dist/components/text.js +5 -0
  719. package/dist/components/text.js.map +1 -0
  720. package/dist/components/textarea/autogrow-textarea/AutogrowTextarea.d.ts +12 -0
  721. package/dist/components/textarea/autogrow-textarea/AutogrowTextarea.stories.d.ts +10 -0
  722. package/dist/components/textarea/index.d.ts +2 -0
  723. package/dist/components/textarea/textarea/Textarea.d.ts +14 -0
  724. package/dist/components/textarea/textarea/Textarea.stories.d.ts +7 -0
  725. package/dist/components/textarea.d.ts +2 -0
  726. package/dist/components/textarea.js +217 -0
  727. package/dist/components/textarea.js.map +1 -0
  728. package/dist/components/timer/Timer.d.ts +5 -0
  729. package/dist/components/timer/Timer.stories.d.ts +15 -0
  730. package/dist/components/timer/components/TimerUnit.d.ts +5 -0
  731. package/dist/components/timer/components/TimerValue.d.ts +5 -0
  732. package/dist/components/timer/index.d.ts +3 -0
  733. package/dist/components/timer.d.ts +2 -0
  734. package/dist/components/timer.js +23 -0
  735. package/dist/components/timer.js.map +1 -0
  736. package/dist/components/toast/Toast.d.ts +11 -3
  737. package/dist/components/toast/Toast.stories.d.ts +3 -0
  738. package/dist/components/toast/ToastView.d.ts +20 -401
  739. package/dist/components/toast/components/toast-action/ToastAction.d.ts +1 -0
  740. package/dist/components/toast/hooks/useToastContext.d.ts +1 -1
  741. package/dist/components/toast/index.d.ts +4 -1
  742. package/dist/components/toast.js +460 -471
  743. package/dist/components/toast.js.map +1 -1
  744. package/dist/components/toggle/Toggle.d.ts +52 -0
  745. package/dist/components/toggle/Toggle.stories.d.ts +8 -0
  746. package/dist/components/toggle/index.d.ts +1 -0
  747. package/dist/components/toggle-group/ToggleGroup.d.ts +6 -0
  748. package/dist/components/toggle-group/ToggleGroup.stories.d.ts +13 -0
  749. package/dist/components/toggle-group/index.d.ts +1 -0
  750. package/dist/components/toggle-group.d.ts +2 -0
  751. package/dist/components/toggle-group.js +37 -0
  752. package/dist/components/toggle-group.js.map +1 -0
  753. package/dist/components/toggle.d.ts +2 -0
  754. package/dist/components/toggle.js +5 -0
  755. package/dist/components/toggle.js.map +1 -0
  756. package/dist/components/toolbar/Toolbar.d.ts +52 -0
  757. package/dist/components/toolbar/Toolbar.stories.d.ts +22 -0
  758. package/dist/components/toolbar/ToolbarContext.d.ts +11 -0
  759. package/dist/components/toolbar/index.d.ts +2 -0
  760. package/dist/components/toolbar.d.ts +2 -0
  761. package/dist/components/toolbar.js +304 -0
  762. package/dist/components/toolbar.js.map +1 -0
  763. package/dist/components/tooltip/Tooltip.d.ts +34 -0
  764. package/dist/components/tooltip/Tooltip.stories.d.ts +20 -0
  765. package/dist/components/tooltip/index.d.ts +3 -0
  766. package/dist/components/tooltip/useTooltipContext.d.ts +6 -0
  767. package/dist/components/tooltip.d.ts +2 -0
  768. package/dist/components/tooltip.js +16 -0
  769. package/dist/components/tooltip.js.map +1 -0
  770. package/dist/createLucideIcon-DwBrHnj9.js +80 -0
  771. package/dist/{createLucideIcon-DgrNxRV5.js.map → createLucideIcon-DwBrHnj9.js.map} +1 -1
  772. package/dist/design-tokens.source.json +1 -1
  773. package/dist/download-BHsj218e.js +16 -0
  774. package/dist/download-BHsj218e.js.map +1 -0
  775. package/dist/examples/gramax/CloneRepository.stories.d.ts +5 -0
  776. package/dist/examples/gramax/NewStorage.stories.d.ts +5 -0
  777. package/dist/examples/quiz/QuizPage.stories.d.ts +6 -0
  778. package/dist/hooks/index.d.ts +2 -0
  779. package/dist/hooks/use-file-upload/errorMessages.d.ts +39 -0
  780. package/dist/hooks/use-file-upload/index.d.ts +3 -0
  781. package/dist/hooks/use-file-upload/useFileUpload.d.ts +81 -0
  782. package/dist/hooks/use-file-upload.d.ts +2 -0
  783. package/dist/hooks/use-file-upload.js +7 -0
  784. package/dist/hooks/use-file-upload.js.map +1 -0
  785. package/dist/hooks/useAutofill.d.ts +8 -0
  786. package/dist/hooks/useBreakpoints.d.ts +23 -0
  787. package/dist/hooks/useControllableState.d.ts +13 -0
  788. package/dist/hooks/useControlledValue.d.ts +10 -0
  789. package/dist/hooks/useCopyAction.d.ts +7 -0
  790. package/dist/hooks/useCustomValidity.d.ts +9 -0
  791. package/dist/hooks/useDataCache.d.ts +77 -0
  792. package/dist/hooks/useDebounce.d.ts +7 -0
  793. package/dist/hooks/useFileType.d.ts +4 -0
  794. package/dist/hooks/useInputWithActions.d.ts +32 -0
  795. package/dist/hooks/useItemsKeyboardNavigation.d.ts +56 -0
  796. package/dist/hooks/useSearchCache.test.d.ts +1 -0
  797. package/dist/hooks/useSearchSelect.d.ts +31 -0
  798. package/dist/hooks.d.ts +2 -0
  799. package/dist/hooks.js +14 -0
  800. package/dist/hooks.js.map +1 -0
  801. package/dist/image-BqL5JP90.js +16 -0
  802. package/dist/image-BqL5JP90.js.map +1 -0
  803. package/dist/index-0ioNhtNM.js +11 -0
  804. package/dist/index-0ioNhtNM.js.map +1 -0
  805. package/dist/index-437EL2iq.js +53 -0
  806. package/dist/index-437EL2iq.js.map +1 -0
  807. package/dist/index-BGQepRFJ.js +28 -0
  808. package/dist/index-BGQepRFJ.js.map +1 -0
  809. package/dist/index-BVqs-uqP.js +234 -0
  810. package/dist/index-BVqs-uqP.js.map +1 -0
  811. package/dist/index-BZPx6jYI.js.map +1 -1
  812. package/dist/index-Bb23HztA.js +33 -0
  813. package/dist/index-Bb23HztA.js.map +1 -0
  814. package/dist/index-BpWB3aFK.js +71 -0
  815. package/dist/index-BpWB3aFK.js.map +1 -0
  816. package/dist/index-BtQfgaSF.js +61 -0
  817. package/dist/index-BtQfgaSF.js.map +1 -0
  818. package/dist/index-ByaXH_ih.js +11 -0
  819. package/dist/index-ByaXH_ih.js.map +1 -0
  820. package/dist/index-BzCriPiK.js +671 -0
  821. package/dist/index-BzCriPiK.js.map +1 -0
  822. package/dist/index-CCKe-Mpx.js +7 -0
  823. package/dist/index-CCKe-Mpx.js.map +1 -0
  824. package/dist/index-CFaU3UXv.js +94 -0
  825. package/dist/index-CFaU3UXv.js.map +1 -0
  826. package/dist/index-CLuiUUQ8.js +137 -0
  827. package/dist/index-CLuiUUQ8.js.map +1 -0
  828. package/dist/index-CQD-Njgt.js +245 -0
  829. package/dist/index-CQD-Njgt.js.map +1 -0
  830. package/dist/index-CmBeyp2d.js +56 -0
  831. package/dist/index-CmBeyp2d.js.map +1 -0
  832. package/dist/index-DFZozV_h.js +69 -0
  833. package/dist/index-DFZozV_h.js.map +1 -0
  834. package/dist/index-DHsfW5Rj.js +49 -0
  835. package/dist/index-DHsfW5Rj.js.map +1 -0
  836. package/dist/index-DHyZ_0Ut.js +181 -0
  837. package/dist/index-DHyZ_0Ut.js.map +1 -0
  838. package/dist/index-DLcqcWxM.js +30 -0
  839. package/dist/index-DLcqcWxM.js.map +1 -0
  840. package/dist/index-DRo26PBK.js +1525 -0
  841. package/dist/index-DRo26PBK.js.map +1 -0
  842. package/dist/index-DnnQs07z.js +33 -0
  843. package/dist/index-DnnQs07z.js.map +1 -0
  844. package/dist/index-Uiy0Xwy2.js +32 -0
  845. package/dist/index-Uiy0Xwy2.js.map +1 -0
  846. package/dist/index-_ITz1IyW.js +144 -0
  847. package/dist/index-_ITz1IyW.js.map +1 -0
  848. package/dist/index-rKs9bXHr.js +7 -0
  849. package/dist/index-rKs9bXHr.js.map +1 -0
  850. package/dist/index-xqkGMOJ8.js +14 -0
  851. package/dist/index-xqkGMOJ8.js.map +1 -0
  852. package/dist/index.d.ts +2 -1
  853. package/dist/index.esm-CXA6i4d7.js +1282 -0
  854. package/dist/index.esm-CXA6i4d7.js.map +1 -0
  855. package/dist/index.js +53 -1
  856. package/dist/index.js.map +1 -1
  857. package/dist/inputBaseStyles-DbzD_jvq.js +34 -0
  858. package/dist/inputBaseStyles-DbzD_jvq.js.map +1 -0
  859. package/dist/lib/utils/cn.d.ts +2 -0
  860. package/dist/lib/utils/dom.d.ts +6 -0
  861. package/dist/lib/utils/file/downloadFile.d.ts +2 -0
  862. package/dist/lib/utils/file/formatBytes.d.ts +1 -0
  863. package/dist/lib/utils/formatCounterValue.d.ts +21 -0
  864. package/dist/lib/utils/image/imageConverter.d.ts +23 -0
  865. package/dist/lib/utils/index.d.ts +2 -0
  866. package/dist/lib/utils/storybook.d.ts +13 -2
  867. package/dist/lib/utils/styles.d.ts +9 -0
  868. package/dist/lib/utils/variants.d.ts +35 -0
  869. package/dist/lib/utils.d.ts +2 -2
  870. package/dist/lib/utils.js +25 -0
  871. package/dist/lib/utils.js.map +1 -0
  872. package/dist/loader-circle-D1YXTEGq.js +14 -0
  873. package/dist/loader-circle-D1YXTEGq.js.map +1 -0
  874. package/dist/minus-BltQa7Q2.js +12 -0
  875. package/dist/minus-BltQa7Q2.js.map +1 -0
  876. package/dist/normalizeDates-9A3c9WYM.js +32 -0
  877. package/dist/normalizeDates-9A3c9WYM.js.map +1 -0
  878. package/dist/providers/component-variant-context/ComponentVariantProvider.d.ts +30 -0
  879. package/dist/providers/component-variant-context/index.d.ts +1 -0
  880. package/dist/providers/component-variant-context.d.ts +2 -0
  881. package/dist/providers/component-variant-context.js +6 -0
  882. package/dist/providers/component-variant-context.js.map +1 -0
  883. package/dist/rotate-cw-tYRlcg0g.js +15 -0
  884. package/dist/rotate-cw-tYRlcg0g.js.map +1 -0
  885. package/dist/search-CDdgqSGg.js +15 -0
  886. package/dist/search-CDdgqSGg.js.map +1 -0
  887. package/dist/src/index.d.ts +2 -0
  888. package/dist/src/index.ts.js +7 -0
  889. package/dist/src/index.ts.js.map +1 -0
  890. package/dist/styles-scoped.css +4318 -420
  891. package/dist/styles.css +4313 -417
  892. package/dist/theme.css +329 -0
  893. package/dist/theme.d.ts +1 -0
  894. package/dist/useBreakpoints-D8wKOvil.js +103 -0
  895. package/dist/useBreakpoints-D8wKOvil.js.map +1 -0
  896. package/dist/useDebounce-BRah78CF.js +16 -0
  897. package/dist/useDebounce-BRah78CF.js.map +1 -0
  898. package/dist/useFileUpload-iDag0iqM.js +197 -0
  899. package/dist/useFileUpload-iDag0iqM.js.map +1 -0
  900. package/dist/useItemsKeyboardNavigation-CmeOR30y.js +62 -0
  901. package/dist/useItemsKeyboardNavigation-CmeOR30y.js.map +1 -0
  902. package/dist/useMergeRefs-qoKniYqT.js +19 -0
  903. package/dist/useMergeRefs-qoKniYqT.js.map +1 -0
  904. package/dist/usePortalContainer-ae6EzS08.js +39 -0
  905. package/dist/usePortalContainer-ae6EzS08.js.map +1 -0
  906. package/dist/vendors/date-fns/index.d.ts +19 -0
  907. package/dist/vendors/date-fns/locale/en-US/index.d.ts +1 -0
  908. package/dist/vendors/date-fns/locale/en-US.d.ts +2 -0
  909. package/dist/vendors/date-fns/locale/en-US.js +372 -0
  910. package/dist/vendors/date-fns/locale/en-US.js.map +1 -0
  911. package/dist/vendors/date-fns/locale/ru/index.d.ts +1 -0
  912. package/dist/vendors/date-fns/locale/ru.d.ts +2 -0
  913. package/dist/vendors/date-fns/locale/ru.js +569 -0
  914. package/dist/vendors/date-fns/locale/ru.js.map +1 -0
  915. package/dist/vendors/date-fns.d.ts +2 -0
  916. package/dist/vendors/date-fns.js +2 -0
  917. package/dist/vendors/date-fns.js.map +1 -0
  918. package/dist/vendors/react-day-picker/index.d.ts +22 -0
  919. package/dist/vendors/react-day-picker.d.ts +2 -0
  920. package/dist/vendors/react-day-picker.js +87 -0
  921. package/dist/vendors/react-day-picker.js.map +1 -0
  922. package/dist/vendors/react-hook-form/index.d.ts +21 -0
  923. package/dist/vendors/react-hook-form.d.ts +2 -0
  924. package/dist/vendors/react-hook-form.js +19 -0
  925. package/dist/vendors/react-hook-form.js.map +1 -0
  926. package/dist/vendors/tanstack/react-table/index.d.ts +1 -0
  927. package/dist/vendors/tanstack/react-table.d.ts +2 -0
  928. package/dist/vendors/tanstack/react-table.js +2090 -0
  929. package/dist/vendors/tanstack/react-table.js.map +1 -0
  930. package/dist/vendors/zod/index.d.ts +14 -0
  931. package/dist/vendors/zod.d.ts +2 -0
  932. package/dist/vendors/zod.js +3080 -0
  933. package/dist/vendors/zod.js.map +1 -0
  934. package/dist/{x-JgjNP5oH.js → x-tDTt7hTQ.js} +2 -2
  935. package/dist/{x-JgjNP5oH.js.map → x-tDTt7hTQ.js.map} +1 -1
  936. package/dist/zod-BMNoK3aM.js +75 -0
  937. package/dist/zod-BMNoK3aM.js.map +1 -0
  938. package/package.json +89 -23
  939. package/tailwind.preset.js +440 -0
  940. package/dist/Button-Cfe4WIYW.js +0 -57
  941. package/dist/Button-Cfe4WIYW.js.map +0 -1
  942. package/dist/ButtonBase-C8kakRHQ.js +0 -184
  943. package/dist/ButtonBase-C8kakRHQ.js.map +0 -1
  944. package/dist/CheckboxField-DaRmV9yw.js +0 -251
  945. package/dist/CheckboxField-DaRmV9yw.js.map +0 -1
  946. package/dist/Description-g2E6P7Qi.js +0 -37
  947. package/dist/Description-g2E6P7Qi.js.map +0 -1
  948. package/dist/Divider-D3NvaU8c.js +0 -46
  949. package/dist/Divider-D3NvaU8c.js.map +0 -1
  950. package/dist/Field-CjwIc66I.js +0 -83
  951. package/dist/Field-CjwIc66I.js.map +0 -1
  952. package/dist/FieldLabel--NVcQQhJ.js +0 -64
  953. package/dist/FieldLabel--NVcQQhJ.js.map +0 -1
  954. package/dist/Icon-CSPBHL_x.js +0 -19
  955. package/dist/Icon-CSPBHL_x.js.map +0 -1
  956. package/dist/IconButton-CTxOql_1.js +0 -55
  957. package/dist/IconButton-CTxOql_1.js.map +0 -1
  958. package/dist/ScrollShadowContainer-C4qXz8gc.js +0 -849
  959. package/dist/ScrollShadowContainer-C4qXz8gc.js.map +0 -1
  960. package/dist/components/background/Background.d.ts +0 -138
  961. package/dist/components/background/Background.stories.d.ts +0 -6
  962. package/dist/components/input/secret-input/components/ShowValueToggler.d.ts +0 -7
  963. package/dist/components/modal/Modal.d.ts +0 -14
  964. package/dist/components/modal/Modal.stories.d.ts +0 -25
  965. package/dist/components/modal/components/body/ModalBody.d.ts +0 -2
  966. package/dist/components/modal/components/footer/ModalFooter.d.ts +0 -2
  967. package/dist/components/modal/components/header/ModalHeader.d.ts +0 -6
  968. package/dist/components/modal/index.d.ts +0 -6
  969. package/dist/components/modal/templates/header-template/ModalHeaderTemplate.d.ts +0 -210
  970. package/dist/components/modal.d.ts +0 -2
  971. package/dist/components/modal.js +0 -507
  972. package/dist/components/modal.js.map +0 -1
  973. package/dist/components/ui/tooltip.d.ts +0 -7
  974. package/dist/createLucideIcon-DgrNxRV5.js +0 -112
  975. package/dist/fonts/inter/InterVariable-Italic.ttf +0 -0
  976. package/dist/fonts/inter/InterVariable.ttf +0 -0
  977. package/dist/index-BA36kN2b.js +0 -76
  978. package/dist/index-BA36kN2b.js.map +0 -1
  979. package/dist/index-CImD85pK.js +0 -179
  980. package/dist/index-CImD85pK.js.map +0 -1
  981. package/dist/index-CR-odn5-.js +0 -2446
  982. package/dist/index-CR-odn5-.js.map +0 -1
  983. package/dist/index-CaGtfIqw.js +0 -163
  984. package/dist/index-CaGtfIqw.js.map +0 -1
  985. package/dist/index-CfJKNBxG.js +0 -698
  986. package/dist/index-CfJKNBxG.js.map +0 -1
  987. package/dist/index-DPws5oAn.js +0 -90
  988. package/dist/index-DPws5oAn.js.map +0 -1
  989. package/dist/index-DsEh1WRc.js +0 -1586
  990. package/dist/index-DsEh1WRc.js.map +0 -1
  991. package/dist/index-pysSAa5G.js +0 -57
  992. package/dist/index-pysSAa5G.js.map +0 -1
  993. package/dist/tooltip-CYQMPCEj.js +0 -365
  994. package/dist/tooltip-CYQMPCEj.js.map +0 -1
  995. package/dist/utils-2yE78m5l.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sources":["../../node_modules/.pnpm/react-hook-form@7.55.0_react@18.3.1/node_modules/react-hook-form/dist/index.esm.mjs","../../src/components/form/Form.tsx","../../src/components/form/components/form-field/FormField.tsx","../../src/components/form/components/form-section-title/FormSectionTitle.tsx"],"sourcesContent":["import React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : event.target.value\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n\nvar isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n let copy;\n const isArray = Array.isArray(data);\n const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false;\n if (data instanceof Date) {\n copy = new Date(data);\n }\n else if (data instanceof Set) {\n copy = new Set(data);\n }\n else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&\n (isArray || isObject(data))) {\n copy = isArray ? [] : {};\n if (!isArray && !isPlainObject(data)) {\n copy = data;\n }\n else {\n for (const key in data) {\n if (data.hasOwnProperty(key)) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n }\n else {\n return data;\n }\n return copy;\n}\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (object, path, defaultValue) => {\n if (!path || !isObject(object)) {\n return defaultValue;\n }\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], object);\n return isUndefined(result) || result === object\n ? isUndefined(object[path])\n ? defaultValue\n : object[path]\n : result;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nvar set = (object, path, value) => {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n object[key] = newValue;\n object = object[key];\n }\n};\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\n\nconst HookFormContext = React.createContext(null);\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst FormProvider = (props) => {\n const { children, ...data } = props;\n return (React.createElement(HookFormContext.Provider, { value: data }, children));\n};\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {\n defaultValues: control._defaultValues,\n };\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input {...register(\"firstName\")} placeholder=\"First Name\" />\n * {dirtyFields.firstName && <p>Field is dirty.</p>}\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const methods = useFormContext();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n validatingFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n _name.current = name;\n React.useEffect(() => control._subscribe({\n name: _name.current,\n formState: _localProxyFormState.current,\n exact,\n callback: (formState) => {\n !disabled &&\n updateFormState({\n ...control._formState,\n ...formState,\n });\n },\n }), [control, disabled, exact]);\n React.useEffect(() => {\n _localProxyFormState.current.isValid && control._setValid(true);\n }, [control]);\n return React.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const methods = useFormContext();\n const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};\n const _name = React.useRef(name);\n const _defaultValue = React.useRef(defaultValue);\n _name.current = name;\n React.useEffect(() => control._subscribe({\n name: _name.current,\n formState: {\n values: true,\n },\n exact,\n callback: (formState) => !disabled &&\n updateValue(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, _defaultValue.current)),\n }), [control, disabled, exact]);\n const [value, updateValue] = React.useState(control._getWatch(name, defaultValue));\n React.useEffect(() => control._removeUnmounted());\n return value;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n * <div>\n * <input {...field} placeholder={props.name} />\n * <p>{fieldState.isTouched && \"Touched\"}</p>\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * </div>\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const methods = useFormContext();\n const { name, disabled, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),\n exact: true,\n });\n const formState = useFormState({\n control,\n name,\n exact: true,\n });\n const _props = React.useRef(props);\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),\n }));\n const fieldState = React.useMemo(() => Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n isValidating: {\n enumerable: true,\n get: () => !!get(formState.validatingFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }), [formState, name]);\n const onChange = React.useCallback((event) => _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n }), [name]);\n const onBlur = React.useCallback(() => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }), [name, control._formValues]);\n const ref = React.useCallback((elm) => {\n const field = get(control._fields, name);\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message) => elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n }, [control._fields, name]);\n const field = React.useMemo(() => ({\n name,\n value,\n ...(isBoolean(disabled) || formState.disabled\n ? { disabled: formState.disabled || disabled }\n : {}),\n onChange,\n onBlur,\n ref,\n }), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n control.register(name, {\n ..._props.current.rules,\n ...(isBoolean(_props.current.disabled)\n ? { disabled: _props.current.disabled }\n : {}),\n });\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n !isArrayField && control.register(name);\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n React.useEffect(() => {\n control._setDisabledField({\n disabled,\n name,\n });\n }, [disabled, name, control]);\n return React.useMemo(() => ({\n field,\n formState,\n fieldState,\n }), [field, formState, fieldState]);\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm<FormValues>({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n * <form>\n * <Controller\n * control={control}\n * name=\"test\"\n * render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => (\n * <>\n * <input\n * onChange={onChange} // send value to hook form\n * onBlur={onBlur} // notify when input is touched\n * value={value} // return updated value\n * ref={ref} // set ref for focus management\n * />\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * <p>{fieldState.isTouched ? \"touched\" : \"\"}</p>\n * </>\n * )}\n * />\n * </form>\n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nconst flatten = (obj) => {\n const output = {};\n for (const key of Object.keys(obj)) {\n if (isObjectType(obj[key]) && obj[key] !== null) {\n const nested = flatten(obj[key]);\n for (const nestedKey of Object.keys(nested)) {\n output[`${key}.${nestedKey}`] = nested[nestedKey];\n }\n }\n else {\n output[key] = obj[key];\n }\n }\n return output;\n};\n\nconst POST_REQUEST = 'post';\n/**\n * Form component to manage submission.\n *\n * @param props - to setup submission detail. {@link FormProps}\n *\n * @returns form component or headless render prop.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control, formState: { errors } } = useForm();\n *\n * return (\n * <Form action=\"/api\" control={control}>\n * <input {...register(\"name\")} />\n * <p>{errors?.root?.server && 'Server error'}</p>\n * <button>Submit</button>\n * </Form>\n * );\n * }\n * ```\n */\nfunction Form(props) {\n const methods = useFormContext();\n const [mounted, setMounted] = React.useState(false);\n const { control = methods.control, onSubmit, children, action, method = POST_REQUEST, headers, encType, onError, render, onSuccess, validateStatus, ...rest } = props;\n const submit = async (event) => {\n let hasError = false;\n let type = '';\n await control.handleSubmit(async (data) => {\n const formData = new FormData();\n let formDataJson = '';\n try {\n formDataJson = JSON.stringify(data);\n }\n catch (_a) { }\n const flattenFormValues = flatten(control._formValues);\n for (const key in flattenFormValues) {\n formData.append(key, flattenFormValues[key]);\n }\n if (onSubmit) {\n await onSubmit({\n data,\n event,\n method,\n formData,\n formDataJson,\n });\n }\n if (action) {\n try {\n const shouldStringifySubmissionData = [\n headers && headers['Content-Type'],\n encType,\n ].some((value) => value && value.includes('json'));\n const response = await fetch(String(action), {\n method,\n headers: {\n ...headers,\n ...(encType ? { 'Content-Type': encType } : {}),\n },\n body: shouldStringifySubmissionData ? formDataJson : formData,\n });\n if (response &&\n (validateStatus\n ? !validateStatus(response.status)\n : response.status < 200 || response.status >= 300)) {\n hasError = true;\n onError && onError({ response });\n type = String(response.status);\n }\n else {\n onSuccess && onSuccess({ response });\n }\n }\n catch (error) {\n hasError = true;\n onError && onError({ error });\n }\n }\n })(event);\n if (hasError && props.control) {\n props.control._subjects.state.next({\n isSubmitSuccessful: false,\n });\n props.control.setError('root.server', {\n type,\n });\n }\n };\n React.useEffect(() => {\n setMounted(true);\n }, []);\n return render ? (React.createElement(React.Fragment, null, render({\n submit,\n }))) : (React.createElement(\"form\", { noValidate: mounted, action: action, method: method, encType: encType, onSubmit: submit, ...rest }, children));\n}\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar createSubject = () => {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n};\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!keys2.includes(key)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction markFieldsDirty(data, fields = {}) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n }\n else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n return fields;\n}\nfunction getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n if (isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n }\n else {\n getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);\n }\n }\n else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n return dirtyFieldsFromValues;\n}\nvar getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar isRegex = (value) => value instanceof RegExp;\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nconst ASYNC_FUNCTION = 'AsyncFunction';\nvar hasPromiseValidation = (fieldReference) => !!fieldReference &&\n !!fieldReference.validate &&\n !!((isFunction(fieldReference.validate) &&\n fieldReference.validate.constructor.name === ASYNC_FUNCTION) ||\n (isObject(fieldReference.validate) &&\n Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION)));\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nvar isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some((watchName) => name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length))));\n\nconst iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f) {\n if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {\n return true;\n }\n else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {\n return true;\n }\n else {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n else if (isObject(currentField)) {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n }\n return;\n};\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n return (isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar shouldSubscribeByName = (name, signalName, exact) => !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (exact\n ? currentName === signalName\n : currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const fieldArrayErrors = convertToArrayPayload(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isMessage = (value) => isString(value);\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabledFieldNames.has(name)) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nfunction createFormControl(props = {}) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n validatingFields: {},\n errors: _options.errors || {},\n disabled: _options.disabled || false,\n };\n const _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.values || _options.defaultValues) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names = {\n mount: new Set(),\n disabled: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback;\n let timer = 0;\n const _proxyFormState = {\n isDirty: false,\n dirtyFields: false,\n validatingFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n let _proxySubscribeFormState = {\n ..._proxyFormState,\n };\n const _subjects = {\n array: createSubject(),\n state: createSubject(),\n };\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (callback) => (wait) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n const _setValid = async (shouldUpdateValid) => {\n if (!_options.disabled &&\n (_proxyFormState.isValid ||\n _proxySubscribeFormState.isValid ||\n shouldUpdateValid)) {\n const isValid = _options.resolver\n ? isEmptyObject((await _runSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (names, isValidating) => {\n if (!_options.disabled &&\n (_proxyFormState.isValidating ||\n _proxyFormState.validatingFields ||\n _proxySubscribeFormState.isValidating ||\n _proxySubscribeFormState.validatingFields)) {\n (names || Array.from(_names.mount)).forEach((name) => {\n if (name) {\n isValidating\n ? set(_formState.validatingFields, name, isValidating)\n : unset(_formState.validatingFields, name);\n }\n });\n _subjects.state.next({\n validatingFields: _formState.validatingFields,\n isValidating: !isEmptyObject(_formState.validatingFields),\n });\n }\n };\n const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method && !_options.disabled) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if ((_proxyFormState.touchedFields ||\n _proxySubscribeFormState.touchedFields) &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const _setErrors = (errors) => {\n _formState.errors = errors;\n _subjects.state.next({\n errors: _formState.errors,\n isValid: false,\n });\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n _state.mount && _setValid();\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n if (!_options.disabled) {\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\n isPreviousDirty = !!get(_formState.dirtyFields, name);\n isCurrentFieldPristine\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n ((_proxyFormState.dirtyFields ||\n _proxySubscribeFormState.dirtyFields) &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n ((_proxyFormState.touchedFields ||\n _proxySubscribeFormState.touchedFields) &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n }\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (_options.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(_options.delayError);\n }\n else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n };\n const _runSchema = async (name) => {\n _updateIsValidating(name, true);\n const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n _updateIsValidating(name);\n return result;\n };\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _runSchema(names);\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {\n valid: true,\n }) => {\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const isPromiseFunction = field._f && hasPromiseValidation(field._f);\n if (isPromiseFunction && _proxyFormState.validatingFields) {\n _updateIsValidating([name], true);\n }\n const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);\n if (isPromiseFunction && _proxyFormState.validatingFields) {\n _updateIsValidating([name]);\n }\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n !isEmptyObject(fieldValue) &&\n (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => !_options.disabled &&\n (name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!fieldValue.find((data) => data === checkboxRef.value)\n : fieldValue === checkboxRef.value))\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type) {\n _subjects.state.next({\n name,\n values: cloneObject(_formValues),\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);\n options.shouldValidate && trigger(name);\n };\n const setValues = (name, value, options) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n isObject(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n const setValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n set(_formValues, name, cloneValue);\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: cloneObject(_formValues),\n });\n if ((_proxyFormState.isDirty ||\n _proxyFormState.dirtyFields ||\n _proxySubscribeFormState.isDirty ||\n _proxySubscribeFormState.dirtyFields) &&\n options.shouldDirty) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.state.next({\n name: _state.mount ? name : undefined,\n values: cloneObject(_formValues),\n });\n };\n const onChange = async (event) => {\n _state.mount = true;\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const _updateIsFieldValueUpdated = (fieldValue) => {\n isFieldValueUpdated =\n Number.isNaN(fieldValue) ||\n (isDateObject(fieldValue) && isNaN(fieldValue.getTime())) ||\n deepEqual(fieldValue, get(_formValues, name, fieldValue));\n };\n if (field) {\n let error;\n let isValid;\n const fieldValue = target.type\n ? getFieldValue(field._f)\n : getEventValue(event);\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation = (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.state.next({\n name,\n type: event.type,\n values: cloneObject(_formValues),\n });\n if (shouldSkipValidation) {\n if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {\n if (_options.mode === 'onBlur') {\n if (isBlurEvent) {\n _setValid();\n }\n }\n else if (!isBlurEvent) {\n _setValid();\n }\n }\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n if (_options.resolver) {\n const { errors } = await _runSchema([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (isFieldValueUpdated) {\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n }\n else {\n _updateIsValidating([name], true);\n error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n _updateIsValidating([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid ||\n _proxySubscribeFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const _focusInput = (ref, key) => {\n if (get(_formState.errors, key) && ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _setValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n _subjects.state.next({\n ...(!isString(name) ||\n ((_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&\n isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n });\n options.shouldFocus &&\n !validationResult &&\n iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames) => {\n const values = {\n ...(_state.mount ? _formValues : _defaultValues),\n };\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n error: get((formState || _formState).errors, name),\n isValidating: !!get(_formState.validatingFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n });\n const clearErrors = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n const currentError = get(_formState.errors, name) || {};\n // Don't override existing error messages elsewhere in the object tree.\n const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;\n set(_formState.errors, name, {\n ...restOfErrorTree,\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => isFunction(name)\n ? _subjects.state.subscribe({\n next: (payload) => name(_getWatch(undefined, defaultValue), payload),\n })\n : _getWatch(name, defaultValue, true);\n const _subscribe = (props) => _subjects.state.subscribe({\n next: (formState) => {\n if (shouldSubscribeByName(props.name, formState.name, props.exact) &&\n shouldRenderFormState(formState, props.formState || _proxyFormState, _setFormState, props.reRenderRoot)) {\n props.callback({\n values: { ..._formValues },\n ..._formState,\n ...formState,\n });\n }\n },\n }).unsubscribe;\n const subscribe = (props) => {\n _state.mount = true;\n _proxySubscribeFormState = {\n ..._proxySubscribeFormState,\n ...props.formState,\n };\n return _subscribe({\n ...props,\n formState: _proxySubscribeFormState,\n });\n };\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !options.keepIsValidating &&\n unset(_formState.validatingFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.state.next({\n values: cloneObject(_formValues),\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _setValid();\n };\n const _setDisabledField = ({ disabled, name, }) => {\n if ((isBoolean(disabled) && _state.mount) ||\n !!disabled ||\n _names.disabled.has(name)) {\n disabled ? _names.disabled.add(name) : _names.disabled.delete(name);\n }\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n if (field) {\n _setDisabledField({\n disabled: isBoolean(options.disabled)\n ? options.disabled\n : _options.disabled,\n name,\n });\n }\n else {\n updateValidAndValue(name, true, options.value);\n }\n return {\n ...(disabledIsDefined\n ? { disabled: options.disabled || _options.disabled }\n : {}),\n ...(_options.progressive\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n iterateFieldsByAction(_fields, _focusInput, _names.mount);\n const _disableForm = (disabled) => {\n if (isBoolean(disabled)) {\n _subjects.state.next({ disabled });\n iterateFieldsByAction(_fields, (ref, name) => {\n const currentField = get(_fields, name);\n if (currentField) {\n ref.disabled = currentField._f.disabled || disabled;\n if (Array.isArray(currentField._f.refs)) {\n currentField._f.refs.forEach((inputRef) => {\n inputRef.disabled = currentField._f.disabled || disabled;\n });\n }\n }\n }, 0, false);\n }\n };\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n let onValidError = undefined;\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist &&\n e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _runSchema();\n _formState.errors = errors;\n fieldValues = values;\n }\n else {\n await executeBuiltInValidation(_fields);\n }\n if (_names.disabled.size) {\n for (const name of _names.disabled) {\n set(fieldValues, name, undefined);\n }\n }\n unset(_formState.errors, 'root');\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n try {\n await onValid(fieldValues, e);\n }\n catch (error) {\n onValidError = error;\n }\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n if (onValidError) {\n throw onValidError;\n }\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, cloneObject(get(_defaultValues, name)));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, cloneObject(options.defaultValue));\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, cloneObject(get(_defaultValues, name)))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _setValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const isEmptyResetValues = isEmptyObject(formValues);\n const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues) {\n const fieldsToCheck = new Set([\n ..._names.mount,\n ...Object.keys(getDirtyFields(_defaultValues, _formValues)),\n ]);\n for (const fieldName of Array.from(fieldsToCheck)) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n for (const fieldName of _names.mount) {\n setValue(fieldName, get(values, fieldName));\n }\n }\n _formValues = cloneObject(values);\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.state.next({\n values: { ...values },\n });\n }\n _names = {\n mount: keepStateOptions.keepDirtyValues ? _names.mount : new Set(),\n unMount: new Set(),\n array: new Set(),\n disabled: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n _state.mount =\n !_proxyFormState.isValid ||\n !!keepStateOptions.keepIsValid ||\n !!keepStateOptions.keepDirtyValues;\n _state.watch = !!_options.shouldUnregister;\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: isEmptyResetValues\n ? false\n : keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: isEmptyResetValues\n ? {}\n : keepStateOptions.keepDirtyValues\n ? keepStateOptions.keepDefaultValues && _formValues\n ? getDirtyFields(_defaultValues, _formValues)\n : _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : keepStateOptions.keepDirty\n ? _formState.dirtyFields\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful\n ? _formState.isSubmitSuccessful\n : false,\n isSubmitting: false,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, keepStateOptions);\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect &&\n isFunction(fieldRef.select) &&\n fieldRef.select();\n }\n }\n };\n const _setFormState = (updatedFormState) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n const methods = {\n control: {\n register,\n unregister,\n getFieldState,\n handleSubmit,\n setError,\n _subscribe,\n _runSchema,\n _getWatch,\n _getDirty,\n _setValid,\n _setFieldArray,\n _setDisabledField,\n _setErrors,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _removeUnmounted,\n _disableForm,\n _subjects,\n _proxyFormState,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n subscribe,\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n return {\n ...methods,\n formControl: methods,\n };\n}\n\nvar generateId = () => {\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar appendAt = (data, value) => [\n ...data,\n ...convertToArrayPayload(value),\n];\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nvar prependAt = (data, value) => [\n ...convertToArrayPayload(value),\n ...convertToArrayPayload(data),\n];\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n [data[indexA], data[indexB]] = [data[indexB], data[indexA]];\n};\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n * <form onSubmit={handleSubmit(data => console.log(data))}>\n * {fields.map((item, index) => (\n * <input key={item.id} {...register(`test.${index}.firstName`)} />\n * ))}\n * <button type=\"button\" onClick={() => append({ firstName: \"bill\" })}>\n * append\n * </button>\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const methods = useFormContext();\n const { control = methods.control, name, keyName = 'id', shouldUnregister, rules, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n rules &&\n control.register(name, rules);\n React.useEffect(() => control._subjects.array.subscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n }).unsubscribe, [control]);\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._setFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append = (value, options) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = appendAt(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = appendAt(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, appendAt, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend = (value, options) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prependAt(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prependAt(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, prependAt, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n !Array.isArray(get(control._fields, name)) &&\n set(control._fields, name, undefined);\n control._setFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._setFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._setFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n if (_actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted) &&\n !getValidationModes(control._options.reValidateMode).isOnSubmit) {\n if (control._options.resolver) {\n control._runSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n if (existingError\n ? (!error && existingError.type) ||\n (error &&\n (existingError.type !== error.type ||\n existingError.message !== error.message))\n : error && error.type) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field &&\n field._f &&\n !(getValidationModes(control._options.reValidateMode).isOnSubmit &&\n getValidationModes(control._options.mode).isOnSubmit)) {\n validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n control._subjects.state.next({\n name,\n values: cloneObject(control._formValues),\n });\n control._names.focus &&\n iterateFieldsByAction(control._fields, (ref, key) => {\n if (control._names.focus &&\n key.startsWith(control._names.focus) &&\n ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n });\n control._names.focus = '';\n control._setValid();\n _actioned.current = false;\n }, [fields, name, control]);\n React.useEffect(() => {\n !get(control._formValues, name) && control._setFieldArray(name);\n return () => {\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n control._options.shouldUnregister || shouldUnregister\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, keyName, shouldUnregister]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend, [updateValues, name, control]),\n append: React.useCallback(append, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert$1, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName]),\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input defaultValue=\"test\" {...register(\"example\")} />\n * <input {...register(\"exampleRequired\", { required: true })} />\n * {errors.exampleRequired && <span>This field is required</span>}\n * <button>Submit</button>\n * </form>\n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef(undefined);\n const _values = React.useRef(undefined);\n const [formState, updateFormState] = React.useState({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n validatingFields: {},\n errors: props.errors || {},\n disabled: props.disabled || false,\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n if (!_formControl.current) {\n _formControl.current = {\n ...(props.formControl ? props.formControl : createFormControl(props)),\n formState,\n };\n if (props.formControl &&\n props.defaultValues &&\n !isFunction(props.defaultValues)) {\n props.formControl.reset(props.defaultValues, props.resetOptions);\n }\n }\n const control = _formControl.current.control;\n control._options = props;\n React.useLayoutEffect(() => control._subscribe({\n formState: control._proxyFormState,\n callback: () => updateFormState({ ...control._formState }),\n reRenderRoot: true,\n }), [control]);\n React.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);\n React.useEffect(() => {\n if (control._proxyFormState.isDirty) {\n const isDirty = control._getDirty();\n if (isDirty !== formState.isDirty) {\n control._subjects.state.next({\n isDirty,\n });\n }\n }\n }, [control, formState.isDirty]);\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, _values.current)) {\n control._reset(props.values, control._options.resetOptions);\n _values.current = props.values;\n updateFormState((state) => ({ ...state }));\n }\n else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n React.useEffect(() => {\n if (props.errors && !isEmptyObject(props.errors)) {\n control._setErrors(props.errors);\n }\n }, [props.errors, control]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._setValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n React.useEffect(() => {\n props.shouldUnregister &&\n control._subjects.state.next({\n values: control._getWatch(),\n });\n }, [props.shouldUnregister, control]);\n _formControl.current.formState = getProxyFormState(formState, control);\n return _formControl.current;\n}\n\nexport { Controller, Form, FormProvider, appendErrors, createFormControl, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n","import * as React from \"react\";\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\nimport {\r\n\tController,\r\n\tFormProvider,\r\n\tuseFormContext,\r\n\ttype ControllerProps,\r\n\ttype FieldPath,\r\n\ttype FieldValues\r\n} from \"react-hook-form\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FieldLabel } from \"../label/field-label/FieldLabel\";\r\n\r\nconst Form = FormProvider;\r\n\r\ntype FormFieldContextValue<\r\n\tTFieldValues extends FieldValues = FieldValues,\r\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\r\n> = {\r\n\tname: TName;\r\n};\r\n\r\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);\r\n\r\nconst FormField = <\r\n\tTFieldValues extends FieldValues = FieldValues,\r\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\r\n>({\r\n\t...props\r\n}: ControllerProps<TFieldValues, TName>) => {\r\n\treturn (\r\n\t\t<FormFieldContext.Provider value={{ name: props.name }}>\r\n\t\t\t<Controller {...props} />\r\n\t\t</FormFieldContext.Provider>\r\n\t);\r\n};\r\n\r\nconst useFormField = () => {\r\n\tconst fieldContext = React.useContext(FormFieldContext);\r\n\tconst itemContext = React.useContext(FormItemContext);\r\n\tconst { getFieldState, formState } = useFormContext();\r\n\r\n\tconst fieldState = getFieldState(fieldContext.name, formState);\r\n\r\n\tif (!fieldContext) {\r\n\t\tthrow new Error(\"useFormField should be used within <FormField>\");\r\n\t}\r\n\r\n\tconst { id } = itemContext;\r\n\r\n\treturn {\r\n\t\tid,\r\n\t\tname: fieldContext.name,\r\n\t\tformItemId: `${id}-form-item`,\r\n\t\tformDescriptionId: `${id}-form-item-description`,\r\n\t\tformMessageId: `${id}-form-item-message`,\r\n\t\t...fieldState\r\n\t};\r\n};\r\n\r\ntype FormItemContextValue = {\r\n\tid: string;\r\n};\r\n\r\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);\r\n\r\nconst formItemStyle = tv({\r\n\tbase: \"space-y-2\"\r\n});\r\n\r\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\r\n\t({ className, ...props }, ref) => {\r\n\t\tconst id = React.useId();\r\n\r\n\t\treturn (\r\n\t\t\t<FormItemContext.Provider value={{ id }}>\r\n\t\t\t\t<div ref={ref} className={formItemStyle({ className })} {...props} />\r\n\t\t\t</FormItemContext.Provider>\r\n\t\t);\r\n\t}\r\n);\r\nFormItem.displayName = \"FormItem\";\r\n\r\ninterface FormLabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {\r\n\trequired?: boolean;\r\n}\r\n\r\nconst FormLabel = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, FormLabelProps>(\r\n\t({ className, required, ...props }, ref) => {\r\n\t\tconst { formItemId } = useFormField();\r\n\r\n\t\treturn <FieldLabel required={required} ref={ref} className={className} htmlFor={formItemId} {...props} />;\r\n\t}\r\n);\r\nFormLabel.displayName = \"FormLabel\";\r\n\r\nconst FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(\r\n\t({ ...props }, ref) => {\r\n\t\tconst { error, formItemId, formDescriptionId, formMessageId } = useFormField();\r\n\r\n\t\treturn (\r\n\t\t\t<Slot\r\n\t\t\t\tref={ref}\r\n\t\t\t\tid={formItemId}\r\n\t\t\t\taria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\r\n\t\t\t\taria-invalid={!!error}\r\n\t\t\t\t{...props}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n);\r\nFormControl.displayName = \"FormControl\";\r\n\r\nconst formDescriptionStyle = tv({\r\n\tbase: \"text-xs text-muted\"\r\n});\r\n\r\nconst FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n\t({ className, ...props }, ref) => {\r\n\t\tconst { formDescriptionId } = useFormField();\r\n\r\n\t\treturn <p ref={ref} id={formDescriptionId} className={formDescriptionStyle({ className })} {...props} />;\r\n\t}\r\n);\r\nFormDescription.displayName = \"FormDescription\";\r\n\r\nconst formMessageStyle = tv({\r\n\tbase: \"text-[0.8rem] font-medium text-destructive\"\r\n});\r\n\r\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n\t({ className, children, ...props }, ref) => {\r\n\t\tconst { error, formMessageId } = useFormField();\r\n\t\tconst body = error ? String(error?.message ?? \"\") : children;\r\n\r\n\t\tif (!body) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t<p ref={ref} id={formMessageId} className={formMessageStyle({ className })} {...props}>\r\n\t\t\t\t{body}\r\n\t\t\t</p>\r\n\t\t);\r\n\t}\r\n);\r\nFormMessage.displayName = \"FormMessage\";\r\n\r\nexport {\r\n\tuseFormField,\r\n\tForm,\r\n\tFormItem,\r\n\tFormLabel,\r\n\tFormControl,\r\n\tFormDescription,\r\n\tFormMessage,\r\n\tFormField as FormFieldControl\r\n};\r\n","import * as React from \"react\";\r\nimport {\r\n\tuseFormContext,\r\n\ttype FieldPath,\r\n\ttype FieldValues,\r\n\ttype ControllerRenderProps,\r\n\ttype UseFormStateReturn,\r\n\ttype ControllerFieldState\r\n} from \"react-hook-form\";\r\nimport { FormFieldControl, FormItem, FormControl } from \"../../Form\";\r\nimport { Field } from \"@/components/field/Field\";\r\nimport { tv, VariantProps } from \"tailwind-variants\";\r\n\r\n/**\r\n * Стили для FormField\r\n */\r\nconst formFieldStyles = tv({\r\n\tbase: \"flex-col gap-2 lg:flex-row lg:gap-4\",\r\n\tslots: {\r\n\t\tlabel: \"h-4 lg:h-9\"\r\n\t}\r\n});\r\n\r\nexport interface FormFieldProps<\r\n\tTFieldValues extends FieldValues = FieldValues,\r\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\r\n> extends VariantProps<typeof formFieldStyles> {\r\n\t/** Имя поля формы */\r\n\tname: TName;\r\n\t/** Заголовок поля (лейбл) */\r\n\ttitle: string;\r\n\t/** Описание поля */\r\n\tdescription?: string;\r\n\t/** Функция рендеринга контрола */\r\n\tcontrol: (props: {\r\n\t\tfield: ControllerRenderProps<TFieldValues, TName>;\r\n\t\tfieldState: ControllerFieldState;\r\n\t\tformState: UseFormStateReturn<TFieldValues>;\r\n\t\treadonly?: boolean;\r\n\t}) => React.ReactNode;\r\n\t/** Является ли поле обязательным */\r\n\trequired?: boolean;\r\n\t/** Дополнительные классы */\r\n\tclassName?: string;\r\n\t/** Классы для лейбла */\r\n\tlabelClassName?: string;\r\n\t/** Поле только для чтения */\r\n\treadonly?: boolean;\r\n}\r\n\r\n/**\r\n * Компонент FormField объединяет несколько компонентов формы в один блок\r\n * для упрощения создания консистентных форм.\r\n *\r\n * ### Адаптивное поведение (mobile-first подход):\r\n *\r\n * - **Мобильные устройства и планшеты**: вертикальный лейаут по умолчанию, где лейбл и поле ввода\r\n * расположены друг над другим с интервалом (gap-2) для оптимальной читаемости\r\n * на узких экранах.\r\n *\r\n * - **Десктоп** (от lg: breakpoint): горизонтальный лейаут, где лейбл располагается слева от поля ввода.\r\n *\r\n * Компонент обеспечивает согласованное расположение элементов формы,\r\n * включая лейбл, поле ввода, подсказку и сообщение об ошибке.\r\n *\r\n * @example\r\n * <FormField\r\n * name=\"username\"\r\n * title=\"Имя пользователя\"\r\n * description=\"Ваше публичное имя пользователя\"\r\n * required\r\n * control={({ field }) => (\r\n * <TextInput\r\n * placeholder=\"Введите имя пользователя\"\r\n * startIcon={<Icon icon={User} />}\r\n * {...field}\r\n * />\r\n * )}\r\n * />\r\n */\r\n\r\nexport function FormField<\r\n\tTFieldValues extends FieldValues = FieldValues,\r\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\r\n>({\r\n\tname,\r\n\ttitle,\r\n\tdescription,\r\n\tcontrol,\r\n\trequired,\r\n\tclassName,\r\n\tlabelClassName,\r\n\treadonly\r\n}: FormFieldProps<TFieldValues, TName>) {\r\n\tconst form = useFormContext<TFieldValues>();\r\n\tconst styles = formFieldStyles();\r\n\r\n\treturn (\r\n\t\t<FormFieldControl\r\n\t\t\tcontrol={form.control}\r\n\t\t\tname={name}\r\n\t\t\trender={({ field, fieldState, formState }) => {\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<FormItem>\r\n\t\t\t\t\t\t<Field\r\n\t\t\t\t\t\t\ttitle={title}\r\n\t\t\t\t\t\t\tdescription={description}\r\n\t\t\t\t\t\t\trequired={required}\r\n\t\t\t\t\t\t\terror={fieldState.error?.message}\r\n\t\t\t\t\t\t\tlabelClassName={styles.label({ class: labelClassName })}\r\n\t\t\t\t\t\t\treadonly={readonly}\r\n\t\t\t\t\t\t\tclassName={styles.base({ className })}\r\n\t\t\t\t\t\t\tcontrol={({ id, readonly }) => (\r\n\t\t\t\t\t\t\t\t<FormControl id={id}>{control({ field, fieldState, formState, readonly })}</FormControl>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FormItem>\r\n\t\t\t\t);\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n}\r\n","import { tv } from \"tailwind-variants\";\r\n\r\nconst formSectionTitle = tv({\r\n\tbase: \"text-md font-semibold\"\r\n});\r\n\r\nexport interface FormSectionTitleProps {\r\n\tchildren: React.ReactNode;\r\n\tclassName?: string;\r\n\t/**\r\n\t * HTML тег для заголовка\r\n\t * @default \"h3\"\r\n\t */\r\n\tas?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\r\n}\r\n\r\n/**\r\n * Компонент заголовка секции формы\r\n */\r\nexport function FormSectionTitle({ children, className, as: Component = \"h3\" }: FormSectionTitleProps) {\r\n\treturn <Component className={formSectionTitle({ className })}>{children}</Component>;\r\n}\r\n"],"names":["isCheckBoxInput","element","isDateObject","value","isNullOrUndefined","isObjectType","isObject","getEventValue","event","getNodeParentName","name","isNameInFieldArray","names","isPlainObject","tempObject","prototypeCopy","isWeb","cloneObject","data","copy","isArray","isFileListInstance","key","compact","isUndefined","val","get","object","path","defaultValue","result","isBoolean","isKey","stringToPath","input","set","index","tempPath","length","lastIndex","newValue","objValue","EVENTS","VALIDATION_MODE","HookFormContext","React","useFormContext","FormProvider","props","_a","children","__objRest","getProxyFormState","formState","control","localProxyFormState","isRoot","_key","useFormState","methods","disabled","exact","updateFormState","_localProxyFormState","_name","__spreadValues","isString","generateWatchOutput","_names","formValues","isGlobal","fieldName","useWatch","_defaultValue","updateValue","useController","shouldUnregister","isArrayField","_props","_registerProps","__spreadProps","fieldState","onChange","onBlur","ref","elm","field","message","_shouldUnregisterField","updateMounted","Controller","Form","FormFieldContext","FormField","jsx","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","id","formItemStyle","tv","FormItem","_b","className","FormLabel","required","formItemId","FieldLabel","FormControl","error","formDescriptionId","formMessageId","Slot","formDescriptionStyle","FormDescription","formMessageStyle","FormMessage","body","formFieldStyles","title","description","labelClassName","readonly","form","styles","FormFieldControl","Field","formSectionTitle","FormSectionTitle","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAIA,KAAkB,CAACC,MAAYA,EAAQ,SAAS,YAEhDC,KAAe,CAACC,MAAUA,aAAiB,MAE3CC,IAAoB,CAACD,MAAUA,KAAS;AAE5C,MAAME,KAAe,CAACF,MAAU,OAAOA,KAAU;AACjD,IAAIG,IAAW,CAACH,MAAU,CAACC,EAAkBD,CAAK,KAC9C,CAAC,MAAM,QAAQA,CAAK,KACpBE,GAAaF,CAAK,KAClB,CAACD,GAAaC,CAAK,GAEnBI,KAAgB,CAACC,MAAUF,EAASE,CAAK,KAAKA,EAAM,SAClDR,GAAgBQ,EAAM,MAAM,IACxBA,EAAM,OAAO,UACbA,EAAM,OAAO,QACjBA,GAEFC,KAAoB,CAACC,MAASA,EAAK,UAAU,GAAGA,EAAK,OAAO,aAAa,CAAC,KAAKA,GAE/EC,KAAqB,CAACC,GAAOF,MAASE,EAAM,IAAIH,GAAkBC,CAAI,CAAC,GAEvEG,KAAgB,CAACC,MAAe;AAChC,QAAMC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AAgC,EAAW,UAAX,gBAAAhC,EAAkB;AAAA,YACzB,gBAAgB6E,EAAO,MAAM,EAAE,OAAOH,GAAgB;AAAA,YACtD,UAAAC;AAAA,YACA,WAAWE,EAAO,KAAK,EAAE,WAAArB,GAAW;AAAA,YACpC,SAAS,CAAC,EAAE,IAAAL,GAAI,UAAAwB,QACd,gBAAA9B,EAAAgB,GAAA,EAAY,IAAAV,GAAS,UAAA9C,EAAQ,EAAE,OAAAgC,GAAO,YAAAL,GAAY,WAAA5B,GAAW,UAAAuE,EAAAA,CAAU,EAAE,CAAA;AAAA,UAAA;AAAA,QAAA,GAG7E;AAAA,MAAA;AAAA,IAEF;AAAA,EACD;AAEF;ACvHA,MAAMK,KAAmB3B,EAAG;AAAA,EAC3B,MAAM;AACP,CAAC;AAeM,SAAS4B,GAAiB,EAAE,UAAAhF,GAAU,WAAAuD,GAAW,IAAI0B,IAAY,QAA+B;AAC/F,SAAA,gBAAArC,EAACqC,KAAU,WAAWF,GAAiB,EAAE,WAAAxB,EAAU,CAAC,GAAI,UAAAvD,GAAS;AACzE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"form.js","sources":["../../src/components/form/components/form-section-title/FormSectionTitle.tsx","../../src/components/form/components/form-divider/FormDivider.tsx","../../src/components/form/components/form-section-header-button/FormSectionHeaderButton.tsx","../../src/components/form/components/form-field-set/FormFieldSet.tsx"],"sourcesContent":["import { tv } from \"tailwind-variants\";\r\n\r\nconst formSectionTitle = tv({\r\n\tbase: \"text-md font-semibold\"\r\n});\r\n\r\nexport interface FormSectionTitleProps {\r\n\t/** Дочерние элементы */\r\n\tchildren: React.ReactNode;\r\n\t/** Дополнительные классы */\r\n\tclassName?: string;\r\n\t/**\r\n\t * HTML тег для заголовка\r\n\t * @default \"h3\"\r\n\t */\r\n\tas?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\r\n}\r\n\r\n/**\r\n * Заголовок секции формы\r\n */\r\nexport function FormSectionTitle({ children, className, as: Component = \"h3\" }: FormSectionTitleProps) {\r\n\treturn <Component className={formSectionTitle({ className })}>{children}</Component>;\r\n}\r\n","import { Divider } from \"@/components/divider\";\r\nimport { DividerProps } from \"@/components/divider/Divider\";\r\nimport React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\n\r\nconst formDividerStyles = tv({\r\n\tbase: \"mb-4 mt-4 lg:mb-3.5 lg:mt-5\"\r\n});\r\n\r\n/**\r\n * Девайдер формы\r\n */\r\nexport const FormDivider = React.forwardRef<HTMLDivElement, DividerProps>(({ className, ...props }, ref) => {\r\n\treturn <Divider ref={ref} className={formDividerStyles({ className })} {...props} />;\r\n});\r\n\r\nFormDivider.displayName = \"FormDivider\";\r\n","import { Button, ButtonProps } from \"@/components/button\";\r\nimport React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\n\r\nconst formSectionHeaderButtonStyles = tv({\r\n\tslots: {\r\n\t\tbutton: \"h-full rounded-none p-0\",\r\n\t\tcontainer: \"leading-none\"\r\n\t}\r\n});\r\n\r\ntype FormSectionHeaderButtonProps = ButtonProps;\r\n\r\n/**\r\n * Кнопка для отдельной секции\r\n */\r\nexport const FormSectionHeaderButton = React.forwardRef<HTMLButtonElement, FormSectionHeaderButtonProps>(\r\n\t({ className, children, ...props }, ref) => {\r\n\t\tconst styles = formSectionHeaderButtonStyles();\r\n\r\n\t\treturn (\r\n\t\t\t<Button\r\n\t\t\t\tref={ref}\r\n\t\t\t\tcontainerClassName={styles.container()}\r\n\t\t\t\tclassName={styles.button({ class: className })}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t{children}\r\n\t\t\t</Button>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nFormSectionHeaderButton.displayName = \"FormSectionHeaderButton\";\r\n","import React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FormStack } from \"../form-stack/FormStack\";\r\n\r\nconst formFieldSetStyles = tv({\r\n\tbase: \"rounded-xl border border-secondary-border p-4 lg:p-6\"\r\n});\r\n\r\n/** Оболочка для группы полей формы с рамкой и внутренними отступами */\r\nexport const FormFieldSet = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\r\n\t({ className, children, ...props }, ref) => {\r\n\t\treturn (\r\n\t\t\t<FormStack ref={ref} className={formFieldSetStyles({ className })} {...props}>\r\n\t\t\t\t{children}\r\n\t\t\t</FormStack>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nFormFieldSet.displayName = \"FormFieldSet\";\r\n"],"names":["formSectionTitle","tv","FormSectionTitle","children","className","Component","jsx","formDividerStyles","FormDivider","React","props","ref","Divider","formSectionHeaderButtonStyles","FormSectionHeaderButton","styles","Button","formFieldSetStyles","FormFieldSet","FormStack"],"mappings":";;;;;;;;;AAEA,MAAMA,IAAmBC,EAAG;AAAA,EAC3B,MAAM;AACP,CAAC;AAiBM,SAASC,EAAiB,EAAE,UAAAC,GAAU,WAAAC,GAAW,IAAIC,IAAY,QAA+B;AAC/F,SAAA,gBAAAC,EAACD,KAAU,WAAWL,EAAiB,EAAE,WAAAI,EAAU,CAAC,GAAI,UAAAD,GAAS;AACzE;AClBA,MAAMI,IAAoBN,EAAG;AAAA,EAC5B,MAAM;AACP,CAAC,GAKYO,IAAcC,EAAM,WAAyC,CAAC,EAAE,WAAAL,GAAW,GAAGM,EAAM,GAAGC,MAC5F,gBAAAL,EAACM,GAAQ,EAAA,KAAAD,GAAU,WAAWJ,EAAkB,EAAE,WAAAH,EAAW,CAAA,GAAI,GAAGM,GAAO,CAClF;AAEDF,EAAY,cAAc;ACZ1B,MAAMK,IAAgCZ,EAAG;AAAA,EACxC,OAAO;AAAA,IACN,QAAQ;AAAA,IACR,WAAW;AAAA,EAAA;AAEb,CAAC,GAOYa,IAA0BL,EAAM;AAAA,EAC5C,CAAC,EAAE,WAAAL,GAAW,UAAAD,GAAU,GAAGO,EAAA,GAASC,MAAQ;AAC3C,UAAMI,IAASF,EAA8B;AAG5C,WAAA,gBAAAP;AAAA,MAACU;AAAA,MAAA;AAAA,QACA,KAAAL;AAAA,QACA,oBAAoBI,EAAO,UAAU;AAAA,QACrC,WAAWA,EAAO,OAAO,EAAE,OAAOX,GAAW;AAAA,QAC5C,GAAGM;AAAA,QAEH,UAAAP;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGH;AAEAW,EAAwB,cAAc;AC7BtC,MAAMG,IAAqBhB,EAAG;AAAA,EAC7B,MAAM;AACP,CAAC,GAGYiB,IAAeT,EAAM;AAAA,EACjC,CAAC,EAAE,WAAAL,GAAW,UAAAD,GAAU,GAAGO,EAAA,GAASC,MAElC,gBAAAL,EAACa,GAAU,EAAA,KAAAR,GAAU,WAAWM,EAAmB,EAAE,WAAAb,GAAW,GAAI,GAAGM,GACrE,UAAAP,EACF,CAAA;AAGH;AAEAe,EAAa,cAAc;"}
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export type HintStateProps = React.HTMLAttributes<HTMLDivElement>;
3
+ export declare const HintState: React.ForwardRefExoticComponent<HintStateProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { HintState } from './HintState';
3
+ declare const meta: Meta<typeof HintState>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof HintState>;
6
+ export declare const Default: Story;
@@ -0,0 +1 @@
1
+ export { HintState } from './HintState';
@@ -0,0 +1,2 @@
1
+ export * from './hint-state/index'
2
+ export {}
@@ -0,0 +1,5 @@
1
+ import { H as e } from "../HintState-BxrCAWqq.js";
2
+ export {
3
+ e as HintState
4
+ };
5
+ //# sourceMappingURL=hint-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hint-state.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,52 +1,13 @@
1
- import { VariantProps, TVReturnType } from 'tailwind-variants';
2
1
  import { LucideIcon } from 'lucide-react';
3
- import { TVConfig } from 'tailwind-variants/dist/config.js';
4
- declare const iconVariants: TVReturnType<{
5
- size: {
6
- sm: string;
7
- md: string;
8
- lg: string;
9
- };
10
- }, undefined, "h-4 w-4", TVConfig<{
11
- size: {
12
- sm: string;
13
- md: string;
14
- lg: string;
15
- };
16
- }, {
17
- size: {
18
- sm: string;
19
- md: string;
20
- lg: string;
21
- };
22
- }>, {
23
- size: {
24
- sm: string;
25
- md: string;
26
- lg: string;
27
- };
28
- }, undefined, TVReturnType<{
29
- size: {
30
- sm: string;
31
- md: string;
32
- lg: string;
33
- };
34
- }, undefined, "h-4 w-4", TVConfig<{
35
- size: {
36
- sm: string;
37
- md: string;
38
- lg: string;
39
- };
40
- }, {
41
- size: {
42
- sm: string;
43
- md: string;
44
- lg: string;
45
- };
46
- }>, unknown, unknown, undefined>>;
47
- export type IconProps = VariantProps<typeof iconVariants> & {
2
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
+ export interface IconVariants {
4
+ size?: "sm" | "md" | "lg" | "xl";
5
+ }
6
+ export type IconProps = IconVariants & {
48
7
  icon: LucideIcon;
49
8
  className?: string;
50
9
  };
51
- export declare const Icon: React.FC<IconProps>;
52
- export {};
10
+ export declare const Icon: ForwardRefExoticComponent<IconVariants & {
11
+ icon: LucideIcon;
12
+ className?: string;
13
+ } & RefAttributes<SVGSVGElement>>;
@@ -1,9 +1,12 @@
1
1
  import { StoryObj } from '@storybook/react';
2
- import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
3
- import { IconProps } from './Icon';
4
- import { LucideProps } from 'lucide-react';
2
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
+ import { IconVariants } from './Icon';
4
+ import { LucideIcon, LucideProps } from 'lucide-react';
5
5
  declare const meta: {
6
- component: FC<IconProps>;
6
+ component: ForwardRefExoticComponent< IconVariants & {
7
+ icon: LucideIcon;
8
+ className?: string;
9
+ } & RefAttributes<SVGSVGElement>>;
7
10
  parameters: {
8
11
  layout: string;
9
12
  };
@@ -1,80 +1,9 @@
1
1
  import { LucideIcon } from 'lucide-react';
2
- import { VariantProps, TVReturnType } from 'tailwind-variants';
3
- import { TVConfig } from 'tailwind-variants/dist/config.js';
4
- declare const featureIconVariants: TVReturnType<{
5
- size: {
6
- sm: string;
7
- md: string;
8
- lg: string;
9
- };
10
- type: {
11
- primary: string;
12
- secondary: string;
13
- };
14
- }, undefined, "flex items-center justify-center border border-secondary-border text-secondary-fg shadow-sm", TVConfig<{
15
- size: {
16
- sm: string;
17
- md: string;
18
- lg: string;
19
- };
20
- type: {
21
- primary: string;
22
- secondary: string;
23
- };
24
- }, {
25
- size: {
26
- sm: string;
27
- md: string;
28
- lg: string;
29
- };
30
- type: {
31
- primary: string;
32
- secondary: string;
33
- };
34
- }>, {
35
- size: {
36
- sm: string;
37
- md: string;
38
- lg: string;
39
- };
40
- type: {
41
- primary: string;
42
- secondary: string;
43
- };
44
- }, undefined, TVReturnType<{
45
- size: {
46
- sm: string;
47
- md: string;
48
- lg: string;
49
- };
50
- type: {
51
- primary: string;
52
- secondary: string;
53
- };
54
- }, undefined, "flex items-center justify-center border border-secondary-border text-secondary-fg shadow-sm", TVConfig<{
55
- size: {
56
- sm: string;
57
- md: string;
58
- lg: string;
59
- };
60
- type: {
61
- primary: string;
62
- secondary: string;
63
- };
64
- }, {
65
- size: {
66
- sm: string;
67
- md: string;
68
- lg: string;
69
- };
70
- type: {
71
- primary: string;
72
- secondary: string;
73
- };
74
- }>, unknown, unknown, undefined>>;
75
- export type FeatureIconProps = VariantProps<typeof featureIconVariants> & {
2
+ export interface FeatureIconVariants {
3
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
4
+ }
5
+ export type FeatureIconProps = FeatureIconVariants & {
76
6
  icon: LucideIcon;
77
7
  className?: string;
78
8
  };
79
9
  export declare const FeatureIcon: React.FC<FeatureIconProps>;
80
- export {};
@@ -1,13 +1,11 @@
1
1
  import { StoryObj } from '@storybook/react';
2
- import { FC } from 'react';
2
+ import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
3
3
  import { FeatureIconProps } from './FeatureIcon';
4
+ import { LucideProps } from 'lucide-react';
4
5
  declare const meta: {
5
6
  component: FC<FeatureIconProps>;
6
7
  parameters: {
7
8
  layout: string;
8
- controls: {
9
- exclude: string[];
10
- };
11
9
  };
12
10
  argTypes: {
13
11
  size: {
@@ -16,14 +14,26 @@ declare const meta: {
16
14
  type: string;
17
15
  };
18
16
  };
19
- type: {
17
+ icon: {
20
18
  options: string[];
21
19
  control: {
22
20
  type: string;
23
21
  };
22
+ mapping: {
23
+ Flower: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
24
+ FileUpIcon: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
25
+ Star: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
26
+ Heart: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
27
+ Settings: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
28
+ Zap: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
29
+ };
24
30
  };
25
31
  };
26
32
  };
27
33
  export default meta;
28
34
  type Story = StoryObj<typeof meta>;
29
- export declare const Base: Story;
35
+ export declare const Default: Story;
36
+ export declare const SquareShowcase: Story;
37
+ export declare const RoundedShowcase: Story;
38
+ export declare const SquareGhostShowcase: Story;
39
+ export declare const RoundedGhostShowcase: Story;
@@ -0,0 +1,2 @@
1
+ export { Icon } from './Icon';
2
+ export { FeatureIcon } from './feature-icon/FeatureIcon';
@@ -1,9 +1,10 @@
1
1
  import { LucideIcon } from 'lucide-react';
2
2
  import * as React from "react";
3
- interface IconTooltipProps {
3
+ export interface IconTooltipProps {
4
4
  content: React.ReactNode;
5
5
  icon: LucideIcon;
6
- className?: string;
6
+ iconSize?: "sm" | "md" | "lg";
7
+ iconClassName?: string;
8
+ contentClassName?: string;
7
9
  }
8
- export declare const IconTooltip: ({ content, icon, className }: IconTooltipProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
10
+ export declare const IconTooltip: ({ content, icon, iconClassName, iconSize, contentClassName }: IconTooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { IconTooltip } from './IconTooltip';
2
+ export type { IconTooltipProps } from './IconTooltip';
@@ -0,0 +1,2 @@
1
+ export * from './icon-tooltip/index'
2
+ export {}
@@ -0,0 +1,5 @@
1
+ import { I as r } from "../IconTooltip-DhkXc8Uy.js";
2
+ export {
3
+ r as IconTooltip
4
+ };
5
+ //# sourceMappingURL=icon-tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-tooltip.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ export * from './icon/index'
2
+ export {}
@@ -0,0 +1,7 @@
1
+ import { I as e } from "../Icon-DH3ev9GK.js";
2
+ import { F as t } from "../FeatureIcon-BGE0Orkc.js";
3
+ export {
4
+ t as FeatureIcon,
5
+ e as Icon
6
+ };
7
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}