@dreamcommerce/aurora 3.0.0-232 → 3.0.0-234
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/accordion/components/accordion_content.js +60 -6
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_content.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/action_list/action_list_variants.js +1 -1
- package/build/cjs/packages/aurora/src/components/action_list/components/action_list_item.js +1 -1
- package/build/cjs/packages/aurora/src/components/action_list/components/action_list_radio_item.js +1 -1
- package/build/cjs/packages/aurora/src/components/action_list/components/action_list_radio_sub_trigger.js +1 -1
- package/build/cjs/packages/aurora/src/components/action_list/components/action_list_sub_trigger.js +1 -1
- package/build/cjs/packages/aurora/src/components/select/components/select_content.js +2 -3
- package/build/cjs/packages/aurora/src/components/select/components/select_content.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/sidebar/components/persistent_sidebar.js +1 -1
- package/build/cjs/packages/aurora/src/components/sidebar/components/temporal_sidebar.js +1 -1
- package/build/cjs/packages/aurora/src/components/zoom_stepper/zoom_stepper.js +21 -25
- package/build/cjs/packages/aurora/src/components/zoom_stepper/zoom_stepper.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/zoom_stepper/zoom_stepper_button.js +21 -0
- package/build/cjs/packages/aurora/src/components/zoom_stepper/zoom_stepper_button.js.map +1 -0
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_content.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_content.js +58 -8
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_content.js.map +1 -1
- package/build/esm/packages/aurora/src/components/action_list/action_list_variants.js +1 -1
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_item.js +1 -1
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_radio_item.js +1 -1
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_radio_sub_trigger.js +1 -1
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_sub_trigger.js +1 -1
- package/build/esm/packages/aurora/src/components/select/components/select_content.js +2 -3
- package/build/esm/packages/aurora/src/components/select/components/select_content.js.map +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/components/persistent_sidebar.js +1 -1
- package/build/esm/packages/aurora/src/components/sidebar/components/temporal_sidebar.js +1 -1
- package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper.js +21 -25
- package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper.js.map +1 -1
- package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper_button.d.ts +7 -0
- package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper_button.js +13 -0
- package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper_button.js.map +1 -0
- package/build/esm/packages/aurora/src/components/zoom_stepper/zoom_stepper_types.d.ts +3 -0
- package/build/index.css +1 -1
- package/package.json +1 -1
|
@@ -5,16 +5,70 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
7
7
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
8
|
+
var cn = require('../../../utilities/cn.js');
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
|
|
14
|
+
var _excluded = ["className", "children", "forceMount"];
|
|
15
|
+
var AccordionContent = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, forwardedRef) {
|
|
11
16
|
var className = _ref.className,
|
|
12
17
|
children = _ref.children,
|
|
18
|
+
forceMount = _ref.forceMount,
|
|
13
19
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
var contentRef = React__default['default'].useRef(null);
|
|
21
|
+
var _React$useState = React__default['default'].useState('0px'),
|
|
22
|
+
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
23
|
+
height = _React$useState2[0],
|
|
24
|
+
setHeight = _React$useState2[1];
|
|
25
|
+
var _React$useState3 = React__default['default'].useState(false),
|
|
26
|
+
_React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
|
|
27
|
+
isOpen = _React$useState4[0],
|
|
28
|
+
setIsOpen = _React$useState4[1];
|
|
29
|
+
var localRef = React__default['default'].useRef(null);
|
|
30
|
+
React.useImperativeHandle(forwardedRef, function () {
|
|
31
|
+
return localRef.current;
|
|
32
|
+
}, []);
|
|
33
|
+
React.useEffect(function () {
|
|
34
|
+
var element = localRef.current;
|
|
35
|
+
if (!element) return;
|
|
36
|
+
var handleStateChange = function handleStateChange() {
|
|
37
|
+
var isOpenState = element.getAttribute('data-state') === 'open';
|
|
38
|
+
setIsOpen(isOpenState);
|
|
39
|
+
};
|
|
40
|
+
handleStateChange();
|
|
41
|
+
var observer = new MutationObserver(handleStateChange);
|
|
42
|
+
observer.observe(element, {
|
|
43
|
+
attributes: true,
|
|
44
|
+
attributeFilter: ['data-state']
|
|
45
|
+
});
|
|
46
|
+
if (!contentRef.current) return;
|
|
47
|
+
var resizeObserver = new ResizeObserver(function (entries) {
|
|
48
|
+
entries.forEach(function (entry) {
|
|
49
|
+
setHeight("".concat(entry.contentRect.height, "px"));
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
resizeObserver.observe(contentRef.current);
|
|
53
|
+
return function () {
|
|
54
|
+
observer.disconnect();
|
|
55
|
+
resizeObserver.disconnect();
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
return /*#__PURE__*/React__default['default'].createElement(AccordionPrimitive.Content, _rollupPluginBabelHelpers.objectSpread2({
|
|
59
|
+
ref: localRef,
|
|
60
|
+
forceMount: forceMount,
|
|
61
|
+
className: cn.cn('aurora-overflow-hidden aurora-transition-all aurora-duration-200]', {
|
|
62
|
+
'data-[state=closed]:aurora-animate-accordion-up data-[state=open]:aurora-animate-accordion-down': !forceMount
|
|
63
|
+
}, className),
|
|
64
|
+
style: forceMount ? {
|
|
65
|
+
maxHeight: isOpen ? height : '0px',
|
|
66
|
+
opacity: isOpen ? 1 : 0
|
|
67
|
+
} : {},
|
|
68
|
+
"aria-hidden": !isOpen
|
|
69
|
+
}, props), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
70
|
+
ref: contentRef
|
|
71
|
+
}, children));
|
|
18
72
|
});
|
|
19
73
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
20
74
|
|
package/build/cjs/packages/aurora/src/components/accordion/components/accordion_content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var index = require('../../../../../external/class-variance-authority/dist/index.mjs.js');
|
|
6
6
|
|
|
7
|
-
var actionListTriggerVariants = index.cva('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
7
|
+
var actionListTriggerVariants = index.cva('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
basic: '',
|
|
@@ -19,7 +19,7 @@ var ActionListItem = /*#__PURE__*/React__default['default'].forwardRef(function
|
|
|
19
19
|
return /*#__PURE__*/React__default['default'].createElement(DropdownMenuPrimitive.Item, _rollupPluginBabelHelpers.objectSpread2({
|
|
20
20
|
ref: ref,
|
|
21
21
|
"data-test-el": "action-list-item",
|
|
22
|
-
className: cn.cn('aurora-relative aurora-outline-none aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 aurora-py-1.5 aurora-px-3 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
22
|
+
className: cn.cn('aurora-relative aurora-outline-none aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 aurora-py-1.5 aurora-px-3 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', inset && 'aurora-pl-8', className)
|
|
23
23
|
}, props));
|
|
24
24
|
});
|
|
25
25
|
ActionListItem.displayName = 'ActionListItem';
|
package/build/cjs/packages/aurora/src/components/action_list/components/action_list_radio_item.js
CHANGED
|
@@ -22,7 +22,7 @@ var ActionListRadioItem = /*#__PURE__*/React__default['default'].forwardRef(func
|
|
|
22
22
|
return /*#__PURE__*/React__default['default'].createElement(DropdownMenuPrimitive.RadioItem, _rollupPluginBabelHelpers.objectSpread2({
|
|
23
23
|
ref: ref,
|
|
24
24
|
"data-test-el": "action-list-radio-item",
|
|
25
|
-
className: cn.cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
25
|
+
className: cn.cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light data-[state=checked]:aurora-font-semibold', className),
|
|
26
26
|
disabled: disabled
|
|
27
27
|
}, props), /*#__PURE__*/React__default['default'].createElement(DropdownMenuPrimitive.ItemIndicator, {
|
|
28
28
|
className: "aurora-absolute aurora-left-2.5"
|
|
@@ -24,7 +24,7 @@ var ActionListRadioSubTrigger = /*#__PURE__*/React__default['default'].forwardRe
|
|
|
24
24
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
return /*#__PURE__*/React__default['default'].createElement(DropdownMenuPrimitive.SubTrigger, _rollupPluginBabelHelpers.objectSpread2({
|
|
26
26
|
ref: ref,
|
|
27
|
-
className: cn.cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
27
|
+
className: cn.cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', inset && 'aurora-pl-8', className),
|
|
28
28
|
"data-test-el": "action-list-sub-trigger"
|
|
29
29
|
}, props), selected ? (/*#__PURE__*/React__default['default'].createElement(check_fill_icon.CheckFillIcon, {
|
|
30
30
|
className: "aurora-absolute aurora-left-2.5",
|
package/build/cjs/packages/aurora/src/components/action_list/components/action_list_sub_trigger.js
CHANGED
|
@@ -22,7 +22,7 @@ var ActionListSubTrigger = /*#__PURE__*/React__default['default'].forwardRef(fun
|
|
|
22
22
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
return /*#__PURE__*/React__default['default'].createElement(DropdownMenuPrimitive.SubTrigger, _rollupPluginBabelHelpers.objectSpread2({
|
|
24
24
|
ref: ref,
|
|
25
|
-
className: cn.cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-px-3 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
25
|
+
className: cn.cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-px-3 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', inset && 'aurora-pl-8', className),
|
|
26
26
|
"data-test-el": "action-list-sub-trigger"
|
|
27
27
|
}, props), children, /*#__PURE__*/React__default['default'].createElement(arrow_right_line_icon.ArrowRightLineIcon, {
|
|
28
28
|
size: 20,
|
|
@@ -41,7 +41,7 @@ var SelectContent = /*#__PURE__*/React__default['default'].forwardRef(function (
|
|
|
41
41
|
style: {
|
|
42
42
|
width: triggerWidth ? "".concat(triggerWidth, "px") : 'auto'
|
|
43
43
|
},
|
|
44
|
-
className: cn.cn('aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-min-w-[fit-content] aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s aurora-shadow-m data-[state=open]:aurora-animate-in data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[state=open]:aurora-fade-in-0 data-[state=closed]:aurora-zoom-out-95 data-[state=open]:aurora-zoom-in-95 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2 aurora-p-1', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
|
|
44
|
+
className: cn.cn('aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-min-w-[fit-content] aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s aurora-shadow-m data-[state=open]:aurora-animate-in data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[state=open]:aurora-fade-in-0 data-[state=closed]:aurora-zoom-out-95 data-[state=open]:aurora-zoom-in-95 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2 aurora-p-1 js__aurora-select-dropdown', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
|
|
45
45
|
position: position,
|
|
46
46
|
onMouseEnter: function onMouseEnter() {
|
|
47
47
|
return setIsHovered(true);
|
|
@@ -74,8 +74,7 @@ var SelectContent = /*#__PURE__*/React__default['default'].forwardRef(function (
|
|
|
74
74
|
e.stopPropagation();
|
|
75
75
|
},
|
|
76
76
|
placeholder: searchPlaceholder,
|
|
77
|
-
ref: inputRef
|
|
78
|
-
className: "js__select-search-input"
|
|
77
|
+
ref: inputRef
|
|
79
78
|
}))), options === null || options === void 0 ? void 0 : options.map(function (option, index) {
|
|
80
79
|
var isSelected = selectedValue ? option.value === selectedValue : false;
|
|
81
80
|
return option.isHeader ? (/*#__PURE__*/React__default['default'].createElement(select_group_label.SelectGroupLabel, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0EAA8E;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0EAA8E;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -46,7 +46,7 @@ var PersistentSidebar = /*#__PURE__*/React__default['default'].forwardRef(functi
|
|
|
46
46
|
});
|
|
47
47
|
return /*#__PURE__*/React__default['default'].createElement("aside", _rollupPluginBabelHelpers.objectSpread2({
|
|
48
48
|
"aria-expanded": open,
|
|
49
|
-
className: cn.cn('aurora-relative aurora-transition-all aurora-duration-200
|
|
49
|
+
className: cn.cn('aurora-relative aurora-transition-all aurora-duration-200'),
|
|
50
50
|
style: {
|
|
51
51
|
width: open ? width : 0,
|
|
52
52
|
maxWidth: open ? width : 0,
|
|
@@ -91,7 +91,7 @@ var TemporalSidebar = /*#__PURE__*/React__default['default'].forwardRef(function
|
|
|
91
91
|
});
|
|
92
92
|
if (destroyed) return null;
|
|
93
93
|
return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React__default['default'].createElement("div", _rollupPluginBabelHelpers.objectSpread2({
|
|
94
|
-
className: cn.cn('aurora-absolute aurora-z-20 aurora-top-0 aurora-h-full
|
|
94
|
+
className: cn.cn('aurora-absolute aurora-z-20 aurora-top-0 aurora-h-full', {
|
|
95
95
|
'aurora-left-0': side === sidebar_constants.SIDEBAR_SIDE.left,
|
|
96
96
|
'aurora-right-0': side === sidebar_constants.SIDEBAR_SIDE.right
|
|
97
97
|
}),
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var useTranslation = require('../../../../../external/react-i18next/dist/es/useTranslation.js');
|
|
7
6
|
var action_list = require('../action_list/action_list.js');
|
|
8
7
|
var action_list_content = require('../action_list/components/action_list_content.js');
|
|
9
8
|
var action_list_radio_group = require('../action_list/components/action_list_radio_group.js');
|
|
@@ -15,6 +14,7 @@ var tooltip_content = require('../tooltip/components/tooltip_content.js');
|
|
|
15
14
|
var tooltip_provider = require('../tooltip/context/tooltip_provider.js');
|
|
16
15
|
var subtract_line_icon = require('../../assets/icons/subtract_line_icon.js');
|
|
17
16
|
var add_line_icon = require('../../assets/icons/add_line_icon.js');
|
|
17
|
+
var zoom_stepper_button = require('./zoom_stepper_button.js');
|
|
18
18
|
|
|
19
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
20
|
|
|
@@ -31,9 +31,9 @@ var ZoomStepper = function ZoomStepper(_ref) {
|
|
|
31
31
|
min = _ref$min === void 0 ? 10 : _ref$min,
|
|
32
32
|
_ref$max = _ref.max,
|
|
33
33
|
max = _ref$max === void 0 ? 200 : _ref$max,
|
|
34
|
-
options = _ref.options
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
options = _ref.options,
|
|
35
|
+
increaseTooltipText = _ref.increaseTooltipText,
|
|
36
|
+
decreaseTooltipText = _ref.decreaseTooltipText;
|
|
37
37
|
var roundToNextStep = function roundToNextStep(val, step) {
|
|
38
38
|
return Math.ceil(val / step) * step;
|
|
39
39
|
};
|
|
@@ -58,19 +58,23 @@ var ZoomStepper = function ZoomStepper(_ref) {
|
|
|
58
58
|
onChange === null || onChange === void 0 ? void 0 : onChange(parsed);
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
var renderButton = function renderButton(onClick, icon, tooltipText) {
|
|
62
|
+
var button = /*#__PURE__*/React__default['default'].createElement(zoom_stepper_button.ZoomStepperButton, {
|
|
63
|
+
onClick: onClick,
|
|
64
|
+
icon: icon
|
|
65
|
+
});
|
|
66
|
+
return tooltipText ? (/*#__PURE__*/React__default['default'].createElement(tooltip.Tooltip, null, /*#__PURE__*/React__default['default'].createElement(tooltip_trigger.TooltipTrigger, {
|
|
67
|
+
className: "aurora-h-5",
|
|
68
|
+
asChild: true
|
|
69
|
+
}, button), /*#__PURE__*/React__default['default'].createElement(tooltip_content.TooltipContent, {
|
|
70
|
+
variant: "dark"
|
|
71
|
+
}, tooltipText))) : button;
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/React__default['default'].createElement(tooltip_provider.TooltipProvider, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
62
74
|
className: "aurora-flex aurora-items-center aurora-gap-1"
|
|
63
|
-
},
|
|
64
|
-
asChild: true,
|
|
65
|
-
className: "aurora-h-5"
|
|
66
|
-
}, /*#__PURE__*/React__default['default'].createElement("button", {
|
|
67
|
-
className: "aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg hover:aurora-bg-hover",
|
|
68
|
-
onClick: handleDecrease
|
|
69
|
-
}, /*#__PURE__*/React__default['default'].createElement(subtract_line_icon.SubtractLineIcon, {
|
|
75
|
+
}, renderButton(handleDecrease, /*#__PURE__*/React__default['default'].createElement(subtract_line_icon.SubtractLineIcon, {
|
|
70
76
|
size: 16
|
|
71
|
-
}))
|
|
72
|
-
variant: "dark"
|
|
73
|
-
}, "".concat(t('Zoom out ⌘ -'))))), /*#__PURE__*/React__default['default'].createElement(action_list.ActionList, null, /*#__PURE__*/React__default['default'].createElement(action_list_trigger.ActionListTrigger, {
|
|
77
|
+
}), decreaseTooltipText), /*#__PURE__*/React__default['default'].createElement(action_list.ActionList, null, /*#__PURE__*/React__default['default'].createElement(action_list_trigger.ActionListTrigger, {
|
|
74
78
|
variant: "noDropdownIcon",
|
|
75
79
|
className: "aurora-text-xs aurora-flex aurora-items-center !aurora-justify-center !aurora-px-1 !aurora-py-0 aurora-w-[46px]"
|
|
76
80
|
}, "".concat(value, "%")), /*#__PURE__*/React__default['default'].createElement(action_list_content.ActionListContent, null, /*#__PURE__*/React__default['default'].createElement(action_list_radio_group.ActionListRadioGroup, {
|
|
@@ -81,17 +85,9 @@ var ZoomStepper = function ZoomStepper(_ref) {
|
|
|
81
85
|
key: opt.value,
|
|
82
86
|
value: opt.value
|
|
83
87
|
}, opt.text);
|
|
84
|
-
})))),
|
|
85
|
-
asChild: true,
|
|
86
|
-
className: "aurora-h-5"
|
|
87
|
-
}, /*#__PURE__*/React__default['default'].createElement("button", {
|
|
88
|
-
className: "aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg hover:aurora-bg-hover",
|
|
89
|
-
onClick: handleIncrease
|
|
90
|
-
}, /*#__PURE__*/React__default['default'].createElement(add_line_icon.AddLineIcon, {
|
|
88
|
+
})))), renderButton(handleIncrease, /*#__PURE__*/React__default['default'].createElement(add_line_icon.AddLineIcon, {
|
|
91
89
|
size: 16
|
|
92
|
-
})))
|
|
93
|
-
variant: "dark"
|
|
94
|
-
}, "".concat(t('Zoom in ⌘ +'))))));
|
|
90
|
+
}), increaseTooltipText)));
|
|
95
91
|
};
|
|
96
92
|
ZoomStepper.displayName = 'ZoomStepper';
|
|
97
93
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
+
|
|
11
|
+
var ZoomStepperButton = function ZoomStepperButton(_ref) {
|
|
12
|
+
var onClick = _ref.onClick,
|
|
13
|
+
icon = _ref.icon;
|
|
14
|
+
return /*#__PURE__*/React__default['default'].createElement("button", {
|
|
15
|
+
onClick: onClick,
|
|
16
|
+
className: "aurora-h-5 aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg hover:aurora-bg-hover"
|
|
17
|
+
}, icon);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.ZoomStepperButton = ZoomStepperButton;
|
|
21
|
+
//# sourceMappingURL=zoom_stepper_button.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;"}
|
package/build/esm/packages/aurora/src/components/accordion/components/accordion_content.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
export declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,16 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
1
|
+
import React, { useImperativeHandle, useEffect } from 'react';
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { Content } from '@radix-ui/react-accordion';
|
|
4
|
+
import { cn } from '../../../utilities/cn.js';
|
|
4
5
|
|
|
5
|
-
var _excluded = ["className", "children"];
|
|
6
|
-
var AccordionContent = /*#__PURE__*/forwardRef(function (_ref,
|
|
6
|
+
var _excluded = ["className", "children", "forceMount"];
|
|
7
|
+
var AccordionContent = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
7
8
|
var className = _ref.className,
|
|
8
9
|
children = _ref.children,
|
|
10
|
+
forceMount = _ref.forceMount,
|
|
9
11
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var contentRef = React.useRef(null);
|
|
13
|
+
var _React$useState = React.useState('0px'),
|
|
14
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
15
|
+
height = _React$useState2[0],
|
|
16
|
+
setHeight = _React$useState2[1];
|
|
17
|
+
var _React$useState3 = React.useState(false),
|
|
18
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
19
|
+
isOpen = _React$useState4[0],
|
|
20
|
+
setIsOpen = _React$useState4[1];
|
|
21
|
+
var localRef = React.useRef(null);
|
|
22
|
+
useImperativeHandle(forwardedRef, function () {
|
|
23
|
+
return localRef.current;
|
|
24
|
+
}, []);
|
|
25
|
+
useEffect(function () {
|
|
26
|
+
var element = localRef.current;
|
|
27
|
+
if (!element) return;
|
|
28
|
+
var handleStateChange = function handleStateChange() {
|
|
29
|
+
var isOpenState = element.getAttribute('data-state') === 'open';
|
|
30
|
+
setIsOpen(isOpenState);
|
|
31
|
+
};
|
|
32
|
+
handleStateChange();
|
|
33
|
+
var observer = new MutationObserver(handleStateChange);
|
|
34
|
+
observer.observe(element, {
|
|
35
|
+
attributes: true,
|
|
36
|
+
attributeFilter: ['data-state']
|
|
37
|
+
});
|
|
38
|
+
if (!contentRef.current) return;
|
|
39
|
+
var resizeObserver = new ResizeObserver(function (entries) {
|
|
40
|
+
entries.forEach(function (entry) {
|
|
41
|
+
setHeight("".concat(entry.contentRect.height, "px"));
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
resizeObserver.observe(contentRef.current);
|
|
45
|
+
return function () {
|
|
46
|
+
observer.disconnect();
|
|
47
|
+
resizeObserver.disconnect();
|
|
48
|
+
};
|
|
49
|
+
}, []);
|
|
50
|
+
return /*#__PURE__*/React.createElement(Content, _objectSpread2({
|
|
51
|
+
ref: localRef,
|
|
52
|
+
forceMount: forceMount,
|
|
53
|
+
className: cn('aurora-overflow-hidden aurora-transition-all aurora-duration-200]', {
|
|
54
|
+
'data-[state=closed]:aurora-animate-accordion-up data-[state=open]:aurora-animate-accordion-down': !forceMount
|
|
55
|
+
}, className),
|
|
56
|
+
style: forceMount ? {
|
|
57
|
+
maxHeight: isOpen ? height : '0px',
|
|
58
|
+
opacity: isOpen ? 1 : 0
|
|
59
|
+
} : {},
|
|
60
|
+
"aria-hidden": !isOpen
|
|
61
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
ref: contentRef
|
|
63
|
+
}, children));
|
|
14
64
|
});
|
|
15
65
|
AccordionContent.displayName = Content.displayName;
|
|
16
66
|
|
package/build/esm/packages/aurora/src/components/accordion/components/accordion_content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva } from '../../../../../external/class-variance-authority/dist/index.mjs.js';
|
|
2
2
|
|
|
3
|
-
var actionListTriggerVariants = cva('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
3
|
+
var actionListTriggerVariants = cva('aurora-group aurora-max-h-[32px] aurora-text-s aurora-py-1 aurora-px-3 aurora-rounded-6 aurora-bg aurora-flex aurora-justify-between hover:aurora-bg-hover aurora-select-none focus aurora-cursor-pointer aurora-items-center aurora-gap-2.5 aurora-transition-all data-[state=open]:aurora-bg-active data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', {
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
6
|
basic: '',
|
|
@@ -11,7 +11,7 @@ var ActionListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11
11
|
return /*#__PURE__*/React.createElement(Item, _objectSpread2({
|
|
12
12
|
ref: ref,
|
|
13
13
|
"data-test-el": "action-list-item",
|
|
14
|
-
className: cn('aurora-relative aurora-outline-none aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 aurora-py-1.5 aurora-px-3 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
14
|
+
className: cn('aurora-relative aurora-outline-none aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 aurora-py-1.5 aurora-px-3 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', inset && 'aurora-pl-8', className)
|
|
15
15
|
}, props));
|
|
16
16
|
});
|
|
17
17
|
ActionListItem.displayName = 'ActionListItem';
|
package/build/esm/packages/aurora/src/components/action_list/components/action_list_radio_item.js
CHANGED
|
@@ -14,7 +14,7 @@ var ActionListRadioItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14
14
|
return /*#__PURE__*/React.createElement(RadioItem, _objectSpread2({
|
|
15
15
|
ref: ref,
|
|
16
16
|
"data-test-el": "action-list-radio-item",
|
|
17
|
-
className: cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
17
|
+
className: cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light data-[state=checked]:aurora-font-semibold', className),
|
|
18
18
|
disabled: disabled
|
|
19
19
|
}, props), /*#__PURE__*/React.createElement(ItemIndicator, {
|
|
20
20
|
className: "aurora-absolute aurora-left-2.5"
|
|
@@ -16,7 +16,7 @@ var ActionListRadioSubTrigger = /*#__PURE__*/React.forwardRef(function (_ref, re
|
|
|
16
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
17
|
return /*#__PURE__*/React.createElement(SubTrigger, _objectSpread2({
|
|
18
18
|
ref: ref,
|
|
19
|
-
className: cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
19
|
+
className: cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-pr-3 aurora-pl-10 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', inset && 'aurora-pl-8', className),
|
|
20
20
|
"data-test-el": "action-list-sub-trigger"
|
|
21
21
|
}, props), selected ? (/*#__PURE__*/React.createElement(CheckFillIcon, {
|
|
22
22
|
className: "aurora-absolute aurora-left-2.5",
|
package/build/esm/packages/aurora/src/components/action_list/components/action_list_sub_trigger.js
CHANGED
|
@@ -14,7 +14,7 @@ var ActionListSubTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
return /*#__PURE__*/React.createElement(SubTrigger, _objectSpread2({
|
|
16
16
|
ref: ref,
|
|
17
|
-
className: cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-px-3 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-
|
|
17
|
+
className: cn('aurora-relative aurora-outline-none aurora-py-1.5 aurora-px-3 aurora-flex aurora-justify-between aurora-cursor-pointer aurora-select-none aurora-items-center aurora-gap-2.5 focus:aurora-bg-hover aurora-text-s aurora-transition-colors aurora-rounded-6 hover:aurora-bg-hover data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-text-subtle-light', inset && 'aurora-pl-8', className),
|
|
18
18
|
"data-test-el": "action-list-sub-trigger"
|
|
19
19
|
}, props), children, /*#__PURE__*/React.createElement(ArrowRightLineIcon, {
|
|
20
20
|
size: 20,
|
|
@@ -33,7 +33,7 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
33
33
|
style: {
|
|
34
34
|
width: triggerWidth ? "".concat(triggerWidth, "px") : 'auto'
|
|
35
35
|
},
|
|
36
|
-
className: cn('aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-min-w-[fit-content] aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s aurora-shadow-m data-[state=open]:aurora-animate-in data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[state=open]:aurora-fade-in-0 data-[state=closed]:aurora-zoom-out-95 data-[state=open]:aurora-zoom-in-95 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2 aurora-p-1', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
|
|
36
|
+
className: cn('aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-min-w-[fit-content] aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s aurora-shadow-m data-[state=open]:aurora-animate-in data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[state=open]:aurora-fade-in-0 data-[state=closed]:aurora-zoom-out-95 data-[state=open]:aurora-zoom-in-95 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2 aurora-p-1 js__aurora-select-dropdown', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
|
|
37
37
|
position: position,
|
|
38
38
|
onMouseEnter: function onMouseEnter() {
|
|
39
39
|
return setIsHovered(true);
|
|
@@ -66,8 +66,7 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
66
66
|
e.stopPropagation();
|
|
67
67
|
},
|
|
68
68
|
placeholder: searchPlaceholder,
|
|
69
|
-
ref: inputRef
|
|
70
|
-
className: "js__select-search-input"
|
|
69
|
+
ref: inputRef
|
|
71
70
|
}))), options === null || options === void 0 ? void 0 : options.map(function (option, index) {
|
|
72
71
|
var isSelected = selectedValue ? option.value === selectedValue : false;
|
|
73
72
|
return option.isHeader ? (/*#__PURE__*/React.createElement(SelectGroupLabel, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,+DAA+D,0EAA8E;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,+DAA+D,0EAA8E;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -38,7 +38,7 @@ var PersistentSidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
38
38
|
});
|
|
39
39
|
return /*#__PURE__*/React.createElement("aside", _objectSpread2({
|
|
40
40
|
"aria-expanded": open,
|
|
41
|
-
className: cn('aurora-relative aurora-transition-all aurora-duration-200
|
|
41
|
+
className: cn('aurora-relative aurora-transition-all aurora-duration-200'),
|
|
42
42
|
style: {
|
|
43
43
|
width: open ? width : 0,
|
|
44
44
|
maxWidth: open ? width : 0,
|
|
@@ -83,7 +83,7 @@ var TemporalSidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
83
83
|
});
|
|
84
84
|
if (destroyed) return null;
|
|
85
85
|
return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", _objectSpread2({
|
|
86
|
-
className: cn('aurora-absolute aurora-z-20 aurora-top-0 aurora-h-full
|
|
86
|
+
className: cn('aurora-absolute aurora-z-20 aurora-top-0 aurora-h-full', {
|
|
87
87
|
'aurora-left-0': side === SIDEBAR_SIDE.left,
|
|
88
88
|
'aurora-right-0': side === SIDEBAR_SIDE.right
|
|
89
89
|
}),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useTranslation } from '../../../../../external/react-i18next/dist/es/useTranslation.js';
|
|
3
2
|
import { ActionList } from '../action_list/action_list.js';
|
|
4
3
|
import { ActionListContent } from '../action_list/components/action_list_content.js';
|
|
5
4
|
import { ActionListRadioGroup } from '../action_list/components/action_list_radio_group.js';
|
|
@@ -11,6 +10,7 @@ import { TooltipContent } from '../tooltip/components/tooltip_content.js';
|
|
|
11
10
|
import { TooltipProvider } from '../tooltip/context/tooltip_provider.js';
|
|
12
11
|
import { SubtractLineIcon } from '../../assets/icons/subtract_line_icon.js';
|
|
13
12
|
import { AddLineIcon } from '../../assets/icons/add_line_icon.js';
|
|
13
|
+
import { ZoomStepperButton } from './zoom_stepper_button.js';
|
|
14
14
|
|
|
15
15
|
var ZoomStepper = function ZoomStepper(_ref) {
|
|
16
16
|
var value = _ref.value,
|
|
@@ -23,9 +23,9 @@ var ZoomStepper = function ZoomStepper(_ref) {
|
|
|
23
23
|
min = _ref$min === void 0 ? 10 : _ref$min,
|
|
24
24
|
_ref$max = _ref.max,
|
|
25
25
|
max = _ref$max === void 0 ? 200 : _ref$max,
|
|
26
|
-
options = _ref.options
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
options = _ref.options,
|
|
27
|
+
increaseTooltipText = _ref.increaseTooltipText,
|
|
28
|
+
decreaseTooltipText = _ref.decreaseTooltipText;
|
|
29
29
|
var roundToNextStep = function roundToNextStep(val, step) {
|
|
30
30
|
return Math.ceil(val / step) * step;
|
|
31
31
|
};
|
|
@@ -50,19 +50,23 @@ var ZoomStepper = function ZoomStepper(_ref) {
|
|
|
50
50
|
onChange === null || onChange === void 0 ? void 0 : onChange(parsed);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
var renderButton = function renderButton(onClick, icon, tooltipText) {
|
|
54
|
+
var button = /*#__PURE__*/React.createElement(ZoomStepperButton, {
|
|
55
|
+
onClick: onClick,
|
|
56
|
+
icon: icon
|
|
57
|
+
});
|
|
58
|
+
return tooltipText ? (/*#__PURE__*/React.createElement(Tooltip, null, /*#__PURE__*/React.createElement(TooltipTrigger, {
|
|
59
|
+
className: "aurora-h-5",
|
|
60
|
+
asChild: true
|
|
61
|
+
}, button), /*#__PURE__*/React.createElement(TooltipContent, {
|
|
62
|
+
variant: "dark"
|
|
63
|
+
}, tooltipText))) : button;
|
|
64
|
+
};
|
|
65
|
+
return /*#__PURE__*/React.createElement(TooltipProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
54
66
|
className: "aurora-flex aurora-items-center aurora-gap-1"
|
|
55
|
-
},
|
|
56
|
-
asChild: true,
|
|
57
|
-
className: "aurora-h-5"
|
|
58
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
59
|
-
className: "aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg hover:aurora-bg-hover",
|
|
60
|
-
onClick: handleDecrease
|
|
61
|
-
}, /*#__PURE__*/React.createElement(SubtractLineIcon, {
|
|
67
|
+
}, renderButton(handleDecrease, /*#__PURE__*/React.createElement(SubtractLineIcon, {
|
|
62
68
|
size: 16
|
|
63
|
-
}))
|
|
64
|
-
variant: "dark"
|
|
65
|
-
}, "".concat(t('Zoom out ⌘ -'))))), /*#__PURE__*/React.createElement(ActionList, null, /*#__PURE__*/React.createElement(ActionListTrigger, {
|
|
69
|
+
}), decreaseTooltipText), /*#__PURE__*/React.createElement(ActionList, null, /*#__PURE__*/React.createElement(ActionListTrigger, {
|
|
66
70
|
variant: "noDropdownIcon",
|
|
67
71
|
className: "aurora-text-xs aurora-flex aurora-items-center !aurora-justify-center !aurora-px-1 !aurora-py-0 aurora-w-[46px]"
|
|
68
72
|
}, "".concat(value, "%")), /*#__PURE__*/React.createElement(ActionListContent, null, /*#__PURE__*/React.createElement(ActionListRadioGroup, {
|
|
@@ -73,17 +77,9 @@ var ZoomStepper = function ZoomStepper(_ref) {
|
|
|
73
77
|
key: opt.value,
|
|
74
78
|
value: opt.value
|
|
75
79
|
}, opt.text);
|
|
76
|
-
})))),
|
|
77
|
-
asChild: true,
|
|
78
|
-
className: "aurora-h-5"
|
|
79
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
80
|
-
className: "aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg hover:aurora-bg-hover",
|
|
81
|
-
onClick: handleIncrease
|
|
82
|
-
}, /*#__PURE__*/React.createElement(AddLineIcon, {
|
|
80
|
+
})))), renderButton(handleIncrease, /*#__PURE__*/React.createElement(AddLineIcon, {
|
|
83
81
|
size: 16
|
|
84
|
-
})))
|
|
85
|
-
variant: "dark"
|
|
86
|
-
}, "".concat(t('Zoom in ⌘ +'))))));
|
|
82
|
+
}), increaseTooltipText)));
|
|
87
83
|
};
|
|
88
84
|
ZoomStepper.displayName = 'ZoomStepper';
|
|
89
85
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
var ZoomStepperButton = function ZoomStepperButton(_ref) {
|
|
4
|
+
var onClick = _ref.onClick,
|
|
5
|
+
icon = _ref.icon;
|
|
6
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
7
|
+
onClick: onClick,
|
|
8
|
+
className: "aurora-h-5 aurora-p-0.5 aurora-border-0 aurora-bg-none aurora-cursor-pointer aurora-rounded-4 aurora-bg hover:aurora-bg-hover"
|
|
9
|
+
}, icon);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { ZoomStepperButton };
|
|
13
|
+
//# sourceMappingURL=zoom_stepper_button.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;"}
|