zds-pickers 3.9.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/useComponentSize.js +4 -4
- package/dist/midi/statuses.js +2 -2
- package/dist/other/SVGText.js +4 -4
- package/dist/other/utils.js +2 -2
- package/dist/pickers/CCPicker.js +2 -2
- package/dist/pickers/ChannelMappingPicker.js +2 -2
- package/dist/pickers/ChannelPicker.js +6 -6
- package/dist/pickers/Knob.js +6 -6
- package/dist/pickers/KnobPicker.js +6 -6
- package/dist/pickers/LatchPicker.js +2 -2
- package/dist/pickers/MappingPicker.js +10 -10
- package/dist/pickers/NotePicker.js +4 -4
- package/dist/pickers/PolarityPicker.js +4 -4
- package/dist/pickers/ResponseCurve.js +22 -22
- package/dist/pickers/ResponseCurvePicker.js +27 -22
- package/dist/pickers/Select.js +18 -13
- package/dist/pickers/StatusPicker.js +4 -4
- package/dist/pickers/ValuePicker.js +4 -4
- package/dist/pickers/knobSkin10.js +6 -6
- package/dist/shapes.js +2 -2
- package/dist/stories/assets/mapper.js +6 -6
- package/package.json +15 -15
|
@@ -4,12 +4,12 @@ var _react = require("react"); /* eslint-disable consistent-return */
|
|
|
4
4
|
var getSize = function getSize(el) {return el ?
|
|
5
5
|
{
|
|
6
6
|
width: el.offsetWidth,
|
|
7
|
-
height: el.offsetHeight
|
|
8
|
-
|
|
7
|
+
height: el.offsetHeight
|
|
8
|
+
} :
|
|
9
9
|
{
|
|
10
10
|
width: 0,
|
|
11
|
-
height: 0
|
|
12
|
-
|
|
11
|
+
height: 0
|
|
12
|
+
};};
|
|
13
13
|
|
|
14
14
|
var useComponentSize = function useComponentSize(ref) {
|
|
15
15
|
var _useState = (0, _react.useState)(getSize(ref ? ref.current : {})),_useState2 = (0, _slicedToArray2["default"])(_useState, 2),componentSize = _useState2[0],setComponentSize = _useState2[1];
|
package/dist/midi/statuses.js
CHANGED
|
@@ -27,7 +27,7 @@ var combineStatus = function combineStatus(channel, status) {return channel | st
|
|
|
27
27
|
|
|
28
28
|
var extractStatus = function extractStatus(status) {return {
|
|
29
29
|
status: (status & MASK_STATUS) >> 4 | 8,
|
|
30
|
-
channel: status & MASK_CHANNEL
|
|
31
|
-
|
|
30
|
+
channel: status & MASK_CHANNEL
|
|
31
|
+
};};exports.extractStatus = extractStatus;var _default =
|
|
32
32
|
|
|
33
33
|
statuses;exports["default"] = _default;
|
package/dist/other/SVGText.js
CHANGED
|
@@ -100,8 +100,8 @@ Text.propTypes = {
|
|
|
100
100
|
maxWidth: _propTypes["default"].number,
|
|
101
101
|
verticalAnchor: _propTypes["default"].oneOf(['start', 'middle', 'end']),
|
|
102
102
|
x: _shapes.numberOrString,
|
|
103
|
-
y: _shapes.numberOrString
|
|
104
|
-
|
|
103
|
+
y: _shapes.numberOrString
|
|
104
|
+
};
|
|
105
105
|
|
|
106
106
|
Text.defaultProps = {
|
|
107
107
|
dx: 0,
|
|
@@ -110,7 +110,7 @@ Text.defaultProps = {
|
|
|
110
110
|
maxWidth: undefined,
|
|
111
111
|
verticalAnchor: 'start',
|
|
112
112
|
x: '50%',
|
|
113
|
-
y: '50%'
|
|
114
|
-
|
|
113
|
+
y: '50%'
|
|
114
|
+
};var _default =
|
|
115
115
|
|
|
116
116
|
Text;exports["default"] = _default;
|
package/dist/other/utils.js
CHANGED
package/dist/pickers/CCPicker.js
CHANGED
|
@@ -13,7 +13,7 @@ var CCPicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {return
|
|
|
13
13
|
|
|
14
14
|
CCPicker.propTypes = {
|
|
15
15
|
onChange: _propTypes["default"].func.isRequired,
|
|
16
|
-
value: _propTypes["default"].number.isRequired
|
|
17
|
-
|
|
16
|
+
value: _propTypes["default"].number.isRequired
|
|
17
|
+
};var _default =
|
|
18
18
|
|
|
19
19
|
CCPicker;exports["default"] = _default;
|
|
@@ -46,7 +46,7 @@ var ChannelMappingPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
|
|
|
46
46
|
ChannelMappingPicker.propTypes = {
|
|
47
47
|
channels: _propTypes["default"].arrayOf(_propTypes["default"].string).isRequired,
|
|
48
48
|
onChange: _propTypes["default"].func.isRequired,
|
|
49
|
-
value: _propTypes["default"].number.isRequired
|
|
50
|
-
|
|
49
|
+
value: _propTypes["default"].number.isRequired
|
|
50
|
+
};var _default =
|
|
51
51
|
|
|
52
52
|
ChannelMappingPicker;exports["default"] = _default;
|
|
@@ -6,8 +6,8 @@ var _Select = _interopRequireDefault(require("./Select"));var _excluded = ["clas
|
|
|
6
6
|
|
|
7
7
|
var options = (0, _utils.arraySequence)(16).map(function (value) {return {
|
|
8
8
|
value: value,
|
|
9
|
-
label: "Channel ".concat(value + 1)
|
|
10
|
-
|
|
9
|
+
label: "Channel ".concat(value + 1)
|
|
10
|
+
};});
|
|
11
11
|
|
|
12
12
|
var ChannelPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {var className = _ref.className,rest = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
13
13
|
var formatOptionLabel = (0, _react.useCallback)(
|
|
@@ -30,11 +30,11 @@ var ChannelPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {va
|
|
|
30
30
|
ChannelPicker.propTypes = {
|
|
31
31
|
className: _propTypes["default"].string,
|
|
32
32
|
onChange: _propTypes["default"].func.isRequired,
|
|
33
|
-
value: _propTypes["default"].number.isRequired
|
|
34
|
-
|
|
33
|
+
value: _propTypes["default"].number.isRequired
|
|
34
|
+
};
|
|
35
35
|
|
|
36
36
|
ChannelPicker.defaultProps = {
|
|
37
|
-
className: undefined
|
|
38
|
-
|
|
37
|
+
className: undefined
|
|
38
|
+
};var _default =
|
|
39
39
|
|
|
40
40
|
ChannelPicker;exports["default"] = _default;
|
package/dist/pickers/Knob.js
CHANGED
|
@@ -7,7 +7,7 @@ var _knobSkin = _interopRequireDefault(require("./knobSkin10"));var _excluded =
|
|
|
7
7
|
|
|
8
8
|
var Knob = function Knob(props) {
|
|
9
9
|
var
|
|
10
|
-
|
|
10
|
+
disabled =
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ var Knob = function Knob(props) {
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
props.disabled,max = props.max,min = props.min,onChange = props.onChange,initialValue = props.value,wheelEnabled = props.wheelEnabled,wheelSensitivity = props.wheelSensitivity,rest = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
19
19
|
|
|
20
20
|
var _useStateWithDynamicD = (0, _useStateWithDynamicDefault["default"])(initialValue),_useStateWithDynamicD2 = (0, _slicedToArray2["default"])(_useStateWithDynamicD, 2),value = _useStateWithDynamicD2[0],setValue = _useStateWithDynamicD2[1];
|
|
21
21
|
|
|
@@ -71,8 +71,8 @@ Knob.propTypes = {
|
|
|
71
71
|
wheelEnabled: _propTypes["default"].bool,
|
|
72
72
|
onChange: _propTypes["default"].func,
|
|
73
73
|
value: _propTypes["default"].number,
|
|
74
|
-
wheelSensitivity: _propTypes["default"].number
|
|
75
|
-
|
|
74
|
+
wheelSensitivity: _propTypes["default"].number
|
|
75
|
+
};
|
|
76
76
|
Knob.defaultProps = {
|
|
77
77
|
disabled: false,
|
|
78
78
|
max: 127,
|
|
@@ -80,7 +80,7 @@ Knob.defaultProps = {
|
|
|
80
80
|
onChange: undefined,
|
|
81
81
|
value: 0,
|
|
82
82
|
wheelEnabled: false,
|
|
83
|
-
wheelSensitivity: 0.1
|
|
84
|
-
|
|
83
|
+
wheelSensitivity: 0.1
|
|
84
|
+
};var _default =
|
|
85
85
|
|
|
86
86
|
Knob;exports["default"] = _default;
|
|
@@ -6,7 +6,7 @@ var _Knob = _interopRequireDefault(require("./Knob"));var _excluded = ["disabled
|
|
|
6
6
|
|
|
7
7
|
var KnobPicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
8
8
|
var
|
|
9
|
-
|
|
9
|
+
disabled =
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ var KnobPicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
props.disabled,highToLow = props.highToLow,includeLabel = props.includeLabel,includePicker = props.includePicker,knobProps = props.knobProps,label = props.label,max = props.max,min = props.min,onChange = props.onChange,shrinkLabel = props.shrinkLabel,value = props.value,wheelEnabled = props.wheelEnabled,wheelSensitivity = props.wheelSensitivity,rest = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
24
24
|
|
|
25
25
|
var options = (0, _react.useMemo)(
|
|
26
26
|
function () {
|
|
@@ -80,8 +80,8 @@ KnobPicker.propTypes = {
|
|
|
80
80
|
shrinkLabel: _propTypes["default"].bool,
|
|
81
81
|
value: _propTypes["default"].number,
|
|
82
82
|
wheelEnabled: _propTypes["default"].bool,
|
|
83
|
-
wheelSensitivity: _propTypes["default"].number
|
|
84
|
-
|
|
83
|
+
wheelSensitivity: _propTypes["default"].number
|
|
84
|
+
};
|
|
85
85
|
|
|
86
86
|
KnobPicker.defaultProps = {
|
|
87
87
|
disabled: false,
|
|
@@ -95,7 +95,7 @@ KnobPicker.defaultProps = {
|
|
|
95
95
|
shrinkLabel: false,
|
|
96
96
|
value: 0,
|
|
97
97
|
wheelEnabled: false,
|
|
98
|
-
wheelSensitivity: 0.1
|
|
99
|
-
|
|
98
|
+
wheelSensitivity: 0.1
|
|
99
|
+
};var _default =
|
|
100
100
|
|
|
101
101
|
KnobPicker;exports["default"] = _default;
|
|
@@ -17,7 +17,7 @@ var LatchPicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {ret
|
|
|
17
17
|
|
|
18
18
|
LatchPicker.propTypes = {
|
|
19
19
|
onChange: _propTypes["default"].func.isRequired,
|
|
20
|
-
value: _propTypes["default"].number.isRequired
|
|
21
|
-
|
|
20
|
+
value: _propTypes["default"].number.isRequired
|
|
21
|
+
};var _default =
|
|
22
22
|
|
|
23
23
|
LatchPicker;exports["default"] = _default;
|
|
@@ -11,8 +11,8 @@ var MappingPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {va
|
|
|
11
11
|
var result = allowClearing ?
|
|
12
12
|
[{
|
|
13
13
|
value: 'No Mapping',
|
|
14
|
-
label: /*#__PURE__*/_react["default"].createElement("span", { className: "zds-mappings-clear-mapping" }, "No Mapping")
|
|
15
|
-
|
|
14
|
+
label: /*#__PURE__*/_react["default"].createElement("span", { className: "zds-mappings-clear-mapping" }, "No Mapping")
|
|
15
|
+
}] :
|
|
16
16
|
[];
|
|
17
17
|
|
|
18
18
|
return [].concat(
|
|
@@ -20,15 +20,15 @@ var MappingPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {va
|
|
|
20
20
|
|
|
21
21
|
{
|
|
22
22
|
label: allowClearing ? /*#__PURE__*/_react["default"].createElement("hr", null) : '',
|
|
23
|
-
options: userMappings.map(function (label) {return { value: label, label: /*#__PURE__*/_react["default"].createElement("span", { className: "zds-mappings-user-mapping" }, label) };})
|
|
24
|
-
|
|
23
|
+
options: userMappings.map(function (label) {return { value: label, label: /*#__PURE__*/_react["default"].createElement("span", { className: "zds-mappings-user-mapping" }, label) };})
|
|
24
|
+
},
|
|
25
25
|
|
|
26
26
|
{
|
|
27
27
|
label: userMappings.length ? /*#__PURE__*/
|
|
28
28
|
_react["default"].createElement("hr", null) :
|
|
29
29
|
allowClearing ? /*#__PURE__*/_react["default"].createElement("hr", null) : '',
|
|
30
|
-
options: stockMappings.map(function (label) {return { label: label, value: label };})
|
|
31
|
-
|
|
30
|
+
options: stockMappings.map(function (label) {return { label: label, value: label };})
|
|
31
|
+
}]);
|
|
32
32
|
|
|
33
33
|
}, [allowClearing, stockMappings, userMappings]);
|
|
34
34
|
|
|
@@ -44,12 +44,12 @@ var MappingPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {va
|
|
|
44
44
|
MappingPicker.propTypes = {
|
|
45
45
|
allowClearing: _propTypes["default"].bool,
|
|
46
46
|
onChange: _propTypes["default"].func.isRequired,
|
|
47
|
-
value: _propTypes["default"].string
|
|
48
|
-
|
|
47
|
+
value: _propTypes["default"].string
|
|
48
|
+
};
|
|
49
49
|
|
|
50
50
|
MappingPicker.defaultProps = {
|
|
51
51
|
allowClearing: true,
|
|
52
|
-
value: 'General MIDI'
|
|
53
|
-
|
|
52
|
+
value: 'General MIDI'
|
|
53
|
+
};var _default =
|
|
54
54
|
|
|
55
55
|
MappingPicker;exports["default"] = _default;
|
|
@@ -41,13 +41,13 @@ NotePicker.propTypes = {
|
|
|
41
41
|
onChange: _propTypes["default"].func.isRequired,
|
|
42
42
|
disabled: _propTypes["default"].bool,
|
|
43
43
|
value: _propTypes["default"].number,
|
|
44
|
-
channel: _propTypes["default"].number.isRequired
|
|
45
|
-
|
|
44
|
+
channel: _propTypes["default"].number.isRequired
|
|
45
|
+
};
|
|
46
46
|
|
|
47
47
|
NotePicker.defaultProps = {
|
|
48
48
|
disabled: false,
|
|
49
49
|
mapping: undefined,
|
|
50
|
-
value: undefined
|
|
51
|
-
|
|
50
|
+
value: undefined
|
|
51
|
+
};var _default =
|
|
52
52
|
|
|
53
53
|
NotePicker;exports["default"] = _default;
|
|
@@ -21,12 +21,12 @@ PolarityPicker.propTypes = {
|
|
|
21
21
|
labelOff: _propTypes["default"].string,
|
|
22
22
|
labelOn: _propTypes["default"].string,
|
|
23
23
|
onChange: _propTypes["default"].func.isRequired,
|
|
24
|
-
value: _propTypes["default"].number.isRequired
|
|
25
|
-
|
|
24
|
+
value: _propTypes["default"].number.isRequired
|
|
25
|
+
};
|
|
26
26
|
|
|
27
27
|
PolarityPicker.defaultProps = {
|
|
28
28
|
labelOn: 'Normally On',
|
|
29
|
-
labelOff: 'Normally Off'
|
|
30
|
-
|
|
29
|
+
labelOff: 'Normally Off'
|
|
30
|
+
};var _default =
|
|
31
31
|
|
|
32
32
|
PolarityPicker;exports["default"] = _default;
|
|
@@ -19,36 +19,36 @@ var RESPONSE_CURVE_7 = 7;
|
|
|
19
19
|
var RESPONSE_CURVES = [
|
|
20
20
|
{
|
|
21
21
|
value: RESPONSE_CURVE_7,
|
|
22
|
-
label: 'Always maxed out.'
|
|
23
|
-
|
|
22
|
+
label: 'Always maxed out.'
|
|
23
|
+
},
|
|
24
24
|
{
|
|
25
25
|
value: RESPONSE_CURVE_6,
|
|
26
|
-
label: 'Most sensitive.'
|
|
27
|
-
|
|
26
|
+
label: 'Most sensitive.'
|
|
27
|
+
},
|
|
28
28
|
{
|
|
29
29
|
value: RESPONSE_CURVE_5,
|
|
30
|
-
label: 'Moderately sensitive.'
|
|
31
|
-
|
|
30
|
+
label: 'Moderately sensitive.'
|
|
31
|
+
},
|
|
32
32
|
{
|
|
33
33
|
value: RESPONSE_CURVE_4,
|
|
34
|
-
label: 'A little sensitive.'
|
|
35
|
-
|
|
34
|
+
label: 'A little sensitive.'
|
|
35
|
+
},
|
|
36
36
|
{
|
|
37
37
|
value: RESPONSE_CURVE_0,
|
|
38
|
-
label: 'Linear, no change.'
|
|
39
|
-
|
|
38
|
+
label: 'Linear, no change.'
|
|
39
|
+
},
|
|
40
40
|
{
|
|
41
41
|
value: RESPONSE_CURVE_1,
|
|
42
|
-
label: 'A little less sensitive.'
|
|
43
|
-
|
|
42
|
+
label: 'A little less sensitive.'
|
|
43
|
+
},
|
|
44
44
|
{
|
|
45
45
|
value: RESPONSE_CURVE_2,
|
|
46
|
-
label: 'Even less sensitive.'
|
|
47
|
-
|
|
46
|
+
label: 'Even less sensitive.'
|
|
47
|
+
},
|
|
48
48
|
{
|
|
49
49
|
value: RESPONSE_CURVE_3,
|
|
50
|
-
label: 'Least sensitive.'
|
|
51
|
-
|
|
50
|
+
label: 'Least sensitive.'
|
|
51
|
+
}];
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
// const width = 218
|
|
@@ -159,8 +159,8 @@ var ResponseCurve = function ResponseCurve(props) {
|
|
|
159
159
|
x2: x2,
|
|
160
160
|
y2: y2,
|
|
161
161
|
labelX: labelX,
|
|
162
|
-
labelY: labelY
|
|
163
|
-
|
|
162
|
+
labelY: labelY
|
|
163
|
+
};
|
|
164
164
|
});
|
|
165
165
|
|
|
166
166
|
return /*#__PURE__*/(
|
|
@@ -253,14 +253,14 @@ ResponseCurve.propTypes = {
|
|
|
253
253
|
inverted: _propTypes["default"].bool,
|
|
254
254
|
onChange: _propTypes["default"].func.isRequired,
|
|
255
255
|
Tooltip: _propTypes["default"].elementType,
|
|
256
|
-
value: _propTypes["default"].number.isRequired
|
|
257
|
-
|
|
256
|
+
value: _propTypes["default"].number.isRequired
|
|
257
|
+
};
|
|
258
258
|
|
|
259
259
|
ResponseCurve.defaultProps = {
|
|
260
260
|
autosize: false,
|
|
261
261
|
disabled: false,
|
|
262
262
|
inverted: false,
|
|
263
|
-
Tooltip: DefaultTooltip
|
|
264
|
-
|
|
263
|
+
Tooltip: DefaultTooltip
|
|
264
|
+
};var _default =
|
|
265
265
|
|
|
266
266
|
ResponseCurve;exports["default"] = _default;
|
|
@@ -7,29 +7,34 @@ var _Select = _interopRequireDefault(require("./Select"));var _excluded = ["Tool
|
|
|
7
7
|
var ResponseCurvePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
8
8
|
var Tooltip = props.Tooltip,inverted = props.inverted,_onChange = props.onChange,value = props.value,rest = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
9
9
|
|
|
10
|
-
return /*#__PURE__*/(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
components: {
|
|
14
|
-
Placeholder: function Placeholder() {var _findObj;return /*#__PURE__*/(
|
|
15
|
-
_react["default"].createElement("div", { className: "singleValue" }, (_findObj =
|
|
16
|
-
(0, _utils.findObj)('value', value)(_ResponseCurve.RESPONSE_CURVES)) === null || _findObj === void 0 ? void 0 : _findObj.label));},
|
|
10
|
+
var Placeholder = (0, _react.useCallback)(function () {var _findObj;return /*#__PURE__*/(
|
|
11
|
+
_react["default"].createElement("div", { className: "singleValue" }, (_findObj =
|
|
12
|
+
(0, _utils.findObj)('value', value)(_ResponseCurve.RESPONSE_CURVES)) === null || _findObj === void 0 ? void 0 : _findObj.label));},
|
|
17
13
|
|
|
14
|
+
[value]);
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
value: value }));} },
|
|
16
|
+
var MenuList = (0, _react.useCallback)(function (_ref) {var setValue = _ref.setValue;return /*#__PURE__*/(
|
|
17
|
+
_react["default"].createElement(_ResponseCurve["default"], {
|
|
18
|
+
autosize: true,
|
|
19
|
+
inverted: inverted,
|
|
20
|
+
onChange: function onChange(_ref2) {var v = _ref2.target.value;
|
|
21
|
+
setValue(v);
|
|
22
|
+
_onChange(v);
|
|
23
|
+
},
|
|
24
|
+
Tooltip: Tooltip,
|
|
25
|
+
value: value }));},
|
|
30
26
|
|
|
31
27
|
|
|
28
|
+
[Tooltip, inverted, _onChange, value]);
|
|
32
29
|
|
|
30
|
+
return /*#__PURE__*/(
|
|
31
|
+
_react["default"].createElement(_Select["default"], (0, _extends2["default"])({},
|
|
32
|
+
rest, {
|
|
33
|
+
components: {
|
|
34
|
+
Input: function Input() {return null;},
|
|
35
|
+
Placeholder: Placeholder,
|
|
36
|
+
MenuList: MenuList
|
|
37
|
+
},
|
|
33
38
|
onChange: function onChange(f) {return f;},
|
|
34
39
|
ref: ref,
|
|
35
40
|
value: value })));
|
|
@@ -41,12 +46,12 @@ ResponseCurvePicker.propTypes = {
|
|
|
41
46
|
value: _propTypes["default"].number.isRequired,
|
|
42
47
|
inverted: _propTypes["default"].bool,
|
|
43
48
|
onChange: _propTypes["default"].func.isRequired,
|
|
44
|
-
Tooltip: _propTypes["default"].elementType
|
|
45
|
-
|
|
49
|
+
Tooltip: _propTypes["default"].elementType
|
|
50
|
+
};
|
|
46
51
|
|
|
47
52
|
ResponseCurvePicker.defaultProps = {
|
|
48
53
|
inverted: false,
|
|
49
|
-
Tooltip: _ResponseCurve.DefaultTooltip
|
|
50
|
-
|
|
54
|
+
Tooltip: _ResponseCurve.DefaultTooltip
|
|
55
|
+
};var _default =
|
|
51
56
|
|
|
52
57
|
ResponseCurvePicker;exports["default"] = _default;
|
package/dist/pickers/Select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");var _typeof = require("@babel/runtime/helpers/typeof");Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react = _interopRequireWildcard(require("react"));
|
|
2
2
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
3
|
-
var _reactSelect = _interopRequireWildcard(require("react-select"));var _excluded = ["children"],_excluded2 = ["children"],_excluded3 = ["disabled", "label", "onChange", "options", "shrinkLabel", "value"];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);}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;}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;}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) {(0, _defineProperty2["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;}
|
|
3
|
+
var _reactSelect = _interopRequireWildcard(require("react-select"));var _excluded = ["children"],_excluded2 = ["children"],_excluded3 = ["components", "disabled", "label", "onChange", "options", "shrinkLabel", "value"];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);}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;}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;}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) {(0, _defineProperty2["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;}
|
|
4
4
|
|
|
5
5
|
var IndicatorsContainer = _reactSelect.components.IndicatorsContainer,Placeholder = _reactSelect.components.Placeholder,ValueContainer = _reactSelect.components.ValueContainer;
|
|
6
6
|
|
|
@@ -24,8 +24,8 @@ var CustomIndicatorsContainer = function CustomIndicatorsContainer(_ref) {var _r
|
|
|
24
24
|
|
|
25
25
|
};
|
|
26
26
|
CustomIndicatorsContainer.propTypes = {
|
|
27
|
-
children: _propTypes["default"].node.isRequired
|
|
28
|
-
|
|
27
|
+
children: _propTypes["default"].node.isRequired
|
|
28
|
+
};
|
|
29
29
|
|
|
30
30
|
var CustomValueContainer = function CustomValueContainer(_ref2) {var children = _ref2.children,props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);return /*#__PURE__*/(
|
|
31
31
|
_react["default"].createElement(ValueContainer, props, /*#__PURE__*/
|
|
@@ -43,20 +43,21 @@ CustomValueContainer.propTypes = {
|
|
|
43
43
|
children: _propTypes["default"].node.isRequired,
|
|
44
44
|
hasValue: _propTypes["default"].bool.isRequired,
|
|
45
45
|
isFocused: _propTypes["default"].bool,
|
|
46
|
-
selectProps: _propTypes["default"].object.isRequired
|
|
47
|
-
|
|
46
|
+
selectProps: _propTypes["default"].object.isRequired
|
|
47
|
+
};
|
|
48
48
|
CustomValueContainer.defaultProps = { isFocused: false };
|
|
49
49
|
|
|
50
50
|
var Select = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
51
51
|
var
|
|
52
|
-
|
|
52
|
+
components =
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
|
|
60
|
+
props.components,disabled = props.disabled,label = props.label,onChange = props.onChange,options = props.options,shrinkLabel = props.shrinkLabel,value = props.value,rest = (0, _objectWithoutProperties2["default"])(props, _excluded3);
|
|
60
61
|
|
|
61
62
|
var handleChange = (0, _react.useCallback)(function (option) {
|
|
62
63
|
onChange(option.value);
|
|
@@ -74,9 +75,10 @@ var Select = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
74
75
|
_react["default"].createElement(_reactSelect["default"], (0, _extends2["default"])({},
|
|
75
76
|
rest, {
|
|
76
77
|
classNamePrefix: "zds-pickers",
|
|
77
|
-
components: {
|
|
78
|
+
components: _objectSpread({
|
|
78
79
|
IndicatorsContainer: CustomIndicatorsContainer,
|
|
79
80
|
ValueContainer: CustomValueContainer },
|
|
81
|
+
components),
|
|
80
82
|
|
|
81
83
|
isDisabled: disabled,
|
|
82
84
|
onChange: handleChange,
|
|
@@ -98,9 +100,9 @@ var Select = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
98
100
|
left: state.hasValue || state.selectProps.inputValue ? -2 : '4%',
|
|
99
101
|
top: state.hasValue || state.selectProps.inputValue ? -12 : '50%',
|
|
100
102
|
transition: 'top 0.1s, font-size 0.1s, color 0.1s',
|
|
101
|
-
fontSize: (state.hasValue || state.selectProps.inputValue) && 13 });}
|
|
102
|
-
|
|
103
|
+
fontSize: (state.hasValue || state.selectProps.inputValue) && 13 });}
|
|
103
104
|
|
|
105
|
+
},
|
|
104
106
|
value: selectedOption }))) : /*#__PURE__*/
|
|
105
107
|
|
|
106
108
|
|
|
@@ -111,8 +113,9 @@ var Select = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
111
113
|
_react["default"].createElement(_reactSelect["default"], (0, _extends2["default"])({},
|
|
112
114
|
rest, {
|
|
113
115
|
classNamePrefix: "zds-pickers",
|
|
114
|
-
components: {
|
|
116
|
+
components: _objectSpread({
|
|
115
117
|
IndicatorsContainer: CustomIndicatorsContainer },
|
|
118
|
+
components),
|
|
116
119
|
|
|
117
120
|
isDisabled: disabled,
|
|
118
121
|
onChange: handleChange,
|
|
@@ -125,6 +128,7 @@ var Select = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
125
128
|
});
|
|
126
129
|
|
|
127
130
|
Select.propTypes = {
|
|
131
|
+
components: _propTypes["default"].object,
|
|
128
132
|
disabled: _propTypes["default"].bool,
|
|
129
133
|
label: _propTypes["default"].string,
|
|
130
134
|
onChange: _propTypes["default"].func.isRequired,
|
|
@@ -134,11 +138,12 @@ Select.propTypes = {
|
|
|
134
138
|
};
|
|
135
139
|
|
|
136
140
|
Select.defaultProps = {
|
|
141
|
+
components: undefined,
|
|
137
142
|
disabled: false,
|
|
138
143
|
label: undefined,
|
|
139
144
|
options: [],
|
|
140
145
|
shrinkLabel: false,
|
|
141
|
-
value: undefined
|
|
142
|
-
|
|
146
|
+
value: undefined
|
|
147
|
+
};var _default =
|
|
143
148
|
|
|
144
149
|
Select;exports["default"] = _default;
|
|
@@ -12,11 +12,11 @@ var StatusPicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {var
|
|
|
12
12
|
|
|
13
13
|
var statusShape = {
|
|
14
14
|
value: _propTypes["default"].number,
|
|
15
|
-
label: _propTypes["default"].string
|
|
16
|
-
|
|
15
|
+
label: _propTypes["default"].string
|
|
16
|
+
};
|
|
17
17
|
|
|
18
18
|
StatusPicker.propTypes = {
|
|
19
|
-
statuses: _propTypes["default"].arrayOf(_propTypes["default"].shape(statusShape)).isRequired
|
|
20
|
-
|
|
19
|
+
statuses: _propTypes["default"].arrayOf(_propTypes["default"].shape(statusShape)).isRequired
|
|
20
|
+
};var _default =
|
|
21
21
|
|
|
22
22
|
StatusPicker;exports["default"] = _default;
|
|
@@ -43,15 +43,15 @@ ValuePicker.propTypes = {
|
|
|
43
43
|
max: _propTypes["default"].number,
|
|
44
44
|
min: _propTypes["default"].number,
|
|
45
45
|
onChange: _propTypes["default"].func.isRequired,
|
|
46
|
-
value: _propTypes["default"].number
|
|
47
|
-
|
|
46
|
+
value: _propTypes["default"].number
|
|
47
|
+
};
|
|
48
48
|
|
|
49
49
|
ValuePicker.defaultProps = {
|
|
50
50
|
disabled: false,
|
|
51
51
|
highToLow: false,
|
|
52
52
|
max: 127,
|
|
53
53
|
min: 0,
|
|
54
|
-
value: undefined
|
|
55
|
-
|
|
54
|
+
value: undefined
|
|
55
|
+
};var _default =
|
|
56
56
|
|
|
57
57
|
ValuePicker;exports["default"] = _default;
|
|
@@ -80,15 +80,15 @@
|
|
|
80
80
|
attrs: [
|
|
81
81
|
{
|
|
82
82
|
name: 'text-anchor',
|
|
83
|
-
value: function /* props, value */ value() {return 'middle';}
|
|
84
|
-
|
|
83
|
+
value: function /* props, value */ value() {return 'middle';}
|
|
84
|
+
},
|
|
85
85
|
{
|
|
86
86
|
name: 'x',
|
|
87
|
-
value: function /* props, value */ value() {return '100';}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
value: function /* props, value */ value() {return '100';}
|
|
88
|
+
}]
|
|
91
89
|
|
|
90
|
+
}]
|
|
92
91
|
|
|
92
|
+
};var _default =
|
|
93
93
|
|
|
94
94
|
knobSkin10;exports["default"] = _default;
|
package/dist/shapes.js
CHANGED
|
@@ -5,7 +5,7 @@ var numberOrString = (0, _propTypes.oneOfType)([_propTypes.number, _propTypes.st
|
|
|
5
5
|
var mappingShape = (0, _propTypes.shape)({
|
|
6
6
|
note: _propTypes.number.isRequired,
|
|
7
7
|
name: _propTypes.string.isRequired,
|
|
8
|
-
group: _propTypes.string.isRequired
|
|
9
|
-
|
|
8
|
+
group: _propTypes.string.isRequired
|
|
9
|
+
});exports.mappingShape = mappingShape;var _default =
|
|
10
10
|
|
|
11
11
|
mappingShape;exports["default"] = _default;
|
|
@@ -46,8 +46,8 @@ var standardizeGroup = function standardizeGroup(name) {
|
|
|
46
46
|
var standardizeItem = function standardizeItem(_ref) {var note = _ref.note,group = _ref.group,name = _ref.name;return {
|
|
47
47
|
note: note,
|
|
48
48
|
name: name,
|
|
49
|
-
group: standardizeGroup(group)
|
|
50
|
-
|
|
49
|
+
group: standardizeGroup(group)
|
|
50
|
+
};};exports.standardizeItem = standardizeItem;
|
|
51
51
|
|
|
52
52
|
var reverse = function reverse(content) {return content.map(function (_ref2) {var note = _ref2.note,group = _ref2.group,name = _ref2.name;return "".concat(note, ":").concat(group, "|").concat(name);}).join('\n');};exports.reverse = reverse;
|
|
53
53
|
|
|
@@ -60,8 +60,8 @@ var mapper = function mapper(raw) {var fillMissing = arguments.length > 1 && arg
|
|
|
60
60
|
{
|
|
61
61
|
note: parseInt(props[1], 10),
|
|
62
62
|
group: String(props[2]).trim(),
|
|
63
|
-
name: String(props[3]).trim()
|
|
64
|
-
|
|
63
|
+
name: String(props[3]).trim()
|
|
64
|
+
} :
|
|
65
65
|
null;
|
|
66
66
|
}).
|
|
67
67
|
filter(function (item) {return item !== null;}).
|
|
@@ -74,8 +74,8 @@ var mapper = function mapper(raw) {var fillMissing = arguments.length > 1 && arg
|
|
|
74
74
|
map(function (n) {return availableNotes.find(function (_ref3) {var note = _ref3.note;return n === note;}) || {
|
|
75
75
|
note: n,
|
|
76
76
|
group: '',
|
|
77
|
-
name: ''
|
|
78
|
-
|
|
77
|
+
name: ''
|
|
78
|
+
};}) :
|
|
79
79
|
availableNotes;
|
|
80
80
|
};var _default =
|
|
81
81
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zds-pickers",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"homepage": "https://github.com/dkadrios/zds-pickers#readme",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,11 +26,12 @@
|
|
|
26
26
|
"lint:fix": "npm run lint -- --fix",
|
|
27
27
|
"lint": "eslint 'src/**'",
|
|
28
28
|
"prepare": "npm run build",
|
|
29
|
-
"sb": "start-storybook -p 6006"
|
|
29
|
+
"sb": "start-storybook --quiet -p 6006 --ci --no-manager-cache"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/cli": "7.19.3",
|
|
33
|
-
"@babel/core": "7.19.
|
|
33
|
+
"@babel/core": "7.19.6",
|
|
34
|
+
"@babel/eslint-parser": "7.19.1",
|
|
34
35
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
35
36
|
"@babel/plugin-proposal-export-default-from": "7.18.10",
|
|
36
37
|
"@babel/plugin-proposal-export-namespace-from": "7.18.9",
|
|
@@ -38,8 +39,8 @@
|
|
|
38
39
|
"@babel/plugin-syntax-async-generators": "7.8.4",
|
|
39
40
|
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
|
40
41
|
"@babel/plugin-syntax-import-meta": "7.10.4",
|
|
41
|
-
"@babel/plugin-transform-runtime": "7.19.
|
|
42
|
-
"@babel/preset-env": "7.19.
|
|
42
|
+
"@babel/plugin-transform-runtime": "7.19.6",
|
|
43
|
+
"@babel/preset-env": "7.19.4",
|
|
43
44
|
"@babel/preset-react": "7.18.6",
|
|
44
45
|
"@storybook/addon-actions": "6.5.12",
|
|
45
46
|
"@storybook/addon-essentials": "6.5.12",
|
|
@@ -49,11 +50,10 @@
|
|
|
49
50
|
"@studysync/eslint-plugin-jsx-conditionals": "2.0.2",
|
|
50
51
|
"@studysync/eslint-plugin-material-ui": "1.1.1",
|
|
51
52
|
"@studysync/eslint-plugin-persnickety": "1.0.5",
|
|
52
|
-
"babel-eslint": "10.1.0",
|
|
53
|
-
"eslint": "7.32.0",
|
|
54
|
-
"eslint-config-airbnb": "18.2.1",
|
|
55
53
|
"babel-loader": "8.2.5",
|
|
56
54
|
"classnames": "2.3.2",
|
|
55
|
+
"eslint": "8.26.0",
|
|
56
|
+
"eslint-config-airbnb": "19.0.4",
|
|
57
57
|
"eslint-config-prettier": "8.5.0",
|
|
58
58
|
"eslint-import-resolver-alias": "1.1.2",
|
|
59
59
|
"eslint-import-resolver-parcel": "1.10.6",
|
|
@@ -63,24 +63,24 @@
|
|
|
63
63
|
"eslint-plugin-jsx-a11y": "6.6.1",
|
|
64
64
|
"eslint-plugin-ocd": "1.1.0",
|
|
65
65
|
"eslint-plugin-prettier": "4.2.1",
|
|
66
|
-
"eslint-plugin-react": "7.31.
|
|
66
|
+
"eslint-plugin-react": "7.31.10",
|
|
67
67
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
68
68
|
"prop-types": "15.8.1",
|
|
69
69
|
"react": "18.2.0",
|
|
70
70
|
"react-dom": "18.2.0",
|
|
71
71
|
"react-rotary-knob": "1.1.8",
|
|
72
|
-
"react-select": "5.4
|
|
72
|
+
"react-select": "5.5.4",
|
|
73
73
|
"reduce-css-calc": "2.1.8",
|
|
74
74
|
"zds-mappings": "1.4.9"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"classnames": "^2",
|
|
79
|
-
"prop-types": "^15",
|
|
80
|
-
"react": ">=
|
|
78
|
+
"classnames": "^2.3.2",
|
|
79
|
+
"prop-types": "^15.8.1",
|
|
80
|
+
"react": ">=18.2.0",
|
|
81
81
|
"react-rotary-knob": "^1.1.8",
|
|
82
|
-
"react-select": ">=
|
|
83
|
-
"reduce-css-calc": "
|
|
82
|
+
"react-select": ">=5.5.4",
|
|
83
|
+
"reduce-css-calc": ">=2.1.8",
|
|
84
84
|
"zds-mappings": "^1.4.9"
|
|
85
85
|
}
|
|
86
86
|
}
|