mimir-ui-kit 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/dist/assets/fonts/11d5bc9f0cad36d1.woff2 +0 -0
  2. package/dist/assets/fonts/1a738bfdbc1e4d9d.woff +0 -0
  3. package/dist/assets/fonts/242d04bef81519ae.woff2 +0 -0
  4. package/dist/assets/fonts/3b9f59412b17ff93.woff +0 -0
  5. package/dist/assets/fonts/3cdd7fabbe89d2b9.woff +0 -0
  6. package/dist/assets/fonts/43b748f250df0f08.woff +0 -0
  7. package/dist/assets/fonts/585d10920d676fcd.woff2 +0 -0
  8. package/dist/assets/fonts/63611593e008a77c.woff2 +0 -0
  9. package/dist/assets/fonts/badaa6d1837432de.woff +0 -0
  10. package/dist/assets/fonts/cac2ba46e8c8adc9.woff2 +0 -0
  11. package/dist/assets/fonts/d080ae18fd04e52c.woff2 +0 -0
  12. package/dist/assets/fonts/e51d2feb30084bc2.woff2 +0 -0
  13. package/dist/assets/fonts/ee3db32f0aadef5d.woff2 +0 -0
  14. package/dist/assets/fonts/f4d681a788c6d497.woff2 +0 -0
  15. package/dist/assets/styles/index.css +1 -0
  16. package/dist/components/Button/Button.stories.d.ts +67 -0
  17. package/dist/components/Button/constants.d.ts +25 -0
  18. package/dist/components/Button/constants.js +7 -0
  19. package/dist/components/Button/index.d.ts +84 -0
  20. package/dist/components/Button/index.js +53 -0
  21. package/dist/components/Button/types.d.ts +14 -0
  22. package/dist/components/Button/types.js +1 -0
  23. package/dist/components/Input/Input.stories.d.ts +13 -0
  24. package/dist/components/Input/constants.d.ts +12 -0
  25. package/dist/components/Input/constants.js +5 -0
  26. package/dist/components/Input/index.d.ts +29 -0
  27. package/dist/components/Input/index.js +61 -0
  28. package/dist/components/InputPassword/Input.stories.d.ts +7 -0
  29. package/dist/components/InputPassword/index.d.ts +306 -0
  30. package/dist/components/InputPassword/index.js +22 -0
  31. package/dist/components/InputPhoneNumber/Input.stories.d.ts +335 -0
  32. package/dist/components/InputPhoneNumber/index.d.ts +306 -0
  33. package/dist/components/InputPhoneNumber/index.js +28 -0
  34. package/dist/components/InputPhoneNumber/utils.d.ts +2 -0
  35. package/dist/components/InputPhoneNumber/utils.js +9 -0
  36. package/dist/components/OtpInput/Input.stories.d.ts +26 -0
  37. package/dist/components/OtpInput/constants.d.ts +2 -0
  38. package/dist/components/OtpInput/constants.js +5 -0
  39. package/dist/components/OtpInput/index.d.ts +18 -0
  40. package/dist/components/OtpInput/index.js +87 -0
  41. package/dist/components/icons/Eye.d.ts +1 -0
  42. package/dist/components/icons/Eye.js +24 -0
  43. package/dist/components/icons/index.d.ts +1 -0
  44. package/dist/components/icons/index.js +4 -0
  45. package/dist/components/index.d.ts +7 -0
  46. package/dist/components/index.js +20 -0
  47. package/dist/hooks/index.d.ts +1 -0
  48. package/dist/hooks/index.js +6 -0
  49. package/dist/hooks/useMediaQuery/constants.d.ts +7 -0
  50. package/dist/hooks/useMediaQuery/constants.js +4 -0
  51. package/dist/hooks/useMediaQuery/index.d.ts +2 -0
  52. package/dist/hooks/useMediaQuery/index.js +6 -0
  53. package/dist/hooks/useMediaQuery/useMediaQuery.d.ts +14 -0
  54. package/dist/hooks/useMediaQuery/useMediaQuery.js +16 -0
  55. package/dist/index-DIxK0V-G.js +44 -0
  56. package/dist/index.css +1 -0
  57. package/dist/index.d.ts +2 -0
  58. package/dist/index.js +22 -0
  59. package/dist/index2.css +1 -0
  60. package/dist/index3.css +1 -0
  61. package/dist/index4.css +1 -0
  62. package/dist/utils/getLog.d.ts +1 -0
  63. package/dist/utils/getLog.js +4 -0
  64. package/dist/utils/index.d.ts +1 -0
  65. package/dist/utils/index.js +4 -0
  66. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ @font-face{font-weight:400;font-family:Montserrat;font-style:normal;src:url(../fonts/585d10920d676fcd.woff2) format("woff2"),url(../fonts/3b9f59412b17ff93.woff) format("woff")}@font-face{font-weight:700;font-family:Montserrat;font-style:normal;src:url(../fonts/f4d681a788c6d497.woff2) format("woff2"),url(../fonts/43b748f250df0f08.woff) format("woff")}@font-face{font-weight:300;font-family:Montserrat;font-style:normal;src:url(../fonts/ee3db32f0aadef5d.woff2) format("woff2"),url(../fonts/1a738bfdbc1e4d9d.woff) format("woff")}@font-face{font-weight:500;font-family:Montserrat;font-style:normal;src:url(../fonts/e51d2feb30084bc2.woff2) format("woff2"),url(../fonts/badaa6d1837432de.woff) format("woff")}@font-face{font-weight:600;font-family:Montserrat;font-style:normal;src:url(../fonts/63611593e008a77c.woff2) format("woff2"),url(../fonts/3cdd7fabbe89d2b9.woff) format("woff")}@font-face{font-weight:400;font-family:Inter;font-style:normal;src:url(../fonts/d080ae18fd04e52c.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:700;font-family:Inter;font-style:normal;src:url(../fonts/11d5bc9f0cad36d1.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:500;font-family:Inter;font-style:normal;src:url(../fonts/242d04bef81519ae.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:600;font-family:Inter;font-style:normal;src:url(../fonts/cac2ba46e8c8adc9.woff2) format("woff2");font-variant-numeric:slashed-zero}@supports (font-variation-settings: normal){:root{font-family:InterVariable,sans-serif}}*{margin:0;padding:0;border:0;outline:none}*,:after,:before{box-sizing:border-box}:active,:focus{outline:0}a,a:visited,a:hover{text-decoration:none}a:active,a:focus{outline:0}aside,footer,header,nav{display:block}body,html{width:100%;height:100%;font-size:100%;line-height:1}button,input,textarea,select{font-family:inherit}input::-ms-clear{display:none}button{cursor:pointer}button::-moz-focus-inner{padding:0;border:0}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6{font-weight:inherit;font-size:inherit}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--color-typo-brand);transition:background-color 5000s ease-in-out 0s}:root{--sapphire-100: #2355d7;--sapphire-90: #3564df;--sapphire-80: #4b75e2;--sapphire-70: #6186e6;--sapphire-60: #7797e9;--sapphire-50: #8da7ed;--sapphire-40: #9fb7f4;--sapphire-30: #b9caf4;--sapphire-20: #cfdaf7;--sapphire-10: #e5ebfb;--citrine-100: #ff7900;--citrine-90: #ff861a;--citrine-80: #ff9433;--citrine-70: #ffa14d;--citrine-60: #ffaf66;--citrine-50: #ffbc80;--citrine-40: #ffc999;--citrine-30: #ffd7b2;--citrine-20: #ffe4cc;--citrine-10: #fff2e5;--magenta-100: #bc2251;--magenta-90: #d8275d;--magenta-80: #dc3d6d;--magenta-70: #e15781;--magenta-60: #e46c91;--magenta-50: #e986a4;--magenta-40: #ed9cb4;--magenta-30: #f2b6c8;--magenta-20: #f6cbd8;--magenta-10: #fae5ec;--black-100: #000;--black-95: #0d0d0d;--black-90: #1a1a1a;--black-85: #262626;--black-80: #333;--black-75: #404040;--black-70: #4d4d4d;--black-65: #595959;--black-60: #666;--black-55: #737373;--black-50: #808080;--black-45: #8c8c8c;--black-40: #999;--black-35: #a6a6a6;--black-30: #b3b3b3;--black-25: #bfbfbf;--black-20: #ccc;--black-15: #d9d9d9;--black-10: #e6e6e6;--black-5: #f2f2f2;--white: #fff;--dark-blue: #0a38af;--blue-40: #a7bbef;--blue-20: #d3ddf7;--green: #1b770c;--red-tag: #f01406;--success-normal: #23b413;--success-bg-hover: #d5fbe2;--success-bg-active: #ebfdf1;--alarm-normal: #fdc023;--alarm-bg-hover: #fff0c7;--alarm-bg-active: #fff6de;--error-normal: #e64646;--error-bg-hover: #fadbdb;--error-bg-active: #fbe3e3;--disabled: #b3b3b3;--light-text: var(--white);--dark-text: var(--black-100);--sapphire-normal: var(--sapphire-100);--sapphire-hover: #1b41a3;--sapphire-active: #122c70;--citrine-normal: var(--citrine-100);--citrine-hover: #e56d00;--citrine-active: #cc6100;--asphalt-border: var(--black-30);--asphalt-normal: var(--black-80);--asphalt-hover: var(--black-90);--asphalt-active: var(--black-100);--gray-normal: var(--black-5);--gray-hover: var(--black-10);--gray-active: var(--black-80);--white-normal: var(--white);--white-hover: var(--black-5);--white-transparent: rgb(255 255 255 / 40%);--white-active: var(--black-80);--red-normal: var(--error-normal);--red-hover: #e33030;--red-active: #dc1e1e;--green-normal: var(--green);--green-hover: #16610a;--green-active: #114a08;--counter-text: #ffa066;--button-height-xs: 24px;--button-height-s: 32px;--button-height-m: 40px;--button-height-l: 48px;--button-height-xl: 56px;--button-height-xxl: 64px;--control-default: var(--sapphire-20);--control-hover: var(--sapphire-40);--control-selected: var(--sapphire-100);--control-disabled: var(--black-10);--font-inter: "Inter", sans-serif;--font-montserrat: "Montserrat", sans-serif;--font-weight-text-regular: 400;--font-weight-text-medium: 500;--font-weight-text-semibold: 600;--font-weight-text-bold: 700;--font-weight-text-extrabold: 800;--font-weight-text-black: 900;--size-text-xs2: 8px;--size-text-xs: 10px;--size-text-s: 12px;--size-text-m: 14px;--size-text-l: 16px;--size-text-xl: 20px;--size-text-xl2: 24px;--size-text-2xl: 28px;--size-text-xl3: 32px;--size-text-xl4: 48px;--size-text-xl5: 72px;--size-text-xl6: 96px;--line-height-text-2xs: 1em;--line-height-text-xs: 1.1em;--line-height-text-s: 1.2em;--line-height-text-m: 1.3em;--line-height-text-l: 1.4em;--line-height-text-xl: 1.5em;--control-radius: 6px;--control-radius-l: 24px;--control-input-radius: 12px;--control-border-width: 1px;--control-height-xl: 60px;--control-height-xxl: 60px;--control-height-l: var(--space-4xl);--control-height-m: var(--space-3xl);--control-height-s: var(--space-2xl);--control-height-xs: var(--space-xl);--control-box-size-s: var(--space-s);--control-box-size-m: var(--space-m);--control-box-size-l: var(--space-l);--control-space-xxl: var(--space-xl);--control-space-l: var(--space-xl);--control-space-m: var(--space-l);--control-space-s: var(--space-m);--control-space-xs: var(--space-s);--control-text-size-2xl: var(--size-text-xl);--control-text-size-xl: var(--size-text-xl3);--control-text-size-l: var(--size-text-l);--control-text-size-m: var(--size-text-m);--control-text-size-s: var(--size-text-s);--control-text-size-xs: var(--size-text-xs);--space-3xs: 2px;--space-2xs: 4px;--space-xs: 8px;--space-s: 12px;--space-m: 16px;--space-l: 20px;--space-xl: 24px;--space-2xl: 32px;--space-xxl: 40px;--space-3xl: 44px;--space-4xl: 48px;--space-4xxl: 64px;--space-5xl: 72px;--space-6xl: 96px;--container-width-xs: 375px;--container-width-s: 767px;--container-width-m: 960px;--container-width-l: 1280px;--container-width-xl: 1440px;--container-width-xxl: 1920px;--box-shadow-active: 0 0 2px var(--sapphire-normal)}@supports (font-variation-settings: normal){:root{font-family:Inter,sans-serif}}:root{font-feature-settings:"zero"}body{font-family:Inter,sans-serif;font-variant-numeric:slashed-zero;background-color:var(--black-5);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#root{display:flex;flex-direction:column;min-height:100%}
@@ -0,0 +1,67 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonForm } from './constants';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: import('react').ForwardRefExoticComponent<(Omit<import('./types').TButtonDefaultFormProps & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
7
+ className?: string;
8
+ disabled?: boolean;
9
+ rightIcon?: import('react').ReactNode;
10
+ leftIcon?: import('react').ReactNode;
11
+ full?: boolean;
12
+ formId?: string;
13
+ }, "ref"> | Omit<import('./types').TButtonRoundFormProps & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
14
+ className?: string;
15
+ disabled?: boolean;
16
+ rightIcon?: import('react').ReactNode;
17
+ leftIcon?: import('react').ReactNode;
18
+ full?: boolean;
19
+ formId?: string;
20
+ }, "ref">) & import('react').RefAttributes<HTMLButtonElement>>;
21
+ parameters: {
22
+ layout: string;
23
+ };
24
+ tags: string[];
25
+ argTypes: {
26
+ variant: {
27
+ options: (EButtonVariantDefault | EButtonVariantRound)[];
28
+ control: {
29
+ type: "select";
30
+ };
31
+ description: string;
32
+ };
33
+ size: {
34
+ options: EButtonSize[];
35
+ control: {
36
+ type: "select";
37
+ };
38
+ description: string;
39
+ };
40
+ form: {
41
+ options: EButtonForm[];
42
+ control: {
43
+ type: "select";
44
+ };
45
+ description: string;
46
+ };
47
+ };
48
+ args: {
49
+ onClick: import('@vitest/spy').Mock<[event: import('react').MouseEvent<HTMLButtonElement, MouseEvent>], void>;
50
+ children: string;
51
+ form: EButtonForm.DefaultButton;
52
+ variant: EButtonVariantDefault.PrimaryCitrine;
53
+ size: EButtonSize.M;
54
+ };
55
+ };
56
+ export default meta;
57
+ type Story = StoryObj<typeof meta>;
58
+ export declare const DefaultPrimarySapphire: Story;
59
+ export declare const DefaultPrimaryCitrine: Story;
60
+ export declare const DefaultSecondaryAsphalt: Story;
61
+ export declare const DefaultSecondaryGray: Story;
62
+ export declare const DefaultSecondaryWhite: Story;
63
+ export declare const DefaultSecondaryRed: Story;
64
+ export declare const DefaultWithIcons: Story;
65
+ export declare const RoundBlack: Story;
66
+ export declare const RoundGray: Story;
67
+ export declare const RoundWhite: Story;
@@ -0,0 +1,25 @@
1
+ export declare enum EButtonVariantDefault {
2
+ PrimarySapphire = "primary-sapphire",
3
+ PrimaryCitrine = "primary-citrine",
4
+ SecondaryAsphalt = "secondary-asphalt",
5
+ SecondaryGray = "secondary-gray",
6
+ SecondaryWhite = "secondary-white",
7
+ SecondaryRed = "secondary-red"
8
+ }
9
+ export declare enum EButtonVariantRound {
10
+ Black = "black",
11
+ Gray = "gray",
12
+ White = "white"
13
+ }
14
+ export declare enum EButtonSize {
15
+ XS = "xs",
16
+ S = "s",
17
+ M = "m",
18
+ L = "l",
19
+ XL = "xl",
20
+ XXL = "xxl"
21
+ }
22
+ export declare enum EButtonForm {
23
+ DefaultButton = "default-button",
24
+ RoundButton = "round-button"
25
+ }
@@ -0,0 +1,7 @@
1
+ var y = /* @__PURE__ */ ((r) => (r.PrimarySapphire = "primary-sapphire", r.PrimaryCitrine = "primary-citrine", r.SecondaryAsphalt = "secondary-asphalt", r.SecondaryGray = "secondary-gray", r.SecondaryWhite = "secondary-white", r.SecondaryRed = "secondary-red", r))(y || {}), e = /* @__PURE__ */ ((r) => (r.Black = "black", r.Gray = "gray", r.White = "white", r))(e || {}), c = /* @__PURE__ */ ((r) => (r.XS = "xs", r.S = "s", r.M = "m", r.L = "l", r.XL = "xl", r.XXL = "xxl", r))(c || {}), d = /* @__PURE__ */ ((r) => (r.DefaultButton = "default-button", r.RoundButton = "round-button", r))(d || {});
2
+ export {
3
+ d as EButtonForm,
4
+ c as EButtonSize,
5
+ y as EButtonVariantDefault,
6
+ e as EButtonVariantRound
7
+ };
@@ -0,0 +1,84 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { TButtonDefaultFormProps, TButtonRoundFormProps } from './types';
3
+
4
+ export type TProps = (TButtonDefaultFormProps | TButtonRoundFormProps) & ComponentProps<'button'> & {
5
+ /**
6
+ * Класс, применяемый к корневому элементу кнопки.
7
+ */
8
+ className?: string;
9
+ /**
10
+ * Флаг, указывающий, отключена ли кнопка.
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * Иконка справа.
15
+ */
16
+ rightIcon?: ReactNode;
17
+ /**
18
+ * Иконка слева.
19
+ */
20
+ leftIcon?: ReactNode;
21
+ /**
22
+ * Флаг, указывающий, что кнопка занимает все доступное пространство.
23
+ */
24
+ full?: boolean;
25
+ /**
26
+ * Идентификатор формы, к которой привязана кнопка.
27
+ */
28
+ formId?: string;
29
+ };
30
+ /**
31
+ * Компонент кнопки, который можно настраивать с различными темами и размерами.
32
+
33
+ */
34
+ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<TButtonDefaultFormProps & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
35
+ /**
36
+ * Класс, применяемый к корневому элементу кнопки.
37
+ */
38
+ className?: string;
39
+ /**
40
+ * Флаг, указывающий, отключена ли кнопка.
41
+ */
42
+ disabled?: boolean;
43
+ /**
44
+ * Иконка справа.
45
+ */
46
+ rightIcon?: ReactNode;
47
+ /**
48
+ * Иконка слева.
49
+ */
50
+ leftIcon?: ReactNode;
51
+ /**
52
+ * Флаг, указывающий, что кнопка занимает все доступное пространство.
53
+ */
54
+ full?: boolean;
55
+ /**
56
+ * Идентификатор формы, к которой привязана кнопка.
57
+ */
58
+ formId?: string;
59
+ }, "ref"> | Omit<TButtonRoundFormProps & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
60
+ /**
61
+ * Класс, применяемый к корневому элементу кнопки.
62
+ */
63
+ className?: string;
64
+ /**
65
+ * Флаг, указывающий, отключена ли кнопка.
66
+ */
67
+ disabled?: boolean;
68
+ /**
69
+ * Иконка справа.
70
+ */
71
+ rightIcon?: ReactNode;
72
+ /**
73
+ * Иконка слева.
74
+ */
75
+ leftIcon?: ReactNode;
76
+ /**
77
+ * Флаг, указывающий, что кнопка занимает все доступное пространство.
78
+ */
79
+ full?: boolean;
80
+ /**
81
+ * Идентификатор формы, к которой привязана кнопка.
82
+ */
83
+ formId?: string;
84
+ }, "ref">) & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,53 @@
1
+ import { jsxs as f, jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import { c as h } from "../../index-DIxK0V-G.js";
4
+ import { EButtonVariantDefault as b, EButtonForm as g } from "./constants.js";
5
+ import '../../index4.css';const w = "_button_1yux6_1", N = "_xs_1yux6_29", B = "_s_1yux6_37", k = "_m_1yux6_45", I = "_l_1yux6_53", j = "_xl_1yux6_61", D = "_xxl_1yux6_70", E = "_black_1yux6_140", P = "_gray_1yux6_149", v = "_white_1yux6_158", z = "_full_1yux6_182", C = "_disabled_1yux6_186", t = {
6
+ button: w,
7
+ xs: N,
8
+ s: B,
9
+ m: k,
10
+ l: I,
11
+ xl: j,
12
+ xxl: D,
13
+ "default-button": "_default-button_1yux6_78",
14
+ "primary-sapphire": "_primary-sapphire_1yux6_78",
15
+ "primary-citrine": "_primary-citrine_1yux6_87",
16
+ "secondary-asphalt": "_secondary-asphalt_1yux6_96",
17
+ "secondary-gray": "_secondary-gray_1yux6_105",
18
+ "secondary-white": "_secondary-white_1yux6_114",
19
+ "secondary-red": "_secondary-red_1yux6_123",
20
+ "round-button": "_round-button_1yux6_133",
21
+ black: E,
22
+ gray: P,
23
+ white: v,
24
+ full: z,
25
+ disabled: C,
26
+ "right-icon": "_right-icon_1yux6_197",
27
+ "left-icon": "_left-icon_1yux6_198"
28
+ }, F = p((n, r) => {
29
+ const {
30
+ size: l = "m",
31
+ variant: e = b.PrimarySapphire,
32
+ form: c = g.DefaultButton,
33
+ full: u,
34
+ children: i,
35
+ className: y,
36
+ formId: x,
37
+ rightIcon: s,
38
+ leftIcon: _,
39
+ ...o
40
+ } = n, d = {
41
+ [t.full]: u,
42
+ [t.disabled]: o.disabled
43
+ }, m = [o.disabled ? "" : t[e ?? ""], t[c ?? ""], t[l], y];
44
+ return /* @__PURE__ */ f("button", { form: x, ...o, ref: r, className: h(t.button, d, m), children: [
45
+ _ && /* @__PURE__ */ a("span", { className: t["left-icon"], children: _ }),
46
+ i,
47
+ s && /* @__PURE__ */ a("span", { className: t["right-icon"], children: s })
48
+ ] });
49
+ });
50
+ F.displayName = "Button";
51
+ export {
52
+ F as Button
53
+ };
@@ -0,0 +1,14 @@
1
+ import { EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonForm } from './constants';
2
+
3
+ type TButtonRoundFormSize = Exclude<EButtonSize, 'xxl'> & Exclude<EButtonSize, 'xl'>;
4
+ export type TButtonDefaultFormProps = {
5
+ form: EButtonForm.DefaultButton;
6
+ variant?: EButtonVariantDefault | `${EButtonVariantDefault}`;
7
+ size?: EButtonSize | `${EButtonSize}`;
8
+ };
9
+ export type TButtonRoundFormProps = {
10
+ form: EButtonForm.RoundButton;
11
+ variant?: EButtonVariantRound | `${EButtonVariantRound}`;
12
+ size?: TButtonRoundFormSize | `${TButtonRoundFormSize}`;
13
+ };
14
+ export {};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { TProps as TInputProps } from '.';
3
+
4
+ declare const meta: Meta<TInputProps>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof meta>;
7
+ export declare const Primary: Story;
8
+ export declare const Alarm: Story;
9
+ export declare const Success: Story;
10
+ export declare const SmallSize: Story;
11
+ export declare const MediumSize: Story;
12
+ export declare const LargeSize: Story;
13
+ export declare const Disabled: Story;
@@ -0,0 +1,12 @@
1
+ export declare enum EInputVariant {
2
+ Alarm = "alarm",
3
+ Success = "success",
4
+ Error = "error",
5
+ DefaultGray = "default-gray",
6
+ DefaultWhite = "default-white"
7
+ }
8
+ export declare enum EInputSize {
9
+ S = "s",
10
+ M = "m",
11
+ L = "l"
12
+ }
@@ -0,0 +1,5 @@
1
+ var e = /* @__PURE__ */ ((r) => (r.Alarm = "alarm", r.Success = "success", r.Error = "error", r.DefaultGray = "default-gray", r.DefaultWhite = "default-white", r))(e || {}), l = /* @__PURE__ */ ((r) => (r.S = "s", r.M = "m", r.L = "l", r))(l || {});
2
+ export {
3
+ l as EInputSize,
4
+ e as EInputVariant
5
+ };
@@ -0,0 +1,29 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ import { EInputSize, EInputVariant } from './constants';
3
+
4
+ type HTMLInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'readOnly' | 'size'>;
5
+ export type TProps = HTMLInputProps & {
6
+ className?: string;
7
+ /**
8
+ * Метка для ввода.
9
+ */
10
+ label?: string;
11
+ /**
12
+ * Статус ввода. Может быть 'alert', 'success' или 'default'.
13
+ */
14
+ variant?: `${EInputVariant}` | EInputVariant;
15
+ /**
16
+ * Автоматически фокусировать ввод при монтировании.
17
+ */
18
+ autofocus?: boolean;
19
+ /**
20
+ * Сделать ввод только для чтения.
21
+ */
22
+ readonly?: boolean;
23
+ /**
24
+ * Размер ввода.
25
+ */
26
+ size?: `${EInputSize}` | EInputSize;
27
+ };
28
+ export declare const Input: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<HTMLInputProps & import('react').RefAttributes<HTMLInputElement>>>;
29
+ export {};
@@ -0,0 +1,61 @@
1
+ import { jsx as N } from "react/jsx-runtime";
2
+ import { memo as w, forwardRef as x, useState as F, useEffect as g } from "react";
3
+ import { c as E } from "../../index-DIxK0V-G.js";
4
+ import { EInputVariant as j } from "./constants.js";
5
+ import '../../index3.css';const v = "_input_uy10d_1", z = "_s_uy10d_25", B = "_m_uy10d_32", D = "_l_uy10d_39", G = "_success_uy10d_74", O = "_alarm_uy10d_91", P = "_error_uy10d_108", R = "_disabled_uy10d_136", s = {
6
+ input: v,
7
+ s: z,
8
+ m: B,
9
+ l: D,
10
+ "default-gray": "_default-gray_uy10d_46",
11
+ "default-white": "_default-white_uy10d_57",
12
+ success: G,
13
+ alarm: O,
14
+ error: P,
15
+ disabled: R
16
+ }, S = w(
17
+ x((c, n) => {
18
+ const {
19
+ className: l,
20
+ variant: _ = j.DefaultGray,
21
+ type: i = "text",
22
+ placeholder: m,
23
+ autofocus: t,
24
+ readonly: e,
25
+ onFocus: a,
26
+ onBlur: o,
27
+ disabled: d,
28
+ size: y = "m",
29
+ ...f
30
+ } = c, [p, r] = F(t);
31
+ g(() => {
32
+ t && r(!0);
33
+ }, [t]);
34
+ const h = (u) => {
35
+ r(!1), o == null || o(u);
36
+ }, b = (u) => {
37
+ r(!0), a == null || a(u);
38
+ }, I = {
39
+ [s.readonly]: d || e,
40
+ [s.focused]: p,
41
+ [s.disabled]: d || e
42
+ };
43
+ return /* @__PURE__ */ N(
44
+ "input",
45
+ {
46
+ ...f,
47
+ ref: n,
48
+ type: i,
49
+ className: E(s.input, I, l, [s[_], s[y]]),
50
+ onFocus: b,
51
+ onBlur: h,
52
+ readOnly: e,
53
+ placeholder: m
54
+ }
55
+ );
56
+ })
57
+ );
58
+ S.displayName = "Input";
59
+ export {
60
+ S as Input
61
+ };
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { TProps as TInputPasswordProps } from '.';
3
+
4
+ declare const meta: Meta<TInputPasswordProps>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof meta>;
7
+ export declare const Default: Story;