@orfium/ictinus 4.46.0 → 4.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/components/Loader/Loader.utils.d.ts +1 -0
- package/dist/components/SearchField/SearchField.d.ts +1 -0
- package/dist/components/SearchField/SearchFieldShowcase.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +1 -0
- package/dist/components/Select/components/SelectMenu/SelectMenu.style.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +21 -0
- package/dist/components/Slider/Slider.js +178 -0
- package/dist/components/Slider/Slider.style.d.ts +13 -0
- package/dist/components/Slider/Slider.style.js +34 -0
- package/dist/components/Slider/components/SliderMark/SliderMark.d.ts +12 -0
- package/dist/components/Slider/components/SliderMark/SliderMark.js +56 -0
- package/dist/components/Slider/components/SliderMark/SliderMark.style.d.ts +16 -0
- package/dist/components/Slider/components/SliderMark/SliderMark.style.js +53 -0
- package/dist/components/Slider/components/SliderMark/index.d.ts +1 -0
- package/dist/components/Slider/components/SliderMark/index.js +10 -0
- package/dist/components/Slider/components/SliderThumb/SliderThumb.d.ts +11 -0
- package/dist/components/Slider/components/SliderThumb/SliderThumb.js +37 -0
- package/dist/components/Slider/components/SliderThumb/SliderThumb.style.d.ts +9 -0
- package/dist/components/Slider/components/SliderThumb/SliderThumb.style.js +39 -0
- package/dist/components/Slider/components/SliderThumb/index.d.ts +1 -0
- package/dist/components/Slider/components/SliderThumb/index.js +10 -0
- package/dist/components/Slider/components/SliderTrack/SliderTrack.d.ts +11 -0
- package/dist/components/Slider/components/SliderTrack/SliderTrack.js +54 -0
- package/dist/components/Slider/components/SliderTrack/SliderTrack.style.d.ts +9 -0
- package/dist/components/Slider/components/SliderTrack/SliderTrack.style.js +24 -0
- package/dist/components/Slider/components/SliderTrack/index.d.ts +1 -0
- package/dist/components/Slider/components/SliderTrack/index.js +10 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +10 -0
- package/dist/components/Switch/Switch.style.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +3 -1
- package/dist/components/Table/Table.js +3 -0
- package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.d.ts +2 -1
- package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.js +3 -2
- package/dist/components/Table/components/TableRowWrapper/TableRowWrapper.d.ts +1 -0
- package/dist/components/Table/components/TableRowWrapper/TableRowWrapper.js +3 -1
- package/dist/components/TextField/TextField.d.ts +6 -0
- package/dist/components/TextField/TextField.js +9 -3
- package/dist/components/TextInputBase/TextInputBase.d.ts +7 -2
- package/dist/components/TextInputBase/TextInputBase.js +5 -2
- package/dist/components/TextInputBase/TextInputBase.style.d.ts +1 -1
- package/dist/components/TextInputBase/TextInputBase.style.js +7 -6
- package/dist/components/TruncatedContent/TruncatedContent.style.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -1
- package/dist/test/utils.d.ts +1 -0
- package/dist/theme/typography.d.ts +1 -0
- package/dist/theme/typography.js +1 -0
- package/dist/utils/helpers.d.ts +1 -0
- package/dist/utils/size-utils.d.ts +2 -2
- package/dist/utils/size-utils.js +11 -1
- package/package.json +13 -1
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ An internal UI kit library that is opinionated. Primary focus is to solve UI dup
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
[](https://github.com/Orfium/orfium-ictinus/actions)
|
|
9
|
+

|
|
10
|
+

|
|
9
11
|
|
|
10
12
|
## 📦 Installation
|
|
11
13
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const loaderTypes: readonly ["dots", "indeterminate", "spinner"];
|
|
2
3
|
export declare const getLoader: (type?: "spinner" | "dots" | "indeterminate" | undefined, dataTestId?: string | undefined, color?: string | undefined) => JSX.Element | null;
|
|
@@ -11,5 +11,6 @@ declare const SearchField: React.ForwardRefExoticComponent<Props & {
|
|
|
11
11
|
onFocus?: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
12
12
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
13
13
|
onInput?: ((event: any) => void) | undefined;
|
|
14
|
+
hasMinWidthCompat?: boolean | undefined;
|
|
14
15
|
} & import("components/TextInputBase").Props & TestProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
16
|
export default SearchField;
|
|
@@ -8,6 +8,7 @@ declare const SearchFieldShowcase: ({ disabled, placeholder, initialValue, }: Pa
|
|
|
8
8
|
onFocus?: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
9
9
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
10
10
|
onInput?: ((event: any) => void) | undefined;
|
|
11
|
+
hasMinWidthCompat?: boolean | undefined;
|
|
11
12
|
} & import("../TextInputBase").Props> & {
|
|
12
13
|
initialValue?: string | undefined;
|
|
13
14
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -80,5 +80,6 @@ declare const Select: React.ForwardRefExoticComponent<{
|
|
|
80
80
|
onFocus?: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
81
81
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
82
82
|
onInput?: ((event: any) => void) | undefined;
|
|
83
|
+
hasMinWidthCompat?: boolean | undefined;
|
|
83
84
|
} & import("../TextInputBase").Props & Partial<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">> & TestProps & React.RefAttributes<HTMLInputElement>>;
|
|
84
85
|
export default Select;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { SerializedStyles } from '@emotion/react';
|
|
2
3
|
import { Theme } from 'theme';
|
|
3
4
|
import { Props } from './SelectMenu';
|
|
@@ -14,5 +15,6 @@ export declare const optionStyle: ({ selected, size, noResultsExist, }: {
|
|
|
14
15
|
onFocus?: import("react").FocusEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
15
16
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
|
|
16
17
|
onInput?: ((event: any) => void) | undefined;
|
|
18
|
+
hasMinWidthCompat?: boolean | undefined;
|
|
17
19
|
} & import("../../../TextInputBase").Props) => (theme: Theme) => SerializedStyles;
|
|
18
20
|
export declare const menuStyle: ({ status, size, isVirtualized }: Props & TextFieldProps) => (theme: Theme) => SerializedStyles;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TestProps } from '../../utils/types';
|
|
3
|
+
declare type CommonProps = {
|
|
4
|
+
/** Determines if the Slider is disabled or not */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Determines if the Slider will show increments along its track */
|
|
7
|
+
hasIncrements?: boolean;
|
|
8
|
+
/** Called when a thumb is moved, provides new values */
|
|
9
|
+
onChange: (values: number[]) => void;
|
|
10
|
+
/** Called when a change is finished (mouse/touch up, or keyup), provides current values.
|
|
11
|
+
* Use this event when you have to make for example ajax request with new values. */
|
|
12
|
+
onFinalChange?: (values: number[]) => void;
|
|
13
|
+
/** Determines the position of the rendered thumbs and the type of the Slider. 1 value means it's a Selector,
|
|
14
|
+
* while 2 values mean it's a Range. Defaults to [0, 100] */
|
|
15
|
+
values: [number] | [number, number];
|
|
16
|
+
};
|
|
17
|
+
export declare const STEP_WITH_INCREMENTS = 20;
|
|
18
|
+
export declare const MIN = 0;
|
|
19
|
+
export declare const MAX = 100;
|
|
20
|
+
declare const Slider: React.FC<CommonProps & TestProps>;
|
|
21
|
+
export default Slider;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.MAX = exports.MIN = exports.STEP_WITH_INCREMENTS = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _reactRange = require("react-range");
|
|
9
|
+
|
|
10
|
+
var _useTheme = _interopRequireDefault(require("../../hooks/useTheme"));
|
|
11
|
+
|
|
12
|
+
var _TextField = _interopRequireDefault(require("../TextField"));
|
|
13
|
+
|
|
14
|
+
var _SliderMark = _interopRequireDefault(require("./components/SliderMark"));
|
|
15
|
+
|
|
16
|
+
var _SliderThumb = _interopRequireDefault(require("./components/SliderThumb"));
|
|
17
|
+
|
|
18
|
+
var _SliderTrack = _interopRequireDefault(require("./components/SliderTrack"));
|
|
19
|
+
|
|
20
|
+
var _Slider = require("./Slider.style");
|
|
21
|
+
|
|
22
|
+
var _react2 = require("@emotion/react");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
var STEP = 1;
|
|
31
|
+
var STEP_WITH_INCREMENTS = 20;
|
|
32
|
+
exports.STEP_WITH_INCREMENTS = STEP_WITH_INCREMENTS;
|
|
33
|
+
var MIN = 0;
|
|
34
|
+
exports.MIN = MIN;
|
|
35
|
+
var MAX = 100;
|
|
36
|
+
exports.MAX = MAX;
|
|
37
|
+
|
|
38
|
+
var Slider = function Slider(_ref) {
|
|
39
|
+
var values = _ref.values,
|
|
40
|
+
_onChange = _ref.onChange,
|
|
41
|
+
onFinalChange = _ref.onFinalChange,
|
|
42
|
+
_ref$hasIncrements = _ref.hasIncrements,
|
|
43
|
+
hasIncrements = _ref$hasIncrements === void 0 ? false : _ref$hasIncrements,
|
|
44
|
+
_ref$disabled = _ref.disabled,
|
|
45
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
46
|
+
dataTestPrefixId = _ref.dataTestPrefixId;
|
|
47
|
+
var theme = (0, _useTheme["default"])();
|
|
48
|
+
var initialValueRef = (0, _react.useRef)(values);
|
|
49
|
+
var isSelector = initialValueRef.current.length === 1;
|
|
50
|
+
|
|
51
|
+
if (isSelector && values.length !== 1) {
|
|
52
|
+
throw new Error('The Selector type Slider can only accept one initial value in the array, since it only has one thumb. Try changing the `values` prop.');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (!isSelector && values.length !== 2) {
|
|
56
|
+
throw new Error('The Range type Slider only accepts two initial values in the array, since it has two thumbs. Try changing the `values` prop.');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var sanitizeValues = function sanitizeValues(value) {
|
|
60
|
+
if (value < MIN) {
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (value > MAX) {
|
|
65
|
+
return 100;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return value;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var handleRenderMark = function handleRenderMark(_ref2) {
|
|
72
|
+
var props = _ref2.props,
|
|
73
|
+
index = _ref2.index;
|
|
74
|
+
|
|
75
|
+
/** We don't show marks for the first and last increments of the Slider (0%, 100%) */
|
|
76
|
+
var isNotFirstOrLastMark = isSelector ? index > MIN : index > MIN && index < MAX / STEP_WITH_INCREMENTS;
|
|
77
|
+
return hasIncrements && isNotFirstOrLastMark && (0, _react2.jsx)(_SliderMark["default"], {
|
|
78
|
+
key: "mark_" + index,
|
|
79
|
+
dataTestPrefixId: dataTestPrefixId,
|
|
80
|
+
restProps: props,
|
|
81
|
+
values: values,
|
|
82
|
+
index: index,
|
|
83
|
+
isSelector: isSelector,
|
|
84
|
+
disabled: disabled
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var handleRenderTrack = function handleRenderTrack(_ref3) {
|
|
89
|
+
var props = _ref3.props,
|
|
90
|
+
children = _ref3.children;
|
|
91
|
+
return (0, _react2.jsx)(_SliderTrack["default"], {
|
|
92
|
+
dataTestPrefixId: dataTestPrefixId,
|
|
93
|
+
isSelector: isSelector,
|
|
94
|
+
restProps: props,
|
|
95
|
+
values: values,
|
|
96
|
+
disabled: disabled
|
|
97
|
+
}, children);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var handleRenderThumb = function handleRenderThumb(_ref4) {
|
|
101
|
+
var _initialValueRef$curr;
|
|
102
|
+
|
|
103
|
+
var props = _ref4.props,
|
|
104
|
+
value = _ref4.value,
|
|
105
|
+
index = _ref4.index;
|
|
106
|
+
return (0, _react2.jsx)(_SliderThumb["default"], {
|
|
107
|
+
key: "thumb_" + index,
|
|
108
|
+
dataTestId: (dataTestPrefixId != null ? dataTestPrefixId : '') + "thumb_" + index,
|
|
109
|
+
restProps: props,
|
|
110
|
+
disabled: disabled,
|
|
111
|
+
value: value,
|
|
112
|
+
initialValue: (_initialValueRef$curr = initialValueRef.current) == null ? void 0 : _initialValueRef$curr[index]
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
return (0, _react2.jsx)(_Slider.Container, {
|
|
117
|
+
"data-testid": (dataTestPrefixId != null ? dataTestPrefixId : '') + "slider_component"
|
|
118
|
+
}, (0, _react2.jsx)(_reactRange.Range, {
|
|
119
|
+
step: hasIncrements ? STEP_WITH_INCREMENTS : STEP,
|
|
120
|
+
min: MIN,
|
|
121
|
+
max: MAX,
|
|
122
|
+
disabled: disabled,
|
|
123
|
+
values: values,
|
|
124
|
+
onChange: _onChange,
|
|
125
|
+
onFinalChange: onFinalChange,
|
|
126
|
+
renderMark: handleRenderMark,
|
|
127
|
+
renderTrack: handleRenderTrack,
|
|
128
|
+
renderThumb: handleRenderThumb
|
|
129
|
+
}), !isSelector && !hasIncrements && values.length === 2 && (0, _react2.jsx)(_Slider.InputsContainer, null, (0, _react2.jsx)(_Slider.InputContainer, null, (0, _react2.jsx)(_TextField["default"], {
|
|
130
|
+
disabled: disabled,
|
|
131
|
+
hasMinWidthCompat: false,
|
|
132
|
+
size: 'sm',
|
|
133
|
+
value: values[0],
|
|
134
|
+
onChange: function onChange(e) {
|
|
135
|
+
var sanitizedValue = sanitizeValues(parseInt((e == null ? void 0 : e.target.value) || '0'));
|
|
136
|
+
|
|
137
|
+
_onChange([sanitizedValue, values[1]]);
|
|
138
|
+
},
|
|
139
|
+
onBlur: function onBlur(e) {
|
|
140
|
+
if (onFinalChange) {
|
|
141
|
+
var sanitizedValue = sanitizeValues(parseInt((e == null ? void 0 : e.target.value) || '0'));
|
|
142
|
+
onFinalChange([sanitizedValue, values[1]]);
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
rightIcon: (0, _react2.jsx)(_react["default"].Fragment, null, "%"),
|
|
146
|
+
sx: {
|
|
147
|
+
textField: {
|
|
148
|
+
color: theme.utils.getColor('lightGrey', 650)
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
})), (0, _react2.jsx)(_Slider.InputContainer, null, (0, _react2.jsx)(_TextField["default"], {
|
|
152
|
+
disabled: disabled,
|
|
153
|
+
hasMinWidthCompat: false,
|
|
154
|
+
size: 'sm',
|
|
155
|
+
value: values[1],
|
|
156
|
+
onChange: function onChange(e) {
|
|
157
|
+
var sanitizedValue = sanitizeValues(parseInt((e == null ? void 0 : e.target.value) || '100'));
|
|
158
|
+
|
|
159
|
+
_onChange([values[0], sanitizedValue]);
|
|
160
|
+
},
|
|
161
|
+
onBlur: function onBlur(e) {
|
|
162
|
+
if (onFinalChange) {
|
|
163
|
+
var sanitizedValue = sanitizeValues(parseInt((e == null ? void 0 : e.target.value) || '100'));
|
|
164
|
+
onFinalChange([values[0], sanitizedValue]);
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
rightIcon: (0, _react2.jsx)(_react["default"].Fragment, null, "%"),
|
|
168
|
+
sx: {
|
|
169
|
+
textField: {
|
|
170
|
+
color: theme.utils.getColor('lightGrey', 650)
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}))));
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
Slider.displayName = 'Slider';
|
|
177
|
+
var _default = Slider;
|
|
178
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const InputsContainer: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const InputContainer: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.InputContainer = exports.InputsContainer = exports.Container = void 0;
|
|
5
|
+
|
|
6
|
+
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
7
|
+
|
|
8
|
+
var _polished = require("polished");
|
|
9
|
+
|
|
10
|
+
var _functions = require("../../theme/functions");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var Container = (0, _base["default"])("div", process.env.NODE_ENV === "production" ? {
|
|
15
|
+
target: "ems0q502"
|
|
16
|
+
} : {
|
|
17
|
+
target: "ems0q502",
|
|
18
|
+
label: "Container"
|
|
19
|
+
})(_functions.flex, ";flex-direction:column;gap:", (0, _polished.rem)(22), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NsaWRlci9TbGlkZXIuc3R5bGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUttQyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9TbGlkZXIvU2xpZGVyLnN0eWxlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3BvbGlzaGVkJztcblxuaW1wb3J0IHsgZmxleCB9IGZyb20gJy4uLy4uL3RoZW1lL2Z1bmN0aW9ucyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQuZGl2YFxuICAke2ZsZXh9O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICBnYXA6ICR7cmVtKDIyKX07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRzQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcbiAgJHtmbGV4fTtcbiAgbWFyZ2luLWxlZnQ6ICR7cmVtKC03KX07XG4gIG1hcmdpbi1yaWdodDogJHtyZW0oLTcpfTtcbiAgZ2FwOiAke3JlbSgyMCl9O1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRDb250YWluZXIgPSBzdHlsZWQuZGl2YFxuICB3aWR0aDogJHtyZW0oODApfTtcbmA7XG4iXX0= */"));
|
|
20
|
+
exports.Container = Container;
|
|
21
|
+
var InputsContainer = (0, _base["default"])("div", process.env.NODE_ENV === "production" ? {
|
|
22
|
+
target: "ems0q501"
|
|
23
|
+
} : {
|
|
24
|
+
target: "ems0q501",
|
|
25
|
+
label: "InputsContainer"
|
|
26
|
+
})(_functions.flex, ";margin-left:", (0, _polished.rem)(-7), ";margin-right:", (0, _polished.rem)(-7), ";gap:", (0, _polished.rem)(20), ";align-items:center;justify-content:space-between;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NsaWRlci9TbGlkZXIuc3R5bGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVd5QyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9TbGlkZXIvU2xpZGVyLnN0eWxlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3BvbGlzaGVkJztcblxuaW1wb3J0IHsgZmxleCB9IGZyb20gJy4uLy4uL3RoZW1lL2Z1bmN0aW9ucyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQuZGl2YFxuICAke2ZsZXh9O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICBnYXA6ICR7cmVtKDIyKX07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRzQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcbiAgJHtmbGV4fTtcbiAgbWFyZ2luLWxlZnQ6ICR7cmVtKC03KX07XG4gIG1hcmdpbi1yaWdodDogJHtyZW0oLTcpfTtcbiAgZ2FwOiAke3JlbSgyMCl9O1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRDb250YWluZXIgPSBzdHlsZWQuZGl2YFxuICB3aWR0aDogJHtyZW0oODApfTtcbmA7XG4iXX0= */"));
|
|
27
|
+
exports.InputsContainer = InputsContainer;
|
|
28
|
+
var InputContainer = (0, _base["default"])("div", process.env.NODE_ENV === "production" ? {
|
|
29
|
+
target: "ems0q500"
|
|
30
|
+
} : {
|
|
31
|
+
target: "ems0q500",
|
|
32
|
+
label: "InputContainer"
|
|
33
|
+
})("width:", (0, _polished.rem)(80), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NsaWRlci9TbGlkZXIuc3R5bGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9Cd0MiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvU2xpZGVyL1NsaWRlci5zdHlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICdwb2xpc2hlZCc7XG5cbmltcG9ydCB7IGZsZXggfSBmcm9tICcuLi8uLi90aGVtZS9mdW5jdGlvbnMnO1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcbiAgJHtmbGV4fTtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgZ2FwOiAke3JlbSgyMil9O1xuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0c0NvbnRhaW5lciA9IHN0eWxlZC5kaXZgXG4gICR7ZmxleH07XG4gIG1hcmdpbi1sZWZ0OiAke3JlbSgtNyl9O1xuICBtYXJnaW4tcmlnaHQ6ICR7cmVtKC03KX07XG4gIGdhcDogJHtyZW0oMjApfTtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0Q29udGFpbmVyID0gc3R5bGVkLmRpdmBcbiAgd2lkdGg6ICR7cmVtKDgwKX07XG5gO1xuIl19 */"));
|
|
34
|
+
exports.InputContainer = InputContainer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IMarkProps } from 'react-range/lib/types';
|
|
3
|
+
import { TestProps } from '../../../../utils/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
values: number[];
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
index: number;
|
|
8
|
+
isSelector: boolean;
|
|
9
|
+
restProps: IMarkProps;
|
|
10
|
+
};
|
|
11
|
+
declare const SliderMark: FC<Props & TestProps>;
|
|
12
|
+
export default SliderMark;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var React = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _useTheme = _interopRequireDefault(require("../../../../hooks/useTheme"));
|
|
9
|
+
|
|
10
|
+
var _Slider = require("../../Slider");
|
|
11
|
+
|
|
12
|
+
var _SliderMark = require("./SliderMark.style");
|
|
13
|
+
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
24
|
+
var SliderMark = function SliderMark(_ref) {
|
|
25
|
+
var values = _ref.values,
|
|
26
|
+
index = _ref.index,
|
|
27
|
+
disabled = _ref.disabled,
|
|
28
|
+
isSelector = _ref.isSelector,
|
|
29
|
+
_ref$dataTestPrefixId = _ref.dataTestPrefixId,
|
|
30
|
+
dataTestPrefixId = _ref$dataTestPrefixId === void 0 ? '' : _ref$dataTestPrefixId,
|
|
31
|
+
restProps = _ref.restProps;
|
|
32
|
+
var theme = (0, _useTheme["default"])();
|
|
33
|
+
var backgroundStyle = (0, React.useMemo)(function () {
|
|
34
|
+
if (!isSelector) {
|
|
35
|
+
return index * 20 < values[0] || index * 20 > values[1] ? theme.utils.getColor('blue', disabled ? 250 : 150) : theme.utils.getColor('blue', disabled ? 250 : 500);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return index * 20 > values[0] ? theme.utils.getColor('blue', disabled ? 250 : 150) : theme.utils.getColor('blue', disabled ? 250 : 500);
|
|
39
|
+
}, [disabled, index, isSelector, theme.utils, values]);
|
|
40
|
+
var labelValue = (0, React.useMemo)(function () {
|
|
41
|
+
return (_Slider.STEP_WITH_INCREMENTS * index).toString();
|
|
42
|
+
}, [index]);
|
|
43
|
+
return (0, _react2.jsx)(_SliderMark.Mark, _extends({
|
|
44
|
+
"data-testid": dataTestPrefixId + "mark_" + index
|
|
45
|
+
}, restProps, {
|
|
46
|
+
disabled: disabled,
|
|
47
|
+
labelValue: labelValue ? labelValue + "%" : ' ',
|
|
48
|
+
restStyleProps: restProps.style,
|
|
49
|
+
background: backgroundStyle
|
|
50
|
+
}), (0, _react2.jsx)(_SliderMark.MarkHoverCircle, {
|
|
51
|
+
disabled: disabled
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var _default = SliderMark;
|
|
56
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export declare const Mark: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
background: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
labelValue: string;
|
|
9
|
+
restStyleProps: CSSProperties;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const MarkHoverCircle: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.MarkHoverCircle = exports.Mark = void 0;
|
|
5
|
+
|
|
6
|
+
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
7
|
+
|
|
8
|
+
var _polished = require("polished");
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var Mark = (0, _base["default"])("div", process.env.NODE_ENV === "production" ? {
|
|
13
|
+
target: "ekzqro1"
|
|
14
|
+
} : {
|
|
15
|
+
target: "ekzqro1",
|
|
16
|
+
label: "Mark"
|
|
17
|
+
})("height:", (0, _polished.rem)(7), ";width:", (0, _polished.rem)(7), ";border-radius:100%;background:", function (_ref) {
|
|
18
|
+
var background = _ref.background;
|
|
19
|
+
return background;
|
|
20
|
+
}, ";position:relative;cursor:", function (_ref2) {
|
|
21
|
+
var disabled = _ref2.disabled;
|
|
22
|
+
return disabled ? 'not-allowed' : 'unset';
|
|
23
|
+
}, ";:hover{background:", function (_ref3) {
|
|
24
|
+
var theme = _ref3.theme,
|
|
25
|
+
disabled = _ref3.disabled;
|
|
26
|
+
return !disabled ? theme.utils.getColor('blue', 600) : undefined;
|
|
27
|
+
}, ";::before{content:'", function (_ref4) {
|
|
28
|
+
var labelValue = _ref4.labelValue;
|
|
29
|
+
return labelValue;
|
|
30
|
+
}, "';color:white;display:", function (_ref5) {
|
|
31
|
+
var disabled = _ref5.disabled;
|
|
32
|
+
return disabled ? 'none' : 'flex';
|
|
33
|
+
}, ";justify-content:center;font-size:", function (_ref6) {
|
|
34
|
+
var theme = _ref6.theme;
|
|
35
|
+
return theme.typography.fontSizes[11];
|
|
36
|
+
}, ";background:black;position:absolute;padding:", function (_ref7) {
|
|
37
|
+
var theme = _ref7.theme;
|
|
38
|
+
return theme.spacing.sm;
|
|
39
|
+
}, ";box-sizing:border-box;top:", (0, _polished.rem)(-35), ";left:", (0, _polished.rem)(-14.5), ";width:", (0, _polished.rem)(35), ";height:", (0, _polished.rem)(27), ";border-radius:2px;}::after{content:' ';display:", function (_ref8) {
|
|
40
|
+
var disabled = _ref8.disabled;
|
|
41
|
+
return disabled ? 'none' : 'unset';
|
|
42
|
+
}, ";position:absolute;top:", (0, _polished.rem)(-10), ";left:", (0, _polished.rem)(-2.5), ";width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #000;}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NsaWRlci9jb21wb25lbnRzL1NsaWRlck1hcmsvU2xpZGVyTWFyay5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBU0UiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvU2xpZGVyL2NvbXBvbmVudHMvU2xpZGVyTWFyay9TbGlkZXJNYXJrLnN0eWxlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydC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CBzb2xpZCB0cmFuc3BhcmVudDtcbiAgICBib3JkZXItcmFkaXVzOiAxMDBweDtcblxuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICB0b3A6ICR7cmVtKC00KX07XG4gICAgbGVmdDogJHtyZW0oLTQpfTtcbiAgfVxuXG4gIDpob3ZlciB7XG4gICAgJjo6YWZ0ZXIge1xuICAgICAgYm9yZGVyLWNvbG9yOiAkeyh7IGRpc2FibGVkIH0pID0+ICghZGlzYWJsZWQgPyByZ2JhKDE0LCAxNCwgMjMsIDAuMSkgOiB1bmRlZmluZWQpfTtcbiAgICB9XG4gIH1cbmA7XG4iXX0= */"));
|
|
43
|
+
exports.Mark = Mark;
|
|
44
|
+
var MarkHoverCircle = (0, _base["default"])("div", process.env.NODE_ENV === "production" ? {
|
|
45
|
+
target: "ekzqro0"
|
|
46
|
+
} : {
|
|
47
|
+
target: "ekzqro0",
|
|
48
|
+
label: "MarkHoverCircle"
|
|
49
|
+
})("::after{content:' ';height:", (0, _polished.rem)(7), ";width:", (0, _polished.rem)(7), ";border:4px solid transparent;border-radius:100px;position:absolute;top:", (0, _polished.rem)(-4), ";left:", (0, _polished.rem)(-4), ";}:hover{&::after{border-color:", function (_ref9) {
|
|
50
|
+
var disabled = _ref9.disabled;
|
|
51
|
+
return !disabled ? (0, _polished.rgba)(14, 14, 23, 0.1) : undefined;
|
|
52
|
+
}, ";}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NsaWRlci9jb21wb25lbnRzL1NsaWRlck1hcmsvU2xpZGVyTWFyay5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcURnRSIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi9zcmMvY29tcG9uZW50cy9TbGlkZXIvY29tcG9uZW50cy9TbGl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G4gICAgaGVpZ2h0OiAke3JlbSg3KX07XG4gICAgd2lkdGg6ICR7cmVtKDcpfTtcblxuICAgIGJvcmRlcjogNHB4IHNvbGlkIHRyYW5zcGFyZW50O1xuICAgIGJvcmRlci1yYWRpdXM6IDEwMHB4O1xuXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHRvcDogJHtyZW0oLTQpfTtcbiAgICBsZWZ0OiAke3JlbSgtNCl9O1xuICB9XG5cbiAgOmhvdmVyIHtcbiAgICAmOjphZnRlciB7XG4gICAgICBib3JkZXItY29sb3I6ICR7KHsgZGlzYWJsZWQgfSkgPT4gKCFkaXNhYmxlZCA/IHJnYmEoMTQsIDE0LCAyMywgMC4xKSA6IHVuZGVmaW5lZCl9O1xuICAgIH1cbiAgfVxuYDtcbiJdfQ== */"));
|
|
53
|
+
exports.MarkHoverCircle = MarkHoverCircle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SliderMark';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _SliderMark = _interopRequireDefault(require("./SliderMark"));
|
|
7
|
+
|
|
8
|
+
exports["default"] = _SliderMark["default"];
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IThumbProps } from 'react-range/lib/types';
|
|
3
|
+
import { TestProps } from '../../../../utils/types';
|
|
4
|
+
interface ThumbProps {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
value: number;
|
|
7
|
+
initialValue: number | undefined;
|
|
8
|
+
restProps: IThumbProps;
|
|
9
|
+
}
|
|
10
|
+
declare const SliderThumb: FC<ThumbProps & TestProps>;
|
|
11
|
+
export default SliderThumb;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var React = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _SliderThumb = require("./SliderThumb.style");
|
|
9
|
+
|
|
10
|
+
var _react2 = require("@emotion/react");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
18
|
+
var SliderThumb = function SliderThumb(_ref) {
|
|
19
|
+
var disabled = _ref.disabled,
|
|
20
|
+
value = _ref.value,
|
|
21
|
+
initialValue = _ref.initialValue,
|
|
22
|
+
dataTestId = _ref.dataTestId,
|
|
23
|
+
restProps = _ref.restProps;
|
|
24
|
+
var isChanged = (0, React.useMemo)(function () {
|
|
25
|
+
return initialValue !== value;
|
|
26
|
+
}, [initialValue, value]);
|
|
27
|
+
return (0, _react2.jsx)(_SliderThumb.Thumb, _extends({
|
|
28
|
+
"data-testid": dataTestId
|
|
29
|
+
}, restProps, {
|
|
30
|
+
isChanged: isChanged,
|
|
31
|
+
disabled: disabled,
|
|
32
|
+
restStyleProps: restProps.style
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _default = SliderThumb;
|
|
37
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export declare const Thumb: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
isChanged: boolean;
|
|
8
|
+
restStyleProps: CSSProperties;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.Thumb = void 0;
|
|
5
|
+
|
|
6
|
+
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
7
|
+
|
|
8
|
+
var _polished = require("polished");
|
|
9
|
+
|
|
10
|
+
var _functions = require("../../../../theme/functions");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
+
|
|
16
|
+
var Thumb = (0, _base["default"])("div", process.env.NODE_ENV === "production" ? {
|
|
17
|
+
target: "e76yl4h0"
|
|
18
|
+
} : {
|
|
19
|
+
target: "e76yl4h0",
|
|
20
|
+
label: "Thumb"
|
|
21
|
+
})("height:", (0, _polished.rem)(16), ";width:", (0, _polished.rem)(16), ";border-radius:100px;background-color:", function (_ref) {
|
|
22
|
+
var theme = _ref.theme,
|
|
23
|
+
isChanged = _ref.isChanged;
|
|
24
|
+
return isChanged ? theme.utils.getColor('blue', 500) : '#fff';
|
|
25
|
+
}, ";border:2px solid ", function (_ref2) {
|
|
26
|
+
var theme = _ref2.theme,
|
|
27
|
+
disabled = _ref2.disabled;
|
|
28
|
+
return theme.utils.getColor('blue', disabled ? 250 : 500);
|
|
29
|
+
}, ";", function (_ref3) {
|
|
30
|
+
var restStyleProps = _ref3.restStyleProps;
|
|
31
|
+
return _extends({}, restStyleProps);
|
|
32
|
+
}, ";box-sizing:border-box;cursor:", function (_ref4) {
|
|
33
|
+
var disabled = _ref4.disabled;
|
|
34
|
+
return disabled ? 'not-allowed' : 'unset';
|
|
35
|
+
}, "!important;&::after{content:'';height:", (0, _polished.rem)(16), ";width:", (0, _polished.rem)(16), ";border:8px solid transparent;border-radius:100px;position:absolute;top:", (0, _polished.rem)(-10), ";left:", (0, _polished.rem)(-10), ";", (0, _functions.transition)(0.15), ";}:hover{&::after{border-color:", function (_ref5) {
|
|
36
|
+
var disabled = _ref5.disabled;
|
|
37
|
+
return !disabled ? (0, _polished.rgba)(14, 14, 23, 0.1) : undefined;
|
|
38
|
+
}, ";}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NsaWRlci9jb21wb25lbnRzL1NsaWRlclRodW1iL1NsaWRlclRodW1iLnN0eWxlLnRzeCJdLCJuYW1lcyI6W10s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KHsgZGlzYWJsZWQgfSkgPT4gKGRpc2FibGVkID8gJ25vdC1hbGxvd2VkJyA6ICd1bnNldCcpfSAhaW1wb3J0YW50O1xuXG4gICY6OmFmdGVyIHtcbiAgICBjb250ZW50OiAnJztcblxuICAgIGhlaWdodDogJHtyZW0oMTYpfTtcbiAgICB3aWR0aDogJHtyZW0oMTYpfTtcblxuICAgIGJvcmRlcjogOHB4IHNvbGlkIHRyYW5zcGFyZW50O1xuICAgIGJvcmRlci1yYWRpdXM6IDEwMHB4O1xuXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHRvcDogJHtyZW0oLTEwKX07XG4gICAgbGVmdDogJHtyZW0oLTEwKX07XG5cbiAgICAke3RyYW5zaXRpb24oMC4xNSl9O1xuICB9XG5cbiAgOmhvdmVyIHtcbiAgICAmOjphZnRlciB7XG4gICAgICBib3JkZXItY29sb3I6ICR7KHsgZGlzYWJsZWQgfSkgPT4gKCFkaXNhYmxlZCA/IHJnYmEoMTQsIDE0LCAyMywgMC4xKSA6IHVuZGVmaW5lZCl9O1xuICAgIH1cbiAgfVxuYDtcbiJdfQ== */"));
|
|
39
|
+
exports.Thumb = Thumb;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SliderThumb';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _SliderThumb = _interopRequireDefault(require("./SliderThumb"));
|
|
7
|
+
|
|
8
|
+
exports["default"] = _SliderThumb["default"];
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ITrackProps } from 'react-range/lib/types';
|
|
3
|
+
import { TestProps } from '../../../../utils/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
values: number[];
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
isSelector: boolean;
|
|
8
|
+
restProps: ITrackProps;
|
|
9
|
+
};
|
|
10
|
+
declare const SliderTrack: FC<Props & TestProps>;
|
|
11
|
+
export default SliderTrack;
|