@companix/uikit 0.0.79 → 0.0.81

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,4 +1,5 @@
1
1
  import { DialogProps } from '../Dialog';
2
+ import { DrawerProps } from '../Drawer';
2
3
  export interface PopupProps<T> {
3
4
  data: T;
4
5
  close: () => void;
@@ -19,8 +20,11 @@ type PopupsRegistry<T extends Store> = {
19
20
  Close: CloseAgent<T>;
20
21
  Open: OpenAgent<T>;
21
22
  };
22
- export declare const createDialogsRegistry: <T extends Store>(mapping: T) => PopupsRegistry<T>;
23
- interface PopupLayer extends Omit<DialogProps, 'open' | 'onOpenChange' | 'onClosed'> {
23
+ export declare const createPopupRegistry: <T extends Store>(mapping: T) => PopupsRegistry<T>;
24
+ interface DialogShellProps extends Omit<DialogProps, 'open' | 'onOpenChange' | 'onClosed'> {
24
25
  }
25
- export declare const DialogShell: ({ children, ...props }: PopupLayer) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const DialogShell: ({ children, ...props }: DialogShellProps) => import("react/jsx-runtime").JSX.Element;
27
+ interface DrawerShellProps extends Omit<DrawerProps, 'open' | 'onOpenChange' | 'onClosed'> {
28
+ }
29
+ export declare const DrawerShell: ({ children, ...props }: DrawerShellProps) => import("react/jsx-runtime").JSX.Element;
26
30
  export {};
package/dist/bundle.es.js CHANGED
@@ -2,18 +2,18 @@ import { Avatar as e } from "./bundle.es2.js";
2
2
  import { avatarSizes as p } from "./bundle.es3.js";
3
3
  import { Button as x } from "./bundle.es4.js";
4
4
  import { ButtonGroup as a } from "./bundle.es5.js";
5
- import { Spinner as c } from "./bundle.es6.js";
5
+ import { Spinner as l } from "./bundle.es6.js";
6
6
  import { Scrollable as n } from "./bundle.es7.js";
7
- import { ImitateScroll as S } from "./bundle.es8.js";
8
- import { Segments as u } from "./bundle.es9.js";
7
+ import { ImitateScroll as s } from "./bundle.es8.js";
8
+ import { Segments as g } from "./bundle.es9.js";
9
9
  import { Popover as h } from "./bundle.es10.js";
10
- import { Tooltip as P } from "./bundle.es11.js";
10
+ import { Tooltip as v } from "./bundle.es11.js";
11
11
  import { Select as B } from "./bundle.es12.js";
12
- import { SelectTags as d } from "./bundle.es13.js";
13
- import { Input as A } from "./bundle.es14.js";
12
+ import { SelectTags as R } from "./bundle.es13.js";
13
+ import { Input as k } from "./bundle.es14.js";
14
14
  import { OptionItem as b } from "./bundle.es15.js";
15
- import { NumberInput as y } from "./bundle.es16.js";
16
- import { OptionsList as G } from "./bundle.es17.js";
15
+ import { NumberInput as L } from "./bundle.es16.js";
16
+ import { OptionsList as C } from "./bundle.es17.js";
17
17
  import { Checkbox as O } from "./bundle.es18.js";
18
18
  import { Switch as z } from "./bundle.es19.js";
19
19
  import { Radio as j, RadioGroup as q } from "./bundle.es20.js";
@@ -29,21 +29,22 @@ import { DateInput as to } from "./bundle.es29.js";
29
29
  import { FileOverlay as mo } from "./bundle.es30.js";
30
30
  import { FormGroup as fo } from "./bundle.es31.js";
31
31
  import { TimePicker as io } from "./bundle.es32.js";
32
- import { Icon as lo } from "./bundle.es33.js";
33
- import { ProgressBar as so } from "./bundle.es34.js";
34
- import { Skeleton as go } from "./bundle.es35.js";
32
+ import { Icon as co } from "./bundle.es33.js";
33
+ import { ProgressBar as So } from "./bundle.es34.js";
34
+ import { Skeleton as uo } from "./bundle.es35.js";
35
35
  import { Blank as To } from "./bundle.es36.js";
36
- import { ProgressRing as Do } from "./bundle.es37.js";
37
- import { ThemeProvider as vo, useTheme as Bo } from "./bundle.es38.js";
38
- import { ColorSchemeScript as ko, colorSchemeScript as Ao } from "./bundle.es39.js";
36
+ import { ProgressRing as Po } from "./bundle.es37.js";
37
+ import { ThemeProvider as Do, useTheme as Bo } from "./bundle.es38.js";
38
+ import { ColorSchemeScript as Ro, colorSchemeScript as ko } from "./bundle.es39.js";
39
39
  import { useLocalStorage as bo } from "./bundle.es40.js";
40
- import { useBooleanState as yo } from "./bundle.es41.js";
41
- import { createAlertAgent as Go } from "./bundle.es42.js";
40
+ import { useBooleanState as Lo } from "./bundle.es41.js";
41
+ import { createAlertAgent as Co } from "./bundle.es42.js";
42
42
  import { createToaster as Oo } from "./bundle.es43.js";
43
43
  import { Toast as zo } from "./bundle.es44.js";
44
- import { DialogShell as jo, createDialogsRegistry as qo } from "./bundle.es45.js";
45
- import { createPopoversRegistry as Ho } from "./bundle.es46.js";
46
- import { createScope as Ko, createStaticScope as Mo } from "./bundle.es47.js";
44
+ import { DialogShell as jo, DrawerShell as qo, createPopupRegistry as Eo } from "./bundle.es45.js";
45
+ import { createPopoversRegistry as Jo } from "./bundle.es46.js";
46
+ import { createScope as Mo, createStaticScope as Qo } from "./bundle.es47.js";
47
+ import { RemoveListener as Vo } from "./bundle.es48.js";
47
48
  export {
48
49
  Q as AlertDialog,
49
50
  e as Avatar,
@@ -51,49 +52,51 @@ export {
51
52
  x as Button,
52
53
  a as ButtonGroup,
53
54
  O as Checkbox,
54
- ko as ColorSchemeScript,
55
+ Ro as ColorSchemeScript,
55
56
  Z as Countdown,
56
57
  to as DateInput,
57
58
  ro as DatePicker,
58
59
  K as Dialog,
59
60
  jo as DialogShell,
60
61
  H as Drawer,
62
+ qo as DrawerShell,
61
63
  mo as FileOverlay,
62
64
  fo as FormGroup,
63
- lo as Icon,
64
- S as ImitateScroll,
65
- A as Input,
65
+ co as Icon,
66
+ s as ImitateScroll,
67
+ k as Input,
66
68
  V as LoadingButton,
67
- y as NumberInput,
69
+ L as NumberInput,
68
70
  b as OptionItem,
69
- G as OptionsList,
71
+ C as OptionsList,
70
72
  h as Popover,
71
- so as ProgressBar,
72
- Do as ProgressRing,
73
+ So as ProgressBar,
74
+ Po as ProgressRing,
73
75
  j as Radio,
74
76
  q as RadioGroup,
77
+ Vo as RemoveListener,
75
78
  n as Scrollable,
76
- u as Segments,
79
+ g as Segments,
77
80
  B as Select,
78
- d as SelectTags,
79
- go as Skeleton,
80
- c as Spinner,
81
+ R as SelectTags,
82
+ uo as Skeleton,
83
+ l as Spinner,
81
84
  z as Switch,
82
85
  X as Tabs,
83
86
  $ as TextArea,
84
- vo as ThemeProvider,
87
+ Do as ThemeProvider,
85
88
  io as TimePicker,
86
89
  zo as Toast,
87
- P as Tooltip,
90
+ v as Tooltip,
88
91
  p as avatarSizes,
89
- Ao as colorSchemeScript,
90
- Go as createAlertAgent,
91
- qo as createDialogsRegistry,
92
- Ho as createPopoversRegistry,
93
- Ko as createScope,
94
- Mo as createStaticScope,
92
+ ko as colorSchemeScript,
93
+ Co as createAlertAgent,
94
+ Jo as createPopoversRegistry,
95
+ Eo as createPopupRegistry,
96
+ Mo as createScope,
97
+ Qo as createStaticScope,
95
98
  Oo as createToaster,
96
- yo as useBooleanState,
99
+ Lo as useBooleanState,
97
100
  bo as useLocalStorage,
98
101
  Bo as useTheme
99
102
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { useRef as L, useMemo as j, useImperativeHandle as k } from "react";
3
3
  import { Popover as q } from "./bundle.es10.js";
4
- import { useFroozeClosing as w } from "./bundle.es50.js";
5
- import { SelectInput as H } from "./bundle.es51.js";
6
- import { useScrollListController as M } from "./bundle.es52.js";
7
- import { OptionsPopover as N } from "./bundle.es53.js";
4
+ import { useFroozeClosing as w } from "./bundle.es51.js";
5
+ import { SelectInput as H } from "./bundle.es52.js";
6
+ import { useScrollListController as M } from "./bundle.es53.js";
7
+ import { OptionsPopover as N } from "./bundle.es54.js";
8
8
  import { mergeRefs as W } from "react-merge-refs";
9
9
  const Z = (t) => {
10
10
  const {
@@ -3,12 +3,12 @@ import { mergeRefs as T } from "react-merge-refs";
3
3
  import { useState as M, useRef as h, useMemo as j } from "react";
4
4
  import { matchPattern as q } from "@companix/utils-js";
5
5
  import { faXmark as V, faChevronDown as $ } from "@companix/icons-solid";
6
- import { useFroozeClosing as B } from "./bundle.es50.js";
6
+ import { useFroozeClosing as B } from "./bundle.es51.js";
7
7
  import { Popover as L } from "./bundle.es10.js";
8
8
  import { Icon as g } from "./bundle.es33.js";
9
9
  import { attr as l, getActiveElementByAnotherElement as X, contains as G } from "@companix/utils-browser";
10
- import { OptionsPopover as H } from "./bundle.es53.js";
11
- import { arrays as v } from "./bundle.es54.js";
10
+ import { OptionsPopover as H } from "./bundle.es54.js";
11
+ import { arrays as v } from "./bundle.es55.js";
12
12
  const ne = (r) => {
13
13
  const {
14
14
  closeAfterSelect: C,
@@ -1,8 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as b, useRef as R } from "react";
3
3
  import { mergeRefs as c } from "react-merge-refs";
4
- import { InputElement as x } from "./bundle.es55.js";
5
- import { InputContainer as I } from "./bundle.es56.js";
4
+ import { InputElement as x } from "./bundle.es56.js";
5
+ import { InputContainer as I } from "./bundle.es57.js";
6
6
  import g from "classnames";
7
7
  const N = b(
8
8
  ({
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import C from "classnames";
3
3
  import { forwardRef as j, useRef as w } from "react";
4
4
  import { mergeRefs as y } from "react-merge-refs";
5
- import { InputContainer as F } from "./bundle.es56.js";
5
+ import { InputContainer as F } from "./bundle.es57.js";
6
6
  import { NumericFormat as V } from "react-number-format";
7
7
  const D = j(
8
8
  ({
@@ -1,6 +1,6 @@
1
1
  import { jsxs as I, jsx as a } from "react/jsx-runtime";
2
2
  import { box as g } from "@companix/utils-browser";
3
- import { getInitialsFontSize as h } from "./bundle.es48.js";
3
+ import { getInitialsFontSize as h } from "./bundle.es49.js";
4
4
  const k = 24, y = ({
5
5
  alt: n,
6
6
  crossOrigin: i,
@@ -3,7 +3,7 @@ import d from "classnames";
3
3
  import * as e from "@radix-ui/react-dialog";
4
4
  import { VisuallyHidden as i } from "@radix-ui/react-visually-hidden";
5
5
  import { customCSS as p } from "@companix/utils-browser";
6
- import { RemoveListener as f } from "./bundle.es57.js";
6
+ import { RemoveListener as f } from "./bundle.es48.js";
7
7
  const h = ({
8
8
  open: t,
9
9
  onClosed: l,
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import f from "classnames";
3
3
  import * as o from "@radix-ui/react-dialog";
4
4
  import { VisuallyHidden as a } from "@radix-ui/react-visually-hidden";
5
- import { RemoveListener as v } from "./bundle.es57.js";
5
+ import { RemoveListener as v } from "./bundle.es48.js";
6
6
  const g = (l) => {
7
7
  const { size: n = "s", open: r, onOpenChange: s, children: c, onClosed: t, disableEsc: p, className: d } = l, m = (h) => {
8
8
  p && h.preventDefault();
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import * as r from "@radix-ui/react-alert-dialog";
3
3
  import { Button as c } from "./bundle.es4.js";
4
- import { RemoveListener as N } from "./bundle.es57.js";
4
+ import { RemoveListener as N } from "./bundle.es48.js";
5
5
  import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
6
6
  const C = ({
7
7
  open: d,
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
- import { useTabSlider as b, makeTabId as l } from "./bundle.es49.js";
2
+ import { useTabSlider as b, makeTabId as l } from "./bundle.es50.js";
3
3
  import * as n from "@radix-ui/react-tabs";
4
4
  import { useRef as m, useId as f, createContext as T, useContext as c } from "react";
5
5
  const o = T({ baseId: "", containerRef: {} }), u = ({ children: s, value: e, onChange: r }) => {
@@ -5,7 +5,7 @@ import { useState as A, useRef as j } from "react";
5
5
  import { Calendar as E } from "./bundle.es60.js";
6
6
  import { useDayDisableCheker as N } from "./bundle.es61.js";
7
7
  import { getNum as h, formatTime as v } from "@companix/utils-js";
8
- import { removeDigits as O } from "./bundle.es54.js";
8
+ import { removeDigits as O } from "./bundle.es55.js";
9
9
  import { SelectRightElements as Y } from "./bundle.es62.js";
10
10
  const i = {
11
11
  char: "-",
@@ -1,7 +1,7 @@
1
1
  import { jsxs as D, jsx as h } from "react/jsx-runtime";
2
2
  import { useMemo as M, useEffect as C } from "react";
3
3
  import { Select as c } from "./bundle.es12.js";
4
- import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es54.js";
4
+ import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es55.js";
5
5
  import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es63.js";
6
6
  const B = ({
7
7
  min: o = j,
@@ -1,7 +1,7 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { useRef as b, useMemo as I, useState as E, useCallback as A } from "react";
3
3
  import { getNum as S } from "@companix/utils-js";
4
- import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es54.js";
4
+ import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es55.js";
5
5
  import { SelectRightElements as z } from "./bundle.es62.js";
6
6
  import { Select as F } from "./bundle.es12.js";
7
7
  import { Input as G } from "./bundle.es14.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as e, jsx as s } from "react/jsx-runtime";
2
- import { getInitialsFontSize as l } from "./bundle.es48.js";
2
+ import { getInitialsFontSize as l } from "./bundle.es49.js";
3
3
  import { clamp as i, customCSS as m, px as n } from "@companix/utils-browser";
4
4
  const u = ({
5
5
  appearance: o = "primary",
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-toast";
3
3
  import { attr as T } from "@companix/utils-browser";
4
4
  import { useState as d, useRef as b, useEffect as j, useLayoutEffect as E } from "react";
5
- import { RemoveListener as I } from "./bundle.es57.js";
5
+ import { RemoveListener as I } from "./bundle.es48.js";
6
6
  const m = (o) => {
7
7
  const [r, u] = d(!0), [p, f] = d(!1), s = b(null), {
8
8
  appearance: C = "neutral",
@@ -1,45 +1,50 @@
1
- import { jsx as r, Fragment as m } from "react/jsx-runtime";
2
- import { useContext as C, createContext as g, useState as h, useEffect as x, useCallback as u } from "react";
3
- import { Dialog as D } from "./bundle.es22.js";
1
+ import { jsx as r, Fragment as h } from "react/jsx-runtime";
2
+ import { useContext as C, createContext as x, useState as P, useEffect as g, useCallback as u } from "react";
4
3
  import { hash as v } from "@companix/utils-js";
5
- const $ = (t) => {
6
- const e = {}, n = {}, l = [], c = v();
7
- for (const o in t)
8
- e[o] = () => {
9
- }, n[o] = () => {
10
- }, l.push(() => /* @__PURE__ */ r(O, { Open: e, Close: n, name: o, Content: t[o] }));
4
+ import { Dialog as w } from "./bundle.es22.js";
5
+ import { Drawer as D } from "./bundle.es21.js";
6
+ const j = (o) => {
7
+ const t = {}, e = {}, p = [], c = v();
8
+ for (const n in o)
9
+ t[n] = () => {
10
+ }, e[n] = () => {
11
+ }, p.push(() => /* @__PURE__ */ r(S, { Open: t, Close: e, name: n, Content: o[n] }));
11
12
  return {
12
- Open: e,
13
- Close: n,
14
- Overlay: () => /* @__PURE__ */ r(m, { children: l.map((o, s) => /* @__PURE__ */ r(o, {}, `popup-${c}-${s}`)) })
13
+ Open: t,
14
+ Close: e,
15
+ Overlay: () => /* @__PURE__ */ r(h, { children: p.map((n, s) => /* @__PURE__ */ r(n, {}, `popup-${c}-${s}`)) })
15
16
  };
16
- }, O = ({ name: t, Open: e, Close: n, Content: l }) => {
17
- const [{ data: c, open: o }, s] = h({ data: null, open: !1 });
18
- x(() => {
19
- e[t] = (a) => {
17
+ }, S = ({ name: o, Open: t, Close: e, Content: p }) => {
18
+ const [{ data: c, open: n }, s] = P({ data: null, open: !1 });
19
+ g(() => {
20
+ t[o] = (a) => {
20
21
  s({ data: a, open: !0 });
21
- }, n[t] = () => {
22
- o && p();
22
+ }, e[o] = () => {
23
+ n && l();
23
24
  };
24
25
  }, []);
25
- const p = u(() => {
26
+ const l = u(() => {
26
27
  s(({ data: a }) => ({ data: a, open: !1 }));
27
- }, []), f = u(() => {
28
+ }, []), d = u(() => {
28
29
  s({ data: null, open: !1 });
29
- }, []), d = u((a) => {
30
- a || p();
30
+ }, []), m = u((a) => {
31
+ a || l();
31
32
  }, []);
32
- return c ? /* @__PURE__ */ r(i.Provider, { value: { open: o, onOpenChange: d, onClosed: f }, children: /* @__PURE__ */ r(l, { data: c, close: p }) }) : null;
33
- }, i = g(null), S = () => {
34
- const t = C(i);
35
- if (!t)
36
- throw new Error("Dialog context not provided");
37
- return t;
38
- }, b = ({ children: t, ...e }) => {
39
- const n = S();
40
- return /* @__PURE__ */ r(D, { ...n, ...e, children: t });
33
+ return c ? /* @__PURE__ */ r(i.Provider, { value: { open: n, onOpenChange: m, onClosed: d }, children: /* @__PURE__ */ r(p, { data: c, close: l }) }) : null;
34
+ }, i = x(null), f = () => {
35
+ const o = C(i);
36
+ if (!o)
37
+ throw new Error("Popup context not provided");
38
+ return o;
39
+ }, k = ({ children: o, ...t }) => {
40
+ const e = f();
41
+ return /* @__PURE__ */ r(w, { ...e, ...t, children: o });
42
+ }, F = ({ children: o, ...t }) => {
43
+ const e = f();
44
+ return /* @__PURE__ */ r(D, { ...e, ...t, children: o });
41
45
  };
42
46
  export {
43
- b as DialogShell,
44
- $ as createDialogsRegistry
47
+ k as DialogShell,
48
+ F as DrawerShell,
49
+ j as createPopupRegistry
45
50
  };
@@ -1,27 +1,7 @@
1
- const _ = (e) => {
2
- if (e <= 16)
3
- return 5;
4
- if (e <= 24)
5
- return 8;
6
- if (e <= 32)
7
- return 10;
8
- if (e <= 36)
9
- return 13;
10
- if (e <= 44)
11
- return 14;
12
- if (e <= 48)
13
- return 17;
14
- if (e < 56)
15
- return 18;
16
- if (e <= 64)
17
- return 21;
18
- if (e <= 88)
19
- return 26;
20
- if (e <= 96)
21
- return 30;
22
- const n = Math.ceil(e * 0.3125), E = n % 2;
23
- return n + E;
24
- };
1
+ import { useEffect as r } from "react";
2
+ const n = ({ callback: e }) => (r(() => () => {
3
+ e?.();
4
+ }, []), null);
25
5
  export {
26
- _ as getInitialsFontSize
6
+ n as RemoveListener
27
7
  };
@@ -1,25 +1,27 @@
1
- import { useState as u, useEffect as d } from "react";
2
- const v = ({ baseId: r, value: e, containerRef: o }) => {
3
- const [l, n] = u({});
4
- return d(() => {
5
- const t = { observer: null };
6
- if (o.current) {
7
- const c = `#${h(r, e)}`, s = o.current.querySelector(c);
8
- s != null ? (t.observer = new ResizeObserver(() => {
9
- const { clientHeight: i, clientWidth: a, offsetLeft: f, offsetTop: b } = s;
10
- n({
11
- width: a,
12
- height: i,
13
- transform: `translateX(${Math.floor(f)}px) translateY(${Math.floor(b)}px)`
14
- });
15
- }), t.observer.observe(s)) : n({ display: "none" });
16
- }
17
- return () => {
18
- t.observer && t.observer.disconnect();
19
- };
20
- }, [e]), l;
21
- }, h = (r, e) => `uikit-tab-${r}-trigger-${e}`;
1
+ const _ = (e) => {
2
+ if (e <= 16)
3
+ return 5;
4
+ if (e <= 24)
5
+ return 8;
6
+ if (e <= 32)
7
+ return 10;
8
+ if (e <= 36)
9
+ return 13;
10
+ if (e <= 44)
11
+ return 14;
12
+ if (e <= 48)
13
+ return 17;
14
+ if (e < 56)
15
+ return 18;
16
+ if (e <= 64)
17
+ return 21;
18
+ if (e <= 88)
19
+ return 26;
20
+ if (e <= 96)
21
+ return 30;
22
+ const n = Math.ceil(e * 0.3125), E = n % 2;
23
+ return n + E;
24
+ };
22
25
  export {
23
- h as makeTabId,
24
- v as useTabSlider
26
+ _ as getInitialsFontSize
25
27
  };
@@ -1,26 +1,25 @@
1
- import { useRef as s, useCallback as c } from "react";
2
- const p = () => {
3
- const t = s(null), r = s({ cb: null }), i = c(() => {
4
- if (t.current && t.current.parentElement) {
5
- const e = t.current.parentElement, u = e.style.getPropertyValue("--radix-popper-anchor-width"), n = e.style.getPropertyValue("transform"), o = new MutationObserver(() => {
6
- e.style.transform !== n && e.style.setProperty("transform", n);
7
- });
8
- o.observe(e, {
9
- attributes: !0,
10
- attributeFilter: ["style"]
11
- }), r.current.cb = () => {
12
- o.disconnect();
13
- }, t.current.style.setProperty("--radix-popover-trigger-width", u);
1
+ import { useState as u, useEffect as d } from "react";
2
+ const v = ({ baseId: r, value: e, containerRef: o }) => {
3
+ const [l, n] = u({});
4
+ return d(() => {
5
+ const t = { observer: null };
6
+ if (o.current) {
7
+ const c = `#${h(r, e)}`, s = o.current.querySelector(c);
8
+ s != null ? (t.observer = new ResizeObserver(() => {
9
+ const { clientHeight: i, clientWidth: a, offsetLeft: f, offsetTop: b } = s;
10
+ n({
11
+ width: a,
12
+ height: i,
13
+ transform: `translateX(${Math.floor(f)}px) translateY(${Math.floor(b)}px)`
14
+ });
15
+ }), t.observer.observe(s)) : n({ display: "none" });
14
16
  }
15
- }, []), l = c(() => {
16
- r.current.cb && (r.current.cb(), r.current.cb = null);
17
- }, []);
18
- return {
19
- popoverRef: t,
20
- handleAnimationEnd: l,
21
- froozePopoverPosition: i
22
- };
23
- };
17
+ return () => {
18
+ t.observer && t.observer.disconnect();
19
+ };
20
+ }, [e]), l;
21
+ }, h = (r, e) => `uikit-tab-${r}-trigger-${e}`;
24
22
  export {
25
- p as useFroozeClosing
23
+ h as makeTabId,
24
+ v as useTabSlider
26
25
  };