@konstructio/ui 0.1.2-alpha.106 → 0.1.2-alpha.107
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 +118 -31
- package/dist/{AdditionalOptions-D0BAS2HG.js → AdditionalOptions-Crcnz0_g.js} +1 -1
- package/dist/{AlertDialogTrigger-BOrb536P.js → AlertDialogTrigger-ouMGAlJW.js} +1 -1
- package/dist/{Breadcrumb-DVBxqgW_.js → Breadcrumb-MrF1Z6w2.js} +1 -1
- package/dist/{Checkbox-B20uoUKD.js → Checkbox-8KnRLpQG.js} +86 -87
- package/dist/{CommandInput-BWt6-vUK.js → CommandInput-CGnqfudl.js} +1 -1
- package/dist/{Counter-DiQb-he2.js → Counter-CDXdP1Af.js} +1 -1
- package/dist/{DropdownButton-hCVYZ1LA.js → DropdownButton-D4QlKGg7.js} +5 -5
- package/dist/{FlagSelectorList-CnJjnsp6.js → FlagSelectorList-tYZNl-tz.js} +22 -18
- package/dist/{HamburgerTrigger-BT2yUUJ-.js → HamburgerTrigger-B_NGSZ2r.js} +19 -19
- package/dist/{ImageUpload-DgCBCa5X.js → ImageUpload-D7HKSXK8.js} +71 -66
- package/dist/Input-is8n7emP.js +195 -0
- package/dist/{Loading-DUh9PMJN.js → Loading-DO8JOWBV.js} +1 -1
- package/dist/{Modal-CkAf9UY7.js → Modal-Dq9BHD_9.js} +2 -2
- package/dist/{Spinner-CUwE2bLm.js → Spinner-BJE79VTl.js} +1 -1
- package/dist/{StepIndicatorContent-CjbjVjS1.js → StepIndicatorContent-BGDvxLzV.js} +1 -1
- package/dist/{Switch-CyJXptgc.js → Switch-C7286Bcu.js} +2 -2
- package/dist/{Toast-DLJDExxw.js → Toast-jSx3Lao8.js} +2 -2
- package/dist/Wrapper-2AUlYAHQ.js +195 -0
- package/dist/{Wrapper-CvDRHgN4.js → Wrapper-CyHxGs4E.js} +1 -1
- package/dist/{Wrapper-B8Ja3k4j.js → Wrapper-a7RVCcrn.js} +238 -232
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/components/List/List.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +65 -60
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +10 -9
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +8 -6
- package/dist/components/Card/Card.js +25 -22
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/CommandShortcut.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +48 -41
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +48 -41
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Divider/Divider.js +7 -7
- package/dist/components/Drawer/Drawer.js +1 -1
- package/dist/components/Drawer/components/Body/Body.js +1 -1
- package/dist/components/Drawer/components/Footer/Footer.js +1 -1
- package/dist/components/Drawer/components/Header/Header.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +2 -2
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +2 -2
- package/dist/components/Filter/components/ResetButton/ResetButton.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +2 -2
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +1 -1
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +4 -3
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +17 -16
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +3 -3
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PieChart/PieChart.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +2 -2
- package/dist/components/Select/Select.js +32 -28
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -1
- package/dist/components/Select/components/List/List.js +78 -67
- package/dist/components/Select/components/ListItem/ListItem.js +1 -1
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +1 -1
- package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Label/Label.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +1 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.js +1 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +2 -2
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +25 -24
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +2 -2
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +2 -2
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/components/Body.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Table/components/Head.js +1 -1
- package/dist/components/Table/components/Row.js +1 -1
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/Tabs/components/Content.js +2 -2
- package/dist/components/Tabs/components/List.js +2 -2
- package/dist/components/Tabs/components/Trigger.js +2 -2
- package/dist/components/Tag/Tag.js +8 -8
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.js +1 -1
- package/dist/components/TagSelect/components/List/List.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TextArea/TextArea.js +71 -26
- package/dist/components/TextArea/TextArea.variants.js +49 -13
- package/dist/components/TimePicker/components/HoursList/HoursList.js +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +113 -98
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +19 -18
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +2 -2
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +2 -2
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +2 -2
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +2 -2
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +2 -2
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +1 -1
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +12 -12
- package/dist/{components-MnxnhLqM.js → components-CaEW5ge4.js} +32 -32
- package/dist/{constants-CSsr7_YV.js → constants-HQIXhj2t.js} +1 -1
- package/dist/contexts/index.js +1 -1
- package/dist/contexts/theme.provider.js +1 -1
- package/dist/{dist-Z0F27ATp2.js → dist-9WbMf_jT.js} +1 -1
- package/dist/{dist-oJzmvhAb.js → dist-AxOGvL82.js} +1 -1
- package/dist/{dist-CqNOgbfR.js → dist-BIBFLVt1.js} +3 -3
- package/dist/{dist-B6ExqXM_2.js → dist-BnCbAI-c.js} +1 -1
- package/dist/{dist-C87gsBDM.js → dist-CszFjHAP.js} +2 -2
- package/dist/{dist-ut_BEHii.js → dist-pxvIAJzo.js} +2 -2
- package/dist/hooks/useMediaQuery.js +1 -1
- package/dist/index.js +14 -14
- package/dist/lib/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +2 -0
- package/dist/lib/components/Card/Card.types.d.ts +1 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +1 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +1 -0
- package/dist/lib/components/Divider/Divider.d.ts +3 -2
- package/dist/lib/components/Divider/Divider.types.d.ts +4 -0
- package/dist/lib/components/Input/Input.types.d.ts +4 -0
- package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +2 -0
- package/dist/lib/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +2 -0
- package/dist/lib/components/Select/Select.types.d.ts +2 -0
- package/dist/lib/components/Select/components/List/List.types.d.ts +3 -0
- package/dist/lib/components/Select/components/Wrapper.d.ts +2 -0
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -0
- package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.types.d.ts +2 -0
- package/dist/lib/components/Tag/Tag.types.d.ts +1 -0
- package/dist/lib/components/TextArea/TextArea.d.ts +6 -0
- package/dist/lib/components/TextArea/TextArea.types.d.ts +13 -2
- package/dist/lib/components/TextArea/TextArea.variants.d.ts +4 -1
- package/dist/lib/components/TimePicker/TimePicker.types.d.ts +4 -0
- package/dist/lib/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -0
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/package.json +21 -21
- package/dist/{react-B6Nc0Fib.js → react-7zQ6bvbE.js} +290 -289
- package/dist/styles.css +1 -1
- package/dist/{table.provider-DfZ74xMZ.js → table.provider-CWzODR1t.js} +1 -1
- package/dist/{theme.provider-Dw4O3ocC.js → theme.provider-CSL1WCYG.js} +1 -1
- package/dist/utils/index.js +6 -5
- package/dist/{utils-Cx-WzRZF.js → utils-B-6R7kNE.js} +8 -4
- package/package.json +21 -21
- package/dist/Input-wp-rsCmX.js +0 -188
- package/dist/Wrapper-R8fik3ah.js +0 -182
- /package/dist/{dist-DGOjiAnB2.js → dist-DGOjiAnB.js} +0 -0
- /package/dist/{dist-DwxO2RoR2.js → dist-DwxO2RoR.js} +0 -0
- /package/dist/{dist-pWlMx4Fi2.js → dist-pWlMx4Fi.js} +0 -0
- /package/dist/{x-a_LpoXzG2.js → x-a_LpoXzG.js} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { o as Ne } from "./rolldown-runtime-Dw9YIBcH.js";
|
|
2
|
-
import { t as X } from "./utils-
|
|
3
|
-
import { useClickOutside as
|
|
2
|
+
import { n as Be, t as X } from "./utils-B-6R7kNE.js";
|
|
3
|
+
import { useClickOutside as Re } from "./hooks/useClickOutside.js";
|
|
4
4
|
import { Typography as ee } from "./components/Typography/Typography.js";
|
|
5
|
-
import { n as
|
|
6
|
-
import { usePhoneNumberContext as
|
|
7
|
-
import { labelVariants as
|
|
8
|
-
import { getPhoneMask as
|
|
9
|
-
import { FlagContent as
|
|
10
|
-
import { FlagSelectorWrapper as
|
|
11
|
-
import { forwardRef as
|
|
12
|
-
import { jsx as
|
|
5
|
+
import { n as Ge } from "./phone-number.provider-Dkq_p1Gi.js";
|
|
6
|
+
import { usePhoneNumberContext as Le } from "./components/PhoneNumberInput/contexts/phone-number.hook.js";
|
|
7
|
+
import { labelVariants as xe, phoneNumberInputVariants as Ve } from "./components/PhoneNumberInput/PhoneNumberInput.variants.js";
|
|
8
|
+
import { getPhoneMask as Ke } from "./components/PhoneNumberInput/utils/index.js";
|
|
9
|
+
import { FlagContent as De } from "./components/PhoneNumberInput/components/FlagContent/FlagContent.js";
|
|
10
|
+
import { FlagSelectorWrapper as Fe } from "./components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js";
|
|
11
|
+
import { forwardRef as Ue, useCallback as pe, useEffect as de, useId as _e, useImperativeHandle as $e, useMemo as ze, useRef as te } from "react";
|
|
12
|
+
import { jsx as V, jsxs as Z } from "react/jsx-runtime";
|
|
13
13
|
function fe(e, n) {
|
|
14
14
|
(n == null || n > e.length) && (n = e.length);
|
|
15
15
|
for (var t = 0, r = Array(n); t < n; t++) r[t] = e[t];
|
|
16
16
|
return r;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function He(e, n, t) {
|
|
19
19
|
return n = Y(n), (function(r, o) {
|
|
20
20
|
if (o && (typeof o == "object" || typeof o == "function")) return o;
|
|
21
21
|
if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
@@ -25,10 +25,10 @@ function ze(e, n, t) {
|
|
|
25
25
|
})(r);
|
|
26
26
|
})(e, ke() ? Reflect.construct(n, t || [], Y(e).constructor) : n.apply(e, t));
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function We(e, n) {
|
|
29
29
|
if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Ze(e, n, t) {
|
|
32
32
|
return Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
33
33
|
}
|
|
34
34
|
function Se(e, n) {
|
|
@@ -107,7 +107,7 @@ function Y(e) {
|
|
|
107
107
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
108
108
|
}, Y(e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Je(e, n) {
|
|
111
111
|
if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
|
|
112
112
|
e.prototype = Object.create(n && n.prototype, { constructor: {
|
|
113
113
|
value: e,
|
|
@@ -146,7 +146,7 @@ function J(e) {
|
|
|
146
146
|
}
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Ye(e, n) {
|
|
150
150
|
if (e == null) return {};
|
|
151
151
|
var t, r, o = (function(l, c) {
|
|
152
152
|
if (l == null) return {};
|
|
@@ -168,15 +168,15 @@ function re(e, n) {
|
|
|
168
168
|
return t.__proto__ = r, t;
|
|
169
169
|
}, re(e, n);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function $(e, n) {
|
|
172
172
|
var t, r = n.replacementChars, o = n.replacement, a = n.separate, l = r, c = "", i = Se(e);
|
|
173
173
|
try {
|
|
174
174
|
for (i.s(); !(t = i.n()).done; ) {
|
|
175
175
|
var u, s = t.value, d = !Object.prototype.hasOwnProperty.call(o, s) && ((u = o[l[0]]) === null || u === void 0 ? void 0 : u.test(s));
|
|
176
176
|
(a && s === l[0] || d) && (l = l.slice(1), c += s);
|
|
177
177
|
}
|
|
178
|
-
} catch (
|
|
179
|
-
i.e(
|
|
178
|
+
} catch (g) {
|
|
179
|
+
i.e(g);
|
|
180
180
|
} finally {
|
|
181
181
|
i.f();
|
|
182
182
|
}
|
|
@@ -190,8 +190,8 @@ function Me(e, n) {
|
|
|
190
190
|
if (!l && e[c] === void 0) break;
|
|
191
191
|
Object.prototype.hasOwnProperty.call(o, s) && e[c] !== void 0 ? i += e[c++] : i += s;
|
|
192
192
|
}
|
|
193
|
-
} catch (
|
|
194
|
-
u.e(
|
|
193
|
+
} catch (g) {
|
|
194
|
+
u.e(g);
|
|
195
195
|
} finally {
|
|
196
196
|
u.f();
|
|
197
197
|
}
|
|
@@ -212,19 +212,19 @@ function Pe(e, n) {
|
|
|
212
212
|
}
|
|
213
213
|
return o;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function _(e) {
|
|
216
216
|
return e.length > 0 ? we({}, e, /./) : {};
|
|
217
217
|
}
|
|
218
218
|
function ae(e, n) {
|
|
219
219
|
for (var t = n.start, r = t === void 0 ? 0 : t, o = n.end, a = n.mask, l = n.replacement, c = n.separate, i = e.slice(r, o), u = a.slice(r, o), s = "", d = 0; d < u.length; d++) {
|
|
220
|
-
var
|
|
221
|
-
|
|
220
|
+
var g = Object.prototype.hasOwnProperty.call(l, u[d]);
|
|
221
|
+
g && i[d] !== void 0 && i[d] !== u[d] ? s += i[d] : g && c && (s += u[d]);
|
|
222
222
|
}
|
|
223
223
|
return s;
|
|
224
224
|
}
|
|
225
225
|
function Ee(e, n) {
|
|
226
|
-
var t = n.mask, r = n.replacement, o = typeof r == "string" ?
|
|
227
|
-
return Me(
|
|
226
|
+
var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r, a = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
|
|
227
|
+
return Me($(e, {
|
|
228
228
|
replacementChars: t.replace(a, ""),
|
|
229
229
|
replacement: o,
|
|
230
230
|
separate: !1
|
|
@@ -235,20 +235,20 @@ function Ee(e, n) {
|
|
|
235
235
|
showMask: !1
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
var t = n.mask, r = n.replacement, o = typeof r == "string" ?
|
|
238
|
+
function Qe(e, n) {
|
|
239
|
+
var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r, a = ae(e, {
|
|
240
240
|
mask: t,
|
|
241
241
|
replacement: o,
|
|
242
242
|
separate: !1
|
|
243
243
|
}), l = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
|
|
244
|
-
return
|
|
244
|
+
return $(a, {
|
|
245
245
|
replacementChars: t.replace(l, ""),
|
|
246
246
|
replacement: o,
|
|
247
247
|
separate: !1
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
var t = n.mask, r = n.replacement, o = typeof r == "string" ?
|
|
250
|
+
function qe(e, n) {
|
|
251
|
+
var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r;
|
|
252
252
|
return Pe(Ee(e, {
|
|
253
253
|
mask: t,
|
|
254
254
|
replacement: o
|
|
@@ -257,7 +257,7 @@ function Qe(e, n) {
|
|
|
257
257
|
replacement: o
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
|
-
var
|
|
260
|
+
var Xe = [
|
|
261
261
|
"[",
|
|
262
262
|
"]",
|
|
263
263
|
"\\",
|
|
@@ -275,29 +275,29 @@ var qe = [
|
|
|
275
275
|
"}"
|
|
276
276
|
];
|
|
277
277
|
function ve(e) {
|
|
278
|
-
return
|
|
278
|
+
return Xe.includes(e) ? "\\".concat(e) : e;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
for (var t = n.mask, r = n.replacement, o = typeof r == "string" ?
|
|
280
|
+
function en(e, n) {
|
|
281
|
+
for (var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r, a = e === "partial" || e === "partial-inexact", l = e === "full" || e === "partial", c = "", i = 0; i < t.length; i++) {
|
|
282
282
|
var u = t[i];
|
|
283
283
|
i === 0 && (c = "^"), a && (c += "("), c += Object.prototype.hasOwnProperty.call(o, u) ? "".concat(l ? "(?!".concat(ve(u), ")") : "", "(").concat(o[u].source, ")") : ve(u), i === t.length - 1 && (a && (c += ")?".repeat(t.length)), c += "$");
|
|
284
284
|
}
|
|
285
285
|
return c;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function nn(e, n) {
|
|
288
288
|
return new Proxy(e, { set: function(t, r, o) {
|
|
289
289
|
return r === "current" && (o !== e.current && (e.current !== null && n.unregister(e.current), o !== null && n.register(o)), t[r] = o, !0);
|
|
290
290
|
} });
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
return n =
|
|
292
|
+
function tn(e, n, t) {
|
|
293
|
+
return n = H(n), (function(r, o) {
|
|
294
294
|
if (o && (typeof o == "object" || typeof o == "function")) return o;
|
|
295
295
|
if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
296
296
|
return (function(a) {
|
|
297
297
|
if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
298
298
|
return a;
|
|
299
299
|
})(r);
|
|
300
|
-
})(e, ie() ? Reflect.construct(n, t || [],
|
|
300
|
+
})(e, ie() ? Reflect.construct(n, t || [], H(e).constructor) : n.apply(e, t));
|
|
301
301
|
}
|
|
302
302
|
function Ce(e, n) {
|
|
303
303
|
if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
@@ -305,7 +305,7 @@ function Ce(e, n) {
|
|
|
305
305
|
function je(e, n, t) {
|
|
306
306
|
return Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function rn(e, n, t) {
|
|
309
309
|
return (n = (function(r) {
|
|
310
310
|
var o = (function(a, l) {
|
|
311
311
|
if (typeof a != "object" || !a) return a;
|
|
@@ -325,18 +325,18 @@ function tn(e, n, t) {
|
|
|
325
325
|
writable: !0
|
|
326
326
|
}) : e[n] = t, e;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
return
|
|
328
|
+
function H(e) {
|
|
329
|
+
return H = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
|
|
330
330
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
331
|
-
},
|
|
331
|
+
}, H(e);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function an(e, n) {
|
|
334
334
|
if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
|
|
335
335
|
e.prototype = Object.create(n && n.prototype, { constructor: {
|
|
336
336
|
value: e,
|
|
337
337
|
writable: !0,
|
|
338
338
|
configurable: !0
|
|
339
|
-
} }), Object.defineProperty(e, "prototype", { writable: !1 }), n &&
|
|
339
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), n && W(e, n);
|
|
340
340
|
}
|
|
341
341
|
function ie() {
|
|
342
342
|
try {
|
|
@@ -362,14 +362,14 @@ function ye(e) {
|
|
|
362
362
|
for (var n = 1; n < arguments.length; n++) {
|
|
363
363
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
364
364
|
n % 2 ? he(Object(t), !0).forEach((function(r) {
|
|
365
|
-
|
|
365
|
+
rn(e, r, t[r]);
|
|
366
366
|
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : he(Object(t)).forEach((function(r) {
|
|
367
367
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
368
368
|
}));
|
|
369
369
|
}
|
|
370
370
|
return e;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function on(e, n) {
|
|
373
373
|
if (e == null) return {};
|
|
374
374
|
var t, r, o = (function(l, c) {
|
|
375
375
|
if (l == null) return {};
|
|
@@ -386,10 +386,10 @@ function an(e, n) {
|
|
|
386
386
|
}
|
|
387
387
|
return o;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
return
|
|
389
|
+
function W(e, n) {
|
|
390
|
+
return W = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
|
|
391
391
|
return t.__proto__ = r, t;
|
|
392
|
-
},
|
|
392
|
+
}, W(e, n);
|
|
393
393
|
}
|
|
394
394
|
function oe(e) {
|
|
395
395
|
var n = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
@@ -412,24 +412,24 @@ function oe(e) {
|
|
|
412
412
|
var c = [null];
|
|
413
413
|
c.push.apply(c, a);
|
|
414
414
|
var i = new (o.bind.apply(o, c))();
|
|
415
|
-
return l &&
|
|
416
|
-
})(t, arguments,
|
|
415
|
+
return l && W(i, l.prototype), i;
|
|
416
|
+
})(t, arguments, H(this).constructor);
|
|
417
417
|
}
|
|
418
418
|
return r.prototype = Object.create(t.prototype, { constructor: {
|
|
419
419
|
value: r,
|
|
420
420
|
enumerable: !1,
|
|
421
421
|
writable: !0,
|
|
422
422
|
configurable: !0
|
|
423
|
-
} }),
|
|
423
|
+
} }), W(r, t);
|
|
424
424
|
}, oe(e);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var z = (function(e) {
|
|
427
427
|
function n(t) {
|
|
428
428
|
var r;
|
|
429
|
-
return Ce(this, n), (r =
|
|
429
|
+
return Ce(this, n), (r = tn(this, n, [t])).name = "SyntheticChangeError", r;
|
|
430
430
|
}
|
|
431
|
-
return
|
|
432
|
-
})(oe(Error)), ge,
|
|
431
|
+
return an(n, e), je(n);
|
|
432
|
+
})(oe(Error)), ge, ln = ["options"], be = [
|
|
433
433
|
"text",
|
|
434
434
|
"email",
|
|
435
435
|
"tel",
|
|
@@ -442,69 +442,69 @@ var _ = (function(e) {
|
|
|
442
442
|
this.register = function(a) {
|
|
443
443
|
var l;
|
|
444
444
|
if (be.includes(a.type)) {
|
|
445
|
-
var c = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = c.initialValue, u = i === void 0 ? "" : i, s = c.controlled, d = s !== void 0 && s,
|
|
445
|
+
var c = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = c.initialValue, u = i === void 0 ? "" : i, s = c.controlled, d = s !== void 0 && s, g = t({
|
|
446
446
|
initialValue: a.value || u,
|
|
447
447
|
controlled: d
|
|
448
|
-
}),
|
|
449
|
-
value:
|
|
450
|
-
options:
|
|
451
|
-
fallbackOptions:
|
|
452
|
-
},
|
|
448
|
+
}), j = g.value, A = g.options, h = {
|
|
449
|
+
value: j,
|
|
450
|
+
options: A,
|
|
451
|
+
fallbackOptions: A
|
|
452
|
+
}, v = {
|
|
453
453
|
id: -1,
|
|
454
454
|
cachedId: -1
|
|
455
455
|
}, p = {
|
|
456
456
|
value: "",
|
|
457
457
|
selectionStart: 0,
|
|
458
458
|
selectionEnd: 0
|
|
459
|
-
},
|
|
460
|
-
Object.defineProperty(a, "value", ye(ye({},
|
|
461
|
-
var
|
|
462
|
-
p.value =
|
|
463
|
-
} })), a.value =
|
|
464
|
-
var
|
|
465
|
-
var
|
|
466
|
-
var
|
|
467
|
-
p.selectionStart = (
|
|
459
|
+
}, O = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
|
|
460
|
+
Object.defineProperty(a, "value", ye(ye({}, O), {}, { set: function(y) {
|
|
461
|
+
var m;
|
|
462
|
+
p.value = y, O == null || (m = O.set) === null || m === void 0 || m.call(a, y);
|
|
463
|
+
} })), a.value = j;
|
|
464
|
+
var S = function() {
|
|
465
|
+
var y = function() {
|
|
466
|
+
var m, T;
|
|
467
|
+
p.selectionStart = (m = a.selectionStart) !== null && m !== void 0 ? m : 0, p.selectionEnd = (T = a.selectionEnd) !== null && T !== void 0 ? T : 0, v.id = window.setTimeout(y);
|
|
468
468
|
};
|
|
469
|
-
|
|
470
|
-
},
|
|
471
|
-
window.clearTimeout(
|
|
472
|
-
},
|
|
469
|
+
v.id = window.setTimeout(y);
|
|
470
|
+
}, M = function() {
|
|
471
|
+
window.clearTimeout(v.id), v.id = -1, v.cachedId = -1;
|
|
472
|
+
}, f = function(y) {
|
|
473
473
|
try {
|
|
474
|
-
var
|
|
475
|
-
if (
|
|
476
|
-
|
|
477
|
-
var
|
|
478
|
-
if (
|
|
479
|
-
var
|
|
480
|
-
if (
|
|
481
|
-
var
|
|
482
|
-
if (
|
|
474
|
+
var m, T;
|
|
475
|
+
if (v.cachedId === v.id) throw new z("The input selection has not been updated.");
|
|
476
|
+
v.cachedId = v.id;
|
|
477
|
+
var P = a.value, b = a.selectionStart, B = a.selectionEnd;
|
|
478
|
+
if (b === null || B === null) throw new z("The selection attributes have not been initialized.");
|
|
479
|
+
var w, k = p.value;
|
|
480
|
+
if (y.inputType === void 0 && (p.selectionStart = 0, p.selectionEnd = k.length), b > p.selectionStart ? w = "insert" : b <= p.selectionStart && b < p.selectionEnd ? w = "deleteBackward" : b === p.selectionEnd && P.length < k.length && (w = "deleteForward"), w === void 0 || (w === "deleteBackward" || w === "deleteForward") && P.length > k.length) throw new z("Input type detection error.");
|
|
481
|
+
var I = "", R = p.selectionStart, E = p.selectionEnd;
|
|
482
|
+
if (w === "insert") I = P.slice(p.selectionStart, b);
|
|
483
483
|
else {
|
|
484
|
-
var
|
|
485
|
-
|
|
484
|
+
var L = k.length - P.length;
|
|
485
|
+
R = b, E = b + L;
|
|
486
486
|
}
|
|
487
|
-
|
|
488
|
-
var
|
|
489
|
-
inputType:
|
|
490
|
-
previousValue:
|
|
491
|
-
previousOptions:
|
|
492
|
-
value:
|
|
493
|
-
addedValue:
|
|
494
|
-
changeStart:
|
|
495
|
-
changeEnd:
|
|
496
|
-
selectionStart:
|
|
497
|
-
selectionEnd:
|
|
498
|
-
}),
|
|
499
|
-
a.value =
|
|
500
|
-
} catch (
|
|
501
|
-
if (a.value = p.value, a.setSelectionRange(p.selectionStart, p.selectionEnd),
|
|
487
|
+
h.value !== k ? h.options = h.fallbackOptions : h.fallbackOptions = h.options;
|
|
488
|
+
var x = h.options, G = r({
|
|
489
|
+
inputType: w,
|
|
490
|
+
previousValue: k,
|
|
491
|
+
previousOptions: x,
|
|
492
|
+
value: P,
|
|
493
|
+
addedValue: I,
|
|
494
|
+
changeStart: R,
|
|
495
|
+
changeEnd: E,
|
|
496
|
+
selectionStart: b,
|
|
497
|
+
selectionEnd: B
|
|
498
|
+
}), C = G.options, N = on(G, ln);
|
|
499
|
+
a.value = N.value, a.setSelectionRange(N.selectionStart, N.selectionEnd), h.value = N.value, h.options = C, p.selectionStart = N.selectionStart, p.selectionEnd = N.selectionEnd, (m = a._valueTracker) === null || m === void 0 || (T = m.setValue) === null || T === void 0 || T.call(m, k);
|
|
500
|
+
} catch (K) {
|
|
501
|
+
if (a.value = p.value, a.setSelectionRange(p.selectionStart, p.selectionEnd), y.preventDefault(), y.stopPropagation(), K.name !== "SyntheticChangeError") throw K;
|
|
502
502
|
}
|
|
503
503
|
};
|
|
504
|
-
document.activeElement === a &&
|
|
505
|
-
onFocus:
|
|
506
|
-
onBlur:
|
|
507
|
-
onInput:
|
|
504
|
+
document.activeElement === a && S(), a.addEventListener("focus", S), a.addEventListener("blur", M), a.addEventListener("input", f), o.set(a, {
|
|
505
|
+
onFocus: S,
|
|
506
|
+
onBlur: M,
|
|
507
|
+
onInput: f
|
|
508
508
|
});
|
|
509
509
|
} else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(be.join(", "), "."));
|
|
510
510
|
}, this.unregister = function(a) {
|
|
@@ -526,12 +526,12 @@ var ne = function(e) {
|
|
|
526
526
|
`), `
|
|
527
527
|
`));
|
|
528
528
|
};
|
|
529
|
-
}, Oe,
|
|
530
|
-
function
|
|
529
|
+
}, Oe, cn = ["track", "modify"];
|
|
530
|
+
function U(e) {
|
|
531
531
|
var n, t, r, o;
|
|
532
532
|
return {
|
|
533
533
|
mask: (n = e.mask) !== null && n !== void 0 ? n : "",
|
|
534
|
-
replacement: typeof e.replacement == "string" ?
|
|
534
|
+
replacement: typeof e.replacement == "string" ? _(e.replacement) : (t = e.replacement) !== null && t !== void 0 ? t : {},
|
|
535
535
|
showMask: (r = e.showMask) !== null && r !== void 0 && r,
|
|
536
536
|
separate: (o = e.separate) !== null && o !== void 0 && o,
|
|
537
537
|
track: e.track,
|
|
@@ -541,24 +541,24 @@ function x(e) {
|
|
|
541
541
|
var Ie = (function(e) {
|
|
542
542
|
function n() {
|
|
543
543
|
var t, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
544
|
-
return
|
|
544
|
+
return We(this, n), (t = He(this, n, [{
|
|
545
545
|
init: function(o) {
|
|
546
|
-
var a = o.initialValue, l = o.controlled, c =
|
|
547
|
-
return a = l || a ? a : d ? i : "", process.env.NODE_ENV !== "production" && (function(
|
|
548
|
-
var
|
|
549
|
-
|
|
550
|
-
var
|
|
551
|
-
return
|
|
546
|
+
var a = o.initialValue, l = o.controlled, c = U(r), i = c.mask, u = c.replacement, s = c.separate, d = c.showMask;
|
|
547
|
+
return a = l || a ? a : d ? i : "", process.env.NODE_ENV !== "production" && (function(g) {
|
|
548
|
+
var j = g.initialValue, A = g.mask, h = g.replacement;
|
|
549
|
+
j.length > A.length && console.error(ne(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(j, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
|
|
550
|
+
var v = Object.keys(h).filter((function(f) {
|
|
551
|
+
return f.length > 1;
|
|
552
552
|
}));
|
|
553
|
-
|
|
554
|
-
for (var p =
|
|
555
|
-
var
|
|
556
|
-
if (!(p[
|
|
557
|
-
|
|
553
|
+
v.length > 0 && console.error(ne(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(v.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
|
|
554
|
+
for (var p = A.slice(0, j.length), O = -1, S = 0; S < p.length; S++) {
|
|
555
|
+
var M = Object.prototype.hasOwnProperty.call(h, p[S]);
|
|
556
|
+
if (!(p[S] === j[S] || M && h[p[S]].test(j[S]))) {
|
|
557
|
+
O = S;
|
|
558
558
|
break;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
|
|
561
|
+
O !== -1 && console.error(ne(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(O, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(j, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
|
|
562
562
|
})({
|
|
563
563
|
initialValue: a,
|
|
564
564
|
mask: i,
|
|
@@ -573,7 +573,7 @@ var Ie = (function(e) {
|
|
|
573
573
|
};
|
|
574
574
|
},
|
|
575
575
|
tracking: function(o) {
|
|
576
|
-
var a = o.inputType, l = o.previousValue, c = o.previousOptions, i = o.addedValue, u = o.changeStart, s = o.changeEnd, d =
|
|
576
|
+
var a = o.inputType, l = o.previousValue, c = o.previousOptions, i = o.addedValue, u = o.changeStart, s = o.changeEnd, d = U(r), g = d.track, j = d.modify, A = Ye(d, cn), h = A.mask, v = A.replacement, p = A.showMask, O = A.separate, S = J(J({}, a === "insert" ? {
|
|
577
577
|
inputType: a,
|
|
578
578
|
data: i
|
|
579
579
|
} : {
|
|
@@ -583,55 +583,55 @@ var Ie = (function(e) {
|
|
|
583
583
|
value: l,
|
|
584
584
|
selectionStart: u,
|
|
585
585
|
selectionEnd: s
|
|
586
|
-
}),
|
|
587
|
-
if (
|
|
588
|
-
|
|
589
|
-
var
|
|
590
|
-
|
|
591
|
-
var
|
|
592
|
-
if (
|
|
593
|
-
replacementChars:
|
|
594
|
-
replacement:
|
|
595
|
-
separate:
|
|
596
|
-
}),
|
|
597
|
-
replacementChars:
|
|
598
|
-
replacement:
|
|
586
|
+
}), M = g?.(S);
|
|
587
|
+
if (M === !1) throw new z("Custom tracking stop.");
|
|
588
|
+
M === null ? i = "" : M !== !0 && M !== void 0 && (i = M);
|
|
589
|
+
var f = j?.(S);
|
|
590
|
+
f?.mask !== void 0 && (h = f.mask), f?.replacement !== void 0 && (v = typeof f?.replacement == "string" ? _(f?.replacement) : f.replacement), f?.showMask !== void 0 && (p = f.showMask), f?.separate !== void 0 && (O = f.separate);
|
|
591
|
+
var y = ae(l, J({ end: u }, c)), m = ae(l, J({ start: s }, c)), T = RegExp("[^".concat(Object.keys(v).join(""), "]"), "g"), P = h.replace(T, "");
|
|
592
|
+
if (y && (y = $(y, {
|
|
593
|
+
replacementChars: P,
|
|
594
|
+
replacement: v,
|
|
595
|
+
separate: O
|
|
596
|
+
}), P = P.slice(y.length)), i && (i = $(i, {
|
|
597
|
+
replacementChars: P,
|
|
598
|
+
replacement: v,
|
|
599
599
|
separate: !1
|
|
600
|
-
}),
|
|
601
|
-
if (
|
|
602
|
-
var
|
|
603
|
-
|
|
600
|
+
}), P = P.slice(i.length)), a === "insert" && i === "") throw new z("The character does not match the key value of the `replacement` object.");
|
|
601
|
+
if (O) {
|
|
602
|
+
var b = h.slice(u, s).replace(T, ""), B = b.length - i.length;
|
|
603
|
+
B < 0 ? m = m.slice(-B) : B > 0 && (m = b.slice(-B) + m);
|
|
604
604
|
}
|
|
605
|
-
|
|
606
|
-
replacementChars:
|
|
607
|
-
replacement:
|
|
608
|
-
separate:
|
|
605
|
+
m && (m = $(m, {
|
|
606
|
+
replacementChars: P,
|
|
607
|
+
replacement: v,
|
|
608
|
+
separate: O
|
|
609
609
|
}));
|
|
610
|
-
var
|
|
611
|
-
mask:
|
|
612
|
-
replacement:
|
|
613
|
-
separate:
|
|
610
|
+
var w = Me(y + i + m, {
|
|
611
|
+
mask: h,
|
|
612
|
+
replacement: v,
|
|
613
|
+
separate: O,
|
|
614
614
|
showMask: p
|
|
615
|
-
}),
|
|
616
|
-
var
|
|
617
|
-
mask:
|
|
615
|
+
}), k = (function(I) {
|
|
616
|
+
var R, E, L, x = I.inputType, G = I.value, C = I.addedValue, N = I.beforeChangeValue, K = I.mask, le = I.replacement, Ae = I.separate, Q = Pe(G, {
|
|
617
|
+
mask: K,
|
|
618
618
|
replacement: le
|
|
619
619
|
}).filter((function(q) {
|
|
620
620
|
var se = q.type;
|
|
621
621
|
return se === "input" || Ae && se === "replacement";
|
|
622
|
-
})), ce = (
|
|
623
|
-
if (
|
|
622
|
+
})), ce = (R = Q[N.length + C.length - 1]) === null || R === void 0 ? void 0 : R.index, D = (E = Q[N.length - 1]) === null || E === void 0 ? void 0 : E.index, F = (L = Q[N.length + C.length]) === null || L === void 0 ? void 0 : L.index;
|
|
623
|
+
if (x === "insert") {
|
|
624
624
|
if (ce !== void 0) return ce + 1;
|
|
625
|
-
if (
|
|
626
|
-
if (
|
|
625
|
+
if (F !== void 0) return F;
|
|
626
|
+
if (D !== void 0) return D + 1;
|
|
627
627
|
}
|
|
628
|
-
if (
|
|
629
|
-
if (
|
|
630
|
-
if (
|
|
628
|
+
if (x === "deleteForward") {
|
|
629
|
+
if (F !== void 0) return F;
|
|
630
|
+
if (D !== void 0) return D + 1;
|
|
631
631
|
}
|
|
632
|
-
if (
|
|
633
|
-
if (
|
|
634
|
-
if (
|
|
632
|
+
if (x === "deleteBackward") {
|
|
633
|
+
if (D !== void 0) return D + 1;
|
|
634
|
+
if (F !== void 0) return F;
|
|
635
635
|
}
|
|
636
636
|
var ue = G.split("").findIndex((function(q) {
|
|
637
637
|
return Object.prototype.hasOwnProperty.call(le, q);
|
|
@@ -639,35 +639,35 @@ var Ie = (function(e) {
|
|
|
639
639
|
return ue !== -1 ? ue : G.length;
|
|
640
640
|
})({
|
|
641
641
|
inputType: a,
|
|
642
|
-
value:
|
|
642
|
+
value: w,
|
|
643
643
|
addedValue: i,
|
|
644
|
-
beforeChangeValue:
|
|
645
|
-
mask:
|
|
646
|
-
replacement:
|
|
647
|
-
separate:
|
|
644
|
+
beforeChangeValue: y,
|
|
645
|
+
mask: h,
|
|
646
|
+
replacement: v,
|
|
647
|
+
separate: O
|
|
648
648
|
});
|
|
649
649
|
return {
|
|
650
|
-
value:
|
|
651
|
-
selectionStart:
|
|
652
|
-
selectionEnd:
|
|
650
|
+
value: w,
|
|
651
|
+
selectionStart: k,
|
|
652
|
+
selectionEnd: k,
|
|
653
653
|
options: {
|
|
654
|
-
mask:
|
|
655
|
-
replacement:
|
|
656
|
-
separate:
|
|
654
|
+
mask: h,
|
|
655
|
+
replacement: v,
|
|
656
|
+
separate: O
|
|
657
657
|
}
|
|
658
658
|
};
|
|
659
659
|
}
|
|
660
660
|
}])).format = function(o) {
|
|
661
|
-
return Ee(o,
|
|
661
|
+
return Ee(o, U(r));
|
|
662
662
|
}, t.formatToParts = function(o) {
|
|
663
|
-
return
|
|
663
|
+
return qe(o, U(r));
|
|
664
664
|
}, t.unformat = function(o) {
|
|
665
|
-
return
|
|
665
|
+
return Qe(o, U(r));
|
|
666
666
|
}, t.generatePattern = function(o) {
|
|
667
|
-
return
|
|
667
|
+
return en(o, U(r));
|
|
668
668
|
}, t;
|
|
669
669
|
}
|
|
670
|
-
return
|
|
670
|
+
return Je(n, Te), Ze(n);
|
|
671
671
|
})();
|
|
672
672
|
Oe = Ie, Object.defineProperty(Oe.prototype, Symbol.toStringTag, {
|
|
673
673
|
writable: !1,
|
|
@@ -675,7 +675,7 @@ Oe = Ie, Object.defineProperty(Oe.prototype, Symbol.toStringTag, {
|
|
|
675
675
|
configurable: !0,
|
|
676
676
|
value: "Mask"
|
|
677
677
|
});
|
|
678
|
-
function
|
|
678
|
+
function un() {
|
|
679
679
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.mask, t = e.replacement, r = e.showMask, o = e.separate, a = e.track, l = e.modify, c = te(null), i = te({
|
|
680
680
|
mask: n,
|
|
681
681
|
replacement: t,
|
|
@@ -684,12 +684,12 @@ function cn() {
|
|
|
684
684
|
track: a,
|
|
685
685
|
modify: l
|
|
686
686
|
});
|
|
687
|
-
return i.current.mask = n, i.current.replacement = t, i.current.showMask = r, i.current.separate = o, i.current.track = a, i.current.modify = l,
|
|
688
|
-
return
|
|
687
|
+
return i.current.mask = n, i.current.replacement = t, i.current.showMask = r, i.current.separate = o, i.current.track = a, i.current.modify = l, ze((function() {
|
|
688
|
+
return nn(c, new Ie(i.current));
|
|
689
689
|
}), []);
|
|
690
690
|
}
|
|
691
|
-
var
|
|
692
|
-
var
|
|
691
|
+
var sn = /* @__PURE__ */ Ne(Ge(), 1);
|
|
692
|
+
var pn = {
|
|
693
693
|
AF: "Afghanistan",
|
|
694
694
|
AL: "Albania",
|
|
695
695
|
DZ: "Algeria",
|
|
@@ -967,90 +967,96 @@ var sn = {
|
|
|
967
967
|
SX: "Sint Maarten (Dutch part)",
|
|
968
968
|
SS: "South Sudan",
|
|
969
969
|
XK: "Kosovo"
|
|
970
|
-
},
|
|
970
|
+
}, dn = {
|
|
971
971
|
locale: "en",
|
|
972
|
-
countries:
|
|
972
|
+
countries: pn
|
|
973
973
|
};
|
|
974
|
-
|
|
975
|
-
var
|
|
976
|
-
const
|
|
977
|
-
mask:
|
|
974
|
+
sn.registerLocale(dn);
|
|
975
|
+
var Pn = Ue(({ disabled: e = !1, error: n, helperText: t, helperTextClassName: r, id: o, isRequired: a, label: l, labelClassName: c, labelWrapperClassName: i, name: u, placeholder: s, showFlagOnSearch: d = !0, showInputFilter: g = !0, showNameOnSearch: j = !0, wrapperClassName: A, showPlaceHolder: h, onChange: v, ...p }, O) => {
|
|
976
|
+
const S = _e(), M = o ?? S, f = `${M}-error`, y = `${M}-helper-text`, m = te(null), { isOpenSelector: T, value: P, selectedCountry: b, onChangeValue: B, handleOpenSelector: w } = Le(), k = typeof n == "string" && n.length > 0, I = !k && !!t, R = Be(k && f, I && y), E = un({
|
|
977
|
+
mask: Ke(b),
|
|
978
978
|
replacement: { _: /\d/ }
|
|
979
979
|
});
|
|
980
|
-
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
},
|
|
984
|
-
|
|
985
|
-
}, [
|
|
986
|
-
|
|
987
|
-
const
|
|
988
|
-
|
|
980
|
+
$e(O, () => E.current, [E]);
|
|
981
|
+
const L = (C) => {
|
|
982
|
+
C.target.value.startsWith(b.prefix) ? B(C.target.value) : B(`${b.prefix} `), v?.(C);
|
|
983
|
+
}, x = pe(() => {
|
|
984
|
+
w(!1);
|
|
985
|
+
}, [w]);
|
|
986
|
+
Re(m, x), de(() => {
|
|
987
|
+
const C = new AbortController(), N = (K) => {
|
|
988
|
+
K.key === "Escape" && w(!1);
|
|
989
989
|
};
|
|
990
|
-
return document.addEventListener("keydown", N, { signal:
|
|
991
|
-
document.hidden &&
|
|
992
|
-
}, { signal:
|
|
993
|
-
|
|
990
|
+
return document.addEventListener("keydown", N, { signal: C.signal }), document.addEventListener("visibilitychange", () => {
|
|
991
|
+
document.hidden && w(!1);
|
|
992
|
+
}, { signal: C.signal }), () => {
|
|
993
|
+
C.abort();
|
|
994
994
|
};
|
|
995
|
-
}, [
|
|
996
|
-
|
|
997
|
-
}, [
|
|
998
|
-
const
|
|
999
|
-
|
|
1000
|
-
}, [
|
|
995
|
+
}, [w]), de(() => {
|
|
996
|
+
E.current && (E.current.value = b.prefix + " ");
|
|
997
|
+
}, [b.code]);
|
|
998
|
+
const G = pe((C) => {
|
|
999
|
+
C === null && E.current?.blur(), E.current = C;
|
|
1000
|
+
}, [E]);
|
|
1001
1001
|
return /* @__PURE__ */ Z("div", {
|
|
1002
1002
|
className: "w-full flex flex-col gap-2",
|
|
1003
1003
|
children: [
|
|
1004
|
-
|
|
1005
|
-
className: X(
|
|
1004
|
+
l ? /* @__PURE__ */ V("div", {
|
|
1005
|
+
className: X(i),
|
|
1006
1006
|
children: /* @__PURE__ */ Z("label", {
|
|
1007
|
-
htmlFor:
|
|
1008
|
-
className:
|
|
1009
|
-
onClick: () => !e &&
|
|
1010
|
-
children: [
|
|
1007
|
+
htmlFor: M,
|
|
1008
|
+
className: xe({ className: c }),
|
|
1009
|
+
onClick: () => !e && E.current?.focus(),
|
|
1010
|
+
children: [l, a && /* @__PURE__ */ V(ee, {
|
|
1011
1011
|
component: "span",
|
|
1012
|
+
"aria-hidden": "true",
|
|
1012
1013
|
className: "text-red-600 dark:text-red-500 ml-1",
|
|
1013
1014
|
children: "*"
|
|
1014
1015
|
})]
|
|
1015
1016
|
})
|
|
1016
1017
|
}) : null,
|
|
1017
1018
|
/* @__PURE__ */ Z("div", {
|
|
1018
|
-
ref:
|
|
1019
|
-
"data-state":
|
|
1019
|
+
ref: m,
|
|
1020
|
+
"data-state": T ? "open" : "closed",
|
|
1020
1021
|
className: Ve({
|
|
1021
|
-
className:
|
|
1022
|
-
variant:
|
|
1022
|
+
className: A,
|
|
1023
|
+
variant: k ? "error" : "default"
|
|
1023
1024
|
}),
|
|
1024
1025
|
children: [/* @__PURE__ */ Z("div", {
|
|
1025
1026
|
className: "p-2 flex items-center gap-2.5",
|
|
1026
|
-
children: [/* @__PURE__ */
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1027
|
+
children: [/* @__PURE__ */ V(De, {}), /* @__PURE__ */ V("input", {
|
|
1028
|
+
...p,
|
|
1029
|
+
id: M,
|
|
1030
|
+
ref: G,
|
|
1031
|
+
name: u,
|
|
1030
1032
|
autoComplete: "off",
|
|
1031
1033
|
className: X("outline-0", "w-full", "caret-slate-800", "text-slate-800", "bg-transparent", "dark:caret-metal-50", "dark:text-metal-50", "disabled:cursor-not-allowed", "disabled:opacity-50"),
|
|
1032
1034
|
type: "tel",
|
|
1033
1035
|
inputMode: "tel",
|
|
1034
|
-
value:
|
|
1035
|
-
onChange:
|
|
1036
|
+
value: P,
|
|
1037
|
+
onChange: L,
|
|
1036
1038
|
disabled: e,
|
|
1037
|
-
|
|
1039
|
+
"aria-invalid": k || void 0,
|
|
1040
|
+
"aria-describedby": R,
|
|
1041
|
+
"aria-required": a || void 0
|
|
1038
1042
|
})]
|
|
1039
|
-
}),
|
|
1040
|
-
placeholder:
|
|
1041
|
-
showFlagOnSearch:
|
|
1042
|
-
showInputFilter:
|
|
1043
|
-
showNameOnSearch:
|
|
1044
|
-
showPlaceHolder:
|
|
1043
|
+
}), T && /* @__PURE__ */ V(Fe, {
|
|
1044
|
+
placeholder: s,
|
|
1045
|
+
showFlagOnSearch: d,
|
|
1046
|
+
showInputFilter: g,
|
|
1047
|
+
showNameOnSearch: j,
|
|
1048
|
+
showPlaceHolder: h
|
|
1045
1049
|
})]
|
|
1046
1050
|
}),
|
|
1047
|
-
|
|
1051
|
+
k ? /* @__PURE__ */ V(ee, {
|
|
1048
1052
|
component: "span",
|
|
1053
|
+
id: f,
|
|
1049
1054
|
className: "text-xs text-red-700 dark:text-red-500",
|
|
1050
1055
|
children: n
|
|
1051
1056
|
}) : null,
|
|
1052
|
-
|
|
1057
|
+
I ? /* @__PURE__ */ V(ee, {
|
|
1053
1058
|
component: "span",
|
|
1059
|
+
id: y,
|
|
1054
1060
|
className: X("text-xs kubefirst-dark:text-slate-200", r),
|
|
1055
1061
|
children: t
|
|
1056
1062
|
}) : null
|
|
@@ -1058,5 +1064,5 @@ var Mn = Fe(({ disabled: e = !1, error: n, helperText: t, helperTextClassName: r
|
|
|
1058
1064
|
});
|
|
1059
1065
|
});
|
|
1060
1066
|
export {
|
|
1061
|
-
|
|
1067
|
+
Pn as t
|
|
1062
1068
|
};
|