@dreamcommerce/aurora 3.0.0-52 → 3.0.0-53
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/external/react-pro-sidebar/dist/index.es.js +5453 -0
- package/build/cjs/external/react-pro-sidebar/dist/index.es.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar_new/sidebar.js +18 -0
- package/build/cjs/packages/aurora/src/components/sidebar_new/sidebar.js.map +1 -0
- package/build/cjs/packages/aurora/src/index.js +1 -7
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/external/react-pro-sidebar/dist/index.es.js +5415 -0
- package/build/esm/external/react-pro-sidebar/dist/index.es.js.map +1 -0
- package/build/esm/packages/aurora/src/assets/icons/arrow_left_s_line_icon.js +2 -5
- package/build/esm/packages/aurora/src/assets/icons/arrow_left_s_line_icon.js.map +1 -1
- package/build/esm/packages/aurora/src/components/accordion/context/accordion_context.js +2 -2
- package/build/esm/packages/aurora/src/components/action_list/action_list.js +2 -2
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_content.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_divider.js +2 -2
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_group.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_item.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.js +5 -5
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_radio_group.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_radio_item.js +4 -4
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_sub_content.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_sub_trigger.js +5 -5
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_trigger.js +3 -3
- package/build/esm/packages/aurora/src/components/box/box.js +3 -3
- package/build/esm/packages/aurora/src/components/button/button.js +3 -3
- package/build/esm/packages/aurora/src/components/control/control.js +2 -2
- package/build/esm/packages/aurora/src/components/controls/input_control/input_control.js +5 -5
- package/build/esm/packages/aurora/src/components/controls/switch_control/switch_control.js +5 -5
- package/build/esm/packages/aurora/src/components/divider/divider.js +3 -3
- package/build/esm/packages/aurora/src/components/icon_button/icon_button.js +4 -4
- package/build/esm/packages/aurora/src/components/input/input.js +6 -6
- package/build/esm/packages/aurora/src/components/label/components/label_content.js +4 -4
- package/build/esm/packages/aurora/src/components/link/link.js +3 -3
- package/build/esm/packages/aurora/src/components/loader/loader.js +2 -2
- package/build/esm/packages/aurora/src/components/message_box/message_box.js +11 -11
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal.js +5 -5
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_close_icon.js +3 -3
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_footer.js +2 -2
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_header.js +4 -4
- package/build/esm/packages/aurora/src/components/modal/components/modals_wrapper.js +4 -4
- package/build/esm/packages/aurora/src/components/modal/modals_manager.js +3 -3
- package/build/esm/packages/aurora/src/components/segmented_control/components/segmented_control_item.js +4 -4
- package/build/esm/packages/aurora/src/components/segmented_control/context/segmented_control_context.js +2 -2
- package/build/esm/packages/aurora/src/components/segmented_control/segmented_control.js +4 -4
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_toggle.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_toggle.js +24 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_toggle.js.map +1 -0
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_context.js +3 -5
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_context.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_prvider.js +38 -56
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_prvider.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/hooks/use_sidebar.js +8 -11
- package/build/esm/packages/aurora/src/components/sidebar/hooks/use_sidebar.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/sidebar.js +25 -52
- package/build/esm/packages/aurora/src/components/sidebar/sidebar.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_constants.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_constants.js +8 -6
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_constants.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_types.d.ts +4 -1
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar.js +10 -0
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar.js.map +1 -0
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar_types_types.d.ts +21 -0
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar_types_types.js +3 -0
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar_types_types.js.map +1 -0
- package/build/esm/packages/aurora/src/components/stack/stack.js +3 -3
- package/build/esm/packages/aurora/src/components/switch/switch.js +4 -4
- package/build/esm/packages/aurora/src/components/tabs/context/tabs_context.js +2 -2
- package/build/esm/packages/aurora/src/components/tabs/tabs.js +4 -4
- package/build/esm/packages/aurora/src/components/typography/typography.js +2 -2
- package/build/esm/packages/aurora/src/index.d.ts +1 -4
- package/build/esm/packages/aurora/src/index.js +1 -4
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/build/index.css +1 -1
- package/package.json +4 -5
- package/build/cjs/packages/aurora/src/assets/icons/arrow_left_s_line_icon.js +0 -10
- package/build/cjs/packages/aurora/src/assets/icons/arrow_left_s_line_icon.js.map +0 -1
- package/build/cjs/packages/aurora/src/components/sidebar/components/sidebar_trigger.js +0 -42
- package/build/cjs/packages/aurora/src/components/sidebar/components/sidebar_trigger.js.map +0 -1
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_context.js +0 -14
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_context.js.map +0 -1
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_prvider.js +0 -62
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_prvider.js.map +0 -1
- package/build/cjs/packages/aurora/src/components/sidebar/hooks/use_sidebar.js +0 -21
- package/build/cjs/packages/aurora/src/components/sidebar/hooks/use_sidebar.js.map +0 -1
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar.js +0 -58
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar.js.map +0 -1
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar_constants.js +0 -11
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar_constants.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_close.d.ts +0 -2
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_close.js +0 -3
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_close.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_content.d.ts +0 -3
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_content.js +0 -14
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_content.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_header.d.ts +0 -5
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_header.js +0 -5
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_header.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_overlay.d.ts +0 -2
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_overlay.js +0 -6
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_overlay.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_portal.d.ts +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_portal.js +0 -3
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_portal.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_title.d.ts +0 -2
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_title.js +0 -16
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_title.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_trigger.d.ts +0 -2
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_trigger.js +0 -3
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_trigger.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/context/drawer_context.d.ts +0 -5
- package/build/esm/packages/aurora/src/components/drawer/context/drawer_context.js +0 -8
- package/build/esm/packages/aurora/src/components/drawer/context/drawer_context.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/drawer.d.ts +0 -6
- package/build/esm/packages/aurora/src/components/drawer/drawer.js +0 -8
- package/build/esm/packages/aurora/src/components/drawer/drawer.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/drawer_constants.d.ts +0 -6
- package/build/esm/packages/aurora/src/components/drawer/drawer_constants.js +0 -7
- package/build/esm/packages/aurora/src/components/drawer/drawer_constants.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/drawer_types.d.ts +0 -6
- package/build/esm/packages/aurora/src/components/drawer/drawer_types.js +0 -3
- package/build/esm/packages/aurora/src/components/drawer/drawer_types.js.map +0 -1
- package/build/esm/packages/aurora/src/components/drawer/drawer_variants.d.ts +0 -3
- package/build/esm/packages/aurora/src/components/drawer/drawer_variants.js +0 -15
- package/build/esm/packages/aurora/src/components/drawer/drawer_variants.js.map +0 -1
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_trigger.d.ts +0 -3
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_trigger.js +0 -34
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_trigger.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../utilities/cn.js';
|
|
4
4
|
import { linkVariants } from './link_variants.js';
|
|
5
5
|
|
|
6
6
|
var _excluded = ["children", "size", "variant", "decoration"];
|
|
7
|
-
var Link = /*#__PURE__*/
|
|
7
|
+
var Link = /*#__PURE__*/React__default.forwardRef(function (_ref) {
|
|
8
8
|
var children = _ref.children,
|
|
9
9
|
size = _ref.size,
|
|
10
10
|
variant = _ref.variant,
|
|
11
11
|
decoration = _ref.decoration,
|
|
12
12
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/React__default.createElement("a", _objectSpread2({
|
|
14
14
|
className: cn(linkVariants({
|
|
15
15
|
size: size,
|
|
16
16
|
variant: variant,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../utilities/cn.js';
|
|
4
4
|
import { loaderVariants } from './loader_variants.js';
|
|
@@ -8,7 +8,7 @@ var Loader = function Loader(_ref) {
|
|
|
8
8
|
var className = _ref.className,
|
|
9
9
|
variant = _ref.variant,
|
|
10
10
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/React__default.createElement("div", _objectSpread2({
|
|
12
12
|
className: cn(loaderVariants({
|
|
13
13
|
variant: variant
|
|
14
14
|
}), className)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { cn } from '../../utilities/cn.js';
|
|
3
3
|
import { Typography } from '../typography/typography.js';
|
|
4
4
|
import { MESSAGE_BOX_ICONS, MESSAGE_BOX_ICON_COLORS, MESSAGE_BOX_VARIANTS } from './message_box_constants.js';
|
|
@@ -19,32 +19,32 @@ var MessageBox = function MessageBox(_ref) {
|
|
|
19
19
|
var Icon = MESSAGE_BOX_ICONS[variant];
|
|
20
20
|
var iconColor = MESSAGE_BOX_ICON_COLORS[variant];
|
|
21
21
|
var canClose = !!onClose;
|
|
22
|
-
return /*#__PURE__*/
|
|
22
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
23
23
|
className: cn(classnames(fullWidth ? 'aurora-w-full aurora-border-none' : 'aurora-w-[272px] aurora-border aurora-rounded-4', children && !header && !fullWidth && 'aurora-shadow-l'), messageBoxVariants({
|
|
24
24
|
variant: variant
|
|
25
25
|
}), className)
|
|
26
|
-
}, showIcon ? (/*#__PURE__*/
|
|
26
|
+
}, showIcon ? (/*#__PURE__*/React__default.createElement("div", {
|
|
27
27
|
className: classnames(children && !fullWidth && 'aurora-h-full aurora-flex aurora-self-start aurora-mt-1')
|
|
28
|
-
}, /*#__PURE__*/
|
|
28
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
29
29
|
className: classnames('aurora-mr-2 aurora-w-4 aurora-h-4', iconColor)
|
|
30
|
-
}))) : null, /*#__PURE__*/
|
|
30
|
+
}))) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
31
31
|
className: "aurora-flex aurora-justify-between aurora-items-center aurora-w-full aurora-max-w-7xl"
|
|
32
|
-
}, /*#__PURE__*/
|
|
32
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
33
33
|
className: "aurora-flex aurora-max-w-full aurora-w-full"
|
|
34
|
-
}, header && (/*#__PURE__*/
|
|
34
|
+
}, header && (/*#__PURE__*/React__default.createElement("div", {
|
|
35
35
|
className: "aurora-flex aurora-items-center"
|
|
36
|
-
}, /*#__PURE__*/
|
|
36
|
+
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
37
37
|
className: "aurora-text-s aurora-font-semibold aurora-text"
|
|
38
|
-
}, header))), /*#__PURE__*/
|
|
38
|
+
}, header))), /*#__PURE__*/React__default.createElement(Typography, {
|
|
39
39
|
className: "aurora-w-full",
|
|
40
40
|
size: "xs"
|
|
41
|
-
}, children)), canClose && (/*#__PURE__*/
|
|
41
|
+
}, children)), canClose && (/*#__PURE__*/React__default.createElement("button", {
|
|
42
42
|
className: classnames(children && !fullWidth && 'aurora-h-full aurora-flex aurora-self-start aurora-mt-1'),
|
|
43
43
|
onClick: function onClick(e) {
|
|
44
44
|
e.stopPropagation();
|
|
45
45
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
46
46
|
}
|
|
47
|
-
}, /*#__PURE__*/
|
|
47
|
+
}, /*#__PURE__*/React__default.createElement(CloseLineIcon, {
|
|
48
48
|
className: classnames('aurora-mx-2 aurora-w-4 aurora-h-4 aurora-fill')
|
|
49
49
|
})))));
|
|
50
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
2
|
import { slicedToArray as _slicedToArray } from '../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../../../utilities/cn.js';
|
|
4
4
|
import { MODAL_VISIBILITY_STATE, MODAL_SLIDE_FADE_DURATION, MODAL_WIDTH_VARIANT } from '../../modal_constants.js';
|
|
@@ -69,19 +69,19 @@ var Modal = function Modal(_ref) {
|
|
|
69
69
|
hideAllModalsOnClose ? hideAllModals(onCloseAction) : hideModal(name, onCloseAction);
|
|
70
70
|
};
|
|
71
71
|
if (!$modalsManagerContainer) return null;
|
|
72
|
-
return renderModal ? /*#__PURE__*/createPortal(/*#__PURE__*/
|
|
72
|
+
return renderModal ? /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", {
|
|
73
73
|
"data-modal-id": name,
|
|
74
74
|
"data-test-id": "modal",
|
|
75
75
|
className: cn(modalVariants({
|
|
76
76
|
width: width
|
|
77
77
|
}), visibleClass ? 'aurora-opacity-100 aurora-animate-modal-slide-in' : 'aurora-opacity-0 aurora-animate-modal-slide-out')
|
|
78
|
-
}, header && /*#__PURE__*/
|
|
78
|
+
}, header && /*#__PURE__*/React__default.createElement(ModalHeader, {
|
|
79
79
|
hasCloseIcon: hasCloseIcon,
|
|
80
80
|
text: header.text,
|
|
81
81
|
onClose: handleCloseModal
|
|
82
|
-
}), children && /*#__PURE__*/
|
|
82
|
+
}), children && /*#__PURE__*/React__default.createElement("div", {
|
|
83
83
|
className: "aurora-overflow-y-auto"
|
|
84
|
-
}, children), footer && /*#__PURE__*/
|
|
84
|
+
}, children), footer && /*#__PURE__*/React__default.createElement(ModalFooter, {
|
|
85
85
|
text: footer.text
|
|
86
86
|
})), $modalsManagerContainer) : null;
|
|
87
87
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { CloseLine } from '../../../../assets/icons/close_line.js';
|
|
3
3
|
|
|
4
4
|
var ModalCloseIcon = function ModalCloseIcon(_ref) {
|
|
5
5
|
var onClose = _ref.onClose;
|
|
6
|
-
return /*#__PURE__*/
|
|
6
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
7
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
8
|
onClick: function onClick() {
|
|
9
9
|
return onClose();
|
|
10
10
|
},
|
|
11
11
|
"data-test-id": "close-modal"
|
|
12
|
-
}, /*#__PURE__*/
|
|
12
|
+
}, /*#__PURE__*/React__default.createElement(CloseLine, null));
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export { ModalCloseIcon };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
var ModalFooter = function ModalFooter(_ref) {
|
|
4
4
|
var text = _ref.text;
|
|
5
|
-
return /*#__PURE__*/
|
|
5
|
+
return /*#__PURE__*/React__default.createElement("footer", {
|
|
6
6
|
className: 'aurora-flex aurora-items-center aurora-justify-end aurora-gap-3 aurora-mt-5',
|
|
7
7
|
"data-test-id": "modal-footer"
|
|
8
8
|
}, text);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { ModalCloseIcon } from './modal_close_icon.js';
|
|
3
3
|
|
|
4
4
|
var ModalHeader = function ModalHeader(_ref) {
|
|
@@ -6,12 +6,12 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
6
6
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
7
7
|
onClose = _ref.onClose,
|
|
8
8
|
hasCloseIcon = _ref.hasCloseIcon;
|
|
9
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/React__default.createElement("header", {
|
|
10
10
|
className: 'aurora-flex aurora-items-center aurora-justify-between aurora-mb-5',
|
|
11
11
|
"data-test-id": "modal-header"
|
|
12
|
-
}, /*#__PURE__*/
|
|
12
|
+
}, /*#__PURE__*/React__default.createElement("h3", {
|
|
13
13
|
className: "aurora-font-bold aurora-text-xl"
|
|
14
|
-
}, text), hasCloseIcon && /*#__PURE__*/
|
|
14
|
+
}, text), hasCloseIcon && /*#__PURE__*/React__default.createElement(ModalCloseIcon, {
|
|
15
15
|
onClose: onClose
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
2
|
import { slicedToArray as _slicedToArray } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { MODALS_WRAPPER_BACKDROP_FADE_DURATION, MODALS_CONTENT_ID } from '../modal_constants.js';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
@@ -31,11 +31,11 @@ var ModalsWrapper = function ModalsWrapper(_ref) {
|
|
|
31
31
|
return clearTimeout(showWrapperTimeout);
|
|
32
32
|
};
|
|
33
33
|
}, [openedModals]);
|
|
34
|
-
return /*#__PURE__*/createPortal(/*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", null, showWrapper && (/*#__PURE__*/React__default.createElement("div", {
|
|
35
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__*/
|
|
36
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
37
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', " js__modal-mask")
|
|
38
|
-
}), /*#__PURE__*/
|
|
38
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
39
39
|
id: MODALS_CONTENT_ID,
|
|
40
40
|
className: "aurora-flex aurora-items-center aurora-justify-center aurora-z-30"
|
|
41
41
|
}))), children), document.body);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useMemo } from 'react';
|
|
2
2
|
import { ModalsManagerContext } from './modal_context.js';
|
|
3
3
|
import { ModalsWrapper } from './components/modals_wrapper.js';
|
|
4
4
|
import useModals from './hooks/use_modals.js';
|
|
@@ -26,9 +26,9 @@ var ModalsManager = function ModalsManager(_ref) {
|
|
|
26
26
|
openedModals: openedModals
|
|
27
27
|
};
|
|
28
28
|
}, [modalsManagerContainerSelector, addModal, updateModal, getModal, showModal, hideModal, hideAllModals, openedModals]);
|
|
29
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/React__default.createElement(ModalsManagerContext.Provider, {
|
|
30
30
|
value: value
|
|
31
|
-
}, /*#__PURE__*/
|
|
31
|
+
}, /*#__PURE__*/React__default.createElement(ModalsWrapper, null, children));
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export { ModalsManager };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../../utilities/cn.js';
|
|
4
4
|
import { Item } from '@radix-ui/react-toggle-group';
|
|
@@ -6,15 +6,15 @@ import { segmentedControlItemVariants } from './segmented_control_item_variants.
|
|
|
6
6
|
import { SegmentedControlContext } from '../context/segmented_control_context.js';
|
|
7
7
|
|
|
8
8
|
var _excluded = ["className", "children", "size", "variant"];
|
|
9
|
-
var SegmentedControlItem = /*#__PURE__*/
|
|
9
|
+
var SegmentedControlItem = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
10
10
|
var _context$size, _context$variant;
|
|
11
11
|
var className = _ref.className,
|
|
12
12
|
children = _ref.children,
|
|
13
13
|
size = _ref.size,
|
|
14
14
|
variant = _ref.variant,
|
|
15
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
-
var context =
|
|
17
|
-
return /*#__PURE__*/
|
|
16
|
+
var context = React__default.useContext(SegmentedControlContext);
|
|
17
|
+
return /*#__PURE__*/React__default.createElement(Item, _objectSpread2({
|
|
18
18
|
ref: ref,
|
|
19
19
|
className: cn("[&:not(:last-child)]:after:aurora-content-[''] focus last:aurora-rounded-r-4 first:aurora-rounded-l-4 [&:not(:last-child)]:after:aurora-absolute [&:not(:last-child)]:after:aurora-block [&:not(:last-child)]:after:aurora-w-px [&:not(:last-child)]:after:aurora-bg-active [&:not(:last-child)]:after:aurora--right-px [&:not(:last-child)]:after:aurora-h-3/6\n aurora-relative aurora-flex aurora-item aurora-basis-full aurora-items-center aurora-justify-center aurora-gap-2 hover:aurora-bg-active aurora-cursor-pointer aurora-transition-[background-color] aurora-duration-300\n data-[state=on]:aurora-bg data-[state=on]:aurora-font-semibold\n data-[state=on]:before:aurora-content-[''] data-[state=on]:before:aurora-block data-[state=on]:before:aurora-absolute data-[state=on]:before:aurora--left-px data-[state=on]:before:aurora--right-px data-[state=on]:before:aurora--top-px data-[state=on]:before:aurora--bottom-px data-[state=on]:before:aurora-border-active data-[state=on]:before:aurora-border data-[state=on]:before:aurora-rounded-4 data-[state=on]:before:aurora-z-10", segmentedControlItemVariants({
|
|
20
20
|
size: (_context$size = context.size) !== null && _context$size !== void 0 ? _context$size : size,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { SEGMENTED_CONTROL_SIZE_TYPES, SEGMENTED_CONTROL_VARIANT_TYPES } from '../segmented_control_constants.js';
|
|
3
3
|
|
|
4
|
-
var SegmentedControlContext = /*#__PURE__*/
|
|
4
|
+
var SegmentedControlContext = /*#__PURE__*/React__default.createContext({
|
|
5
5
|
size: SEGMENTED_CONTROL_SIZE_TYPES.basic,
|
|
6
6
|
variant: SEGMENTED_CONTROL_VARIANT_TYPES.basic
|
|
7
7
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../utilities/cn.js';
|
|
4
4
|
import { Root } from '@radix-ui/react-toggle-group';
|
|
@@ -6,7 +6,7 @@ import { SEGMENTED_CONTROL_TYPE } from './segmented_control_constants.js';
|
|
|
6
6
|
import { SegmentedControlContext } from './context/segmented_control_context.js';
|
|
7
7
|
|
|
8
8
|
var _excluded = ["className", "size", "variant", "children", "type"];
|
|
9
|
-
var SegmentedControl = /*#__PURE__*/
|
|
9
|
+
var SegmentedControl = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
10
10
|
var className = _ref.className,
|
|
11
11
|
size = _ref.size,
|
|
12
12
|
variant = _ref.variant,
|
|
@@ -14,11 +14,11 @@ var SegmentedControl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14
14
|
_ref$type = _ref.type,
|
|
15
15
|
type = _ref$type === void 0 ? SEGMENTED_CONTROL_TYPE.single : _ref$type,
|
|
16
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/React__default.createElement(Root, _objectSpread2({
|
|
18
18
|
ref: ref,
|
|
19
19
|
className: cn('aurora-w-max aurora-flex aurora-items-center aurora-justify-center aurora-border aurora-rounded-6 aurora-bg-subtle', className),
|
|
20
20
|
type: type
|
|
21
|
-
}, props), /*#__PURE__*/
|
|
21
|
+
}, props), /*#__PURE__*/React__default.createElement(SegmentedControlContext.Provider, {
|
|
22
22
|
value: {
|
|
23
23
|
size: size,
|
|
24
24
|
variant: variant,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSidebar } from '@auroraComponents/sidebar/hooks/use_sidebar';
|
|
3
|
+
import { cn } from '@auroraUtilities/cn';
|
|
4
|
+
import { CSS_COLOR_TOKENS_VALUES } from '@auroraConstants/css_tokens/css_color_tokens_values';
|
|
5
|
+
import '@auroraComponents/sidebar/sidebar_types';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import { SIDEBAR_SIDE } from '@auroraComponents/sidebar/sidebar_constants';
|
|
8
|
+
import { ArrowLeftSLineIcon } from '@auroraAssets/icons/arrow_left_s_line_icon';
|
|
9
|
+
const toggleVariants = cva('aurora-border-solid aurora-z-10 aurora-border-subtle aurora-bg aurora-py-1 aurora-absolute aurora-top-11 ', {
|
|
10
|
+
variants: {
|
|
11
|
+
side: {
|
|
12
|
+
[SIDEBAR_SIDE.left]: 'aurora-left-full aurora-rounded-r-2 aurora-rounded-l-0 aurora-border-l-0 aurora-border-r aurora-border-t aurora-border-b',
|
|
13
|
+
[SIDEBAR_SIDE.right]: 'aurora-right-full aurora-rounded-r-0 aurora-rounded-l-2 aurora-border-r-0 aurora-border-l aurora-border-t aurora-border-b'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export const SidebarToggle = ({ side }) => {
|
|
18
|
+
const { toggleSidebar, open } = useSidebar();
|
|
19
|
+
return (React.createElement("button", { className: toggleVariants({ side }), onClick: toggleSidebar },
|
|
20
|
+
React.createElement(ArrowLeftSLineIcon, { color: CSS_COLOR_TOKENS_VALUES.neutral900, className: cn('aurora-overflow-hidden aurora-pointer aurora-transition-transform aurora-duration-100 aurora-text hover:aurora-scale-125', {
|
|
21
|
+
'aurora-rotate-180': (side === SIDEBAR_SIDE.right && open) || (side === SIDEBAR_SIDE.left && !open)
|
|
22
|
+
}) })));
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=sidebar_toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar_toggle.js","sourceRoot":"","sources":["../../../../../../../../src/components/sidebar/components/sidebar_toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AACzE,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAoC,yCAAyC,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAEhF,MAAM,cAAc,GAAG,GAAG,CAAC,2GAA2G,EAAE;IACpI,QAAQ,EAAE;QACN,IAAI,EAAE;YACF,CAAC,YAAY,CAAC,IAAI,CAAC,EACf,0HAA0H;YAC9H,CAAC,YAAY,CAAC,KAAK,CAAC,EAChB,4HAA4H;SACnI;KACJ;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAuB,EAAE,EAAE;IAC3D,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,CAAC;IAE7C,OAAO,CACH,gCAAQ,SAAS,EAAE,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa;QAC/D,oBAAC,kBAAkB,IACf,KAAK,EAAE,uBAAuB,CAAC,UAAU,EACzC,SAAS,EAAE,EAAE,CACT,0HAA0H,EAC1H;gBACI,mBAAmB,EAAE,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC;aACtG,CACJ,GACH,CACG,CACZ,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { SidebarContext };
|
|
6
|
-
//# sourceMappingURL=sidebar_context.js.map
|
|
2
|
+
import '@auroraComponents/sidebar/context/sidebar_context_types';
|
|
3
|
+
export const SidebarContext = React.createContext(null);
|
|
4
|
+
//# sourceMappingURL=sidebar_context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":"sidebar_context.js","sourceRoot":"","sources":["../../../../../../../../src/components/sidebar/context/sidebar_context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAgC,yDAAyD,CAAC;AAE1F,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAAyB,IAAI,CAAC,CAAC"}
|
|
@@ -1,58 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var setPersistedState = function setPersistedState(value) {
|
|
16
|
-
if (!persistentKey) return;
|
|
17
|
-
try {
|
|
18
|
-
localStorage.setItem(persistentKey, String(value));
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error('Failed to set persisted state', error);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var _React$useState = useState(openProp),
|
|
24
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
25
|
-
_open = _React$useState2[0],
|
|
26
|
-
_setOpen = _React$useState2[1];
|
|
27
|
-
useEffect(function () {
|
|
28
|
-
if (openProp !== undefined && openProp !== _open) setOpen(openProp);
|
|
29
|
-
}, [openProp]);
|
|
30
|
-
useEffect(function () {
|
|
31
|
-
setPersistedState(_open);
|
|
32
|
-
}, []);
|
|
33
|
-
var setOpen = function setOpen(open) {
|
|
34
|
-
var nextValue = typeof open === 'function' ? open(_open) : open;
|
|
35
|
-
onToggle === null || onToggle === void 0 ? void 0 : onToggle(nextValue);
|
|
36
|
-
_setOpen(nextValue);
|
|
37
|
-
setPersistedState(nextValue);
|
|
38
|
-
};
|
|
39
|
-
var toggleSidebar = function toggleSidebar() {
|
|
40
|
-
setOpen(function (open) {
|
|
41
|
-
return !open;
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var contextValue = useMemo(function () {
|
|
45
|
-
return {
|
|
46
|
-
open: _open,
|
|
47
|
-
toggleSidebar: toggleSidebar
|
|
1
|
+
import { SidebarContext } from '@auroraComponents/sidebar/context/sidebar_context';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import '@auroraComponents/sidebar/context/sidebar_context_types';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
export const SidebarProvider = ({ onToggle, open: openProp = true, className, style, children, persistentKey, ...props }) => {
|
|
6
|
+
const setPersistedState = (value) => {
|
|
7
|
+
if (!persistentKey)
|
|
8
|
+
return;
|
|
9
|
+
try {
|
|
10
|
+
localStorage.setItem(persistentKey, String(value));
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
console.error('Failed to set persisted state', error);
|
|
14
|
+
}
|
|
48
15
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
16
|
+
const [_open, _setOpen] = React.useState(openProp);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (openProp !== undefined && openProp !== _open)
|
|
19
|
+
setOpen(openProp);
|
|
20
|
+
}, [openProp]);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
setPersistedState(_open);
|
|
23
|
+
}, []);
|
|
24
|
+
const setOpen = (open) => {
|
|
25
|
+
const nextValue = typeof open === 'function' ? open(_open) : open;
|
|
26
|
+
onToggle?.(nextValue);
|
|
27
|
+
_setOpen(nextValue);
|
|
28
|
+
setPersistedState(nextValue);
|
|
29
|
+
};
|
|
30
|
+
const toggleSidebar = () => {
|
|
31
|
+
setOpen((open) => !open);
|
|
32
|
+
};
|
|
33
|
+
const contextValue = React.useMemo(() => ({
|
|
34
|
+
open: _open,
|
|
35
|
+
toggleSidebar
|
|
36
|
+
}), [open, toggleSidebar]);
|
|
37
|
+
return (React.createElement(SidebarContext.Provider, { value: contextValue },
|
|
38
|
+
React.createElement("div", { style: style, ...props }, children)));
|
|
55
39
|
};
|
|
56
|
-
|
|
57
|
-
export { SidebarProvider };
|
|
58
|
-
//# sourceMappingURL=sidebar_prvider.js.map
|
|
40
|
+
//# sourceMappingURL=sidebar_prvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":"sidebar_prvider.js","sourceRoot":"","sources":["../../../../../../../../src/components/sidebar/context/sidebar_prvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAuD,yDAAyD,CAAC;AACjH,OAAO,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC5B,QAAQ,EACR,IAAI,EAAE,QAAQ,GAAG,IAAI,EACrB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,aAAa,EACb,GAAG,KAAK,EAC+B,EAAE,EAAE;IAC3C,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAE,EAAE;QACzC,IAAI,CAAC,aAAa;YAAE,OAAO;QAE3B,IAAI;YACA,YAAY,CAAC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SACtD;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;SACzD;IACL,CAAC,CAAC;IAEF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEnD,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,KAAK;YAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,SAAS,CAAC,GAAG,EAAE;QACX,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,OAAO,GAAG,CAAC,IAA6C,EAAE,EAAE;QAC9D,MAAM,SAAS,GAAG,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAElE,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC;QACtB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpB,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,GAAG,EAAE;QACvB,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAC9B,GAAG,EAAE,CAAC,CAAC;QACH,IAAI,EAAE,KAAK;QACX,aAAa;KAChB,CAAC,EACF,CAAC,IAAI,EAAE,aAAa,CAAC,CACxB,CAAC;IAEF,OAAO,CACH,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QACxC,6BAAK,KAAK,EAAE,KAAK,KAAM,KAAK,IACvB,QAAQ,CACP,CACgB,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SidebarContext } from '
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return context;
|
|
2
|
+
import { SidebarContext } from '@auroraComponents/sidebar/context/sidebar_context';
|
|
3
|
+
export const useSidebar = () => {
|
|
4
|
+
const context = React.useContext(SidebarContext);
|
|
5
|
+
if (!context) {
|
|
6
|
+
throw new Error('useSidebar must be used within a SidebarProvider.');
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
export { useSidebar };
|
|
13
|
-
//# sourceMappingURL=use_sidebar.js.map
|
|
10
|
+
//# sourceMappingURL=use_sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":"use_sidebar.js","sourceRoot":"","sources":["../../../../../../../../src/components/sidebar/hooks/use_sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAEnF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAEjD,IAAI,CAAC,OAAO,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;KACxE;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -1,54 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
open = _useSidebar.open;
|
|
26
|
-
var sidebarRef = useRef(null);
|
|
27
|
-
useImperativeHandle(ref, function () {
|
|
28
|
-
return sidebarRef.current;
|
|
29
|
-
});
|
|
30
|
-
return /*#__PURE__*/createElement("div", _objectSpread2({
|
|
31
|
-
"aria-expanded": open,
|
|
32
|
-
ref: sidebarRef,
|
|
33
|
-
className: cn('aurora-relative aurora-transition-all aurora-duration-200', className),
|
|
34
|
-
style: {
|
|
35
|
-
width: open ? width : 0,
|
|
36
|
-
maxWidth: open ? width : 0,
|
|
37
|
-
minWidth: open ? width : 0,
|
|
38
|
-
height: height,
|
|
39
|
-
minHeight: minHeight,
|
|
40
|
-
maxHeight: maxHeight
|
|
41
|
-
}
|
|
42
|
-
}, props), TriggerButton ? /*#__PURE__*/createElement(TriggerButton, {
|
|
43
|
-
side: side
|
|
44
|
-
}) : null, /*#__PURE__*/createElement("div", {
|
|
45
|
-
className: cn('aurora-overflow-auto aurora-h-full aurora-w-full', {
|
|
46
|
-
'aurora-opacity-0': !open,
|
|
47
|
-
'aurora-opacity-100': open
|
|
48
|
-
})
|
|
49
|
-
}, children));
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '@auroraUtilities/cn';
|
|
3
|
+
import { useSidebar } from '@auroraComponents/sidebar/hooks/use_sidebar';
|
|
4
|
+
import '@auroraComponents/sidebar/sidebar_types';
|
|
5
|
+
import { useImperativeHandle, useRef } from 'react';
|
|
6
|
+
import { SIDEBAR_SIDE } from '@auroraComponents/sidebar/sidebar_constants';
|
|
7
|
+
import { SidebarToggle } from '@auroraComponents/sidebar/components/sidebar_toggle';
|
|
8
|
+
export const Sidebar = React.forwardRef(({ className, children, TriggerButton = SidebarToggle, width, minWidth, maxWidth, height = '100%', minHeight, maxHeight, side = SIDEBAR_SIDE.left, ...props }, ref) => {
|
|
9
|
+
const { open } = useSidebar();
|
|
10
|
+
const sidebarRef = useRef(null);
|
|
11
|
+
useImperativeHandle(ref, () => sidebarRef.current);
|
|
12
|
+
return (React.createElement("div", { "aria-expanded": open, ref: sidebarRef, className: cn('aurora-relative aurora-transition-all aurora-duration-200', className), style: {
|
|
13
|
+
width: open ? width : 0,
|
|
14
|
+
maxWidth: open ? width : 0,
|
|
15
|
+
minWidth: open ? width : 0,
|
|
16
|
+
height,
|
|
17
|
+
minHeight,
|
|
18
|
+
maxHeight
|
|
19
|
+
}, ...props },
|
|
20
|
+
TriggerButton ? React.createElement(TriggerButton, { side: side }) : null,
|
|
21
|
+
React.createElement("div", { className: cn('aurora-overflow-auto aurora-h-full aurora-w-full', {
|
|
22
|
+
'aurora-opacity-0': !open,
|
|
23
|
+
'aurora-opacity-100': open
|
|
24
|
+
}) }, children)));
|
|
50
25
|
});
|
|
51
26
|
Sidebar.displayName = 'Sidebar';
|
|
52
|
-
|
|
53
|
-
export { Sidebar };
|
|
54
|
-
//# sourceMappingURL=sidebar.js.map
|
|
27
|
+
//# sourceMappingURL=sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../../../../../../src/components/sidebar/sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AACzE,OAA8B,yCAAyC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAC;AAEpF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CACnC,CACI,EACI,SAAS,EACT,QAAQ,EACR,aAAa,GAAG,aAAa,EAC7B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,GAAG,MAAM,EACf,SAAS,EACT,SAAS,EACT,IAAI,GAAG,YAAY,CAAC,IAAI,EACxB,GAAG,KAAK,EACX,EACD,GAAG,EACL,EAAE;IACA,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,CAAC;IAC9B,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEhD,mBAAmB,CAA+C,GAAG,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjG,OAAO,CACH,8CACmB,IAAI,EACnB,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,EAAE,CAAC,2DAA2D,EAAE,SAAS,CAAC,EACrF,KAAK,EAAE;YACH,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1B,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1B,MAAM;YACN,SAAS;YACT,SAAS;SACZ,KACG,KAAK;QAER,aAAa,CAAC,CAAC,CAAC,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI;QACrD,6BACI,SAAS,EAAE,EAAE,CAAC,kDAAkD,EAAE;gBAC9D,kBAAkB,EAAE,CAAC,IAAI;gBACzB,oBAAoB,EAAE,IAAI;aAC7B,CAAC,IAED,QAAQ,CACP,CACJ,CACT,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export const SIDEBAR_SIDE = {
|
|
2
|
+
left: 'left',
|
|
3
|
+
right: 'right'
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export const SIDEBAR_VARIANT_TYPES = {
|
|
6
|
+
persistent: 'persistent',
|
|
7
|
+
temporary: 'temporary'
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=sidebar_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":"sidebar_constants.js","sourceRoot":"","sources":["../../../../../../../src/components/sidebar/sidebar_constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;CAChB,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SIDEBAR_SIDE } from "./sidebar_constants";
|
|
3
3
|
import { Any } from 'ts-toolbelt';
|
|
4
|
-
export declare type
|
|
4
|
+
export declare type TSidebarToggleProps = {
|
|
5
5
|
side: TSidebarSide;
|
|
6
6
|
};
|
|
7
7
|
export declare type TSidebarSide = Any.Keys<typeof SIDEBAR_SIDE>;
|
|
8
8
|
export declare type TSidebarProps = {
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
9
12
|
className?: string;
|
|
10
13
|
width: string;
|
|
11
14
|
minWidth?: string;
|