@dreamcommerce/aurora 3.0.0-77 → 3.0.0-79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/packages/aurora/src/assets/icons/lock_icon.js +10 -0
- package/build/cjs/packages/aurora/src/assets/icons/lock_icon.js.map +1 -0
- package/build/cjs/packages/aurora/src/assets/icons/lock_unlock_icon.js +10 -0
- package/build/cjs/packages/aurora/src/assets/icons/lock_unlock_icon.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_content.js +1 -1
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_item.js +3 -2
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_item.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_trigger.js +6 -7
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_trigger.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/controls/values_syncer_control/values_syncer_control.js +51 -0
- package/build/cjs/packages/aurora/src/components/controls/values_syncer_control/values_syncer_control.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/controls/xhr_image_picker_control/xhr_image_picker_control.js +3 -1
- package/build/cjs/packages/aurora/src/components/controls/xhr_image_picker_control/xhr_image_picker_control.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/values_syncer/values_syncer.js +90 -0
- package/build/cjs/packages/aurora/src/components/values_syncer/values_syncer.js.map +1 -0
- package/build/cjs/packages/aurora/src/index.js +4 -0
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icons/lock_icon.js +5 -2
- package/build/esm/packages/aurora/src/assets/icons/lock_icon.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icons/lock_unlock_icon.js +5 -2
- package/build/esm/packages/aurora/src/assets/icons/lock_unlock_icon.js.map +1 -1
- package/build/esm/packages/aurora/src/components/accordion/accordion_types.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_content.js +1 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_item.d.ts +3 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_item.js +4 -3
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_item.js.map +1 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_trigger.js +6 -7
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_trigger.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/values_syncer_control/values_syncer_control.js +40 -11
- package/build/esm/packages/aurora/src/components/controls/values_syncer_control/values_syncer_control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/values_syncer_control/values_syncer_control_types.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/controls/values_syncer_control/values_syncer_control_types.js +1 -2
- package/build/esm/packages/aurora/src/components/controls/values_syncer_control/values_syncer_control_types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/xhr_image_picker_control/xhr_image_picker_control.js +3 -1
- package/build/esm/packages/aurora/src/components/controls/xhr_image_picker_control/xhr_image_picker_control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/xhr_image_picker_control/xhr_image_picker_control_types.d.ts +3 -3
- package/build/esm/packages/aurora/src/components/controls/xhr_image_picker_control/xhr_image_picker_control_types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/image_picker/image_picker_types.d.ts +3 -3
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer.d.ts +1 -2
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer.js +81 -43
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer.js.map +1 -1
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer_types.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer_types.js +1 -1
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer_types.js.map +1 -1
- package/build/esm/packages/aurora/src/index.d.ts +2 -0
- package/build/esm/packages/aurora/src/index.js +2 -0
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/build/index.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var react = require('@remixicon/react');
|
|
6
|
+
|
|
7
|
+
var LockUnlockLineIcon = react.RiLockUnlockLine;
|
|
8
|
+
|
|
9
|
+
exports.LockUnlockLineIcon = LockUnlockLineIcon;
|
|
10
|
+
//# sourceMappingURL=lock_unlock_icon.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;"}
|
|
@@ -13,7 +13,7 @@ var AccordionContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
13
13
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
14
14
|
return /*#__PURE__*/React.createElement(AccordionPrimitive.Content, _rollupPluginBabelHelpers.objectSpread2({
|
|
15
15
|
ref: ref,
|
|
16
|
-
className: "aurora-
|
|
16
|
+
className: "aurora-overflow-hidden data-[state=closed]:aurora-animate-accordion-up data-[state=open]:aurora-animate-accordion-down"
|
|
17
17
|
}, props), children);
|
|
18
18
|
});
|
|
19
19
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
@@ -7,13 +7,14 @@ var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPlugi
|
|
|
7
7
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
8
8
|
var cn = require('../../../utilities/cn.js');
|
|
9
9
|
|
|
10
|
-
var _excluded = ["className"];
|
|
10
|
+
var _excluded = ["className", "borderStyle"];
|
|
11
11
|
var AccordionItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
|
+
borderStyle = _ref.borderStyle,
|
|
13
14
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
14
15
|
return /*#__PURE__*/React.createElement(AccordionPrimitive.Item, _rollupPluginBabelHelpers.objectSpread2({
|
|
15
16
|
ref: ref,
|
|
16
|
-
className: cn.cn(className)
|
|
17
|
+
className: cn.cn('aurora-border-t last:aurora-border-b', _rollupPluginBabelHelpers.defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
|
|
17
18
|
}, props));
|
|
18
19
|
});
|
|
19
20
|
AccordionItem.displayName = 'AccordionItem';
|
|
@@ -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;"}
|
|
@@ -11,25 +11,24 @@ var accordion_context = require('../context/accordion_context.js');
|
|
|
11
11
|
var cn = require('../../../utilities/cn.js');
|
|
12
12
|
var arrow_right = require('../../../assets/icons/arrow_right.js');
|
|
13
13
|
|
|
14
|
-
var _excluded = ["className", "children", "backgroundColor", "
|
|
14
|
+
var _excluded = ["className", "children", "backgroundColor", "icon", "iconColor"];
|
|
15
15
|
var AccordionTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16
16
|
var className = _ref.className,
|
|
17
17
|
children = _ref.children,
|
|
18
18
|
backgroundColor = _ref.backgroundColor,
|
|
19
|
-
borderStyle = _ref.borderStyle,
|
|
20
19
|
icon = _ref.icon,
|
|
21
20
|
_ref$iconColor = _ref.iconColor,
|
|
22
|
-
iconColor = _ref$iconColor === void 0 ? css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES.base : _ref$iconColor,
|
|
23
21
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
24
22
|
var accordionContext = React.useContext(accordion_context.AccordionContext);
|
|
25
|
-
var hasBorderStyles = !!borderStyle;
|
|
26
23
|
return /*#__PURE__*/React.createElement(AccordionPrimitive.Header, {
|
|
27
|
-
className:
|
|
24
|
+
className:
|
|
25
|
+
// 'aurora-border-t last:aurora-border-b last:border-t-0 data-[state=open]:aurora-border-b-0 group-[&:not(:first-of-type)]:aurora-border-t-0',
|
|
26
|
+
cn.cn(_rollupPluginBabelHelpers.defineProperty({}, "aurora-bg-".concat(backgroundColor), !!backgroundColor))
|
|
28
27
|
}, /*#__PURE__*/React.createElement(AccordionPrimitive.Trigger, _rollupPluginBabelHelpers.objectSpread2({
|
|
29
28
|
ref: ref,
|
|
30
|
-
className: cn.cn('aurora-flex aurora-items-center aurora-gap-2 aurora-
|
|
29
|
+
className: cn.cn('aurora-flex aurora-items-center aurora-gap-2 aurora-py-2 aurora-pl-1.5 aurora-pr-4 aurora-text aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _rollupPluginBabelHelpers.defineProperty({}, 'aurora-bg', !backgroundColor), className)
|
|
31
30
|
}, props), icon ? icon : (/*#__PURE__*/React.createElement(arrow_right.ArrowRightIcon, {
|
|
32
|
-
color: css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES
|
|
31
|
+
color: css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES.base,
|
|
33
32
|
size: accordionContext.size === accordion_constants.ACCORDION_SIZES.default ? 24 : 20,
|
|
34
33
|
className: cn.cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200')
|
|
35
34
|
})), children));
|
package/build/cjs/packages/aurora/src/components/accordion/components/accordion_trigger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var label = require('../../label/label.js');
|
|
7
|
+
var helper_text = require('../../helper_text/helper_text.js');
|
|
8
|
+
var error_list = require('../../error_list/error_list.js');
|
|
9
|
+
var control = require('../../control/control.js');
|
|
10
|
+
var values_syncer = require('../../values_syncer/values_syncer.js');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
|
|
16
|
+
var ValuesSyncerControl = function ValuesSyncerControl(_ref) {
|
|
17
|
+
var label$1 = _ref.label,
|
|
18
|
+
_ref$required = _ref.required,
|
|
19
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
20
|
+
tooltip = _ref.tooltip,
|
|
21
|
+
errors = _ref.errors,
|
|
22
|
+
firstControl = _ref.firstControl,
|
|
23
|
+
secondControl = _ref.secondControl,
|
|
24
|
+
initialFirstValue = _ref.initialFirstValue,
|
|
25
|
+
initialSecondValue = _ref.initialSecondValue,
|
|
26
|
+
isLocked = _ref.isLocked,
|
|
27
|
+
onLock = _ref.onLock,
|
|
28
|
+
onChange = _ref.onChange,
|
|
29
|
+
helperText = _ref.helperText;
|
|
30
|
+
return /*#__PURE__*/React__default['default'].createElement(control.Control, {
|
|
31
|
+
classname: "aurora-flex-col"
|
|
32
|
+
}, label$1 && (/*#__PURE__*/React__default['default'].createElement(label.Label, {
|
|
33
|
+
required: required,
|
|
34
|
+
tooltip: tooltip
|
|
35
|
+
}, label$1)), /*#__PURE__*/React__default['default'].createElement(values_syncer.ValuesSyncer, {
|
|
36
|
+
firstControl: firstControl,
|
|
37
|
+
secondControl: secondControl,
|
|
38
|
+
initialFirstValue: initialFirstValue,
|
|
39
|
+
initialSecondValue: initialSecondValue,
|
|
40
|
+
isLocked: isLocked,
|
|
41
|
+
onLock: onLock,
|
|
42
|
+
onChange: onChange
|
|
43
|
+
}), helperText && /*#__PURE__*/React__default['default'].createElement(helper_text.HelperText, null, helperText), errors && /*#__PURE__*/React__default['default'].createElement(error_list.ErrorList, {
|
|
44
|
+
errors: errors,
|
|
45
|
+
className: "aurora-text-danger aurora-text-sm"
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
ValuesSyncerControl.displayName = 'ValuesSyncerControl';
|
|
49
|
+
|
|
50
|
+
exports.ValuesSyncerControl = ValuesSyncerControl;
|
|
51
|
+
//# sourceMappingURL=values_syncer_control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
7
7
|
var label = require('../../label/label.js');
|
|
8
|
+
var helper_text = require('../../helper_text/helper_text.js');
|
|
8
9
|
var error_list = require('../../error_list/error_list.js');
|
|
9
10
|
var control = require('../../control/control.js');
|
|
10
11
|
var xhr_image_picker = require('../../xhr_image_picker/xhr_image_picker.js');
|
|
@@ -26,6 +27,7 @@ var XhrImagePickerControl = function XhrImagePickerControl(_ref) {
|
|
|
26
27
|
errors = _ref.errors,
|
|
27
28
|
tooltip = _ref.tooltip,
|
|
28
29
|
onUploaded = _ref.onUploaded,
|
|
30
|
+
helperText = _ref.helperText,
|
|
29
31
|
onImageSizeUpdated = _ref.onImageSizeUpdated,
|
|
30
32
|
ImageEditor = _ref.ImageEditor;
|
|
31
33
|
var _useState = React.useState(errors),
|
|
@@ -62,7 +64,7 @@ var XhrImagePickerControl = function XhrImagePickerControl(_ref) {
|
|
|
62
64
|
onUploaded: onUploaded,
|
|
63
65
|
onImageSizeUpdated: onImageSizeUpdated,
|
|
64
66
|
ImageEditor: ImageEditor
|
|
65
|
-
}), errors && /*#__PURE__*/React__default['default'].createElement(error_list.ErrorList, {
|
|
67
|
+
}), helperText && /*#__PURE__*/React__default['default'].createElement(helper_text.HelperText, null, helperText), errors && /*#__PURE__*/React__default['default'].createElement(error_list.ErrorList, {
|
|
66
68
|
errors: errors
|
|
67
69
|
}));
|
|
68
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
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;"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
7
|
+
var css_color_tokens_values = require('../../constants/css_tokens/css_color_tokens_values.js');
|
|
8
|
+
var cn = require('../../utilities/cn.js');
|
|
9
|
+
var stack = require('../stack/stack.js');
|
|
10
|
+
var lock_icon = require('../../assets/icons/lock_icon.js');
|
|
11
|
+
var lock_unlock_icon = require('../../assets/icons/lock_unlock_icon.js');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
|
|
17
|
+
var ValuesSyncer = function ValuesSyncer(_ref) {
|
|
18
|
+
var firstControl = _ref.firstControl,
|
|
19
|
+
secondControl = _ref.secondControl,
|
|
20
|
+
initialFirstValue = _ref.initialFirstValue,
|
|
21
|
+
initialSecondValue = _ref.initialSecondValue,
|
|
22
|
+
_ref$isLocked = _ref.isLocked,
|
|
23
|
+
isLocked = _ref$isLocked === void 0 ? false : _ref$isLocked,
|
|
24
|
+
onLock = _ref.onLock,
|
|
25
|
+
onChange = _ref.onChange;
|
|
26
|
+
var _useState = React.useState(isLocked),
|
|
27
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
28
|
+
locked = _useState2[0],
|
|
29
|
+
setLocked = _useState2[1];
|
|
30
|
+
var _useState3 = React.useState(initialFirstValue),
|
|
31
|
+
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
|
32
|
+
firstControlValue = _useState4[0],
|
|
33
|
+
setFirstControlValue = _useState4[1];
|
|
34
|
+
var _useState5 = React.useState(initialSecondValue),
|
|
35
|
+
_useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
|
|
36
|
+
secondControlValue = _useState6[0],
|
|
37
|
+
setSecondControlValue = _useState6[1];
|
|
38
|
+
React.useEffect(function () {
|
|
39
|
+
onLock === null || onLock === void 0 ? void 0 : onLock(locked);
|
|
40
|
+
if (locked) {
|
|
41
|
+
setSecondControlValue(firstControlValue);
|
|
42
|
+
}
|
|
43
|
+
}, [locked]);
|
|
44
|
+
React.useEffect(function () {
|
|
45
|
+
setFirstControlValue(initialFirstValue);
|
|
46
|
+
setSecondControlValue(initialSecondValue);
|
|
47
|
+
}, [initialFirstValue, initialSecondValue]);
|
|
48
|
+
React.useEffect(function () {
|
|
49
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
50
|
+
first: firstControlValue,
|
|
51
|
+
second: secondControlValue,
|
|
52
|
+
isLocked: locked
|
|
53
|
+
});
|
|
54
|
+
}, [firstControlValue, secondControlValue, locked]);
|
|
55
|
+
var handleFirstControlChange = function handleFirstControlChange(value) {
|
|
56
|
+
setFirstControlValue(value);
|
|
57
|
+
if (locked) {
|
|
58
|
+
setSecondControlValue(value);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var handleSecondControlChange = function handleSecondControlChange(value) {
|
|
62
|
+
setSecondControlValue(value);
|
|
63
|
+
if (locked) {
|
|
64
|
+
setFirstControlValue(value);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var toggleLock = function toggleLock() {
|
|
68
|
+
return setLocked(function (prev) {
|
|
69
|
+
return !prev;
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
return /*#__PURE__*/React__default['default'].createElement(stack.Stack, {
|
|
73
|
+
spacing: "3",
|
|
74
|
+
align: "end",
|
|
75
|
+
className: "aurora-items-end"
|
|
76
|
+
}, firstControl(firstControlValue, handleFirstControlChange), /*#__PURE__*/React__default['default'].createElement("button", {
|
|
77
|
+
type: "button",
|
|
78
|
+
className: cn.cn(locked ? 'aurora-bg-active aurora-rounded-4' : 'aurora-bg-subtle', 'aurora-h-6 aurora-w-6 aurora-p-1 aurora-mb-2 aurora-rounded-4 focus'),
|
|
79
|
+
onClick: toggleLock
|
|
80
|
+
}, locked ? (/*#__PURE__*/React__default['default'].createElement(lock_icon.LockLineIcon, {
|
|
81
|
+
className: "aurora-h-4 aurora-w-4",
|
|
82
|
+
color: css_color_tokens_values.CSS_COLOR_TOKENS_VALUES.neutral900
|
|
83
|
+
})) : (/*#__PURE__*/React__default['default'].createElement(lock_unlock_icon.LockUnlockLineIcon, {
|
|
84
|
+
className: "aurora-h-4 aurora-w-4",
|
|
85
|
+
color: css_color_tokens_values.CSS_COLOR_TOKENS_VALUES.neutral600
|
|
86
|
+
}))), secondControl(secondControlValue, handleSecondControlChange));
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
exports.ValuesSyncer = ValuesSyncer;
|
|
90
|
+
//# sourceMappingURL=values_syncer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -102,6 +102,8 @@ var controls_group = require('./components/controls/controls_group/controls_grou
|
|
|
102
102
|
var image_picker = require('./components/image_picker/image_picker.js');
|
|
103
103
|
var xhr_image_picker = require('./components/xhr_image_picker/xhr_image_picker.js');
|
|
104
104
|
var xhr_image_picker_control = require('./components/controls/xhr_image_picker_control/xhr_image_picker_control.js');
|
|
105
|
+
var values_syncer = require('./components/values_syncer/values_syncer.js');
|
|
106
|
+
var values_syncer_control = require('./components/controls/values_syncer_control/values_syncer_control.js');
|
|
105
107
|
|
|
106
108
|
|
|
107
109
|
|
|
@@ -223,4 +225,6 @@ exports.ControlsGroup = controls_group.ControlsGroup;
|
|
|
223
225
|
exports.ImagePicker = image_picker.ImagePicker;
|
|
224
226
|
exports.XhrImagePicker = xhr_image_picker.XhrImagePicker;
|
|
225
227
|
exports.XhrImagePickerControl = xhr_image_picker_control.XhrImagePickerControl;
|
|
228
|
+
exports.ValuesSyncer = values_syncer.ValuesSyncer;
|
|
229
|
+
exports.ValuesSyncerControl = values_syncer_control.ValuesSyncerControl;
|
|
226
230
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { RiLockUnlockLine } from '@remixicon/react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
var LockUnlockLineIcon = RiLockUnlockLine;
|
|
4
|
+
|
|
5
|
+
export { LockUnlockLineIcon };
|
|
6
|
+
//# sourceMappingURL=lock_unlock_icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;"}
|
|
@@ -7,6 +7,9 @@ export declare type TAccordionSize = Any.Keys<typeof ACCORDION_SIZES>;
|
|
|
7
7
|
export declare type TAccordionContext = {
|
|
8
8
|
size: TAccordionSize;
|
|
9
9
|
};
|
|
10
|
+
export declare type TAccordionItemProps = {
|
|
11
|
+
borderStyle?: TCssBorderStyleTokens;
|
|
12
|
+
} & React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
|
|
10
13
|
export declare type TAccordionTriggerProps = {
|
|
11
14
|
backgroundColor?: TCssBackgroundTokens;
|
|
12
15
|
borderStyle?: TCssBorderStyleTokens;
|
|
@@ -9,7 +9,7 @@ var AccordionContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
9
9
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
10
|
return /*#__PURE__*/createElement(Content, _objectSpread2({
|
|
11
11
|
ref: ref,
|
|
12
|
-
className: "aurora-
|
|
12
|
+
className: "aurora-overflow-hidden data-[state=closed]:aurora-animate-accordion-up data-[state=open]:aurora-animate-accordion-down"
|
|
13
13
|
}, props), children);
|
|
14
14
|
});
|
|
15
15
|
AccordionContent.displayName = Content.displayName;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export declare const AccordionItem: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const AccordionItem: React.ForwardRefExoticComponent<{
|
|
4
|
+
borderStyle?: "none" | "solid" | "dashed" | "dotted" | "double" | undefined;
|
|
5
|
+
} & Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { forwardRef, createElement } from 'react';
|
|
2
|
-
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { Item } from '@radix-ui/react-accordion';
|
|
4
4
|
import { cn } from '../../../utilities/cn.js';
|
|
5
5
|
|
|
6
|
-
var _excluded = ["className"];
|
|
6
|
+
var _excluded = ["className", "borderStyle"];
|
|
7
7
|
var AccordionItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
8
8
|
var className = _ref.className,
|
|
9
|
+
borderStyle = _ref.borderStyle,
|
|
9
10
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
11
|
return /*#__PURE__*/createElement(Item, _objectSpread2({
|
|
11
12
|
ref: ref,
|
|
12
|
-
className: cn(className)
|
|
13
|
+
className: cn('aurora-border-t last:aurora-border-b', _defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
|
|
13
14
|
}, props));
|
|
14
15
|
});
|
|
15
16
|
AccordionItem.displayName = 'AccordionItem';
|
|
@@ -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;"}
|
|
@@ -7,25 +7,24 @@ import { AccordionContext } from '../context/accordion_context.js';
|
|
|
7
7
|
import { cn } from '../../../utilities/cn.js';
|
|
8
8
|
import { ArrowRightIcon } from '../../../assets/icons/arrow_right.js';
|
|
9
9
|
|
|
10
|
-
var _excluded = ["className", "children", "backgroundColor", "
|
|
10
|
+
var _excluded = ["className", "children", "backgroundColor", "icon", "iconColor"];
|
|
11
11
|
var AccordionTrigger = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
13
|
children = _ref.children,
|
|
14
14
|
backgroundColor = _ref.backgroundColor,
|
|
15
|
-
borderStyle = _ref.borderStyle,
|
|
16
15
|
icon = _ref.icon,
|
|
17
16
|
_ref$iconColor = _ref.iconColor,
|
|
18
|
-
iconColor = _ref$iconColor === void 0 ? CSS_ICON_COLOR_TOKENS_VALUES.base : _ref$iconColor,
|
|
19
17
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
18
|
var accordionContext = useContext(AccordionContext);
|
|
21
|
-
var hasBorderStyles = !!borderStyle;
|
|
22
19
|
return /*#__PURE__*/createElement(Header, {
|
|
23
|
-
className:
|
|
20
|
+
className:
|
|
21
|
+
// 'aurora-border-t last:aurora-border-b last:border-t-0 data-[state=open]:aurora-border-b-0 group-[&:not(:first-of-type)]:aurora-border-t-0',
|
|
22
|
+
cn(_defineProperty({}, "aurora-bg-".concat(backgroundColor), !!backgroundColor))
|
|
24
23
|
}, /*#__PURE__*/createElement(Trigger, _objectSpread2({
|
|
25
24
|
ref: ref,
|
|
26
|
-
className: cn('aurora-flex aurora-items-center aurora-gap-2 aurora-
|
|
25
|
+
className: cn('aurora-flex aurora-items-center aurora-gap-2 aurora-py-2 aurora-pl-1.5 aurora-pr-4 aurora-text aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _defineProperty({}, 'aurora-bg', !backgroundColor), className)
|
|
27
26
|
}, props), icon ? icon : (/*#__PURE__*/createElement(ArrowRightIcon, {
|
|
28
|
-
color: CSS_ICON_COLOR_TOKENS_VALUES
|
|
27
|
+
color: CSS_ICON_COLOR_TOKENS_VALUES.base,
|
|
29
28
|
size: accordionContext.size === ACCORDION_SIZES.default ? 24 : 20,
|
|
30
29
|
className: cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200')
|
|
31
30
|
})), children));
|
package/build/esm/packages/aurora/src/components/accordion/components/accordion_trigger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Label } from '
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
import ValuesSyncer from '
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { Label } from '../../label/label.js';
|
|
3
|
+
import { HelperText } from '../../helper_text/helper_text.js';
|
|
4
|
+
import { ErrorList } from '../../error_list/error_list.js';
|
|
5
|
+
import { Control } from '../../control/control.js';
|
|
6
|
+
import { ValuesSyncer } from '../../values_syncer/values_syncer.js';
|
|
7
|
+
|
|
8
|
+
var ValuesSyncerControl = function ValuesSyncerControl(_ref) {
|
|
9
|
+
var label = _ref.label,
|
|
10
|
+
_ref$required = _ref.required,
|
|
11
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
12
|
+
tooltip = _ref.tooltip,
|
|
13
|
+
errors = _ref.errors,
|
|
14
|
+
firstControl = _ref.firstControl,
|
|
15
|
+
secondControl = _ref.secondControl,
|
|
16
|
+
initialFirstValue = _ref.initialFirstValue,
|
|
17
|
+
initialSecondValue = _ref.initialSecondValue,
|
|
18
|
+
isLocked = _ref.isLocked,
|
|
19
|
+
onLock = _ref.onLock,
|
|
20
|
+
onChange = _ref.onChange,
|
|
21
|
+
helperText = _ref.helperText;
|
|
22
|
+
return /*#__PURE__*/React.createElement(Control, {
|
|
23
|
+
classname: "aurora-flex-col"
|
|
24
|
+
}, label && (/*#__PURE__*/React.createElement(Label, {
|
|
25
|
+
required: required,
|
|
26
|
+
tooltip: tooltip
|
|
27
|
+
}, label)), /*#__PURE__*/React.createElement(ValuesSyncer, {
|
|
28
|
+
firstControl: firstControl,
|
|
29
|
+
secondControl: secondControl,
|
|
30
|
+
initialFirstValue: initialFirstValue,
|
|
31
|
+
initialSecondValue: initialSecondValue,
|
|
32
|
+
isLocked: isLocked,
|
|
33
|
+
onLock: onLock,
|
|
34
|
+
onChange: onChange
|
|
35
|
+
}), helperText && /*#__PURE__*/React.createElement(HelperText, null, helperText), errors && /*#__PURE__*/React.createElement(ErrorList, {
|
|
36
|
+
errors: errors,
|
|
37
|
+
className: "aurora-text-danger aurora-text-sm"
|
|
38
|
+
}));
|
|
12
39
|
};
|
|
13
40
|
ValuesSyncerControl.displayName = 'ValuesSyncerControl';
|
|
14
|
-
|
|
41
|
+
|
|
42
|
+
export { ValuesSyncerControl };
|
|
43
|
+
//# sourceMappingURL=values_syncer_control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
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;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TValuesSyncerProps } from "../../values_syncer/values_syncer_types";
|
|
2
|
-
import React from "react";
|
|
3
3
|
export declare type TValuesSyncerControlProps = TValuesSyncerProps & {
|
|
4
4
|
label?: string | React.ReactNode;
|
|
5
|
-
|
|
5
|
+
required?: boolean;
|
|
6
6
|
tooltip?: string | React.ReactNode;
|
|
7
7
|
helperText?: string | React.ReactNode;
|
|
8
8
|
errors?: string | string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values_syncer_control_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/controls/values_syncer_control/values_syncer_control_types.ts"],"names":[],"mappings":"AAAA,OAAmC,qDAAqD,CAAC
|
|
1
|
+
{"version":3,"file":"values_syncer_control_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/controls/values_syncer_control/values_syncer_control_types.ts"],"names":[],"mappings":"AAAA,OAAmC,qDAAqD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { slicedToArray as _slicedToArray } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { Label } from '../../label/label.js';
|
|
4
|
+
import { HelperText } from '../../helper_text/helper_text.js';
|
|
4
5
|
import { ErrorList } from '../../error_list/error_list.js';
|
|
5
6
|
import { Control } from '../../control/control.js';
|
|
6
7
|
import { XhrImagePicker } from '../../xhr_image_picker/xhr_image_picker.js';
|
|
@@ -18,6 +19,7 @@ var XhrImagePickerControl = function XhrImagePickerControl(_ref) {
|
|
|
18
19
|
errors = _ref.errors,
|
|
19
20
|
tooltip = _ref.tooltip,
|
|
20
21
|
onUploaded = _ref.onUploaded,
|
|
22
|
+
helperText = _ref.helperText,
|
|
21
23
|
onImageSizeUpdated = _ref.onImageSizeUpdated,
|
|
22
24
|
ImageEditor = _ref.ImageEditor;
|
|
23
25
|
var _useState = useState(errors),
|
|
@@ -54,7 +56,7 @@ var XhrImagePickerControl = function XhrImagePickerControl(_ref) {
|
|
|
54
56
|
onUploaded: onUploaded,
|
|
55
57
|
onImageSizeUpdated: onImageSizeUpdated,
|
|
56
58
|
ImageEditor: ImageEditor
|
|
57
|
-
}), errors && /*#__PURE__*/React.createElement(ErrorList, {
|
|
59
|
+
}), helperText && /*#__PURE__*/React.createElement(HelperText, null, helperText), errors && /*#__PURE__*/React.createElement(ErrorList, {
|
|
58
60
|
errors: errors
|
|
59
61
|
}));
|
|
60
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
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;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { TControlErrors } from "../../control/control_types";
|
|
2
|
-
import { IImagePicker,
|
|
2
|
+
import { IImagePicker, ImagePickerFileObject, TImageSize } from "../../image_picker/image_picker_types";
|
|
3
3
|
import { TUploadedImageData } from "../../xhr_image_picker/xhr_image_picker_types";
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
export interface IXhrImagePickerControl extends IImagePicker {
|
|
6
6
|
url: string;
|
|
7
7
|
label?: string;
|
|
8
|
-
onChange?: (file:
|
|
9
|
-
labelAdditionalInfo?: string | ReactNode;
|
|
8
|
+
onChange?: (file: ImagePickerFileObject, size?: TImageSize) => void;
|
|
10
9
|
onUploaded?: (data: TUploadedImageData) => void;
|
|
11
10
|
ImageEditor?: React.FunctionComponent;
|
|
12
11
|
errors?: TControlErrors;
|
|
13
12
|
required?: boolean;
|
|
14
13
|
tooltip?: string | ReactNode;
|
|
14
|
+
helperText?: string | ReactNode;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xhr_image_picker_control_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/controls/xhr_image_picker_control/xhr_image_picker_control_types.ts"],"names":[],"mappings":"AAAA,OAA+B,yCAAyC,CAAC;AACzE,
|
|
1
|
+
{"version":3,"file":"xhr_image_picker_control_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/controls/xhr_image_picker_control/xhr_image_picker_control_types.ts"],"names":[],"mappings":"AAAA,OAA+B,yCAAyC,CAAC;AACzE,OAAgE,mDAAmD,CAAC;AACpH,OAAmC,2DAA2D,CAAC;AAC/F,OAA0B,OAAO,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare type TImagePickerFile = {
|
|
|
7
7
|
};
|
|
8
8
|
export declare type TImagePickerExtension = typeof IMAGE_PICKER_EXTENSIONS[keyof typeof IMAGE_PICKER_EXTENSIONS];
|
|
9
9
|
export declare type TMimeFileExtension = typeof MIME_FILE_EXTENSIONS[keyof typeof MIME_FILE_EXTENSIONS];
|
|
10
|
-
export declare type
|
|
10
|
+
export declare type ImagePickerFileObject = {
|
|
11
11
|
fileList: FileList | null;
|
|
12
12
|
fileAsDataUrl?: string | ArrayBuffer | null;
|
|
13
13
|
};
|
|
@@ -15,7 +15,7 @@ export interface IImagePicker {
|
|
|
15
15
|
id: string;
|
|
16
16
|
name?: string;
|
|
17
17
|
className?: string;
|
|
18
|
-
onChange?: (file:
|
|
18
|
+
onChange?: (file: ImagePickerFileObject) => void;
|
|
19
19
|
allowedExtensions?: TImagePickerExtension[];
|
|
20
20
|
initialFile?: TImagePickerFile;
|
|
21
21
|
errors?: TControlErrors;
|
|
@@ -50,7 +50,7 @@ export interface IUseImagePicker {
|
|
|
50
50
|
isDragOver: boolean;
|
|
51
51
|
}
|
|
52
52
|
export interface IUseImagePickerProps {
|
|
53
|
-
onChange?: (file:
|
|
53
|
+
onChange?: (file: ImagePickerFileObject) => void;
|
|
54
54
|
initialFile?: TImagePickerFile;
|
|
55
55
|
allowedExtensions?: TImagePickerExtension[];
|
|
56
56
|
inputRef: React.RefObject<HTMLInputElement>;
|