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