@kolking/react-ui 1.8.20 → 1.9.1

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 (48) hide show
  1. package/dist/Thumbnails-BlXFynlF.js +38 -0
  2. package/dist/components/Avatar/Avatar.js +15 -15
  3. package/dist/components/Avatar/helpers.js +15 -16
  4. package/dist/components/Badge/Badge.js +28 -29
  5. package/dist/components/Button/Button.d.ts +1 -1
  6. package/dist/components/Dialog/Dialog.js +44 -44
  7. package/dist/components/Dialog/useDialog.d.ts +9 -6
  8. package/dist/components/Dialog/useDialog.js +20 -28
  9. package/dist/components/Fields/Checkbox.js +15 -15
  10. package/dist/components/Fields/Numeric.js +34 -36
  11. package/dist/components/Fields/Range.d.ts +1 -1
  12. package/dist/components/Fields/Range.js +33 -33
  13. package/dist/components/Flex/Flex.d.ts +1 -1
  14. package/dist/components/Gallery/Gallery.d.ts +11 -0
  15. package/dist/components/Gallery/Gallery.js +49 -0
  16. package/dist/components/Gallery/GalleryItem.d.ts +12 -0
  17. package/dist/components/Gallery/GalleryItem.js +41 -0
  18. package/dist/components/Gallery/index.d.ts +2 -0
  19. package/dist/components/Gallery/index.js +6 -0
  20. package/dist/components/Icon/Icon.js +125 -122
  21. package/dist/components/Icon/icons.d.ts +1 -1
  22. package/dist/components/Icon/icons.js +4 -0
  23. package/dist/components/Lightbox/Lightbox.d.ts +12 -0
  24. package/dist/components/Lightbox/Lightbox.js +166 -0
  25. package/dist/components/Lightbox/Thumbnail.d.ts +7 -0
  26. package/dist/components/Lightbox/Thumbnail.js +26 -0
  27. package/dist/components/Lightbox/Thumbnails.d.ts +11 -0
  28. package/dist/components/Lightbox/Thumbnails.js +8 -0
  29. package/dist/components/Lightbox/index.d.ts +1 -0
  30. package/dist/components/Lightbox/index.js +4 -0
  31. package/dist/components/Menu/Menu.js +44 -45
  32. package/dist/components/Menu/MenuItem.js +33 -33
  33. package/dist/components/Notice/Notice.js +58 -43
  34. package/dist/components/Popover/Popover.js +40 -41
  35. package/dist/components/Progress/ProgressBar.js +14 -14
  36. package/dist/components/Progress/ProgressCircular.js +15 -15
  37. package/dist/components/Segmented/Segmented.js +43 -47
  38. package/dist/components/Tag/Tag.d.ts +1 -1
  39. package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
  40. package/dist/components/ToggleButton/ToggleGroup.js +42 -40
  41. package/dist/components/Tooltip/Tooltip.js +30 -31
  42. package/dist/index.d.ts +3 -1
  43. package/dist/index.js +71 -63
  44. package/dist/styles/style.css +1 -1
  45. package/dist/styles.module-D0C-vMZX.js +7 -0
  46. package/dist/utils/helpers.d.ts +3 -1
  47. package/dist/utils/helpers.js +30 -19
  48. package/package.json +41 -32
@@ -1,65 +1,64 @@
1
- import { jsxs as w, Fragment as C, jsx as r } from "react/jsx-runtime";
2
- import D, { useRef as H, useState as S, useEffect as U, useLayoutEffect as X } from "react";
3
- import b from "classnames";
4
- import { useFloating as B, offset as I, flip as L, shift as N, autoUpdate as T, useInteractions as q, useDismiss as z, useRole as A, useHover as G, useFocus as J, useClick as K, useMergeRefs as Q, FloatingPortal as V, FloatingFocusManager as W } from "@floating-ui/react";
5
- import { getElementRef as Y } from "../../utils/helpers.js";
6
- const Z = "Popover_popover_sXXB0", $ = {
7
- popover: Z
8
- }, le = ({
9
- open: m,
1
+ import { jsxs as j, Fragment as w, jsx as r } from "react/jsx-runtime";
2
+ import C, { useRef as D, useState as H, useEffect as S, useLayoutEffect as U } from "react";
3
+ import X from "classnames";
4
+ import { useFloating as b, offset as B, flip as I, shift as L, autoUpdate as N, useInteractions as T, useDismiss as q, useRole as z, useHover as A, useFocus as G, useClick as J, useMergeRefs as K, FloatingPortal as Q, FloatingFocusManager as V } from "@floating-ui/react";
5
+ import { getElementRef as W } from "../../utils/helpers.js";
6
+ const Y = "Popover_popover_sXXB0", Z = {
7
+ popover: Y
8
+ }, ne = ({
9
+ open: d,
10
10
  event: s = "click",
11
11
  placement: c = "bottom",
12
12
  trigger: t,
13
- offset: g = 5,
13
+ offset: m = 5,
14
14
  modal: f = !1,
15
15
  anchor: n,
16
16
  boundary: i,
17
17
  disabled: l,
18
- minWidth: R,
19
- maxWidth: v,
20
- className: F,
21
- children: P,
22
- onToggle: h,
23
- ...E
18
+ minWidth: g,
19
+ maxWidth: R,
20
+ className: v,
21
+ children: F,
22
+ onToggle: P,
23
+ ...h
24
24
  }) => {
25
- const p = H(null), [x, y] = S(!1), a = m ?? x, O = h ?? y, { refs: e, context: o, floatingStyles: _ } = B({
25
+ const p = D(null), [E, x] = H(!1), a = d ?? E, y = P ?? x, { refs: e, context: o, floatingStyles: O } = b({
26
26
  open: a,
27
27
  placement: c,
28
- onOpenChange: O,
29
- whileElementsMounted: T,
28
+ onOpenChange: y,
29
+ whileElementsMounted: N,
30
30
  middleware: [
31
- I(g),
32
- L({ padding: 10, boundary: i }),
33
- N({ padding: 5, boundary: i })
31
+ B(m),
32
+ I({ padding: 10, boundary: i }),
33
+ L({ padding: 5, boundary: i })
34
34
  ]
35
- }), { getReferenceProps: k, getFloatingProps: M } = q([
36
- z(o),
37
- A(o, { role: "dialog" }),
38
- G(o, { move: !1, enabled: s.includes("hover") }),
39
- J(o, { enabled: s.includes("focus") }),
40
- K(o, { enabled: s.includes("click") })
41
- ]), j = Q([e.setReference, Y(t)]);
42
- return U(() => {
43
- var d;
44
- const u = (d = e.domReference.current) == null ? void 0 : d.closest("[data-floating-root]");
35
+ }), { getReferenceProps: _, getFloatingProps: k } = T([
36
+ q(o),
37
+ z(o, { role: "dialog" }),
38
+ A(o, { move: !1, enabled: s.includes("hover") }),
39
+ G(o, { enabled: s.includes("focus") }),
40
+ J(o, { enabled: s.includes("click") })
41
+ ]), M = K([e.setReference, W(t)]);
42
+ return S(() => {
43
+ const u = e.domReference.current?.closest("[data-floating-root]");
45
44
  !l && u && (p.current = u);
46
- }, [e, l]), X(() => {
45
+ }, [e, l]), U(() => {
47
46
  n && e.setPositionReference(n);
48
- }, [e, n]), l ? t : /* @__PURE__ */ w(C, { children: [
49
- D.cloneElement(t, k({ ...t.props, ref: j })),
50
- a && /* @__PURE__ */ r(V, { root: p, children: /* @__PURE__ */ r(W, { context: o, modal: f, visuallyHiddenDismiss: f, children: /* @__PURE__ */ r(
47
+ }, [e, n]), l ? t : /* @__PURE__ */ j(w, { children: [
48
+ C.cloneElement(t, _({ ...t.props, ref: M })),
49
+ a && /* @__PURE__ */ r(Q, { root: p, children: /* @__PURE__ */ r(V, { context: o, modal: f, visuallyHiddenDismiss: f, children: /* @__PURE__ */ r(
51
50
  "div",
52
51
  {
53
- ...M(E),
52
+ ...k(h),
54
53
  ref: e.setFloating,
55
54
  "data-popover": c,
56
- className: b($.popover, F),
57
- style: { ..._, minWidth: R, maxWidth: v },
58
- children: P
55
+ className: X(Z.popover, v),
56
+ style: { ...O, minWidth: g, maxWidth: R },
57
+ children: F
59
58
  }
60
59
  ) }) })
61
60
  ] });
62
61
  };
63
62
  export {
64
- le as Popover
63
+ ne as Popover
65
64
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import u from "react";
2
+ import v from "react";
3
3
  import _ from "classnames";
4
- import { cssProps as v, clamp as b } from "../../utils/helpers.js";
5
- const w = "Progress_progress_LSrhF", P = "Progress_indicator_KDwMt", e = {
6
- progress: w,
7
- indicator: P
8
- }, R = u.forwardRef(
4
+ import { cssProps as b, clamp as w } from "../../utils/helpers.js";
5
+ const P = "Progress_progress_LSrhF", h = "Progress_indicator_KDwMt", e = {
6
+ progress: P,
7
+ indicator: h
8
+ }, $ = v.forwardRef(
9
9
  ({
10
10
  value: s,
11
11
  width: o,
@@ -15,15 +15,15 @@ const w = "Progress_progress_LSrhF", P = "Progress_indicator_KDwMt", e = {
15
15
  minWidth: c,
16
16
  maxWidth: p,
17
17
  margin: d,
18
- style: m,
19
- className: l,
18
+ style: l,
19
+ className: m,
20
20
  ...g
21
21
  }, f) => {
22
- const r = s ? b(s, 0, 100) : void 0;
22
+ const r = s ? w(s, 0, 100) : void 0, u = r !== void 0 ? `${r} percent` : "indeterminate";
23
23
  return /* @__PURE__ */ a(
24
24
  "div",
25
25
  {
26
- "aria-label": r ? `${r} percent` : "indeterminate",
26
+ "aria-label": u,
27
27
  ...g,
28
28
  ref: f,
29
29
  role: "progressbar",
@@ -32,10 +32,10 @@ const w = "Progress_progress_LSrhF", P = "Progress_indicator_KDwMt", e = {
32
32
  "aria-valuenow": r,
33
33
  "data-progress-bar": !0,
34
34
  "data-progress-value": r ?? "indeterminate",
35
- className: _(e.progress, l),
35
+ className: _(e.progress, m),
36
36
  style: {
37
- ...m,
38
- ...v({ width: o, height: t, color: i, trackColor: n, minWidth: c, maxWidth: p, margin: d })
37
+ ...l,
38
+ ...b({ width: o, height: t, color: i, trackColor: n, minWidth: c, maxWidth: p, margin: d })
39
39
  },
40
40
  children: /* @__PURE__ */ a(
41
41
  "span",
@@ -50,5 +50,5 @@ const w = "Progress_progress_LSrhF", P = "Progress_indicator_KDwMt", e = {
50
50
  }
51
51
  );
52
52
  export {
53
- R as ProgressBar
53
+ $ as ProgressBar
54
54
  };
@@ -1,18 +1,18 @@
1
1
  import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import j from "react";
3
- import N from "classnames";
2
+ import N from "react";
3
+ import b from "classnames";
4
4
  import { cssProps as k, clamp as w } from "../../utils/helpers.js";
5
- const b = "Progress_inner_Zoiac", h = "Progress_container_tFVew", x = "Progress_range_uqjFb", y = "Progress_progress_MHEjj", C = "Progress_track_jWvrX", n = {
6
- inner: b,
7
- container: h,
8
- range: x,
9
- progress: y,
10
- track: C
5
+ const h = "Progress_inner_Zoiac", x = "Progress_container_tFVew", y = "Progress_range_uqjFb", C = "Progress_progress_MHEjj", F = "Progress_track_jWvrX", n = {
6
+ inner: h,
7
+ container: x,
8
+ range: y,
9
+ progress: C,
10
+ track: F
11
11
  };
12
- function F(r, s, e) {
12
+ function R(r, s, e) {
13
13
  return e !== void 0 ? ((e - r) / (s - r) * 100).toString() : e;
14
14
  }
15
- const H = j.forwardRef(
15
+ const M = N.forwardRef(
16
16
  ({
17
17
  min: r = 0,
18
18
  max: s = 100,
@@ -29,11 +29,11 @@ const H = j.forwardRef(
29
29
  children: t,
30
30
  ...v
31
31
  }, P) => {
32
- const a = e !== null ? w(e, r, s) : void 0;
32
+ const a = e !== null ? w(e, r, s) : void 0, j = a !== void 0 ? `${a} percent` : "indeterminate";
33
33
  return /* @__PURE__ */ c(
34
34
  "div",
35
35
  {
36
- "aria-label": a ? `${a} percent` : "indeterminate",
36
+ "aria-label": j,
37
37
  ...v,
38
38
  ref: P,
39
39
  role: "progressbar",
@@ -43,7 +43,7 @@ const H = j.forwardRef(
43
43
  "data-progress-circular": !0,
44
44
  "data-countdown": l,
45
45
  "data-progress-value": a ?? "indeterminate",
46
- className: N(n.container, _),
46
+ className: b(n.container, _),
47
47
  style: {
48
48
  ...f,
49
49
  ...k({
@@ -53,7 +53,7 @@ const H = j.forwardRef(
53
53
  color: d,
54
54
  trackColor: p,
55
55
  margin: m,
56
- value: F(r, s, a)
56
+ value: R(r, s, a)
57
57
  })
58
58
  },
59
59
  children: [
@@ -68,5 +68,5 @@ const H = j.forwardRef(
68
68
  }
69
69
  );
70
70
  export {
71
- H as ProgressCircular
71
+ M as ProgressCircular
72
72
  };
@@ -1,65 +1,61 @@
1
- import { jsxs as h, jsx as l } from "react/jsx-runtime";
2
- import _ from "classnames";
3
- import { useState as x, useEffect as y } from "react";
4
- import { Composite as C, CompositeItem as N } from "@floating-ui/react";
5
- import { cssProps as j, wrapNode as k } from "../../utils/helpers.js";
6
- const q = "Segmented_button_FPqA0", P = "Segmented_segmented_UOs8Z", m = {
7
- button: q,
8
- segmented: P
9
- }, E = ({
10
- size: u,
11
- items: a,
12
- selected: t = a[0].value,
13
- disabled: s,
14
- segmentsWidth: i = "auto",
15
- margin: p,
16
- children: c,
17
- className: g,
18
- style: b,
19
- onSelect: o,
1
+ import { jsxs as S, jsx as d } from "react/jsx-runtime";
2
+ import h from "classnames";
3
+ import { useState as _, useEffect as x } from "react";
4
+ import { Composite as y, CompositeItem as C } from "@floating-ui/react";
5
+ import { cssProps as N, wrapNode as j } from "../../utils/helpers.js";
6
+ const k = "Segmented_button_FPqA0", q = "Segmented_segmented_UOs8Z", l = {
7
+ button: k,
8
+ segmented: q
9
+ }, B = ({
10
+ size: m,
11
+ items: o,
12
+ selected: t = o[0].value,
13
+ disabled: a,
14
+ segmentsWidth: u = "auto",
15
+ margin: c,
16
+ children: i,
17
+ className: p,
18
+ style: g,
19
+ onSelect: b,
20
20
  ...f
21
21
  }) => {
22
- const v = i === "equal" ? 0 : void 0, [r, n] = x(t);
23
- return y(() => {
22
+ const v = u === "equal" ? 0 : void 0, [s, n] = _(t);
23
+ return x(() => {
24
24
  n(t);
25
- }, [t]), /* @__PURE__ */ h(
26
- C,
25
+ }, [t]), /* @__PURE__ */ S(
26
+ y,
27
27
  {
28
28
  ...f,
29
29
  role: "radiogroup",
30
30
  orientation: "horizontal",
31
31
  "data-segmented": !0,
32
- "data-disabled": s,
33
- className: _(m.segmented, g),
34
- style: { ...b, ...j({ size: u, margin: p, flexBasis: v }) },
32
+ "data-disabled": a,
33
+ className: h(l.segmented, p),
34
+ style: { ...g, ...N({ size: m, margin: c, flexBasis: v }) },
35
35
  children: [
36
- a.map((e, d) => /* @__PURE__ */ l(
37
- N,
36
+ o.map((e, r) => /* @__PURE__ */ d(
37
+ C,
38
38
  {
39
- render: /* @__PURE__ */ l(
40
- "button",
41
- {
42
- role: "radio",
43
- type: "button",
44
- disabled: s || e.disabled,
45
- "data-segmented-item": d,
46
- "aria-checked": e.value === r,
47
- "data-selected": e.value === r,
48
- className: m.button,
49
- onClick: () => {
50
- n(e.value), o == null || o(e.value);
51
- },
52
- children: k(e.label, "span")
53
- }
54
- )
39
+ role: "radio",
40
+ type: "button",
41
+ render: /* @__PURE__ */ d("button", {}),
42
+ disabled: a || e.disabled,
43
+ "data-segmented-item": r,
44
+ "aria-checked": e.value === s,
45
+ "data-selected": e.value === s,
46
+ className: l.button,
47
+ onClick: () => {
48
+ n(e.value), b?.(e.value);
49
+ },
50
+ children: j(e.label, "span")
55
51
  },
56
- d
52
+ r
57
53
  )),
58
- c
54
+ i
59
55
  ]
60
56
  }
61
57
  );
62
58
  };
63
59
  export {
64
- E as Segmented
60
+ B as Segmented
65
61
  };
@@ -18,4 +18,4 @@ export declare const Tag: <T extends React.ElementType = "span">(props: {
18
18
  title?: React.ReactNode;
19
19
  icon?: React.ReactElement;
20
20
  iconPosition?: "start" | "end";
21
- } & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "title" | "size" | "as" | "icon" | "scheme" | "variant" | "iconPosition"> & React.RefAttributes<unknown>) => React.ReactElement | null;
21
+ } & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "title" | "as" | "size" | "icon" | "scheme" | "variant" | "iconPosition"> & React.RefAttributes<unknown>) => React.ReactElement | null;
@@ -16,4 +16,4 @@ export declare const ToggleButton: React.ForwardRefExoticComponent<Omit<ButtonPr
16
16
  title?: React.ReactNode;
17
17
  icon?: React.ReactElement;
18
18
  iconPosition?: "start" | "end";
19
- } & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "title" | "size" | "as" | "icon" | "scheme" | "minWidth" | "maxWidth" | "variant" | "busy" | "iconPosition"> & React.RefAttributes<unknown>) => React.ReactElement | null)>>;
19
+ } & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "title" | "as" | "size" | "icon" | "scheme" | "minWidth" | "maxWidth" | "variant" | "busy" | "iconPosition"> & React.RefAttributes<unknown>) => React.ReactElement | null)>>;
@@ -1,50 +1,52 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import I from "classnames";
3
- import a, { useState as b, useEffect as k } from "react";
4
- import { Composite as x, CompositeItem as E } from "@floating-ui/react";
5
- import { cssProps as N } from "../../utils/helpers.js";
6
- const T = "ToggleButton_group_yo9Nc", j = {
7
- group: T
8
- }, q = ({
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import b from "classnames";
3
+ import p, { useState as y, useEffect as I } from "react";
4
+ import { Composite as h, CompositeItem as k } from "@floating-ui/react";
5
+ import { cssProps as x } from "../../utils/helpers.js";
6
+ const E = "ToggleButton_group_yo9Nc", N = {
7
+ group: E
8
+ }, P = ({
9
9
  selected: o = 0,
10
- disabled: g,
11
- minWidth: l,
12
- maxWidth: i,
13
- flexBasis: d,
14
- className: n,
15
- style: c,
16
- children: f,
17
- onSelect: r,
18
- ...C
10
+ disabled: l,
11
+ minWidth: n,
12
+ maxWidth: c,
13
+ flexBasis: m,
14
+ className: u,
15
+ style: i,
16
+ children: a,
17
+ onSelect: d,
18
+ ...g
19
19
  }) => {
20
- const [_, s] = b(o);
21
- return k(() => {
22
- s(o);
23
- }, [o]), /* @__PURE__ */ u(
24
- x,
20
+ const [f, t] = y(o);
21
+ return I(() => {
22
+ t(o);
23
+ }, [o]), /* @__PURE__ */ s(
24
+ h,
25
25
  {
26
- ...C,
26
+ ...g,
27
27
  role: "radiogroup",
28
28
  "data-toggle-group": !0,
29
- className: I(j.group, n),
30
- style: { ...c, ...N({ flexBasis: d, minWidth: l, maxWidth: i }) },
31
- children: a.Children.map(f, (e, t) => /* @__PURE__ */ u(
32
- E,
33
- {
34
- render: a.cloneElement(e, {
35
- role: "radio",
36
- disabled: g || e.props.disabled,
37
- selected: t === _,
38
- onClick: (y) => {
39
- var p, m;
40
- s(t), r == null || r(t), (m = (p = e.props).onClick) == null || m.call(p, y);
41
- }
42
- })
43
- }
44
- ))
29
+ className: b(N.group, u),
30
+ style: { ...i, ...x({ flexBasis: m, minWidth: n, maxWidth: c }) },
31
+ children: p.Children.map(a, (C, e) => {
32
+ const r = C;
33
+ return /* @__PURE__ */ s(
34
+ k,
35
+ {
36
+ render: p.cloneElement(r, {
37
+ role: "radio",
38
+ disabled: l || r.props?.disabled,
39
+ selected: e === f,
40
+ onClick: (_) => {
41
+ t(e), d?.(e), r.props?.onClick?.(_);
42
+ }
43
+ })
44
+ }
45
+ );
46
+ })
45
47
  }
46
48
  );
47
49
  };
48
50
  export {
49
- q as ToggleGroup
51
+ P as ToggleGroup
50
52
  };
@@ -1,74 +1,73 @@
1
- import { jsxs as m, Fragment as S, jsx as f } from "react/jsx-runtime";
1
+ import { jsxs as m, Fragment as S, jsx as i } from "react/jsx-runtime";
2
2
  import j, { useRef as g, useState as w, useEffect as k, useLayoutEffect as C } from "react";
3
3
  import U from "classnames";
4
4
  import { useFloating as W, offset as b, flip as A, shift as B, arrow as D, autoUpdate as H, useInteractions as I, useDismiss as L, useRole as V, useHover as $, useFocus as q, useClick as z, useMergeRefs as G, FloatingPortal as J, FloatingArrow as K } from "@floating-ui/react";
5
5
  import { getElementRef as Q } from "../../utils/helpers.js";
6
- const X = "Tooltip_tooltip_u1Uix", Y = "Tooltip_arrow_NBFiV", Z = "Tooltip_content_lfpfM", a = {
6
+ const X = "Tooltip_tooltip_u1Uix", Y = "Tooltip_arrow_NBFiV", Z = "Tooltip_content_lfpfM", f = {
7
7
  tooltip: X,
8
8
  arrow: Y,
9
9
  content: Z
10
10
  }, rt = ({
11
- trigger: r = "hover focus",
12
- placement: c = "top",
11
+ trigger: n = "hover focus",
12
+ placement: a = "top",
13
13
  offset: R = 8,
14
- anchor: l,
14
+ anchor: r,
15
15
  content: h,
16
- disabled: i,
16
+ disabled: l,
17
17
  minWidth: F,
18
18
  maxWidth: _,
19
19
  className: v,
20
- children: n,
20
+ children: s,
21
21
  ...x
22
22
  }) => {
23
- const u = g(null), p = g(null), [d, E] = w(!1), [O, y] = w(!1), { refs: t, context: e, floatingStyles: N } = W({
24
- open: d,
25
- placement: c,
23
+ const c = g(null), u = g(null), [p, E] = w(!1), [O, y] = w(!1), { refs: t, context: e, floatingStyles: N } = W({
24
+ open: p,
25
+ placement: a,
26
26
  onOpenChange: E,
27
27
  whileElementsMounted: H,
28
28
  middleware: [
29
29
  b(R),
30
30
  A({ padding: 10 }),
31
31
  B({ padding: 5 }),
32
- D(({ placement: o, rects: s }) => (y(
33
- s.floating.width < s.reference.width && (o.endsWith("-start") || o.endsWith("-end"))
34
- ), { element: u, padding: 8 }))
32
+ D(({ placement: o, rects: d }) => (y(
33
+ d.floating.width < d.reference.width && (o.endsWith("-start") || o.endsWith("-end"))
34
+ ), { element: c, padding: 8 }))
35
35
  ]
36
36
  }), { getReferenceProps: P, getFloatingProps: T } = I([
37
37
  L(e),
38
38
  V(e, { role: "tooltip" }),
39
- $(e, { move: !1, enabled: r.includes("hover") }),
40
- q(e, { enabled: r.includes("focus") }),
41
- z(e, { enabled: r.includes("click") })
42
- ]), M = G([t.setReference, Q(n)]);
39
+ $(e, { move: !1, enabled: n.includes("hover") }),
40
+ q(e, { enabled: n.includes("focus") }),
41
+ z(e, { enabled: n.includes("click") })
42
+ ]), M = G([t.setReference, Q(s)]);
43
43
  return k(() => {
44
- var s;
45
- const o = (s = t.domReference.current) == null ? void 0 : s.closest("[data-floating-root]");
46
- !i && o && (p.current = o);
47
- }, [t, i]), C(() => {
48
- l && t.setPositionReference(l);
49
- }, [t, l]), i ? n : /* @__PURE__ */ m(S, { children: [
50
- j.cloneElement(n, P({ ...n.props, ref: M })),
51
- d && /* @__PURE__ */ f(J, { root: p, children: /* @__PURE__ */ m(
44
+ const o = t.domReference.current?.closest("[data-floating-root]");
45
+ !l && o && (u.current = o);
46
+ }, [t, l]), C(() => {
47
+ r && t.setPositionReference(r);
48
+ }, [t, r]), l ? s : /* @__PURE__ */ m(S, { children: [
49
+ j.cloneElement(s, P({ ...s.props, ref: M })),
50
+ p && /* @__PURE__ */ i(J, { root: u, children: /* @__PURE__ */ m(
52
51
  "div",
53
52
  {
54
53
  ...T(x),
55
54
  ref: t.setFloating,
56
- "data-tooltip": c,
57
- className: U(a.tooltip, v),
55
+ "data-tooltip": a,
56
+ className: U(f.tooltip, v),
58
57
  style: { ...N, minWidth: F, maxWidth: _ },
59
58
  children: [
60
- /* @__PURE__ */ f(
59
+ /* @__PURE__ */ i(
61
60
  K,
62
61
  {
63
62
  width: 12,
64
63
  height: 6,
65
- ref: u,
64
+ ref: c,
66
65
  context: e,
67
- className: a.arrow,
66
+ className: f.arrow,
68
67
  staticOffset: O ? 8 : null
69
68
  }
70
69
  ),
71
- /* @__PURE__ */ f("div", { "data-tooltip-content": !0, className: a.content, children: h })
70
+ /* @__PURE__ */ i("div", { "data-tooltip-content": !0, className: f.content, children: h })
72
71
  ]
73
72
  }
74
73
  ) })
package/dist/index.d.ts CHANGED
@@ -3,10 +3,12 @@ export * from './components/Badge';
3
3
  export * from './components/Breadcrumbs';
4
4
  export * from './components/Button';
5
5
  export * from './components/Dialog';
6
- export * from './components/Flex';
7
6
  export * from './components/Fields';
7
+ export * from './components/Flex';
8
+ export * from './components/Gallery';
8
9
  export * from './components/Heading';
9
10
  export * from './components/Icon';
11
+ export * from './components/Lightbox';
10
12
  export * from './components/Menu';
11
13
  export * from './components/Notice';
12
14
  export * from './components/Popover';