mimir-ui-kit 1.43.10 → 1.43.11
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-CGZoshMl.js +224 -0
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/AccordionItem.css +1 -1
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/CarBodyButton.css +1 -0
- package/dist/assets/CheckboxMimir.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/GosZnak.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputPassword.css +1 -1
- package/dist/assets/InputRangeSlider.css +1 -1
- package/dist/assets/Link.css +1 -1
- package/dist/assets/ListFiles.css +1 -1
- package/dist/assets/ListPhotos.css +1 -1
- package/dist/assets/MessageShortReply.css +1 -1
- package/dist/assets/MiniButton.css +1 -0
- package/dist/assets/MultiSelectSearch.css +1 -1
- package/dist/assets/NotificationBadge.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/RoundButton.css +1 -0
- package/dist/assets/ScrollWrapper.css +1 -0
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/hooks.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Accordion/Accordion.d.ts +10 -3
- package/dist/components/Accordion/Accordion.js +286 -212
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
- package/dist/components/Accordion/constants.d.ts +0 -4
- package/dist/components/Accordion/constants.js +4 -5
- package/dist/components/AnchorLink/Link.js +21 -20
- package/dist/components/Avatar/Avatar.js +26 -26
- package/dist/components/Button/Button.js +110 -87
- package/dist/components/Button/constants.d.ts +8 -2
- package/dist/components/Button/constants.js +6 -5
- package/dist/components/CarBodyButton/CarBodyButton.d.ts +26 -0
- package/dist/components/CarBodyButton/CarBodyButton.js +40 -0
- package/dist/components/CarBodyButton/index.d.ts +1 -0
- package/dist/components/CarBodyButton/index.js +4 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +2 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.js +37 -35
- package/dist/components/Chip/Chip.js +17 -17
- package/dist/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/components/DatePicker/DatePicker.js +182 -169
- package/dist/components/DatePicker/DatePickerModal.js +134 -98
- package/dist/components/DatePicker/MonthPickerModal.js +115 -95
- package/dist/components/DatePicker/YearPickerModal.js +109 -89
- package/dist/components/DatePicker/constants.d.ts +1 -0
- package/dist/components/DatePicker/constants.js +1 -1
- package/dist/components/DatePicker/hooks.d.ts +2 -1
- package/dist/components/DatePicker/hooks.js +12 -12
- package/dist/components/Drawer/Drawer.js +172 -138
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.d.ts +11 -0
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.js +27 -0
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/hooks.js +1 -1
- package/dist/components/GosZnak/GosZnak.js +47 -38
- package/dist/components/GosZnak/utils.d.ts +6 -0
- package/dist/components/GosZnak/utils.js +15 -0
- package/dist/components/Input/Input.d.ts +4 -0
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +38 -42
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/InputRangeSlider/InputRangeSlider.js +159 -139
- package/dist/components/InputRangeSlider/constants.d.ts +5 -0
- package/dist/components/InputRangeSlider/constants.js +11 -6
- package/dist/components/ListFiles/ListFiles.js +41 -39
- package/dist/components/ListPhotos/ListPhotos.js +17 -18
- package/dist/components/MessageShortReply/MessageShortReply.js +34 -34
- package/dist/components/{InputClearButton/ClearButton.d.ts → MiniButton/MiniButton.d.ts} +17 -8
- package/dist/components/MiniButton/MiniButton.js +44 -0
- package/dist/components/MiniButton/constants.d.ts +9 -0
- package/dist/components/MiniButton/constants.js +5 -0
- package/dist/components/MiniButton/index.d.ts +4 -0
- package/dist/components/MiniButton/index.js +6 -0
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +153 -152
- package/dist/components/MultiSelectSearch/constants.d.ts +1 -0
- package/dist/components/MultiSelectSearch/constants.js +7 -7
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -1
- package/dist/components/MultiSelectSearch/utils.js +18 -16
- package/dist/components/NotificationBadge/NotificationBadge.js +49 -33
- package/dist/components/NotificationBadge/constants.d.ts +9 -2
- package/dist/components/NotificationBadge/constants.js +3 -2
- package/dist/components/NotificationBadge/types.d.ts +11 -1
- package/dist/components/NotificationBadge/utils.d.ts +8 -0
- package/dist/components/NotificationBadge/utils.js +4 -0
- package/dist/components/OtpInput/OtpInput.js +44 -40
- package/dist/components/OtpInput/constants.d.ts +4 -0
- package/dist/components/OtpInput/constants.js +6 -4
- package/dist/components/OtpInput/index.d.ts +1 -0
- package/dist/components/OtpInput/index.js +2 -0
- package/dist/components/Pagination/Pagination.js +23 -23
- package/dist/components/RoundButton/RoundButton.d.ts +82 -0
- package/dist/components/RoundButton/RoundButton.js +69 -0
- package/dist/components/RoundButton/constants.d.ts +11 -0
- package/dist/components/RoundButton/constants.js +5 -0
- package/dist/components/RoundButton/index.d.ts +2 -0
- package/dist/components/RoundButton/index.js +7 -0
- package/dist/components/RoundButton/types.d.ts +20 -0
- package/dist/components/SelectSearch/SelectSearch.js +241 -241
- package/dist/components/SelectSearch/utils.d.ts +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -5
- package/dist/components/Slider/Slider.js +34 -36
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +55 -51
- package/dist/hooks-Cd4Ez6_j.js +117 -0
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/16px/DropdownArrowDown16px.js +23 -0
- package/dist/icons/components/24px/EyeClosed24px.js +65 -0
- package/dist/icons/components/Avito.js +36 -13
- package/dist/icons/components/Site.js +13 -36
- package/dist/icons/components/index.js +564 -591
- package/dist/{index-C2dQUuc9.js → index-DrVFMaBi.js} +1184 -1346
- package/dist/index.js +73 -69
- package/dist/styles.module-BfkM1-KJ.js +32 -0
- package/package.json +1 -1
- package/dist/Input-BU_6U1CW.js +0 -227
- package/dist/assets/ClearButton.css +0 -1
- package/dist/components/InputClearButton/ClearButton.js +0 -41
- package/dist/components/InputClearButton/constants.d.ts +0 -8
- package/dist/components/InputClearButton/constants.js +0 -5
- package/dist/components/InputClearButton/index.d.ts +0 -4
- package/dist/components/InputClearButton/index.js +0 -6
- package/dist/hooks-HgN6Yauq.js +0 -117
- package/dist/icons/components/64px/AdvancePaymentDiscount64px.js +0 -59
- package/dist/icons/components/64px/AtsVendors64px.js +0 -37
- package/dist/icons/components/64px/ButtonOn64px.js +0 -31
- package/dist/icons/components/64px/BuyoutAuto64px.js +0 -45
- package/dist/icons/components/64px/CarAssistance64px.js +0 -44
- package/dist/icons/components/64px/CarDelivery64px.js +0 -37
- package/dist/icons/components/64px/CarSearchReturn64px.js +0 -45
- package/dist/icons/components/64px/CarService64px.js +0 -37
- package/dist/icons/components/64px/Case64px.js +0 -33
- package/dist/icons/components/64px/CoatOfArms64px.js +0 -149
- package/dist/icons/components/64px/CoffeeCup64px.js +0 -44
- package/dist/icons/components/64px/Cup64px.js +0 -38
- package/dist/icons/components/64px/ExpertAdvice64px.js +0 -40
- package/dist/icons/components/64px/Fines64px.js +0 -88
- package/dist/icons/components/64px/Fuel64px.js +0 -38
- package/dist/icons/components/64px/GazprombankIcon24px.js +0 -21
- package/dist/icons/components/64px/Kasko64px.js +0 -44
- package/dist/icons/components/64px/LegalSupport64px.js +0 -58
- package/dist/icons/components/64px/Microphone64px.js +0 -37
- package/dist/icons/components/64px/Money64px.js +0 -60
- package/dist/icons/components/64px/PaymentSchedule64px.js +0 -39
- package/dist/icons/components/64px/PersonalManager64px.js +0 -100
- package/dist/icons/components/64px/PreApproval64px.js +0 -44
- package/dist/icons/components/64px/Questions64px.js +0 -37
- package/dist/icons/components/64px/SupportGeography64px.js +0 -51
- package/dist/icons/components/64px/Timer64px.js +0 -45
- package/dist/icons/components/64px/Twogis64px.js +0 -51
- package/dist/icons/components/64px/Vehicles64px.js +0 -45
- package/dist/icons/components/64px/Workplace64px.js +0 -38
- package/dist/styles.module-Cuqm31CO.js +0 -28
@@ -1,24 +1,25 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import v, { createContext as
|
4
|
-
import { AccordionItem as
|
5
|
-
import { EAccordionButtonType as
|
6
|
-
import { useMediaQuery as
|
7
|
-
import { EMediaQuery as
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
import {
|
16
|
-
import
|
17
|
-
|
1
|
+
import { jsxs as x, Fragment as G, jsx as h } from "react/jsx-runtime";
|
2
|
+
import { c as y } from "../../index-DIxK0V-G.js";
|
3
|
+
import v, { createContext as X, useRef as fe, Fragment as he, useReducer as Ne, useMemo as H, useId as _e, useEffect as J, useState as Se, useContext as Y, forwardRef as Re } from "react";
|
4
|
+
import { AccordionItem as Te } from "./AccordionItem/AccordionItem.js";
|
5
|
+
import { EAccordionButtonType as A, EAccordionSize as w, EAccordionLinkIconSize as ie, EAccordionIconType as Ee, EAccordionButtonIconSize as K } from "./constants.js";
|
6
|
+
import { useMediaQuery as xe } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
7
|
+
import { EMediaQuery as Ae } from "../../hooks/useMediaQuery/constants.js";
|
8
|
+
import { Link as Oe } from "../AnchorLink/Link.js";
|
9
|
+
import { Button as L } from "../Button/Button.js";
|
10
|
+
import { EButtonForm as i, EButtonVariantDefault as P, EButtonSize as Ce, EButtonVariantRound as ce } from "../Button/constants.js";
|
11
|
+
import { M as ue, W as Z, y as ee, T as Me, o as R, a as te, H as ne, I as be, $ as Fe, b as Le, D as de, u as He, c as O } from "../../keyboard-wis2TUql.js";
|
12
|
+
import { w as We } from "../../use-active-press-CnDeVvQq.js";
|
13
|
+
import { e as Ve } from "../../use-resolve-button-type-DhFdPxnv.js";
|
14
|
+
import { c as Ue, i as W, u as je, R as Qe, H as Ge, s as Ke } from "../../open-closed-CJijMeI2.js";
|
15
|
+
import { C as Xe } from "../../close-provider-CEutdhG8.js";
|
16
|
+
import { r as Je } from "../../bugs-diTMAGNw.js";
|
17
|
+
import '../../assets/Accordion.css';var pe;
|
18
|
+
let Ye = (pe = v.startTransition) != null ? pe : function(e) {
|
18
19
|
e();
|
19
20
|
};
|
20
|
-
var
|
21
|
-
let
|
21
|
+
var Ze = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Ze || {}), et = ((e) => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.SetButtonElement = 4] = "SetButtonElement", e[e.SetPanelElement = 5] = "SetPanelElement", e))(et || {});
|
22
|
+
let tt = { 0: (e) => ({ ...e, disclosureState: te(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 2(e, t) {
|
22
23
|
return e.buttonId === t.buttonId ? e : { ...e, buttonId: t.buttonId };
|
23
24
|
}, 3(e, t) {
|
24
25
|
return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
|
@@ -26,262 +27,335 @@ let Ue = { 0: (e) => ({ ...e, disclosureState: z(e.disclosureState, { 0: 1, 1: 0
|
|
26
27
|
return e.buttonElement === t.element ? e : { ...e, buttonElement: t.element };
|
27
28
|
}, 5(e, t) {
|
28
29
|
return e.panelElement === t.element ? e : { ...e, panelElement: t.element };
|
29
|
-
} },
|
30
|
-
|
31
|
-
function
|
32
|
-
let t =
|
30
|
+
} }, oe = X(null);
|
31
|
+
oe.displayName = "DisclosureContext";
|
32
|
+
function re(e) {
|
33
|
+
let t = Y(oe);
|
33
34
|
if (t === null) {
|
34
|
-
let
|
35
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
35
|
+
let r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
36
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r, re), r;
|
36
37
|
}
|
37
38
|
return t;
|
38
39
|
}
|
39
|
-
let
|
40
|
-
|
41
|
-
function
|
42
|
-
let t =
|
40
|
+
let ae = X(null);
|
41
|
+
ae.displayName = "DisclosureAPIContext";
|
42
|
+
function ge(e) {
|
43
|
+
let t = Y(ae);
|
43
44
|
if (t === null) {
|
44
|
-
let
|
45
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
45
|
+
let r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
46
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r, ge), r;
|
46
47
|
}
|
47
48
|
return t;
|
48
49
|
}
|
49
|
-
let
|
50
|
-
|
51
|
-
function
|
52
|
-
return
|
50
|
+
let se = X(null);
|
51
|
+
se.displayName = "DisclosurePanelContext";
|
52
|
+
function nt() {
|
53
|
+
return Y(se);
|
53
54
|
}
|
54
|
-
function
|
55
|
-
return
|
55
|
+
function ot(e, t) {
|
56
|
+
return te(t.type, tt, e, t);
|
56
57
|
}
|
57
|
-
let
|
58
|
-
function
|
59
|
-
let { defaultOpen:
|
60
|
-
|
61
|
-
}, e.as === void 0 || e.as ===
|
62
|
-
|
63
|
-
let
|
64
|
-
if (!
|
65
|
-
let E =
|
58
|
+
let rt = he;
|
59
|
+
function at(e, t) {
|
60
|
+
let { defaultOpen: r = !1, ...p } = e, c = fe(null), m = ee(t, Me((d) => {
|
61
|
+
c.current = d;
|
62
|
+
}, e.as === void 0 || e.as === he)), f = Ne(ot, { disclosureState: r ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: n, buttonId: s }, g] = f, a = R((d) => {
|
63
|
+
g({ type: 1 });
|
64
|
+
let S = He(c);
|
65
|
+
if (!S || !s) return;
|
66
|
+
let E = d ? d instanceof HTMLElement ? d : d.current instanceof HTMLElement ? d.current : S.getElementById(s) : S.getElementById(s);
|
66
67
|
E == null || E.focus();
|
67
|
-
}),
|
68
|
-
return v.createElement(
|
68
|
+
}), _ = H(() => ({ close: a }), [a]), I = H(() => ({ open: n === 0, close: a }), [n, a]), k = { ref: m };
|
69
|
+
return v.createElement(oe.Provider, { value: f }, v.createElement(ae.Provider, { value: _ }, v.createElement(Xe, { value: a }, v.createElement(Ue, { value: te(n, { 0: W.Open, 1: W.Closed }) }, ne({ ourProps: k, theirProps: p, slot: I, defaultTag: rt, name: "Disclosure" })))));
|
69
70
|
}
|
70
|
-
let
|
71
|
-
function
|
72
|
-
let
|
73
|
-
if (!
|
74
|
-
})),
|
75
|
-
|
76
|
-
if (!
|
77
|
-
|
71
|
+
let st = "button";
|
72
|
+
function lt(e, t) {
|
73
|
+
let r = _e(), { id: p = `headlessui-disclosure-button-${r}`, disabled: c = !1, autoFocus: m = !1, ...f } = e, [n, s] = re("Disclosure.Button"), g = nt(), a = g === null ? !1 : g === n.panelId, _ = fe(null), I = ee(_, t, R((u) => {
|
74
|
+
if (!a) return s({ type: 4, element: u });
|
75
|
+
})), k = be();
|
76
|
+
J(() => {
|
77
|
+
if (!a) return s({ type: 2, buttonId: p }), () => {
|
78
|
+
s({ type: 2, buttonId: null });
|
78
79
|
};
|
79
|
-
}, [
|
80
|
-
let
|
81
|
-
var
|
82
|
-
if (
|
80
|
+
}, [p, s, a]);
|
81
|
+
let d = R((u) => {
|
82
|
+
var b;
|
83
|
+
if (a) {
|
83
84
|
if (n.disclosureState === 1) return;
|
84
|
-
switch (
|
85
|
-
case
|
86
|
-
case
|
87
|
-
|
85
|
+
switch (u.key) {
|
86
|
+
case O.Space:
|
87
|
+
case O.Enter:
|
88
|
+
u.preventDefault(), u.stopPropagation(), s({ type: 0 }), (b = n.buttonElement) == null || b.focus();
|
88
89
|
break;
|
89
90
|
}
|
90
|
-
} else switch (
|
91
|
-
case
|
92
|
-
case
|
93
|
-
|
91
|
+
} else switch (u.key) {
|
92
|
+
case O.Space:
|
93
|
+
case O.Enter:
|
94
|
+
u.preventDefault(), u.stopPropagation(), s({ type: 0 });
|
94
95
|
break;
|
95
96
|
}
|
96
|
-
}),
|
97
|
-
switch (
|
98
|
-
case
|
99
|
-
|
97
|
+
}), S = R((u) => {
|
98
|
+
switch (u.key) {
|
99
|
+
case O.Space:
|
100
|
+
u.preventDefault();
|
100
101
|
break;
|
101
102
|
}
|
102
|
-
}), E =
|
103
|
-
var
|
104
|
-
|
105
|
-
}), { isFocusVisible:
|
106
|
-
return
|
103
|
+
}), E = R((u) => {
|
104
|
+
var b;
|
105
|
+
Je(u.currentTarget) || c || (a ? (s({ type: 0 }), (b = n.buttonElement) == null || b.focus()) : s({ type: 0 }));
|
106
|
+
}), { isFocusVisible: $, focusProps: z } = Fe({ autoFocus: m }), { isHovered: D, hoverProps: C } = Le({ isDisabled: c }), { pressed: N, pressProps: M } = We({ disabled: c }), V = H(() => ({ open: n.disclosureState === 0, hover: D, active: N, disabled: c, focus: $, autofocus: m }), [n, D, N, $, c, m]), q = Ve(e, n.buttonElement), U = a ? de({ ref: I, type: q, disabled: c || void 0, autoFocus: m, onKeyDown: d, onClick: E }, z, C, M) : de({ ref: I, id: p, type: q, "aria-expanded": n.disclosureState === 0, "aria-controls": n.panelElement ? n.panelId : void 0, disabled: c || void 0, autoFocus: m, onKeyDown: d, onKeyUp: S, onClick: E }, z, C, M);
|
107
|
+
return ne({ mergeRefs: k, ourProps: U, theirProps: f, slot: V, defaultTag: st, name: "Disclosure.Button" });
|
107
108
|
}
|
108
|
-
let
|
109
|
-
function
|
110
|
-
let
|
111
|
-
|
112
|
-
}),
|
113
|
-
|
109
|
+
let it = "div", ct = ue.RenderStrategy | ue.Static;
|
110
|
+
function ut(e, t) {
|
111
|
+
let r = _e(), { id: p = `headlessui-disclosure-panel-${r}`, transition: c = !1, ...m } = e, [f, n] = re("Disclosure.Panel"), { close: s } = ge("Disclosure.Panel"), g = be(), [a, _] = Se(null), I = ee(t, R((z) => {
|
112
|
+
Ye(() => n({ type: 5, element: z }));
|
113
|
+
}), _);
|
114
|
+
J(() => (n({ type: 3, panelId: p }), () => {
|
114
115
|
n({ type: 3, panelId: null });
|
115
|
-
}), [
|
116
|
-
let
|
117
|
-
return v.createElement(
|
116
|
+
}), [p, n]);
|
117
|
+
let k = je(), [d, S] = Qe(c, a, k !== null ? (k & W.Open) === W.Open : f.disclosureState === 0), E = H(() => ({ open: f.disclosureState === 0, close: s }), [f.disclosureState, s]), $ = { ref: I, id: p, ...Ge(S) };
|
118
|
+
return v.createElement(Ke, null, v.createElement(se.Provider, { value: f.panelId }, ne({ mergeRefs: g, ourProps: $, theirProps: m, slot: E, defaultTag: it, features: ct, visible: d, name: "Disclosure.Panel" })));
|
118
119
|
}
|
119
|
-
let
|
120
|
-
const
|
121
|
-
icon:
|
122
|
-
"icon-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
"
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
"
|
134
|
-
|
135
|
-
|
136
|
-
"
|
137
|
-
|
120
|
+
let dt = Z(at), Ie = Z(lt), ke = Z(ut), pt = Object.assign(dt, { Button: Ie, Panel: ke });
|
121
|
+
const mt = "_icon_1qzmh_2", ft = "_open_1qzmh_18", ht = "_accordion_1qzmh_22", _t = "_m_1qzmh_30", St = "_s_1qzmh_34", Et = "_header_1qzmh_39", bt = "_disabled_1qzmh_51", gt = "_title_1qzmh_77", It = "_panel_1qzmh_92", kt = "_link_1qzmh_96", o = {
|
122
|
+
icon: mt,
|
123
|
+
"icon-black": "_icon-black_1qzmh_5",
|
124
|
+
"icon-white": "_icon-white_1qzmh_8",
|
125
|
+
"icon-container": "_icon-container_1qzmh_11",
|
126
|
+
open: ft,
|
127
|
+
accordion: ht,
|
128
|
+
"is-link": "_is-link_1qzmh_26",
|
129
|
+
"with-side-padding": "_with-side-padding_1qzmh_30",
|
130
|
+
m: _t,
|
131
|
+
s: St,
|
132
|
+
header: Et,
|
133
|
+
disabled: bt,
|
134
|
+
"header-center-aligned": "_header-center-aligned_1qzmh_55",
|
135
|
+
"header-gap-xs": "_header-gap-xs_1qzmh_58",
|
136
|
+
"header-gap-m": "_header-gap-m_1qzmh_61",
|
137
|
+
"header--gap-xl": "_header--gap-xl_1qzmh_64",
|
138
|
+
"options-counter": "_options-counter_1qzmh_68",
|
139
|
+
title: gt,
|
140
|
+
"title-container": "_title-container_1qzmh_81",
|
141
|
+
"title-uppercase": "_title-uppercase_1qzmh_88",
|
142
|
+
panel: It,
|
143
|
+
link: kt,
|
144
|
+
"link-open": "_link-open_1qzmh_100",
|
145
|
+
"m-round": "_m-round_1qzmh_134",
|
146
|
+
"s-round": "_s-round_1qzmh_138",
|
147
|
+
"wrapper-button": "_wrapper-button_1qzmh_142"
|
148
|
+
}, me = (e, t, r) => e === Ee.DROPDOWN ? t === w.S || r !== i.RoundButton ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : t === w.S ? K.S : r !== i.RoundButton ? K.S : K.M, Dt = (e, t) => e === i.RoundButton && t === w.M ? Ce.L : t, Bt = (e, t) => e === i.RoundButton ? t === w.M ? o["header-gap-m"] : o["header-gap-xs"] : o["header-gap-xl"], yt = (e, t, r) => {
|
149
|
+
if (e === i.DefaultButton) {
|
150
|
+
if (t === P.SecondaryAsphalt && r)
|
151
|
+
return P.PrimarySapphire;
|
152
|
+
if (t === P.SecondaryWhite && r)
|
153
|
+
return P.SecondaryAsphalt;
|
154
|
+
}
|
155
|
+
return e === i.RoundButton && t === ce.Black && r ? ce.Sapphire : t;
|
156
|
+
}, Pt = (e, t) => {
|
157
|
+
if (e === i.RoundButton)
|
158
|
+
return t === w.M ? o["m-round"] : o["s-round"];
|
159
|
+
}, Wt = Re(
|
138
160
|
({
|
139
161
|
title: e,
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
iconType:
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
162
|
+
optionsCount: t,
|
163
|
+
disabled: r,
|
164
|
+
buttonType: p = A.BUTTON,
|
165
|
+
children: c,
|
166
|
+
showTitleByDefault: m = !0,
|
167
|
+
linkClassName: f,
|
168
|
+
size: n = w.M,
|
169
|
+
titleUppercase: s,
|
170
|
+
iconType: g = Ee.ARROW,
|
171
|
+
formButton: a = i.DefaultButton,
|
172
|
+
variantButton: _ = P.SecondaryWhite,
|
173
|
+
classNameTitle: I,
|
174
|
+
classNameContent: k,
|
175
|
+
classNameAccordion: d,
|
176
|
+
classNameIconButton: S,
|
177
|
+
subtitleNode: E,
|
178
|
+
onlyOpenSubtitleNode: $,
|
179
|
+
classNameSubtitleContainer: z,
|
180
|
+
activeKey: D,
|
181
|
+
defaultActiveKey: C,
|
182
|
+
onChange: N,
|
183
|
+
withSidePadding: M = !1
|
184
|
+
}, V) => {
|
185
|
+
const q = D !== void 0, [U, u] = Se(
|
186
|
+
() => !!C
|
187
|
+
), b = q ? !!D : U, De = xe(Ae.XS1), B = p === A.LINK, Be = {
|
188
|
+
[o["is-link"]]: B
|
164
189
|
};
|
165
|
-
|
166
|
-
|
167
|
-
}, [
|
168
|
-
const
|
169
|
-
if (
|
190
|
+
J(() => {
|
191
|
+
q && u(!!D);
|
192
|
+
}, [D, q]);
|
193
|
+
const ye = () => {
|
194
|
+
if (r)
|
170
195
|
return;
|
171
|
-
const
|
172
|
-
|
173
|
-
},
|
196
|
+
const l = !b;
|
197
|
+
N == null || N(l), q || u(l);
|
198
|
+
}, Pe = n === w.S ? ie.S : ie.M, we = (l) => ({
|
174
199
|
variant: "anchor",
|
175
|
-
size:
|
200
|
+
size: De ? "s" : "l",
|
176
201
|
rightIcon: {
|
177
|
-
iconName:
|
178
|
-
className:
|
179
|
-
[
|
202
|
+
iconName: Pe,
|
203
|
+
className: y({
|
204
|
+
[o["link-open"]]: l
|
180
205
|
})
|
181
206
|
}
|
182
|
-
}),
|
183
|
-
const
|
184
|
-
switch (
|
185
|
-
case
|
207
|
+
}), $e = (l) => {
|
208
|
+
const j = me(g, n, a), qe = Dt(a, n), F = yt(a, _, l);
|
209
|
+
switch (p) {
|
210
|
+
case A.LINK:
|
186
211
|
return e;
|
187
|
-
case
|
188
|
-
|
189
|
-
|
212
|
+
case A.BUTTON: {
|
213
|
+
const le = y(o.icon, {
|
214
|
+
[o["icon-black"]]: _ === P.SecondaryWhite && !l,
|
215
|
+
[o["icon-white"]]: _ === P.SecondaryAsphalt || _ === P.SecondaryWhite && l
|
216
|
+
}), Q = {
|
217
|
+
disabled: r,
|
218
|
+
className: y(l && o.open, S),
|
219
|
+
"data-testid": "accordion-button",
|
220
|
+
isIconButton: !0,
|
221
|
+
iconName: j,
|
222
|
+
iconButtonClassName: le,
|
223
|
+
size: qe
|
224
|
+
};
|
225
|
+
let T;
|
226
|
+
switch (a) {
|
227
|
+
case i.RoundButton: {
|
228
|
+
const ze = {
|
229
|
+
form: i.RoundButton,
|
230
|
+
variant: F,
|
231
|
+
disabled: r,
|
232
|
+
className: y(
|
233
|
+
o["icon-container"],
|
234
|
+
l && o.open,
|
235
|
+
S
|
236
|
+
),
|
237
|
+
isIconButton: !0,
|
238
|
+
iconName: me(g, n, a),
|
239
|
+
iconButtonClassName: le,
|
240
|
+
size: n === w.M ? "l" : "s"
|
241
|
+
};
|
242
|
+
T = /* @__PURE__ */ h(L, { ...ze, "data-testid": "accordion-button" });
|
243
|
+
break;
|
244
|
+
}
|
245
|
+
case i.OutlineButton:
|
246
|
+
T = /* @__PURE__ */ h(
|
247
|
+
L,
|
248
|
+
{
|
249
|
+
...Q,
|
250
|
+
form: i.OutlineButton,
|
251
|
+
variant: F
|
252
|
+
}
|
253
|
+
);
|
254
|
+
break;
|
255
|
+
case i.BorderlessButton:
|
256
|
+
T = /* @__PURE__ */ h(
|
257
|
+
L,
|
258
|
+
{
|
259
|
+
...Q,
|
260
|
+
form: i.BorderlessButton,
|
261
|
+
variant: F
|
262
|
+
}
|
263
|
+
);
|
264
|
+
break;
|
265
|
+
default:
|
266
|
+
T = /* @__PURE__ */ h(
|
267
|
+
L,
|
268
|
+
{
|
269
|
+
...Q,
|
270
|
+
form: i.DefaultButton,
|
271
|
+
variant: F
|
272
|
+
}
|
273
|
+
);
|
274
|
+
break;
|
275
|
+
}
|
276
|
+
const ve = /* @__PURE__ */ x("div", { className: o["title-container"], children: [
|
277
|
+
/* @__PURE__ */ h(
|
190
278
|
"span",
|
191
279
|
{
|
192
|
-
className:
|
193
|
-
|
194
|
-
|
195
|
-
|
280
|
+
className: y(
|
281
|
+
o.title,
|
282
|
+
I,
|
283
|
+
s && o["title-uppercase"]
|
196
284
|
),
|
197
285
|
children: e
|
198
286
|
}
|
199
287
|
),
|
200
|
-
/* @__PURE__ */
|
201
|
-
"div",
|
202
|
-
{
|
203
|
-
className: T(
|
204
|
-
u["icon-container"],
|
205
|
-
p && u.open,
|
206
|
-
t && u.disabled,
|
207
|
-
u[r],
|
208
|
-
I
|
209
|
-
),
|
210
|
-
"data-testid": "accordion-icon-container",
|
211
|
-
children: /* @__PURE__ */ b(
|
212
|
-
De,
|
213
|
-
{
|
214
|
-
iconName: H(),
|
215
|
-
className: u.icon,
|
216
|
-
"data-testid": "accordion-icon"
|
217
|
-
}
|
218
|
-
)
|
219
|
-
}
|
220
|
-
)
|
288
|
+
t !== void 0 && a !== i.RoundButton && /* @__PURE__ */ h("span", { className: o["options-counter"], children: t })
|
221
289
|
] });
|
290
|
+
return /* @__PURE__ */ x(G, { children: [
|
291
|
+
ve,
|
292
|
+
T
|
293
|
+
] });
|
294
|
+
}
|
222
295
|
default:
|
223
296
|
return null;
|
224
297
|
}
|
225
298
|
};
|
226
|
-
return /* @__PURE__ */
|
227
|
-
/* @__PURE__ */
|
299
|
+
return /* @__PURE__ */ x(G, { children: [
|
300
|
+
/* @__PURE__ */ h(
|
228
301
|
"div",
|
229
302
|
{
|
230
|
-
className:
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
303
|
+
className: y(
|
304
|
+
o.accordion,
|
305
|
+
o[n],
|
306
|
+
Be,
|
307
|
+
Pt(a, n),
|
308
|
+
M && o["with-side-padding"],
|
309
|
+
d
|
235
310
|
),
|
236
|
-
children: /* @__PURE__ */
|
237
|
-
|
311
|
+
children: /* @__PURE__ */ h(
|
312
|
+
pt,
|
238
313
|
{
|
239
|
-
ref:
|
240
|
-
defaultOpen:
|
241
|
-
children: ({ open:
|
242
|
-
(!
|
243
|
-
|
314
|
+
ref: V,
|
315
|
+
defaultOpen: b,
|
316
|
+
children: ({ open: l, close: j }) => /* @__PURE__ */ x(G, { children: [
|
317
|
+
(!l || m) && /* @__PURE__ */ h(
|
318
|
+
Ie,
|
244
319
|
{
|
245
|
-
disabled:
|
246
|
-
as:
|
247
|
-
onClick:
|
248
|
-
className:
|
249
|
-
[
|
250
|
-
[
|
251
|
-
[
|
320
|
+
disabled: r,
|
321
|
+
as: B ? Oe : A.BUTTON,
|
322
|
+
onClick: ye,
|
323
|
+
className: y({
|
324
|
+
[o.header]: !B,
|
325
|
+
[o.disabled]: r,
|
326
|
+
[Bt(a, n)]: !B,
|
327
|
+
[f ?? ""]: B && f,
|
328
|
+
[o.link]: B,
|
329
|
+
[o["header-center-aligned"]]: !B && a === i.RoundButton
|
252
330
|
}),
|
253
|
-
...
|
254
|
-
children: (!
|
331
|
+
...B ? we(l) : {},
|
332
|
+
children: (!l || m) && $e(l)
|
255
333
|
}
|
256
334
|
),
|
257
|
-
|
258
|
-
|
335
|
+
l && /* @__PURE__ */ h(
|
336
|
+
ke,
|
259
337
|
{
|
260
338
|
"data-testid": "accordion-panel",
|
261
|
-
className:
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
)
|
266
|
-
children: /* @__PURE__ */ b(Ie, { size: a, children: typeof d == "function" ? d({
|
267
|
-
open: p,
|
268
|
-
close: H
|
269
|
-
}) : d })
|
339
|
+
className: y(o.panel, k),
|
340
|
+
children: /* @__PURE__ */ h(Te, { size: n, children: typeof c == "function" ? c({
|
341
|
+
open: l,
|
342
|
+
close: j
|
343
|
+
}) : c })
|
270
344
|
}
|
271
345
|
)
|
272
346
|
] })
|
273
347
|
},
|
274
|
-
|
348
|
+
D ? String(b) : void 0
|
275
349
|
)
|
276
350
|
}
|
277
351
|
),
|
278
|
-
(
|
279
|
-
|
280
|
-
|
352
|
+
(E || $) && /* @__PURE__ */ x("div", { className: z, children: [
|
353
|
+
E,
|
354
|
+
b && $
|
281
355
|
] })
|
282
356
|
] });
|
283
357
|
}
|
284
358
|
);
|
285
359
|
export {
|
286
|
-
|
360
|
+
Wt as Accordion
|
287
361
|
};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
2
|
import { c } from "../../../index-DIxK0V-G.js";
|
3
|
-
import '../../../assets/AccordionItem.css';const e = "
|
3
|
+
import '../../../assets/AccordionItem.css';const e = "_item_1lxuq_2", _ = "_m_1lxuq_11", i = "_s_1lxuq_16", s = {
|
4
4
|
item: e,
|
5
5
|
m: _,
|
6
6
|
s: i
|
7
|
-
},
|
7
|
+
}, l = ({ children: m, size: t }) => /* @__PURE__ */ o("div", { className: c(s.item, s[t]), children: m });
|
8
8
|
export {
|
9
|
-
|
9
|
+
l as AccordionItem
|
10
10
|
};
|
@@ -14,10 +14,6 @@ export declare enum EAccordionLinkIconSize {
|
|
14
14
|
M = "DropdownArrowDown24px",
|
15
15
|
S = "DropdownArrowBottom16px"
|
16
16
|
}
|
17
|
-
export declare enum EAccordionButtonStyle {
|
18
|
-
CIRCLE = "circle",
|
19
|
-
SQUARE = "square"
|
20
|
-
}
|
21
17
|
export declare enum EAccordionIconType {
|
22
18
|
ARROW = "arrow",
|
23
19
|
DROPDOWN = "dropdown"
|
@@ -1,9 +1,8 @@
|
|
1
|
-
var w = /* @__PURE__ */ ((r) => (r.M = "m", r.S = "s", r))(w || {}),
|
1
|
+
var w = /* @__PURE__ */ ((r) => (r.M = "m", r.S = "s", r))(w || {}), D = /* @__PURE__ */ ((r) => (r.BUTTON = "button", r.LINK = "link", r))(D || {}), a = /* @__PURE__ */ ((r) => (r.M = "ArrowDown24px", r.S = "ArrowDown16px", r))(a || {}), p = /* @__PURE__ */ ((r) => (r.M = "DropdownArrowDown24px", r.S = "DropdownArrowBottom16px", r))(p || {}), t = /* @__PURE__ */ ((r) => (r.ARROW = "arrow", r.DROPDOWN = "dropdown", r))(t || {});
|
2
2
|
export {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
u as EAccordionIconType,
|
3
|
+
a as EAccordionButtonIconSize,
|
4
|
+
D as EAccordionButtonType,
|
5
|
+
t as EAccordionIconType,
|
7
6
|
p as EAccordionLinkIconSize,
|
8
7
|
w as EAccordionSize
|
9
8
|
};
|