stone-kit 0.0.139 → 0.0.140

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,4 +1,4 @@
1
- import { jsxs as r, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as I, useRef as L, useEffect as W } from "react";
3
3
  import { c as B } from "../../../index-DIxK0V-G.js";
4
4
  import { s as e, u as E } from "../../../useSortSelect-Dy4WKDDY.js";
@@ -19,44 +19,44 @@ import "../../MetroTag/ui/MetroTag.js";
19
19
  import "../../Select/ui/Select.js";
20
20
  import { useClientWidth as w } from "../../../shared/useClientWidth.js";
21
21
  const s = B.bind(e), D = ({
22
- options: n,
22
+ options: r,
23
23
  selectedOption: S,
24
24
  placeholder: O = "",
25
25
  error: h,
26
26
  disabled: v,
27
27
  additionalClass: N = "",
28
- onChange: c,
28
+ onChange: a,
29
29
  onBlur: b,
30
30
  mini: x,
31
- openOnTop: a = !1
31
+ openOnTop: m = !1
32
32
  }) => {
33
- const [o, i] = I(!1), m = L(null), { isMobile: p, isDesktop: y } = w(), { handleBlur: k, getInputValue: C, getOption: d, handleDocumentClick: u } = E({
33
+ const [i, o] = I(!1), n = L(null), { isMobile: d, isDesktop: y } = w(), { handleBlur: k, getInputValue: C, getOption: p, handleDocumentClick: u } = E({
34
34
  selectedOption: S,
35
- setSelectedOption: c,
36
- setIsOpen: i,
37
- containerRef: m,
38
- isOpen: o,
35
+ setSelectedOption: a,
36
+ setIsOpen: o,
37
+ containerRef: n,
38
+ isOpen: i,
39
39
  isDesktop: y,
40
40
  placeholder: O,
41
- onChange: c,
41
+ onChange: a,
42
42
  onBlur: b
43
43
  });
44
44
  return W(() => (document.addEventListener("click", u), () => {
45
45
  document.removeEventListener("click", u);
46
- }), []), /* @__PURE__ */ r(
46
+ }), []), /* @__PURE__ */ l(
47
47
  "div",
48
48
  {
49
- ref: m,
49
+ ref: n,
50
50
  className: s(
51
51
  e.sortSelectWrapper,
52
52
  { [e.sortSelectWrapperError]: h },
53
- { [e.sortSelectWrapperTop]: a },
53
+ { [e.sortSelectWrapperTop]: m },
54
54
  N
55
55
  ),
56
56
  tabIndex: 0,
57
57
  onBlur: k,
58
58
  children: [
59
- /* @__PURE__ */ r("div", { className: s(e.inputWrapper), children: [
59
+ /* @__PURE__ */ l("div", { className: s(e.inputWrapper), children: [
60
60
  /* @__PURE__ */ t(
61
61
  "input",
62
62
  {
@@ -68,7 +68,7 @@ const s = B.bind(e), D = ({
68
68
  { [e.selectOptionsDisabled]: v },
69
69
  { [e.selectionOptionMini]: x }
70
70
  ),
71
- onClick: () => i(!o)
71
+ onClick: () => o(!i)
72
72
  }
73
73
  ),
74
74
  /* @__PURE__ */ t(
@@ -80,17 +80,17 @@ const s = B.bind(e), D = ({
80
80
  }
81
81
  )
82
82
  ] }),
83
- o && p && /* @__PURE__ */ r(
83
+ i && d && /* @__PURE__ */ l(
84
84
  j,
85
85
  {
86
- isOpen: o,
87
- emitIsOpen: i,
86
+ isOpen: i,
87
+ emitIsOpen: o,
88
88
  additionalClassModalBody: e.modalAddBody,
89
89
  createPortalObj: { domNode: document.querySelector("body") },
90
90
  children: [
91
- /* @__PURE__ */ r("div", { className: e.mobileSortHeader, children: [
91
+ /* @__PURE__ */ l("div", { className: e.mobileSortHeader, children: [
92
92
  /* @__PURE__ */ t(M, { children: "Сортировка" }),
93
- /* @__PURE__ */ t("div", { onClick: () => i(!1), children: /* @__PURE__ */ t(
93
+ /* @__PURE__ */ t("div", { onClick: () => o(!1), children: /* @__PURE__ */ t(
94
94
  f,
95
95
  {
96
96
  name: "close",
@@ -98,11 +98,11 @@ const s = B.bind(e), D = ({
98
98
  }
99
99
  ) })
100
100
  ] }),
101
- /* @__PURE__ */ t("div", { className: e.mobileOptionList, children: n.map((l) => d(l)) })
101
+ /* @__PURE__ */ t("div", { className: e.mobileOptionList, children: r == null ? void 0 : r.map((c) => p(c)) })
102
102
  ]
103
103
  }
104
104
  ),
105
- o && !p && /* @__PURE__ */ t("div", { className: s(e.optionsList, { [e.optionListOnTop]: a }), children: n.map((l) => d(l)) })
105
+ i && !d && /* @__PURE__ */ t("div", { className: s(e.optionsList, { [e.optionListOnTop]: m }), children: r == null ? void 0 : r.map((c) => p(c)) })
106
106
  ]
107
107
  }
108
108
  );
@@ -3,7 +3,7 @@ export interface Option {
3
3
  label: string;
4
4
  }
5
5
  export interface SortSelectProps {
6
- options: Option[];
6
+ options?: Option[];
7
7
  selectedOption: Option | null;
8
8
  placeholder?: string;
9
9
  error?: boolean;
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.139",
5
+ "version": "0.0.140",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",