labsense-ui-kit 1.3.3 → 1.3.5
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/useCustomModal.d.ts +2 -1
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -5426,27 +5426,33 @@ var useCopyToClipboard = function useCopyToClipboard() {
|
|
|
5426
5426
|
|
|
5427
5427
|
var _templateObject, _templateObject2;
|
|
5428
5428
|
var ModalOverlay = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n backdrop-filter: blur(4px);\n"])));
|
|
5429
|
-
var ModalContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-height: 90vh;\n max-width: ", ";\n overflow-y:
|
|
5429
|
+
var ModalContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-height: 90vh;\n max-width: ", ";\n overflow-y: ", ";\n scrollbar-width: thin;\n"])), function (_ref) {
|
|
5430
5430
|
var theme = _ref.theme;
|
|
5431
5431
|
return theme.vms.accent.light_1;
|
|
5432
5432
|
}, function (_ref2) {
|
|
5433
5433
|
var $maxWidth = _ref2.$maxWidth;
|
|
5434
5434
|
return $maxWidth ? $maxWidth : '400px';
|
|
5435
|
+
}, function (_ref3) {
|
|
5436
|
+
var $overflowY = _ref3.$overflowY;
|
|
5437
|
+
return $overflowY ? $overflowY : 'auto';
|
|
5435
5438
|
});
|
|
5436
|
-
var Modal = function Modal(
|
|
5437
|
-
var isOpen =
|
|
5438
|
-
maxWidth =
|
|
5439
|
-
|
|
5439
|
+
var Modal = function Modal(_ref4) {
|
|
5440
|
+
var isOpen = _ref4.isOpen,
|
|
5441
|
+
maxWidth = _ref4.maxWidth,
|
|
5442
|
+
overflow = _ref4.overflow,
|
|
5443
|
+
children = _ref4.children;
|
|
5440
5444
|
if (!isOpen) return null;
|
|
5441
5445
|
return React.createElement(ModalOverlay, null, React.createElement(ModalContainer, {
|
|
5442
5446
|
"$maxWidth": maxWidth,
|
|
5447
|
+
"$overflowY": overflow,
|
|
5443
5448
|
onClick: function onClick(e) {
|
|
5444
5449
|
return e.stopPropagation();
|
|
5445
5450
|
}
|
|
5446
5451
|
}, children));
|
|
5447
5452
|
};
|
|
5448
|
-
var useCustomModal = function useCustomModal(
|
|
5449
|
-
var maxWidth =
|
|
5453
|
+
var useCustomModal = function useCustomModal(_ref5) {
|
|
5454
|
+
var maxWidth = _ref5.maxWidth,
|
|
5455
|
+
overflow = _ref5.overflow;
|
|
5450
5456
|
var _useState = useState(false),
|
|
5451
5457
|
isOpen = _useState[0],
|
|
5452
5458
|
setIsOpen = _useState[1];
|
|
@@ -5463,7 +5469,8 @@ var useCustomModal = function useCustomModal(_ref4) {
|
|
|
5463
5469
|
var createModal = function createModal(content) {
|
|
5464
5470
|
return React.createElement(Modal, {
|
|
5465
5471
|
isOpen: isOpen,
|
|
5466
|
-
maxWidth: maxWidth
|
|
5472
|
+
maxWidth: maxWidth,
|
|
5473
|
+
overflow: overflow
|
|
5467
5474
|
}, content);
|
|
5468
5475
|
};
|
|
5469
5476
|
return {
|