mimir-ui-kit 0.0.22 → 0.0.24
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
|
-
.
|
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}
|
package/dist/assets/OtpInput.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._otp_jnjdw_2{display:flex;align-items:center;width:100%;-moz-column-gap:var(--space-xs);column-gap:var(--space-xs)}@media (max-width: 767px){._otp_jnjdw_2{-moz-column-gap:4.65px;column-gap:4.65px}}._input-wrapper_jnjdw_14{flex:0 0 64px;padding:0}@media (max-width: 767px){._input-wrapper_jnjdw_14{flex:0 0 48px}}._input_jnjdw_14{text-align:center}._separator_jnjdw_28{display:block;flex:0 0 54px;align-self:center;height:1px;background-color:var(--black-100)}
|
@@ -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 = "
|
6
|
-
const wrapper = "
|
7
|
-
const button = "
|
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
|
-
"
|
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
|
)
|
@@ -3,12 +3,12 @@ import { forwardRef, useRef, useImperativeHandle, useMemo, Fragment } from "reac
|
|
3
3
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
4
4
|
import { Input } from "../Input/Input.js";
|
5
5
|
import { RE_DIGIT, ITEMS_PER_SEPARATOR, DEFAULT_VALUE_LENGTH } from "./constants.js";
|
6
|
-
import '../../assets/OtpInput.css';const otp = "
|
7
|
-
const input = "
|
8
|
-
const separator = "
|
6
|
+
import '../../assets/OtpInput.css';const otp = "_otp_jnjdw_2";
|
7
|
+
const input = "_input_jnjdw_14";
|
8
|
+
const separator = "_separator_jnjdw_28";
|
9
9
|
const cls = {
|
10
10
|
otp,
|
11
|
-
"input-wrapper": "_input-
|
11
|
+
"input-wrapper": "_input-wrapper_jnjdw_14",
|
12
12
|
input,
|
13
13
|
separator
|
14
14
|
};
|
@@ -18,6 +18,7 @@ const OtpInput = forwardRef(
|
|
18
18
|
valueLength = DEFAULT_VALUE_LENGTH,
|
19
19
|
needSeparator = true,
|
20
20
|
onChange,
|
21
|
+
className,
|
21
22
|
...props
|
22
23
|
}, ref) => {
|
23
24
|
const inputRefs = useRef([]);
|
@@ -108,7 +109,7 @@ const OtpInput = forwardRef(
|
|
108
109
|
}
|
109
110
|
target.setSelectionRange(0, target.value.length);
|
110
111
|
};
|
111
|
-
return /* @__PURE__ */ jsx("div", { className: classNames(cls.otp), children: valueItems.map((digit, idx) => {
|
112
|
+
return /* @__PURE__ */ jsx("div", { className: classNames(cls.otp, className), children: valueItems.map((digit, idx) => {
|
112
113
|
const nextIndex = idx + 1;
|
113
114
|
const showSeparator = needSeparator && nextIndex % ITEMS_PER_SEPARATOR === 0 && nextIndex !== valueItems.length;
|
114
115
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|