@dimasbaguspm/versaur 0.0.30 → 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.
- package/dist/js/{bottom-sheet-DUcwK0Yd.js → bottom-sheet-3W_vCYl6.js} +3 -2
- package/dist/js/{bottom-sheet-input-Bzx0ecmU.js → bottom-sheet-input-CI-9wYa7.js} +7 -7
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-BMEGIW-6.js → image-rectangle-BpMI_fTE.js} +192 -498
- package/dist/js/index.js +27 -29
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +15 -17
- package/dist/js/{tabs-CIWr5hdb.js → tabs-BOdkXJdy.js} +1 -1
- package/dist/js/{tooltip-IazSAgsg.js → tooltip-C1P1eN0U.js} +65 -57
- package/dist/js/{top-bar-BdmaTpTp.js → top-bar-sahvpzBv.js} +4 -4
- package/dist/types/overlays/menu/index.d.ts +1 -1
- package/dist/types/overlays/menu/menu.d.ts +4 -1
- package/dist/types/overlays/menu/types.d.ts +4 -2
- package/dist/types/overlays/menu/use-menu.d.ts +0 -1
- package/dist/types/primitive/button-menu/button-menu.d.ts +4 -0
- package/dist/types/primitive/button-menu/index.d.ts +2 -0
- package/dist/types/primitive/button-menu/types.d.ts +13 -0
- package/dist/types/primitive/card/card.atoms.d.ts +3 -0
- package/dist/types/primitive/card/card.d.ts +4 -23
- package/dist/types/primitive/card/types.d.ts +6 -0
- package/dist/types/primitive/index.d.ts +0 -2
- package/dist/utils/enforce-subpath-import.js +1 -2
- package/package.json +1 -1
- package/dist/types/primitive/calendar/calendar.atoms.d.ts +0 -13
- package/dist/types/primitive/calendar/calendar.d.ts +0 -8
- package/dist/types/primitive/calendar/index.d.ts +0 -2
- package/dist/types/primitive/calendar/types.d.ts +0 -54
- package/dist/types/primitive/calendar/use-calendar.d.ts +0 -18
- package/dist/types/primitive/description-list/description-list.atoms.d.ts +0 -13
- package/dist/types/primitive/description-list/description-list.d.ts +0 -6
- package/dist/types/primitive/description-list/index.d.ts +0 -2
- 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-
|
|
3
|
-
import { B as b, C as T, b as x, a as h, D as
|
|
4
|
-
import { B as q, D as H, M as z } from "./bottom-sheet-
|
|
5
|
-
import { M as K, T as O } from "./tooltip-
|
|
6
|
-
import { A as U, a as V, b as W, c as X, d as Y, B as Z,
|
|
7
|
-
import { S as
|
|
8
|
-
import { B as
|
|
9
|
-
import { S as
|
|
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
|
-
|
|
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
|
|
31
|
-
oa as Card,
|
|
30
|
+
ra as Card,
|
|
32
31
|
T as CheckboxInput,
|
|
33
32
|
x as ChipMultipleInput,
|
|
34
33
|
h as ChipSingleInput,
|
|
35
|
-
|
|
36
|
-
na as DescriptionList,
|
|
34
|
+
f as DateSinglePickerInput,
|
|
37
35
|
H as Drawer,
|
|
38
|
-
|
|
36
|
+
C as DrawerInput,
|
|
39
37
|
P as EmailInput,
|
|
40
|
-
|
|
38
|
+
oa as FilterChip,
|
|
41
39
|
l as FilterChipGroup,
|
|
42
40
|
I as FormLayout,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
-
|
|
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
|
-
|
|
67
|
-
|
|
64
|
+
Ba as Snackbar,
|
|
65
|
+
xa as SnackbarsProvider,
|
|
68
66
|
j as SwitchInput,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
Ia as Table,
|
|
68
|
+
ba as Tabs,
|
|
69
|
+
ca as Text,
|
|
72
70
|
v as TextAreaInput,
|
|
73
71
|
y as TextInput,
|
|
74
|
-
|
|
72
|
+
Sa as Tile,
|
|
75
73
|
E as TimePickerInput,
|
|
76
74
|
O as Tooltip,
|
|
77
75
|
g as TopBar,
|
|
78
|
-
|
|
76
|
+
ha as useSnackbars
|
|
79
77
|
};
|
package/dist/js/layouts/index.js
CHANGED
|
@@ -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-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { B as e, D as r, M as t } from "../bottom-sheet-
|
|
2
|
-
import { M, T as m } from "../tooltip-
|
|
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,
|
|
2
|
-
import { S
|
|
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
|
-
|
|
11
|
-
|
|
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
|
|
17
|
-
A as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
d as
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
h as
|
|
25
|
-
|
|
26
|
-
x as
|
|
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-
|
|
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
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
24
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
}
|
|
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),
|
|
48
|
-
return
|
|
49
|
-
|
|
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":
|
|
55
|
-
tabIndex: 0
|
|
60
|
+
"aria-controls": a
|
|
56
61
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
62
|
+
t && /* @__PURE__ */ i.jsx(
|
|
58
63
|
"div",
|
|
59
64
|
{
|
|
60
|
-
id:
|
|
61
|
-
ref:
|
|
62
|
-
className:
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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,
|
|
85
|
+
const n = e.current.getBoundingClientRect(), s = window.innerWidth, l = window.innerHeight, a = {
|
|
78
86
|
top: n.top,
|
|
79
|
-
bottom:
|
|
87
|
+
bottom: l - n.bottom,
|
|
80
88
|
left: n.left,
|
|
81
89
|
right: s - n.right
|
|
82
90
|
};
|
|
83
|
-
|
|
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
|
|
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
|
-
),
|
|
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
|
|
111
|
-
n ?
|
|
112
|
-
},
|
|
113
|
-
|
|
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
|
-
|
|
116
|
-
|
|
123
|
+
p(() => () => {
|
|
124
|
+
u.current && clearTimeout(u.current);
|
|
117
125
|
}, []);
|
|
118
|
-
const
|
|
126
|
+
const j = {
|
|
119
127
|
tabIndex: 0,
|
|
120
|
-
"aria-describedby":
|
|
121
|
-
onMouseEnter:
|
|
122
|
-
onFocus:
|
|
123
|
-
onMouseLeave:
|
|
124
|
-
onBlur:
|
|
128
|
+
"aria-describedby": l,
|
|
129
|
+
onMouseEnter: d,
|
|
130
|
+
onFocus: d,
|
|
131
|
+
onMouseLeave: x,
|
|
132
|
+
onBlur: x,
|
|
125
133
|
...s
|
|
126
|
-
}, { ref: y, position:
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
|
|
129
|
-
/* @__PURE__ */
|
|
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:
|
|
133
|
-
className:
|
|
134
|
-
|
|
140
|
+
id: l,
|
|
141
|
+
className: f(
|
|
142
|
+
B({ position: M }),
|
|
135
143
|
o,
|
|
136
|
-
!
|
|
144
|
+
!a && "opacity-0 pointer-events-none"
|
|
137
145
|
),
|
|
138
146
|
role: "tooltip",
|
|
139
|
-
"aria-hidden": !
|
|
140
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
147
|
-
|
|
154
|
+
H as M,
|
|
155
|
+
q as T
|
|
148
156
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as i, j as s, a as l } from "./index-DOdDlCoL.js";
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { forwardRef as o } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { j as u } from "./image-rectangle-BpMI_fTE.js";
|
|
5
5
|
import "./snackbar-DH8jCh2V.js";
|
|
6
6
|
const j = i(
|
|
7
7
|
"w-full flex flex-wrap items-center pt-3 mb-3 gap-2 bg-white [&>[data-versaur-appbar-bottom]]:basis-full [&>[data-versaur-appbar-bottom]]:w-full [&:has([data-versaur-appbar-bottom])>[data-versaur-appbar-leading]]:pl-4 [&:has([data-versaur-appbar-bottom])>[data-versaur-appbar-trailing]]:pr-4 [&:not(:has([data-versaur-appbar-bottom]))]:px-4",
|
|
@@ -374,7 +374,7 @@ const j = i(
|
|
|
374
374
|
children: t
|
|
375
375
|
}
|
|
376
376
|
)
|
|
377
|
-
),
|
|
377
|
+
), I = i("w-full mt-4"), k = i(
|
|
378
378
|
"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 px-4 sm:px-6 mb-4"
|
|
379
379
|
), F = i("mb-4 px-4 sm:px-6"), O = i(
|
|
380
380
|
"flex-1 min-w-0 flex flex-col gap-2 w-full sm:w-auto"
|
|
@@ -387,7 +387,7 @@ const j = i(
|
|
|
387
387
|
"div",
|
|
388
388
|
{
|
|
389
389
|
ref: r,
|
|
390
|
-
className: l(
|
|
390
|
+
className: l(k(), a),
|
|
391
391
|
"data-versaur-page-header-top": !0,
|
|
392
392
|
...e,
|
|
393
393
|
children: t
|
|
@@ -486,7 +486,7 @@ const j = i(
|
|
|
486
486
|
"header",
|
|
487
487
|
{
|
|
488
488
|
ref: g,
|
|
489
|
-
className: l(
|
|
489
|
+
className: l(I(), a),
|
|
490
490
|
role: "banner",
|
|
491
491
|
...f,
|
|
492
492
|
children: [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Menu } from './menu';
|
|
2
|
-
export type
|
|
2
|
+
export type { MenuProps, MenuSize } from './types';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { MenuProps } from './types';
|
|
3
|
-
export declare const Menu: React.FC<MenuProps
|
|
3
|
+
export declare const Menu: React.FC<MenuProps> & {
|
|
4
|
+
Content: React.ForwardRefExoticComponent<import('./types').MenuContentProps & React.RefAttributes<HTMLUListElement>>;
|
|
5
|
+
Item: React.ForwardRefExoticComponent<import('./types').MenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type MenuSize = 'sm' | 'md';
|
|
3
3
|
/**
|
|
4
4
|
* Props for Menu
|
|
@@ -25,7 +25,9 @@ export interface MenuContentProps extends HTMLAttributes<HTMLUListElement> {
|
|
|
25
25
|
/**
|
|
26
26
|
* Props for MenuItem
|
|
27
27
|
*/
|
|
28
|
-
export interface MenuItemProps extends
|
|
28
|
+
export interface MenuItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
29
29
|
/** Item content */
|
|
30
30
|
children: ReactNode;
|
|
31
|
+
/** Whether the item is disabled */
|
|
32
|
+
disabled?: boolean;
|
|
31
33
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
1
|
export declare function useMenuOutsideClick(isOpen: boolean, contentRef: React.RefObject<HTMLDivElement | null>, triggerRef: React.RefObject<HTMLButtonElement | null>, onOutsideClick: () => void): void;
|
|
2
|
-
export declare function useMenuFocusFirstItem(isOpen: boolean, contentRef: React.RefObject<HTMLDivElement | null>): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonMenuProps } from './types';
|
|
2
|
+
export declare const ButtonMenu: import('react').ForwardRefExoticComponent<ButtonMenuProps & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
3
|
+
Item: import('react').ForwardRefExoticComponent<import('../../overlays/menu/types').MenuItemProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
4
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '../icon';
|
|
3
|
+
import { ButtonIconProps } from '../button-icon';
|
|
4
|
+
export interface ButtonMenuProps extends Omit<ButtonIconProps, 'content'>, Pick<IconProps, 'as'> {
|
|
5
|
+
/**
|
|
6
|
+
* Callback function triggered when the menu open state changes.
|
|
7
|
+
*/
|
|
8
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
9
|
+
/**
|
|
10
|
+
* The content to be displayed inside the menu.
|
|
11
|
+
*/
|
|
12
|
+
content: ReactNode;
|
|
13
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CardListItemProps, CardListProps } from './types';
|
|
2
|
+
export declare const CardList: import('react').ForwardRefExoticComponent<CardListProps & import('react').RefAttributes<HTMLUListElement>>;
|
|
3
|
+
export declare const CardListItem: import('react').ForwardRefExoticComponent<CardListItemProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { CardProps } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* - All cards are clickable by default with hover effects
|
|
7
|
-
* - Structured layout with avatar, title, subtitle, badge, and supplementary info
|
|
8
|
-
* - Multiple color variants with soft backgrounds
|
|
9
|
-
* - Configurable padding sizes and shapes
|
|
10
|
-
* - Built with accessibility in mind
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* <Card
|
|
15
|
-
* title="John Doe"
|
|
16
|
-
* subtitle="Software Engineer"
|
|
17
|
-
* avatar={<Avatar shape="rounded">JD</Avatar>}
|
|
18
|
-
* badge={<BadgeGroup><Badge color="secondary">Available</Badge></BadgeGroup>}
|
|
19
|
-
* supplementaryInfo="$2,847.32"
|
|
20
|
-
* onClick={handleClick}
|
|
21
|
-
* />
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
2
|
+
export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
3
|
+
List: import('react').ForwardRefExoticComponent<import('./types').CardListProps & import('react').RefAttributes<HTMLUListElement>>;
|
|
4
|
+
ListItem: import('react').ForwardRefExoticComponent<import('./types').CardListItemProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
5
|
+
};
|
|
@@ -9,7 +9,6 @@ export * from './button';
|
|
|
9
9
|
export * from './button-float';
|
|
10
10
|
export * from './button-icon';
|
|
11
11
|
export * from './calculator';
|
|
12
|
-
export * from './calendar';
|
|
13
12
|
export * from './card';
|
|
14
13
|
export * from './filter-chip';
|
|
15
14
|
export * from './icon';
|
|
@@ -18,5 +17,4 @@ export * from './snackbar';
|
|
|
18
17
|
export * from './table';
|
|
19
18
|
export * from './text';
|
|
20
19
|
export * from './tile';
|
|
21
|
-
export * from './description-list';
|
|
22
20
|
export * from './image';
|
|
@@ -55,10 +55,9 @@ const symbolToSubpath = {
|
|
|
55
55
|
"Button": "primitive",
|
|
56
56
|
"ButtonFloat": "primitive",
|
|
57
57
|
"ButtonIcon": "primitive",
|
|
58
|
+
"ButtonMenu": "primitive",
|
|
58
59
|
"Calculator": "primitive",
|
|
59
|
-
"Calendar": "primitive",
|
|
60
60
|
"Card": "primitive",
|
|
61
|
-
"DescriptionList": "primitive",
|
|
62
61
|
"FilterChip": "primitive",
|
|
63
62
|
"Icon": "primitive",
|
|
64
63
|
"ImageCircle": "primitive",
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* CalendarHeader atom for Calendar component
|
|
4
|
-
*/
|
|
5
|
-
export declare const CalendarHeader: FC;
|
|
6
|
-
/**
|
|
7
|
-
* CalendarWeekdays atom for Calendar component
|
|
8
|
-
*/
|
|
9
|
-
export declare const CalendarWeekdays: React.FC;
|
|
10
|
-
/**
|
|
11
|
-
* CalendarDays atom: delegates to single or range atom based on context
|
|
12
|
-
*/
|
|
13
|
-
export declare const CalendarDays: FC;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { CalendarProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Calendar component (Compound Pattern)
|
|
5
|
-
* Implements a month view date picker following Material 3 specs and Versaur standards
|
|
6
|
-
*/
|
|
7
|
-
export declare const CalendarRoot: React.FC<CalendarProps>;
|
|
8
|
-
export declare const Calendar: React.FC<CalendarProps>;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CalendarProps defines the props for the Calendar component
|
|
3
|
-
* @property value - The selected date
|
|
4
|
-
* @property onChange - Callback when a date is selected
|
|
5
|
-
* @property className - Custom class for the calendar container
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Calendar selection type
|
|
9
|
-
* - 'single': single date selection
|
|
10
|
-
* - 'range': date range selection (start and end)
|
|
11
|
-
*/
|
|
12
|
-
export type CalendarType = 'single' | 'range';
|
|
13
|
-
/**
|
|
14
|
-
* Calendar value type
|
|
15
|
-
* - Date for single
|
|
16
|
-
* - [Date | null, Date | null] for range
|
|
17
|
-
*/
|
|
18
|
-
export type CalendarValue = Date | [Date | null, Date | null];
|
|
19
|
-
/**
|
|
20
|
-
* CalendarProps defines the props for the Calendar component
|
|
21
|
-
* @property value - The selected date or range
|
|
22
|
-
* @property onChange - Callback when a date or range is selected
|
|
23
|
-
* @property className - Custom class for the calendar container
|
|
24
|
-
* @property type - Selection type: 'single' or 'range'
|
|
25
|
-
*/
|
|
26
|
-
export interface CalendarProps {
|
|
27
|
-
/**
|
|
28
|
-
* The selected date or range
|
|
29
|
-
*/
|
|
30
|
-
value?: CalendarValue;
|
|
31
|
-
/**
|
|
32
|
-
* Callback when a date or range is selected
|
|
33
|
-
*/
|
|
34
|
-
onChange?: (value: CalendarValue) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Custom class for the calendar container
|
|
37
|
-
*/
|
|
38
|
-
className?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Selection type: 'single' or 'range'
|
|
41
|
-
*/
|
|
42
|
-
type?: CalendarType;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Props for CalendarHeader atom
|
|
46
|
-
*/
|
|
47
|
-
export interface CalendarHeaderProps {
|
|
48
|
-
value?: CalendarValue;
|
|
49
|
-
year: number;
|
|
50
|
-
month: number;
|
|
51
|
-
onPrevMonth: () => void;
|
|
52
|
-
onNextMonth: () => void;
|
|
53
|
-
className?: string;
|
|
54
|
-
}
|