mimir-ui-kit 1.35.2 → 1.35.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Accordion/Accordion.d.ts +5 -3
- package/dist/components/Accordion/Accordion.js +178 -174
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.js +91 -108
- package/dist/components/DatePicker/DatePickerModal.d.ts +5 -5
- package/dist/components/DatePicker/DatePickerModal.js +91 -95
- package/dist/components/DatePicker/MonthPickerModal.d.ts +4 -5
- package/dist/components/DatePicker/MonthPickerModal.js +58 -66
- package/dist/components/DatePicker/YearPickerModal.d.ts +4 -5
- package/dist/components/DatePicker/YearPickerModal.js +61 -61
- package/dist/components/DatePicker/constants.d.ts +5 -0
- package/dist/components/DatePicker/constants.js +12 -6
- package/dist/components/DatePicker/hooks.d.ts +3 -0
- package/dist/components/DatePicker/hooks.js +16 -0
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/DatePicker/utils.d.ts +4 -0
- package/dist/components/DatePicker/utils.js +6 -5
- package/dist/components/Image/Image.js +1 -1
- package/dist/styles.module-Chnn6DA-.js +24 -0
- package/package.json +1 -1
- package/dist/styles.module-BQZZ6FB1.js +0 -25
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._accordion_1k9to_2{padding-bottom:var(--accordion-space);border-bottom:1px solid var(--black-20)}._accordion_1k9to_2 svg path{fill:var(--white)}._accordion_1k9to_2._is-link_1k9to_9{border:none}._header_1k9to_13{display:flex;gap:var(--mimir-space-m);align-items:flex-start;justify-content:space-between;width:100%;font-weight:var(--mimir-font-weight-text-medium);font-family:var(--mimir-font-montserrat);text-align:left;border:none;cursor:pointer}._header_1k9to_13._disabled_1k9to_25{cursor:not-allowed}._title_1k9to_29{font-size:var(--accordion-text-size)}._title-uppercase_1k9to_32{text-transform:uppercase}._icon_1k9to_36{transition:transform .3s ease-in-out}._icon-container_1k9to_39{display:flex;align-items:center;justify-content:center;transition:background-color .3s ease-in-out}._circle_1k9to_46{min-width:var(--accordion-icon-circle-width);min-height:var(--accordion-icon-circle-height);background-color:var(--black-80);border-radius:50%}._square_1k9to_53{min-width:var(--mimir-accordion-icon-square-width);min-height:var(--mimir-accordion-icon-square-height);background-color:var(--white);border-radius:var(--mimir-control-radius)}._square_1k9to_53 svg path{fill:var(--black-100)}._circle_1k9to_46._disabled_1k9to_25,._square_1k9to_53._disabled_1k9to_25{background-color:var(--disabled);cursor:not-allowed}._circle_1k9to_46._disabled_1k9to_25 svg path,._square_1k9to_53._disabled_1k9to_25 svg path{fill:var(--white)}._panel_1k9to_73{margin-top:var(--accordion-panel-space)}._panel_1k9to_73._is-link_1k9to_9{margin-top:var(--mimir-space-xs)}._open_1k9to_80{background-color:var(--sapphire-100)}._open_1k9to_80 ._icon_1k9to_36{transform:rotate(-180deg)}._open_1k9to_80._circle_1k9to_46{background-color:var(--sapphire-100)}._open_1k9to_80._square_1k9to_53{background-color:var(--black-80)}._open_1k9to_80._square_1k9to_53 svg path{fill:var(--white)}._open_1k9to_80._circle_1k9to_46._disabled_1k9to_25,._open_1k9to_80._square_1k9to_53._disabled_1k9to_25{background-color:var(--disabled)}._open_1k9to_80._circle_1k9to_46._disabled_1k9to_25 svg path,._open_1k9to_80._square_1k9to_53._disabled_1k9to_25 svg path{fill:var(--white)}._link-open_1k9to_102{transform:rotate(-180deg)}._m_1k9to_106{--accordion-space: var(--mimir-space-xl);--accordion-text-size: var(--mimir-size-text-xl2);--accordion-icon-circle-width: var(--mimir-accordion-icon-circle-size-m);--accordion-icon-circle-height: var(--mimir-accordion-icon-circle-size-m);--mimir-accordion-icon-square-width: var( --mimir-accordion-icon-square-size-m );--mimir-accordion-icon-square-height: var( --mimir-accordion-icon-square-size-m );--accordion-panel-space: var(--mimir-space-xl)}._s_1k9to_53{--accordion-space: var(--mimir-space-m);--accordion-text-size: var(--mimir-size-text-l);--accordion-icon-circle-width: var(--mimir-accordion-icon-circle-size-s);--accordion-icon-circle-height: var(--mimir-accordion-icon-circle-size-s);--mimir-accordion-icon-square-width: var( --mimir-accordion-icon-square-size-s );--mimir-accordion-icon-square-height: var( --mimir-accordion-icon-square-size-s );--accordion-panel-space: var(--mimir-space-m)}._wrapper-button_1k9to_134{width:100%}
|
package/dist/assets/styles.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._input_yyf2c_2{padding-right:var(--mimir-space-3xl)}._input-wrapper_yyf2c_6{flex:1}._date-wrapper_yyf2c_10{position:relative;width:100%}._date-wrapper_yyf2c_10 ._inputBorderControl_yyf2c_14{border:transparent}._date-wrapper_yyf2c_10:hover ._input-wrapper_yyf2c_6{background-color:var(--input-bg-color-hover)}._date-wrapper_yyf2c_10:before{position:absolute;top:0;right:45px;bottom:0;left:0;z-index:3;cursor:pointer;content:""}._date-wrapper_yyf2c_10._editable_yyf2c_27:before{display:none}._date-wrapper_yyf2c_10 svg{cursor:pointer}[data-disabled=true] ._date-wrapper_yyf2c_10:before{cursor:auto}[data-disabled=true] ._date-wrapper_yyf2c_10 ._input-wrapper_yyf2c_6{background:var(--black-20)}[data-disabled=true] ._date-wrapper_yyf2c_10 ._input-wrapper_yyf2c_6 label,[data-disabled=true] ._date-wrapper_yyf2c_10 ._input-wrapper_yyf2c_6 input{color:var(--white)}[data-disabled=true] ._button-wrapper_yyf2c_44 svg{color:var(--white);cursor:default;fill:var(--white)}._wrapper_yyf2c_50{position:relative;display:flex;align-items:center;border-radius:var(--mimir-control-radius-s)}._wrapper_yyf2c_50._active_yyf2c_56{border-bottom:1px solid var(--citrine-100)}._button-wrapper_yyf2c_44{position:absolute;top:0;right:0;z-index:2;display:flex;justify-content:center;width:44px;height:100%;max-height:var(--button-height-xxl)}._button_yyf2c_44{align-self:center;background-color:transparent;border-radius:var(--mimir-control-radius-s)}._calendar-block_yyf2c_78{position:absolute;z-index:var(--mimir-zindex-dropdown);display:flex;flex-direction:column;width:368px;max-height:none;padding:var(--mimir-space-m);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-inter);line-height:var(--mimir-line-height-text-2xs);text-align:center;text-overflow:ellipsis;background:var(--white);border-radius:var(--mimir-control-radius-s);box-shadow:0 0 #16172705,0 2px 4px #16172705,0 6px 6px #16172705,0 15px 9px #16172703;opacity:0;transition:height .5s ease-in;font-feature-settings:"zero";font-variant-numeric:slashed-zero}._calendar-block_yyf2c_78 ._h_yyf2c_100{display:flex;width:100%;color:var(--black-100)}._calendar-block_yyf2c_78 ._b_yyf2c_44{display:grid;grid-template-columns:repeat(7,1fr)}._calendar-block_yyf2c_78 ._d_yyf2c_10{display:flex;flex:1;gap:var(--mimir-space-2xs);align-items:center;justify-content:center;color:var(--black-100);font-size:var(--mimir-size-text-l);cursor:pointer}._calendar-block_yyf2c_78 ._m_yyf2c_122,._calendar-block_yyf2c_78 ._a_yyf2c_56,._calendar-block_yyf2c_78 ._prev_yyf2c_124{width:auto;height:48px;overflow:hidden}._calendar-block_yyf2c_78 ._m_yyf2c_122{display:flex;align-items:center;justify-content:center;color:var(--disabled);font-size:var(--mimir-size-text-l)}._calendar-block_yyf2c_78 ._orange_yyf2c_138{color:var(--citrine-100)}._calendar-block_yyf2c_78 ._a_yyf2c_56{color:var(--black-100);font-size:var(--mimir-size-text-l);border-radius:var(--mimir-control-radius-s)}._calendar-block_yyf2c_78 ._a_yyf2c_56:hover{background:var(--black-10)}._calendar-block_yyf2c_78 ._a_yyf2c_56:active{color:var(--white);background:var(--sapphire-100)}._calendar-block_yyf2c_78 ._current_yyf2c_155{background:var(--sapphire-10);border-radius:var(--mimir-control-radius-s)}._calendar-block_yyf2c_78 ._monthGrid_yyf2c_160{display:grid;grid-template-columns:repeat(3,1fr)}
|
@@ -4,8 +4,6 @@ import { EAccordionButtonStyle, EAccordionButtonType, EAccordionIconType, EAccor
|
|
4
4
|
export type TProps = {
|
5
5
|
/** Заголовок аккордеона */
|
6
6
|
title: string;
|
7
|
-
/** Содержимое аккордеона */
|
8
|
-
children: ReactNode;
|
9
7
|
/** Размер аккордеона */
|
10
8
|
size?: EAccordionSize | `${EAccordionSize}`;
|
11
9
|
/** Преобразование заголовка в верхний регистр */
|
@@ -30,5 +28,9 @@ export type TProps = {
|
|
30
28
|
onlyOpenSubtitleNode?: ReactNode;
|
31
29
|
/** Дополнительный класс для контейнера subtitle */
|
32
30
|
classNameSubtitleContainer?: string;
|
31
|
+
/** Флаг, указывающий, отключен ли аккордеон. */
|
32
|
+
disabled?: boolean;
|
33
33
|
};
|
34
|
-
export declare const Accordion: import('react').ForwardRefExoticComponent<TProps &
|
34
|
+
export declare const Accordion: import('react').ForwardRefExoticComponent<TProps & {
|
35
|
+
children?: ReactNode | undefined;
|
36
|
+
} & import('react').RefAttributes<HTMLElement>>;
|
@@ -1,24 +1,24 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import
|
1
|
+
import { jsxs as A, Fragment as X, jsx as E } from "react/jsx-runtime";
|
2
|
+
import { c as h } from "../../index-DIxK0V-G.js";
|
3
|
+
import S, { createContext as F, useRef as O, Fragment as oe, useReducer as ue, useMemo as M, useId as re, useEffect as le, useContext as H, forwardRef as de, useState as pe } from "react";
|
4
4
|
import { AccordionItem as fe } from "./AccordionItem/AccordionItem.js";
|
5
|
-
import { EAccordionButtonType as
|
6
|
-
import { useMediaQuery as
|
7
|
-
import { EMediaQuery as
|
8
|
-
import { Icon as
|
5
|
+
import { EAccordionButtonType as T, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as me, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
|
6
|
+
import { useMediaQuery as ke } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
7
|
+
import { EMediaQuery as _e } from "../../hooks/useMediaQuery/constants.js";
|
8
|
+
import { Icon as Ie } from "../../icons/Icon.js";
|
9
9
|
import { Link as Pe } from "../AnchorLink/Link.js";
|
10
|
-
import { M as ee, W as
|
10
|
+
import { M as ee, W as K, y as q, T as Se, o as x, a as V, H as W, I as se, $ as be, b as ve, D as te, u as ye, c as w } from "../../keyboard-B0lm_zyn.js";
|
11
11
|
import { w as Ee } from "../../use-active-press-86hajhdd.js";
|
12
|
-
import { T as
|
13
|
-
import { c as De, i as
|
12
|
+
import { T as he } from "../../use-resolve-button-type-BAxjHhds.js";
|
13
|
+
import { c as De, i as L, u as $e, V as ge, A as Te, s as we } from "../../open-closed-Cy6VDfYc.js";
|
14
14
|
import { r as Ne } from "../../bugs-diTMAGNw.js";
|
15
15
|
import '../../assets/Accordion.css';let Re = F(() => {
|
16
16
|
});
|
17
|
-
function Ce({ value: e, children:
|
18
|
-
return
|
17
|
+
function Ce({ value: e, children: t }) {
|
18
|
+
return S.createElement(Re.Provider, { value: e }, t);
|
19
19
|
}
|
20
|
-
var
|
21
|
-
let Ae = (
|
20
|
+
var ne;
|
21
|
+
let Ae = (ne = S.startTransition) != null ? ne : function(e) {
|
22
22
|
e();
|
23
23
|
};
|
24
24
|
var Be = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Be || {}), Oe = ((e) => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.LinkPanel = 4] = "LinkPanel", e[e.UnlinkPanel = 5] = "UnlinkPanel", e))(Oe || {});
|
@@ -26,182 +26,181 @@ let xe = { 0: (e) => ({ ...e, disclosureState: V(e.disclosureState, { 0: 1, 1: 0
|
|
26
26
|
return e.linkedPanel === !0 ? e : { ...e, linkedPanel: !0 };
|
27
27
|
}, 5(e) {
|
28
28
|
return e.linkedPanel === !1 ? e : { ...e, linkedPanel: !1 };
|
29
|
-
}, 2(e,
|
30
|
-
return e.buttonId ===
|
31
|
-
}, 3(e,
|
32
|
-
return e.panelId ===
|
29
|
+
}, 2(e, t) {
|
30
|
+
return e.buttonId === t.buttonId ? e : { ...e, buttonId: t.buttonId };
|
31
|
+
}, 3(e, t) {
|
32
|
+
return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
|
33
33
|
} }, j = F(null);
|
34
34
|
j.displayName = "DisclosureContext";
|
35
35
|
function Q(e) {
|
36
|
-
let
|
37
|
-
if (
|
38
|
-
let
|
39
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
36
|
+
let t = H(j);
|
37
|
+
if (t === null) {
|
38
|
+
let s = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
39
|
+
throw Error.captureStackTrace && Error.captureStackTrace(s, Q), s;
|
40
40
|
}
|
41
|
-
return
|
41
|
+
return t;
|
42
42
|
}
|
43
43
|
let z = F(null);
|
44
44
|
z.displayName = "DisclosureAPIContext";
|
45
|
-
function
|
46
|
-
let
|
47
|
-
if (
|
48
|
-
let
|
49
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
45
|
+
function ae(e) {
|
46
|
+
let t = H(z);
|
47
|
+
if (t === null) {
|
48
|
+
let s = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
49
|
+
throw Error.captureStackTrace && Error.captureStackTrace(s, ae), s;
|
50
50
|
}
|
51
|
-
return
|
51
|
+
return t;
|
52
52
|
}
|
53
53
|
let G = F(null);
|
54
54
|
G.displayName = "DisclosurePanelContext";
|
55
55
|
function Me() {
|
56
56
|
return H(G);
|
57
57
|
}
|
58
|
-
function
|
59
|
-
return V(
|
58
|
+
function Le(e, t) {
|
59
|
+
return V(t.type, xe, e, t);
|
60
60
|
}
|
61
|
-
let
|
62
|
-
function Ue(e,
|
63
|
-
let { defaultOpen:
|
64
|
-
|
65
|
-
}, e.as === void 0 || e.as ===
|
66
|
-
|
67
|
-
let
|
68
|
-
if (!
|
69
|
-
let
|
70
|
-
|
71
|
-
}),
|
72
|
-
return
|
61
|
+
let Fe = oe;
|
62
|
+
function Ue(e, t) {
|
63
|
+
let { defaultOpen: s = !1, ...p } = e, o = O(null), f = q(t, Se((r) => {
|
64
|
+
o.current = r;
|
65
|
+
}, e.as === void 0 || e.as === oe)), d = O(null), n = O(null), l = ue(Le, { disclosureState: s ? 0 : 1, linkedPanel: !1, buttonRef: n, panelRef: d, buttonId: null, panelId: null }), [{ disclosureState: m, buttonId: a }, k] = l, i = x((r) => {
|
66
|
+
k({ type: 1 });
|
67
|
+
let P = ye(o);
|
68
|
+
if (!P || !a) return;
|
69
|
+
let v = r ? r instanceof HTMLElement ? r : r.current instanceof HTMLElement ? r.current : P.getElementById(a) : P.getElementById(a);
|
70
|
+
v == null || v.focus();
|
71
|
+
}), _ = M(() => ({ close: i }), [i]), I = M(() => ({ open: m === 0, close: i }), [m, i]), b = { ref: f };
|
72
|
+
return S.createElement(j.Provider, { value: l }, S.createElement(z.Provider, { value: _ }, S.createElement(Ce, { value: i }, S.createElement(De, { value: V(m, { 0: L.Open, 1: L.Closed }) }, W({ ourProps: b, theirProps: p, slot: I, defaultTag: Fe, name: "Disclosure" })))));
|
73
73
|
}
|
74
74
|
let He = "button";
|
75
|
-
function
|
76
|
-
let
|
77
|
-
|
78
|
-
if (!
|
79
|
-
|
75
|
+
function Ke(e, t) {
|
76
|
+
let s = re(), { id: p = `headlessui-disclosure-button-${s}`, disabled: o = !1, autoFocus: f = !1, ...d } = e, [n, l] = Q("Disclosure.Button"), m = Me(), a = m === null ? !1 : m === n.panelId, k = O(null), i = q(k, t, a ? null : n.buttonRef), _ = se();
|
77
|
+
le(() => {
|
78
|
+
if (!a) return l({ type: 2, buttonId: p }), () => {
|
79
|
+
l({ type: 2, buttonId: null });
|
80
80
|
};
|
81
|
-
}, [
|
82
|
-
let
|
83
|
-
var
|
84
|
-
if (
|
85
|
-
if (
|
86
|
-
switch (
|
87
|
-
case
|
88
|
-
case
|
89
|
-
|
81
|
+
}, [p, l, a]);
|
82
|
+
let I = x((u) => {
|
83
|
+
var g;
|
84
|
+
if (a) {
|
85
|
+
if (n.disclosureState === 1) return;
|
86
|
+
switch (u.key) {
|
87
|
+
case w.Space:
|
88
|
+
case w.Enter:
|
89
|
+
u.preventDefault(), u.stopPropagation(), l({ type: 0 }), (g = n.buttonRef.current) == null || g.focus();
|
90
90
|
break;
|
91
91
|
}
|
92
|
-
} else switch (
|
93
|
-
case
|
94
|
-
case
|
95
|
-
|
92
|
+
} else switch (u.key) {
|
93
|
+
case w.Space:
|
94
|
+
case w.Enter:
|
95
|
+
u.preventDefault(), u.stopPropagation(), l({ type: 0 });
|
96
96
|
break;
|
97
97
|
}
|
98
|
-
}),
|
99
|
-
switch (
|
100
|
-
case
|
101
|
-
|
98
|
+
}), b = x((u) => {
|
99
|
+
switch (u.key) {
|
100
|
+
case w.Space:
|
101
|
+
u.preventDefault();
|
102
102
|
break;
|
103
103
|
}
|
104
|
-
}),
|
105
|
-
var
|
106
|
-
Ne(
|
107
|
-
}), { isFocusVisible:
|
108
|
-
return W({ mergeRefs:
|
104
|
+
}), r = x((u) => {
|
105
|
+
var g;
|
106
|
+
Ne(u.currentTarget) || o || (a ? (l({ type: 0 }), (g = n.buttonRef.current) == null || g.focus()) : l({ type: 0 }));
|
107
|
+
}), { isFocusVisible: P, focusProps: v } = be({ autoFocus: f }), { isHovered: y, hoverProps: D } = ve({ isDisabled: o }), { pressed: N, pressProps: R } = Ee({ disabled: o }), U = M(() => ({ open: n.disclosureState === 0, hover: y, active: N, disabled: o, focus: P, autofocus: f }), [n, y, N, P, o, f]), C = he(e, k), $ = a ? te({ ref: i, type: C, disabled: o || void 0, autoFocus: f, onKeyDown: I, onClick: r }, v, D, R) : te({ ref: i, id: p, type: C, "aria-expanded": n.disclosureState === 0, "aria-controls": n.linkedPanel ? n.panelId : void 0, disabled: o || void 0, autoFocus: f, onKeyDown: I, onKeyUp: b, onClick: r }, v, D, R);
|
108
|
+
return W({ mergeRefs: _, ourProps: $, theirProps: d, slot: U, defaultTag: He, name: "Disclosure.Button" });
|
109
109
|
}
|
110
|
-
let
|
111
|
-
function We(e,
|
112
|
-
let
|
113
|
-
Ae(() =>
|
110
|
+
let qe = "div", Ve = ee.RenderStrategy | ee.Static;
|
111
|
+
function We(e, t) {
|
112
|
+
let s = re(), { id: p = `headlessui-disclosure-panel-${s}`, transition: o = !1, ...f } = e, [d, n] = Q("Disclosure.Panel"), { close: l } = ae("Disclosure.Panel"), m = se(), a = q(t, d.panelRef, (r) => {
|
113
|
+
Ae(() => n({ type: r ? 4 : 5 }));
|
114
114
|
});
|
115
|
-
|
116
|
-
|
117
|
-
}), [
|
118
|
-
let
|
119
|
-
return
|
115
|
+
le(() => (n({ type: 3, panelId: p }), () => {
|
116
|
+
n({ type: 3, panelId: null });
|
117
|
+
}), [p, n]);
|
118
|
+
let k = $e(), [i, _] = ge(o, d.panelRef, k !== null ? (k & L.Open) === L.Open : d.disclosureState === 0), I = M(() => ({ open: d.disclosureState === 0, close: l }), [d.disclosureState, l]), b = { ref: a, id: p, ...Te(_) };
|
119
|
+
return S.createElement(we, null, S.createElement(G.Provider, { value: d.panelId }, W({ mergeRefs: m, ourProps: b, theirProps: f, slot: I, defaultTag: qe, features: Ve, visible: i, name: "Disclosure.Panel" })));
|
120
120
|
}
|
121
|
-
let je =
|
122
|
-
const ze = "
|
121
|
+
let je = K(Ue), ce = K(Ke), ie = K(We), Qe = Object.assign(je, { Button: ce, Panel: ie });
|
122
|
+
const ze = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Xe = "_disabled_1k9to_25", Je = "_title_1k9to_29", Ye = "_icon_1k9to_36", Ze = "_circle_1k9to_46", et = "_square_1k9to_53", tt = "_panel_1k9to_73", nt = "_open_1k9to_80", ot = "_m_1k9to_106", rt = "_s_1k9to_53", c = {
|
123
123
|
accordion: ze,
|
124
|
-
"is-link": "_is-
|
124
|
+
"is-link": "_is-link_1k9to_9",
|
125
125
|
header: Ge,
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
126
|
+
disabled: Xe,
|
127
|
+
title: Je,
|
128
|
+
"title-uppercase": "_title-uppercase_1k9to_32",
|
129
|
+
icon: Ye,
|
130
|
+
"icon-container": "_icon-container_1k9to_39",
|
131
|
+
circle: Ze,
|
132
|
+
square: et,
|
133
|
+
panel: tt,
|
134
|
+
open: nt,
|
135
|
+
"link-open": "_link-open_1k9to_102",
|
136
|
+
m: ot,
|
137
|
+
s: rt,
|
138
|
+
"wrapper-button": "_wrapper-button_1k9to_134"
|
139
|
+
}, St = de(
|
139
140
|
({
|
140
141
|
title: e,
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
case C.BUTTON:
|
178
|
-
return /* @__PURE__ */ R(X, { children: [
|
179
|
-
/* @__PURE__ */ P(
|
142
|
+
disabled: t,
|
143
|
+
buttonType: s = T.BUTTON,
|
144
|
+
children: p,
|
145
|
+
size: o = B.M,
|
146
|
+
titleUppercase: f,
|
147
|
+
buttonStyle: d = me.CIRCLE,
|
148
|
+
iconType: n = Y.ARROW,
|
149
|
+
classNameTitle: l,
|
150
|
+
classNameContent: m,
|
151
|
+
classNameAccordion: a,
|
152
|
+
classNameIconButton: k,
|
153
|
+
subtitleNode: i,
|
154
|
+
onlyOpenSubtitleNode: _,
|
155
|
+
classNameSubtitleContainer: I
|
156
|
+
}, b) => {
|
157
|
+
const [r, P] = pe(!1), v = ke(_e.XS1), y = s === T.LINK, D = {
|
158
|
+
[c["is-link"]]: y
|
159
|
+
}, N = () => {
|
160
|
+
t || P(($) => !$);
|
161
|
+
}, R = o === B.S ? J.S : J.M, U = {
|
162
|
+
variant: "anchor",
|
163
|
+
size: v ? "s" : "l",
|
164
|
+
rightIcon: {
|
165
|
+
iconName: R,
|
166
|
+
className: h({
|
167
|
+
[c["link-open"]]: r
|
168
|
+
})
|
169
|
+
}
|
170
|
+
}, C = ($) => {
|
171
|
+
const u = () => n === Y.DROPDOWN ? o === B.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : o === B.S ? Z.S : Z.M;
|
172
|
+
switch (s) {
|
173
|
+
case T.LINK:
|
174
|
+
return e;
|
175
|
+
case T.BUTTON:
|
176
|
+
return /* @__PURE__ */ A(X, { children: [
|
177
|
+
/* @__PURE__ */ E(
|
180
178
|
"span",
|
181
179
|
{
|
182
|
-
className:
|
183
|
-
|
184
|
-
|
185
|
-
|
180
|
+
className: h(
|
181
|
+
c.title,
|
182
|
+
l,
|
183
|
+
f && c["title-uppercase"]
|
186
184
|
),
|
187
185
|
children: e
|
188
186
|
}
|
189
187
|
),
|
190
|
-
/* @__PURE__ */
|
188
|
+
/* @__PURE__ */ E(
|
191
189
|
"div",
|
192
190
|
{
|
193
|
-
className:
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
191
|
+
className: h(
|
192
|
+
c["icon-container"],
|
193
|
+
$ && c.open,
|
194
|
+
t && c.disabled,
|
195
|
+
c[d],
|
196
|
+
k
|
198
197
|
),
|
199
198
|
"data-testid": "accordion-icon-container",
|
200
|
-
children: /* @__PURE__ */
|
201
|
-
|
199
|
+
children: /* @__PURE__ */ E(
|
200
|
+
Ie,
|
202
201
|
{
|
203
|
-
iconName:
|
204
|
-
className:
|
202
|
+
iconName: u(),
|
203
|
+
className: c.icon,
|
205
204
|
"data-testid": "accordion-icon"
|
206
205
|
}
|
207
206
|
)
|
@@ -212,48 +211,53 @@ const ze = "_accordion_1p5o7_2", Ge = "_header_1p5o7_13", Xe = "_title_1p5o7_26"
|
|
212
211
|
return null;
|
213
212
|
}
|
214
213
|
};
|
215
|
-
return /* @__PURE__ */
|
216
|
-
/* @__PURE__ */
|
214
|
+
return /* @__PURE__ */ A(X, { children: [
|
215
|
+
/* @__PURE__ */ E(
|
217
216
|
"div",
|
218
217
|
{
|
219
|
-
className:
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
218
|
+
className: h(
|
219
|
+
c.accordion,
|
220
|
+
c[o],
|
221
|
+
D,
|
222
|
+
a
|
224
223
|
),
|
225
|
-
children: /* @__PURE__ */
|
226
|
-
/* @__PURE__ */
|
227
|
-
|
224
|
+
children: /* @__PURE__ */ A(Qe, { ref: b, children: [
|
225
|
+
/* @__PURE__ */ E(
|
226
|
+
ce,
|
228
227
|
{
|
229
|
-
|
230
|
-
|
231
|
-
|
228
|
+
disabled: t,
|
229
|
+
as: y ? Pe : T.BUTTON,
|
230
|
+
onClick: N,
|
231
|
+
className: h({
|
232
|
+
[c.header]: !y,
|
233
|
+
[c.disabled]: t
|
232
234
|
}),
|
233
|
-
|
235
|
+
...y ? U : {},
|
236
|
+
children: C(r)
|
234
237
|
}
|
235
|
-
)
|
236
|
-
|
237
|
-
|
238
|
+
),
|
239
|
+
r && /* @__PURE__ */ E(
|
240
|
+
ie,
|
238
241
|
{
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
242
|
+
"data-testid": "accordion-panel",
|
243
|
+
className: h(
|
244
|
+
c.panel,
|
245
|
+
m,
|
246
|
+
D
|
243
247
|
),
|
244
|
-
children: /* @__PURE__ */
|
248
|
+
children: /* @__PURE__ */ E(fe, { size: o, children: p })
|
245
249
|
}
|
246
250
|
)
|
247
251
|
] })
|
248
252
|
}
|
249
253
|
),
|
250
|
-
(
|
251
|
-
|
252
|
-
|
254
|
+
(i || _) && /* @__PURE__ */ A("div", { className: I, children: [
|
255
|
+
i,
|
256
|
+
r && _
|
253
257
|
] })
|
254
258
|
] });
|
255
259
|
}
|
256
260
|
);
|
257
261
|
export {
|
258
|
-
|
262
|
+
St as Accordion
|
259
263
|
};
|