mimir-ui-kit 1.66.4 → 1.67.0

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
- ._container_14t2i_2{position:relative}._group_14t2i_6{--tab-indicator-color: var(--sapphire-normal);position:relative}._group-inner_14t2i_10{display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--mimir-space-4xl);-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:calc(var(--tab-trail-margin-left) * -1)}._tab_14t2i_17{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--mimir-space-2xs);-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:var(--mimir-tab-trail-height);padding:0 var(--tab-padding);color:var(--disabled-color);font-weight:var(--mimir-font-weight-text-medium);font-size:var(--tab-trail-font-size);font-family:var(--mimir-font-montserrat)}._tab_14t2i_17[data-active=true]:after{background-color:var(--tab-indicator-color)!important}._tab_14t2i_17:after{position:absolute;bottom:0;left:0;width:100%;height:2px;background-color:transparent;-webkit-transition:background-color .3s ease;transition:background-color .3s ease;content:""}._tab_14t2i_17[data-selected]{color:var(--black-100)}._tab_14t2i_17[data-selected]:after{background-color:var(--sapphire-100)}._tab_14t2i_17:not([data-selected]){-webkit-filter:grayscale(100%) opacity(.7);filter:grayscale(100%) opacity(.7)}._tab_14t2i_17:not([data-selected]):after{background-color:var(--white)}._list_14t2i_55{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:auto;white-space:nowrap;scroll-behavior:smooth}._list_14t2i_55::-webkit-scrollbar{display:none}._tabs_14t2i_66{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:var(--tabs-padding-top)}._buttons_14t2i_72{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;max-height:40px}._m_14t2i_79{--tab-trail-font-size: var(--mimir-size-text-xl3);--mimir-tab-trail-height: var(--mimir-tab-trail-height-m);--tabs-padding-top: var(--mimir-space-xs);--tab-padding: var(--mimir-space-m);--tab-trail-margin-left: var(--mimir-space-m)}._s_14t2i_87{--tab-trail-font-size: var(--mimir-size-text-xl);--mimir-tab-trail-height: var(--mimir-tab-trail-height-s);--tabs-padding-top: var(--mimir-space-3xs);--tab-padding: var(--mimir-space-s);--tab-trail-margin-left: var(--mimir-space-s)}._detailed_14t2i_95 ._tab_14t2i_17{min-width:264px;min-height:78px;padding:var(--mimir-space-m) 11px 11px var(--mimir-space-m);border-radius:0;-webkit-box-shadow:0 4px 8px 0 rgba(112,57,59,.08);box-shadow:0 4px 8px #70393b14;background-color:var(--white);-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:var(--mimir-space-2xs);margin-right:1px}._detailed_14t2i_95 ._tab_14t2i_17:first-child{border-radius:var(--mimir-control-radius) 0 0 var(--mimir-control-radius)}._detailed_14t2i_95 ._tab_14t2i_17:last-child{border-radius:0 var(--mimir-control-radius) var(--mimir-control-radius) 0;margin-right:0}._detailed_14t2i_95 ._tab_14t2i_17[data-active=true]{border-bottom:var(--mimir-space-1xs) solid var(--detailed-border-color, var(--black-80))}._detailed_14t2i_95 ._tab_14t2i_17:after{display:none}._detailed_14t2i_95 ._tab_14t2i_17:not([data-selected]){-webkit-filter:none;filter:none}._detailed_14t2i_95 ._tab_14t2i_17 ._tab-content_14t2i_123{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--mimir-space-2xs);-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;text-align:left}._detailed_14t2i_95 ._tab_14t2i_17 ._tab-content_14t2i_123 ._tab-value_14t2i_131{font-family:var(--mimir-font-inter);font-weight:var(--mimir-font-weight-text-semibold);font-size:var(--mimir-size-text-xl);line-height:var(--mimir-line-height-text-l);color:var(--detailed-value-color, var(--black-60));word-break:break-word;width:100%}._detailed_14t2i_95 ._tab_14t2i_17 ._tab-content_14t2i_123 ._tab-name_14t2i_140{font-family:var(--mimir-font-inter);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-s);line-height:var(--mimir-line-height-text-xss1);color:var(--black-60);word-break:break-word;width:100%}._detailed_14t2i_95 ._tab_14t2i_17 ._tab-content_14t2i_123 ._tab-header_14t2i_149{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;width:100%}._detailed_14t2i_95 ._tab_14t2i_17 ._tab-content_14t2i_123 ._tab-header_14t2i_149 ._tab-text_14t2i_155{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--mimir-space-2xs);-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}._detailed_14t2i_95 ._tab_14t2i_17 ._tab-content_14t2i_123 ._tab-header_14t2i_149 ._tab-icon_14t2i_162{-ms-flex-negative:0;flex-shrink:0;margin-left:var(--mimir-space-xs);height:24px;-ms-flex-item-align:end;-ms-grid-row-align:end;align-self:end}
1
+ ._container_gcm9k_2{position:relative}._group_gcm9k_6{--tab-indicator-color: var(--sapphire-normal);position:relative}._group-inner_gcm9k_10{display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--mimir-space-4xl);-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:calc(var(--tab-trail-margin-left) * -1)}._tab_gcm9k_17{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--mimir-space-2xs);-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:var(--mimir-tab-trail-height);padding:0 var(--tab-padding);color:var(--black-60);font-weight:var(--mimir-font-weight-text-medium);font-size:var(--tab-trail-font-size);font-family:var(--mimir-font-montserrat)}._tab_gcm9k_17[data-active=true]:after{background-color:var(--tab-indicator-color)!important}._tab_gcm9k_17:after{position:absolute;bottom:0;left:0;width:100%;height:2px;background-color:transparent;-webkit-transition:background-color .3s ease;transition:background-color .3s ease;content:""}._tab_gcm9k_17[data-selected]{color:var(--black-100)}._tab_gcm9k_17[data-selected]:after{background-color:var(--sapphire-100)}._tab_gcm9k_17:not([data-selected]):after{background-color:var(--white)}._list_gcm9k_52{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:auto;white-space:nowrap;scroll-behavior:smooth}._list_gcm9k_52::-webkit-scrollbar{display:none}._tabs_gcm9k_63{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:var(--tabs-padding-top)}._buttons_gcm9k_69{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;max-height:40px}._m_gcm9k_76{--tab-trail-font-size: var(--mimir-size-text-xl3);--mimir-tab-trail-height: var(--mimir-tab-trail-height-m);--tabs-padding-top: var(--mimir-space-xs);--tab-padding: var(--mimir-space-m);--tab-trail-margin-left: var(--mimir-space-m)}._s_gcm9k_84{--tab-trail-font-size: var(--mimir-size-text-xl);--mimir-tab-trail-height: var(--mimir-tab-trail-height-s);--tabs-padding-top: var(--mimir-space-3xs);--tab-padding: var(--mimir-space-s);--tab-trail-margin-left: var(--mimir-space-s)}._detailed_gcm9k_92 ._tab_gcm9k_17{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--mimir-space-2xs);-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;min-width:264px;min-height:78px;margin-right:1px;padding:var(--mimir-space-m) 11px 11px var(--mimir-space-m);background-color:var(--white);border-radius:0;-webkit-box-shadow:0 4px 8px 0 rgba(112,57,59,.08);box-shadow:0 4px 8px #70393b14}._detailed_gcm9k_92 ._tab_gcm9k_17:first-child{border-radius:var(--mimir-control-radius) 0 0 var(--mimir-control-radius)}._detailed_gcm9k_92 ._tab_gcm9k_17:last-child{margin-right:0;border-radius:0 var(--mimir-control-radius) var(--mimir-control-radius) 0}._detailed_gcm9k_92 ._tab_gcm9k_17[data-active=true]{border-bottom:var(--mimir-space-1xs) solid var(--detailed-border-color, var(--black-80))}._detailed_gcm9k_92 ._tab_gcm9k_17:after{display:none}._detailed_gcm9k_92 ._tab_gcm9k_17:not([data-selected]){-webkit-filter:none;filter:none}._detailed_gcm9k_92 ._tab_gcm9k_17 ._tab-content_gcm9k_120{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--mimir-space-2xs);-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;width:100%;text-align:left}._detailed_gcm9k_92 ._tab_gcm9k_17 ._tab-content_gcm9k_120 ._tab-value_gcm9k_128{width:100%;color:var(--detailed-value-color, var(--black-60));font-weight:var(--mimir-font-weight-text-semibold);font-size:var(--mimir-size-text-xl);font-family:var(--mimir-font-inter);line-height:var(--mimir-line-height-text-l);word-break:break-word}._detailed_gcm9k_92 ._tab_gcm9k_17 ._tab-content_gcm9k_120 ._tab-name_gcm9k_137{width:100%;color:var(--black-60);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-s);font-family:var(--mimir-font-inter);line-height:var(--mimir-line-height-text-xss1);word-break:break-word}._detailed_gcm9k_92 ._tab_gcm9k_17 ._tab-content_gcm9k_120 ._tab-header_gcm9k_146{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%}._detailed_gcm9k_92 ._tab_gcm9k_17 ._tab-content_gcm9k_120 ._tab-header_gcm9k_146 ._tab-text_gcm9k_152{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--mimir-space-2xs);min-width:0}._detailed_gcm9k_92 ._tab_gcm9k_17 ._tab-content_gcm9k_120 ._tab-header_gcm9k_146 ._tab-icon_gcm9k_159{-ms-flex-negative:0;flex-shrink:0;-ms-flex-item-align:end;-ms-grid-row-align:end;align-self:end;height:24px;margin-left:var(--mimir-space-xs)}
@@ -1,35 +1,45 @@
1
- import { useRef as g, useEffect as v } from "react";
2
- import { BLOCK_WIDTH as p, MAX_MOBILE_WIDTH as H } from "./constants.js";
3
- const b = (s, n, w) => {
4
- const i = g(null);
5
- return v(() => {
1
+ import { useRef as g, useEffect as d } from "react";
2
+ import { BLOCK_WIDTH as n, MAX_MOBILE_WIDTH as v } from "./constants.js";
3
+ const M = (l, s, u) => {
4
+ const c = g(null);
5
+ return d(() => {
6
6
  var r, y, a;
7
- const $ = window.innerHeight, c = window.innerWidth, t = i.current;
7
+ const m = window.innerHeight, i = window.innerWidth, t = c.current;
8
8
  if (t && t !== null) {
9
- const m = ((r = t == null ? void 0 : t.parentElement) == null ? void 0 : r.offsetWidth) ?? 0, l = ((y = t == null ? void 0 : t.parentElement) == null ? void 0 : y.offsetHeight) ?? 0, o = (a = t == null ? void 0 : t.parentElement) == null ? void 0 : a.getBoundingClientRect(), e = t.offsetHeight;
10
- if (s) {
11
- if (s === "center") {
12
- t.style.position = "fixed", t.style.top = `calc(50vh - ${e / 2}px)`, t.style.left = `calc(50vw - ${p / 2}px)`, t.style.opacity = "1";
9
+ const w = ((r = t == null ? void 0 : t.parentElement) == null ? void 0 : r.offsetWidth) ?? 0, p = ((y = t == null ? void 0 : t.parentElement) == null ? void 0 : y.offsetHeight) ?? 0, o = (a = t == null ? void 0 : t.parentElement) == null ? void 0 : a.getBoundingClientRect(), e = t.offsetHeight;
10
+ if (l) {
11
+ if (l === "center") {
12
+ t.style.position = "fixed", t.style.top = `calc(50vh - ${e / 2}px)`, t.style.left = `calc(50vw - ${n / 2}px)`, t.style.opacity = "1";
13
13
  return;
14
14
  }
15
- if (s === "bottom") {
16
- t.style.top = l + "px", t.style.opacity = "1";
15
+ if (l === "bottom") {
16
+ t.style.top = p + "px", t.style.opacity = "1";
17
17
  return;
18
18
  }
19
- if (s === "top") {
19
+ if (l === "top") {
20
20
  t.style.top = -e + "px", t.style.opacity = "1";
21
21
  return;
22
22
  }
23
23
  }
24
- const d = o.x + p > c, u = o.bottom + e > $, x = o.top >= e;
25
- if (d) {
26
- const f = m - p, h = f < 0 ? f / 2 : f;
27
- n ? t.style.left = `${Math.max(0, o.x + h)}px` : t.style.left = `${h}px`;
28
- }
29
- u && x ? n ? t.style.top = `${o.top - e}px` : t.style.top = `-${e}px` : u && !x ? c <= H ? (t.style.position = "fixed", t.style.top = `calc(50vh - ${e / 2}px)`, t.style.left = `calc(50vw - ${p / 2}px)`) : n ? t.style.top = `calc(50vh - ${e / 2}px)` : t.style.top = `${l}px` : n ? t.style.top = `${o.top + l}px` : t.style.top = `${l}px`, t.style.opacity = "1";
24
+ const $ = o.x + n > i, h = o.bottom + e > m, x = o.top >= e;
25
+ if ($)
26
+ if (s) {
27
+ const f = Math.max(
28
+ 0,
29
+ Math.min(
30
+ o.right - n,
31
+ i - n
32
+ )
33
+ );
34
+ t.style.left = `${f}px`;
35
+ } else {
36
+ const f = Math.max(w - n, -o.left);
37
+ t.style.left = `${f}px`;
38
+ }
39
+ h && x ? s ? t.style.top = `${o.top - e}px` : t.style.top = `-${e}px` : h && !x ? i <= v ? (t.style.position = "fixed", t.style.top = `calc(50vh - ${e / 2}px)`, t.style.left = `calc(50vw - ${n / 2}px)`) : s ? t.style.top = `calc(50vh - ${e / 2}px)` : t.style.top = `${p}px` : s ? t.style.top = `${o.top + p}px` : t.style.top = `${p}px`, t.style.opacity = "1";
30
40
  }
31
- }, [w, s, n]), i;
41
+ }, [u, l, s]), c;
32
42
  };
33
43
  export {
34
- b as useDatePickerPosition
44
+ M as useDatePickerPosition
35
45
  };
@@ -1,25 +1,25 @@
1
- import { jsxs as j, jsx as h, Fragment as Se } from "react/jsx-runtime";
1
+ import { jsxs as j, jsx as v, Fragment as Ne } from "react/jsx-runtime";
2
2
  import { c as I } from "../../index-DIxK0V-G.js";
3
3
  import * as q from "react";
4
- import V, { useState as ae, createContext as ve, useReducer as Ae, useMemo as C, useId as he, useRef as se, useContext as xe, forwardRef as Fe, useEffect as ue } from "react";
5
- import { ETabTrailSize as ke } from "./constants.js";
4
+ import V, { useState as ae, createContext as ge, useReducer as Se, useMemo as C, useId as ve, useRef as se, useContext as he, forwardRef as Ae, useEffect as ue } from "react";
5
+ import { ETabTrailSize as Fe } from "./constants.js";
6
6
  import { TabButtons as De } from "./TabButtons/TabButtons.js";
7
7
  import { ETabTrailButtonVariant as Re } from "./TabButtons/constants.js";
8
8
  import { Icon as be } from "../../icons/Icon.js";
9
9
  import { NotificationBadge as Le } from "../NotificationBadge/NotificationBadge.js";
10
- import { M as me, W as Y, s as re, y as Q, o as W, n as le, H as X, $ as ge, b as Oe, D as _e, a as K, u as Me, c as N, e as Be } from "../../keyboard-wis2TUql.js";
10
+ import { M as me, W as Y, s as re, y as Q, o as W, n as le, H as X, $ as xe, b as Oe, D as _e, a as K, u as Me, c as E, e as Be } from "../../keyboard-wis2TUql.js";
11
11
  import { w as We } from "../../use-active-press-CnDeVvQq.js";
12
12
  import { e as Ce } from "../../use-resolve-button-type-DhFdPxnv.js";
13
13
  import { f as Ge } from "../../use-is-mounted-MBU4fiLr.js";
14
14
  import { T as Te, s as Ue } from "../../hidden-CkTYbiNM.js";
15
- import { _ as J, T as ne, P as z, F as S } from "../../focus-management-BAl0GmRk.js";
15
+ import { _ as J, T as ne, P as z, F as N } from "../../focus-management-BAl0GmRk.js";
16
16
  import '../../assets/TabTrail.css';function ze({ onFocus: e }) {
17
17
  let [t, n] = ae(!0), r = Ge();
18
18
  return t ? V.createElement(Te, { as: "button", type: "button", features: Ue.Focusable, onFocus: (a) => {
19
19
  a.preventDefault();
20
- let s, i = 50;
20
+ let s, o = 50;
21
21
  function f() {
22
- if (i-- <= 0) {
22
+ if (o-- <= 0) {
23
23
  s && cancelAnimationFrame(s);
24
24
  return;
25
25
  }
@@ -42,11 +42,11 @@ function Ve() {
42
42
  let a = (n = r.get(t)) != null ? n : 0;
43
43
  r.set(t, a + 1);
44
44
  let s = Array.from(r.keys()).indexOf(t);
45
- function i() {
45
+ function o() {
46
46
  let f = r.get(t);
47
47
  f > 1 ? r.set(t, f - 1) : r.delete(t);
48
48
  }
49
- return [s, i];
49
+ return [s, o];
50
50
  } };
51
51
  }
52
52
  function qe({ children: e }) {
@@ -63,19 +63,19 @@ var He = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backward
63
63
  let Ke = { 0(e, t) {
64
64
  var n;
65
65
  let r = J(e.tabs, (d) => d.current), a = J(e.panels, (d) => d.current), s = r.filter((d) => {
66
- var x;
67
- return !((x = d.current) != null && x.hasAttribute("disabled"));
68
- }), i = { ...e, tabs: r, panels: a };
66
+ var h;
67
+ return !((h = d.current) != null && h.hasAttribute("disabled"));
68
+ }), o = { ...e, tabs: r, panels: a };
69
69
  if (t.index < 0 || t.index > r.length - 1) {
70
70
  let d = K(Math.sign(t.index - e.selectedIndex), { [-1]: () => 1, 0: () => K(Math.sign(t.index), { [-1]: () => 0, 0: () => 0, 1: () => 1 }), 1: () => 0 });
71
- if (s.length === 0) return i;
72
- let x = K(d, { 0: () => r.indexOf(s[0]), 1: () => r.indexOf(s[s.length - 1]) });
73
- return { ...i, selectedIndex: x === -1 ? e.selectedIndex : x };
71
+ if (s.length === 0) return o;
72
+ let h = K(d, { 0: () => r.indexOf(s[0]), 1: () => r.indexOf(s[s.length - 1]) });
73
+ return { ...o, selectedIndex: h === -1 ? e.selectedIndex : h };
74
74
  }
75
75
  let f = r.slice(0, t.index), P = [...r.slice(t.index), ...f].find((d) => s.includes(d));
76
- if (!P) return i;
77
- let v = (n = r.indexOf(P)) != null ? n : e.selectedIndex;
78
- return v === -1 && (v = e.selectedIndex), { ...i, selectedIndex: v };
76
+ if (!P) return o;
77
+ let g = (n = r.indexOf(P)) != null ? n : e.selectedIndex;
78
+ return g === -1 && (g = e.selectedIndex), { ...o, selectedIndex: g };
79
79
  }, 1(e, t) {
80
80
  if (e.tabs.includes(t.tab)) return e;
81
81
  let n = e.tabs[e.selectedIndex], r = J([...e.tabs, t.tab], (s) => s.current), a = e.selectedIndex;
@@ -86,20 +86,20 @@ let Ke = { 0(e, t) {
86
86
  return e.panels.includes(t.panel) ? e : { ...e, panels: J([...e.panels, t.panel], (n) => n.current) };
87
87
  }, 4(e, t) {
88
88
  return { ...e, panels: e.panels.filter((n) => n !== t.panel) };
89
- } }, de = ve(null);
89
+ } }, de = ge(null);
90
90
  de.displayName = "TabsDataContext";
91
91
  function H(e) {
92
- let t = xe(de);
92
+ let t = he(de);
93
93
  if (t === null) {
94
94
  let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
95
95
  throw Error.captureStackTrace && Error.captureStackTrace(n, H), n;
96
96
  }
97
97
  return t;
98
98
  }
99
- let fe = ve(null);
99
+ let fe = ge(null);
100
100
  fe.displayName = "TabsActionsContext";
101
101
  function pe(e) {
102
- let t = xe(fe);
102
+ let t = he(fe);
103
103
  if (t === null) {
104
104
  let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
105
105
  throw Error.captureStackTrace && Error.captureStackTrace(n, pe), n;
@@ -111,23 +111,23 @@ function Ye(e, t) {
111
111
  }
112
112
  let Qe = "div";
113
113
  function Xe(e, t) {
114
- let { defaultIndex: n = 0, vertical: r = !1, manual: a = !1, onChange: s, selectedIndex: i = null, ...f } = e;
115
- const P = r ? "vertical" : "horizontal", v = a ? "manual" : "auto";
116
- let d = i !== null, x = re({ isControlled: d }), A = Q(t), [p, u] = Ae(Ye, { info: x, selectedIndex: i ?? n, tabs: [], panels: [] }), D = C(() => ({ selectedIndex: p.selectedIndex }), [p.selectedIndex]), R = re(s || (() => {
117
- })), y = re(p.tabs), b = C(() => ({ orientation: P, activation: v, ...p }), [P, v, p]), F = W((o) => (u({ type: 1, tab: o }), () => u({ type: 2, tab: o }))), L = W((o) => (u({ type: 3, panel: o }), () => u({ type: 4, panel: o }))), g = W((o) => {
118
- _.current !== o && R.current(o), d || u({ type: 0, index: o });
119
- }), _ = re(d ? e.selectedIndex : p.selectedIndex), O = C(() => ({ registerTab: F, registerPanel: L, change: g }), []);
114
+ let { defaultIndex: n = 0, vertical: r = !1, manual: a = !1, onChange: s, selectedIndex: o = null, ...f } = e;
115
+ const P = r ? "vertical" : "horizontal", g = a ? "manual" : "auto";
116
+ let d = o !== null, h = re({ isControlled: d }), S = Q(t), [p, u] = Se(Ye, { info: h, selectedIndex: o ?? n, tabs: [], panels: [] }), D = C(() => ({ selectedIndex: p.selectedIndex }), [p.selectedIndex]), R = re(s || (() => {
117
+ })), k = re(p.tabs), b = C(() => ({ orientation: P, activation: g, ...p }), [P, g, p]), A = W((i) => (u({ type: 1, tab: i }), () => u({ type: 2, tab: i }))), L = W((i) => (u({ type: 3, panel: i }), () => u({ type: 4, panel: i }))), x = W((i) => {
118
+ _.current !== i && R.current(i), d || u({ type: 0, index: i });
119
+ }), _ = re(d ? e.selectedIndex : p.selectedIndex), O = C(() => ({ registerTab: A, registerPanel: L, change: x }), []);
120
120
  le(() => {
121
- u({ type: 0, index: i ?? n });
122
- }, [i]), le(() => {
121
+ u({ type: 0, index: o ?? n });
122
+ }, [o]), le(() => {
123
123
  if (_.current === void 0 || p.tabs.length <= 0) return;
124
- let o = J(p.tabs, (E) => E.current);
125
- o.some((E, k) => p.tabs[k] !== E) && g(o.indexOf(p.tabs[_.current]));
124
+ let i = J(p.tabs, (y) => y.current);
125
+ i.some((y, F) => p.tabs[F] !== y) && x(i.indexOf(p.tabs[_.current]));
126
126
  });
127
- let T = { ref: A };
127
+ let T = { ref: S };
128
128
  return V.createElement(qe, null, V.createElement(fe.Provider, { value: O }, V.createElement(de.Provider, { value: b }, b.tabs.length <= 0 && V.createElement(ze, { onFocus: () => {
129
- var o, E;
130
- for (let k of y.current) if (((o = k.current) == null ? void 0 : o.tabIndex) === 0) return (E = k.current) == null || E.focus(), !0;
129
+ var i, y;
130
+ for (let F of k.current) if (((i = F.current) == null ? void 0 : i.tabIndex) === 0) return (y = F.current) == null || y.focus(), !0;
131
131
  return !1;
132
132
  } }), X({ ourProps: T, theirProps: f, slot: D, defaultTag: Qe, name: "Tabs" }))));
133
133
  }
@@ -139,11 +139,11 @@ function et(e, t) {
139
139
  let tt = "button";
140
140
  function rt(e, t) {
141
141
  var n, r;
142
- let a = he(), { id: s = `headlessui-tabs-tab-${a}`, disabled: i = !1, autoFocus: f = !1, ...P } = e, { orientation: v, activation: d, selectedIndex: x, tabs: A, panels: p } = H("Tab"), u = pe("Tab"), D = H("Tab"), [R, y] = ae(null), b = se(null), F = Q(b, t, y);
142
+ let a = ve(), { id: s = `headlessui-tabs-tab-${a}`, disabled: o = !1, autoFocus: f = !1, ...P } = e, { orientation: g, activation: d, selectedIndex: h, tabs: S, panels: p } = H("Tab"), u = pe("Tab"), D = H("Tab"), [R, k] = ae(null), b = se(null), A = Q(b, t, k);
143
143
  le(() => u.registerTab(b), [u, b]);
144
- let L = Pe("tabs"), g = A.indexOf(b);
145
- g === -1 && (g = L);
146
- let _ = g === x, O = W((l) => {
144
+ let L = Pe("tabs"), x = S.indexOf(b);
145
+ x === -1 && (x = L);
146
+ let _ = x === h, O = W((l) => {
147
147
  var $;
148
148
  let B = l();
149
149
  if (B === ne.Success && d === "auto") {
@@ -152,32 +152,32 @@ function rt(e, t) {
152
152
  }
153
153
  return B;
154
154
  }), T = W((l) => {
155
- let $ = A.map((B) => B.current).filter(Boolean);
156
- if (l.key === N.Space || l.key === N.Enter) {
157
- l.preventDefault(), l.stopPropagation(), u.change(g);
155
+ let $ = S.map((B) => B.current).filter(Boolean);
156
+ if (l.key === E.Space || l.key === E.Enter) {
157
+ l.preventDefault(), l.stopPropagation(), u.change(x);
158
158
  return;
159
159
  }
160
160
  switch (l.key) {
161
- case N.Home:
162
- case N.PageUp:
163
- return l.preventDefault(), l.stopPropagation(), O(() => z($, S.First));
164
- case N.End:
165
- case N.PageDown:
166
- return l.preventDefault(), l.stopPropagation(), O(() => z($, S.Last));
161
+ case E.Home:
162
+ case E.PageUp:
163
+ return l.preventDefault(), l.stopPropagation(), O(() => z($, N.First));
164
+ case E.End:
165
+ case E.PageDown:
166
+ return l.preventDefault(), l.stopPropagation(), O(() => z($, N.Last));
167
167
  }
168
- if (O(() => K(v, { vertical() {
169
- return l.key === N.ArrowUp ? z($, S.Previous | S.WrapAround) : l.key === N.ArrowDown ? z($, S.Next | S.WrapAround) : ne.Error;
168
+ if (O(() => K(g, { vertical() {
169
+ return l.key === E.ArrowUp ? z($, N.Previous | N.WrapAround) : l.key === E.ArrowDown ? z($, N.Next | N.WrapAround) : ne.Error;
170
170
  }, horizontal() {
171
- return l.key === N.ArrowLeft ? z($, S.Previous | S.WrapAround) : l.key === N.ArrowRight ? z($, S.Next | S.WrapAround) : ne.Error;
171
+ return l.key === E.ArrowLeft ? z($, N.Previous | N.WrapAround) : l.key === E.ArrowRight ? z($, N.Next | N.WrapAround) : ne.Error;
172
172
  } })) === ne.Success) return l.preventDefault();
173
- }), o = se(!1), E = W(() => {
173
+ }), i = se(!1), y = W(() => {
174
174
  var l;
175
- o.current || (o.current = !0, (l = b.current) == null || l.focus({ preventScroll: !0 }), u.change(g), Be(() => {
176
- o.current = !1;
175
+ i.current || (i.current = !0, (l = b.current) == null || l.focus({ preventScroll: !0 }), u.change(x), Be(() => {
176
+ i.current = !1;
177
177
  }));
178
- }), k = W((l) => {
178
+ }), F = W((l) => {
179
179
  l.preventDefault();
180
- }), { isFocusVisible: M, focusProps: ie } = ge({ autoFocus: f }), { isHovered: G, hoverProps: oe } = Oe({ isDisabled: i }), { pressed: Z, pressProps: ce } = We({ disabled: i }), c = C(() => ({ selected: _, hover: G, active: Z, focus: M, autofocus: f, disabled: i }), [_, G, M, Z, f, i]), w = _e({ ref: F, onKeyDown: T, onMouseDown: k, onClick: E, id: s, role: "tab", type: Ce(e, R), "aria-controls": (r = (n = p[g]) == null ? void 0 : n.current) == null ? void 0 : r.id, "aria-selected": _, tabIndex: _ ? 0 : -1, disabled: i || void 0, autoFocus: f }, ie, oe, ce);
180
+ }), { isFocusVisible: M, focusProps: oe } = xe({ autoFocus: f }), { isHovered: G, hoverProps: ie } = Oe({ isDisabled: o }), { pressed: Z, pressProps: ce } = We({ disabled: o }), c = C(() => ({ selected: _, hover: G, active: Z, focus: M, autofocus: f, disabled: o }), [_, G, M, Z, f, o]), w = _e({ ref: A, onKeyDown: T, onMouseDown: F, onClick: y, id: s, role: "tab", type: Ce(e, R), "aria-controls": (r = (n = p[x]) == null ? void 0 : n.current) == null ? void 0 : r.id, "aria-selected": _, tabIndex: _ ? 0 : -1, disabled: o || void 0, autoFocus: f }, oe, ie, ce);
181
181
  return X({ ourProps: w, theirProps: P, slot: c, defaultTag: tt, name: "Tabs.Tab" });
182
182
  }
183
183
  let nt = "div";
@@ -186,68 +186,68 @@ function at(e, t) {
186
186
  return X({ ourProps: { ref: r }, theirProps: e, slot: a, defaultTag: nt, name: "Tabs.Panels" });
187
187
  }
188
188
  let st = "div", lt = me.RenderStrategy | me.Static;
189
- function it(e, t) {
189
+ function ot(e, t) {
190
190
  var n, r, a, s;
191
- let i = he(), { id: f = `headlessui-tabs-panel-${i}`, tabIndex: P = 0, ...v } = e, { selectedIndex: d, tabs: x, panels: A } = H("Tab.Panel"), p = pe("Tab.Panel"), u = se(null), D = Q(u, t);
191
+ let o = ve(), { id: f = `headlessui-tabs-panel-${o}`, tabIndex: P = 0, ...g } = e, { selectedIndex: d, tabs: h, panels: S } = H("Tab.Panel"), p = pe("Tab.Panel"), u = se(null), D = Q(u, t);
192
192
  le(() => p.registerPanel(u), [p, u]);
193
- let R = Pe("panels"), y = A.indexOf(u);
194
- y === -1 && (y = R);
195
- let b = y === d, { isFocusVisible: F, focusProps: L } = ge(), g = C(() => ({ selected: b, focus: F }), [b, F]), _ = _e({ ref: D, id: f, role: "tabpanel", "aria-labelledby": (r = (n = x[y]) == null ? void 0 : n.current) == null ? void 0 : r.id, tabIndex: b ? P : -1 }, L);
196
- return !b && ((a = v.unmount) == null || a) && !((s = v.static) != null && s) ? V.createElement(Te, { "aria-hidden": "true", ..._ }) : X({ ourProps: _, theirProps: v, slot: g, defaultTag: st, features: lt, visible: b, name: "Tabs.Panel" });
193
+ let R = Pe("panels"), k = S.indexOf(u);
194
+ k === -1 && (k = R);
195
+ let b = k === d, { isFocusVisible: A, focusProps: L } = xe(), x = C(() => ({ selected: b, focus: A }), [b, A]), _ = _e({ ref: D, id: f, role: "tabpanel", "aria-labelledby": (r = (n = h[k]) == null ? void 0 : n.current) == null ? void 0 : r.id, tabIndex: b ? P : -1 }, L);
196
+ return !b && ((a = g.unmount) == null || a) && !((s = g.static) != null && s) ? V.createElement(Te, { "aria-hidden": "true", ..._ }) : X({ ourProps: _, theirProps: g, slot: x, defaultTag: st, features: lt, visible: b, name: "Tabs.Panel" });
197
197
  }
198
- let ot = Y(rt), we = Y(Xe), $e = Y(et), ye = Y(at), Ee = Y(it), ct = Object.assign(ot, { Group: we, List: $e, Panels: ye, Panel: Ee });
199
- const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt = "_list_14t2i_55", bt = "_tabs_14t2i_66", mt = "_buttons_14t2i_72", vt = "_m_14t2i_79", ht = "_s_14t2i_87", xt = "_detailed_14t2i_95", m = {
198
+ let it = Y(rt), we = Y(Xe), $e = Y(et), ke = Y(at), ye = Y(ot), ct = Object.assign(it, { Group: we, List: $e, Panels: ke, Panel: ye });
199
+ const ut = "_container_gcm9k_2", dt = "_group_gcm9k_6", ft = "_tab_gcm9k_17", pt = "_list_gcm9k_52", bt = "_tabs_gcm9k_63", mt = "_buttons_gcm9k_69", gt = "_m_gcm9k_76", vt = "_s_gcm9k_84", ht = "_detailed_gcm9k_92", m = {
200
200
  container: ut,
201
201
  group: dt,
202
- "group-inner": "_group-inner_14t2i_10",
202
+ "group-inner": "_group-inner_gcm9k_10",
203
203
  tab: ft,
204
204
  list: pt,
205
205
  tabs: bt,
206
206
  buttons: mt,
207
- m: vt,
208
- s: ht,
209
- detailed: xt,
210
- "tab-content": "_tab-content_14t2i_123",
211
- "tab-value": "_tab-value_14t2i_131",
212
- "tab-name": "_tab-name_14t2i_140",
213
- "tab-header": "_tab-header_14t2i_149",
214
- "tab-text": "_tab-text_14t2i_155",
215
- "tab-icon": "_tab-icon_14t2i_162"
216
- }, Dt = Fe(
207
+ m: gt,
208
+ s: vt,
209
+ detailed: ht,
210
+ "tab-content": "_tab-content_gcm9k_120",
211
+ "tab-value": "_tab-value_gcm9k_128",
212
+ "tab-name": "_tab-name_gcm9k_137",
213
+ "tab-header": "_tab-header_gcm9k_146",
214
+ "tab-text": "_tab-text_gcm9k_152",
215
+ "tab-icon": "_tab-icon_gcm9k_159"
216
+ }, Dt = Ae(
217
217
  ({
218
218
  categories: e,
219
- size: t = ke.M,
219
+ size: t = Fe.M,
220
220
  showButtons: n = !0,
221
221
  className: r,
222
222
  selectedTabIndex: a,
223
223
  onTabChange: s,
224
- buttonsVariant: i = Re.WHITE,
224
+ buttonsVariant: o = Re.WHITE,
225
225
  autoShowButtons: f = !1,
226
226
  tabClassName: P,
227
- listClassName: v,
227
+ listClassName: g,
228
228
  panelClassName: d,
229
- buttonsClassName: x,
230
- indicatorColor: A,
229
+ buttonsClassName: h,
230
+ indicatorColor: S,
231
231
  tabIcons: p = {},
232
232
  variant: u = "default",
233
233
  tabContentClassName: D,
234
234
  tabHeaderClassName: R,
235
- tabTextClassName: y,
235
+ tabTextClassName: k,
236
236
  tabValueClassName: b,
237
- tabNameClassName: F,
237
+ tabNameClassName: A,
238
238
  tabIconClassName: L,
239
- tabsClassName: g,
239
+ tabsClassName: x,
240
240
  groupInnerClassName: _
241
241
  }, O) => {
242
- const [T, o] = ae(a || 0), [E, k] = ae(!1), M = se(null), ie = {
243
- ...A && { "--tab-indicator-color": A }
242
+ const [T, i] = ae(a || 0), [y, F] = ae(!1), M = se(null), oe = {
243
+ ...S && { "--tab-indicator-color": S }
244
244
  };
245
245
  ue(() => {
246
- a !== void 0 && a !== T && o(a);
246
+ a !== void 0 && a !== T && i(a);
247
247
  }, [T, a]);
248
248
  const G = (c) => {
249
- o(c), s == null || s(c);
250
- }, oe = () => {
249
+ i(c), s == null || s(c);
250
+ }, ie = () => {
251
251
  const c = (T + 1) % e.length;
252
252
  G(c);
253
253
  }, Z = () => {
@@ -268,12 +268,12 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
268
268
  const c = () => {
269
269
  if (M.current) {
270
270
  const { scrollWidth: w, clientWidth: l } = M.current;
271
- k(w > l);
271
+ F(w > l);
272
272
  }
273
273
  };
274
274
  return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
275
275
  }, [e]);
276
- const ce = f ? E : n;
276
+ const ce = f ? y : n;
277
277
  return /* @__PURE__ */ j(
278
278
  we,
279
279
  {
@@ -286,15 +286,15 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
286
286
  ),
287
287
  selectedIndex: T,
288
288
  onChange: G,
289
- style: ie,
289
+ style: oe,
290
290
  children: [
291
291
  /* @__PURE__ */ j("div", { className: I(m["group-inner"], _), children: [
292
- /* @__PURE__ */ h(
292
+ /* @__PURE__ */ v(
293
293
  $e,
294
294
  {
295
295
  ref: M,
296
- className: I(m.list, v),
297
- children: /* @__PURE__ */ h("div", { className: I(m.tabs, g), children: e.map(
296
+ className: I(m.list, g),
297
+ children: /* @__PURE__ */ v("div", { className: I(m.tabs, x), children: e.map(
298
298
  ({
299
299
  name: c,
300
300
  defaultActive: w,
@@ -303,7 +303,7 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
303
303
  valueColor: B,
304
304
  borderColor: ee
305
305
  }, U) => {
306
- const te = p[U], Ne = u === "detailed" ? {
306
+ const te = p[U], Ee = u === "detailed" ? {
307
307
  ...B && {
308
308
  "--detailed-value-color": B
309
309
  },
@@ -311,13 +311,13 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
311
311
  "--detailed-border-color": ee
312
312
  }
313
313
  } : void 0;
314
- return /* @__PURE__ */ h(
314
+ return /* @__PURE__ */ v(
315
315
  ct,
316
316
  {
317
317
  className: `${m.tab} ${w || T === U ? 'data-active="true"' : ""} ${P || ""}`,
318
318
  "data-active": w || T === U,
319
- style: Ne,
320
- children: u === "detailed" ? /* @__PURE__ */ h(
319
+ style: Ee,
320
+ children: u === "detailed" ? /* @__PURE__ */ v(
321
321
  "div",
322
322
  {
323
323
  className: I(
@@ -337,10 +337,10 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
337
337
  {
338
338
  className: I(
339
339
  m["tab-text"],
340
- y
340
+ k
341
341
  ),
342
342
  children: [
343
- /* @__PURE__ */ h(
343
+ /* @__PURE__ */ v(
344
344
  "div",
345
345
  {
346
346
  className: I(
@@ -350,12 +350,12 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
350
350
  children: $
351
351
  }
352
352
  ),
353
- /* @__PURE__ */ h(
353
+ /* @__PURE__ */ v(
354
354
  "div",
355
355
  {
356
356
  className: I(
357
357
  m["tab-name"],
358
- F
358
+ A
359
359
  ),
360
360
  children: c
361
361
  }
@@ -363,24 +363,24 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
363
363
  ]
364
364
  }
365
365
  ),
366
- /* @__PURE__ */ h(
366
+ /* @__PURE__ */ v(
367
367
  "div",
368
368
  {
369
369
  className: I(
370
370
  m["tab-icon"],
371
371
  L
372
372
  ),
373
- children: /* @__PURE__ */ h(be, { iconName: "ArrowUpRight24px" })
373
+ children: /* @__PURE__ */ v(be, { iconName: "ArrowUpRight24px" })
374
374
  }
375
375
  )
376
376
  ]
377
377
  }
378
378
  )
379
379
  }
380
- ) : /* @__PURE__ */ j(Se, { children: [
381
- te && /* @__PURE__ */ h(be, { iconName: te }),
380
+ ) : /* @__PURE__ */ j(Ne, { children: [
381
+ te && /* @__PURE__ */ v(be, { iconName: te }),
382
382
  c,
383
- l && /* @__PURE__ */ h(
383
+ l && /* @__PURE__ */ v(
384
384
  Le,
385
385
  {
386
386
  count: l,
@@ -395,17 +395,17 @@ const ut = "_container_14t2i_2", dt = "_group_14t2i_6", ft = "_tab_14t2i_17", pt
395
395
  ) })
396
396
  }
397
397
  ),
398
- ce && /* @__PURE__ */ h("div", { className: I(m.buttons, x), children: /* @__PURE__ */ h(
398
+ ce && /* @__PURE__ */ v("div", { className: I(m.buttons, h), children: /* @__PURE__ */ v(
399
399
  De,
400
400
  {
401
401
  handlePrevTab: Z,
402
- handleNextTab: oe,
403
- buttonsVariant: i
402
+ handleNextTab: ie,
403
+ buttonsVariant: o
404
404
  }
405
405
  ) })
406
406
  ] }),
407
- /* @__PURE__ */ h(ye, { className: m.panels, children: e.map(({ name: c, content: w }) => /* @__PURE__ */ h(
408
- Ee,
407
+ /* @__PURE__ */ v(ke, { className: m.panels, children: e.map(({ name: c, content: w }) => /* @__PURE__ */ v(
408
+ ye,
409
409
  {
410
410
  className: I(m.panel, d),
411
411
  children: w
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.66.4",
4
+ "version": "1.67.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {