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.
Files changed (158) hide show
  1. package/dist/Input-BU_6U1CW.js +227 -0
  2. package/dist/assets/Accordion.css +1 -1
  3. package/dist/assets/AccordionItem.css +1 -1
  4. package/dist/assets/Avatar.css +1 -1
  5. package/dist/assets/Button.css +1 -1
  6. package/dist/assets/CheckboxMimir.css +1 -1
  7. package/dist/assets/Chip.css +1 -1
  8. package/dist/assets/ClearButton.css +1 -0
  9. package/dist/assets/Drawer.css +1 -1
  10. package/dist/assets/GosZnak.css +1 -1
  11. package/dist/assets/Input.css +1 -1
  12. package/dist/assets/InputPassword.css +1 -1
  13. package/dist/assets/InputRangeSlider.css +1 -1
  14. package/dist/assets/Link.css +1 -1
  15. package/dist/assets/ListFiles.css +1 -1
  16. package/dist/assets/ListPhotos.css +1 -1
  17. package/dist/assets/MessageShortReply.css +1 -1
  18. package/dist/assets/MultiSelectSearch.css +1 -1
  19. package/dist/assets/NotificationBadge.css +1 -1
  20. package/dist/assets/OtpInput.css +1 -1
  21. package/dist/assets/Pagination.css +1 -1
  22. package/dist/assets/SelectSearch.css +1 -1
  23. package/dist/assets/hooks.css +1 -1
  24. package/dist/assets/index.css +1 -1
  25. package/dist/assets/styles.css +1 -1
  26. package/dist/components/Accordion/Accordion.d.ts +3 -10
  27. package/dist/components/Accordion/Accordion.js +212 -286
  28. package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
  29. package/dist/components/Accordion/constants.d.ts +4 -0
  30. package/dist/components/Accordion/constants.js +5 -4
  31. package/dist/components/AnchorLink/Link.js +20 -21
  32. package/dist/components/Avatar/Avatar.js +26 -26
  33. package/dist/components/Button/Button.js +87 -110
  34. package/dist/components/Button/constants.d.ts +2 -8
  35. package/dist/components/Button/constants.js +5 -6
  36. package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +0 -2
  37. package/dist/components/CheckboxMimir/CheckboxMimir.js +35 -37
  38. package/dist/components/Chip/Chip.js +17 -17
  39. package/dist/components/DatePicker/DatePicker.d.ts +0 -8
  40. package/dist/components/DatePicker/DatePicker.js +169 -182
  41. package/dist/components/DatePicker/DatePickerModal.js +98 -134
  42. package/dist/components/DatePicker/MonthPickerModal.js +95 -115
  43. package/dist/components/DatePicker/YearPickerModal.js +89 -109
  44. package/dist/components/DatePicker/constants.d.ts +1 -1
  45. package/dist/components/DatePicker/constants.js +7 -6
  46. package/dist/components/DatePicker/hooks.d.ts +1 -2
  47. package/dist/components/DatePicker/hooks.js +13 -13
  48. package/dist/components/Drawer/Drawer.js +138 -172
  49. package/dist/components/Dropdown/Dropdown.js +1 -1
  50. package/dist/components/Dropdown/hooks.js +1 -1
  51. package/dist/components/GosZnak/GosZnak.js +38 -47
  52. package/dist/components/Input/Input.d.ts +0 -4
  53. package/dist/components/Input/Input.js +2 -2
  54. package/dist/components/Input/index.js +1 -1
  55. package/dist/components/{MiniButton/MiniButton.d.ts → InputClearButton/ClearButton.d.ts} +8 -17
  56. package/dist/components/InputClearButton/ClearButton.js +41 -0
  57. package/dist/components/InputClearButton/constants.d.ts +8 -0
  58. package/dist/components/InputClearButton/constants.js +5 -0
  59. package/dist/components/InputClearButton/index.d.ts +4 -0
  60. package/dist/components/InputClearButton/index.js +6 -0
  61. package/dist/components/InputPassword/InputPassword.js +42 -38
  62. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  63. package/dist/components/InputRangeSlider/InputRangeSlider.js +139 -159
  64. package/dist/components/InputRangeSlider/constants.d.ts +0 -5
  65. package/dist/components/InputRangeSlider/constants.js +6 -11
  66. package/dist/components/ListFiles/ListFiles.js +39 -41
  67. package/dist/components/ListPhotos/ListPhotos.js +18 -17
  68. package/dist/components/MessageShortReply/MessageShortReply.js +34 -34
  69. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +152 -153
  70. package/dist/components/MultiSelectSearch/constants.d.ts +0 -1
  71. package/dist/components/MultiSelectSearch/constants.js +7 -7
  72. package/dist/components/MultiSelectSearch/utils.d.ts +1 -1
  73. package/dist/components/MultiSelectSearch/utils.js +16 -18
  74. package/dist/components/NotificationBadge/NotificationBadge.js +33 -49
  75. package/dist/components/NotificationBadge/constants.d.ts +2 -9
  76. package/dist/components/NotificationBadge/constants.js +2 -3
  77. package/dist/components/NotificationBadge/types.d.ts +1 -11
  78. package/dist/components/OtpInput/OtpInput.js +40 -44
  79. package/dist/components/OtpInput/constants.d.ts +0 -4
  80. package/dist/components/OtpInput/constants.js +4 -6
  81. package/dist/components/OtpInput/index.d.ts +0 -1
  82. package/dist/components/OtpInput/index.js +0 -2
  83. package/dist/components/Pagination/Pagination.js +23 -23
  84. package/dist/components/SelectSearch/SelectSearch.js +241 -241
  85. package/dist/components/SelectSearch/utils.d.ts +1 -1
  86. package/dist/components/SelectSearch/utils.js +1 -1
  87. package/dist/components/Slider/Slider.d.ts +5 -1
  88. package/dist/components/Slider/Slider.js +36 -34
  89. package/dist/components/TextArea/TextArea.js +1 -1
  90. package/dist/components/index.d.ts +1 -3
  91. package/dist/components/index.js +51 -55
  92. package/dist/hooks-HgN6Yauq.js +117 -0
  93. package/dist/icons/Icon.js +1 -1
  94. package/dist/icons/components/64px/AdvancePaymentDiscount64px.js +59 -0
  95. package/dist/icons/components/64px/AtsVendors64px.js +37 -0
  96. package/dist/icons/components/64px/ButtonOn64px.js +31 -0
  97. package/dist/icons/components/64px/BuyoutAuto64px.js +45 -0
  98. package/dist/icons/components/64px/CarAssistance64px.js +44 -0
  99. package/dist/icons/components/64px/CarDelivery64px.js +37 -0
  100. package/dist/icons/components/64px/CarSearchReturn64px.js +45 -0
  101. package/dist/icons/components/64px/CarService64px.js +37 -0
  102. package/dist/icons/components/64px/Case64px.js +33 -0
  103. package/dist/icons/components/64px/CoatOfArms64px.js +149 -0
  104. package/dist/icons/components/64px/CoffeeCup64px.js +44 -0
  105. package/dist/icons/components/64px/Cup64px.js +38 -0
  106. package/dist/icons/components/64px/ExpertAdvice64px.js +40 -0
  107. package/dist/icons/components/64px/Fines64px.js +88 -0
  108. package/dist/icons/components/64px/Fuel64px.js +38 -0
  109. package/dist/icons/components/64px/GazprombankIcon24px.js +21 -0
  110. package/dist/icons/components/64px/Kasko64px.js +44 -0
  111. package/dist/icons/components/64px/LegalSupport64px.js +58 -0
  112. package/dist/icons/components/64px/Microphone64px.js +37 -0
  113. package/dist/icons/components/64px/Money64px.js +60 -0
  114. package/dist/icons/components/64px/PaymentSchedule64px.js +39 -0
  115. package/dist/icons/components/64px/PersonalManager64px.js +100 -0
  116. package/dist/icons/components/64px/PreApproval64px.js +44 -0
  117. package/dist/icons/components/64px/Questions64px.js +37 -0
  118. package/dist/icons/components/64px/SupportGeography64px.js +51 -0
  119. package/dist/icons/components/64px/Timer64px.js +45 -0
  120. package/dist/icons/components/64px/Twogis64px.js +51 -0
  121. package/dist/icons/components/64px/Vehicles64px.js +45 -0
  122. package/dist/icons/components/64px/Workplace64px.js +38 -0
  123. package/dist/icons/components/index.js +591 -564
  124. package/dist/{index-DrVFMaBi.js → index-C2dQUuc9.js} +1346 -1184
  125. package/dist/index.js +69 -73
  126. package/dist/styles.module-Cuqm31CO.js +28 -0
  127. package/package.json +1 -1
  128. package/dist/Input-CGZoshMl.js +0 -224
  129. package/dist/assets/CarBodyButton.css +0 -1
  130. package/dist/assets/MiniButton.css +0 -1
  131. package/dist/assets/RoundButton.css +0 -1
  132. package/dist/assets/ScrollWrapper.css +0 -1
  133. package/dist/components/CarBodyButton/CarBodyButton.d.ts +0 -26
  134. package/dist/components/CarBodyButton/CarBodyButton.js +0 -40
  135. package/dist/components/CarBodyButton/index.d.ts +0 -1
  136. package/dist/components/CarBodyButton/index.js +0 -4
  137. package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.d.ts +0 -11
  138. package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.js +0 -27
  139. package/dist/components/GosZnak/utils.d.ts +0 -6
  140. package/dist/components/GosZnak/utils.js +0 -15
  141. package/dist/components/MiniButton/MiniButton.js +0 -44
  142. package/dist/components/MiniButton/constants.d.ts +0 -9
  143. package/dist/components/MiniButton/constants.js +0 -5
  144. package/dist/components/MiniButton/index.d.ts +0 -4
  145. package/dist/components/MiniButton/index.js +0 -6
  146. package/dist/components/NotificationBadge/utils.d.ts +0 -8
  147. package/dist/components/NotificationBadge/utils.js +0 -4
  148. package/dist/components/RoundButton/RoundButton.d.ts +0 -82
  149. package/dist/components/RoundButton/RoundButton.js +0 -69
  150. package/dist/components/RoundButton/constants.d.ts +0 -11
  151. package/dist/components/RoundButton/constants.js +0 -5
  152. package/dist/components/RoundButton/index.d.ts +0 -2
  153. package/dist/components/RoundButton/index.js +0 -7
  154. package/dist/components/RoundButton/types.d.ts +0 -20
  155. package/dist/hooks-Cd4Ez6_j.js +0 -117
  156. package/dist/icons/components/16px/DropdownArrowDown16px.js +0 -23
  157. package/dist/icons/components/24px/EyeClosed24px.js +0 -65
  158. package/dist/styles.module-BfkM1-KJ.js +0 -32
@@ -1,25 +1,24 @@
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) {
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 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) {
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
- } }, oe = X(null);
31
- oe.displayName = "DisclosureContext";
32
- function re(e) {
33
- let t = Y(oe);
29
+ } }, X = q(null);
30
+ X.displayName = "DisclosureContext";
31
+ function G(e) {
32
+ let t = W(X);
34
33
  if (t === null) {
35
- let r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
36
- throw Error.captureStackTrace && Error.captureStackTrace(r, re), r;
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 ae = X(null);
41
- ae.displayName = "DisclosureAPIContext";
42
- function ge(e) {
43
- let t = Y(ae);
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 r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
46
- throw Error.captureStackTrace && Error.captureStackTrace(r, ge), r;
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 se = X(null);
51
- se.displayName = "DisclosurePanelContext";
52
- function nt() {
53
- return Y(se);
49
+ let Y = q(null);
50
+ Y.displayName = "DisclosurePanelContext";
51
+ function qe() {
52
+ return W(Y);
54
53
  }
55
- function ot(e, t) {
56
- return te(t.type, tt, e, t);
54
+ function je(e, t) {
55
+ return z(t.type, Ue, e, t);
57
56
  }
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);
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
- }), _ = 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" })))));
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 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 });
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
- }, [p, s, a]);
81
- let d = R((u) => {
82
- var b;
83
- if (a) {
79
+ }, [d, r, l]);
80
+ let c = g((o) => {
81
+ var k;
82
+ if (l) {
84
83
  if (n.disclosureState === 1) return;
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();
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 (u.key) {
92
- case O.Space:
93
- case O.Enter:
94
- u.preventDefault(), u.stopPropagation(), s({ type: 0 });
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
- }), S = R((u) => {
98
- switch (u.key) {
99
- case O.Space:
100
- u.preventDefault();
96
+ }), f = g((o) => {
97
+ switch (o.key) {
98
+ case B.Space:
99
+ o.preventDefault();
101
100
  break;
102
101
  }
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" });
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 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 }), () => {
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
- }), [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" })));
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 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(
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
- 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
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
- J(() => {
191
- q && u(!!D);
192
- }, [D, q]);
193
- const ye = () => {
194
- if (r)
165
+ j(() => {
166
+ D && A(!!_);
167
+ }, [_, D]);
168
+ const me = () => {
169
+ if (t)
195
170
  return;
196
- const l = !b;
197
- N == null || N(l), q || u(l);
198
- }, Pe = n === w.S ? ie.S : ie.M, we = (l) => ({
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: De ? "s" : "l",
175
+ size: F ? "s" : "l",
201
176
  rightIcon: {
202
- iconName: Pe,
203
- className: y({
204
- [o["link-open"]]: l
177
+ iconName: fe,
178
+ className: T({
179
+ [u["link-open"]]: p
205
180
  })
206
181
  }
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:
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 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(
187
+ case w.BUTTON:
188
+ return /* @__PURE__ */ C(U, { children: [
189
+ /* @__PURE__ */ b(
278
190
  "span",
279
191
  {
280
- className: y(
281
- o.title,
282
- I,
283
- s && o["title-uppercase"]
192
+ className: T(
193
+ u.title,
194
+ l,
195
+ n && u["title-uppercase"]
284
196
  ),
285
197
  children: e
286
198
  }
287
199
  ),
288
- t !== void 0 && a !== i.RoundButton && /* @__PURE__ */ h("span", { className: o["options-counter"], children: t })
289
- ] });
290
- return /* @__PURE__ */ x(G, { children: [
291
- ve,
292
- T
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__ */ x(G, { children: [
300
- /* @__PURE__ */ h(
226
+ return /* @__PURE__ */ C(U, { children: [
227
+ /* @__PURE__ */ b(
301
228
  "div",
302
229
  {
303
- className: y(
304
- o.accordion,
305
- o[n],
306
- Be,
307
- Pt(a, n),
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__ */ h(
312
- pt,
236
+ children: /* @__PURE__ */ b(
237
+ Ye,
313
238
  {
314
- ref: V,
315
- defaultOpen: b,
316
- children: ({ open: l, close: j }) => /* @__PURE__ */ x(G, { children: [
317
- (!l || m) && /* @__PURE__ */ h(
318
- Ie,
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: 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
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
- ...B ? we(l) : {},
332
- children: (!l || m) && $e(l)
253
+ ...o ? _e(p) : {},
254
+ children: (!p || s) && Ee(p)
333
255
  }
334
256
  ),
335
- l && /* @__PURE__ */ h(
336
- ke,
257
+ p && /* @__PURE__ */ b(
258
+ pe,
337
259
  {
338
260
  "data-testid": "accordion-panel",
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 })
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
- D ? String(b) : void 0
274
+ _ ? String($) : void 0
349
275
  )
350
276
  }
351
277
  ),
352
- (E || $) && /* @__PURE__ */ x("div", { className: z, children: [
353
- E,
354
- b && $
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
- Wt as Accordion
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 = "_item_1lxuq_2", _ = "_m_1lxuq_11", i = "_s_1lxuq_16", s = {
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
- }, l = ({ children: m, size: t }) => /* @__PURE__ */ o("div", { className: c(s.item, s[t]), children: m });
7
+ }, a = ({ children: m, size: t }) => /* @__PURE__ */ o("div", { className: c(s.item, s[t]), children: m });
8
8
  export {
9
- l as AccordionItem
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 || {}), 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 || {});
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
- a as EAccordionButtonIconSize,
4
- D as EAccordionButtonType,
5
- t as EAccordionIconType,
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
  };