@elliemae/ds-slider 2.0.0-alpha.10 → 2.0.0-alpha.11

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.
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _jsx = require('@babel/runtime/helpers/jsx');
4
+ require('core-js/modules/web.dom-collections.iterator.js');
4
5
  var React = require('react');
5
6
  var uuid = require('uuid');
6
7
  var reactRange = require('react-range');
@@ -185,7 +186,7 @@ const SliderImp = props => {
185
186
  props: thumbProps,
186
187
  isDragged: isDragged,
187
188
  index: index
188
- }, `${sliderUUID}-${thumbProps.key}`);
189
+ }, "".concat(sliderUUID, "-").concat(thumbProps.key));
189
190
  },
190
191
  allowOverlap: false
191
192
  }))))
@@ -2,6 +2,7 @@
2
2
 
3
3
  var _jsx = require('@babel/runtime/helpers/jsx');
4
4
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
+ require('core-js/modules/web.dom-collections.iterator.js');
5
6
  var React = require('react');
6
7
  var dsTooltip = require('@elliemae/ds-tooltip');
7
8
  var context = require('./context.js');
@@ -23,7 +23,7 @@ const TickMarks = () => {
23
23
  const isSelected = fullSelectedValues.findIndex(selectedVal => selectedVal === value) >= 0;
24
24
  return /*#__PURE__*/_jsx__default["default"](TickMarkValue, {
25
25
  isSelected: isSelected
26
- }, `${sliderUUID}-${value}`, value);
26
+ }, "".concat(sliderUUID, "-").concat(value), value);
27
27
  }), [parsedValuesArray, sliderUUID, fullSelectedValues]);
28
28
  const PureTickMArksValues = React.useMemo(() => _TickMarksContainer || (_TickMarksContainer = /*#__PURE__*/_jsx__default["default"](TickMarksContainer, {
29
29
  "data-testid": "slider-tick-marks-values"
@@ -29,7 +29,7 @@ const TooltipArrow = /*#__PURE__*/styled__default["default"].div.withConfig({
29
29
  })(["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]);
30
30
  const LabelWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
31
31
  componentId: "sc-24in0j-3"
32
- })(["margin-bottom:", ";max-width:100%;width:", ";"], props => props.theme.space.xxs, props => `${props.width || 0}px`);
32
+ })(["margin-bottom:", ";max-width:100%;width:", ";"], props => props.theme.space.xxs, props => "".concat(props.width || 0, "px"));
33
33
  const LabelText = /*#__PURE__*/styled__default["default"].span.withConfig({
34
34
  componentId: "sc-24in0j-4"
35
35
  })(["color:", ";"], props => props.theme.colors.neutral[600]);
@@ -12,24 +12,24 @@ const conformedLabel = (rangeValues, label = '', labelWithValue = false, withTwo
12
12
  if (!utils.isEmpty(customTickMarksValues) && labelWithValue && label) {
13
13
  const firstValue = customTickMarksValues[(rangeValues[0] - minValue) / step];
14
14
  const secondValue = customTickMarksValues[(rangeValues[1] - minValue) / step];
15
- value = `${firstValue || rangeValues[0].toFixed(1)} ${withTwoHandles ? `, ${secondValue || rangeValues[1].toFixed(1)}` : ''} `;
15
+ value = "".concat(firstValue || rangeValues[0].toFixed(1), " ").concat(withTwoHandles ? ", ".concat(secondValue || rangeValues[1].toFixed(1)) : '', " ");
16
16
  } else if (labelWithValue && label) {
17
17
  var _rangeValues$;
18
18
 
19
- value = `${rangeValues[0].toFixed(1)} ${withTwoHandles ? `, ${(_rangeValues$ = rangeValues[1]) === null || _rangeValues$ === void 0 ? void 0 : _rangeValues$.toFixed(1)}` : ''} `;
19
+ value = "".concat(rangeValues[0].toFixed(1), " ").concat(withTwoHandles ? ", ".concat((_rangeValues$ = rangeValues[1]) === null || _rangeValues$ === void 0 ? void 0 : _rangeValues$.toFixed(1)) : '', " ");
20
20
  }
21
21
 
22
22
  value = value.trim();
23
23
  return [msg, value];
24
24
  };
25
25
  const conformedThumbLabel = (rangeValues, customTickMarksValues = [], index = 0, step = 1, minValue = 0) => {
26
- let msg = `Value: `;
26
+ let msg = "Value: ";
27
27
 
28
28
  if (!utils.isEmpty(customTickMarksValues)) {
29
29
  const foundValue = customTickMarksValues[(rangeValues[index] - minValue) / step];
30
- msg += `${foundValue || rangeValues[index].toFixed(1)}`;
30
+ msg += "".concat(foundValue || rangeValues[index].toFixed(1));
31
31
  } else {
32
- msg += `${rangeValues[index].toFixed(1)}`;
32
+ msg += "".concat(rangeValues[index].toFixed(1));
33
33
  }
34
34
 
35
35
  return msg;
@@ -1,4 +1,5 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { useRef, useState, useMemo, useEffect } from 'react';
3
4
  import { v4 } from 'uuid';
4
5
  import { Range } from 'react-range';
@@ -177,7 +178,7 @@ const SliderImp = props => {
177
178
  props: thumbProps,
178
179
  isDragged: isDragged,
179
180
  index: index
180
- }, `${sliderUUID}-${thumbProps.key}`);
181
+ }, "".concat(sliderUUID, "-").concat(thumbProps.key));
181
182
  },
182
183
  allowOverlap: false
183
184
  }))))
@@ -1,5 +1,6 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
4
  import { useState, useContext } from 'react';
4
5
  import { TooltipText } from '@elliemae/ds-tooltip';
5
6
  import { SliderContext } from './context.js';
@@ -16,7 +16,7 @@ const TickMarks = () => {
16
16
  const isSelected = fullSelectedValues.findIndex(selectedVal => selectedVal === value) >= 0;
17
17
  return /*#__PURE__*/_jsx(TickMarkValue, {
18
18
  isSelected: isSelected
19
- }, `${sliderUUID}-${value}`, value);
19
+ }, "".concat(sliderUUID, "-").concat(value), value);
20
20
  }), [parsedValuesArray, sliderUUID, fullSelectedValues]);
21
21
  const PureTickMArksValues = useMemo(() => _TickMarksContainer || (_TickMarksContainer = /*#__PURE__*/_jsx(TickMarksContainer, {
22
22
  "data-testid": "slider-tick-marks-values"
@@ -21,7 +21,7 @@ const TooltipArrow = /*#__PURE__*/styled.div.withConfig({
21
21
  })(["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 => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs), props => props.theme.colors.neutral[0]);
22
22
  const LabelWrapper = /*#__PURE__*/styled.div.withConfig({
23
23
  componentId: "sc-24in0j-3"
24
- })(["margin-bottom:", ";max-width:100%;width:", ";"], props => props.theme.space.xxs, props => `${props.width || 0}px`);
24
+ })(["margin-bottom:", ";max-width:100%;width:", ";"], props => props.theme.space.xxs, props => "".concat(props.width || 0, "px"));
25
25
  const LabelText = /*#__PURE__*/styled.span.withConfig({
26
26
  componentId: "sc-24in0j-4"
27
27
  })(["color:", ";"], props => props.theme.colors.neutral[600]);
@@ -8,24 +8,24 @@ const conformedLabel = (rangeValues, label = '', labelWithValue = false, withTwo
8
8
  if (!isEmpty(customTickMarksValues) && labelWithValue && label) {
9
9
  const firstValue = customTickMarksValues[(rangeValues[0] - minValue) / step];
10
10
  const secondValue = customTickMarksValues[(rangeValues[1] - minValue) / step];
11
- value = `${firstValue || rangeValues[0].toFixed(1)} ${withTwoHandles ? `, ${secondValue || rangeValues[1].toFixed(1)}` : ''} `;
11
+ value = "".concat(firstValue || rangeValues[0].toFixed(1), " ").concat(withTwoHandles ? ", ".concat(secondValue || rangeValues[1].toFixed(1)) : '', " ");
12
12
  } else if (labelWithValue && label) {
13
13
  var _rangeValues$;
14
14
 
15
- value = `${rangeValues[0].toFixed(1)} ${withTwoHandles ? `, ${(_rangeValues$ = rangeValues[1]) === null || _rangeValues$ === void 0 ? void 0 : _rangeValues$.toFixed(1)}` : ''} `;
15
+ value = "".concat(rangeValues[0].toFixed(1), " ").concat(withTwoHandles ? ", ".concat((_rangeValues$ = rangeValues[1]) === null || _rangeValues$ === void 0 ? void 0 : _rangeValues$.toFixed(1)) : '', " ");
16
16
  }
17
17
 
18
18
  value = value.trim();
19
19
  return [msg, value];
20
20
  };
21
21
  const conformedThumbLabel = (rangeValues, customTickMarksValues = [], index = 0, step = 1, minValue = 0) => {
22
- let msg = `Value: `;
22
+ let msg = "Value: ";
23
23
 
24
24
  if (!isEmpty(customTickMarksValues)) {
25
25
  const foundValue = customTickMarksValues[(rangeValues[index] - minValue) / step];
26
- msg += `${foundValue || rangeValues[index].toFixed(1)}`;
26
+ msg += "".concat(foundValue || rangeValues[index].toFixed(1));
27
27
  } else {
28
- msg += `${rangeValues[index].toFixed(1)}`;
28
+ msg += "".concat(rangeValues[index].toFixed(1));
29
29
  }
30
30
 
31
31
  return msg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-slider",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.11",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Slider",
6
6
  "module": "./esm/index.js",
@@ -72,11 +72,11 @@
72
72
  "build": "node ../../scripts/build/build.js"
73
73
  },
74
74
  "dependencies": {
75
- "@elliemae/ds-grid": "2.0.0-alpha.10",
76
- "@elliemae/ds-system": "2.0.0-alpha.10",
77
- "@elliemae/ds-tooltip": "2.0.0-alpha.10",
78
- "@elliemae/ds-truncated-tooltip-text": "2.0.0-alpha.10",
79
- "@elliemae/ds-utilities": "2.0.0-alpha.10",
75
+ "@elliemae/ds-grid": "2.0.0-alpha.11",
76
+ "@elliemae/ds-system": "2.0.0-alpha.11",
77
+ "@elliemae/ds-tooltip": "2.0.0-alpha.11",
78
+ "@elliemae/ds-truncated-tooltip-text": "2.0.0-alpha.11",
79
+ "@elliemae/ds-utilities": "2.0.0-alpha.11",
80
80
  "prop-types": "~15.7.2",
81
81
  "react-desc": "~4.1.3",
82
82
  "react-range": "~1.8.11",
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }