intelicoreact 1.0.33 → 1.0.34
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.
|
@@ -41,14 +41,16 @@ var InputColor = function InputColor(_ref) {
|
|
|
41
41
|
_ref$withDelete = _ref.withDelete,
|
|
42
42
|
withDelete = _ref$withDelete === void 0 ? true : _ref$withDelete,
|
|
43
43
|
args = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
44
|
-
|
|
44
|
+
var withSharp = withHexFormat.withSharp,
|
|
45
|
+
isHex = withHexFormat.isTurnOn; // HANDLES
|
|
46
|
+
|
|
45
47
|
var handle = {
|
|
46
48
|
change: function change(e) {
|
|
47
49
|
var inputValue = e !== null && e !== void 0 && e.target ? e.target.value : e;
|
|
48
50
|
inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
|
|
49
|
-
if (
|
|
51
|
+
if (isHex) inputValue = (0, _fieldValueFormatters.formatToHex)({
|
|
50
52
|
inputValue: inputValue,
|
|
51
|
-
withSharp:
|
|
53
|
+
withSharp: withSharp
|
|
52
54
|
});
|
|
53
55
|
if (symbolsLimit && inputValue.length > +symbolsLimit) inputValue = inputValue.substring(0, +symbolsLimit);
|
|
54
56
|
onChange === null || onChange === void 0 ? void 0 : onChange(inputValue);
|
|
@@ -301,6 +301,8 @@ var NavLine = function NavLine(_ref) {
|
|
|
301
301
|
active: activeTab === item.tabId
|
|
302
302
|
}, {
|
|
303
303
|
disabled: item.disabled || mode === 'create' && item.tabId !== 'general'
|
|
304
|
+
}, {
|
|
305
|
+
'nav-line__item--hidden': item.isHidden
|
|
304
306
|
}),
|
|
305
307
|
ref: checkedRef(ref)
|
|
306
308
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -324,6 +326,8 @@ var NavLine = function NavLine(_ref) {
|
|
|
324
326
|
active: activeTab === item.tabId
|
|
325
327
|
}, {
|
|
326
328
|
disabled: item.disabled || mode === 'create' && item.tabId !== 'general'
|
|
329
|
+
}, {
|
|
330
|
+
'nav-line__item--hidden': item.isHidden
|
|
327
331
|
}),
|
|
328
332
|
ref: checkedRef(ref)
|
|
329
333
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -236,7 +236,8 @@ var formatToHex = function formatToHex(_ref2) {
|
|
|
236
236
|
var inputValue = _ref2.inputValue,
|
|
237
237
|
withSharp = _ref2.withSharp;
|
|
238
238
|
var value = getSafelyValue(inputValue);
|
|
239
|
-
|
|
239
|
+
if (withSharp) return "#".concat(value.replace(/[^a-f0-9]/gi, ''));
|
|
240
|
+
return "".concat(value.replace(/[^#a-f0-9]/gi, ''));
|
|
240
241
|
};
|
|
241
242
|
/**
|
|
242
243
|
* It takes a string and returns a string with all white space removed
|