mimir-ui-kit 1.37.12 → 1.37.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -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%}
1
+ ._icon_1yk0x_2{transition:transform .3s ease-in-out}._icon_1yk0x_2 path{fill:var(--white)}._icon-container_1yk0x_8{display:flex;align-items:center;justify-content:center;transition:background-color .3s ease-in-out}._open_1yk0x_15 ._icon_1yk0x_2{transform:rotate(-180deg)}._square_1yk0x_19 ._icon_1yk0x_2 path{fill:var(--black-100)}._circle_1yk0x_23._disabled_1yk0x_23 ._icon_1yk0x_2 path,._square_1yk0x_19._disabled_1yk0x_23 ._icon_1yk0x_2 path{fill:var(--white)}._open_1yk0x_15._square_1yk0x_19 ._icon_1yk0x_2 path{fill:var(--white)}._open_1yk0x_15._circle_1yk0x_23._disabled_1yk0x_23 ._icon_1yk0x_2 path,._open_1yk0x_15._square_1yk0x_19._disabled_1yk0x_23 ._icon_1yk0x_2 path{fill:var(--white)}._accordion_1yk0x_37{padding-bottom:var(--accordion-space);border-bottom:1px solid var(--black-20)}._accordion_1yk0x_37._is-link_1yk0x_41{border:none}._header_1yk0x_45{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_1yk0x_45._disabled_1yk0x_23{cursor:not-allowed}._title_1yk0x_61{font-size:var(--accordion-text-size)}._title-uppercase_1yk0x_64{text-transform:uppercase}._circle_1yk0x_23{min-width:var(--accordion-icon-circle-width);min-height:var(--accordion-icon-circle-height);background-color:var(--black-80);border-radius:50%}._square_1yk0x_19{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)}._circle_1yk0x_23._disabled_1yk0x_23,._square_1yk0x_19._disabled_1yk0x_23{background-color:var(--disabled);cursor:not-allowed}._panel_1yk0x_88{margin-top:var(--accordion-panel-space)}._panel_1yk0x_88._is-link_1yk0x_41{margin-top:var(--mimir-space-xs)}._open_1yk0x_15,._open_1yk0x_15._circle_1yk0x_23{background-color:var(--sapphire-100)}._open_1yk0x_15._square_1yk0x_19{background-color:var(--black-80)}._open_1yk0x_15._circle_1yk0x_23._disabled_1yk0x_23,._open_1yk0x_15._square_1yk0x_19._disabled_1yk0x_23{background-color:var(--disabled)}._link-open_1yk0x_108{transform:rotate(-180deg)}._m_1yk0x_112{--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_1yk0x_19{--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_1yk0x_140{width:100%}
@@ -1 +1 @@
1
- ._select-search_rphak_2{position:relative}._select-search_rphak_2._disabled_rphak_5{cursor:not-allowed}._container_rphak_9{display:block;gap:var(--mimir-select-search-gap);align-items:center;justify-content:space-between;height:var(--mimir-select-search-height);background-color:var(--black-5);border-radius:var(--mimir-select-search-radius)}._container-open_rphak_18{border-bottom:1px solid var(--citrine-100)}._full_rphak_22{width:100%}._selected-icon_rphak_26 path{fill:var(--sapphire-100)}._selector-icon-open_rphak_30{transform:rotate(180deg)}._button_rphak_34{display:flex;align-items:center;background:none;border:none;cursor:pointer}._button_rphak_34._disabled_rphak_5{cursor:not-allowed}._button_rphak_34._disabled_rphak_5 ._selector-icon_rphak_30 path{fill:var(--white)}._options_rphak_48{position:absolute;z-index:10;width:100%;min-height:100%;max-height:var(--mimir-select-search-options-height);overflow-y:auto;font-size:var(--mimir-size-text-l);background:var(--white);box-shadow:var(--mimir-box-shadow-select-search)}._options_rphak_48._top_rphak_59{bottom:100%;margin-bottom:1px;border-radius:var(--mimir-select-search-radius) var(--mimir-select-search-radius) 0 0}._options_rphak_48._bottom_rphak_64{top:100%;margin-top:1px;border-radius:0 0 var(--mimir-select-search-radius) var(--mimir-select-search-radius)}._options_rphak_48::-webkit-scrollbar{width:3px}._options_rphak_48::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:var(--mimir-control-radius-xs2)}._options_rphak_48::-webkit-scrollbar-track{background-color:var(--white)}@media (max-width: 600px){._options_rphak_48{max-height:var(--mimir-select-search-options-height-mobile)}}._no-options_rphak_85{height:100%;padding:var(--mimir-select-search-option-space);color:var(--black-80)}._m_rphak_91{--mimir-select-search-height: var(--mimir-select-search-height-l);--mimir-select-search-space: var(--mimir-space-xss) var(--mimir-space-m);--mimir-select-search-radius: var(--mimir-control-radius);--mimir-select-search-gap: var(--mimir-space-2xs);--mimir-select-search-btn-space: var(--mimir-space-m) var(--mimir-space-m) var(--mimir-space-m) var(--mimir-space-xs);--mimir-select-search-option-space: var(--mimir-space-2s) var(--mimir-space-m);--mimir-select-search-options-height: var( --mimir-select-search-options-height-mobile );--clear-right: var(--mimir-space-2xxl);--select-input-disabled-margin-right: var(--mimir-space-l)}._l_rphak_106{--mimir-select-search-height: var(--mimir-select-search-height-xxl);--mimir-select-search-space: var(--mimir-space-xss) var(--mimir-space-m);--mimir-select-search-radius: var(--mimir-control-radius-s);--mimir-select-search-gap: var(--mimir-space-xs);--mimir-select-search-btn-space: var(--mimir-space-l) var(--mimir-space-m) var(--mimir-space-l) var(--mimir-space-xs);--mimir-select-search-option-space: var(--mimir-space-2l) var(--mimir-space-m);--mimir-select-search-options-height: var( --mimir-select-search-options-height-desktop );--clear-right: var(--mimir-space-4xl);--select-input-disabled-margin-right: var(--mimir-space-1xl)}._select-input_rphak_121{width:100%!important}._select-input-disabled_rphak_124{margin-right:var(--select-input-disabled-margin-right)}._select-input_rphak_121:last-child{padding-right:var(--mimir-space-4xl)}._option_rphak_48{display:flex;gap:var(--mimir-space-m);align-items:center;width:100%;padding:var(--mimir-select-search-option-space);cursor:pointer;transition:background-color .2s ease-in-out}._option-active_rphak_140{background-color:var(--black-5)}._option-inner_rphak_143{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%}._right-slot_rphak_150{order:2;padding-top:0!important}._required-mark_rphak_155{order:1;margin-right:var(--mimir-space-xs)}._clear_rphak_160{position:absolute;top:50%;right:var(--clear-right);transform:translateY(-50%)}._clear_rphak_160._disabled_rphak_5{cursor:not-allowed}._clear_rphak_160._disabled_rphak_5 ._icon-button_rphak_169 path{fill:var(--white)}
1
+ ._select-search_1f5f7_2{position:relative}._select-search_1f5f7_2._disabled_1f5f7_5{cursor:not-allowed}._container_1f5f7_9{position:relative;z-index:1;display:block;gap:var(--mimir-select-search-gap);align-items:center;justify-content:space-between;height:var(--mimir-select-search-height);background-color:var(--black-5);border-radius:var(--mimir-select-search-radius)}._container-open_1f5f7_20{border-bottom:1px solid var(--citrine-100)}._full_1f5f7_24{width:100%}._selected-icon_1f5f7_28 path{fill:var(--sapphire-100)}._selector-icon-open_1f5f7_32{transform:rotate(180deg)}._button_1f5f7_36{display:flex;align-items:center;background:none;border:none;cursor:pointer}._button_1f5f7_36._disabled_1f5f7_5{cursor:not-allowed}._button_1f5f7_36._disabled_1f5f7_5 ._selector-icon_1f5f7_32 path{fill:var(--white)}._options_1f5f7_50{position:absolute;z-index:0;width:100%;min-height:100%;max-height:var(--mimir-select-search-options-height);overflow-y:auto;font-size:var(--mimir-size-text-l);background:var(--white);box-shadow:var(--mimir-box-shadow-select-search)}._options_1f5f7_50._top_1f5f7_61{bottom:90%;margin-bottom:1px;padding-bottom:5px;border-radius:var(--mimir-select-search-radius) var(--mimir-select-search-radius) 0 0}._options_1f5f7_50._bottom_1f5f7_67{top:90%;margin-top:1px;padding-top:5px;border-radius:0 0 var(--mimir-select-search-radius) var(--mimir-select-search-radius)}._options_1f5f7_50::-webkit-scrollbar{width:3px}._options_1f5f7_50::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:var(--mimir-control-radius-xs2)}._options_1f5f7_50::-webkit-scrollbar-track{background-color:var(--white)}@media (max-width: 600px){._options_1f5f7_50{max-height:var(--mimir-select-search-options-height-mobile)}}._no-options_1f5f7_89{height:100%;padding:var(--mimir-select-search-option-space);color:var(--black-80)}._m_1f5f7_95{--mimir-select-search-height: var(--mimir-select-search-height-l);--mimir-select-search-space: var(--mimir-space-xss) var(--mimir-space-m);--mimir-select-search-radius: var(--mimir-control-radius);--mimir-select-search-gap: var(--mimir-space-2xs);--mimir-select-search-btn-space: var(--mimir-space-m) var(--mimir-space-m) var(--mimir-space-m) var(--mimir-space-xs);--mimir-select-search-option-space: var(--mimir-space-2s) var(--mimir-space-m);--mimir-select-search-options-height: var( --mimir-select-search-options-height-mobile );--clear-right: var(--mimir-space-2xxl);--select-input-disabled-margin-right: var(--mimir-space-l)}._l_1f5f7_110{--mimir-select-search-height: var(--mimir-select-search-height-xxl);--mimir-select-search-space: var(--mimir-space-xss) var(--mimir-space-m);--mimir-select-search-radius: var(--mimir-control-radius-s);--mimir-select-search-gap: var(--mimir-space-xs);--mimir-select-search-btn-space: var(--mimir-space-l) var(--mimir-space-m) var(--mimir-space-l) var(--mimir-space-xs);--mimir-select-search-option-space: var(--mimir-space-2l) var(--mimir-space-m);--mimir-select-search-options-height: var( --mimir-select-search-options-height-desktop );--clear-right: var(--mimir-space-4xl);--select-input-disabled-margin-right: var(--mimir-space-1xl)}._select-input_1f5f7_125{width:100%!important}._select-input-disabled_1f5f7_128{margin-right:var(--select-input-disabled-margin-right)}._select-input_1f5f7_125:last-child{padding-right:var(--mimir-space-4xl)}._option_1f5f7_50{display:flex;gap:var(--mimir-space-m);align-items:center;width:100%;padding:var(--mimir-select-search-option-space);cursor:pointer;transition:background-color .2s ease-in-out}._option-active_1f5f7_144{background-color:var(--black-5)}._option-inner_1f5f7_147{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%}._right-slot_1f5f7_154{order:2;padding-top:0!important}._required-mark_1f5f7_159{order:1;margin-right:var(--mimir-space-xs)}._clear_1f5f7_164{position:absolute;top:50%;right:var(--clear-right);transform:translateY(-50%)}._clear_1f5f7_164._disabled_1f5f7_5{cursor:not-allowed}._clear_1f5f7_164._disabled_1f5f7_5 ._icon-button_1f5f7_173 path{fill:var(--white)}
@@ -1,24 +1,24 @@
1
- import { jsxs as B, Fragment as K, jsx as b } from "react/jsx-runtime";
2
- import { c as $ } from "../../index-DIxK0V-G.js";
3
- import v, { createContext as M, useRef as ne, Fragment as re, useReducer as pe, useMemo as O, useId as le, useEffect as se, useState as ae, useContext as U, forwardRef as me } from "react";
1
+ import { jsxs as A, Fragment as K, jsx as I } from "react/jsx-runtime";
2
+ import { c as D } from "../../index-DIxK0V-G.js";
3
+ import b, { createContext as M, useRef as oe, Fragment as re, useReducer as pe, useMemo as O, useId as le, useEffect as se, useState as ae, useContext as U, forwardRef as me } from "react";
4
4
  import { AccordionItem as fe } from "./AccordionItem/AccordionItem.js";
5
- import { EAccordionButtonType as T, EAccordionSize as x, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
6
- import { useMediaQuery as Ee } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
- import { EMediaQuery as Se } from "../../hooks/useMediaQuery/constants.js";
8
- import { Icon as ke } from "../../icons/Icon.js";
9
- import { Link as Ie } from "../AnchorLink/Link.js";
10
- import { M as ee, W as q, y as j, T as be, o as P, a as W, H as Q, I as ce, $ as ve, b as ye, D as te, u as he, c as w } from "../../keyboard-mgWkd2Vh.js";
11
- import { w as De } from "../../use-active-press-CqLGIFz7.js";
12
- import { e as $e } from "../../use-resolve-button-type-DhFdPxnv.js";
13
- import { c as Pe, i as R, u as ge, x as Te, R as we, s as Ne } from "../../open-closed-D2VjDhAN.js";
14
- import { r as Ce } from "../../bugs-diTMAGNw.js";
15
- import '../../assets/Accordion.css';let Ae = M(() => {
5
+ import { EAccordionButtonType as g, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
6
+ import { useMediaQuery as ye } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
+ import { EMediaQuery as Ee } from "../../hooks/useMediaQuery/constants.js";
8
+ import { Icon as Se } from "../../icons/Icon.js";
9
+ import { Link as ke } from "../AnchorLink/Link.js";
10
+ import { M as ee, W as q, y as j, T as Ie, o as $, a as W, H as Q, I as ce, $ as be, b as ve, D as te, u as xe, c as T } from "../../keyboard-mgWkd2Vh.js";
11
+ import { w as he } from "../../use-active-press-CqLGIFz7.js";
12
+ import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
13
+ import { c as $e, i as R, u as Pe, x as ge, R as Te, s as we } from "../../open-closed-D2VjDhAN.js";
14
+ import { r as Ne } from "../../bugs-diTMAGNw.js";
15
+ import '../../assets/Accordion.css';let Ce = M(() => {
16
16
  });
17
- function Be({ value: e, children: t }) {
18
- return v.createElement(Ae.Provider, { value: e }, t);
17
+ function Ae({ value: e, children: t }) {
18
+ return b.createElement(Ce.Provider, { value: e }, t);
19
19
  }
20
- var oe;
21
- let xe = (oe = v.startTransition) != null ? oe : function(e) {
20
+ var ne;
21
+ let Be = (ne = b.startTransition) != null ? ne : function(e) {
22
22
  e();
23
23
  };
24
24
  var Oe = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Oe || {}), Re = ((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))(Re || {});
@@ -60,148 +60,148 @@ function Le(e, t) {
60
60
  }
61
61
  let He = re;
62
62
  function Ke(e, t) {
63
- let { defaultOpen: u = !1, ...p } = e, s = ne(null), m = j(t, be((c) => {
63
+ let { defaultOpen: u = !1, ...p } = e, s = oe(null), m = j(t, Ie((c) => {
64
64
  s.current = c;
65
- }, e.as === void 0 || e.as === re)), a = pe(Le, { disclosureState: u ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o, buttonId: r }, E] = a, l = P((c) => {
66
- E({ type: 1 });
67
- let f = he(s);
65
+ }, e.as === void 0 || e.as === re)), a = pe(Le, { disclosureState: u ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: n, buttonId: r }, y] = a, l = $((c) => {
66
+ y({ type: 1 });
67
+ let f = xe(s);
68
68
  if (!f || !r) return;
69
69
  let _ = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : f.getElementById(r) : f.getElementById(r);
70
70
  _ == null || _.focus();
71
- }), y = O(() => ({ close: l }), [l]), S = O(() => ({ open: o === 0, close: l }), [o, l]), k = { ref: m };
72
- return v.createElement(V.Provider, { value: a }, v.createElement(X.Provider, { value: y }, v.createElement(Be, { value: l }, v.createElement(Pe, { value: W(o, { 0: R.Open, 1: R.Closed }) }, Q({ ourProps: k, theirProps: p, slot: S, defaultTag: He, name: "Disclosure" })))));
71
+ }), v = O(() => ({ close: l }), [l]), E = O(() => ({ open: n === 0, close: l }), [n, l]), S = { ref: m };
72
+ return b.createElement(V.Provider, { value: a }, b.createElement(X.Provider, { value: v }, b.createElement(Ae, { value: l }, b.createElement($e, { value: W(n, { 0: R.Open, 1: R.Closed }) }, Q({ ourProps: S, theirProps: p, slot: E, defaultTag: He, name: "Disclosure" })))));
73
73
  }
74
74
  let Ue = "button";
75
75
  function qe(e, t) {
76
- let u = le(), { id: p = `headlessui-disclosure-button-${u}`, disabled: s = !1, autoFocus: m = !1, ...a } = e, [o, r] = z("Disclosure.Button"), E = Fe(), l = E === null ? !1 : E === o.panelId, y = ne(null), S = j(y, t, P((i) => {
76
+ let u = le(), { id: p = `headlessui-disclosure-button-${u}`, disabled: s = !1, autoFocus: m = !1, ...a } = e, [n, r] = z("Disclosure.Button"), y = Fe(), l = y === null ? !1 : y === n.panelId, v = oe(null), E = j(v, t, $((i) => {
77
77
  if (!l) return r({ type: 4, element: i });
78
- })), k = ce();
78
+ })), S = ce();
79
79
  se(() => {
80
80
  if (!l) return r({ type: 2, buttonId: p }), () => {
81
81
  r({ type: 2, buttonId: null });
82
82
  };
83
83
  }, [p, r, l]);
84
- let c = P((i) => {
85
- var n;
84
+ let c = $((i) => {
85
+ var o;
86
86
  if (l) {
87
- if (o.disclosureState === 1) return;
87
+ if (n.disclosureState === 1) return;
88
88
  switch (i.key) {
89
- case w.Space:
90
- case w.Enter:
91
- i.preventDefault(), i.stopPropagation(), r({ type: 0 }), (n = o.buttonElement) == null || n.focus();
89
+ case T.Space:
90
+ case T.Enter:
91
+ i.preventDefault(), i.stopPropagation(), r({ type: 0 }), (o = n.buttonElement) == null || o.focus();
92
92
  break;
93
93
  }
94
94
  } else switch (i.key) {
95
- case w.Space:
96
- case w.Enter:
95
+ case T.Space:
96
+ case T.Enter:
97
97
  i.preventDefault(), i.stopPropagation(), r({ type: 0 });
98
98
  break;
99
99
  }
100
- }), f = P((i) => {
100
+ }), f = $((i) => {
101
101
  switch (i.key) {
102
- case w.Space:
102
+ case T.Space:
103
103
  i.preventDefault();
104
104
  break;
105
105
  }
106
- }), _ = P((i) => {
107
- var n;
108
- Ce(i.currentTarget) || s || (l ? (r({ type: 0 }), (n = o.buttonElement) == null || n.focus()) : r({ type: 0 }));
109
- }), { isFocusVisible: h, focusProps: D } = ve({ autoFocus: m }), { isHovered: N, hoverProps: C } = ye({ isDisabled: s }), { pressed: I, pressProps: g } = De({ disabled: s }), F = O(() => ({ open: o.disclosureState === 0, hover: N, active: I, disabled: s, focus: h, autofocus: m }), [o, N, I, h, s, m]), A = $e(e, o.buttonElement), L = l ? te({ ref: S, type: A, disabled: s || void 0, autoFocus: m, onKeyDown: c, onClick: _ }, D, C, g) : te({ ref: S, id: p, type: A, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: s || void 0, autoFocus: m, onKeyDown: c, onKeyUp: f, onClick: _ }, D, C, g);
110
- return Q({ mergeRefs: k, ourProps: L, theirProps: a, slot: F, defaultTag: Ue, name: "Disclosure.Button" });
106
+ }), _ = $((i) => {
107
+ var o;
108
+ Ne(i.currentTarget) || s || (l ? (r({ type: 0 }), (o = n.buttonElement) == null || o.focus()) : r({ type: 0 }));
109
+ }), { isFocusVisible: x, focusProps: h } = be({ autoFocus: m }), { isHovered: w, hoverProps: N } = ve({ isDisabled: s }), { pressed: k, pressProps: P } = he({ disabled: s }), F = O(() => ({ open: n.disclosureState === 0, hover: w, active: k, disabled: s, focus: x, autofocus: m }), [n, w, k, x, s, m]), C = De(e, n.buttonElement), L = l ? te({ ref: E, type: C, disabled: s || void 0, autoFocus: m, onKeyDown: c, onClick: _ }, h, N, P) : te({ ref: E, id: p, type: C, "aria-expanded": n.disclosureState === 0, "aria-controls": n.panelElement ? n.panelId : void 0, disabled: s || void 0, autoFocus: m, onKeyDown: c, onKeyUp: f, onClick: _ }, h, N, P);
110
+ return Q({ mergeRefs: S, ourProps: L, theirProps: a, slot: F, defaultTag: Ue, name: "Disclosure.Button" });
111
111
  }
112
112
  let je = "div", We = ee.RenderStrategy | ee.Static;
113
113
  function Qe(e, t) {
114
- let u = le(), { id: p = `headlessui-disclosure-panel-${u}`, transition: s = !1, ...m } = e, [a, o] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), E = ce(), [l, y] = ae(null), S = j(t, P((D) => {
115
- xe(() => o({ type: 5, element: D }));
116
- }), y);
117
- se(() => (o({ type: 3, panelId: p }), () => {
118
- o({ type: 3, panelId: null });
119
- }), [p, o]);
120
- let k = ge(), [c, f] = Te(s, l, k !== null ? (k & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]), h = { ref: S, id: p, ...we(f) };
121
- return v.createElement(Ne, null, v.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: E, ourProps: h, theirProps: m, slot: _, defaultTag: je, features: We, visible: c, name: "Disclosure.Panel" })));
114
+ let u = le(), { id: p = `headlessui-disclosure-panel-${u}`, transition: s = !1, ...m } = e, [a, n] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), y = ce(), [l, v] = ae(null), E = j(t, $((h) => {
115
+ Be(() => n({ type: 5, element: h }));
116
+ }), v);
117
+ se(() => (n({ type: 3, panelId: p }), () => {
118
+ n({ type: 3, panelId: null });
119
+ }), [p, n]);
120
+ let S = Pe(), [c, f] = ge(s, l, S !== null ? (S & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]), x = { ref: E, id: p, ...Te(f) };
121
+ return b.createElement(we, null, b.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: y, ourProps: x, theirProps: m, slot: _, defaultTag: je, features: We, visible: c, name: "Disclosure.Panel" })));
122
122
  }
123
123
  let Ve = q(Ke), ue = q(qe), de = q(Qe), ze = Object.assign(Ve, { Button: ue, Panel: de });
124
- const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_25", Ye = "_title_1k9to_29", Ze = "_icon_1k9to_36", et = "_circle_1k9to_46", tt = "_square_1k9to_53", ot = "_panel_1k9to_73", nt = "_open_1k9to_80", rt = "_m_1k9to_106", lt = "_s_1k9to_53", d = {
125
- accordion: Xe,
126
- "is-link": "_is-link_1k9to_9",
127
- header: Ge,
128
- disabled: Je,
129
- title: Ye,
130
- "title-uppercase": "_title-uppercase_1k9to_32",
131
- icon: Ze,
132
- "icon-container": "_icon-container_1k9to_39",
133
- circle: et,
134
- square: tt,
124
+ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye = "_circle_1yk0x_23", Ze = "_disabled_1yk0x_23", et = "_accordion_1yk0x_37", tt = "_header_1yk0x_45", nt = "_title_1yk0x_61", ot = "_panel_1yk0x_88", rt = "_m_1yk0x_112", lt = "_s_1yk0x_19", d = {
125
+ icon: Xe,
126
+ "icon-container": "_icon-container_1yk0x_8",
127
+ open: Ge,
128
+ square: Je,
129
+ circle: Ye,
130
+ disabled: Ze,
131
+ accordion: et,
132
+ "is-link": "_is-link_1yk0x_41",
133
+ header: tt,
134
+ title: nt,
135
+ "title-uppercase": "_title-uppercase_1yk0x_64",
135
136
  panel: ot,
136
- open: nt,
137
- "link-open": "_link-open_1k9to_102",
137
+ "link-open": "_link-open_1yk0x_108",
138
138
  m: rt,
139
139
  s: lt,
140
- "wrapper-button": "_wrapper-button_1k9to_134"
141
- }, bt = me(
140
+ "wrapper-button": "_wrapper-button_1yk0x_140"
141
+ }, It = me(
142
142
  ({
143
143
  title: e,
144
144
  disabled: t,
145
- buttonType: u = T.BUTTON,
145
+ buttonType: u = g.BUTTON,
146
146
  children: p,
147
147
  showTitleByDefault: s = !0,
148
148
  linkClassName: m,
149
- size: a = x.M,
150
- titleUppercase: o,
149
+ size: a = B.M,
150
+ titleUppercase: n,
151
151
  buttonStyle: r = _e.CIRCLE,
152
- iconType: E = Y.ARROW,
152
+ iconType: y = Y.ARROW,
153
153
  classNameTitle: l,
154
- classNameContent: y,
155
- classNameAccordion: S,
156
- classNameIconButton: k,
154
+ classNameContent: v,
155
+ classNameAccordion: E,
156
+ classNameIconButton: S,
157
157
  subtitleNode: c,
158
158
  onlyOpenSubtitleNode: f,
159
159
  classNameSubtitleContainer: _
160
- }, h) => {
161
- const [D, N] = ae(!1), C = Ee(Se.XS1), I = u === T.LINK, g = {
162
- [d["is-link"]]: I
160
+ }, x) => {
161
+ const [h, w] = ae(!1), N = ye(Ee.XS1), k = u === g.LINK, P = {
162
+ [d["is-link"]]: k
163
163
  }, F = () => {
164
- t || N((n) => !n);
165
- }, A = a === x.S ? J.S : J.M, L = (n) => ({
164
+ t || w((o) => !o);
165
+ }, C = a === B.S ? J.S : J.M, L = (o) => ({
166
166
  variant: "anchor",
167
- size: C ? "s" : "l",
167
+ size: N ? "s" : "l",
168
168
  rightIcon: {
169
- iconName: A,
170
- className: $({
171
- [d["link-open"]]: n
169
+ iconName: C,
170
+ className: D({
171
+ [d["link-open"]]: o
172
172
  })
173
173
  }
174
- }), i = (n) => {
175
- const H = () => E === Y.DROPDOWN ? a === x.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : a === x.S ? Z.S : Z.M;
174
+ }), i = (o) => {
175
+ const H = () => y === Y.DROPDOWN ? a === B.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : a === B.S ? Z.S : Z.M;
176
176
  switch (u) {
177
- case T.LINK:
177
+ case g.LINK:
178
178
  return e;
179
- case T.BUTTON:
180
- return /* @__PURE__ */ B(K, { children: [
181
- /* @__PURE__ */ b(
179
+ case g.BUTTON:
180
+ return /* @__PURE__ */ A(K, { children: [
181
+ /* @__PURE__ */ I(
182
182
  "span",
183
183
  {
184
- className: $(
184
+ className: D(
185
185
  d.title,
186
186
  l,
187
- o && d["title-uppercase"]
187
+ n && d["title-uppercase"]
188
188
  ),
189
189
  children: e
190
190
  }
191
191
  ),
192
- /* @__PURE__ */ b(
192
+ /* @__PURE__ */ I(
193
193
  "div",
194
194
  {
195
- className: $(
195
+ className: D(
196
196
  d["icon-container"],
197
- n && d.open,
197
+ o && d.open,
198
198
  t && d.disabled,
199
199
  d[r],
200
- k
200
+ S
201
201
  ),
202
202
  "data-testid": "accordion-icon-container",
203
- children: /* @__PURE__ */ b(
204
- ke,
203
+ children: /* @__PURE__ */ I(
204
+ Se,
205
205
  {
206
206
  iconName: H(),
207
207
  className: d.icon,
@@ -215,43 +215,43 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
215
215
  return null;
216
216
  }
217
217
  };
218
- return /* @__PURE__ */ B(K, { children: [
219
- /* @__PURE__ */ b(
218
+ return /* @__PURE__ */ A(K, { children: [
219
+ /* @__PURE__ */ I(
220
220
  "div",
221
221
  {
222
- className: $(
222
+ className: D(
223
223
  d.accordion,
224
224
  d[a],
225
- g,
226
- S
225
+ P,
226
+ E
227
227
  ),
228
- children: /* @__PURE__ */ b(ze, { ref: h, children: ({ open: n, close: H }) => /* @__PURE__ */ B(K, { children: [
229
- (!n || s) && /* @__PURE__ */ b(
228
+ children: /* @__PURE__ */ I(ze, { ref: x, children: ({ open: o, close: H }) => /* @__PURE__ */ A(K, { children: [
229
+ (!o || s) && /* @__PURE__ */ I(
230
230
  ue,
231
231
  {
232
232
  disabled: t,
233
- as: I ? Ie : T.BUTTON,
233
+ as: k ? ke : g.BUTTON,
234
234
  onClick: F,
235
- className: $({
236
- [d.header]: !I,
235
+ className: D({
236
+ [d.header]: !k,
237
237
  [d.disabled]: t,
238
- [m ?? ""]: I && m
238
+ [m ?? ""]: k && m
239
239
  }),
240
- ...I ? L(n) : {},
241
- children: (!n || s) && i(n)
240
+ ...k ? L(o) : {},
241
+ children: (!o || s) && i(o)
242
242
  }
243
243
  ),
244
- n && /* @__PURE__ */ b(
244
+ o && /* @__PURE__ */ I(
245
245
  de,
246
246
  {
247
247
  "data-testid": "accordion-panel",
248
- className: $(
248
+ className: D(
249
249
  d.panel,
250
- y,
251
- g
250
+ v,
251
+ P
252
252
  ),
253
- children: /* @__PURE__ */ b(fe, { size: a, children: typeof p == "function" ? p({
254
- open: n,
253
+ children: /* @__PURE__ */ I(fe, { size: a, children: typeof p == "function" ? p({
254
+ open: o,
255
255
  close: H
256
256
  }) : p })
257
257
  }
@@ -259,13 +259,13 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
259
259
  ] }) })
260
260
  }
261
261
  ),
262
- (c || f) && /* @__PURE__ */ B("div", { className: _, children: [
262
+ (c || f) && /* @__PURE__ */ A("div", { className: _, children: [
263
263
  c,
264
- D && f
264
+ h && f
265
265
  ] })
266
266
  ] });
267
267
  }
268
268
  );
269
269
  export {
270
- bt as Accordion
270
+ It as Accordion
271
271
  };
@@ -49,6 +49,14 @@ type TProps = {
49
49
  footer?: ReactNode | ((props: {
50
50
  handleClose: VoidFunction;
51
51
  }) => JSX.Element);
52
+ /**
53
+ * Дополнительный класс для title.
54
+ */
55
+ classNameTitle?: string;
56
+ /**
57
+ * Дополнительный класс для header.
58
+ */
59
+ classNameHeader?: string;
52
60
  /**
53
61
  * Дополнительный класс для inner.
54
62
  */
@@ -69,5 +77,5 @@ type TProps = {
69
77
  /**
70
78
  * Компонент шторки, который может выезжать слева, справа или внизу.
71
79
  */
72
- export declare const Drawer: ({ isOpen, onClose, title, className, unmount, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, footer, children, classNameInner, classNameFooter, closeOnClickOutside, showCloseButton }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
80
+ export declare const Drawer: ({ isOpen, onClose, title, className, unmount, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, footer, children, classNameTitle, classNameHeader, classNameInner, classNameFooter, closeOnClickOutside, showCloseButton }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
73
81
  export {};
@@ -1,37 +1,37 @@
1
- import { jsxs as m, jsx as t, Fragment as X } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as t, Fragment as P } from "react/jsx-runtime";
2
2
  import { c as s } from "../../index-DIxK0V-G.js";
3
- import { useState as N, useRef as j, useCallback as u, useEffect as P } from "react";
3
+ import { useState as N, useRef as Q, useCallback as u, useEffect as F } from "react";
4
4
  import { EDrawerPosition as w } from "./constants.js";
5
- import { useMediaQuery as Q } from "../../hooks/useMediaQuery/useMediaQuery.js";
6
- import { EMediaQuery as F } from "../../hooks/useMediaQuery/constants.js";
7
- import { useLockBodyScroll as G } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
8
- import { useResizeObserver as H } from "../../hooks/useResizeObserver/useResizeObserver.js";
5
+ import { useMediaQuery as G } from "../../hooks/useMediaQuery/useMediaQuery.js";
6
+ import { EMediaQuery as H } from "../../hooks/useMediaQuery/constants.js";
7
+ import { useLockBodyScroll as K } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
8
+ import { useResizeObserver as V } from "../../hooks/useResizeObserver/useResizeObserver.js";
9
9
  import { Button as k } from "../Button/Button.js";
10
- import { EButtonVariantDefault as K, EButtonSize as n } from "../Button/constants.js";
11
- import { Loader as V } from "../Loader/Loader.js";
12
- import { Portal as W } from "../Portal/Portal.js";
13
- import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4d_27", J = "_header_1xs4d_45", U = "_title_1xs4d_59", Z = "_space_1xs4d_73", $ = "_inner_1xs4d_84", O = "_button_1xs4d_87", ee = "_footer_1xs4d_92", te = "_left_1xs4d_105", oe = "_right_1xs4d_109", se = "_full_1xs4d_113", re = "_bottom_1xs4d_123", ne = "_opened_1xs4d_140", ae = "_overlay_1xs4d_196", ie = "_unmount_1xs4d_212", e = {
14
- drawer: Y,
15
- content: q,
10
+ import { EButtonVariantDefault as W, EButtonSize as n } from "../Button/constants.js";
11
+ import { Loader as Y } from "../Loader/Loader.js";
12
+ import { Portal as q } from "../Portal/Portal.js";
13
+ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4d_27", Z = "_header_1xs4d_45", $ = "_title_1xs4d_59", O = "_space_1xs4d_73", ee = "_inner_1xs4d_84", te = "_button_1xs4d_87", oe = "_footer_1xs4d_92", se = "_left_1xs4d_105", re = "_right_1xs4d_109", ne = "_full_1xs4d_113", ae = "_bottom_1xs4d_123", ie = "_opened_1xs4d_140", le = "_overlay_1xs4d_196", ce = "_unmount_1xs4d_212", e = {
14
+ drawer: J,
15
+ content: U,
16
16
  "is-loading": "_is-loading_1xs4d_41",
17
- header: J,
17
+ header: Z,
18
18
  "sticky-header": "_sticky-header_1xs4d_53",
19
- title: U,
20
- space: Z,
21
- inner: $,
22
- button: O,
23
- footer: ee,
19
+ title: $,
20
+ space: O,
21
+ inner: ee,
22
+ button: te,
23
+ footer: oe,
24
24
  "footer-button": "_footer-button_1xs4d_101",
25
- left: te,
26
- right: oe,
27
- full: se,
28
- bottom: re,
25
+ left: se,
26
+ right: re,
27
+ full: ne,
28
+ bottom: ae,
29
29
  "full-bottom-height": "_full-bottom-height_1xs4d_134",
30
- opened: ne,
30
+ opened: ie,
31
31
  "is-closing": "_is-closing_1xs4d_159",
32
- overlay: ae,
33
- unmount: ie
34
- }, le = 300, ve = ({
32
+ overlay: le,
33
+ unmount: ce
34
+ }, de = 300, we = ({
35
35
  isOpen: r,
36
36
  onClose: a,
37
37
  title: E,
@@ -44,40 +44,42 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
44
44
  paddingRight: S = 8,
45
45
  footer: c,
46
46
  children: T,
47
- classNameInner: C,
48
- classNameFooter: D,
47
+ classNameTitle: C,
48
+ classNameHeader: D,
49
+ classNameInner: z,
50
+ classNameFooter: L,
49
51
  closeOnClickOutside: h = !0,
50
52
  showCloseButton: x = !0
51
53
  }) => {
52
- const [p, y] = N(!1), [z, b] = N(!1), g = j(), d = Q(F.XS1), { ref: L } = H({
54
+ const [p, y] = N(!1), [R, b] = N(!1), g = Q(), d = G(H.XS1), { ref: A } = V({
53
55
  enabled: l === w.BOTTOM
54
56
  });
55
- G({
57
+ K({
56
58
  on: r && !p,
57
59
  paddingRight: S
58
60
  });
59
61
  const o = u(() => {
60
62
  a && (y(!0), g.current = setTimeout(() => {
61
63
  a(), y(!1);
62
- }, le));
63
- }, [a]), R = u(() => {
64
+ }, de));
65
+ }, [a]), X = u(() => {
64
66
  h && o();
65
67
  }, [h, o]), _ = u(
66
- (A) => {
67
- A.key === "Escape" && o();
68
+ (j) => {
69
+ j.key === "Escape" && o();
68
70
  },
69
71
  [o]
70
72
  );
71
- P(() => (r && (b(!0), window.addEventListener("keydown", _)), () => {
73
+ F(() => (r && (b(!0), window.addEventListener("keydown", _)), () => {
72
74
  b(!1), clearTimeout(g.current), window.removeEventListener("keydown", _);
73
75
  }), [r, _]);
74
76
  const v = {
75
- [e.opened]: z,
77
+ [e.opened]: R,
76
78
  [e["is-closing"]]: p,
77
79
  [e["full-bottom-height"]]: I,
78
80
  [e["is-loading"]]: i
79
81
  };
80
- return !r && f ? null : /* @__PURE__ */ m(W, { children: [
82
+ return !r && f ? null : /* @__PURE__ */ m(q, { children: [
81
83
  /* @__PURE__ */ t(
82
84
  "div",
83
85
  {
@@ -87,23 +89,23 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
87
89
  children: /* @__PURE__ */ t(
88
90
  "section",
89
91
  {
90
- ref: L,
92
+ ref: A,
91
93
  className: s(e.content, e[l], {
92
94
  [e["is-loading"]]: !!i
93
95
  }),
94
- children: i ? /* @__PURE__ */ t(V, {}) : /* @__PURE__ */ m(X, { children: [
96
+ children: i ? /* @__PURE__ */ t(Y, {}) : /* @__PURE__ */ m(P, { children: [
95
97
  /* @__PURE__ */ m(
96
98
  "header",
97
99
  {
98
- className: s(e.header, {
100
+ className: s(e.header, D, {
99
101
  [e["sticky-header"]]: B
100
102
  }),
101
103
  children: [
102
- /* @__PURE__ */ t("h2", { className: e.title, children: E }),
104
+ /* @__PURE__ */ t("h2", { className: s(e.title, C), children: E }),
103
105
  /* @__PURE__ */ t("div", { className: e.space, children: x && /* @__PURE__ */ t(
104
106
  k,
105
107
  {
106
- variant: K.SecondaryWhite,
108
+ variant: W.SecondaryWhite,
107
109
  isIconButton: !0,
108
110
  size: d ? n.S : n.M,
109
111
  iconName: "Close16px",
@@ -114,8 +116,8 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
114
116
  ]
115
117
  }
116
118
  ),
117
- /* @__PURE__ */ t("div", { className: s(e.inner, C), children: T }),
118
- /* @__PURE__ */ t("footer", { className: s(e.footer, D), children: typeof c == "function" ? c({ handleClose: o }) : c || x && /* @__PURE__ */ t(
119
+ /* @__PURE__ */ t("div", { className: s(e.inner, z), children: T }),
120
+ /* @__PURE__ */ t("footer", { className: s(e.footer, L), children: typeof c == "function" ? c({ handleClose: o }) : c || x && /* @__PURE__ */ t(
119
121
  k,
120
122
  {
121
123
  size: d ? n.M : n.XXL,
@@ -141,12 +143,12 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
141
143
  v
142
144
  ),
143
145
  "data-testid": "drawer-overlay",
144
- onClick: R
146
+ onClick: X
145
147
  }
146
148
  )
147
149
  ] });
148
150
  };
149
151
  export {
150
- le as ANIMATION_DELAY,
151
- ve as Drawer
152
+ de as ANIMATION_DELAY,
153
+ we as Drawer
152
154
  };
@@ -1,113 +1,113 @@
1
- import { jsx as s, jsxs as u, Fragment as z } from "react/jsx-runtime";
2
- import { c as i } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as U, useState as D, useMemo as R, useCallback as $, useEffect as J } from "react";
4
- import { ESelectSearchSize as v } from "./constants.js";
5
- import { mapSizeToInputSize as j, getDropdownArrowIcon as Q } from "./utils.js";
6
- import { Icon as q } from "../../icons/Icon.js";
1
+ import { jsx as a, jsxs as m, Fragment as D } from "react/jsx-runtime";
2
+ import { c as l } from "../../index-DIxK0V-G.js";
3
+ import { forwardRef as U, useState as j, useMemo as R, useCallback as $, useEffect as J } from "react";
4
+ import { ESelectSearchSize as g } from "./constants.js";
5
+ import { mapSizeToInputSize as q, getDropdownArrowIcon as Q } from "./utils.js";
6
+ import { Icon as A } from "../../icons/Icon.js";
7
7
  import { Button as W } from "../Button/Button.js";
8
- import { I as A } from "../../Input-BYrIS5GU.js";
8
+ import { I as O } from "../../Input-BYrIS5GU.js";
9
9
  import { EInputVariant as X } from "../Input/constants.js";
10
- import { H as Y, U as O, G as B, K as Z, j as ee } from "../../combobox-BpYucpxz.js";
11
- import '../../assets/SelectSearch.css';const te = "_disabled_rphak_5", oe = "_container_rphak_9", ae = "_full_rphak_22", ne = "_button_rphak_34", se = "_options_rphak_48", re = "_top_rphak_59", ie = "_bottom_rphak_64", le = "_m_rphak_91", ce = "_l_rphak_106", pe = "_option_rphak_48", de = "_clear_rphak_160", e = {
12
- "select-search": "_select-search_rphak_2",
10
+ import { H as Y, U as B, G as M, K as Z, j as ee } from "../../combobox-BpYucpxz.js";
11
+ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_container_1f5f7_9", ne = "_full_1f5f7_24", se = "_button_1f5f7_36", ae = "_options_1f5f7_50", ie = "_top_1f5f7_61", le = "_bottom_1f5f7_67", re = "_m_1f5f7_95", ce = "_l_1f5f7_110", de = "_option_1f5f7_50", fe = "_clear_1f5f7_164", e = {
12
+ "select-search": "_select-search_1f5f7_2",
13
13
  disabled: te,
14
14
  container: oe,
15
- "container-open": "_container-open_rphak_18",
16
- full: ae,
17
- "selected-icon": "_selected-icon_rphak_26",
18
- "selector-icon-open": "_selector-icon-open_rphak_30",
19
- button: ne,
20
- "selector-icon": "_selector-icon_rphak_30",
21
- options: se,
22
- top: re,
23
- bottom: ie,
24
- "no-options": "_no-options_rphak_85",
25
- m: le,
15
+ "container-open": "_container-open_1f5f7_20",
16
+ full: ne,
17
+ "selected-icon": "_selected-icon_1f5f7_28",
18
+ "selector-icon-open": "_selector-icon-open_1f5f7_32",
19
+ button: se,
20
+ "selector-icon": "_selector-icon_1f5f7_32",
21
+ options: ae,
22
+ top: ie,
23
+ bottom: le,
24
+ "no-options": "_no-options_1f5f7_89",
25
+ m: re,
26
26
  l: ce,
27
- "select-input": "_select-input_rphak_121",
28
- "select-input-disabled": "_select-input-disabled_rphak_124",
29
- option: pe,
30
- "option-active": "_option-active_rphak_140",
31
- "option-inner": "_option-inner_rphak_143",
32
- "right-slot": "_right-slot_rphak_150",
33
- "required-mark": "_required-mark_rphak_155",
34
- clear: de,
35
- "icon-button": "_icon-button_rphak_169"
36
- }, we = U(
37
- (M, E) => {
27
+ "select-input": "_select-input_1f5f7_125",
28
+ "select-input-disabled": "_select-input-disabled_1f5f7_128",
29
+ option: de,
30
+ "option-active": "_option-active_1f5f7_144",
31
+ "option-inner": "_option-inner_1f5f7_147",
32
+ "right-slot": "_right-slot_1f5f7_154",
33
+ "required-mark": "_required-mark_1f5f7_159",
34
+ clear: fe,
35
+ "icon-button": "_icon-button_1f5f7_173"
36
+ }, Ce = U(
37
+ (E, L) => {
38
38
  const {
39
- placeholder: g,
40
- size: r = v.L,
41
- value: a,
42
- onChange: n,
43
- full: L,
44
- showArrow: V = !0,
45
- items: d = [],
39
+ placeholder: w,
40
+ size: i = g.L,
41
+ value: n,
42
+ onChange: s,
43
+ full: V,
44
+ showArrow: C = !0,
45
+ items: f = [],
46
46
  classNameOption: F,
47
47
  displayValue: G = "name",
48
- filterOnSearch: w = !0,
49
- onSearch: _,
50
- variant: C = X.DefaultGray,
51
- menuPlacement: f = "bottom",
52
- disabled: l = !1,
53
- searchProps: I,
48
+ filterOnSearch: I = !0,
49
+ onSearch: u,
50
+ variant: S = X.DefaultGray,
51
+ menuPlacement: h = "bottom",
52
+ disabled: r = !1,
53
+ searchProps: y,
54
54
  withClearButton: b = !1,
55
55
  disableInput: c = !1,
56
- autocomplete: S = "on",
56
+ autocomplete: k = "on",
57
57
  immediate: P = !1
58
- } = M, k = String((a == null ? void 0 : a[G]) || ""), [p, m] = D(k), [N, h] = D(a), y = R(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
59
- (o) => o.name.toLowerCase().includes(p.toLowerCase())
60
- ) : d, [p, d, a, w]), T = (o) => {
61
- o ? (m(o.name), h(o), n == null || n(o)) : (m(""), h(null), n == null || n({ id: "", name: "" }));
62
- }, x = $(
58
+ } = E, N = String((n == null ? void 0 : n[G]) || ""), [d, p] = j(N), [v, _] = j(n), x = R(() => !I || n && (n.id || n.name) ? f : d.trim().toLowerCase() ? f.filter(
59
+ (o) => o.name.toLowerCase().includes(d.toLowerCase())
60
+ ) : f, [d, f, n, I]), T = (o) => {
61
+ o ? (p(o.name), _(o), s == null || s(o)) : (p(""), _(null), s == null || s({ id: "", name: "" }));
62
+ }, z = $(
63
63
  (o) => {
64
64
  if (c) return;
65
65
  const t = o.target.value;
66
- m(t), _ == null || _(t), !t && a && (n == null || n({ id: "", name: "" }));
66
+ p(t), u == null || u(t), !t && n && (s == null || s({ id: "", name: "" }));
67
67
  },
68
- [c, n, _, a]
68
+ [c, s, u, n]
69
69
  ), H = () => {
70
- m(""), h(null), n == null || n({ id: "", name: "" });
70
+ p(""), _(null), s == null || s({ id: "", name: "" });
71
71
  };
72
72
  return J(() => {
73
- const o = !a || typeof a == "object" && !Object.keys(a).length;
74
- m(o ? "" : k), h(o ? null : a);
75
- }, [a, k]), /* @__PURE__ */ s(
73
+ const o = !n || typeof n == "object" && !Object.keys(n).length;
74
+ p(o ? "" : N), _(o ? null : n);
75
+ }, [n, N]), /* @__PURE__ */ a(
76
76
  Y,
77
77
  {
78
78
  as: "div",
79
- value: N,
80
- className: i(e["select-search"], {
81
- [e.full]: L,
82
- [e.disabled]: l
79
+ value: v,
80
+ className: l(e["select-search"], {
81
+ [e.full]: V,
82
+ [e.disabled]: r
83
83
  }),
84
84
  onChange: T,
85
- ref: E,
86
- disabled: l,
87
- virtual: { options: y },
85
+ ref: L,
86
+ disabled: r,
87
+ virtual: { options: x },
88
88
  immediate: P,
89
- children: ({ open: o }) => /* @__PURE__ */ u(z, { children: [
90
- /* @__PURE__ */ u(
89
+ children: ({ open: o }) => /* @__PURE__ */ m(D, { children: [
90
+ /* @__PURE__ */ m(
91
91
  "div",
92
92
  {
93
- className: i(e.container, e[r], {
93
+ className: l(e.container, e[i], {
94
94
  [e["container-open"]]: o
95
95
  }),
96
96
  children: [
97
- c && /* @__PURE__ */ u("div", { style: { position: "relative", width: "100%" }, children: [
98
- /* @__PURE__ */ s(O, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
99
- B,
97
+ c && /* @__PURE__ */ m("div", { style: { position: "relative", width: "100%" }, children: [
98
+ /* @__PURE__ */ a(B, { disabled: r, style: { width: "100%" }, children: /* @__PURE__ */ a(
99
+ M,
100
100
  {
101
- as: A,
102
- label: g,
103
- size: j(r),
104
- className: i(e["select-input"], {
101
+ as: O,
102
+ label: w,
103
+ size: q(i),
104
+ className: l(e["select-input"], {
105
105
  [e["select-input-disabled"]]: c && b
106
106
  }),
107
- onChange: x,
108
- value: p,
109
- disabled: l,
110
- variant: C,
107
+ onChange: z,
108
+ value: d,
109
+ disabled: r,
110
+ variant: S,
111
111
  rightSlotClassName: e["right-slot"],
112
112
  requiredMarkClassName: e["required-mark"],
113
113
  "data-testid": "select-search-input",
@@ -116,25 +116,25 @@ import '../../assets/SelectSearch.css';const te = "_disabled_rphak_5", oe = "_co
116
116
  },
117
117
  rightAddon: {
118
118
  addonType: "icon",
119
- addonContent: Q(o, r)
119
+ addonContent: Q(o, i)
120
120
  },
121
- autocomplete: S,
122
- ...I
121
+ autocomplete: k,
122
+ ...y
123
123
  }
124
124
  ) }),
125
- b && p && /* @__PURE__ */ s(
125
+ b && d && /* @__PURE__ */ a(
126
126
  W,
127
127
  {
128
128
  tabIndex: -1,
129
- className: i(e.clear, {
130
- [e.disabled]: l
129
+ className: l(e.clear, {
130
+ [e.disabled]: r
131
131
  }),
132
132
  iconButtonClassName: e["icon-button"],
133
133
  isIconButton: !0,
134
134
  iconName: "Close16px",
135
135
  size: "m-s",
136
136
  clear: !0,
137
- disabled: l,
137
+ disabled: r,
138
138
  variant: "secondary-gray",
139
139
  onClick: (t) => {
140
140
  t.stopPropagation(), H();
@@ -143,83 +143,83 @@ import '../../assets/SelectSearch.css';const te = "_disabled_rphak_5", oe = "_co
143
143
  }
144
144
  )
145
145
  ] }),
146
- !c && /* @__PURE__ */ s(
147
- B,
146
+ !c && /* @__PURE__ */ a(
147
+ M,
148
148
  {
149
- as: A,
150
- label: g,
151
- size: j(r),
149
+ as: O,
150
+ label: w,
151
+ size: q(i),
152
152
  className: e["select-input"],
153
- onChange: x,
154
- value: p,
155
- disabled: l,
156
- variant: C,
153
+ onChange: z,
154
+ value: d,
155
+ disabled: r,
156
+ variant: S,
157
157
  withClearButton: b,
158
158
  rightSlotClassName: e["right-slot"],
159
159
  requiredMarkClassName: e["required-mark"],
160
160
  "data-testid": "select-search-input",
161
- rightAddon: {
161
+ rightAddon: C ? {
162
162
  addonType: "react-node",
163
- addonContent: V && /* @__PURE__ */ s(
164
- O,
163
+ addonContent: C && /* @__PURE__ */ a(
164
+ B,
165
165
  {
166
- className: i(e.button, {
167
- [e.disabled]: l
166
+ className: l(e.button, {
167
+ [e.disabled]: r
168
168
  }),
169
- disabled: l,
170
- children: /* @__PURE__ */ s(
171
- q,
169
+ disabled: r,
170
+ children: /* @__PURE__ */ a(
171
+ A,
172
172
  {
173
- iconName: r == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
174
- className: i(e["selector-icon"], {
173
+ iconName: i == g.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
174
+ className: l(e["selector-icon"], {
175
175
  [e["selector-icon-open"]]: o
176
176
  })
177
177
  }
178
178
  )
179
179
  }
180
180
  )
181
- },
181
+ } : void 0,
182
182
  onFocus: (t) => {
183
183
  c && t.target.blur();
184
184
  },
185
- autocomplete: S,
186
- ...I
185
+ autocomplete: k,
186
+ ...y
187
187
  }
188
188
  )
189
189
  ]
190
190
  }
191
191
  ),
192
- o && /* @__PURE__ */ s(z, { children: d.length ? y.length ? /* @__PURE__ */ s(
192
+ o && /* @__PURE__ */ a(D, { children: f.length ? x.length ? /* @__PURE__ */ a(
193
193
  Z,
194
194
  {
195
195
  "data-testid": "select-search-options",
196
- className: i(
196
+ className: l(
197
197
  e.options,
198
- e[r],
199
- e[f]
198
+ e[i],
199
+ e[h]
200
200
  ),
201
- children: ({ option: t }) => /* @__PURE__ */ u(
201
+ children: ({ option: t }) => /* @__PURE__ */ m(
202
202
  ee,
203
203
  {
204
204
  value: t,
205
- className: ({ focus: K }) => i(
205
+ className: ({ focus: K }) => l(
206
206
  e.option,
207
207
  F,
208
- r && e[r],
208
+ i && e[i],
209
209
  {
210
210
  [e["option-active"]]: K
211
211
  }
212
212
  ),
213
213
  "data-testid": `select-search-option-${t.id}`,
214
214
  children: [
215
- /* @__PURE__ */ u("div", { className: e["option-inner"], children: [
215
+ /* @__PURE__ */ m("div", { className: e["option-inner"], children: [
216
216
  t.name,
217
- t.bottom && /* @__PURE__ */ s("div", { children: t.bottom })
217
+ t.bottom && /* @__PURE__ */ a("div", { children: t.bottom })
218
218
  ] }),
219
- N && N.id === t.id && /* @__PURE__ */ s(
220
- q,
219
+ v && v.id === t.id && /* @__PURE__ */ a(
220
+ A,
221
221
  {
222
- iconName: r === v.M ? "Done16px" : "Done24px",
222
+ iconName: i === g.M ? "Done16px" : "Done24px",
223
223
  className: e["selected-icon"]
224
224
  }
225
225
  )
@@ -228,25 +228,25 @@ import '../../assets/SelectSearch.css';const te = "_disabled_rphak_5", oe = "_co
228
228
  t.id
229
229
  )
230
230
  }
231
- ) : /* @__PURE__ */ s(
231
+ ) : /* @__PURE__ */ a(
232
232
  "div",
233
233
  {
234
- className: i(
234
+ className: l(
235
235
  e.options,
236
- e[r],
236
+ e[i],
237
237
  e["no-options"],
238
- e[f]
238
+ e[h]
239
239
  ),
240
240
  children: "Ничего не найдено"
241
241
  }
242
- ) : /* @__PURE__ */ s(
242
+ ) : /* @__PURE__ */ a(
243
243
  "div",
244
244
  {
245
- className: i(
245
+ className: l(
246
246
  e.options,
247
- e[r],
247
+ e[i],
248
248
  e["no-options"],
249
- e[f]
249
+ e[h]
250
250
  ),
251
251
  children: "Нет данных"
252
252
  }
@@ -257,5 +257,5 @@ import '../../assets/SelectSearch.css';const te = "_disabled_rphak_5", oe = "_co
257
257
  }
258
258
  );
259
259
  export {
260
- we as SelectSearch
260
+ Ce as SelectSearch
261
261
  };
@@ -11,4 +11,4 @@ import { EMediaQuery, EMinMediaQuery } from './constants';
11
11
  * @example
12
12
  * const matches = useMediaQuery('(max-width: 768px)');
13
13
  */
14
- export declare const useMediaQuery: (query: EMediaQuery | `${EMediaQuery}` | EMinMediaQuery | `${EMinMediaQuery}`) => boolean;
14
+ export declare const useMediaQuery: (query: EMediaQuery | `${EMediaQuery}` | EMinMediaQuery | `${EMinMediaQuery}` | string) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.37.12",
4
+ "version": "1.37.13",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {