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