@salutejs/plasma-new-hope 0.175.0-canary.1452.11549482324.0 → 0.175.0-canary.1504.11549657359.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Pagination/Pagination.css +13 -13
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +13 -13
- package/cjs/components/Select/Select.css +13 -13
- package/cjs/components/Select/Select.styles.js +1 -1
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/Select.styles_768h42.css +5 -0
- package/cjs/components/Select/Select.tokens.js +16 -4
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +13 -13
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +13 -13
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/{Item.styles_baxa65.css → Item.styles_8oe5oy.css} +2 -2
- package/cjs/components/Slider/Slider.css +13 -15
- package/cjs/components/Slider/Slider.js +2 -11
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/Slider.tokens.js +17 -23
- package/cjs/components/Slider/Slider.tokens.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.css +8 -8
- package/cjs/components/Slider/components/Double/Double.js +23 -58
- package/cjs/components/Slider/components/Double/Double.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.css +14 -14
- package/cjs/components/Slider/components/Single/Single.js +33 -64
- package/cjs/components/Slider/components/Single/Single.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
- package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
- package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
- package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/cjs/components/Slider/utils/index.js +10 -28
- package/cjs/components/Slider/utils/index.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base.js +1 -1
- package/cjs/components/Slider/variations/_view/base.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/cjs/index.css +26 -28
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Select/Select.styles.js +5 -5
- package/emotion/cjs/components/Select/Select.tokens.js +16 -4
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +10 -10
- package/emotion/cjs/components/Slider/Slider.js +2 -10
- package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
- package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
- package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
- package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
- package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/cjs/components/Slider/utils/index.js +10 -28
- package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
- package/emotion/cjs/examples/plasma_b2c/components/Select/Select.config.js +17 -17
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/emotion/cjs/examples/plasma_web/components/Select/Select.config.js +17 -17
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/emotion/es/components/Select/Select.styles.js +5 -5
- package/emotion/es/components/Select/Select.tokens.js +16 -4
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.styles.js +10 -10
- package/emotion/es/components/Slider/Slider.js +2 -11
- package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/es/components/Slider/Slider.tokens.js +17 -23
- package/emotion/es/components/Slider/components/Double/Double.js +19 -54
- package/emotion/es/components/Slider/components/Single/Single.js +34 -65
- package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
- package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
- package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/es/components/Slider/utils/index.js +10 -28
- package/emotion/es/components/Slider/variations/_view/base.js +1 -2
- package/emotion/es/examples/plasma_b2c/components/Select/Select.config.js +17 -17
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/emotion/es/examples/plasma_web/components/Select/Select.config.js +17 -17
- package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/es/components/Pagination/Pagination.css +13 -13
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +13 -13
- package/es/components/Select/Select.css +13 -13
- package/es/components/Select/Select.styles.js +1 -1
- package/es/components/Select/Select.styles.js.map +1 -1
- package/es/components/Select/Select.styles_768h42.css +5 -0
- package/es/components/Select/Select.tokens.js +16 -4
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +13 -13
- package/es/components/Select/ui/Inner/ui/Item/Item.css +13 -13
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/{Item.styles_baxa65.css → Item.styles_8oe5oy.css} +2 -2
- package/es/components/Slider/Slider.css +13 -15
- package/es/components/Slider/Slider.js +2 -11
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/Slider.tokens.js +17 -23
- package/es/components/Slider/Slider.tokens.js.map +1 -1
- package/es/components/Slider/components/Double/Double.css +8 -8
- package/es/components/Slider/components/Double/Double.js +19 -54
- package/es/components/Slider/components/Double/Double.js.map +1 -1
- package/es/components/Slider/components/Single/Single.css +14 -14
- package/es/components/Slider/components/Single/Single.js +34 -65
- package/es/components/Slider/components/Single/Single.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles.js +4 -4
- package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/es/components/Slider/ui/Handler/Handler.css +3 -3
- package/es/components/Slider/ui/Handler/Handler.js +87 -48
- package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/es/components/Slider/utils/index.js +10 -28
- package/es/components/Slider/utils/index.js.map +1 -1
- package/es/components/Slider/variations/_view/base.js +1 -1
- package/es/components/Slider/variations/_view/base.js.map +1 -1
- package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/es/index.css +26 -28
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Select/Select.styles.js +2 -2
- package/styled-components/cjs/components/Select/Select.tokens.js +16 -4
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +2 -2
- package/styled-components/cjs/components/Slider/Slider.js +2 -10
- package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/cjs/components/Slider/utils/index.js +10 -28
- package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.config.js +14 -14
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/styled-components/cjs/examples/plasma_web/components/Select/Select.config.js +14 -14
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/styled-components/es/components/Select/Select.styles.js +2 -2
- package/styled-components/es/components/Select/Select.tokens.js +16 -4
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.styles.js +2 -2
- package/styled-components/es/components/Slider/Slider.js +2 -11
- package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/es/components/Slider/utils/index.js +10 -28
- package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/Select/Select.config.js +14 -14
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/styled-components/es/examples/plasma_web/components/Select/Select.config.js +14 -14
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/types/components/Select/Select.tokens.d.ts +15 -3
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Slider/Slider.d.ts.map +1 -1
- package/types/components/Slider/Slider.tokens.d.ts +16 -22
- package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
- package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.types.d.ts +7 -79
- package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
- package/types/components/Slider/utils/index.d.ts +8 -26
- package/types/components/Slider/utils/index.d.ts.map +1 -1
- package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -80
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -80
- package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Select/Select.styles_1nzals0.css +0 -5
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/es/components/Select/Select.styles_1nzals0.css +0 -5
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
- package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
@@ -1,118 +0,0 @@
|
|
1
|
-
var KeyboardSupport = {
|
2
|
-
PageUp: 33,
|
3
|
-
PageDown: 34,
|
4
|
-
End: 35,
|
5
|
-
Home: 36,
|
6
|
-
ArrowLeft: 37,
|
7
|
-
ArrowUp: 38,
|
8
|
-
ArrowRight: 39,
|
9
|
-
ArrowDown: 40
|
10
|
-
};
|
11
|
-
var ArrowUp = KeyboardSupport.ArrowUp,
|
12
|
-
ArrowRight = KeyboardSupport.ArrowRight,
|
13
|
-
ArrowDown = KeyboardSupport.ArrowDown,
|
14
|
-
ArrowLeft = KeyboardSupport.ArrowLeft,
|
15
|
-
Home = KeyboardSupport.Home,
|
16
|
-
End = KeyboardSupport.End,
|
17
|
-
PageDown = KeyboardSupport.PageDown,
|
18
|
-
PageUp = KeyboardSupport.PageUp;
|
19
|
-
var computeVerticalMovement = function computeVerticalMovement(event, _ref) {
|
20
|
-
var stepSize = _ref.stepSize,
|
21
|
-
position = _ref.position,
|
22
|
-
max = _ref.max,
|
23
|
-
computedMultipleSteps = _ref.computedMultipleSteps;
|
24
|
-
var keyCode = event.keyCode,
|
25
|
-
target = event.target;
|
26
|
-
var data = {
|
27
|
-
x: 0,
|
28
|
-
deltaX: 0,
|
29
|
-
lastX: 0,
|
30
|
-
y: 0,
|
31
|
-
deltaY: stepSize,
|
32
|
-
lastY: position,
|
33
|
-
node: target
|
34
|
-
};
|
35
|
-
switch (keyCode) {
|
36
|
-
case ArrowUp:
|
37
|
-
case ArrowRight:
|
38
|
-
data.y = position - stepSize;
|
39
|
-
data.deltaY = -stepSize;
|
40
|
-
break;
|
41
|
-
case ArrowDown:
|
42
|
-
case ArrowLeft:
|
43
|
-
data.y = position + stepSize;
|
44
|
-
break;
|
45
|
-
case PageUp:
|
46
|
-
data.y = position - computedMultipleSteps;
|
47
|
-
data.deltaY = -computedMultipleSteps;
|
48
|
-
break;
|
49
|
-
case PageDown:
|
50
|
-
data.y = position + computedMultipleSteps;
|
51
|
-
data.deltaY = computedMultipleSteps;
|
52
|
-
break;
|
53
|
-
case End:
|
54
|
-
data.y = max * stepSize;
|
55
|
-
break;
|
56
|
-
case Home:
|
57
|
-
data.y = 0;
|
58
|
-
break;
|
59
|
-
default:
|
60
|
-
data.y = 0;
|
61
|
-
}
|
62
|
-
return data;
|
63
|
-
};
|
64
|
-
var computeHorizontalMovement = function computeHorizontalMovement(event, _ref2) {
|
65
|
-
var stepSize = _ref2.stepSize,
|
66
|
-
position = _ref2.position,
|
67
|
-
max = _ref2.max,
|
68
|
-
computedMultipleSteps = _ref2.computedMultipleSteps;
|
69
|
-
var keyCode = event.keyCode,
|
70
|
-
target = event.target;
|
71
|
-
var data = {
|
72
|
-
x: 0,
|
73
|
-
deltaX: stepSize,
|
74
|
-
lastX: position,
|
75
|
-
y: 0,
|
76
|
-
deltaY: 0,
|
77
|
-
lastY: 0,
|
78
|
-
node: target
|
79
|
-
};
|
80
|
-
switch (keyCode) {
|
81
|
-
case ArrowUp:
|
82
|
-
case ArrowRight:
|
83
|
-
data.x = position + stepSize;
|
84
|
-
break;
|
85
|
-
case ArrowDown:
|
86
|
-
case ArrowLeft:
|
87
|
-
data.x = position - stepSize;
|
88
|
-
data.deltaX = -stepSize;
|
89
|
-
break;
|
90
|
-
case PageUp:
|
91
|
-
data.x = position + computedMultipleSteps;
|
92
|
-
data.deltaX = computedMultipleSteps;
|
93
|
-
break;
|
94
|
-
case PageDown:
|
95
|
-
data.x = position - computedMultipleSteps;
|
96
|
-
data.deltaX = -computedMultipleSteps;
|
97
|
-
break;
|
98
|
-
case End:
|
99
|
-
data.x = max * stepSize;
|
100
|
-
break;
|
101
|
-
case Home:
|
102
|
-
data.x = 0;
|
103
|
-
break;
|
104
|
-
default:
|
105
|
-
data.x = 0;
|
106
|
-
}
|
107
|
-
return data;
|
108
|
-
};
|
109
|
-
var computeKeyPressData = function computeKeyPressData(event, params) {
|
110
|
-
var keyCode = event.keyCode;
|
111
|
-
if (!Object.values(KeyboardSupport).includes(keyCode)) {
|
112
|
-
return null;
|
113
|
-
}
|
114
|
-
return params.isVertical ? computeVerticalMovement(event, params) : computeHorizontalMovement(event, params);
|
115
|
-
};
|
116
|
-
|
117
|
-
export { computeKeyPressData };
|
118
|
-
//# sourceMappingURL=computeKeyPressData.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"computeKeyPressData.js","sources":["../../../../../src/components/Slider/ui/Handler/computeKeyPressData.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport type { DraggableData } from 'react-draggable';\n\nconst KeyboardSupport = {\n PageUp: 33,\n PageDown: 34,\n End: 35,\n Home: 36,\n ArrowLeft: 37,\n ArrowUp: 38,\n ArrowRight: 39,\n ArrowDown: 40,\n};\n\ninterface Params {\n isVertical: boolean;\n stepSize: number;\n position: number;\n max: number;\n computedMultipleSteps: number;\n}\n\nconst { ArrowUp, ArrowRight, ArrowDown, ArrowLeft, Home, End, PageDown, PageUp } = KeyboardSupport;\n\nconst computeVerticalMovement = (\n event: KeyboardEvent<HTMLDivElement>,\n { stepSize, position, max, computedMultipleSteps }: Params,\n) => {\n const { keyCode, target } = event;\n\n const data: DraggableData = {\n x: 0,\n deltaX: 0,\n lastX: 0,\n y: 0,\n deltaY: stepSize,\n lastY: position,\n node: target as HTMLDivElement,\n };\n\n switch (keyCode) {\n case ArrowUp:\n case ArrowRight:\n data.y = position - stepSize;\n data.deltaY = -stepSize;\n break;\n case ArrowDown:\n case ArrowLeft:\n data.y = position + stepSize;\n break;\n case PageUp:\n data.y = position - computedMultipleSteps;\n data.deltaY = -computedMultipleSteps;\n break;\n case PageDown:\n data.y = position + computedMultipleSteps;\n data.deltaY = computedMultipleSteps;\n break;\n case End:\n data.y = max * stepSize;\n break;\n case Home:\n data.y = 0;\n break;\n default:\n data.y = 0;\n }\n\n return data;\n};\n\nconst computeHorizontalMovement = (\n event: KeyboardEvent<HTMLDivElement>,\n { stepSize, position, max, computedMultipleSteps }: Params,\n) => {\n const { keyCode, target } = event;\n\n const data: DraggableData = {\n x: 0,\n deltaX: stepSize,\n lastX: position,\n y: 0,\n deltaY: 0,\n lastY: 0,\n node: target as HTMLDivElement,\n };\n\n switch (keyCode) {\n case ArrowUp:\n case ArrowRight:\n data.x = position + stepSize;\n break;\n case ArrowDown:\n case ArrowLeft:\n data.x = position - stepSize;\n data.deltaX = -stepSize;\n break;\n case PageUp:\n data.x = position + computedMultipleSteps;\n data.deltaX = computedMultipleSteps;\n break;\n case PageDown:\n data.x = position - computedMultipleSteps;\n data.deltaX = -computedMultipleSteps;\n break;\n case End:\n data.x = max * stepSize;\n break;\n case Home:\n data.x = 0;\n break;\n default:\n data.x = 0;\n }\n\n return data;\n};\n\nexport const computeKeyPressData = (event: KeyboardEvent<HTMLDivElement>, params: Params) => {\n const { keyCode } = event;\n\n if (!Object.values(KeyboardSupport).includes(keyCode)) {\n return null;\n }\n\n return params.isVertical ? computeVerticalMovement(event, params) : computeHorizontalMovement(event, params);\n};\n"],"names":["KeyboardSupport","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","computeVerticalMovement","event","_ref","stepSize","position","max","computedMultipleSteps","keyCode","target","data","x","deltaX","lastX","y","deltaY","lastY","node","computeHorizontalMovement","_ref2","computeKeyPressData","params","Object","values","includes","isVertical"],"mappings":"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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
.tqbdf8b{width:var(--thumb-size);height:var(--thumb-size);min-width:var(--thumb-size);min-height:var(--thumb-size);position:relative;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.0625rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.tqbdf8b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.0625rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.tqbdf8b:not([disabled]):hover:after,.tqbdf8b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.tqbdf8b[disabled]{cursor:not-allowed;}.tqbdf8b:focus{outline:none;}.tqbdf8b::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.tqbdf8b.focus-visible:focus::before,.tqbdf8b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
|
@@ -1 +0,0 @@
|
|
1
|
-
.b1c93yiw.slider-vertical-orientation{height:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
@@ -1,121 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.computeKeyPressData = void 0;
|
7
|
-
var KeyboardSupport = {
|
8
|
-
PageUp: 33,
|
9
|
-
PageDown: 34,
|
10
|
-
End: 35,
|
11
|
-
Home: 36,
|
12
|
-
ArrowLeft: 37,
|
13
|
-
ArrowUp: 38,
|
14
|
-
ArrowRight: 39,
|
15
|
-
ArrowDown: 40
|
16
|
-
};
|
17
|
-
var ArrowUp = KeyboardSupport.ArrowUp,
|
18
|
-
ArrowRight = KeyboardSupport.ArrowRight,
|
19
|
-
ArrowDown = KeyboardSupport.ArrowDown,
|
20
|
-
ArrowLeft = KeyboardSupport.ArrowLeft,
|
21
|
-
Home = KeyboardSupport.Home,
|
22
|
-
End = KeyboardSupport.End,
|
23
|
-
PageDown = KeyboardSupport.PageDown,
|
24
|
-
PageUp = KeyboardSupport.PageUp;
|
25
|
-
var computeVerticalMovement = function computeVerticalMovement(event, _ref) {
|
26
|
-
var stepSize = _ref.stepSize,
|
27
|
-
position = _ref.position,
|
28
|
-
max = _ref.max,
|
29
|
-
computedMultipleSteps = _ref.computedMultipleSteps;
|
30
|
-
var keyCode = event.keyCode,
|
31
|
-
target = event.target;
|
32
|
-
var data = {
|
33
|
-
x: 0,
|
34
|
-
deltaX: 0,
|
35
|
-
lastX: 0,
|
36
|
-
y: 0,
|
37
|
-
deltaY: stepSize,
|
38
|
-
lastY: position,
|
39
|
-
node: target
|
40
|
-
};
|
41
|
-
switch (keyCode) {
|
42
|
-
case ArrowUp:
|
43
|
-
case ArrowRight:
|
44
|
-
data.y = position - stepSize;
|
45
|
-
data.deltaY = -stepSize;
|
46
|
-
break;
|
47
|
-
case ArrowDown:
|
48
|
-
case ArrowLeft:
|
49
|
-
data.y = position + stepSize;
|
50
|
-
break;
|
51
|
-
case PageUp:
|
52
|
-
data.y = position - computedMultipleSteps;
|
53
|
-
data.deltaY = -computedMultipleSteps;
|
54
|
-
break;
|
55
|
-
case PageDown:
|
56
|
-
data.y = position + computedMultipleSteps;
|
57
|
-
data.deltaY = computedMultipleSteps;
|
58
|
-
break;
|
59
|
-
case End:
|
60
|
-
data.y = max * stepSize;
|
61
|
-
break;
|
62
|
-
case Home:
|
63
|
-
data.y = 0;
|
64
|
-
break;
|
65
|
-
default:
|
66
|
-
data.y = 0;
|
67
|
-
}
|
68
|
-
return data;
|
69
|
-
};
|
70
|
-
var computeHorizontalMovement = function computeHorizontalMovement(event, _ref2) {
|
71
|
-
var stepSize = _ref2.stepSize,
|
72
|
-
position = _ref2.position,
|
73
|
-
max = _ref2.max,
|
74
|
-
computedMultipleSteps = _ref2.computedMultipleSteps;
|
75
|
-
var keyCode = event.keyCode,
|
76
|
-
target = event.target;
|
77
|
-
var data = {
|
78
|
-
x: 0,
|
79
|
-
deltaX: stepSize,
|
80
|
-
lastX: position,
|
81
|
-
y: 0,
|
82
|
-
deltaY: 0,
|
83
|
-
lastY: 0,
|
84
|
-
node: target
|
85
|
-
};
|
86
|
-
switch (keyCode) {
|
87
|
-
case ArrowUp:
|
88
|
-
case ArrowRight:
|
89
|
-
data.x = position + stepSize;
|
90
|
-
break;
|
91
|
-
case ArrowDown:
|
92
|
-
case ArrowLeft:
|
93
|
-
data.x = position - stepSize;
|
94
|
-
data.deltaX = -stepSize;
|
95
|
-
break;
|
96
|
-
case PageUp:
|
97
|
-
data.x = position + computedMultipleSteps;
|
98
|
-
data.deltaX = computedMultipleSteps;
|
99
|
-
break;
|
100
|
-
case PageDown:
|
101
|
-
data.x = position - computedMultipleSteps;
|
102
|
-
data.deltaX = -computedMultipleSteps;
|
103
|
-
break;
|
104
|
-
case End:
|
105
|
-
data.x = max * stepSize;
|
106
|
-
break;
|
107
|
-
case Home:
|
108
|
-
data.x = 0;
|
109
|
-
break;
|
110
|
-
default:
|
111
|
-
data.x = 0;
|
112
|
-
}
|
113
|
-
return data;
|
114
|
-
};
|
115
|
-
var computeKeyPressData = exports.computeKeyPressData = function computeKeyPressData(event, params) {
|
116
|
-
var keyCode = event.keyCode;
|
117
|
-
if (!Object.values(KeyboardSupport).includes(keyCode)) {
|
118
|
-
return null;
|
119
|
-
}
|
120
|
-
return params.isVertical ? computeVerticalMovement(event, params) : computeHorizontalMovement(event, params);
|
121
|
-
};
|
@@ -1,115 +0,0 @@
|
|
1
|
-
var KeyboardSupport = {
|
2
|
-
PageUp: 33,
|
3
|
-
PageDown: 34,
|
4
|
-
End: 35,
|
5
|
-
Home: 36,
|
6
|
-
ArrowLeft: 37,
|
7
|
-
ArrowUp: 38,
|
8
|
-
ArrowRight: 39,
|
9
|
-
ArrowDown: 40
|
10
|
-
};
|
11
|
-
var ArrowUp = KeyboardSupport.ArrowUp,
|
12
|
-
ArrowRight = KeyboardSupport.ArrowRight,
|
13
|
-
ArrowDown = KeyboardSupport.ArrowDown,
|
14
|
-
ArrowLeft = KeyboardSupport.ArrowLeft,
|
15
|
-
Home = KeyboardSupport.Home,
|
16
|
-
End = KeyboardSupport.End,
|
17
|
-
PageDown = KeyboardSupport.PageDown,
|
18
|
-
PageUp = KeyboardSupport.PageUp;
|
19
|
-
var computeVerticalMovement = function computeVerticalMovement(event, _ref) {
|
20
|
-
var stepSize = _ref.stepSize,
|
21
|
-
position = _ref.position,
|
22
|
-
max = _ref.max,
|
23
|
-
computedMultipleSteps = _ref.computedMultipleSteps;
|
24
|
-
var keyCode = event.keyCode,
|
25
|
-
target = event.target;
|
26
|
-
var data = {
|
27
|
-
x: 0,
|
28
|
-
deltaX: 0,
|
29
|
-
lastX: 0,
|
30
|
-
y: 0,
|
31
|
-
deltaY: stepSize,
|
32
|
-
lastY: position,
|
33
|
-
node: target
|
34
|
-
};
|
35
|
-
switch (keyCode) {
|
36
|
-
case ArrowUp:
|
37
|
-
case ArrowRight:
|
38
|
-
data.y = position - stepSize;
|
39
|
-
data.deltaY = -stepSize;
|
40
|
-
break;
|
41
|
-
case ArrowDown:
|
42
|
-
case ArrowLeft:
|
43
|
-
data.y = position + stepSize;
|
44
|
-
break;
|
45
|
-
case PageUp:
|
46
|
-
data.y = position - computedMultipleSteps;
|
47
|
-
data.deltaY = -computedMultipleSteps;
|
48
|
-
break;
|
49
|
-
case PageDown:
|
50
|
-
data.y = position + computedMultipleSteps;
|
51
|
-
data.deltaY = computedMultipleSteps;
|
52
|
-
break;
|
53
|
-
case End:
|
54
|
-
data.y = max * stepSize;
|
55
|
-
break;
|
56
|
-
case Home:
|
57
|
-
data.y = 0;
|
58
|
-
break;
|
59
|
-
default:
|
60
|
-
data.y = 0;
|
61
|
-
}
|
62
|
-
return data;
|
63
|
-
};
|
64
|
-
var computeHorizontalMovement = function computeHorizontalMovement(event, _ref2) {
|
65
|
-
var stepSize = _ref2.stepSize,
|
66
|
-
position = _ref2.position,
|
67
|
-
max = _ref2.max,
|
68
|
-
computedMultipleSteps = _ref2.computedMultipleSteps;
|
69
|
-
var keyCode = event.keyCode,
|
70
|
-
target = event.target;
|
71
|
-
var data = {
|
72
|
-
x: 0,
|
73
|
-
deltaX: stepSize,
|
74
|
-
lastX: position,
|
75
|
-
y: 0,
|
76
|
-
deltaY: 0,
|
77
|
-
lastY: 0,
|
78
|
-
node: target
|
79
|
-
};
|
80
|
-
switch (keyCode) {
|
81
|
-
case ArrowUp:
|
82
|
-
case ArrowRight:
|
83
|
-
data.x = position + stepSize;
|
84
|
-
break;
|
85
|
-
case ArrowDown:
|
86
|
-
case ArrowLeft:
|
87
|
-
data.x = position - stepSize;
|
88
|
-
data.deltaX = -stepSize;
|
89
|
-
break;
|
90
|
-
case PageUp:
|
91
|
-
data.x = position + computedMultipleSteps;
|
92
|
-
data.deltaX = computedMultipleSteps;
|
93
|
-
break;
|
94
|
-
case PageDown:
|
95
|
-
data.x = position - computedMultipleSteps;
|
96
|
-
data.deltaX = -computedMultipleSteps;
|
97
|
-
break;
|
98
|
-
case End:
|
99
|
-
data.x = max * stepSize;
|
100
|
-
break;
|
101
|
-
case Home:
|
102
|
-
data.x = 0;
|
103
|
-
break;
|
104
|
-
default:
|
105
|
-
data.x = 0;
|
106
|
-
}
|
107
|
-
return data;
|
108
|
-
};
|
109
|
-
export var computeKeyPressData = function computeKeyPressData(event, params) {
|
110
|
-
var keyCode = event.keyCode;
|
111
|
-
if (!Object.values(KeyboardSupport).includes(keyCode)) {
|
112
|
-
return null;
|
113
|
-
}
|
114
|
-
return params.isVertical ? computeVerticalMovement(event, params) : computeHorizontalMovement(event, params);
|
115
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { KeyboardEvent } from 'react';
|
2
|
-
import type { DraggableData } from 'react-draggable';
|
3
|
-
interface Params {
|
4
|
-
isVertical: boolean;
|
5
|
-
stepSize: number;
|
6
|
-
position: number;
|
7
|
-
max: number;
|
8
|
-
computedMultipleSteps: number;
|
9
|
-
}
|
10
|
-
export declare const computeKeyPressData: (event: KeyboardEvent<HTMLDivElement>, params: Params) => DraggableData | null;
|
11
|
-
export {};
|
12
|
-
//# sourceMappingURL=computeKeyPressData.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"computeKeyPressData.d.ts","sourceRoot":"","sources":["../../../../../src/components/Slider/ui/Handler/computeKeyPressData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAarD,UAAU,MAAM;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB,EAAE,MAAM,CAAC;CACjC;AAkGD,eAAO,MAAM,mBAAmB,UAAW,cAAc,cAAc,CAAC,UAAU,MAAM,yBAQvF,CAAC"}
|