mimir-ui-kit 1.41.3 → 1.41.5

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 (64) hide show
  1. package/dist/{Input-DAmc_HxO.js → Input-BU_6U1CW.js} +63 -63
  2. package/dist/assets/CardTrail.css +1 -1
  3. package/dist/assets/Drawer.css +1 -1
  4. package/dist/assets/Dropdown.css +1 -1
  5. package/dist/assets/Image.css +1 -1
  6. package/dist/assets/Input.css +1 -1
  7. package/dist/assets/MergedButton.css +1 -1
  8. package/dist/assets/OtpInput.css +1 -1
  9. package/dist/assets/Pagination.css +1 -1
  10. package/dist/assets/PromoSlider.css +1 -1
  11. package/dist/assets/RadioGroup.css +1 -1
  12. package/dist/assets/ScrollBar.css +1 -0
  13. package/dist/assets/Slider.css +1 -1
  14. package/dist/assets/Timer.css +1 -1
  15. package/dist/assets/stories.css +1 -1
  16. package/dist/assets/styles2.css +1 -1
  17. package/dist/components/CardTrail/CardTrail.d.ts +4 -0
  18. package/dist/components/CardTrail/CardTrail.js +75 -66
  19. package/dist/components/DatePicker/DatePicker.js +1 -1
  20. package/dist/components/Drawer/Drawer.js +74 -74
  21. package/dist/components/Dropdown/Dropdown.js +121 -121
  22. package/dist/components/Image/Image.js +28 -33
  23. package/dist/components/Input/Input.js +1 -1
  24. package/dist/components/Input/index.js +1 -1
  25. package/dist/components/InputPassword/InputPassword.js +1 -1
  26. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  27. package/dist/components/MergedButton/MergedButton.d.ts +4 -4
  28. package/dist/components/MergedButton/MergedButton.js +35 -27
  29. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
  30. package/dist/components/MultiSelectSearch/utils.js +1 -1
  31. package/dist/components/OtpInput/OtpInput.js +28 -28
  32. package/dist/components/Pagination/Pagination.js +28 -28
  33. package/dist/components/PromoSlider/PromoSlider.d.ts +1 -5
  34. package/dist/components/PromoSlider/PromoSlider.js +190 -200
  35. package/dist/components/RadioGroup/RadioGroup.js +79 -79
  36. package/dist/components/ScrollBar/ScrollBar.d.ts +17 -0
  37. package/dist/components/ScrollBar/ScrollBar.js +22 -0
  38. package/dist/components/ScrollBar/constants.d.ts +8 -0
  39. package/dist/components/ScrollBar/constants.js +5 -0
  40. package/dist/components/SelectSearch/SelectSearch.js +1 -1
  41. package/dist/components/SelectSearch/utils.js +1 -1
  42. package/dist/components/Slider/Slider.js +40 -40
  43. package/dist/components/Table/ColumnOrderSettings.js +1 -1
  44. package/dist/components/Table/Table.js +1 -1
  45. package/dist/components/Table/TableBody.js +1 -1
  46. package/dist/components/Table/TableCard.js +1 -1
  47. package/dist/components/Table/TableCardsView.js +1 -1
  48. package/dist/components/Table/TableFilters.js +1 -1
  49. package/dist/components/Table/TableHeader.js +1 -1
  50. package/dist/components/Table/TableRow.js +1 -1
  51. package/dist/components/Table/TableScrollButtons.js +1 -1
  52. package/dist/components/TextArea/TextArea.js +1 -1
  53. package/dist/components/Timer/Timer.js +6 -6
  54. package/dist/components/index.js +1 -1
  55. package/dist/index.js +1 -1
  56. package/dist/stories.module-DBGkpJ-O.js +29 -0
  57. package/dist/styles.module-9m98aUhp.js +36 -0
  58. package/package.json +6 -2
  59. package/src/assets/styles/mixins/animations.scss +3 -0
  60. package/src/assets/styles/mixins/index.scss +3 -0
  61. package/src/assets/styles/mixins/media.scss +21 -0
  62. package/src/assets/styles/mixins/scrollbar.scss +43 -0
  63. package/dist/stories.module-fud786VB.js +0 -29
  64. package/dist/styles.module--QBQYoA9.js +0 -36
@@ -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-DAmc_HxO.js";
5
+ import { I as f } from "../../Input-BU_6U1CW.js";
6
6
  import "../../hooks/useMergeRefs/useMergeRefs.js";
7
7
  import "../../icons/Icon.js";
8
8
  import "../Button/Button.js";
@@ -1,4 +1,4 @@
1
- import { I as n } from "../../Input-DAmc_HxO.js";
1
+ import { I as n } from "../../Input-BU_6U1CW.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 } from "../../index-DIxK0V-G.js";
3
3
  import { memo as w, forwardRef as u, useState as m } from "react";
4
4
  import { Icon as d } from "../../icons/Icon.js";
5
5
  import { Button as _ } from "../Button/Button.js";
6
- import { I as l } from "../../Input-DAmc_HxO.js";
6
+ import { I as l } from "../../Input-BU_6U1CW.js";
7
7
  import '../../assets/InputPassword.css';const b = "_input_7b9x2_2", x = "_wrapper_7b9x2_6", h = "_button_7b9x2_17", f = "_icon_7b9x2_33", N = "_show_7b9x2_38", t = {
8
8
  input: b,
9
9
  wrapper: x,
@@ -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-DAmc_HxO.js";
4
+ import { I as b } from "../../Input-BU_6U1CW.js";
5
5
  const h = I(
6
6
  i(
7
7
  ({ value: s = "", onChange: e, ...p }, a) => {
@@ -1,11 +1,12 @@
1
1
  import { EMergedButtonVariantRound } from './constants';
2
- import { TButtonProps } from '../Button';
2
+ import { TButtonProps, EButtonSize } from '../Button';
3
3
 
4
- export type TButtonPropsWithoutStyles = Omit<TButtonProps, 'clear' | 'variant' | 'form'> & {
4
+ export type TButtonPropsWithoutStyles = Omit<TButtonProps, 'clear' | 'variant' | 'form' | 'size'> & {
5
5
  variant?: `${EMergedButtonVariantRound}` | EMergedButtonVariantRound;
6
6
  'data-testid'?: string;
7
+ size?: Exclude<EButtonSize, 'xl' | 'l' | 'ms' | 'xs' | 'xxl' | 'm-s'> | `${Exclude<EButtonSize, 'xl' | 'l' | 'ms' | 'xs' | 'xxl' | 'm-s'>}`;
7
8
  };
8
- type TProps = {
9
+ export type TProps = {
9
10
  /**
10
11
  * Массив кнопок, который отрисуется в контейнере
11
12
  * */
@@ -19,4 +20,3 @@ type TProps = {
19
20
  * Компонент объединенных кнопок, с округлением у первой и последней кнопки, а так же с другими variant, нежели у обычного Button.
20
21
  */
21
22
  export declare const MergedButton: import('react').MemoExoticComponent<({ buttons, buttonsWrapperClassName }: TProps) => import("react/jsx-runtime").JSX.Element>;
22
- export {};
@@ -1,50 +1,58 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { c as s } from "../../index-DIxK0V-G.js";
3
- import { memo as u } from "react";
4
- import { EMergedButtonVariantRound as g } from "./constants.js";
5
- import { Button as p } from "../Button/Button.js";
6
- import '../../assets/MergedButton.css';const d = "_buttons_l320r_2", B = "_gray_l320r_28", I = "_white_l320r_36", f = "_transparent_l320r_44", o = {
7
- buttons: d,
8
- "merged-button": "_merged-button_l320r_6",
2
+ import { c as r } from "../../index-DIxK0V-G.js";
3
+ import { memo as g } from "react";
4
+ import { EMergedButtonVariantRound as p } from "./constants.js";
5
+ import { Button as d } from "../Button/Button.js";
6
+ import '../../assets/MergedButton.css';const l = "_buttons_8yyst_2", B = "_gray_8yyst_28", I = "_white_8yyst_36", f = "_transparent_8yyst_44", h = "_s_8yyst_58", N = "_m_8yyst_6", o = {
7
+ buttons: l,
8
+ "merged-button": "_merged-button_8yyst_6",
9
9
  gray: B,
10
10
  white: I,
11
11
  transparent: f,
12
- "is-icon": "_is-icon_l320r_53",
13
- "one-button": "_one-button_l320r_57"
14
- }, h = u(
15
- ({ buttons: r, buttonsWrapperClassName: c }) => /* @__PURE__ */ e("div", { className: s(o.buttons, c), children: r.map(
12
+ "is-icon": "_is-icon_8yyst_53",
13
+ s: h,
14
+ m: N,
15
+ "one-button": "_one-button_8yyst_66"
16
+ }, v = g(
17
+ ({ buttons: s, buttonsWrapperClassName: c }) => /* @__PURE__ */ e("div", { className: r(o.buttons, c), children: s.map(
16
18
  ({
17
- variant: i = g.White,
19
+ variant: i = p.White,
18
20
  disabled: n,
19
- className: a,
21
+ className: m,
22
+ size: _ = "m",
20
23
  ...t
21
- }, m) => {
22
- const _ = {
24
+ }, a) => {
25
+ const y = {
23
26
  ...t,
24
27
  isIconButton: t.isIconButton ?? !1,
25
28
  iconName: t.isIconButton ? t.iconName : void 0,
26
29
  leftIcon: t.isIconButton ? void 0 : t.leftIcon,
27
30
  rightIcon: t.isIconButton ? void 0 : t.rightIcon
28
- }, l = s(o["merged-button"], a, {
29
- [o[i]]: !n,
30
- [o.disabled]: n,
31
- [o["is-icon"]]: t.isIconButton,
32
- [o["one-button"]]: r.length === 1
33
- });
31
+ }, u = r(
32
+ o["merged-button"],
33
+ o[_ ?? "m"],
34
+ m,
35
+ {
36
+ [o[i]]: !n,
37
+ [o.disabled]: n,
38
+ [o["is-icon"]]: t.isIconButton,
39
+ [o["one-button"]]: s.length === 1
40
+ }
41
+ );
34
42
  return /* @__PURE__ */ e(
35
- p,
43
+ d,
36
44
  {
37
45
  clear: !0,
38
46
  disabled: n,
39
- className: l,
40
- ..._
47
+ className: u,
48
+ ...y
41
49
  },
42
- m
50
+ a
43
51
  );
44
52
  }
45
53
  ) })
46
54
  );
47
- h.displayName = "MergedButton";
55
+ v.displayName = "MergedButton";
48
56
  export {
49
- h as MergedButton
57
+ v as MergedButton
50
58
  };
@@ -7,7 +7,7 @@ import { Icon as ye } from "../../icons/Icon.js";
7
7
  import { Button as ke } from "../Button/Button.js";
8
8
  import { CheckboxMimir as Te } from "../CheckboxMimir/CheckboxMimir.js";
9
9
  import { Chip as Oe } from "../Chip/Chip.js";
10
- import { I as ne } from "../../Input-DAmc_HxO.js";
10
+ import { I as ne } from "../../Input-BU_6U1CW.js";
11
11
  import { EInputVariant as ze } from "../Input/constants.js";
12
12
  import { H as Ae, U as ie, G as se, K as Ve, W as qe } from "../../combobox-Dv6-ANkb.js";
13
13
  import '../../assets/MultiSelectSearch.css';const xe = "_disabled_io0c8_5", De = "_container_io0c8_9", Pe = "_full_io0c8_27", Re = "_button_io0c8_39", Be = "_options_io0c8_53", Fe = "_visible_io0c8_66", Je = "_top_io0c8_69", je = "_bottom_io0c8_74", Ge = "_m_io0c8_2", He = "_l_io0c8_116", Ue = "_focused_io0c8_134", We = "_option_io0c8_53", Ke = "_chip_io0c8_163", $e = "_clear_io0c8_188", e = {
@@ -1,5 +1,5 @@
1
1
  import { EMultiSelectSearchSize as o, MOBILE_MENU_HEIGHT as u, DESKTOP_MENU_HEIGHT as w } from "./constants.js";
2
- import "../../Input-DAmc_HxO.js";
2
+ import "../../Input-BU_6U1CW.js";
3
3
  import { EInputSize as r } from "../Input/constants.js";
4
4
  const m = (t) => {
5
5
  switch (t) {
@@ -1,62 +1,62 @@
1
- import { jsx as n, jsxs as g } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
2
  import { c as u } from "../../index-DIxK0V-G.js";
3
3
  import { forwardRef as P, useImperativeHandle as R, Fragment as T } from "react";
4
- import { ITEMS_PER_SEPARATOR as q, DEFAULT_VALUE_LENGTH as v } from "./constants.js";
5
- import { useOTPInput as y } from "./hooks.js";
6
- import { I as A } from "../../Input-DAmc_HxO.js";
7
- import '../../assets/OtpInput.css';const C = "_otp_1shq3_3", F = "_input_1shq3_14", L = "_separator_1shq3_28", r = {
4
+ import { ITEMS_PER_SEPARATOR as v, DEFAULT_VALUE_LENGTH as y } from "./constants.js";
5
+ import { useOTPInput as z } from "./hooks.js";
6
+ import { I as A } from "../../Input-BU_6U1CW.js";
7
+ import '../../assets/OtpInput.css';const C = "_otp_1ncuz_2", F = "_input_1ncuz_13", L = "_separator_1ncuz_27", n = {
8
8
  otp: C,
9
- "input-wrapper": "_input-wrapper_1shq3_14",
9
+ "input-wrapper": "_input-wrapper_1ncuz_13",
10
10
  input: F,
11
11
  separator: L
12
12
  }, O = P(
13
13
  ({
14
- value: m = "",
15
- valueLength: c = v,
14
+ value: c = "",
15
+ valueLength: m = y,
16
16
  needSeparator: l = !0,
17
17
  onChange: i,
18
- className: h,
19
- ..._
20
- }, d) => {
18
+ className: _,
19
+ ...d
20
+ }, f) => {
21
21
  const {
22
- data: { inputRefs: s, valueItems: o },
23
- handlers: { handleChange: f, handleFocus: I, handleKeyDown: w, handlePaste: N }
24
- } = y({
22
+ data: { inputRefs: o, valueItems: p },
23
+ handlers: { handleChange: h, handleFocus: I, handleKeyDown: w, handlePaste: N }
24
+ } = z({
25
25
  onChange: i,
26
- value: m,
27
- valueLength: c
26
+ value: c,
27
+ valueLength: m
28
28
  });
29
- return R(d, () => ({
29
+ return R(f, () => ({
30
30
  focus: () => {
31
31
  var a;
32
- (a = s.current[0]) == null || a.focus();
32
+ (a = o.current[0]) == null || a.focus();
33
33
  }
34
- })), /* @__PURE__ */ n("div", { className: u(r.otp, h), children: o.map((a, e) => {
35
- const p = e + 1, E = l && p % q === 0 && p !== o.length;
34
+ })), /* @__PURE__ */ r("div", { className: u(n.otp, _), children: p.map((a, e) => {
35
+ const s = e + 1, E = l && s % v === 0 && s !== p.length;
36
36
  return /* @__PURE__ */ g(T, { children: [
37
- /* @__PURE__ */ n(
37
+ /* @__PURE__ */ r(
38
38
  A,
39
39
  {
40
- ref: (t) => s.current[e] = t,
40
+ ref: (t) => o.current[e] = t,
41
41
  type: "text",
42
42
  inputMode: "numeric",
43
43
  autoComplete: "one-time-code",
44
44
  pattern: "\\d{1}",
45
45
  maxLength: 1,
46
46
  value: a,
47
- className: r.input,
48
- wrapperClassName: r["input-wrapper"],
49
- onChange: (t) => f(t, e),
47
+ className: n.input,
48
+ wrapperClassName: n["input-wrapper"],
49
+ onChange: (t) => h(t, e),
50
50
  onKeyDown: (t) => w(t, e),
51
51
  onFocus: (t) => I(t, e),
52
52
  onPaste: N,
53
- ..._
53
+ ...d
54
54
  }
55
55
  ),
56
- E && /* @__PURE__ */ n(
56
+ E && /* @__PURE__ */ r(
57
57
  "span",
58
58
  {
59
- className: u(r.separator),
59
+ className: u(n.separator),
60
60
  "data-testid": "separator"
61
61
  }
62
62
  )
@@ -1,14 +1,14 @@
1
1
  import { jsxs as P, jsx as i } from "react/jsx-runtime";
2
- import { c as C } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as N, useState as w, useEffect as v } from "react";
4
- import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as A } from "./constants.js";
5
- import { useWindowSize as x } from "../../hooks/useWindowSize/index.js";
2
+ import { c as g } from "../../index-DIxK0V-G.js";
3
+ import { forwardRef as N, useState as v, useEffect as A } from "react";
4
+ import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as x } from "./constants.js";
5
+ import { useWindowSize as E } from "../../hooks/useWindowSize/index.js";
6
6
  import { MergedButton as h } from "../MergedButton/MergedButton.js";
7
- import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellipsis_grwbf_42", b = {
8
- container: E,
9
- "pagination-button": "_pagination-button_grwbf_18",
10
- "is-active": "_is-active_grwbf_39",
11
- ellipsis: j
7
+ import '../../assets/Pagination.css';const j = "_container_12l37_2", w = "_ellipsis_12l37_41", b = {
8
+ container: j,
9
+ "pagination-button": "_pagination-button_12l37_17",
10
+ "is-active": "_is-active_12l37_38",
11
+ ellipsis: w
12
12
  }, B = ({ currentPageNumber: t, onClick: n, setCurrentPage: o }) => /* @__PURE__ */ i(
13
13
  h,
14
14
  {
@@ -56,11 +56,11 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
56
56
  {
57
57
  children: "...",
58
58
  variant: "transparent",
59
- className: C(b["pagination-button"], b.ellipsis)
59
+ className: g(b["pagination-button"], b.ellipsis)
60
60
  }
61
61
  ]
62
62
  }
63
- ), g = ({
63
+ ), C = ({
64
64
  currentPageNumber: t,
65
65
  newPageNumber: n,
66
66
  onClick: o,
@@ -75,7 +75,7 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
75
75
  "data-testid": `pagination-button-${e}`,
76
76
  type: "button",
77
77
  onClick: r,
78
- className: C(b["pagination-button"], {
78
+ className: g(b["pagination-button"], {
79
79
  [b["is-active"]]: s
80
80
  }),
81
81
  children: e
@@ -92,7 +92,7 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
92
92
  for (let e = t; e <= n; e++)
93
93
  r.push(
94
94
  /* @__PURE__ */ i(
95
- g,
95
+ C,
96
96
  {
97
97
  currentPageNumber: o,
98
98
  setCurrentPage: s,
@@ -108,21 +108,21 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
108
108
  const {
109
109
  rootClassName: o,
110
110
  total: a,
111
- perPage: s = A,
111
+ perPage: s = x,
112
112
  currentPageNumber: r = u,
113
113
  onChange: e
114
- } = t, [c, d] = w(r), l = Math.ceil(a / s), { width: k } = x(), m = k <= 650 ? 2 : 4;
115
- let f = 0, p = 0;
116
- return v(() => {
114
+ } = t, [c, d] = v(r), l = Math.ceil(a / s), { width: k } = E(), m = k <= 650 ? 2 : 4;
115
+ let p = 0, f = 0;
116
+ return A(() => {
117
117
  d(r);
118
- }, [r]), c <= m ? (f = u, p = Math.min(
118
+ }, [r]), c <= m ? (p = u, f = Math.min(
119
119
  u + m,
120
120
  l
121
- )) : c > l - m ? (f = l - m, p = l) : (f = c - m / 2, p = c + m / 2), a <= s ? null : /* @__PURE__ */ P(
121
+ )) : c > l - m ? (p = l - m, f = l) : (p = c - m / 2, f = c + m / 2), a <= s ? null : /* @__PURE__ */ P(
122
122
  "nav",
123
123
  {
124
124
  "aria-label": "Постраничная навигация",
125
- className: C(b.container, o),
125
+ className: g(b.container, o),
126
126
  ref: n,
127
127
  children: [
128
128
  /* @__PURE__ */ i(
@@ -133,8 +133,8 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
133
133
  setCurrentPage: d
134
134
  }
135
135
  ),
136
- f > u && /* @__PURE__ */ i(
137
- g,
136
+ p > u && /* @__PURE__ */ i(
137
+ C,
138
138
  {
139
139
  newPageNumber: u,
140
140
  currentPageNumber: c,
@@ -142,17 +142,17 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
142
142
  setCurrentPage: d
143
143
  }
144
144
  ),
145
- f > u + 1 && /* @__PURE__ */ i(_, {}),
145
+ p > u + 1 && /* @__PURE__ */ i(_, {}),
146
146
  R({
147
- start: f,
148
- end: p,
147
+ start: p,
148
+ end: f,
149
149
  currentPageNumber: c,
150
150
  setCurrentPage: d,
151
151
  onClick: e
152
152
  }),
153
- p < l - 1 && /* @__PURE__ */ i(_, {}),
154
- p < l && /* @__PURE__ */ i(
155
- g,
153
+ f < l - 1 && /* @__PURE__ */ i(_, {}),
154
+ f < l && /* @__PURE__ */ i(
155
+ C,
156
156
  {
157
157
  newPageNumber: l,
158
158
  currentPageNumber: c,
@@ -26,10 +26,6 @@ type TProps = {
26
26
  * Массив слайдов.
27
27
  */
28
28
  slides: TPromoSlide[];
29
- /**
30
- * Дополнительные классы для враппера слайдера.
31
- */
32
- promoSliderWrapperClassName?: string;
33
29
  /**
34
30
  * Дополнительные классы для слайдов.
35
31
  */
@@ -55,5 +51,5 @@ type TProps = {
55
51
  */
56
52
  spaceBetween?: number;
57
53
  };
58
- export declare const PromoSlider: ({ slides, delay, spaceBetween, imageClassName, slideClassName, swiperClassName, contentClassName, promoSliderWrapperClassName }: TProps) => import("react/jsx-runtime").JSX.Element;
54
+ export declare const PromoSlider: ({ slides, delay, spaceBetween, imageClassName, slideClassName, swiperClassName, contentClassName }: TProps) => import("react/jsx-runtime").JSX.Element;
59
55
  export {};