@serendie/ui 2.0.0 → 2.1.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.
Files changed (118) hide show
  1. package/dist/components/CheckBox/CheckBox.js +36 -35
  2. package/dist/components/ChoiceBox/ChoiceBox.js +41 -41
  3. package/dist/components/DataTable/DataTableComponent.d.ts +3 -20
  4. package/dist/components/DataTable/DataTableComponent.js +38 -36
  5. package/dist/components/DataTable/table/HeaderCheckbox.js +29 -19
  6. package/dist/components/Search/Search.d.ts +3 -1
  7. package/dist/components/Search/Search.js +34 -33
  8. package/dist/components/Select/Select.d.ts +2 -1
  9. package/dist/components/Select/Select.js +47 -41
  10. package/dist/components/Tooltip/Tooltip.d.ts +14 -0
  11. package/dist/components/Tooltip/Tooltip.js +70 -0
  12. package/dist/components/Tooltip/index.d.ts +1 -0
  13. package/dist/components/Tooltip/index.js +4 -0
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.js +12 -10
  16. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +4 -6
  17. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -6
  18. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +10 -12
  19. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +16 -16
  20. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +13 -20
  21. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +1 -5
  22. package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -18
  23. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +4 -6
  24. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +22 -28
  25. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +7 -9
  26. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +14 -21
  27. package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +5 -0
  28. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +9 -8
  29. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +4 -6
  30. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +4 -6
  31. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +17 -18
  32. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +10 -9
  33. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +5 -7
  34. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +21 -45
  35. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +10 -9
  36. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +4 -6
  37. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +6 -5
  38. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +4 -6
  39. package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +13 -22
  40. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +26 -24
  41. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +9 -8
  42. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +1 -3
  43. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +15 -13
  44. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +13 -14
  45. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +10 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +14 -21
  47. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +4 -6
  48. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +4 -6
  49. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +4 -6
  50. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +5 -4
  51. package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +13 -19
  52. package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +25 -16
  53. package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +3 -2
  54. package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +18 -18
  55. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +4 -6
  56. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -6
  57. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +1 -5
  58. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +14 -22
  59. package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +9 -8
  60. package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +11 -12
  61. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +20 -47
  62. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -6
  63. package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +20 -26
  64. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +9 -8
  65. package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +14 -21
  66. package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +3 -7
  67. package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +28 -15
  68. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js +13 -0
  69. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js +13 -0
  70. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js +15 -0
  71. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js +14 -0
  72. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js +14 -0
  73. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js +13 -0
  74. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip-context.js +10 -0
  75. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip.js +17 -0
  76. package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +13 -7
  77. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +92 -90
  78. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +230 -216
  79. package/dist/node_modules/@zag-js/accordion/dist/index.js +210 -227
  80. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +49 -12
  81. package/dist/node_modules/@zag-js/avatar/dist/index.js +119 -134
  82. package/dist/node_modules/@zag-js/checkbox/dist/index.js +196 -197
  83. package/dist/node_modules/@zag-js/collapsible/dist/index.js +250 -198
  84. package/dist/node_modules/@zag-js/collection/dist/index.js +172 -179
  85. package/dist/node_modules/@zag-js/combobox/dist/index.js +1176 -1082
  86. package/dist/node_modules/@zag-js/core/dist/index.js +77 -496
  87. package/dist/node_modules/@zag-js/dialog/dist/index.js +243 -270
  88. package/dist/node_modules/@zag-js/dismissable/dist/index.js +62 -60
  89. package/dist/node_modules/@zag-js/dom-query/dist/index.js +465 -253
  90. package/dist/node_modules/@zag-js/focus-trap/dist/index.js +307 -0
  91. package/dist/node_modules/@zag-js/focus-visible/dist/index.js +48 -47
  92. package/dist/node_modules/@zag-js/interact-outside/dist/index.js +112 -80
  93. package/dist/node_modules/@zag-js/menu/dist/index.js +998 -884
  94. package/dist/node_modules/@zag-js/pagination/dist/index.js +207 -213
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +130 -129
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +139 -122
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +297 -302
  98. package/dist/node_modules/@zag-js/react/dist/index.js +255 -103
  99. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +18 -31
  100. package/dist/node_modules/@zag-js/select/dist/index.js +889 -885
  101. package/dist/node_modules/@zag-js/store/dist/index.js +98 -137
  102. package/dist/node_modules/@zag-js/switch/dist/index.js +199 -191
  103. package/dist/node_modules/@zag-js/tabs/dist/index.js +383 -386
  104. package/dist/node_modules/@zag-js/toast/dist/index.js +646 -633
  105. package/dist/node_modules/@zag-js/tooltip/dist/index.js +459 -0
  106. package/dist/node_modules/@zag-js/types/dist/index.js +6 -6
  107. package/dist/node_modules/@zag-js/utils/dist/index.js +112 -99
  108. package/dist/node_modules/proxy-compare/dist/index.js +4 -106
  109. package/dist/styles.css +1 -1
  110. package/package.json +5 -5
  111. package/dist/node_modules/@ark-ui/react/dist/utils/use-is-server.js +0 -10
  112. package/dist/node_modules/@zag-js/dom-event/dist/index.js +0 -130
  113. package/dist/node_modules/@zag-js/element-rect/dist/index.js +0 -32
  114. package/dist/node_modules/@zag-js/form-utils/dist/index.js +0 -51
  115. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
  116. package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +0 -431
  117. package/dist/node_modules/klona/full/index.js +0 -21
  118. package/dist/node_modules/tabbable/dist/index.esm.js +0 -202
@@ -1,13 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
2
+ import { forwardRef as m } from "react";
3
3
  import { createSplitProps as l } from "../../utils/create-split-props.js";
4
4
  import { splitRenderStrategyProps as d, RenderStrategyPropsProvider as c } from "../../utils/render-strategy.js";
5
5
  import { ark as f } from "../factory.js";
6
6
  import { useTabs as u } from "./use-tabs.js";
7
7
  import { TabsProvider as P } from "./use-tabs-context.js";
8
- import { mergeProps as b } from "../../../../../@zag-js/core/dist/index.js";
9
- const g = n((e, t) => {
10
- const [s, a] = d(e), [p, i] = l()(a, [
8
+ import { mergeProps as g } from "../../../../../@zag-js/core/dist/index.js";
9
+ const b = m((e, t) => {
10
+ const [s, a] = d(e), [i, p] = l()(a, [
11
11
  "activationMode",
12
12
  "composite",
13
13
  "defaultValue",
@@ -15,15 +15,16 @@ const g = n((e, t) => {
15
15
  "id",
16
16
  "ids",
17
17
  "loopFocus",
18
+ "navigate",
18
19
  "onFocusChange",
19
20
  "onValueChange",
20
21
  "orientation",
21
22
  "translations",
22
23
  "value"
23
- ]), r = u(p), m = b(r.getRootProps(), i);
24
- return /* @__PURE__ */ o(P, { value: r, children: /* @__PURE__ */ o(c, { value: s, children: /* @__PURE__ */ o(f.div, { ...m, ref: t }) }) });
24
+ ]), r = u(i), n = g(r.getRootProps(), p);
25
+ return /* @__PURE__ */ o(P, { value: r, children: /* @__PURE__ */ o(c, { value: s, children: /* @__PURE__ */ o(f.div, { ...n, ref: t }) }) });
25
26
  });
26
- g.displayName = "TabsRoot";
27
+ b.displayName = "TabsRoot";
27
28
  export {
28
- g as TabsRoot
29
+ b as TabsRoot
29
30
  };
@@ -1,24 +1,17 @@
1
- import { useMachine as i, normalizeProps as m } from "../../../../../@zag-js/react/dist/index.js";
2
- import { machine as s, connect as l } from "../../../../../@zag-js/tabs/dist/index.js";
3
- import { useId as f } from "react";
4
- import { useEnvironmentContext as C } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as d } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as t } from "../../utils/use-event.js";
7
- const F = (e) => {
8
- const { getRootNode: n } = C(), { dir: a } = d(), o = {
9
- id: f(),
10
- dir: a,
11
- getRootNode: n,
12
- value: e.defaultValue,
13
- ...e
14
- }, u = {
15
- ...o,
16
- value: e.value,
17
- onValueChange: t(e.onValueChange, { sync: !0 }),
18
- onFocusChange: t(e.onFocusChange)
19
- }, [r, c] = i(s(o), { context: u });
20
- return l(r, c, m);
1
+ import { useMachine as m, normalizeProps as c } from "../../../../../@zag-js/react/dist/index.js";
2
+ import { machine as i, connect as p } from "../../../../../@zag-js/tabs/dist/index.js";
3
+ import { useId as a } from "react";
4
+ import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
5
+ import { useLocaleContext as f } from "../../providers/locale/use-locale-context.js";
6
+ const C = (o) => {
7
+ const t = a(), { getRootNode: e } = u(), { dir: r } = f(), n = {
8
+ id: t,
9
+ dir: r,
10
+ getRootNode: e,
11
+ ...o
12
+ }, s = m(i, n);
13
+ return p(s, c);
21
14
  };
22
15
  export {
23
- F as useTabs
16
+ C as useTabs
24
17
  };
@@ -1,9 +1,5 @@
1
- import { normalizeProps as n } from "../../../../../@zag-js/react/dist/index.js";
2
- import { group as r } from "../../../../../@zag-js/toast/dist/index.js";
3
- const a = (e) => {
4
- const o = r.machine({ id: "1", ...e });
5
- return { ...r.connect(o, o.send, n), machine: o };
6
- };
1
+ import { createStore as r } from "../../../../../@zag-js/toast/dist/index.js";
2
+ const o = (e) => r(e);
7
3
  export {
8
- a as createToaster
4
+ o as createToaster
9
5
  };
@@ -1,19 +1,32 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useMachine as h, normalizeProps as i, useActor as P } from "../../../../../@zag-js/react/dist/index.js";
3
- import { group as g, connect as v } from "../../../../../@zag-js/toast/dist/index.js";
4
- import { forwardRef as T } from "react";
5
- import { ark as x } from "../factory.js";
6
- import { ToastProvider as y } from "./use-toast-context.js";
7
- import { mergeProps as A } from "../../../../../@zag-js/core/dist/index.js";
8
- const j = T((o, t) => {
9
- const { toaster: e, children: r, ...p } = o, [s, d] = h(e.machine), c = s.context.placement, a = g.connect(s, d, i), l = a.getToastsByPlacement(c), f = A(a.getGroupProps({ placement: c }), p);
10
- return /* @__PURE__ */ n(x.div, { ...f, ref: t, children: l.map((m) => /* @__PURE__ */ n(k, { value: m, children: (u) => r(u) }, m.id)) });
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { useMachine as l, normalizeProps as u } from "../../../../../@zag-js/react/dist/index.js";
3
+ import { group as p, machine as x, connect as N } from "../../../../../@zag-js/toast/dist/index.js";
4
+ import { forwardRef as T, useId as R } from "react";
5
+ import { useEnvironmentContext as f } from "../../providers/environment/use-environment-context.js";
6
+ import { useLocaleContext as y } from "../../providers/locale/use-locale-context.js";
7
+ import { ark as A } from "../factory.js";
8
+ import { ToastProvider as C } from "./use-toast-context.js";
9
+ import { mergeProps as j } from "../../../../../@zag-js/core/dist/index.js";
10
+ const k = T((o, e) => {
11
+ const { toaster: r, children: t, ...n } = o, i = y(), s = f(), a = l(p.machine, {
12
+ store: r,
13
+ id: R(),
14
+ dir: i == null ? void 0 : i.dir,
15
+ getRootNode: s == null ? void 0 : s.getRootNode
16
+ }), m = p.connect(a, u), v = j(m.getGroupProps(), n);
17
+ return /* @__PURE__ */ c(A.div, { ...v, ref: e, children: m.getToasts().map((d, h) => /* @__PURE__ */ c(g, { value: d, parent: a, index: h, children: (P) => t(P) }, d.id)) });
11
18
  });
12
- j.displayName = "Toaster";
13
- const k = (o) => {
14
- const [t, e] = P(o.value), r = v(t, e, i);
15
- return /* @__PURE__ */ n(y, { value: r, children: o.children(t.context) });
19
+ k.displayName = "Toaster";
20
+ const g = (o) => {
21
+ const e = f(), r = {
22
+ ...o.value,
23
+ parent: o.parent,
24
+ index: o.index,
25
+ getRootNode: e.getRootNode
26
+ }, t = l(x, { ...r }), n = N(t, u);
27
+ return /* @__PURE__ */ c(C, { value: n, children: o.children(o.value) });
16
28
  };
29
+ g.displayName = "ToastActor";
17
30
  export {
18
- j as Toaster
31
+ k as Toaster
19
32
  };
@@ -0,0 +1,13 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ import { ark as e } from "../factory.js";
4
+ import { useTooltipContext as s } from "./use-tooltip-context.js";
5
+ import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
6
+ const T = m((o, r) => {
7
+ const t = s(), p = f(t.getArrowTipProps(), o);
8
+ return /* @__PURE__ */ i(e.div, { ...p, ref: r });
9
+ });
10
+ T.displayName = "TooltipArrowTip";
11
+ export {
12
+ T as TooltipArrowTip
13
+ };
@@ -0,0 +1,13 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { forwardRef as e } from "react";
3
+ import { ark as i } from "../factory.js";
4
+ import { useTooltipContext as s } from "./use-tooltip-context.js";
5
+ import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
6
+ const l = e((o, r) => {
7
+ const t = s(), p = f(t.getArrowProps(), o);
8
+ return /* @__PURE__ */ m(i.div, { ...p, ref: r });
9
+ });
10
+ l.displayName = "TooltipArrow";
11
+ export {
12
+ l as TooltipArrow
13
+ };
@@ -0,0 +1,15 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import { composeRefs as s } from "../../utils/compose-refs.js";
4
+ import { ark as i } from "../factory.js";
5
+ import { usePresenceContext as f } from "../presence/use-presence-context.js";
6
+ import { useTooltipContext as c } from "./use-tooltip-context.js";
7
+ import { mergeProps as l } from "../../../../../@zag-js/core/dist/index.js";
8
+ const u = p((r, e) => {
9
+ const t = c(), o = f(), n = l(t.getContentProps(), o.getPresenceProps(), r);
10
+ return o.unmounted ? null : /* @__PURE__ */ m(i.div, { ...n, ref: s(o.ref, e) });
11
+ });
12
+ u.displayName = "TooltipContent";
13
+ export {
14
+ u as TooltipContent
15
+ };
@@ -0,0 +1,14 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as n } from "react";
3
+ import { ark as p } from "../factory.js";
4
+ import { usePresenceContext as s } from "../presence/use-presence-context.js";
5
+ import { useTooltipContext as m } from "./use-tooltip-context.js";
6
+ import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
7
+ const c = n((o, r) => {
8
+ const e = m(), t = f(e.getPositionerProps(), o);
9
+ return s().unmounted ? null : /* @__PURE__ */ i(p.div, { ...t, ref: r });
10
+ });
11
+ c.displayName = "TooltipPositioner";
12
+ export {
13
+ c as TooltipPositioner
14
+ };
@@ -0,0 +1,14 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { splitPresenceProps as m } from "../presence/split-presence-props.js";
3
+ import { usePresence as n } from "../presence/use-presence.js";
4
+ import { PresenceProvider as c } from "../presence/use-presence-context.js";
5
+ import { useTooltip as l } from "./use-tooltip.js";
6
+ import { TooltipProvider as P } from "./use-tooltip-context.js";
7
+ import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
8
+ const g = (e) => {
9
+ const [p, { children: t, ...s }] = m(e), o = l(s), i = n(f({ present: o.open }, p));
10
+ return /* @__PURE__ */ r(P, { value: o, children: /* @__PURE__ */ r(c, { value: i, children: t }) });
11
+ };
12
+ export {
13
+ g as TooltipRoot
14
+ };
@@ -0,0 +1,13 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ import { ark as m } from "../factory.js";
4
+ import { useTooltipContext as g } from "./use-tooltip-context.js";
5
+ import { mergeProps as s } from "../../../../../@zag-js/core/dist/index.js";
6
+ const f = i((o, r) => {
7
+ const t = g(), e = s(t.getTriggerProps(), o);
8
+ return /* @__PURE__ */ p(m.button, { ...e, ref: r });
9
+ });
10
+ f.displayName = "TooltipTrigger";
11
+ export {
12
+ f as TooltipTrigger
13
+ };
@@ -0,0 +1,10 @@
1
+ import { createContext as o } from "../../utils/create-context.js";
2
+ const [e, r] = o({
3
+ name: "TooltipContext",
4
+ hookName: "useTooltipContext",
5
+ providerName: "<TooltipProvider />"
6
+ });
7
+ export {
8
+ e as TooltipProvider,
9
+ r as useTooltipContext
10
+ };
@@ -0,0 +1,17 @@
1
+ import { useMachine as m, normalizeProps as s } from "../../../../../@zag-js/react/dist/index.js";
2
+ import { machine as c, connect as p } from "../../../../../@zag-js/tooltip/dist/index.js";
3
+ import { useId as u } from "react";
4
+ import { useEnvironmentContext as a } from "../../providers/environment/use-environment-context.js";
5
+ import { useLocaleContext as f } from "../../providers/locale/use-locale-context.js";
6
+ const C = (o) => {
7
+ const t = u(), { getRootNode: e } = a(), { dir: r } = f(), n = {
8
+ id: t,
9
+ dir: r,
10
+ getRootNode: e,
11
+ ...o
12
+ }, i = m(c, n);
13
+ return p(i, s);
14
+ };
15
+ export {
16
+ C as useTooltip
17
+ };
@@ -1,10 +1,16 @@
1
- function f(o, n) {
2
- typeof o == "function" ? o(n) : o != null && (o.current = n);
3
- }
4
- function c(...o) {
5
- return (n) => {
6
- for (const t of o)
7
- f(t, n);
1
+ function c(...e) {
2
+ return (o) => {
3
+ const n = [];
4
+ for (const f of e)
5
+ if (typeof f == "function") {
6
+ const t = f(o);
7
+ typeof t == "function" && n.push(t);
8
+ } else f && (f.current = o);
9
+ if (n.length)
10
+ return () => {
11
+ for (const f of n)
12
+ f();
13
+ };
8
14
  };
9
15
  }
10
16
  export {