@konstructio/ui 0.1.2-alpha.101 → 0.1.2-alpha.103
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/dist/AlertDialogTrigger-CgcsW_ta.js +109 -0
- package/dist/{Breadcrumb-Bmv0vzgt.js → Breadcrumb-Cp3abB2w.js} +1 -1
- package/dist/Checkbox-DzAx7n67.js +249 -0
- package/dist/{CommandInput-CYYsk_31.js → CommandInput-BnvRMfLI.js} +2 -2
- package/dist/{Counter-DWKyr569.js → Counter-CY0xGnVM.js} +2 -2
- package/dist/{DayPicker-CwO8Zff5.js → DayPicker-kweJz134.js} +750 -746
- package/dist/{DropdownButton-Beel5_gN.js → DropdownButton-DnlwdPmb.js} +1 -1
- package/dist/FlagSelectorList-BoYG-_It.js +852 -0
- package/dist/{HamburgerTrigger-7a4POUaM.js → HamburgerTrigger-1vOTrm8-.js} +2 -2
- package/dist/{Input-DG3snJf_.js → Input-CW0VwW2T.js} +4 -4
- package/dist/{Modal-Bcu6LLAp.js → Modal-Bfzggwlr.js} +2 -2
- package/dist/{Spinner-BegZ5yd7.js → Spinner-Lw9mZYhg.js} +1 -1
- package/dist/Switch-WBRr8uOJ.js +196 -0
- package/dist/Toast-ByH-l4XK.js +459 -0
- package/dist/{Wrapper-DwxJAkNQ.js → Wrapper-ClJ_Mham.js} +2 -2
- package/dist/{Wrapper-DtT29fc5.js → Wrapper-XeeD3av7.js} +1 -1
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.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/DialogContent.js +2 -2
- 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/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2 -3
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +4 -3
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +23 -24
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +60 -65
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +35 -43
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +40 -45
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +45 -51
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +28 -0
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +56 -61
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +70 -75
- package/dist/components/Filter/contexts/filter.provider.js +8 -5
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +1 -1
- package/dist/components/Modal/Modal.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/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/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PieChart/PieChart.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/components/List/List.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/TagSelect/TagSelect.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/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +87 -87
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +19 -19
- package/dist/components/VirtualizedTable/components/Body/Body.js +50 -49
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +67 -21
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +53 -63
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +10 -10
- package/dist/components/VirtualizedTable/components/Header/Header.js +47 -34
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +19 -15
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +10 -10
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +8 -8
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-CYt24H4n.js → components-BIHlj4yH.js} +1 -1
- package/dist/{debounce-KoeGNmnW.js → debounce-C5Ycjilj.js} +14 -14
- package/dist/dist-2bGlmy8N2.js +165 -0
- package/dist/dist-BiJrNvNo.js +193 -0
- package/dist/dist-BuFiu480.js +13 -0
- package/dist/dist-C2aTw0m62.js +1320 -0
- package/dist/{dist-DvoMuWKO2.js → dist-C2s4VX-42.js} +4 -4
- package/dist/dist-CT6d9xe7.js +441 -0
- package/dist/dist-CTvBzxW8.js +31 -0
- package/dist/dist-CVDFmWf2.js +358 -0
- package/dist/dist-D4FePjTS.js +194 -0
- package/dist/dist-DISvWx7U.js +99 -0
- package/dist/dist-Db6UeFo4.js +291 -0
- package/dist/{dist-DGO9opgu.js → dist-Dse3gSmZ.js} +49 -49
- package/dist/dist-j7FOUrFU.js +206 -0
- package/dist/{dist-C8NWUTUh.js → dist-l-aDnQZC.js} +1 -1
- package/dist/es2015-BWf6xQHm.js +222 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-1ZmdWuhC.js → isObject-BeFFiVJK.js} +8 -8
- package/dist/lib/components/Alert/Alert.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +2 -2
- package/dist/lib/components/Autocomplete/Autocomplete.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/Button/Button.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +1 -1
- package/dist/lib/components/Card/Card.types.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/lib/components/Command/Command.types.d.ts +1 -1
- package/dist/lib/components/Counter/Counter.types.d.ts +1 -1
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +1 -1
- package/dist/lib/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +3 -0
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +9 -0
- package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
- package/dist/lib/components/ImageUpload/ImageUpload.types.d.ts +1 -1
- package/dist/lib/components/Input/Input.types.d.ts +1 -1
- package/dist/lib/components/LineChart/LineChart.types.d.ts +1 -1
- package/dist/lib/components/Loading/Loading.types.d.ts +1 -1
- package/dist/lib/components/Modal/Modal.types.d.ts +1 -1
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +1 -1
- package/dist/lib/components/Radio/Radio.types.d.ts +1 -1
- package/dist/lib/components/RadioCard/RadioCard.types.d.ts +1 -1
- package/dist/lib/components/RadioCardGroup/RadioCardGroup.types.d.ts +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +1 -1
- package/dist/lib/components/Range/Range.types.d.ts +1 -1
- package/dist/lib/components/Select/Select.types.d.ts +1 -1
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -2
- package/dist/lib/components/Sidebar/components/Label/Label.types.d.ts +1 -1
- package/dist/lib/components/Slider/Slider.types.d.ts +1 -1
- package/dist/lib/components/Spinner/Spinner.types.d.ts +2 -2
- package/dist/lib/components/Stepper/Stepper.types.d.ts +1 -1
- package/dist/lib/components/Stepper/components/StepItem/StepItem.types.d.ts +1 -1
- package/dist/lib/components/Switch/Switch.types.d.ts +1 -1
- package/dist/lib/components/Table/Table.types.d.ts +1 -1
- package/dist/lib/components/Tabs/Tabs.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Item/Item.types.d.ts +2 -2
- package/dist/lib/components/TagSelect/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TextArea/TextArea.types.d.ts +1 -1
- package/dist/lib/components/Toast/Toast.types.d.ts +1 -1
- package/dist/lib/components/Typography/Typography.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +27 -3
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +1 -0
- package/dist/lib/contexts/theme.context.d.ts +1 -1
- package/dist/lib/contexts/theme.hook.d.ts +1 -1
- package/dist/package.json +34 -33
- package/dist/{phone-number.provider-CJJOFYk-.js → phone-number.provider-BxQCTxp8.js} +457 -457
- package/dist/{prop-types-CaJpPVsa.js → prop-types-CfEYxTbR.js} +52 -52
- package/dist/styles.css +1 -1
- package/dist/{table.provider-9uUt5a-s.js → table.provider-2sAkE7z_.js} +395 -368
- package/dist/{utils-B6A9pnrH.js → utils-B-BTGYA5.js} +193 -193
- package/dist/{x-CESTrenk.js → x-BI9jmc7e.js} +1 -1
- package/package.json +34 -33
- package/dist/AlertDialogTrigger-HhbFOOUE.js +0 -124
- package/dist/Checkbox-B1rTwzR3.js +0 -240
- package/dist/FlagSelectorList-BARhzfj2.js +0 -848
- package/dist/Switch-1RGhhTtg.js +0 -178
- package/dist/Toast-CS-igZor.js +0 -467
- package/dist/dist-7edduNXi.js +0 -398
- package/dist/dist-BkYHh2kH.js +0 -408
- package/dist/dist-C6Cif8-U.js +0 -28
- package/dist/dist-CeuUxVmT.js +0 -13
- package/dist/dist-CfYOvauX.js +0 -125
- package/dist/dist-CktbIsHq.js +0 -264
- package/dist/dist-DGqWMRtc.js +0 -183
- package/dist/dist-DdFwUrO22.js +0 -11
- package/dist/dist-DnGj9MTf.js +0 -1692
- package/dist/dist-eAwtFCCA.js +0 -87
- /package/dist/{dist-AihTpWdF2.js → dist-AihTpWdF.js} +0 -0
package/dist/dist-BkYHh2kH.js
DELETED
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
import { a as M } from "./dist-DqKFpce5.js";
|
|
2
|
-
import { t as C } from "./dist-CVy-ulDZ.js";
|
|
3
|
-
import { a as ce, i as P, t as de } from "./dist-CfYOvauX.js";
|
|
4
|
-
import { t as ue } from "./dist-DdFwUrO22.js";
|
|
5
|
-
import { t as fe } from "./dist-DvoMuWKO2.js";
|
|
6
|
-
import { t as me } from "./dist-B-Aoze_D.js";
|
|
7
|
-
import { t as Se } from "./dist-C8NWUTUh.js";
|
|
8
|
-
import * as d from "react";
|
|
9
|
-
import { Fragment as he, jsx as f, jsxs as pe } from "react/jsx-runtime";
|
|
10
|
-
function Y(e, [t, n]) {
|
|
11
|
-
return Math.min(n, Math.max(t, e));
|
|
12
|
-
}
|
|
13
|
-
var $ = ["PageUp", "PageDown"], G = [
|
|
14
|
-
"ArrowUp",
|
|
15
|
-
"ArrowDown",
|
|
16
|
-
"ArrowLeft",
|
|
17
|
-
"ArrowRight"
|
|
18
|
-
], j = {
|
|
19
|
-
"from-left": [
|
|
20
|
-
"Home",
|
|
21
|
-
"PageDown",
|
|
22
|
-
"ArrowDown",
|
|
23
|
-
"ArrowLeft"
|
|
24
|
-
],
|
|
25
|
-
"from-right": [
|
|
26
|
-
"Home",
|
|
27
|
-
"PageDown",
|
|
28
|
-
"ArrowDown",
|
|
29
|
-
"ArrowRight"
|
|
30
|
-
],
|
|
31
|
-
"from-bottom": [
|
|
32
|
-
"Home",
|
|
33
|
-
"PageDown",
|
|
34
|
-
"ArrowDown",
|
|
35
|
-
"ArrowLeft"
|
|
36
|
-
],
|
|
37
|
-
"from-top": [
|
|
38
|
-
"Home",
|
|
39
|
-
"PageDown",
|
|
40
|
-
"ArrowUp",
|
|
41
|
-
"ArrowLeft"
|
|
42
|
-
]
|
|
43
|
-
}, _ = "Slider", [k, ge, ve] = Se(_), [F, Ye] = ce(_, [ve]), [be, T] = F(_), we = d.forwardRef((e, t) => {
|
|
44
|
-
const { name: n, min: r = 0, max: o = 100, step: i = 1, orientation: l = "horizontal", disabled: s = !1, minStepsBetweenThumbs: m = 0, defaultValue: u = [r], value: h, onValueChange: a = () => {
|
|
45
|
-
}, onValueCommit: c = () => {
|
|
46
|
-
}, inverted: b = !1, form: R, ...p } = e, g = d.useRef(/* @__PURE__ */ new Set()), v = d.useRef(0), y = d.useRef(!1), x = l === "horizontal" ? Re : xe, [S = [], B] = de({
|
|
47
|
-
prop: h,
|
|
48
|
-
defaultProp: u,
|
|
49
|
-
onChange: (w) => {
|
|
50
|
-
[...g.current][v.current]?.focus({
|
|
51
|
-
preventScroll: !0,
|
|
52
|
-
focusVisible: y.current
|
|
53
|
-
}), y.current = !1, a(w);
|
|
54
|
-
}
|
|
55
|
-
}), L = d.useRef(S);
|
|
56
|
-
function ae(w) {
|
|
57
|
-
E(w, Ce(S, w));
|
|
58
|
-
}
|
|
59
|
-
function se(w) {
|
|
60
|
-
E(w, v.current);
|
|
61
|
-
}
|
|
62
|
-
function le() {
|
|
63
|
-
const w = L.current[v.current];
|
|
64
|
-
S[v.current] !== w && c(S);
|
|
65
|
-
}
|
|
66
|
-
function E(w, V, { commit: H } = { commit: !1 }) {
|
|
67
|
-
const A = Ke(i), I = Y(Ne(Math.round((w - r) / i) * i + r, A), [r, o]);
|
|
68
|
-
B((K = []) => {
|
|
69
|
-
const D = De(K, I, V);
|
|
70
|
-
if (Ie(D, m * i)) {
|
|
71
|
-
v.current = D.indexOf(I);
|
|
72
|
-
const U = String(D) !== String(K);
|
|
73
|
-
return U && H && c(D), U ? D : K;
|
|
74
|
-
} else return K;
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return /* @__PURE__ */ f(be, {
|
|
78
|
-
scope: e.__scopeSlider,
|
|
79
|
-
name: n,
|
|
80
|
-
disabled: s,
|
|
81
|
-
min: r,
|
|
82
|
-
max: o,
|
|
83
|
-
valueIndexToChangeRef: v,
|
|
84
|
-
thumbs: g.current,
|
|
85
|
-
values: S,
|
|
86
|
-
orientation: l,
|
|
87
|
-
form: R,
|
|
88
|
-
children: /* @__PURE__ */ f(k.Provider, {
|
|
89
|
-
scope: e.__scopeSlider,
|
|
90
|
-
children: /* @__PURE__ */ f(k.Slot, {
|
|
91
|
-
scope: e.__scopeSlider,
|
|
92
|
-
children: /* @__PURE__ */ f(x, {
|
|
93
|
-
"aria-disabled": s,
|
|
94
|
-
"data-disabled": s ? "" : void 0,
|
|
95
|
-
...p,
|
|
96
|
-
ref: t,
|
|
97
|
-
onPointerDown: P(p.onPointerDown, () => {
|
|
98
|
-
s || (L.current = S, y.current = !1);
|
|
99
|
-
}),
|
|
100
|
-
min: r,
|
|
101
|
-
max: o,
|
|
102
|
-
inverted: b,
|
|
103
|
-
onSlideStart: s ? void 0 : ae,
|
|
104
|
-
onSlideMove: s ? void 0 : se,
|
|
105
|
-
onSlideEnd: s ? void 0 : le,
|
|
106
|
-
onHomeKeyDown: () => {
|
|
107
|
-
s || (y.current = !0, E(r, 0, { commit: !0 }));
|
|
108
|
-
},
|
|
109
|
-
onEndKeyDown: () => {
|
|
110
|
-
s || (y.current = !0, E(o, S.length - 1, { commit: !0 }));
|
|
111
|
-
},
|
|
112
|
-
onStepKeyDown: ({ event: w, direction: V }) => {
|
|
113
|
-
if (!s) {
|
|
114
|
-
y.current = !0;
|
|
115
|
-
const H = $.includes(w.key) || w.shiftKey && G.includes(w.key) ? 10 : 1, A = v.current, I = S[A];
|
|
116
|
-
E(I + i * H * V, A, { commit: !0 });
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
})
|
|
121
|
-
})
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
we.displayName = _;
|
|
125
|
-
var [X, W] = F(_, {
|
|
126
|
-
startEdge: "left",
|
|
127
|
-
endEdge: "right",
|
|
128
|
-
size: "width",
|
|
129
|
-
direction: 1
|
|
130
|
-
}), Re = d.forwardRef((e, t) => {
|
|
131
|
-
const { min: n, max: r, dir: o, inverted: i, onSlideStart: l, onSlideMove: s, onSlideEnd: m, onStepKeyDown: u, ...h } = e, [a, c] = d.useState(null), b = M(t, c), R = d.useRef(void 0), p = me(o), g = p === "ltr", v = g && !i || !g && i;
|
|
132
|
-
function y(x) {
|
|
133
|
-
const S = R.current || a.getBoundingClientRect(), B = O([0, S.width], v ? [n, r] : [r, n]);
|
|
134
|
-
return R.current = S, B(x - S.left);
|
|
135
|
-
}
|
|
136
|
-
return /* @__PURE__ */ f(X, {
|
|
137
|
-
scope: e.__scopeSlider,
|
|
138
|
-
startEdge: v ? "left" : "right",
|
|
139
|
-
endEdge: v ? "right" : "left",
|
|
140
|
-
direction: v ? 1 : -1,
|
|
141
|
-
size: "width",
|
|
142
|
-
children: /* @__PURE__ */ f(q, {
|
|
143
|
-
dir: p,
|
|
144
|
-
"data-orientation": "horizontal",
|
|
145
|
-
...h,
|
|
146
|
-
ref: b,
|
|
147
|
-
style: {
|
|
148
|
-
...h.style,
|
|
149
|
-
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
150
|
-
},
|
|
151
|
-
onSlideStart: (x) => {
|
|
152
|
-
const S = y(x.clientX);
|
|
153
|
-
l?.(S);
|
|
154
|
-
},
|
|
155
|
-
onSlideMove: (x) => {
|
|
156
|
-
const S = y(x.clientX);
|
|
157
|
-
s?.(S);
|
|
158
|
-
},
|
|
159
|
-
onSlideEnd: () => {
|
|
160
|
-
R.current = void 0, m?.();
|
|
161
|
-
},
|
|
162
|
-
onStepKeyDown: (x) => {
|
|
163
|
-
const S = j[v ? "from-left" : "from-right"].includes(x.key);
|
|
164
|
-
u?.({
|
|
165
|
-
event: x,
|
|
166
|
-
direction: S ? -1 : 1
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
})
|
|
170
|
-
});
|
|
171
|
-
}), xe = d.forwardRef((e, t) => {
|
|
172
|
-
const { min: n, max: r, inverted: o, onSlideStart: i, onSlideMove: l, onSlideEnd: s, onStepKeyDown: m, ...u } = e, h = d.useRef(null), a = M(t, h), c = d.useRef(void 0), b = !o;
|
|
173
|
-
function R(p) {
|
|
174
|
-
const g = c.current || h.current.getBoundingClientRect(), v = O([0, g.height], b ? [r, n] : [n, r]);
|
|
175
|
-
return c.current = g, v(p - g.top);
|
|
176
|
-
}
|
|
177
|
-
return /* @__PURE__ */ f(X, {
|
|
178
|
-
scope: e.__scopeSlider,
|
|
179
|
-
startEdge: b ? "bottom" : "top",
|
|
180
|
-
endEdge: b ? "top" : "bottom",
|
|
181
|
-
size: "height",
|
|
182
|
-
direction: b ? 1 : -1,
|
|
183
|
-
children: /* @__PURE__ */ f(q, {
|
|
184
|
-
"data-orientation": "vertical",
|
|
185
|
-
...u,
|
|
186
|
-
ref: a,
|
|
187
|
-
style: {
|
|
188
|
-
...u.style,
|
|
189
|
-
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
190
|
-
},
|
|
191
|
-
onSlideStart: (p) => {
|
|
192
|
-
const g = R(p.clientY);
|
|
193
|
-
i?.(g);
|
|
194
|
-
},
|
|
195
|
-
onSlideMove: (p) => {
|
|
196
|
-
const g = R(p.clientY);
|
|
197
|
-
l?.(g);
|
|
198
|
-
},
|
|
199
|
-
onSlideEnd: () => {
|
|
200
|
-
c.current = void 0, s?.();
|
|
201
|
-
},
|
|
202
|
-
onStepKeyDown: (p) => {
|
|
203
|
-
const g = j[b ? "from-bottom" : "from-top"].includes(p.key);
|
|
204
|
-
m?.({
|
|
205
|
-
event: p,
|
|
206
|
-
direction: g ? -1 : 1
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
})
|
|
210
|
-
});
|
|
211
|
-
}), q = d.forwardRef((e, t) => {
|
|
212
|
-
const { __scopeSlider: n, onSlideStart: r, onSlideMove: o, onSlideEnd: i, onHomeKeyDown: l, onEndKeyDown: s, onStepKeyDown: m, ...u } = e, h = T(_, n);
|
|
213
|
-
return /* @__PURE__ */ f(C.span, {
|
|
214
|
-
...u,
|
|
215
|
-
ref: t,
|
|
216
|
-
onKeyDown: P(e.onKeyDown, (a) => {
|
|
217
|
-
a.key === "Home" ? (l(a), a.preventDefault()) : a.key === "End" ? (s(a), a.preventDefault()) : $.concat(G).includes(a.key) && (m(a), a.preventDefault());
|
|
218
|
-
}),
|
|
219
|
-
onPointerDown: P(e.onPointerDown, (a) => {
|
|
220
|
-
const c = a.target;
|
|
221
|
-
c.setPointerCapture(a.pointerId), a.preventDefault(), h.thumbs.has(c) ? c.focus({
|
|
222
|
-
preventScroll: !0,
|
|
223
|
-
focusVisible: !1
|
|
224
|
-
}) : r(a);
|
|
225
|
-
}),
|
|
226
|
-
onPointerMove: P(e.onPointerMove, (a) => {
|
|
227
|
-
a.target.hasPointerCapture(a.pointerId) && o(a);
|
|
228
|
-
}),
|
|
229
|
-
onPointerUp: P(e.onPointerUp, (a) => {
|
|
230
|
-
const c = a.target;
|
|
231
|
-
c.hasPointerCapture(a.pointerId) && (c.releasePointerCapture(a.pointerId), i(a));
|
|
232
|
-
})
|
|
233
|
-
});
|
|
234
|
-
}), J = "SliderTrack", ye = d.forwardRef((e, t) => {
|
|
235
|
-
const { __scopeSlider: n, ...r } = e, o = T(J, n);
|
|
236
|
-
return /* @__PURE__ */ f(C.span, {
|
|
237
|
-
"data-disabled": o.disabled ? "" : void 0,
|
|
238
|
-
"data-orientation": o.orientation,
|
|
239
|
-
...r,
|
|
240
|
-
ref: t
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
ye.displayName = J;
|
|
244
|
-
var z = "SliderRange", Pe = d.forwardRef((e, t) => {
|
|
245
|
-
const { __scopeSlider: n, ...r } = e, o = T(z, n), i = W(z, n), l = M(t, d.useRef(null)), s = o.values.length, m = o.values.map((a) => ie(a, o.min, o.max)), u = s > 1 ? Math.min(...m) : 0, h = 100 - Math.max(...m);
|
|
246
|
-
return /* @__PURE__ */ f(C.span, {
|
|
247
|
-
"data-orientation": o.orientation,
|
|
248
|
-
"data-disabled": o.disabled ? "" : void 0,
|
|
249
|
-
...r,
|
|
250
|
-
ref: l,
|
|
251
|
-
style: {
|
|
252
|
-
...e.style,
|
|
253
|
-
[i.startEdge]: u + "%",
|
|
254
|
-
[i.endEdge]: h + "%"
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
Pe.displayName = z;
|
|
259
|
-
var Q = "SliderThumb", [_e, Z] = F(Q), ee = "SliderThumbProvider";
|
|
260
|
-
function te(e) {
|
|
261
|
-
const { __scopeSlider: t, name: n, children: r, internal_do_not_use_render: o } = e, i = T(ee, t), l = ge(t), [s, m] = d.useState(null), u = d.useMemo(() => s ? l().findIndex((g) => g.ref.current === s) : -1, [l, s]), h = fe(s), a = s ? !!i.form || !!s.closest("form") : !0, c = i.values[u], b = n ?? (i.name ? i.name + (i.values.length > 1 ? "[]" : "") : void 0), R = c === void 0 ? 0 : ie(c, i.min, i.max);
|
|
262
|
-
d.useEffect(() => {
|
|
263
|
-
if (s)
|
|
264
|
-
return i.thumbs.add(s), () => {
|
|
265
|
-
i.thumbs.delete(s);
|
|
266
|
-
};
|
|
267
|
-
}, [s, i.thumbs]);
|
|
268
|
-
const p = {
|
|
269
|
-
value: c,
|
|
270
|
-
name: b,
|
|
271
|
-
form: i.form,
|
|
272
|
-
isFormControl: a,
|
|
273
|
-
index: u,
|
|
274
|
-
thumb: s,
|
|
275
|
-
onThumbChange: m,
|
|
276
|
-
percent: R,
|
|
277
|
-
size: h
|
|
278
|
-
};
|
|
279
|
-
return /* @__PURE__ */ f(_e, {
|
|
280
|
-
scope: t,
|
|
281
|
-
...p,
|
|
282
|
-
children: Be(o) ? o(p) : r
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
te.displayName = ee;
|
|
286
|
-
var N = "SliderThumbTrigger", ne = d.forwardRef((e, t) => {
|
|
287
|
-
const { __scopeSlider: n, ...r } = e, o = T(N, n), i = W(N, n), { index: l, value: s, percent: m, size: u, onThumbChange: h } = Z(N, n), a = M(t, h), c = Me(l, o.values.length), b = u?.[i.size], R = b ? Te(b, m, i.direction) : 0;
|
|
288
|
-
return /* @__PURE__ */ f("span", {
|
|
289
|
-
style: {
|
|
290
|
-
transform: "var(--radix-slider-thumb-transform)",
|
|
291
|
-
position: "absolute",
|
|
292
|
-
[i.startEdge]: `calc(${m}% + ${R}px)`
|
|
293
|
-
},
|
|
294
|
-
children: /* @__PURE__ */ f(k.ItemSlot, {
|
|
295
|
-
scope: n,
|
|
296
|
-
children: /* @__PURE__ */ f(C.span, {
|
|
297
|
-
role: "slider",
|
|
298
|
-
"aria-label": e["aria-label"] || c,
|
|
299
|
-
"aria-valuemin": o.min,
|
|
300
|
-
"aria-valuenow": s,
|
|
301
|
-
"aria-valuemax": o.max,
|
|
302
|
-
"aria-orientation": o.orientation,
|
|
303
|
-
"data-orientation": o.orientation,
|
|
304
|
-
"data-disabled": o.disabled ? "" : void 0,
|
|
305
|
-
tabIndex: o.disabled ? void 0 : 0,
|
|
306
|
-
...r,
|
|
307
|
-
ref: a,
|
|
308
|
-
style: s === void 0 ? { display: "none" } : e.style,
|
|
309
|
-
onFocus: P(e.onFocus, () => {
|
|
310
|
-
o.valueIndexToChangeRef.current = l;
|
|
311
|
-
})
|
|
312
|
-
})
|
|
313
|
-
})
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
ne.displayName = N;
|
|
317
|
-
var Ee = d.forwardRef((e, t) => {
|
|
318
|
-
const { __scopeSlider: n, name: r, ...o } = e;
|
|
319
|
-
return /* @__PURE__ */ f(te, {
|
|
320
|
-
__scopeSlider: n,
|
|
321
|
-
name: r,
|
|
322
|
-
internal_do_not_use_render: ({ index: i, isFormControl: l }) => /* @__PURE__ */ pe(he, { children: [/* @__PURE__ */ f(ne, {
|
|
323
|
-
...o,
|
|
324
|
-
ref: t,
|
|
325
|
-
__scopeSlider: n
|
|
326
|
-
}), l ? /* @__PURE__ */ f(oe, { __scopeSlider: n }, i) : null] })
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
Ee.displayName = Q;
|
|
330
|
-
var re = "SliderBubbleInput", oe = d.forwardRef(({ __scopeSlider: e, ...t }, n) => {
|
|
331
|
-
const { value: r, name: o, form: i } = Z(re, e), l = d.useRef(null), s = M(l, n), m = ue(r);
|
|
332
|
-
return d.useEffect(() => {
|
|
333
|
-
const u = l.current;
|
|
334
|
-
if (!u) return;
|
|
335
|
-
const h = window.HTMLInputElement.prototype, a = Object.getOwnPropertyDescriptor(h, "value").set;
|
|
336
|
-
if (m !== r && a) {
|
|
337
|
-
const c = new Event("input", { bubbles: !0 });
|
|
338
|
-
a.call(u, r), u.dispatchEvent(c);
|
|
339
|
-
}
|
|
340
|
-
}, [m, r]), /* @__PURE__ */ f(C.input, {
|
|
341
|
-
style: { display: "none" },
|
|
342
|
-
name: o,
|
|
343
|
-
form: i,
|
|
344
|
-
...t,
|
|
345
|
-
ref: s,
|
|
346
|
-
defaultValue: r
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
oe.displayName = re;
|
|
350
|
-
function De(e = [], t, n) {
|
|
351
|
-
const r = [...e];
|
|
352
|
-
return r[n] = t, r.sort((o, i) => o - i);
|
|
353
|
-
}
|
|
354
|
-
function ie(e, t, n) {
|
|
355
|
-
return Y(100 / (n - t) * (e - t), [0, 100]);
|
|
356
|
-
}
|
|
357
|
-
function Me(e, t) {
|
|
358
|
-
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
359
|
-
}
|
|
360
|
-
function Ce(e, t) {
|
|
361
|
-
if (e.length === 1) return 0;
|
|
362
|
-
const n = e.map((o) => Math.abs(o - t)), r = Math.min(...n);
|
|
363
|
-
return n.indexOf(r);
|
|
364
|
-
}
|
|
365
|
-
function Te(e, t, n) {
|
|
366
|
-
const r = e / 2;
|
|
367
|
-
return (r - O([0, 50], [0, r])(t) * n) * n;
|
|
368
|
-
}
|
|
369
|
-
function Ae(e) {
|
|
370
|
-
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
371
|
-
}
|
|
372
|
-
function Ie(e, t) {
|
|
373
|
-
if (t > 0) {
|
|
374
|
-
const n = Ae(e);
|
|
375
|
-
return Math.min(...n) >= t;
|
|
376
|
-
}
|
|
377
|
-
return !0;
|
|
378
|
-
}
|
|
379
|
-
function O(e, t) {
|
|
380
|
-
return (n) => {
|
|
381
|
-
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
382
|
-
const r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
383
|
-
return t[0] + r * (n - e[0]);
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
function Ke(e) {
|
|
387
|
-
if (!Number.isFinite(e)) return 0;
|
|
388
|
-
const t = e.toString();
|
|
389
|
-
if (t.includes("e")) {
|
|
390
|
-
const [r, o] = t.split("e"), i = r.split(".")[1] || "", l = Number(o);
|
|
391
|
-
return Math.max(0, i.length - l);
|
|
392
|
-
}
|
|
393
|
-
const n = t.split(".")[1];
|
|
394
|
-
return n ? n.length : 0;
|
|
395
|
-
}
|
|
396
|
-
function Ne(e, t) {
|
|
397
|
-
const n = Math.pow(10, t);
|
|
398
|
-
return Math.round(e * n) / n;
|
|
399
|
-
}
|
|
400
|
-
function Be(e) {
|
|
401
|
-
return typeof e == "function";
|
|
402
|
-
}
|
|
403
|
-
export {
|
|
404
|
-
ye as i,
|
|
405
|
-
Pe as n,
|
|
406
|
-
Ee as r,
|
|
407
|
-
we as t
|
|
408
|
-
};
|
package/dist/dist-C6Cif8-U.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { t as i } from "./dist-CVy-ulDZ.js";
|
|
2
|
-
import * as t from "react";
|
|
3
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
-
var d = Object.freeze({
|
|
5
|
-
position: "absolute",
|
|
6
|
-
border: 0,
|
|
7
|
-
width: 1,
|
|
8
|
-
height: 1,
|
|
9
|
-
padding: 0,
|
|
10
|
-
margin: -1,
|
|
11
|
-
overflow: "hidden",
|
|
12
|
-
clip: "rect(0, 0, 0, 0)",
|
|
13
|
-
whiteSpace: "nowrap",
|
|
14
|
-
wordWrap: "normal"
|
|
15
|
-
}), s = "VisuallyHidden", e = t.forwardRef((r, a) => /* @__PURE__ */ o(i.span, {
|
|
16
|
-
...r,
|
|
17
|
-
ref: a,
|
|
18
|
-
style: {
|
|
19
|
-
...d,
|
|
20
|
-
...r.style
|
|
21
|
-
}
|
|
22
|
-
}));
|
|
23
|
-
e.displayName = s;
|
|
24
|
-
var m = e;
|
|
25
|
-
export {
|
|
26
|
-
e as n,
|
|
27
|
-
m as t
|
|
28
|
-
};
|
package/dist/dist-CeuUxVmT.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./dist-CfYOvauX.js";
|
|
2
|
-
import * as o from "react";
|
|
3
|
-
var s = o[" useId ".trim().toString()] || (() => {
|
|
4
|
-
}), f = 0;
|
|
5
|
-
function c(t) {
|
|
6
|
-
const [r, a] = o.useState(s());
|
|
7
|
-
return e(() => {
|
|
8
|
-
t || a((u) => u ?? String(f++));
|
|
9
|
-
}, [t]), t || (r ? `radix-${r}` : "");
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
c as t
|
|
13
|
-
};
|
package/dist/dist-CfYOvauX.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import { jsx as x } from "react/jsx-runtime";
|
|
3
|
-
function _(e, o = []) {
|
|
4
|
-
let t = [];
|
|
5
|
-
function f(s, u) {
|
|
6
|
-
const r = n.createContext(u);
|
|
7
|
-
r.displayName = s + "Context";
|
|
8
|
-
const l = t.length;
|
|
9
|
-
t = [...t, u];
|
|
10
|
-
const i = (m) => {
|
|
11
|
-
const { scope: v, children: p, ...d } = m, h = v?.[e]?.[l] || r, S = n.useMemo(() => d, Object.values(d));
|
|
12
|
-
return /* @__PURE__ */ x(h.Provider, {
|
|
13
|
-
value: S,
|
|
14
|
-
children: p
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
i.displayName = s + "Provider";
|
|
18
|
-
function a(m, v) {
|
|
19
|
-
const p = v?.[e]?.[l] || r, d = n.useContext(p);
|
|
20
|
-
if (d) return d;
|
|
21
|
-
if (u !== void 0) return u;
|
|
22
|
-
throw new Error(`\`${m}\` must be used within \`${s}\``);
|
|
23
|
-
}
|
|
24
|
-
return [i, a];
|
|
25
|
-
}
|
|
26
|
-
const c = () => {
|
|
27
|
-
const s = t.map((u) => n.createContext(u));
|
|
28
|
-
return function(r) {
|
|
29
|
-
const l = r?.[e] || s;
|
|
30
|
-
return n.useMemo(() => ({ [`__scope${e}`]: {
|
|
31
|
-
...r,
|
|
32
|
-
[e]: l
|
|
33
|
-
} }), [r, l]);
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
return c.scopeName = e, [f, R(c, ...o)];
|
|
37
|
-
}
|
|
38
|
-
function R(...e) {
|
|
39
|
-
const o = e[0];
|
|
40
|
-
if (e.length === 1) return o;
|
|
41
|
-
const t = () => {
|
|
42
|
-
const f = e.map((c) => ({
|
|
43
|
-
useScope: c(),
|
|
44
|
-
scopeName: c.scopeName
|
|
45
|
-
}));
|
|
46
|
-
return function(s) {
|
|
47
|
-
const u = f.reduce((r, { useScope: l, scopeName: i }) => {
|
|
48
|
-
const a = l(s)[`__scope${i}`];
|
|
49
|
-
return {
|
|
50
|
-
...r,
|
|
51
|
-
...a
|
|
52
|
-
};
|
|
53
|
-
}, {});
|
|
54
|
-
return n.useMemo(() => ({ [`__scope${o.scopeName}`]: u }), [u]);
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
return t.scopeName = o.scopeName, t;
|
|
58
|
-
}
|
|
59
|
-
var b = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
60
|
-
function M(e, o, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
61
|
-
return function(c) {
|
|
62
|
-
if (e?.(c), t === !1 || !c.defaultPrevented) return o?.(c);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
var C = globalThis?.document ? n.useLayoutEffect : () => {
|
|
66
|
-
}, E = n[" useEffectEvent ".trim().toString()], w = n[" useInsertionEffect ".trim().toString()];
|
|
67
|
-
function I(e) {
|
|
68
|
-
if (typeof E == "function") return E(e);
|
|
69
|
-
const o = n.useRef(() => {
|
|
70
|
-
throw new Error("Cannot call an event handler while rendering.");
|
|
71
|
-
});
|
|
72
|
-
return typeof w == "function" ? w(() => {
|
|
73
|
-
o.current = e;
|
|
74
|
-
}) : C(() => {
|
|
75
|
-
o.current = e;
|
|
76
|
-
}), n.useMemo(() => ((...t) => o.current?.(...t)), []);
|
|
77
|
-
}
|
|
78
|
-
var g = n[" useInsertionEffect ".trim().toString()] || C;
|
|
79
|
-
function U({ prop: e, defaultProp: o, onChange: t = () => {
|
|
80
|
-
}, caller: f }) {
|
|
81
|
-
const [c, s, u] = $({
|
|
82
|
-
defaultProp: o,
|
|
83
|
-
onChange: t
|
|
84
|
-
}), r = e !== void 0, l = r ? e : c;
|
|
85
|
-
{
|
|
86
|
-
const i = n.useRef(e !== void 0);
|
|
87
|
-
n.useEffect(() => {
|
|
88
|
-
const a = i.current;
|
|
89
|
-
a !== r && console.warn(`${f} is changing from ${a ? "controlled" : "uncontrolled"} to ${r ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`), i.current = r;
|
|
90
|
-
}, [r, f]);
|
|
91
|
-
}
|
|
92
|
-
return [l, n.useCallback((i) => {
|
|
93
|
-
if (r) {
|
|
94
|
-
const a = y(i) ? i(e) : i;
|
|
95
|
-
a !== e && u.current?.(a);
|
|
96
|
-
} else s(i);
|
|
97
|
-
}, [
|
|
98
|
-
r,
|
|
99
|
-
e,
|
|
100
|
-
s,
|
|
101
|
-
u
|
|
102
|
-
])];
|
|
103
|
-
}
|
|
104
|
-
function $({ defaultProp: e, onChange: o }) {
|
|
105
|
-
const [t, f] = n.useState(e), c = n.useRef(t), s = n.useRef(o);
|
|
106
|
-
return g(() => {
|
|
107
|
-
s.current = o;
|
|
108
|
-
}, [o]), n.useEffect(() => {
|
|
109
|
-
c.current !== t && (s.current?.(t), c.current = t);
|
|
110
|
-
}, [t, c]), [
|
|
111
|
-
t,
|
|
112
|
-
f,
|
|
113
|
-
s
|
|
114
|
-
];
|
|
115
|
-
}
|
|
116
|
-
function y(e) {
|
|
117
|
-
return typeof e == "function";
|
|
118
|
-
}
|
|
119
|
-
export {
|
|
120
|
-
_ as a,
|
|
121
|
-
M as i,
|
|
122
|
-
I as n,
|
|
123
|
-
C as r,
|
|
124
|
-
U as t
|
|
125
|
-
};
|