@vlrc-fe/components 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/ConfirmModal.d.ts +2 -3
- package/dist/ConfirmModal.d.ts.map +1 -1
- package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
- package/dist/DataTable/components/DataTablePagination.d.ts.map +1 -1
- package/dist/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/Dropdown/types.d.ts +1 -1
- package/dist/Dropdown/types.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts +2 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +7 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +5 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/types.d.ts +5 -0
- package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
- package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
- package/dist/Form/FormNumberInput/useFormNumberInput.d.ts +2 -2
- package/dist/Form/FormNumberInput/useFormNumberInput.d.ts.map +1 -1
- package/dist/Form/FormSelect/FormSelect.d.ts.map +1 -1
- package/dist/Form/FormSelect/types.d.ts +1 -1
- package/dist/Form/FormSelect/types.d.ts.map +1 -1
- package/dist/Form/FormSelect/useFormSelect.d.ts +1 -1
- package/dist/Form/FormSelect/useFormSelect.d.ts.map +1 -1
- package/dist/MultiSelect/MultiSelect.d.ts +3 -31
- package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/renderers.d.ts.map +1 -1
- package/dist/MultiSelect/type.d.ts +1 -0
- package/dist/MultiSelect/type.d.ts.map +1 -1
- package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
- package/dist/Select/BaseSelect.d.ts.map +1 -1
- package/dist/Select/MultiSelectTags.d.ts.map +1 -1
- package/dist/Select/type.d.ts +1 -1
- package/dist/Select/type.d.ts.map +1 -1
- package/dist/Typography/Code.d.ts.map +1 -1
- package/dist/Typography/Link.d.ts.map +1 -1
- package/dist/Typography/Paragraph.d.ts.map +1 -1
- package/dist/Typography/Text.d.ts.map +1 -1
- package/dist/Typography/Title.d.ts.map +1 -1
- package/dist/Typography/types.d.ts +37 -1
- package/dist/Typography/types.d.ts.map +1 -1
- package/dist/Typography/utils.d.ts +3 -2
- package/dist/Typography/utils.d.ts.map +1 -1
- package/dist/assets/stylex.css +36 -24
- package/dist/index.cjs +1 -1
- package/dist/index.js +108 -108
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +18 -55
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +89 -89
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +29 -29
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +128 -124
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +16 -16
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +2 -2
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +114 -117
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +95 -92
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +41 -41
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +36 -164
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +128 -120
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +151 -151
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +96 -91
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +18 -18
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +2 -2
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +15 -15
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +147 -103
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +10 -10
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +31 -31
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +3 -3
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +2 -2
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +53 -49
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +35 -38
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +114 -107
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +8 -8
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +53 -53
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +130 -102
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +134 -130
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +7 -7
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +95 -95
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +2 -2
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +113 -99
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +8 -8
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +16 -16
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +20 -20
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +154 -80
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +2 -2
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +24 -24
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +2 -2
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +15 -15
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +3 -3
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +2 -2
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +1 -1
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +88 -88
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +64 -64
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +116 -63
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +9 -9
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +1 -1
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +41 -41
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +73 -73
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +34 -34
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +8 -8
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +1 -1
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +30 -30
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +21 -21
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +60 -91
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +59 -59
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +2 -2
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +50 -50
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +11 -11
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +1 -1
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +33 -33
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +11 -11
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +2 -2
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +7 -7
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +74 -65
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +122 -15
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +9 -9
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +7 -7
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +12 -12
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +15 -15
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +13 -13
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +2 -2
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +140 -115
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +4 -4
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +47 -47
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +15 -268
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +36 -25
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +4 -4
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +5 -8
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +5 -15
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +5 -20
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +5 -16
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +8 -5
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +11 -281
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +7 -4
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +12 -6
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +6 -5
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +6 -5
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +6 -7
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +10 -68
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +9 -10
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +5 -201
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +7 -123
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +7 -31
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +26 -11
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +66 -17
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +8 -68
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +13 -13
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +6 -6
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +15 -278
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +171 -126
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +21 -19
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +16 -8
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +123 -13
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +19 -7
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +29 -26
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +8 -6
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +9 -9
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +13 -8
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +9 -4
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +9 -6
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +4 -6
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +42 -9
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +386 -8
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +37 -14
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +22 -10
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +367 -59
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +57 -9
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +39 -4
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +116 -35
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +85 -387
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +87 -35
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +116 -18
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +97 -55
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +154 -37
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +76 -121
- package/dist/index229.cjs +9 -1
- package/dist/index229.js +588 -77
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +212 -29
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +64 -68
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +42 -115
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +65 -98
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +48 -149
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +98 -68
- package/dist/index235.cjs +1 -9
- package/dist/index235.js +214 -580
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +29 -66
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +23 -40
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +55 -59
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +419 -46
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +200 -312
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +30 -97
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +205 -196
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +228 -124
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +161 -86
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +89 -143
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +140 -76
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +92 -84
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +84 -26
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +26 -35
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +39 -86
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +84 -231
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +234 -44
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +39 -26
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +30 -14
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +14 -13
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +13 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +4 -87
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +83 -174
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +66 -142
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +217 -62
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +135 -47
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +47 -260
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +273 -8
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +7 -4
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -503
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +472 -177
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +205 -23
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +21 -1008
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +1014 -21
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +22 -207
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +181 -130
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +132 -99
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +123 -19
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +17 -79
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +75 -90
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +91 -9
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +12 -91
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +62 -5
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +92 -31
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +29 -208
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +123 -99
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +17 -17
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +28 -28
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +30 -30
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +11 -11
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +22 -28
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +20 -20
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +7 -7
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +28 -28
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +28 -61
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +60 -15
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/calendar.d.ts +1 -1
- package/dist/ui/calendar.d.ts.map +1 -1
- package/dist/ui/command.d.ts +1 -1
- package/dist/ui/command.d.ts.map +1 -1
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/editable.d.ts.map +1 -1
- package/dist/ui/field.d.ts.map +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/item.d.ts.map +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/pagination.d.ts +3 -1
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/toggle-group.d.ts +1 -1
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/useBreakpoint.d.ts +0 -4
- package/dist/ui/useBreakpoint.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index242.cjs +0 -1
- package/dist/index242.js +0 -25
- package/dist/index243.cjs +0 -1
- package/dist/index243.js +0 -26
- package/dist/index244.cjs +0 -1
- package/dist/index244.js +0 -63
- package/dist/index245.cjs +0 -1
- package/dist/index245.js +0 -422
- package/dist/index246.cjs +0 -1
- package/dist/index246.js +0 -25
- package/dist/index247.cjs +0 -1
- package/dist/index247.js +0 -209
package/dist/index228.js
CHANGED
|
@@ -1,124 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Popover as i, PopoverContent as a, PopoverTrigger as o } from "./index42.js";
|
|
6
|
-
import { resolveDatePickerSize as s } from "./index46.js";
|
|
7
|
-
import { Calendar as c } from "./index47.js";
|
|
8
|
-
import l from "./index206.js";
|
|
9
|
-
import { buildRangeDisplayValue as u, getDefaultFormat as d } from "./index227.js";
|
|
10
|
-
import f from "react";
|
|
1
|
+
import { FormControl as e, FormField as t, FormItem as n, FormLabel as r, FormMessage as i } from "./index116.js";
|
|
2
|
+
import { useFormDatePicker as a } from "./index221.js";
|
|
3
|
+
import { RangeDatePicker as o } from "./index222.js";
|
|
4
|
+
import { SingleDatePicker as s } from "./index227.js";
|
|
11
5
|
import "@stylexjs/stylex";
|
|
12
|
-
import { jsx as
|
|
13
|
-
// src/Form/FormDatePicker/
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
sx: [
|
|
84
|
-
h.triggerButton,
|
|
85
|
-
G,
|
|
86
|
-
C === "auto" ? h.fullWidth : void 0,
|
|
87
|
-
k
|
|
88
|
-
],
|
|
89
|
-
className: O,
|
|
90
|
-
style: C === "auto" ? void 0 : { width: n(C) },
|
|
91
|
-
children: [!E && L ? /* @__PURE__ */ p(t, {
|
|
92
|
-
size: K,
|
|
93
|
-
weight: "normal",
|
|
94
|
-
children: L
|
|
95
|
-
}) : /* @__PURE__ */ p(t, {
|
|
96
|
-
size: K,
|
|
97
|
-
type: "muted",
|
|
98
|
-
children: v
|
|
99
|
-
}), /* @__PURE__ */ m("div", {
|
|
100
|
-
className: "x8x9d4c x78zum5 x6s0dn4 xvh977a",
|
|
101
|
-
children: [T && (P || F) && /* @__PURE__ */ p("span", {
|
|
102
|
-
onClick: H,
|
|
103
|
-
className: "x1ypdohk x1mqvv6a",
|
|
104
|
-
children: "×"
|
|
105
|
-
}), D || /* @__PURE__ */ p(e.CalendarIcon, { className: "xcdlrvm x1l36t39 xbyyjgo" })]
|
|
106
|
-
})]
|
|
107
|
-
})
|
|
108
|
-
}), /* @__PURE__ */ p(a, {
|
|
109
|
-
sx: h.popoverContent,
|
|
110
|
-
align: "start",
|
|
111
|
-
children: /* @__PURE__ */ p(c, {
|
|
112
|
-
mode: "range",
|
|
113
|
-
size: N,
|
|
114
|
-
selected: R,
|
|
115
|
-
onDayClick: W,
|
|
116
|
-
disabled: A,
|
|
117
|
-
captionLayout: "dropdown",
|
|
118
|
-
hidden: { after: new Date((/* @__PURE__ */ new Date()).getFullYear() + 50, 11, 31) },
|
|
119
|
-
locale: l
|
|
120
|
-
})
|
|
121
|
-
})]
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
// src/Form/FormDatePicker/FormDatePicker.tsx
|
|
8
|
+
var u = { formItem: {
|
|
9
|
+
k1xSpc: "x78zum5",
|
|
10
|
+
kXwgrk: "xdt5ytf",
|
|
11
|
+
$$css: !0
|
|
12
|
+
} };
|
|
13
|
+
function d(d) {
|
|
14
|
+
let { control: f, name: p, label: m, placeholder: h, status: g, size: _ = "md", width: v = "auto", pickerType: y = "date", dateFormat: b, showTime: x, disabled: S = !1, hideValue: C = !1, allowClear: w = !1, isRangePicker: T = !1, onChangeDate: E, onChangeRange: D, rules: O = {}, hideErrorMessage: k = !1, suffixIcon: A, className: j, disabledDate: M, disabledTime: N, locale: P, numberOfMonths: F, closeOnSelect: I, startMonth: L, endMonth: R } = d, { dateFormat: z, isRequired: B, processedRules: V, handleRangeChange: H, handleSingleChange: U } = a({
|
|
15
|
+
pickerType: y,
|
|
16
|
+
showTime: x,
|
|
17
|
+
dateFormat: b,
|
|
18
|
+
rules: O,
|
|
19
|
+
onChangeDate: E,
|
|
20
|
+
onChangeRange: D
|
|
21
|
+
}), W = (e) => /* @__PURE__ */ c(o, {
|
|
22
|
+
value: e.value || [void 0, void 0],
|
|
23
|
+
onChange: (t) => H(e, t),
|
|
24
|
+
placeholder: h,
|
|
25
|
+
dateFormat: z,
|
|
26
|
+
showTime: x,
|
|
27
|
+
size: _,
|
|
28
|
+
status: g,
|
|
29
|
+
width: v,
|
|
30
|
+
disabled: S,
|
|
31
|
+
allowClear: w,
|
|
32
|
+
hideValue: C,
|
|
33
|
+
suffixIcon: A,
|
|
34
|
+
className: j,
|
|
35
|
+
disabledDate: M,
|
|
36
|
+
locale: P,
|
|
37
|
+
numberOfMonths: F,
|
|
38
|
+
closeOnSelect: I,
|
|
39
|
+
startMonth: L,
|
|
40
|
+
endMonth: R
|
|
41
|
+
}), G = (e) => /* @__PURE__ */ c(s, {
|
|
42
|
+
value: e.value,
|
|
43
|
+
onChange: (t) => U(e, t),
|
|
44
|
+
placeholder: h,
|
|
45
|
+
pickerType: y,
|
|
46
|
+
dateFormat: z,
|
|
47
|
+
showTime: x,
|
|
48
|
+
size: _,
|
|
49
|
+
status: g,
|
|
50
|
+
width: v,
|
|
51
|
+
disabled: S,
|
|
52
|
+
allowClear: w,
|
|
53
|
+
hideValue: C,
|
|
54
|
+
suffixIcon: A,
|
|
55
|
+
className: j,
|
|
56
|
+
disabledDate: M,
|
|
57
|
+
disabledTime: N,
|
|
58
|
+
locale: P,
|
|
59
|
+
startMonth: L,
|
|
60
|
+
endMonth: R
|
|
61
|
+
});
|
|
62
|
+
return /* @__PURE__ */ c(t, {
|
|
63
|
+
control: f,
|
|
64
|
+
name: p,
|
|
65
|
+
rules: V,
|
|
66
|
+
render: ({ field: t }) => /* @__PURE__ */ l(n, {
|
|
67
|
+
sx: u.formItem,
|
|
68
|
+
children: [
|
|
69
|
+
m && /* @__PURE__ */ l(r, { children: [m, B && /* @__PURE__ */ c("span", {
|
|
70
|
+
className: "xuuroe4 x4aigyd",
|
|
71
|
+
children: "*"
|
|
72
|
+
})] }),
|
|
73
|
+
/* @__PURE__ */ c(e, { children: T ? W(t) : G(t) }),
|
|
74
|
+
!k && /* @__PURE__ */ c(i, {})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
122
77
|
});
|
|
123
78
|
}
|
|
124
|
-
export {
|
|
79
|
+
export { d as default };
|
package/dist/index229.cjs
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
const e=require("./index2.cjs"),t=require("./index45.cjs"),n=require("./index123.cjs");let r=require("react"),i=require("@stylexjs/stylex");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("react/compiler-runtime");var s={timeField:{kzqmXN:`x154i66o`,k9WMMc:`x2b8uid`,$$css:!0}};function c(e){let i=(0,o.c)(36),{value:c,onChange:l,timeConfig:u,className:d}=e,[f,p]=(0,r.useState)(``),[m,h]=(0,r.useState)(``),[g,_]=(0,r.useState)(``),v=u?.format||`HH:mm:ss`,y;i[0]===v?y=i[1]:(y=v.includes(`H`)||v.includes(`h`),i[0]=v,i[1]=y);let b=y,x;i[2]===v?x=i[3]:(x=v.includes(`m`),i[2]=v,i[3]=x);let S=x,C;i[4]===v?C=i[5]:(C=v.includes(`s`),i[4]=v,i[5]=C);let w=C,T,E;i[6]===c?(T=i[7],E=i[8]):(T=()=>{c&&(p(c.getHours().toString().padStart(2,`0`)),h(c.getMinutes().toString().padStart(2,`0`)),_(c.getSeconds().toString().padStart(2,`0`)))},E=[c],i[6]=c,i[7]=T,i[8]=E),(0,r.useEffect)(T,E);let D;i[9]!==l||i[10]!==c?(D=(e,t)=>{let n=parseInt(t,10);if(isNaN(n))return;let r=new Date(c||new Date);e===`hour`&&r.setHours(Math.min(Math.max(n,0),23)),e===`minute`&&r.setMinutes(Math.min(Math.max(n,0),59)),e===`second`&&r.setSeconds(Math.min(Math.max(n,0),59)),l?.(r)},i[9]=l,i[10]=c,i[11]=D):D=i[11];let O=D,k,A;if(i[12]!==d){let e={className:`x78zum5 x6s0dn4 xvh977a`};k=e,A=t.cn(e.className,d),i[12]=d,i[13]=k,i[14]=A}else k=i[13],A=i[14];let j;i[15]!==O||i[16]!==f||i[17]!==b||i[18]!==S||i[19]!==w?(j=b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Input,{type:`number`,min:0,max:23,value:f,onChange:e=>p(e.target.value),onBlur:e=>O(`hour`,e.target.value),sx:s.timeField}),(S||w)&&(0,a.jsx)(`span`,{children:`:`})]}),i[15]=O,i[16]=f,i[17]=b,i[18]=S,i[19]=w,i[20]=j):j=i[20];let M;i[21]!==O||i[22]!==m||i[23]!==S||i[24]!==w?(M=S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Input,{type:`number`,min:0,max:59,value:m,onChange:e=>h(e.target.value),onBlur:e=>O(`minute`,e.target.value),sx:s.timeField}),w&&(0,a.jsx)(`span`,{children:`:`})]}),i[21]=O,i[22]=m,i[23]=S,i[24]=w,i[25]=M):M=i[25];let N;i[26]!==O||i[27]!==g||i[28]!==w?(N=w&&(0,a.jsx)(n.Input,{type:`number`,min:0,max:59,value:g,onChange:e=>_(e.target.value),onBlur:e=>O(`second`,e.target.value),sx:s.timeField}),i[26]=O,i[27]=g,i[28]=w,i[29]=N):N=i[29];let P;return i[30]!==M||i[31]!==N||i[32]!==k||i[33]!==A||i[34]!==j?(P=(0,a.jsxs)(`div`,{...k,className:A,children:[j,M,N]}),i[30]=M,i[31]=N,i[32]=k,i[33]=A,i[34]=j,i[35]=P):P=i[35],P}exports.TimeInput=c,exports.default=c;
|
|
1
|
+
const e=require("./index2.cjs");let t=require("react");t=e.__toESM(t);function n(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var r;(function(e){e.event=`event`,e.props=`prop`})(r||={});function i(){}function a(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})||(t=r,n=e.apply(void 0,r)),n}}function o(e){return!!(e||``).match(/\d/)}function s(e){return e==null}function c(e){return typeof e==`number`&&isNaN(e)}function l(e){return s(e)||c(e)||typeof e==`number`&&!isFinite(e)}function u(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function d(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function f(e,t,n){var r=d(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function p(e){var n=(0,t.useRef)(e);return n.current=e,(0,t.useRef)(function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return n.current.apply(n,e)}).current}function m(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function h(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function g(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function _(e,t){return Array(t+1).join(e)}function v(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+_(`0`,Math.abs(o))+i:o>=s?i+=_(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function y(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=m(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=g(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function b(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var x=a(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),S=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function C(e,t,n){return Math.min(Math.max(e,t),n)}function w(e){return Math.max(e.selectionStart,e.selectionEnd)}function T(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function E(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function D(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function O(e,t,n,r,i,a,o){o===void 0&&(o=D);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function k(e,t,n,r){var i=e.length;if(t=C(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function A(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(o(e[n])||o(e[n-1]));return t}function j(e,n,a,o,c,u){u===void 0&&(u=i);var d=p(function(e,t){var n,r;return l(e)?(r=``,n=``):typeof e==`number`||t?(r=typeof e==`number`?v(e):e,n=o(r)):(r=c(e,void 0),n=o(r)),{formattedValue:n,numAsString:r}}),f=(0,t.useState)(function(){return d(s(e)?n:e,a)}),m=f[0],h=f[1],g=p(function(e,t){e.formattedValue!==m.formattedValue&&h({formattedValue:e.formattedValue,numAsString:e.value}),u(e,t)}),_=e,y=a;s(e)&&(_=m.numAsString,y=!0);var b=d(_,y);return(0,t.useMemo)(function(){h(b)},[b.formattedValue]),(0,t.useEffect)(function(){if(!s(n)&&s(e)&&m.formattedValue!==``){var t=parseFloat(m.numAsString);g({formattedValue:m.formattedValue,value:m.numAsString,floatValue:isNaN(t)?void 0:t},{event:void 0,source:r.props})}},[]),[m,g]}function M(e){return e.replace(/[^0-9]/g,``)}function N(e){return e}function P(e){var a=e.type;a===void 0&&(a=`text`);var s=e.displayType;s===void 0&&(s=`input`);var c=e.customInput,l=e.renderText,u=e.getInputRef,d=e.format;d===void 0&&(d=N);var f=e.removeFormatting;f===void 0&&(f=M);var p=e.defaultValue,m=e.valueIsNumericString,h=e.onValueChange,g=e.isAllowed,_=e.onChange;_===void 0&&(_=i);var v=e.onKeyDown;v===void 0&&(v=i);var y=e.onMouseUp;y===void 0&&(y=i);var C=e.onFocus;C===void 0&&(C=i);var E=e.onBlur;E===void 0&&(E=i);var D=e.value,P=e.getCaretBoundary;P===void 0&&(P=A);var F=e.isValidInputCharacter;F===void 0&&(F=o);var I=e.isCharacterSame,L=n(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),R=j(D,p,!!m,d,f,h),z=R[0],B=z.formattedValue,V=z.numAsString,H=R[1],U=(0,t.useRef)(),W=(0,t.useRef)({formattedValue:B,numAsString:V}),G=function(e,t){W.current={formattedValue:e.formattedValue,numAsString:e.value},H(e,t)},K=(0,t.useState)(!1),ee=K[0],te=K[1],q=(0,t.useRef)(null),J=(0,t.useRef)({setCaretTimeout:null,focusTimeout:null});(0,t.useEffect)(function(){return te(!0),function(){clearTimeout(J.current.setCaretTimeout),clearTimeout(J.current.focusTimeout)}},[]);var ne=d,Y=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},X=function(e,t,n){(e.selectionStart!==0||e.selectionEnd!==e.value.length)&&(b(e,t),J.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&b(e,t)},0))},Z=function(e,t,n){return k(e,t,P(e),n)},Q=function(e,t,n){var r=P(t),i=O(t,B,e,n,r,F,I);return i=k(t,i,r),i},re=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=w(n);n.value=t,o=Q(s,t,c),o!==void 0&&X(n,o,t)}t!==B&&G(Y(t,a),{event:i,source:r})};(0,t.useEffect)(function(){var e=W.current,t=e.formattedValue,n=e.numAsString;(B!==t||V!==n)&&G(Y(B,V),{event:void 0,source:r.props})},[B,V]);var ie=q.current?w(q.current):void 0;(typeof window<`u`?t.useLayoutEffect:t.useEffect)(function(){var e=q.current;if(B!==W.current.formattedValue&&e){var t=Q(W.current.formattedValue,B,ie);e.value=B,X(e,t,B)}},[B]);var ae=function(e,t,n){var r=t.target,i=U.current?S(U.current,r.selectionEnd):x(B,e),a=Object.assign(Object.assign({},i),{lastValue:B}),o=f(e,a),s=ne(o);if(o=f(s,void 0),g&&!g(Y(s,o))){var c=t.target,l=Q(e,B,w(c));return c.value=B,X(c,l,B),!1}return re({formattedValue:s,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},$=function(e,t){t===void 0&&(t=0),U.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},oe=function(e){var t=e.target.value;ae(t,e,r.event)&&_(e),U.current=void 0},se=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c)v(e),$(t,s);else{var l=o;c?(l=Z(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!F(a[o])?l=Z(a,o,`right`):n===`Backspace`&&!F(a[o])&&(l=Z(a,o,`left`)),l!==o&&X(t,l,a),v(e),$(t,s)}},ce=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=Z(r,e);i!==e&&X(t,i,r)}};n(),requestAnimationFrame(function(){n()}),y(e),$(t)},le=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;q.current=t,J.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=Z(a,r);o!==r&&(r!==0||i!==a.length)&&X(t,o,a),C(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},ue=function(e){q.current=null,clearTimeout(J.current.focusTimeout),clearTimeout(J.current.setCaretTimeout),E(e)},de=ee&&T()?`numeric`:void 0,fe=Object.assign({inputMode:de},L,{type:a,value:B,onChange:oe,onKeyDown:se,onMouseUp:ce,onFocus:le,onBlur:ue});if(s===`text`)return l?t.default.createElement(t.default.Fragment,null,l(B,L)||null):t.default.createElement(`span`,Object.assign({},L,{ref:u}),B);if(c){var pe=c;return t.default.createElement(pe,Object.assign({},fe,{ref:u}))}return t.default.createElement(`input`,Object.assign({},fe,{ref:u}))}function F(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=I(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,p=m(e,o),h=p.beforeDecimal,_=p.afterDecimal,v=p.addNegation;return n!==void 0&&(_=g(_,n,!!r)),l&&(h=f(h,l,s)),i&&(h=i+h),a&&(_+=a),v&&(h=`-`+h),e=h+(d&&u||``)+_,e}function I(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function L(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function R(e,t){return RegExp(`(^-)|[0-9]|`+u(e),t?`g`:void 0)}function z(e,t,n){return e===``||!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function B(e,t,n){var r;t===void 0&&(t=E(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var s=n.suffix;s===void 0&&(s=``);var c=n.decimalScale,l=t.from,d=t.to,f=d.start,p=d.end,h=I(n),g=h.allowedDecimalSeparators,_=h.decimalSeparator,v=e[p]===_;if(o(e)&&(e===a||e===s)&&t.lastValue===``)return e;if(p-f===1&&g.indexOf(e[f])!==-1){var y=c===0?``:_;e=e.substring(0,f)+y+e.substring(f+1,e.length)}var b=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):s.startsWith(`-`)&&e.length===s.length?r=!1:e[0]===`-`&&(r=!0);var o=+!!r;return i&&(o=2),o&&(e=e.substring(o),t-=o,n-=o),{value:e,start:t,end:n,hasNegation:r}},x=b(e,f,p),S=x.hasNegation;r=x,e=r.value,f=r.start,p=r.end;var C=b(t.lastValue,l.start,l.end),w=C.start,T=C.end,D=C.value,O=e.substring(f,p);e.length&&D.length&&(w>D.length-s.length||T<a.length)&&!(O&&s.startsWith(O))&&(e=D);var k=0;e.startsWith(a)?k+=a.length:f<a.length&&(k=f),e=e.substring(k),p-=k;var A=e.length,j=e.length-s.length;e.endsWith(s)?A=j:(p>j||p>e.length-s.length)&&(A=p),e=e.substring(0,A),e=L(S?`-`+e:e,i),e=(e.match(R(_,!0))||[]).join(``);var M=e.indexOf(_);e=e.replace(new RegExp(u(_),`g`),function(e,t){return t===M?`.`:``});var N=m(e,i),P=N.beforeDecimal,F=N.afterDecimal,z=N.addNegation;return d.end-d.start<l.end-l.start&&P===``&&v&&!parseFloat(F)&&(e=z?`-`:``),e}function V(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,Math.min(n.length+ +!!a,e.length));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function H(e){var t=I(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
|
|
2
|
+
Decimal separator can't be same as thousand separator.
|
|
3
|
+
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
4
|
+
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
5
|
+
`);return i.startsWith(`-`)&&a&&(console.error(`
|
|
6
|
+
Prefix can't start with '-' when allowNegative is true.
|
|
7
|
+
prefix: `+i+`
|
|
8
|
+
allowNegative: `+a+`
|
|
9
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function U(e){e=H(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,a=e.allowNegative,c=e.allowLeadingZeros,u=e.onKeyDown;u===void 0&&(u=i);var d=e.onBlur;d===void 0&&(d=i);var f=e.thousandSeparator,p=e.decimalScale,m=e.fixedDecimalScale,g=e.prefix;g===void 0&&(g=``);var _=e.defaultValue,S=e.value,C=e.valueIsNumericString,w=e.onValueChange,T=n(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),E=I(e),D=E.decimalSeparator,O=E.allowedDecimalSeparators,k=function(t){return F(t,e)},A=function(t,n){return B(t,n,e)},M=s(S)?_:S,N=C??z(M,g,t);s(S)?s(_)||(N||=typeof _==`number`):N||=typeof S==`number`;var P=function(e){return l(e)?e:(typeof e==`number`&&(e=v(e)),N&&typeof p==`number`?y(e,p,!!m):e)},L=j(P(S),P(_),!!N,k,A,w),R=L[0],U=R.numAsString,W=R.formattedValue,G=L[1];return Object.assign(Object.assign({},T),{value:W,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===D||o(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],s=r[a],c=x(n,t).to,l=function(e){return A(e).indexOf(`.`)+g.length};return S===0&&m&&p&&t[c.start]===D&&l(t)<i&&l(r)>a?!1:i>=c.start&&i<c.end&&O&&O.includes(o)&&s===D?!0:o===s},onValueChange:G,format:k,removeFormatting:A,getCaretBoundary:function(t){return V(t,e)},onKeyDown:function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,o=t.value;if(o===void 0&&(o=``),(n===`Backspace`||n===`Delete`)&&i<g.length&&o!==`-`)e.preventDefault();else if(r!==i)u(e);else{n===`Backspace`&&o[0]===`-`&&r===g.length+1&&a&&b(t,1),p&&m&&(n===`Backspace`&&o[r-1]===D?(b(t,r-1),e.preventDefault()):n===`Delete`&&o[r]===D&&e.preventDefault()),O?.includes(n)&&o[r]===D&&b(t,r+1);var s=f===!0?`,`:f;n===`Backspace`&&o[r-1]===s&&b(t,r-1),n===`Delete`&&o[r]===s&&b(t,r+1),u(e)}},onBlur:function(t){var n=U;n.match(/\d/g)||(n=``),c||(n=h(n)),m&&p&&(n=y(n,p,m)),n!==U&&G({formattedValue:F(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:r.event}),d(t)}})}function W(e){var n=U(e);return t.default.createElement(P,Object.assign({},n))}exports.NumberFormatBase=P,exports.NumericFormat=W,exports.getNumericCaretBoundary=V,exports.numericFormatter=F,exports.removeNumericFormat=B,exports.useNumericFormat=U;
|