stone-kit 0.0.411 → 0.0.413

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.
@@ -0,0 +1,178 @@
1
+ import { jsxs as _, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as R, useState as k, useRef as D, useEffect as T } from "react";
3
+ import { c as O } from "./index-rKuIKazb.js";
4
+ import { s as t, u as M } from "./useSortSelect-D7K1wk0E.js";
5
+ import { NewIcon as y } from "./components/NewIcon/ui/NewIcon.js";
6
+ import "./components/Button/ui/Button.js";
7
+ import "./components/mobileButton/ui/MobileButton.js";
8
+ import "./components/DestinationTab/ui/DestinationTab.js";
9
+ import "./components/RoundButton/ui/RoundButton.js";
10
+ import "./components/Tag/ui/Tag.js";
11
+ import "./components/Switcher/ui/Switcher.js";
12
+ import { Text as C } from "./components/Text/ui/Text.js";
13
+ import "./components/Flex/ui/Flex.js";
14
+ import "./components/Input/ui/Input.js";
15
+ import { M as B } from "./Modal-DbD1tgiF.js";
16
+ import "./components/GroupedInput/ui/GroupedInputs.js";
17
+ import "./components/MetroTag/ui/MetroTag.js";
18
+ import "./components/LotCard/ui/LotCard.js";
19
+ import "./components/Select/ui/Select.js";
20
+ import { useClientWidth as L } from "./shared/useClientWidth.js";
21
+ import "./components/SliderNavigation/ui/SliderNavigation.js";
22
+ import "./components/TabSelect/ui/TabSelect.js";
23
+ import "./index-BaVdWc7x.js";
24
+ import "./components/CheckBox/CheckBox.js";
25
+ import "./components/TextArea/TextArea.js";
26
+ const j = "_root_awv4b_1", E = "_text_awv4b_18", A = "_rootCol_awv4b_26", z = "_item_awv4b_32", $ = "_whiteRow_awv4b_51", q = "_firstItem_awv4b_62", H = "_lastItem_awv4b_66", P = "_apart_awv4b_90", V = "_isLong_awv4b_90", F = "_autoWidth_awv4b_115", G = "_isDisabled_awv4b_122", J = "_grayRow_awv4b_144", e = {
27
+ root: j,
28
+ text: E,
29
+ rootCol: A,
30
+ item: z,
31
+ whiteRow: $,
32
+ firstItem: q,
33
+ lastItem: H,
34
+ apart: P,
35
+ isLong: V,
36
+ autoWidth: F,
37
+ isDisabled: G,
38
+ grayRow: J
39
+ }, v = O.bind(e), K = ({
40
+ children: o,
41
+ variant: c = "whiteRow",
42
+ isApart: m = !1,
43
+ addClassName: d = "",
44
+ col: l = !1
45
+ }) => /* @__PURE__ */ s("div", { className: v(e.root, e[c], d, { [e.rootCol]: l, [e.apart]: m }), children: o }), W = R((o, c) => {
46
+ const { isTablet: m, isDesktop: d } = L(), {
47
+ index: l,
48
+ children: i,
49
+ addItemClassName: w,
50
+ disabled: S = !1,
51
+ itemsLength: I = 0,
52
+ width: p,
53
+ width_m: a,
54
+ width_l: r,
55
+ ...u
56
+ } = o, n = i != null && i.toString().length ? (i == null ? void 0 : i.toString().length) > 2 : !1, N = (b, h) => b && a ? a : h && r ? r : p, g = !p && !a && !r && n;
57
+ return /* @__PURE__ */ _("label", { className: v({ [e.isLong]: n }), children: [
58
+ /* @__PURE__ */ s(
59
+ "input",
60
+ {
61
+ ref: c,
62
+ type: "checkbox",
63
+ ...u
64
+ }
65
+ ),
66
+ /* @__PURE__ */ s(
67
+ "div",
68
+ {
69
+ style: { width: N(m, d) },
70
+ className: v(v(
71
+ e.item,
72
+ { [e.firstItem]: l === 0 },
73
+ { [e.lastItem]: l === I - 1 },
74
+ { [e.isDisabled]: S },
75
+ { [e.autoWidth]: g }
76
+ ), w),
77
+ children: /* @__PURE__ */ s(C, { className: e.text, children: i })
78
+ }
79
+ )
80
+ ] });
81
+ });
82
+ W.displayName = "TabSwitcherItem";
83
+ const It = Object.assign(K, { Item: W }), f = O.bind(t), Q = ({
84
+ options: o,
85
+ selectedOption: c,
86
+ placeholder: m = "",
87
+ error: d,
88
+ disabled: l,
89
+ additionalClass: i = "",
90
+ onChange: w,
91
+ onBlur: S,
92
+ mini: I,
93
+ openOnTop: p = !1
94
+ }) => {
95
+ const [a, r] = k(!1), u = D(null), { isMobile: n } = L(), { handleBlur: N, getInputValue: g, getOption: b, handleDocumentClick: h } = M({
96
+ selectedOption: c,
97
+ setSelectedOption: w,
98
+ setIsOpen: r,
99
+ containerRef: u,
100
+ isOpen: a,
101
+ isMobile: n,
102
+ placeholder: m,
103
+ onChange: w,
104
+ onBlur: S
105
+ });
106
+ return T(() => (document.addEventListener("click", h), () => {
107
+ document.removeEventListener("click", h);
108
+ }), []), /* @__PURE__ */ _(
109
+ "div",
110
+ {
111
+ ref: u,
112
+ className: f(
113
+ t.sortSelectWrapper,
114
+ { [t.sortSelectWrapperError]: d },
115
+ { [t.sortSelectWrapperTop]: p },
116
+ i
117
+ ),
118
+ tabIndex: 0,
119
+ onBlur: N,
120
+ children: [
121
+ /* @__PURE__ */ _("div", { className: f(t.inputWrapper), children: [
122
+ /* @__PURE__ */ s(
123
+ "input",
124
+ {
125
+ type: "text",
126
+ readOnly: !0,
127
+ value: g(),
128
+ className: f(
129
+ t.selectedOptions,
130
+ { [t.selectOptionsDisabled]: l },
131
+ { [t.selectionOptionMini]: I }
132
+ ),
133
+ onClick: () => r(!a)
134
+ }
135
+ ),
136
+ /* @__PURE__ */ s(
137
+ y,
138
+ {
139
+ name: "twoArrows",
140
+ size: "24",
141
+ additionalClass: t.icon
142
+ }
143
+ )
144
+ ] }),
145
+ a && n && /* @__PURE__ */ _(
146
+ B,
147
+ {
148
+ isOpen: a,
149
+ emitIsOpen: r,
150
+ additionalClassModalBody: t.modalAddBody,
151
+ additionalClass: t.selectModal,
152
+ createPortalObj: { domNode: document.querySelector("body") },
153
+ isTransparentBack: !0,
154
+ children: [
155
+ /* @__PURE__ */ _("div", { className: t.mobileSortHeader, children: [
156
+ /* @__PURE__ */ s(C, { children: "Сортировка" }),
157
+ /* @__PURE__ */ s("div", { onClick: () => r(!1), children: /* @__PURE__ */ s(
158
+ y,
159
+ {
160
+ name: "close",
161
+ size: "20"
162
+ }
163
+ ) })
164
+ ] }),
165
+ /* @__PURE__ */ s("div", { className: t.mobileOptionList, children: o == null ? void 0 : o.map((x) => b(x)) })
166
+ ]
167
+ }
168
+ ),
169
+ a && !n && /* @__PURE__ */ s("div", { className: f(t.optionsList, { [t.optionListOnTop]: p }), children: o == null ? void 0 : o.map((x) => b(x)) })
170
+ ]
171
+ }
172
+ );
173
+ };
174
+ Q.displayName = "SortSelect";
175
+ export {
176
+ It as S,
177
+ Q as a
178
+ };
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  interface Props {
3
- text: string;
3
+ text?: string;
4
4
  error: boolean;
5
5
  isChecked?: boolean;
6
+ children?: React.ReactNode;
6
7
  }
7
8
  export type Ref = HTMLInputElement;
8
9
  export declare const CheckBox: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,22 +1,23 @@
1
- import { jsxs as a, jsx as c } from "react/jsx-runtime";
2
- import { Input as b } from "../Input/ui/Input.js";
3
- import { c as h } from "../../index-rKuIKazb.js";
4
- import { forwardRef as m } from "react";
5
- import { NewIcon as x } from "../NewIcon/ui/NewIcon.js";
6
- const _ = "_checkboxLabel_19nrs_1", i = "_labelText_19nrs_37", k = "_error_19nrs_45", d = "_checkIcon_19nrs_53", e = {
7
- checkboxLabel: _,
8
- labelText: i,
9
- error: k,
10
- checkIcon: d
11
- }, r = h.bind(e), N = m(({
12
- text: s,
13
- isChecked: t,
14
- error: o,
15
- ...n
16
- }, l) => /* @__PURE__ */ a("label", { className: r(e.checkboxLabel, { [e.error]: o }), children: [
17
- /* @__PURE__ */ c(b, { type: "checkbox", ...n, ref: l }),
18
- t && /* @__PURE__ */ c(
19
- x,
1
+ import { jsxs as b, jsx as c } from "react/jsx-runtime";
2
+ import { Input as h } from "../Input/ui/Input.js";
3
+ import { c as m } from "../../index-rKuIKazb.js";
4
+ import { forwardRef as i } from "react";
5
+ import { NewIcon as _ } from "../NewIcon/ui/NewIcon.js";
6
+ const x = "_checkboxLabel_19nrs_1", k = "_labelText_19nrs_37", d = "_error_19nrs_45", p = "_checkIcon_19nrs_53", e = {
7
+ checkboxLabel: x,
8
+ labelText: k,
9
+ error: d,
10
+ checkIcon: p
11
+ }, s = m.bind(e), u = i(({
12
+ text: o,
13
+ isChecked: n,
14
+ error: r,
15
+ children: t,
16
+ ...l
17
+ }, a) => /* @__PURE__ */ b("label", { className: s(e.checkboxLabel, { [e.error]: r }), children: [
18
+ /* @__PURE__ */ c(h, { type: "checkbox", ...l, ref: a }),
19
+ n && /* @__PURE__ */ c(
20
+ _,
20
21
  {
21
22
  additionalClass: e.checkIcon,
22
23
  color: "white",
@@ -28,11 +29,12 @@ const _ = "_checkboxLabel_19nrs_1", i = "_labelText_19nrs_37", k = "_error_19nrs
28
29
  /* @__PURE__ */ c(
29
30
  "div",
30
31
  {
31
- className: r(e.labelText, { [e.error]: o }),
32
- dangerouslySetInnerHTML: { __html: s }
32
+ className: s(e.labelText, { [e.error]: r }),
33
+ dangerouslySetInnerHTML: o ? { __html: o } : void 0,
34
+ children: t
33
35
  }
34
36
  )
35
37
  ] }));
36
38
  export {
37
- N as CheckBox
39
+ u as CheckBox
38
40
  };
@@ -30,5 +30,5 @@ type IFormPageInputs = {
30
30
  advCheckBox?: boolean;
31
31
  textarea?: string;
32
32
  };
33
- export declare const ModalForm: ({ isFormOpen, setIsFormOpen, title, isEmail, isPhone, isTextArea, isRequiredPhone, isRequiredEmail, isRequiredPhoneOrEmail, textAreaPlaceholder, subTitle, submitHandler, modalWidth, rowsTextArea, personalCheckBox, advCheckBox, }: IModalFormProps) => import("react/jsx-runtime").JSX.Element | null;
33
+ export declare const ModalForm: ({ isFormOpen, setIsFormOpen, title, isEmail, isPhone, isTextArea, isRequiredPhone, isRequiredEmail, isRequiredPhoneOrEmail, textAreaPlaceholder, subTitle, submitHandler, modalWidth, rowsTextArea, advCheckBox, }: IModalFormProps) => import("react/jsx-runtime").JSX.Element | null;
34
34
  export {};