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