@dreamcommerce/aurora 3.0.0-288 → 3.0.0-289
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/build/cjs/packages/aurora/src/components/color_picker/color_picker.js +3 -3
- package/build/cjs/packages/aurora/src/components/color_picker/color_picker_utils.js +10 -0
- package/build/cjs/packages/aurora/src/components/color_picker/color_picker_utils.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs.js +1 -11
- package/build/cjs/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs_hex.js +3 -4
- package/build/cjs/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs_hex.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs_rgba.js +7 -7
- package/build/cjs/packages/aurora/src/components/color_picker/hooks/setup_color_picker.js +1 -2
- package/build/cjs/packages/aurora/src/components/color_picker/hooks/setup_color_picker.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/input/input.js +2 -2
- package/build/cjs/packages/aurora/src/components/xhr_image_picker/xhr_image_picker.js +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/color_picker.js +3 -3
- package/build/esm/packages/aurora/src/components/color_picker/color_picker_types.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/color_picker_utils.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/color_picker/color_picker_utils.js +10 -0
- package/build/esm/packages/aurora/src/components/color_picker/color_picker_utils.js.map +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs.js +1 -11
- package/build/esm/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs.js.map +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs_hex.js +3 -4
- package/build/esm/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs_hex.js.map +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/components/color_picker_inputs/color_picker_inputs_rgba.js +7 -7
- package/build/esm/packages/aurora/src/components/color_picker/hooks/setup_color_picker.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/hooks/setup_color_picker.js +1 -2
- package/build/esm/packages/aurora/src/components/color_picker/hooks/setup_color_picker.js.map +1 -1
- package/build/esm/packages/aurora/src/components/input/input.js +2 -2
- package/build/esm/packages/aurora/src/components/xhr_image_picker/xhr_image_picker.js +1 -1
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
38
38
|
hex = _useSetupColorPicker.hex,
|
|
39
39
|
hslArr = _useSetupColorPicker.hslArr,
|
|
40
40
|
handleOnChangeAlpha = _useSetupColorPicker.handleOnChangeAlpha,
|
|
41
|
-
|
|
41
|
+
alpha = _useSetupColorPicker.alpha,
|
|
42
42
|
rgbaArr = _useSetupColorPicker.rgbaArr,
|
|
43
43
|
setR = _useSetupColorPicker.setR,
|
|
44
44
|
setG = _useSetupColorPicker.setG,
|
|
@@ -64,7 +64,7 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
64
64
|
hex: hex,
|
|
65
65
|
hslArr: hslArr,
|
|
66
66
|
handleOnChangeAlpha: handleOnChangeAlpha,
|
|
67
|
-
|
|
67
|
+
alpha: alpha,
|
|
68
68
|
rgbaArr: rgbaArr,
|
|
69
69
|
setR: setR,
|
|
70
70
|
setG: setG,
|
|
@@ -85,7 +85,7 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
85
85
|
degrees: degrees,
|
|
86
86
|
shadeName: shadeName
|
|
87
87
|
};
|
|
88
|
-
}, [color, setColor, hex, hslArr, handleOnChangeAlpha,
|
|
88
|
+
}, [color, setColor, hex, hslArr, handleOnChangeAlpha, alpha, rgbaArr, setR, setG, setB, handleCancel, handleSave, previousSolidColor, colorVariables, isCurrentValueGradient, setLinear, setRadial, gradientType, previousGradientColor, setSolid, withGradient, isColorPickerOpened, setIsColorPickerOpened, degrees, shadeName]);
|
|
89
89
|
return /*#__PURE__*/React__default['default'].createElement(color_picker_context.ColorPickerContext.Provider, {
|
|
90
90
|
value: contextVal
|
|
91
91
|
}, /*#__PURE__*/React__default['default'].createElement(pure_color_picker['default'], _rollupPluginBabelHelpers.objectSpread2({
|
|
@@ -16,6 +16,16 @@ var ColorPickerUtils = /*#__PURE__*/function () {
|
|
|
16
16
|
value: function isGradient(color) {
|
|
17
17
|
return /(linear|radial|conic)-gradient\s*\(/.test(color);
|
|
18
18
|
}
|
|
19
|
+
}, {
|
|
20
|
+
key: "preventTypingLetters",
|
|
21
|
+
value: function preventTypingLetters(event) {
|
|
22
|
+
var allowedKeys = ['Backspace', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab', 'Home', 'End'];
|
|
23
|
+
if (allowedKeys.includes(event.key) || event.ctrlKey || event.metaKey || /^[0-9]$/.test(event.key)) {
|
|
24
|
+
return;
|
|
25
|
+
} else {
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
19
29
|
}]);
|
|
20
30
|
}();
|
|
21
31
|
_ColorPickerUtils = ColorPickerUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF,yBAAyB,uFAA2F;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF,yBAAyB,uFAA2F;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -22,16 +22,6 @@ var ColorPickerInputs = function ColorPickerInputs() {
|
|
|
22
22
|
var handleSelectType = function handleSelectType(e) {
|
|
23
23
|
setType(e.target.value);
|
|
24
24
|
};
|
|
25
|
-
var inputs = function inputs() {
|
|
26
|
-
switch (type) {
|
|
27
|
-
case color_picker_constants.COLOR_PICKER_TYPES.HEX:
|
|
28
|
-
return /*#__PURE__*/React__default['default'].createElement(color_picker_inputs_hex.ColorPickerInputsHex, null);
|
|
29
|
-
case color_picker_constants.COLOR_PICKER_TYPES.RGB:
|
|
30
|
-
return /*#__PURE__*/React__default['default'].createElement(color_picker_inputs_rgba.ColorPickerInputsRgba, null);
|
|
31
|
-
default:
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
25
|
return /*#__PURE__*/React__default['default'].createElement(stack.Stack, {
|
|
36
26
|
spacing: "1",
|
|
37
27
|
align: "center",
|
|
@@ -50,7 +40,7 @@ var ColorPickerInputs = function ColorPickerInputs() {
|
|
|
50
40
|
className: "aurora-flex-1"
|
|
51
41
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
52
42
|
className: "color-picker__inputs-value-container aurora-flex aurora-border aurora-rounded-4 aurora-overflow-hidden aurora-h-6"
|
|
53
|
-
},
|
|
43
|
+
}, type === color_picker_constants.COLOR_PICKER_TYPES.HEX && /*#__PURE__*/React__default['default'].createElement(color_picker_inputs_hex.ColorPickerInputsHex, null), type === color_picker_constants.COLOR_PICKER_TYPES.RGB && /*#__PURE__*/React__default['default'].createElement(color_picker_inputs_rgba.ColorPickerInputsRgba, null))), /*#__PURE__*/React__default['default'].createElement(current_color_preview.CurrentColorPreview, null));
|
|
54
44
|
};
|
|
55
45
|
|
|
56
46
|
exports.ColorPickerInputs = ColorPickerInputs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -9,7 +9,6 @@ var use_color_picker = require('../../hooks/use_color_picker.js');
|
|
|
9
9
|
var tinycolor = require('../../../../../../../external/tinycolor2/esm/tinycolor.js');
|
|
10
10
|
var context = require('../../../../../../../external/react-best-gradient-color-picker/dist/esm/context.js');
|
|
11
11
|
var color_picker_utils = require('../../color_picker_utils.js');
|
|
12
|
-
var utilities = require('@dreamcommerce/utilities');
|
|
13
12
|
|
|
14
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
14
|
|
|
@@ -20,7 +19,7 @@ var ColorPickerInputsHex = function ColorPickerInputsHex() {
|
|
|
20
19
|
setColor = _useColorPicker.setColor,
|
|
21
20
|
hex = _useColorPicker.hex,
|
|
22
21
|
handleOnChangeAlpha = _useColorPicker.handleOnChangeAlpha,
|
|
23
|
-
|
|
22
|
+
alpha = _useColorPicker.alpha,
|
|
24
23
|
isCurrentValueGradient = _useColorPicker.isCurrentValueGradient,
|
|
25
24
|
gradientType = _useColorPicker.gradientType;
|
|
26
25
|
var _useState = React.useState(hex),
|
|
@@ -74,11 +73,11 @@ var ColorPickerInputsHex = function ColorPickerInputsHex() {
|
|
|
74
73
|
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
75
74
|
className: "aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-rounded-6 aurora-h-full aurora-text-xs",
|
|
76
75
|
type: "text",
|
|
77
|
-
value:
|
|
76
|
+
value: Math.round(alpha),
|
|
78
77
|
onChange: function onChange(e) {
|
|
79
78
|
return handleOnChangeAlpha(Number(e.target.value));
|
|
80
79
|
},
|
|
81
|
-
onKeyDown:
|
|
80
|
+
onKeyDown: color_picker_utils.ColorPickerUtils.preventTypingLetters
|
|
82
81
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
83
82
|
className: "aurora-text-xs aurora-pl-0.5"
|
|
84
83
|
}, "%")));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2DAA+D;AACvF,sBAAsB,oFAAwF;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2DAA+D;AACvF,sBAAsB,oFAAwF;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var input = require('../../../input/input.js');
|
|
7
7
|
var use_color_picker = require('../../hooks/use_color_picker.js');
|
|
8
|
-
var
|
|
8
|
+
var color_picker_utils = require('../../color_picker_utils.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
17
17
|
setG = _useColorPicker.setG,
|
|
18
18
|
setB = _useColorPicker.setB,
|
|
19
19
|
handleOnChangeAlpha = _useColorPicker.handleOnChangeAlpha,
|
|
20
|
-
|
|
20
|
+
alpha = _useColorPicker.alpha,
|
|
21
21
|
rgbaArr = _useColorPicker.rgbaArr;
|
|
22
22
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(input.Input, {
|
|
23
23
|
className: "aurora-h-full aurora-px-1.5 aurora-text-xs",
|
|
@@ -26,7 +26,7 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
26
26
|
onChange: function onChange(e) {
|
|
27
27
|
return setR(Number(e.target.value));
|
|
28
28
|
},
|
|
29
|
-
onKeyDown:
|
|
29
|
+
onKeyDown: color_picker_utils.ColorPickerUtils.preventTypingLetters
|
|
30
30
|
}), /*#__PURE__*/React__default['default'].createElement(input.Input, {
|
|
31
31
|
className: "aurora-h-full aurora-px-1.5 aurora-text-xs",
|
|
32
32
|
type: "text",
|
|
@@ -34,7 +34,7 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
34
34
|
onChange: function onChange(e) {
|
|
35
35
|
return setG(Number(e.target.value));
|
|
36
36
|
},
|
|
37
|
-
onKeyDown:
|
|
37
|
+
onKeyDown: color_picker_utils.ColorPickerUtils.preventTypingLetters
|
|
38
38
|
}), /*#__PURE__*/React__default['default'].createElement(input.Input, {
|
|
39
39
|
className: "aurora-h-full aurora-px-1.5 aurora-text-xs",
|
|
40
40
|
type: "text",
|
|
@@ -42,17 +42,17 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
42
42
|
onChange: function onChange(e) {
|
|
43
43
|
return setB(Number(e.target.value));
|
|
44
44
|
},
|
|
45
|
-
onKeyDown:
|
|
45
|
+
onKeyDown: color_picker_utils.ColorPickerUtils.preventTypingLetters
|
|
46
46
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
47
47
|
className: "aurora-flex aurora-rounded-6 focus aurora-text aurora-w-[46px] aurora-flex-none aurora-px-1 aurora-items-center"
|
|
48
48
|
}, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
49
49
|
className: "aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-rounded-6 aurora-h-full aurora-text-xs",
|
|
50
50
|
type: "text",
|
|
51
|
-
value:
|
|
51
|
+
value: Math.round(alpha),
|
|
52
52
|
onChange: function onChange(e) {
|
|
53
53
|
return handleOnChangeAlpha(Number(e.target.value));
|
|
54
54
|
},
|
|
55
|
-
onKeyDown:
|
|
55
|
+
onKeyDown: color_picker_utils.ColorPickerUtils.preventTypingLetters
|
|
56
56
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
57
57
|
className: "aurora-text-xs aurora-pl-0.5"
|
|
58
58
|
}, "%")));
|
|
@@ -79,7 +79,6 @@ var useSetupColorPicker = function useSetupColorPicker(_ref) {
|
|
|
79
79
|
var tinyColor = color_picker_utils.ColorPickerUtils.getTinyColorInstance(colorValue);
|
|
80
80
|
var hex = color_picker_utils.ColorPickerUtils.getHexValue(tinyColor);
|
|
81
81
|
var alpha = rgbaArr[3] * 100;
|
|
82
|
-
var alphaValue = "".concat(alpha);
|
|
83
82
|
var setSolid = function setSolid(value) {
|
|
84
83
|
setColor(value || color_picker_constants.COLOR_PICKER_INITIAL_STATE);
|
|
85
84
|
};
|
|
@@ -117,7 +116,7 @@ var useSetupColorPicker = function useSetupColorPicker(_ref) {
|
|
|
117
116
|
hex: hex,
|
|
118
117
|
hslArr: hslArr,
|
|
119
118
|
handleOnChangeAlpha: handleOnChangeAlpha,
|
|
120
|
-
|
|
119
|
+
alpha: alpha,
|
|
121
120
|
rgbaArr: rgbaArr,
|
|
122
121
|
setR: setR,
|
|
123
122
|
setG: setG,
|
package/build/cjs/packages/aurora/src/components/color_picker/hooks/setup_color_picker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qFAAyF;AAC7G,6BAA6B,8FAAkG;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qFAAyF;AAC7G,6BAA6B,8FAAkG;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -35,7 +35,7 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
|
|
|
35
35
|
'aurora-border-danger aurora-border-2': !!(errors !== null && errors !== void 0 && errors.length),
|
|
36
36
|
'aurora-bg-subtle aurora-text-subtle-light aurora-pointer-events-none aurora-cursor-not-allowed': disabled,
|
|
37
37
|
'aurora-appearance-none': type === 'number'
|
|
38
|
-
})
|
|
38
|
+
}, className)
|
|
39
39
|
}, preElement && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
40
40
|
className: 'aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2'
|
|
41
41
|
}, preElement)), /*#__PURE__*/React__default['default'].createElement("input", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, props), {}, {
|
|
@@ -51,7 +51,7 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
|
|
|
51
51
|
onKeyDown: onKeyDown,
|
|
52
52
|
onKeyUp: onKeyUp,
|
|
53
53
|
type: type,
|
|
54
|
-
className: cn.cn('aurora-h-[40px] aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6'
|
|
54
|
+
className: cn.cn('aurora-h-[40px] aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6')
|
|
55
55
|
})), postElement && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
56
56
|
className: "aurora-flex aurora-h-full aurora-right-0 aurora-pr-2 aurora-items-center"
|
|
57
57
|
}, postElement));
|
|
@@ -8,8 +8,8 @@ var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBa
|
|
|
8
8
|
var loader = require('../loader/loader.js');
|
|
9
9
|
var use_modals_context = require('../modal/hooks/use_modals_context.js');
|
|
10
10
|
var modal = require('../modal/components/modal/modal.js');
|
|
11
|
-
var utilities = require('@dreamcommerce/utilities');
|
|
12
11
|
var image_picker_constants = require('../image_picker/image_picker_constants.js');
|
|
12
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
13
13
|
var image_picker = require('../image_picker/image_picker.js');
|
|
14
14
|
var http_requester_contants = require('../../../../star_core/build/esm/packages/star_core/src/features/http_requester/http_requester_contants.js');
|
|
15
15
|
var use_http_api = require('../../hooks/use_http_api.js');
|
|
@@ -30,7 +30,7 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
30
30
|
hex = _useSetupColorPicker.hex,
|
|
31
31
|
hslArr = _useSetupColorPicker.hslArr,
|
|
32
32
|
handleOnChangeAlpha = _useSetupColorPicker.handleOnChangeAlpha,
|
|
33
|
-
|
|
33
|
+
alpha = _useSetupColorPicker.alpha,
|
|
34
34
|
rgbaArr = _useSetupColorPicker.rgbaArr,
|
|
35
35
|
setR = _useSetupColorPicker.setR,
|
|
36
36
|
setG = _useSetupColorPicker.setG,
|
|
@@ -56,7 +56,7 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
56
56
|
hex: hex,
|
|
57
57
|
hslArr: hslArr,
|
|
58
58
|
handleOnChangeAlpha: handleOnChangeAlpha,
|
|
59
|
-
|
|
59
|
+
alpha: alpha,
|
|
60
60
|
rgbaArr: rgbaArr,
|
|
61
61
|
setR: setR,
|
|
62
62
|
setG: setG,
|
|
@@ -77,7 +77,7 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
77
77
|
degrees: degrees,
|
|
78
78
|
shadeName: shadeName
|
|
79
79
|
};
|
|
80
|
-
}, [color, setColor, hex, hslArr, handleOnChangeAlpha,
|
|
80
|
+
}, [color, setColor, hex, hslArr, handleOnChangeAlpha, alpha, rgbaArr, setR, setG, setB, handleCancel, handleSave, previousSolidColor, colorVariables, isCurrentValueGradient, setLinear, setRadial, gradientType, previousGradientColor, setSolid, withGradient, isColorPickerOpened, setIsColorPickerOpened, degrees, shadeName]);
|
|
81
81
|
return /*#__PURE__*/React.createElement(ColorPickerContext.Provider, {
|
|
82
82
|
value: contextVal
|
|
83
83
|
}, /*#__PURE__*/React.createElement(ColorPickerPure, _objectSpread2({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ColorPickerColors, ColorPickerVariable, IColorPickerColor, IColorPickerColorVariablesType } from './color_picker_types';
|
|
2
3
|
import { GradientProps } from 'react-best-gradient-color-picker';
|
|
3
4
|
import tinycolor from 'tinycolor2';
|
|
@@ -16,4 +17,5 @@ export declare class ColorPickerUtils {
|
|
|
16
17
|
static updateGradientWithActiveColor: (colors: GradientProps[], index: number, newColor: string) => GradientProps[];
|
|
17
18
|
static findVariable: (variables: IColorPickerColorVariablesType | ColorPickerVariable[], color: string) => string | undefined;
|
|
18
19
|
static normalizeLinearGradient: (color: string) => string;
|
|
20
|
+
static preventTypingLetters(event: React.KeyboardEvent<HTMLInputElement>): void;
|
|
19
21
|
}
|
|
@@ -12,6 +12,16 @@ var ColorPickerUtils = /*#__PURE__*/function () {
|
|
|
12
12
|
value: function isGradient(color) {
|
|
13
13
|
return /(linear|radial|conic)-gradient\s*\(/.test(color);
|
|
14
14
|
}
|
|
15
|
+
}, {
|
|
16
|
+
key: "preventTypingLetters",
|
|
17
|
+
value: function preventTypingLetters(event) {
|
|
18
|
+
var allowedKeys = ['Backspace', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab', 'Home', 'End'];
|
|
19
|
+
if (allowedKeys.includes(event.key) || event.ctrlKey || event.metaKey || /^[0-9]$/.test(event.key)) {
|
|
20
|
+
return;
|
|
21
|
+
} else {
|
|
22
|
+
event.preventDefault();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
}]);
|
|
16
26
|
}();
|
|
17
27
|
_ColorPickerUtils = ColorPickerUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,sBAAsB,qDAAyD;AAC/E,0BAA0B,uFAA2F;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,sBAAsB,qDAAyD;AAC/E,0BAA0B,uFAA2F;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -14,16 +14,6 @@ var ColorPickerInputs = function ColorPickerInputs() {
|
|
|
14
14
|
var handleSelectType = function handleSelectType(e) {
|
|
15
15
|
setType(e.target.value);
|
|
16
16
|
};
|
|
17
|
-
var inputs = function inputs() {
|
|
18
|
-
switch (type) {
|
|
19
|
-
case COLOR_PICKER_TYPES.HEX:
|
|
20
|
-
return /*#__PURE__*/React.createElement(ColorPickerInputsHex, null);
|
|
21
|
-
case COLOR_PICKER_TYPES.RGB:
|
|
22
|
-
return /*#__PURE__*/React.createElement(ColorPickerInputsRgba, null);
|
|
23
|
-
default:
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
17
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
28
18
|
spacing: "1",
|
|
29
19
|
align: "center",
|
|
@@ -42,7 +32,7 @@ var ColorPickerInputs = function ColorPickerInputs() {
|
|
|
42
32
|
className: "aurora-flex-1"
|
|
43
33
|
}, /*#__PURE__*/React.createElement("div", {
|
|
44
34
|
className: "color-picker__inputs-value-container aurora-flex aurora-border aurora-rounded-4 aurora-overflow-hidden aurora-h-6"
|
|
45
|
-
},
|
|
35
|
+
}, type === COLOR_PICKER_TYPES.HEX && /*#__PURE__*/React.createElement(ColorPickerInputsHex, null), type === COLOR_PICKER_TYPES.RGB && /*#__PURE__*/React.createElement(ColorPickerInputsRgba, null))), /*#__PURE__*/React.createElement(CurrentColorPreview, null));
|
|
46
36
|
};
|
|
47
37
|
|
|
48
38
|
export { ColorPickerInputs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,14 +5,13 @@ import { useColorPicker } from '../../hooks/use_color_picker.js';
|
|
|
5
5
|
import tinycolor from '../../../../../../../external/tinycolor2/esm/tinycolor.js';
|
|
6
6
|
import { usePicker } from '../../../../../../../external/react-best-gradient-color-picker/dist/esm/context.js';
|
|
7
7
|
import { ColorPickerUtils } from '../../color_picker_utils.js';
|
|
8
|
-
import { InputUtils } from '@dreamcommerce/utilities';
|
|
9
8
|
|
|
10
9
|
var ColorPickerInputsHex = function ColorPickerInputsHex() {
|
|
11
10
|
var _useColorPicker = useColorPicker(),
|
|
12
11
|
setColor = _useColorPicker.setColor,
|
|
13
12
|
hex = _useColorPicker.hex,
|
|
14
13
|
handleOnChangeAlpha = _useColorPicker.handleOnChangeAlpha,
|
|
15
|
-
|
|
14
|
+
alpha = _useColorPicker.alpha,
|
|
16
15
|
isCurrentValueGradient = _useColorPicker.isCurrentValueGradient,
|
|
17
16
|
gradientType = _useColorPicker.gradientType;
|
|
18
17
|
var _useState = useState(hex),
|
|
@@ -66,11 +65,11 @@ var ColorPickerInputsHex = function ColorPickerInputsHex() {
|
|
|
66
65
|
}, /*#__PURE__*/React.createElement("input", {
|
|
67
66
|
className: "aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-rounded-6 aurora-h-full aurora-text-xs",
|
|
68
67
|
type: "text",
|
|
69
|
-
value:
|
|
68
|
+
value: Math.round(alpha),
|
|
70
69
|
onChange: function onChange(e) {
|
|
71
70
|
return handleOnChangeAlpha(Number(e.target.value));
|
|
72
71
|
},
|
|
73
|
-
onKeyDown:
|
|
72
|
+
onKeyDown: ColorPickerUtils.preventTypingLetters
|
|
74
73
|
}), /*#__PURE__*/React.createElement("div", {
|
|
75
74
|
className: "aurora-text-xs aurora-pl-0.5"
|
|
76
75
|
}, "%")));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,sBAAsB,2DAA+D;AACrF,0BAA0B,oFAAwF;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,sBAAsB,2DAA+D;AACrF,0BAA0B,oFAAwF;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Input } from '../../../input/input.js';
|
|
3
3
|
import { useColorPicker } from '../../hooks/use_color_picker.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ColorPickerUtils } from '../../color_picker_utils.js';
|
|
5
5
|
|
|
6
6
|
var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
7
7
|
var _useColorPicker = useColorPicker(),
|
|
@@ -9,7 +9,7 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
9
9
|
setG = _useColorPicker.setG,
|
|
10
10
|
setB = _useColorPicker.setB,
|
|
11
11
|
handleOnChangeAlpha = _useColorPicker.handleOnChangeAlpha,
|
|
12
|
-
|
|
12
|
+
alpha = _useColorPicker.alpha,
|
|
13
13
|
rgbaArr = _useColorPicker.rgbaArr;
|
|
14
14
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, {
|
|
15
15
|
className: "aurora-h-full aurora-px-1.5 aurora-text-xs",
|
|
@@ -18,7 +18,7 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
18
18
|
onChange: function onChange(e) {
|
|
19
19
|
return setR(Number(e.target.value));
|
|
20
20
|
},
|
|
21
|
-
onKeyDown:
|
|
21
|
+
onKeyDown: ColorPickerUtils.preventTypingLetters
|
|
22
22
|
}), /*#__PURE__*/React.createElement(Input, {
|
|
23
23
|
className: "aurora-h-full aurora-px-1.5 aurora-text-xs",
|
|
24
24
|
type: "text",
|
|
@@ -26,7 +26,7 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
26
26
|
onChange: function onChange(e) {
|
|
27
27
|
return setG(Number(e.target.value));
|
|
28
28
|
},
|
|
29
|
-
onKeyDown:
|
|
29
|
+
onKeyDown: ColorPickerUtils.preventTypingLetters
|
|
30
30
|
}), /*#__PURE__*/React.createElement(Input, {
|
|
31
31
|
className: "aurora-h-full aurora-px-1.5 aurora-text-xs",
|
|
32
32
|
type: "text",
|
|
@@ -34,17 +34,17 @@ var ColorPickerInputsRgba = function ColorPickerInputsRgba() {
|
|
|
34
34
|
onChange: function onChange(e) {
|
|
35
35
|
return setB(Number(e.target.value));
|
|
36
36
|
},
|
|
37
|
-
onKeyDown:
|
|
37
|
+
onKeyDown: ColorPickerUtils.preventTypingLetters
|
|
38
38
|
}), /*#__PURE__*/React.createElement("div", {
|
|
39
39
|
className: "aurora-flex aurora-rounded-6 focus aurora-text aurora-w-[46px] aurora-flex-none aurora-px-1 aurora-items-center"
|
|
40
40
|
}, /*#__PURE__*/React.createElement("input", {
|
|
41
41
|
className: "aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-rounded-6 aurora-h-full aurora-text-xs",
|
|
42
42
|
type: "text",
|
|
43
|
-
value:
|
|
43
|
+
value: Math.round(alpha),
|
|
44
44
|
onChange: function onChange(e) {
|
|
45
45
|
return handleOnChangeAlpha(Number(e.target.value));
|
|
46
46
|
},
|
|
47
|
-
onKeyDown:
|
|
47
|
+
onKeyDown: ColorPickerUtils.preventTypingLetters
|
|
48
48
|
}), /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
className: "aurora-text-xs aurora-pl-0.5"
|
|
50
50
|
}, "%")));
|
|
@@ -16,7 +16,7 @@ declare const useSetupColorPicker: ({ value, onChange, onCancel, onSave, colorVa
|
|
|
16
16
|
hex: string;
|
|
17
17
|
hslArr: number[];
|
|
18
18
|
handleOnChangeAlpha: (value: number) => void;
|
|
19
|
-
|
|
19
|
+
alpha: number;
|
|
20
20
|
rgbaArr: number[];
|
|
21
21
|
setR: (newR: number) => void;
|
|
22
22
|
setG: (newG: number) => void;
|
|
@@ -75,7 +75,6 @@ var useSetupColorPicker = function useSetupColorPicker(_ref) {
|
|
|
75
75
|
var tinyColor = ColorPickerUtils.getTinyColorInstance(colorValue);
|
|
76
76
|
var hex = ColorPickerUtils.getHexValue(tinyColor);
|
|
77
77
|
var alpha = rgbaArr[3] * 100;
|
|
78
|
-
var alphaValue = "".concat(alpha);
|
|
79
78
|
var setSolid = function setSolid(value) {
|
|
80
79
|
setColor(value || COLOR_PICKER_INITIAL_STATE);
|
|
81
80
|
};
|
|
@@ -113,7 +112,7 @@ var useSetupColorPicker = function useSetupColorPicker(_ref) {
|
|
|
113
112
|
hex: hex,
|
|
114
113
|
hslArr: hslArr,
|
|
115
114
|
handleOnChangeAlpha: handleOnChangeAlpha,
|
|
116
|
-
|
|
115
|
+
alpha: alpha,
|
|
117
116
|
rgbaArr: rgbaArr,
|
|
118
117
|
setR: setR,
|
|
119
118
|
setG: setG,
|
package/build/esm/packages/aurora/src/components/color_picker/hooks/setup_color_picker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA,2BAA2B,qFAAyF;AACpH,+BAA+B,8FAAkG;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA,2BAA2B,qFAAyF;AACpH,+BAA+B,8FAAkG;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -27,7 +27,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
27
27
|
'aurora-border-danger aurora-border-2': !!(errors !== null && errors !== void 0 && errors.length),
|
|
28
28
|
'aurora-bg-subtle aurora-text-subtle-light aurora-pointer-events-none aurora-cursor-not-allowed': disabled,
|
|
29
29
|
'aurora-appearance-none': type === 'number'
|
|
30
|
-
})
|
|
30
|
+
}, className)
|
|
31
31
|
}, preElement && (/*#__PURE__*/React.createElement("div", {
|
|
32
32
|
className: 'aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2'
|
|
33
33
|
}, preElement)), /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -43,7 +43,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
43
43
|
onKeyDown: onKeyDown,
|
|
44
44
|
onKeyUp: onKeyUp,
|
|
45
45
|
type: type,
|
|
46
|
-
className: cn('aurora-h-[40px] aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6'
|
|
46
|
+
className: cn('aurora-h-[40px] aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6')
|
|
47
47
|
})), postElement && /*#__PURE__*/React.createElement("div", {
|
|
48
48
|
className: "aurora-flex aurora-h-full aurora-right-0 aurora-pr-2 aurora-items-center"
|
|
49
49
|
}, postElement));
|
|
@@ -4,8 +4,8 @@ import { slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, async
|
|
|
4
4
|
import { Loader } from '../loader/loader.js';
|
|
5
5
|
import { useModalsContext } from '../modal/hooks/use_modals_context.js';
|
|
6
6
|
import { Modal } from '../modal/components/modal/modal.js';
|
|
7
|
-
import { FileUtils } from '@dreamcommerce/utilities';
|
|
8
7
|
import { IMAGE_PICKER_EXTENSIONS } from '../image_picker/image_picker_constants.js';
|
|
8
|
+
import { FileUtils } from '@dreamcommerce/utilities';
|
|
9
9
|
import { ImagePicker } from '../image_picker/image_picker.js';
|
|
10
10
|
import { REQUEST_TYPES } from '../../../../star_core/build/esm/packages/star_core/src/features/http_requester/http_requester_contants.js';
|
|
11
11
|
import { useHttpApi } from '../../hooks/use_http_api.js';
|