stone-kit 0.0.233 → 0.0.235

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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as _, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as k, useState as D, useRef as T, useEffect as B } from "react";
3
3
  import { c as L } from "./index-rKuIKazb.js";
4
- import { s as t, u as M } from "./useSortSelect-BXr8BYtw.js";
4
+ import { s as t, u as M } from "./useSortSelect-CZQza8xr.js";
5
5
  import { NewIcon as O } from "./components/NewIcon/ui/NewIcon.js";
6
6
  import "./components/Button/ui/Button.js";
7
7
  import "./components/mobileButton/ui/MobileButton.js";
@@ -13,7 +13,7 @@ import "../../Flex/ui/Flex.js";
13
13
  import "../../Input/ui/Input.js";
14
14
  import "react";
15
15
  import "../../../Modal-G1ISsPJt.js";
16
- import "../../../SortSelect-DudrT8RK.js";
16
+ import "../../../SortSelect-BL7AisA8.js";
17
17
  import "../../GroupedInput/ui/GroupedInputs.js";
18
18
  import "../../../index-rKuIKazb.js";
19
19
  import "../../MetroTag/ui/MetroTag.js";
@@ -49,7 +49,7 @@ const E = "_root_o78a_1", O = "_lotImageWrapper_o78a_10", g = "_lotInfoWrapper_o
49
49
  housing: n,
50
50
  bedroomsCount: u,
51
51
  number: A,
52
- isDecoration: I = !1,
52
+ isDecoration: I,
53
53
  sellingPrice: a,
54
54
  sellingPricePerMeter: l,
55
55
  discountedPrice: m,
@@ -77,7 +77,7 @@ const E = "_root_o78a_1", O = "_lotImageWrapper_o78a_10", g = "_lotInfoWrapper_o
77
77
  ),
78
78
  s && /* @__PURE__ */ r("div", { className: t.monthlyPayment, children: w(s) })
79
79
  ] }),
80
- I && /* @__PURE__ */ e("div", { className: t.decor, children: [
80
+ !I && /* @__PURE__ */ e("div", { className: t.decor, children: [
81
81
  /* @__PURE__ */ r(d, { name: "withoutDecor" }),
82
82
  /* @__PURE__ */ r("span", { children: "Без отделки" })
83
83
  ] }),
@@ -1,4 +1,4 @@
1
- import { jsxs as r, Fragment as b, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as r, Fragment as b, jsx as c } from "react/jsx-runtime";
2
2
  import { memo as y, useState as N, useRef as W, useCallback as O, useEffect as C } from "react";
3
3
  import { c as F } from "../../../index-rKuIKazb.js";
4
4
  import { NewIcon as h } from "../../NewIcon/ui/NewIcon.js";
@@ -22,29 +22,33 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
22
22
  additionalClassBtn: E,
23
23
  onChange: p,
24
24
  onBlur: d,
25
- selectedValues: c = [],
26
- isBtn: S = !1,
25
+ selectedValues: i = [],
26
+ isBtn: g = !1,
27
27
  btnName: w,
28
28
  isListRight: z = !1
29
29
  }) => {
30
- const [s, g] = N(c), [o, m] = N(!1), f = W(null), I = O(
30
+ const [s, S] = N(i), [o, m] = N(!1), f = W(null), I = O(
31
31
  (t) => () => {
32
- const i = s.some((_) => _.value === t.value) ? s.filter((_) => _.value !== t.value) : [...s, t];
33
- g(i), p && p(i);
32
+ const n = s.some((_) => _.value === t.value) ? s.filter((_) => _.value !== t.value) : [...s, t];
33
+ S(n), p && p(n);
34
34
  },
35
35
  [s, p]
36
36
  ), u = O((t) => {
37
- f.current && !f.current.contains(t.target) && m(!1);
37
+ if (f.current && !f.current.contains(t.target)) {
38
+ if (t.target.closest("svg"))
39
+ return;
40
+ m(!1);
41
+ }
38
42
  }, []), j = O(() => {
39
43
  d && d(s);
40
44
  }, [s, d]);
41
45
  C(() => (document.addEventListener("click", u), () => {
42
46
  document.removeEventListener("click", u);
43
47
  }), [u]);
44
- const k = W(c);
48
+ const k = W(i);
45
49
  return C(() => {
46
- c.length !== k.current.length && (g(c), k.current = c);
47
- }, [c]), /* @__PURE__ */ r(
50
+ i.length !== k.current.length && (S(i), k.current = i);
51
+ }, [i]), /* @__PURE__ */ r(
48
52
  "div",
49
53
  {
50
54
  ref: f,
@@ -53,8 +57,8 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
53
57
  onBlur: j,
54
58
  children: [
55
59
  /* @__PURE__ */ r("div", { className: l(e.inputWrapper), children: [
56
- !S && /* @__PURE__ */ r(b, { children: [
57
- /* @__PURE__ */ n(
60
+ !g && /* @__PURE__ */ r(b, { children: [
61
+ /* @__PURE__ */ c(
58
62
  "div",
59
63
  {
60
64
  className: l(e.selectedOptions, { [e.selectOptionsDisabled]: v }),
@@ -62,7 +66,7 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
62
66
  children: s.length === 0 ? R : "Выбрано " + s.length
63
67
  }
64
68
  ),
65
- /* @__PURE__ */ n(
69
+ /* @__PURE__ */ c(
66
70
  h,
67
71
  {
68
72
  name: "arrowShort",
@@ -72,8 +76,8 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
72
76
  }
73
77
  )
74
78
  ] }),
75
- S && /* @__PURE__ */ r(b, { children: [
76
- /* @__PURE__ */ n(
79
+ g && /* @__PURE__ */ r(b, { children: [
80
+ /* @__PURE__ */ c(
77
81
  "button",
78
82
  {
79
83
  className: l(
@@ -85,7 +89,7 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
85
89
  children: w
86
90
  }
87
91
  ),
88
- /* @__PURE__ */ n(
92
+ /* @__PURE__ */ c(
89
93
  h,
90
94
  {
91
95
  name: "filter",
@@ -96,20 +100,20 @@ const U = "_multiSelectWrapper_1o2mf_1", q = "_selectedOptions_1o2mf_7", A = "_s
96
100
  )
97
101
  ] })
98
102
  ] }),
99
- o && /* @__PURE__ */ n("div", { className: l(e.optionsList, { [e.listRight]: z }, x), children: a == null ? void 0 : a.map((t) => /* @__PURE__ */ r(
103
+ o && /* @__PURE__ */ c("div", { className: l(e.optionsList, { [e.listRight]: z }, x), children: a == null ? void 0 : a.map((t) => /* @__PURE__ */ r(
100
104
  "div",
101
105
  {
102
106
  className: l(e.option, {
103
- [e.selected]: s.some((i) => i.value === t.value)
107
+ [e.selected]: s.some((n) => n.value === t.value)
104
108
  }),
105
109
  onClick: I(t),
106
110
  children: [
107
- /* @__PURE__ */ n("div", { children: t.label }),
108
- /* @__PURE__ */ n(
111
+ /* @__PURE__ */ c("div", { children: t.label }),
112
+ /* @__PURE__ */ c(
109
113
  h,
110
114
  {
111
115
  size: "20",
112
- name: s.some((i) => i.value === t.value) ? "selectChecked" : "selectUnchecked"
116
+ name: s.some((n) => n.value === t.value) ? "selectChecked" : "selectUnchecked"
113
117
  }
114
118
  )
115
119
  ]
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { u as m } from "../../../useSortSelect-BXr8BYtw.js";
2
+ import { u as m } from "../../../useSortSelect-CZQza8xr.js";
3
3
  import "../../../index-rKuIKazb.js";
4
4
  export {
5
5
  m as useSortSelect
@@ -1,4 +1,4 @@
1
- import { a as r } from "../../SortSelect-DudrT8RK.js";
1
+ import { a as r } from "../../SortSelect-BL7AisA8.js";
2
2
  export {
3
3
  r as SortSelect
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../../index-rKuIKazb.js";
4
- import "../../../useSortSelect-BXr8BYtw.js";
4
+ import "../../../useSortSelect-CZQza8xr.js";
5
5
  import "../../NewIcon/ui/NewIcon.js";
6
6
  import "../../Button/ui/Button.js";
7
7
  import "../../mobileButton/ui/MobileButton.js";
@@ -13,7 +13,7 @@ import "../../Text/ui/Text.js";
13
13
  import "../../Flex/ui/Flex.js";
14
14
  import "../../Input/ui/Input.js";
15
15
  import "../../../Modal-G1ISsPJt.js";
16
- import { a as y } from "../../../SortSelect-DudrT8RK.js";
16
+ import { a as y } from "../../../SortSelect-BL7AisA8.js";
17
17
  import "../../GroupedInput/ui/GroupedInputs.js";
18
18
  import "../../MetroTag/ui/MetroTag.js";
19
19
  import "../../Select/ui/Select.js";
@@ -1,4 +1,4 @@
1
- import { S as e } from "../../SortSelect-DudrT8RK.js";
1
+ import { S as e } from "../../SortSelect-BL7AisA8.js";
2
2
  export {
3
3
  e as TabSwitcher
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { S as q } from "../../../SortSelect-DudrT8RK.js";
3
+ import { S as q } from "../../../SortSelect-BL7AisA8.js";
4
4
  import "../../Text/ui/Text.js";
5
5
  import "../../../index-rKuIKazb.js";
6
6
  import "../../Button/ui/Button.js";
package/dist/main.js CHANGED
@@ -10,7 +10,7 @@ import { Flex as C } from "./components/Flex/ui/Flex.js";
10
10
  import { Input as b } from "./components/Input/ui/Input.js";
11
11
  import { M as I } from "./Modal-G1ISsPJt.js";
12
12
  import { FieldInput as w } from "./components/FieldInput/ui/FieldInput.js";
13
- import { a as F, S as L } from "./SortSelect-DudrT8RK.js";
13
+ import { a as F, S as L } from "./SortSelect-BL7AisA8.js";
14
14
  import { GroupedInputs as N } from "./components/GroupedInput/ui/GroupedInputs.js";
15
15
  import { Logo as v } from "./components/Logo/ui/Logo.js";
16
16
  import { MetroTag as G } from "./components/MetroTag/ui/MetroTag.js";
@@ -1,4 +1,4 @@
1
- import { jsxs as k, jsx as c } from "react/jsx-runtime";
1
+ import { jsxs as k, jsx as s } from "react/jsx-runtime";
2
2
  import { c as y } from "./index-rKuIKazb.js";
3
3
  const j = "_sortSelectWrapper_1ynju_1", v = "_selectedOptions_1ynju_10", b = "_selectionOptionMini_1ynju_33", x = "_selectedOptionsOpened_1ynju_37", B = "_selectOptionsDisabled_1ynju_41", C = "_optionsList_1ynju_48", S = "_mobileOptionList_1ynju_63", L = "_mobileSortHeader_1ynju_70", W = "_modalAddBody_1ynju_84", f = "_inputWrapper_1ynju_90", g = "_option_1ynju_48", T = "_icon_1ynju_118", D = "_checkBox_1ynju_125", N = "_checkBoxChecked_1ynju_132", A = "_innerCheck_1ynju_139", H = "_sortSelectWrapperTop_1ynju_153", M = "_optionListOnTop_1ynju_156", e = {
4
4
  sortSelectWrapper: j,
@@ -18,53 +18,53 @@ const j = "_sortSelectWrapper_1ynju_1", v = "_selectedOptions_1ynju_10", b = "_s
18
18
  innerCheck: A,
19
19
  sortSelectWrapperTop: H,
20
20
  optionListOnTop: M
21
- }, u = y.bind(e), q = ({
21
+ }, _ = y.bind(e), q = ({
22
22
  selectedOption: n,
23
- setSelectedOption: s,
23
+ setSelectedOption: r,
24
24
  setIsOpen: l,
25
- containerRef: r,
26
- onBlur: i,
27
- onChange: a,
25
+ containerRef: i,
26
+ onBlur: a,
27
+ onChange: u,
28
28
  isDesktop: p,
29
29
  placeholder: d
30
30
  }) => {
31
31
  const h = (o) => (t) => {
32
32
  t.stopPropagation();
33
- const _ = (n == null ? void 0 : n.value) === o.value ? null : o;
34
- if (s && s(_), a) {
33
+ const c = (n == null ? void 0 : n.value) === o.value ? null : o;
34
+ if (c && (r && r(c), u)) {
35
35
  const m = {
36
36
  ...t,
37
- target: { value: _ }
37
+ target: { value: c }
38
38
  };
39
- a(m);
39
+ u(m);
40
40
  }
41
41
  };
42
42
  return { handleDocumentClick: (o) => {
43
- r.current && !r.current.contains(o.target) && l(!1);
43
+ i.current && !i.current.contains(o.target) && l(!1);
44
44
  }, handleBlur: (o) => {
45
- if (i) {
45
+ if (a) {
46
46
  const t = {
47
47
  ...o,
48
48
  target: { value: n }
49
49
  };
50
- i(t);
50
+ a(t);
51
51
  }
52
52
  }, getInputValue: () => p ? n ? n.label : d : "", getOption: (o) => /* @__PURE__ */ k(
53
53
  "div",
54
54
  {
55
- className: u(e.option, {
55
+ className: _(e.option, {
56
56
  [e.selected]: (n == null ? void 0 : n.value) === o.value
57
57
  }),
58
58
  onClick: h(o),
59
59
  children: [
60
- /* @__PURE__ */ c("div", { children: o.label }),
61
- /* @__PURE__ */ c(
60
+ /* @__PURE__ */ s("div", { children: o.label }),
61
+ /* @__PURE__ */ s(
62
62
  "div",
63
63
  {
64
- className: u(e.checkBox, {
64
+ className: _(e.checkBox, {
65
65
  [e.checkBoxChecked]: (n == null ? void 0 : n.value) === o.value
66
66
  }),
67
- children: (n == null ? void 0 : n.value) === o.value && /* @__PURE__ */ c("div", { className: e.innerCheck })
67
+ children: (n == null ? void 0 : n.value) === o.value && /* @__PURE__ */ s("div", { className: e.innerCheck })
68
68
  }
69
69
  )
70
70
  ]
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "stone-kit",
3
3
  "description": "uikit for redesign",
4
4
  "private": false,
5
- "version": "0.0.233",
5
+ "version": "0.0.235",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",