@dreamcommerce/aurora 2.20.1-5 → 2.20.1-7

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,7 +21,7 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
21
21
  secondControl = _ref.secondControl,
22
22
  initialFirstValue = _ref.initialFirstValue,
23
23
  initialSecondValue = _ref.initialSecondValue,
24
- onLock = _ref.onLock,
24
+ onChange = _ref.onChange,
25
25
  isLocked = _ref.isLocked;
26
26
 
27
27
  var _useToggle = use_toggle.useToggle(isLocked),
@@ -40,12 +40,12 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
40
40
  setSecondControlValue = _useState4[1];
41
41
 
42
42
  React.useEffect(function () {
43
- onLock === null || onLock === void 0 || onLock(locked);
43
+ onChange === null || onChange === void 0 || onChange(locked);
44
44
 
45
45
  if (locked) {
46
46
  setSecondControlValue(firstControlValue);
47
47
  }
48
- }, [locked, onLock, firstControlValue]);
48
+ }, [locked, onChange, firstControlValue]);
49
49
 
50
50
  var setFirstControl = function setFirstControl(value) {
51
51
  setFirstControlValue(value);
@@ -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 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";
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 bottom: 12px;\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
- onLock?: (isLocked: boolean) => void;
8
+ onChange?: (isLocked: boolean) => void;
9
9
  isLocked?: boolean;
10
10
  };
11
- declare const ValuesSyncer: ({ firstControl, secondControl, initialFirstValue, initialSecondValue, onLock, isLocked }: TChildrenRenderProps) => JSX.Element;
11
+ declare const ValuesSyncer: ({ firstControl, secondControl, initialFirstValue, initialSecondValue, onChange, isLocked }: TChildrenRenderProps) => JSX.Element;
12
12
  export default ValuesSyncer;
@@ -13,7 +13,7 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
13
13
  secondControl = _ref.secondControl,
14
14
  initialFirstValue = _ref.initialFirstValue,
15
15
  initialSecondValue = _ref.initialSecondValue,
16
- onLock = _ref.onLock,
16
+ onChange = _ref.onChange,
17
17
  isLocked = _ref.isLocked;
18
18
 
19
19
  var _useToggle = useToggle(isLocked),
@@ -32,12 +32,12 @@ var ValuesSyncer = function ValuesSyncer(_ref) {
32
32
  setSecondControlValue = _useState4[1];
33
33
 
34
34
  useEffect(function () {
35
- onLock === null || onLock === void 0 || onLock(locked);
35
+ onChange === null || onChange === void 0 || onChange(locked);
36
36
 
37
37
  if (locked) {
38
38
  setSecondControlValue(firstControlValue);
39
39
  }
40
- }, [locked, onLock, firstControlValue]);
40
+ }, [locked, onChange, firstControlValue]);
41
41
 
42
42
  var setFirstControl = function setFirstControl(value) {
43
43
  setFirstControlValue(value);
@@ -3,8 +3,8 @@ import Hint from '@auroraComponents/hint';
3
3
  import '../../types';
4
4
  import React from 'react';
5
5
  import ValuesSyncer from '@auroraComponents/controls/components/values_syncer';
6
- import '@auroraComponents/controls/components/input';
7
- import ControlInput from '../control_input';
6
+ import '../control_input';
7
+ import Stack from '@auroraComponents/stack';
8
8
  /**
9
9
  * @component
10
10
  * @example
@@ -20,15 +20,19 @@ import ControlInput from '../control_input';
20
20
  * />
21
21
  * )
22
22
  */
23
- const ControlNumbersSyncer = ({ label, isRequired, id, name, placeholder, prefix, postfix, firstLabel, secondLabel, onLock, hint, errors, labelAdditionalInfo, additionalInfo, isLocked, min, max, ...props }) => {
23
+ const ControlNumbersSyncer = ({ label, isRequired, id, name, placeholder, prefix, postfix, firstLabel, secondLabel, onChange, hint, errors, labelAdditionalInfo, additionalInfo, isLocked, min, max, ...props }) => {
24
24
  return (React.createElement(Control, { errors: errors, name: name, id: id },
25
25
  (label || hint) && (React.createElement(Control.Label, { id: id, additionalInfo: labelAdditionalInfo },
26
26
  label,
27
27
  hint && React.createElement(Hint, { hint: hint, spacingLeft: true }))),
28
28
  React.createElement(Control.Content, null,
29
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 })),
30
+ React.createElement(Stack, { direction: 'column' },
31
+ React.createElement(Control.Label, { isRequired: isRequired }, firstLabel),
32
+ React.createElement(Control.Input, { type: "number", value: Number(value) || 0, placeholder: placeholder, onChange: (ev) => setValue(ev.target.value), min: min, max: max, ...props })))), secondControl: (value, setValue) => (React.createElement(Control.Element, { prefix: prefix, postfix: postfix },
33
+ React.createElement(Stack, { direction: 'column' },
34
+ React.createElement(Control.Label, { isRequired: isRequired }, secondLabel),
35
+ React.createElement(Control.Input, { type: "number", value: Number(value) || 0, placeholder: placeholder, onChange: (ev) => setValue(ev.target.value), min: min, max: max, ...props })))), initialFirstValue: props.value, initialSecondValue: props.value, onChange: onChange, isLocked: isLocked })),
32
36
  React.createElement(Control.Errors, null),
33
37
  additionalInfo && React.createElement(Control.AdditionalInfo, null, additionalInfo)));
34
38
  };
@@ -1 +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,IAA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C,OAAO,CAAC,cAAc,QAAE,cAAc,CAA0B,CAC9E,CACb,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
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,OAA2C,aAAa,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAyB,kBAAkB,CAAC;AAC5C,OAAO,KAAK,MAAM,yBAAyB,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,QAAQ,EACR,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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O,CAAC,cAAc,QAAE,cAAc,CAA0B,CAC9E,CACb,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -116,7 +116,7 @@ export interface IControlNumbersSyncerProps extends IInputProps, IControlCommonP
116
116
  isRequired?: boolean;
117
117
  labelAdditionalInfo?: string | ReactNode;
118
118
  isLocked?: boolean;
119
- onLock?: (isLocked: boolean) => void;
119
+ onChange?: (e: unknown) => void;
120
120
  min?: number;
121
121
  max?: number;
122
122
  }
@@ -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 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";
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 bottom: 12px;\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",
@@ -2,7 +2,7 @@ import React, { RefObject } from 'react';
2
2
  export declare const useFixedChildPosition: ({ useFixed, childRef, vPosition, hPosition }: {
3
3
  useFixed?: boolean | undefined;
4
4
  vPosition?: "top" | "bottom" | undefined;
5
- hPosition?: "left" | "right" | "center" | undefined;
5
+ hPosition?: "center" | "left" | "right" | undefined;
6
6
  childRef?: React.RefObject<HTMLDivElement> | undefined;
7
7
  }) => {
8
8
  style: React.CSSProperties;
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-5",
5
+ "version": "2.20.1-7",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",