@luminati-io/uikit 3.4.2 → 3.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -36781,7 +36781,7 @@ __webpack_require__.r(__webpack_exports__);
36781
36781
 
36782
36782
 
36783
36783
  /*jslint react:true*/
36784
- var _excluded = ["checked", "onChange", "onClick", "label", "disabled", "tooltip", "indeterminate", "verticalAlign"];
36784
+ var _excluded = ["id", "checked", "onChange", "onClick", "label", "disabled", "tooltip", "indeterminate", "verticalAlign"];
36785
36785
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
36786
36786
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
36787
36787
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -36793,7 +36793,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
36793
36793
 
36794
36794
 
36795
36795
  var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
36796
- var checked = props.checked,
36796
+ var id = props.id,
36797
+ checked = props.checked,
36797
36798
  onChange = props.onChange,
36798
36799
  onClick = props.onClick,
36799
36800
  label = props.label,
@@ -36802,7 +36803,7 @@ var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
36802
36803
  indeterminate = props.indeterminate,
36803
36804
  verticalAlign = props.verticalAlign,
36804
36805
  rest = _objectWithoutProperties(props, _excluded);
36805
- var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(props.id);
36806
+ var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(id);
36806
36807
  var handleClick = function handleClick(evt) {
36807
36808
  if (disabled) return;
36808
36809
  onClick === null || onClick === void 0 ? void 0 : onClick(evt);
@@ -36818,6 +36819,7 @@ var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
36818
36819
  $verticalAlign: verticalAlign,
36819
36820
  $disabled: disabled
36820
36821
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CheckboxControl, {
36822
+ id: id,
36821
36823
  role: "checkbox",
36822
36824
  "aria-checked": checked ? true : indeterminate ? 'mixed' : false,
36823
36825
  "aria-disabled": disabled,
@@ -39090,6 +39092,7 @@ __webpack_require__.r(__webpack_exports__);
39090
39092
 
39091
39093
  /*jslint react:true*/
39092
39094
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
39095
+ var _excluded = ["id", "value", "leftInnerContent", "leftOuterContent", "rightInnerContent", "rightOuterContent", "heightCalculationCallback", "Field", "onChange", "onFocus", "onBlur", "placeholder", "disabled", "invalid", "autofocus", "helperText", "label", "labelIcon", "required", "necessityIndicator", "autoresize", "verticalAlign", "innerWrapper"];
39093
39096
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39094
39097
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
39095
39098
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -39100,6 +39103,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
39100
39103
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
39101
39104
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
39102
39105
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39106
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
39107
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
39103
39108
 
39104
39109
 
39105
39110
 
@@ -39114,7 +39119,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39114
39119
  var inputVerticalPadding = 4;
39115
39120
  var inputHorizontalPadding = 12;
39116
39121
  var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
39117
- var value = props.value,
39122
+ var id = props.id,
39123
+ value = props.value,
39118
39124
  leftInnerContent = props.leftInnerContent,
39119
39125
  leftOuterContent = props.leftOuterContent,
39120
39126
  rightInnerContent = props.rightInnerContent,
@@ -39135,7 +39141,8 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
39135
39141
  necessityIndicator = props.necessityIndicator,
39136
39142
  autoresize = props.autoresize,
39137
39143
  verticalAlign = props.verticalAlign,
39138
- innerWrapper = props.innerWrapper;
39144
+ innerWrapper = props.innerWrapper,
39145
+ rest = _objectWithoutProperties(props, _excluded);
39139
39146
  var field = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
39140
39147
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),
39141
39148
  _useState2 = _slicedToArray(_useState, 2),
@@ -39161,10 +39168,10 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
39161
39168
  // XXX vadimv: hack to autoresize textarea
39162
39169
  if (autoresize) field.current.style.height = (0,_utils__WEBPACK_IMPORTED_MODULE_10__.toPixel)(field.current.scrollHeight);
39163
39170
  }, [autoresize, value]);
39164
- var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(props.id);
39171
+ var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(id);
39165
39172
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex, _extends({
39166
39173
  ref: ref
39167
- }, (0,_util__WEBPACK_IMPORTED_MODULE_9__.getCommonProps)(props), {
39174
+ }, (0,_util__WEBPACK_IMPORTED_MODULE_9__.getCommonProps)(rest), {
39168
39175
  flex_direction: "column",
39169
39176
  gap: "4px"
39170
39177
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(InputLabel, {
@@ -39187,6 +39194,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
39187
39194
  onClick: onWrapperClick
39188
39195
  }, leftInnerContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Field, _extends({}, props.inputProps, {
39189
39196
  ref: field,
39197
+ id: id,
39190
39198
  disabled: disabled,
39191
39199
  onChange: onChange,
39192
39200
  onFocus: onFieldFocus,
@@ -39599,12 +39607,12 @@ var ButtonAddInput = function ButtonAddInput(props) {
39599
39607
  _useState2 = _slicedToArray(_useState, 2),
39600
39608
  showInput = _useState2[0],
39601
39609
  setShowInput = _useState2[1];
39602
- var handleBlur = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
39610
+ var onBlur = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
39603
39611
  onInputBlur === null || onInputBlur === void 0 ? void 0 : onInputBlur(evt);
39604
39612
  if (inputValue) return;
39605
39613
  setShowInput(false);
39606
39614
  }, [inputValue, onInputBlur]);
39607
- var handleButtonClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
39615
+ var _onButtonClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
39608
39616
  void _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
39609
39617
  return _regeneratorRuntime().wrap(function _callee$(_context) {
39610
39618
  while (1) switch (_context.prev = _context.next) {
@@ -39647,8 +39655,10 @@ var ButtonAddInput = function ButtonAddInput(props) {
39647
39655
  value: inputValue,
39648
39656
  placeholder: placeholder,
39649
39657
  onFocus: onInputFocus,
39650
- onBlur: handleBlur,
39651
- onChange: onInputValueChange,
39658
+ onBlur: onBlur,
39659
+ onChange: function onChange(val) {
39660
+ return onInputValueChange(val);
39661
+ },
39652
39662
  inputProps: {
39653
39663
  onKeyDown: onInputKeyDown
39654
39664
  },
@@ -39666,7 +39676,7 @@ var ButtonAddInput = function ButtonAddInput(props) {
39666
39676
  size: size,
39667
39677
  disabled: disabled,
39668
39678
  text: buttonText,
39669
- onClick: handleButtonClick
39679
+ onClick: _onButtonClick
39670
39680
  });
39671
39681
  };
39672
39682
 
@@ -39918,7 +39928,7 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
39918
39928
  var onInputKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
39919
39929
  if (evt.key === 'Enter') onInputBlur(evt);
39920
39930
  }, [onInputBlur]);
39921
- var handleRemoveItem = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (val) {
39931
+ var _onRemoveItem = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (val) {
39922
39932
  void _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
39923
39933
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
39924
39934
  while (1) switch (_context2.prev = _context2.next) {
@@ -39950,11 +39960,11 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
39950
39960
  }, _callee2);
39951
39961
  }))();
39952
39962
  }, [value, onRemoveItem, onChange]);
39953
- var handleIsItemDisabled = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (val) {
39963
+ var _isItemDisabled = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (val) {
39954
39964
  if (disabled) return true;
39955
39965
  return isItemDisabled ? isItemDisabled(val) : false;
39956
39966
  }, [disabled, isItemDisabled]);
39957
- var handleInputShow = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
39967
+ var _onInputShow = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
39958
39968
  onInputShow === null || onInputShow === void 0 ? void 0 : onInputShow(inputValue, setInputValue);
39959
39969
  }, [onInputShow, inputValue, setInputValue]);
39960
39970
  var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useLabelId)(props.id);
@@ -39976,8 +39986,8 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
39976
39986
  className: className,
39977
39987
  value: value,
39978
39988
  maxItems: maxItems,
39979
- onRemoveItem: handleRemoveItem,
39980
- isItemDisabled: handleIsItemDisabled,
39989
+ onRemoveItem: _onRemoveItem,
39990
+ isItemDisabled: _isItemDisabled,
39981
39991
  itemRenderer: itemRenderer
39982
39992
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_button_add_input__WEBPACK_IMPORTED_MODULE_6__.ButtonAddInput, {
39983
39993
  className: className,
@@ -39991,7 +40001,7 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
39991
40001
  onInputFocus: onFocus,
39992
40002
  onInputBlur: onInputBlur,
39993
40003
  onInputKeyDown: onInputKeyDown,
39994
- onInputShow: handleInputShow,
40004
+ onInputShow: _onInputShow,
39995
40005
  error: error,
39996
40006
  setError: setError
39997
40007
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_5__.HelperText, {
@@ -40053,7 +40063,10 @@ __webpack_require__.r(__webpack_exports__);
40053
40063
 
40054
40064
 
40055
40065
  /*jslint react:true*/
40066
+ var _excluded = ["id", "value", "label", "disabled", "size", "onChange"];
40056
40067
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
40068
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
40069
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
40057
40070
 
40058
40071
 
40059
40072
 
@@ -40062,19 +40075,22 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
40062
40075
 
40063
40076
 
40064
40077
  var Toggle = function Toggle(props) {
40065
- var value = props.value,
40078
+ var id = props.id,
40079
+ value = props.value,
40066
40080
  label = props.label,
40067
40081
  disabled = props.disabled,
40068
40082
  size = props.size,
40069
- onChange = props.onChange;
40083
+ onChange = props.onChange,
40084
+ rest = _objectWithoutProperties(props, _excluded);
40070
40085
  var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (evt) {
40071
40086
  var checked = evt.target.checked;
40072
40087
  onChange === null || onChange === void 0 ? void 0 : onChange(checked, evt);
40073
40088
  }, [onChange]);
40074
40089
  var color = getLabelColor(props);
40075
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToggleLabel, _extends({}, (0,_util__WEBPACK_IMPORTED_MODULE_5__.getCommonProps)(props), {
40090
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToggleLabel, _extends({}, (0,_util__WEBPACK_IMPORTED_MODULE_5__.getCommonProps)(rest), {
40076
40091
  $size: size
40077
40092
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToggleInput, {
40093
+ id: id,
40078
40094
  $size: size,
40079
40095
  checked: value,
40080
40096
  onChange: handleChange,