@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.
- package/CHANGELOG.md +29 -0
- package/README.md +10 -1
- package/bin/registry.mjs +1124 -0
- package/bin/vlrc.mjs +102 -7
- package/dist/ConfirmModal.cjs +268 -1
- package/dist/ConfirmModal.d.ts +5 -21
- package/dist/ConfirmModal.d.ts.map +1 -1
- package/dist/ConfirmModal.js +120 -111
- package/dist/DataTable/DataTable.cjs +203 -1
- package/dist/DataTable/DataTable.js +161 -120
- package/dist/DataTable/components/DataTableColumnHeader.cjs +214 -1
- package/dist/DataTable/components/DataTableColumnHeader.d.ts +3 -3
- package/dist/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
- package/dist/DataTable/components/DataTableColumnHeader.js +201 -103
- package/dist/DataTable/components/DataTableFacetedFilter.cjs +332 -1
- package/dist/DataTable/components/DataTableFacetedFilter.d.ts +3 -3
- package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
- package/dist/DataTable/components/DataTableFacetedFilter.js +285 -181
- package/dist/DataTable/components/DataTablePagination.cjs +200 -1
- package/dist/DataTable/components/DataTablePagination.js +188 -91
- package/dist/DataTable/components/DataTableRowActions.cjs +172 -1
- package/dist/DataTable/components/DataTableRowActions.js +161 -62
- package/dist/DataTable/components/DataTableTable.cjs +100 -1
- package/dist/DataTable/components/DataTableTable.js +87 -35
- package/dist/DataTable/components/DataTableToolbar.cjs +112 -1
- package/dist/DataTable/components/DataTableToolbar.js +106 -44
- package/dist/DataTable/components/DataTableViewOptions.cjs +113 -1
- package/dist/DataTable/components/DataTableViewOptions.js +105 -44
- package/dist/DataTable/render/createColumns.cjs +84 -1
- package/dist/DataTable/render/createColumns.js +65 -44
- package/dist/DataTable/render/defaults.cjs +38 -1
- package/dist/DataTable/render/defaults.js +18 -13
- package/dist/Dropdown/Dropdown.cjs +255 -1
- package/dist/Dropdown/Dropdown.js +138 -108
- package/dist/Form/Form.cjs +439 -1
- package/dist/Form/Form.js +417 -206
- package/dist/Form/FormDatePicker/FormDatePicker.cjs +84 -1
- package/dist/Form/FormDatePicker/FormDatePicker.js +68 -65
- package/dist/Form/FormDatePicker/MonthPickerPanel.cjs +217 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.js +194 -101
- package/dist/Form/FormDatePicker/RangeDatePicker.cjs +144 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.js +94 -77
- package/dist/Form/FormDatePicker/SingleDatePicker.cjs +191 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.js +144 -114
- package/dist/Form/FormDatePicker/TimeInput.cjs +172 -1
- package/dist/Form/FormDatePicker/TimeInput.js +162 -79
- package/dist/Form/FormDatePicker/TimePicker.cjs +107 -1
- package/dist/Form/FormDatePicker/TimePicker.js +58 -43
- package/dist/Form/FormDatePicker/YearPickerPanel.cjs +184 -1
- package/dist/Form/FormDatePicker/YearPickerPanel.js +164 -84
- package/dist/Form/FormDatePicker/types.cjs +10 -1
- package/dist/Form/FormDatePicker/types.js +8 -3
- package/dist/Form/FormDatePicker/useFormDatePicker.cjs +70 -1
- package/dist/Form/FormDatePicker/useFormDatePicker.js +58 -31
- package/dist/Form/FormFileUpload/FileUpload.cjs +603 -1
- package/dist/Form/FormFileUpload/FileUpload.js +452 -306
- package/dist/Form/FormFileUpload/index.cjs +175 -1
- package/dist/Form/FormFileUpload/index.js +164 -50
- package/dist/Form/FormMultiSelect/FormMultiSelect.cjs +46 -1
- package/dist/Form/FormMultiSelect/FormMultiSelect.js +42 -22
- package/dist/Form/FormNumberInput/FormNumberInput.cjs +71 -1
- package/dist/Form/FormNumberInput/FormNumberInput.js +60 -58
- package/dist/Form/FormNumberInput/StepperControls.cjs +104 -1
- package/dist/Form/FormNumberInput/StepperControls.js +78 -43
- package/dist/Form/FormNumberInput/useFormNumberInput.cjs +72 -1
- package/dist/Form/FormNumberInput/useFormNumberInput.js +68 -39
- package/dist/Form/FormRadioGroup/FormRadio.cjs +65 -1
- package/dist/Form/FormRadioGroup/FormRadio.js +38 -38
- package/dist/Form/FormRadioGroup/useFormRadio.cjs +38 -1
- package/dist/Form/FormRadioGroup/useFormRadio.js +27 -16
- package/dist/Form/FormSelect/FormSelect.cjs +46 -1
- package/dist/Form/FormSelect/FormSelect.js +40 -26
- package/dist/Form/FormSelect/useFormSelect.cjs +58 -1
- package/dist/Form/FormSelect/useFormSelect.js +52 -43
- package/dist/Icons/Icons.cjs +155 -1
- package/dist/Icons/Icons.js +142 -142
- package/dist/Modal.cjs +131 -1
- package/dist/Modal.d.ts +2 -14
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +63 -54
- package/dist/MultiSelect/MultiSelect.cjs +210 -1
- package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/MultiSelect.js +126 -117
- package/dist/MultiSelect/renderers.cjs +571 -1
- package/dist/MultiSelect/renderers.js +508 -309
- package/dist/MultiSelect/useMultiSelect.cjs +244 -1
- package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/useMultiSelect.js +208 -127
- package/dist/MultiSelect/utils.cjs +123 -1
- package/dist/MultiSelect/utils.js +79 -51
- package/dist/Select/BaseSelect.cjs +265 -1
- package/dist/Select/BaseSelect.js +165 -126
- package/dist/Select/MultiSelectTags.cjs +129 -1
- package/dist/Select/MultiSelectTags.js +82 -56
- package/dist/Typography/Blockquote.cjs +79 -1
- package/dist/Typography/Blockquote.js +40 -38
- package/dist/Typography/Code.cjs +131 -1
- package/dist/Typography/Code.js +64 -58
- package/dist/Typography/Link.cjs +139 -1
- package/dist/Typography/Link.d.ts +1 -2
- package/dist/Typography/Link.d.ts.map +1 -1
- package/dist/Typography/Link.js +73 -64
- package/dist/Typography/Paragraph.cjs +224 -1
- package/dist/Typography/Paragraph.d.ts +1 -2
- package/dist/Typography/Paragraph.d.ts.map +1 -1
- package/dist/Typography/Paragraph.js +118 -108
- package/dist/Typography/Text.cjs +223 -1
- package/dist/Typography/Text.d.ts +1 -2
- package/dist/Typography/Text.d.ts.map +1 -1
- package/dist/Typography/Text.js +117 -101
- package/dist/Typography/Title.cjs +220 -1
- package/dist/Typography/Title.d.ts +1 -2
- package/dist/Typography/Title.d.ts.map +1 -1
- package/dist/Typography/Title.js +126 -104
- package/dist/Typography/Typography.cjs +17 -1
- package/dist/Typography/Typography.d.ts +8 -4
- package/dist/Typography/Typography.d.ts.map +1 -1
- package/dist/Typography/Typography.js +14 -14
- package/dist/Typography/index.d.ts +1 -4
- package/dist/Typography/index.d.ts.map +1 -1
- package/dist/Typography/index.js +10 -13
- package/dist/Typography/tooltip.cjs +42 -1
- package/dist/Typography/tooltip.js +34 -14
- package/dist/Typography/types.cjs +20 -1
- package/dist/Typography/types.d.ts +4 -0
- package/dist/Typography/types.d.ts.map +1 -1
- package/dist/Typography/types.js +5 -2
- package/dist/Typography/utils.cjs +52 -1
- package/dist/Typography/utils.js +48 -21
- package/dist/Typography/weightStyles.cjs +58 -1
- package/dist/Typography/weightStyles.js +26 -25
- package/dist/_virtual/_rolldown/runtime.cjs +32 -1
- package/dist/_virtual/_rolldown/runtime.js +9 -7
- package/dist/assets/stylex.css +167 -9
- package/dist/astryx.cjs +9 -1
- package/dist/astryx.d.ts +0 -1
- package/dist/astryx.d.ts.map +1 -1
- package/dist/astryx.js +0 -1
- package/dist/index.cjs +779 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +119 -118
- package/dist/layout/Box.cjs +180 -1
- package/dist/layout/Box.d.ts +6 -8
- package/dist/layout/Box.d.ts.map +1 -1
- package/dist/layout/Box.js +116 -50
- package/dist/layout/Center.cjs +40 -1
- package/dist/layout/Center.d.ts +3 -3
- package/dist/layout/Center.d.ts.map +1 -1
- package/dist/layout/Center.js +39 -21
- package/dist/layout/Container.cjs +92 -1
- package/dist/layout/Container.d.ts +6 -8
- package/dist/layout/Container.d.ts.map +1 -1
- package/dist/layout/Container.js +46 -31
- package/dist/layout/Stack.cjs +199 -1
- package/dist/layout/Stack.d.ts +9 -9
- package/dist/layout/Stack.d.ts.map +1 -1
- package/dist/layout/Stack.js +186 -79
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +9 -9
- package/dist/lazyLoad.cjs +13 -1
- package/dist/lazyLoad.d.ts.map +1 -1
- package/dist/lazyLoad.js +9 -9
- package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +551 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +440 -234
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +546 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +452 -236
- 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
- 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
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +150 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +132 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +90 -74
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +92 -67
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +11 -1
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +8 -7
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +48 -1
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +34 -31
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +106 -1
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +95 -34
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +5 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +3 -3
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +6 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +4 -4
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +423 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +237 -202
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +35 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +42 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +37 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +20 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +7 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +5 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +27 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +15 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +41 -4
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +42 -4
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +49 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +46 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +358 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +341 -45
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +31 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +28 -7
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +35 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +32 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +44 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +41 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +49 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +46 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +61 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +58 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +38 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +35 -3
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +39 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +36 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +8 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +5 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +50 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +45 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +27 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +20 -14
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +18 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +13 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +77 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +14 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +31 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +6 -6
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +11 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +4 -3
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +210 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +197 -188
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +122 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +12 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +28 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +20 -12
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +34 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +31 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +37 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +32 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +41 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +38 -7
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +42 -6
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +56 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +53 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +35 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +32 -5
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +45 -1
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +42 -4
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1391 -1
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1178 -803
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +7 -1
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +3 -4
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +36 -1
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +25 -14
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/theme/index.cjs +63 -1
- package/dist/theme/index.js +31 -31
- package/dist/theme/spacing.cjs +93 -1
- package/dist/theme/spacing.js +52 -26
- package/dist/theme/tokens.stylex.cjs +210 -1
- package/dist/theme/tokens.stylex.js +58 -26
- package/dist/theme/types.cjs +13 -1
- package/dist/theme/types.js +4 -3
- package/dist/theme/width.cjs +39 -1
- package/dist/theme/width.js +16 -4
- package/dist/theme/zIndex.cjs +62 -1
- package/dist/theme/zIndex.d.ts +4 -4
- package/dist/theme/zIndex.d.ts.map +1 -1
- package/dist/theme/zIndex.js +44 -15
- package/dist/theme.css +167 -9
- package/dist/ui/accordion.cjs +431 -1
- package/dist/ui/accordion.d.ts +10 -10
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +276 -136
- package/dist/ui/action-bar.cjs +274 -1
- package/dist/ui/action-bar.d.ts +11 -11
- package/dist/ui/action-bar.d.ts.map +1 -1
- package/dist/ui/action-bar.js +204 -98
- package/dist/ui/alert-dialog.cjs +538 -1
- package/dist/ui/alert-dialog.d.ts +19 -19
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +459 -167
- package/dist/ui/alert.cjs +163 -1
- package/dist/ui/alert.d.ts +7 -7
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +111 -50
- package/dist/ui/aspect-ratio.cjs +24 -1
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +22 -13
- package/dist/ui/avatar.cjs +340 -1
- package/dist/ui/avatar.d.ts +10 -10
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +226 -115
- package/dist/ui/badge-overflow.cjs +66 -1
- package/dist/ui/badge-overflow.d.ts +5 -5
- package/dist/ui/badge-overflow.d.ts.map +1 -1
- package/dist/ui/badge-overflow.js +34 -27
- package/dist/ui/badge.cjs +167 -1
- package/dist/ui/badge.d.ts +3 -3
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +48 -42
- package/dist/ui/breadcrumb.cjs +508 -1
- package/dist/ui/breadcrumb.d.ts +15 -15
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +386 -159
- package/dist/ui/button.cjs +425 -1
- package/dist/ui/button.d.ts +3 -3
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +137 -117
- package/dist/ui/calendar.cjs +625 -1
- package/dist/ui/calendar.d.ts +5 -5
- package/dist/ui/calendar.d.ts.map +1 -1
- package/dist/ui/calendar.js +309 -193
- package/dist/ui/card.cjs +401 -1
- package/dist/ui/card.d.ts +15 -15
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +300 -119
- package/dist/ui/carousel.cjs +332 -1
- package/dist/ui/carousel.d.ts +10 -10
- package/dist/ui/carousel.d.ts.map +1 -1
- package/dist/ui/carousel.js +245 -127
- package/dist/ui/checkbox.cjs +163 -1
- package/dist/ui/checkbox.d.ts +4 -4
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +62 -58
- package/dist/ui/circular-progress.cjs +144 -1
- package/dist/ui/circular-progress.d.ts +5 -5
- package/dist/ui/circular-progress.d.ts.map +1 -1
- package/dist/ui/circular-progress.js +85 -67
- package/dist/ui/code-block.cjs +823 -0
- package/dist/ui/code-block.d.ts +89 -0
- package/dist/ui/code-block.d.ts.map +1 -0
- package/dist/ui/code-block.js +813 -0
- package/dist/ui/collapsible.cjs +64 -1
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +58 -29
- package/dist/ui/command.cjs +556 -1
- package/dist/ui/command.d.ts +19 -19
- package/dist/ui/command.d.ts.map +1 -1
- package/dist/ui/command.js +432 -163
- package/dist/ui/compare-slider.cjs +169 -1
- package/dist/ui/compare-slider.d.ts +8 -7
- package/dist/ui/compare-slider.d.ts.map +1 -1
- package/dist/ui/compare-slider.js +106 -73
- package/dist/ui/context-menu.cjs +810 -1
- package/dist/ui/context-menu.d.ts +26 -26
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +693 -229
- package/dist/ui/copy-button.cjs +93 -1
- package/dist/ui/copy-button.d.ts +1 -2
- package/dist/ui/copy-button.d.ts.map +1 -1
- package/dist/ui/copy-button.js +56 -45
- package/dist/ui/dialog.cjs +411 -1
- package/dist/ui/dialog.d.ts +18 -18
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +319 -131
- package/dist/ui/drawer.cjs +478 -1
- package/dist/ui/drawer.d.ts +17 -17
- package/dist/ui/drawer.d.ts.map +1 -1
- package/dist/ui/drawer.js +396 -151
- package/dist/ui/dropdown-menu.cjs +638 -1
- package/dist/ui/dropdown-menu.d.ts +26 -26
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +511 -208
- package/dist/ui/editable.cjs +609 -1
- package/dist/ui/editable.d.ts +14 -14
- package/dist/ui/editable.d.ts.map +1 -1
- package/dist/ui/editable.js +479 -218
- package/dist/ui/empty.cjs +295 -1
- package/dist/ui/empty.d.ts +15 -15
- package/dist/ui/empty.d.ts.map +1 -1
- package/dist/ui/empty.js +267 -112
- package/dist/ui/field.cjs +621 -1
- package/dist/ui/field.d.ts +21 -21
- package/dist/ui/field.d.ts.map +1 -1
- package/dist/ui/field.js +468 -198
- package/dist/ui/file-upload-adapters.cjs +289 -1
- package/dist/ui/file-upload-adapters.d.ts +1 -2
- package/dist/ui/file-upload-adapters.d.ts.map +1 -1
- package/dist/ui/file-upload-adapters.js +244 -170
- package/dist/ui/file-upload.cjs +1480 -1
- package/dist/ui/file-upload.d.ts +22 -22
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +1064 -599
- package/dist/ui/flex.cjs +202 -1
- package/dist/ui/flex.d.ts +7 -6
- package/dist/ui/flex.d.ts.map +1 -1
- package/dist/ui/flex.js +111 -93
- package/dist/ui/form.cjs +453 -1
- package/dist/ui/form.d.ts +11 -11
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +421 -136
- package/dist/ui/gauge.cjs +125 -1
- package/dist/ui/gauge.d.ts +7 -6
- package/dist/ui/gauge.d.ts.map +1 -1
- package/dist/ui/gauge.js +60 -53
- package/dist/ui/grid.cjs +224 -1
- package/dist/ui/grid.d.ts +11 -7
- package/dist/ui/grid.d.ts.map +1 -1
- package/dist/ui/grid.js +126 -96
- package/dist/ui/hover-card.cjs +85 -1
- package/dist/ui/hover-card.d.ts +6 -6
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +57 -37
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/input-group.cjs +322 -1
- package/dist/ui/input-group.d.ts +12 -12
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-group.js +203 -107
- package/dist/ui/input-otp.cjs +312 -1
- package/dist/ui/input-otp.d.ts +10 -10
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +217 -94
- package/dist/ui/input.cjs +388 -1
- package/dist/ui/input.d.ts +3 -3
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +137 -119
- package/dist/ui/item.cjs +585 -1
- package/dist/ui/item.d.ts +20 -20
- package/dist/ui/item.d.ts.map +1 -1
- package/dist/ui/item.js +460 -162
- package/dist/ui/kbd.cjs +115 -1
- package/dist/ui/kbd.d.ts +5 -5
- package/dist/ui/kbd.d.ts.map +1 -1
- package/dist/ui/kbd.js +42 -37
- package/dist/ui/label.cjs +67 -1
- package/dist/ui/label.d.ts +4 -4
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +51 -21
- package/dist/ui/marker.cjs +297 -0
- package/dist/ui/marker.d.ts +25 -0
- package/dist/ui/marker.d.ts.map +1 -0
- package/dist/ui/marker.js +293 -0
- package/dist/ui/masonry.cjs +56 -1
- package/dist/ui/masonry.d.ts +4 -4
- package/dist/ui/masonry.d.ts.map +1 -1
- package/dist/ui/masonry.js +40 -37
- package/dist/ui/menubar.cjs +907 -1
- package/dist/ui/menubar.d.ts +29 -29
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +737 -252
- package/dist/ui/navigation-menu.cjs +560 -1
- package/dist/ui/navigation-menu.d.ts +18 -18
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +442 -148
- package/dist/ui/pagination.cjs +575 -1
- package/dist/ui/pagination.d.ts +13 -13
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +422 -172
- package/dist/ui/popover.cjs +93 -1
- package/dist/ui/popover.d.ts +7 -7
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +61 -42
- package/dist/ui/progress.cjs +34 -1
- package/dist/ui/progress.d.ts +3 -3
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +21 -18
- package/dist/ui/questionnaire.cjs +682 -0
- package/dist/ui/questionnaire.d.ts +111 -0
- package/dist/ui/questionnaire.d.ts.map +1 -0
- package/dist/ui/questionnaire.js +670 -0
- package/dist/ui/radio-group.cjs +221 -1
- package/dist/ui/radio-group.d.ts +6 -6
- package/dist/ui/radio-group.d.ts.map +1 -1
- package/dist/ui/radio-group.js +125 -74
- package/dist/ui/rating.cjs +190 -1
- package/dist/ui/rating.d.ts +4 -3
- package/dist/ui/rating.d.ts.map +1 -1
- package/dist/ui/rating.js +96 -79
- package/dist/ui/resizable.cjs +174 -1
- package/dist/ui/resizable.d.ts +7 -7
- package/dist/ui/resizable.d.ts.map +1 -1
- package/dist/ui/resizable.js +150 -55
- package/dist/ui/responsive-dialog.cjs +400 -1
- package/dist/ui/responsive-dialog.d.ts +17 -17
- package/dist/ui/responsive-dialog.d.ts.map +1 -1
- package/dist/ui/responsive-dialog.js +372 -155
- package/dist/ui/row-col.cjs +508 -1
- package/dist/ui/row-col.d.ts +13 -11
- package/dist/ui/row-col.d.ts.map +1 -1
- package/dist/ui/row-col.js +238 -207
- package/dist/ui/scroll-area.cjs +129 -1
- package/dist/ui/scroll-area.d.ts +6 -6
- package/dist/ui/scroll-area.d.ts.map +1 -1
- package/dist/ui/scroll-area.js +92 -49
- package/dist/ui/segmented.cjs +169 -1
- package/dist/ui/segmented.d.ts +6 -5
- package/dist/ui/segmented.d.ts.map +1 -1
- package/dist/ui/segmented.js +75 -63
- package/dist/ui/select.cjs +484 -1
- package/dist/ui/select.d.ts +17 -17
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +353 -160
- package/dist/ui/separator.cjs +44 -1
- package/dist/ui/separator.d.ts +4 -4
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js +17 -17
- package/dist/ui/sheet.cjs +462 -1
- package/dist/ui/sheet.d.ts +16 -16
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +331 -141
- package/dist/ui/sidebar.cjs +1452 -1
- package/dist/ui/sidebar.d.ts +48 -48
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +1057 -439
- package/dist/ui/signature-pad.cjs +741 -0
- package/dist/ui/signature-pad.d.ts +115 -0
- package/dist/ui/signature-pad.d.ts.map +1 -0
- package/dist/ui/signature-pad.js +731 -0
- package/dist/ui/skeleton.cjs +62 -1
- package/dist/ui/skeleton.d.ts +3 -3
- package/dist/ui/skeleton.d.ts.map +1 -1
- package/dist/ui/skeleton.js +50 -20
- package/dist/ui/slider.cjs +47 -1
- package/dist/ui/slider.d.ts +4 -4
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +27 -26
- package/dist/ui/sonner.cjs +28 -1
- package/dist/ui/sonner.js +24 -22
- package/dist/ui/spinner.cjs +73 -1
- package/dist/ui/spinner.d.ts +3 -3
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +29 -28
- package/dist/ui/stat.cjs +320 -1
- package/dist/ui/stat.d.ts +15 -15
- package/dist/ui/stat.d.ts.map +1 -1
- package/dist/ui/stat.js +275 -148
- package/dist/ui/stepper.cjs +785 -1
- package/dist/ui/stepper.d.ts +24 -24
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +594 -281
- package/dist/ui/switch.cjs +199 -1
- package/dist/ui/switch.d.ts +4 -4
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +79 -72
- package/dist/ui/table.cjs +435 -1
- package/dist/ui/table.d.ts +17 -17
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +369 -129
- package/dist/ui/tabs.cjs +340 -1
- package/dist/ui/tabs.d.ts +10 -10
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +204 -95
- package/dist/ui/tags-input.cjs +585 -1
- package/dist/ui/tags-input.d.ts +13 -13
- package/dist/ui/tags-input.d.ts.map +1 -1
- package/dist/ui/tags-input.js +446 -221
- package/dist/ui/textarea.cjs +119 -1
- package/dist/ui/textarea.d.ts +3 -3
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +37 -33
- package/dist/ui/timeline.cjs +583 -1
- package/dist/ui/timeline.d.ts +22 -22
- package/dist/ui/timeline.d.ts.map +1 -1
- package/dist/ui/timeline.js +409 -198
- package/dist/ui/toggle-group.cjs +128 -1
- package/dist/ui/toggle-group.d.ts +7 -7
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +92 -41
- package/dist/ui/toggle.cjs +145 -1
- package/dist/ui/toggle.d.ts +4 -4
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +38 -34
- package/dist/ui/tooltip.cjs +81 -1
- package/dist/ui/tooltip.d.ts +7 -7
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +50 -37
- package/dist/ui/useBreakpoint.cjs +91 -1
- package/dist/ui/useBreakpoint.js +66 -43
- package/dist/utils.cjs +4 -1
- package/dist/utils.d.ts +2 -12
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +3 -6
- package/package.json +10 -2
|
@@ -1,147 +1,236 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
24
|
-
return !!(
|
|
51
|
+
function charIsNumber(char) {
|
|
52
|
+
return !!(char || "").match(/\d/);
|
|
25
53
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
54
|
+
function isNil(val) {
|
|
55
|
+
return val === null || val === void 0;
|
|
28
56
|
}
|
|
29
|
-
function
|
|
30
|
-
return typeof
|
|
57
|
+
function isNanValue(val) {
|
|
58
|
+
return typeof val === "number" && isNaN(val);
|
|
31
59
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
60
|
+
function isNotValidValue(val) {
|
|
61
|
+
return isNil(val) || isNanValue(val) || typeof val === "number" && !isFinite(val);
|
|
34
62
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
63
|
+
function escapeRegExp(str) {
|
|
64
|
+
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
37
65
|
}
|
|
38
|
-
function
|
|
39
|
-
switch (
|
|
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
|
|
46
|
-
var
|
|
47
|
-
|
|
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
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
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:
|
|
63
|
-
afterDecimal:
|
|
64
|
-
hasNegation
|
|
65
|
-
addNegation
|
|
95
|
+
beforeDecimal: parts[0],
|
|
96
|
+
afterDecimal: parts[1] || "",
|
|
97
|
+
hasNegation,
|
|
98
|
+
addNegation
|
|
66
99
|
};
|
|
67
100
|
}
|
|
68
|
-
function
|
|
69
|
-
if (!
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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:
|
|
115
|
-
end:
|
|
202
|
+
start: i,
|
|
203
|
+
end: prevLength - j
|
|
116
204
|
},
|
|
117
205
|
to: {
|
|
118
|
-
start:
|
|
119
|
-
end:
|
|
206
|
+
start: i,
|
|
207
|
+
end: newLength - j
|
|
120
208
|
}
|
|
121
209
|
};
|
|
122
|
-
})
|
|
123
|
-
|
|
210
|
+
});
|
|
211
|
+
var findChangedRangeFromCaretPositions = function(lastCaretPositions, currentCaretPosition) {
|
|
212
|
+
var startPosition = Math.min(lastCaretPositions.selectionStart, currentCaretPosition);
|
|
124
213
|
return {
|
|
125
214
|
from: {
|
|
126
|
-
start:
|
|
127
|
-
end:
|
|
215
|
+
start: startPosition,
|
|
216
|
+
end: lastCaretPositions.selectionEnd
|
|
128
217
|
},
|
|
129
218
|
to: {
|
|
130
|
-
start:
|
|
131
|
-
end:
|
|
219
|
+
start: startPosition,
|
|
220
|
+
end: currentCaretPosition
|
|
132
221
|
}
|
|
133
222
|
};
|
|
134
223
|
};
|
|
135
|
-
function
|
|
136
|
-
return Math.min(Math.max(
|
|
224
|
+
function clamp(num, min, max) {
|
|
225
|
+
return Math.min(Math.max(num, min), max);
|
|
137
226
|
}
|
|
138
|
-
function
|
|
139
|
-
return Math.max(
|
|
227
|
+
function geInputCaretPosition(el) {
|
|
228
|
+
return Math.max(el.selectionStart, el.selectionEnd);
|
|
140
229
|
}
|
|
141
|
-
function
|
|
142
|
-
return typeof navigator
|
|
230
|
+
function addInputMode() {
|
|
231
|
+
return typeof navigator !== "undefined" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
|
|
143
232
|
}
|
|
144
|
-
function
|
|
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:
|
|
241
|
+
end: value.length
|
|
153
242
|
},
|
|
154
243
|
lastValue: ""
|
|
155
244
|
};
|
|
156
245
|
}
|
|
157
|
-
function
|
|
158
|
-
var
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
-
|
|
193
|
-
|
|
316
|
+
while (caretPos <= valLn && !boundary[caretPos]) caretPos++;
|
|
317
|
+
if (caretPos > valLn) caretPos = boundary.lastIndexOf(true);
|
|
194
318
|
}
|
|
195
|
-
|
|
319
|
+
if (caretPos === -1) caretPos = valLn;
|
|
320
|
+
return caretPos;
|
|
196
321
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
return
|
|
200
|
-
})
|
|
201
|
-
|
|
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
|
|
204
|
-
|
|
205
|
-
var
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
-
})
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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:
|
|
384
|
+
source: SourceType.props
|
|
233
385
|
});
|
|
234
386
|
}
|
|
235
|
-
}, [])
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
var
|
|
251
|
-
|
|
252
|
-
var
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
var
|
|
257
|
-
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
-
var
|
|
261
|
-
|
|
262
|
-
var
|
|
263
|
-
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
var
|
|
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
|
-
])
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
|
305
|
-
|
|
482
|
+
var _format = format;
|
|
483
|
+
var getValueObject = function(formattedValue, numAsString) {
|
|
484
|
+
var floatValue = parseFloat(numAsString);
|
|
306
485
|
return {
|
|
307
|
-
formattedValue
|
|
308
|
-
value:
|
|
309
|
-
floatValue: isNaN(
|
|
486
|
+
formattedValue,
|
|
487
|
+
value: numAsString,
|
|
488
|
+
floatValue: isNaN(floatValue) ? void 0 : floatValue
|
|
310
489
|
};
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
var
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
|
|
329
|
-
event
|
|
330
|
-
source
|
|
527
|
+
if (newFormattedValue !== formattedValue) _onValueChange(getValueObject(newFormattedValue, numAsString), {
|
|
528
|
+
event,
|
|
529
|
+
source
|
|
331
530
|
});
|
|
332
531
|
};
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
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:
|
|
543
|
+
source: SourceType.props
|
|
338
544
|
});
|
|
339
|
-
}, [
|
|
340
|
-
var
|
|
341
|
-
(typeof window
|
|
342
|
-
var
|
|
343
|
-
if (
|
|
344
|
-
var
|
|
345
|
-
|
|
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
|
-
}, [
|
|
348
|
-
var
|
|
349
|
-
var
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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
|
-
|
|
355
|
-
formattedValue:
|
|
356
|
-
numAsString:
|
|
357
|
-
inputValue
|
|
358
|
-
event
|
|
359
|
-
source
|
|
360
|
-
input:
|
|
361
|
-
})
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
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
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
var
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
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
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
if (
|
|
387
|
-
|
|
388
|
-
|
|
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
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
e
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
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
|
-
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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 (
|
|
415
|
-
if (
|
|
416
|
-
var
|
|
417
|
-
return
|
|
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
|
|
420
|
-
}
|
|
421
|
-
function
|
|
422
|
-
var
|
|
423
|
-
|
|
424
|
-
var
|
|
425
|
-
|
|
426
|
-
var
|
|
427
|
-
if (
|
|
428
|
-
var
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
var
|
|
433
|
-
|
|
434
|
-
var
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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
|
|
442
|
-
|
|
443
|
-
var
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
var
|
|
460
|
-
if (
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
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
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
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
|
-
}
|
|
476
|
-
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
var
|
|
480
|
-
|
|
481
|
-
var
|
|
482
|
-
|
|
483
|
-
var
|
|
484
|
-
|
|
485
|
-
|
|
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
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
var
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
var
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
var
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
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
|
-
])
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
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
|
|
585
|
-
var
|
|
586
|
-
return
|
|
1022
|
+
function NumericFormat(props) {
|
|
1023
|
+
var numericFormatProps = useNumericFormat(props);
|
|
1024
|
+
return React.createElement(NumberFormatBase, Object.assign({}, numericFormatProps));
|
|
587
1025
|
}
|
|
588
|
-
export {
|
|
1026
|
+
export { NumberFormatBase, NumericFormat, getCaretBoundary as getNumericCaretBoundary, format as numericFormatter, removeFormatting as removeNumericFormat, useNumericFormat };
|