@invoicebox/ui 0.1.0-alpha.241 → 0.1.0-alpha.249

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.
@@ -112,16 +112,22 @@ var PhoneInputLogic = exports.PhoneInputLogic = /*#__PURE__*/function () {
112
112
  var result = value;
113
113
  if (value[0] === '8') {
114
114
  result = "7".concat(value.slice(1));
115
+ if (moveCaret) {
116
+ // когда пользователь вводит номер с "9", мы подставляем в инпут "79", но каретка не переносится после "9" - также при вставке, нужно это делать вручную
117
+ moveCaret(this.getCaretPositionByRusValue(result));
118
+ }
115
119
  }
116
120
  if (value.length === 10 && value[0] !== '7' && (value[0] !== '8' || this.isSupportCityRusPhoneNumber && value[0] === '8')) {
117
121
  result = "7".concat(value);
122
+ if (moveCaret) {
123
+ moveCaret(this.getCaretPositionByRusValue(result));
124
+ }
118
125
  }
119
126
  if (value[0] === '9') {
120
127
  result = "79".concat(value.slice(1));
121
- }
122
- if (moveCaret) {
123
- // когда пользователь вводит номер с "9", мы подставляем в инпут "79", но каретка не переносится после "9" - также при вставке, нужно это делать вручную
124
- moveCaret(this.getCaretPositionByRusValue(result));
128
+ if (moveCaret) {
129
+ moveCaret(this.getCaretPositionByRusValue(result));
130
+ }
125
131
  }
126
132
  return result;
127
133
  }
@@ -34,7 +34,7 @@ var INPUT_VARIANT_MAP = exports.INPUT_VARIANT_MAP = {
34
34
  var StyledInput = exports.StyledInput = _styledComponents["default"].input.withConfig({
35
35
  displayName: "styles__StyledInput",
36
36
  componentId: "sc-1pe8ina-1"
37
- })(["position:relative;width:", "px;height:", "px;cursor:pointer;-webkit-appearance:none;box-shadow:none;border:none;background:", ";border-radius:30px;&:after{content:'';display:block;position:absolute;left:", "px;top:50%;transform:translateY(-50%);width:", "px;height:", "px;border-radius:50%;background-color:", ";transition:all 0.2s ease-in-out 0s;}&:checked::after{left:", "px;}&:checked{background:", ";}&:disabled{cursor:not-allowed;}"], function (_ref2) {
37
+ })(["position:relative;width:", "px;height:", "px;cursor:pointer;flex-shrink:0;-webkit-appearance:none;box-shadow:none;border:none;background:", ";border-radius:30px;&:after{content:'';display:block;position:absolute;left:", "px;top:50%;transform:translateY(-50%);width:", "px;height:", "px;border-radius:50%;background-color:", ";transition:all 0.2s ease-in-out 0s;}&:checked::after{left:", "px;}&:checked{background:", ";}&:disabled{cursor:not-allowed;}"], function (_ref2) {
38
38
  var $variant = _ref2.$variant;
39
39
  return INPUT_VARIANT_MAP[$variant].width;
40
40
  }, function (_ref3) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invoicebox/ui",
3
- "version": "0.1.0-alpha.241",
3
+ "version": "0.1.0-alpha.249",
4
4
  "description": "Invoicebox UI",
5
5
  "license": "Apache License 2.0",
6
6
  "scripts": {