@dreamcommerce/aurora 3.0.0-53 → 3.0.0-54
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/components/modal/components/modal/modal.js +1 -1
- package/build/cjs/packages/aurora/src/components/modal/components/modals_wrapper.js +1 -1
- package/build/cjs/packages/aurora/src/components/sidebar/components/persistent_sidebar.js +45 -0
- package/build/cjs/packages/aurora/src/components/sidebar/components/persistent_sidebar.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar/components/sidebar_toggle.js +22 -0
- package/build/cjs/packages/aurora/src/components/sidebar/components/sidebar_toggle.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar/components/temporal_sidebar.js +23 -0
- package/build/cjs/packages/aurora/src/components/sidebar/components/temporal_sidebar.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_context.js +14 -0
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_context.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_prvider.js +57 -0
- package/build/cjs/packages/aurora/src/components/sidebar/context/sidebar_prvider.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar/hooks/use_sidebar.js +21 -0
- package/build/cjs/packages/aurora/src/components/sidebar/hooks/use_sidebar.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar.js +36 -0
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar_constants.js +21 -0
- package/build/cjs/packages/aurora/src/components/sidebar/sidebar_constants.js.map +1 -0
- package/build/cjs/packages/aurora/src/index.js +9 -1
- package/build/cjs/packages/aurora/src/index.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 +6 -6
- 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 +5 -5
- 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/persistent_sidebar.d.ts +5 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/persistent_sidebar.js +37 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/persistent_sidebar.js.map +1 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_components_types.d.ts +14 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_components_types.js +3 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_components_types.js.map +1 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_toggle.d.ts +2 -3
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_toggle.js +12 -22
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_toggle.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/components/temporal_sidebar.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/temporal_sidebar.js +15 -0
- package/build/esm/packages/aurora/src/components/sidebar/components/temporal_sidebar.js.map +1 -0
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_context.js +5 -3
- 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_context_types.d.ts +0 -8
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_context_types.js +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_context_types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_prvider.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_prvider.js +51 -38
- 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 +11 -8
- package/build/esm/packages/aurora/src/components/sidebar/hooks/use_sidebar.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/sidebar.d.ts +3 -3
- package/build/esm/packages/aurora/src/components/sidebar/sidebar.js +28 -27
- 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 +7 -3
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_constants.js +13 -7
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_constants.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_types_types.d.ts +18 -0
- package/build/esm/packages/aurora/src/components/sidebar/{sidebar_types.js → sidebar_types_types.js} +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/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 +4 -1
- package/build/esm/packages/aurora/src/index.js +4 -1
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/build/index.css +1 -1
- package/package.json +1 -2
- package/build/cjs/external/react-pro-sidebar/dist/index.es.js +0 -5453
- package/build/cjs/external/react-pro-sidebar/dist/index.es.js.map +0 -1
- package/build/cjs/packages/aurora/src/components/sidebar_new/sidebar.js +0 -18
- package/build/cjs/packages/aurora/src/components/sidebar_new/sidebar.js.map +0 -1
- package/build/esm/external/react-pro-sidebar/dist/index.es.js +0 -5415
- package/build/esm/external/react-pro-sidebar/dist/index.es.js.map +0 -1
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_types.d.ts +0 -21
- package/build/esm/packages/aurora/src/components/sidebar/sidebar_types.js.map +0 -1
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar.d.ts +0 -3
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar.js +0 -10
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar.js.map +0 -1
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar_types_types.d.ts +0 -21
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar_types_types.js +0 -3
- package/build/esm/packages/aurora/src/components/sidebar_new/sidebar_types_types.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../utilities/cn.js';
|
|
4
4
|
import { BOX_COMPONENT_TYPES } from './box_constants.js';
|
|
5
5
|
import { Stack } from '../stack/stack.js';
|
|
6
6
|
|
|
7
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
|
-
var Box = /*#__PURE__*/
|
|
8
|
+
var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9
9
|
var _cn;
|
|
10
10
|
var shadow = _ref.shadow,
|
|
11
11
|
_ref$as = _ref.as,
|
|
@@ -40,7 +40,7 @@ var Box = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
40
40
|
var borderWidthWithSides = borderWidth;
|
|
41
41
|
var borderRadiusWithSides = borderRadius;
|
|
42
42
|
var anyStackPropertiesSet = direction || justify || align || spacing || wrap || inline;
|
|
43
|
-
return /*#__PURE__*/
|
|
43
|
+
return /*#__PURE__*/React.createElement(anyStackPropertiesSet ? Stack : as, _objectSpread2({
|
|
44
44
|
ref: ref,
|
|
45
45
|
className: cn((_cn = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cn, 'aurora-bg', !backgroundColor), "aurora-bg-".concat(backgroundColor), !!backgroundColor), "aurora-text-".concat(color), !!color), "aurora-border", (!!borderColor || !!borderStyle || !!borderRadius) && !borderWidth), "aurora-border-".concat(borderColor), !!borderColor), "aurora-border-".concat(borderStyle), !!borderStyle), "aurora-border-".concat(borderWidth), !!borderWidth && typeof borderWidth === 'string'), "aurora-border-t".concat((borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.t) === '1' ? '' : "-".concat(borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.t)), !!(borderWidthWithSides !== null && borderWidthWithSides !== void 0 && borderWidthWithSides.t)), "aurora-border-b".concat((borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.b) === '1' ? '' : "-".concat(borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.b)), !!(borderWidthWithSides !== null && borderWidthWithSides !== void 0 && borderWidthWithSides.b)), "aurora-border-r".concat((borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.r) === '1' ? '' : "-".concat(borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.r)), !!(borderWidthWithSides !== null && borderWidthWithSides !== void 0 && borderWidthWithSides.r)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cn, "aurora-border-l".concat((borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.l) === '1' ? '' : "-".concat(borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.l)), !!(borderWidthWithSides !== null && borderWidthWithSides !== void 0 && borderWidthWithSides.l)), "aurora-border-x".concat((borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.x) === '1' ? '' : "-".concat(borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.x)), !!(borderWidthWithSides !== null && borderWidthWithSides !== void 0 && borderWidthWithSides.x)), "aurora-border-y".concat((borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.y) === '1' ? '' : "-".concat(borderWidthWithSides === null || borderWidthWithSides === void 0 ? void 0 : borderWidthWithSides.y)), !!(borderWidthWithSides !== null && borderWidthWithSides !== void 0 && borderWidthWithSides.y)), "aurora-rounded-".concat(borderRadius), !!borderRadius && typeof borderRadius === 'string'), "aurora-rounded-t-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.t), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.t)), "aurora-rounded-b-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.b), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.b)), "aurora-rounded-r-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.r), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.r)), "aurora-rounded-l-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.l), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.l)), "aurora-rounded-tl-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.tl), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.tl)), "aurora-rounded-tr-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.tr), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.tr)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cn, "aurora-rounded-bl-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.bl), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.bl)), "aurora-rounded-br-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.br), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.br)), "aurora-rounded-ee-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.ee), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.ee)), "aurora-rounded-es-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.es), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.es)), "aurora-rounded-ss-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.ss), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.ss)), "aurora-rounded-se-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.se), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.se)), "aurora-rounded-s-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.s), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.s)), "aurora-rounded-e-".concat(borderRadiusWithSides === null || borderRadiusWithSides === void 0 ? void 0 : borderRadiusWithSides.e), !!(borderRadiusWithSides !== null && borderRadiusWithSides !== void 0 && borderRadiusWithSides.e)), "aurora-shadow-".concat(shadow), !!shadow), "aurora-p-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.p), !!(paddings !== null && paddings !== void 0 && paddings.p)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cn, "aurora-pt-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.pt), !!(paddings !== null && paddings !== void 0 && paddings.pt)), "aurora-pr-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.pr), !!(paddings !== null && paddings !== void 0 && paddings.pr)), "aurora-pb-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.pb), !!(paddings !== null && paddings !== void 0 && paddings.pb)), "aurora-pl-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.pl), !!(paddings !== null && paddings !== void 0 && paddings.pl)), "aurora-px-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.px), !!(paddings !== null && paddings !== void 0 && paddings.px)), "aurora-py-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.py), !!(paddings !== null && paddings !== void 0 && paddings.py)), "aurora-ps-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.ps), !!(paddings !== null && paddings !== void 0 && paddings.ps)), "aurora-pe-".concat(paddings === null || paddings === void 0 ? void 0 : paddings.pe), !!(paddings !== null && paddings !== void 0 && paddings.pe)), "aurora-".concat(position), !!position)), className),
|
|
46
46
|
style: _objectSpread2({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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 { buttonVariants } from './button_variants.js';
|
|
5
5
|
import { Slot } from '@radix-ui/react-slot';
|
|
6
6
|
|
|
7
7
|
var _excluded = ["className", "variant", "size", "asChild"];
|
|
8
|
-
var Button = /*#__PURE__*/
|
|
8
|
+
var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9
9
|
var className = _ref.className,
|
|
10
10
|
variant = _ref.variant,
|
|
11
11
|
size = _ref.size,
|
|
@@ -13,7 +13,7 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
13
13
|
asChild = _ref$asChild === void 0 ? false : _ref$asChild,
|
|
14
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
var Comp = asChild ? Slot : 'button';
|
|
16
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/React.createElement(Comp, _objectSpread2({
|
|
17
17
|
className: cn(buttonVariants({
|
|
18
18
|
variant: variant,
|
|
19
19
|
size: size,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { cn } from '../../utilities/cn.js';
|
|
3
3
|
|
|
4
4
|
var Control = function Control(_ref) {
|
|
5
5
|
var children = _ref.children,
|
|
6
6
|
classname = _ref.classname;
|
|
7
|
-
return /*#__PURE__*/
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8
8
|
className: cn("aurora-flex aurora-gap-1", classname)
|
|
9
9
|
}, children);
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { Label } from '../../label/label.js';
|
|
4
4
|
import { HelperText } from '../../helper_text/helper_text.js';
|
|
@@ -25,12 +25,12 @@ var InputControl = function InputControl(_ref) {
|
|
|
25
25
|
onKeyDown = _ref.onKeyDown,
|
|
26
26
|
onKeyUp = _ref.onKeyUp,
|
|
27
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement(Control, {
|
|
29
29
|
classname: "aurora-flex-col"
|
|
30
|
-
}, label && (/*#__PURE__*/
|
|
30
|
+
}, label && (/*#__PURE__*/React.createElement(Label, {
|
|
31
31
|
htmlFor: id,
|
|
32
32
|
className: "aurora-pb-1 aurora-text"
|
|
33
|
-
}, label)), /*#__PURE__*/
|
|
33
|
+
}, label)), /*#__PURE__*/React.createElement(Input, _objectSpread2({
|
|
34
34
|
id: id,
|
|
35
35
|
name: name,
|
|
36
36
|
value: value,
|
|
@@ -45,7 +45,7 @@ var InputControl = function InputControl(_ref) {
|
|
|
45
45
|
onChange: onChange,
|
|
46
46
|
onKeyDown: onKeyDown,
|
|
47
47
|
onKeyUp: onKeyUp
|
|
48
|
-
}, props)), helperText && /*#__PURE__*/
|
|
48
|
+
}, props)), helperText && /*#__PURE__*/React.createElement(HelperText, null, helperText), errors && /*#__PURE__*/React.createElement(ErrorList, {
|
|
49
49
|
errors: errors
|
|
50
50
|
}));
|
|
51
51
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { Label } from '../../label/label.js';
|
|
4
4
|
import { HelperText } from '../../helper_text/helper_text.js';
|
|
@@ -25,7 +25,7 @@ var SwitchControl = function SwitchControl(_ref) {
|
|
|
25
25
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
26
26
|
onCheckedChange = _ref.onCheckedChange,
|
|
27
27
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement(Control, null, /*#__PURE__*/React.createElement(Switch, _objectSpread2({
|
|
29
29
|
id: id,
|
|
30
30
|
name: name,
|
|
31
31
|
value: value,
|
|
@@ -34,12 +34,12 @@ var SwitchControl = function SwitchControl(_ref) {
|
|
|
34
34
|
disabled: disabled,
|
|
35
35
|
onCheckedChange: onCheckedChange,
|
|
36
36
|
errors: errors
|
|
37
|
-
}, rest)), /*#__PURE__*/
|
|
37
|
+
}, rest)), /*#__PURE__*/React.createElement("div", {
|
|
38
38
|
className: "aurora-ml-2 aurora-mt-1 aurora-flex aurora-flex-col aurora-gap-1"
|
|
39
|
-
}, label && (/*#__PURE__*/
|
|
39
|
+
}, label && (/*#__PURE__*/React.createElement(Label, {
|
|
40
40
|
required: required,
|
|
41
41
|
tooltip: tooltip
|
|
42
|
-
}, label)), helperText && /*#__PURE__*/
|
|
42
|
+
}, label)), helperText && /*#__PURE__*/React.createElement(HelperText, null, helperText), errors && /*#__PURE__*/React.createElement(ErrorList, {
|
|
43
43
|
errors: errors
|
|
44
44
|
})));
|
|
45
45
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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 { DIVIDER_ORIENTATION } from './divider_constants.js';
|
|
@@ -6,7 +6,7 @@ import { dividerVariants } from './divider_variants.js';
|
|
|
6
6
|
import { Root } from '@radix-ui/react-separator';
|
|
7
7
|
|
|
8
8
|
var _excluded = ["className", "orientation", "color", "thickness", "height", "maxHeight", "minHeight", "width", "maxWidth", "minWidth", "variant", "decorative"];
|
|
9
|
-
var Divider = /*#__PURE__*/
|
|
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,
|
|
@@ -22,7 +22,7 @@ var Divider = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
22
22
|
_ref$decorative = _ref.decorative,
|
|
23
23
|
decorative = _ref$decorative === void 0 ? true : _ref$decorative,
|
|
24
24
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
return /*#__PURE__*/
|
|
25
|
+
return /*#__PURE__*/React.createElement(Root, _objectSpread2({
|
|
26
26
|
ref: ref,
|
|
27
27
|
decorative: decorative,
|
|
28
28
|
orientation: orientation,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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 { BUTTON_SIZES } from '../button/button_constants.js';
|
|
@@ -7,7 +7,7 @@ import { Slot } from '@radix-ui/react-slot';
|
|
|
7
7
|
import { iconButtonVariants } from './icon_button_variants.js';
|
|
8
8
|
|
|
9
9
|
var _excluded = ["className", "variant", "size", "asChild", "Icon", "children"];
|
|
10
|
-
var IconButton = /*#__PURE__*/
|
|
10
|
+
var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11
11
|
var className = _ref.className,
|
|
12
12
|
variant = _ref.variant,
|
|
13
13
|
size = _ref.size,
|
|
@@ -17,7 +17,7 @@ var IconButton = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
17
17
|
children = _ref.children,
|
|
18
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
var Comp = asChild ? Slot : 'button';
|
|
20
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/React.createElement(Comp, _objectSpread2({
|
|
21
21
|
className: cn(buttonVariants({
|
|
22
22
|
variant: variant,
|
|
23
23
|
size: size,
|
|
@@ -26,7 +26,7 @@ var IconButton = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
26
26
|
size: size
|
|
27
27
|
})),
|
|
28
28
|
ref: ref
|
|
29
|
-
}, props), Icon ? /*#__PURE__*/
|
|
29
|
+
}, props), Icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
30
30
|
size: size === BUTTON_SIZES.s ? '14' : '16'
|
|
31
31
|
}) : children);
|
|
32
32
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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 { inputVariants } from './input_variants.js';
|
|
5
5
|
|
|
6
6
|
var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "onChange", "onKeyDown", "onKeyUp"];
|
|
7
|
-
var Input = /*#__PURE__*/
|
|
7
|
+
var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
8
|
var preElement = _ref.preElement,
|
|
9
9
|
postElement = _ref.postElement,
|
|
10
10
|
errors = _ref.errors,
|
|
@@ -23,11 +23,11 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
23
23
|
onKeyDown = _ref.onKeyDown,
|
|
24
24
|
onKeyUp = _ref.onKeyUp,
|
|
25
25
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
return /*#__PURE__*/
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
27
|
className: cn(inputVariants(), errors && 'aurora-border-danger', disabled && 'aurora-bg-subtle aurora-text-subtle-light aurora-pointer-events-none aurora-cursor-not-allowed', type === 'number' && 'aurora-appearance-none', className)
|
|
28
|
-
}, preElement && /*#__PURE__*/
|
|
28
|
+
}, preElement && /*#__PURE__*/React.createElement("div", {
|
|
29
29
|
className: "aurora-flex aurora-items-center aurora-pointer-events-none"
|
|
30
|
-
}, preElement), /*#__PURE__*/
|
|
30
|
+
}, preElement), /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
31
31
|
ref: ref,
|
|
32
32
|
id: id,
|
|
33
33
|
name: name,
|
|
@@ -41,7 +41,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
41
41
|
onKeyUp: onKeyUp,
|
|
42
42
|
type: type,
|
|
43
43
|
className: "aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none"
|
|
44
|
-
})), postElement && /*#__PURE__*/
|
|
44
|
+
})), postElement && /*#__PURE__*/React.createElement("div", {
|
|
45
45
|
className: "aurora-flex aurora-items-center"
|
|
46
46
|
}, postElement));
|
|
47
47
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { Box } from '../../box/box.js';
|
|
4
4
|
import { Root } from '@radix-ui/react-label';
|
|
5
5
|
|
|
6
6
|
var _excluded = ["tooltip", "children"];
|
|
7
|
-
var LabelContent = /*#__PURE__*/
|
|
7
|
+
var LabelContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
8
|
var tooltip = _ref.tooltip,
|
|
9
9
|
children = _ref.children,
|
|
10
10
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/React.createElement(Root, _objectSpread2({
|
|
12
12
|
ref: ref
|
|
13
|
-
}, props), tooltip ? (/*#__PURE__*/
|
|
13
|
+
}, props), tooltip ? (/*#__PURE__*/React.createElement(Box, {
|
|
14
14
|
align: "center",
|
|
15
15
|
spacing: "1"
|
|
16
16
|
}, children, tooltip)) : children);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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.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.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 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.createElement("div", _objectSpread2({
|
|
12
12
|
className: cn(loaderVariants({
|
|
13
13
|
variant: variant
|
|
14
14
|
}), className)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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.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.createElement("div", {
|
|
27
27
|
className: classnames(children && !fullWidth && 'aurora-h-full aurora-flex aurora-self-start aurora-mt-1')
|
|
28
|
-
}, /*#__PURE__*/
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
29
29
|
className: classnames('aurora-mr-2 aurora-w-4 aurora-h-4', iconColor)
|
|
30
|
-
}))) : null, /*#__PURE__*/
|
|
30
|
+
}))) : null, /*#__PURE__*/React.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.createElement("div", {
|
|
33
33
|
className: "aurora-flex aurora-max-w-full aurora-w-full"
|
|
34
|
-
}, header && (/*#__PURE__*/
|
|
34
|
+
}, header && (/*#__PURE__*/React.createElement("div", {
|
|
35
35
|
className: "aurora-flex aurora-items-center"
|
|
36
|
-
}, /*#__PURE__*/
|
|
36
|
+
}, /*#__PURE__*/React.createElement("h4", {
|
|
37
37
|
className: "aurora-text-s aurora-font-semibold aurora-text"
|
|
38
|
-
}, header))), /*#__PURE__*/
|
|
38
|
+
}, header))), /*#__PURE__*/React.createElement(Typography, {
|
|
39
39
|
className: "aurora-w-full",
|
|
40
40
|
size: "xs"
|
|
41
|
-
}, children)), canClose && (/*#__PURE__*/
|
|
41
|
+
}, children)), canClose && (/*#__PURE__*/React.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.createElement(CloseLineIcon, {
|
|
48
48
|
className: classnames('aurora-mx-2 aurora-w-4 aurora-h-4 aurora-fill')
|
|
49
49
|
})))));
|
|
50
50
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { slicedToArray as _slicedToArray } from '../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../../../utilities/cn.js';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
4
5
|
import { MODAL_VISIBILITY_STATE, MODAL_SLIDE_FADE_DURATION, MODAL_WIDTH_VARIANT } from '../../modal_constants.js';
|
|
5
6
|
import { ModalFooter } from './modal_footer.js';
|
|
6
7
|
import { ModalHeader } from './modal_header.js';
|
|
7
|
-
import { createPortal } from 'react-dom';
|
|
8
8
|
import { modalVariants } from '../../modal_variants.js';
|
|
9
9
|
import { useModalsContext } from '../../hooks/use_modals_context.js';
|
|
10
10
|
|
|
@@ -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.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.createElement(ModalHeader, {
|
|
79
79
|
hasCloseIcon: hasCloseIcon,
|
|
80
80
|
text: header.text,
|
|
81
81
|
onClose: handleCloseModal
|
|
82
|
-
}), children && /*#__PURE__*/
|
|
82
|
+
}), children && /*#__PURE__*/React.createElement("div", {
|
|
83
83
|
className: "aurora-overflow-y-auto"
|
|
84
|
-
}, children), footer && /*#__PURE__*/
|
|
84
|
+
}, children), footer && /*#__PURE__*/React.createElement(ModalFooter, {
|
|
85
85
|
text: footer.text
|
|
86
86
|
})), $modalsManagerContainer) : null;
|
|
87
87
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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.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.createElement(CloseLine, null));
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export { ModalCloseIcon };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
3
|
var ModalFooter = function ModalFooter(_ref) {
|
|
4
4
|
var text = _ref.text;
|
|
5
|
-
return /*#__PURE__*/
|
|
5
|
+
return /*#__PURE__*/React.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 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.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.createElement("h3", {
|
|
13
13
|
className: "aurora-font-bold aurora-text-xl"
|
|
14
|
-
}, text), hasCloseIcon && /*#__PURE__*/
|
|
14
|
+
}, text), hasCloseIcon && /*#__PURE__*/React.createElement(ModalCloseIcon, {
|
|
15
15
|
onClose: onClose
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { slicedToArray as _slicedToArray } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import { MODALS_WRAPPER_BACKDROP_FADE_DURATION, MODALS_CONTENT_ID } from '../modal_constants.js';
|
|
4
3
|
import { createPortal } from 'react-dom';
|
|
4
|
+
import { MODALS_WRAPPER_BACKDROP_FADE_DURATION, MODALS_CONTENT_ID } from '../modal_constants.js';
|
|
5
5
|
import { useModalsContext } from '../hooks/use_modals_context.js';
|
|
6
6
|
|
|
7
7
|
var ModalsWrapper = function ModalsWrapper(_ref) {
|
|
@@ -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.createElement("div", null, showWrapper && (/*#__PURE__*/React.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.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.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, { 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.createElement(ModalsManagerContext.Provider, {
|
|
30
30
|
value: value
|
|
31
|
-
}, /*#__PURE__*/
|
|
31
|
+
}, /*#__PURE__*/React.createElement(ModalsWrapper, null, children));
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export { ModalsManager };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React 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.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.useContext(SegmentedControlContext);
|
|
17
|
+
return /*#__PURE__*/React.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 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.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 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.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__default.forwardRef(function (_ref, re
|
|
|
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.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.createElement(SegmentedControlContext.Provider, {
|
|
22
22
|
value: {
|
|
23
23
|
size: size,
|
|
24
24
|
variant: variant,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const PersistentSidebar: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
width?: string | undefined;
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement | null>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useRef, useImperativeHandle } from 'react';
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { cn } from '../../../utilities/cn.js';
|
|
4
|
+
import { useSidebar } from '../hooks/use_sidebar.js';
|
|
5
|
+
|
|
6
|
+
var _excluded = ["className", "width", "children"];
|
|
7
|
+
var PersistentSidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
|
+
var className = _ref.className,
|
|
9
|
+
width = _ref.width,
|
|
10
|
+
children = _ref.children,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
var _useSidebar = useSidebar(),
|
|
13
|
+
open = _useSidebar.open;
|
|
14
|
+
var sidebarRef = useRef(null);
|
|
15
|
+
useImperativeHandle(ref, function () {
|
|
16
|
+
return sidebarRef.current;
|
|
17
|
+
});
|
|
18
|
+
return /*#__PURE__*/React.createElement("aside", _objectSpread2({
|
|
19
|
+
"aria-expanded": open,
|
|
20
|
+
ref: sidebarRef,
|
|
21
|
+
className: cn('aurora-relative aurora-transition-all aurora-duration-200', className),
|
|
22
|
+
style: {
|
|
23
|
+
width: open ? width : 0,
|
|
24
|
+
maxWidth: open ? width : 0,
|
|
25
|
+
minWidth: open ? width : 0
|
|
26
|
+
}
|
|
27
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: cn('aurora-overflow-auto aurora-h-full aurora-w-full', {
|
|
29
|
+
'aurora-opacity-0': !open,
|
|
30
|
+
'aurora-opacity-100': open
|
|
31
|
+
})
|
|
32
|
+
}, children));
|
|
33
|
+
});
|
|
34
|
+
PersistentSidebar.displayName = 'PersistentSidebar';
|
|
35
|
+
|
|
36
|
+
export { PersistentSidebar };
|
|
37
|
+
//# sourceMappingURL=persistent_sidebar.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;"}
|
package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_components_types.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TSidebarSide, TSidebarSlideDirection, TSidebarVariant } from "../sidebar_types_types";
|
|
3
|
+
export declare type TPersistentSidebarProps = {
|
|
4
|
+
width?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
7
|
+
export declare type TTemporalSidebar = {
|
|
8
|
+
width?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
variant?: TSidebarVariant;
|
|
11
|
+
side?: TSidebarSide;
|
|
12
|
+
slideDirection?: TSidebarSlideDirection;
|
|
13
|
+
container?: HTMLElement;
|
|
14
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|