mimir-ui-kit 1.37.11 → 1.37.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.
@@ -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
  };
@@ -18,4 +18,5 @@ export declare const SelectSearch: import('react').ForwardRefExoticComponent<Pic
18
18
  searchProps?: Pick<import('../Input').TInputProps, "numbersOnly" | "maxLength" | "required">;
19
19
  disableInput?: boolean;
20
20
  autocomplete?: "on" | "off";
21
+ immediate?: boolean;
21
22
  } & import('react').RefAttributes<HTMLElement>>;
@@ -1,111 +1,113 @@
1
- import { jsx as s, jsxs as _, Fragment as z } from "react/jsx-runtime";
2
- import { c as i } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as K, useState as D, useMemo as U, useCallback as R, useEffect as $ } from "react";
4
- import { ESelectSearchSize as v } from "./constants.js";
5
- import { mapSizeToInputSize as j, getDropdownArrowIcon as J } from "./utils.js";
6
- import { Icon as q } from "../../icons/Icon.js";
7
- import { Button as Q } from "../Button/Button.js";
8
- import { I as A } from "../../Input-BYrIS5GU.js";
9
- import { EInputVariant as W } from "../Input/constants.js";
10
- import { H as X, U as O, G as B, K as Y, j as Z } from "../../combobox-BpYucpxz.js";
11
- import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_container_rphak_9", oe = "_full_rphak_22", ae = "_button_rphak_34", ne = "_options_rphak_48", se = "_top_rphak_59", re = "_bottom_rphak_64", ie = "_m_rphak_91", le = "_l_rphak_106", ce = "_option_rphak_48", pe = "_clear_rphak_160", e = {
12
- "select-search": "_select-search_rphak_2",
13
- disabled: ee,
14
- container: te,
15
- "container-open": "_container-open_rphak_18",
16
- full: oe,
17
- "selected-icon": "_selected-icon_rphak_26",
18
- "selector-icon-open": "_selector-icon-open_rphak_30",
19
- button: ae,
20
- "selector-icon": "_selector-icon_rphak_30",
21
- options: ne,
22
- top: se,
23
- bottom: re,
24
- "no-options": "_no-options_rphak_85",
25
- m: ie,
26
- l: le,
27
- "select-input": "_select-input_rphak_121",
28
- "select-input-disabled": "_select-input-disabled_rphak_124",
29
- option: ce,
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: pe,
35
- "icon-button": "_icon-button_rphak_169"
36
- }, ge = K(
37
- (M, E) => {
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
+ import { Button as W } from "../Button/Button.js";
8
+ import { I as O } from "../../Input-BYrIS5GU.js";
9
+ import { EInputVariant as X } from "../Input/constants.js";
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
+ disabled: te,
14
+ container: oe,
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
+ l: ce,
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: m,
50
- variant: C = W.DefaultGray,
51
- menuPlacement: b = "bottom",
52
- disabled: l = !1,
53
- searchProps: I,
54
- withClearButton: f = !1,
48
+ filterOnSearch: I = !0,
49
+ onSearch: u,
50
+ variant: S = X.DefaultGray,
51
+ menuPlacement: h = "bottom",
52
+ disabled: r = !1,
53
+ searchProps: y,
54
+ withClearButton: b = !1,
55
55
  disableInput: c = !1,
56
- autocomplete: S = "on"
57
- } = M, k = String((a == null ? void 0 : a[G]) || ""), [p, u] = D(k), [N, h] = D(a), y = U(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
58
- (o) => o.name.toLowerCase().includes(p.toLowerCase())
59
- ) : d, [p, d, a, w]), P = (o) => {
60
- o ? (u(o.name), h(o), n == null || n(o)) : (u(""), h(null), n == null || n({ id: "", name: "" }));
61
- }, x = R(
56
+ autocomplete: k = "on",
57
+ immediate: P = !1
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 = $(
62
63
  (o) => {
63
64
  if (c) return;
64
65
  const t = o.target.value;
65
- u(t), m == null || m(t), !t && a && (n == null || n({ id: "", name: "" }));
66
+ p(t), u == null || u(t), !t && n && (s == null || s({ id: "", name: "" }));
66
67
  },
67
- [c, n, m, a]
68
- ), T = () => {
69
- u(""), h(null), n == null || n({ id: "", name: "" });
68
+ [c, s, u, n]
69
+ ), H = () => {
70
+ p(""), _(null), s == null || s({ id: "", name: "" });
70
71
  };
71
- return $(() => {
72
- const o = !a || typeof a == "object" && !Object.keys(a).length;
73
- u(o ? "" : k), h(o ? null : a);
74
- }, [a, k]), /* @__PURE__ */ s(
75
- X,
72
+ return J(() => {
73
+ const o = !n || typeof n == "object" && !Object.keys(n).length;
74
+ p(o ? "" : N), _(o ? null : n);
75
+ }, [n, N]), /* @__PURE__ */ a(
76
+ Y,
76
77
  {
77
78
  as: "div",
78
- value: N,
79
- className: i(e["select-search"], {
80
- [e.full]: L,
81
- [e.disabled]: l
79
+ value: v,
80
+ className: l(e["select-search"], {
81
+ [e.full]: V,
82
+ [e.disabled]: r
82
83
  }),
83
- onChange: P,
84
- ref: E,
85
- disabled: l,
86
- virtual: { options: y },
87
- children: ({ open: o }) => /* @__PURE__ */ _(z, { children: [
88
- /* @__PURE__ */ _(
84
+ onChange: T,
85
+ ref: L,
86
+ disabled: r,
87
+ virtual: { options: x },
88
+ immediate: P,
89
+ children: ({ open: o }) => /* @__PURE__ */ m(D, { children: [
90
+ /* @__PURE__ */ m(
89
91
  "div",
90
92
  {
91
- className: i(e.container, e[r], {
93
+ className: l(e.container, e[i], {
92
94
  [e["container-open"]]: o
93
95
  }),
94
96
  children: [
95
- c && /* @__PURE__ */ _("div", { style: { position: "relative", width: "100%" }, children: [
96
- /* @__PURE__ */ s(O, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
97
- 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,
98
100
  {
99
- as: A,
100
- label: g,
101
- size: j(r),
102
- className: i(e["select-input"], {
103
- [e["select-input-disabled"]]: c && f
101
+ as: O,
102
+ label: w,
103
+ size: q(i),
104
+ className: l(e["select-input"], {
105
+ [e["select-input-disabled"]]: c && b
104
106
  }),
105
- onChange: x,
106
- value: p,
107
- disabled: l,
108
- variant: C,
107
+ onChange: z,
108
+ value: d,
109
+ disabled: r,
110
+ variant: S,
109
111
  rightSlotClassName: e["right-slot"],
110
112
  requiredMarkClassName: e["required-mark"],
111
113
  "data-testid": "select-search-input",
@@ -114,110 +116,110 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
114
116
  },
115
117
  rightAddon: {
116
118
  addonType: "icon",
117
- addonContent: J(o, r)
119
+ addonContent: Q(o, i)
118
120
  },
119
- autocomplete: S,
120
- ...I
121
+ autocomplete: k,
122
+ ...y
121
123
  }
122
124
  ) }),
123
- f && p && /* @__PURE__ */ s(
124
- Q,
125
+ b && d && /* @__PURE__ */ a(
126
+ W,
125
127
  {
126
128
  tabIndex: -1,
127
- className: i(e.clear, {
128
- [e.disabled]: l
129
+ className: l(e.clear, {
130
+ [e.disabled]: r
129
131
  }),
130
132
  iconButtonClassName: e["icon-button"],
131
133
  isIconButton: !0,
132
134
  iconName: "Close16px",
133
135
  size: "m-s",
134
136
  clear: !0,
135
- disabled: l,
137
+ disabled: r,
136
138
  variant: "secondary-gray",
137
139
  onClick: (t) => {
138
- t.stopPropagation(), T();
140
+ t.stopPropagation(), H();
139
141
  },
140
142
  "data-testid": "clear-button"
141
143
  }
142
144
  )
143
145
  ] }),
144
- !c && /* @__PURE__ */ s(
145
- B,
146
+ !c && /* @__PURE__ */ a(
147
+ M,
146
148
  {
147
- as: A,
148
- label: g,
149
- size: j(r),
149
+ as: O,
150
+ label: w,
151
+ size: q(i),
150
152
  className: e["select-input"],
151
- onChange: x,
152
- value: p,
153
- disabled: l,
154
- variant: C,
155
- withClearButton: f,
153
+ onChange: z,
154
+ value: d,
155
+ disabled: r,
156
+ variant: S,
157
+ withClearButton: b,
156
158
  rightSlotClassName: e["right-slot"],
157
159
  requiredMarkClassName: e["required-mark"],
158
160
  "data-testid": "select-search-input",
159
- rightAddon: {
161
+ rightAddon: C ? {
160
162
  addonType: "react-node",
161
- addonContent: V && /* @__PURE__ */ s(
162
- O,
163
+ addonContent: C && /* @__PURE__ */ a(
164
+ B,
163
165
  {
164
- className: i(e.button, {
165
- [e.disabled]: l
166
+ className: l(e.button, {
167
+ [e.disabled]: r
166
168
  }),
167
- disabled: l,
168
- children: /* @__PURE__ */ s(
169
- q,
169
+ disabled: r,
170
+ children: /* @__PURE__ */ a(
171
+ A,
170
172
  {
171
- iconName: r == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
172
- className: i(e["selector-icon"], {
173
+ iconName: i == g.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
174
+ className: l(e["selector-icon"], {
173
175
  [e["selector-icon-open"]]: o
174
176
  })
175
177
  }
176
178
  )
177
179
  }
178
180
  )
179
- },
181
+ } : void 0,
180
182
  onFocus: (t) => {
181
183
  c && t.target.blur();
182
184
  },
183
- autocomplete: S,
184
- ...I
185
+ autocomplete: k,
186
+ ...y
185
187
  }
186
188
  )
187
189
  ]
188
190
  }
189
191
  ),
190
- o && /* @__PURE__ */ s(z, { children: d.length ? y.length ? /* @__PURE__ */ s(
191
- Y,
192
+ o && /* @__PURE__ */ a(D, { children: f.length ? x.length ? /* @__PURE__ */ a(
193
+ Z,
192
194
  {
193
195
  "data-testid": "select-search-options",
194
- className: i(
196
+ className: l(
195
197
  e.options,
196
- e[r],
197
- e[b]
198
+ e[i],
199
+ e[h]
198
200
  ),
199
- children: ({ option: t }) => /* @__PURE__ */ _(
200
- Z,
201
+ children: ({ option: t }) => /* @__PURE__ */ m(
202
+ ee,
201
203
  {
202
204
  value: t,
203
- className: ({ focus: H }) => i(
205
+ className: ({ focus: K }) => l(
204
206
  e.option,
205
207
  F,
206
- r && e[r],
208
+ i && e[i],
207
209
  {
208
- [e["option-active"]]: H
210
+ [e["option-active"]]: K
209
211
  }
210
212
  ),
211
213
  "data-testid": `select-search-option-${t.id}`,
212
214
  children: [
213
- /* @__PURE__ */ _("div", { className: e["option-inner"], children: [
215
+ /* @__PURE__ */ m("div", { className: e["option-inner"], children: [
214
216
  t.name,
215
- t.bottom && /* @__PURE__ */ s("div", { children: t.bottom })
217
+ t.bottom && /* @__PURE__ */ a("div", { children: t.bottom })
216
218
  ] }),
217
- N && N.id === t.id && /* @__PURE__ */ s(
218
- q,
219
+ v && v.id === t.id && /* @__PURE__ */ a(
220
+ A,
219
221
  {
220
- iconName: r === v.M ? "Done16px" : "Done24px",
222
+ iconName: i === g.M ? "Done16px" : "Done24px",
221
223
  className: e["selected-icon"]
222
224
  }
223
225
  )
@@ -226,25 +228,25 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
226
228
  t.id
227
229
  )
228
230
  }
229
- ) : /* @__PURE__ */ s(
231
+ ) : /* @__PURE__ */ a(
230
232
  "div",
231
233
  {
232
- className: i(
234
+ className: l(
233
235
  e.options,
234
- e[r],
236
+ e[i],
235
237
  e["no-options"],
236
- e[b]
238
+ e[h]
237
239
  ),
238
240
  children: "Ничего не найдено"
239
241
  }
240
- ) : /* @__PURE__ */ s(
242
+ ) : /* @__PURE__ */ a(
241
243
  "div",
242
244
  {
243
- className: i(
245
+ className: l(
244
246
  e.options,
245
- e[r],
247
+ e[i],
246
248
  e["no-options"],
247
- e[b]
249
+ e[h]
248
250
  ),
249
251
  children: "Нет данных"
250
252
  }
@@ -255,5 +257,5 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
255
257
  }
256
258
  );
257
259
  export {
258
- ge as SelectSearch
260
+ Ce as SelectSearch
259
261
  };
@@ -54,4 +54,6 @@ export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'
54
54
  disableInput?: boolean;
55
55
  /** Управляет поведением автозаполнения браузера */
56
56
  autocomplete?: 'on' | 'off';
57
+ /** Показывать список при фокусе или нет */
58
+ immediate?: boolean;
57
59
  };
@@ -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.11",
4
+ "version": "1.37.13",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {