@elliemae/ds-slider 2.2.0-alpha.3 → 2.2.0-next.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/cjs/DSSlider.js +33 -48
- package/cjs/components/SliderImp.js +158 -154
- package/cjs/components/Thumb.js +63 -64
- package/cjs/components/TickMarks.js +31 -72
- package/cjs/components/TickMarksValues.js +38 -59
- package/cjs/components/Track.js +55 -66
- package/cjs/components/context.js +13 -36
- package/cjs/components/styled.js +58 -93
- package/cjs/components/utils.js +36 -46
- package/cjs/index.js +11 -36
- package/cjs/prop-types.js +49 -52
- package/esm/DSSlider.js +20 -16
- package/esm/components/SliderImp.js +139 -120
- package/esm/components/Thumb.js +54 -33
- package/esm/components/TickMarks.js +23 -42
- package/esm/components/TickMarksValues.js +31 -30
- package/esm/components/Track.js +46 -36
- package/esm/components/context.js +5 -7
- package/esm/components/styled.js +44 -64
- package/esm/components/utils.js +29 -15
- package/esm/index.js +1 -7
- package/esm/prop-types.js +44 -23
- package/package.json +6 -6
- package/cjs/DSSlider.js.map +0 -7
- package/cjs/components/SliderImp.js.map +0 -7
- package/cjs/components/Thumb.js.map +0 -7
- package/cjs/components/TickMarks.js.map +0 -7
- package/cjs/components/TickMarksValues.js.map +0 -7
- package/cjs/components/Track.js.map +0 -7
- package/cjs/components/context.js.map +0 -7
- package/cjs/components/styled.js.map +0 -7
- package/cjs/components/utils.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/prop-types.js.map +0 -7
- package/esm/DSSlider.js.map +0 -7
- package/esm/components/SliderImp.js.map +0 -7
- package/esm/components/Thumb.js.map +0 -7
- package/esm/components/TickMarks.js.map +0 -7
- package/esm/components/TickMarksValues.js.map +0 -7
- package/esm/components/Track.js.map +0 -7
- package/esm/components/context.js.map +0 -7
- package/esm/components/styled.js.map +0 -7
- package/esm/components/utils.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/prop-types.js.map +0 -7
|
@@ -1,39 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var TickMarks_exports = {};
|
|
29
|
-
__export(TickMarks_exports, {
|
|
30
|
-
default: () => TickMarks_default
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react = __toESM(require("react"));
|
|
34
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
35
|
-
var import_ds_system = __toESM(require("@elliemae/ds-system"));
|
|
36
|
-
var import_context = __toESM(require("./context"));
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
7
|
+
var context = require('./context.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
12
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
13
|
+
|
|
37
14
|
const TickMarks = () => {
|
|
38
15
|
const {
|
|
39
16
|
minValue,
|
|
@@ -42,46 +19,28 @@ const TickMarks = () => {
|
|
|
42
19
|
step,
|
|
43
20
|
withTwoHandles,
|
|
44
21
|
zIndex
|
|
45
|
-
} =
|
|
22
|
+
} = React.useContext(context.SliderContext);
|
|
46
23
|
const dots = [];
|
|
24
|
+
|
|
47
25
|
for (let index = minValue || 0; index <= maxValue; index += step) {
|
|
48
26
|
const isActive = withTwoHandles ? rangeValues[0] <= index && index < rangeValues[1] : rangeValues[0] > index;
|
|
49
|
-
dots.push(
|
|
27
|
+
dots.push( /*#__PURE__*/_jsx__default["default"](Dot, {
|
|
50
28
|
"data-testid": "slider-dot",
|
|
51
|
-
isActive
|
|
52
|
-
|
|
53
|
-
}));
|
|
29
|
+
isActive: isActive
|
|
30
|
+
}, index));
|
|
54
31
|
}
|
|
55
|
-
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/_jsx__default["default"](DotsContainer, {
|
|
56
34
|
"data-testid": "slider-tick-marks",
|
|
57
|
-
zIndex
|
|
58
|
-
}, dots);
|
|
35
|
+
zIndex: zIndex
|
|
36
|
+
}, void 0, dots);
|
|
59
37
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
const DotsContainer = import_styled_components.default.div`
|
|
72
|
-
padding: 0
|
|
73
|
-
calc(${(props) => (0, import_ds_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.xxs)} * 0.5);
|
|
74
|
-
align-items: center;
|
|
75
|
-
display: flex;
|
|
76
|
-
justify-content: space-between;
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
position: absolute;
|
|
79
|
-
top: 0;
|
|
80
|
-
left: 0;
|
|
81
|
-
right: 0;
|
|
82
|
-
bottom: 0;
|
|
83
|
-
z-index: ${(props) => props.zIndex - 1};
|
|
84
|
-
`;
|
|
85
|
-
var TickMarks_default = TickMarks;
|
|
86
|
-
module.exports = __toCommonJS(TickMarks_exports);
|
|
87
|
-
//# sourceMappingURL=TickMarks.js.map
|
|
38
|
+
|
|
39
|
+
const Dot = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
40
|
+
componentId: "sc-15z2sh4-0"
|
|
41
|
+
})(["&:after{content:'';background:", ";border-radius:", ";display:block;position:relative;width:2px;height:2px;}"], props => props.isActive ? props.theme.colors.brand[300] : props.theme.colors.neutral[400], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs));
|
|
42
|
+
const DotsContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
43
|
+
componentId: "sc-15z2sh4-1"
|
|
44
|
+
})(["padding:0 calc(", " * 0.5);align-items:center;display:flex;justify-content:space-between;pointer-events:none;position:absolute;top:0;left:0;right:0;bottom:0;z-index:", ";"], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => props.zIndex - 1);
|
|
45
|
+
|
|
46
|
+
module.exports = TickMarks;
|
|
@@ -1,64 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var TickMarksValues_exports = {};
|
|
29
|
-
__export(TickMarksValues_exports, {
|
|
30
|
-
default: () => TickMarksValues_default
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react = __toESM(require("react"));
|
|
34
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
35
|
-
var import_ds_system = __toESM(require("@elliemae/ds-system"));
|
|
36
|
-
var import_context = __toESM(require("./context"));
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
5
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var styled = require('styled-components');
|
|
8
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
9
|
+
var context = require('./context.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
+
|
|
13
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
|
+
|
|
37
16
|
const TickMarks = () => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
17
|
+
var _TickMarksContainer;
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
parsedValuesArray,
|
|
21
|
+
fullSelectedValues,
|
|
22
|
+
sliderUUID
|
|
23
|
+
} = React.useContext(context.SliderContext);
|
|
24
|
+
const TickMarksLabels = React.useMemo(() => parsedValuesArray.map(value => {
|
|
25
|
+
const isSelected = fullSelectedValues.findIndex(selectedVal => selectedVal === value) >= 0;
|
|
26
|
+
return /*#__PURE__*/_jsx__default["default"](TickMarkValue, {
|
|
27
|
+
isSelected: isSelected
|
|
28
|
+
}, "".concat(sliderUUID, "-").concat(value), value);
|
|
45
29
|
}), [parsedValuesArray, sliderUUID, fullSelectedValues]);
|
|
46
|
-
const PureTickMArksValues =
|
|
30
|
+
const PureTickMArksValues = React.useMemo(() => _TickMarksContainer || (_TickMarksContainer = /*#__PURE__*/_jsx__default["default"](TickMarksContainer, {
|
|
47
31
|
"data-testid": "slider-tick-marks-values"
|
|
48
|
-
}, TickMarksLabels), [TickMarksLabels]);
|
|
32
|
+
}, void 0, TickMarksLabels)), [TickMarksLabels]);
|
|
49
33
|
return PureTickMArksValues;
|
|
50
34
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
justify-content: space-between;
|
|
61
|
-
`;
|
|
62
|
-
var TickMarksValues_default = TickMarks;
|
|
63
|
-
module.exports = __toCommonJS(TickMarksValues_exports);
|
|
64
|
-
//# sourceMappingURL=TickMarksValues.js.map
|
|
35
|
+
|
|
36
|
+
const TickMarkValue = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
37
|
+
componentId: "sc-lq3yel-0"
|
|
38
|
+
})(["margin:", " 0;overflow:visible;transform:translateX(-100%);width:", ";color:", ";"], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.s), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => props.isSelected ? props.theme.colors.neutral[800] : props.theme.colors.neutral[500]);
|
|
39
|
+
const TickMarksContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
40
|
+
componentId: "sc-lq3yel-1"
|
|
41
|
+
})(["display:flex;justify-content:space-between;"]);
|
|
42
|
+
|
|
43
|
+
module.exports = TickMarks;
|
package/cjs/components/Track.js
CHANGED
|
@@ -1,43 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var import_ds_system = __toESM(require("@elliemae/ds-system"));
|
|
37
|
-
var import_TickMarks = __toESM(require("./TickMarks"));
|
|
38
|
-
var import_TickMarksValues = __toESM(require("./TickMarksValues"));
|
|
39
|
-
var import_context = __toESM(require("./context"));
|
|
40
|
-
const Track = ({ children, props }) => {
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
4
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
5
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
9
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
10
|
+
var React = require('react');
|
|
11
|
+
var reactRange = require('react-range');
|
|
12
|
+
var styled = require('styled-components');
|
|
13
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
14
|
+
var TickMarks = require('./TickMarks.js');
|
|
15
|
+
var TickMarksValues = require('./TickMarksValues.js');
|
|
16
|
+
var context = require('./context.js');
|
|
17
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
18
|
+
|
|
19
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
|
+
|
|
21
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
22
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
23
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
24
|
+
|
|
25
|
+
var _TickMarks, _TickMarksValues;
|
|
26
|
+
|
|
27
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28
|
+
|
|
29
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
30
|
+
|
|
31
|
+
const Track = _ref => {
|
|
32
|
+
let {
|
|
33
|
+
children,
|
|
34
|
+
props
|
|
35
|
+
} = _ref;
|
|
41
36
|
const {
|
|
42
37
|
disabled,
|
|
43
38
|
minValue,
|
|
@@ -46,33 +41,27 @@ const Track = ({ children, props }) => {
|
|
|
46
41
|
withTickMarks,
|
|
47
42
|
withTickMarksValues,
|
|
48
43
|
withTwoHandles
|
|
49
|
-
} =
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
} = React.useContext(context.SliderContext);
|
|
45
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
46
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(TrackStyled, _objectSpread(_objectSpread({}, props), {}, {
|
|
47
|
+
// This is needed because it's received from the library
|
|
48
|
+
disabled: disabled,
|
|
49
|
+
minValue: minValue,
|
|
50
|
+
maxValue: maxValue,
|
|
51
|
+
rangeValues: rangeValues,
|
|
52
|
+
withTwoHandles: withTwoHandles,
|
|
53
|
+
children: [children, withTickMarks && !disabled && (_TickMarks || (_TickMarks = /*#__PURE__*/_jsx__default["default"](TickMarks, {})))]
|
|
54
|
+
})), withTickMarksValues && (_TickMarksValues || (_TickMarksValues = /*#__PURE__*/_jsx__default["default"](TickMarksValues, {})))]
|
|
55
|
+
});
|
|
58
56
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
min-width: ${(props) => (0, import_ds_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.xxl)};
|
|
64
|
-
border-radius: ${(props) => (0, import_ds_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.xxs)};
|
|
65
|
-
background: ${(props) => props.disabled ? props.theme.colors.neutral[100] : (0, import_react_range.getTrackBackground)({
|
|
57
|
+
|
|
58
|
+
const TrackStyled = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
59
|
+
componentId: "sc-13fbuj5-0"
|
|
60
|
+
})(["position:relative;height:", ";width:100%;min-width:", ";border-radius:", ";background:", ";"], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxl), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => props.disabled ? props.theme.colors.neutral[100] : reactRange.getTrackBackground({
|
|
66
61
|
values: props.rangeValues,
|
|
67
|
-
colors: props.withTwoHandles ? [
|
|
68
|
-
props.theme.colors.neutral[100],
|
|
69
|
-
props.theme.colors.brand[600],
|
|
70
|
-
props.theme.colors.neutral[100]
|
|
71
|
-
] : [props.theme.colors.brand[600], props.theme.colors.neutral[100]],
|
|
62
|
+
colors: props.withTwoHandles ? [props.theme.colors.neutral[100], props.theme.colors.brand[600], props.theme.colors.neutral[100]] : [props.theme.colors.brand[600], props.theme.colors.neutral[100]],
|
|
72
63
|
min: props.minValue,
|
|
73
64
|
max: props.maxValue
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
module.exports = __toCommonJS(Track_exports);
|
|
78
|
-
//# sourceMappingURL=Track.js.map
|
|
65
|
+
}));
|
|
66
|
+
|
|
67
|
+
module.exports = Track;
|
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var context_exports = {};
|
|
29
|
-
__export(context_exports, {
|
|
30
|
-
SliderContext: () => SliderContext
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react = __toESM(require("react"));
|
|
34
|
-
const SliderContext = import_react.default.createContext();
|
|
35
|
-
module.exports = __toCommonJS(context_exports);
|
|
36
|
-
//# sourceMappingURL=context.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
+
|
|
11
|
+
const SliderContext = /*#__PURE__*/React__default["default"].createContext();
|
|
12
|
+
|
|
13
|
+
exports.SliderContext = SliderContext;
|
package/cjs/components/styled.js
CHANGED
|
@@ -1,96 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var styled_exports = {};
|
|
29
|
-
__export(styled_exports, {
|
|
30
|
-
LabelText: () => LabelText,
|
|
31
|
-
LabelWrapper: () => LabelWrapper,
|
|
32
|
-
StyledRangeWrapper: () => StyledRangeWrapper,
|
|
33
|
-
ThumbStyled: () => ThumbStyled,
|
|
34
|
-
TooltipArrow: () => TooltipArrow,
|
|
35
|
-
TooltipContainerStyled: () => TooltipContainerStyled,
|
|
36
|
-
ValueText: () => ValueText
|
|
37
|
-
});
|
|
38
|
-
var React = __toESM(require("react"));
|
|
39
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
40
|
-
var import_ds_system = __toESM(require("@elliemae/ds-system"));
|
|
41
|
-
var import_ds_tooltip = __toESM(require("@elliemae/ds-tooltip"));
|
|
42
|
-
const ThumbStyled = import_styled_components.default.div`
|
|
43
|
-
height: 20px;
|
|
44
|
-
width: 20px;
|
|
45
|
-
background-color: ${(props) => props.disabled ? props.theme.colors.neutral[100] : props.theme.colors.neutral["000"]};
|
|
46
|
-
border-radius: 10px;
|
|
47
|
-
border: 1px solid ${(props) => props.disabled ? props.theme.colors.neutral[100] : props.theme.colors.neutral[400]};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
7
|
+
var dsTooltip = require('@elliemae/ds-tooltip');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
48
10
|
|
|
49
|
-
|
|
50
|
-
border: 1px solid ${(props) => props.theme.colors.brand[600]};
|
|
51
|
-
outline: unset;
|
|
52
|
-
}
|
|
11
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
53
12
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
13
|
+
/* eslint-disable indent */
|
|
14
|
+
const ThumbStyled = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
15
|
+
componentId: "sc-24in0j-0"
|
|
16
|
+
})(["height:20px;width:20px;background-color:", ";border-radius:10px;border:1px solid ", ";:focus{border:1px solid ", ";outline:unset;}:hover{background-color:", ";}"], props => props.disabled ? props.theme.colors.neutral[100] : props.theme.colors.neutral['000'], props => props.disabled ? props.theme.colors.neutral[100] : props.theme.colors.neutral[400], props => props.theme.colors.brand[600], _ref => {
|
|
17
|
+
let {
|
|
18
|
+
disabled,
|
|
19
|
+
theme
|
|
20
|
+
} = _ref;
|
|
21
|
+
return disabled ? theme.colors.neutral[100] : theme.colors.brand[200];
|
|
22
|
+
});
|
|
23
|
+
const TooltipContainerStyled = /*#__PURE__*/styled__default["default"](dsTooltip.TooltipContainer).withConfig({
|
|
24
|
+
componentId: "sc-24in0j-1"
|
|
25
|
+
})(["position:relative;display:flex;align-items:center;flex-direction:column;top:-35px;width:max-content;left:50%;transform:translateX(-50%);visibility:", ";"], _ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
isDragged,
|
|
28
|
+
isHovered
|
|
29
|
+
} = _ref2;
|
|
30
|
+
return isDragged || isHovered ? 'visible' : 'hidden';
|
|
31
|
+
}); // TODO: didn't work with DSTooltip, see how to improve
|
|
32
|
+
|
|
33
|
+
const TooltipArrow = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
34
|
+
componentId: "sc-24in0j-2"
|
|
35
|
+
})(["position:absolute;width:0;height:0;top:20px;border-left:calc(", " * 2.5) solid transparent;border-right:calc(", " * 2.5) solid transparent;border-top:calc(", " * 2.5) solid ", ";"], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => props.theme.colors.neutral[0]);
|
|
36
|
+
const LabelWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
37
|
+
componentId: "sc-24in0j-3"
|
|
38
|
+
})(["margin-bottom:", ";max-width:100%;width:", ";"], props => props.theme.space.xxs, props => "".concat(props.width || 0, "px"));
|
|
39
|
+
const LabelText = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
40
|
+
componentId: "sc-24in0j-4"
|
|
41
|
+
})(["color:", ";"], props => props.theme.colors.neutral[600]);
|
|
42
|
+
const ValueText = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
43
|
+
componentId: "sc-24in0j-5"
|
|
44
|
+
})(["color:", ";"], _ref3 => {
|
|
45
|
+
let {
|
|
46
|
+
disabled,
|
|
47
|
+
theme
|
|
48
|
+
} = _ref3;
|
|
49
|
+
return theme.colors.neutral[disabled ? 500 : 800];
|
|
50
|
+
});
|
|
51
|
+
const StyledRangeWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
52
|
+
componentId: "sc-24in0j-6"
|
|
53
|
+
})(["min-height:28px;margin:0 10px;"]);
|
|
76
54
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
`;
|
|
85
|
-
const LabelText = import_styled_components.default.span`
|
|
86
|
-
color: ${(props) => props.theme.colors.neutral[600]};
|
|
87
|
-
`;
|
|
88
|
-
const ValueText = import_styled_components.default.span`
|
|
89
|
-
color: ${({ disabled, theme }) => theme.colors.neutral[disabled ? 500 : 800]};
|
|
90
|
-
`;
|
|
91
|
-
const StyledRangeWrapper = import_styled_components.default.div`
|
|
92
|
-
min-height: 28px;
|
|
93
|
-
margin: 0 10px;
|
|
94
|
-
`;
|
|
95
|
-
module.exports = __toCommonJS(styled_exports);
|
|
96
|
-
//# sourceMappingURL=styled.js.map
|
|
55
|
+
exports.LabelText = LabelText;
|
|
56
|
+
exports.LabelWrapper = LabelWrapper;
|
|
57
|
+
exports.StyledRangeWrapper = StyledRangeWrapper;
|
|
58
|
+
exports.ThumbStyled = ThumbStyled;
|
|
59
|
+
exports.TooltipArrow = TooltipArrow;
|
|
60
|
+
exports.TooltipContainerStyled = TooltipContainerStyled;
|
|
61
|
+
exports.ValueText = ValueText;
|