mimir-ui-kit 1.9.1 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +11 -3
- package/dist/{NavigationButtons-cTsXB7GS.js → NavigationButtons-DuOoqaPo.js} +2 -2
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/MergedButton.css +1 -1
- package/dist/assets/Tag.css +1 -0
- package/dist/components/Button/Button.js +22 -22
- package/dist/components/Input/Input.js +16 -15
- package/dist/components/MergedButton/MergedButton.js +15 -17
- package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
- package/dist/components/Slider/NavigationButtons/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Tag/Tag.d.ts +41 -0
- package/dist/components/Tag/Tag.js +54 -0
- package/dist/components/Tag/constants.d.ts +9 -0
- package/dist/components/Tag/constants.js +15 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Tag/index.js +7 -0
- package/dist/components/Tag/types.d.ts +0 -0
- package/dist/components/Tag/types.js +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +5 -0
- package/dist/index.js +5 -0
- package/package.json +4 -3
package/README.md
CHANGED
@@ -18,14 +18,22 @@
|
|
18
18
|
npm run build
|
19
19
|
```
|
20
20
|
|
21
|
+
## Создание нового компонента
|
22
|
+
|
23
|
+
```bash
|
24
|
+
npm run create-component <ComponentName>
|
25
|
+
```
|
26
|
+
|
21
27
|
## Поднятие версии для публикации на npm
|
22
28
|
|
23
29
|
Для поднятия версии пакета перед публикацией на npm используем следующие скрипты:
|
24
30
|
|
25
31
|
1. `patch`: Этот скрипт увеличивает версию пакета на один патч (например, с версии 1.0.0 до 1.0.1). Он автоматически обновляет версию в файле package.json и создает коммит с обновленной версией.
|
26
|
-
|
27
|
-
|
28
|
-
|
32
|
+
|
33
|
+
```bash
|
34
|
+
npm version patch
|
35
|
+
```
|
36
|
+
|
29
37
|
2. `minor`: Этот скрипт увеличивает версию пакета на один минорный уровень (например, с версии 1.0.0 до 1.1.0). Также обновляет версию в package.json и создает коммит.
|
30
38
|
```bash
|
31
39
|
npm version minor
|
@@ -4885,13 +4885,13 @@ const NavigationButtons = memo(() => {
|
|
4885
4885
|
{
|
4886
4886
|
isIconButton: true,
|
4887
4887
|
iconName: "ArrowLeft16px",
|
4888
|
-
variant: "
|
4888
|
+
variant: "white",
|
4889
4889
|
onClick: handlePrevSlide
|
4890
4890
|
},
|
4891
4891
|
{
|
4892
4892
|
isIconButton: true,
|
4893
4893
|
iconName: "ArrowRight16px",
|
4894
|
-
variant: "
|
4894
|
+
variant: "white",
|
4895
4895
|
onClick: handleNextSlide
|
4896
4896
|
}
|
4897
4897
|
],
|
package/dist/assets/Button.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._button_1wajr_2{--button-loader-color: var(--button-color);--button-cursor: pointer;position:relative;display:inline-flex;flex-shrink:0;align-items:center;box-sizing:border-box;max-width:100%;height:var(--button-height);padding:0 var(--button-space);overflow:hidden;color:var(--button-color);font-weight:var(--font-weight-text-semibold);font-size:var(--button-font-size);font-family:var(--font-inter);line-height:var(--line-height-text-s1);white-space:nowrap;text-transform:uppercase;-webkit-text-decoration:none;text-decoration:none;text-overflow:ellipsis;-moz-column-gap:var(--button-gap);column-gap:var(--button-gap);background:var(--button-bg-color);border:none;cursor:pointer;cursor:var(--button-cursor);transition:background-color .3s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}._button_1wajr_2:hover{color:var(--button-color-hover);background:var(--button-bg-color-hover)}._button_1wajr_2:active{color:var(--button-color-active);background:var(--button-bg-color-active)}._button_1wajr_2:focus{box-shadow:0 0 2px var(--sapphire-normal)}._button_1wajr_2._clear_1wajr_41:focus{box-shadow:none}._button_1wajr_2 svg{color:currentcolor;fill:currentcolor}._button_1wajr_2 svg path{color:currentcolor;fill:currentcolor}._xs_1wajr_53{--button-height: var(--button-height-xs);--button-font-size: var(--control-text-size-xs);--button-space: var(--control-space-xs);--button-gap: 4px;--button-border-radius: var(--button-border-radius-s)}._s_1wajr_61{--button-height: var(--button-height-s);--button-font-size: var(--control-text-size-s);--button-space: var(--control-space-s);--button-gap: 4px;--button-border-radius: var(--button-border-radius-s)}._m_1wajr_69{--button-height: var(--button-height-m);--button-font-size: var(--size-text-m);--button-space: var(--control-space-m);--button-gap: 8px;--button-border-radius: var(--button-border-radius-m)}._l_1wajr_77{--button-height: var(--button-height-l);--button-font-size: var(--size-text-m);--button-space: var(--control-space-l);--button-gap: 8px;--button-border-radius: var(--button-border-radius-l)}._xl_1wajr_85{--button-height: var(--button-height-xl);--button-space: var(--control-space-l);--button-gap: 8px;--button-border-radius: var(--button-border-radius-l);--button-font-size: var(--size-text-m);font-weight:var(--font-weight-text-medium)}._xxl_1wajr_94{--button-height: var(--button-height-xxl);--button-space: var(--control-space-xxl);--button-border-radius: var(--button-border-radius-l);--button-gap: 8px;font-weight:var(--font-weight-text-medium);--button-font-size: var(--size-text-m)}._default-button_1wajr_103{border-radius:var(--control-radius)}._default-button_1wajr_103._primary-sapphire_1wajr_106{--button-bg-color: var(--sapphire-normal);--button-color-hover: var(--light-text);--button-color-active: var(--light-text);--button-bg-color-active: var(--sapphire-active);--button-bg-color-hover: var(--sapphire-hover);--button-color: var(--light-text);--button-border: transparent}._default-button_1wajr_103._primary-citrine_1wajr_115{--button-bg-color: var(--citrine-normal);--button-color-hover: var(--light-text);--button-color-active: var(--light-text);--button-bg-color-active: var(--citrine-active);--button-bg-color-hover: var(--citrine-hover);--button-color: var(--light-text);--button-border: transparent}._default-button_1wajr_103._secondary-asphalt_1wajr_124{--button-bg-color: var(--asphalt-normal);--button-color-hover: var(--light-text);--button-color-active: var(--light-text);--button-bg-color-active: var(--asphalt-active);--button-bg-color-hover: var(--asphalt-hover);--button-color: var(--light-text);--button-border: transparent}._default-button_1wajr_103._secondary-gray_1wajr_133{--button-bg-color: var(--gray-normal);--button-color-hover: var(--counter-text);--button-color-active: var(--light-text);--button-bg-color-active: var(--gray-active);--button-bg-color-hover: var(--gray-hover);--button-color: var(--dark-text);--button-border: transparent}._default-button_1wajr_103._secondary-white_1wajr_142{--button-bg-color: var(--white-normal);--button-color-hover: var(--counter-text);--button-color-active: var(--light-text);--button-bg-color-active: var(--white-active);--button-bg-color-hover: var(--white);--button-color: var(--dark-text);--button-border: transparent}._default-button_1wajr_103._secondary-red_1wajr_151{--button-bg-color: var(--red-normal);--button-color-hover: var(--light-text);--button-color-active: var(--light-text);--button-bg-color-active: var(--red-active);--button-bg-color-hover: var(--red-hover);--button-color: var(--light-text);--button-border: transparent}._round-button_1wajr_161{--button-border-radius-l: 24px;--button-border-radius-m: 20px;--button-border-radius-s: 16px;--button-border-radius-xs: 12px;border-radius:var(--button-border-radius)}._round-button_1wajr_161._black_1wajr_168{--button-bg-color: var(--asphalt-normal);--button-bg-color-hover: var(--asphalt-hover);--button-bg-color-active: var(--sapphire-normal);--button-bg-color-focus: var(--sapphire-normal);--button-color: var(--light-text);--button-color-hover: var(--light-text);--button-color-active: var(--light-text)}._round-button_1wajr_161._gray_1wajr_177{--button-bg-color: var(--gray-normal);--button-bg-color-hover: var(--gray-hover);--button-bg-color-active: var(--sapphire-normal);--button-bg-color-focus: var(--sapphire-normal);--button-color: var(--asphalt-normal);--button-color-hover: var(--asphalt-hover);--button-color-active: var(--light-text)}._round-button_1wajr_161._white_1wajr_186{--button-bg-color: var(--white-normal);--button-bg-color-hover: var(--white-hover);--button-bg-color-active: var(--sapphire-normal);--button-bg-color-focus: var(--sapphire-normal);--button-color: var(--asphalt-normal);--button-color-hover: var(--asphalt-hover);--button-color-active: var(--light-text)}._full_1wajr_196{display:flex;justify-content:center;width:100%}._disabled_1wajr_202{--button-cursor: not-allowed;color:var(--light-text);background-color:var(--disabled)}._disabled_1wajr_202:hover,._disabled_1wajr_202:active,._disabled_1wajr_202:focus{color:var(--light-text);background-color:var(--disabled);box-shadow:none}._icon-button_1wajr_213{justify-content:center;min-width:var(--button-height);padding:0}
|
package/dist/assets/Input.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
._input-
|
1
|
+
._input-wrapper_1sn09_2{position:relative}._input-wrapper_1sn09_2 ._label_1sn09_5{position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--space-m);z-index:1;display:block;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;transform-origin:left center;transition:transform .15s ease-out,color .15s ease-out;pointer-events:none}._input-wrapper_1sn09_2 ._label_1sn09_5._active-label_1sn09_18{transform:scale(var(--label-scaled)) translateY(calc(var(--input-font-size) * -1))}._input-wrapper_1sn09_2:hover ._label_1sn09_5,._input-wrapper_1sn09_2:focus-within ._label_1sn09_5{color:var(--label-color)}._input_1sn09_2{--button-border-radius-l: 8px;--button-border-radius-m: 6px;--button-border-radius-s: 6px;position:relative;display:block;width:100%;min-width:0;height:var(--input-height);padding-top:0;color:var(--dark-text);font-size:var(--input-font-size);font-family:var(--font-inter);line-height:var(--input-line-height);letter-spacing:-.42px;background:none;background-color:var(--input-bg-color);border-bottom:1px solid transparent;border-radius:var(--input-border-radius);outline:none;cursor:var(--input-cursor);transition:background-color .2s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding-left:var(--input-padding);padding-right:var(--input-padding);font-feature-settings:"zero"}._input_1sn09_2:hover{color:var(--input-color-hover);background:var(--input-bg-color-hover)}._input_1sn09_2:focus{color:var(--input-color-active);background-color:var(--input-bg-color-active);border-bottom:1px solid var(--input-bottom-color-active)}._s_1sn09_61{--input-height: var(--space-xxl);--input-font-size: var(--control-text-size-m);--input-line-height: var(--line-height-text-xs);--input-padding: var(--space-m);--input-padding-position: var(--space-1xs);--input-border-radius: var(--button-border-radius-s);--label-font-size: var(--size-text-xs);--label-scaled: .85;--label-spacing: var(--space-1xs)}._m_1sn09_73{--input-height: var(--space-4xl);--input-font-size: var(--control-text-size-l);--input-line-height: var(--line-height-text-s1);--input-padding: var(--space-m);--input-padding-position: var(--space-xs);--input-border-radius: var(--button-border-radius-m);--label-font-size: var(--size-text-s);--label-scaled: .75;--label-spacing: var(--space-xs)}._l_1sn09_5{--input-height: var(--space-4xxl);--input-font-size: var(--control-text-size-2xl);--input-line-height: var(--line-height-text-l);--input-padding: var(--space-m);--input-padding-position: var(--space-s);--input-border-radius: var(--button-border-radius-l);--label-font-size: var(--size-text-s);--label-scaled: .6;--label-spacing: var(--space-s)}._default-gray_1sn09_97{--input-bg-color: var(--black-5);--input-bg-color-active: var(--black-10);--input-bg-color-hover: var(--black-10);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1sn09_109{--input-bg-color: var(--white);--input-bg-color-hover: var(--black-10);--input-bg-color-active: var(--white);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1sn09_109:hover{--label-color: var(--dark-text)}._success_1sn09_124{--input-bg-color: var(--success-normal);--input-bg-color-hover: var(--success-bg-hover);--input-bg-color-active: var(--success-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--success-normal);--label-color: var(--black-60)}._success_1sn09_124::-moz-placeholder{color:var(--input-color)}._success_1sn09_124::placeholder{color:var(--input-color)}._success_1sn09_124:hover::-moz-placeholder{color:var(--input-color)}._success_1sn09_124:hover::placeholder{color:var(--input-color)}._alarm_1sn09_142{--input-bg-color: var(--alarm-normal);--input-bg-color-hover: var(--alarm-bg-hover);--input-bg-color-active: var(--alarm-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--alarm-normal);--label-color: var(--black-60)}._alarm_1sn09_142::-moz-placeholder{color:var(--input-color)}._alarm_1sn09_142::placeholder{color:var(--input-color)}._alarm_1sn09_142:hover::-moz-placeholder{color:var(--input-color)}._alarm_1sn09_142:hover::placeholder{color:var(--input-color)}._error_1sn09_160{--input-bg-color: var(--error-normal);--input-bg-color-hover: var(--error-bg-hover);--input-bg-color-active: var(--error-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--error-normal);--label-color: var(--black-60)}._error_1sn09_160::-moz-placeholder{color:var(--input-color)}._error_1sn09_160::placeholder{color:var(--input-color)}._error_1sn09_160:hover::-moz-placeholder{color:var(--input-color)}._error_1sn09_160:hover::placeholder{color:var(--input-color)}._disabled_1sn09_178{--input-cursor: not-allowed;--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20)}._disabled_1sn09_178:hover,._disabled_1sn09_178:active,._disabled_1sn09_178:focus{--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20);border:none;box-shadow:none}._disabled_1sn09_178::-moz-placeholder{color:var(--light-text)}._disabled_1sn09_178::placeholder{color:var(--light-text)}._disabled_1sn09_178:hover::-moz-placeholder{color:var(--light-text)}._disabled_1sn09_178:hover::placeholder{color:var(--light-text)}._has-label_1sn09_198{padding-top:var(--input-padding-position)}
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._buttons_cnsdp_2{display:inline-flex}._merged-button_cnsdp_6{--button-height: var(--button-height-m);--button-space: var(--control-space-xs)}._merged-button_cnsdp_6:first-child{border-radius:0;border-top-left-radius:var(--control-radius);border-bottom-left-radius:var(--control-radius)}._merged-button_cnsdp_6:last-child{border-radius:0;border-top-right-radius:var(--control-radius);border-bottom-right-radius:var(--control-radius)}._merged-button_cnsdp_6:hover{color:var(--button-color-hover);background:var(--button-bg-color-hover)}._merged-button_cnsdp_6:active{color:var(--button-color-active);background:var(--button-bg-color-active)}._merged-button_cnsdp_6._gray_cnsdp_28{--button-bg-color: var(--black-5);--button-bg-color-hover: var(--black-5);--button-bg-color-active: var(--asphalt-normal);--button-color: var(--asphalt-normal);--button-color-hover: var(--sapphire-normal);--button-color-active: var(--light-text)}._merged-button_cnsdp_6._white_cnsdp_36{--button-bg-color: var(--white-normal);--button-bg-color-active: var(--asphalt-normal);--button-color: var(--asphalt-normal);--button-color-hover: var(--sapphire-normal);--button-color-active: var(--light-text)}._merged-button_cnsdp_6._transparent_cnsdp_43{--button-bg-color: var(--black-5);--button-bg-color-hover: var(--black-5);--button-bg-color-active: var(--asphalt-normal);--button-bg-color-focus: var(--sapphire-normal);--button-color: var(--light-text);--button-color-hover: var(--sapphire-normal);--button-color-active: var(--light-text)}._merged-button_cnsdp_6._is-icon_cnsdp_52{width:var(--button-height-m);padding:0}._merged-button_cnsdp_6:disabled{--button-cursor: not-allowed;color:var(--disabled-color);background-color:var(--black-5)}._merged-button_cnsdp_6:disabled:hover,._merged-button_cnsdp_6:disabled:active,._merged-button_cnsdp_6:disabled:focus{color:var(--disabled-color);background-color:var(--black-5);box-shadow:none}
|
@@ -0,0 +1 @@
|
|
1
|
+
._container_1f2sk_2{display:flex;align-items:center;justify-content:center;color:var(--sapphire-normal);border:none;border:1px solid var(--sapphire-normal);border-top-left-radius:var(--control-radius-s);border-bottom-right-radius:var(--control-radius-s);transform:skew(-23.48deg)}._container_1f2sk_2:hover{color:var(--sapphire-hover);border-color:var(--sapphire-hover)}._container_1f2sk_2:active{color:var(--white);background-color:var(--sapphire-normal)}._container_1f2sk_2:focus{box-shadow:0 0 4px 0 var(--box-shadow-focus)}._container_1f2sk_2._disabled_1f2sk_24{color:var(--white);background-color:var(--disabled);border-color:var(--disabled)}._container_1f2sk_2 ._inner_1f2sk_29{display:inline-block;font-weight:var(--font-weight-text-regular);font-size:var(--size-text-l);font-family:var(--inter-font-family);line-height:var(--line-height-text-s1);transform:skew(23.48deg)}._container_1f2sk_2._M_1f2sk_37{height:40px;padding:0 15px}._container_1f2sk_2._S_1f2sk_41{height:32px;padding:0 11px}._container_1f2sk_2._S_1f2sk_41 ._inner_1f2sk_29{font-size:var(--size-text-m);line-height:16px}._container_1f2sk_2._XS_1f2sk_49{height:26px;padding:0 8px}._container_1f2sk_2._XS_1f2sk_49 ._inner_1f2sk_29{font-size:var(--size-text-s);line-height:20px}
|
@@ -3,19 +3,19 @@ import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
3
3
|
import { forwardRef } from "react";
|
4
4
|
import { EButtonVariantDefault, EButtonForm } from "./constants.js";
|
5
5
|
import { Icon } from "../../icons/Icon.js";
|
6
|
-
import '../../assets/Button.css';const button = "
|
7
|
-
const clear = "
|
8
|
-
const xs = "
|
9
|
-
const s = "
|
10
|
-
const m = "
|
11
|
-
const l = "
|
12
|
-
const xl = "
|
13
|
-
const xxl = "
|
14
|
-
const black = "
|
15
|
-
const gray = "
|
16
|
-
const white = "
|
17
|
-
const full = "
|
18
|
-
const disabled = "
|
6
|
+
import '../../assets/Button.css';const button = "_button_1wajr_2";
|
7
|
+
const clear = "_clear_1wajr_41";
|
8
|
+
const xs = "_xs_1wajr_53";
|
9
|
+
const s = "_s_1wajr_61";
|
10
|
+
const m = "_m_1wajr_69";
|
11
|
+
const l = "_l_1wajr_77";
|
12
|
+
const xl = "_xl_1wajr_85";
|
13
|
+
const xxl = "_xxl_1wajr_94";
|
14
|
+
const black = "_black_1wajr_168";
|
15
|
+
const gray = "_gray_1wajr_177";
|
16
|
+
const white = "_white_1wajr_186";
|
17
|
+
const full = "_full_1wajr_196";
|
18
|
+
const disabled = "_disabled_1wajr_202";
|
19
19
|
const cls = {
|
20
20
|
button,
|
21
21
|
clear,
|
@@ -25,20 +25,20 @@ const cls = {
|
|
25
25
|
l,
|
26
26
|
xl,
|
27
27
|
xxl,
|
28
|
-
"default-button": "_default-
|
29
|
-
"primary-sapphire": "_primary-
|
30
|
-
"primary-citrine": "_primary-
|
31
|
-
"secondary-asphalt": "_secondary-
|
32
|
-
"secondary-gray": "_secondary-
|
33
|
-
"secondary-white": "_secondary-
|
34
|
-
"secondary-red": "_secondary-
|
35
|
-
"round-button": "_round-
|
28
|
+
"default-button": "_default-button_1wajr_103",
|
29
|
+
"primary-sapphire": "_primary-sapphire_1wajr_106",
|
30
|
+
"primary-citrine": "_primary-citrine_1wajr_115",
|
31
|
+
"secondary-asphalt": "_secondary-asphalt_1wajr_124",
|
32
|
+
"secondary-gray": "_secondary-gray_1wajr_133",
|
33
|
+
"secondary-white": "_secondary-white_1wajr_142",
|
34
|
+
"secondary-red": "_secondary-red_1wajr_151",
|
35
|
+
"round-button": "_round-button_1wajr_161",
|
36
36
|
black,
|
37
37
|
gray,
|
38
38
|
white,
|
39
39
|
full,
|
40
40
|
disabled,
|
41
|
-
"icon-button": "_icon-
|
41
|
+
"icon-button": "_icon-button_1wajr_213"
|
42
42
|
};
|
43
43
|
const Button = forwardRef(
|
44
44
|
(props, ref) => {
|
@@ -2,30 +2,30 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
3
|
import { memo, forwardRef, useState, useEffect } from "react";
|
4
4
|
import { EInputVariant } from "./constants.js";
|
5
|
-
import '../../assets/Input.css';const label = "
|
6
|
-
const input = "
|
7
|
-
const s = "
|
8
|
-
const m = "
|
9
|
-
const l = "
|
10
|
-
const success = "
|
11
|
-
const alarm = "
|
12
|
-
const error = "
|
13
|
-
const disabled = "
|
5
|
+
import '../../assets/Input.css';const label = "_label_1sn09_5";
|
6
|
+
const input = "_input_1sn09_2";
|
7
|
+
const s = "_s_1sn09_61";
|
8
|
+
const m = "_m_1sn09_73";
|
9
|
+
const l = "_l_1sn09_5";
|
10
|
+
const success = "_success_1sn09_124";
|
11
|
+
const alarm = "_alarm_1sn09_142";
|
12
|
+
const error = "_error_1sn09_160";
|
13
|
+
const disabled = "_disabled_1sn09_178";
|
14
14
|
const cls = {
|
15
|
-
"input-wrapper": "_input-
|
15
|
+
"input-wrapper": "_input-wrapper_1sn09_2",
|
16
16
|
label,
|
17
|
-
"active-label": "_active-
|
17
|
+
"active-label": "_active-label_1sn09_18",
|
18
18
|
input,
|
19
19
|
s,
|
20
20
|
m,
|
21
21
|
l,
|
22
|
-
"default-gray": "_default-
|
23
|
-
"default-white": "_default-
|
22
|
+
"default-gray": "_default-gray_1sn09_97",
|
23
|
+
"default-white": "_default-white_1sn09_109",
|
24
24
|
success,
|
25
25
|
alarm,
|
26
26
|
error,
|
27
27
|
disabled,
|
28
|
-
"has-label": "_has-
|
28
|
+
"has-label": "_has-label_1sn09_198"
|
29
29
|
};
|
30
30
|
const Input = memo(
|
31
31
|
forwardRef(
|
@@ -76,7 +76,8 @@ const Input = memo(
|
|
76
76
|
const labelClassNames = classNames(
|
77
77
|
cls.label,
|
78
78
|
{
|
79
|
-
[cls["active-label"]]: isFocused || value
|
79
|
+
[cls["active-label"]]: isFocused || value,
|
80
|
+
[cls.disabled]: disabled2 || readonly
|
80
81
|
},
|
81
82
|
className,
|
82
83
|
cls[size]
|
@@ -3,38 +3,36 @@ import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
3
3
|
import { memo } from "react";
|
4
4
|
import { EMergedButtonVariantRound } from "./constants.js";
|
5
5
|
import { Button } from "../Button/Button.js";
|
6
|
-
import '../../assets/MergedButton.css';const buttons = "
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const transparent = "_transparent_h653f_42";
|
6
|
+
import '../../assets/MergedButton.css';const buttons = "_buttons_cnsdp_2";
|
7
|
+
const gray = "_gray_cnsdp_28";
|
8
|
+
const white = "_white_cnsdp_36";
|
9
|
+
const transparent = "_transparent_cnsdp_43";
|
11
10
|
const cls = {
|
12
11
|
buttons,
|
13
|
-
button,
|
12
|
+
"merged-button": "_merged-button_cnsdp_6",
|
14
13
|
gray,
|
15
14
|
white,
|
16
15
|
transparent,
|
17
|
-
"is-icon": "_is-
|
16
|
+
"is-icon": "_is-icon_cnsdp_52"
|
18
17
|
};
|
19
18
|
const MergedButton = memo(({ buttons: buttons2 }) => {
|
20
19
|
return /* @__PURE__ */ jsx("div", { className: cls.buttons, children: buttons2.map(
|
21
|
-
({ variant = EMergedButtonVariantRound.White, disabled, ...
|
20
|
+
({ variant = EMergedButtonVariantRound.White, disabled, ...button }, index) => {
|
22
21
|
const buttonProps = {
|
23
|
-
...
|
24
|
-
isIconButton:
|
25
|
-
iconName:
|
26
|
-
leftIcon:
|
27
|
-
rightIcon:
|
22
|
+
...button,
|
23
|
+
isIconButton: button.isIconButton ?? false,
|
24
|
+
iconName: button.isIconButton ? button.iconName : void 0,
|
25
|
+
leftIcon: button.isIconButton ? void 0 : button.leftIcon,
|
26
|
+
rightIcon: button.isIconButton ? void 0 : button.rightIcon
|
28
27
|
};
|
29
28
|
const className = classNames(
|
30
|
-
cls
|
31
|
-
cls.clear,
|
29
|
+
cls["merged-button"],
|
32
30
|
{
|
33
31
|
[cls[variant]]: !disabled,
|
34
32
|
[cls.disabled]: disabled,
|
35
|
-
[cls["is-icon"]]:
|
33
|
+
[cls["is-icon"]]: button.isIconButton
|
36
34
|
},
|
37
|
-
|
35
|
+
button.className
|
38
36
|
);
|
39
37
|
return /* @__PURE__ */ jsx(
|
40
38
|
Button,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
2
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
3
|
import { useRef, useState, useCallback } from "react";
|
4
|
-
import { g as getDocument, S as Swiper, N as NavigationButtons, a as SwiperSlide } from "../../NavigationButtons-
|
4
|
+
import { g as getDocument, S as Swiper, N as NavigationButtons, a as SwiperSlide } from "../../NavigationButtons-DuOoqaPo.js";
|
5
5
|
import { ProgressBar } from "./ProgressBar/ProgressBar.js";
|
6
6
|
import { AppImage } from "../Image/Image.js";
|
7
7
|
import '../../assets/Slider.css';function Autoplay(_ref) {
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
|
3
|
+
export type TProps = {
|
4
|
+
/**
|
5
|
+
* Класс, применяемый к корневому элементу
|
6
|
+
*/
|
7
|
+
rootClassName?: string;
|
8
|
+
/**
|
9
|
+
* Класс, применяемый к контентному элементу
|
10
|
+
*/
|
11
|
+
innerClassName?: string;
|
12
|
+
/**
|
13
|
+
* Класс, применяемый к контентному элементу
|
14
|
+
*/
|
15
|
+
size?: string;
|
16
|
+
/**
|
17
|
+
* Класс, применяемый к корневому элемент
|
18
|
+
*/
|
19
|
+
children?: ReactNode;
|
20
|
+
/**
|
21
|
+
* Класс, применяемый к корневому элемент
|
22
|
+
*/
|
23
|
+
disabled?: boolean;
|
24
|
+
/**
|
25
|
+
* Определяет какой тип элемента будет создан, по умолчанию - button
|
26
|
+
*/
|
27
|
+
elementType?: 'button' | 'div';
|
28
|
+
/**
|
29
|
+
* Цвет фона, при outline и текста
|
30
|
+
*/
|
31
|
+
backgroundColor?: string;
|
32
|
+
/**
|
33
|
+
* Цвет текста (если не outline)
|
34
|
+
*/
|
35
|
+
color?: string;
|
36
|
+
/**
|
37
|
+
* Определяет должен быть тег в стилистике outline или нет
|
38
|
+
*/
|
39
|
+
outline?: boolean;
|
40
|
+
};
|
41
|
+
export declare const Tag: import('react').ForwardRefExoticComponent<TProps & import('react').RefAttributes<HTMLButtonElement | HTMLDivElement>>;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
2
|
+
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
|
+
import { forwardRef } from "react";
|
4
|
+
import { ETagSize, ETagType } from "./constants.js";
|
5
|
+
import '../../assets/Tag.css';const container = "_container_1f2sk_2";
|
6
|
+
const disabled = "_disabled_1f2sk_24";
|
7
|
+
const inner = "_inner_1f2sk_29";
|
8
|
+
const M = "_M_1f2sk_37";
|
9
|
+
const S = "_S_1f2sk_41";
|
10
|
+
const XS = "_XS_1f2sk_49";
|
11
|
+
const cls = {
|
12
|
+
container,
|
13
|
+
disabled,
|
14
|
+
inner,
|
15
|
+
M,
|
16
|
+
S,
|
17
|
+
XS
|
18
|
+
};
|
19
|
+
const Tag = forwardRef(
|
20
|
+
(props, ref) => {
|
21
|
+
const {
|
22
|
+
rootClassName,
|
23
|
+
innerClassName,
|
24
|
+
children,
|
25
|
+
size = ETagSize.M,
|
26
|
+
disabled: disabled2 = false,
|
27
|
+
elementType = ETagType.BUTTON,
|
28
|
+
backgroundColor = "",
|
29
|
+
color = "",
|
30
|
+
outline = false,
|
31
|
+
...otherProps
|
32
|
+
} = props;
|
33
|
+
const Element = elementType === ETagType.BUTTON ? ETagType.BUTTON : ETagType.DIV;
|
34
|
+
return /* @__PURE__ */ jsx(
|
35
|
+
Element,
|
36
|
+
{
|
37
|
+
className: classNames(cls.container, cls[size], rootClassName, {
|
38
|
+
[cls.disabled]: disabled2
|
39
|
+
}),
|
40
|
+
ref,
|
41
|
+
style: {
|
42
|
+
backgroundColor: outline ? "transparent" : backgroundColor,
|
43
|
+
borderColor: backgroundColor,
|
44
|
+
color: outline ? backgroundColor : color
|
45
|
+
},
|
46
|
+
...otherProps,
|
47
|
+
children: /* @__PURE__ */ jsx("span", { className: classNames(cls.inner, innerClassName), children })
|
48
|
+
}
|
49
|
+
);
|
50
|
+
}
|
51
|
+
);
|
52
|
+
export {
|
53
|
+
Tag
|
54
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
var ETagSize = /* @__PURE__ */ ((ETagSize2) => {
|
2
|
+
ETagSize2["XS"] = "XS";
|
3
|
+
ETagSize2["S"] = "S";
|
4
|
+
ETagSize2["M"] = "M";
|
5
|
+
return ETagSize2;
|
6
|
+
})(ETagSize || {});
|
7
|
+
var ETagType = /* @__PURE__ */ ((ETagType2) => {
|
8
|
+
ETagType2["DIV"] = "div";
|
9
|
+
ETagType2["BUTTON"] = "button";
|
10
|
+
return ETagType2;
|
11
|
+
})(ETagType || {});
|
12
|
+
export {
|
13
|
+
ETagSize,
|
14
|
+
ETagType
|
15
|
+
};
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -23,4 +23,5 @@ export { SelectSearch, ESelectSearchSize } from './SelectSearch';
|
|
23
23
|
export type { TSelectSearchItem, TSelectSearchProps } from './SelectSearch';
|
24
24
|
export { Switch } from './Switch';
|
25
25
|
export type { TSwitchProps } from './Switch';
|
26
|
+
export { Tag, ETagSize, ETagType } from './Tag';
|
26
27
|
export { Timer } from './Timer';
|
package/dist/components/index.js
CHANGED
@@ -22,6 +22,8 @@ import { EVoteSize } from "./Vote/constants.js";
|
|
22
22
|
import { SelectSearch } from "./SelectSearch/SelectSearch.js";
|
23
23
|
import { ESelectSearchSize } from "./SelectSearch/constants.js";
|
24
24
|
import { Switch } from "./Switch/Switch.js";
|
25
|
+
import { Tag } from "./Tag/Tag.js";
|
26
|
+
import { ETagSize, ETagType } from "./Tag/constants.js";
|
25
27
|
import { Timer } from "./Timer/Timer.js";
|
26
28
|
export {
|
27
29
|
Button,
|
@@ -39,6 +41,8 @@ export {
|
|
39
41
|
EStepsPrimaryColor,
|
40
42
|
EStepsSecondaryColor,
|
41
43
|
EStepsSize,
|
44
|
+
ETagSize,
|
45
|
+
ETagType,
|
42
46
|
EVoteSize,
|
43
47
|
AppImage as Image,
|
44
48
|
Input,
|
@@ -52,6 +56,7 @@ export {
|
|
52
56
|
Slider,
|
53
57
|
Steps,
|
54
58
|
Switch,
|
59
|
+
Tag,
|
55
60
|
Timer,
|
56
61
|
Vote,
|
57
62
|
getMaskedInputPhoneValue,
|
package/dist/index.js
CHANGED
@@ -22,6 +22,8 @@ import { EVoteSize } from "./components/Vote/constants.js";
|
|
22
22
|
import { SelectSearch } from "./components/SelectSearch/SelectSearch.js";
|
23
23
|
import { ESelectSearchSize } from "./components/SelectSearch/constants.js";
|
24
24
|
import { Switch } from "./components/Switch/Switch.js";
|
25
|
+
import { Tag } from "./components/Tag/Tag.js";
|
26
|
+
import { ETagSize, ETagType } from "./components/Tag/constants.js";
|
25
27
|
import { Timer } from "./components/Timer/Timer.js";
|
26
28
|
import { useMediaQuery } from "./hooks/useMediaQuery/useMediaQuery.js";
|
27
29
|
import { EMediaQuery } from "./hooks/useMediaQuery/constants.js";
|
@@ -47,6 +49,8 @@ import './assets/index.css';export {
|
|
47
49
|
EStepsPrimaryColor,
|
48
50
|
EStepsSecondaryColor,
|
49
51
|
EStepsSize,
|
52
|
+
ETagSize,
|
53
|
+
ETagType,
|
50
54
|
EVoteSize,
|
51
55
|
Icon,
|
52
56
|
AppImage as Image,
|
@@ -61,6 +65,7 @@ import './assets/index.css';export {
|
|
61
65
|
Slider,
|
62
66
|
Steps,
|
63
67
|
Switch,
|
68
|
+
Tag,
|
64
69
|
Timer,
|
65
70
|
Vote,
|
66
71
|
formating,
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "mimir-ui-kit",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.
|
4
|
+
"version": "1.10.1",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
7
7
|
".": {
|
@@ -42,7 +42,8 @@
|
|
42
42
|
"lint:stylelint": "stylelint '**/*.module{.css,.scss}'",
|
43
43
|
"lint:stylelint:fix": "stylelint '**/*.module{.css,.scss}' --fix",
|
44
44
|
"icons": "svgr --expand-props start ./src/icons/svgs",
|
45
|
-
"prepare": "husky"
|
45
|
+
"prepare": "husky",
|
46
|
+
"create-component": "node createComponent.js"
|
46
47
|
},
|
47
48
|
"devDependencies": {
|
48
49
|
"@chromatic-com/storybook": "^1.6.1",
|
@@ -113,7 +114,7 @@
|
|
113
114
|
},
|
114
115
|
"lint-staged": {
|
115
116
|
"**/*.{ts,tsx}": [
|
116
|
-
"eslint",
|
117
|
+
"eslint --ignore-path .eslintignore",
|
117
118
|
"prettier --write"
|
118
119
|
],
|
119
120
|
"**/*.{css,scss}": [
|