@dreamcommerce/aurora 3.0.0-32 → 3.0.0-33
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/build/cjs/packages/aurora/src/assets/icons/close_line.js +10 -0
- package/build/cjs/packages/aurora/src/assets/icons/close_line.js.map +1 -0
- package/build/cjs/packages/aurora/src/assets/icons/question_icon.js +10 -0
- package/build/cjs/packages/aurora/src/assets/icons/question_icon.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/action_list/components/action_list_label.js +7 -4
- package/build/cjs/packages/aurora/src/components/action_list/components/action_list_label.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/box/box.js +6 -6
- package/build/cjs/packages/aurora/src/components/divider/divider.js +4 -2
- package/build/cjs/packages/aurora/src/components/divider/divider.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal.js +98 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal_close_icon.js +24 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal_close_icon.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal_footer.js +20 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal_footer.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal_header.js +28 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal_header.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modals_wrapper.js +53 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modals_wrapper.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/hooks/use_modals.js +109 -0
- package/build/cjs/packages/aurora/src/components/modal/hooks/use_modals.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/hooks/use_modals_context.js +17 -0
- package/build/cjs/packages/aurora/src/components/modal/hooks/use_modals_context.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/modal_constants.js +24 -0
- package/build/cjs/packages/aurora/src/components/modal/modal_constants.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/modal_context.js +21 -0
- package/build/cjs/packages/aurora/src/components/modal/modal_context.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/modal_variants.js +19 -0
- package/build/cjs/packages/aurora/src/components/modal/modal_variants.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/modals_manager.js +43 -0
- package/build/cjs/packages/aurora/src/components/modal/modals_manager.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/stack/stack.js +9 -9
- package/build/cjs/packages/aurora/src/components/tooltip/components/tooltip_trigger.js +15 -1
- package/build/cjs/packages/aurora/src/components/tooltip/components/tooltip_trigger.js.map +1 -1
- package/build/cjs/packages/aurora/src/index.js +8 -0
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icons/close_line.d.ts +1 -0
- package/build/esm/packages/aurora/src/assets/icons/close_line.js +6 -0
- package/build/esm/packages/aurora/src/assets/icons/close_line.js.map +1 -0
- package/build/esm/packages/aurora/src/assets/icons/question_icon.d.ts +1 -0
- package/build/esm/packages/aurora/src/assets/icons/question_icon.js +6 -0
- package/build/esm/packages/aurora/src/assets/icons/question_icon.js.map +1 -0
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.js +7 -4
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.js.map +1 -1
- package/build/esm/packages/aurora/src/components/box/box.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/box/box.js +6 -6
- package/build/esm/packages/aurora/src/components/divider/divider.js +4 -2
- package/build/esm/packages/aurora/src/components/divider/divider.js.map +1 -1
- package/build/esm/packages/aurora/src/components/divider/divider_types.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal.js +90 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_close_icon.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_close_icon.js +16 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_close_icon.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_footer.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_footer.js +12 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_footer.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_header.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_header.js +20 -0
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_header.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/components/modals_wrapper.d.ts +6 -0
- package/build/esm/packages/aurora/src/components/modal/components/modals_wrapper.js +45 -0
- package/build/esm/packages/aurora/src/components/modal/components/modals_wrapper.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/hooks/use_modals.d.ts +12 -0
- package/build/esm/packages/aurora/src/components/modal/hooks/use_modals.js +105 -0
- package/build/esm/packages/aurora/src/components/modal/hooks/use_modals.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/hooks/use_modals_context.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/modal/hooks/use_modals_context.js +13 -0
- package/build/esm/packages/aurora/src/components/modal/hooks/use_modals_context.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/modal_constants.d.ts +13 -0
- package/build/esm/packages/aurora/src/components/modal/modal_constants.js +16 -0
- package/build/esm/packages/aurora/src/components/modal/modal_constants.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/modal_context.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/modal/modal_context.js +17 -0
- package/build/esm/packages/aurora/src/components/modal/modal_context.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/modal_types.d.ts +39 -0
- package/build/esm/packages/aurora/src/components/modal/modal_types.js +3 -0
- package/build/esm/packages/aurora/src/components/modal/modal_types.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/modal_variants.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/modal/modal_variants.js +15 -0
- package/build/esm/packages/aurora/src/components/modal/modal_variants.js.map +1 -0
- package/build/esm/packages/aurora/src/components/modal/modals_manager.d.ts +6 -0
- package/build/esm/packages/aurora/src/components/modal/modals_manager.js +35 -0
- package/build/esm/packages/aurora/src/components/modal/modals_manager.js.map +1 -0
- package/build/esm/packages/aurora/src/components/stack/stack.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/stack/stack.js +9 -9
- package/build/esm/packages/aurora/src/components/stack/stack_types.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/tooltip/components/tooltip_trigger.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/tooltip/components/tooltip_trigger.js +15 -1
- package/build/esm/packages/aurora/src/components/tooltip/components/tooltip_trigger.js.map +1 -1
- package/build/esm/packages/aurora/src/index.d.ts +3 -0
- package/build/esm/packages/aurora/src/index.js +3 -0
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/build/index.css +1 -1
- package/build/tailwind.config.js +17 -2
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var modal_context = require('./modal_context.js');
|
|
7
|
+
var modals_wrapper = require('./components/modals_wrapper.js');
|
|
8
|
+
var use_modals = require('./hooks/use_modals.js');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
|
|
14
|
+
var ModalsManager = function ModalsManager(_ref) {
|
|
15
|
+
var children = _ref.children;
|
|
16
|
+
var _useModals = use_modals['default'](),
|
|
17
|
+
modalsManagerContainerSelector = _useModals.modalsManagerContainerSelector,
|
|
18
|
+
addModal = _useModals.addModal,
|
|
19
|
+
updateModal = _useModals.updateModal,
|
|
20
|
+
getModal = _useModals.getModal,
|
|
21
|
+
showModal = _useModals.showModal,
|
|
22
|
+
hideModal = _useModals.hideModal,
|
|
23
|
+
hideAllModals = _useModals.hideAllModals,
|
|
24
|
+
openedModals = _useModals.openedModals;
|
|
25
|
+
var value = React.useMemo(function () {
|
|
26
|
+
return {
|
|
27
|
+
modalsManagerContainerSelector: modalsManagerContainerSelector,
|
|
28
|
+
addModal: addModal,
|
|
29
|
+
updateModal: updateModal,
|
|
30
|
+
getModal: getModal,
|
|
31
|
+
showModal: showModal,
|
|
32
|
+
hideModal: hideModal,
|
|
33
|
+
hideAllModals: hideAllModals,
|
|
34
|
+
openedModals: openedModals
|
|
35
|
+
};
|
|
36
|
+
}, [modalsManagerContainerSelector, addModal, updateModal, getModal, showModal, hideModal, hideAllModals, openedModals]);
|
|
37
|
+
return /*#__PURE__*/React__default['default'].createElement(modal_context.ModalsManagerContext.Provider, {
|
|
38
|
+
value: value
|
|
39
|
+
}, /*#__PURE__*/React__default['default'].createElement(modals_wrapper.ModalsWrapper, null, children));
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.ModalsManager = ModalsManager;
|
|
43
|
+
//# sourceMappingURL=modals_manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -12,13 +12,13 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
|
|
15
|
-
var _excluded = ["children", "spacing", "className", "direction", "
|
|
15
|
+
var _excluded = ["children", "spacing", "className", "direction", "justify", "align", "wrap", "as", "inline", "attributes", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "style"];
|
|
16
16
|
var stackVariants = index.cva('aurora-flex', {
|
|
17
17
|
variants: {
|
|
18
18
|
direction: _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, stack_constants.STACK_DIRECTION_TYPES.row, 'aurora-flex-row'), stack_constants.STACK_DIRECTION_TYPES.column, 'aurora-flex-col'), stack_constants.STACK_DIRECTION_TYPES.rowReverse, 'aurora-flex-row-reverse'), stack_constants.STACK_DIRECTION_TYPES.columnReverse, 'aurora-flex-col-reverse'),
|
|
19
19
|
wrap: _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, stack_constants.STACK_WRAP_TYPES.wrap, 'aurora-flex-wrap'), stack_constants.STACK_WRAP_TYPES.nowrap, 'aurora-flex-nowrap'), stack_constants.STACK_WRAP_TYPES.wrapReverse, 'aurora-flex-wrap-reverse'),
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
align: _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, stack_constants.STACK_ALIGN_ITEMS_TYPES.start, 'aurora-items-start'), stack_constants.STACK_ALIGN_ITEMS_TYPES.end, 'aurora-items-end'), stack_constants.STACK_ALIGN_ITEMS_TYPES.center, 'aurora-items-center'), stack_constants.STACK_ALIGN_ITEMS_TYPES.baseline, 'aurora-items-baseline'), stack_constants.STACK_ALIGN_ITEMS_TYPES.stretch, 'aurora-items-stretch'),
|
|
21
|
+
justify: _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, stack_constants.STACK_JUSTIFY_CONTENT_TYPES.normal, 'aurora-justify-normal'), stack_constants.STACK_JUSTIFY_CONTENT_TYPES.start, 'aurora-justify-start'), stack_constants.STACK_JUSTIFY_CONTENT_TYPES.end, 'aurora-justify-end'), stack_constants.STACK_JUSTIFY_CONTENT_TYPES.center, 'aurora-justify-center'), stack_constants.STACK_JUSTIFY_CONTENT_TYPES.between, 'aurora-justify-between'), stack_constants.STACK_JUSTIFY_CONTENT_TYPES.around, 'aurora-justify-around'), stack_constants.STACK_JUSTIFY_CONTENT_TYPES.evenly, 'aurora-justify-evenly'), stack_constants.STACK_JUSTIFY_CONTENT_TYPES.stretch, 'aurora-justify-stretch'),
|
|
22
22
|
display: {
|
|
23
23
|
inline: 'aurora-inline-flex'
|
|
24
24
|
}
|
|
@@ -30,10 +30,10 @@ var Stack = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
|
|
|
30
30
|
className = _ref.className,
|
|
31
31
|
_ref$direction = _ref.direction,
|
|
32
32
|
direction = _ref$direction === void 0 ? stack_constants.STACK_DIRECTION_TYPES.row : _ref$direction,
|
|
33
|
-
_ref$
|
|
34
|
-
|
|
35
|
-
_ref$
|
|
36
|
-
|
|
33
|
+
_ref$justify = _ref.justify,
|
|
34
|
+
justify = _ref$justify === void 0 ? stack_constants.STACK_JUSTIFY_CONTENT_TYPES.start : _ref$justify,
|
|
35
|
+
_ref$align = _ref.align,
|
|
36
|
+
align = _ref$align === void 0 ? stack_constants.STACK_ALIGN_ITEMS_TYPES.start : _ref$align,
|
|
37
37
|
_ref$wrap = _ref.wrap,
|
|
38
38
|
wrap = _ref$wrap === void 0 ? stack_constants.STACK_WRAP_TYPES.nowrap : _ref$wrap,
|
|
39
39
|
_ref$as = _ref.as,
|
|
@@ -68,8 +68,8 @@ var Stack = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
|
|
|
68
68
|
ref: internalRef,
|
|
69
69
|
className: cn.cn(stackVariants({
|
|
70
70
|
direction: direction,
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
justify: justify,
|
|
72
|
+
align: align,
|
|
73
73
|
wrap: wrap,
|
|
74
74
|
display: display
|
|
75
75
|
}), className, _rollupPluginBabelHelpers.defineProperty({}, "aurora-gap-".concat(spacing), !!spacing)),
|
|
@@ -2,9 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
5
7
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
8
|
+
var question_icon = require('../../../assets/icons/question_icon.js');
|
|
6
9
|
|
|
7
|
-
var
|
|
10
|
+
var _excluded = ["className", "children"];
|
|
11
|
+
var TooltipTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12
|
+
var className = _ref.className,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React.createElement(TooltipPrimitive.Trigger, _rollupPluginBabelHelpers.objectSpread2({
|
|
16
|
+
className: className
|
|
17
|
+
}, props), children ? children : /*#__PURE__*/React.createElement(question_icon.QuestionLineIcon, {
|
|
18
|
+
size: 16
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
TooltipTrigger.displayName = TooltipPrimitive.Trigger.displayName;
|
|
8
22
|
|
|
9
23
|
exports.TooltipTrigger = TooltipTrigger;
|
|
10
24
|
//# sourceMappingURL=tooltip_trigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -25,6 +25,7 @@ var box = require('./components/box/box.js');
|
|
|
25
25
|
var typography_constants = require('./components/typography/typography_constants.js');
|
|
26
26
|
var css_line_height_tokens = require('./constants/css_tokens/css_line_height_tokens.js');
|
|
27
27
|
var typography = require('./components/typography/typography.js');
|
|
28
|
+
var divider_constants = require('./components/divider/divider_constants.js');
|
|
28
29
|
var divider = require('./components/divider/divider.js');
|
|
29
30
|
var action_list_label = require('./components/action_list/components/action_list_label.js');
|
|
30
31
|
var action_list_group = require('./components/action_list/components/action_list_group.js');
|
|
@@ -67,6 +68,8 @@ var popover = require('./components/popover/popover.js');
|
|
|
67
68
|
var popover_trigger = require('./components/popover/components/popover_trigger.js');
|
|
68
69
|
var link_constants = require('./components/link/link_constants.js');
|
|
69
70
|
var link = require('./components/link/link.js');
|
|
71
|
+
var modal = require('./components/modal/components/modal/modal.js');
|
|
72
|
+
var modals_manager = require('./components/modal/modals_manager.js');
|
|
70
73
|
|
|
71
74
|
|
|
72
75
|
|
|
@@ -100,6 +103,9 @@ exports.TYPOGRAPHY_TRANSFORM_TYPES = typography_constants.TYPOGRAPHY_TRANSFORM_T
|
|
|
100
103
|
exports.TYPOGRAPHY_WEIGHT_TYPES = typography_constants.TYPOGRAPHY_WEIGHT_TYPES;
|
|
101
104
|
exports.CSS_LINE_HEIGHT_TOKENS = css_line_height_tokens.CSS_LINE_HEIGHT_TOKENS;
|
|
102
105
|
exports.Typography = typography.Typography;
|
|
106
|
+
exports.DIVIDER_ORIENTATION = divider_constants.DIVIDER_ORIENTATION;
|
|
107
|
+
exports.DIVIDER_THICKNESS = divider_constants.DIVIDER_THICKNESS;
|
|
108
|
+
exports.DIVIDER_VARIANTS = divider_constants.DIVIDER_VARIANTS;
|
|
103
109
|
exports.Divider = divider.Divider;
|
|
104
110
|
exports.ActionListLabel = action_list_label.ActionListLabel;
|
|
105
111
|
exports.ActionListGroup = action_list_group.ActionListGroup;
|
|
@@ -148,4 +154,6 @@ exports.LINK_DECORATION_TYPES = link_constants.LINK_DECORATION_TYPES;
|
|
|
148
154
|
exports.LINK_SIZE_TYPES = link_constants.LINK_SIZE_TYPES;
|
|
149
155
|
exports.LINK_VARIANT_TYPES = link_constants.LINK_VARIANT_TYPES;
|
|
150
156
|
exports.Link = link.Link;
|
|
157
|
+
exports.Modal = modal.Modal;
|
|
158
|
+
exports.ModalsManager = modals_manager.ModalsManager;
|
|
151
159
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CloseLine: import("@remixicon/react").RemixiconComponentType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const QuestionLineIcon: import("@remixicon/react").RemixiconComponentType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { TDividerProps } from "../../divider/divider_types";
|
|
3
|
-
export declare const ActionListLabel: ({ children }: PropsWithChildren<TDividerProps>) => React.JSX.Element;
|
|
3
|
+
export declare const ActionListLabel: ({ children, ...props }: PropsWithChildren<TDividerProps>) => React.JSX.Element;
|
package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
3
|
import { Stack } from '../../stack/stack.js';
|
|
3
4
|
import { Box } from '../../box/box.js';
|
|
4
5
|
import { Typography } from '../../typography/typography.js';
|
|
5
6
|
import { Divider } from '../../divider/divider.js';
|
|
6
7
|
|
|
8
|
+
var _excluded = ["children"];
|
|
7
9
|
var ActionListLabel = function ActionListLabel(_ref) {
|
|
8
|
-
var children = _ref.children
|
|
10
|
+
var children = _ref.children,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
9
12
|
return /*#__PURE__*/React.createElement(Box, {
|
|
10
13
|
paddings: {
|
|
11
14
|
pl: '3',
|
|
@@ -14,15 +17,15 @@ var ActionListLabel = function ActionListLabel(_ref) {
|
|
|
14
17
|
pr: '0'
|
|
15
18
|
}
|
|
16
19
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
align: "center",
|
|
21
|
+
justify: "center",
|
|
19
22
|
spacing: "2.5"
|
|
20
23
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
21
24
|
className: "aurora-whitespace-nowrap",
|
|
22
25
|
size: "s",
|
|
23
26
|
color: "subtle",
|
|
24
27
|
weight: "bold"
|
|
25
|
-
}, children), /*#__PURE__*/React.createElement(Divider,
|
|
28
|
+
}, children), /*#__PURE__*/React.createElement(Divider, _objectSpread2({}, props))));
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
export { ActionListLabel };
|
package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const Box: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
3
3
|
direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
justify?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch" | undefined;
|
|
5
|
+
align?: "start" | "end" | "center" | "stretch" | "baseline" | undefined;
|
|
6
6
|
spacing?: "0" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "90" | undefined;
|
|
7
7
|
wrap?: string | undefined;
|
|
8
8
|
children?: React.ReactNode;
|
|
@@ -4,7 +4,7 @@ import { BOX_COMPONENT_TYPES } from './box_constants.js';
|
|
|
4
4
|
import { cn } from '../../utilities/cn.js';
|
|
5
5
|
import { Stack } from '../stack/stack.js';
|
|
6
6
|
|
|
7
|
-
var _excluded = ["shadow", "as", "backgroundColor", "color", "borderColor", "borderStyle", "borderWidth", "borderRadius", "paddings", "zIndex", "position", "children", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "style", "className", "direction", "
|
|
7
|
+
var _excluded = ["shadow", "as", "backgroundColor", "color", "borderColor", "borderStyle", "borderWidth", "borderRadius", "paddings", "zIndex", "position", "children", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "style", "className", "direction", "justify", "align", "spacing", "wrap", "inline"];
|
|
8
8
|
var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9
9
|
var _cn;
|
|
10
10
|
var shadow = _ref.shadow,
|
|
@@ -31,15 +31,15 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
31
31
|
style = _ref.style,
|
|
32
32
|
className = _ref.className,
|
|
33
33
|
direction = _ref.direction,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
justify = _ref.justify,
|
|
35
|
+
align = _ref.align,
|
|
36
36
|
spacing = _ref.spacing,
|
|
37
37
|
wrap = _ref.wrap,
|
|
38
38
|
inline = _ref.inline,
|
|
39
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
40
|
var borderWidthWithSides = borderWidth;
|
|
41
41
|
var borderRadiusWithSides = borderRadius;
|
|
42
|
-
var anyStackPropertiesSet = direction ||
|
|
42
|
+
var anyStackPropertiesSet = direction || justify || align || spacing || wrap || inline;
|
|
43
43
|
return /*#__PURE__*/React.createElement(anyStackPropertiesSet ? Stack : as, _objectSpread2({
|
|
44
44
|
ref: ref,
|
|
45
45
|
as: as,
|
|
@@ -54,8 +54,8 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
54
54
|
maxHeight: maxHeight
|
|
55
55
|
}, style !== null && style !== void 0 ? style : {}),
|
|
56
56
|
direction: direction,
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
justify: justify,
|
|
58
|
+
align: align,
|
|
59
59
|
spacing: spacing,
|
|
60
60
|
wrap: wrap,
|
|
61
61
|
inline: inline
|
|
@@ -5,13 +5,14 @@ import { DIVIDER_ORIENTATION } from './divider_constants.js';
|
|
|
5
5
|
import { dividerVariants } from './divider_variants.js';
|
|
6
6
|
import { Root } from '@radix-ui/react-separator';
|
|
7
7
|
|
|
8
|
-
var _excluded = ["className", "orientation", "color", "thickness", "variant", "decorative"];
|
|
8
|
+
var _excluded = ["className", "orientation", "color", "thickness", "style", "variant", "decorative"];
|
|
9
9
|
var Divider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10
10
|
var className = _ref.className,
|
|
11
11
|
_ref$orientation = _ref.orientation,
|
|
12
12
|
orientation = _ref$orientation === void 0 ? DIVIDER_ORIENTATION.horizontal : _ref$orientation,
|
|
13
13
|
color = _ref.color,
|
|
14
14
|
thickness = _ref.thickness,
|
|
15
|
+
style = _ref.style,
|
|
15
16
|
variant = _ref.variant,
|
|
16
17
|
_ref$decorative = _ref.decorative,
|
|
17
18
|
decorative = _ref$decorative === void 0 ? true : _ref$decorative,
|
|
@@ -24,7 +25,8 @@ var Divider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24
25
|
variant: variant,
|
|
25
26
|
thickness: thickness,
|
|
26
27
|
orientation: orientation
|
|
27
|
-
}), className)
|
|
28
|
+
}), className),
|
|
29
|
+
style: style
|
|
28
30
|
}, props));
|
|
29
31
|
});
|
|
30
32
|
Divider.displayName = 'Divider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { VariantProps } from 'class-variance-authority';
|
|
2
3
|
import { dividerVariants } from "./divider_variants";
|
|
3
4
|
import { SeparatorProps } from '@radix-ui/react-separator';
|
|
@@ -5,4 +6,5 @@ import { DIVIDER_ORIENTATION } from "./divider_constants";
|
|
|
5
6
|
import { Any } from 'ts-toolbelt';
|
|
6
7
|
export interface TDividerProps extends Omit<SeparatorProps, 'orientation'>, VariantProps<typeof dividerVariants> {
|
|
7
8
|
orientation?: Any.Keys<typeof DIVIDER_ORIENTATION>;
|
|
9
|
+
style?: React.CSSProperties;
|
|
8
10
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { slicedToArray as _slicedToArray } from '../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { cn } from '../../../../utilities/cn.js';
|
|
4
|
+
import { MODAL_VISIBILITY_STATE, MODAL_SLIDE_FADE_DURATION, MODAL_WIDTH_VARIANT } from '../../modal_constants.js';
|
|
5
|
+
import { ModalFooter } from './modal_footer.js';
|
|
6
|
+
import { ModalHeader } from './modal_header.js';
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
8
|
+
import { modalVariants } from '../../modal_variants.js';
|
|
9
|
+
import { useModalsContext } from '../../hooks/use_modals_context.js';
|
|
10
|
+
|
|
11
|
+
var Modal = function Modal(_ref) {
|
|
12
|
+
var name = _ref.name,
|
|
13
|
+
hideAllModalsOnClose = _ref.hideAllModalsOnClose,
|
|
14
|
+
_ref$width = _ref.width,
|
|
15
|
+
width = _ref$width === void 0 ? MODAL_WIDTH_VARIANT.m : _ref$width,
|
|
16
|
+
_ref$hasCloseIcon = _ref.hasCloseIcon,
|
|
17
|
+
hasCloseIcon = _ref$hasCloseIcon === void 0 ? true : _ref$hasCloseIcon,
|
|
18
|
+
onCloseAction = _ref.onCloseAction,
|
|
19
|
+
header = _ref.header,
|
|
20
|
+
footer = _ref.footer,
|
|
21
|
+
children = _ref.children;
|
|
22
|
+
var _useState = useState(false),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
visibleClass = _useState2[0],
|
|
25
|
+
setVisibleClass = _useState2[1];
|
|
26
|
+
var _useModalsContext = useModalsContext(),
|
|
27
|
+
modalsManagerContainerSelector = _useModalsContext.modalsManagerContainerSelector,
|
|
28
|
+
addModal = _useModalsContext.addModal,
|
|
29
|
+
getModal = _useModalsContext.getModal,
|
|
30
|
+
hideModal = _useModalsContext.hideModal,
|
|
31
|
+
hideAllModals = _useModalsContext.hideAllModals;
|
|
32
|
+
var $modalsManagerContainer = document.querySelector(modalsManagerContainerSelector);
|
|
33
|
+
var modal = getModal(name);
|
|
34
|
+
var _useState3 = useState(false),
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
renderModal = _useState4[0],
|
|
37
|
+
setRenderModal = _useState4[1];
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
addModal({
|
|
40
|
+
name: name,
|
|
41
|
+
visibilityState: MODAL_VISIBILITY_STATE.none,
|
|
42
|
+
width: width
|
|
43
|
+
});
|
|
44
|
+
}, []);
|
|
45
|
+
useEffect(function () {
|
|
46
|
+
var showModalTimeout;
|
|
47
|
+
var hideModalTimeout;
|
|
48
|
+
if ((modal === null || modal === void 0 ? void 0 : modal.visibilityState) === MODAL_VISIBILITY_STATE.visible) {
|
|
49
|
+
setRenderModal(true);
|
|
50
|
+
showModalTimeout = setTimeout(function () {
|
|
51
|
+
setVisibleClass(true);
|
|
52
|
+
}, MODAL_SLIDE_FADE_DURATION);
|
|
53
|
+
}
|
|
54
|
+
if ((modal === null || modal === void 0 ? void 0 : modal.visibilityState) === MODAL_VISIBILITY_STATE.hidden) {
|
|
55
|
+
setVisibleClass(false);
|
|
56
|
+
}
|
|
57
|
+
if ((modal === null || modal === void 0 ? void 0 : modal.visibilityState) === MODAL_VISIBILITY_STATE.none) {
|
|
58
|
+
setVisibleClass(false);
|
|
59
|
+
hideModalTimeout = setTimeout(function () {
|
|
60
|
+
setRenderModal(false);
|
|
61
|
+
}, MODAL_SLIDE_FADE_DURATION);
|
|
62
|
+
}
|
|
63
|
+
return function () {
|
|
64
|
+
clearTimeout(showModalTimeout);
|
|
65
|
+
clearTimeout(hideModalTimeout);
|
|
66
|
+
};
|
|
67
|
+
}, [modal]);
|
|
68
|
+
var handleCloseModal = function handleCloseModal() {
|
|
69
|
+
hideAllModalsOnClose ? hideAllModals(onCloseAction) : hideModal(name, onCloseAction);
|
|
70
|
+
};
|
|
71
|
+
if (!$modalsManagerContainer) return null;
|
|
72
|
+
return renderModal ? /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", {
|
|
73
|
+
"data-modal-id": name,
|
|
74
|
+
"data-test-id": "modal",
|
|
75
|
+
className: cn(modalVariants({
|
|
76
|
+
width: width
|
|
77
|
+
}), visibleClass ? 'aurora-opacity-100 aurora-animate-modal-slide-in' : 'aurora-opacity-0 aurora-animate-modal-slide-out')
|
|
78
|
+
}, header && /*#__PURE__*/React.createElement(ModalHeader, {
|
|
79
|
+
hasCloseIcon: hasCloseIcon,
|
|
80
|
+
text: header.text,
|
|
81
|
+
onClose: handleCloseModal
|
|
82
|
+
}), children && /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: "aurora-overflow-y-auto"
|
|
84
|
+
}, children), footer && /*#__PURE__*/React.createElement(ModalFooter, {
|
|
85
|
+
text: footer.text
|
|
86
|
+
})), $modalsManagerContainer) : null;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export { Modal };
|
|
90
|
+
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CloseLine } from '../../../../assets/icons/close_line.js';
|
|
3
|
+
|
|
4
|
+
var ModalCloseIcon = function ModalCloseIcon(_ref) {
|
|
5
|
+
var onClose = _ref.onClose;
|
|
6
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
7
|
+
className: "aurora-p-1 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg-transparent hover:aurora-bg-hover",
|
|
8
|
+
onClick: function onClick() {
|
|
9
|
+
return onClose();
|
|
10
|
+
},
|
|
11
|
+
"data-test-id": "close-modal"
|
|
12
|
+
}, /*#__PURE__*/React.createElement(CloseLine, null));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { ModalCloseIcon };
|
|
16
|
+
//# sourceMappingURL=modal_close_icon.js.map
|
package/build/esm/packages/aurora/src/components/modal/components/modal/modal_close_icon.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
var ModalFooter = function ModalFooter(_ref) {
|
|
4
|
+
var text = _ref.text;
|
|
5
|
+
return /*#__PURE__*/React.createElement("footer", {
|
|
6
|
+
className: 'aurora-flex aurora-items-center aurora-justify-end aurora-gap-3 aurora-mt-5',
|
|
7
|
+
"data-test-id": "modal-footer"
|
|
8
|
+
}, text);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { ModalFooter };
|
|
12
|
+
//# sourceMappingURL=modal_footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModalCloseIcon } from './modal_close_icon.js';
|
|
3
|
+
|
|
4
|
+
var ModalHeader = function ModalHeader(_ref) {
|
|
5
|
+
var _ref$text = _ref.text,
|
|
6
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
7
|
+
onClose = _ref.onClose,
|
|
8
|
+
hasCloseIcon = _ref.hasCloseIcon;
|
|
9
|
+
return /*#__PURE__*/React.createElement("header", {
|
|
10
|
+
className: 'aurora-flex aurora-items-center aurora-justify-between aurora-mb-5',
|
|
11
|
+
"data-test-id": "modal-header"
|
|
12
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
13
|
+
className: "aurora-font-bold aurora-text-xl"
|
|
14
|
+
}, text), hasCloseIcon && /*#__PURE__*/React.createElement(ModalCloseIcon, {
|
|
15
|
+
onClose: onClose
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { ModalHeader };
|
|
20
|
+
//# sourceMappingURL=modal_header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { slicedToArray as _slicedToArray } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { MODALS_WRAPPER_BACKDROP_FADE_DURATION, MODALS_CONTENT_ID } from '../modal_constants.js';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
import { useModalsContext } from '../hooks/use_modals_context.js';
|
|
6
|
+
|
|
7
|
+
var ModalsWrapper = function ModalsWrapper(_ref) {
|
|
8
|
+
var children = _ref.children;
|
|
9
|
+
var _useState = useState(false),
|
|
10
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11
|
+
showWrapper = _useState2[0],
|
|
12
|
+
setShowWrapper = _useState2[1];
|
|
13
|
+
var _useState3 = useState(false),
|
|
14
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
15
|
+
visibleClass = _useState4[0],
|
|
16
|
+
setVisibleClass = _useState4[1];
|
|
17
|
+
var _useModalsContext = useModalsContext(),
|
|
18
|
+
openedModals = _useModalsContext.openedModals;
|
|
19
|
+
useEffect(function () {
|
|
20
|
+
var showWrapperTimeout;
|
|
21
|
+
if (openedModals.length) {
|
|
22
|
+
setShowWrapper(true);
|
|
23
|
+
setVisibleClass(true);
|
|
24
|
+
} else {
|
|
25
|
+
setVisibleClass(false);
|
|
26
|
+
showWrapperTimeout = setTimeout(function () {
|
|
27
|
+
setShowWrapper(false);
|
|
28
|
+
}, MODALS_WRAPPER_BACKDROP_FADE_DURATION);
|
|
29
|
+
}
|
|
30
|
+
return function () {
|
|
31
|
+
return clearTimeout(showWrapperTimeout);
|
|
32
|
+
};
|
|
33
|
+
}, [openedModals]);
|
|
34
|
+
return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", null, showWrapper && (/*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "aurora-fixed aurora-flex aurora-items-center aurora-justify-center aurora-top-0 aurora-left-0 aurora-w-full aurora-h-full aurora-z-20 aurora-p-4"
|
|
36
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "aurora-absolute aurora-inset-x-0 aurora-inset-y-0 aurora-bg-inverse aurora-z-10 aurora-transition-opacity aurora-duration-300 aurora-animate-modal-backdrop-fade-in ".concat(visibleClass ? 'aurora-opacity-70' : 'aurora-opacity-0')
|
|
38
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
id: MODALS_CONTENT_ID,
|
|
40
|
+
className: "aurora-flex aurora-items-center aurora-justify-center aurora-z-30"
|
|
41
|
+
}))), children), document.body);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { ModalsWrapper };
|
|
45
|
+
//# sourceMappingURL=modals_wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IModal } from '../modal_types';
|
|
2
|
+
declare const useModals: () => {
|
|
3
|
+
modalsManagerContainerSelector: string;
|
|
4
|
+
addModal: (modal: IModal) => void;
|
|
5
|
+
updateModal: (modal: IModal) => void;
|
|
6
|
+
getModal: (modalName: string) => IModal | undefined;
|
|
7
|
+
showModal: (modalName: string) => void;
|
|
8
|
+
hideModal: (modalName: string, onCloseAction: () => void | undefined) => void;
|
|
9
|
+
hideAllModals: (onCloseAction: () => void | undefined) => void;
|
|
10
|
+
openedModals: string[];
|
|
11
|
+
};
|
|
12
|
+
export default useModals;
|