@codeleap/web 2.0.1 → 2.3.13
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/components/ActivityIndicator/index.d.ts +12 -12
- package/dist/components/ActivityIndicator/index.js +60 -60
- package/dist/components/ActivityIndicator/styles.d.ts +53 -53
- package/dist/components/ActivityIndicator/styles.js +21 -21
- package/dist/components/Button.d.ts +18 -18
- package/dist/components/Button.js +66 -66
- package/dist/components/CenterWrapper.d.ts +7 -7
- package/dist/components/CenterWrapper.js +27 -27
- package/dist/components/Checkbox/index.d.ts +12 -12
- package/dist/components/Checkbox/index.js +61 -61
- package/dist/components/Checkbox/styles.d.ts +53 -53
- package/dist/components/Checkbox/styles.js +63 -63
- package/dist/components/Collapse.d.ts +20 -20
- package/dist/components/Collapse.js +67 -67
- package/dist/components/ContentView.d.ts +10 -10
- package/dist/components/ContentView.js +51 -51
- package/dist/components/Drawer.d.ts +23 -23
- package/dist/components/Drawer.js +72 -72
- package/dist/components/FileInput.d.ts +8 -8
- package/dist/components/FileInput.js +72 -72
- package/dist/components/HorizontalScroll.d.ts +3 -3
- package/dist/components/HorizontalScroll.js +41 -41
- package/dist/components/Icon.d.ts +8 -8
- package/dist/components/Icon.js +54 -54
- package/dist/components/Link.d.ts +7 -7
- package/dist/components/Link.js +62 -62
- package/dist/components/List.d.ts +18 -18
- package/dist/components/List.js +51 -51
- package/dist/components/Modal/index.d.ts +21 -21
- package/dist/components/Modal/index.js +119 -119
- package/dist/components/Modal/styles.d.ts +56 -56
- package/dist/components/Modal/styles.js +35 -35
- package/dist/components/Overlay.d.ts +10 -10
- package/dist/components/Overlay.js +40 -40
- package/dist/components/RadioInput/index.d.ts +21 -21
- package/dist/components/RadioInput/index.js +54 -54
- package/dist/components/RadioInput/styles.d.ts +54 -54
- package/dist/components/RadioInput/styles.js +43 -43
- package/dist/components/RouterPage/Menu.d.ts +10 -10
- package/dist/components/RouterPage/Menu.js +35 -35
- package/dist/components/RouterPage/MenuItem.d.ts +12 -12
- package/dist/components/RouterPage/MenuItem.js +41 -41
- package/dist/components/RouterPage/Router.d.ts +8 -8
- package/dist/components/RouterPage/Router.js +26 -26
- package/dist/components/RouterPage/index.d.ts +29 -29
- package/dist/components/RouterPage/index.js +88 -88
- package/dist/components/RouterPage/styles.d.ts +54 -54
- package/dist/components/RouterPage/styles.js +86 -86
- package/dist/components/Scroll.d.ts +5 -5
- package/dist/components/Scroll.js +23 -23
- package/dist/components/Select/Custom.d.ts +8 -8
- package/dist/components/Select/Custom.js +103 -103
- package/dist/components/Select/Multi.d.ts +3 -3
- package/dist/components/Select/Multi.js +104 -104
- package/dist/components/Select/Native.d.ts +17 -17
- package/dist/components/Select/Native.js +43 -43
- package/dist/components/Select/index.d.ts +12 -12
- package/dist/components/Select/index.js +43 -43
- package/dist/components/Select/styles.d.ts +5 -5
- package/dist/components/Select/styles.js +56 -56
- package/dist/components/Select/types.d.ts +49 -49
- package/dist/components/Select/types.js +2 -2
- package/dist/components/Slider.d.ts +5 -5
- package/dist/components/Slider.js +35 -35
- package/dist/components/Text.d.ts +9 -9
- package/dist/components/Text.js +40 -40
- package/dist/components/TextInput.d.ts +150 -150
- package/dist/components/TextInput.js +124 -124
- package/dist/components/Tooltip.d.ts +12 -12
- package/dist/components/Tooltip.js +121 -121
- package/dist/components/Touchable.d.ts +15 -15
- package/dist/components/Touchable.js +51 -51
- package/dist/components/View.d.ts +10 -10
- package/dist/components/View.js +61 -61
- package/dist/components/index.d.ts +24 -24
- package/dist/components/index.js +40 -40
- package/dist/index.d.ts +6 -6
- package/dist/index.js +28 -28
- package/dist/lib/OSAlert.d.ts +21 -21
- package/dist/lib/OSAlert.js +139 -139
- package/dist/lib/Toast.d.ts +13 -13
- package/dist/lib/Toast.js +31 -31
- package/dist/lib/hooks.d.ts +28 -28
- package/dist/lib/hooks.js +182 -182
- package/dist/lib/logger.d.ts +2 -2
- package/dist/lib/logger.js +15 -15
- package/dist/lib/utils/cookies.d.ts +6 -6
- package/dist/lib/utils/cookies.js +14 -14
- package/dist/lib/utils/index.d.ts +4 -4
- package/dist/lib/utils/index.js +26 -26
- package/dist/lib/utils/pollyfils/scroll.d.ts +1 -1
- package/dist/lib/utils/pollyfils/scroll.js +65 -65
- package/dist/lib/utils/stopPropagation.d.ts +1 -1
- package/dist/lib/utils/stopPropagation.js +19 -19
- package/dist/types/utility.d.ts +2 -2
- package/dist/types/utility.js +2 -2
- package/package.json +47 -47
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
-
};
|
|
27
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
-
var t = {};
|
|
29
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
-
t[p] = s[p];
|
|
31
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
-
t[p[i]] = s[p[i]];
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.Modal = exports.ModalContent = void 0;
|
|
43
|
-
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
44
|
-
var common_1 = require("@codeleap/common");
|
|
45
|
-
var react_1 = require("react");
|
|
46
|
-
var react_dom_1 = __importDefault(require("react-dom"));
|
|
47
|
-
var uuid_1 = require("uuid");
|
|
48
|
-
var Button_1 = require("../Button");
|
|
49
|
-
var View_1 = require("../View");
|
|
50
|
-
var Text_1 = require("../Text");
|
|
51
|
-
var Overlay_1 = require("../Overlay");
|
|
52
|
-
__exportStar(require("./styles"), exports);
|
|
53
|
-
function focusModal(event, id) {
|
|
54
|
-
event.preventDefault();
|
|
55
|
-
var modal = document.getElementById(id);
|
|
56
|
-
if (modal) {
|
|
57
|
-
modal.focus();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
var ModalContent = function (modalProps) {
|
|
61
|
-
var children = modalProps.children, _a = modalProps.closable, closable = _a === void 0 ? true : _a, visible = modalProps.visible, _b = modalProps.title, title = _b === void 0 ? '' : _b, toggle = modalProps.toggle, id = modalProps.id, responsiveVariants = modalProps.responsiveVariants, variants = modalProps.variants, styles = modalProps.styles, _c = modalProps.showClose, showClose = _c === void 0 ? true : _c, footer = modalProps.footer, props = __rest(modalProps, ["children", "closable", "visible", "title", "toggle", "id", "responsiveVariants", "variants", "styles", "showClose", "footer"]);
|
|
62
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:Modal', {
|
|
63
|
-
responsiveVariants: responsiveVariants,
|
|
64
|
-
variants: variants,
|
|
65
|
-
styles: styles,
|
|
66
|
-
});
|
|
67
|
-
(0, common_1.onUpdate)(function () {
|
|
68
|
-
if (visible) {
|
|
69
|
-
document.body.style.overflow = 'hidden';
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
document.body.style.overflow = 'auto';
|
|
73
|
-
}
|
|
74
|
-
}, [visible]);
|
|
75
|
-
function closeOnEscPress(e) {
|
|
76
|
-
if (e.key === 'Escape') {
|
|
77
|
-
toggle();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
(0, react_1.useLayoutEffect)(function () {
|
|
81
|
-
var modal = document.getElementById(id);
|
|
82
|
-
if (modal) {
|
|
83
|
-
modal.focus();
|
|
84
|
-
}
|
|
85
|
-
}, [id]);
|
|
86
|
-
return ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({ "aria-hidden": !visible, css: variantStyles.wrapper, className: visible ? 'visible' : '' }, { children: [(0, jsx_runtime_1.jsx)(Overlay_1.Overlay, { visible: visible, onPress: closable ? toggle : function () { }, css: variantStyles.overlay }), (0, jsx_runtime_1.jsxs)(View_1.View, __assign({ component: 'section', css: __assign({}, variantStyles.box), className: 'content', onKeyDown: closeOnEscPress, tabIndex: 0, id: id, "aria-modal": true, role: 'dialog', "aria-describedby": "".concat(id, "-title"), "aria-label": 'Close the modal by presing Escape key' }, props, { children: [(title || showClose) && ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({ component: 'header', className: 'modal-header header', id: "".concat(id, "-title"), css: variantStyles.header }, { children: [typeof title === 'string' ? (0, jsx_runtime_1.jsx)(Text_1.Text, { text: title, css: variantStyles.title }) : title, showClose && closable && ((0, jsx_runtime_1.jsx)(Button_1.Button, { rightIcon: 'close', variants: ['icon'], onPress: toggle, css: variantStyles.closeButton }))] }))), (0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: variantStyles.body }, { children: children })), footer && ((0, jsx_runtime_1.jsx)(View_1.View, __assign({ component: 'footer', css: variantStyles.footer }, { children: footer })))] }))] })));
|
|
87
|
-
};
|
|
88
|
-
exports.ModalContent = ModalContent;
|
|
89
|
-
var Modal = function (_a) {
|
|
90
|
-
var accessible = _a.accessible, props = __rest(_a, ["accessible"]);
|
|
91
|
-
var modalId = (0, react_1.useRef)((0, uuid_1.v4)());
|
|
92
|
-
(0, react_1.useEffect)(function () {
|
|
93
|
-
if (accessible) {
|
|
94
|
-
var currentId_1 = modalId.current;
|
|
95
|
-
var appRoot_1 = document.body;
|
|
96
|
-
appRoot_1.addEventListener('focusin', function (e) { return focusModal(e, currentId_1); });
|
|
97
|
-
return function () { return appRoot_1.removeEventListener('focusin', function (e) { return focusModal(e, currentId_1); }); };
|
|
98
|
-
}
|
|
99
|
-
}, []);
|
|
100
|
-
(0, react_1.useEffect)(function () {
|
|
101
|
-
if (accessible) {
|
|
102
|
-
var appRoot = document.body;
|
|
103
|
-
appRoot.setAttribute('aria-hidden', "".concat(props.visible));
|
|
104
|
-
appRoot.setAttribute('tabindex', "".concat(-1));
|
|
105
|
-
}
|
|
106
|
-
}, [props.visible]);
|
|
107
|
-
if (accessible) {
|
|
108
|
-
if (props.visible) {
|
|
109
|
-
document.body.style.overflow = 'hidden';
|
|
110
|
-
return react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(exports.ModalContent, __assign({}, props, { id: modalId.current })), document.body);
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
document.body.style.overflow = 'visible';
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return (0, jsx_runtime_1.jsx)(exports.ModalContent, __assign({}, props, { id: modalId.current }));
|
|
118
|
-
};
|
|
119
|
-
exports.Modal = Modal;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
+
var t = {};
|
|
29
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
+
t[p] = s[p];
|
|
31
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.Modal = exports.ModalContent = void 0;
|
|
43
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
44
|
+
var common_1 = require("@codeleap/common");
|
|
45
|
+
var react_1 = require("react");
|
|
46
|
+
var react_dom_1 = __importDefault(require("react-dom"));
|
|
47
|
+
var uuid_1 = require("uuid");
|
|
48
|
+
var Button_1 = require("../Button");
|
|
49
|
+
var View_1 = require("../View");
|
|
50
|
+
var Text_1 = require("../Text");
|
|
51
|
+
var Overlay_1 = require("../Overlay");
|
|
52
|
+
__exportStar(require("./styles"), exports);
|
|
53
|
+
function focusModal(event, id) {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
var modal = document.getElementById(id);
|
|
56
|
+
if (modal) {
|
|
57
|
+
modal.focus();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
var ModalContent = function (modalProps) {
|
|
61
|
+
var children = modalProps.children, _a = modalProps.closable, closable = _a === void 0 ? true : _a, visible = modalProps.visible, _b = modalProps.title, title = _b === void 0 ? '' : _b, toggle = modalProps.toggle, id = modalProps.id, responsiveVariants = modalProps.responsiveVariants, variants = modalProps.variants, styles = modalProps.styles, _c = modalProps.showClose, showClose = _c === void 0 ? true : _c, footer = modalProps.footer, props = __rest(modalProps, ["children", "closable", "visible", "title", "toggle", "id", "responsiveVariants", "variants", "styles", "showClose", "footer"]);
|
|
62
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:Modal', {
|
|
63
|
+
responsiveVariants: responsiveVariants,
|
|
64
|
+
variants: variants,
|
|
65
|
+
styles: styles,
|
|
66
|
+
});
|
|
67
|
+
(0, common_1.onUpdate)(function () {
|
|
68
|
+
if (visible) {
|
|
69
|
+
document.body.style.overflow = 'hidden';
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
document.body.style.overflow = 'auto';
|
|
73
|
+
}
|
|
74
|
+
}, [visible]);
|
|
75
|
+
function closeOnEscPress(e) {
|
|
76
|
+
if (e.key === 'Escape') {
|
|
77
|
+
toggle();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
(0, react_1.useLayoutEffect)(function () {
|
|
81
|
+
var modal = document.getElementById(id);
|
|
82
|
+
if (modal) {
|
|
83
|
+
modal.focus();
|
|
84
|
+
}
|
|
85
|
+
}, [id]);
|
|
86
|
+
return ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({ "aria-hidden": !visible, css: variantStyles.wrapper, className: visible ? 'visible' : '' }, { children: [(0, jsx_runtime_1.jsx)(Overlay_1.Overlay, { visible: visible, onPress: closable ? toggle : function () { }, css: variantStyles.overlay }), (0, jsx_runtime_1.jsxs)(View_1.View, __assign({ component: 'section', css: __assign({}, variantStyles.box), className: 'content', onKeyDown: closeOnEscPress, tabIndex: 0, id: id, "aria-modal": true, role: 'dialog', "aria-describedby": "".concat(id, "-title"), "aria-label": 'Close the modal by presing Escape key' }, props, { children: [(title || showClose) && ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({ component: 'header', className: 'modal-header header', id: "".concat(id, "-title"), css: variantStyles.header }, { children: [typeof title === 'string' ? (0, jsx_runtime_1.jsx)(Text_1.Text, { text: title, css: variantStyles.title }) : title, showClose && closable && ((0, jsx_runtime_1.jsx)(Button_1.Button, { rightIcon: 'close', variants: ['icon'], onPress: toggle, css: variantStyles.closeButton }))] }))), (0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: variantStyles.body }, { children: children })), footer && ((0, jsx_runtime_1.jsx)(View_1.View, __assign({ component: 'footer', css: variantStyles.footer }, { children: footer })))] }))] })));
|
|
87
|
+
};
|
|
88
|
+
exports.ModalContent = ModalContent;
|
|
89
|
+
var Modal = function (_a) {
|
|
90
|
+
var accessible = _a.accessible, props = __rest(_a, ["accessible"]);
|
|
91
|
+
var modalId = (0, react_1.useRef)((0, uuid_1.v4)());
|
|
92
|
+
(0, react_1.useEffect)(function () {
|
|
93
|
+
if (accessible) {
|
|
94
|
+
var currentId_1 = modalId.current;
|
|
95
|
+
var appRoot_1 = document.body;
|
|
96
|
+
appRoot_1.addEventListener('focusin', function (e) { return focusModal(e, currentId_1); });
|
|
97
|
+
return function () { return appRoot_1.removeEventListener('focusin', function (e) { return focusModal(e, currentId_1); }); };
|
|
98
|
+
}
|
|
99
|
+
}, []);
|
|
100
|
+
(0, react_1.useEffect)(function () {
|
|
101
|
+
if (accessible) {
|
|
102
|
+
var appRoot = document.body;
|
|
103
|
+
appRoot.setAttribute('aria-hidden', "".concat(props.visible));
|
|
104
|
+
appRoot.setAttribute('tabindex', "".concat(-1));
|
|
105
|
+
}
|
|
106
|
+
}, [props.visible]);
|
|
107
|
+
if (accessible) {
|
|
108
|
+
if (props.visible) {
|
|
109
|
+
document.body.style.overflow = 'hidden';
|
|
110
|
+
return react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(exports.ModalContent, __assign({}, props, { id: modalId.current })), document.body);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
document.body.style.overflow = 'visible';
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return (0, jsx_runtime_1.jsx)(exports.ModalContent, __assign({}, props, { id: modalId.current }));
|
|
118
|
+
};
|
|
119
|
+
exports.Modal = Modal;
|
|
120
120
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { ModalComposition } from '@codeleap/common';
|
|
2
|
-
export declare const WebModalStyles: {
|
|
3
|
-
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
4
|
-
OSAlert: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
5
|
-
roundish: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
6
|
-
dynamicHandler: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
7
|
-
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
8
|
-
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
9
|
-
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
10
|
-
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
11
|
-
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
12
|
-
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
13
|
-
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
14
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
15
|
-
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
16
|
-
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
17
|
-
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
18
|
-
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
19
|
-
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
20
|
-
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
21
|
-
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
22
|
-
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
23
|
-
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
24
|
-
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
25
|
-
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
26
|
-
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
27
|
-
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
28
|
-
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
29
|
-
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
30
|
-
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
31
|
-
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
32
|
-
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
33
|
-
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
34
|
-
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
35
|
-
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
36
|
-
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
37
|
-
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
38
|
-
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
39
|
-
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
40
|
-
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
41
|
-
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
42
|
-
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
43
|
-
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
44
|
-
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
45
|
-
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
46
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
47
|
-
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
48
|
-
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
49
|
-
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
50
|
-
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
51
|
-
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
52
|
-
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
53
|
-
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
54
|
-
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
55
|
-
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
56
|
-
};
|
|
1
|
+
import { ModalComposition } from '@codeleap/common';
|
|
2
|
+
export declare const WebModalStyles: {
|
|
3
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
4
|
+
OSAlert: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
5
|
+
roundish: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
6
|
+
dynamicHandler: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
7
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
8
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
9
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
10
|
+
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
11
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
12
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
13
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
14
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
15
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
16
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
17
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
18
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
19
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
20
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
21
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
22
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
23
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
24
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
25
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
26
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
27
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
28
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
29
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
30
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
31
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
32
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
33
|
+
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
34
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
35
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
36
|
+
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
37
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
38
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
39
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
40
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
41
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
42
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
43
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
44
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
45
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
46
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
47
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
48
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
49
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
50
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
51
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
52
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
53
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
54
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
55
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
56
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.WebModalStyles = void 0;
|
|
15
|
-
var common_1 = require("@codeleap/common");
|
|
16
|
-
var createModalStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
-
var transitionDuration = '0.3s';
|
|
18
|
-
exports.WebModalStyles = __assign(__assign({}, common_1.ModalStyles), { default: createModalStyle(function (theme) {
|
|
19
|
-
var defaultStyles = common_1.ModalStyles.default(theme);
|
|
20
|
-
return __assign(__assign({}, defaultStyles), { wrapper: __assign(__assign({}, defaultStyles.wrapper), { transition: "visibility 0.01s ease", transitionDelay: transitionDuration, '& .content': {
|
|
21
|
-
transform: 'scale(0)',
|
|
22
|
-
transition: "transform ".concat(transitionDuration, " ease"),
|
|
23
|
-
}, '&.visible': {
|
|
24
|
-
visibility: 'visible',
|
|
25
|
-
transitionDelay: '0s',
|
|
26
|
-
}, '&.visible .content': {
|
|
27
|
-
visibility: 'visible',
|
|
28
|
-
transform: 'scale(1)',
|
|
29
|
-
}, '&.visible .overlay': {
|
|
30
|
-
opacity: 0.5,
|
|
31
|
-
} }), box: __assign(__assign({}, defaultStyles.box), { width: '45vw' }), overlay: __assign(__assign({}, defaultStyles.overlay), { transition: "opacity ".concat(transitionDuration, " ease") }), title: __assign(__assign({}, (0, common_1.assignTextStyle)('h3')(theme).text), theme.spacing.marginBottom(1)) });
|
|
32
|
-
}), OSAlert: createModalStyle(function (theme) {
|
|
33
|
-
var defaults = common_1.ModalStyles.default(theme);
|
|
34
|
-
return __assign(__assign({}, defaults), { body: __assign(__assign(__assign(__assign(__assign({}, defaults.body), theme.presets.column), theme.presets.alignCenter), theme.presets.justifyCenter), theme.spacing.padding(2)), footer: __assign(__assign(__assign(__assign(__assign({}, defaults.footer), theme.presets.row), theme.presets.justifyEnd), theme.spacing.padding(1)), theme.spacing.gap(2)) });
|
|
35
|
-
}) });
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.WebModalStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createModalStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
var transitionDuration = '0.3s';
|
|
18
|
+
exports.WebModalStyles = __assign(__assign({}, common_1.ModalStyles), { default: createModalStyle(function (theme) {
|
|
19
|
+
var defaultStyles = common_1.ModalStyles.default(theme);
|
|
20
|
+
return __assign(__assign({}, defaultStyles), { wrapper: __assign(__assign({}, defaultStyles.wrapper), { transition: "visibility 0.01s ease", transitionDelay: transitionDuration, '& .content': {
|
|
21
|
+
transform: 'scale(0)',
|
|
22
|
+
transition: "transform ".concat(transitionDuration, " ease"),
|
|
23
|
+
}, '&.visible': {
|
|
24
|
+
visibility: 'visible',
|
|
25
|
+
transitionDelay: '0s',
|
|
26
|
+
}, '&.visible .content': {
|
|
27
|
+
visibility: 'visible',
|
|
28
|
+
transform: 'scale(1)',
|
|
29
|
+
}, '&.visible .overlay': {
|
|
30
|
+
opacity: 0.5,
|
|
31
|
+
} }), box: __assign(__assign({}, defaultStyles.box), { width: '45vw' }), overlay: __assign(__assign({}, defaultStyles.overlay), { transition: "opacity ".concat(transitionDuration, " ease") }), title: __assign(__assign({}, (0, common_1.assignTextStyle)('h3')(theme).text), theme.spacing.marginBottom(1)) });
|
|
32
|
+
}), OSAlert: createModalStyle(function (theme) {
|
|
33
|
+
var defaults = common_1.ModalStyles.default(theme);
|
|
34
|
+
return __assign(__assign({}, defaults), { body: __assign(__assign(__assign(__assign(__assign({}, defaults.body), theme.presets.column), theme.presets.alignCenter), theme.presets.justifyCenter), theme.spacing.padding(2)), footer: __assign(__assign(__assign(__assign(__assign({}, defaults.footer), theme.presets.row), theme.presets.justifyEnd), theme.spacing.padding(1)), theme.spacing.gap(2)) });
|
|
35
|
+
}) });
|
|
36
36
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ComponentVariants, OverlayComposition, OverlayStyles, SmartOmit, StylesOf } from '@codeleap/common';
|
|
3
|
-
import { TouchableProps } from './Touchable';
|
|
4
|
-
import { ViewProps } from './View';
|
|
5
|
-
export declare type OverlayProps = {
|
|
6
|
-
visible?: boolean;
|
|
7
|
-
styles?: StylesOf<OverlayComposition>;
|
|
8
|
-
onPress?: TouchableProps<'div'>['onClick'];
|
|
9
|
-
} & ComponentVariants<typeof OverlayStyles> & Partial<SmartOmit<ViewProps<'div'>, 'variants' | 'responsiveVariants'>>;
|
|
10
|
-
export declare const Overlay: React.FC<OverlayProps>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentVariants, OverlayComposition, OverlayStyles, SmartOmit, StylesOf } from '@codeleap/common';
|
|
3
|
+
import { TouchableProps } from './Touchable';
|
|
4
|
+
import { ViewProps } from './View';
|
|
5
|
+
export declare type OverlayProps = {
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
styles?: StylesOf<OverlayComposition>;
|
|
8
|
+
onPress?: TouchableProps<'div'>['onClick'];
|
|
9
|
+
} & ComponentVariants<typeof OverlayStyles> & Partial<SmartOmit<ViewProps<'div'>, 'variants' | 'responsiveVariants'>>;
|
|
10
|
+
export declare const Overlay: React.FC<OverlayProps>;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.Overlay = void 0;
|
|
26
|
-
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
27
|
-
var common_1 = require("@codeleap/common");
|
|
28
|
-
var Touchable_1 = require("./Touchable");
|
|
29
|
-
var View_1 = require("./View");
|
|
30
|
-
var Overlay = function (overlayProps) {
|
|
31
|
-
var visible = overlayProps.visible, responsiveVariants = overlayProps.responsiveVariants, variants = overlayProps.variants, styles = overlayProps.styles, props = __rest(overlayProps, ["visible", "responsiveVariants", "variants", "styles"]);
|
|
32
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('Overlay', {
|
|
33
|
-
variants: variants,
|
|
34
|
-
responsiveVariants: responsiveVariants,
|
|
35
|
-
styles: styles,
|
|
36
|
-
});
|
|
37
|
-
var Component = props.onClick || props.onPress ? Touchable_1.Touchable : View_1.View;
|
|
38
|
-
return ((0, jsx_runtime_1.jsx)(Component, __assign({ css: __assign(__assign(__assign({}, variantStyles.wrapper), { transition: 'opacity 0.2s ease' }), (visible ? variantStyles['wrapper:visible'] : {})) }, props)));
|
|
39
|
-
};
|
|
40
|
-
exports.Overlay = Overlay;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Overlay = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
27
|
+
var common_1 = require("@codeleap/common");
|
|
28
|
+
var Touchable_1 = require("./Touchable");
|
|
29
|
+
var View_1 = require("./View");
|
|
30
|
+
var Overlay = function (overlayProps) {
|
|
31
|
+
var visible = overlayProps.visible, responsiveVariants = overlayProps.responsiveVariants, variants = overlayProps.variants, styles = overlayProps.styles, props = __rest(overlayProps, ["visible", "responsiveVariants", "variants", "styles"]);
|
|
32
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('Overlay', {
|
|
33
|
+
variants: variants,
|
|
34
|
+
responsiveVariants: responsiveVariants,
|
|
35
|
+
styles: styles,
|
|
36
|
+
});
|
|
37
|
+
var Component = props.onClick || props.onPress ? Touchable_1.Touchable : View_1.View;
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(Component, __assign({ css: __assign(__assign(__assign({}, variantStyles.wrapper), { transition: 'opacity 0.2s ease' }), (visible ? variantStyles['wrapper:visible'] : {})) }, props)));
|
|
39
|
+
};
|
|
40
|
+
exports.Overlay = Overlay;
|
|
41
41
|
//# sourceMappingURL=Overlay.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { ComponentVariants, RadioInputComposition, RadioInputStyles, StylesOf } from '@codeleap/common';
|
|
3
|
-
export { WebRadioInputStyles } from './styles';
|
|
4
|
-
declare type RadioItem<T extends unknown = any> = {
|
|
5
|
-
value: T;
|
|
6
|
-
label: ReactNode;
|
|
7
|
-
};
|
|
8
|
-
export declare type RadioButtonProps = Omit<ComponentPropsWithoutRef<'input'>, 'style'> & {
|
|
9
|
-
item: RadioItem;
|
|
10
|
-
select: () => void;
|
|
11
|
-
style: StylesOf<RadioInputComposition>;
|
|
12
|
-
};
|
|
13
|
-
export declare type RadioGroupProps<T> = {
|
|
14
|
-
options: RadioItem<T>[];
|
|
15
|
-
value: T;
|
|
16
|
-
onValueChange(value: T): void;
|
|
17
|
-
label: ReactNode;
|
|
18
|
-
styles?: StylesOf<RadioInputComposition>;
|
|
19
|
-
} & ComponentVariants<typeof RadioInputStyles>;
|
|
20
|
-
export declare const RadioButton: React.FC<RadioButtonProps>;
|
|
21
|
-
export declare const RadioGroup: <T extends unknown>(radioGroupProps: RadioGroupProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ComponentVariants, RadioInputComposition, RadioInputStyles, StylesOf } from '@codeleap/common';
|
|
3
|
+
export { WebRadioInputStyles } from './styles';
|
|
4
|
+
declare type RadioItem<T extends unknown = any> = {
|
|
5
|
+
value: T;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare type RadioButtonProps = Omit<ComponentPropsWithoutRef<'input'>, 'style'> & {
|
|
9
|
+
item: RadioItem;
|
|
10
|
+
select: () => void;
|
|
11
|
+
style: StylesOf<RadioInputComposition>;
|
|
12
|
+
};
|
|
13
|
+
export declare type RadioGroupProps<T> = {
|
|
14
|
+
options: RadioItem<T>[];
|
|
15
|
+
value: T;
|
|
16
|
+
onValueChange(value: T): void;
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
styles?: StylesOf<RadioInputComposition>;
|
|
19
|
+
} & ComponentVariants<typeof RadioInputStyles>;
|
|
20
|
+
export declare const RadioButton: React.FC<RadioButtonProps>;
|
|
21
|
+
export declare const RadioGroup: <T extends unknown>(radioGroupProps: RadioGroupProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|