@luminati-io/uikit 3.0.13 → 3.0.15
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.
@@ -26402,7 +26402,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
26402
26402
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
26403
26403
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types");
|
26404
26404
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
26405
|
-
/* harmony import */ var
|
26405
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
26406
|
+
/* harmony import */ var _box__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./box */ "./src/layout/box.js");
|
26406
26407
|
// LICENSE_CODE ZON
|
26407
26408
|
|
26408
26409
|
|
@@ -26415,6 +26416,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
26415
26416
|
|
26416
26417
|
|
26417
26418
|
|
26419
|
+
|
26418
26420
|
var Flex = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
26419
26421
|
var inline = props.inline,
|
26420
26422
|
align_items = props.align_items,
|
@@ -26457,7 +26459,7 @@ Flex.propTypes = {
|
|
26457
26459
|
row_gap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
26458
26460
|
column_gap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)
|
26459
26461
|
};
|
26460
|
-
var StyledFlex = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(
|
26462
|
+
var StyledFlex = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_box__WEBPACK_IMPORTED_MODULE_4__["default"]).withConfig({
|
26461
26463
|
displayName: "StyledFlex",
|
26462
26464
|
componentId: "sc-2aqm31-0"
|
26463
26465
|
})(["display:", ";align-items:", ";align-content:", ";justify-items:", ";justify-content:", ";flex-wrap:", ";flex-direction:", ";gap:", ";row-gap:", ";column-gap:", ";"], function (props) {
|
@@ -26474,13 +26476,7 @@ var StyledFlex = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_box__
|
|
26474
26476
|
return props.$flexWrap;
|
26475
26477
|
}, function (props) {
|
26476
26478
|
return props.$flexDirection;
|
26477
|
-
},
|
26478
|
-
return props.$gap;
|
26479
|
-
}, function (props) {
|
26480
|
-
return props.$rowGap;
|
26481
|
-
}, function (props) {
|
26482
|
-
return props.$columnGap;
|
26483
|
-
});
|
26479
|
+
}, (0,_utils__WEBPACK_IMPORTED_MODULE_3__.fromTheme)('gap'), (0,_utils__WEBPACK_IMPORTED_MODULE_3__.fromTheme)('rowGap'), (0,_utils__WEBPACK_IMPORTED_MODULE_3__.fromTheme)('columnGap'));
|
26484
26480
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Flex);
|
26485
26481
|
|
26486
26482
|
/***/ }),
|
@@ -27169,7 +27165,7 @@ var StyledFooterWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default
|
|
27169
27165
|
displayName: "StyledFooterWrapper",
|
27170
27166
|
componentId: "sc-1nggvo0-3"
|
27171
27167
|
})(["border-top:1px solid ", ";"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_4);
|
27172
|
-
var ModalBase = function
|
27168
|
+
var ModalBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
27173
27169
|
var id = props.id,
|
27174
27170
|
className = props.className,
|
27175
27171
|
testId = props['data-testid'],
|
@@ -27183,9 +27179,11 @@ var ModalBase = function ModalBase(props) {
|
|
27183
27179
|
className: className,
|
27184
27180
|
size: size,
|
27185
27181
|
box_shadow: shadow,
|
27186
|
-
"data-testid": testId
|
27182
|
+
"data-testid": testId,
|
27183
|
+
ref: ref
|
27187
27184
|
}, header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledHeaderWrapper, null, header), content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledContentWrapper, null, content), footer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledFooterWrapper, null, footer));
|
27188
|
-
};
|
27185
|
+
});
|
27186
|
+
ModalBase.displayName = 'ModalBase';
|
27189
27187
|
ModalBase.propTypes = {
|
27190
27188
|
size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg', 'full']),
|
27191
27189
|
shadow: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['none', 'sm', 'md', 'lg']),
|
@@ -27264,7 +27262,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
27264
27262
|
|
27265
27263
|
|
27266
27264
|
|
27267
|
-
var General = function
|
27265
|
+
var General = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
|
27268
27266
|
var id = props.id,
|
27269
27267
|
className = props.className,
|
27270
27268
|
title = props.title,
|
@@ -27301,9 +27299,11 @@ var General = function General(props) {
|
|
27301
27299
|
shadow: shadow,
|
27302
27300
|
header: header,
|
27303
27301
|
content: content,
|
27304
|
-
footer: footer
|
27302
|
+
footer: footer,
|
27303
|
+
ref: ref
|
27305
27304
|
});
|
27306
|
-
};
|
27305
|
+
});
|
27306
|
+
General.displayName = 'General';
|
27307
27307
|
General.propTypes = {
|
27308
27308
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
27309
27309
|
subtitle: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
@@ -27469,12 +27469,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
27469
27469
|
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
|
27470
27470
|
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
27471
27471
|
/* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
|
27472
|
-
/* harmony import */ var
|
27472
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.js");
|
27473
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
|
27473
27474
|
// LICENSE_CODE ZON
|
27474
27475
|
|
27475
27476
|
|
27476
27477
|
/*jslint react:true*/
|
27477
|
-
var _excluded = ["show", "zIndex"];
|
27478
|
+
var _excluded = ["show", "zIndex", "onOutsideClick", "swallowOutsideClick"];
|
27479
|
+
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); }
|
27478
27480
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
27479
27481
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
27480
27482
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -27489,13 +27491,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
27489
27491
|
|
27490
27492
|
|
27491
27493
|
|
27494
|
+
|
27492
27495
|
var withBackdrop = function withBackdrop(Comp) {
|
27493
27496
|
var WithBackdrop = function WithBackdrop(props) {
|
27494
|
-
// XXX davidg: support close on outside-click
|
27495
27497
|
var show = props.show,
|
27496
27498
|
_props$zIndex = props.zIndex,
|
27497
|
-
zIndex = _props$zIndex === void 0 ?
|
27499
|
+
zIndex = _props$zIndex === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.backdrop : _props$zIndex,
|
27500
|
+
onOutsideClick = props.onOutsideClick,
|
27501
|
+
_props$swallowOutside = props.swallowOutsideClick,
|
27502
|
+
swallowOutsideClick = _props$swallowOutside === void 0 ? true : _props$swallowOutside,
|
27498
27503
|
restProps = _objectWithoutProperties(props, _excluded);
|
27504
|
+
var popperElement = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
27499
27505
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
27500
27506
|
_useState2 = _slicedToArray(_useState, 2),
|
27501
27507
|
visible = _useState2[0],
|
@@ -27523,6 +27529,16 @@ var withBackdrop = function withBackdrop(Comp) {
|
|
27523
27529
|
return clearTimeout(tid);
|
27524
27530
|
};
|
27525
27531
|
}, [show]);
|
27532
|
+
var hideAndStopEvt = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
27533
|
+
if (!visible) return;
|
27534
|
+
if (swallowOutsideClick) {
|
27535
|
+
evt.stopPropagation();
|
27536
|
+
evt.preventDefault();
|
27537
|
+
}
|
27538
|
+
if (onOutsideClick) onOutsideClick(evt);
|
27539
|
+
}, [visible, swallowOutsideClick, onOutsideClick]);
|
27540
|
+
(0,_hooks__WEBPACK_IMPORTED_MODULE_5__.useOutsideClick)(popperElement.current, hideAndStopEvt);
|
27541
|
+
console.log(popperElement);
|
27526
27542
|
if (!mount) return null;
|
27527
27543
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopupContainer, {
|
27528
27544
|
zIndex: zIndex
|
@@ -27531,7 +27547,9 @@ var withBackdrop = function withBackdrop(Comp) {
|
|
27531
27547
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CompContainer, {
|
27532
27548
|
show: visible,
|
27533
27549
|
zIndex: zIndex + 1
|
27534
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp,
|
27550
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, _extends({
|
27551
|
+
ref: popperElement
|
27552
|
+
}, restProps))));
|
27535
27553
|
};
|
27536
27554
|
WithBackdrop.displayName = "WithBackdrop(".concat((0,_hoc__WEBPACK_IMPORTED_MODULE_4__.getDisplayName)(Comp), ")");
|
27537
27555
|
return WithBackdrop;
|
@@ -27924,7 +27942,7 @@ var TabContainer = styled_components__WEBPACK_IMPORTED_MODULE_2___default().butt
|
|
27924
27942
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["width:200px;height:40px;padding:0 12px;justify-content:space-between;gap:4px;border-radius:0 4px 4px 0;border-left:1px solid transparent;color:", ";&[aria-selected=true]{color:", ";background:", ";border-left-color:", ";}&:hover{color:", ";border-left-color:", ";}&[aria-disabled=true]{color:", ";background:0 none;border-left-color:transparent;}"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.blue_3, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.blue_11, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_8, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9);
|
27925
27943
|
}
|
27926
27944
|
// main
|
27927
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["width:fit-content;height:36px;padding:0;justify-content:center;gap:4px;color:", ";box-shadow:0px -
|
27945
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["width:fit-content;height:36px;padding:0;justify-content:center;gap:4px;color:", ";box-shadow:0px -1px 0px 0px ", " inset;&[aria-selected=true]{color:", ";box-shadow:0px -2px 0px 0px ", " inset;}&:hover{color:", ";box-shadow:0px -2px 0px 0px ", " inset;}&[aria-disabled=true]{color:", ";box-shadow:0px -1px 0px 0px ", " inset;}"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_6, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.blue_11, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.blue_11, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_8, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_6);
|
27928
27946
|
});
|
27929
27947
|
var Left = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
27930
27948
|
displayName: "Left",
|
@@ -31607,8 +31625,10 @@ function fromTheme(propName, defaultValue) {
|
|
31607
31625
|
var _ref, _props$propName;
|
31608
31626
|
var value = (_ref = (_props$propName = props[propName]) !== null && _props$propName !== void 0 ? _props$propName : props["$".concat(propName)]) !== null && _ref !== void 0 ? _ref : defaultValue;
|
31609
31627
|
if (value != null) {
|
31610
|
-
|
31611
|
-
|
31628
|
+
if (propName.indexOf('padding') == 0 || propName.indexOf('margin') == 0 || ['gap', 'rowGap', 'columnGap'].includes(propName)) {
|
31629
|
+
var _theme$spacing$value;
|
31630
|
+
return (_theme$spacing$value = _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing[value]) !== null && _theme$spacing$value !== void 0 ? _theme$spacing$value : value;
|
31631
|
+
}
|
31612
31632
|
if (['font_family', 'font_weight', 'font_size', 'line_height', 'letter_spacing', 'color', 'box_shadow'].includes(propName)) {
|
31613
31633
|
return _theme__WEBPACK_IMPORTED_MODULE_3__["default"][propName][value];
|
31614
31634
|
}
|