@povio/ui 4.0.2 → 4.0.3
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/README.md +5 -1
- package/dist/{Breadcrumbs-BibAIBhY.js → Breadcrumbs-C-mZtdCc.js} +1 -1
- package/dist/{Calendar-kSEji28A.js → Calendar-BYcN64W5.js} +6 -136
- package/dist/{DatePicker-BbdtBAGN.js → DatePicker-DGlMtlvy.js} +12 -12
- package/dist/{DatePickerInput-eyHwzKPm.js → DatePickerInput-Nj_rVUyU.js} +8 -7
- package/dist/{DateRangePicker-Ct182qur.js → DateRangePicker-CE9XvAy9.js} +13 -185
- package/dist/{DateTimePicker-taYHMMYi.js → DateTimePicker-CtUPjVp1.js} +12 -12
- package/dist/{FileInput-B-ADr0B3.js → FileInput-BUs7wL0_.js} +1 -1
- package/dist/{FileUpload-3-4Vt4f1.js → FileUpload-C3HzeFeb.js} +1 -1
- package/dist/{FormField-CAcDJ4HC.js → FormField-DTO2cbXC.js} +1 -1
- package/dist/{FormFieldHeaderTooltip-C2IDI4ac.js → FormFieldHeaderTooltip-h6e5hq9V.js} +1 -1
- package/dist/{InlineTooltipWrapper-7HG-g2X3.js → InlineTooltipWrapper-Ct6zi24f.js} +1 -1
- package/dist/{InputItem-B3PlrjuD.js → InputItem-DAunP0iy.js} +9 -9
- package/dist/{Inputs-WZmrBWrL.js → Inputs-_IqA6JRE.js} +1 -1
- package/dist/NumberFormatter-CLDS_LRZ.js +265 -0
- package/dist/{NumberRangeInput-X8G1zfNM.js → NumberRangeInput-Bu-3Y0zf.js} +6 -5
- package/dist/{RadioGroup-DW_OQQDu.js → RadioGroup-DiF7ILto.js} +1 -1
- package/dist/{RichTextEditor-BOTitK7E.js → RichTextEditor-eM9d2umr.js} +2 -2
- package/dist/{Select-DmLkOMr1.js → Select-CyBtGHk9.js} +2 -2
- package/dist/{Slider-Q87Hg_V2.js → Slider-KkWtEm09.js} +1 -1
- package/dist/{TextArea-DZv6XaT0.js → TextArea-DvqDGp4M.js} +2 -2
- package/dist/{TimePicker-DAoHgk8U.js → TimePicker-WirUMDrH.js} +10 -9
- package/dist/{ToggleGroup-Cho_oRZh.js → ToggleGroup-BK6Ka7WA.js} +5 -66
- package/dist/{Tooltip-D94a1IQl.js → Tooltip--PSxkQA3.js} +2 -2
- package/dist/{TooltipWrapper-S2JC-w4e.js → TooltipWrapper-BVc_Aln-.js} +1 -1
- package/dist/components/autocomplete.js +2 -2
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/input.js +4 -4
- package/dist/components/number-field.js +7 -6
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/{datePickerValue.utils-GADbSu7a.js → datePickerValue.utils-1z4mwZZs.js} +5 -5
- package/dist/hooks/use-filters.js +1 -1
- package/dist/index.js +15 -15
- package/dist/numberStatic.utils-BX50PSee.js +421 -0
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-input.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/rich-text-editor.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle-group.js +1 -1
- package/dist/rhf.js +15 -15
- package/dist/rich-text-editor.js +1 -1
- package/dist/{router.context-B0jTMtE0.js → router.context-B4FvsTim.js} +2 -2
- package/dist/staticDateTimeSegments-vP2f1woD.js +1763 -0
- package/dist/{staticSelect.utils-ad60elvT.js → staticSelect.utils-DOt6f-ck.js} +4 -143
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack.js +24 -24
- package/dist/useControlledState-CzXkZCX8.js +30 -0
- package/dist/{useFieldAccessibility-CtTdRX2u.js → useFieldAccessibility-BTs_WC_5.js} +2 -2
- package/dist/{useFilters-kkEUFKmQ.js → useFilters-XNH27Md2.js} +1 -1
- package/dist/{useFormAutosave-DqP6lB4l.js → useFormAutosave-BRlM0nmq.js} +1 -1
- package/dist/{useStaticInputHandoff-BAaDW_0z.js → useStaticInputHandoff-_stbpoX4.js} +2 -2
- package/dist/{useTableColumnConfig-DVI_jVHz.js → useTableColumnConfig-CiAr7Dbi.js} +1 -1
- package/package.json +1 -1
- package/dist/FocusScope-CO9oJ1sc.js +0 -343
- package/dist/chain-DIXr2VAT.js +0 -10
- package/dist/focusSafely-DCGrr2bb.js +0 -447
- package/dist/getScrollParent-kSR7EtoT.js +0 -47
- package/dist/numberStatic.utils-BMgRzyd3.js +0 -902
- package/dist/openLink-CQhMhfzO.js +0 -121
- package/dist/platform-BXNIIAfU.js +0 -42
- package/dist/staticDateTimeSegments-BQoA94W-.js +0 -3603
- package/dist/useControlledState-DQxX6LMN.js +0 -189
- package/dist/useFocusable-Bd0UsrQ7.js +0 -63
- package/dist/useFormValidationState-D3z-gafz.js +0 -1341
- package/dist/useLayoutEffect-B2-1tbPJ.js +0 -83
- package/dist/useSyncRef-RGMv0rXK.js +0 -338
|
@@ -1,902 +0,0 @@
|
|
|
1
|
-
import { i as $23f2114a1b82827e$export$e58f029f0fbfdb29, r as $23f2114a1b82827e$export$cd4e5573fbe2b576, t as $c4867b2f328c2698$export$e5c5a5f917a5871c } from "./useLayoutEffect-B2-1tbPJ.js";
|
|
2
|
-
import { a as $2add3ce32c6007eb$export$a11b0059900ceec8, s as $2add3ce32c6007eb$export$fedb369cb70207f1, t as $2add3ce32c6007eb$export$186c6964ca17d99 } from "./platform-BXNIIAfU.js";
|
|
3
|
-
import { a as $390e54f620492c70$export$f680877a34711e37, n as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, r as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./useSyncRef-RGMv0rXK.js";
|
|
4
|
-
import { n as $1e74c67db218ce67$export$f8168d8dd8fd66e6, t as $d1116acdf220c2da$export$4c014de7c8940b4c } from "./useFocusable-Bd0UsrQ7.js";
|
|
5
|
-
import { a as $eb76cf4feb040f77$export$cd11ab140839f11d, c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, d as $a46cf152bb926da5$export$a9b970dcc4ae71a9, i as $757ec6630f26125c$export$e908e06f4b8e3402, l as $860f7da480e22816$export$b8473d3665f3a75a, m as $cf2482eff2eeeec2$export$f12b703ca79dfbb1, o as $1dfb119a85e764e5$export$cc77c4ff7e8673c5, r as $fd2148440a13ec26$export$fc1a364ae1f3ff10, s as $2c9edc598a03d523$export$420e68273165f4ec, u as $3274bf1495747a7b$export$5add1d006293d136, v as $600b3cf69ae46262$export$90fc3a17d93f704c, y as $fe16bffc7a557bf0$export$7f54fc3180508a52 } from "./useFormValidationState-D3z-gafz.js";
|
|
6
|
-
import { n as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-DQxX6LMN.js";
|
|
7
|
-
import $ahdqC$react, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
8
|
-
import { privateValidationStateProp, useFormValidationState } from "react-stately/private/form/useFormValidationState";
|
|
9
|
-
import { flushSync } from "react-dom";
|
|
10
|
-
import { useControlledState } from "react-stately/useControlledState";
|
|
11
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/ar-AE.mjs
|
|
12
|
-
var $50f1093a6d23d116$exports = {};
|
|
13
|
-
$50f1093a6d23d116$exports = {
|
|
14
|
-
"decrease": (args) => `\u{62E}\u{641}\u{636} ${args.fieldLabel}`,
|
|
15
|
-
"increase": (args) => `\u{632}\u{64A}\u{627}\u{62F}\u{629} ${args.fieldLabel}`,
|
|
16
|
-
"numberField": `\u{62D}\u{642}\u{644} \u{631}\u{642}\u{645}\u{64A}`
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/bg-BG.mjs
|
|
20
|
-
var $8f4fd2367d49b0f4$exports = {};
|
|
21
|
-
$8f4fd2367d49b0f4$exports = {
|
|
22
|
-
"decrease": (args) => `\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${args.fieldLabel}`,
|
|
23
|
-
"increase": (args) => `\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${args.fieldLabel}`,
|
|
24
|
-
"numberField": `\u{41D}\u{43E}\u{43C}\u{435}\u{440} \u{43D}\u{430} \u{43F}\u{43E}\u{43B}\u{435}\u{442}\u{43E}`
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/cs-CZ.mjs
|
|
28
|
-
var $060018a1c3ec2fce$exports = {};
|
|
29
|
-
$060018a1c3ec2fce$exports = {
|
|
30
|
-
"decrease": (args) => `Sn\xed\u{17E}it ${args.fieldLabel}`,
|
|
31
|
-
"increase": (args) => `Zv\xfd\u{161}it ${args.fieldLabel}`,
|
|
32
|
-
"numberField": `\u{10C}\xedseln\xe9 pole`
|
|
33
|
-
};
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/da-DK.mjs
|
|
36
|
-
var $34605f3e0266a8f3$exports = {};
|
|
37
|
-
$34605f3e0266a8f3$exports = {
|
|
38
|
-
"decrease": (args) => `Reducer ${args.fieldLabel}`,
|
|
39
|
-
"increase": (args) => `\xd8g ${args.fieldLabel}`,
|
|
40
|
-
"numberField": `Talfelt`
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/de-DE.mjs
|
|
44
|
-
var $64f20e1112866bbd$exports = {};
|
|
45
|
-
$64f20e1112866bbd$exports = {
|
|
46
|
-
"decrease": (args) => `${args.fieldLabel} verringern`,
|
|
47
|
-
"increase": (args) => `${args.fieldLabel} erh\xf6hen`,
|
|
48
|
-
"numberField": `Nummernfeld`
|
|
49
|
-
};
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/el-GR.mjs
|
|
52
|
-
var $bfa0aaf1a402f382$exports = {};
|
|
53
|
-
$bfa0aaf1a402f382$exports = {
|
|
54
|
-
"decrease": (args) => `\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${args.fieldLabel}`,
|
|
55
|
-
"increase": (args) => `\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${args.fieldLabel}`,
|
|
56
|
-
"numberField": `\u{3A0}\u{3B5}\u{3B4}\u{3AF}\u{3BF} \u{3B1}\u{3C1}\u{3B9}\u{3B8}\u{3BC}\u{3BF}\u{3CD}`
|
|
57
|
-
};
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/en-US.mjs
|
|
60
|
-
var $2656ce930519213b$exports = {};
|
|
61
|
-
$2656ce930519213b$exports = {
|
|
62
|
-
"decrease": (args) => `Decrease ${args.fieldLabel}`,
|
|
63
|
-
"increase": (args) => `Increase ${args.fieldLabel}`,
|
|
64
|
-
"numberField": `Number field`
|
|
65
|
-
};
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/es-ES.mjs
|
|
68
|
-
var $260cc0fc04d161dd$exports = {};
|
|
69
|
-
$260cc0fc04d161dd$exports = {
|
|
70
|
-
"decrease": (args) => `Reducir ${args.fieldLabel}`,
|
|
71
|
-
"increase": (args) => `Aumentar ${args.fieldLabel}`,
|
|
72
|
-
"numberField": `Campo de n\xfamero`
|
|
73
|
-
};
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/et-EE.mjs
|
|
76
|
-
var $5929126f62332a39$exports = {};
|
|
77
|
-
$5929126f62332a39$exports = {
|
|
78
|
-
"decrease": (args) => `V\xe4henda ${args.fieldLabel}`,
|
|
79
|
-
"increase": (args) => `Suurenda ${args.fieldLabel}`,
|
|
80
|
-
"numberField": `Numbri v\xe4li`
|
|
81
|
-
};
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/fi-FI.mjs
|
|
84
|
-
var $fc98374bce6a8f49$exports = {};
|
|
85
|
-
$fc98374bce6a8f49$exports = {
|
|
86
|
-
"decrease": (args) => `V\xe4henn\xe4 ${args.fieldLabel}`,
|
|
87
|
-
"increase": (args) => `Lis\xe4\xe4 ${args.fieldLabel}`,
|
|
88
|
-
"numberField": `Numerokentt\xe4`
|
|
89
|
-
};
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/fr-FR.mjs
|
|
92
|
-
var $574239e9a0c4ce9f$exports = {};
|
|
93
|
-
$574239e9a0c4ce9f$exports = {
|
|
94
|
-
"decrease": (args) => `Diminuer ${args.fieldLabel}`,
|
|
95
|
-
"increase": (args) => `Augmenter ${args.fieldLabel}`,
|
|
96
|
-
"numberField": `Champ de nombre`
|
|
97
|
-
};
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/he-IL.mjs
|
|
100
|
-
var $a80db10c45105af6$exports = {};
|
|
101
|
-
$a80db10c45105af6$exports = {
|
|
102
|
-
"decrease": (args) => `\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${args.fieldLabel}`,
|
|
103
|
-
"increase": (args) => `\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${args.fieldLabel}`,
|
|
104
|
-
"numberField": `\u{5E9}\u{5D3}\u{5D4} \u{5DE}\u{5E1}\u{5E4}\u{5E8}`
|
|
105
|
-
};
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/hr-HR.mjs
|
|
108
|
-
var $1df8c58f234da60a$exports = {};
|
|
109
|
-
$1df8c58f234da60a$exports = {
|
|
110
|
-
"decrease": (args) => `Smanji ${args.fieldLabel}`,
|
|
111
|
-
"increase": (args) => `Pove\u{107}aj ${args.fieldLabel}`,
|
|
112
|
-
"numberField": `Polje broja`
|
|
113
|
-
};
|
|
114
|
-
//#endregion
|
|
115
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/hu-HU.mjs
|
|
116
|
-
var $c990249689bb58d0$exports = {};
|
|
117
|
-
$c990249689bb58d0$exports = {
|
|
118
|
-
"decrease": (args) => `${args.fieldLabel} cs\xf6kkent\xe9se`,
|
|
119
|
-
"increase": (args) => `${args.fieldLabel} n\xf6vel\xe9se`,
|
|
120
|
-
"numberField": `Sz\xe1mmez\u{151}`
|
|
121
|
-
};
|
|
122
|
-
//#endregion
|
|
123
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/it-IT.mjs
|
|
124
|
-
var $03e73e050e75c075$exports = {};
|
|
125
|
-
$03e73e050e75c075$exports = {
|
|
126
|
-
"decrease": (args) => `Riduci ${args.fieldLabel}`,
|
|
127
|
-
"increase": (args) => `Aumenta ${args.fieldLabel}`,
|
|
128
|
-
"numberField": `Campo numero`
|
|
129
|
-
};
|
|
130
|
-
//#endregion
|
|
131
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/ja-JP.mjs
|
|
132
|
-
var $1486a16b22508ab9$exports = {};
|
|
133
|
-
$1486a16b22508ab9$exports = {
|
|
134
|
-
"decrease": (args) => `${args.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,
|
|
135
|
-
"increase": (args) => `${args.fieldLabel}\u{3092}\u{62E1}\u{5927}`,
|
|
136
|
-
"numberField": `\u{6570}\u{5024}\u{30D5}\u{30A3}\u{30FC}\u{30EB}\u{30C9}`
|
|
137
|
-
};
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/ko-KR.mjs
|
|
140
|
-
var $da3ce82ad291e297$exports = {};
|
|
141
|
-
$da3ce82ad291e297$exports = {
|
|
142
|
-
"decrease": (args) => `${args.fieldLabel} \u{AC10}\u{C18C}`,
|
|
143
|
-
"increase": (args) => `${args.fieldLabel} \u{C99D}\u{AC00}`,
|
|
144
|
-
"numberField": `\u{BC88}\u{D638} \u{D544}\u{B4DC}`
|
|
145
|
-
};
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/lt-LT.mjs
|
|
148
|
-
var $f06e9c465fb83243$exports = {};
|
|
149
|
-
$f06e9c465fb83243$exports = {
|
|
150
|
-
"decrease": (args) => `Suma\u{17E}inti ${args.fieldLabel}`,
|
|
151
|
-
"increase": (args) => `Padidinti ${args.fieldLabel}`,
|
|
152
|
-
"numberField": `Numerio laukas`
|
|
153
|
-
};
|
|
154
|
-
//#endregion
|
|
155
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/lv-LV.mjs
|
|
156
|
-
var $02ed0f44dca8e510$exports = {};
|
|
157
|
-
$02ed0f44dca8e510$exports = {
|
|
158
|
-
"decrease": (args) => `Samazin\u{101}\u{161}ana ${args.fieldLabel}`,
|
|
159
|
-
"increase": (args) => `Palielin\u{101}\u{161}ana ${args.fieldLabel}`,
|
|
160
|
-
"numberField": `Skait\u{13C}u lauks`
|
|
161
|
-
};
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/nb-NO.mjs
|
|
164
|
-
var $7d2396d9fde5f3f5$exports = {};
|
|
165
|
-
$7d2396d9fde5f3f5$exports = {
|
|
166
|
-
"decrease": (args) => `Reduser ${args.fieldLabel}`,
|
|
167
|
-
"increase": (args) => `\xd8k ${args.fieldLabel}`,
|
|
168
|
-
"numberField": `Tallfelt`
|
|
169
|
-
};
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/nl-NL.mjs
|
|
172
|
-
var $294f579ef11ab713$exports = {};
|
|
173
|
-
$294f579ef11ab713$exports = {
|
|
174
|
-
"decrease": (args) => `${args.fieldLabel} verlagen`,
|
|
175
|
-
"increase": (args) => `${args.fieldLabel} verhogen`,
|
|
176
|
-
"numberField": `Getalveld`
|
|
177
|
-
};
|
|
178
|
-
//#endregion
|
|
179
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/pl-PL.mjs
|
|
180
|
-
var $46b77281e4caa836$exports = {};
|
|
181
|
-
$46b77281e4caa836$exports = {
|
|
182
|
-
"decrease": (args) => `Zmniejsz ${args.fieldLabel}`,
|
|
183
|
-
"increase": (args) => `Zwi\u{119}ksz ${args.fieldLabel}`,
|
|
184
|
-
"numberField": `Pole numeru`
|
|
185
|
-
};
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/pt-BR.mjs
|
|
188
|
-
var $f12d8c9bdaa0bcb1$exports = {};
|
|
189
|
-
$f12d8c9bdaa0bcb1$exports = {
|
|
190
|
-
"decrease": (args) => `Diminuir ${args.fieldLabel}`,
|
|
191
|
-
"increase": (args) => `Aumentar ${args.fieldLabel}`,
|
|
192
|
-
"numberField": `Campo de n\xfamero`
|
|
193
|
-
};
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/pt-PT.mjs
|
|
196
|
-
var $8b1446e7064e2ed7$exports = {};
|
|
197
|
-
$8b1446e7064e2ed7$exports = {
|
|
198
|
-
"decrease": (args) => `Diminuir ${args.fieldLabel}`,
|
|
199
|
-
"increase": (args) => `Aumentar ${args.fieldLabel}`,
|
|
200
|
-
"numberField": `Campo num\xe9rico`
|
|
201
|
-
};
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/ro-RO.mjs
|
|
204
|
-
var $c709bb06dc2a8e23$exports = {};
|
|
205
|
-
$c709bb06dc2a8e23$exports = {
|
|
206
|
-
"decrease": (args) => `Sc\u{103}dere ${args.fieldLabel}`,
|
|
207
|
-
"increase": (args) => `Cre\u{219}tere ${args.fieldLabel}`,
|
|
208
|
-
"numberField": `C\xe2mp numeric`
|
|
209
|
-
};
|
|
210
|
-
//#endregion
|
|
211
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/ru-RU.mjs
|
|
212
|
-
var $915fe8001bee7d0a$exports = {};
|
|
213
|
-
$915fe8001bee7d0a$exports = {
|
|
214
|
-
"decrease": (args) => `\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${args.fieldLabel}`,
|
|
215
|
-
"increase": (args) => `\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${args.fieldLabel}`,
|
|
216
|
-
"numberField": `\u{427}\u{438}\u{441}\u{43B}\u{43E}\u{432}\u{43E}\u{435} \u{43F}\u{43E}\u{43B}\u{435}`
|
|
217
|
-
};
|
|
218
|
-
//#endregion
|
|
219
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/sk-SK.mjs
|
|
220
|
-
var $79e778f6a71e6e7d$exports = {};
|
|
221
|
-
$79e778f6a71e6e7d$exports = {
|
|
222
|
-
"decrease": (args) => `Zn\xed\u{17E}i\u{165} ${args.fieldLabel}`,
|
|
223
|
-
"increase": (args) => `Zv\xfd\u{161}i\u{165} ${args.fieldLabel}`,
|
|
224
|
-
"numberField": `\u{10C}\xedseln\xe9 pole`
|
|
225
|
-
};
|
|
226
|
-
//#endregion
|
|
227
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/sl-SI.mjs
|
|
228
|
-
var $6799bde136a492e8$exports = {};
|
|
229
|
-
$6799bde136a492e8$exports = {
|
|
230
|
-
"decrease": (args) => `Upadati ${args.fieldLabel}`,
|
|
231
|
-
"increase": (args) => `Pove\u{10D}ajte ${args.fieldLabel}`,
|
|
232
|
-
"numberField": `\u{160}tevil\u{10D}no polje`
|
|
233
|
-
};
|
|
234
|
-
//#endregion
|
|
235
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/sr-SP.mjs
|
|
236
|
-
var $ca2ffb0adac8e2d5$exports = {};
|
|
237
|
-
$ca2ffb0adac8e2d5$exports = {
|
|
238
|
-
"decrease": (args) => `Smanji ${args.fieldLabel}`,
|
|
239
|
-
"increase": (args) => `Pove\u{107}aj ${args.fieldLabel}`,
|
|
240
|
-
"numberField": `Polje broja`
|
|
241
|
-
};
|
|
242
|
-
//#endregion
|
|
243
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/sv-SE.mjs
|
|
244
|
-
var $23a41be500b56b00$exports = {};
|
|
245
|
-
$23a41be500b56b00$exports = {
|
|
246
|
-
"decrease": (args) => `Minska ${args.fieldLabel}`,
|
|
247
|
-
"increase": (args) => `\xd6ka ${args.fieldLabel}`,
|
|
248
|
-
"numberField": `Nummerf\xe4lt`
|
|
249
|
-
};
|
|
250
|
-
//#endregion
|
|
251
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/tr-TR.mjs
|
|
252
|
-
var $5847a002bd1a8278$exports = {};
|
|
253
|
-
$5847a002bd1a8278$exports = {
|
|
254
|
-
"decrease": (args) => `${args.fieldLabel} azalt`,
|
|
255
|
-
"increase": (args) => `${args.fieldLabel} artt\u{131}r`,
|
|
256
|
-
"numberField": `Say\u{131} alan\u{131}`
|
|
257
|
-
};
|
|
258
|
-
//#endregion
|
|
259
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/uk-UA.mjs
|
|
260
|
-
var $e802b0c478fad83f$exports = {};
|
|
261
|
-
$e802b0c478fad83f$exports = {
|
|
262
|
-
"decrease": (args) => `\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${args.fieldLabel}`,
|
|
263
|
-
"increase": (args) => `\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${args.fieldLabel}`,
|
|
264
|
-
"numberField": `\u{41F}\u{43E}\u{43B}\u{435} \u{43D}\u{43E}\u{43C}\u{435}\u{440}\u{430}`
|
|
265
|
-
};
|
|
266
|
-
//#endregion
|
|
267
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/zh-CN.mjs
|
|
268
|
-
var $9bee35dcd8ee2f43$exports = {};
|
|
269
|
-
$9bee35dcd8ee2f43$exports = {
|
|
270
|
-
"decrease": (args) => `\u{964D}\u{4F4E} ${args.fieldLabel}`,
|
|
271
|
-
"increase": (args) => `\u{63D0}\u{9AD8} ${args.fieldLabel}`,
|
|
272
|
-
"numberField": `\u{6570}\u{5B57}\u{5B57}\u{6BB5}`
|
|
273
|
-
};
|
|
274
|
-
//#endregion
|
|
275
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/intl/numberfield/zh-TW.mjs
|
|
276
|
-
var $7f5044f0e0d68e7e$exports = {};
|
|
277
|
-
$7f5044f0e0d68e7e$exports = {
|
|
278
|
-
"decrease": (args) => `\u{7E2E}\u{5C0F} ${args.fieldLabel}`,
|
|
279
|
-
"increase": (args) => `\u{653E}\u{5927} ${args.fieldLabel}`,
|
|
280
|
-
"numberField": `\u{6578}\u{5B57}\u{6B04}\u{4F4D}`
|
|
281
|
-
};
|
|
282
|
-
//#endregion
|
|
283
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/numberfield/intlStrings.mjs
|
|
284
|
-
var $fda7dc186b468fdb$exports = {};
|
|
285
|
-
$fda7dc186b468fdb$exports = {
|
|
286
|
-
"ar-AE": $50f1093a6d23d116$exports,
|
|
287
|
-
"bg-BG": $8f4fd2367d49b0f4$exports,
|
|
288
|
-
"cs-CZ": $060018a1c3ec2fce$exports,
|
|
289
|
-
"da-DK": $34605f3e0266a8f3$exports,
|
|
290
|
-
"de-DE": $64f20e1112866bbd$exports,
|
|
291
|
-
"el-GR": $bfa0aaf1a402f382$exports,
|
|
292
|
-
"en-US": $2656ce930519213b$exports,
|
|
293
|
-
"es-ES": $260cc0fc04d161dd$exports,
|
|
294
|
-
"et-EE": $5929126f62332a39$exports,
|
|
295
|
-
"fi-FI": $fc98374bce6a8f49$exports,
|
|
296
|
-
"fr-FR": $574239e9a0c4ce9f$exports,
|
|
297
|
-
"he-IL": $a80db10c45105af6$exports,
|
|
298
|
-
"hr-HR": $1df8c58f234da60a$exports,
|
|
299
|
-
"hu-HU": $c990249689bb58d0$exports,
|
|
300
|
-
"it-IT": $03e73e050e75c075$exports,
|
|
301
|
-
"ja-JP": $1486a16b22508ab9$exports,
|
|
302
|
-
"ko-KR": $da3ce82ad291e297$exports,
|
|
303
|
-
"lt-LT": $f06e9c465fb83243$exports,
|
|
304
|
-
"lv-LV": $02ed0f44dca8e510$exports,
|
|
305
|
-
"nb-NO": $7d2396d9fde5f3f5$exports,
|
|
306
|
-
"nl-NL": $294f579ef11ab713$exports,
|
|
307
|
-
"pl-PL": $46b77281e4caa836$exports,
|
|
308
|
-
"pt-BR": $f12d8c9bdaa0bcb1$exports,
|
|
309
|
-
"pt-PT": $8b1446e7064e2ed7$exports,
|
|
310
|
-
"ro-RO": $c709bb06dc2a8e23$exports,
|
|
311
|
-
"ru-RU": $915fe8001bee7d0a$exports,
|
|
312
|
-
"sk-SK": $79e778f6a71e6e7d$exports,
|
|
313
|
-
"sl-SI": $6799bde136a492e8$exports,
|
|
314
|
-
"sr-SP": $ca2ffb0adac8e2d5$exports,
|
|
315
|
-
"sv-SE": $23a41be500b56b00$exports,
|
|
316
|
-
"tr-TR": $5847a002bd1a8278$exports,
|
|
317
|
-
"uk-UA": $e802b0c478fad83f$exports,
|
|
318
|
-
"zh-CN": $9bee35dcd8ee2f43$exports,
|
|
319
|
-
"zh-TW": $7f5044f0e0d68e7e$exports
|
|
320
|
-
};
|
|
321
|
-
//#endregion
|
|
322
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/textfield/useTextField.mjs
|
|
323
|
-
function $054f71d2330da2e3$export$712718f7aec83d5(props, ref) {
|
|
324
|
-
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|
|
325
|
-
let [value, setValue] = useControlledState(props.value, props.defaultValue || "", props.onChange);
|
|
326
|
-
let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c(props, ref);
|
|
327
|
-
let validationState = useFormValidationState({
|
|
328
|
-
...props,
|
|
329
|
-
value
|
|
330
|
-
});
|
|
331
|
-
let { isInvalid, validationErrors, validationDetails } = validationState.displayValidation;
|
|
332
|
-
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $191c9b6d48a0a4e2$export$294aa081a6c6f55d({
|
|
333
|
-
...props,
|
|
334
|
-
isInvalid,
|
|
335
|
-
errorMessage: props.errorMessage || validationErrors
|
|
336
|
-
});
|
|
337
|
-
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true });
|
|
338
|
-
const inputOnlyProps = {
|
|
339
|
-
type,
|
|
340
|
-
pattern: props.pattern
|
|
341
|
-
};
|
|
342
|
-
let [initialValue] = useState(value);
|
|
343
|
-
$3274bf1495747a7b$export$5add1d006293d136(ref, props.defaultValue ?? initialValue, setValue);
|
|
344
|
-
$860f7da480e22816$export$b8473d3665f3a75a(props, validationState, ref);
|
|
345
|
-
return {
|
|
346
|
-
labelProps,
|
|
347
|
-
inputProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, inputElementType === "input" ? inputOnlyProps : void 0, {
|
|
348
|
-
disabled: isDisabled,
|
|
349
|
-
readOnly: isReadOnly,
|
|
350
|
-
required: isRequired && validationBehavior === "native",
|
|
351
|
-
"aria-required": isRequired && validationBehavior === "aria" || void 0,
|
|
352
|
-
"aria-invalid": isInvalid || void 0,
|
|
353
|
-
"aria-errormessage": props["aria-errormessage"],
|
|
354
|
-
"aria-activedescendant": props["aria-activedescendant"],
|
|
355
|
-
"aria-autocomplete": props["aria-autocomplete"],
|
|
356
|
-
"aria-haspopup": props["aria-haspopup"],
|
|
357
|
-
"aria-controls": props["aria-controls"],
|
|
358
|
-
value,
|
|
359
|
-
onChange: (e) => setValue($23f2114a1b82827e$export$e58f029f0fbfdb29(e).value),
|
|
360
|
-
autoComplete: props.autoComplete,
|
|
361
|
-
autoCapitalize: props.autoCapitalize,
|
|
362
|
-
maxLength: props.maxLength,
|
|
363
|
-
minLength: props.minLength,
|
|
364
|
-
name: props.name,
|
|
365
|
-
form: props.form,
|
|
366
|
-
placeholder: props.placeholder,
|
|
367
|
-
inputMode: props.inputMode,
|
|
368
|
-
autoCorrect: props.autoCorrect,
|
|
369
|
-
spellCheck: props.spellCheck,
|
|
370
|
-
[parseInt($ahdqC$react.version, 10) >= 17 ? "enterKeyHint" : "enterkeyhint"]: props.enterKeyHint,
|
|
371
|
-
onCopy: props.onCopy,
|
|
372
|
-
onCut: props.onCut,
|
|
373
|
-
onPaste: props.onPaste,
|
|
374
|
-
onCompositionEnd: props.onCompositionEnd,
|
|
375
|
-
onCompositionStart: props.onCompositionStart,
|
|
376
|
-
onCompositionUpdate: props.onCompositionUpdate,
|
|
377
|
-
onSelect: props.onSelect,
|
|
378
|
-
onBeforeInput: props.onBeforeInput,
|
|
379
|
-
onInput: props.onInput,
|
|
380
|
-
...focusableProps,
|
|
381
|
-
...fieldProps
|
|
382
|
-
}),
|
|
383
|
-
descriptionProps,
|
|
384
|
-
errorMessageProps,
|
|
385
|
-
isInvalid,
|
|
386
|
-
validationErrors,
|
|
387
|
-
validationDetails
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/textfield/useFormattedTextField.mjs
|
|
392
|
-
function $62888b2ec35be488$var$supportsNativeBeforeInputEvent() {
|
|
393
|
-
return typeof window !== "undefined" && window.InputEvent && typeof InputEvent.prototype.getTargetRanges === "function";
|
|
394
|
-
}
|
|
395
|
-
function $62888b2ec35be488$export$4f384c9210e583c3(props, state, inputRef) {
|
|
396
|
-
let onBeforeInputFallback = $fe16bffc7a557bf0$export$7f54fc3180508a52((e) => {
|
|
397
|
-
let input = inputRef.current;
|
|
398
|
-
if (!input) return;
|
|
399
|
-
let nextValue = null;
|
|
400
|
-
switch (e.inputType) {
|
|
401
|
-
case "historyUndo":
|
|
402
|
-
case "historyRedo": return;
|
|
403
|
-
case "insertLineBreak": return;
|
|
404
|
-
case "deleteContent":
|
|
405
|
-
case "deleteByCut":
|
|
406
|
-
case "deleteByDrag":
|
|
407
|
-
nextValue = input.value.slice(0, input.selectionStart) + input.value.slice(input.selectionEnd);
|
|
408
|
-
break;
|
|
409
|
-
case "deleteContentForward":
|
|
410
|
-
nextValue = input.selectionEnd === input.selectionStart ? input.value.slice(0, input.selectionStart) + input.value.slice(input.selectionEnd + 1) : input.value.slice(0, input.selectionStart) + input.value.slice(input.selectionEnd);
|
|
411
|
-
break;
|
|
412
|
-
case "deleteContentBackward":
|
|
413
|
-
nextValue = input.selectionEnd === input.selectionStart ? input.value.slice(0, input.selectionStart - 1) + input.value.slice(input.selectionStart) : input.value.slice(0, input.selectionStart) + input.value.slice(input.selectionEnd);
|
|
414
|
-
break;
|
|
415
|
-
case "deleteSoftLineBackward":
|
|
416
|
-
case "deleteHardLineBackward":
|
|
417
|
-
nextValue = input.value.slice(input.selectionStart);
|
|
418
|
-
break;
|
|
419
|
-
default: if (e.data != null) nextValue = input.value.slice(0, input.selectionStart) + e.data + input.value.slice(input.selectionEnd);
|
|
420
|
-
}
|
|
421
|
-
if (nextValue == null || !state.validate(nextValue)) e.preventDefault();
|
|
422
|
-
});
|
|
423
|
-
useEffect(() => {
|
|
424
|
-
if (!$62888b2ec35be488$var$supportsNativeBeforeInputEvent() || !inputRef.current) return;
|
|
425
|
-
let input = inputRef.current;
|
|
426
|
-
input.addEventListener("beforeinput", onBeforeInputFallback, false);
|
|
427
|
-
return () => {
|
|
428
|
-
input.removeEventListener("beforeinput", onBeforeInputFallback, false);
|
|
429
|
-
};
|
|
430
|
-
}, [inputRef]);
|
|
431
|
-
let onBeforeInput = !$62888b2ec35be488$var$supportsNativeBeforeInputEvent() ? (e) => {
|
|
432
|
-
let nextValue = $23f2114a1b82827e$export$e58f029f0fbfdb29(e).value.slice(0, $23f2114a1b82827e$export$e58f029f0fbfdb29(e).selectionStart) + e.data + $23f2114a1b82827e$export$e58f029f0fbfdb29(e).value.slice($23f2114a1b82827e$export$e58f029f0fbfdb29(e).selectionEnd);
|
|
433
|
-
if (!state.validate(nextValue)) e.preventDefault();
|
|
434
|
-
} : null;
|
|
435
|
-
let { labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps, ...validation } = $054f71d2330da2e3$export$712718f7aec83d5(props, inputRef);
|
|
436
|
-
let compositionStartState = useRef(null);
|
|
437
|
-
return {
|
|
438
|
-
inputProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(textFieldProps, {
|
|
439
|
-
onBeforeInput,
|
|
440
|
-
onCompositionStart() {
|
|
441
|
-
let { value, selectionStart, selectionEnd } = inputRef.current;
|
|
442
|
-
compositionStartState.current = {
|
|
443
|
-
value,
|
|
444
|
-
selectionStart,
|
|
445
|
-
selectionEnd
|
|
446
|
-
};
|
|
447
|
-
},
|
|
448
|
-
onCompositionEnd() {
|
|
449
|
-
if (inputRef.current && !state.validate(inputRef.current.value)) {
|
|
450
|
-
let { value, selectionStart, selectionEnd } = compositionStartState.current;
|
|
451
|
-
inputRef.current.value = value;
|
|
452
|
-
inputRef.current.setSelectionRange(selectionStart, selectionEnd);
|
|
453
|
-
state.setInputValue(value);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}),
|
|
457
|
-
labelProps,
|
|
458
|
-
descriptionProps,
|
|
459
|
-
errorMessageProps,
|
|
460
|
-
...validation
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
//#endregion
|
|
464
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/i18n/useNumberFormatter.mjs
|
|
465
|
-
function $bd90acf18e792be6$export$b7a616150fdb9f44(options = {}) {
|
|
466
|
-
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
467
|
-
return useMemo(() => new $1dfb119a85e764e5$export$cc77c4ff7e8673c5(locale, options), [locale, options]);
|
|
468
|
-
}
|
|
469
|
-
//#endregion
|
|
470
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/interactions/useScrollWheel.mjs
|
|
471
|
-
function $14554ba6a2007b17$export$2123ff2b87c81ca(props, ref) {
|
|
472
|
-
let { onScroll, isDisabled } = props;
|
|
473
|
-
let onScrollHandler = useCallback((e) => {
|
|
474
|
-
if (e.ctrlKey) return;
|
|
475
|
-
e.preventDefault();
|
|
476
|
-
e.stopPropagation();
|
|
477
|
-
if (onScroll) onScroll({
|
|
478
|
-
deltaX: e.deltaX,
|
|
479
|
-
deltaY: e.deltaY
|
|
480
|
-
});
|
|
481
|
-
}, [onScroll]);
|
|
482
|
-
$600b3cf69ae46262$export$90fc3a17d93f704c(ref, "wheel", isDisabled ? void 0 : onScrollHandler);
|
|
483
|
-
}
|
|
484
|
-
//#endregion
|
|
485
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/numberfield/useNumberField.mjs
|
|
486
|
-
function $parcel$interopDefault(a) {
|
|
487
|
-
return a && a.__esModule ? a.default : a;
|
|
488
|
-
}
|
|
489
|
-
function $cd2fa56213693c5e$export$23f548e970bdf099(props, state, inputRef) {
|
|
490
|
-
let { id, decrementAriaLabel, incrementAriaLabel, isDisabled, isReadOnly, isRequired, minValue, maxValue, autoFocus, label, formatOptions, onBlur = () => {}, onFocus, onFocusChange, onKeyDown, onKeyUp, description, errorMessage, isWheelDisabled, ...otherProps } = props;
|
|
491
|
-
let { increment, incrementToMax, decrement, decrementToMin, numberValue, inputValue, commit, commitValidation } = state;
|
|
492
|
-
const stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault($fda7dc186b468fdb$exports), "@react-aria/numberfield");
|
|
493
|
-
let commitAndAnnounce = useCallback(() => {
|
|
494
|
-
let oldValue = inputRef.current?.value ?? "";
|
|
495
|
-
flushSync(() => {
|
|
496
|
-
commit();
|
|
497
|
-
});
|
|
498
|
-
if (inputRef.current?.value !== oldValue) $a46cf152bb926da5$export$a9b970dcc4ae71a9(inputRef.current?.value ?? "", "assertive");
|
|
499
|
-
}, [commit, inputRef]);
|
|
500
|
-
let inputId = $390e54f620492c70$export$f680877a34711e37(id);
|
|
501
|
-
let { focusProps } = $1e74c67db218ce67$export$f8168d8dd8fd66e6({ onBlur() {
|
|
502
|
-
commitAndAnnounce();
|
|
503
|
-
} });
|
|
504
|
-
let numberFormatter = $bd90acf18e792be6$export$b7a616150fdb9f44(formatOptions);
|
|
505
|
-
let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);
|
|
506
|
-
let textValueFormatter = $bd90acf18e792be6$export$b7a616150fdb9f44({
|
|
507
|
-
...formatOptions,
|
|
508
|
-
currencySign: void 0
|
|
509
|
-
});
|
|
510
|
-
let textValue = useMemo(() => isNaN(numberValue) ? "" : textValueFormatter.format(numberValue), [textValueFormatter, numberValue]);
|
|
511
|
-
let { spinButtonProps, incrementButtonProps: incButtonProps, decrementButtonProps: decButtonProps } = $757ec6630f26125c$export$e908e06f4b8e3402({
|
|
512
|
-
isDisabled,
|
|
513
|
-
isReadOnly,
|
|
514
|
-
isRequired,
|
|
515
|
-
maxValue,
|
|
516
|
-
minValue,
|
|
517
|
-
onIncrement: increment,
|
|
518
|
-
onIncrementToMax: incrementToMax,
|
|
519
|
-
onDecrement: decrement,
|
|
520
|
-
onDecrementToMin: decrementToMin,
|
|
521
|
-
value: numberValue,
|
|
522
|
-
textValue
|
|
523
|
-
});
|
|
524
|
-
let [focusWithin, setFocusWithin] = useState(false);
|
|
525
|
-
let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
|
|
526
|
-
isDisabled,
|
|
527
|
-
onFocusWithinChange: setFocusWithin
|
|
528
|
-
});
|
|
529
|
-
$14554ba6a2007b17$export$2123ff2b87c81ca({
|
|
530
|
-
onScroll: useCallback((e) => {
|
|
531
|
-
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
|
|
532
|
-
if (e.deltaY > 0) increment();
|
|
533
|
-
else if (e.deltaY < 0) decrement();
|
|
534
|
-
}, [decrement, increment]),
|
|
535
|
-
isDisabled: isWheelDisabled || isDisabled || isReadOnly || !focusWithin
|
|
536
|
-
}, inputRef);
|
|
537
|
-
let hasDecimals = (intlOptions.maximumFractionDigits ?? 0) > 0;
|
|
538
|
-
let hasNegative = state.minValue === void 0 || isNaN(state.minValue) || state.minValue < 0;
|
|
539
|
-
let inputMode = "numeric";
|
|
540
|
-
if ($2add3ce32c6007eb$export$186c6964ca17d99()) {
|
|
541
|
-
if (hasNegative) inputMode = "text";
|
|
542
|
-
else if (hasDecimals) inputMode = "decimal";
|
|
543
|
-
} else if ($2add3ce32c6007eb$export$a11b0059900ceec8()) {
|
|
544
|
-
if (hasNegative) inputMode = "numeric";
|
|
545
|
-
else if (hasDecimals) inputMode = "decimal";
|
|
546
|
-
}
|
|
547
|
-
let onChange = (value) => {
|
|
548
|
-
if (state.validate(value)) state.setInputValue(value);
|
|
549
|
-
};
|
|
550
|
-
let onPaste = (e) => {
|
|
551
|
-
props.onPaste?.(e);
|
|
552
|
-
let inputElement = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
553
|
-
if (inputElement && (inputElement.selectionEnd ?? -1) - (inputElement.selectionStart ?? 0) === inputElement.value.length) {
|
|
554
|
-
e.preventDefault();
|
|
555
|
-
commit(e.clipboardData?.getData?.("text/plain")?.trim() ?? "");
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props);
|
|
559
|
-
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
560
|
-
isDisabled: isDisabled || isReadOnly,
|
|
561
|
-
shortcuts: { Enter: () => {
|
|
562
|
-
flushSync(() => {
|
|
563
|
-
commit();
|
|
564
|
-
});
|
|
565
|
-
commitValidation();
|
|
566
|
-
return { shouldPreventDefault: false };
|
|
567
|
-
} },
|
|
568
|
-
onKeyDown,
|
|
569
|
-
onKeyUp
|
|
570
|
-
});
|
|
571
|
-
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
572
|
-
let { labelProps, inputProps: textFieldPropsFromHook, descriptionProps, errorMessageProps } = $62888b2ec35be488$export$4f384c9210e583c3({
|
|
573
|
-
...otherProps,
|
|
574
|
-
...domProps,
|
|
575
|
-
name: void 0,
|
|
576
|
-
form: void 0,
|
|
577
|
-
label,
|
|
578
|
-
autoFocus,
|
|
579
|
-
isDisabled,
|
|
580
|
-
isReadOnly,
|
|
581
|
-
isRequired,
|
|
582
|
-
validate: void 0,
|
|
583
|
-
[privateValidationStateProp]: state,
|
|
584
|
-
value: inputValue,
|
|
585
|
-
defaultValue: "!",
|
|
586
|
-
autoComplete: "off",
|
|
587
|
-
"aria-label": props["aria-label"] || void 0,
|
|
588
|
-
"aria-labelledby": props["aria-labelledby"] || void 0,
|
|
589
|
-
id: inputId,
|
|
590
|
-
type: "text",
|
|
591
|
-
inputMode,
|
|
592
|
-
onChange,
|
|
593
|
-
onBlur,
|
|
594
|
-
onFocus,
|
|
595
|
-
onFocusChange,
|
|
596
|
-
onPaste,
|
|
597
|
-
description,
|
|
598
|
-
errorMessage
|
|
599
|
-
}, state, inputRef);
|
|
600
|
-
let textFieldProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(keyboardProps, textFieldPropsFromHook);
|
|
601
|
-
$3274bf1495747a7b$export$5add1d006293d136(inputRef, state.defaultNumberValue, state.setNumberValue);
|
|
602
|
-
$cd2fa56213693c5e$var$useNativeValidation(state, props.validationBehavior, props.commitBehavior, inputRef, state.minValue, state.maxValue, props.step, state.numberValue);
|
|
603
|
-
let inputProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(spinButtonProps, focusProps, textFieldProps, {
|
|
604
|
-
role: null,
|
|
605
|
-
"aria-roledescription": !$2add3ce32c6007eb$export$fedb369cb70207f1() ? stringFormatter.format("numberField") : null,
|
|
606
|
-
"aria-valuemax": null,
|
|
607
|
-
"aria-valuemin": null,
|
|
608
|
-
"aria-valuenow": null,
|
|
609
|
-
"aria-valuetext": null,
|
|
610
|
-
autoCorrect: "off",
|
|
611
|
-
spellCheck: "false"
|
|
612
|
-
});
|
|
613
|
-
if (props.validationBehavior === "native") inputProps["aria-required"] = void 0;
|
|
614
|
-
let onButtonPressStart = (e) => {
|
|
615
|
-
if ($23f2114a1b82827e$export$cd4e5573fbe2b576() === inputRef.current) return;
|
|
616
|
-
if (e.pointerType === "mouse") inputRef.current?.focus();
|
|
617
|
-
else e.target.focus();
|
|
618
|
-
};
|
|
619
|
-
let fieldLabel = props["aria-label"] || (typeof props.label === "string" ? props.label : "");
|
|
620
|
-
let ariaLabelledby;
|
|
621
|
-
if (!fieldLabel) ariaLabelledby = props.label != null ? labelProps.id : props["aria-labelledby"];
|
|
622
|
-
let incrementId = $390e54f620492c70$export$f680877a34711e37();
|
|
623
|
-
let decrementId = $390e54f620492c70$export$f680877a34711e37();
|
|
624
|
-
let incrementButtonProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(incButtonProps, {
|
|
625
|
-
"aria-label": incrementAriaLabel || stringFormatter.format("increase", { fieldLabel }).trim(),
|
|
626
|
-
id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,
|
|
627
|
-
"aria-labelledby": ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,
|
|
628
|
-
"aria-controls": inputId,
|
|
629
|
-
excludeFromTabOrder: true,
|
|
630
|
-
preventFocusOnPress: true,
|
|
631
|
-
allowFocusWhenDisabled: true,
|
|
632
|
-
isDisabled: !state.canIncrement,
|
|
633
|
-
onPressStart: onButtonPressStart
|
|
634
|
-
});
|
|
635
|
-
let decrementButtonProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(decButtonProps, {
|
|
636
|
-
"aria-label": decrementAriaLabel || stringFormatter.format("decrease", { fieldLabel }).trim(),
|
|
637
|
-
id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,
|
|
638
|
-
"aria-labelledby": ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,
|
|
639
|
-
"aria-controls": inputId,
|
|
640
|
-
excludeFromTabOrder: true,
|
|
641
|
-
preventFocusOnPress: true,
|
|
642
|
-
allowFocusWhenDisabled: true,
|
|
643
|
-
isDisabled: !state.canDecrement,
|
|
644
|
-
onPressStart: onButtonPressStart
|
|
645
|
-
});
|
|
646
|
-
return {
|
|
647
|
-
groupProps: {
|
|
648
|
-
...focusWithinProps,
|
|
649
|
-
role: "group",
|
|
650
|
-
"aria-disabled": isDisabled,
|
|
651
|
-
"aria-invalid": isInvalid ? "true" : void 0
|
|
652
|
-
},
|
|
653
|
-
labelProps,
|
|
654
|
-
inputProps,
|
|
655
|
-
incrementButtonProps,
|
|
656
|
-
decrementButtonProps,
|
|
657
|
-
errorMessageProps,
|
|
658
|
-
descriptionProps,
|
|
659
|
-
isInvalid,
|
|
660
|
-
validationErrors,
|
|
661
|
-
validationDetails
|
|
662
|
-
};
|
|
663
|
-
}
|
|
664
|
-
let $cd2fa56213693c5e$var$numberInput = null;
|
|
665
|
-
function $cd2fa56213693c5e$var$useNativeValidation(state, validationBehavior, commitBehavior, inputRef, min, max, step, value) {
|
|
666
|
-
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
667
|
-
let input = inputRef.current;
|
|
668
|
-
if (commitBehavior !== "validate" || state.realtimeValidation.isInvalid || !input || input.disabled) return;
|
|
669
|
-
if (!$cd2fa56213693c5e$var$numberInput && typeof document !== "undefined") {
|
|
670
|
-
$cd2fa56213693c5e$var$numberInput = document.createElement("input");
|
|
671
|
-
$cd2fa56213693c5e$var$numberInput.type = "number";
|
|
672
|
-
}
|
|
673
|
-
if (!$cd2fa56213693c5e$var$numberInput) return;
|
|
674
|
-
$cd2fa56213693c5e$var$numberInput.min = min != null && !isNaN(min) ? String(min) : "";
|
|
675
|
-
$cd2fa56213693c5e$var$numberInput.max = max != null && !isNaN(max) ? String(max) : "";
|
|
676
|
-
$cd2fa56213693c5e$var$numberInput.step = step != null && !isNaN(step) ? String(step) : "";
|
|
677
|
-
$cd2fa56213693c5e$var$numberInput.value = value != null && !isNaN(value) ? String(value) : "";
|
|
678
|
-
let valid = input.validity.valid && $cd2fa56213693c5e$var$numberInput.validity.valid;
|
|
679
|
-
let validationMessage = input.validationMessage || $cd2fa56213693c5e$var$numberInput.validationMessage;
|
|
680
|
-
let validity = {
|
|
681
|
-
isInvalid: !valid,
|
|
682
|
-
validationErrors: validationMessage ? [validationMessage] : [],
|
|
683
|
-
validationDetails: {
|
|
684
|
-
badInput: input.validity.badInput,
|
|
685
|
-
customError: input.validity.customError,
|
|
686
|
-
patternMismatch: input.validity.patternMismatch,
|
|
687
|
-
rangeOverflow: $cd2fa56213693c5e$var$numberInput.validity.rangeOverflow,
|
|
688
|
-
rangeUnderflow: $cd2fa56213693c5e$var$numberInput.validity.rangeUnderflow,
|
|
689
|
-
stepMismatch: $cd2fa56213693c5e$var$numberInput.validity.stepMismatch,
|
|
690
|
-
tooLong: input.validity.tooLong,
|
|
691
|
-
tooShort: input.validity.tooShort,
|
|
692
|
-
typeMismatch: input.validity.typeMismatch,
|
|
693
|
-
valueMissing: input.validity.valueMissing,
|
|
694
|
-
valid
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
state.updateValidation(validity);
|
|
698
|
-
if (validationBehavior === "native" && !$cd2fa56213693c5e$var$numberInput.validity.valid) input.setCustomValidity($cd2fa56213693c5e$var$numberInput.validationMessage);
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
//#endregion
|
|
702
|
-
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/utils/number.mjs
|
|
703
|
-
/**
|
|
704
|
-
* Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest
|
|
705
|
-
* valid step.
|
|
706
|
-
*/ function $240e9101ba2842f5$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {
|
|
707
|
-
return Math.min(Math.max(value, min), max);
|
|
708
|
-
}
|
|
709
|
-
function $240e9101ba2842f5$export$e1a7b8e69ef6c52f(value, step) {
|
|
710
|
-
let roundedValue = value;
|
|
711
|
-
let precision = 0;
|
|
712
|
-
let stepString = step.toString();
|
|
713
|
-
let eIndex = stepString.toLowerCase().indexOf("e-");
|
|
714
|
-
if (eIndex > 0) precision = Math.abs(Math.floor(Math.log10(Math.abs(step)))) + eIndex;
|
|
715
|
-
else {
|
|
716
|
-
let pointIndex = stepString.indexOf(".");
|
|
717
|
-
if (pointIndex >= 0) precision = stepString.length - pointIndex;
|
|
718
|
-
}
|
|
719
|
-
if (precision > 0) {
|
|
720
|
-
let pow = Math.pow(10, precision);
|
|
721
|
-
roundedValue = Math.round(roundedValue * pow) / pow;
|
|
722
|
-
}
|
|
723
|
-
return roundedValue;
|
|
724
|
-
}
|
|
725
|
-
function $240e9101ba2842f5$export$cb6e0bb50bc19463(value, min, max, step) {
|
|
726
|
-
min = Number(min);
|
|
727
|
-
max = Number(max);
|
|
728
|
-
let remainder = (value - (isNaN(min) ? 0 : min)) % step;
|
|
729
|
-
let snappedValue = $240e9101ba2842f5$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
|
|
730
|
-
if (!isNaN(min)) {
|
|
731
|
-
if (snappedValue < min) snappedValue = min;
|
|
732
|
-
else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($240e9101ba2842f5$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
|
|
733
|
-
} else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($240e9101ba2842f5$export$e1a7b8e69ef6c52f(max / step, step)) * step;
|
|
734
|
-
snappedValue = $240e9101ba2842f5$export$e1a7b8e69ef6c52f(snappedValue, step);
|
|
735
|
-
return snappedValue;
|
|
736
|
-
}
|
|
737
|
-
//#endregion
|
|
738
|
-
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/numberfield/useNumberFieldState.mjs
|
|
739
|
-
function $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c(props) {
|
|
740
|
-
let { minValue, maxValue, step, formatOptions, value, defaultValue = NaN, onChange, locale, isDisabled, isReadOnly, commitBehavior = "snap" } = props;
|
|
741
|
-
if (value === null) value = NaN;
|
|
742
|
-
let snapValue = useCallback((value) => {
|
|
743
|
-
return step === void 0 || isNaN(step) ? $240e9101ba2842f5$export$7d15b64cf5a3a4c4(value, minValue, maxValue) : $240e9101ba2842f5$export$cb6e0bb50bc19463(value, minValue, maxValue, step);
|
|
744
|
-
}, [
|
|
745
|
-
step,
|
|
746
|
-
minValue,
|
|
747
|
-
maxValue
|
|
748
|
-
]);
|
|
749
|
-
if (value !== void 0 && !isNaN(value) && commitBehavior === "snap") value = snapValue(value);
|
|
750
|
-
if (!isNaN(defaultValue) && commitBehavior === "snap") defaultValue = snapValue(defaultValue);
|
|
751
|
-
let [numberValue, setNumberValue] = $3e6197669829fe11$export$40bfa8c7b0832715(value, isNaN(defaultValue) ? NaN : defaultValue, onChange);
|
|
752
|
-
let [initialValue] = useState(numberValue);
|
|
753
|
-
let [inputValue, setInputValue] = useState(() => isNaN(numberValue) ? "" : new $1dfb119a85e764e5$export$cc77c4ff7e8673c5(locale, formatOptions).format(numberValue));
|
|
754
|
-
let numberParser = useMemo(() => new $eb76cf4feb040f77$export$cd11ab140839f11d(locale, formatOptions), [locale, formatOptions]);
|
|
755
|
-
let numberingSystem = useMemo(() => numberParser.getNumberingSystem(inputValue), [numberParser, inputValue]);
|
|
756
|
-
let formatter = useMemo(() => new $1dfb119a85e764e5$export$cc77c4ff7e8673c5(locale, {
|
|
757
|
-
...formatOptions,
|
|
758
|
-
numberingSystem
|
|
759
|
-
}), [
|
|
760
|
-
locale,
|
|
761
|
-
formatOptions,
|
|
762
|
-
numberingSystem
|
|
763
|
-
]);
|
|
764
|
-
let intlOptions = useMemo(() => formatter.resolvedOptions(), [formatter]);
|
|
765
|
-
let format = useCallback((value) => isNaN(value) || value === null ? "" : formatter.format(value), [formatter]);
|
|
766
|
-
let validation = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
|
|
767
|
-
...props,
|
|
768
|
-
value: numberValue
|
|
769
|
-
});
|
|
770
|
-
let clampStep = step !== void 0 && !isNaN(step) ? step : 1;
|
|
771
|
-
if (intlOptions.style === "percent" && (step === void 0 || isNaN(step))) clampStep = .01;
|
|
772
|
-
let [prevValue, setPrevValue] = useState(numberValue);
|
|
773
|
-
let [prevLocale, setPrevLocale] = useState(locale);
|
|
774
|
-
let [prevFormatOptions, setPrevFormatOptions] = useState(formatOptions);
|
|
775
|
-
if (!Object.is(numberValue, prevValue) || locale !== prevLocale || !$3d0ee518c6f3d04f$var$isEqualFormatOptions(formatOptions, prevFormatOptions)) {
|
|
776
|
-
setInputValue(format(numberValue));
|
|
777
|
-
setPrevValue(numberValue);
|
|
778
|
-
setPrevLocale(locale);
|
|
779
|
-
setPrevFormatOptions(formatOptions);
|
|
780
|
-
}
|
|
781
|
-
let parsedValue = useMemo(() => numberParser.parse(inputValue), [numberParser, inputValue]);
|
|
782
|
-
let commit = (overrideValue) => {
|
|
783
|
-
let newInputValue = overrideValue === void 0 ? inputValue : overrideValue;
|
|
784
|
-
let newParsedValue = parsedValue;
|
|
785
|
-
if (overrideValue !== void 0) newParsedValue = numberParser.parse(newInputValue);
|
|
786
|
-
if (!newInputValue.length) {
|
|
787
|
-
setNumberValue(NaN);
|
|
788
|
-
setInputValue(value === void 0 ? "" : format(numberValue));
|
|
789
|
-
return;
|
|
790
|
-
}
|
|
791
|
-
if (isNaN(newParsedValue)) {
|
|
792
|
-
setInputValue(format(numberValue));
|
|
793
|
-
return;
|
|
794
|
-
}
|
|
795
|
-
let clampedValue = commitBehavior === "snap" ? snapValue(newParsedValue) : newParsedValue;
|
|
796
|
-
clampedValue = numberParser.parse(format(clampedValue));
|
|
797
|
-
let shouldValidate = clampedValue !== numberValue;
|
|
798
|
-
setNumberValue(clampedValue);
|
|
799
|
-
setInputValue(format(value === void 0 ? clampedValue : numberValue));
|
|
800
|
-
if (shouldValidate) validation.commitValidation();
|
|
801
|
-
};
|
|
802
|
-
let safeNextStep = (operation, minMax = 0) => {
|
|
803
|
-
let prev = parsedValue;
|
|
804
|
-
if (isNaN(prev)) return $240e9101ba2842f5$export$cb6e0bb50bc19463(isNaN(minMax) ? 0 : minMax, minValue, maxValue, clampStep);
|
|
805
|
-
else {
|
|
806
|
-
let newValue = $240e9101ba2842f5$export$cb6e0bb50bc19463(prev, minValue, maxValue, clampStep);
|
|
807
|
-
if (operation === "+" && newValue > prev || operation === "-" && newValue < prev) return newValue;
|
|
808
|
-
return $240e9101ba2842f5$export$cb6e0bb50bc19463($3d0ee518c6f3d04f$var$handleDecimalOperation(operation, prev, clampStep), minValue, maxValue, clampStep);
|
|
809
|
-
}
|
|
810
|
-
};
|
|
811
|
-
let increment = () => {
|
|
812
|
-
let newValue = safeNextStep("+", minValue);
|
|
813
|
-
if (newValue === numberValue) setInputValue(format(newValue));
|
|
814
|
-
setNumberValue(newValue);
|
|
815
|
-
validation.commitValidation();
|
|
816
|
-
};
|
|
817
|
-
let decrement = () => {
|
|
818
|
-
let newValue = safeNextStep("-", maxValue);
|
|
819
|
-
if (newValue === numberValue) setInputValue(format(newValue));
|
|
820
|
-
setNumberValue(newValue);
|
|
821
|
-
validation.commitValidation();
|
|
822
|
-
};
|
|
823
|
-
let incrementToMax = () => {
|
|
824
|
-
if (maxValue != null) {
|
|
825
|
-
setNumberValue($240e9101ba2842f5$export$cb6e0bb50bc19463(maxValue, minValue, maxValue, clampStep));
|
|
826
|
-
validation.commitValidation();
|
|
827
|
-
}
|
|
828
|
-
};
|
|
829
|
-
let decrementToMin = () => {
|
|
830
|
-
if (minValue != null) {
|
|
831
|
-
setNumberValue(minValue);
|
|
832
|
-
validation.commitValidation();
|
|
833
|
-
}
|
|
834
|
-
};
|
|
835
|
-
let canIncrement = useMemo(() => !isDisabled && !isReadOnly && (isNaN(parsedValue) || maxValue === void 0 || isNaN(maxValue) || $240e9101ba2842f5$export$cb6e0bb50bc19463(parsedValue, minValue, maxValue, clampStep) > parsedValue || $3d0ee518c6f3d04f$var$handleDecimalOperation("+", parsedValue, clampStep) <= maxValue), [
|
|
836
|
-
isDisabled,
|
|
837
|
-
isReadOnly,
|
|
838
|
-
minValue,
|
|
839
|
-
maxValue,
|
|
840
|
-
clampStep,
|
|
841
|
-
parsedValue
|
|
842
|
-
]);
|
|
843
|
-
let canDecrement = useMemo(() => !isDisabled && !isReadOnly && (isNaN(parsedValue) || minValue === void 0 || isNaN(minValue) || $240e9101ba2842f5$export$cb6e0bb50bc19463(parsedValue, minValue, maxValue, clampStep) < parsedValue || $3d0ee518c6f3d04f$var$handleDecimalOperation("-", parsedValue, clampStep) >= minValue), [
|
|
844
|
-
isDisabled,
|
|
845
|
-
isReadOnly,
|
|
846
|
-
minValue,
|
|
847
|
-
maxValue,
|
|
848
|
-
clampStep,
|
|
849
|
-
parsedValue
|
|
850
|
-
]);
|
|
851
|
-
let validate = (value) => numberParser.isValidPartialNumber(value, minValue, maxValue);
|
|
852
|
-
return {
|
|
853
|
-
...validation,
|
|
854
|
-
validate,
|
|
855
|
-
increment,
|
|
856
|
-
incrementToMax,
|
|
857
|
-
decrement,
|
|
858
|
-
decrementToMin,
|
|
859
|
-
canIncrement,
|
|
860
|
-
canDecrement,
|
|
861
|
-
minValue,
|
|
862
|
-
maxValue,
|
|
863
|
-
numberValue: parsedValue,
|
|
864
|
-
defaultNumberValue: isNaN(defaultValue) ? initialValue : defaultValue,
|
|
865
|
-
setNumberValue,
|
|
866
|
-
setInputValue,
|
|
867
|
-
inputValue,
|
|
868
|
-
commit
|
|
869
|
-
};
|
|
870
|
-
}
|
|
871
|
-
function $3d0ee518c6f3d04f$var$isEqualFormatOptions(a, b) {
|
|
872
|
-
if (a === b) return true;
|
|
873
|
-
if (!a || !b) return false;
|
|
874
|
-
let aKeys = Object.keys(a);
|
|
875
|
-
let bKeys = Object.keys(b);
|
|
876
|
-
if (aKeys.length !== bKeys.length) return false;
|
|
877
|
-
for (let key of aKeys) if (b[key] !== a[key]) return false;
|
|
878
|
-
return true;
|
|
879
|
-
}
|
|
880
|
-
function $3d0ee518c6f3d04f$var$handleDecimalOperation(operator, value1, value2) {
|
|
881
|
-
let result = operator === "+" ? value1 + value2 : value1 - value2;
|
|
882
|
-
if (value1 % 1 !== 0 || value2 % 1 !== 0) {
|
|
883
|
-
const value1Decimal = value1.toString().split(".");
|
|
884
|
-
const value2Decimal = value2.toString().split(".");
|
|
885
|
-
const value1DecimalLength = value1Decimal[1] && value1Decimal[1].length || 0;
|
|
886
|
-
const value2DecimalLength = value2Decimal[1] && value2Decimal[1].length || 0;
|
|
887
|
-
const multiplier = Math.pow(10, Math.max(value1DecimalLength, value2DecimalLength));
|
|
888
|
-
value1 = Math.round(value1 * multiplier);
|
|
889
|
-
value2 = Math.round(value2 * multiplier);
|
|
890
|
-
result = operator === "+" ? value1 + value2 : value1 - value2;
|
|
891
|
-
result /= multiplier;
|
|
892
|
-
}
|
|
893
|
-
return result;
|
|
894
|
-
}
|
|
895
|
-
//#endregion
|
|
896
|
-
//#region src/components/inputs/Input/shared/numberStatic.utils.ts
|
|
897
|
-
const getStaticNumberDisplayValue = (value, formatter) => {
|
|
898
|
-
if (typeof value !== "number" || !Number.isFinite(value)) return null;
|
|
899
|
-
return formatter.format(value);
|
|
900
|
-
};
|
|
901
|
-
//#endregion
|
|
902
|
-
export { $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c as n, $cd2fa56213693c5e$export$23f548e970bdf099 as r, getStaticNumberDisplayValue as t };
|