mimir-ui-kit 1.41.4 → 1.41.5
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.
- package/dist/{Input-DAmc_HxO.js → Input-BU_6U1CW.js} +63 -63
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/Dropdown.css +1 -1
- package/dist/assets/Image.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/RadioGroup.css +1 -1
- package/dist/assets/ScrollBar.css +1 -0
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Timer.css +1 -1
- package/dist/assets/stories.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.js +74 -74
- package/dist/components/Dropdown/Dropdown.js +121 -121
- package/dist/components/Image/Image.js +12 -12
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +28 -28
- package/dist/components/Pagination/Pagination.js +28 -28
- package/dist/components/RadioGroup/RadioGroup.js +79 -79
- package/dist/components/ScrollBar/ScrollBar.d.ts +17 -0
- package/dist/components/ScrollBar/ScrollBar.js +22 -0
- package/dist/components/ScrollBar/constants.d.ts +8 -0
- package/dist/components/ScrollBar/constants.js +5 -0
- package/dist/components/SelectSearch/SelectSearch.js +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Slider/Slider.js +40 -40
- package/dist/components/Table/ColumnOrderSettings.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCard.js +1 -1
- package/dist/components/Table/TableCardsView.js +1 -1
- package/dist/components/Table/TableFilters.js +1 -1
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Table/TableScrollButtons.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/Timer/Timer.js +6 -6
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stories.module-DBGkpJ-O.js +29 -0
- package/dist/styles.module-9m98aUhp.js +36 -0
- package/package.json +6 -2
- package/src/assets/styles/mixins/animations.scss +3 -0
- package/src/assets/styles/mixins/index.scss +3 -0
- package/src/assets/styles/mixins/media.scss +21 -0
- package/src/assets/styles/mixins/scrollbar.scss +43 -0
- package/dist/stories.module-fud786VB.js +0 -29
- package/dist/styles.module--QBQYoA9.js +0 -36
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
2
2
|
import { memo as I, forwardRef as i, useState as c, useCallback as f, useImperativeHandle as P } from "react";
|
3
3
|
import { getMaskedInputPhoneValue as m, getUnmaskedInputValue as o } from "./utils.js";
|
4
|
-
import { I as b } from "../../Input-
|
4
|
+
import { I as b } from "../../Input-BU_6U1CW.js";
|
5
5
|
const h = I(
|
6
6
|
i(
|
7
7
|
({ value: s = "", onChange: e, ...p }, a) => {
|
@@ -7,7 +7,7 @@ import { Icon as ye } from "../../icons/Icon.js";
|
|
7
7
|
import { Button as ke } from "../Button/Button.js";
|
8
8
|
import { CheckboxMimir as Te } from "../CheckboxMimir/CheckboxMimir.js";
|
9
9
|
import { Chip as Oe } from "../Chip/Chip.js";
|
10
|
-
import { I as ne } from "../../Input-
|
10
|
+
import { I as ne } from "../../Input-BU_6U1CW.js";
|
11
11
|
import { EInputVariant as ze } from "../Input/constants.js";
|
12
12
|
import { H as Ae, U as ie, G as se, K as Ve, W as qe } from "../../combobox-Dv6-ANkb.js";
|
13
13
|
import '../../assets/MultiSelectSearch.css';const xe = "_disabled_io0c8_5", De = "_container_io0c8_9", Pe = "_full_io0c8_27", Re = "_button_io0c8_39", Be = "_options_io0c8_53", Fe = "_visible_io0c8_66", Je = "_top_io0c8_69", je = "_bottom_io0c8_74", Ge = "_m_io0c8_2", He = "_l_io0c8_116", Ue = "_focused_io0c8_134", We = "_option_io0c8_53", Ke = "_chip_io0c8_163", $e = "_clear_io0c8_188", e = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { EMultiSelectSearchSize as o, MOBILE_MENU_HEIGHT as u, DESKTOP_MENU_HEIGHT as w } from "./constants.js";
|
2
|
-
import "../../Input-
|
2
|
+
import "../../Input-BU_6U1CW.js";
|
3
3
|
import { EInputSize as r } from "../Input/constants.js";
|
4
4
|
const m = (t) => {
|
5
5
|
switch (t) {
|
@@ -1,62 +1,62 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
2
2
|
import { c as u } from "../../index-DIxK0V-G.js";
|
3
3
|
import { forwardRef as P, useImperativeHandle as R, Fragment as T } from "react";
|
4
|
-
import { ITEMS_PER_SEPARATOR as
|
5
|
-
import { useOTPInput as
|
6
|
-
import { I as A } from "../../Input-
|
7
|
-
import '../../assets/OtpInput.css';const C = "
|
4
|
+
import { ITEMS_PER_SEPARATOR as v, DEFAULT_VALUE_LENGTH as y } from "./constants.js";
|
5
|
+
import { useOTPInput as z } from "./hooks.js";
|
6
|
+
import { I as A } from "../../Input-BU_6U1CW.js";
|
7
|
+
import '../../assets/OtpInput.css';const C = "_otp_1ncuz_2", F = "_input_1ncuz_13", L = "_separator_1ncuz_27", n = {
|
8
8
|
otp: C,
|
9
|
-
"input-wrapper": "_input-
|
9
|
+
"input-wrapper": "_input-wrapper_1ncuz_13",
|
10
10
|
input: F,
|
11
11
|
separator: L
|
12
12
|
}, O = P(
|
13
13
|
({
|
14
|
-
value:
|
15
|
-
valueLength:
|
14
|
+
value: c = "",
|
15
|
+
valueLength: m = y,
|
16
16
|
needSeparator: l = !0,
|
17
17
|
onChange: i,
|
18
|
-
className:
|
19
|
-
...
|
20
|
-
},
|
18
|
+
className: _,
|
19
|
+
...d
|
20
|
+
}, f) => {
|
21
21
|
const {
|
22
|
-
data: { inputRefs:
|
23
|
-
handlers: { handleChange:
|
24
|
-
} =
|
22
|
+
data: { inputRefs: o, valueItems: p },
|
23
|
+
handlers: { handleChange: h, handleFocus: I, handleKeyDown: w, handlePaste: N }
|
24
|
+
} = z({
|
25
25
|
onChange: i,
|
26
|
-
value:
|
27
|
-
valueLength:
|
26
|
+
value: c,
|
27
|
+
valueLength: m
|
28
28
|
});
|
29
|
-
return R(
|
29
|
+
return R(f, () => ({
|
30
30
|
focus: () => {
|
31
31
|
var a;
|
32
|
-
(a =
|
32
|
+
(a = o.current[0]) == null || a.focus();
|
33
33
|
}
|
34
|
-
})), /* @__PURE__ */
|
35
|
-
const
|
34
|
+
})), /* @__PURE__ */ r("div", { className: u(n.otp, _), children: p.map((a, e) => {
|
35
|
+
const s = e + 1, E = l && s % v === 0 && s !== p.length;
|
36
36
|
return /* @__PURE__ */ g(T, { children: [
|
37
|
-
/* @__PURE__ */
|
37
|
+
/* @__PURE__ */ r(
|
38
38
|
A,
|
39
39
|
{
|
40
|
-
ref: (t) =>
|
40
|
+
ref: (t) => o.current[e] = t,
|
41
41
|
type: "text",
|
42
42
|
inputMode: "numeric",
|
43
43
|
autoComplete: "one-time-code",
|
44
44
|
pattern: "\\d{1}",
|
45
45
|
maxLength: 1,
|
46
46
|
value: a,
|
47
|
-
className:
|
48
|
-
wrapperClassName:
|
49
|
-
onChange: (t) =>
|
47
|
+
className: n.input,
|
48
|
+
wrapperClassName: n["input-wrapper"],
|
49
|
+
onChange: (t) => h(t, e),
|
50
50
|
onKeyDown: (t) => w(t, e),
|
51
51
|
onFocus: (t) => I(t, e),
|
52
52
|
onPaste: N,
|
53
|
-
...
|
53
|
+
...d
|
54
54
|
}
|
55
55
|
),
|
56
|
-
E && /* @__PURE__ */
|
56
|
+
E && /* @__PURE__ */ r(
|
57
57
|
"span",
|
58
58
|
{
|
59
|
-
className: u(
|
59
|
+
className: u(n.separator),
|
60
60
|
"data-testid": "separator"
|
61
61
|
}
|
62
62
|
)
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { jsxs as P, jsx as i } from "react/jsx-runtime";
|
2
|
-
import { c as
|
3
|
-
import { forwardRef as N, useState as
|
4
|
-
import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as
|
5
|
-
import { useWindowSize as
|
2
|
+
import { c as g } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as N, useState as v, useEffect as A } from "react";
|
4
|
+
import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as x } from "./constants.js";
|
5
|
+
import { useWindowSize as E } from "../../hooks/useWindowSize/index.js";
|
6
6
|
import { MergedButton as h } from "../MergedButton/MergedButton.js";
|
7
|
-
import '../../assets/Pagination.css';const
|
8
|
-
container:
|
9
|
-
"pagination-button": "_pagination-
|
10
|
-
"is-active": "_is-
|
11
|
-
ellipsis:
|
7
|
+
import '../../assets/Pagination.css';const j = "_container_12l37_2", w = "_ellipsis_12l37_41", b = {
|
8
|
+
container: j,
|
9
|
+
"pagination-button": "_pagination-button_12l37_17",
|
10
|
+
"is-active": "_is-active_12l37_38",
|
11
|
+
ellipsis: w
|
12
12
|
}, B = ({ currentPageNumber: t, onClick: n, setCurrentPage: o }) => /* @__PURE__ */ i(
|
13
13
|
h,
|
14
14
|
{
|
@@ -56,11 +56,11 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
|
|
56
56
|
{
|
57
57
|
children: "...",
|
58
58
|
variant: "transparent",
|
59
|
-
className:
|
59
|
+
className: g(b["pagination-button"], b.ellipsis)
|
60
60
|
}
|
61
61
|
]
|
62
62
|
}
|
63
|
-
),
|
63
|
+
), C = ({
|
64
64
|
currentPageNumber: t,
|
65
65
|
newPageNumber: n,
|
66
66
|
onClick: o,
|
@@ -75,7 +75,7 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
|
|
75
75
|
"data-testid": `pagination-button-${e}`,
|
76
76
|
type: "button",
|
77
77
|
onClick: r,
|
78
|
-
className:
|
78
|
+
className: g(b["pagination-button"], {
|
79
79
|
[b["is-active"]]: s
|
80
80
|
}),
|
81
81
|
children: e
|
@@ -92,7 +92,7 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
|
|
92
92
|
for (let e = t; e <= n; e++)
|
93
93
|
r.push(
|
94
94
|
/* @__PURE__ */ i(
|
95
|
-
|
95
|
+
C,
|
96
96
|
{
|
97
97
|
currentPageNumber: o,
|
98
98
|
setCurrentPage: s,
|
@@ -108,21 +108,21 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
|
|
108
108
|
const {
|
109
109
|
rootClassName: o,
|
110
110
|
total: a,
|
111
|
-
perPage: s =
|
111
|
+
perPage: s = x,
|
112
112
|
currentPageNumber: r = u,
|
113
113
|
onChange: e
|
114
|
-
} = t, [c, d] =
|
115
|
-
let
|
116
|
-
return
|
114
|
+
} = t, [c, d] = v(r), l = Math.ceil(a / s), { width: k } = E(), m = k <= 650 ? 2 : 4;
|
115
|
+
let p = 0, f = 0;
|
116
|
+
return A(() => {
|
117
117
|
d(r);
|
118
|
-
}, [r]), c <= m ? (
|
118
|
+
}, [r]), c <= m ? (p = u, f = Math.min(
|
119
119
|
u + m,
|
120
120
|
l
|
121
|
-
)) : c > l - m ? (
|
121
|
+
)) : c > l - m ? (p = l - m, f = l) : (p = c - m / 2, f = c + m / 2), a <= s ? null : /* @__PURE__ */ P(
|
122
122
|
"nav",
|
123
123
|
{
|
124
124
|
"aria-label": "Постраничная навигация",
|
125
|
-
className:
|
125
|
+
className: g(b.container, o),
|
126
126
|
ref: n,
|
127
127
|
children: [
|
128
128
|
/* @__PURE__ */ i(
|
@@ -133,8 +133,8 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
|
|
133
133
|
setCurrentPage: d
|
134
134
|
}
|
135
135
|
),
|
136
|
-
|
137
|
-
|
136
|
+
p > u && /* @__PURE__ */ i(
|
137
|
+
C,
|
138
138
|
{
|
139
139
|
newPageNumber: u,
|
140
140
|
currentPageNumber: c,
|
@@ -142,17 +142,17 @@ import '../../assets/Pagination.css';const E = "_container_grwbf_3", j = "_ellip
|
|
142
142
|
setCurrentPage: d
|
143
143
|
}
|
144
144
|
),
|
145
|
-
|
145
|
+
p > u + 1 && /* @__PURE__ */ i(_, {}),
|
146
146
|
R({
|
147
|
-
start:
|
148
|
-
end:
|
147
|
+
start: p,
|
148
|
+
end: f,
|
149
149
|
currentPageNumber: c,
|
150
150
|
setCurrentPage: d,
|
151
151
|
onClick: e
|
152
152
|
}),
|
153
|
-
|
154
|
-
|
155
|
-
|
153
|
+
f < l - 1 && /* @__PURE__ */ i(_, {}),
|
154
|
+
f < l && /* @__PURE__ */ i(
|
155
|
+
C,
|
156
156
|
{
|
157
157
|
newPageNumber: l,
|
158
158
|
currentPageNumber: c,
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { jsxs as ee, jsx as
|
2
|
-
import { K as
|
3
|
-
import { W, y as
|
4
|
-
import E, { createContext as ce, useId as q, useReducer as xe, useRef as B, useMemo as T, useCallback as
|
5
|
-
import { u as
|
1
|
+
import { jsxs as ee, jsx as S, Fragment as _e } from "react/jsx-runtime";
|
2
|
+
import { K as M, w as ke, a as oe, z as te, U as ie, b as Oe, T as we, j as ye, u as Pe, I as Ee, G as Te, p as De } from "../../label-DOlEWXBl.js";
|
3
|
+
import { W as V, y as W, o as L, H as K, s as ne, n as se, $ as le, b as de, D as ue, a as Ce, u as Ge, c as F } from "../../keyboard-CUMsrFX1.js";
|
4
|
+
import E, { createContext as ce, useId as q, useReducer as xe, useRef as B, useMemo as T, useCallback as ze, useContext as pe, forwardRef as Fe } from "react";
|
5
|
+
import { u as Ne } from "../../use-by-comparator-CVuf9KBq.js";
|
6
6
|
import { r as fe } from "../../bugs-diTMAGNw.js";
|
7
|
-
import { P as re, F as
|
8
|
-
import { c as
|
9
|
-
import '../../assets/RadioGroup.css';var
|
10
|
-
let
|
7
|
+
import { P as re, F as j, T as ae, _ as Ae } from "../../focus-management-Dp2_vbQ3.js";
|
8
|
+
import { c as H } from "../../index-DIxK0V-G.js";
|
9
|
+
import '../../assets/RadioGroup.css';var Ie = ((e) => (e[e.RegisterOption = 0] = "RegisterOption", e[e.UnregisterOption = 1] = "UnregisterOption", e))(Ie || {});
|
10
|
+
let Se = { 0(e, r) {
|
11
11
|
let o = [...e.options, { id: r.id, element: r.element, propsRef: r.propsRef }];
|
12
|
-
return { ...e, options:
|
12
|
+
return { ...e, options: Ae(o, (a) => a.element.current) };
|
13
13
|
}, 1(e, r) {
|
14
14
|
let o = e.options.slice(), a = e.options.findIndex((u) => u.id === r.id);
|
15
15
|
return a === -1 ? e : (o.splice(a, 1), { ...e, options: o });
|
@@ -33,86 +33,86 @@ function Y(e) {
|
|
33
33
|
}
|
34
34
|
return r;
|
35
35
|
}
|
36
|
-
function
|
37
|
-
return Ce(r.type,
|
36
|
+
function Le(e, r) {
|
37
|
+
return Ce(r.type, Se, e, r);
|
38
38
|
}
|
39
|
-
let
|
40
|
-
function
|
41
|
-
let o = q(), a = oe(), { id: u = `headlessui-radiogroup-${o}`, value: _, form: v, name: c, onChange:
|
42
|
-
var
|
39
|
+
let Ue = "div";
|
40
|
+
function je(e, r) {
|
41
|
+
let o = q(), a = oe(), { id: u = `headlessui-radiogroup-${o}`, value: _, form: v, name: c, onChange: s, by: m, disabled: l = a || !1, defaultValue: n, ...k } = e, d = Ne(m), [O, D] = xe(Le, { options: [] }), p = O.options, [w, N] = te(), [C, y] = ie(), P = B(null), G = W(P, r), $ = Oe(n), [t, x] = we(_, s, $), z = T(() => p.find((i) => !i.propsRef.current.disabled), [p]), g = T(() => p.some((i) => d(i.propsRef.current.value, t)), [p, t]), f = L((i) => {
|
42
|
+
var A;
|
43
43
|
if (l || d(i, t)) return !1;
|
44
|
-
let
|
45
|
-
return
|
46
|
-
}), be =
|
47
|
-
let
|
48
|
-
if (!
|
49
|
-
let
|
44
|
+
let R = (A = p.find((U) => d(U.propsRef.current.value, i))) == null ? void 0 : A.propsRef.current;
|
45
|
+
return R != null && R.disabled ? !1 : (x == null || x(i), !0);
|
46
|
+
}), be = L((i) => {
|
47
|
+
let A = P.current;
|
48
|
+
if (!A) return;
|
49
|
+
let R = Ge(A), U = p.filter((b) => b.propsRef.current.disabled === !1).map((b) => b.element.current);
|
50
50
|
switch (i.key) {
|
51
|
-
case
|
51
|
+
case F.Enter:
|
52
52
|
De(i.currentTarget);
|
53
53
|
break;
|
54
|
-
case
|
55
|
-
case
|
56
|
-
if (i.preventDefault(), i.stopPropagation(), re(
|
57
|
-
let b = p.find((
|
54
|
+
case F.ArrowLeft:
|
55
|
+
case F.ArrowUp:
|
56
|
+
if (i.preventDefault(), i.stopPropagation(), re(U, j.Previous | j.WrapAround) === ae.Success) {
|
57
|
+
let b = p.find((I) => I.element.current === (R == null ? void 0 : R.activeElement));
|
58
58
|
b && f(b.propsRef.current.value);
|
59
59
|
}
|
60
60
|
break;
|
61
|
-
case
|
62
|
-
case
|
63
|
-
if (i.preventDefault(), i.stopPropagation(), re(
|
64
|
-
let b = p.find((
|
61
|
+
case F.ArrowRight:
|
62
|
+
case F.ArrowDown:
|
63
|
+
if (i.preventDefault(), i.stopPropagation(), re(U, j.Next | j.WrapAround) === ae.Success) {
|
64
|
+
let b = p.find((I) => I.element.current === (R == null ? void 0 : R.activeElement));
|
65
65
|
b && f(b.propsRef.current.value);
|
66
66
|
}
|
67
67
|
break;
|
68
|
-
case
|
68
|
+
case F.Space:
|
69
69
|
{
|
70
70
|
i.preventDefault(), i.stopPropagation();
|
71
|
-
let b = p.find((
|
71
|
+
let b = p.find((I) => I.element.current === (R == null ? void 0 : R.activeElement));
|
72
72
|
b && f(b.propsRef.current.value);
|
73
73
|
}
|
74
74
|
break;
|
75
75
|
}
|
76
|
-
}), Z =
|
76
|
+
}), Z = L((i) => (D({ type: 0, ...i }), () => D({ type: 1, id: i.id }))), ve = T(() => ({ value: t, firstOption: z, containsCheckedOption: g, disabled: l, compare: d, ...O }), [t, z, g, l, d, O]), he = T(() => ({ registerOption: Z, change: f }), [Z, f]), Re = { ref: G, id: u, role: "radiogroup", "aria-labelledby": w, "aria-describedby": C, onKeyDown: be }, $e = T(() => ({ value: t }), [t]), ge = ze(() => {
|
77
77
|
if ($ !== void 0) return f($);
|
78
78
|
}, [f, $]);
|
79
|
-
return E.createElement(
|
79
|
+
return E.createElement(y, { name: "RadioGroup.Description" }, E.createElement(N, { name: "RadioGroup.Label" }, E.createElement(Q.Provider, { value: he }, E.createElement(J.Provider, { value: ve }, c != null && E.createElement(ye, { disabled: l, data: { [c]: t || "on" }, overrides: { type: "radio", checked: t != null }, form: v, onReset: ge }), K({ ourProps: Re, theirProps: k, slot: $e, defaultTag: Ue, name: "RadioGroup" })))));
|
80
80
|
}
|
81
|
-
let
|
82
|
-
function
|
81
|
+
let He = "div";
|
82
|
+
function Me(e, r) {
|
83
83
|
var o;
|
84
|
-
let a = X("RadioGroup.Option"), u = Y("RadioGroup.Option"), _ = q(), { id: v = `headlessui-radiogroup-option-${_}`, value: c, disabled:
|
85
|
-
|
86
|
-
let
|
84
|
+
let a = X("RadioGroup.Option"), u = Y("RadioGroup.Option"), _ = q(), { id: v = `headlessui-radiogroup-option-${_}`, value: c, disabled: s = a.disabled || !1, autoFocus: m = !1, ...l } = e, n = B(null), k = W(n, r), [d, O] = te(), [D, p] = ie(), w = ne({ value: c, disabled: s });
|
85
|
+
se(() => u.registerOption({ id: v, element: n, propsRef: w }), [v, u, n, w]);
|
86
|
+
let N = L((g) => {
|
87
87
|
var f;
|
88
88
|
if (fe(g.currentTarget)) return g.preventDefault();
|
89
|
-
u.change(c) && ((f =
|
90
|
-
}), C = ((o = a.firstOption) == null ? void 0 : o.id) === v, { isFocusVisible:
|
91
|
-
return E.createElement(p, { name: "RadioGroup.Description" }, E.createElement(
|
89
|
+
u.change(c) && ((f = n.current) == null || f.focus());
|
90
|
+
}), C = ((o = a.firstOption) == null ? void 0 : o.id) === v, { isFocusVisible: y, focusProps: P } = le({ autoFocus: m }), { isHovered: G, hoverProps: $ } = de({ isDisabled: s }), t = a.compare(a.value, c), x = ue({ ref: k, id: v, role: "radio", "aria-checked": t ? "true" : "false", "aria-labelledby": d, "aria-describedby": D, "aria-disabled": s ? !0 : void 0, tabIndex: s ? -1 : t || !a.containsCheckedOption && C ? 0 : -1, onClick: s ? void 0 : N, autoFocus: m }, P, $), z = T(() => ({ checked: t, disabled: s, active: y, hover: G, focus: y, autofocus: m }), [t, s, G, y, m]);
|
91
|
+
return E.createElement(p, { name: "RadioGroup.Description" }, E.createElement(O, { name: "RadioGroup.Label" }, K({ ourProps: x, theirProps: l, slot: z, defaultTag: He, name: "RadioGroup.Option" })));
|
92
92
|
}
|
93
|
-
let
|
94
|
-
function
|
93
|
+
let Ve = "span";
|
94
|
+
function We(e, r) {
|
95
95
|
var o;
|
96
|
-
let a = X("Radio"), u = Y("Radio"), _ = q(), v = Pe(), c = oe(), { id:
|
97
|
-
|
98
|
-
let
|
96
|
+
let a = X("Radio"), u = Y("Radio"), _ = q(), v = Pe(), c = oe(), { id: s = v || `headlessui-radio-${_}`, value: m, disabled: l = a.disabled || c || !1, autoFocus: n = !1, ...k } = e, d = B(null), O = W(d, r), D = Ee(), p = Te(), w = ne({ value: m, disabled: l });
|
97
|
+
se(() => u.registerOption({ id: s, element: d, propsRef: w }), [s, u, d, w]);
|
98
|
+
let N = L((g) => {
|
99
99
|
var f;
|
100
100
|
if (fe(g.currentTarget)) return g.preventDefault();
|
101
101
|
u.change(m) && ((f = d.current) == null || f.focus());
|
102
|
-
}), { isFocusVisible: C, focusProps:
|
103
|
-
return K({ ourProps: x, theirProps:
|
102
|
+
}), { isFocusVisible: C, focusProps: y } = le({ autoFocus: n }), { isHovered: P, hoverProps: G } = de({ isDisabled: l }), $ = ((o = a.firstOption) == null ? void 0 : o.id) === s, t = a.compare(a.value, m), x = ue({ ref: O, id: s, role: "radio", "aria-checked": t ? "true" : "false", "aria-labelledby": D, "aria-describedby": p, "aria-disabled": l ? !0 : void 0, tabIndex: l ? -1 : t || !a.containsCheckedOption && $ ? 0 : -1, autoFocus: n, onClick: l ? void 0 : N }, y, G), z = T(() => ({ checked: t, disabled: l, hover: P, focus: C, autofocus: n }), [t, l, P, C, n]);
|
103
|
+
return K({ ourProps: x, theirProps: k, slot: z, defaultTag: Ve, name: "Radio" });
|
104
104
|
}
|
105
|
-
let Ke =
|
106
|
-
const Qe = "
|
105
|
+
let Ke = V(je), qe = V(Me), me = V(We), Be = M, Je = ke, Xe = Object.assign(Ke, { Option: qe, Radio: me, Label: Be, Description: Je });
|
106
|
+
const Qe = "_group_po2hz_2", Ye = "_radio_po2hz_17", Ze = "_disabled_po2hz_39", er = "_label_po2hz_50", rr = "_frame_po2hz_63", ar = "_checked_po2hz_72", h = {
|
107
107
|
group: Qe,
|
108
|
-
"content-wrapper": "_content-
|
109
|
-
"radio-wrapper": "_radio-
|
108
|
+
"content-wrapper": "_content-wrapper_po2hz_7",
|
109
|
+
"radio-wrapper": "_radio-wrapper_po2hz_17",
|
110
110
|
radio: Ye,
|
111
111
|
disabled: Ze,
|
112
112
|
label: er,
|
113
113
|
frame: rr,
|
114
114
|
checked: ar
|
115
|
-
}, cr =
|
115
|
+
}, cr = Fe(
|
116
116
|
({
|
117
117
|
options: e,
|
118
118
|
value: r,
|
@@ -122,57 +122,57 @@ const Qe = "_group_yses6_3", Ye = "_radio_yses6_18", Ze = "_disabled_yses6_40",
|
|
122
122
|
classNameRadioSpan: _,
|
123
123
|
classNameContentWrapper: v,
|
124
124
|
...c
|
125
|
-
},
|
126
|
-
const m =
|
127
|
-
|
125
|
+
}, s) => {
|
126
|
+
const m = H(
|
127
|
+
h["radio-wrapper"],
|
128
128
|
u,
|
129
129
|
{
|
130
|
-
[
|
130
|
+
[h.disabled]: c.disabled
|
131
131
|
}
|
132
132
|
);
|
133
133
|
return /* @__PURE__ */ ee(
|
134
134
|
Xe,
|
135
135
|
{
|
136
|
-
ref:
|
136
|
+
ref: s,
|
137
137
|
value: r,
|
138
|
-
className:
|
138
|
+
className: h.group,
|
139
139
|
onChange: o,
|
140
140
|
...c,
|
141
141
|
children: [
|
142
|
-
a && /* @__PURE__ */
|
143
|
-
/* @__PURE__ */
|
142
|
+
a && /* @__PURE__ */ S(M, { as: "p", className: h.label, children: a }),
|
143
|
+
/* @__PURE__ */ S(
|
144
144
|
"div",
|
145
145
|
{
|
146
|
-
className:
|
147
|
-
|
146
|
+
className: H(
|
147
|
+
h["content-wrapper"],
|
148
148
|
v
|
149
149
|
),
|
150
|
-
children: e.map(({ label: l, value:
|
150
|
+
children: e.map(({ label: l, value: n }) => /* @__PURE__ */ S(
|
151
151
|
me,
|
152
152
|
{
|
153
153
|
as: "span",
|
154
|
-
value:
|
154
|
+
value: n,
|
155
155
|
disabled: c.disabled,
|
156
156
|
className: m,
|
157
|
-
"data-testid": `radio-option-${
|
158
|
-
children: ({ checked:
|
159
|
-
/* @__PURE__ */
|
160
|
-
|
157
|
+
"data-testid": `radio-option-${n}`,
|
158
|
+
children: ({ checked: k, disabled: d }) => /* @__PURE__ */ ee(_e, { children: [
|
159
|
+
/* @__PURE__ */ S(
|
160
|
+
M,
|
161
161
|
{
|
162
162
|
as: "span",
|
163
|
-
className:
|
164
|
-
|
163
|
+
className: H(
|
164
|
+
h.radio,
|
165
165
|
{
|
166
|
-
[
|
166
|
+
[h.disabled]: c.disabled
|
167
167
|
},
|
168
168
|
_
|
169
169
|
),
|
170
|
-
children: /* @__PURE__ */
|
170
|
+
children: /* @__PURE__ */ S(
|
171
171
|
"span",
|
172
172
|
{
|
173
|
-
className:
|
174
|
-
[
|
175
|
-
[
|
173
|
+
className: H(h.frame, {
|
174
|
+
[h.checked]: k,
|
175
|
+
[h.disabled]: d
|
176
176
|
})
|
177
177
|
}
|
178
178
|
)
|
@@ -181,7 +181,7 @@ const Qe = "_group_yses6_3", Ye = "_radio_yses6_18", Ze = "_disabled_yses6_40",
|
|
181
181
|
l
|
182
182
|
] })
|
183
183
|
},
|
184
|
-
typeof
|
184
|
+
typeof n == "string" ? n : String(n)
|
185
185
|
))
|
186
186
|
}
|
187
187
|
)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { EScrollBarVariant, EScrollBarSize } from './constants';
|
3
|
+
|
4
|
+
export type TProps = {
|
5
|
+
/**
|
6
|
+
* Вариант скроллбара. Возможные значения 'light', 'dark'.
|
7
|
+
* Первый параметр в миксине scroll-bar. `EScrollBarVariant`
|
8
|
+
*/
|
9
|
+
variant?: `${EScrollBarVariant}` | EScrollBarVariant;
|
10
|
+
/**
|
11
|
+
* Размер скроллбара. Возможные значения определены в перечислении 's', 'm'.
|
12
|
+
* Второй параметр в миксине scroll-bar. `EScrollBarSize`
|
13
|
+
*/
|
14
|
+
size?: `${EScrollBarSize}` | EScrollBarSize;
|
15
|
+
};
|
16
|
+
declare const ScrollBar: React.FC<TProps>;
|
17
|
+
export default ScrollBar;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import { EScrollBarVariant as o, EScrollBarSize as e } from "./constants.js";
|
3
|
+
import '../../assets/ScrollBar.css';const t = "_scrollBarWrap_il71w_2", i = "_scrollBar_il71w_2", m = "_elem_il71w_91", l = {
|
4
|
+
scrollBarWrap: t,
|
5
|
+
scrollBar: i,
|
6
|
+
elem: m
|
7
|
+
}, _ = ({
|
8
|
+
variant: a = o.LIGHT,
|
9
|
+
size: s = e.M
|
10
|
+
}) => /* @__PURE__ */ r("div", { className: l.scrollBarWrap, children: /* @__PURE__ */ r(
|
11
|
+
"div",
|
12
|
+
{
|
13
|
+
"data-testid": "scrollbar",
|
14
|
+
"data-variant": a,
|
15
|
+
"data-size": s,
|
16
|
+
className: l.scrollBar,
|
17
|
+
children: [...Array(34)].map((B, c) => /* @__PURE__ */ r("div", { className: l.elem }, c))
|
18
|
+
}
|
19
|
+
) });
|
20
|
+
export {
|
21
|
+
_ as default
|
22
|
+
};
|
@@ -5,7 +5,7 @@ import { ESelectSearchSize as b } from "./constants.js";
|
|
5
5
|
import { mapSizeToInputSize as A, getDropdownArrowIcon as J } from "./utils.js";
|
6
6
|
import { Icon as O } from "../../icons/Icon.js";
|
7
7
|
import { Button as Q } from "../Button/Button.js";
|
8
|
-
import { I as B } from "../../Input-
|
8
|
+
import { I as B } from "../../Input-BU_6U1CW.js";
|
9
9
|
import { EInputVariant as X } from "../Input/constants.js";
|
10
10
|
import { H as Y, U as M, G as j, K as Z, W as ee } from "../../combobox-Dv6-ANkb.js";
|
11
11
|
import '../../assets/SelectSearch.css';const te = "_disabled_lhab4_6", oe = "_container_lhab4_13", ae = "_full_lhab4_26", se = "_button_lhab4_38", ne = "_options_lhab4_52", le = "_top_lhab4_63", ie = "_bottom_lhab4_69", re = "_s_lhab4_2", ce = "_m_lhab4_110", de = "_l_lhab4_123", pe = "_option_lhab4_52", ue = "_clear_lhab4_175", e = {
|