@dreamcommerce/aurora 2.20.1-4 → 2.20.1-5

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.
@@ -21,9 +21,8 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
21
21
  secondControl = _ref.secondControl,
22
22
  initialFirstValue = _ref.initialFirstValue,
23
23
  initialSecondValue = _ref.initialSecondValue,
24
- onChange = _ref.onChange,
25
- _ref$isLocked = _ref.isLocked,
26
- isLocked = _ref$isLocked === void 0 ? false : _ref$isLocked;
24
+ onLock = _ref.onLock,
25
+ isLocked = _ref.isLocked;
27
26
 
28
27
  var _useToggle = use_toggle.useToggle(isLocked),
29
28
  _useToggle2 = _rollupPluginBabelHelpers.slicedToArray(_useToggle, 2),
@@ -41,8 +40,12 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
41
40
  setSecondControlValue = _useState4[1];
42
41
 
43
42
  React.useEffect(function () {
44
- onChange === null || onChange === void 0 || onChange(locked);
45
- }, [locked, onChange]);
43
+ onLock === null || onLock === void 0 || onLock(locked);
44
+
45
+ if (locked) {
46
+ setSecondControlValue(firstControlValue);
47
+ }
48
+ }, [locked, onLock, firstControlValue]);
46
49
 
47
50
  var setFirstControl = function setFirstControl(value) {
48
51
  setFirstControlValue(value);
@@ -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;"}
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;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
6
6
 
7
- var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Form Variables */\n/** Errors */\n/** Values Syncer */\n.main-module_controls__1yrPe:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls_error__1aqLg svg {\n fill: #e60c54;\n}\n.main-module_controls_error__1aqLg * {\n color: #e60c54;\n}\n.main-module_controls__content__4Zj5y {\n display: flex;\n align-items: flex-start;\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.main-module_controls__content_auto__25ns9 {\n min-width: auto;\n}\n.main-module_controls__content_block__2Siky {\n flex-direction: column;\n}\n.main-module_controls__content_block__2Siky .main-module_controls__element__YU7DA:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls__content_vcenter__3T-e7 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__content_clear-margin__3qJ66 {\n margin-left: 0;\n margin-right: 0;\n}\n.main-module_controls__element__YU7DA {\n flex: 0 1 100%;\n max-width: 100%;\n padding: 0 0.25rem;\n}\n.main-module_controls__element_auto__5AjdP {\n flex-basis: auto;\n}\n.main-module_controls__element_full__1GU_6 {\n flex-basis: 100%;\n}\n.main-module_controls__element_three-quarters__7L5AA {\n flex-basis: 75%;\n}\n.main-module_controls__element_half__3B2Jl {\n flex-basis: 50%;\n}\n.main-module_controls__element_quarter__2nuhI {\n flex-basis: 25%;\n max-width: 25%;\n}\n.main-module_controls__element_prefix__3kJbw,\n.main-module_controls__element_postfix__2qdjJ {\n display: flex;\n align-items: center;\n position: relative;\n}\n.main-module_controls__element_prefix__3kJbw::before {\n content: attr(data-prefix);\n position: absolute;\n left: 0.965em;\n z-index: 1;\n}\n.main-module_controls__element_prefix__3kJbw .main-module_control__RIN7v {\n padding-left: 2.5025em;\n}\n.main-module_controls__element_postfix__2qdjJ::after {\n content: attr(data-postfix);\n position: absolute;\n right: 0.965em;\n z-index: 1;\n}\n.main-module_controls__element_postfix__2qdjJ .main-module_control__RIN7v {\n padding-right: 2.86em;\n}\n.main-module_controls__element_checkbox__tJ0tm,\n.main-module_controls__element_checkbox-switch__L_Lic,\n.main-module_controls__element_radio__2kCck,\n.main-module_controls__element_color-picker__3wTA0 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_checkbox__tJ0tm .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_checkbox__vRI_x,\n.main-module_controls__element_radio__2kCck .main-module_checkbox__vRI_x,\n.main-module_controls__element_color-picker__3wTA0 .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox__tJ0tm .main-module_radio__yu617,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_radio__yu617,\n.main-module_controls__element_radio__2kCck .main-module_radio__yu617,\n.main-module_controls__element_color-picker__3wTA0 .main-module_radio__yu617 {\n flex: 0 0 auto;\n}\n.main-module_controls__element_spread__28eqq {\n justify-content: space-between;\n align-items: center;\n}\n.main-module_controls__element_vcenter__2xs_a {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_vtop__257yQ {\n display: flex;\n align-items: flex-start;\n}\n.main-module_controls__element_hcenter__2tkPq {\n display: flex;\n justify-content: center;\n}\n.main-module_controls__label__1HTDS {\n display: flex;\n align-items: center;\n color: #2d3748;\n margin-bottom: 0.3rem;\n}\n.main-module_controls__label_with-postfix__1g002 {\n display: flex;\n justify-content: space-between;\n}\n.main-module_controls__hint__UZPP2 {\n display: flex;\n margin-top: -0.25rem;\n margin-left: 0.5rem;\n}\n.main-module_controls__errors__1nRxU {\n margin-top: 0.4rem;\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #e60c54;\n text-align: left;\n}\n.main-module_controls__errors-label__2yGyP {\n cursor: default;\n}\n.main-module_controls__errors-list__1eq14 {\n padding: 0.5rem;\n background-color: #ffffff;\n}\n.main-module_controls__errors-list-item__DzpwC {\n list-style-type: none;\n}\n.main-module_controls__errors-list-item__DzpwC:not(:last-child) {\n margin-bottom: 0.5rem;\n}\n.main-module_controls__additional-info__3yRra {\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #5c657e;\n margin: 0;\n}\n.main-module_controls__additional-content__1jX07 {\n margin-left: 2.5rem;\n margin-top: 1rem;\n}\n.main-module_controls__additional-content_with-border__38d_y {\n margin-left: 0.8rem;\n border-left: 1px solid #d0e6ff;\n padding-left: 1.7rem;\n}\n.main-module_controls__additional-content_checkbox-switch__1I7F_ {\n margin-left: 3.2rem;\n}\n.main-module_controls__icon__2aZg7 {\n position: absolute;\n left: 1.25rem;\n pointer-events: none;\n}\n.main-module_controls__element_with-icon__188vU {\n align-items: center;\n position: relative;\n display: flex;\n}\ninput,\ntextarea {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n color: #5c657e;\n background-color: #ffffff;\n width: 100%;\n}\ninput ::before,\ntextarea ::before,\ninput ::after,\ntextarea ::after {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n}\ninput[type='number'] {\n -moz-appearance: textfield;\n}\ntextarea {\n min-height: 8rem;\n resize: vertical;\n}\n/** ugly fix for same height for input and select in firefox */\n@-moz-document url-prefix() {\n option {\n font-size: 12px;\n font-size: 0.8571428571428571rem;\n }\n}\n.main-module_values-syncer__lock-button__3NY5C {\n margin-bottom: 0.75rem;\n}\n";
7
+ var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Form Variables */\n/** Errors */\n/** Values Syncer */\n.main-module_controls__1yrPe:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls_error__1aqLg svg {\n fill: #e60c54;\n}\n.main-module_controls_error__1aqLg * {\n color: #e60c54;\n}\n.main-module_controls__content__4Zj5y {\n display: flex;\n align-items: flex-start;\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.main-module_controls__content_auto__25ns9 {\n min-width: auto;\n}\n.main-module_controls__content_block__2Siky {\n flex-direction: column;\n}\n.main-module_controls__content_block__2Siky .main-module_controls__element__YU7DA:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls__content_vcenter__3T-e7 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__content_clear-margin__3qJ66 {\n margin-left: 0;\n margin-right: 0;\n}\n.main-module_controls__element__YU7DA {\n flex: 0 1 100%;\n max-width: 100%;\n padding: 0 0.25rem;\n}\n.main-module_controls__element_auto__5AjdP {\n flex-basis: auto;\n}\n.main-module_controls__element_full__1GU_6 {\n flex-basis: 100%;\n}\n.main-module_controls__element_three-quarters__7L5AA {\n flex-basis: 75%;\n}\n.main-module_controls__element_half__3B2Jl {\n flex-basis: 50%;\n}\n.main-module_controls__element_quarter__2nuhI {\n flex-basis: 25%;\n max-width: 25%;\n}\n.main-module_controls__element_prefix__3kJbw,\n.main-module_controls__element_postfix__2qdjJ {\n display: flex;\n align-items: center;\n position: relative;\n}\n.main-module_controls__element_prefix__3kJbw::before {\n content: attr(data-prefix);\n position: absolute;\n left: 0.965em;\n z-index: 1;\n}\n.main-module_controls__element_prefix__3kJbw .main-module_control__RIN7v {\n padding-left: 2.5025em;\n}\n.main-module_controls__element_postfix__2qdjJ::after {\n content: attr(data-postfix);\n position: absolute;\n right: 0.965em;\n z-index: 1;\n top: 50%;\n}\n.main-module_controls__element_postfix__2qdjJ .main-module_control__RIN7v {\n padding-right: 2.86em;\n}\n.main-module_controls__element_checkbox__tJ0tm,\n.main-module_controls__element_checkbox-switch__L_Lic,\n.main-module_controls__element_radio__2kCck,\n.main-module_controls__element_color-picker__3wTA0 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_checkbox__tJ0tm .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_checkbox__vRI_x,\n.main-module_controls__element_radio__2kCck .main-module_checkbox__vRI_x,\n.main-module_controls__element_color-picker__3wTA0 .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox__tJ0tm .main-module_radio__yu617,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_radio__yu617,\n.main-module_controls__element_radio__2kCck .main-module_radio__yu617,\n.main-module_controls__element_color-picker__3wTA0 .main-module_radio__yu617 {\n flex: 0 0 auto;\n}\n.main-module_controls__element_spread__28eqq {\n justify-content: space-between;\n align-items: center;\n}\n.main-module_controls__element_vcenter__2xs_a {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_vtop__257yQ {\n display: flex;\n align-items: flex-start;\n}\n.main-module_controls__element_hcenter__2tkPq {\n display: flex;\n justify-content: center;\n}\n.main-module_controls__label__1HTDS {\n display: flex;\n align-items: center;\n color: #2d3748;\n margin-bottom: 0.3rem;\n}\n.main-module_controls__label_with-postfix__1g002 {\n display: flex;\n justify-content: space-between;\n}\n.main-module_controls__hint__UZPP2 {\n display: flex;\n margin-top: -0.25rem;\n margin-left: 0.5rem;\n}\n.main-module_controls__errors__1nRxU {\n margin-top: 0.4rem;\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #e60c54;\n text-align: left;\n}\n.main-module_controls__errors-label__2yGyP {\n cursor: default;\n}\n.main-module_controls__errors-list__1eq14 {\n padding: 0.5rem;\n background-color: #ffffff;\n}\n.main-module_controls__errors-list-item__DzpwC {\n list-style-type: none;\n}\n.main-module_controls__errors-list-item__DzpwC:not(:last-child) {\n margin-bottom: 0.5rem;\n}\n.main-module_controls__additional-info__3yRra {\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #5c657e;\n margin: 0;\n}\n.main-module_controls__additional-content__1jX07 {\n margin-left: 2.5rem;\n margin-top: 1rem;\n}\n.main-module_controls__additional-content_with-border__38d_y {\n margin-left: 0.8rem;\n border-left: 1px solid #d0e6ff;\n padding-left: 1.7rem;\n}\n.main-module_controls__additional-content_checkbox-switch__1I7F_ {\n margin-left: 3.2rem;\n}\n.main-module_controls__icon__2aZg7 {\n position: absolute;\n left: 1.25rem;\n pointer-events: none;\n}\n.main-module_controls__element_with-icon__188vU {\n align-items: center;\n position: relative;\n display: flex;\n}\ninput,\ntextarea {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n color: #5c657e;\n background-color: #ffffff;\n width: 100%;\n}\ninput ::before,\ntextarea ::before,\ninput ::after,\ntextarea ::after {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n}\ninput[type='number'] {\n -moz-appearance: textfield;\n width: 50px;\n}\ntextarea {\n min-height: 8rem;\n resize: vertical;\n}\n/** ugly fix for same height for input and select in firefox */\n@-moz-document url-prefix() {\n option {\n font-size: 12px;\n font-size: 0.8571428571428571rem;\n }\n}\n.main-module_values-syncer__lock-button__3NY5C {\n margin-bottom: 0.75rem;\n}\n";
8
8
  var cssStyles = {
9
9
  "controls": "main-module_controls__1yrPe",
10
10
  "controls_error": "main-module_controls_error__1aqLg",
@@ -5,8 +5,8 @@ export declare type TChildrenRenderProps = {
5
5
  initialFirstValue?: unknown;
6
6
  initialSecondValue?: unknown;
7
7
  cssClasses?: string;
8
- onChange?: (isLocked: boolean) => void;
8
+ onLock?: (isLocked: boolean) => void;
9
9
  isLocked?: boolean;
10
10
  };
11
- declare const ValuesSyncer: ({ firstControl, secondControl, initialFirstValue, initialSecondValue, onChange, isLocked }: TChildrenRenderProps) => JSX.Element;
11
+ declare const ValuesSyncer: ({ firstControl, secondControl, initialFirstValue, initialSecondValue, onLock, isLocked }: TChildrenRenderProps) => JSX.Element;
12
12
  export default ValuesSyncer;
@@ -13,9 +13,8 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
13
13
  secondControl = _ref.secondControl,
14
14
  initialFirstValue = _ref.initialFirstValue,
15
15
  initialSecondValue = _ref.initialSecondValue,
16
- onChange = _ref.onChange,
17
- _ref$isLocked = _ref.isLocked,
18
- isLocked = _ref$isLocked === void 0 ? false : _ref$isLocked;
16
+ onLock = _ref.onLock,
17
+ isLocked = _ref.isLocked;
19
18
 
20
19
  var _useToggle = useToggle(isLocked),
21
20
  _useToggle2 = _slicedToArray(_useToggle, 2),
@@ -33,8 +32,12 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
33
32
  setSecondControlValue = _useState4[1];
34
33
 
35
34
  useEffect(function () {
36
- onChange === null || onChange === void 0 || onChange(locked);
37
- }, [locked, onChange]);
35
+ onLock === null || onLock === void 0 || onLock(locked);
36
+
37
+ if (locked) {
38
+ setSecondControlValue(firstControlValue);
39
+ }
40
+ }, [locked, onLock, firstControlValue]);
38
41
 
39
42
  var setFirstControl = function setFirstControl(value) {
40
43
  setFirstControlValue(value);
@@ -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;"}
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;"}
@@ -0,0 +1,19 @@
1
+ import { IControlNumbersSyncerProps } from '../../types';
2
+ import React from 'react';
3
+ /**
4
+ * @component
5
+ * @example
6
+ * return (
7
+ * <ControlNumbersSyncer
8
+ * label="Padding"
9
+ * isRequired={true}
10
+ * id="input_example"
11
+ * postfix="rem"
12
+ * placeholder="0"
13
+ * value="0"
14
+ * onLock={() => {}}
15
+ * />
16
+ * )
17
+ */
18
+ declare const ControlNumbersSyncer: React.FC<IControlNumbersSyncerProps>;
19
+ export default ControlNumbersSyncer;
@@ -0,0 +1,36 @@
1
+ import Control from '../../index';
2
+ import Hint from '@auroraComponents/hint';
3
+ import '../../types';
4
+ import React from 'react';
5
+ import ValuesSyncer from '@auroraComponents/controls/components/values_syncer';
6
+ import '@auroraComponents/controls/components/input';
7
+ import ControlInput from '../control_input';
8
+ /**
9
+ * @component
10
+ * @example
11
+ * return (
12
+ * <ControlNumbersSyncer
13
+ * label="Padding"
14
+ * isRequired={true}
15
+ * id="input_example"
16
+ * postfix="rem"
17
+ * placeholder="0"
18
+ * value="0"
19
+ * onLock={() => {}}
20
+ * />
21
+ * )
22
+ */
23
+ const ControlNumbersSyncer = ({ label, isRequired, id, name, placeholder, prefix, postfix, firstLabel, secondLabel, onLock, hint, errors, labelAdditionalInfo, additionalInfo, isLocked, min, max, ...props }) => {
24
+ return (React.createElement(Control, { errors: errors, name: name, id: id },
25
+ (label || hint) && (React.createElement(Control.Label, { id: id, additionalInfo: labelAdditionalInfo },
26
+ label,
27
+ hint && React.createElement(Hint, { hint: hint, spacingLeft: true }))),
28
+ React.createElement(Control.Content, null,
29
+ React.createElement(ValuesSyncer, { firstControl: (value, setValue) => (React.createElement(Control.Element, { prefix: prefix, postfix: postfix },
30
+ React.createElement(ControlInput, { isRequired: isRequired, type: "number", label: firstLabel, value: value, placeholder: placeholder, onChange: (ev) => setValue(ev.target.value), min: min, max: max, className: '', ...props }))), secondControl: (value, setValue) => (React.createElement(Control.Element, { prefix: prefix, postfix: postfix },
31
+ React.createElement(ControlInput, { isRequired: isRequired, type: "number", label: secondLabel, value: value, placeholder: placeholder, onChange: (ev) => setValue(ev.target.value), min: min, max: max, ...props }))), initialFirstValue: props.value, initialSecondValue: props.value, onLock: onLock, isLocked: isLocked })),
32
+ React.createElement(Control.Errors, null),
33
+ additionalInfo && React.createElement(Control.AdditionalInfo, null, additionalInfo)));
34
+ };
35
+ export default ControlNumbersSyncer;
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/components/controls/hoc/control_numbers_syncer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAA+D,aAAa,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAkB,6CAA6C,CAAC;AAChE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,MAAM,oBAAoB,GAAyC,CAAC,EAChE,KAAK,EACL,UAAU,EACV,EAAE,EACF,IAAI,EACJ,WAAW,EACX,MAAM,EACN,OAAO,EACP,UAAU,EACV,WAAW,EACX,MAAM,EACN,IAAI,EACJ,MAAM,EACN,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,GAAG,EACH,GAAG,EACH,GAAG,KAAK,EACX,EAAE,EAAE;IACD,OAAO,CACH,oBAAC,OAAO,IAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;QACtC,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAChB,oBAAC,OAAO,CAAC,KAAK,IAAC,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,mBAAmB;YACrD,KAAK;YACL,IAAI,IAAI,oBAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,SAAG,CAC7B,CACnB;QAED,oBAAC,OAAO,CAAC,OAAO;YACZ,oBAAC,YAAY,IACT,YAAY,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAC/B,oBAAC,OAAO,CAAC,OAAO,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;oBAC7C,oBAAC,YAAY,IACb,UAAU,EAAE,UAAU,EACtB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,KAAe,EACtB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3C,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,EAAE,KACR,KAAK,GACP,CACY,CACrB,EACD,aAAa,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAChC,oBAAC,OAAO,CAAC,OAAO,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;oBAC7C,oBAAC,YAAY,IACb,UAAU,EAAE,UAAU,EACtB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,KAAe,EACtB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3C,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,KACJ,KAAK,GACP,CACY,CACrB,EACD,iBAAiB,EAAE,KAAK,CAAC,KAAK,EAC9B,kBAAkB,EAAE,KAAK,CAAC,KAAK,EAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GACpB,CACY;QAElB,oBAAC,OAAO,CAAC,MAAM,OAAG;QACjB,cAAc,IAAI,oBAAC,OAAO,CAAC,cAAc,QAAE,cAAc,CAA0B,CAC9E,CACb,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -107,6 +107,19 @@ export interface IControlInputProps extends IInputProps, IControlCommonProps {
107
107
  isRequired?: boolean;
108
108
  labelAdditionalInfo?: string | ReactNode;
109
109
  }
110
+ export interface IControlNumbersSyncerProps extends IInputProps, IControlCommonProps {
111
+ prefix?: string;
112
+ postfix?: string;
113
+ label?: string;
114
+ firstLabel: string;
115
+ secondLabel: string;
116
+ isRequired?: boolean;
117
+ labelAdditionalInfo?: string | ReactNode;
118
+ isLocked?: boolean;
119
+ onLock?: (isLocked: boolean) => void;
120
+ min?: number;
121
+ max?: number;
122
+ }
110
123
  export interface IControlCheckboxProps extends ICheckboxProps, IControlCommonProps {
111
124
  label: string;
112
125
  labelAdditionalInfo?: string | ReactNode;
@@ -1,6 +1,6 @@
1
1
  import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Form Variables */\n/** Errors */\n/** Values Syncer */\n.main-module_controls__1yrPe:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls_error__1aqLg svg {\n fill: #e60c54;\n}\n.main-module_controls_error__1aqLg * {\n color: #e60c54;\n}\n.main-module_controls__content__4Zj5y {\n display: flex;\n align-items: flex-start;\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.main-module_controls__content_auto__25ns9 {\n min-width: auto;\n}\n.main-module_controls__content_block__2Siky {\n flex-direction: column;\n}\n.main-module_controls__content_block__2Siky .main-module_controls__element__YU7DA:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls__content_vcenter__3T-e7 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__content_clear-margin__3qJ66 {\n margin-left: 0;\n margin-right: 0;\n}\n.main-module_controls__element__YU7DA {\n flex: 0 1 100%;\n max-width: 100%;\n padding: 0 0.25rem;\n}\n.main-module_controls__element_auto__5AjdP {\n flex-basis: auto;\n}\n.main-module_controls__element_full__1GU_6 {\n flex-basis: 100%;\n}\n.main-module_controls__element_three-quarters__7L5AA {\n flex-basis: 75%;\n}\n.main-module_controls__element_half__3B2Jl {\n flex-basis: 50%;\n}\n.main-module_controls__element_quarter__2nuhI {\n flex-basis: 25%;\n max-width: 25%;\n}\n.main-module_controls__element_prefix__3kJbw,\n.main-module_controls__element_postfix__2qdjJ {\n display: flex;\n align-items: center;\n position: relative;\n}\n.main-module_controls__element_prefix__3kJbw::before {\n content: attr(data-prefix);\n position: absolute;\n left: 0.965em;\n z-index: 1;\n}\n.main-module_controls__element_prefix__3kJbw .main-module_control__RIN7v {\n padding-left: 2.5025em;\n}\n.main-module_controls__element_postfix__2qdjJ::after {\n content: attr(data-postfix);\n position: absolute;\n right: 0.965em;\n z-index: 1;\n}\n.main-module_controls__element_postfix__2qdjJ .main-module_control__RIN7v {\n padding-right: 2.86em;\n}\n.main-module_controls__element_checkbox__tJ0tm,\n.main-module_controls__element_checkbox-switch__L_Lic,\n.main-module_controls__element_radio__2kCck,\n.main-module_controls__element_color-picker__3wTA0 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_checkbox__tJ0tm .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_checkbox__vRI_x,\n.main-module_controls__element_radio__2kCck .main-module_checkbox__vRI_x,\n.main-module_controls__element_color-picker__3wTA0 .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox__tJ0tm .main-module_radio__yu617,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_radio__yu617,\n.main-module_controls__element_radio__2kCck .main-module_radio__yu617,\n.main-module_controls__element_color-picker__3wTA0 .main-module_radio__yu617 {\n flex: 0 0 auto;\n}\n.main-module_controls__element_spread__28eqq {\n justify-content: space-between;\n align-items: center;\n}\n.main-module_controls__element_vcenter__2xs_a {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_vtop__257yQ {\n display: flex;\n align-items: flex-start;\n}\n.main-module_controls__element_hcenter__2tkPq {\n display: flex;\n justify-content: center;\n}\n.main-module_controls__label__1HTDS {\n display: flex;\n align-items: center;\n color: #2d3748;\n margin-bottom: 0.3rem;\n}\n.main-module_controls__label_with-postfix__1g002 {\n display: flex;\n justify-content: space-between;\n}\n.main-module_controls__hint__UZPP2 {\n display: flex;\n margin-top: -0.25rem;\n margin-left: 0.5rem;\n}\n.main-module_controls__errors__1nRxU {\n margin-top: 0.4rem;\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #e60c54;\n text-align: left;\n}\n.main-module_controls__errors-label__2yGyP {\n cursor: default;\n}\n.main-module_controls__errors-list__1eq14 {\n padding: 0.5rem;\n background-color: #ffffff;\n}\n.main-module_controls__errors-list-item__DzpwC {\n list-style-type: none;\n}\n.main-module_controls__errors-list-item__DzpwC:not(:last-child) {\n margin-bottom: 0.5rem;\n}\n.main-module_controls__additional-info__3yRra {\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #5c657e;\n margin: 0;\n}\n.main-module_controls__additional-content__1jX07 {\n margin-left: 2.5rem;\n margin-top: 1rem;\n}\n.main-module_controls__additional-content_with-border__38d_y {\n margin-left: 0.8rem;\n border-left: 1px solid #d0e6ff;\n padding-left: 1.7rem;\n}\n.main-module_controls__additional-content_checkbox-switch__1I7F_ {\n margin-left: 3.2rem;\n}\n.main-module_controls__icon__2aZg7 {\n position: absolute;\n left: 1.25rem;\n pointer-events: none;\n}\n.main-module_controls__element_with-icon__188vU {\n align-items: center;\n position: relative;\n display: flex;\n}\ninput,\ntextarea {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n color: #5c657e;\n background-color: #ffffff;\n width: 100%;\n}\ninput ::before,\ntextarea ::before,\ninput ::after,\ntextarea ::after {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n}\ninput[type='number'] {\n -moz-appearance: textfield;\n}\ntextarea {\n min-height: 8rem;\n resize: vertical;\n}\n/** ugly fix for same height for input and select in firefox */\n@-moz-document url-prefix() {\n option {\n font-size: 12px;\n font-size: 0.8571428571428571rem;\n }\n}\n.main-module_values-syncer__lock-button__3NY5C {\n margin-bottom: 0.75rem;\n}\n";
3
+ var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n/** Form Variables */\n/** Errors */\n/** Values Syncer */\n.main-module_controls__1yrPe:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls_error__1aqLg svg {\n fill: #e60c54;\n}\n.main-module_controls_error__1aqLg * {\n color: #e60c54;\n}\n.main-module_controls__content__4Zj5y {\n display: flex;\n align-items: flex-start;\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.main-module_controls__content_auto__25ns9 {\n min-width: auto;\n}\n.main-module_controls__content_block__2Siky {\n flex-direction: column;\n}\n.main-module_controls__content_block__2Siky .main-module_controls__element__YU7DA:not(:last-child) {\n margin-bottom: 1rem;\n}\n.main-module_controls__content_vcenter__3T-e7 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__content_clear-margin__3qJ66 {\n margin-left: 0;\n margin-right: 0;\n}\n.main-module_controls__element__YU7DA {\n flex: 0 1 100%;\n max-width: 100%;\n padding: 0 0.25rem;\n}\n.main-module_controls__element_auto__5AjdP {\n flex-basis: auto;\n}\n.main-module_controls__element_full__1GU_6 {\n flex-basis: 100%;\n}\n.main-module_controls__element_three-quarters__7L5AA {\n flex-basis: 75%;\n}\n.main-module_controls__element_half__3B2Jl {\n flex-basis: 50%;\n}\n.main-module_controls__element_quarter__2nuhI {\n flex-basis: 25%;\n max-width: 25%;\n}\n.main-module_controls__element_prefix__3kJbw,\n.main-module_controls__element_postfix__2qdjJ {\n display: flex;\n align-items: center;\n position: relative;\n}\n.main-module_controls__element_prefix__3kJbw::before {\n content: attr(data-prefix);\n position: absolute;\n left: 0.965em;\n z-index: 1;\n}\n.main-module_controls__element_prefix__3kJbw .main-module_control__RIN7v {\n padding-left: 2.5025em;\n}\n.main-module_controls__element_postfix__2qdjJ::after {\n content: attr(data-postfix);\n position: absolute;\n right: 0.965em;\n z-index: 1;\n top: 50%;\n}\n.main-module_controls__element_postfix__2qdjJ .main-module_control__RIN7v {\n padding-right: 2.86em;\n}\n.main-module_controls__element_checkbox__tJ0tm,\n.main-module_controls__element_checkbox-switch__L_Lic,\n.main-module_controls__element_radio__2kCck,\n.main-module_controls__element_color-picker__3wTA0 {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_checkbox__tJ0tm .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_checkbox__vRI_x,\n.main-module_controls__element_radio__2kCck .main-module_checkbox__vRI_x,\n.main-module_controls__element_color-picker__3wTA0 .main-module_checkbox__vRI_x,\n.main-module_controls__element_checkbox__tJ0tm .main-module_radio__yu617,\n.main-module_controls__element_checkbox-switch__L_Lic .main-module_radio__yu617,\n.main-module_controls__element_radio__2kCck .main-module_radio__yu617,\n.main-module_controls__element_color-picker__3wTA0 .main-module_radio__yu617 {\n flex: 0 0 auto;\n}\n.main-module_controls__element_spread__28eqq {\n justify-content: space-between;\n align-items: center;\n}\n.main-module_controls__element_vcenter__2xs_a {\n display: flex;\n align-items: center;\n}\n.main-module_controls__element_vtop__257yQ {\n display: flex;\n align-items: flex-start;\n}\n.main-module_controls__element_hcenter__2tkPq {\n display: flex;\n justify-content: center;\n}\n.main-module_controls__label__1HTDS {\n display: flex;\n align-items: center;\n color: #2d3748;\n margin-bottom: 0.3rem;\n}\n.main-module_controls__label_with-postfix__1g002 {\n display: flex;\n justify-content: space-between;\n}\n.main-module_controls__hint__UZPP2 {\n display: flex;\n margin-top: -0.25rem;\n margin-left: 0.5rem;\n}\n.main-module_controls__errors__1nRxU {\n margin-top: 0.4rem;\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #e60c54;\n text-align: left;\n}\n.main-module_controls__errors-label__2yGyP {\n cursor: default;\n}\n.main-module_controls__errors-list__1eq14 {\n padding: 0.5rem;\n background-color: #ffffff;\n}\n.main-module_controls__errors-list-item__DzpwC {\n list-style-type: none;\n}\n.main-module_controls__errors-list-item__DzpwC:not(:last-child) {\n margin-bottom: 0.5rem;\n}\n.main-module_controls__additional-info__3yRra {\n font-size: 11px;\n font-size: 0.7857142857142857rem;\n color: #5c657e;\n margin: 0;\n}\n.main-module_controls__additional-content__1jX07 {\n margin-left: 2.5rem;\n margin-top: 1rem;\n}\n.main-module_controls__additional-content_with-border__38d_y {\n margin-left: 0.8rem;\n border-left: 1px solid #d0e6ff;\n padding-left: 1.7rem;\n}\n.main-module_controls__additional-content_checkbox-switch__1I7F_ {\n margin-left: 3.2rem;\n}\n.main-module_controls__icon__2aZg7 {\n position: absolute;\n left: 1.25rem;\n pointer-events: none;\n}\n.main-module_controls__element_with-icon__188vU {\n align-items: center;\n position: relative;\n display: flex;\n}\ninput,\ntextarea {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n color: #5c657e;\n background-color: #ffffff;\n width: 100%;\n}\ninput ::before,\ntextarea ::before,\ninput ::after,\ntextarea ::after {\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n}\ninput[type='number'] {\n -moz-appearance: textfield;\n width: 50px;\n}\ntextarea {\n min-height: 8rem;\n resize: vertical;\n}\n/** ugly fix for same height for input and select in firefox */\n@-moz-document url-prefix() {\n option {\n font-size: 12px;\n font-size: 0.8571428571428571rem;\n }\n}\n.main-module_values-syncer__lock-button__3NY5C {\n margin-bottom: 0.75rem;\n}\n";
4
4
  var cssStyles = {
5
5
  "controls": "main-module_controls__1yrPe",
6
6
  "controls_error": "main-module_controls_error__1aqLg",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "2.20.1-4",
5
+ "version": "2.20.1-5",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",