stone-kit 0.0.91 → 0.0.92

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 "react/jsx-runtime";
2
- import { u as m } from "../../../useSortSelect-C2p64lX1.js";
2
+ import { u as m } from "../../../useSortSelect-BWM68TJ3.js";
3
3
  import "../../../index-DIxK0V-G.js";
4
4
  export {
5
5
  m as useSortSelect
@@ -1,7 +1,7 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as d, useRef as y, useEffect as I } from "react";
3
3
  import { c as B } from "../../../index-DIxK0V-G.js";
4
- import { s as e, u as E } from "../../../useSortSelect-C2p64lX1.js";
4
+ import { s as e, u as E } from "../../../useSortSelect-BWM68TJ3.js";
5
5
  import { NewIcon as u } from "../../NewIcon/ui/NewIcon.js";
6
6
  import "../../Button/ui/Button.js";
7
7
  import "../../mobileButton/ui/MobileButton.js";
@@ -0,0 +1,76 @@
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
+ import { c as y } from "./index-DIxK0V-G.js";
3
+ const v = "_sortSelectWrapper_636hy_1", b = "_selectedOptions_636hy_8", x = "_selectedOptionsOpened_636hy_32", B = "_selectOptionsDisabled_636hy_36", C = "_optionsList_636hy_43", S = "_mobileOptionList_636hy_58", f = "_mobileSortHeader_636hy_65", g = "_modalAddBody_636hy_79", L = "_inputWrapper_636hy_85", W = "_option_636hy_43", D = "_icon_636hy_110", N = "_checkBox_636hy_117", A = "_checkBoxChecked_636hy_124", H = "_innerCheck_636hy_131", o = {
4
+ sortSelectWrapper: v,
5
+ selectedOptions: b,
6
+ selectedOptionsOpened: x,
7
+ selectOptionsDisabled: B,
8
+ optionsList: C,
9
+ mobileOptionList: S,
10
+ mobileSortHeader: f,
11
+ modalAddBody: g,
12
+ inputWrapper: L,
13
+ option: W,
14
+ icon: D,
15
+ checkBox: N,
16
+ checkBoxChecked: A,
17
+ innerCheck: H
18
+ }, i = y.bind(o), q = ({
19
+ selectedOption: e,
20
+ setSelectedOption: h,
21
+ setIsOpen: t,
22
+ containerRef: r,
23
+ onBlur: a,
24
+ onChange: l,
25
+ isMobile: u,
26
+ placeholder: d
27
+ }) => {
28
+ const m = (c) => (n) => {
29
+ n.stopPropagation();
30
+ const _ = (e == null ? void 0 : e.value) === c.value ? null : c;
31
+ if (h(_), l) {
32
+ const k = {
33
+ ...n,
34
+ target: { value: _ }
35
+ };
36
+ l(k);
37
+ }
38
+ t(!1);
39
+ };
40
+ return { handleDocumentClick: (c) => {
41
+ r.current && !r.current.contains(c.target) && t(!1);
42
+ }, handleBlur: (c) => {
43
+ if (a) {
44
+ const n = {
45
+ ...c,
46
+ target: { value: e }
47
+ };
48
+ a(n);
49
+ }
50
+ }, getInputValue: () => u ? "" : e ? e.label : d, getOption: (c) => /* @__PURE__ */ p(
51
+ "div",
52
+ {
53
+ className: i(o.option, {
54
+ [o.selected]: (e == null ? void 0 : e.value) === c.value
55
+ }),
56
+ onClick: m(c),
57
+ children: [
58
+ /* @__PURE__ */ s("div", { children: c.label }),
59
+ /* @__PURE__ */ s(
60
+ "div",
61
+ {
62
+ className: i(o.checkBox, {
63
+ [o.checkBoxChecked]: (e == null ? void 0 : e.value) === c.value
64
+ }),
65
+ children: (e == null ? void 0 : e.value) === c.value && /* @__PURE__ */ s("div", { className: o.innerCheck })
66
+ }
67
+ )
68
+ ]
69
+ },
70
+ c.value
71
+ ) };
72
+ };
73
+ export {
74
+ o as s,
75
+ q as u
76
+ };
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.91",
5
+ "version": "0.0.92",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",
@@ -1,76 +0,0 @@
1
- import { jsxs as v, jsx as s } from "react/jsx-runtime";
2
- import { c as y } from "./index-DIxK0V-G.js";
3
- const p = "_sortSelectWrapper_636hy_1", b = "_selectedOptions_636hy_8", x = "_selectedOptionsOpened_636hy_32", B = "_selectOptionsDisabled_636hy_36", C = "_optionsList_636hy_43", S = "_mobileOptionList_636hy_58", f = "_mobileSortHeader_636hy_65", g = "_modalAddBody_636hy_79", L = "_inputWrapper_636hy_85", W = "_option_636hy_43", D = "_icon_636hy_110", N = "_checkBox_636hy_117", A = "_checkBoxChecked_636hy_124", H = "_innerCheck_636hy_131", e = {
4
- sortSelectWrapper: p,
5
- selectedOptions: b,
6
- selectedOptionsOpened: x,
7
- selectOptionsDisabled: B,
8
- optionsList: C,
9
- mobileOptionList: S,
10
- mobileSortHeader: f,
11
- modalAddBody: g,
12
- inputWrapper: L,
13
- option: W,
14
- icon: D,
15
- checkBox: N,
16
- checkBoxChecked: A,
17
- innerCheck: H
18
- }, h = y.bind(e), q = ({
19
- selectedOption: c,
20
- setSelectedOption: i,
21
- setIsOpen: a,
22
- containerRef: r,
23
- onBlur: t,
24
- onChange: _,
25
- isMobile: u,
26
- placeholder: m
27
- }) => {
28
- const d = (o) => (n) => {
29
- n.stopPropagation();
30
- const l = (c == null ? void 0 : c.value) === o.value ? null : o;
31
- if (i(l), _) {
32
- const k = {
33
- ...n,
34
- target: { value: l }
35
- };
36
- _(k);
37
- }
38
- a(!1);
39
- };
40
- return { handleDocumentClick: (o) => {
41
- r.current && !r.current.contains(o.target) && a(!1);
42
- }, handleBlur: (o) => {
43
- if (t) {
44
- const n = {
45
- ...o,
46
- target: { value: c == null ? void 0 : c.value }
47
- };
48
- t(n);
49
- }
50
- }, getInputValue: () => u ? "" : c ? c.label : m, getOption: (o) => /* @__PURE__ */ v(
51
- "div",
52
- {
53
- className: h(e.option, {
54
- [e.selected]: (c == null ? void 0 : c.value) === o.value
55
- }),
56
- onClick: d(o),
57
- children: [
58
- /* @__PURE__ */ s("div", { children: o.label }),
59
- /* @__PURE__ */ s(
60
- "div",
61
- {
62
- className: h(e.checkBox, {
63
- [e.checkBoxChecked]: (c == null ? void 0 : c.value) === o.value
64
- }),
65
- children: (c == null ? void 0 : c.value) === o.value && /* @__PURE__ */ s("div", { className: e.innerCheck })
66
- }
67
- )
68
- ]
69
- },
70
- o.value
71
- ) };
72
- };
73
- export {
74
- e as s,
75
- q as u
76
- };