welcome-ui 8.1.3 → 8.2.0-alpha.1
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/{AXB53BZF-BOEe01VW.mjs → AXB53BZF-XKOjjeWO.mjs} +3 -3
- package/dist/Accordion.mjs +30 -23
- package/dist/Alert.mjs +72 -66
- package/dist/AspectRatio.mjs +9 -9
- package/dist/Avatar.mjs +45 -41
- package/dist/{BYC7LY2E-B1IDizRs.mjs → BYC7LY2E-CWSI38FM.mjs} +128 -127
- package/dist/Badge.mjs +25 -25
- package/dist/Box.mjs +5 -5
- package/dist/Breadcrumb.mjs +118 -112
- package/dist/Button.mjs +72 -67
- package/dist/ButtonGroup.mjs +12 -11
- package/dist/Card.mjs +14 -14
- package/dist/Checkbox.mjs +2 -2
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.mjs +9 -9
- package/dist/{CustomInput-IA_gVoXd.mjs → CustomPopper-DezjKb9n.mjs} +1458 -1442
- package/dist/DatePicker.mjs +63 -62
- package/dist/DateTimePicker.mjs +69 -63
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +180 -168
- package/dist/DropdownMenu.mjs +354 -351
- package/dist/Field.mjs +103 -92
- package/dist/FieldGroup.mjs +12 -9
- package/dist/FileDrop.mjs +316 -295
- package/dist/FileUpload.mjs +83 -69
- package/dist/Files.mjs +41 -41
- package/dist/Flex.mjs +13 -13
- package/dist/Grid.mjs +29 -29
- package/dist/Hint.mjs +12 -12
- package/dist/{ITI7HKP4-EL9KXYBU.mjs → ITI7HKP4-C89kOQb8.mjs} +68 -67
- package/dist/Icon.mjs +25 -25
- package/dist/Icons.mjs +988 -988
- package/dist/IconsFont.mjs +22 -22
- package/dist/InputText.mjs +64 -56
- package/dist/{JC64G2H7-BzklVBKM.mjs → JC64G2H7-afsomHuH.mjs} +47 -46
- package/dist/{KUU7WJ55-CS4NemC6.mjs → KUU7WJ55-CzsjuIMv.mjs} +1 -1
- package/dist/LVA2YJMS-C-kJ1lkr.mjs +873 -0
- package/dist/Label.mjs +37 -35
- package/dist/Link.mjs +32 -28
- package/dist/Loader.mjs +20 -16
- package/dist/Logo.mjs +55 -42
- package/dist/{MTZPJQMC-CMjAwC0N.mjs → MTZPJQMC-TybFZCho.mjs} +2 -2
- package/dist/Modal.mjs +263 -244
- package/dist/{NLEBE274-QOMV1l7e.mjs → NLEBE274-oSxMftGy.mjs} +9 -9
- package/dist/{P2CTZE2T-Cl2w7OLV.mjs → P2CTZE2T-DOT1mNnX.mjs} +49 -48
- package/dist/{P4IRICAX-DezbJY4s.mjs → P4IRICAX-CWSZLTGz.mjs} +3 -3
- package/dist/Pagination.mjs +105 -103
- package/dist/PasswordInput.mjs +35 -34
- package/dist/Picker.mjs +36 -34
- package/dist/Popover.mjs +106 -99
- package/dist/{QYJ6MIDR-Bb0O5xUM.mjs → QYJ6MIDR-DJ-vUdAM.mjs} +31 -30
- package/dist/Radio.mjs +52 -46
- package/dist/RadioGroup.mjs +47 -47
- package/dist/RadioTab.mjs +37 -35
- package/dist/{SYRFVSLH-jn06-eLy.mjs → SYRFVSLH-B6m278Vb.mjs} +11 -10
- package/dist/Search.mjs +147 -135
- package/dist/Select.mjs +348 -330
- package/dist/Shape.mjs +9 -9
- package/dist/Slider.mjs +353 -326
- package/dist/Stack.mjs +24 -23
- package/dist/Swiper.mjs +192 -186
- package/dist/Table.mjs +23 -23
- package/dist/Tabs.mjs +205 -200
- package/dist/Tag.mjs +49 -47
- package/dist/Text.mjs +20 -20
- package/dist/Textarea.mjs +40 -40
- package/dist/TimePicker.mjs +59 -58
- package/dist/Toast.mjs +135 -128
- package/dist/Toggle.mjs +27 -24
- package/dist/Tooltip.mjs +103 -99
- package/dist/UniversalLink.mjs +15 -15
- package/dist/{VEVQD5MH-CuegL0m0.mjs → VEVQD5MH-0w9Y7Ytc.mjs} +3 -3
- package/dist/{VGCJ63VH-BMzoZtCu.mjs → VGCJ63VH-C0UPBY-5.mjs} +39 -38
- package/dist/VariantIcon.mjs +23 -22
- package/dist/WelcomeLoader.mjs +122 -121
- package/dist/WuiProvider.mjs +52 -44
- package/dist/{X5NMLKT6-CvSCix-_.mjs → X5NMLKT6-BJw3xE-K.mjs} +2 -2
- package/dist/{YV4JVR4I-Bh7B7TET.mjs → YV4JVR4I-DPC8mMuG.mjs} +57 -57
- package/dist/hide-focus-rings-root-CCXdysih.mjs +15 -0
- package/dist/{index-5PUh49rV.mjs → index-62h-enZF.mjs} +62 -61
- package/dist/{index-C7zM96J_.mjs → index-BaLGEKs7.mjs} +8 -8
- package/dist/index-CYmF7qCH.mjs +11 -0
- package/dist/index-C_k-m0Rl.mjs +36 -0
- package/dist/index-D8v_VJ9z.mjs +26 -0
- package/dist/{index-BNGGwOCo.mjs → index-DAZ1SYdj.mjs} +7 -7
- package/dist/index-DpkNUfAS.mjs +11 -0
- package/dist/{index-DqBUFsqP.mjs → index-DvzWKxKE.mjs} +7 -7
- package/dist/{index-Bkl89twW.mjs → index-QaLwIvZS.mjs} +8 -8
- package/dist/{index-BQtDgQBH.mjs → index-SQQQ4dEE.mjs} +8 -8
- package/dist/index-i_anpNhw.mjs +66 -0
- package/dist/index-wl3X6EM1.mjs +16 -0
- package/dist/jsx-runtime-B7I4PJ0H.mjs +613 -0
- package/dist/radio-group-C0fUHvam.mjs +52 -0
- package/dist/theme.mjs +805 -805
- package/dist/types/components/Accordion/index.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/Alert/styles.d.ts +4 -4
- package/dist/types/components/Alert/theme.d.ts +4 -4
- package/dist/types/components/Avatar/index.d.ts +1 -1
- package/dist/types/components/Avatar/styles.d.ts +4 -4
- package/dist/types/components/Avatar/theme.d.ts +1 -1
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +2 -2
- package/dist/types/components/Breadcrumb/Item.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +4 -5
- package/dist/types/components/Button/theme.d.ts +7 -7
- package/dist/types/components/ButtonGroup/index.d.ts +3 -3
- package/dist/types/components/Card/Cover.styles.d.ts +2 -2
- package/dist/types/components/Card/index.d.ts +2 -3
- package/dist/types/components/Checkbox/index.d.ts +2 -2
- package/dist/types/components/ClearButton/index.d.ts +4 -5
- package/dist/types/components/ClearButton/styles.d.ts +2 -2
- package/dist/types/components/CloseButton/styles.d.ts +2 -2
- package/dist/types/components/DatePicker/index.d.ts +3 -3
- package/dist/types/components/DateTimePicker/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +5 -5
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/index.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +8 -8
- package/dist/types/components/Drawer/styles.d.ts +3 -3
- package/dist/types/components/Drawer/theme.d.ts +1 -1
- package/dist/types/components/DropdownMenu/index.d.ts +4 -4
- package/dist/types/components/Field/index.d.ts +8 -8
- package/dist/types/components/Field/styles.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/FilePreview.d.ts +2 -2
- package/dist/types/components/FileDrop/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +16 -16
- package/dist/types/components/FileUpload/index.d.ts +13 -13
- package/dist/types/components/Files/index.d.ts +4 -4
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/index.d.ts +1 -2
- package/dist/types/components/Icon/index.d.ts +3 -3
- package/dist/types/components/Icon/styles.d.ts +3 -3
- package/dist/types/components/Icon/theme.d.ts +1 -1
- package/dist/types/components/Icons/index.d.ts +2 -2
- package/dist/types/components/IconsFont/index.d.ts +2 -3
- package/dist/types/components/IconsFont/styles.d.ts +1 -1
- package/dist/types/components/InputText/index.d.ts +1 -1
- package/dist/types/components/InputText/styles.d.ts +1 -1
- package/dist/types/components/Label/index.d.ts +2 -3
- package/dist/types/components/Link/index.d.ts +3 -3
- package/dist/types/components/Link/styles.d.ts +2 -2
- package/dist/types/components/Loader/index.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +2 -2
- package/dist/types/components/Loader/theme.d.ts +2 -2
- package/dist/types/components/Logo/Solutions.d.ts +1 -2
- package/dist/types/components/Logo/Symbol.d.ts +1 -2
- package/dist/types/components/Logo/Wui.d.ts +1 -2
- package/dist/types/components/Logo/index.d.ts +5 -5
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -5
- package/dist/types/components/Modal/Assets/Iframe.d.ts +1 -2
- package/dist/types/components/Modal/Assets/index.d.ts +5 -5
- package/dist/types/components/Modal/Assets/styles.d.ts +4 -4
- package/dist/types/components/Modal/Close.d.ts +1 -2
- package/dist/types/components/Modal/Footer.d.ts +1 -1
- package/dist/types/components/Modal/Header.d.ts +2 -2
- package/dist/types/components/Modal/index.d.ts +11 -11
- package/dist/types/components/Modal/styles.d.ts +4 -4
- package/dist/types/components/Modal/theme.d.ts +1 -1
- package/dist/types/components/Pagination/index.d.ts +2 -2
- package/dist/types/components/Pagination/utils.d.ts +1 -1
- package/dist/types/components/Popover/Arrow.d.ts +1 -2
- package/dist/types/components/Popover/Content.d.ts +2 -3
- package/dist/types/components/Popover/Popover.d.ts +4 -5
- package/dist/types/components/Popover/PopoverHover.d.ts +3 -4
- package/dist/types/components/Popover/Trigger.d.ts +1 -1
- package/dist/types/components/Popover/usePopover.d.ts +6 -6
- package/dist/types/components/Radio/index.d.ts +5 -5
- package/dist/types/components/Radio/styles.d.ts +2 -2
- package/dist/types/components/RadioGroup/index.d.ts +2 -2
- package/dist/types/components/RadioTab/index.d.ts +2 -2
- package/dist/types/components/RadioTab/styles.d.ts +9 -9
- package/dist/types/components/Search/index.d.ts +4 -4
- package/dist/types/components/Select/index.d.ts +9 -9
- package/dist/types/components/Select/styles.d.ts +4 -4
- package/dist/types/components/Select/utils.d.ts +4 -4
- package/dist/types/components/Shape/index.d.ts +1 -1
- package/dist/types/components/Shape/styles.d.ts +2 -2
- package/dist/types/components/Slider/Range.d.ts +3 -3
- package/dist/types/components/Slider/index.d.ts +2 -2
- package/dist/types/components/Slider/styles.d.ts +10 -10
- package/dist/types/components/Stack/index.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +16 -17
- package/dist/types/components/Swiper/styles.d.ts +55 -55
- package/dist/types/components/System/index.d.ts +10 -10
- package/dist/types/components/Table/index.d.ts +6 -7
- package/dist/types/components/Table/styles.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +5 -5
- package/dist/types/components/Tabs/TabList.d.ts +2 -2
- package/dist/types/components/Tabs/TabPanel.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +2 -3
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +2 -2
- package/dist/types/components/Text/index.d.ts +2 -2
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/TimePicker/index.d.ts +2 -2
- package/dist/types/components/Toast/Growl.d.ts +1 -1
- package/dist/types/components/Toast/Snackbar.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +4 -4
- package/dist/types/components/Toast/index.d.ts +5 -5
- package/dist/types/components/Toast/styles.d.ts +10 -10
- package/dist/types/components/Toast/theme.d.ts +1 -1
- package/dist/types/components/Toast/utils.d.ts +13 -13
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Toggle/theme.d.ts +4 -4
- package/dist/types/components/Tooltip/index.d.ts +3 -3
- package/dist/types/components/VariantIcon/index.d.ts +1 -1
- package/dist/types/components/VariantIcon/styles.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +3 -3
- package/dist/types/theme/dark.d.ts +1 -1
- package/dist/types/theme/defaultFields.d.ts +5 -5
- package/dist/types/theme/fonts.d.ts +5 -5
- package/dist/types/theme/index.d.ts +31 -31
- package/dist/types/theme/screens.d.ts +7 -7
- package/dist/types/theme/space.d.ts +9 -9
- package/dist/types/utils/field-styles.d.ts +2 -2
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/ts-utils.d.ts +1 -1
- package/dist/types/utils/use-copy-text.d.ts +1 -1
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/wrap-children.d.ts +1 -1
- package/dist/{use-viewport-CfklieD-.mjs → use-viewport-CWpjoHXy.mjs} +2 -2
- package/dist/utils.mjs +13 -13
- package/dist/wrap-children-CzmhoRzd.mjs +13 -0
- package/package.json +3 -27
- package/dist/LVA2YJMS-DDEmK0pp.mjs +0 -1482
- package/dist/hide-focus-rings-root-BNyva1yb.mjs +0 -14
- package/dist/index-B0gDDiFm.mjs +0 -66
- package/dist/index-B22SHR8h.mjs +0 -26
- package/dist/index-CQD9fgf_.mjs +0 -11
- package/dist/index-CmsWSKKs.mjs +0 -11
- package/dist/index-u1oHKa7X.mjs +0 -16
- package/dist/index-wr_b5GSV.mjs +0 -36
- package/dist/radio-group-RFyDp0KD.mjs +0 -51
- package/dist/wrap-children-aq69jtFP.mjs +0 -12
- package/dist/{downshift.esm-D0ns_SQs.mjs → downshift.esm-B7Jil1wW.mjs} +9 -9
package/dist/Slider.mjs
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Box as
|
|
2
|
+
import { j as r } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { useState as D, useRef as S, useCallback as ne, useEffect as F } from "react";
|
|
4
|
+
import { Box as p } from "./Box.mjs";
|
|
5
5
|
import { Hint as X } from "./Hint.mjs";
|
|
6
|
-
import { Text as re } from "./Text.mjs";
|
|
7
6
|
import { InputText as O } from "./InputText.mjs";
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
|
|
7
|
+
import { forwardRef as re } from "./System.mjs";
|
|
8
|
+
import { Text as se } from "./Text.mjs";
|
|
9
|
+
import R, { th as l, css as x } from "@xstyled/styled-components";
|
|
10
|
+
const W = x`
|
|
10
11
|
appearance: none;
|
|
11
12
|
cursor: pointer;
|
|
12
13
|
height: 20;
|
|
13
14
|
width: 20;
|
|
14
15
|
transform: scale(1);
|
|
15
16
|
transition:
|
|
16
|
-
background-color ${
|
|
17
|
-
border-color ${
|
|
17
|
+
background-color ${l.transition("medium")},
|
|
18
|
+
border-color ${l.transition("medium")},
|
|
18
19
|
transform 100ms ease-in-out;
|
|
19
|
-
`,
|
|
20
|
-
${
|
|
20
|
+
`, H = x`
|
|
21
|
+
${l("sliders.focused")};
|
|
21
22
|
transform: scale(1.2);
|
|
22
|
-
`,
|
|
23
|
+
`, ie = x`
|
|
23
24
|
position: absolute;
|
|
24
25
|
width: 100%;
|
|
25
|
-
height: ${
|
|
26
|
-
`,
|
|
27
|
-
({ borderSelectorColor:
|
|
28
|
-
${
|
|
26
|
+
height: ${l("space.xs")};
|
|
27
|
+
`, de = R.input(
|
|
28
|
+
({ borderSelectorColor: i, disabled: c }) => x`
|
|
29
|
+
${l("sliders.default")};
|
|
29
30
|
appearance: none;
|
|
30
31
|
cursor: pointer;
|
|
31
32
|
background-repeat: no-repeat;
|
|
32
33
|
border-radius: 0;
|
|
33
34
|
margin: auto 0;
|
|
34
35
|
width: 100%;
|
|
35
|
-
height: ${
|
|
36
|
+
height: ${l("space.xs")};
|
|
36
37
|
|
|
37
38
|
&::-webkit-slider-thumb {
|
|
38
|
-
${
|
|
39
|
+
${l("sliders.selector")};
|
|
39
40
|
${W};
|
|
40
|
-
border-color: ${
|
|
41
|
+
border-color: ${i || "transparent"};
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
&::-moz-range-thumb {
|
|
44
|
-
${
|
|
45
|
+
${l("sliders.selector")};
|
|
45
46
|
${W};
|
|
46
|
-
border-color: ${
|
|
47
|
+
border-color: ${i || "transparent"};
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
&:active,
|
|
@@ -51,42 +52,42 @@ const W = b`
|
|
|
51
52
|
outline: none;
|
|
52
53
|
|
|
53
54
|
&::-webkit-slider-thumb {
|
|
54
|
-
${
|
|
55
|
+
${H};
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
&::-moz-range-thumb {
|
|
58
|
-
${
|
|
59
|
+
${H};
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
${c &&
|
|
63
|
-
${
|
|
63
|
+
${c && x`
|
|
64
|
+
${l("sliders.disabled")}
|
|
64
65
|
cursor: not-allowed;
|
|
65
66
|
|
|
66
67
|
&::-webkit-slider-thumb {
|
|
67
|
-
${
|
|
68
|
+
${l("sliders.selector.disabled")};
|
|
68
69
|
cursor: not-allowed;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
&::-moz-range-thumb {
|
|
72
|
-
${
|
|
73
|
+
${l("sliders.selector.disabled")};
|
|
73
74
|
cursor: not-allowed;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
&:active {
|
|
77
78
|
&::-webkit-slider-thumb {
|
|
78
|
-
${
|
|
79
|
+
${l("sliders.focused.disabled")};
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
&::-moz-range-thumb {
|
|
82
|
-
${
|
|
83
|
+
${l("sliders.focused.disabled")};
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
`};
|
|
86
87
|
`
|
|
87
88
|
), ee = R.input(
|
|
88
|
-
({ borderSelectorColor:
|
|
89
|
-
${
|
|
89
|
+
({ borderSelectorColor: i, disabled: c }) => x`
|
|
90
|
+
${l("sliders.rangeInput")}
|
|
90
91
|
appearance: none;
|
|
91
92
|
pointer-events: none;
|
|
92
93
|
position: absolute;
|
|
@@ -94,24 +95,24 @@ const W = b`
|
|
|
94
95
|
width: 100%;
|
|
95
96
|
outline: none;
|
|
96
97
|
z-index: 1;
|
|
97
|
-
top: ${
|
|
98
|
+
top: ${l("space.xxs")};
|
|
98
99
|
|
|
99
100
|
&::-webkit-slider-thumb {
|
|
100
|
-
${
|
|
101
|
+
${l("sliders.selector")};
|
|
101
102
|
${W};
|
|
102
103
|
|
|
103
|
-
border-color: ${
|
|
104
|
-
top: ${
|
|
104
|
+
border-color: ${i || "transparent"};
|
|
105
|
+
top: ${l("space.sm")};
|
|
105
106
|
pointer-events: all;
|
|
106
107
|
position: relative;
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
&::-moz-range-thumb {
|
|
110
|
-
${
|
|
111
|
+
${l("sliders.selector")};
|
|
111
112
|
${W};
|
|
112
113
|
|
|
113
|
-
border-color: ${
|
|
114
|
-
top: ${
|
|
114
|
+
border-color: ${i || "transparent"};
|
|
115
|
+
top: ${l("space.sm")};
|
|
115
116
|
pointer-events: all;
|
|
116
117
|
position: relative;
|
|
117
118
|
}
|
|
@@ -119,53 +120,53 @@ const W = b`
|
|
|
119
120
|
&:active,
|
|
120
121
|
&:focus-visible {
|
|
121
122
|
&::-webkit-slider-thumb {
|
|
122
|
-
${
|
|
123
|
+
${H};
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
&::-moz-range-thumb {
|
|
126
|
-
${
|
|
127
|
+
${H};
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
${c &&
|
|
131
|
+
${c && x`
|
|
131
132
|
&::-webkit-slider-thumb {
|
|
132
|
-
${
|
|
133
|
+
${l("sliders.selector.disabled")};
|
|
133
134
|
cursor: not-allowed;
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
&::-moz-range-thumb {
|
|
137
|
-
${
|
|
138
|
+
${l("sliders.selector.disabled")};
|
|
138
139
|
cursor: not-allowed;
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
&:active {
|
|
142
143
|
&::-webkit-slider-thumb {
|
|
143
|
-
${
|
|
144
|
+
${l("sliders.focused.disabled")};
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
&::-moz-range-thumb {
|
|
147
|
-
${
|
|
148
|
+
${l("sliders.focused.disabled")};
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
`};
|
|
151
152
|
`
|
|
152
|
-
), fe = R(
|
|
153
|
-
() =>
|
|
154
|
-
${
|
|
153
|
+
), fe = R(p)(
|
|
154
|
+
() => x`
|
|
155
|
+
${ie};
|
|
155
156
|
background-color: beige-40;
|
|
156
157
|
`
|
|
157
|
-
),
|
|
158
|
-
({ disabled:
|
|
159
|
-
${
|
|
158
|
+
), me = R(p)(
|
|
159
|
+
({ disabled: i }) => x`
|
|
160
|
+
${ie};
|
|
160
161
|
background-color: primary-40;
|
|
161
162
|
|
|
162
|
-
${
|
|
163
|
-
${
|
|
163
|
+
${i && x`
|
|
164
|
+
${l("sliders.disabled")}
|
|
164
165
|
cursor: not-allowed;
|
|
165
166
|
`};
|
|
166
167
|
`
|
|
167
|
-
),
|
|
168
|
-
() =>
|
|
168
|
+
), oe = R(p)(
|
|
169
|
+
() => x`
|
|
169
170
|
position: absolute;
|
|
170
171
|
|
|
171
172
|
:before {
|
|
@@ -177,8 +178,8 @@ const W = b`
|
|
|
177
178
|
transform: translate(-50%);
|
|
178
179
|
}
|
|
179
180
|
`
|
|
180
|
-
),
|
|
181
|
-
() =>
|
|
181
|
+
), le = R(X)(
|
|
182
|
+
() => x`
|
|
182
183
|
position: absolute;
|
|
183
184
|
color: neutral-50;
|
|
184
185
|
top: 0;
|
|
@@ -186,7 +187,7 @@ const W = b`
|
|
|
186
187
|
white-space: nowrap;
|
|
187
188
|
`
|
|
188
189
|
), J = R.outputBox(
|
|
189
|
-
({ isVisible:
|
|
190
|
+
({ isVisible: i }) => x`
|
|
190
191
|
opacity: 0;
|
|
191
192
|
visibility: hidden;
|
|
192
193
|
transition:
|
|
@@ -195,337 +196,363 @@ const W = b`
|
|
|
195
196
|
transform 150ms ease-in-out;
|
|
196
197
|
position: absolute;
|
|
197
198
|
text-align: center;
|
|
198
|
-
transform: translate(-50%, calc(-100% + -${
|
|
199
|
+
transform: translate(-50%, calc(-100% + -${l("space.xs")}));
|
|
199
200
|
|
|
200
|
-
${
|
|
201
|
+
${i && x`
|
|
201
202
|
opacity: 100;
|
|
202
203
|
visibility: visible;
|
|
203
|
-
transform: translate(-50%, calc(-100% + -${
|
|
204
|
+
transform: translate(-50%, calc(-100% + -${l("space.sm")}));
|
|
204
205
|
`}
|
|
205
206
|
`
|
|
206
|
-
), Q = R(
|
|
207
|
-
() =>
|
|
208
|
-
${
|
|
207
|
+
), Q = R(p)(
|
|
208
|
+
() => x`
|
|
209
|
+
${l("sliders.output.tooltip")};
|
|
209
210
|
flex: 1 1 auto;
|
|
210
211
|
margin: auto;
|
|
211
|
-
min-width: ${
|
|
212
|
-
padding: ${
|
|
212
|
+
min-width: ${l("space.xxs")};
|
|
213
|
+
padding: ${l("space.xs")} ${l("space.sm")};
|
|
213
214
|
`
|
|
214
215
|
), te = 20, C = ({
|
|
215
|
-
min:
|
|
216
|
+
min: i,
|
|
216
217
|
step: c,
|
|
217
|
-
toCompare:
|
|
218
|
-
value:
|
|
218
|
+
toCompare: b,
|
|
219
|
+
value: j
|
|
219
220
|
}) => {
|
|
220
|
-
let n = Math.min(
|
|
221
|
-
return n = Math.max(n,
|
|
221
|
+
let n = Math.min(j, b - 1 * c);
|
|
222
|
+
return n = Math.max(n, i), _(n, c);
|
|
222
223
|
}, L = ({
|
|
223
|
-
max:
|
|
224
|
+
max: i,
|
|
224
225
|
step: c,
|
|
225
|
-
toCompare:
|
|
226
|
-
value:
|
|
226
|
+
toCompare: b,
|
|
227
|
+
value: j
|
|
227
228
|
}) => {
|
|
228
|
-
let n = Math.max(
|
|
229
|
-
return n = Math.min(n,
|
|
230
|
-
},
|
|
229
|
+
let n = Math.max(j, b + 1 * c);
|
|
230
|
+
return n = Math.min(n, i), _(n, c);
|
|
231
|
+
}, he = re(
|
|
231
232
|
({
|
|
232
|
-
borderSelectorColor:
|
|
233
|
+
borderSelectorColor: i = "neutral-10",
|
|
233
234
|
disabled: c,
|
|
234
|
-
hint:
|
|
235
|
-
label:
|
|
235
|
+
hint: b,
|
|
236
|
+
label: j,
|
|
236
237
|
max: n,
|
|
237
|
-
min:
|
|
238
|
-
onChange:
|
|
239
|
-
step:
|
|
238
|
+
min: o,
|
|
239
|
+
onChange: g,
|
|
240
|
+
step: a = 1,
|
|
240
241
|
tooltip: M,
|
|
241
|
-
type:
|
|
242
|
-
value:
|
|
243
|
-
values:
|
|
242
|
+
type: $,
|
|
243
|
+
value: h,
|
|
244
|
+
values: E,
|
|
244
245
|
...G
|
|
245
246
|
}, q) => {
|
|
246
|
-
const [u,
|
|
247
|
+
const [u, k] = D(o), [d, z] = D(n), [N, w] = D(n), [v, y] = D(n), A = S(null), P = S(null), V = S(null), K = S(null), B = S(null), [T, s] = D(!1), [f, Y] = D(!1), ce = (e) => {
|
|
247
248
|
const t = C({
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
min: o,
|
|
250
|
+
step: a,
|
|
251
|
+
toCompare: d,
|
|
252
|
+
value: parseInt(e.target.value, 10)
|
|
252
253
|
});
|
|
253
|
-
|
|
254
|
+
w(t), k(t), e.target.value = t.toString();
|
|
254
255
|
}, ue = (e) => {
|
|
255
256
|
const t = L({
|
|
256
|
-
|
|
257
|
+
max: n,
|
|
258
|
+
step: a,
|
|
257
259
|
toCompare: u,
|
|
258
|
-
|
|
259
|
-
max: n
|
|
260
|
+
value: parseInt(e.target.value, 10)
|
|
260
261
|
});
|
|
261
|
-
|
|
262
|
+
y(t), z(t), e.target.value = t.toString();
|
|
262
263
|
}, Z = (e, t) => {
|
|
263
264
|
if (e.preventDefault(), t === "min") {
|
|
264
|
-
let
|
|
265
|
-
e.key === "ArrowRight" && (
|
|
265
|
+
let m = u;
|
|
266
|
+
e.key === "ArrowRight" && (m = C({ min: o, step: a, toCompare: d, value: m + a })), e.key === "ArrowLeft" && (m = C({ min: o, step: a, toCompare: d, value: m - a })), w(m), k(m), g({ max: d, min: m });
|
|
266
267
|
}
|
|
267
268
|
if (t === "max") {
|
|
268
|
-
let
|
|
269
|
-
e.key === "ArrowRight" && (
|
|
269
|
+
let m = d;
|
|
270
|
+
e.key === "ArrowRight" && (m = L({ max: n, step: a, toCompare: u, value: m + a })), e.key === "ArrowLeft" && (m = L({ max: n, step: a, toCompare: u, value: m - a })), y(m), z(m), g({ max: m, min: u });
|
|
270
271
|
}
|
|
271
272
|
}, I = ne(
|
|
272
273
|
(e) => {
|
|
273
|
-
const t = Math.round((e -
|
|
274
|
+
const t = Math.round((e - o) / (n - o) * 100);
|
|
274
275
|
return t < 0 ? 0 : t > 100 ? 100 : t;
|
|
275
276
|
},
|
|
276
|
-
[
|
|
277
|
+
[o, n]
|
|
277
278
|
);
|
|
278
279
|
return F(() => {
|
|
279
|
-
if (
|
|
280
|
-
const e = I(u), t = I(parseInt(
|
|
281
|
-
|
|
280
|
+
if (P.current) {
|
|
281
|
+
const e = I(u), t = I(parseInt(P.current.value, 10));
|
|
282
|
+
V.current && (V.current.style.left = `${e}%`, V.current.style.width = `${t - e}%`);
|
|
282
283
|
}
|
|
283
284
|
}, [u, I]), F(() => {
|
|
284
285
|
if (A.current) {
|
|
285
|
-
const e = I(parseInt(A.current.value, 10)), t = I(
|
|
286
|
-
if (
|
|
287
|
-
const
|
|
288
|
-
K.current.style.left = `calc(${
|
|
286
|
+
const e = I(parseInt(A.current.value, 10)), t = I(d);
|
|
287
|
+
if (V.current && (V.current.style.width = `${t - e}%`), K.current) {
|
|
288
|
+
const m = I(u) / 100;
|
|
289
|
+
K.current.style.left = `calc(${m * 100}% + ${(0.5 - m) * te}px)`;
|
|
289
290
|
}
|
|
290
291
|
if (B.current) {
|
|
291
|
-
const
|
|
292
|
-
B.current.style.left = `calc(${
|
|
292
|
+
const m = I(d) / 100;
|
|
293
|
+
B.current.style.left = `calc(${m * 100}% + ${(0.5 - m) * te}px)`;
|
|
293
294
|
}
|
|
294
295
|
}
|
|
295
|
-
}, [u,
|
|
296
|
-
if (
|
|
297
|
-
if (!isNaN(
|
|
298
|
-
const e = C({
|
|
299
|
-
|
|
296
|
+
}, [u, d, I]), F(() => {
|
|
297
|
+
if (h) {
|
|
298
|
+
if (!isNaN(h.min) && h.min !== u) {
|
|
299
|
+
const e = C({ min: o, step: a, toCompare: d, value: h.min || o });
|
|
300
|
+
k(e), w(e);
|
|
300
301
|
}
|
|
301
|
-
if (!isNaN(
|
|
302
|
-
const e = L({
|
|
303
|
-
z(e),
|
|
302
|
+
if (!isNaN(h.max) && h.max !== d) {
|
|
303
|
+
const e = L({ max: n, step: a, toCompare: u, value: h.max || n });
|
|
304
|
+
z(e), y(e);
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
|
-
}, [
|
|
307
|
-
|
|
308
|
-
{
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
307
|
+
}, [h]), /* @__PURE__ */ r.jsxs(p, { position: "relative", ref: q, w: "100%", children: [
|
|
308
|
+
j ? /* @__PURE__ */ r.jsx(se, { as: "label", variant: "sm", children: j }) : null,
|
|
309
|
+
/* @__PURE__ */ r.jsxs(p, { alignItems: "center", display: "flex", gap: "sm", children: [
|
|
310
|
+
($ === "inline" || $ === "fields") && ($ === "fields" ? /* @__PURE__ */ r.jsx(
|
|
311
|
+
O,
|
|
312
|
+
{
|
|
313
|
+
disabled: c,
|
|
314
|
+
max: d,
|
|
315
|
+
min: o,
|
|
316
|
+
onBlur: () => {
|
|
317
|
+
const e = C({
|
|
318
|
+
min: o,
|
|
319
|
+
step: a,
|
|
320
|
+
toCompare: d,
|
|
321
|
+
value: N
|
|
322
|
+
});
|
|
323
|
+
w(e), k(e), g({ max: d, min: e });
|
|
324
|
+
},
|
|
325
|
+
onChange: (e) => {
|
|
326
|
+
let t = parseInt(e.target.value, 10);
|
|
327
|
+
isNaN(t) && (t = 0), w(t);
|
|
328
|
+
},
|
|
329
|
+
onKeyDown: (e) => {
|
|
330
|
+
if (e.key === "Enter") {
|
|
331
|
+
const t = C({
|
|
332
|
+
min: o,
|
|
333
|
+
step: a,
|
|
334
|
+
toCompare: d,
|
|
335
|
+
value: N
|
|
336
|
+
});
|
|
337
|
+
w(t), k(t), g({ max: d, min: t });
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
size: "sm",
|
|
341
|
+
type: "number",
|
|
342
|
+
value: N.toString(),
|
|
343
|
+
w: 72
|
|
334
344
|
}
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
345
|
+
) : /* @__PURE__ */ r.jsx(p, { children: o })),
|
|
346
|
+
/* @__PURE__ */ r.jsxs(p, { flexGrow: "1", position: "relative", children: [
|
|
347
|
+
M ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
348
|
+
/* @__PURE__ */ r.jsx(J, { isVisible: T, ref: K, children: /* @__PURE__ */ r.jsx(Q, { children: u }) }),
|
|
349
|
+
/* @__PURE__ */ r.jsx(J, { isVisible: f, ref: B, children: /* @__PURE__ */ r.jsx(Q, { children: d }) })
|
|
350
|
+
] }) : null,
|
|
351
|
+
/* @__PURE__ */ r.jsxs(p, { h: 20, pb: "sm", position: "relative", pt: "sm", w: "100%", children: [
|
|
352
|
+
/* @__PURE__ */ r.jsx(
|
|
353
|
+
ee,
|
|
354
|
+
{
|
|
355
|
+
...G,
|
|
356
|
+
borderSelectorColor: i,
|
|
357
|
+
disabled: c,
|
|
358
|
+
max: n,
|
|
359
|
+
min: o,
|
|
360
|
+
onChange: ce,
|
|
361
|
+
onKeyDown: (e) => Z(e, "min"),
|
|
362
|
+
onMouseDown: () => {
|
|
363
|
+
M && T === !1 && s(!0);
|
|
364
|
+
},
|
|
365
|
+
onMouseUp: () => {
|
|
366
|
+
g({ max: d, min: u }), M && s(!1);
|
|
367
|
+
},
|
|
368
|
+
ref: A,
|
|
369
|
+
step: a,
|
|
370
|
+
type: "range",
|
|
371
|
+
value: u
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
/* @__PURE__ */ r.jsx(
|
|
375
|
+
ee,
|
|
376
|
+
{
|
|
377
|
+
...G,
|
|
378
|
+
borderSelectorColor: i,
|
|
379
|
+
disabled: c,
|
|
380
|
+
max: n,
|
|
381
|
+
min: o,
|
|
382
|
+
onChange: ue,
|
|
383
|
+
onKeyDown: (e) => Z(e, "max"),
|
|
384
|
+
onMouseDown: () => {
|
|
385
|
+
M && f === !1 && Y(!0);
|
|
386
|
+
},
|
|
387
|
+
onMouseUp: () => {
|
|
388
|
+
g({ max: d, min: u }), M && Y(!1);
|
|
389
|
+
},
|
|
390
|
+
ref: P,
|
|
391
|
+
step: a,
|
|
392
|
+
type: "range",
|
|
393
|
+
value: d
|
|
394
|
+
}
|
|
395
|
+
),
|
|
396
|
+
/* @__PURE__ */ r.jsx(fe, {}),
|
|
397
|
+
/* @__PURE__ */ r.jsx(me, { disabled: c, ref: V })
|
|
398
|
+
] }),
|
|
399
|
+
E ? /* @__PURE__ */ r.jsx(p, { h: 24, ml: 10, mr: 10, position: "relative", children: E.reduce((e, t) => e.includes(t) ? e : [...e, t], []).filter((e) => e >= o && e <= n).map((e, t) => /* @__PURE__ */ r.jsx(oe, { left: `${I(e)}%`, children: /* @__PURE__ */ r.jsx(le, { children: e }) }, `${e}-${t}`)) }) : null
|
|
400
|
+
] }),
|
|
401
|
+
($ === "inline" || $ === "fields") && ($ === "fields" ? /* @__PURE__ */ r.jsx(
|
|
402
|
+
O,
|
|
403
|
+
{
|
|
404
|
+
disabled: c,
|
|
405
|
+
max: n,
|
|
406
|
+
min: u + 1,
|
|
407
|
+
onBlur: () => {
|
|
408
|
+
const e = L({
|
|
409
|
+
max: n,
|
|
410
|
+
step: a,
|
|
411
|
+
toCompare: u,
|
|
412
|
+
value: v
|
|
413
|
+
});
|
|
414
|
+
y(e), z(e), g({ max: e, min: u });
|
|
415
|
+
},
|
|
416
|
+
onChange: (e) => {
|
|
417
|
+
let t = parseInt(e.target.value, 10);
|
|
418
|
+
isNaN(t) && (t = 0), y(t);
|
|
419
|
+
},
|
|
420
|
+
onKeyDown: (e) => {
|
|
421
|
+
if (e.key === "Enter") {
|
|
422
|
+
const t = L({
|
|
423
|
+
max: n,
|
|
424
|
+
step: a,
|
|
425
|
+
toCompare: u,
|
|
426
|
+
value: v
|
|
427
|
+
});
|
|
428
|
+
y(t), z(t), g({ max: t, min: u });
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
size: "sm",
|
|
432
|
+
type: "number",
|
|
433
|
+
value: v.toString(),
|
|
434
|
+
w: 72
|
|
414
435
|
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
w: 72
|
|
420
|
-
}
|
|
421
|
-
) : /* @__PURE__ */ r.createElement($, null, n))), g && /* @__PURE__ */ r.createElement(X, { color: "neutral-50", mt: 0 }, g));
|
|
436
|
+
) : /* @__PURE__ */ r.jsx(p, { children: n }))
|
|
437
|
+
] }),
|
|
438
|
+
b ? /* @__PURE__ */ r.jsx(X, { color: "neutral-50", mt: 0, children: b }) : null
|
|
439
|
+
] });
|
|
422
440
|
}
|
|
423
|
-
),
|
|
441
|
+
), pe = 20, _ = (i, c) => Math.round(i / c) * c, U = (i, c, b, j) => (i = _(i, j), i < c ? c : i > b ? b : i), ae = re(
|
|
424
442
|
({
|
|
425
|
-
borderSelectorColor:
|
|
443
|
+
borderSelectorColor: i = "neutral-10",
|
|
426
444
|
disabled: c,
|
|
427
|
-
hint:
|
|
428
|
-
label:
|
|
445
|
+
hint: b,
|
|
446
|
+
label: j,
|
|
429
447
|
max: n,
|
|
430
|
-
min:
|
|
431
|
-
onChange:
|
|
432
|
-
step:
|
|
448
|
+
min: o,
|
|
449
|
+
onChange: g,
|
|
450
|
+
step: a = 1,
|
|
433
451
|
tooltip: M,
|
|
434
|
-
type:
|
|
435
|
-
value:
|
|
436
|
-
values:
|
|
452
|
+
type: $,
|
|
453
|
+
value: h,
|
|
454
|
+
values: E,
|
|
437
455
|
...G
|
|
438
456
|
}, q) => {
|
|
439
|
-
const u = S(null),
|
|
440
|
-
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
let f =
|
|
444
|
-
|
|
445
|
-
},
|
|
446
|
-
let f = parseInt(
|
|
447
|
-
isNaN(f) && (f = 0),
|
|
457
|
+
const u = S(null), k = S(null), [d, z] = D(!1), [N, w] = D(U(h, o, n, a)), [v, y] = D(U(h, o, n, a)), A = (s) => {
|
|
458
|
+
s = _(s, a), y(s);
|
|
459
|
+
}, P = (s) => {
|
|
460
|
+
s.preventDefault();
|
|
461
|
+
let f = v;
|
|
462
|
+
s.key === "ArrowRight" && (f = U(f + a, o, n, a)), s.key === "ArrowLeft" && (f = U(f - a, o, n, a)), y(f), w(f), g(f);
|
|
463
|
+
}, V = (s) => {
|
|
464
|
+
let f = parseInt(s.target.value, 10);
|
|
465
|
+
isNaN(f) && (f = 0), w(f);
|
|
448
466
|
}, K = () => {
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
}, B = (
|
|
452
|
-
|
|
467
|
+
const s = U(N, o, n, a);
|
|
468
|
+
w(s), y(s), g(s);
|
|
469
|
+
}, B = (s) => {
|
|
470
|
+
s.key === "Enter" && K();
|
|
453
471
|
}, T = ne(
|
|
454
|
-
(
|
|
455
|
-
[
|
|
472
|
+
(s) => Math.round((s - o) / (n - o) * 100),
|
|
473
|
+
[o, n]
|
|
456
474
|
);
|
|
457
475
|
return F(() => {
|
|
458
|
-
if (u.current && (u.current.style.backgroundSize = `${T(
|
|
459
|
-
const
|
|
460
|
-
|
|
476
|
+
if (u.current && (u.current.style.backgroundSize = `${T(v)}% 100%`), k.current) {
|
|
477
|
+
const s = T(v) / 100;
|
|
478
|
+
k.current.style.left = `calc(${s * 100}% + ${(0.5 - s) * pe}px)`;
|
|
461
479
|
}
|
|
462
|
-
}, [
|
|
463
|
-
!isNaN(
|
|
464
|
-
}, [
|
|
465
|
-
|
|
466
|
-
{
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
480
|
+
}, [v, T]), F(() => {
|
|
481
|
+
!isNaN(h) && h !== v && h && (A(h), w(h));
|
|
482
|
+
}, [h]), /* @__PURE__ */ r.jsxs(p, { display: "flex", flexDirection: "column", position: "relative", ref: q, children: [
|
|
483
|
+
j ? /* @__PURE__ */ r.jsx(se, { as: "label", variant: "sm", children: j }) : null,
|
|
484
|
+
/* @__PURE__ */ r.jsxs(p, { alignItems: "center", display: "flex", gap: "sm", children: [
|
|
485
|
+
($ === "inline" || $ === "left-field") && ($ === "left-field" ? /* @__PURE__ */ r.jsx(
|
|
486
|
+
O,
|
|
487
|
+
{
|
|
488
|
+
disabled: c,
|
|
489
|
+
max: n,
|
|
490
|
+
min: o,
|
|
491
|
+
onBlur: K,
|
|
492
|
+
onChange: V,
|
|
493
|
+
onKeyDown: B,
|
|
494
|
+
size: "sm",
|
|
495
|
+
type: "number",
|
|
496
|
+
value: N.toString(),
|
|
497
|
+
w: 72
|
|
498
|
+
}
|
|
499
|
+
) : /* @__PURE__ */ r.jsx(p, { children: o })),
|
|
500
|
+
/* @__PURE__ */ r.jsxs(p, { display: "flex", flexDirection: "column", flexGrow: "1", h: 20, position: "relative", children: [
|
|
501
|
+
/* @__PURE__ */ r.jsx(
|
|
502
|
+
de,
|
|
503
|
+
{
|
|
504
|
+
borderSelectorColor: i,
|
|
505
|
+
disabled: c,
|
|
506
|
+
list: "tickmarks",
|
|
507
|
+
max: n,
|
|
508
|
+
min: o,
|
|
509
|
+
onChange: (s) => {
|
|
510
|
+
const f = parseInt(s.target.value, 10);
|
|
511
|
+
A(f), w(f);
|
|
512
|
+
},
|
|
513
|
+
onKeyDown: P,
|
|
514
|
+
onMouseDown: () => {
|
|
515
|
+
M && d === !1 && z(!0);
|
|
516
|
+
},
|
|
517
|
+
onMouseUp: () => {
|
|
518
|
+
g(v), M && z(!1);
|
|
519
|
+
},
|
|
520
|
+
ref: u,
|
|
521
|
+
step: a,
|
|
522
|
+
type: "range",
|
|
523
|
+
value: v,
|
|
524
|
+
...G
|
|
525
|
+
}
|
|
526
|
+
),
|
|
527
|
+
M ? /* @__PURE__ */ r.jsx(J, { isVisible: d, ref: k, children: /* @__PURE__ */ r.jsx(Q, { children: v }) }) : null,
|
|
528
|
+
E ? /* @__PURE__ */ r.jsx(p, { h: 24, ml: 10, mr: 10, mt: 5, position: "relative", children: E.reduce((s, f) => s.includes(f) ? s : [...s, f], []).filter((s) => s >= o && s <= n).map((s, f) => /* @__PURE__ */ r.jsx(oe, { left: `${T(s)}%`, children: /* @__PURE__ */ r.jsx(le, { children: s }) }, `${s}-${f}`)) }) : null
|
|
529
|
+
] }),
|
|
530
|
+
($ === "inline" || $ === "right-field") && ($ === "right-field" ? /* @__PURE__ */ r.jsx(
|
|
531
|
+
O,
|
|
532
|
+
{
|
|
533
|
+
disabled: c,
|
|
534
|
+
max: n,
|
|
535
|
+
min: o,
|
|
536
|
+
onBlur: K,
|
|
537
|
+
onChange: V,
|
|
538
|
+
onKeyDown: B,
|
|
539
|
+
size: "sm",
|
|
540
|
+
type: "number",
|
|
541
|
+
value: N.toString(),
|
|
542
|
+
w: 72
|
|
543
|
+
}
|
|
544
|
+
) : /* @__PURE__ */ r.jsx(p, { children: n }))
|
|
545
|
+
] }),
|
|
546
|
+
b ? /* @__PURE__ */ r.jsx(X, { color: "neutral-50", mt: 0, children: b }) : null
|
|
547
|
+
] });
|
|
521
548
|
}
|
|
522
549
|
);
|
|
523
|
-
|
|
524
|
-
const
|
|
550
|
+
ae.displayName = "Slider";
|
|
551
|
+
const Me = Object.assign(ae, { Range: he });
|
|
525
552
|
export {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
553
|
+
Me as Slider,
|
|
554
|
+
ae as SliderComponent,
|
|
555
|
+
U as ensureMinMax,
|
|
556
|
+
_ as round,
|
|
557
|
+
pe as thumbWidth
|
|
531
558
|
};
|