mimir-ui-kit 1.20.6 → 1.21.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Drawer.css +1 -1
- package/dist/components/Button/Button.d.ts +52 -0
- package/dist/components/Button/Button.js +33 -28
- package/dist/components/Button/constants.d.ts +8 -1
- package/dist/components/Button/constants.js +9 -0
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +2 -1
- package/dist/components/Button/types.d.ts +7 -2
- package/dist/components/Drawer/Drawer.d.ts +9 -1
- package/dist/components/Drawer/Drawer.js +49 -34
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/assets/Button.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._button_1qrs0_2{--button-cursor: pointer;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;border-color:var(--border-color);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_1qrs0_2:hover{color:var(--button-color-hover);background:var(--button-bg-color-hover);border-color:var(--border-color-hover)}._button_1qrs0_2:active{color:var(--button-color-active);background:var(--button-bg-color-active);border-color:var(--border-color-active)}._button_1qrs0_2:focus-visible{box-shadow:0 0 2px var(--sapphire-normal)}._button_1qrs0_2._clear_1qrs0_42:focus{box-shadow:none}._button_1qrs0_2 svg{color:currentcolor;fill:currentcolor}._button_1qrs0_2 svg path{color:currentcolor;fill:currentcolor}._default-button_1qrs0_54._primary-sapphire_1qrs0_54{--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_1qrs0_54._primary-citrine_1qrs0_63{--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_1qrs0_54._secondary-asphalt_1qrs0_72{--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_1qrs0_54._secondary-gray_1qrs0_81{--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_1qrs0_54._secondary-white_1qrs0_90{--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_1qrs0_54._secondary-red_1qrs0_99{--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_1qrs0_109{--button-border-radius-l: 24px;--button-border-radius-m: 20px;--button-border-radius-s: 16px;--button-border-radius-xs: 12px;--button-space-l: var(--space-s);--button-space-m: var(--space-xs);--button-space-s: var(--space-xs);--button-space-xs: var(--space-2xs);border-radius:var(--button-border-radius)}._round-button_1qrs0_109._black_1qrs0_120{--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_1qrs0_109._gray_1qrs0_129{--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_1qrs0_109._white_1qrs0_138{--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)}._outline-button_1qrs0_148{--button-bg-color: transparent;--button-bg-color-hover: transparent;--button-bg-color-active: transparent;--button-bg-color-focus: transparent;border:1px solid var(--border-color)}._outline-button_1qrs0_148._outline-asphalt_1qrs0_155{--border-color: var(--disabled-color);--button-color: var(--black-80);--border-color-hover: var(--black-80);--button-color-hover: var(--black-80);--border-color-active: var(--black-100);--button-color-active: var(--black-100)}._outline-button_1qrs0_148._outline-gray_1qrs0_163{--border-color: var(--black-5);--button-color: var(--black-5);--border-color-hover: var(--black-5);--button-color-hover: var(--counter-text);--border-color-active: var(--black-80);--button-color-active: var(--white);--button-bg-color-active: var(--black-80)}._outline-button_1qrs0_148._outline-white_1qrs0_172{--border-color: var(--white);--button-color: var(--white);--border-color-hover: var(--white);--button-color-hover: var(--counter-text);--border-color-active: var(--black-80);--button-color-active: var(--white);--button-bg-color-active: var(--black-80)}._outline-button_1qrs0_148._outline-red_1qrs0_181{--border-color: var(--error-normal);--button-color: var(--error-normal);--border-color-hover: var(--red-hover);--button-color-hover: var(--red-hover);--border-color-active: var(--red-active);--button-color-active: var(--white);--button-bg-color-active: var(--red-active)}._borderless-button_1qrs0_191{--button-bg-color: transparent;--button-bg-color-hover: transparent;--button-bg-color-active: transparent;--button-bg-color-focus: transparent}._borderless-button_1qrs0_191._borderless-asphalt_1qrs0_197{--button-color: var(--black-80);--button-color-hover: var(--counter-text);--button-color-active: var(--black-100)}._borderless-button_1qrs0_191._borderless-gray_1qrs0_202{--button-color: var(--black-5);--button-color-hover: var(--counter-text);--button-color-active: var(--black-80)}._borderless-button_1qrs0_191._borderless-white_1qrs0_207{--button-color: var(--white);--button-color-hover: var(--counter-text);--button-color-active: var(--black-80)}._borderless-button_1qrs0_191._borderless-red_1qrs0_212{--button-color: var(--error-normal);--button-color-hover: var(--red-hover);--button-color-active: var(--red-active)}._default-button_1qrs0_54,._outline-button_1qrs0_148,._borderless-button_1qrs0_191{--button-space-xxl: var(--control-space-xxl);--button-space-xl: var(--control-space-l);--button-space-l: var(--space-m);--button-space-m: var(--space-m);--button-space-s: var(--space-xs);--button-space-xs: var(--space-2xs);--button-border-radius-xxl: var(--control-radius-s);--button-border-radius-xl: var(--control-radius-s);--button-border-radius-l: var(--control-radius);--button-border-radius-m: var(--control-radius);--button-border-radius-s: var(--control-radius-xs);--button-border-radius-xs: var(--control-radius-xs);border-radius:var(--button-border-radius)}._xs_1qrs0_236{--button-height: var(--button-height-xs);--button-font-size: var(--control-text-size-xs);--button-space: var(--button-space-xs);--button-gap: 4px;--button-border-radius: var(--button-border-radius-s)}._m-s_1qrs0_244{--button-height: var(--button-height-ms);--button-border-radius: var(--button-border-radius-s);font-weight:var(--font-weight-text-regular);--button-gap: var(--space-2xs);--button-font-size: var(--size-text-s)}._s_1qrs0_72{--button-height: var(--button-height-s);--button-font-size: var(--control-text-size-s);--button-space: var(--button-space-s);--button-gap: 4px;--button-border-radius: var(--button-border-radius-s)}._m_1qrs0_244{--button-height: var(--button-height-m);--button-font-size: var(--size-text-m);--button-space: var(--button-space-m);--button-gap: 8px;--button-border-radius: var(--button-border-radius-m)}._l_1qrs0_268{--button-height: var(--button-height-l);--button-font-size: var(--size-text-m);--button-space: var(--button-space-l);--button-gap: 8px;--button-border-radius: var(--button-border-radius-l)}._xl_1qrs0_276{--button-height: var(--button-height-xl);--button-space: var(--button-space-xl);--button-gap: 8px;--button-border-radius: var(--button-border-radius-xl);--button-font-size: var(--size-text-m);font-weight:var(--font-weight-text-medium)}._xxl_1qrs0_285{--button-height: var(--button-height-xxl);--button-space: var(--button-space-xxl);--button-border-radius: var(--button-border-radius-xxl);--button-gap: 8px;font-weight:var(--font-weight-text-medium);--button-font-size: var(--size-text-m)}._full_1qrs0_294{display:flex;justify-content:center;width:100%}._disabled_1qrs0_300{--button-cursor: not-allowed;color:var(--light-text);background-color:var(--disabled)}._disabled_1qrs0_300:hover,._disabled_1qrs0_300:active,._disabled_1qrs0_300:focus{color:var(--light-text);background-color:var(--disabled);box-shadow:none}._disabled_1qrs0_300._outline-button_1qrs0_148{color:var(--disabled);background-color:transparent;border:1px solid var(--disabled)}._disabled_1qrs0_300._borderless-button_1qrs0_191{color:var(--disabled-color);background-color:transparent}._icon-button_1qrs0_320{justify-content:center;min-width:var(--button-height);padding:0}
|
package/dist/assets/Drawer.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._drawer_3gban_3{--drawer-width: 808px;--drawer-z-index: 10000;position:fixed;z-index:10000;z-index:var(--drawer-z-index);display:flex;flex-direction:column;width:808px;width:var(--drawer-width);height:100%;overflow:auto;background-color:var(--black-5);transition:all .3s ease;pointer-events:none}._drawer_3gban_3::-webkit-scrollbar{width:3px}._drawer_3gban_3::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:2px}._drawer_3gban_3::-webkit-scrollbar-track{background-color:var(--white)}._drawer_3gban_3 ._content_3gban_27{position:relative;display:flex;flex:1;flex-direction:column;padding:var(--space-m) var(--space-4xl) var(--space-4xl);transition:all .3s ease}@media (max-width: 600px){._drawer_3gban_3 ._content_3gban_27{--drawer-width: 100%;padding:var(--space-m)}}._drawer_3gban_3 ._content_3gban_27._is-loading_3gban_41{align-items:center;justify-content:center}._drawer_3gban_3 ._header_3gban_45{display:flex;gap:var(--space-xs);min-height:68px}._drawer_3gban_3 ._header_3gban_45:not(:last-child){margin-bottom:var(--space-2xl)}._drawer_3gban_3 ._header_3gban_45._sticky-header_3gban_53{position:-webkit-sticky;position:sticky;top:0;left:0;background-color:var(--black-5)}._drawer_3gban_3 ._header_3gban_45 ._title_3gban_59{flex:1;align-self:flex-end;font-weight:var(--font-weight-text-medium);font-size:var(--size-text-xl3);line-height:var(--line-height-text-s1);letter-spacing:.7px}@media (max-width: 600px){._drawer_3gban_3 ._header_3gban_45 ._title_3gban_59{font-size:var(--size-text-xl2);line-height:var(--line-height-text-xs)}}._drawer_3gban_3 ._header_3gban_45 ._space_3gban_73{flex:0 0 var(--button-height-m)}@media (max-width: 600px){._drawer_3gban_3 ._header_3gban_45{min-height:55px}._drawer_3gban_3 ._header_3gban_45:not(:last-child){margin-bottom:var(--space-m)}}._drawer_3gban_3 ._inner_3gban_84{flex:1}._drawer_3gban_3 ._button_3gban_87{position:absolute;top:var(--space-m);right:var(--space-m)}._drawer_3gban_3 ._footer_3gban_92{display:block;padding-top:var(--space-4xl)}@media (max-width: 600px){._drawer_3gban_3 ._footer_3gban_92{padding-top:var(--space-m)}}._drawer_3gban_3 ._footer-button_3gban_101{display:block;margin-left:auto}._drawer_3gban_3._left_3gban_105{top:0;left:-100%}._drawer_3gban_3._right_3gban_109{top:0;right:-100%}._drawer_3gban_3._full_3gban_113{top:0;right:0;bottom:0;left:0;width:100%;height:100%;max-height:100vh;border-radius:0;transform:scale(.95);opacity:0;transition:transform .3s ease-in-out,opacity .3s ease-in-out}._drawer_3gban_3._bottom_3gban_123{right:50%;bottom:-100%;left:50%;height:-webkit-min-content;height:-moz-min-content;height:min-content;max-height:calc(100% - var(--space-xs));border-top-left-radius:var(--control-radius);border-top-right-radius:var(--control-radius);transform:translate(-50%)}._drawer_3gban_3._bottom_3gban_123._full-bottom-height_3gban_133{height:calc(100% - var(--space-xs))}._drawer_3gban_3._opened_3gban_136{transition:all .3s ease;pointer-events:auto}._drawer_3gban_3._opened_3gban_136._left_3gban_105{left:0%;transition:left .3s ease}._drawer_3gban_3._opened_3gban_136._right_3gban_109{right:0%;transition:right .3s ease}._drawer_3gban_3._opened_3gban_136._bottom_3gban_123{bottom:0%}._drawer_3gban_3._opened_3gban_136._full_3gban_113{transform:scale(1);opacity:1}._drawer_3gban_3._is-closing_3gban_155._left_3gban_105{left:-100%}._drawer_3gban_3._is-closing_3gban_155._right_3gban_109{right:-100%}._drawer_3gban_3._is-closing_3gban_155._bottom_3gban_123{bottom:-100%}._drawer_3gban_3._is-closing_3gban_155._full_3gban_113{transform:scale(.95);opacity:0}@media (max-width: 1440px){._drawer_3gban_3{--drawer-width: 608px}}@media (max-width: 1280px){._drawer_3gban_3{--drawer-width: 648px}}@media (max-width: 768px){._drawer_3gban_3{--drawer-width: 584px}}@media (max-width: 600px){._drawer_3gban_3{--drawer-width: 100%}._drawer_3gban_3._bottom_3gban_123{--drawer-width: calc(100% - var(--space-xs))}}._overlay_3gban_192{--overlay-z-index: 9990;position:fixed;top:0;left:0;z-index:9990;z-index:var(--overlay-z-index);width:100%;height:100%;background-color:#0009;opacity:0;transition:all .3s ease}._overlay_3gban_192._opened_3gban_136{opacity:1;transition:all .3s ease}._overlay_3gban_192._is-closing_3gban_155{opacity:0;transition:all .3s ease}
|
@@ -183,4 +183,56 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
|
|
183
183
|
* Идентификатор формы, к которой привязана кнопка.
|
184
184
|
*/
|
185
185
|
formId?: string;
|
186
|
+
}, "ref"> | Omit<import('./types').TButtonBorderlessFormProps & {
|
187
|
+
isIconButton: true;
|
188
|
+
iconName: TIcon;
|
189
|
+
leftIcon?: never;
|
190
|
+
rightIcon?: never;
|
191
|
+
} & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
192
|
+
/**
|
193
|
+
* Класс, применяемый к корневому элементу кнопки.
|
194
|
+
*/
|
195
|
+
className?: string;
|
196
|
+
/**
|
197
|
+
* Флаг, указывающий, отключена ли кнопка.
|
198
|
+
*/
|
199
|
+
disabled?: boolean;
|
200
|
+
/**
|
201
|
+
* Флаг, указывающий, что кнопка занимает все доступное пространство.
|
202
|
+
*/
|
203
|
+
full?: boolean;
|
204
|
+
/**
|
205
|
+
* Флаг, отключащий абсолютно все модификации кнопки (variant, size).
|
206
|
+
*/
|
207
|
+
clear?: boolean;
|
208
|
+
/**
|
209
|
+
* Идентификатор формы, к которой привязана кнопка.
|
210
|
+
*/
|
211
|
+
formId?: string;
|
212
|
+
}, "ref"> | Omit<import('./types').TButtonBorderlessFormProps & {
|
213
|
+
isIconButton?: false;
|
214
|
+
iconName?: never;
|
215
|
+
leftIcon?: import('react').ReactNode;
|
216
|
+
rightIcon?: import('react').ReactNode;
|
217
|
+
} & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
218
|
+
/**
|
219
|
+
* Класс, применяемый к корневому элементу кнопки.
|
220
|
+
*/
|
221
|
+
className?: string;
|
222
|
+
/**
|
223
|
+
* Флаг, указывающий, отключена ли кнопка.
|
224
|
+
*/
|
225
|
+
disabled?: boolean;
|
226
|
+
/**
|
227
|
+
* Флаг, указывающий, что кнопка занимает все доступное пространство.
|
228
|
+
*/
|
229
|
+
full?: boolean;
|
230
|
+
/**
|
231
|
+
* Флаг, отключащий абсолютно все модификации кнопки (variant, size).
|
232
|
+
*/
|
233
|
+
clear?: boolean;
|
234
|
+
/**
|
235
|
+
* Идентификатор формы, к которой привязана кнопка.
|
236
|
+
*/
|
237
|
+
formId?: string;
|
186
238
|
}, "ref">) & import('react').RefAttributes<HTMLButtonElement>>;
|
@@ -3,40 +3,45 @@ 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 black = "
|
9
|
-
const gray = "
|
10
|
-
const white = "
|
11
|
-
const xs = "
|
12
|
-
const s = "
|
13
|
-
const m = "
|
14
|
-
const l = "
|
15
|
-
const xl = "
|
16
|
-
const xxl = "
|
17
|
-
const full = "
|
18
|
-
const disabled = "
|
6
|
+
import '../../assets/Button.css';const button = "_button_1qrs0_2";
|
7
|
+
const clear = "_clear_1qrs0_42";
|
8
|
+
const black = "_black_1qrs0_120";
|
9
|
+
const gray = "_gray_1qrs0_129";
|
10
|
+
const white = "_white_1qrs0_138";
|
11
|
+
const xs = "_xs_1qrs0_236";
|
12
|
+
const s = "_s_1qrs0_72";
|
13
|
+
const m = "_m_1qrs0_244";
|
14
|
+
const l = "_l_1qrs0_268";
|
15
|
+
const xl = "_xl_1qrs0_276";
|
16
|
+
const xxl = "_xxl_1qrs0_285";
|
17
|
+
const full = "_full_1qrs0_294";
|
18
|
+
const disabled = "_disabled_1qrs0_300";
|
19
19
|
const cls = {
|
20
20
|
button,
|
21
21
|
clear,
|
22
|
-
"default-button": "_default-
|
23
|
-
"primary-sapphire": "_primary-
|
24
|
-
"primary-citrine": "_primary-
|
25
|
-
"secondary-asphalt": "_secondary-
|
26
|
-
"secondary-gray": "_secondary-
|
27
|
-
"secondary-white": "_secondary-
|
28
|
-
"secondary-red": "_secondary-
|
29
|
-
"round-button": "_round-
|
22
|
+
"default-button": "_default-button_1qrs0_54",
|
23
|
+
"primary-sapphire": "_primary-sapphire_1qrs0_54",
|
24
|
+
"primary-citrine": "_primary-citrine_1qrs0_63",
|
25
|
+
"secondary-asphalt": "_secondary-asphalt_1qrs0_72",
|
26
|
+
"secondary-gray": "_secondary-gray_1qrs0_81",
|
27
|
+
"secondary-white": "_secondary-white_1qrs0_90",
|
28
|
+
"secondary-red": "_secondary-red_1qrs0_99",
|
29
|
+
"round-button": "_round-button_1qrs0_109",
|
30
30
|
black,
|
31
31
|
gray,
|
32
32
|
white,
|
33
|
-
"outline-button": "_outline-
|
34
|
-
"outline-asphalt": "_outline-
|
35
|
-
"outline-gray": "_outline-
|
36
|
-
"outline-white": "_outline-
|
37
|
-
"outline-red": "_outline-
|
33
|
+
"outline-button": "_outline-button_1qrs0_148",
|
34
|
+
"outline-asphalt": "_outline-asphalt_1qrs0_155",
|
35
|
+
"outline-gray": "_outline-gray_1qrs0_163",
|
36
|
+
"outline-white": "_outline-white_1qrs0_172",
|
37
|
+
"outline-red": "_outline-red_1qrs0_181",
|
38
|
+
"borderless-button": "_borderless-button_1qrs0_191",
|
39
|
+
"borderless-asphalt": "_borderless-asphalt_1qrs0_197",
|
40
|
+
"borderless-gray": "_borderless-gray_1qrs0_202",
|
41
|
+
"borderless-white": "_borderless-white_1qrs0_207",
|
42
|
+
"borderless-red": "_borderless-red_1qrs0_212",
|
38
43
|
xs,
|
39
|
-
"m-s": "_m-
|
44
|
+
"m-s": "_m-s_1qrs0_244",
|
40
45
|
s,
|
41
46
|
m,
|
42
47
|
l,
|
@@ -44,7 +49,7 @@ const cls = {
|
|
44
49
|
xxl,
|
45
50
|
full,
|
46
51
|
disabled,
|
47
|
-
"icon-button": "_icon-
|
52
|
+
"icon-button": "_icon-button_1qrs0_320"
|
48
53
|
};
|
49
54
|
const Button = forwardRef(
|
50
55
|
(props, ref) => {
|
@@ -17,6 +17,12 @@ export declare enum EButtonVariantOutline {
|
|
17
17
|
White = "outline-white",
|
18
18
|
Red = "outline-red"
|
19
19
|
}
|
20
|
+
export declare enum EButtonVariantBorderless {
|
21
|
+
Asphalt = "borderless-asphalt",
|
22
|
+
Gray = "borderless-gray",
|
23
|
+
White = "borderless-white",
|
24
|
+
Red = "borderless-red"
|
25
|
+
}
|
20
26
|
export declare enum EButtonSize {
|
21
27
|
XS = "xs",
|
22
28
|
S = "s",
|
@@ -29,5 +35,6 @@ export declare enum EButtonSize {
|
|
29
35
|
export declare enum EButtonForm {
|
30
36
|
DefaultButton = "default-button",
|
31
37
|
RoundButton = "round-button",
|
32
|
-
OutlineButton = "outline-button"
|
38
|
+
OutlineButton = "outline-button",
|
39
|
+
BorderlessButton = "borderless-button"
|
33
40
|
}
|
@@ -20,6 +20,13 @@ var EButtonVariantOutline = /* @__PURE__ */ ((EButtonVariantOutline2) => {
|
|
20
20
|
EButtonVariantOutline2["Red"] = "outline-red";
|
21
21
|
return EButtonVariantOutline2;
|
22
22
|
})(EButtonVariantOutline || {});
|
23
|
+
var EButtonVariantBorderless = /* @__PURE__ */ ((EButtonVariantBorderless2) => {
|
24
|
+
EButtonVariantBorderless2["Asphalt"] = "borderless-asphalt";
|
25
|
+
EButtonVariantBorderless2["Gray"] = "borderless-gray";
|
26
|
+
EButtonVariantBorderless2["White"] = "borderless-white";
|
27
|
+
EButtonVariantBorderless2["Red"] = "borderless-red";
|
28
|
+
return EButtonVariantBorderless2;
|
29
|
+
})(EButtonVariantBorderless || {});
|
23
30
|
var EButtonSize = /* @__PURE__ */ ((EButtonSize2) => {
|
24
31
|
EButtonSize2["XS"] = "xs";
|
25
32
|
EButtonSize2["S"] = "s";
|
@@ -34,11 +41,13 @@ var EButtonForm = /* @__PURE__ */ ((EButtonForm2) => {
|
|
34
41
|
EButtonForm2["DefaultButton"] = "default-button";
|
35
42
|
EButtonForm2["RoundButton"] = "round-button";
|
36
43
|
EButtonForm2["OutlineButton"] = "outline-button";
|
44
|
+
EButtonForm2["BorderlessButton"] = "borderless-button";
|
37
45
|
return EButtonForm2;
|
38
46
|
})(EButtonForm || {});
|
39
47
|
export {
|
40
48
|
EButtonForm,
|
41
49
|
EButtonSize,
|
50
|
+
EButtonVariantBorderless,
|
42
51
|
EButtonVariantDefault,
|
43
52
|
EButtonVariantOutline,
|
44
53
|
EButtonVariantRound
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { Button, type TProps as TButtonProps } from './Button';
|
2
|
-
export { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonVariantOutline } from './constants';
|
2
|
+
export { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonVariantOutline, EButtonVariantBorderless } from './constants';
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { Button } from "./Button.js";
|
2
|
-
import { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./constants.js";
|
2
|
+
import { EButtonForm, EButtonSize, EButtonVariantBorderless, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./constants.js";
|
3
3
|
export {
|
4
4
|
Button,
|
5
5
|
EButtonForm,
|
6
6
|
EButtonSize,
|
7
|
+
EButtonVariantBorderless,
|
7
8
|
EButtonVariantDefault,
|
8
9
|
EButtonVariantOutline,
|
9
10
|
EButtonVariantRound
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
|
-
import { EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonForm, EButtonVariantOutline } from './constants';
|
2
|
+
import { EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonForm, EButtonVariantOutline, EButtonVariantBorderless } from './constants';
|
3
3
|
import { TIcon } from '../../icons';
|
4
4
|
|
5
5
|
type TButtonRoundFormSize = Exclude<EButtonSize, 'xxl'> & Exclude<EButtonSize, 'xl'>;
|
@@ -18,6 +18,11 @@ export type TButtonOutlineFormProps = {
|
|
18
18
|
variant?: EButtonVariantOutline | `${EButtonVariantOutline}`;
|
19
19
|
size?: EButtonSize | `${EButtonSize}`;
|
20
20
|
};
|
21
|
+
export type TButtonBorderlessFormProps = {
|
22
|
+
form?: EButtonForm.BorderlessButton;
|
23
|
+
variant?: EButtonVariantBorderless | `${EButtonVariantBorderless}`;
|
24
|
+
size?: EButtonSize | `${EButtonSize}`;
|
25
|
+
};
|
21
26
|
export type TButtonIsIconProps = {
|
22
27
|
isIconButton: true;
|
23
28
|
iconName: TIcon;
|
@@ -29,5 +34,5 @@ export type TButtonIsIconProps = {
|
|
29
34
|
leftIcon?: ReactNode;
|
30
35
|
rightIcon?: ReactNode;
|
31
36
|
};
|
32
|
-
export type TCommonButtonProps = (TButtonDefaultFormProps | TButtonRoundFormProps | TButtonOutlineFormProps) & TButtonIsIconProps;
|
37
|
+
export type TCommonButtonProps = (TButtonDefaultFormProps | TButtonRoundFormProps | TButtonOutlineFormProps | TButtonBorderlessFormProps) & TButtonIsIconProps;
|
33
38
|
export {};
|
@@ -30,6 +30,14 @@ type TProps = {
|
|
30
30
|
* Флаг отвечающий за загрузку
|
31
31
|
*/
|
32
32
|
isLoading?: boolean;
|
33
|
+
/**
|
34
|
+
* Флаг делающий шапку sticky
|
35
|
+
*/
|
36
|
+
stickyHeader?: boolean;
|
37
|
+
/**
|
38
|
+
* Флаг отвечающий за высоту шторки в положении `bottom`
|
39
|
+
*/
|
40
|
+
fullBottomHeight?: boolean;
|
33
41
|
/**
|
34
42
|
* Позиция шторки.
|
35
43
|
*/
|
@@ -44,5 +52,5 @@ type TProps = {
|
|
44
52
|
/**
|
45
53
|
* Компонент шторки, который может выезжать слева, справа или внизу.
|
46
54
|
*/
|
47
|
-
export declare const Drawer: ({ isOpen, onClose, title, className, isLoading, position, paddingRight, additionalHeight, footer, children }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
|
55
|
+
export declare const Drawer: ({ isOpen, onClose, title, className, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, additionalHeight, footer, children }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
|
48
56
|
export {};
|
@@ -9,37 +9,39 @@ import { Button } from "../Button/Button.js";
|
|
9
9
|
import { EButtonVariantDefault, EButtonSize } from "../Button/constants.js";
|
10
10
|
import { Loader } from "../Loader/Loader.js";
|
11
11
|
import { Portal } from "../Portal/Portal.js";
|
12
|
-
import '../../assets/Drawer.css';const drawer = "
|
13
|
-
const content = "
|
14
|
-
const header = "
|
15
|
-
const title = "
|
16
|
-
const space = "
|
17
|
-
const inner = "
|
18
|
-
const button = "
|
19
|
-
const footer = "
|
20
|
-
const left = "
|
21
|
-
const right = "
|
22
|
-
const full = "
|
23
|
-
const bottom = "
|
24
|
-
const opened = "
|
25
|
-
const overlay = "
|
12
|
+
import '../../assets/Drawer.css';const drawer = "_drawer_3gban_3";
|
13
|
+
const content = "_content_3gban_27";
|
14
|
+
const header = "_header_3gban_45";
|
15
|
+
const title = "_title_3gban_59";
|
16
|
+
const space = "_space_3gban_73";
|
17
|
+
const inner = "_inner_3gban_84";
|
18
|
+
const button = "_button_3gban_87";
|
19
|
+
const footer = "_footer_3gban_92";
|
20
|
+
const left = "_left_3gban_105";
|
21
|
+
const right = "_right_3gban_109";
|
22
|
+
const full = "_full_3gban_113";
|
23
|
+
const bottom = "_bottom_3gban_123";
|
24
|
+
const opened = "_opened_3gban_136";
|
25
|
+
const overlay = "_overlay_3gban_192";
|
26
26
|
const cls = {
|
27
27
|
drawer,
|
28
28
|
content,
|
29
|
-
"is-loading": "_is-
|
29
|
+
"is-loading": "_is-loading_3gban_41",
|
30
30
|
header,
|
31
|
+
"sticky-header": "_sticky-header_3gban_53",
|
31
32
|
title,
|
32
33
|
space,
|
33
34
|
inner,
|
34
35
|
button,
|
35
36
|
footer,
|
36
|
-
"footer-button": "_footer-
|
37
|
+
"footer-button": "_footer-button_3gban_101",
|
37
38
|
left,
|
38
39
|
right,
|
39
40
|
full,
|
40
41
|
bottom,
|
42
|
+
"full-bottom-height": "_full-bottom-height_3gban_133",
|
41
43
|
opened,
|
42
|
-
"is-closing": "_is-
|
44
|
+
"is-closing": "_is-closing_3gban_155",
|
43
45
|
overlay
|
44
46
|
};
|
45
47
|
const ANIMATION_DELAY = 300;
|
@@ -49,6 +51,8 @@ const Drawer = ({
|
|
49
51
|
title: title2,
|
50
52
|
className,
|
51
53
|
isLoading,
|
54
|
+
stickyHeader,
|
55
|
+
fullBottomHeight = false,
|
52
56
|
position = EDrawerPosition.RIGHT,
|
53
57
|
paddingRight = 8,
|
54
58
|
additionalHeight = 0,
|
@@ -98,11 +102,13 @@ const Drawer = ({
|
|
98
102
|
}, [isOpen, handleKeyDown]);
|
99
103
|
const mods = {
|
100
104
|
[cls.opened]: isMounted,
|
101
|
-
[cls["is-closing"]]: isClosing
|
105
|
+
[cls["is-closing"]]: isClosing,
|
106
|
+
[cls["full-bottom-height"]]: fullBottomHeight
|
102
107
|
};
|
103
108
|
if (!isOpen) {
|
104
109
|
return null;
|
105
110
|
}
|
111
|
+
const bottomPositionHeight = isBottomPosition && contentRef.current && !fullBottomHeight ? contentRef.current.offsetHeight + additionalHeight : void 0;
|
106
112
|
return /* @__PURE__ */ jsxs(Portal, { children: [
|
107
113
|
/* @__PURE__ */ jsx(
|
108
114
|
"div",
|
@@ -110,31 +116,40 @@ const Drawer = ({
|
|
110
116
|
"aria-hidden": !isOpen,
|
111
117
|
role: "dialog",
|
112
118
|
style: {
|
113
|
-
|
119
|
+
height: bottomPositionHeight
|
114
120
|
},
|
115
121
|
className: classNames(cls.drawer, cls[position], mods, className),
|
116
122
|
children: /* @__PURE__ */ jsx(
|
117
123
|
"section",
|
118
124
|
{
|
125
|
+
ref: contentRef,
|
119
126
|
className: classNames(cls.content, cls[position], {
|
120
127
|
[cls["is-loading"]]: Boolean(isLoading)
|
121
128
|
}),
|
122
129
|
children: isLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
123
|
-
/* @__PURE__ */ jsxs(
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
130
|
+
/* @__PURE__ */ jsxs(
|
131
|
+
"header",
|
132
|
+
{
|
133
|
+
className: classNames(cls.header, {
|
134
|
+
[cls["sticky-header"]]: stickyHeader
|
135
|
+
}),
|
136
|
+
children: [
|
137
|
+
/* @__PURE__ */ jsx("h2", { className: cls.title, children: title2 }),
|
138
|
+
/* @__PURE__ */ jsx("div", { className: cls.space, children: /* @__PURE__ */ jsx(
|
139
|
+
Button,
|
140
|
+
{
|
141
|
+
variant: EButtonVariantDefault.SecondaryWhite,
|
142
|
+
isIconButton: true,
|
143
|
+
size: isMobile ? EButtonSize.S : EButtonSize.M,
|
144
|
+
iconName: "Close16px",
|
145
|
+
onClick: handleClose,
|
146
|
+
className: cls.button
|
147
|
+
}
|
148
|
+
) })
|
149
|
+
]
|
150
|
+
}
|
151
|
+
),
|
152
|
+
/* @__PURE__ */ jsx("div", { className: cls.inner, children }),
|
138
153
|
/* @__PURE__ */ jsx("footer", { className: cls.footer, children: typeof footer2 === "function" ? footer2({ handleClose }) : footer2 || /* @__PURE__ */ jsx(
|
139
154
|
Button,
|
140
155
|
{
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { Button, EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonVariantOutline, type TButtonProps } from './Button';
|
1
|
+
export { Button, EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonVariantOutline, EButtonVariantBorderless, type TButtonProps } from './Button';
|
2
2
|
export { Input, EInputSize, EInputVariant } from './Input';
|
3
3
|
export type { TInputProps, TSize, TVariant } from './Input';
|
4
4
|
export { TextArea } from './TextArea';
|
package/dist/components/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Button } from "./Button/Button.js";
|
2
|
-
import { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./Button/constants.js";
|
2
|
+
import { EButtonForm, EButtonSize, EButtonVariantBorderless, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./Button/constants.js";
|
3
3
|
import { I } from "../Input-6mudFqTb.js";
|
4
4
|
import { EInputSize, EInputVariant } from "./Input/constants.js";
|
5
5
|
import { TextArea } from "./TextArea/TextArea.js";
|
@@ -53,6 +53,7 @@ export {
|
|
53
53
|
EAccordionSize,
|
54
54
|
EButtonForm,
|
55
55
|
EButtonSize,
|
56
|
+
EButtonVariantBorderless,
|
56
57
|
EButtonVariantDefault,
|
57
58
|
EButtonVariantOutline,
|
58
59
|
EButtonVariantRound,
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Button } from "./components/Button/Button.js";
|
2
|
-
import { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./components/Button/constants.js";
|
2
|
+
import { EButtonForm, EButtonSize, EButtonVariantBorderless, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./components/Button/constants.js";
|
3
3
|
import { I } from "./Input-6mudFqTb.js";
|
4
4
|
import { EInputSize, EInputVariant } from "./components/Input/constants.js";
|
5
5
|
import { TextArea } from "./components/TextArea/TextArea.js";
|
@@ -62,6 +62,7 @@ import './assets/index.css';export {
|
|
62
62
|
EAccordionSize,
|
63
63
|
EButtonForm,
|
64
64
|
EButtonSize,
|
65
|
+
EButtonVariantBorderless,
|
65
66
|
EButtonVariantDefault,
|
66
67
|
EButtonVariantOutline,
|
67
68
|
EButtonVariantRound,
|