@dimasbaguspm/versaur 0.0.29 → 0.0.31

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 (41) hide show
  1. package/dist/js/{bottom-sheet-BKd7WCCS.js → bottom-sheet-3W_vCYl6.js} +3 -2
  2. package/dist/js/{bottom-sheet-input-DrbGhcXv.js → bottom-sheet-input-CI-9wYa7.js} +634 -727
  3. package/dist/js/forms/index.js +1 -1
  4. package/dist/js/{image-rectangle-CF656HIm.js → image-rectangle-BpMI_fTE.js} +242 -542
  5. package/dist/js/index.js +27 -29
  6. package/dist/js/layouts/index.js +1 -1
  7. package/dist/js/navigation/index.js +1 -1
  8. package/dist/js/overlays/index.js +2 -2
  9. package/dist/js/primitive/index.js +15 -17
  10. package/dist/js/{tabs-DoiqKzR9.js → tabs-BOdkXJdy.js} +1 -1
  11. package/dist/js/{tooltip-D1-q8Ars.js → tooltip-C1P1eN0U.js} +65 -57
  12. package/dist/js/{top-bar-B4SZ2YZC.js → top-bar-sahvpzBv.js} +179 -166
  13. package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +2 -3
  14. package/dist/types/forms/chip-multiple-input/types.d.ts +1 -21
  15. package/dist/types/forms/chip-single-input/chip-single-input.d.ts +2 -3
  16. package/dist/types/forms/chip-single-input/types.d.ts +1 -9
  17. package/dist/types/layouts/page-header/page-header.atoms.d.ts +2 -1
  18. package/dist/types/layouts/page-header/page-header.d.ts +4 -0
  19. package/dist/types/layouts/page-header/types.d.ts +6 -0
  20. package/dist/types/overlays/menu/index.d.ts +1 -1
  21. package/dist/types/overlays/menu/menu.d.ts +4 -1
  22. package/dist/types/overlays/menu/types.d.ts +4 -2
  23. package/dist/types/overlays/menu/use-menu.d.ts +0 -1
  24. package/dist/types/primitive/button-menu/button-menu.d.ts +4 -0
  25. package/dist/types/primitive/button-menu/index.d.ts +2 -0
  26. package/dist/types/primitive/button-menu/types.d.ts +13 -0
  27. package/dist/types/primitive/card/card.atoms.d.ts +3 -0
  28. package/dist/types/primitive/card/card.d.ts +4 -23
  29. package/dist/types/primitive/card/types.d.ts +13 -2
  30. package/dist/types/primitive/index.d.ts +0 -2
  31. package/dist/utils/enforce-subpath-import.js +1 -2
  32. package/package.json +1 -1
  33. package/dist/types/primitive/calendar/calendar.atoms.d.ts +0 -13
  34. package/dist/types/primitive/calendar/calendar.d.ts +0 -8
  35. package/dist/types/primitive/calendar/index.d.ts +0 -2
  36. package/dist/types/primitive/calendar/types.d.ts +0 -54
  37. package/dist/types/primitive/calendar/use-calendar.d.ts +0 -18
  38. package/dist/types/primitive/description-list/description-list.atoms.d.ts +0 -13
  39. package/dist/types/primitive/description-list/description-list.d.ts +0 -6
  40. package/dist/types/primitive/description-list/index.d.ts +0 -2
  41. package/dist/types/primitive/description-list/types.d.ts +0 -46
package/dist/js/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { L as t, P as s, S as r } from "./skeleton-BNZyaRjo.js";
2
- import { A as n, a as p, B as u, b as i, F as l, e as I, P as c, c as S, d as m, S as B, T as g } from "./top-bar-B4SZ2YZC.js";
3
- import { B as b, C as T, b as x, a as h, D as C, k as f, E as P, M as k, P as A, R as M, d as D, c as F, S as L, e as R, j as w, i as G, h as j, f as v, T as y, g as E } from "./bottom-sheet-input-DrbGhcXv.js";
4
- import { B as q, D as H, M as z } from "./bottom-sheet-BKd7WCCS.js";
5
- import { M as K, T as O } from "./tooltip-D1-q8Ars.js";
6
- import { A as U, a as V, b as W, c as X, d as Y, B as Z, p as _, e as $, f as aa, g as ea, h as ta, C as sa, i as ra, j as oa, D as na, F as pa, I as ua, m as ia, o as la, n as Ia, N as ca, T as Sa, k as ma, l as Ba } from "./image-rectangle-CF656HIm.js";
7
- import { S as da } from "./snackbar-DH8jCh2V.js";
8
- import { B as Ta, T as xa } from "./tabs-DoiqKzR9.js";
9
- import { S as Ca, u as fa } from "./use-snackbars-B0MaRlg1.js";
2
+ import { A as n, a as p, B as u, b as i, F as l, e as I, P as c, c as S, d as m, S as B, T as g } from "./top-bar-sahvpzBv.js";
3
+ import { B as b, C as T, b as x, a as h, D as f, k as C, E as P, M as k, P as A, R as M, d as F, c as D, S as L, e as R, j as w, i as G, h as j, f as v, T as y, g as E } from "./bottom-sheet-input-CI-9wYa7.js";
4
+ import { B as q, D as H, M as z } from "./bottom-sheet-3W_vCYl6.js";
5
+ import { M as K, T as O } from "./tooltip-C1P1eN0U.js";
6
+ import { A as U, a as V, b as W, c as X, d as Y, B as Z, o as _, e as $, f as aa, g as ea, h as ta, C as sa, i as ra, F as oa, I as na, l as pa, n as ua, m as ia, N as la, T as Ia, j as ca, k as Sa } from "./image-rectangle-BpMI_fTE.js";
7
+ import { S as Ba } from "./snackbar-DH8jCh2V.js";
8
+ import { B as da, T as ba } from "./tabs-BOdkXJdy.js";
9
+ import { S as xa, u as ha } from "./use-snackbars-B0MaRlg1.js";
10
10
  export {
11
11
  U as Alert,
12
12
  V as Anchor,
@@ -21,59 +21,57 @@ export {
21
21
  q as BottomSheet,
22
22
  b as BottomSheetInput,
23
23
  $ as Brand,
24
- Ta as Breadcrumbs,
24
+ da as Breadcrumbs,
25
25
  aa as Button,
26
26
  ea as ButtonFloat,
27
27
  i as ButtonGroup,
28
28
  ta as ButtonIcon,
29
29
  sa as Calculator,
30
- ra as Calendar,
31
- oa as Card,
30
+ ra as Card,
32
31
  T as CheckboxInput,
33
32
  x as ChipMultipleInput,
34
33
  h as ChipSingleInput,
35
- C as DateSinglePickerInput,
36
- na as DescriptionList,
34
+ f as DateSinglePickerInput,
37
35
  H as Drawer,
38
- f as DrawerInput,
36
+ C as DrawerInput,
39
37
  P as EmailInput,
40
- pa as FilterChip,
38
+ oa as FilterChip,
41
39
  l as FilterChipGroup,
42
40
  I as FormLayout,
43
- ua as Icon,
44
- ia as ImageCircle,
45
- la as ImageRectangle,
46
- Ia as ImageSquare,
41
+ na as Icon,
42
+ pa as ImageCircle,
43
+ ua as ImageRectangle,
44
+ ia as ImageSquare,
47
45
  t as LoadingIndicator,
48
46
  K as Menu,
49
47
  z as Modal,
50
48
  k as ModalInput,
51
- ca as NoResults,
49
+ la as NoResults,
52
50
  c as PageContent,
53
51
  S as PageHeader,
54
52
  m as PageLayout,
55
53
  A as PriceInput,
56
54
  s as ProgressIndicator,
57
55
  M as RadioInput,
58
- D as SearchInput,
59
- F as SegmentMultipleInput,
56
+ F as SearchInput,
57
+ D as SegmentMultipleInput,
60
58
  L as SegmentSingleInput,
61
59
  R as SelectInput,
62
60
  w as SelectableMultipleInput,
63
61
  G as SelectableSingleInput,
64
62
  B as SideBar,
65
63
  r as Skeleton,
66
- da as Snackbar,
67
- Ca as SnackbarsProvider,
64
+ Ba as Snackbar,
65
+ xa as SnackbarsProvider,
68
66
  j as SwitchInput,
69
- Sa as Table,
70
- xa as Tabs,
71
- ma as Text,
67
+ Ia as Table,
68
+ ba as Tabs,
69
+ ca as Text,
72
70
  v as TextAreaInput,
73
71
  y as TextInput,
74
- Ba as Tile,
72
+ Sa as Tile,
75
73
  E as TimePickerInput,
76
74
  O as Tooltip,
77
75
  g as TopBar,
78
- fa as useSnackbars
76
+ ha as useSnackbars
79
77
  };
@@ -1,4 +1,4 @@
1
- import { A as r, a as e, B as s, b as t, F as p, e as B, P as u, c as d, d as g, S as P, T as i } from "../top-bar-B4SZ2YZC.js";
1
+ import { A as r, a as e, B as s, b as t, F as p, e as B, P as u, c as d, d as g, S as P, T as i } from "../top-bar-sahvpzBv.js";
2
2
  export {
3
3
  r as AppBar,
4
4
  e as BadgeGroup,
@@ -1,4 +1,4 @@
1
- import { B as s, T as b } from "../tabs-DoiqKzR9.js";
1
+ import { B as s, T as b } from "../tabs-BOdkXJdy.js";
2
2
  export {
3
3
  s as Breadcrumbs,
4
4
  b as Tabs
@@ -1,5 +1,5 @@
1
- import { B as e, D as r, M as t } from "../bottom-sheet-BKd7WCCS.js";
2
- import { M, T as m } from "../tooltip-D1-q8Ars.js";
1
+ import { B as e, D as r, M as t } from "../bottom-sheet-3W_vCYl6.js";
2
+ import { M, T as m } from "../tooltip-C1P1eN0U.js";
3
3
  export {
4
4
  e as BottomSheet,
5
5
  r as Drawer,
@@ -1,5 +1,5 @@
1
- import { A as t, a as e, b as r, c as o, d as l, B as n, p as i, e as c, f as u, g, h as m, C as B, i as I, j as A, D as C, F as b, I as d, m as p, o as T, n as f, N as h, T as x, k as F, l as S } from "../image-rectangle-CF656HIm.js";
2
- import { S as D } from "../snackbar-DH8jCh2V.js";
1
+ import { A as t, a as e, b as r, c as o, d as l, B as n, o as c, e as i, f as u, g, h as m, C as B, i as I, F as A, I as b, l as C, n as d, m as T, N as f, T as h, j as p, k as x } from "../image-rectangle-BpMI_fTE.js";
2
+ import { S } from "../snackbar-DH8jCh2V.js";
3
3
  export {
4
4
  t as Alert,
5
5
  e as Anchor,
@@ -7,23 +7,21 @@ export {
7
7
  o as AttributeList,
8
8
  l as Avatar,
9
9
  n as Badge,
10
- i as BaseImage,
11
- c as Brand,
10
+ c as BaseImage,
11
+ i as Brand,
12
12
  u as Button,
13
13
  g as ButtonFloat,
14
14
  m as ButtonIcon,
15
15
  B as Calculator,
16
- I as Calendar,
17
- A as Card,
18
- C as DescriptionList,
19
- b as FilterChip,
20
- d as Icon,
21
- p as ImageCircle,
22
- T as ImageRectangle,
23
- f as ImageSquare,
24
- h as NoResults,
25
- D as Snackbar,
26
- x as Table,
27
- F as Text,
28
- S as Tile
16
+ I as Card,
17
+ A as FilterChip,
18
+ b as Icon,
19
+ C as ImageCircle,
20
+ d as ImageRectangle,
21
+ T as ImageSquare,
22
+ f as NoResults,
23
+ S as Snackbar,
24
+ h as Table,
25
+ p as Text,
26
+ x as Tile
29
27
  };
@@ -1,6 +1,6 @@
1
1
  import { c as d, j as s, a as u } from "./index-DOdDlCoL.js";
2
2
  import { forwardRef as f, createContext as x, useContext as g, useState as p, useLayoutEffect as y, useRef as h } from "react";
3
- import { I as w } from "./image-rectangle-CF656HIm.js";
3
+ import { I as w } from "./image-rectangle-BpMI_fTE.js";
4
4
  import "./snackbar-DH8jCh2V.js";
5
5
  import { ChevronRight as T } from "lucide-react";
6
6
  const j = d(
@@ -1,8 +1,10 @@
1
- import { c as h, j as u, a as b } from "./index-DOdDlCoL.js";
2
- import { useEffect as m, useRef as c, useId as v, cloneElement as x, useState as g } from "react";
3
- import { k as j } from "./image-rectangle-CF656HIm.js";
4
- const I = h(
5
- "absolute z-30 min-w-40 bg-background rounded-lg border border-border transition-all duration-200 ease-out will-change-transform",
1
+ import { c as h, j as i, a as f } from "./index-DOdDlCoL.js";
2
+ import { useEffect as p, forwardRef as b, useRef as c, useId as g, cloneElement as v, useState as w } from "react";
3
+ import { u as T } from "./bottom-sheet-3W_vCYl6.js";
4
+ import { f as E, j as I } from "./image-rectangle-BpMI_fTE.js";
5
+ import "./snackbar-DH8jCh2V.js";
6
+ const C = h(
7
+ "absolute z-70 min-w-40 bg-background rounded-lg border border-border transition-all duration-200 ease-out will-change-transform",
6
8
  {
7
9
  variants: {
8
10
  size: {
@@ -20,8 +22,8 @@ const I = h(
20
22
  }
21
23
  }
22
24
  );
23
- function E(t, e, r, o) {
24
- m(() => {
25
+ function N(t, e, r, o) {
26
+ p(() => {
25
27
  if (!t) return;
26
28
  function n(s) {
27
29
  !e.current?.contains(s.target) && !r.current?.contains(s.target) && o();
@@ -29,61 +31,67 @@ function E(t, e, r, o) {
29
31
  return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
30
32
  }, [t, o, e, r]);
31
33
  }
32
- function M(t, e) {
33
- m(() => {
34
- if (t && e.current) {
35
- const r = e.current.querySelectorAll('[role="menuitem"]');
36
- r.length && r[0].focus();
34
+ const R = b(
35
+ ({ children: t }, e) => /* @__PURE__ */ i.jsx("ul", { ref: e, className: "flex flex-col gap-1", children: t })
36
+ ), z = b(
37
+ ({ children: t, disabled: e, ...r }, o) => /* @__PURE__ */ i.jsx("li", { ref: o, ...r, children: /* @__PURE__ */ i.jsx(
38
+ E,
39
+ {
40
+ variant: "ghost",
41
+ className: f("block text-left w-full"),
42
+ disabled: e,
43
+ children: t
37
44
  }
38
- }, [t, e]);
39
- }
40
- const F = ({
45
+ ) })
46
+ ), P = ({
41
47
  isOpen: t,
42
48
  onOutsideClick: e,
43
49
  size: r = "md",
44
50
  content: o,
45
51
  children: n
46
52
  }) => {
47
- const s = c(null), a = c(null), i = v();
48
- return E(t, a, s, e), M(t, a), /* @__PURE__ */ u.jsxs("div", { className: "relative w-fit", children: [
49
- x(n, {
53
+ const s = c(null), l = c(null), a = g();
54
+ return N(t, l, s, e), T(t, e), /* @__PURE__ */ i.jsxs("div", { className: "relative w-fit", children: [
55
+ v(n, {
50
56
  // @ts-expect-error: ref is valid for button or forwardRef components
51
57
  ref: s,
52
58
  "aria-haspopup": "menu",
53
59
  "aria-expanded": t,
54
- "aria-controls": i,
55
- tabIndex: 0
60
+ "aria-controls": a
56
61
  }),
57
- /* @__PURE__ */ u.jsx(
62
+ t && /* @__PURE__ */ i.jsx(
58
63
  "div",
59
64
  {
60
- id: i,
61
- ref: a,
62
- className: b(I({ size: r, open: t })),
65
+ id: a,
66
+ ref: l,
67
+ className: f(C({ size: r, open: t })),
63
68
  role: "menu",
64
69
  "aria-hidden": !t,
65
70
  children: o
66
71
  }
67
72
  )
68
73
  ] });
69
- };
70
- function z(t = "auto") {
71
- const e = c(null), [r, o] = g("bottom");
72
- return m(() => {
74
+ }, H = Object.assign(P, {
75
+ Content: R,
76
+ Item: z
77
+ });
78
+ function k(t = "auto") {
79
+ const e = c(null), [r, o] = w("bottom");
80
+ return p(() => {
73
81
  if (!open || t !== "auto" || !e.current) {
74
82
  o(t === "auto" ? "bottom" : t);
75
83
  return;
76
84
  }
77
- const n = e.current.getBoundingClientRect(), s = window.innerWidth, a = window.innerHeight, i = {
85
+ const n = e.current.getBoundingClientRect(), s = window.innerWidth, l = window.innerHeight, a = {
78
86
  top: n.top,
79
- bottom: a - n.bottom,
87
+ bottom: l - n.bottom,
80
88
  left: n.left,
81
89
  right: s - n.right
82
90
  };
83
- i.bottom > 64 ? o("bottom") : i.top > 64 ? o("top") : i.right > 128 ? o("right") : o("left");
91
+ a.bottom > 64 ? o("bottom") : a.top > 64 ? o("top") : a.right > 128 ? o("right") : o("left");
84
92
  }, [t, e]), { position: r, ref: e };
85
93
  }
86
- const P = h(
94
+ const B = h(
87
95
  "absolute z-50 px-2 py-1 rounded bg-neutral pointer-events-auto transition-opacity duration-150 min-w-[max-content] max-w-sm whitespace-pre-line",
88
96
  {
89
97
  variants: {
@@ -99,7 +107,7 @@ const P = h(
99
107
  position: "auto"
100
108
  }
101
109
  }
102
- ), L = ({
110
+ ), q = ({
103
111
  children: t,
104
112
  content: e,
105
113
  position: r = "auto",
@@ -107,42 +115,42 @@ const P = h(
107
115
  delay: n,
108
116
  ...s
109
117
  }) => {
110
- const a = v(), [i, d] = g(!1), l = c(null), p = () => {
111
- n ? l.current = setTimeout(() => d(!0), n) : d(!0);
112
- }, f = () => {
113
- l.current && clearTimeout(l.current), d(!1);
118
+ const l = g(), [a, m] = w(!1), u = c(null), d = () => {
119
+ n ? u.current = setTimeout(() => m(!0), n) : m(!0);
120
+ }, x = () => {
121
+ u.current && clearTimeout(u.current), m(!1);
114
122
  };
115
- m(() => () => {
116
- l.current && clearTimeout(l.current);
123
+ p(() => () => {
124
+ u.current && clearTimeout(u.current);
117
125
  }, []);
118
- const w = {
126
+ const j = {
119
127
  tabIndex: 0,
120
- "aria-describedby": a,
121
- onMouseEnter: p,
122
- onFocus: p,
123
- onMouseLeave: f,
124
- onBlur: f,
128
+ "aria-describedby": l,
129
+ onMouseEnter: d,
130
+ onFocus: d,
131
+ onMouseLeave: x,
132
+ onBlur: x,
125
133
  ...s
126
- }, { ref: y, position: T } = z(r);
127
- return /* @__PURE__ */ u.jsxs("div", { className: "relative w-fit", ref: y, children: [
128
- x(t, w),
129
- /* @__PURE__ */ u.jsx(
134
+ }, { ref: y, position: M } = k(r);
135
+ return /* @__PURE__ */ i.jsxs("div", { className: "relative w-fit", ref: y, children: [
136
+ v(t, j),
137
+ /* @__PURE__ */ i.jsx(
130
138
  "div",
131
139
  {
132
- id: a,
133
- className: b(
134
- P({ position: T }),
140
+ id: l,
141
+ className: f(
142
+ B({ position: M }),
135
143
  o,
136
- !i && "opacity-0 pointer-events-none"
144
+ !a && "opacity-0 pointer-events-none"
137
145
  ),
138
146
  role: "tooltip",
139
- "aria-hidden": !i,
140
- children: /* @__PURE__ */ u.jsx(j, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: e })
147
+ "aria-hidden": !a,
148
+ children: /* @__PURE__ */ i.jsx(I, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: e })
141
149
  }
142
150
  )
143
151
  ] });
144
152
  };
145
153
  export {
146
- F as M,
147
- L as T
154
+ H as M,
155
+ q as T
148
156
  };