kdpa-components 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/Accordion/index.js +17 -19
- package/dist/Alert/index.js +19 -20
- package/dist/{ArrowDropDown-4bc3084f.js → ArrowDropDown-07b9ccae.js} +19 -20
- package/dist/Avatar/index.js +7 -8
- package/dist/Badge/index.js +22 -24
- package/dist/{Box-af81b133.js → Box-032e9a1d.js} +25 -27
- package/dist/{Button-da8592f4.js → Button-9d9cc0bd.js} +18 -20
- package/dist/{ButtonBase-496494a5.js → ButtonBase-fa4630c8.js} +35 -37
- package/dist/Buttons/index.js +28 -30
- package/dist/{CSSTransition-5496e075.js → CSSTransition-7e2d0e80.js} +3 -3
- package/dist/Cards/index.d.ts +2 -0
- package/dist/Cards/index.d.ts.map +1 -1
- package/dist/Cards/index.js +150 -1
- package/dist/CheckBox/index.js +13 -14
- package/dist/Chip/index.js +17 -19
- package/dist/{Chip-2dfcd6e9.js → Chip-e5751770.js} +25 -27
- package/dist/{CircularProgress-e1f22f2a.js → CircularProgress-01a8929e.js} +19 -21
- package/dist/{Close-319784e1.js → Close-db7afda5.js} +2 -2
- package/dist/Collapse/index.js +10 -12
- package/dist/{Collapse-75d5ed79.js → Collapse-547e6c7a.js} +27 -30
- package/dist/CopyToClipboard/index.js +24 -26
- package/dist/{Dialog-0eadb508.js → Dialog-652a3ad4.js} +19 -21
- package/dist/Divider/index.js +7 -8
- package/dist/DropZone/index.js +34 -36
- package/dist/{Fade-6a96fc41.js → Fade-7ee2c0a4.js} +23 -25
- package/dist/FormControl/index.js +12 -13
- package/dist/{FormControl-c914b3de.js → FormControl-ca7447ab.js} +13 -15
- package/dist/FullScreenDialog/index.js +20 -22
- package/dist/Grid/index.js +9 -10
- package/dist/{Grid-4cbef6c7.js → Grid-9708b9ca.js} +65 -67
- package/dist/{Grow-8a97586f.js → Grow-55d0786d.js} +17 -19
- package/dist/{IconButton-b4e677f7.js → IconButton-48d87778.js} +30 -32
- package/dist/Input/index.js +27 -29
- package/dist/{KdpaAccordions-60fefaf0.js → KdpaAccordions-2ae65dd1.js} +126 -115
- package/dist/{KdpaAlertTitle-497100ba.js → KdpaAlertTitle-f1549035.js} +93 -82
- package/dist/{KdpaAutoComplete-9c0b8d4d.js → KdpaAutoComplete-8a11974a.js} +237 -234
- package/dist/{KdpaAvatar-da84b516.js → KdpaAvatar-d297ef8a.js} +75 -72
- package/dist/{KdpaCheckBox-d06c93b0.js → KdpaCheckBox-84d56486.js} +33 -30
- package/dist/KdpaChip-10899788.js +51 -0
- package/dist/KdpaCircularProgress-6c4605cd.js +76 -0
- package/dist/KdpaCollapse-2d23c312.js +12 -0
- package/dist/KdpaCollapse-73c03e02.js +23 -0
- package/dist/{KdpaCopyToClipboard-2c36d593.js → KdpaCopyToClipboard-53aa97d3.js} +196 -160
- package/dist/{KdpaDateTimePicker-8e9da3c8.js → KdpaDateTimePicker-cb4a16d0.js} +10530 -13197
- package/dist/{KdpaDivider-10de74db.js → KdpaDivider-1c62c65a.js} +95 -84
- package/dist/{KdpaDropZone-85943160.js → KdpaDropZone-b21d2304.js} +631 -531
- package/dist/KdpaFormControl-135b070d.js +10 -0
- package/dist/{KdpaFormControlLabel-8a6ff2a6.js → KdpaFormControlLabel-249b7622.js} +57 -54
- package/dist/KdpaFullScreenDialog-e56db731.js +24 -0
- package/dist/KdpaGrid-2a3f9346.js +12 -0
- package/dist/{KdpaGridBadge-d8a8e388.js → KdpaGridBadge-65b88a7a.js} +123 -104
- package/dist/KdpaIconButton-a0ee669c.js +35 -0
- package/dist/KdpaInputMultiline-231a2be1.js +68 -0
- package/dist/{KdpaLazyDrop-347b6e24.js → KdpaLazyDrop-1985fc75.js} +254 -217
- package/dist/KdpaMenuItem-99cde871.js +56 -0
- package/dist/{KdpaSimpleModal-6ab72b9c.js → KdpaModalImage-eb732bf0.js} +176 -185
- package/dist/{KdpaPaginationGrid-6e4cd782.js → KdpaPaginationGrid-97a5b164.js} +343 -283
- package/dist/{KdpaRadioGroup-de6c67d4.js → KdpaRadioGroup-87122ec7.js} +129 -122
- package/dist/{KdpaRtlProvider-d7cc5029.js → KdpaRtlProvider-495e4bb0.js} +169 -162
- package/dist/KdpaSecondaryButton-a70aafe5.js +44 -0
- package/dist/KdpaSkeleton-f8f3aefc.js +580 -0
- package/dist/{KdpaSlider-93a991f0.js → KdpaSlider-b7226e20.js} +196 -182
- package/dist/{KdpaSwitch-2f07cd38.js → KdpaSwitch-b2ba7c23.js} +50 -43
- package/dist/KdpaTabs-ab618f36.js +50 -0
- package/dist/{KdpaTooltip-e30e1eea.js → KdpaTooltip-653424c7.js} +95 -88
- package/dist/{KdpaTree-8428a368.js → KdpaTree-2e1df83d.js} +348 -304
- package/dist/{KdpaTreeSelect-7fe5581c.js → KdpaTreeSelect-0152302e.js} +625 -609
- package/dist/KdpaTypography-763c3238.js +10 -0
- package/dist/KdpaZoom-1b0f3404.js +22 -0
- package/dist/KpdaPrimaryButton-5416aa2c.js +79 -0
- package/dist/LazyDrop/index.js +24 -24
- package/dist/{ListItem-da6701a3.js → ListItem-ddec0b28.js} +14 -16
- package/dist/Loading/KdpaProgress/index.js +12 -13
- package/dist/Loading/index.js +11 -12
- package/dist/{MenuItem-b9a45c1d.js → MenuItem-057c85a3.js} +44 -46
- package/dist/Modal/index.d.ts +0 -2
- package/dist/Modal/index.d.ts.map +1 -1
- package/dist/Modal/index.js +3 -17
- package/dist/{Modal-1e4a342f.js → Modal-daf2a588.js} +18 -20
- package/dist/PaginationGrid/index.js +33 -34
- package/dist/{Paper-ad7ba238.js → Paper-00aea968.js} +16 -18
- package/dist/Pickers/index.d.ts +2 -1
- package/dist/Pickers/index.d.ts.map +1 -1
- package/dist/Pickers/index.js +43 -45
- package/dist/{Popper-20f4d1e9.js → Popper-7adcd815.js} +13 -15
- package/dist/{Portal-1b00a402.js → Portal-de5e310c.js} +6 -7
- package/dist/Radio/index.js +14 -15
- package/dist/Selects/index.js +39 -40
- package/dist/{Slide-d61a6d2b.js → Slide-803fd098.js} +17 -19
- package/dist/Slider/index.js +8 -9
- package/dist/Switch/index.js +12 -13
- package/dist/{SwitchBase-e8b18f94.js → SwitchBase-64e5662e.js} +14 -16
- package/dist/Tabs/index.js +16 -17
- package/dist/{Tabs-1cc5862d.js → Tabs-1140d353.js} +87 -89
- package/dist/{TextField-c2c0172a.js → TextField-57c51dbe.js} +52 -54
- package/dist/ThemeProvider/index.js +7 -8
- package/dist/Tooltips/index.js +16 -18
- package/dist/{TransitionGroup-68fd1866.js → TransitionGroup-f9877c5b.js} +2 -2
- package/dist/Transitions/index.js +22 -24
- package/dist/Tree/index.js +2 -2
- package/dist/TreeSelect/index.js +3 -3
- package/dist/Typography/index.js +8 -9
- package/dist/{Typography-9a28b393.js → Typography-db7e5ea2.js} +42 -44
- package/dist/{Zoom-64a4beac.js → Zoom-36a189bb.js} +22 -24
- package/dist/{createSvgIcon-5cb90f79.js → createSvgIcon-1aa1b2b2.js} +20 -22
- package/dist/{dividerClasses-6f4cb6be.js → dividerClasses-a9b8b1ae.js} +2 -2
- package/dist/{elementAcceptingRef-332a290a.js → elementAcceptingRef-bd96c731.js} +1 -1
- package/dist/{elementTypeAcceptingRef-05dea79e.js → elementTypeAcceptingRef-dea9e62a.js} +1 -1
- package/dist/{emotion-react.browser.esm-921c014a.js → emotion-react.browser.esm-3fa5f721.js} +1 -1
- package/dist/{exactProp-7fadf441.js → exactProp-86f148d5.js} +1 -1
- package/dist/{extendSxProp-eacd850e.js → extendSxProp-d294b946.js} +2 -2
- package/dist/{extends-393586f3.js → extends-135d7828.js} +2 -2
- package/dist/identifier-2647f844.js +3775 -0
- package/dist/{index-456f3e1b.js → index-5f8afc53.js} +5 -5
- package/dist/index.js +140 -142
- package/dist/jsx-dev-runtime-48fdc504.js +615 -0
- package/dist/kdpaSelect-4ed993c7.js +1 -0
- package/dist/{listItemTextClasses-f7759ba4.js → listItemTextClasses-da281500.js} +2 -2
- package/dist/{refType-7c2b090c.js → refType-450337d6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useSlotProps-db1ead27.js → useSlotProps-3b927bcb.js} +2 -2
- package/dist/{useTheme-2bb6b2df.js → useTheme-6ea322ec.js} +2 -2
- package/dist/{useThemeProps-114e8d66.js → useThemeProps-ea792506.js} +11 -11
- package/dist/{Transition-2ecbc61d.js → utils-acd98a68.js} +113 -98
- package/package.json +90 -87
- package/dist/KdpaChip-f94c5b7e.js +0 -31
- package/dist/KdpaCircularProgress-aed28149.js +0 -44
- package/dist/KdpaCollapse-73e5e40c.js +0 -8
- package/dist/KdpaCollapse-7f12a32a.js +0 -11
- package/dist/KdpaFormControl-ae8f7241.js +0 -6
- package/dist/KdpaFullScreenDialog-f60e21f3.js +0 -16
- package/dist/KdpaGrid-b93fab29.js +0 -8
- package/dist/KdpaIconButton-f5146164.js +0 -23
- package/dist/KdpaInputMultiline-71dfbfe5.js +0 -48
- package/dist/KdpaMenuItem-9a9ece89.js +0 -35
- package/dist/KdpaSecondaryButton-9b81f97d.js +0 -28
- package/dist/KdpaSkeleton-4696fadd.js +0 -541
- package/dist/KdpaTabs-a76a17a7.js +0 -38
- package/dist/KdpaTypography-17403558.js +0 -6
- package/dist/KdpaZoom-96a648cb.js +0 -10
- package/dist/KpdaPrimaryButton-9a5d8d6d.js +0 -47
- package/dist/Sanitizer/index.d.ts +0 -3
- package/dist/Sanitizer/index.d.ts.map +0 -1
- package/dist/Sanitizer/index.js +0 -492
- package/dist/identifier-5cabf5ae.js +0 -2481
- package/dist/index-f4329b29.js +0 -669
- package/dist/jsx-runtime-944c88e2.js +0 -631
- package/dist/utils-8a7b223e.js +0 -18
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
1
|
+
import { j as $t } from "./jsx-dev-runtime-48fdc504.js";
|
|
2
|
+
import { a as c, _ as Et } from "./extends-135d7828.js";
|
|
3
3
|
import * as T from "react";
|
|
4
|
-
import { P as t } from "./
|
|
5
|
-
import { g as
|
|
6
|
-
import { u as
|
|
7
|
-
import { i as
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as Mt } from "./useIsFocusVisible-4693b580.js";
|
|
4
|
+
import { g as Rt, j as N, P as t, c as U, l as _t, d as Vt, a as rt } from "./identifier-2647f844.js";
|
|
5
|
+
import { g as jt, c as ce, s as ee, j as ct, u as wt, a as At } from "./useThemeProps-ea792506.js";
|
|
6
|
+
import { u as It } from "./useTheme-6ea322ec.js";
|
|
7
|
+
import { i as Re, u as B } from "./useSlotProps-3b927bcb.js";
|
|
8
|
+
import { u as Mt } from "./useControlled-cc2d41cb.js";
|
|
9
|
+
import { u as zt } from "./useIsFocusVisible-4693b580.js";
|
|
11
10
|
import { u as at } from "./useForkRef-0781dda0.js";
|
|
12
|
-
import { u as
|
|
11
|
+
import { u as Dt, a as Ke } from "./useEventCallback-83a2883c.js";
|
|
13
12
|
import { o as _e } from "./ownerDocument-5430cd5b.js";
|
|
14
13
|
import { c as nt } from "./chainPropTypes-004bf492.js";
|
|
15
14
|
const Ft = {
|
|
@@ -22,11 +21,11 @@ const Ft = {
|
|
|
22
21
|
position: "absolute",
|
|
23
22
|
whiteSpace: "nowrap",
|
|
24
23
|
width: "1px"
|
|
25
|
-
},
|
|
26
|
-
function
|
|
24
|
+
}, Ht = Ft;
|
|
25
|
+
function Yt(e, o, a = (s, d) => s === d) {
|
|
27
26
|
return e.length === o.length && e.every((s, d) => a(s, o[d]));
|
|
28
27
|
}
|
|
29
|
-
const
|
|
28
|
+
const Bt = 2;
|
|
30
29
|
function ut(e, o) {
|
|
31
30
|
return e - o;
|
|
32
31
|
}
|
|
@@ -37,11 +36,11 @@ function lt(e, o) {
|
|
|
37
36
|
var a;
|
|
38
37
|
const {
|
|
39
38
|
index: s
|
|
40
|
-
} = (a = e.reduce((d, L,
|
|
41
|
-
const
|
|
42
|
-
return d === null ||
|
|
43
|
-
distance:
|
|
44
|
-
index:
|
|
39
|
+
} = (a = e.reduce((d, L, $) => {
|
|
40
|
+
const f = Math.abs(o - L);
|
|
41
|
+
return d === null || f < d.distance || f === d.distance ? {
|
|
42
|
+
distance: f,
|
|
43
|
+
index: $
|
|
45
44
|
} : d;
|
|
46
45
|
}, null)) != null ? a : {};
|
|
47
46
|
return s;
|
|
@@ -67,10 +66,10 @@ function Ce(e, o) {
|
|
|
67
66
|
function Ve(e, o, a) {
|
|
68
67
|
return (e - o) * 100 / (a - o);
|
|
69
68
|
}
|
|
70
|
-
function
|
|
69
|
+
function Ut(e, o, a) {
|
|
71
70
|
return (a - o) * e + o;
|
|
72
71
|
}
|
|
73
|
-
function
|
|
72
|
+
function qt(e) {
|
|
74
73
|
if (Math.abs(e) < 1) {
|
|
75
74
|
const a = e.toExponential().split("e-"), s = a[0].split(".")[1];
|
|
76
75
|
return (s ? s.length : 0) + parseInt(a[1], 10);
|
|
@@ -78,9 +77,9 @@ function Ut(e) {
|
|
|
78
77
|
const o = e.toString().split(".")[1];
|
|
79
78
|
return o ? o.length : 0;
|
|
80
79
|
}
|
|
81
|
-
function
|
|
80
|
+
function Xt(e, o, a) {
|
|
82
81
|
const s = Math.round((e - a) / o) * o + a;
|
|
83
|
-
return Number(s.toFixed(
|
|
82
|
+
return Number(s.toFixed(qt(o)));
|
|
84
83
|
}
|
|
85
84
|
function st({
|
|
86
85
|
values: e,
|
|
@@ -90,7 +89,7 @@ function st({
|
|
|
90
89
|
const s = e.slice();
|
|
91
90
|
return s[a] = o, s.sort(ut);
|
|
92
91
|
}
|
|
93
|
-
function
|
|
92
|
+
function Ne({
|
|
94
93
|
sliderRef: e,
|
|
95
94
|
activeIndex: o,
|
|
96
95
|
setActive: a
|
|
@@ -98,15 +97,15 @@ function $e({
|
|
|
98
97
|
var s, d;
|
|
99
98
|
const L = _e(e.current);
|
|
100
99
|
if (!((s = e.current) != null && s.contains(L.activeElement)) || Number(L == null || (d = L.activeElement) == null ? void 0 : d.getAttribute("data-index")) !== o) {
|
|
101
|
-
var
|
|
102
|
-
(
|
|
100
|
+
var $;
|
|
101
|
+
($ = e.current) == null || $.querySelector(`[type="range"][data-index="${o}"]`).focus();
|
|
103
102
|
}
|
|
104
103
|
a && a(o);
|
|
105
104
|
}
|
|
106
|
-
function
|
|
107
|
-
return typeof e == "number" && typeof o == "number" ? e === o : typeof e == "object" && typeof o == "object" ?
|
|
105
|
+
function $e(e, o) {
|
|
106
|
+
return typeof e == "number" && typeof o == "number" ? e === o : typeof e == "object" && typeof o == "object" ? Yt(e, o) : !1;
|
|
108
107
|
}
|
|
109
|
-
const
|
|
108
|
+
const Kt = {
|
|
110
109
|
horizontal: {
|
|
111
110
|
offset: (e) => ({
|
|
112
111
|
left: `${e}%`
|
|
@@ -132,19 +131,19 @@ const Xt = {
|
|
|
132
131
|
})
|
|
133
132
|
}
|
|
134
133
|
}, Wt = (e) => e;
|
|
135
|
-
let
|
|
136
|
-
function
|
|
137
|
-
return
|
|
134
|
+
let Ee;
|
|
135
|
+
function We() {
|
|
136
|
+
return Ee === void 0 && (typeof CSS < "u" && typeof CSS.supports == "function" ? Ee = CSS.supports("touch-action", "none") : Ee = !0), Ee;
|
|
138
137
|
}
|
|
139
|
-
function
|
|
138
|
+
function Gt(e) {
|
|
140
139
|
const {
|
|
141
140
|
"aria-labelledby": o,
|
|
142
141
|
defaultValue: a,
|
|
143
142
|
disabled: s = !1,
|
|
144
143
|
disableSwap: d = !1,
|
|
145
144
|
isRtl: L = !1,
|
|
146
|
-
marks:
|
|
147
|
-
max:
|
|
145
|
+
marks: $ = !1,
|
|
146
|
+
max: f = 100,
|
|
148
147
|
min: b = 0,
|
|
149
148
|
name: q,
|
|
150
149
|
onChange: ue,
|
|
@@ -155,7 +154,7 @@ function Kt(e) {
|
|
|
155
154
|
step: _ = 1,
|
|
156
155
|
tabIndex: ye,
|
|
157
156
|
value: ke
|
|
158
|
-
} = e, M = T.useRef(), [pe,
|
|
157
|
+
} = e, M = T.useRef(), [pe, F] = T.useState(-1), [xe, H] = T.useState(-1), [me, fe] = T.useState(!1), K = T.useRef(0), [V, Y] = Mt({
|
|
159
158
|
controlled: ke,
|
|
160
159
|
default: a ?? b,
|
|
161
160
|
name: "Slider"
|
|
@@ -168,40 +167,40 @@ function Kt(e) {
|
|
|
168
167
|
name: q
|
|
169
168
|
}
|
|
170
169
|
}), ue(y, n, l);
|
|
171
|
-
}),
|
|
172
|
-
let g =
|
|
173
|
-
g = g.map((r) => he(r, b,
|
|
174
|
-
const oe =
|
|
170
|
+
}), W = Array.isArray(V);
|
|
171
|
+
let g = W ? V.slice().sort(ut) : [V];
|
|
172
|
+
g = g.map((r) => he(r, b, f));
|
|
173
|
+
const oe = $ === !0 && _ !== null ? [...Array(Math.floor((f - b) / _) + 1)].map((r, n) => ({
|
|
175
174
|
value: b + _ * n
|
|
176
|
-
})) :
|
|
175
|
+
})) : $ || [], j = oe.map((r) => r.value), {
|
|
177
176
|
isFocusVisibleRef: Te,
|
|
178
|
-
onBlur:
|
|
177
|
+
onBlur: w,
|
|
179
178
|
onFocus: A,
|
|
180
|
-
ref:
|
|
181
|
-
} =
|
|
179
|
+
ref: je
|
|
180
|
+
} = zt(), [Le, re] = T.useState(-1), S = T.useRef(), Se = at(je, S), be = at(ge, Se), Pe = (r) => (n) => {
|
|
182
181
|
var l;
|
|
183
182
|
const i = Number(n.currentTarget.getAttribute("data-index"));
|
|
184
183
|
A(n), Te.current === !0 && re(i), H(i), r == null || (l = r.onFocus) == null || l.call(r, n);
|
|
185
|
-
},
|
|
184
|
+
}, we = (r) => (n) => {
|
|
186
185
|
var l;
|
|
187
|
-
|
|
186
|
+
w(n), Te.current === !1 && re(-1), H(-1), r == null || (l = r.onBlur) == null || l.call(r, n);
|
|
188
187
|
};
|
|
189
|
-
|
|
188
|
+
Dt(() => {
|
|
190
189
|
if (s && S.current.contains(document.activeElement)) {
|
|
191
190
|
var r;
|
|
192
191
|
(r = document.activeElement) == null || r.blur();
|
|
193
192
|
}
|
|
194
|
-
}, [s]), s && pe !== -1 &&
|
|
193
|
+
}, [s]), s && pe !== -1 && F(-1), s && Le !== -1 && re(-1);
|
|
195
194
|
const ae = (r) => (n) => {
|
|
196
195
|
var l;
|
|
197
196
|
(l = r.onChange) == null || l.call(r, n);
|
|
198
|
-
const i = Number(n.currentTarget.getAttribute("data-index")), y = g[i], P =
|
|
197
|
+
const i = Number(n.currentTarget.getAttribute("data-index")), y = g[i], P = j.indexOf(y);
|
|
199
198
|
let p = n.target.valueAsNumber;
|
|
200
|
-
if (oe && _ == null && (p = p < y ?
|
|
201
|
-
const O =
|
|
202
|
-
p = p < g[i] ?
|
|
199
|
+
if (oe && _ == null && (p = p < y ? j[P - 1] : j[P + 1]), p = he(p, b, f), oe && _ == null) {
|
|
200
|
+
const O = j.indexOf(g[i]);
|
|
201
|
+
p = p < g[i] ? j[O - 1] : j[O + 1];
|
|
203
202
|
}
|
|
204
|
-
if (
|
|
203
|
+
if (W) {
|
|
205
204
|
d && (p = he(p, g[i - 1] || -1 / 0, g[i + 1] || 1 / 0));
|
|
206
205
|
const O = p;
|
|
207
206
|
p = st({
|
|
@@ -210,12 +209,12 @@ function Kt(e) {
|
|
|
210
209
|
index: i
|
|
211
210
|
});
|
|
212
211
|
let u = i;
|
|
213
|
-
d || (u = p.indexOf(O)),
|
|
212
|
+
d || (u = p.indexOf(O)), Ne({
|
|
214
213
|
sliderRef: S,
|
|
215
214
|
activeIndex: u
|
|
216
215
|
});
|
|
217
216
|
}
|
|
218
|
-
Y(p), re(i), z &&
|
|
217
|
+
Y(p), re(i), z && !$e(p, V) && z(n, p, i), X && X(n, p);
|
|
219
218
|
}, G = T.useRef();
|
|
220
219
|
let ne = te;
|
|
221
220
|
L && te === "horizontal" && (ne += "-reverse");
|
|
@@ -234,15 +233,15 @@ function Kt(e) {
|
|
|
234
233
|
let O;
|
|
235
234
|
ne.indexOf("vertical") === 0 ? O = (P - r.y) / y : O = (r.x - p) / i, ne.indexOf("-reverse") !== -1 && (O = 1 - O);
|
|
236
235
|
let u;
|
|
237
|
-
if (u =
|
|
238
|
-
u =
|
|
236
|
+
if (u = Ut(O, b, f), _)
|
|
237
|
+
u = Xt(u, _, b);
|
|
239
238
|
else {
|
|
240
|
-
const ve = lt(
|
|
241
|
-
u =
|
|
239
|
+
const ve = lt(j, u);
|
|
240
|
+
u = j[ve];
|
|
242
241
|
}
|
|
243
|
-
u = he(u, b,
|
|
242
|
+
u = he(u, b, f);
|
|
244
243
|
let I = 0;
|
|
245
|
-
if (
|
|
244
|
+
if (W) {
|
|
246
245
|
n ? I = G.current : I = lt(g, u), d && (u = he(u, g[I - 1] || -1 / 0, g[I + 1] || 1 / 0));
|
|
247
246
|
const ve = u;
|
|
248
247
|
u = st({
|
|
@@ -255,12 +254,12 @@ function Kt(e) {
|
|
|
255
254
|
newValue: u,
|
|
256
255
|
activeIndex: I
|
|
257
256
|
};
|
|
258
|
-
}, J =
|
|
257
|
+
}, J = Ke((r) => {
|
|
259
258
|
const n = Ce(r, M);
|
|
260
259
|
if (!n)
|
|
261
260
|
return;
|
|
262
|
-
if (
|
|
263
|
-
|
|
261
|
+
if (K.current += 1, r.type === "mousemove" && r.buttons === 0) {
|
|
262
|
+
E(r);
|
|
264
263
|
return;
|
|
265
264
|
}
|
|
266
265
|
const {
|
|
@@ -270,14 +269,14 @@ function Kt(e) {
|
|
|
270
269
|
finger: n,
|
|
271
270
|
move: !0
|
|
272
271
|
});
|
|
273
|
-
|
|
272
|
+
Ne({
|
|
274
273
|
sliderRef: S,
|
|
275
274
|
activeIndex: i,
|
|
276
|
-
setActive:
|
|
277
|
-
}), Y(l), !
|
|
278
|
-
}),
|
|
275
|
+
setActive: F
|
|
276
|
+
}), Y(l), !me && K.current > Bt && fe(!0), z && !$e(l, V) && z(r, l, i);
|
|
277
|
+
}), E = Ke((r) => {
|
|
279
278
|
const n = Ce(r, M);
|
|
280
|
-
if (
|
|
279
|
+
if (fe(!1), !n)
|
|
281
280
|
return;
|
|
282
281
|
const {
|
|
283
282
|
newValue: l
|
|
@@ -285,11 +284,11 @@ function Kt(e) {
|
|
|
285
284
|
finger: n,
|
|
286
285
|
move: !0
|
|
287
286
|
});
|
|
288
|
-
|
|
289
|
-
}), v =
|
|
287
|
+
F(-1), r.type === "touchend" && H(-1), X && X(r, l), M.current = void 0, m();
|
|
288
|
+
}), v = Ke((r) => {
|
|
290
289
|
if (s)
|
|
291
290
|
return;
|
|
292
|
-
|
|
291
|
+
We() || r.preventDefault();
|
|
293
292
|
const n = r.changedTouches[0];
|
|
294
293
|
n != null && (M.current = n.identifier);
|
|
295
294
|
const l = Ce(r, M);
|
|
@@ -300,33 +299,33 @@ function Kt(e) {
|
|
|
300
299
|
} = le({
|
|
301
300
|
finger: l
|
|
302
301
|
});
|
|
303
|
-
|
|
302
|
+
Ne({
|
|
304
303
|
sliderRef: S,
|
|
305
304
|
activeIndex: P,
|
|
306
|
-
setActive:
|
|
307
|
-
}), Y(y), z &&
|
|
305
|
+
setActive: F
|
|
306
|
+
}), Y(y), z && !$e(y, V) && z(r, y, P);
|
|
308
307
|
}
|
|
309
|
-
|
|
308
|
+
K.current = 0;
|
|
310
309
|
const i = _e(S.current);
|
|
311
|
-
i.addEventListener("touchmove", J), i.addEventListener("touchend",
|
|
312
|
-
}),
|
|
310
|
+
i.addEventListener("touchmove", J), i.addEventListener("touchend", E);
|
|
311
|
+
}), m = T.useCallback(() => {
|
|
313
312
|
const r = _e(S.current);
|
|
314
|
-
r.removeEventListener("mousemove", J), r.removeEventListener("mouseup",
|
|
315
|
-
}, [
|
|
313
|
+
r.removeEventListener("mousemove", J), r.removeEventListener("mouseup", E), r.removeEventListener("touchmove", J), r.removeEventListener("touchend", E);
|
|
314
|
+
}, [E, J]);
|
|
316
315
|
T.useEffect(() => {
|
|
317
316
|
const {
|
|
318
317
|
current: r
|
|
319
318
|
} = S;
|
|
320
319
|
return r.addEventListener("touchstart", v, {
|
|
321
|
-
passive:
|
|
320
|
+
passive: We()
|
|
322
321
|
}), () => {
|
|
323
322
|
r.removeEventListener("touchstart", v, {
|
|
324
|
-
passive:
|
|
325
|
-
}),
|
|
323
|
+
passive: We()
|
|
324
|
+
}), m();
|
|
326
325
|
};
|
|
327
|
-
}, [
|
|
328
|
-
s &&
|
|
329
|
-
}, [s,
|
|
326
|
+
}, [m, v]), T.useEffect(() => {
|
|
327
|
+
s && m();
|
|
328
|
+
}, [s, m]);
|
|
330
329
|
const se = (r) => (n) => {
|
|
331
330
|
var l;
|
|
332
331
|
if ((l = r.onMouseDown) == null || l.call(r, n), s || n.defaultPrevented || n.button !== 0)
|
|
@@ -340,16 +339,16 @@ function Kt(e) {
|
|
|
340
339
|
} = le({
|
|
341
340
|
finger: i
|
|
342
341
|
});
|
|
343
|
-
|
|
342
|
+
Ne({
|
|
344
343
|
sliderRef: S,
|
|
345
344
|
activeIndex: p,
|
|
346
|
-
setActive:
|
|
347
|
-
}), Y(P), z &&
|
|
345
|
+
setActive: F
|
|
346
|
+
}), Y(P), z && !$e(P, V) && z(n, P, p);
|
|
348
347
|
}
|
|
349
|
-
|
|
348
|
+
K.current = 0;
|
|
350
349
|
const y = _e(S.current);
|
|
351
|
-
y.addEventListener("mousemove", J), y.addEventListener("mouseup",
|
|
352
|
-
}, Q = Ve(
|
|
350
|
+
y.addEventListener("mousemove", J), y.addEventListener("mouseup", E);
|
|
351
|
+
}, Q = Ve(W ? g[0] : b, b, f), Z = Ve(g[g.length - 1], b, f) - Q, Ae = (r = {}) => {
|
|
353
352
|
const n = {
|
|
354
353
|
onMouseDown: se(r || {})
|
|
355
354
|
}, l = c({}, r, n);
|
|
@@ -368,21 +367,21 @@ function Kt(e) {
|
|
|
368
367
|
return {
|
|
369
368
|
active: pe,
|
|
370
369
|
axis: ne,
|
|
371
|
-
axisProps:
|
|
372
|
-
dragging:
|
|
370
|
+
axisProps: Kt,
|
|
371
|
+
dragging: me,
|
|
373
372
|
focusedThumbIndex: Le,
|
|
374
373
|
getHiddenInputProps: (r = {}) => {
|
|
375
374
|
var n;
|
|
376
375
|
const l = {
|
|
377
376
|
onChange: ae(r || {}),
|
|
378
377
|
onFocus: Pe(r || {}),
|
|
379
|
-
onBlur:
|
|
378
|
+
onBlur: we(r || {})
|
|
380
379
|
}, i = c({}, r, l);
|
|
381
380
|
return c({
|
|
382
381
|
tabIndex: ye,
|
|
383
382
|
"aria-labelledby": o,
|
|
384
383
|
"aria-orientation": te,
|
|
385
|
-
"aria-valuemax": de(
|
|
384
|
+
"aria-valuemax": de(f),
|
|
386
385
|
"aria-valuemin": de(b),
|
|
387
386
|
name: q,
|
|
388
387
|
type: "range",
|
|
@@ -391,7 +390,7 @@ function Kt(e) {
|
|
|
391
390
|
step: (n = e.step) != null ? n : void 0,
|
|
392
391
|
disabled: s
|
|
393
392
|
}, i, {
|
|
394
|
-
style: c({},
|
|
393
|
+
style: c({}, Ht, {
|
|
395
394
|
direction: L ? "rtl" : "ltr",
|
|
396
395
|
// So that VoiceOver's focus indicator matches the thumb's dimensions
|
|
397
396
|
width: "100%",
|
|
@@ -409,25 +408,25 @@ function Kt(e) {
|
|
|
409
408
|
},
|
|
410
409
|
marks: oe,
|
|
411
410
|
open: xe,
|
|
412
|
-
range:
|
|
411
|
+
range: W,
|
|
413
412
|
rootRef: be,
|
|
414
413
|
trackLeap: Z,
|
|
415
414
|
trackOffset: Q,
|
|
416
415
|
values: g
|
|
417
416
|
};
|
|
418
417
|
}
|
|
419
|
-
const
|
|
420
|
-
function
|
|
421
|
-
return
|
|
418
|
+
const Jt = (e) => !e || !Re(e), Qt = Jt;
|
|
419
|
+
function Zt(e) {
|
|
420
|
+
return Rt("MuiSlider", e);
|
|
422
421
|
}
|
|
423
|
-
const
|
|
422
|
+
const eo = jt("MuiSlider", ["root", "active", "colorPrimary", "colorSecondary", "disabled", "dragging", "focusVisible", "mark", "markActive", "marked", "markLabel", "markLabelActive", "rail", "sizeSmall", "thumb", "thumbColorPrimary", "thumbColorSecondary", "track", "trackInverted", "trackFalse", "thumbSizeSmall", "valueLabel", "valueLabelOpen", "valueLabelCircle", "valueLabelLabel", "vertical"]), R = eo, to = (e) => {
|
|
424
423
|
const {
|
|
425
424
|
open: o
|
|
426
425
|
} = e;
|
|
427
426
|
return {
|
|
428
|
-
offset: ce(o &&
|
|
429
|
-
circle:
|
|
430
|
-
label:
|
|
427
|
+
offset: ce(o && R.valueLabelOpen),
|
|
428
|
+
circle: R.valueLabelCircle,
|
|
429
|
+
label: R.valueLabelLabel
|
|
431
430
|
};
|
|
432
431
|
};
|
|
433
432
|
function dt(e) {
|
|
@@ -435,16 +434,16 @@ function dt(e) {
|
|
|
435
434
|
children: o,
|
|
436
435
|
className: a,
|
|
437
436
|
value: s
|
|
438
|
-
} = e, d =
|
|
437
|
+
} = e, d = to(e);
|
|
439
438
|
return o ? /* @__PURE__ */ T.cloneElement(o, {
|
|
440
439
|
className: ce(o.props.className)
|
|
441
|
-
}, /* @__PURE__ */
|
|
442
|
-
children: [o.props.children, /* @__PURE__ */
|
|
440
|
+
}, /* @__PURE__ */ N.jsxs(T.Fragment, {
|
|
441
|
+
children: [o.props.children, /* @__PURE__ */ N.jsx("span", {
|
|
443
442
|
className: ce(d.offset, a),
|
|
444
443
|
"aria-hidden": !0,
|
|
445
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ N.jsx("span", {
|
|
446
445
|
className: d.circle,
|
|
447
|
-
children: /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ N.jsx("span", {
|
|
448
447
|
className: d.label,
|
|
449
448
|
children: s
|
|
450
449
|
})
|
|
@@ -457,7 +456,7 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
|
|
|
457
456
|
className: t.string,
|
|
458
457
|
value: t.node
|
|
459
458
|
});
|
|
460
|
-
const
|
|
459
|
+
const oo = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
|
|
461
460
|
function it(e) {
|
|
462
461
|
return e;
|
|
463
462
|
}
|
|
@@ -512,13 +511,13 @@ const pt = ee("span", {
|
|
|
512
511
|
"@media print": {
|
|
513
512
|
colorAdjust: "exact"
|
|
514
513
|
},
|
|
515
|
-
[`&.${
|
|
514
|
+
[`&.${R.disabled}`]: {
|
|
516
515
|
pointerEvents: "none",
|
|
517
516
|
cursor: "default",
|
|
518
517
|
color: (e.vars || e).palette.grey[400]
|
|
519
518
|
},
|
|
520
|
-
[`&.${
|
|
521
|
-
[`& .${
|
|
519
|
+
[`&.${R.dragging}`]: {
|
|
520
|
+
[`& .${R.thumb}, & .${R.track}`]: {
|
|
522
521
|
transition: "none"
|
|
523
522
|
}
|
|
524
523
|
}
|
|
@@ -533,7 +532,7 @@ process.env.NODE_ENV !== "production" && (pt.propTypes = {
|
|
|
533
532
|
*/
|
|
534
533
|
children: t.node
|
|
535
534
|
});
|
|
536
|
-
const
|
|
535
|
+
const mt = ee("span", {
|
|
537
536
|
name: "MuiSlider",
|
|
538
537
|
slot: "Rail",
|
|
539
538
|
overridesResolver: (e, o) => o.rail
|
|
@@ -558,7 +557,7 @@ const ft = ee("span", {
|
|
|
558
557
|
}, e.track === "inverted" && {
|
|
559
558
|
opacity: 1
|
|
560
559
|
}));
|
|
561
|
-
process.env.NODE_ENV !== "production" && (
|
|
560
|
+
process.env.NODE_ENV !== "production" && (mt.propTypes = {
|
|
562
561
|
// ----------------------------- Warning --------------------------------
|
|
563
562
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
564
563
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -568,7 +567,7 @@ process.env.NODE_ENV !== "production" && (ft.propTypes = {
|
|
|
568
567
|
*/
|
|
569
568
|
children: t.node
|
|
570
569
|
});
|
|
571
|
-
const
|
|
570
|
+
const ft = ee("span", {
|
|
572
571
|
name: "MuiSlider",
|
|
573
572
|
slot: "Track",
|
|
574
573
|
overridesResolver: (e, o) => o.track
|
|
@@ -578,7 +577,7 @@ const mt = ee("span", {
|
|
|
578
577
|
}) => {
|
|
579
578
|
const a = (
|
|
580
579
|
// Same logic as the LinearProgress track color
|
|
581
|
-
e.palette.mode === "light" ?
|
|
580
|
+
e.palette.mode === "light" ? _t(e.palette[o.color].main, 0.62) : Vt(e.palette[o.color].main, 0.5)
|
|
582
581
|
);
|
|
583
582
|
return c({
|
|
584
583
|
display: "block",
|
|
@@ -606,7 +605,7 @@ const mt = ee("span", {
|
|
|
606
605
|
borderColor: e.vars ? e.vars.palette.Slider[`${o.color}Track`] : a
|
|
607
606
|
});
|
|
608
607
|
});
|
|
609
|
-
process.env.NODE_ENV !== "production" && (
|
|
608
|
+
process.env.NODE_ENV !== "production" && (ft.propTypes = {
|
|
610
609
|
// ----------------------------- Warning --------------------------------
|
|
611
610
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
612
611
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -673,16 +672,16 @@ const bt = ee("span", {
|
|
|
673
672
|
left: "50%",
|
|
674
673
|
transform: "translate(-50%, -50%)"
|
|
675
674
|
},
|
|
676
|
-
[`&:hover, &.${
|
|
675
|
+
[`&:hover, &.${R.focusVisible}`]: {
|
|
677
676
|
boxShadow: `0px 0px 0px 8px ${e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / 0.16)` : rt(e.palette[o.color].main, 0.16)}`,
|
|
678
677
|
"@media (hover: none)": {
|
|
679
678
|
boxShadow: "none"
|
|
680
679
|
}
|
|
681
680
|
},
|
|
682
|
-
[`&.${
|
|
681
|
+
[`&.${R.active}`]: {
|
|
683
682
|
boxShadow: `0px 0px 0px 14px ${e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / 0.16)` : rt(e.palette[o.color].main, 0.16)}`
|
|
684
683
|
},
|
|
685
|
-
[`&.${
|
|
684
|
+
[`&.${R.disabled}`]: {
|
|
686
685
|
"&:hover": {
|
|
687
686
|
boxShadow: "none"
|
|
688
687
|
}
|
|
@@ -706,7 +705,7 @@ const vt = ee(dt, {
|
|
|
706
705
|
theme: e,
|
|
707
706
|
ownerState: o
|
|
708
707
|
}) => c({
|
|
709
|
-
[`&.${
|
|
708
|
+
[`&.${R.valueLabelOpen}`]: {
|
|
710
709
|
transform: `${o.orientation === "vertical" ? "translateY(-50%)" : "translateY(-100%)"} scale(1)`
|
|
711
710
|
},
|
|
712
711
|
zIndex: 1,
|
|
@@ -844,18 +843,18 @@ process.env.NODE_ENV !== "production" && (gt.propTypes = {
|
|
|
844
843
|
*/
|
|
845
844
|
children: t.node
|
|
846
845
|
});
|
|
847
|
-
const
|
|
846
|
+
const ro = (e) => {
|
|
848
847
|
const {
|
|
849
848
|
disabled: o,
|
|
850
849
|
dragging: a,
|
|
851
850
|
marked: s,
|
|
852
851
|
orientation: d,
|
|
853
852
|
track: L,
|
|
854
|
-
classes:
|
|
855
|
-
color:
|
|
853
|
+
classes: $,
|
|
854
|
+
color: f,
|
|
856
855
|
size: b
|
|
857
856
|
} = e, q = {
|
|
858
|
-
root: ["root", o && "disabled", a && "dragging", s && "marked", d === "vertical" && "vertical", L === "inverted" && "trackInverted", L === !1 && "trackFalse",
|
|
857
|
+
root: ["root", o && "disabled", a && "dragging", s && "marked", d === "vertical" && "vertical", L === "inverted" && "trackInverted", L === !1 && "trackFalse", f && `color${U(f)}`, b && `size${U(b)}`],
|
|
859
858
|
rail: ["rail"],
|
|
860
859
|
track: ["track"],
|
|
861
860
|
mark: ["mark"],
|
|
@@ -863,59 +862,59 @@ const oo = (e) => {
|
|
|
863
862
|
markLabel: ["markLabel"],
|
|
864
863
|
markLabelActive: ["markLabelActive"],
|
|
865
864
|
valueLabel: ["valueLabel"],
|
|
866
|
-
thumb: ["thumb", o && "disabled", b && `thumbSize${U(b)}`,
|
|
865
|
+
thumb: ["thumb", o && "disabled", b && `thumbSize${U(b)}`, f && `thumbColor${U(f)}`],
|
|
867
866
|
active: ["active"],
|
|
868
867
|
disabled: ["disabled"],
|
|
869
868
|
focusVisible: ["focusVisible"]
|
|
870
869
|
};
|
|
871
|
-
return
|
|
872
|
-
},
|
|
870
|
+
return At(q, Zt, $);
|
|
871
|
+
}, ao = ({
|
|
873
872
|
children: e
|
|
874
873
|
}) => e, yt = /* @__PURE__ */ T.forwardRef(function(o, a) {
|
|
875
|
-
var s, d, L,
|
|
876
|
-
const Y =
|
|
874
|
+
var s, d, L, $, f, b, q, ue, X, te, ge, de, _, ye, ke, M, pe, F, xe, H, me, fe, K, V;
|
|
875
|
+
const Y = wt({
|
|
877
876
|
props: o,
|
|
878
877
|
name: "MuiSlider"
|
|
879
|
-
}),
|
|
878
|
+
}), W = It().direction === "rtl", {
|
|
880
879
|
"aria-label": g,
|
|
881
880
|
"aria-valuetext": oe,
|
|
882
|
-
"aria-labelledby":
|
|
881
|
+
"aria-labelledby": j,
|
|
883
882
|
// eslint-disable-next-line react/prop-types
|
|
884
883
|
component: Te = "span",
|
|
885
|
-
components:
|
|
884
|
+
components: w = {},
|
|
886
885
|
componentsProps: A = {},
|
|
887
|
-
color:
|
|
886
|
+
color: je = "primary",
|
|
888
887
|
classes: Le,
|
|
889
888
|
className: re,
|
|
890
889
|
disableSwap: S = !1,
|
|
891
890
|
disabled: Se = !1,
|
|
892
891
|
getAriaLabel: be,
|
|
893
892
|
getAriaValueText: Pe,
|
|
894
|
-
marks:
|
|
893
|
+
marks: we = !1,
|
|
895
894
|
max: ae = 100,
|
|
896
895
|
min: G = 0,
|
|
897
896
|
orientation: ne = "horizontal",
|
|
898
897
|
size: le = "medium",
|
|
899
898
|
step: J = 1,
|
|
900
|
-
scale:
|
|
899
|
+
scale: E = it,
|
|
901
900
|
slotProps: v,
|
|
902
|
-
slots:
|
|
901
|
+
slots: m,
|
|
903
902
|
track: se = "normal",
|
|
904
903
|
valueLabelDisplay: Q = "off",
|
|
905
904
|
valueLabelFormat: Z = it
|
|
906
|
-
} = Y, Ae =
|
|
907
|
-
isRtl:
|
|
905
|
+
} = Y, Ae = Et(Y, oo), x = c({}, Y, {
|
|
906
|
+
isRtl: W,
|
|
908
907
|
max: ae,
|
|
909
908
|
min: G,
|
|
910
909
|
classes: Le,
|
|
911
910
|
disabled: Se,
|
|
912
911
|
disableSwap: S,
|
|
913
912
|
orientation: ne,
|
|
914
|
-
marks:
|
|
915
|
-
color:
|
|
913
|
+
marks: we,
|
|
914
|
+
color: je,
|
|
916
915
|
size: le,
|
|
917
916
|
step: J,
|
|
918
|
-
scale:
|
|
917
|
+
scale: E,
|
|
919
918
|
track: se,
|
|
920
919
|
valueLabelDisplay: Q,
|
|
921
920
|
valueLabelFormat: Z
|
|
@@ -934,110 +933,110 @@ const oo = (e) => {
|
|
|
934
933
|
values: u,
|
|
935
934
|
trackOffset: I,
|
|
936
935
|
trackLeap: ve
|
|
937
|
-
} =
|
|
936
|
+
} = Gt(c({}, x, {
|
|
938
937
|
rootRef: a
|
|
939
938
|
}));
|
|
940
939
|
x.marked = O.length > 0 && O.some((h) => h.label), x.dragging = p, x.focusedThumbIndex = y;
|
|
941
|
-
const
|
|
940
|
+
const C = ro(x), Ie = (s = (d = m == null ? void 0 : m.root) != null ? d : w.Root) != null ? s : pt, Qe = (L = ($ = m == null ? void 0 : m.rail) != null ? $ : w.Rail) != null ? L : mt, Ze = (f = (b = m == null ? void 0 : m.track) != null ? b : w.Track) != null ? f : ft, et = (q = (ue = m == null ? void 0 : m.thumb) != null ? ue : w.Thumb) != null ? q : bt, tt = (X = (te = m == null ? void 0 : m.valueLabel) != null ? te : w.ValueLabel) != null ? X : vt, Me = (ge = (de = m == null ? void 0 : m.mark) != null ? de : w.Mark) != null ? ge : ht, ze = (_ = (ye = m == null ? void 0 : m.markLabel) != null ? ye : w.MarkLabel) != null ? _ : gt, ot = (ke = (M = m == null ? void 0 : m.input) != null ? M : w.Input) != null ? ke : "input", De = (pe = v == null ? void 0 : v.root) != null ? pe : A.root, kt = (F = v == null ? void 0 : v.rail) != null ? F : A.rail, Fe = (xe = v == null ? void 0 : v.track) != null ? xe : A.track, He = (H = v == null ? void 0 : v.thumb) != null ? H : A.thumb, Ye = (me = v == null ? void 0 : v.valueLabel) != null ? me : A.valueLabel, xt = (fe = v == null ? void 0 : v.mark) != null ? fe : A.mark, Tt = (K = v == null ? void 0 : v.markLabel) != null ? K : A.markLabel, Lt = (V = v == null ? void 0 : v.input) != null ? V : A.input, St = B({
|
|
942
941
|
elementType: Ie,
|
|
943
942
|
getSlotProps: Ge,
|
|
944
|
-
externalSlotProps:
|
|
943
|
+
externalSlotProps: De,
|
|
945
944
|
externalForwardedProps: Ae,
|
|
946
|
-
additionalProps: c({},
|
|
945
|
+
additionalProps: c({}, Qt(Ie) && {
|
|
947
946
|
as: Te
|
|
948
947
|
}),
|
|
949
|
-
ownerState: c({}, x,
|
|
950
|
-
className: [
|
|
948
|
+
ownerState: c({}, x, De == null ? void 0 : De.ownerState),
|
|
949
|
+
className: [C.root, re]
|
|
951
950
|
}), Pt = B({
|
|
952
951
|
elementType: Qe,
|
|
953
952
|
externalSlotProps: kt,
|
|
954
953
|
ownerState: x,
|
|
955
|
-
className:
|
|
954
|
+
className: C.rail
|
|
956
955
|
}), Ot = B({
|
|
957
956
|
elementType: Ze,
|
|
958
|
-
externalSlotProps:
|
|
957
|
+
externalSlotProps: Fe,
|
|
959
958
|
additionalProps: {
|
|
960
959
|
style: c({}, ie[i].offset(I), ie[i].leap(ve))
|
|
961
960
|
},
|
|
962
|
-
ownerState: c({}, x,
|
|
963
|
-
className:
|
|
961
|
+
ownerState: c({}, x, Fe == null ? void 0 : Fe.ownerState),
|
|
962
|
+
className: C.track
|
|
964
963
|
}), Be = B({
|
|
965
964
|
elementType: et,
|
|
966
965
|
getSlotProps: r,
|
|
967
966
|
externalSlotProps: He,
|
|
968
967
|
ownerState: c({}, x, He == null ? void 0 : He.ownerState),
|
|
969
|
-
className:
|
|
968
|
+
className: C.thumb
|
|
970
969
|
}), Ct = B({
|
|
971
970
|
elementType: tt,
|
|
972
971
|
externalSlotProps: Ye,
|
|
973
972
|
ownerState: c({}, x, Ye == null ? void 0 : Ye.ownerState),
|
|
974
|
-
className:
|
|
973
|
+
className: C.valueLabel
|
|
975
974
|
}), Ue = B({
|
|
976
975
|
elementType: Me,
|
|
977
976
|
externalSlotProps: xt,
|
|
978
977
|
ownerState: x,
|
|
979
|
-
className:
|
|
978
|
+
className: C.mark
|
|
980
979
|
}), qe = B({
|
|
981
980
|
elementType: ze,
|
|
982
981
|
externalSlotProps: Tt,
|
|
983
982
|
ownerState: x,
|
|
984
|
-
className:
|
|
985
|
-
}),
|
|
983
|
+
className: C.markLabel
|
|
984
|
+
}), Nt = B({
|
|
986
985
|
elementType: ot,
|
|
987
986
|
getSlotProps: Je,
|
|
988
987
|
externalSlotProps: Lt,
|
|
989
988
|
ownerState: x
|
|
990
989
|
});
|
|
991
|
-
return /* @__PURE__ */
|
|
992
|
-
children: [/* @__PURE__ */
|
|
990
|
+
return /* @__PURE__ */ N.jsxs(Ie, c({}, St, {
|
|
991
|
+
children: [/* @__PURE__ */ N.jsx(Qe, c({}, Pt)), /* @__PURE__ */ N.jsx(Ze, c({}, Ot)), O.filter((h) => h.value >= G && h.value <= ae).map((h, k) => {
|
|
993
992
|
const Xe = Ve(h.value, G, ae), Oe = ie[i].offset(Xe);
|
|
994
|
-
let
|
|
995
|
-
return se === !1 ?
|
|
996
|
-
children: [/* @__PURE__ */
|
|
993
|
+
let D;
|
|
994
|
+
return se === !1 ? D = u.indexOf(h.value) !== -1 : D = se === "normal" && (P ? h.value >= u[0] && h.value <= u[u.length - 1] : h.value <= u[0]) || se === "inverted" && (P ? h.value <= u[0] || h.value >= u[u.length - 1] : h.value >= u[0]), /* @__PURE__ */ N.jsxs(T.Fragment, {
|
|
995
|
+
children: [/* @__PURE__ */ N.jsx(Me, c({
|
|
997
996
|
"data-index": k
|
|
998
|
-
}, Ue, !
|
|
999
|
-
markActive:
|
|
997
|
+
}, Ue, !Re(Me) && {
|
|
998
|
+
markActive: D
|
|
1000
999
|
}, {
|
|
1001
1000
|
style: c({}, Oe, Ue.style),
|
|
1002
|
-
className: ce(Ue.className,
|
|
1003
|
-
})), h.label != null ? /* @__PURE__ */
|
|
1001
|
+
className: ce(Ue.className, D && C.markActive)
|
|
1002
|
+
})), h.label != null ? /* @__PURE__ */ N.jsx(ze, c({
|
|
1004
1003
|
"aria-hidden": !0,
|
|
1005
1004
|
"data-index": k
|
|
1006
|
-
}, qe, !
|
|
1007
|
-
markLabelActive:
|
|
1005
|
+
}, qe, !Re(ze) && {
|
|
1006
|
+
markLabelActive: D
|
|
1008
1007
|
}, {
|
|
1009
1008
|
style: c({}, Oe, qe.style),
|
|
1010
|
-
className: ce(
|
|
1009
|
+
className: ce(C.markLabel, qe.className, D && C.markLabelActive),
|
|
1011
1010
|
children: h.label
|
|
1012
1011
|
})) : null]
|
|
1013
1012
|
}, k);
|
|
1014
1013
|
}), u.map((h, k) => {
|
|
1015
|
-
const Xe = Ve(h, G, ae), Oe = ie[i].offset(Xe),
|
|
1014
|
+
const Xe = Ve(h, G, ae), Oe = ie[i].offset(Xe), D = Q === "off" ? ao : tt;
|
|
1016
1015
|
return (
|
|
1017
1016
|
/* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */
|
|
1018
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ N.jsx(D, c({}, !Re(D) && {
|
|
1019
1018
|
valueLabelFormat: Z,
|
|
1020
1019
|
valueLabelDisplay: Q,
|
|
1021
|
-
value: typeof Z == "function" ? Z(
|
|
1020
|
+
value: typeof Z == "function" ? Z(E(h), k) : Z,
|
|
1022
1021
|
index: k,
|
|
1023
1022
|
open: n === k || l === k || Q === "on",
|
|
1024
1023
|
disabled: Se
|
|
1025
1024
|
}, Ct, {
|
|
1026
|
-
children: /* @__PURE__ */
|
|
1025
|
+
children: /* @__PURE__ */ N.jsx(et, c({
|
|
1027
1026
|
"data-index": k
|
|
1028
1027
|
}, Be, {
|
|
1029
|
-
className: ce(
|
|
1028
|
+
className: ce(C.thumb, Be.className, l === k && C.active, y === k && C.focusVisible),
|
|
1030
1029
|
style: c({}, Oe, {
|
|
1031
1030
|
pointerEvents: S && l !== k ? "none" : void 0
|
|
1032
1031
|
}, Be.style),
|
|
1033
|
-
children: /* @__PURE__ */
|
|
1032
|
+
children: /* @__PURE__ */ N.jsx(ot, c({
|
|
1034
1033
|
"data-index": k,
|
|
1035
1034
|
"aria-label": be ? be(k) : g,
|
|
1036
|
-
"aria-valuenow":
|
|
1037
|
-
"aria-labelledby":
|
|
1038
|
-
"aria-valuetext": Pe ? Pe(
|
|
1035
|
+
"aria-valuenow": E(h),
|
|
1036
|
+
"aria-labelledby": j,
|
|
1037
|
+
"aria-valuetext": Pe ? Pe(E(h), k) : oe,
|
|
1039
1038
|
value: u[k]
|
|
1040
|
-
},
|
|
1039
|
+
}, Nt))
|
|
1041
1040
|
}))
|
|
1042
1041
|
}), k)
|
|
1043
1042
|
);
|
|
@@ -1306,8 +1305,23 @@ process.env.NODE_ENV !== "production" && (yt.propTypes = {
|
|
|
1306
1305
|
*/
|
|
1307
1306
|
valueLabelFormat: t.oneOfType([t.func, t.string])
|
|
1308
1307
|
});
|
|
1309
|
-
const
|
|
1310
|
-
const yo = ({ ...e }) => /* @__PURE__ */
|
|
1308
|
+
const no = yt;
|
|
1309
|
+
const yo = ({ ...e }) => /* @__PURE__ */ $t.jsxDEV(
|
|
1310
|
+
no,
|
|
1311
|
+
{
|
|
1312
|
+
className: "kdpa-slider",
|
|
1313
|
+
"aria-labelledby": "discrete-slider",
|
|
1314
|
+
...e
|
|
1315
|
+
},
|
|
1316
|
+
void 0,
|
|
1317
|
+
!1,
|
|
1318
|
+
{
|
|
1319
|
+
fileName: "D:/a.dakhili/kdpa/packages/components/src/components/Slider/KdpaSlider.tsx",
|
|
1320
|
+
lineNumber: 8,
|
|
1321
|
+
columnNumber: 5
|
|
1322
|
+
},
|
|
1323
|
+
globalThis
|
|
1324
|
+
);
|
|
1311
1325
|
export {
|
|
1312
1326
|
yo as K
|
|
1313
1327
|
};
|