mimir-ui-kit 1.43.27 → 1.44.0

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.
Files changed (82) hide show
  1. package/dist/Input-IzZ6B9kw.js +232 -0
  2. package/dist/assets/Avatar.css +1 -1
  3. package/dist/assets/Chip.css +1 -1
  4. package/dist/assets/CopyText.css +1 -0
  5. package/dist/assets/Counter.css +1 -0
  6. package/dist/assets/Drawer.css +1 -1
  7. package/dist/assets/DropdownSelect.css +1 -0
  8. package/dist/assets/Input.css +1 -1
  9. package/dist/assets/Pagination.css +1 -1
  10. package/dist/assets/SelectSearch.css +1 -1
  11. package/dist/assets/TabTrail.css +1 -1
  12. package/dist/assets/index.css +1 -1
  13. package/dist/assets/styles.css +1 -1
  14. package/dist/components/Avatar/Avatar.d.ts +1 -1
  15. package/dist/components/Avatar/Avatar.js +41 -37
  16. package/dist/components/Avatar/constants.d.ts +5 -0
  17. package/dist/components/Avatar/constants.js +3 -2
  18. package/dist/components/Avatar/index.d.ts +1 -0
  19. package/dist/components/Avatar/index.js +5 -4
  20. package/dist/components/Avatar/types.d.ts +3 -1
  21. package/dist/components/Chip/Chip.d.ts +5 -1
  22. package/dist/components/Chip/Chip.js +45 -36
  23. package/dist/components/Chip/constants.d.ts +5 -1
  24. package/dist/components/Chip/constants.js +3 -3
  25. package/dist/components/CopyText/CopyText.d.ts +3 -0
  26. package/dist/components/CopyText/CopyText.js +96 -0
  27. package/dist/components/CopyText/index.d.ts +2 -0
  28. package/dist/components/CopyText/index.js +4 -0
  29. package/dist/components/CopyText/types.d.ts +32 -0
  30. package/dist/components/DatePicker/DatePicker.d.ts +11 -0
  31. package/dist/components/DatePicker/DatePicker.js +96 -93
  32. package/dist/components/DatePicker/DatePickerModal.js +1 -1
  33. package/dist/components/DatePicker/MonthPickerModal.js +1 -1
  34. package/dist/components/DatePicker/YearPickerModal.js +1 -1
  35. package/dist/components/DatePicker/constants.d.ts +6 -0
  36. package/dist/components/DatePicker/constants.js +13 -12
  37. package/dist/components/DatePicker/index.d.ts +1 -0
  38. package/dist/components/DatePicker/index.js +3 -1
  39. package/dist/components/Drawer/Drawer.js +47 -47
  40. package/dist/components/DropdownSelect/DropdownSelect.d.ts +3 -0
  41. package/dist/components/DropdownSelect/DropdownSelect.js +115 -0
  42. package/dist/components/DropdownSelect/constants.d.ts +5 -0
  43. package/dist/components/DropdownSelect/constants.js +4 -0
  44. package/dist/components/DropdownSelect/index.d.ts +3 -0
  45. package/dist/components/DropdownSelect/index.js +6 -0
  46. package/dist/components/DropdownSelect/types.d.ts +56 -0
  47. package/dist/components/Input/Input.d.ts +5 -0
  48. package/dist/components/Input/Input.js +1 -1
  49. package/dist/components/Input/constants.d.ts +6 -0
  50. package/dist/components/Input/constants.js +4 -3
  51. package/dist/components/Input/index.js +1 -1
  52. package/dist/components/InputPassword/InputPassword.js +1 -1
  53. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  54. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
  55. package/dist/components/MultiSelectSearch/utils.js +1 -1
  56. package/dist/components/OtpInput/OtpInput.js +1 -1
  57. package/dist/components/Pagination/Counter/Counter.d.ts +9 -0
  58. package/dist/components/Pagination/Counter/Counter.js +28 -0
  59. package/dist/components/Pagination/Pagination.d.ts +17 -0
  60. package/dist/components/Pagination/Pagination.js +167 -126
  61. package/dist/components/Pagination/constants.d.ts +6 -0
  62. package/dist/components/Pagination/constants.js +5 -3
  63. package/dist/components/Pagination/index.d.ts +1 -0
  64. package/dist/components/Pagination/index.js +4 -2
  65. package/dist/components/SelectSearch/SelectSearch.d.ts +2 -1
  66. package/dist/components/SelectSearch/SelectSearch.js +193 -187
  67. package/dist/components/SelectSearch/constants.d.ts +6 -0
  68. package/dist/components/SelectSearch/constants.js +7 -5
  69. package/dist/components/SelectSearch/index.d.ts +1 -1
  70. package/dist/components/SelectSearch/index.js +5 -4
  71. package/dist/components/SelectSearch/types.d.ts +6 -1
  72. package/dist/components/SelectSearch/utils.js +1 -1
  73. package/dist/components/TabTrail/TabTrail.d.ts +16 -0
  74. package/dist/components/TabTrail/TabTrail.js +257 -220
  75. package/dist/components/TextArea/TextArea.js +1 -1
  76. package/dist/components/index.d.ts +8 -4
  77. package/dist/components/index.js +178 -166
  78. package/dist/index.js +203 -191
  79. package/dist/styles.module-D3nnIVCZ.js +31 -0
  80. package/package.json +1 -1
  81. package/dist/Input-BU_6U1CW.js +0 -227
  82. package/dist/styles.module-Cuqm31CO.js +0 -28
@@ -0,0 +1,115 @@
1
+ import { jsx as s, jsxs as d, Fragment as D } from "react/jsx-runtime";
2
+ import { c as a } from "../../index-DIxK0V-G.js";
3
+ import { forwardRef as b } from "react";
4
+ import { EDropdownSelectSize as y } from "./constants.js";
5
+ import { Icon as f } from "../../icons/Icon.js";
6
+ import { H as S, U as C, K as k, W as U } from "../../combobox-fIVOzEhl.js";
7
+ import '../../assets/DropdownSelect.css';const V = "_full_ow9jf_265", z = "_disabled_ow9jf_268", A = "_trigger_ow9jf_273", H = "_options_ow9jf_313", K = "_option_ow9jf_313", W = "_focused_ow9jf_356", B = "_s_ow9jf_381", E = "_m_ow9jf_390", F = "_l_ow9jf_399", e = {
8
+ "dropdown-select": "_dropdown-select_ow9jf_261",
9
+ full: V,
10
+ disabled: z,
11
+ trigger: A,
12
+ "trigger-text": "_trigger-text_ow9jf_302",
13
+ options: H,
14
+ option: K,
15
+ focused: W,
16
+ "option-content": "_option-content_ow9jf_360",
17
+ "option-check": "_option-check_ow9jf_372",
18
+ s: B,
19
+ m: E,
20
+ l: F
21
+ }, I = b(
22
+ (p, _) => {
23
+ const {
24
+ value: t,
25
+ onChange: n,
26
+ options: m,
27
+ placeholder: w = "Выберите значение",
28
+ disabled: i = !1,
29
+ className: g,
30
+ triggerClassName: u,
31
+ optionsClassName: j,
32
+ optionClassName: N,
33
+ full: c = !1,
34
+ size: l = y.M
35
+ } = p, h = (o) => {
36
+ n == null || n(o);
37
+ }, x = (o) => o ? o.displayValue ? o.displayValue : typeof o.name == "string" ? o.name : typeof o.value == "string" ? o.value : String(o.id) : "";
38
+ return /* @__PURE__ */ s(
39
+ S,
40
+ {
41
+ as: "div",
42
+ ref: _,
43
+ value: t,
44
+ onChange: h,
45
+ disabled: i,
46
+ className: a(
47
+ e["dropdown-select"],
48
+ e[l],
49
+ {
50
+ [e.full]: c,
51
+ [e.disabled]: i
52
+ },
53
+ g
54
+ ),
55
+ children: ({ open: o }) => /* @__PURE__ */ d(D, { children: [
56
+ /* @__PURE__ */ d(
57
+ C,
58
+ {
59
+ className: a(
60
+ e.trigger,
61
+ e[l],
62
+ {
63
+ [e.full]: c,
64
+ [e.disabled]: i
65
+ },
66
+ u
67
+ ),
68
+ "data-testid": "dropdown-select-trigger",
69
+ children: [
70
+ /* @__PURE__ */ s("span", { className: a(e["trigger-text"]), children: t ? x(t) : w }),
71
+ /* @__PURE__ */ s(
72
+ f,
73
+ {
74
+ iconName: o ? "DropdownArrowUp16px" : "DropdownArrowBottom16px"
75
+ }
76
+ )
77
+ ]
78
+ }
79
+ ),
80
+ /* @__PURE__ */ s(
81
+ k,
82
+ {
83
+ className: a(e.options, e[l], j),
84
+ "data-testid": "dropdown-select-options",
85
+ children: m.map((r) => /* @__PURE__ */ d(
86
+ U,
87
+ {
88
+ value: r,
89
+ className: ({ focus: v }) => a(
90
+ e.option,
91
+ e[l],
92
+ {
93
+ [e.focused]: v
94
+ },
95
+ N
96
+ ),
97
+ "data-testid": `dropdown-select-option-${r.id}`,
98
+ children: [
99
+ /* @__PURE__ */ s("div", { className: e["option-content"], children: r.name }),
100
+ t && t.id === r.id && /* @__PURE__ */ s("div", { className: e["option-check"], children: /* @__PURE__ */ s(f, { iconName: "Done16px" }) })
101
+ ]
102
+ },
103
+ r.id
104
+ ))
105
+ }
106
+ )
107
+ ] })
108
+ }
109
+ );
110
+ }
111
+ );
112
+ I.displayName = "DropdownSelect";
113
+ export {
114
+ I as DropdownSelect
115
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum EDropdownSelectSize {
2
+ S = "s",
3
+ M = "m",
4
+ L = "l"
5
+ }
@@ -0,0 +1,4 @@
1
+ var a = /* @__PURE__ */ ((r) => (r.S = "s", r.M = "m", r.L = "l", r))(a || {});
2
+ export {
3
+ a as EDropdownSelectSize
4
+ };
@@ -0,0 +1,3 @@
1
+ export { DropdownSelect } from './DropdownSelect';
2
+ export { EDropdownSelectSize } from './constants';
3
+ export type { TDropdownSelectOption, TDropdownSelectProps } from './types';
@@ -0,0 +1,6 @@
1
+ import { DropdownSelect as r } from "./DropdownSelect.js";
2
+ import { EDropdownSelectSize as t } from "./constants.js";
3
+ export {
4
+ r as DropdownSelect,
5
+ t as EDropdownSelectSize
6
+ };
@@ -0,0 +1,56 @@
1
+ import { ReactNode } from 'react';
2
+ import { EDropdownSelectSize } from './constants';
3
+
4
+ export type TDropdownSelectOption = {
5
+ name: string | ReactNode;
6
+ id: number | string;
7
+ value?: string | number;
8
+ displayValue?: string;
9
+ [index: string]: unknown;
10
+ };
11
+ export type TDropdownSelectProps = {
12
+ /**
13
+ * Текущее выбранное значение
14
+ */
15
+ value?: TDropdownSelectOption | null;
16
+ /**
17
+ * Размер компонента выбора.
18
+ */
19
+ size?: EDropdownSelectSize | `${EDropdownSelectSize}`;
20
+ /**
21
+ * Функция обратного вызова при изменении выбранного значения
22
+ */
23
+ onChange?: (value: TDropdownSelectOption | null) => void;
24
+ /**
25
+ * Массив опций для выбора
26
+ */
27
+ options: TDropdownSelectOption[];
28
+ /**
29
+ * Placeholder для триггера
30
+ */
31
+ placeholder?: string;
32
+ /**
33
+ * Отключить компонент
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * Дополнительный класс для компонента
38
+ */
39
+ className?: string;
40
+ /**
41
+ * Дополнительный класс для триггера
42
+ */
43
+ triggerClassName?: string;
44
+ /**
45
+ * Дополнительный класс для опций
46
+ */
47
+ optionsClassName?: string;
48
+ /**
49
+ * Дополнительный класс для отдельной опции
50
+ */
51
+ optionClassName?: string;
52
+ /**
53
+ * Полная ширина компонента
54
+ */
55
+ full?: boolean;
56
+ };
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { EInputBorderRadius } from './constants';
2
3
  import { TInputProps, TAddon, TIconAddon, TSize, TVariant, TStatus } from './types';
3
4
 
4
5
  export type TAdditionalProps = {
@@ -66,6 +67,10 @@ export type TAdditionalProps = {
66
67
  * Управляет поведением автозаполнения браузера
67
68
  */
68
69
  autocomplete?: 'on' | 'off';
70
+ /**
71
+ * Управление скруглениями углов
72
+ */
73
+ borderRadius?: EInputBorderRadius | `${EInputBorderRadius}`;
69
74
  };
70
75
  export type TProps = TInputProps & TAdditionalProps;
71
76
  export declare const Input: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<TInputProps & TAdditionalProps & import('react').RefAttributes<HTMLInputElement>>>;
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "../../index-DIxK0V-G.js";
3
3
  import "react";
4
4
  import "./constants.js";
5
- import { I as f } from "../../Input-BU_6U1CW.js";
5
+ import { I as f } from "../../Input-IzZ6B9kw.js";
6
6
  import "../../hooks/useMergeRefs/useMergeRefs.js";
7
7
  import "../../icons/Icon.js";
8
8
  import "../Button/Button.js";
@@ -12,3 +12,9 @@ export declare enum EInputSize {
12
12
  M = "m",
13
13
  L = "l"
14
14
  }
15
+ export declare enum EInputBorderRadius {
16
+ All = "all",
17
+ Left = "left",
18
+ Right = "right",
19
+ None = "none"
20
+ }
@@ -1,6 +1,7 @@
1
- var e = /* @__PURE__ */ ((r) => (r.DefaultGray = "default-gray", r.DefaultWhite = "default-white", r))(e || {}), a = /* @__PURE__ */ ((r) => (r.Alarm = "alarm", r.Success = "success", r.Error = "error", r))(a || {}), l = /* @__PURE__ */ ((r) => (r.S = "s", r.M = "m", r.L = "l", r))(l || {});
1
+ var e = /* @__PURE__ */ ((r) => (r.DefaultGray = "default-gray", r.DefaultWhite = "default-white", r))(e || {}), l = /* @__PURE__ */ ((r) => (r.Alarm = "alarm", r.Success = "success", r.Error = "error", r))(l || {}), a = /* @__PURE__ */ ((r) => (r.S = "s", r.M = "m", r.L = "l", r))(a || {}), f = /* @__PURE__ */ ((r) => (r.All = "all", r.Left = "left", r.Right = "right", r.None = "none", r))(f || {});
2
2
  export {
3
- l as EInputSize,
4
- a as EInputStatus,
3
+ f as EInputBorderRadius,
4
+ a as EInputSize,
5
+ l as EInputStatus,
5
6
  e as EInputVariant
6
7
  };
@@ -1,4 +1,4 @@
1
- import { I as n } from "../../Input-BU_6U1CW.js";
1
+ import { I as n } from "../../Input-IzZ6B9kw.js";
2
2
  import { EInputSize as u, EInputStatus as I, EInputVariant as a } from "./constants.js";
3
3
  export {
4
4
  u as EInputSize,
@@ -3,7 +3,7 @@ import { c as l } from "../../index-DIxK0V-G.js";
3
3
  import { memo as d, forwardRef as b, useState as f, useCallback as r } from "react";
4
4
  import { Icon as x } from "../../icons/Icon.js";
5
5
  import { Button as N } from "../Button/Button.js";
6
- import { I as h } from "../../Input-BU_6U1CW.js";
6
+ import { I as h } from "../../Input-IzZ6B9kw.js";
7
7
  import '../../assets/InputPassword.css';const M = "_input_7b9x2_2", y = "_wrapper_7b9x2_6", I = "_button_7b9x2_17", v = "_icon_7b9x2_33", C = "_show_7b9x2_38", e = {
8
8
  input: M,
9
9
  wrapper: y,
@@ -1,7 +1,7 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { memo as I, forwardRef as i, useState as c, useCallback as f, useImperativeHandle as P } from "react";
3
3
  import { getMaskedInputPhoneValue as m, getUnmaskedInputValue as o } from "./utils.js";
4
- import { I as b } from "../../Input-BU_6U1CW.js";
4
+ import { I as b } from "../../Input-IzZ6B9kw.js";
5
5
  const h = I(
6
6
  i(
7
7
  ({ value: s = "", onChange: e, ...p }, a) => {
@@ -8,7 +8,7 @@ import { Icon as ot } from "../../icons/Icon.js";
8
8
  import { Button as st } from "../Button/Button.js";
9
9
  import { CheckboxMimir as we } from "../CheckboxMimir/CheckboxMimir.js";
10
10
  import { Chip as rt } from "../Chip/Chip.js";
11
- import { I as ye } from "../../Input-BU_6U1CW.js";
11
+ import { I as ye } from "../../Input-IzZ6B9kw.js";
12
12
  import { EInputVariant as at } from "../Input/constants.js";
13
13
  import { Loader as Ne } from "../Loader/Loader.js";
14
14
  import { H as lt, U as Se, G as xe, W as Ce, K as ct } from "../../combobox-fIVOzEhl.js";
@@ -1,5 +1,5 @@
1
1
  import { EMultiSelectSearchSize as i, MOBILE_MENU_HEIGHT as c, DESKTOP_MENU_HEIGHT as a } from "./constants.js";
2
- import "../../Input-BU_6U1CW.js";
2
+ import "../../Input-IzZ6B9kw.js";
3
3
  import { EInputSize as u } from "../Input/constants.js";
4
4
  const m = (t) => {
5
5
  switch (t) {
@@ -3,7 +3,7 @@ import { c as u } from "../../index-DIxK0V-G.js";
3
3
  import { forwardRef as P, useImperativeHandle as R, Fragment as T } from "react";
4
4
  import { ITEMS_PER_SEPARATOR as v, DEFAULT_VALUE_LENGTH as y } from "./constants.js";
5
5
  import { useOTPInput as z } from "./hooks.js";
6
- import { I as A } from "../../Input-BU_6U1CW.js";
6
+ import { I as A } from "../../Input-IzZ6B9kw.js";
7
7
  import '../../assets/OtpInput.css';const C = "_otp_1ncuz_2", F = "_input_1ncuz_13", L = "_separator_1ncuz_27", n = {
8
8
  otp: C,
9
9
  "input-wrapper": "_input-wrapper_1ncuz_13",
@@ -0,0 +1,9 @@
1
+ import { ECounterVariant } from '../constants';
2
+
3
+ export type TCounterProps = {
4
+ value: number;
5
+ variant?: `${ECounterVariant}` | ECounterVariant;
6
+ className?: string;
7
+ };
8
+ export declare const Counter: ({ value, variant, className }: TCounterProps) => import("react/jsx-runtime").JSX.Element;
9
+ export { ECounterVariant };
@@ -0,0 +1,28 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { c } from "../../../index-DIxK0V-G.js";
3
+ import { ECounterVariant as m } from "../constants.js";
4
+ import '../../../assets/Counter.css';const u = "_counter_q40vf_2", r = {
5
+ counter: u,
6
+ "counter--default": "_counter--default_q40vf_15",
7
+ "counter--warning": "_counter--warning_q40vf_19",
8
+ "counter--error": "_counter--error_q40vf_23",
9
+ "counter--success": "_counter--success_q40vf_27"
10
+ }, a = ({
11
+ value: e,
12
+ variant: o = "default",
13
+ className: t
14
+ }) => /* @__PURE__ */ n(
15
+ "span",
16
+ {
17
+ className: c(
18
+ r.counter,
19
+ r[`counter--${o}`],
20
+ t
21
+ ),
22
+ children: e
23
+ }
24
+ );
25
+ export {
26
+ a as Counter,
27
+ m as ECounterVariant
28
+ };
@@ -1,3 +1,5 @@
1
+ import { ECounterVariant } from './constants';
2
+
1
3
  export type TBackProps = {
2
4
  currentPageNumber: number;
3
5
  onClick: (nextPage: number) => void;
@@ -11,12 +13,19 @@ export type TNextProps = {
11
13
  setCurrentPage: (nextPage: number) => void;
12
14
  disabled?: boolean;
13
15
  };
16
+ export type TPageData = {
17
+ date?: string;
18
+ count?: number;
19
+ counterVariant?: `${ECounterVariant}` | ECounterVariant;
20
+ };
14
21
  export type TItemProps = {
15
22
  currentPageNumber: number;
16
23
  newPageNumber: number;
17
24
  onClick: (pageNumber: number) => void;
18
25
  setCurrentPage: (pageNumber: number) => void;
19
26
  disabled?: boolean;
27
+ pageData?: TPageData;
28
+ isDateMode?: boolean;
20
29
  };
21
30
  export type TProps = {
22
31
  /**
@@ -59,5 +68,13 @@ export type TProps = {
59
68
  * Количество страниц, отображаемых в начале и конце
60
69
  */
61
70
  boundaryCount?: number;
71
+ /**
72
+ * Режим отображения дат вместо номеров страниц
73
+ */
74
+ isDateMode?: boolean;
75
+ /**
76
+ * Данные для каждой страницы (даты и счетчики)
77
+ */
78
+ pagesData?: TPageData[];
62
79
  };
63
80
  export declare const Pagination: import('react').ForwardRefExoticComponent<TProps & import('react').RefAttributes<HTMLElement>>;