mimir-ui-kit 0.0.21 → 0.0.23

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/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Mimir-ui
2
+
3
+ ## Установка и запуск проекта
4
+ 1. Установите зависимости:
5
+ ```bash
6
+ npm install
7
+ 2. Запуск storybook
8
+ ```bash
9
+ npm run storybook
10
+ ## Сборка проекта
11
+ 1. Скрипт для сборки
12
+ ```bash
13
+ npm run build
14
+ ## Поднятие версии для публикации на npm
15
+ Для поднятия версии пакета перед публикацией на npm используем следующие скрипты:
16
+
17
+ 1. `patch`: Этот скрипт увеличивает версию пакета на один патч (например, с версии 1.0.0 до 1.0.1). Он автоматически обновляет версию в файле package.json и создает коммит с обновленной версией.
18
+ ```bash
19
+ npm version patch
20
+ 2. `minor`: Этот скрипт увеличивает версию пакета на один минорный уровень (например, с версии 1.0.0 до 1.1.0). Также обновляет версию в package.json и создает коммит.
21
+ ```bash
22
+ npm version minor
23
+ 3. `major`: Этот скрипт увеличивает версию пакета на один мажорный уровень (например, с версии 1.0.0 до 2.0.0). Он также обновляет версию в package.json и создает коммит.
24
+ ```bash
25
+ npm version major
26
+ ## Публикация на npm
27
+ 1. Скрипт для публикации на npm:
28
+ ```bash
29
+ npm publish
@@ -1 +1 @@
1
- ._input_1eiiw_1{padding-right:var(--space-3xl)}._wrapper_1eiiw_5{position:relative;display:flex;align-items:center;border-radius:8px}._wrapper_1eiiw_5 svg{color:inherit;fill:inherit}._button-wrapper_1eiiw_16{position:absolute;top:0;right:0;z-index:2;display:flex;width:44px;height:100%;max-height:var(--button-height-xxl)}._button_1eiiw_16{flex:1;align-self:center;background-color:transparent;border-radius:8px}
1
+ ._input_1vatm_1{padding-right:var(--space-3xl)}._wrapper_1vatm_5{position:relative;display:flex;align-items:center;border-radius:8px}._wrapper_1vatm_5 svg{color:inherit;fill:inherit}._input-wrapper_1vatm_16{flex:1}._button-wrapper_1vatm_20{position:absolute;top:0;right:0;z-index:2;display:flex;width:44px;height:100%;max-height:var(--button-height-xxl)}._button_1vatm_20{flex:1;align-self:center;background-color:transparent;border-radius:8px}
@@ -2,13 +2,14 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState } from "react";
3
3
  import { Input } from "../Input/Input.js";
4
4
  import { Eye } from "../icons/Eye.js";
5
- import '../../assets/InputPassword.css';const input = "_input_1eiiw_1";
6
- const wrapper = "_wrapper_1eiiw_5";
7
- const button = "_button_1eiiw_16";
5
+ import '../../assets/InputPassword.css';const input = "_input_1vatm_1";
6
+ const wrapper = "_wrapper_1vatm_5";
7
+ const button = "_button_1vatm_20";
8
8
  const cls = {
9
9
  input,
10
10
  wrapper,
11
- "button-wrapper": "_button-wrapper_1eiiw_16",
11
+ "input-wrapper": "_input-wrapper_1vatm_16",
12
+ "button-wrapper": "_button-wrapper_1vatm_20",
12
13
  button
13
14
  };
14
15
  const InputPassword = memo(
@@ -22,12 +23,13 @@ const InputPassword = memo(
22
23
  {
23
24
  ref,
24
25
  className: cls.input,
26
+ wrapperClassName: cls["input-wrapper"],
25
27
  size,
26
28
  type: showPassword ? "text" : "password",
27
29
  ...props
28
30
  }
29
31
  ),
30
- /* @__PURE__ */ jsx("div", { className: cls["button-wrapper"], children: /* @__PURE__ */ jsx("button", { className: cls.button, onClick: handleClick, children: /* @__PURE__ */ jsx(Eye, {}) }) })
32
+ /* @__PURE__ */ jsx("div", { className: cls["button-wrapper"], children: /* @__PURE__ */ jsx("button", { type: "button", className: cls.button, onClick: handleClick, children: /* @__PURE__ */ jsx(Eye, {}) }) })
31
33
  ] });
32
34
  }
33
35
  )
@@ -1 +1,2 @@
1
1
  export { InputPhoneNumber } from './InputPhoneNumber';
2
+ export { getMaskedInputPhoneValue, getUnmaskedInputValue } from './utils';
@@ -1,4 +1,7 @@
1
1
  import { InputPhoneNumber } from "./InputPhoneNumber.js";
2
+ import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./utils.js";
2
3
  export {
3
- InputPhoneNumber
4
+ InputPhoneNumber,
5
+ getMaskedInputPhoneValue,
6
+ getUnmaskedInputValue
4
7
  };
@@ -3,5 +3,5 @@ export { Input, EInputSize, EInputVariant } from './Input';
3
3
  export type { TInputProps, TSize, TVariant } from './Input';
4
4
  export { InputPassword } from './InputPassword';
5
5
  export type { TInputPasswordProps } from './InputPassword';
6
- export { InputPhoneNumber } from './InputPhoneNumber';
6
+ export { InputPhoneNumber, getMaskedInputPhoneValue, getUnmaskedInputValue } from './InputPhoneNumber';
7
7
  export { OtpInput } from './OtpInput';
@@ -4,6 +4,7 @@ import { Input } from "./Input/Input.js";
4
4
  import { EInputSize, EInputVariant } from "./Input/constants.js";
5
5
  import { InputPassword } from "./InputPassword/InputPassword.js";
6
6
  import { InputPhoneNumber } from "./InputPhoneNumber/InputPhoneNumber.js";
7
+ import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./InputPhoneNumber/utils.js";
7
8
  import { OtpInput } from "./OtpInput/OtpInput.js";
8
9
  export {
9
10
  Button,
@@ -16,5 +17,7 @@ export {
16
17
  Input,
17
18
  InputPassword,
18
19
  InputPhoneNumber,
19
- OtpInput
20
+ OtpInput,
21
+ getMaskedInputPhoneValue,
22
+ getUnmaskedInputValue
20
23
  };
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import { Input } from "./components/Input/Input.js";
4
4
  import { EInputSize, EInputVariant } from "./components/Input/constants.js";
5
5
  import { InputPassword } from "./components/InputPassword/InputPassword.js";
6
6
  import { InputPhoneNumber } from "./components/InputPhoneNumber/InputPhoneNumber.js";
7
+ import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./components/InputPhoneNumber/utils.js";
7
8
  import { OtpInput } from "./components/OtpInput/OtpInput.js";
8
9
  import { useMediaQuery } from "./hooks/useMediaQuery/useMediaQuery.js";
9
10
  import { EMediaQuery } from "./hooks/useMediaQuery/constants.js";
@@ -20,5 +21,7 @@ import './assets/index.css';export {
20
21
  InputPassword,
21
22
  InputPhoneNumber,
22
23
  OtpInput,
24
+ getMaskedInputPhoneValue,
25
+ getUnmaskedInputValue,
23
26
  useMediaQuery
24
27
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "0.0.21",
4
+ "version": "0.0.23",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",
7
7
  "module": "./dist/index.js",