stone-kit 0.0.130 → 0.0.131

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,5 +1,5 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { useState as d, useRef as B, useEffect as E } from "react";
2
+ import { useState as p, useRef as B, useEffect as E } from "react";
3
3
  import { c as L } from "../../../index-DIxK0V-G.js";
4
4
  import { s as e, u as M } from "../../../useSortSelect-C-PfwcIF.js";
5
5
  import { NewIcon as u } from "../../NewIcon/ui/NewIcon.js";
@@ -12,56 +12,56 @@ import "../../Switcher/ui/Switcher.js";
12
12
  import { Text as W } from "../../Text/ui/Text.js";
13
13
  import "../../Flex/ui/Flex.js";
14
14
  import "../../Input/ui/Input.js";
15
- import { Modal as w } from "../../Modal/ui/Modal.js";
15
+ import { Modal as j } from "../../Modal/ui/Modal.js";
16
16
  import "../../TabSwitcher/ui/TabSwitcher.js";
17
17
  import "../../GroupedInput/ui/GroupedInputs.js";
18
18
  import "../../MetroTag/ui/MetroTag.js";
19
19
  import "../../Select/ui/Select.js";
20
- import { useClientWidth as D } from "../../../shared/useClientWidth.js";
21
- const l = L.bind(e), g = ({
20
+ import { useClientWidth as w } from "../../../shared/useClientWidth.js";
21
+ const n = L.bind(e), D = ({
22
22
  options: s,
23
23
  placeholder: f = "",
24
- error: h,
25
- disabled: O,
26
- additionalClass: S = "",
24
+ error: O,
25
+ disabled: S,
26
+ additionalClass: h = "",
27
27
  onChange: v,
28
28
  onBlur: N,
29
- mini: x
29
+ mini: b
30
30
  }) => {
31
- const [b, k] = d(s[0]), [i, o] = d(!1), c = B(null), { isMobile: m, isDesktop: C } = D(), { handleBlur: y, getInputValue: I, getOption: a, handleDocumentClick: p } = M({
32
- selectedOption: b,
33
- setSelectedOption: k,
34
- setIsOpen: o,
31
+ const [x, y] = p(s[0]), [o, i] = p(!1), c = B(null), { isMobile: m, isDesktop: k } = w(), { handleBlur: C, getInputValue: I, getOption: a, handleDocumentClick: d } = M({
32
+ selectedOption: x,
33
+ setSelectedOption: y,
34
+ setIsOpen: i,
35
35
  containerRef: c,
36
- isOpen: i,
37
- isDesktop: C,
36
+ isOpen: o,
37
+ isDesktop: k,
38
38
  placeholder: f,
39
39
  onChange: v,
40
40
  onBlur: N
41
41
  });
42
- return E(() => (document.addEventListener("click", p), () => {
43
- document.removeEventListener("click", p);
42
+ return E(() => (document.addEventListener("click", d), () => {
43
+ document.removeEventListener("click", d);
44
44
  }), []), /* @__PURE__ */ r(
45
45
  "div",
46
46
  {
47
47
  ref: c,
48
- className: l(e.sortSelectWrapper, { [e.sortSelectWrapperError]: h }, S),
48
+ className: n(e.sortSelectWrapper, { [e.sortSelectWrapperError]: O }, h),
49
49
  tabIndex: 0,
50
- onBlur: y,
50
+ onBlur: C,
51
51
  children: [
52
- /* @__PURE__ */ r("div", { className: l(e.inputWrapper), children: [
52
+ /* @__PURE__ */ r("div", { className: n(e.inputWrapper), children: [
53
53
  /* @__PURE__ */ t(
54
54
  "input",
55
55
  {
56
56
  type: "text",
57
57
  readOnly: !0,
58
58
  value: I(),
59
- className: l(
59
+ className: n(
60
60
  e.selectedOptions,
61
- { [e.selectOptionsDisabled]: O },
62
- { [e.selectionOptionMini]: x }
61
+ { [e.selectOptionsDisabled]: S },
62
+ { [e.selectionOptionMini]: b }
63
63
  ),
64
- onClick: () => o(!i)
64
+ onClick: () => i(!o)
65
65
  }
66
66
  ),
67
67
  /* @__PURE__ */ t(
@@ -73,16 +73,17 @@ const l = L.bind(e), g = ({
73
73
  }
74
74
  )
75
75
  ] }),
76
- i && m && /* @__PURE__ */ r(
77
- w,
76
+ o && m && /* @__PURE__ */ r(
77
+ j,
78
78
  {
79
- isOpen: i,
80
- emitIsOpen: o,
79
+ isOpen: o,
80
+ emitIsOpen: i,
81
81
  additionalClassModalBody: e.modalAddBody,
82
+ createPortalObj: { domNode: document.querySelector("body") },
82
83
  children: [
83
84
  /* @__PURE__ */ r("div", { className: e.mobileSortHeader, children: [
84
85
  /* @__PURE__ */ t(W, { children: "Сортировка" }),
85
- /* @__PURE__ */ t("div", { onClick: () => o(!1), children: /* @__PURE__ */ t(
86
+ /* @__PURE__ */ t("div", { onClick: () => i(!1), children: /* @__PURE__ */ t(
86
87
  u,
87
88
  {
88
89
  name: "close",
@@ -90,16 +91,16 @@ const l = L.bind(e), g = ({
90
91
  }
91
92
  ) })
92
93
  ] }),
93
- /* @__PURE__ */ t("div", { className: e.mobileOptionList, children: s.map((n) => a(n)) })
94
+ /* @__PURE__ */ t("div", { className: e.mobileOptionList, children: s.map((l) => a(l)) })
94
95
  ]
95
96
  }
96
97
  ),
97
- i && !m && /* @__PURE__ */ t("div", { className: e.optionsList, children: s.map((n) => a(n)) })
98
+ o && !m && /* @__PURE__ */ t("div", { className: e.optionsList, children: s.map((l) => a(l)) })
98
99
  ]
99
100
  }
100
101
  );
101
102
  };
102
- g.displayName = "SortSelect";
103
+ D.displayName = "SortSelect";
103
104
  export {
104
- g as SortSelect
105
+ D as SortSelect
105
106
  };
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.130",
5
+ "version": "0.0.131",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",