@driveflux/ui 1.0.14 → 1.1.1
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/bottom-sheet/BottomSheetProvider.d.ts +4 -0
- package/dist/bottom-sheet/BottomSheetProvider.d.ts.map +1 -0
- package/dist/bottom-sheet/BottomSheetProvider.js +190 -0
- package/dist/bottom-sheet/context.d.ts +15 -0
- package/dist/bottom-sheet/context.d.ts.map +1 -0
- package/dist/bottom-sheet/context.js +6 -0
- package/dist/bottom-sheet/index.d.ts +4 -0
- package/dist/bottom-sheet/index.d.ts.map +1 -0
- package/dist/bottom-sheet/index.js +3 -0
- package/dist/bottom-sheet/use-bottom-sheet.d.ts +6 -0
- package/dist/bottom-sheet/use-bottom-sheet.d.ts.map +1 -0
- package/dist/bottom-sheet/use-bottom-sheet.js +5 -0
- package/dist/bottom-sheet/utils.d.ts +2 -0
- package/dist/bottom-sheet/utils.d.ts.map +1 -0
- package/dist/bottom-sheet/utils.js +15 -0
- package/dist/chakra.d.ts.map +1 -1
- package/dist/chakra.js +1 -0
- package/dist/modal/ModalProvider.d.ts.map +1 -1
- package/dist/modal/ModalProvider.js +1 -4
- package/dist/modal/components/EnhancedModalCustomWrapper.d.ts.map +1 -1
- package/dist/modal/components/EnhancedModalFooter.d.ts +2 -2
- package/dist/modal/components/EnhancedModalFooter.d.ts.map +1 -1
- package/dist/modal/components/MinimalModalContent.d.ts.map +1 -1
- package/dist/modal/components/StandardModalContent.d.ts.map +1 -1
- package/dist/modal/context.d.ts.map +1 -1
- package/dist/modal/use-enhanced-modal.d.ts.map +1 -1
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/colors.js +36 -36
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/use-toast-result.d.ts +2 -2
- package/dist/toast/use-toast-result.d.ts.map +1 -1
- package/dist/toast/use-toast-result.js +2 -2
- package/dist/translations.d.ts.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/accessors.d.ts.map +1 -1
- package/dist/utils/react.d.ts.map +1 -1
- package/package.json +44 -43
- package/.eslintrc.json +0 -3
- package/.swcrc +0 -14
- package/.turbo/turbo-build.log +0 -11
- package/CHANGELOG.md +0 -159
- package/dist/cjs/chakra.js +0 -18
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/modal/ModalProvider.js +0 -255
- package/dist/cjs/modal/components/EnhancedModalCustomWrapper.js +0 -139
- package/dist/cjs/modal/components/EnhancedModalFooter.js +0 -163
- package/dist/cjs/modal/components/MinimalModalContent.js +0 -94
- package/dist/cjs/modal/components/StandardModalContent.js +0 -359
- package/dist/cjs/modal/context.js +0 -20
- package/dist/cjs/modal/index.js +0 -48
- package/dist/cjs/modal/use-enhanced-modal.js +0 -15
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/theme/colors.js +0 -147
- package/dist/cjs/theme/index.js +0 -18
- package/dist/cjs/toast/index.js +0 -19
- package/dist/cjs/toast/use-toast-result.js +0 -210
- package/dist/cjs/translations.js +0 -42
- package/dist/cjs/types.js +0 -4
- package/dist/cjs/utils/accessors.js +0 -65
- package/dist/cjs/utils/index.js +0 -19
- package/dist/cjs/utils/react.js +0 -56
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3
- package/index.cjs +0 -1
- package/index.d.ts +0 -1
- package/modal.cjs +0 -1
- package/modal.d.ts +0 -1
- package/src/chakra.ts +0 -2
- package/src/index.ts +0 -4
- package/src/modal/ModalProvider.tsx +0 -143
- package/src/modal/components/EnhancedModalCustomWrapper.tsx +0 -39
- package/src/modal/components/EnhancedModalFooter.tsx +0 -51
- package/src/modal/components/MinimalModalContent.tsx +0 -24
- package/src/modal/components/StandardModalContent.tsx +0 -65
- package/src/modal/context.tsx +0 -81
- package/src/modal/index.ts +0 -7
- package/src/modal/use-enhanced-modal.ts +0 -7
- package/src/theme/colors.ts +0 -179
- package/src/theme/index.ts +0 -1
- package/src/toast/index.ts +0 -3
- package/src/toast/use-toast-result.tsx +0 -168
- package/src/translations.ts +0 -25
- package/src/types.ts +0 -22
- package/src/utils/accessors.ts +0 -64
- package/src/utils/index.ts +0 -2
- package/src/utils/react.ts +0 -35
- package/theme.cjs +0 -1
- package/theme.d.ts +0 -1
- package/toast.cjs +0 -1
- package/toast.d.ts +0 -1
- package/translations.cjs +0 -1
- package/translations.d.ts +0 -1
- package/tsconfig.json +0 -14
- package/tsconfig.tsbuildinfo +0 -1
- package/utils.cjs +0 -1
- package/utils.d.ts +0 -1
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _default;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
var _IconClose = /*#__PURE__*/ _interop_require_default(require("@driveflux/icons/icons/IconClose"));
|
|
13
|
-
var _chakra = require("../../chakra.js");
|
|
14
|
-
var _useenhancedmodal = require("../use-enhanced-modal.js");
|
|
15
|
-
function _define_property(obj, key, value) {
|
|
16
|
-
if (key in obj) {
|
|
17
|
-
Object.defineProperty(obj, key, {
|
|
18
|
-
value: value,
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
obj[key] = value;
|
|
25
|
-
}
|
|
26
|
-
return obj;
|
|
27
|
-
}
|
|
28
|
-
function _interop_require_default(obj) {
|
|
29
|
-
return obj && obj.__esModule ? obj : {
|
|
30
|
-
default: obj
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function _object_spread(target) {
|
|
34
|
-
for(var i = 1; i < arguments.length; i++){
|
|
35
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
36
|
-
var ownKeys = Object.keys(source);
|
|
37
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
38
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
39
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
ownKeys.forEach(function(key) {
|
|
43
|
-
_define_property(target, key, source[key]);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return target;
|
|
47
|
-
}
|
|
48
|
-
function ownKeys(object, enumerableOnly) {
|
|
49
|
-
var keys = Object.keys(object);
|
|
50
|
-
if (Object.getOwnPropertySymbols) {
|
|
51
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
52
|
-
if (enumerableOnly) {
|
|
53
|
-
symbols = symbols.filter(function(sym) {
|
|
54
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
keys.push.apply(keys, symbols);
|
|
58
|
-
}
|
|
59
|
-
return keys;
|
|
60
|
-
}
|
|
61
|
-
function _object_spread_props(target, source) {
|
|
62
|
-
source = source != null ? source : {};
|
|
63
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
64
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
65
|
-
} else {
|
|
66
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
67
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return target;
|
|
71
|
-
}
|
|
72
|
-
function _object_without_properties(source, excluded) {
|
|
73
|
-
if (source == null) return {};
|
|
74
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
75
|
-
var key, i;
|
|
76
|
-
if (Object.getOwnPropertySymbols) {
|
|
77
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
78
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
79
|
-
key = sourceSymbolKeys[i];
|
|
80
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
81
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
82
|
-
target[key] = source[key];
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return target;
|
|
86
|
-
}
|
|
87
|
-
function _object_without_properties_loose(source, excluded) {
|
|
88
|
-
if (source == null) return {};
|
|
89
|
-
var target = {};
|
|
90
|
-
var sourceKeys = Object.keys(source);
|
|
91
|
-
var key, i;
|
|
92
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
93
|
-
key = sourceKeys[i];
|
|
94
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
95
|
-
target[key] = source[key];
|
|
96
|
-
}
|
|
97
|
-
return target;
|
|
98
|
-
}
|
|
99
|
-
var EnhancedModalCustomWrapper = function(_param) {
|
|
100
|
-
var title = _param.title, children = _param.children, isCloseHidden = _param.isCloseHidden, props = _object_without_properties(_param, [
|
|
101
|
-
"title",
|
|
102
|
-
"children",
|
|
103
|
-
"isCloseHidden"
|
|
104
|
-
]);
|
|
105
|
-
var close = (0, _useenhancedmodal.useEnhancedModal)().close;
|
|
106
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_chakra.Stack, _object_spread_props(_object_spread({
|
|
107
|
-
overflowY: 'scroll',
|
|
108
|
-
px: '32px',
|
|
109
|
-
py: '24px',
|
|
110
|
-
spacing: '18px'
|
|
111
|
-
}, props), {
|
|
112
|
-
children: [
|
|
113
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_chakra.HStack, {
|
|
114
|
-
justifyContent: 'space-between',
|
|
115
|
-
children: [
|
|
116
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.Heading, {
|
|
117
|
-
fontSize: '18px',
|
|
118
|
-
textTransform: 'uppercase',
|
|
119
|
-
children: title
|
|
120
|
-
}),
|
|
121
|
-
!isCloseHidden && /*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.Button, {
|
|
122
|
-
p: 0,
|
|
123
|
-
variant: 'unstyled',
|
|
124
|
-
border: 0,
|
|
125
|
-
w: 'fit-content',
|
|
126
|
-
onClick: function() {
|
|
127
|
-
close();
|
|
128
|
-
},
|
|
129
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_IconClose.default, {
|
|
130
|
-
size: '28px'
|
|
131
|
-
})
|
|
132
|
-
})
|
|
133
|
-
]
|
|
134
|
-
}),
|
|
135
|
-
children
|
|
136
|
-
]
|
|
137
|
-
}));
|
|
138
|
-
};
|
|
139
|
-
var _default = EnhancedModalCustomWrapper;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _default;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
var _chakra = require("../../chakra.js");
|
|
13
|
-
var _colors = require("../../theme/colors.js");
|
|
14
|
-
var _translations = require("../../translations.js");
|
|
15
|
-
var _useenhancedmodal = require("../use-enhanced-modal.js");
|
|
16
|
-
function _define_property(obj, key, value) {
|
|
17
|
-
if (key in obj) {
|
|
18
|
-
Object.defineProperty(obj, key, {
|
|
19
|
-
value: value,
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
obj[key] = value;
|
|
26
|
-
}
|
|
27
|
-
return obj;
|
|
28
|
-
}
|
|
29
|
-
function _object_spread(target) {
|
|
30
|
-
for(var i = 1; i < arguments.length; i++){
|
|
31
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
32
|
-
var ownKeys = Object.keys(source);
|
|
33
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
34
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
ownKeys.forEach(function(key) {
|
|
39
|
-
_define_property(target, key, source[key]);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return target;
|
|
43
|
-
}
|
|
44
|
-
function ownKeys(object, enumerableOnly) {
|
|
45
|
-
var keys = Object.keys(object);
|
|
46
|
-
if (Object.getOwnPropertySymbols) {
|
|
47
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
48
|
-
if (enumerableOnly) {
|
|
49
|
-
symbols = symbols.filter(function(sym) {
|
|
50
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
keys.push.apply(keys, symbols);
|
|
54
|
-
}
|
|
55
|
-
return keys;
|
|
56
|
-
}
|
|
57
|
-
function _object_spread_props(target, source) {
|
|
58
|
-
source = source != null ? source : {};
|
|
59
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
60
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
61
|
-
} else {
|
|
62
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
63
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return target;
|
|
67
|
-
}
|
|
68
|
-
function _object_without_properties(source, excluded) {
|
|
69
|
-
if (source == null) return {};
|
|
70
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
71
|
-
var key, i;
|
|
72
|
-
if (Object.getOwnPropertySymbols) {
|
|
73
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
74
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
75
|
-
key = sourceSymbolKeys[i];
|
|
76
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
77
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
78
|
-
target[key] = source[key];
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return target;
|
|
82
|
-
}
|
|
83
|
-
function _object_without_properties_loose(source, excluded) {
|
|
84
|
-
if (source == null) return {};
|
|
85
|
-
var target = {};
|
|
86
|
-
var sourceKeys = Object.keys(source);
|
|
87
|
-
var key, i;
|
|
88
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
89
|
-
key = sourceKeys[i];
|
|
90
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
91
|
-
target[key] = source[key];
|
|
92
|
-
}
|
|
93
|
-
return target;
|
|
94
|
-
}
|
|
95
|
-
var EnhancedModalFooter = function(_param) {
|
|
96
|
-
var sticky = _param.sticky, cancelProps = _param.cancelProps, okProps = _param.okProps, children = _param.children, suffix = _param.suffix, props = _object_without_properties(_param, [
|
|
97
|
-
"sticky",
|
|
98
|
-
"cancelProps",
|
|
99
|
-
"okProps",
|
|
100
|
-
"children",
|
|
101
|
-
"suffix"
|
|
102
|
-
]);
|
|
103
|
-
var close = (0, _useenhancedmodal.useEnhancedModal)().close;
|
|
104
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_chakra.Stack, _object_spread_props(_object_spread({
|
|
105
|
-
pos: {
|
|
106
|
-
base: 'absolute',
|
|
107
|
-
md: sticky ? 'absolute' : 'static'
|
|
108
|
-
},
|
|
109
|
-
bottom: 0,
|
|
110
|
-
left: 0,
|
|
111
|
-
right: 0,
|
|
112
|
-
py: '32px',
|
|
113
|
-
px: {
|
|
114
|
-
base: '32px',
|
|
115
|
-
md: sticky ? '32px' : '0'
|
|
116
|
-
},
|
|
117
|
-
borderTop: sticky ? "1px solid ".concat(_colors.colors.primary2) : '',
|
|
118
|
-
background: _colors.colors.white,
|
|
119
|
-
spacing: '24px',
|
|
120
|
-
zIndex: 'sticky'
|
|
121
|
-
}, props), {
|
|
122
|
-
children: [
|
|
123
|
-
children ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.Stack, {
|
|
124
|
-
direction: {
|
|
125
|
-
base: 'column-reverse',
|
|
126
|
-
md: 'row'
|
|
127
|
-
},
|
|
128
|
-
spacing: '24px',
|
|
129
|
-
children: children
|
|
130
|
-
}) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_chakra.Stack, {
|
|
131
|
-
direction: {
|
|
132
|
-
base: 'column-reverse',
|
|
133
|
-
md: 'row'
|
|
134
|
-
},
|
|
135
|
-
spacing: '24px',
|
|
136
|
-
children: [
|
|
137
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.Button, _object_spread_props(_object_spread({
|
|
138
|
-
w: 'full',
|
|
139
|
-
variant: 'outline',
|
|
140
|
-
onClick: function() {
|
|
141
|
-
return close();
|
|
142
|
-
}
|
|
143
|
-
}, cancelProps), {
|
|
144
|
-
fontSize: '10px',
|
|
145
|
-
fontWeight: '700',
|
|
146
|
-
letterSpacing: '3px',
|
|
147
|
-
children: (cancelProps === null || cancelProps === void 0 ? void 0 : cancelProps.children) ? cancelProps.children : _translations.translations.cancel
|
|
148
|
-
})),
|
|
149
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.Button, _object_spread_props(_object_spread({
|
|
150
|
-
w: 'full'
|
|
151
|
-
}, okProps), {
|
|
152
|
-
fontSize: '10px',
|
|
153
|
-
fontWeight: '700',
|
|
154
|
-
letterSpacing: '3px',
|
|
155
|
-
children: (okProps === null || okProps === void 0 ? void 0 : okProps.children) ? okProps.children : _translations.translations.confirm
|
|
156
|
-
}))
|
|
157
|
-
]
|
|
158
|
-
}),
|
|
159
|
-
suffix
|
|
160
|
-
]
|
|
161
|
-
}));
|
|
162
|
-
};
|
|
163
|
-
var _default = EnhancedModalFooter;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _default;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
var _react = require("react");
|
|
13
|
-
var _chakra = require("../../chakra.js");
|
|
14
|
-
var _react1 = require("../../utils/react.js");
|
|
15
|
-
function _define_property(obj, key, value) {
|
|
16
|
-
if (key in obj) {
|
|
17
|
-
Object.defineProperty(obj, key, {
|
|
18
|
-
value: value,
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
obj[key] = value;
|
|
25
|
-
}
|
|
26
|
-
return obj;
|
|
27
|
-
}
|
|
28
|
-
function _object_spread(target) {
|
|
29
|
-
for(var i = 1; i < arguments.length; i++){
|
|
30
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
31
|
-
var ownKeys = Object.keys(source);
|
|
32
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
33
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
34
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
ownKeys.forEach(function(key) {
|
|
38
|
-
_define_property(target, key, source[key]);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return target;
|
|
42
|
-
}
|
|
43
|
-
function _object_without_properties(source, excluded) {
|
|
44
|
-
if (source == null) return {};
|
|
45
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
46
|
-
var key, i;
|
|
47
|
-
if (Object.getOwnPropertySymbols) {
|
|
48
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
49
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
50
|
-
key = sourceSymbolKeys[i];
|
|
51
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
52
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
53
|
-
target[key] = source[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return target;
|
|
57
|
-
}
|
|
58
|
-
function _object_without_properties_loose(source, excluded) {
|
|
59
|
-
if (source == null) return {};
|
|
60
|
-
var target = {};
|
|
61
|
-
var sourceKeys = Object.keys(source);
|
|
62
|
-
var key, i;
|
|
63
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
64
|
-
key = sourceKeys[i];
|
|
65
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
66
|
-
target[key] = source[key];
|
|
67
|
-
}
|
|
68
|
-
return target;
|
|
69
|
-
}
|
|
70
|
-
var MinimalModalContent = function(_param) {
|
|
71
|
-
var _param_controls = _param.controls, open = _param_controls.open, close = _param_controls.close, modalContentConfig = _param.modalContentConfig, props = _object_without_properties(_param, [
|
|
72
|
-
"controls",
|
|
73
|
-
"modalContentConfig"
|
|
74
|
-
]);
|
|
75
|
-
var Content = modalContentConfig.content;
|
|
76
|
-
var Wrapper = modalContentConfig.noModalBody ? _react.Fragment : _chakra.ModalBody;
|
|
77
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
78
|
-
children: [
|
|
79
|
-
modalContentConfig.title ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.ModalHeader, {
|
|
80
|
-
children: modalContentConfig.title
|
|
81
|
-
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.Box, {
|
|
82
|
-
h: '32px'
|
|
83
|
-
}),
|
|
84
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_chakra.ModalCloseButton, {}),
|
|
85
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(Wrapper, {
|
|
86
|
-
children: (0, _react1.isReactNode)(Content) ? Content : /*#__PURE__*/ (0, _jsxruntime.jsx)(Content, _object_spread({
|
|
87
|
-
close: close,
|
|
88
|
-
open: open
|
|
89
|
-
}, props))
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
var _default = MinimalModalContent;
|