@vlrc-fe/components 3.0.3 → 3.0.5

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 (701) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +10 -1
  3. package/bin/registry.mjs +1124 -0
  4. package/bin/vlrc.mjs +102 -7
  5. package/dist/ConfirmModal.cjs +268 -1
  6. package/dist/ConfirmModal.d.ts +5 -21
  7. package/dist/ConfirmModal.d.ts.map +1 -1
  8. package/dist/ConfirmModal.js +120 -111
  9. package/dist/DataTable/DataTable.cjs +203 -1
  10. package/dist/DataTable/DataTable.js +161 -120
  11. package/dist/DataTable/components/DataTableColumnHeader.cjs +214 -1
  12. package/dist/DataTable/components/DataTableColumnHeader.d.ts +3 -3
  13. package/dist/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
  14. package/dist/DataTable/components/DataTableColumnHeader.js +201 -103
  15. package/dist/DataTable/components/DataTableFacetedFilter.cjs +332 -1
  16. package/dist/DataTable/components/DataTableFacetedFilter.d.ts +3 -3
  17. package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
  18. package/dist/DataTable/components/DataTableFacetedFilter.js +285 -181
  19. package/dist/DataTable/components/DataTablePagination.cjs +200 -1
  20. package/dist/DataTable/components/DataTablePagination.js +188 -91
  21. package/dist/DataTable/components/DataTableRowActions.cjs +172 -1
  22. package/dist/DataTable/components/DataTableRowActions.js +161 -62
  23. package/dist/DataTable/components/DataTableTable.cjs +100 -1
  24. package/dist/DataTable/components/DataTableTable.js +87 -35
  25. package/dist/DataTable/components/DataTableToolbar.cjs +112 -1
  26. package/dist/DataTable/components/DataTableToolbar.js +106 -44
  27. package/dist/DataTable/components/DataTableViewOptions.cjs +113 -1
  28. package/dist/DataTable/components/DataTableViewOptions.js +105 -44
  29. package/dist/DataTable/render/createColumns.cjs +84 -1
  30. package/dist/DataTable/render/createColumns.js +65 -44
  31. package/dist/DataTable/render/defaults.cjs +38 -1
  32. package/dist/DataTable/render/defaults.js +18 -13
  33. package/dist/Dropdown/Dropdown.cjs +255 -1
  34. package/dist/Dropdown/Dropdown.js +138 -108
  35. package/dist/Form/Form.cjs +439 -1
  36. package/dist/Form/Form.js +417 -206
  37. package/dist/Form/FormDatePicker/FormDatePicker.cjs +84 -1
  38. package/dist/Form/FormDatePicker/FormDatePicker.js +68 -65
  39. package/dist/Form/FormDatePicker/MonthPickerPanel.cjs +217 -1
  40. package/dist/Form/FormDatePicker/MonthPickerPanel.js +194 -101
  41. package/dist/Form/FormDatePicker/RangeDatePicker.cjs +144 -1
  42. package/dist/Form/FormDatePicker/RangeDatePicker.js +94 -77
  43. package/dist/Form/FormDatePicker/SingleDatePicker.cjs +191 -1
  44. package/dist/Form/FormDatePicker/SingleDatePicker.js +144 -114
  45. package/dist/Form/FormDatePicker/TimeInput.cjs +172 -1
  46. package/dist/Form/FormDatePicker/TimeInput.js +162 -79
  47. package/dist/Form/FormDatePicker/TimePicker.cjs +107 -1
  48. package/dist/Form/FormDatePicker/TimePicker.js +58 -43
  49. package/dist/Form/FormDatePicker/YearPickerPanel.cjs +184 -1
  50. package/dist/Form/FormDatePicker/YearPickerPanel.js +164 -84
  51. package/dist/Form/FormDatePicker/types.cjs +10 -1
  52. package/dist/Form/FormDatePicker/types.js +8 -3
  53. package/dist/Form/FormDatePicker/useFormDatePicker.cjs +70 -1
  54. package/dist/Form/FormDatePicker/useFormDatePicker.js +58 -31
  55. package/dist/Form/FormFileUpload/FileUpload.cjs +603 -1
  56. package/dist/Form/FormFileUpload/FileUpload.js +452 -306
  57. package/dist/Form/FormFileUpload/index.cjs +175 -1
  58. package/dist/Form/FormFileUpload/index.js +164 -50
  59. package/dist/Form/FormMultiSelect/FormMultiSelect.cjs +46 -1
  60. package/dist/Form/FormMultiSelect/FormMultiSelect.js +42 -22
  61. package/dist/Form/FormNumberInput/FormNumberInput.cjs +71 -1
  62. package/dist/Form/FormNumberInput/FormNumberInput.js +60 -58
  63. package/dist/Form/FormNumberInput/StepperControls.cjs +104 -1
  64. package/dist/Form/FormNumberInput/StepperControls.js +78 -43
  65. package/dist/Form/FormNumberInput/useFormNumberInput.cjs +72 -1
  66. package/dist/Form/FormNumberInput/useFormNumberInput.js +68 -39
  67. package/dist/Form/FormRadioGroup/FormRadio.cjs +65 -1
  68. package/dist/Form/FormRadioGroup/FormRadio.js +38 -38
  69. package/dist/Form/FormRadioGroup/useFormRadio.cjs +38 -1
  70. package/dist/Form/FormRadioGroup/useFormRadio.js +27 -16
  71. package/dist/Form/FormSelect/FormSelect.cjs +46 -1
  72. package/dist/Form/FormSelect/FormSelect.js +40 -26
  73. package/dist/Form/FormSelect/useFormSelect.cjs +58 -1
  74. package/dist/Form/FormSelect/useFormSelect.js +52 -43
  75. package/dist/Icons/Icons.cjs +155 -1
  76. package/dist/Icons/Icons.js +142 -142
  77. package/dist/Modal.cjs +131 -1
  78. package/dist/Modal.d.ts +2 -14
  79. package/dist/Modal.d.ts.map +1 -1
  80. package/dist/Modal.js +63 -54
  81. package/dist/MultiSelect/MultiSelect.cjs +210 -1
  82. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  83. package/dist/MultiSelect/MultiSelect.js +126 -117
  84. package/dist/MultiSelect/renderers.cjs +571 -1
  85. package/dist/MultiSelect/renderers.js +508 -309
  86. package/dist/MultiSelect/useMultiSelect.cjs +244 -1
  87. package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
  88. package/dist/MultiSelect/useMultiSelect.js +208 -127
  89. package/dist/MultiSelect/utils.cjs +123 -1
  90. package/dist/MultiSelect/utils.js +79 -51
  91. package/dist/Select/BaseSelect.cjs +265 -1
  92. package/dist/Select/BaseSelect.js +165 -126
  93. package/dist/Select/MultiSelectTags.cjs +129 -1
  94. package/dist/Select/MultiSelectTags.js +82 -56
  95. package/dist/Typography/Blockquote.cjs +79 -1
  96. package/dist/Typography/Blockquote.js +40 -38
  97. package/dist/Typography/Code.cjs +131 -1
  98. package/dist/Typography/Code.js +64 -58
  99. package/dist/Typography/Link.cjs +139 -1
  100. package/dist/Typography/Link.d.ts +1 -2
  101. package/dist/Typography/Link.d.ts.map +1 -1
  102. package/dist/Typography/Link.js +73 -64
  103. package/dist/Typography/Paragraph.cjs +224 -1
  104. package/dist/Typography/Paragraph.d.ts +1 -2
  105. package/dist/Typography/Paragraph.d.ts.map +1 -1
  106. package/dist/Typography/Paragraph.js +118 -108
  107. package/dist/Typography/Text.cjs +223 -1
  108. package/dist/Typography/Text.d.ts +1 -2
  109. package/dist/Typography/Text.d.ts.map +1 -1
  110. package/dist/Typography/Text.js +117 -101
  111. package/dist/Typography/Title.cjs +220 -1
  112. package/dist/Typography/Title.d.ts +1 -2
  113. package/dist/Typography/Title.d.ts.map +1 -1
  114. package/dist/Typography/Title.js +126 -104
  115. package/dist/Typography/Typography.cjs +17 -1
  116. package/dist/Typography/Typography.d.ts +8 -4
  117. package/dist/Typography/Typography.d.ts.map +1 -1
  118. package/dist/Typography/Typography.js +14 -14
  119. package/dist/Typography/index.d.ts +1 -4
  120. package/dist/Typography/index.d.ts.map +1 -1
  121. package/dist/Typography/index.js +10 -13
  122. package/dist/Typography/tooltip.cjs +42 -1
  123. package/dist/Typography/tooltip.js +34 -14
  124. package/dist/Typography/types.cjs +20 -1
  125. package/dist/Typography/types.d.ts +4 -0
  126. package/dist/Typography/types.d.ts.map +1 -1
  127. package/dist/Typography/types.js +5 -2
  128. package/dist/Typography/utils.cjs +52 -1
  129. package/dist/Typography/utils.js +48 -21
  130. package/dist/Typography/weightStyles.cjs +58 -1
  131. package/dist/Typography/weightStyles.js +26 -25
  132. package/dist/_virtual/_rolldown/runtime.cjs +32 -1
  133. package/dist/_virtual/_rolldown/runtime.js +9 -7
  134. package/dist/assets/stylex.css +167 -9
  135. package/dist/astryx.cjs +9 -1
  136. package/dist/astryx.d.ts +0 -1
  137. package/dist/astryx.d.ts.map +1 -1
  138. package/dist/astryx.js +0 -1
  139. package/dist/index.cjs +779 -1
  140. package/dist/index.d.ts +2 -3
  141. package/dist/index.d.ts.map +1 -1
  142. package/dist/index.js +119 -118
  143. package/dist/layout/Box.cjs +180 -1
  144. package/dist/layout/Box.d.ts +6 -8
  145. package/dist/layout/Box.d.ts.map +1 -1
  146. package/dist/layout/Box.js +116 -50
  147. package/dist/layout/Center.cjs +40 -1
  148. package/dist/layout/Center.d.ts +3 -3
  149. package/dist/layout/Center.d.ts.map +1 -1
  150. package/dist/layout/Center.js +39 -21
  151. package/dist/layout/Container.cjs +92 -1
  152. package/dist/layout/Container.d.ts +6 -8
  153. package/dist/layout/Container.d.ts.map +1 -1
  154. package/dist/layout/Container.js +46 -31
  155. package/dist/layout/Stack.cjs +199 -1
  156. package/dist/layout/Stack.d.ts +9 -9
  157. package/dist/layout/Stack.d.ts.map +1 -1
  158. package/dist/layout/Stack.js +186 -79
  159. package/dist/layout/index.d.ts +1 -1
  160. package/dist/layout/index.js +9 -9
  161. package/dist/lazyLoad.cjs +13 -1
  162. package/dist/lazyLoad.d.ts.map +1 -1
  163. package/dist/lazyLoad.js +9 -9
  164. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +551 -1
  165. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +440 -234
  166. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +546 -1
  167. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +452 -236
  168. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +330 -1
  169. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +272 -164
  170. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +150 -1
  171. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +132 -1
  172. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +90 -74
  173. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +92 -67
  174. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +11 -1
  175. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +8 -7
  176. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +48 -1
  177. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +34 -31
  178. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +145 -1
  179. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.js +111 -73
  180. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs +38 -1
  181. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +19 -16
  182. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.cjs +126 -1
  183. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.js +103 -72
  184. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.cjs +134 -1
  185. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.js +113 -79
  186. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.cjs +541 -1
  187. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.js +459 -331
  188. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +39 -1
  189. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +26 -22
  190. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.cjs +304 -1
  191. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.js +234 -160
  192. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.cjs +108 -1
  193. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.js +82 -67
  194. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.cjs +19 -1
  195. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.js +12 -10
  196. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +275 -1
  197. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +228 -127
  198. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +53 -1
  199. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.js +40 -22
  200. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +215 -1
  201. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.js +171 -117
  202. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.cjs +219 -1
  203. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.js +178 -118
  204. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.cjs +22 -1
  205. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.js +17 -13
  206. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.cjs +802 -1
  207. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.js +648 -422
  208. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.cjs +410 -1
  209. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.js +313 -212
  210. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +741 -1
  211. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.js +602 -417
  212. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.cjs +246 -1
  213. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.js +195 -121
  214. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.cjs +27 -1
  215. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.js +20 -17
  216. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.cjs +148 -1
  217. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.js +115 -67
  218. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.cjs +55 -1
  219. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.js +27 -21
  220. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +223 -1
  221. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -131
  222. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.cjs +576 -1
  223. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.js +437 -308
  224. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.cjs +202 -1
  225. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.js +160 -125
  226. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.cjs +159 -1
  227. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.js +125 -93
  228. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +158 -1
  229. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.js +128 -98
  230. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.cjs +39 -1
  231. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.js +29 -24
  232. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +19 -1
  233. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -11
  234. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +109 -1
  235. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +91 -68
  236. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs +28 -1
  237. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.js +22 -17
  238. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +33 -1
  239. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +25 -19
  240. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +7 -1
  241. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
  242. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.cjs +25 -1
  243. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.js +18 -11
  244. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.cjs +47 -1
  245. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.js +38 -28
  246. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +38 -1
  247. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.js +19 -15
  248. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +106 -1
  249. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +95 -34
  250. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +5 -1
  251. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +3 -3
  252. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +6 -1
  253. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +4 -4
  254. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +423 -1
  255. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +237 -202
  256. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +45 -1
  257. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +35 -32
  258. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +42 -1
  259. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +37 -32
  260. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +20 -1
  261. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -5
  262. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +7 -1
  263. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +5 -5
  264. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +27 -1
  265. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +15 -12
  266. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +45 -1
  267. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +41 -4
  268. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +45 -1
  269. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +42 -4
  270. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +49 -1
  271. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +46 -8
  272. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +358 -1
  273. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +341 -45
  274. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +31 -1
  275. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +28 -7
  276. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +35 -1
  277. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +32 -8
  278. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +44 -1
  279. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +41 -11
  280. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +49 -1
  281. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +46 -8
  282. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +61 -1
  283. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +58 -12
  284. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +38 -1
  285. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +35 -3
  286. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +39 -1
  287. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +36 -5
  288. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +8 -1
  289. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +5 -5
  290. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +50 -1
  291. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +45 -11
  292. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +27 -1
  293. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +20 -14
  294. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +18 -1
  295. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +13 -12
  296. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +77 -1
  297. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +14 -5
  298. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +31 -1
  299. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +6 -6
  300. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +11 -1
  301. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +4 -3
  302. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +210 -1
  303. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +197 -188
  304. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +122 -1
  305. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +12 -12
  306. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +28 -1
  307. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +20 -12
  308. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +34 -1
  309. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +31 -5
  310. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +37 -1
  311. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +32 -5
  312. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +41 -1
  313. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +38 -7
  314. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +45 -1
  315. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +42 -6
  316. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +56 -1
  317. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +53 -8
  318. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +35 -1
  319. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +32 -5
  320. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +45 -1
  321. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +42 -4
  322. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +34 -1
  323. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +32 -21
  324. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +39 -1
  325. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +27 -20
  326. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1391 -1
  327. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1178 -803
  328. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +7 -1
  329. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +3 -4
  330. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.cjs +369 -2
  331. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.js +282 -238
  332. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.cjs +625 -1
  333. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.js +545 -276
  334. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.cjs +1033 -9
  335. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.js +898 -460
  336. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +47 -38
  337. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js +38 -64
  338. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +13 -1
  339. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +9 -2
  340. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.cjs +4 -1
  341. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +36 -1
  342. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -16
  343. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +15 -1
  344. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +10 -10
  345. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +167 -4
  346. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +144 -93
  347. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.cjs +63 -1
  348. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +45 -35
  349. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +14 -1
  350. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +11 -9
  351. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +84 -1
  352. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +75 -43
  353. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.cjs +3 -1
  354. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
  355. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +6 -1
  356. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
  357. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.cjs +1617 -1
  358. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +1332 -874
  359. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.cjs +18 -1
  360. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.js +15 -7
  361. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.cjs +26 -1
  362. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.js +20 -10
  363. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.cjs +4 -1
  364. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.cjs +40 -1
  365. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js +29 -16
  366. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +36 -1
  367. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +25 -14
  368. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +20 -1
  369. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +18 -3
  370. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +46 -1
  371. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +38 -19
  372. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.cjs +39 -1
  373. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +29 -11
  374. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.cjs +18 -1
  375. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.js +13 -12
  376. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.cjs +81 -1
  377. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.js +58 -45
  378. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.cjs +1252 -3
  379. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.js +1003 -648
  380. package/dist/theme/index.cjs +63 -1
  381. package/dist/theme/index.js +31 -31
  382. package/dist/theme/spacing.cjs +93 -1
  383. package/dist/theme/spacing.js +52 -26
  384. package/dist/theme/tokens.stylex.cjs +210 -1
  385. package/dist/theme/tokens.stylex.js +58 -26
  386. package/dist/theme/types.cjs +13 -1
  387. package/dist/theme/types.js +4 -3
  388. package/dist/theme/width.cjs +39 -1
  389. package/dist/theme/width.js +16 -4
  390. package/dist/theme/zIndex.cjs +62 -1
  391. package/dist/theme/zIndex.d.ts +4 -4
  392. package/dist/theme/zIndex.d.ts.map +1 -1
  393. package/dist/theme/zIndex.js +44 -15
  394. package/dist/theme.css +167 -9
  395. package/dist/ui/accordion.cjs +431 -1
  396. package/dist/ui/accordion.d.ts +10 -10
  397. package/dist/ui/accordion.d.ts.map +1 -1
  398. package/dist/ui/accordion.js +276 -136
  399. package/dist/ui/action-bar.cjs +274 -1
  400. package/dist/ui/action-bar.d.ts +11 -11
  401. package/dist/ui/action-bar.d.ts.map +1 -1
  402. package/dist/ui/action-bar.js +204 -98
  403. package/dist/ui/alert-dialog.cjs +538 -1
  404. package/dist/ui/alert-dialog.d.ts +19 -19
  405. package/dist/ui/alert-dialog.d.ts.map +1 -1
  406. package/dist/ui/alert-dialog.js +459 -167
  407. package/dist/ui/alert.cjs +163 -1
  408. package/dist/ui/alert.d.ts +7 -7
  409. package/dist/ui/alert.d.ts.map +1 -1
  410. package/dist/ui/alert.js +111 -50
  411. package/dist/ui/aspect-ratio.cjs +24 -1
  412. package/dist/ui/aspect-ratio.d.ts +2 -2
  413. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  414. package/dist/ui/aspect-ratio.js +22 -13
  415. package/dist/ui/avatar.cjs +340 -1
  416. package/dist/ui/avatar.d.ts +10 -10
  417. package/dist/ui/avatar.d.ts.map +1 -1
  418. package/dist/ui/avatar.js +226 -115
  419. package/dist/ui/badge-overflow.cjs +66 -1
  420. package/dist/ui/badge-overflow.d.ts +5 -5
  421. package/dist/ui/badge-overflow.d.ts.map +1 -1
  422. package/dist/ui/badge-overflow.js +34 -27
  423. package/dist/ui/badge.cjs +167 -1
  424. package/dist/ui/badge.d.ts +3 -3
  425. package/dist/ui/badge.d.ts.map +1 -1
  426. package/dist/ui/badge.js +48 -42
  427. package/dist/ui/breadcrumb.cjs +508 -1
  428. package/dist/ui/breadcrumb.d.ts +15 -15
  429. package/dist/ui/breadcrumb.d.ts.map +1 -1
  430. package/dist/ui/breadcrumb.js +386 -159
  431. package/dist/ui/button.cjs +425 -1
  432. package/dist/ui/button.d.ts +3 -3
  433. package/dist/ui/button.d.ts.map +1 -1
  434. package/dist/ui/button.js +137 -117
  435. package/dist/ui/calendar.cjs +625 -1
  436. package/dist/ui/calendar.d.ts +5 -5
  437. package/dist/ui/calendar.d.ts.map +1 -1
  438. package/dist/ui/calendar.js +309 -193
  439. package/dist/ui/card.cjs +401 -1
  440. package/dist/ui/card.d.ts +15 -15
  441. package/dist/ui/card.d.ts.map +1 -1
  442. package/dist/ui/card.js +300 -119
  443. package/dist/ui/carousel.cjs +332 -1
  444. package/dist/ui/carousel.d.ts +10 -10
  445. package/dist/ui/carousel.d.ts.map +1 -1
  446. package/dist/ui/carousel.js +245 -127
  447. package/dist/ui/checkbox.cjs +163 -1
  448. package/dist/ui/checkbox.d.ts +4 -4
  449. package/dist/ui/checkbox.d.ts.map +1 -1
  450. package/dist/ui/checkbox.js +62 -58
  451. package/dist/ui/circular-progress.cjs +144 -1
  452. package/dist/ui/circular-progress.d.ts +5 -5
  453. package/dist/ui/circular-progress.d.ts.map +1 -1
  454. package/dist/ui/circular-progress.js +85 -67
  455. package/dist/ui/code-block.cjs +823 -0
  456. package/dist/ui/code-block.d.ts +89 -0
  457. package/dist/ui/code-block.d.ts.map +1 -0
  458. package/dist/ui/code-block.js +813 -0
  459. package/dist/ui/collapsible.cjs +64 -1
  460. package/dist/ui/collapsible.d.ts +4 -4
  461. package/dist/ui/collapsible.d.ts.map +1 -1
  462. package/dist/ui/collapsible.js +58 -29
  463. package/dist/ui/command.cjs +556 -1
  464. package/dist/ui/command.d.ts +19 -19
  465. package/dist/ui/command.d.ts.map +1 -1
  466. package/dist/ui/command.js +432 -163
  467. package/dist/ui/compare-slider.cjs +169 -1
  468. package/dist/ui/compare-slider.d.ts +8 -7
  469. package/dist/ui/compare-slider.d.ts.map +1 -1
  470. package/dist/ui/compare-slider.js +106 -73
  471. package/dist/ui/context-menu.cjs +810 -1
  472. package/dist/ui/context-menu.d.ts +26 -26
  473. package/dist/ui/context-menu.d.ts.map +1 -1
  474. package/dist/ui/context-menu.js +693 -229
  475. package/dist/ui/copy-button.cjs +93 -1
  476. package/dist/ui/copy-button.d.ts +1 -2
  477. package/dist/ui/copy-button.d.ts.map +1 -1
  478. package/dist/ui/copy-button.js +56 -45
  479. package/dist/ui/dialog.cjs +411 -1
  480. package/dist/ui/dialog.d.ts +18 -18
  481. package/dist/ui/dialog.d.ts.map +1 -1
  482. package/dist/ui/dialog.js +319 -131
  483. package/dist/ui/drawer.cjs +478 -1
  484. package/dist/ui/drawer.d.ts +17 -17
  485. package/dist/ui/drawer.d.ts.map +1 -1
  486. package/dist/ui/drawer.js +396 -151
  487. package/dist/ui/dropdown-menu.cjs +638 -1
  488. package/dist/ui/dropdown-menu.d.ts +26 -26
  489. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  490. package/dist/ui/dropdown-menu.js +511 -208
  491. package/dist/ui/editable.cjs +609 -1
  492. package/dist/ui/editable.d.ts +14 -14
  493. package/dist/ui/editable.d.ts.map +1 -1
  494. package/dist/ui/editable.js +479 -218
  495. package/dist/ui/empty.cjs +295 -1
  496. package/dist/ui/empty.d.ts +15 -15
  497. package/dist/ui/empty.d.ts.map +1 -1
  498. package/dist/ui/empty.js +267 -112
  499. package/dist/ui/field.cjs +621 -1
  500. package/dist/ui/field.d.ts +21 -21
  501. package/dist/ui/field.d.ts.map +1 -1
  502. package/dist/ui/field.js +468 -198
  503. package/dist/ui/file-upload-adapters.cjs +289 -1
  504. package/dist/ui/file-upload-adapters.d.ts +1 -2
  505. package/dist/ui/file-upload-adapters.d.ts.map +1 -1
  506. package/dist/ui/file-upload-adapters.js +244 -170
  507. package/dist/ui/file-upload.cjs +1480 -1
  508. package/dist/ui/file-upload.d.ts +22 -22
  509. package/dist/ui/file-upload.d.ts.map +1 -1
  510. package/dist/ui/file-upload.js +1064 -599
  511. package/dist/ui/flex.cjs +202 -1
  512. package/dist/ui/flex.d.ts +7 -6
  513. package/dist/ui/flex.d.ts.map +1 -1
  514. package/dist/ui/flex.js +111 -93
  515. package/dist/ui/form.cjs +453 -1
  516. package/dist/ui/form.d.ts +11 -11
  517. package/dist/ui/form.d.ts.map +1 -1
  518. package/dist/ui/form.js +421 -136
  519. package/dist/ui/gauge.cjs +125 -1
  520. package/dist/ui/gauge.d.ts +7 -6
  521. package/dist/ui/gauge.d.ts.map +1 -1
  522. package/dist/ui/gauge.js +60 -53
  523. package/dist/ui/grid.cjs +224 -1
  524. package/dist/ui/grid.d.ts +11 -7
  525. package/dist/ui/grid.d.ts.map +1 -1
  526. package/dist/ui/grid.js +126 -96
  527. package/dist/ui/hover-card.cjs +85 -1
  528. package/dist/ui/hover-card.d.ts +6 -6
  529. package/dist/ui/hover-card.d.ts.map +1 -1
  530. package/dist/ui/hover-card.js +57 -37
  531. package/dist/ui/index.d.ts +4 -0
  532. package/dist/ui/index.d.ts.map +1 -1
  533. package/dist/ui/input-group.cjs +322 -1
  534. package/dist/ui/input-group.d.ts +12 -12
  535. package/dist/ui/input-group.d.ts.map +1 -1
  536. package/dist/ui/input-group.js +203 -107
  537. package/dist/ui/input-otp.cjs +312 -1
  538. package/dist/ui/input-otp.d.ts +10 -10
  539. package/dist/ui/input-otp.d.ts.map +1 -1
  540. package/dist/ui/input-otp.js +217 -94
  541. package/dist/ui/input.cjs +388 -1
  542. package/dist/ui/input.d.ts +3 -3
  543. package/dist/ui/input.d.ts.map +1 -1
  544. package/dist/ui/input.js +137 -119
  545. package/dist/ui/item.cjs +585 -1
  546. package/dist/ui/item.d.ts +20 -20
  547. package/dist/ui/item.d.ts.map +1 -1
  548. package/dist/ui/item.js +460 -162
  549. package/dist/ui/kbd.cjs +115 -1
  550. package/dist/ui/kbd.d.ts +5 -5
  551. package/dist/ui/kbd.d.ts.map +1 -1
  552. package/dist/ui/kbd.js +42 -37
  553. package/dist/ui/label.cjs +67 -1
  554. package/dist/ui/label.d.ts +4 -4
  555. package/dist/ui/label.d.ts.map +1 -1
  556. package/dist/ui/label.js +51 -21
  557. package/dist/ui/marker.cjs +297 -0
  558. package/dist/ui/marker.d.ts +25 -0
  559. package/dist/ui/marker.d.ts.map +1 -0
  560. package/dist/ui/marker.js +293 -0
  561. package/dist/ui/masonry.cjs +56 -1
  562. package/dist/ui/masonry.d.ts +4 -4
  563. package/dist/ui/masonry.d.ts.map +1 -1
  564. package/dist/ui/masonry.js +40 -37
  565. package/dist/ui/menubar.cjs +907 -1
  566. package/dist/ui/menubar.d.ts +29 -29
  567. package/dist/ui/menubar.d.ts.map +1 -1
  568. package/dist/ui/menubar.js +737 -252
  569. package/dist/ui/navigation-menu.cjs +560 -1
  570. package/dist/ui/navigation-menu.d.ts +18 -18
  571. package/dist/ui/navigation-menu.d.ts.map +1 -1
  572. package/dist/ui/navigation-menu.js +442 -148
  573. package/dist/ui/pagination.cjs +575 -1
  574. package/dist/ui/pagination.d.ts +13 -13
  575. package/dist/ui/pagination.d.ts.map +1 -1
  576. package/dist/ui/pagination.js +422 -172
  577. package/dist/ui/popover.cjs +93 -1
  578. package/dist/ui/popover.d.ts +7 -7
  579. package/dist/ui/popover.d.ts.map +1 -1
  580. package/dist/ui/popover.js +61 -42
  581. package/dist/ui/progress.cjs +34 -1
  582. package/dist/ui/progress.d.ts +3 -3
  583. package/dist/ui/progress.d.ts.map +1 -1
  584. package/dist/ui/progress.js +21 -18
  585. package/dist/ui/questionnaire.cjs +682 -0
  586. package/dist/ui/questionnaire.d.ts +111 -0
  587. package/dist/ui/questionnaire.d.ts.map +1 -0
  588. package/dist/ui/questionnaire.js +670 -0
  589. package/dist/ui/radio-group.cjs +221 -1
  590. package/dist/ui/radio-group.d.ts +6 -6
  591. package/dist/ui/radio-group.d.ts.map +1 -1
  592. package/dist/ui/radio-group.js +125 -74
  593. package/dist/ui/rating.cjs +190 -1
  594. package/dist/ui/rating.d.ts +4 -3
  595. package/dist/ui/rating.d.ts.map +1 -1
  596. package/dist/ui/rating.js +96 -79
  597. package/dist/ui/resizable.cjs +174 -1
  598. package/dist/ui/resizable.d.ts +7 -7
  599. package/dist/ui/resizable.d.ts.map +1 -1
  600. package/dist/ui/resizable.js +150 -55
  601. package/dist/ui/responsive-dialog.cjs +400 -1
  602. package/dist/ui/responsive-dialog.d.ts +17 -17
  603. package/dist/ui/responsive-dialog.d.ts.map +1 -1
  604. package/dist/ui/responsive-dialog.js +372 -155
  605. package/dist/ui/row-col.cjs +508 -1
  606. package/dist/ui/row-col.d.ts +13 -11
  607. package/dist/ui/row-col.d.ts.map +1 -1
  608. package/dist/ui/row-col.js +238 -207
  609. package/dist/ui/scroll-area.cjs +129 -1
  610. package/dist/ui/scroll-area.d.ts +6 -6
  611. package/dist/ui/scroll-area.d.ts.map +1 -1
  612. package/dist/ui/scroll-area.js +92 -49
  613. package/dist/ui/segmented.cjs +169 -1
  614. package/dist/ui/segmented.d.ts +6 -5
  615. package/dist/ui/segmented.d.ts.map +1 -1
  616. package/dist/ui/segmented.js +75 -63
  617. package/dist/ui/select.cjs +484 -1
  618. package/dist/ui/select.d.ts +17 -17
  619. package/dist/ui/select.d.ts.map +1 -1
  620. package/dist/ui/select.js +353 -160
  621. package/dist/ui/separator.cjs +44 -1
  622. package/dist/ui/separator.d.ts +4 -4
  623. package/dist/ui/separator.d.ts.map +1 -1
  624. package/dist/ui/separator.js +17 -17
  625. package/dist/ui/sheet.cjs +462 -1
  626. package/dist/ui/sheet.d.ts +16 -16
  627. package/dist/ui/sheet.d.ts.map +1 -1
  628. package/dist/ui/sheet.js +331 -141
  629. package/dist/ui/sidebar.cjs +1452 -1
  630. package/dist/ui/sidebar.d.ts +48 -48
  631. package/dist/ui/sidebar.d.ts.map +1 -1
  632. package/dist/ui/sidebar.js +1057 -439
  633. package/dist/ui/signature-pad.cjs +741 -0
  634. package/dist/ui/signature-pad.d.ts +115 -0
  635. package/dist/ui/signature-pad.d.ts.map +1 -0
  636. package/dist/ui/signature-pad.js +731 -0
  637. package/dist/ui/skeleton.cjs +62 -1
  638. package/dist/ui/skeleton.d.ts +3 -3
  639. package/dist/ui/skeleton.d.ts.map +1 -1
  640. package/dist/ui/skeleton.js +50 -20
  641. package/dist/ui/slider.cjs +47 -1
  642. package/dist/ui/slider.d.ts +4 -4
  643. package/dist/ui/slider.d.ts.map +1 -1
  644. package/dist/ui/slider.js +27 -26
  645. package/dist/ui/sonner.cjs +28 -1
  646. package/dist/ui/sonner.js +24 -22
  647. package/dist/ui/spinner.cjs +73 -1
  648. package/dist/ui/spinner.d.ts +3 -3
  649. package/dist/ui/spinner.d.ts.map +1 -1
  650. package/dist/ui/spinner.js +29 -28
  651. package/dist/ui/stat.cjs +320 -1
  652. package/dist/ui/stat.d.ts +15 -15
  653. package/dist/ui/stat.d.ts.map +1 -1
  654. package/dist/ui/stat.js +275 -148
  655. package/dist/ui/stepper.cjs +785 -1
  656. package/dist/ui/stepper.d.ts +24 -24
  657. package/dist/ui/stepper.d.ts.map +1 -1
  658. package/dist/ui/stepper.js +594 -281
  659. package/dist/ui/switch.cjs +199 -1
  660. package/dist/ui/switch.d.ts +4 -4
  661. package/dist/ui/switch.d.ts.map +1 -1
  662. package/dist/ui/switch.js +79 -72
  663. package/dist/ui/table.cjs +435 -1
  664. package/dist/ui/table.d.ts +17 -17
  665. package/dist/ui/table.d.ts.map +1 -1
  666. package/dist/ui/table.js +369 -129
  667. package/dist/ui/tabs.cjs +340 -1
  668. package/dist/ui/tabs.d.ts +10 -10
  669. package/dist/ui/tabs.d.ts.map +1 -1
  670. package/dist/ui/tabs.js +204 -95
  671. package/dist/ui/tags-input.cjs +585 -1
  672. package/dist/ui/tags-input.d.ts +13 -13
  673. package/dist/ui/tags-input.d.ts.map +1 -1
  674. package/dist/ui/tags-input.js +446 -221
  675. package/dist/ui/textarea.cjs +119 -1
  676. package/dist/ui/textarea.d.ts +3 -3
  677. package/dist/ui/textarea.d.ts.map +1 -1
  678. package/dist/ui/textarea.js +37 -33
  679. package/dist/ui/timeline.cjs +583 -1
  680. package/dist/ui/timeline.d.ts +22 -22
  681. package/dist/ui/timeline.d.ts.map +1 -1
  682. package/dist/ui/timeline.js +409 -198
  683. package/dist/ui/toggle-group.cjs +128 -1
  684. package/dist/ui/toggle-group.d.ts +7 -7
  685. package/dist/ui/toggle-group.d.ts.map +1 -1
  686. package/dist/ui/toggle-group.js +92 -41
  687. package/dist/ui/toggle.cjs +145 -1
  688. package/dist/ui/toggle.d.ts +4 -4
  689. package/dist/ui/toggle.d.ts.map +1 -1
  690. package/dist/ui/toggle.js +38 -34
  691. package/dist/ui/tooltip.cjs +81 -1
  692. package/dist/ui/tooltip.d.ts +7 -7
  693. package/dist/ui/tooltip.d.ts.map +1 -1
  694. package/dist/ui/tooltip.js +50 -37
  695. package/dist/ui/useBreakpoint.cjs +91 -1
  696. package/dist/ui/useBreakpoint.js +66 -43
  697. package/dist/utils.cjs +4 -1
  698. package/dist/utils.d.ts +2 -12
  699. package/dist/utils.d.ts.map +1 -1
  700. package/dist/utils.js +3 -6
  701. package/package.json +10 -2
@@ -1,147 +1,236 @@
1
- import e, { useEffect as t, useLayoutEffect as n, useMemo as r, useRef as i, useState as a } from "react";
1
+ import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
2
2
  // ../../node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.js
3
- function o(e, t) {
4
- var n = {};
5
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
6
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
7
- return n;
8
- }
9
- var s;
10
- (function(e) {
11
- e.event = "event", e.props = "prop";
12
- })(s ||= {});
13
- function c() {}
14
- function l(e) {
15
- var t, n = void 0;
3
+ /**
4
+ * react-number-format - 5.4.5
5
+ * Author : Sudhanshu Yadav
6
+ * Copyright (c) 2016, 2026 to Sudhanshu Yadav, released under the MIT license.
7
+ * https://github.com/s-yadav/react-number-format
8
+ */
9
+ /******************************************************************************
10
+ Copyright (c) Microsoft Corporation.
11
+
12
+ Permission to use, copy, modify, and/or distribute this software for any
13
+ purpose with or without fee is hereby granted.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
16
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
17
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
18
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
+ PERFORMANCE OF THIS SOFTWARE.
22
+ ***************************************************************************** */
23
+ function __rest(s, e) {
24
+ var t = {};
25
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
26
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") {
27
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
+ }
29
+ return t;
30
+ }
31
+ var SourceType;
32
+ (function(SourceType) {
33
+ SourceType["event"] = "event";
34
+ SourceType["props"] = "prop";
35
+ })(SourceType || (SourceType = {}));
36
+ function noop() {}
37
+ function memoizeOnce(cb) {
38
+ var lastArgs;
39
+ var lastValue = void 0;
16
40
  return function() {
17
- for (var r = [], i = arguments.length; i--;) r[i] = arguments[i];
18
- return t && r.length === t.length && r.every(function(e, n) {
19
- return e === t[n];
20
- }) || (t = r, n = e.apply(void 0, r)), n;
41
+ var args = [], len = arguments.length;
42
+ while (len--) args[len] = arguments[len];
43
+ if (lastArgs && args.length === lastArgs.length && args.every(function(value, index) {
44
+ return value === lastArgs[index];
45
+ })) return lastValue;
46
+ lastArgs = args;
47
+ lastValue = cb.apply(void 0, args);
48
+ return lastValue;
21
49
  };
22
50
  }
23
- function u(e) {
24
- return !!(e || "").match(/\d/);
51
+ function charIsNumber(char) {
52
+ return !!(char || "").match(/\d/);
25
53
  }
26
- function d(e) {
27
- return e == null;
54
+ function isNil(val) {
55
+ return val === null || val === void 0;
28
56
  }
29
- function f(e) {
30
- return typeof e == "number" && isNaN(e);
57
+ function isNanValue(val) {
58
+ return typeof val === "number" && isNaN(val);
31
59
  }
32
- function p(e) {
33
- return d(e) || f(e) || typeof e == "number" && !isFinite(e);
60
+ function isNotValidValue(val) {
61
+ return isNil(val) || isNanValue(val) || typeof val === "number" && !isFinite(val);
34
62
  }
35
- function m(e) {
36
- return e.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
63
+ function escapeRegExp(str) {
64
+ return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
37
65
  }
38
- function h(e) {
39
- switch (e) {
66
+ function getThousandsGroupRegex(thousandsGroupStyle) {
67
+ switch (thousandsGroupStyle) {
40
68
  case "lakh": return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
41
69
  case "wan": return /(\d)(?=(\d{4})+(?!\d))/g;
42
70
  default: return /(\d)(?=(\d{3})+(?!\d))/g;
43
71
  }
44
72
  }
45
- function g(e, t, n) {
46
- var r = h(n), i = e.search(/[1-9]/);
47
- return i = i === -1 ? e.length : i, e.substring(0, i) + e.substring(i, e.length).replace(r, "$1" + t);
73
+ function applyThousandSeparator(str, thousandSeparator, thousandsGroupStyle) {
74
+ var thousandsGroupRegex = getThousandsGroupRegex(thousandsGroupStyle);
75
+ var index = str.search(/[1-9]/);
76
+ index = index === -1 ? str.length : index;
77
+ return str.substring(0, index) + str.substring(index, str.length).replace(thousandsGroupRegex, "$1" + thousandSeparator);
48
78
  }
49
- function _(e) {
50
- var t = i(e);
51
- return t.current = e, i(function() {
52
- for (var e = [], n = arguments.length; n--;) e[n] = arguments[n];
53
- return t.current.apply(t, e);
79
+ function usePersistentCallback(cb) {
80
+ var callbackRef = useRef(cb);
81
+ callbackRef.current = cb;
82
+ return useRef(function() {
83
+ var args = [], len = arguments.length;
84
+ while (len--) args[len] = arguments[len];
85
+ return callbackRef.current.apply(callbackRef, args);
54
86
  }).current;
55
87
  }
56
- function v(e, t) {
57
- t === void 0 && (t = !0);
58
- var n = e[0] === "-", r = n && t;
59
- e = e.replace("-", "");
60
- var i = e.split(".");
88
+ function splitDecimal(numStr, allowNegative) {
89
+ if (allowNegative === void 0) allowNegative = true;
90
+ var hasNegation = numStr[0] === "-";
91
+ var addNegation = hasNegation && allowNegative;
92
+ numStr = numStr.replace("-", "");
93
+ var parts = numStr.split(".");
61
94
  return {
62
- beforeDecimal: i[0],
63
- afterDecimal: i[1] || "",
64
- hasNegation: n,
65
- addNegation: r
95
+ beforeDecimal: parts[0],
96
+ afterDecimal: parts[1] || "",
97
+ hasNegation,
98
+ addNegation
66
99
  };
67
100
  }
68
- function y(e) {
69
- if (!e) return e;
70
- var t = e[0] === "-";
71
- t && (e = e.substring(1, e.length));
72
- var n = e.split("."), r = n[0].replace(/^0+/, "") || "0", i = n[1] || "";
73
- return (t ? "-" : "") + r + (i ? "." + i : "");
74
- }
75
- function b(e, t, n) {
76
- for (var r = "", i = n ? "0" : "", a = 0; a <= t - 1; a++) r += e[a] || i;
77
- return r;
78
- }
79
- function x(e, t) {
80
- return Array(t + 1).join(e);
81
- }
82
- function S(e) {
83
- var t = e + "", n = t[0] === "-" ? "-" : "";
84
- n && (t = t.substring(1));
85
- var r = t.split(/[eE]/g), i = r[0], a = r[1];
86
- if (a = Number(a), !a) return n + i;
87
- i = i.replace(".", "");
88
- var o = 1 + a, s = i.length;
89
- return o < 0 ? i = "0." + x("0", Math.abs(o)) + i : o >= s ? i += x("0", o - s) : i = (i.substring(0, o) || "0") + "." + i.substring(o), n + i;
90
- }
91
- function C(e, t, n) {
92
- if (["", "-"].indexOf(e) !== -1) return e;
93
- var r = (e.indexOf(".") !== -1 || n) && t, i = v(e), a = i.beforeDecimal, o = i.afterDecimal, s = i.hasNegation, c = parseFloat("0." + (o || "0")), l = (o.length <= t ? "0." + o : c.toFixed(t)).split("."), u = a;
94
- a && Number(l[0]) && (u = a.split("").reverse().reduce(function(e, t, n) {
95
- return e.length > n ? (Number(e[0]) + Number(t)).toString() + e.substring(1, e.length) : t + e;
96
- }, l[0]));
97
- var d = b(l[1] || "", t, n), f = s ? "-" : "", p = r ? "." : "";
98
- return "" + f + u + p + d;
99
- }
100
- function w(e, t) {
101
- if (e.value = e.value, e !== null) {
102
- if (e.createTextRange) {
103
- var n = e.createTextRange();
104
- return n.move("character", t), n.select(), !0;
101
+ function fixLeadingZero(numStr) {
102
+ if (!numStr) return numStr;
103
+ var isNegative = numStr[0] === "-";
104
+ if (isNegative) numStr = numStr.substring(1, numStr.length);
105
+ var parts = numStr.split(".");
106
+ var beforeDecimal = parts[0].replace(/^0+/, "") || "0";
107
+ var afterDecimal = parts[1] || "";
108
+ return (isNegative ? "-" : "") + beforeDecimal + (afterDecimal ? "." + afterDecimal : "");
109
+ }
110
+ /**
111
+ * limit decimal numbers to given scale
112
+ * Not used .fixedTo because that will break with big numbers
113
+ */
114
+ function limitToScale(numStr, scale, fixedDecimalScale) {
115
+ var str = "";
116
+ var filler = fixedDecimalScale ? "0" : "";
117
+ for (var i = 0; i <= scale - 1; i++) str += numStr[i] || filler;
118
+ return str;
119
+ }
120
+ function repeat(str, count) {
121
+ return Array(count + 1).join(str);
122
+ }
123
+ function toNumericString(num) {
124
+ var _num = num + "";
125
+ var sign = _num[0] === "-" ? "-" : "";
126
+ if (sign) _num = _num.substring(1);
127
+ var ref = _num.split(/[eE]/g);
128
+ var coefficient = ref[0];
129
+ var exponent = ref[1];
130
+ exponent = Number(exponent);
131
+ if (!exponent) return sign + coefficient;
132
+ coefficient = coefficient.replace(".", "");
133
+ /**
134
+ * for scientific notation the current decimal index will be after first number (index 0)
135
+ * So effective decimal index will always be 1 + exponent value
136
+ */
137
+ var decimalIndex = 1 + exponent;
138
+ var coffiecientLn = coefficient.length;
139
+ if (decimalIndex < 0) coefficient = "0." + repeat("0", Math.abs(decimalIndex)) + coefficient;
140
+ else if (decimalIndex >= coffiecientLn) coefficient = coefficient + repeat("0", decimalIndex - coffiecientLn);
141
+ else coefficient = (coefficient.substring(0, decimalIndex) || "0") + "." + coefficient.substring(decimalIndex);
142
+ return sign + coefficient;
143
+ }
144
+ /**
145
+ * This method is required to round prop value to given scale.
146
+ * Not used .round or .fixedTo because that will break with big numbers
147
+ */
148
+ function roundToPrecision(numStr, scale, fixedDecimalScale) {
149
+ if (["", "-"].indexOf(numStr) !== -1) return numStr;
150
+ var shouldHaveDecimalSeparator = (numStr.indexOf(".") !== -1 || fixedDecimalScale) && scale;
151
+ var ref = splitDecimal(numStr);
152
+ var beforeDecimal = ref.beforeDecimal;
153
+ var afterDecimal = ref.afterDecimal;
154
+ var hasNegation = ref.hasNegation;
155
+ var floatValue = parseFloat("0." + (afterDecimal || "0"));
156
+ var roundedDecimalParts = (afterDecimal.length <= scale ? "0." + afterDecimal : floatValue.toFixed(scale)).split(".");
157
+ var intPart = beforeDecimal;
158
+ if (beforeDecimal && Number(roundedDecimalParts[0])) intPart = beforeDecimal.split("").reverse().reduce(function(roundedStr, current, idx) {
159
+ if (roundedStr.length > idx) return (Number(roundedStr[0]) + Number(current)).toString() + roundedStr.substring(1, roundedStr.length);
160
+ return current + roundedStr;
161
+ }, roundedDecimalParts[0]);
162
+ var decimalPart = limitToScale(roundedDecimalParts[1] || "", scale, fixedDecimalScale);
163
+ var negation = hasNegation ? "-" : "";
164
+ var decimalSeparator = shouldHaveDecimalSeparator ? "." : "";
165
+ return "" + negation + intPart + decimalSeparator + decimalPart;
166
+ }
167
+ /** set the caret positon in an input field **/
168
+ function setCaretPosition(el, caretPos) {
169
+ el.value = el.value;
170
+ if (el !== null) {
171
+ if (el.createTextRange) {
172
+ var range = el.createTextRange();
173
+ range.move("character", caretPos);
174
+ range.select();
175
+ return true;
105
176
  }
106
- return e.selectionStart || e.selectionStart === 0 ? (e.focus(), e.setSelectionRange(t, t), !0) : (e.focus(), !1);
177
+ if (el.selectionStart || el.selectionStart === 0) {
178
+ el.focus();
179
+ el.setSelectionRange(caretPos, caretPos);
180
+ return true;
181
+ }
182
+ el.focus();
183
+ return false;
107
184
  }
108
185
  }
109
- var T = l(function(e, t) {
110
- for (var n = 0, r = 0, i = e.length, a = t.length; e[n] === t[n] && n < i;) n++;
111
- for (; e[i - 1 - r] === t[a - 1 - r] && a - r > n && i - r > n;) r++;
186
+ /**
187
+ * TODO: remove dependency of findChangeRange, findChangedRangeFromCaretPositions is better way to find what is changed
188
+ * currently this is mostly required by test and isCharacterSame util
189
+ * Given previous value and newValue it returns the index
190
+ * start - end to which values have changed.
191
+ * This function makes assumption about only consecutive
192
+ * characters are changed which is correct assumption for caret input.
193
+ */
194
+ var findChangeRange = memoizeOnce(function(prevValue, newValue) {
195
+ var i = 0, j = 0;
196
+ var prevLength = prevValue.length;
197
+ var newLength = newValue.length;
198
+ while (prevValue[i] === newValue[i] && i < prevLength) i++;
199
+ while (prevValue[prevLength - 1 - j] === newValue[newLength - 1 - j] && newLength - j > i && prevLength - j > i) j++;
112
200
  return {
113
201
  from: {
114
- start: n,
115
- end: i - r
202
+ start: i,
203
+ end: prevLength - j
116
204
  },
117
205
  to: {
118
- start: n,
119
- end: a - r
206
+ start: i,
207
+ end: newLength - j
120
208
  }
121
209
  };
122
- }), E = function(e, t) {
123
- var n = Math.min(e.selectionStart, t);
210
+ });
211
+ var findChangedRangeFromCaretPositions = function(lastCaretPositions, currentCaretPosition) {
212
+ var startPosition = Math.min(lastCaretPositions.selectionStart, currentCaretPosition);
124
213
  return {
125
214
  from: {
126
- start: n,
127
- end: e.selectionEnd
215
+ start: startPosition,
216
+ end: lastCaretPositions.selectionEnd
128
217
  },
129
218
  to: {
130
- start: n,
131
- end: t
219
+ start: startPosition,
220
+ end: currentCaretPosition
132
221
  }
133
222
  };
134
223
  };
135
- function D(e, t, n) {
136
- return Math.min(Math.max(e, t), n);
224
+ function clamp(num, min, max) {
225
+ return Math.min(Math.max(num, min), max);
137
226
  }
138
- function O(e) {
139
- return Math.max(e.selectionStart, e.selectionEnd);
227
+ function geInputCaretPosition(el) {
228
+ return Math.max(el.selectionStart, el.selectionEnd);
140
229
  }
141
- function k() {
142
- return typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
230
+ function addInputMode() {
231
+ return typeof navigator !== "undefined" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
143
232
  }
144
- function A(e) {
233
+ function getDefaultChangeMeta(value) {
145
234
  return {
146
235
  from: {
147
236
  start: 0,
@@ -149,121 +238,194 @@ function A(e) {
149
238
  },
150
239
  to: {
151
240
  start: 0,
152
- end: e.length
241
+ end: value.length
153
242
  },
154
243
  lastValue: ""
155
244
  };
156
245
  }
157
- function j(e) {
158
- var t = e.currentValue, n = e.formattedValue, r = e.currentValueIndex, i = e.formattedValueIndex;
159
- return t[r] === n[i];
160
- }
161
- function M(e, t, n, r, i, a, o) {
162
- o === void 0 && (o = j);
163
- var s = i.findIndex(function(e) {
164
- return e;
165
- }), c = e.slice(0, s);
166
- !t && !n.startsWith(c) && (t = c, n = c + n, r += c.length);
167
- for (var l = n.length, u = e.length, d = {}, f = Array(l), p = 0; p < l; p++) {
168
- f[p] = -1;
169
- for (var m = 0, h = u; m < h; m++) if (o({
170
- currentValue: n,
171
- lastValue: t,
172
- formattedValue: e,
173
- currentValueIndex: p,
174
- formattedValueIndex: m
175
- }) && d[m] !== !0) {
176
- f[p] = m, d[m] = !0;
246
+ function defaultIsCharacterSame(ref) {
247
+ var currentValue = ref.currentValue;
248
+ var formattedValue = ref.formattedValue;
249
+ var currentValueIndex = ref.currentValueIndex;
250
+ var formattedValueIndex = ref.formattedValueIndex;
251
+ return currentValue[currentValueIndex] === formattedValue[formattedValueIndex];
252
+ }
253
+ function getCaretPosition(newFormattedValue, lastFormattedValue, curValue, curCaretPos, boundary, isValidInputCharacter, isCharacterSame) {
254
+ if (isCharacterSame === void 0) isCharacterSame = defaultIsCharacterSame;
255
+ /**
256
+ * if something got inserted on empty value, add the formatted character before the current value,
257
+ * This is to avoid the case where typed character is present on format characters
258
+ */
259
+ var firstAllowedPosition = boundary.findIndex(function(b) {
260
+ return b;
261
+ });
262
+ var prefixFormat = newFormattedValue.slice(0, firstAllowedPosition);
263
+ if (!lastFormattedValue && !curValue.startsWith(prefixFormat)) {
264
+ lastFormattedValue = prefixFormat;
265
+ curValue = prefixFormat + curValue;
266
+ curCaretPos = curCaretPos + prefixFormat.length;
267
+ }
268
+ var curValLn = curValue.length;
269
+ var formattedValueLn = newFormattedValue.length;
270
+ var addedIndexMap = {};
271
+ var indexMap = new Array(curValLn);
272
+ for (var i = 0; i < curValLn; i++) {
273
+ indexMap[i] = -1;
274
+ for (var j = 0, jLn = formattedValueLn; j < jLn; j++) if (isCharacterSame({
275
+ currentValue: curValue,
276
+ lastValue: lastFormattedValue,
277
+ formattedValue: newFormattedValue,
278
+ currentValueIndex: i,
279
+ formattedValueIndex: j
280
+ }) && addedIndexMap[j] !== true) {
281
+ indexMap[i] = j;
282
+ addedIndexMap[j] = true;
177
283
  break;
178
284
  }
179
285
  }
180
- for (var g = r; g < l && (f[g] === -1 || !a(n[g]));) g++;
181
- var _ = g === l || f[g] === -1 ? u : f[g];
182
- for (g = r - 1; g > 0 && f[g] === -1;) g--;
183
- var v = g === -1 || f[g] === -1 ? 0 : f[g] + 1;
184
- return v > _ ? _ : r - v < _ - r ? v : _;
185
- }
186
- function N(e, t, n, r) {
187
- var i = e.length;
188
- if (t = D(t, 0, i), r === "left") {
189
- for (; t >= 0 && !n[t];) t--;
190
- t === -1 && (t = n.indexOf(!0));
286
+ /**
287
+ * For current caret position find closest characters (left and right side)
288
+ * which are properly mapped to formatted value.
289
+ * The idea is that the new caret position will exist always in the boundary of
290
+ * that mapped index
291
+ */
292
+ var pos = curCaretPos;
293
+ while (pos < curValLn && (indexMap[pos] === -1 || !isValidInputCharacter(curValue[pos]))) pos++;
294
+ var endIndex = pos === curValLn || indexMap[pos] === -1 ? formattedValueLn : indexMap[pos];
295
+ pos = curCaretPos - 1;
296
+ while (pos > 0 && indexMap[pos] === -1) pos--;
297
+ var startIndex = pos === -1 || indexMap[pos] === -1 ? 0 : indexMap[pos] + 1;
298
+ /**
299
+ * case where a char is added on suffix and removed from middle, example 2sq345 becoming $2,345 sq
300
+ * there is still a mapping but the order of start index and end index is changed
301
+ */
302
+ if (startIndex > endIndex) return endIndex;
303
+ /**
304
+ * given the current caret position if it closer to startIndex
305
+ * keep the new caret position on start index or keep it closer to endIndex
306
+ */
307
+ return curCaretPos - startIndex < endIndex - curCaretPos ? startIndex : endIndex;
308
+ }
309
+ function getCaretPosInBoundary(value, caretPos, boundary, direction) {
310
+ var valLn = value.length;
311
+ caretPos = clamp(caretPos, 0, valLn);
312
+ if (direction === "left") {
313
+ while (caretPos >= 0 && !boundary[caretPos]) caretPos--;
314
+ if (caretPos === -1) caretPos = boundary.indexOf(true);
191
315
  } else {
192
- for (; t <= i && !n[t];) t++;
193
- t > i && (t = n.lastIndexOf(!0));
316
+ while (caretPos <= valLn && !boundary[caretPos]) caretPos++;
317
+ if (caretPos > valLn) caretPos = boundary.lastIndexOf(true);
194
318
  }
195
- return t === -1 && (t = i), t;
319
+ if (caretPos === -1) caretPos = valLn;
320
+ return caretPos;
196
321
  }
197
- function P(e) {
198
- for (var t = Array.from({ length: e.length + 1 }).map(function() {
199
- return !0;
200
- }), n = 0, r = t.length; n < r; n++) t[n] = !!(u(e[n]) || u(e[n - 1]));
201
- return t;
322
+ function caretUnknownFormatBoundary(formattedValue) {
323
+ var boundaryAry = Array.from({ length: formattedValue.length + 1 }).map(function() {
324
+ return true;
325
+ });
326
+ for (var i = 0, ln = boundaryAry.length; i < ln; i++) boundaryAry[i] = Boolean(charIsNumber(formattedValue[i]) || charIsNumber(formattedValue[i - 1]));
327
+ return boundaryAry;
202
328
  }
203
- function F(e, n, i, o, l, u) {
204
- u === void 0 && (u = c);
205
- var f = _(function(e, t) {
206
- var n, r;
207
- return p(e) ? (r = "", n = "") : typeof e == "number" || t ? (r = typeof e == "number" ? S(e) : e, n = o(r)) : (r = l(e, void 0), n = o(r)), {
208
- formattedValue: n,
209
- numAsString: r
329
+ function useInternalValues(value, defaultValue, valueIsNumericString, format, removeFormatting, onValueChange) {
330
+ if (onValueChange === void 0) onValueChange = noop;
331
+ var getValues = usePersistentCallback(function(value, valueIsNumericString) {
332
+ var formattedValue, numAsString;
333
+ if (isNotValidValue(value)) {
334
+ numAsString = "";
335
+ formattedValue = "";
336
+ } else if (typeof value === "number" || valueIsNumericString) {
337
+ numAsString = typeof value === "number" ? toNumericString(value) : value;
338
+ formattedValue = format(numAsString);
339
+ } else {
340
+ numAsString = removeFormatting(value, void 0);
341
+ formattedValue = format(numAsString);
342
+ }
343
+ return {
344
+ formattedValue,
345
+ numAsString
210
346
  };
211
- }), m = a(function() {
212
- return f(d(e) ? n : e, i);
213
- }), h = m[0], g = m[1], v = _(function(e, t) {
214
- e.formattedValue !== h.formattedValue && g({
215
- formattedValue: e.formattedValue,
216
- numAsString: e.value
217
- }), u(e, t);
218
- }), y = e, b = i;
219
- d(e) && (y = h.numAsString, b = !0);
220
- var x = f(y, b);
221
- return r(function() {
222
- g(x);
223
- }, [x.formattedValue]), t(function() {
224
- if (!d(n) && d(e) && h.formattedValue !== "") {
225
- var t = parseFloat(h.numAsString);
226
- v({
227
- formattedValue: h.formattedValue,
228
- value: h.numAsString,
229
- floatValue: isNaN(t) ? void 0 : t
347
+ });
348
+ var ref = useState(function() {
349
+ return getValues(isNil(value) ? defaultValue : value, valueIsNumericString);
350
+ });
351
+ var values = ref[0];
352
+ var setValues = ref[1];
353
+ var _onValueChange = usePersistentCallback(function(newValues, sourceInfo) {
354
+ if (newValues.formattedValue !== values.formattedValue) setValues({
355
+ formattedValue: newValues.formattedValue,
356
+ numAsString: newValues.value
357
+ });
358
+ onValueChange(newValues, sourceInfo);
359
+ });
360
+ var _value = value;
361
+ var _valueIsNumericString = valueIsNumericString;
362
+ if (isNil(value)) {
363
+ _value = values.numAsString;
364
+ _valueIsNumericString = true;
365
+ }
366
+ var newValues = getValues(_value, _valueIsNumericString);
367
+ useMemo(function() {
368
+ setValues(newValues);
369
+ }, [newValues.formattedValue]);
370
+ /**
371
+ * When only a defaultValue is provided (value prop is nil), the initial formatted value is
372
+ * derived by the library — the parent has not yet been informed of this formatted result.
373
+ * Fire onValueChange once on mount so the parent can sync to the formatted value.
374
+ */
375
+ useEffect(function() {
376
+ if (!isNil(defaultValue) && isNil(value) && values.formattedValue !== "") {
377
+ var floatValue = parseFloat(values.numAsString);
378
+ _onValueChange({
379
+ formattedValue: values.formattedValue,
380
+ value: values.numAsString,
381
+ floatValue: isNaN(floatValue) ? void 0 : floatValue
230
382
  }, {
231
383
  event: void 0,
232
- source: s.props
384
+ source: SourceType.props
233
385
  });
234
386
  }
235
- }, []), [h, v];
236
- }
237
- function I(e) {
238
- return e.replace(/[^0-9]/g, "");
239
- }
240
- function L(e) {
241
- return e;
242
- }
243
- function R(r) {
244
- var l = r.type;
245
- l === void 0 && (l = "text");
246
- var d = r.displayType;
247
- d === void 0 && (d = "input");
248
- var f = r.customInput, p = r.renderText, m = r.getInputRef, h = r.format;
249
- h === void 0 && (h = L);
250
- var g = r.removeFormatting;
251
- g === void 0 && (g = I);
252
- var _ = r.defaultValue, v = r.valueIsNumericString, y = r.onValueChange, b = r.isAllowed, x = r.onChange;
253
- x === void 0 && (x = c);
254
- var S = r.onKeyDown;
255
- S === void 0 && (S = c);
256
- var C = r.onMouseUp;
257
- C === void 0 && (C = c);
258
- var D = r.onFocus;
259
- D === void 0 && (D = c);
260
- var A = r.onBlur;
261
- A === void 0 && (A = c);
262
- var j = r.value, R = r.getCaretBoundary;
263
- R === void 0 && (R = P);
264
- var z = r.isValidInputCharacter;
265
- z === void 0 && (z = u);
266
- var B = r.isCharacterSame, V = o(r, [
387
+ }, []);
388
+ return [values, _onValueChange];
389
+ }
390
+ function defaultRemoveFormatting(value) {
391
+ return value.replace(/[^0-9]/g, "");
392
+ }
393
+ function defaultFormat(value) {
394
+ return value;
395
+ }
396
+ function NumberFormatBase(props) {
397
+ var type = props.type;
398
+ if (type === void 0) type = "text";
399
+ var displayType = props.displayType;
400
+ if (displayType === void 0) displayType = "input";
401
+ var customInput = props.customInput;
402
+ var renderText = props.renderText;
403
+ var getInputRef = props.getInputRef;
404
+ var format = props.format;
405
+ if (format === void 0) format = defaultFormat;
406
+ var removeFormatting = props.removeFormatting;
407
+ if (removeFormatting === void 0) removeFormatting = defaultRemoveFormatting;
408
+ var defaultValue = props.defaultValue;
409
+ var valueIsNumericString = props.valueIsNumericString;
410
+ var onValueChange = props.onValueChange;
411
+ var isAllowed = props.isAllowed;
412
+ var onChange = props.onChange;
413
+ if (onChange === void 0) onChange = noop;
414
+ var onKeyDown = props.onKeyDown;
415
+ if (onKeyDown === void 0) onKeyDown = noop;
416
+ var onMouseUp = props.onMouseUp;
417
+ if (onMouseUp === void 0) onMouseUp = noop;
418
+ var onFocus = props.onFocus;
419
+ if (onFocus === void 0) onFocus = noop;
420
+ var onBlur = props.onBlur;
421
+ if (onBlur === void 0) onBlur = noop;
422
+ var propValue = props.value;
423
+ var getCaretBoundary = props.getCaretBoundary;
424
+ if (getCaretBoundary === void 0) getCaretBoundary = caretUnknownFormatBoundary;
425
+ var isValidInputCharacter = props.isValidInputCharacter;
426
+ if (isValidInputCharacter === void 0) isValidInputCharacter = charIsNumber;
427
+ var isCharacterSame = props.isCharacterSame;
428
+ var otherProps = __rest(props, [
267
429
  "type",
268
430
  "displayType",
269
431
  "customInput",
@@ -284,237 +446,456 @@ function R(r) {
284
446
  "getCaretBoundary",
285
447
  "isValidInputCharacter",
286
448
  "isCharacterSame"
287
- ]), H = F(j, _, !!v, h, g, y), U = H[0], W = U.formattedValue, G = U.numAsString, ee = H[1], K = i(), q = i({
288
- formattedValue: W,
289
- numAsString: G
290
- }), te = function(e, t) {
291
- q.current = {
292
- formattedValue: e.formattedValue,
293
- numAsString: e.value
294
- }, ee(e, t);
295
- }, ne = a(!1), re = ne[0], ie = ne[1], J = i(null), Y = i({
449
+ ]);
450
+ var ref = useInternalValues(propValue, defaultValue, Boolean(valueIsNumericString), format, removeFormatting, onValueChange);
451
+ var ref_0 = ref[0];
452
+ var formattedValue = ref_0.formattedValue;
453
+ var numAsString = ref_0.numAsString;
454
+ var onFormattedValueChange = ref[1];
455
+ var caretPositionBeforeChange = useRef();
456
+ var lastUpdatedValue = useRef({
457
+ formattedValue,
458
+ numAsString
459
+ });
460
+ var _onValueChange = function(values, source) {
461
+ lastUpdatedValue.current = {
462
+ formattedValue: values.formattedValue,
463
+ numAsString: values.value
464
+ };
465
+ onFormattedValueChange(values, source);
466
+ };
467
+ var ref$1 = useState(false);
468
+ var mounted = ref$1[0];
469
+ var setMounted = ref$1[1];
470
+ var focusedElm = useRef(null);
471
+ var timeout = useRef({
296
472
  setCaretTimeout: null,
297
473
  focusTimeout: null
298
474
  });
299
- t(function() {
300
- return ie(!0), function() {
301
- clearTimeout(Y.current.setCaretTimeout), clearTimeout(Y.current.focusTimeout);
475
+ useEffect(function() {
476
+ setMounted(true);
477
+ return function() {
478
+ clearTimeout(timeout.current.setCaretTimeout);
479
+ clearTimeout(timeout.current.focusTimeout);
302
480
  };
303
481
  }, []);
304
- var ae = h, X = function(e, t) {
305
- var n = parseFloat(t);
482
+ var _format = format;
483
+ var getValueObject = function(formattedValue, numAsString) {
484
+ var floatValue = parseFloat(numAsString);
306
485
  return {
307
- formattedValue: e,
308
- value: t,
309
- floatValue: isNaN(n) ? void 0 : n
486
+ formattedValue,
487
+ value: numAsString,
488
+ floatValue: isNaN(floatValue) ? void 0 : floatValue
310
489
  };
311
- }, Z = function(e, t, n) {
312
- (e.selectionStart !== 0 || e.selectionEnd !== e.value.length) && (w(e, t), Y.current.setCaretTimeout = setTimeout(function() {
313
- e.value === n && e.selectionStart !== t && w(e, t);
314
- }, 0));
315
- }, Q = function(e, t, n) {
316
- return N(e, t, R(e), n);
317
- }, $ = function(e, t, n) {
318
- var r = R(t), i = M(t, W, e, n, r, z, B);
319
- return i = N(t, i, r), i;
320
- }, oe = function(e) {
321
- var t = e.formattedValue;
322
- t === void 0 && (t = "");
323
- var n = e.input, r = e.source, i = e.event, a = e.numAsString, o;
324
- if (n) {
325
- var s = e.inputValue || n.value, c = O(n);
326
- n.value = t, o = $(s, t, c), o !== void 0 && Z(n, o, t);
490
+ };
491
+ var setPatchedCaretPosition = function(el, caretPos, currentValue) {
492
+ if (el.selectionStart === 0 && el.selectionEnd === el.value.length) return;
493
+ setCaretPosition(el, caretPos);
494
+ timeout.current.setCaretTimeout = setTimeout(function() {
495
+ if (el.value === currentValue && el.selectionStart !== caretPos) setCaretPosition(el, caretPos);
496
+ }, 0);
497
+ };
498
+ var correctCaretPosition = function(value, caretPos, direction) {
499
+ return getCaretPosInBoundary(value, caretPos, getCaretBoundary(value), direction);
500
+ };
501
+ var getNewCaretPosition = function(inputValue, newFormattedValue, caretPos) {
502
+ var caretBoundary = getCaretBoundary(newFormattedValue);
503
+ var updatedCaretPos = getCaretPosition(newFormattedValue, formattedValue, inputValue, caretPos, caretBoundary, isValidInputCharacter, isCharacterSame);
504
+ updatedCaretPos = getCaretPosInBoundary(newFormattedValue, updatedCaretPos, caretBoundary);
505
+ return updatedCaretPos;
506
+ };
507
+ var updateValueAndCaretPosition = function(params) {
508
+ var newFormattedValue = params.formattedValue;
509
+ if (newFormattedValue === void 0) newFormattedValue = "";
510
+ var input = params.input;
511
+ var source = params.source;
512
+ var event = params.event;
513
+ var numAsString = params.numAsString;
514
+ var caretPos;
515
+ if (input) {
516
+ var inputValue = params.inputValue || input.value;
517
+ var currentCaretPosition = geInputCaretPosition(input);
518
+ /**
519
+ * set the value imperatively, this is required for IE fix
520
+ * This is also required as if new caret position is beyond the previous value.
521
+ * Caret position will not be set correctly
522
+ */
523
+ input.value = newFormattedValue;
524
+ caretPos = getNewCaretPosition(inputValue, newFormattedValue, currentCaretPosition);
525
+ if (caretPos !== void 0) setPatchedCaretPosition(input, caretPos, newFormattedValue);
327
526
  }
328
- t !== W && te(X(t, a), {
329
- event: i,
330
- source: r
527
+ if (newFormattedValue !== formattedValue) _onValueChange(getValueObject(newFormattedValue, numAsString), {
528
+ event,
529
+ source
331
530
  });
332
531
  };
333
- t(function() {
334
- var e = q.current, t = e.formattedValue, n = e.numAsString;
335
- (W !== t || G !== n) && te(X(W, G), {
532
+ /**
533
+ * if the formatted value is not synced to parent, or if the formatted value is different from last synced value sync it
534
+ * if the formatting props is removed, in which case last formatted value will be different from the numeric string value
535
+ * in such case we need to inform the parent.
536
+ */
537
+ useEffect(function() {
538
+ var ref = lastUpdatedValue.current;
539
+ var lastFormattedValue = ref.formattedValue;
540
+ var lastNumAsString = ref.numAsString;
541
+ if (formattedValue !== lastFormattedValue || numAsString !== lastNumAsString) _onValueChange(getValueObject(formattedValue, numAsString), {
336
542
  event: void 0,
337
- source: s.props
543
+ source: SourceType.props
338
544
  });
339
- }, [W, G]);
340
- var se = J.current ? O(J.current) : void 0;
341
- (typeof window < "u" ? n : t)(function() {
342
- var e = J.current;
343
- if (W !== q.current.formattedValue && e) {
344
- var t = $(q.current.formattedValue, W, se);
345
- e.value = W, Z(e, t, W);
545
+ }, [formattedValue, numAsString]);
546
+ var currentCaretPosition = focusedElm.current ? geInputCaretPosition(focusedElm.current) : void 0;
547
+ (typeof window !== "undefined" ? useLayoutEffect : useEffect)(function() {
548
+ var input = focusedElm.current;
549
+ if (formattedValue !== lastUpdatedValue.current.formattedValue && input) {
550
+ var caretPos = getNewCaretPosition(lastUpdatedValue.current.formattedValue, formattedValue, currentCaretPosition);
551
+ /**
552
+ * set the value imperatively, as we set the caret position as well imperatively.
553
+ * This is to keep value and caret position in sync
554
+ */
555
+ input.value = formattedValue;
556
+ setPatchedCaretPosition(input, caretPos, formattedValue);
346
557
  }
347
- }, [W]);
348
- var ce = function(e, t, n) {
349
- var r = t.target, i = K.current ? E(K.current, r.selectionEnd) : T(W, e), a = Object.assign(Object.assign({}, i), { lastValue: W }), o = g(e, a), s = ae(o);
350
- if (o = g(s, void 0), b && !b(X(s, o))) {
351
- var c = t.target, l = $(e, W, O(c));
352
- return c.value = W, Z(c, l, W), !1;
558
+ }, [formattedValue]);
559
+ var formatInputValue = function(inputValue, event, source) {
560
+ var input = event.target;
561
+ var changeRange = caretPositionBeforeChange.current ? findChangedRangeFromCaretPositions(caretPositionBeforeChange.current, input.selectionEnd) : findChangeRange(formattedValue, inputValue);
562
+ var changeMeta = Object.assign(Object.assign({}, changeRange), { lastValue: formattedValue });
563
+ var _numAsString = removeFormatting(inputValue, changeMeta);
564
+ var _formattedValue = _format(_numAsString);
565
+ _numAsString = removeFormatting(_formattedValue, void 0);
566
+ if (isAllowed && !isAllowed(getValueObject(_formattedValue, _numAsString))) {
567
+ var input$1 = event.target;
568
+ var caretPos = getNewCaretPosition(inputValue, formattedValue, geInputCaretPosition(input$1));
569
+ input$1.value = formattedValue;
570
+ setPatchedCaretPosition(input$1, caretPos, formattedValue);
571
+ return false;
353
572
  }
354
- return oe({
355
- formattedValue: s,
356
- numAsString: o,
357
- inputValue: e,
358
- event: t,
359
- source: n,
360
- input: t.target
361
- }), !0;
362
- }, le = function(e, t) {
363
- t === void 0 && (t = 0), K.current = {
364
- selectionStart: e.selectionStart,
365
- selectionEnd: e.selectionEnd + t
573
+ updateValueAndCaretPosition({
574
+ formattedValue: _formattedValue,
575
+ numAsString: _numAsString,
576
+ inputValue,
577
+ event,
578
+ source,
579
+ input: event.target
580
+ });
581
+ return true;
582
+ };
583
+ var setCaretPositionInfoBeforeChange = function(el, endOffset) {
584
+ if (endOffset === void 0) endOffset = 0;
585
+ caretPositionBeforeChange.current = {
586
+ selectionStart: el.selectionStart,
587
+ selectionEnd: el.selectionEnd + endOffset
366
588
  };
367
- }, ue = function(e) {
368
- var t = e.target.value;
369
- ce(t, e, s.event) && x(e), K.current = void 0;
370
- }, de = function(e) {
371
- var t = e.target, n = e.key, r = t.selectionStart, i = t.selectionEnd, a = t.value;
372
- a === void 0 && (a = "");
373
- var o;
374
- n === "ArrowLeft" || n === "Backspace" ? o = Math.max(r - 1, 0) : n === "ArrowRight" ? o = Math.min(r + 1, a.length) : n === "Delete" && (o = r);
375
- var s = 0;
376
- n === "Delete" && r === i && (s = 1);
377
- var c = n === "ArrowLeft" || n === "ArrowRight";
378
- if (o === void 0 || r !== i && !c) S(e), le(t, s);
379
- else {
380
- var l = o;
381
- c ? (l = Q(a, o, n === "ArrowLeft" ? "left" : "right"), l !== o && e.preventDefault()) : n === "Delete" && !z(a[o]) ? l = Q(a, o, "right") : n === "Backspace" && !z(a[o]) && (l = Q(a, o, "left")), l !== o && Z(t, l, a), S(e), le(t, s);
589
+ };
590
+ var _onChange = function(e) {
591
+ var inputValue = e.target.value;
592
+ if (formatInputValue(inputValue, e, SourceType.event)) onChange(e);
593
+ caretPositionBeforeChange.current = void 0;
594
+ };
595
+ var _onKeyDown = function(e) {
596
+ var el = e.target;
597
+ var key = e.key;
598
+ var selectionStart = el.selectionStart;
599
+ var selectionEnd = el.selectionEnd;
600
+ var value = el.value;
601
+ if (value === void 0) value = "";
602
+ var expectedCaretPosition;
603
+ if (key === "ArrowLeft" || key === "Backspace") expectedCaretPosition = Math.max(selectionStart - 1, 0);
604
+ else if (key === "ArrowRight") expectedCaretPosition = Math.min(selectionStart + 1, value.length);
605
+ else if (key === "Delete") expectedCaretPosition = selectionStart;
606
+ var endOffset = 0;
607
+ if (key === "Delete" && selectionStart === selectionEnd) endOffset = 1;
608
+ var isArrowKey = key === "ArrowLeft" || key === "ArrowRight";
609
+ if (expectedCaretPosition === void 0 || selectionStart !== selectionEnd && !isArrowKey) {
610
+ onKeyDown(e);
611
+ setCaretPositionInfoBeforeChange(el, endOffset);
612
+ return;
382
613
  }
383
- }, fe = function(e) {
384
- var t = e.target, n = function() {
385
- var e = t.selectionStart, n = t.selectionEnd, r = t.value;
386
- if (r === void 0 && (r = ""), e === n) {
387
- var i = Q(r, e);
388
- i !== e && Z(t, i, r);
614
+ var newCaretPosition = expectedCaretPosition;
615
+ if (isArrowKey) {
616
+ newCaretPosition = correctCaretPosition(value, expectedCaretPosition, key === "ArrowLeft" ? "left" : "right");
617
+ if (newCaretPosition !== expectedCaretPosition) e.preventDefault();
618
+ } else if (key === "Delete" && !isValidInputCharacter(value[expectedCaretPosition])) newCaretPosition = correctCaretPosition(value, expectedCaretPosition, "right");
619
+ else if (key === "Backspace" && !isValidInputCharacter(value[expectedCaretPosition])) newCaretPosition = correctCaretPosition(value, expectedCaretPosition, "left");
620
+ if (newCaretPosition !== expectedCaretPosition) setPatchedCaretPosition(el, newCaretPosition, value);
621
+ onKeyDown(e);
622
+ setCaretPositionInfoBeforeChange(el, endOffset);
623
+ };
624
+ /** required to handle the caret position when click anywhere within the input **/
625
+ var _onMouseUp = function(e) {
626
+ var el = e.target;
627
+ /**
628
+ * NOTE: we have to give default value for value as in case when custom input is provided
629
+ * value can come as undefined when nothing is provided on value prop.
630
+ */
631
+ var correctCaretPositionIfRequired = function() {
632
+ var selectionStart = el.selectionStart;
633
+ var selectionEnd = el.selectionEnd;
634
+ var value = el.value;
635
+ if (value === void 0) value = "";
636
+ if (selectionStart === selectionEnd) {
637
+ var caretPosition = correctCaretPosition(value, selectionStart);
638
+ if (caretPosition !== selectionStart) setPatchedCaretPosition(el, caretPosition, value);
389
639
  }
390
640
  };
391
- n(), requestAnimationFrame(function() {
392
- n();
393
- }), C(e), le(t);
394
- }, pe = function(e) {
395
- e.persist && e.persist();
396
- var t = e.target, n = e.currentTarget;
397
- J.current = t, Y.current.focusTimeout = setTimeout(function() {
398
- var r = t.selectionStart, i = t.selectionEnd, a = t.value;
399
- a === void 0 && (a = "");
400
- var o = Q(a, r);
401
- o !== r && (r !== 0 || i !== a.length) && Z(t, o, a), D(Object.assign(Object.assign({}, e), { currentTarget: n }));
641
+ correctCaretPositionIfRequired();
642
+ requestAnimationFrame(function() {
643
+ correctCaretPositionIfRequired();
644
+ });
645
+ onMouseUp(e);
646
+ setCaretPositionInfoBeforeChange(el);
647
+ };
648
+ var _onFocus = function(e) {
649
+ if (e.persist) e.persist();
650
+ var el = e.target;
651
+ var currentTarget = e.currentTarget;
652
+ focusedElm.current = el;
653
+ timeout.current.focusTimeout = setTimeout(function() {
654
+ var selectionStart = el.selectionStart;
655
+ var selectionEnd = el.selectionEnd;
656
+ var value = el.value;
657
+ if (value === void 0) value = "";
658
+ var caretPosition = correctCaretPosition(value, selectionStart);
659
+ if (caretPosition !== selectionStart && !(selectionStart === 0 && selectionEnd === value.length)) setPatchedCaretPosition(el, caretPosition, value);
660
+ onFocus(Object.assign(Object.assign({}, e), { currentTarget }));
402
661
  }, 0);
403
- }, me = function(e) {
404
- J.current = null, clearTimeout(Y.current.focusTimeout), clearTimeout(Y.current.setCaretTimeout), A(e);
405
- }, he = re && k() ? "numeric" : void 0, ge = Object.assign({ inputMode: he }, V, {
406
- type: l,
407
- value: W,
408
- onChange: ue,
409
- onKeyDown: de,
410
- onMouseUp: fe,
411
- onFocus: pe,
412
- onBlur: me
662
+ };
663
+ var _onBlur = function(e) {
664
+ focusedElm.current = null;
665
+ clearTimeout(timeout.current.focusTimeout);
666
+ clearTimeout(timeout.current.setCaretTimeout);
667
+ onBlur(e);
668
+ };
669
+ var inputMode = mounted && addInputMode() ? "numeric" : void 0;
670
+ var inputProps = Object.assign({ inputMode }, otherProps, {
671
+ type,
672
+ value: formattedValue,
673
+ onChange: _onChange,
674
+ onKeyDown: _onKeyDown,
675
+ onMouseUp: _onMouseUp,
676
+ onFocus: _onFocus,
677
+ onBlur: _onBlur
413
678
  });
414
- if (d === "text") return p ? e.createElement(e.Fragment, null, p(W, V) || null) : e.createElement("span", Object.assign({}, V, { ref: m }), W);
415
- if (f) {
416
- var _e = f;
417
- return e.createElement(_e, Object.assign({}, ge, { ref: m }));
679
+ if (displayType === "text") return renderText ? React.createElement(React.Fragment, null, renderText(formattedValue, otherProps) || null) : React.createElement("span", Object.assign({}, otherProps, { ref: getInputRef }), formattedValue);
680
+ else if (customInput) {
681
+ var CustomInput = customInput;
682
+ return React.createElement(CustomInput, Object.assign({}, inputProps, { ref: getInputRef }));
418
683
  }
419
- return e.createElement("input", Object.assign({}, ge, { ref: m }));
420
- }
421
- function z(e, t) {
422
- var n = t.decimalScale, r = t.fixedDecimalScale, i = t.prefix;
423
- i === void 0 && (i = "");
424
- var a = t.suffix;
425
- a === void 0 && (a = "");
426
- var o = t.allowNegative, s = t.thousandsGroupStyle;
427
- if (s === void 0 && (s = "thousand"), e === "" || e === "-") return e;
428
- var c = B(t), l = c.thousandSeparator, u = c.decimalSeparator, d = n !== 0 && e.indexOf(".") !== -1 || n && r, f = v(e, o), p = f.beforeDecimal, m = f.afterDecimal, h = f.addNegation;
429
- return n !== void 0 && (m = b(m, n, !!r)), l && (p = g(p, l, s)), i && (p = i + p), a && (m += a), h && (p = "-" + p), e = p + (d && u || "") + m, e;
430
- }
431
- function B(e) {
432
- var t = e.decimalSeparator;
433
- t === void 0 && (t = ".");
434
- var n = e.thousandSeparator, r = e.allowedDecimalSeparators;
435
- return n === !0 && (n = ","), r ||= [t, "."], {
436
- decimalSeparator: t,
437
- thousandSeparator: n,
438
- allowedDecimalSeparators: r
684
+ return React.createElement("input", Object.assign({}, inputProps, { ref: getInputRef }));
685
+ }
686
+ function format(numStr, props) {
687
+ var decimalScale = props.decimalScale;
688
+ var fixedDecimalScale = props.fixedDecimalScale;
689
+ var prefix = props.prefix;
690
+ if (prefix === void 0) prefix = "";
691
+ var suffix = props.suffix;
692
+ if (suffix === void 0) suffix = "";
693
+ var allowNegative = props.allowNegative;
694
+ var thousandsGroupStyle = props.thousandsGroupStyle;
695
+ if (thousandsGroupStyle === void 0) thousandsGroupStyle = "thousand";
696
+ if (numStr === "" || numStr === "-") return numStr;
697
+ var ref = getSeparators(props);
698
+ var thousandSeparator = ref.thousandSeparator;
699
+ var decimalSeparator = ref.decimalSeparator;
700
+ /**
701
+ * Keep the decimal separator
702
+ * when decimalScale is not defined or non zero and the numStr has decimal in it
703
+ * Or if decimalScale is > 0 and fixeDecimalScale is true (even if numStr has no decimal)
704
+ */
705
+ var hasDecimalSeparator = decimalScale !== 0 && numStr.indexOf(".") !== -1 || decimalScale && fixedDecimalScale;
706
+ var ref$1 = splitDecimal(numStr, allowNegative);
707
+ var beforeDecimal = ref$1.beforeDecimal;
708
+ var afterDecimal = ref$1.afterDecimal;
709
+ var addNegation = ref$1.addNegation;
710
+ if (decimalScale !== void 0) afterDecimal = limitToScale(afterDecimal, decimalScale, !!fixedDecimalScale);
711
+ if (thousandSeparator) beforeDecimal = applyThousandSeparator(beforeDecimal, thousandSeparator, thousandsGroupStyle);
712
+ if (prefix) beforeDecimal = prefix + beforeDecimal;
713
+ if (suffix) afterDecimal = afterDecimal + suffix;
714
+ if (addNegation) beforeDecimal = "-" + beforeDecimal;
715
+ numStr = beforeDecimal + (hasDecimalSeparator && decimalSeparator || "") + afterDecimal;
716
+ return numStr;
717
+ }
718
+ function getSeparators(props) {
719
+ var decimalSeparator = props.decimalSeparator;
720
+ if (decimalSeparator === void 0) decimalSeparator = ".";
721
+ var thousandSeparator = props.thousandSeparator;
722
+ var allowedDecimalSeparators = props.allowedDecimalSeparators;
723
+ if (thousandSeparator === true) thousandSeparator = ",";
724
+ if (!allowedDecimalSeparators) allowedDecimalSeparators = [decimalSeparator, "."];
725
+ return {
726
+ decimalSeparator,
727
+ thousandSeparator,
728
+ allowedDecimalSeparators
439
729
  };
440
730
  }
441
- function V(e, t) {
442
- e === void 0 && (e = "");
443
- var n = /* @__PURE__ */ RegExp("(-)"), r = /* @__PURE__ */ RegExp("(-)(.)*(-)"), i = n.test(e), a = r.test(e);
444
- return e = e.replace(/-/g, ""), i && !a && t && (e = "-" + e), e;
445
- }
446
- function H(e, t) {
447
- return RegExp("(^-)|[0-9]|" + m(e), t ? "g" : void 0);
448
- }
449
- function U(e, t, n) {
450
- return e === "" || !t?.match(/\d/) && !n?.match(/\d/) && typeof e == "string" && !isNaN(Number(e));
451
- }
452
- function W(e, t, n) {
453
- var r;
454
- t === void 0 && (t = A(e));
455
- var i = n.allowNegative, a = n.prefix;
456
- a === void 0 && (a = "");
457
- var o = n.suffix;
458
- o === void 0 && (o = "");
459
- var s = n.decimalScale, c = t.from, l = t.to, d = l.start, f = l.end, p = B(n), h = p.allowedDecimalSeparators, g = p.decimalSeparator, _ = e[f] === g;
460
- if (u(e) && (e === a || e === o) && t.lastValue === "") return e;
461
- if (f - d === 1 && h.indexOf(e[d]) !== -1) {
462
- var y = s === 0 ? "" : g;
463
- e = e.substring(0, d) + y + e.substring(d + 1, e.length);
731
+ function handleNegation(value, allowNegative) {
732
+ if (value === void 0) value = "";
733
+ var negationRegex = /* @__PURE__ */ new RegExp("(-)");
734
+ var doubleNegationRegex = /* @__PURE__ */ new RegExp("(-)(.)*(-)");
735
+ var hasNegation = negationRegex.test(value);
736
+ var removeNegation = doubleNegationRegex.test(value);
737
+ value = value.replace(/-/g, "");
738
+ if (hasNegation && !removeNegation && allowNegative) value = "-" + value;
739
+ return value;
740
+ }
741
+ function getNumberRegex(decimalSeparator, global) {
742
+ return new RegExp("(^-)|[0-9]|" + escapeRegExp(decimalSeparator), global ? "g" : void 0);
743
+ }
744
+ function isNumericString(val, prefix, suffix) {
745
+ if (val === "") return true;
746
+ return !(prefix === null || prefix === void 0 ? void 0 : prefix.match(/\d/)) && !(suffix === null || suffix === void 0 ? void 0 : suffix.match(/\d/)) && typeof val === "string" && !isNaN(Number(val));
747
+ }
748
+ function removeFormatting(value, changeMeta, props) {
749
+ var assign;
750
+ if (changeMeta === void 0) changeMeta = getDefaultChangeMeta(value);
751
+ var allowNegative = props.allowNegative;
752
+ var prefix = props.prefix;
753
+ if (prefix === void 0) prefix = "";
754
+ var suffix = props.suffix;
755
+ if (suffix === void 0) suffix = "";
756
+ var decimalScale = props.decimalScale;
757
+ var from = changeMeta.from;
758
+ var to = changeMeta.to;
759
+ var start = to.start;
760
+ var end = to.end;
761
+ var ref = getSeparators(props);
762
+ var allowedDecimalSeparators = ref.allowedDecimalSeparators;
763
+ var decimalSeparator = ref.decimalSeparator;
764
+ var isBeforeDecimalSeparator = value[end] === decimalSeparator;
765
+ /**
766
+ * If only a number is added on empty input which matches with the prefix or suffix,
767
+ * then don't remove it, just return the same
768
+ */
769
+ if (charIsNumber(value) && (value === prefix || value === suffix) && changeMeta.lastValue === "") return value;
770
+ /** Check for any allowed decimal separator is added in the numeric format and replace it with decimal separator */
771
+ if (end - start === 1 && allowedDecimalSeparators.indexOf(value[start]) !== -1) {
772
+ var separator = decimalScale === 0 ? "" : decimalSeparator;
773
+ value = value.substring(0, start) + separator + value.substring(start + 1, value.length);
464
774
  }
465
- var b = function(e, t, n) {
466
- var r = !1, i = !1;
467
- a.startsWith("-") ? r = !1 : e.startsWith("--") ? (r = !1, i = !0) : o.startsWith("-") && e.length === o.length ? r = !1 : e[0] === "-" && (r = !0);
468
- var s = +!!r;
469
- return i && (s = 2), s && (e = e.substring(s), t -= s, n -= s), {
470
- value: e,
471
- start: t,
472
- end: n,
473
- hasNegation: r
775
+ var stripNegation = function(value, start, end) {
776
+ /**
777
+ * if prefix starts with - we don't allow negative number to avoid confusion
778
+ * if suffix starts with - and the value length is same as suffix length, then the - sign is from the suffix
779
+ * In other cases, if the value starts with - then it is a negation
780
+ */
781
+ var hasNegation = false;
782
+ var hasDoubleNegation = false;
783
+ if (prefix.startsWith("-")) hasNegation = false;
784
+ else if (value.startsWith("--")) {
785
+ hasNegation = false;
786
+ hasDoubleNegation = true;
787
+ } else if (suffix.startsWith("-") && value.length === suffix.length) hasNegation = false;
788
+ else if (value[0] === "-") hasNegation = true;
789
+ var charsToRemove = hasNegation ? 1 : 0;
790
+ if (hasDoubleNegation) charsToRemove = 2;
791
+ if (charsToRemove) {
792
+ value = value.substring(charsToRemove);
793
+ start -= charsToRemove;
794
+ end -= charsToRemove;
795
+ }
796
+ return {
797
+ value,
798
+ start,
799
+ end,
800
+ hasNegation
474
801
  };
475
- }, x = b(e, d, f), S = x.hasNegation;
476
- r = x, e = r.value, d = r.start, f = r.end;
477
- var C = b(t.lastValue, c.start, c.end), w = C.start, T = C.end, E = C.value, D = e.substring(d, f);
478
- e.length && E.length && (w > E.length - o.length || T < a.length) && !(D && o.startsWith(D)) && (e = E);
479
- var O = 0;
480
- e.startsWith(a) ? O += a.length : d < a.length && (O = d), e = e.substring(O), f -= O;
481
- var k = e.length, j = e.length - o.length;
482
- e.endsWith(o) ? k = j : (f > j || f > e.length - o.length) && (k = f), e = e.substring(0, k), e = V(S ? "-" + e : e, i), e = (e.match(H(g, !0)) || []).join("");
483
- var M = e.indexOf(g);
484
- e = e.replace(new RegExp(m(g), "g"), function(e, t) {
485
- return t === M ? "." : "";
802
+ };
803
+ var toMetadata = stripNegation(value, start, end);
804
+ var hasNegation = toMetadata.hasNegation;
805
+ assign = toMetadata, value = assign.value, start = assign.start, end = assign.end;
806
+ var ref$1 = stripNegation(changeMeta.lastValue, from.start, from.end);
807
+ var fromStart = ref$1.start;
808
+ var fromEnd = ref$1.end;
809
+ var lastValue = ref$1.value;
810
+ var updatedSuffixPart = value.substring(start, end);
811
+ if (value.length && lastValue.length && (fromStart > lastValue.length - suffix.length || fromEnd < prefix.length) && !(updatedSuffixPart && suffix.startsWith(updatedSuffixPart))) value = lastValue;
812
+ /**
813
+ * remove prefix
814
+ * Remove whole prefix part if its present on the value
815
+ * If the prefix is partially deleted (in which case change start index will be less the prefix length)
816
+ * Remove only partial part of prefix.
817
+ */
818
+ var startIndex = 0;
819
+ if (value.startsWith(prefix)) startIndex += prefix.length;
820
+ else if (start < prefix.length) startIndex = start;
821
+ value = value.substring(startIndex);
822
+ end -= startIndex;
823
+ /**
824
+ * Remove suffix
825
+ * Remove whole suffix part if its present on the value
826
+ * If the suffix is partially deleted (in which case change end index will be greater than the suffixStartIndex)
827
+ * remove the partial part of suffix
828
+ */
829
+ var endIndex = value.length;
830
+ var suffixStartIndex = value.length - suffix.length;
831
+ if (value.endsWith(suffix)) endIndex = suffixStartIndex;
832
+ else if (end > suffixStartIndex) endIndex = end;
833
+ else if (end > value.length - suffix.length) endIndex = end;
834
+ value = value.substring(0, endIndex);
835
+ value = handleNegation(hasNegation ? "-" + value : value, allowNegative);
836
+ value = (value.match(getNumberRegex(decimalSeparator, true)) || []).join("");
837
+ var firstIndex = value.indexOf(decimalSeparator);
838
+ value = value.replace(new RegExp(escapeRegExp(decimalSeparator), "g"), function(match, index) {
839
+ return index === firstIndex ? "." : "";
486
840
  });
487
- var N = v(e, i), P = N.beforeDecimal, F = N.afterDecimal, I = N.addNegation;
488
- return l.end - l.start < c.end - c.start && P === "" && _ && !parseFloat(F) && (e = I ? "-" : ""), e;
489
- }
490
- function G(e, t) {
491
- var n = t.prefix;
492
- n === void 0 && (n = "");
493
- var r = t.suffix;
494
- r === void 0 && (r = "");
495
- var i = Array.from({ length: e.length + 1 }).map(function() {
496
- return !0;
497
- }), a = e[0] === "-";
498
- i.fill(!1, 0, Math.min(n.length + +!!a, e.length));
499
- var o = e.length;
500
- return i.fill(!1, o - r.length + 1, o + 1), i;
501
- }
502
- function ee(e) {
503
- var t = B(e), n = t.thousandSeparator, r = t.decimalSeparator, i = e.prefix;
504
- i === void 0 && (i = "");
505
- var a = e.allowNegative;
506
- if (a === void 0 && (a = !0), n === r) throw Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: " + n + " (thousandSeparator = {true} is same as thousandSeparator = \",\")\n decimalSeparator: " + r + " (default value for decimalSeparator is .)\n ");
507
- return i.startsWith("-") && a && (console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: " + i + "\n allowNegative: " + a + "\n "), a = !1), Object.assign(Object.assign({}, e), { allowNegative: a });
508
- }
509
- function K(e) {
510
- e = ee(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
511
- var t = e.suffix, n = e.allowNegative, r = e.allowLeadingZeros, i = e.onKeyDown;
512
- i === void 0 && (i = c);
513
- var a = e.onBlur;
514
- a === void 0 && (a = c);
515
- var l = e.thousandSeparator, f = e.decimalScale, m = e.fixedDecimalScale, h = e.prefix;
516
- h === void 0 && (h = "");
517
- var g = e.defaultValue, _ = e.value, v = e.valueIsNumericString, b = e.onValueChange, x = o(e, [
841
+ var ref$2 = splitDecimal(value, allowNegative);
842
+ var beforeDecimal = ref$2.beforeDecimal;
843
+ var afterDecimal = ref$2.afterDecimal;
844
+ var addNegation = ref$2.addNegation;
845
+ if (to.end - to.start < from.end - from.start && beforeDecimal === "" && isBeforeDecimalSeparator && !parseFloat(afterDecimal)) value = addNegation ? "-" : "";
846
+ return value;
847
+ }
848
+ function getCaretBoundary(formattedValue, props) {
849
+ var prefix = props.prefix;
850
+ if (prefix === void 0) prefix = "";
851
+ var suffix = props.suffix;
852
+ if (suffix === void 0) suffix = "";
853
+ var boundaryAry = Array.from({ length: formattedValue.length + 1 }).map(function() {
854
+ return true;
855
+ });
856
+ var hasNegation = formattedValue[0] === "-";
857
+ boundaryAry.fill(false, 0, Math.min(prefix.length + (hasNegation ? 1 : 0), formattedValue.length));
858
+ var valLn = formattedValue.length;
859
+ boundaryAry.fill(false, valLn - suffix.length + 1, valLn + 1);
860
+ return boundaryAry;
861
+ }
862
+ function validateAndUpdateProps(props) {
863
+ var ref = getSeparators(props);
864
+ var thousandSeparator = ref.thousandSeparator;
865
+ var decimalSeparator = ref.decimalSeparator;
866
+ var prefix = props.prefix;
867
+ if (prefix === void 0) prefix = "";
868
+ var allowNegative = props.allowNegative;
869
+ if (allowNegative === void 0) allowNegative = true;
870
+ if (thousandSeparator === decimalSeparator) throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: " + thousandSeparator + " (thousandSeparator = {true} is same as thousandSeparator = \",\")\n decimalSeparator: " + decimalSeparator + " (default value for decimalSeparator is .)\n ");
871
+ if (prefix.startsWith("-") && allowNegative) {
872
+ console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: " + prefix + "\n allowNegative: " + allowNegative + "\n ");
873
+ allowNegative = false;
874
+ }
875
+ return Object.assign(Object.assign({}, props), { allowNegative });
876
+ }
877
+ function useNumericFormat(props) {
878
+ props = validateAndUpdateProps(props);
879
+ props.decimalSeparator;
880
+ props.allowedDecimalSeparators;
881
+ props.thousandsGroupStyle;
882
+ var suffix = props.suffix;
883
+ var allowNegative = props.allowNegative;
884
+ var allowLeadingZeros = props.allowLeadingZeros;
885
+ var onKeyDown = props.onKeyDown;
886
+ if (onKeyDown === void 0) onKeyDown = noop;
887
+ var onBlur = props.onBlur;
888
+ if (onBlur === void 0) onBlur = noop;
889
+ var thousandSeparator = props.thousandSeparator;
890
+ var decimalScale = props.decimalScale;
891
+ var fixedDecimalScale = props.fixedDecimalScale;
892
+ var prefix = props.prefix;
893
+ if (prefix === void 0) prefix = "";
894
+ var defaultValue = props.defaultValue;
895
+ var value = props.value;
896
+ var valueIsNumericString = props.valueIsNumericString;
897
+ var onValueChange = props.onValueChange;
898
+ var restProps = __rest(props, [
518
899
  "decimalSeparator",
519
900
  "allowedDecimalSeparators",
520
901
  "thousandsGroupStyle",
@@ -531,58 +912,115 @@ function K(e) {
531
912
  "value",
532
913
  "valueIsNumericString",
533
914
  "onValueChange"
534
- ]), E = B(e), D = E.decimalSeparator, O = E.allowedDecimalSeparators, k = function(t) {
535
- return z(t, e);
536
- }, A = function(t, n) {
537
- return W(t, n, e);
538
- }, j = d(_) ? g : _, M = v ?? U(j, h, t);
539
- d(_) ? d(g) || (M ||= typeof g == "number") : M ||= typeof _ == "number";
540
- var N = function(e) {
541
- return p(e) ? e : (typeof e == "number" && (e = S(e)), M && typeof f == "number" ? C(e, f, !!m) : e);
542
- }, P = F(N(_), N(g), !!M, k, A, b), I = P[0], L = I.numAsString, R = I.formattedValue, V = P[1];
543
- return Object.assign(Object.assign({}, x), {
544
- value: R,
545
- valueIsNumericString: !1,
546
- isValidInputCharacter: function(e) {
547
- return e === D || u(e);
548
- },
549
- isCharacterSame: function(e) {
550
- var t = e.currentValue, n = e.lastValue, r = e.formattedValue, i = e.currentValueIndex, a = e.formattedValueIndex, o = t[i], s = r[a], c = T(n, t).to, l = function(e) {
551
- return A(e).indexOf(".") + h.length;
552
- };
553
- return _ === 0 && m && f && t[c.start] === D && l(t) < i && l(r) > a ? !1 : i >= c.start && i < c.end && O && O.includes(o) && s === D ? !0 : o === s;
554
- },
555
- onValueChange: V,
556
- format: k,
557
- removeFormatting: A,
558
- getCaretBoundary: function(t) {
559
- return G(t, e);
560
- },
561
- onKeyDown: function(e) {
562
- var t = e.target, r = e.key, a = t.selectionStart, o = t.selectionEnd, s = t.value;
563
- if (s === void 0 && (s = ""), (r === "Backspace" || r === "Delete") && o < h.length && s !== "-") e.preventDefault();
564
- else if (a !== o) i(e);
565
- else {
566
- r === "Backspace" && s[0] === "-" && a === h.length + 1 && n && w(t, 1), f && m && (r === "Backspace" && s[a - 1] === D ? (w(t, a - 1), e.preventDefault()) : r === "Delete" && s[a] === D && e.preventDefault()), O?.includes(r) && s[a] === D && w(t, a + 1);
567
- var c = l === !0 ? "," : l;
568
- r === "Backspace" && s[a - 1] === c && w(t, a - 1), r === "Delete" && s[a] === c && w(t, a + 1), i(e);
569
- }
570
- },
571
- onBlur: function(t) {
572
- var n = L;
573
- n.match(/\d/g) || (n = ""), r || (n = y(n)), m && f && (n = C(n, f, m)), n !== L && V({
574
- formattedValue: z(n, e),
575
- value: n,
576
- floatValue: parseFloat(n)
577
- }, {
578
- event: t,
579
- source: s.event
580
- }), a(t);
915
+ ]);
916
+ var ref = getSeparators(props);
917
+ var decimalSeparator = ref.decimalSeparator;
918
+ var allowedDecimalSeparators = ref.allowedDecimalSeparators;
919
+ var _format = function(numStr) {
920
+ return format(numStr, props);
921
+ };
922
+ var _removeFormatting = function(inputValue, changeMeta) {
923
+ return removeFormatting(inputValue, changeMeta, props);
924
+ };
925
+ var _value = isNil(value) ? defaultValue : value;
926
+ var _valueIsNumericString = valueIsNumericString !== null && valueIsNumericString !== void 0 ? valueIsNumericString : isNumericString(_value, prefix, suffix);
927
+ if (!isNil(value)) _valueIsNumericString = _valueIsNumericString || typeof value === "number";
928
+ else if (!isNil(defaultValue)) _valueIsNumericString = _valueIsNumericString || typeof defaultValue === "number";
929
+ var roundIncomingValueToPrecision = function(value) {
930
+ if (isNotValidValue(value)) return value;
931
+ if (typeof value === "number") value = toNumericString(value);
932
+ /**
933
+ * only round numeric or float string values coming through props,
934
+ * we don't need to do it for onChange events, as we want to prevent typing there
935
+ */
936
+ if (_valueIsNumericString && typeof decimalScale === "number") return roundToPrecision(value, decimalScale, Boolean(fixedDecimalScale));
937
+ return value;
938
+ };
939
+ var ref$1 = useInternalValues(roundIncomingValueToPrecision(value), roundIncomingValueToPrecision(defaultValue), Boolean(_valueIsNumericString), _format, _removeFormatting, onValueChange);
940
+ var ref$1_0 = ref$1[0];
941
+ var numAsString = ref$1_0.numAsString;
942
+ var formattedValue = ref$1_0.formattedValue;
943
+ var _onValueChange = ref$1[1];
944
+ var _onKeyDown = function(e) {
945
+ var el = e.target;
946
+ var key = e.key;
947
+ var selectionStart = el.selectionStart;
948
+ var selectionEnd = el.selectionEnd;
949
+ var value = el.value;
950
+ if (value === void 0) value = "";
951
+ if ((key === "Backspace" || key === "Delete") && selectionEnd < prefix.length && value !== "-") {
952
+ e.preventDefault();
953
+ return;
581
954
  }
955
+ if (selectionStart !== selectionEnd) {
956
+ onKeyDown(e);
957
+ return;
958
+ }
959
+ if (key === "Backspace" && value[0] === "-" && selectionStart === prefix.length + 1 && allowNegative) setCaretPosition(el, 1);
960
+ if (decimalScale && fixedDecimalScale) {
961
+ if (key === "Backspace" && value[selectionStart - 1] === decimalSeparator) {
962
+ setCaretPosition(el, selectionStart - 1);
963
+ e.preventDefault();
964
+ } else if (key === "Delete" && value[selectionStart] === decimalSeparator) e.preventDefault();
965
+ }
966
+ if ((allowedDecimalSeparators === null || allowedDecimalSeparators === void 0 ? void 0 : allowedDecimalSeparators.includes(key)) && value[selectionStart] === decimalSeparator) setCaretPosition(el, selectionStart + 1);
967
+ var _thousandSeparator = thousandSeparator === true ? "," : thousandSeparator;
968
+ if (key === "Backspace" && value[selectionStart - 1] === _thousandSeparator) setCaretPosition(el, selectionStart - 1);
969
+ if (key === "Delete" && value[selectionStart] === _thousandSeparator) setCaretPosition(el, selectionStart + 1);
970
+ onKeyDown(e);
971
+ };
972
+ var _onBlur = function(e) {
973
+ var _value = numAsString;
974
+ if (!_value.match(/\d/g)) _value = "";
975
+ if (!allowLeadingZeros) _value = fixLeadingZero(_value);
976
+ if (fixedDecimalScale && decimalScale) _value = roundToPrecision(_value, decimalScale, fixedDecimalScale);
977
+ if (_value !== numAsString) _onValueChange({
978
+ formattedValue: format(_value, props),
979
+ value: _value,
980
+ floatValue: parseFloat(_value)
981
+ }, {
982
+ event: e,
983
+ source: SourceType.event
984
+ });
985
+ onBlur(e);
986
+ };
987
+ var isValidInputCharacter = function(inputChar) {
988
+ if (inputChar === decimalSeparator) return true;
989
+ return charIsNumber(inputChar);
990
+ };
991
+ var isCharacterSame = function(ref) {
992
+ var currentValue = ref.currentValue;
993
+ var lastValue = ref.lastValue;
994
+ var formattedValue = ref.formattedValue;
995
+ var currentValueIndex = ref.currentValueIndex;
996
+ var formattedValueIndex = ref.formattedValueIndex;
997
+ var curChar = currentValue[currentValueIndex];
998
+ var newChar = formattedValue[formattedValueIndex];
999
+ var to = findChangeRange(lastValue, currentValue).to;
1000
+ var getDecimalSeparatorIndex = function(value) {
1001
+ return _removeFormatting(value).indexOf(".") + prefix.length;
1002
+ };
1003
+ if (value === 0 && fixedDecimalScale && decimalScale && currentValue[to.start] === decimalSeparator && getDecimalSeparatorIndex(currentValue) < currentValueIndex && getDecimalSeparatorIndex(formattedValue) > formattedValueIndex) return false;
1004
+ if (currentValueIndex >= to.start && currentValueIndex < to.end && allowedDecimalSeparators && allowedDecimalSeparators.includes(curChar) && newChar === decimalSeparator) return true;
1005
+ return curChar === newChar;
1006
+ };
1007
+ return Object.assign(Object.assign({}, restProps), {
1008
+ value: formattedValue,
1009
+ valueIsNumericString: false,
1010
+ isValidInputCharacter,
1011
+ isCharacterSame,
1012
+ onValueChange: _onValueChange,
1013
+ format: _format,
1014
+ removeFormatting: _removeFormatting,
1015
+ getCaretBoundary: function(formattedValue) {
1016
+ return getCaretBoundary(formattedValue, props);
1017
+ },
1018
+ onKeyDown: _onKeyDown,
1019
+ onBlur: _onBlur
582
1020
  });
583
1021
  }
584
- function q(t) {
585
- var n = K(t);
586
- return e.createElement(R, Object.assign({}, n));
1022
+ function NumericFormat(props) {
1023
+ var numericFormatProps = useNumericFormat(props);
1024
+ return React.createElement(NumberFormatBase, Object.assign({}, numericFormatProps));
587
1025
  }
588
- export { R as NumberFormatBase, q as NumericFormat, G as getNumericCaretBoundary, z as numericFormatter, W as removeNumericFormat, K as useNumericFormat };
1026
+ export { NumberFormatBase, NumericFormat, getCaretBoundary as getNumericCaretBoundary, format as numericFormatter, removeFormatting as removeNumericFormat, useNumericFormat };