@dimasbaguspm/versaur 0.0.30 → 0.0.32
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-DJgcgmgw.js} +146 -160
- package/dist/js/{bottom-sheet-input-Bzx0ecmU.js → bottom-sheet-input-lRqhqp7I.js} +7 -7
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-BMEGIW-6.js → image-rectangle-BS6j3xEC.js} +429 -618
- package/dist/js/index.js +46 -47
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +7 -6
- package/dist/js/primitive/index.js +21 -22
- package/dist/js/{tabs-CIWr5hdb.js → tabs-80jJFJ7W.js} +1 -1
- package/dist/js/tooltip-J7r2xoUk.js +81 -0
- package/dist/js/{top-bar-BdmaTpTp.js → top-bar-DJNgsR7X.js} +1 -1
- 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-icon/button-menu-icon.d.ts +4 -0
- package/dist/types/primitive/button-menu-icon/index.d.ts +2 -0
- package/dist/types/primitive/button-menu-icon/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 +1 -2
- package/dist/utils/enforce-subpath-import.js +1 -2
- package/package.json +1 -1
- package/dist/js/tooltip-IazSAgsg.js +0 -148
- 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,79 +1,78 @@
|
|
|
1
|
-
import { L 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-
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import { S as
|
|
8
|
-
import { B as
|
|
9
|
-
import { S as
|
|
1
|
+
import { L as e, 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-DJNgsR7X.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, P as k, R as A, 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-lRqhqp7I.js";
|
|
4
|
+
import { B as q, D as H, M as z } from "./bottom-sheet-DJgcgmgw.js";
|
|
5
|
+
import { A as K, a as O, b as Q, c as U, d as V, B as W, p as X, e as Y, f as Z, h as _, i as $, g as aa, C as ta, j as ea, F as sa, I as ra, m as oa, o as na, n as pa, M as ua, N as ia, T as la, k as Ia, l as ca } from "./image-rectangle-BS6j3xEC.js";
|
|
6
|
+
import { T as ma } from "./tooltip-J7r2xoUk.js";
|
|
7
|
+
import { S as ga } from "./snackbar-DH8jCh2V.js";
|
|
8
|
+
import { B as ba, T as Ta } from "./tabs-80jJFJ7W.js";
|
|
9
|
+
import { S as ha, u as fa } from "./use-snackbars-B0MaRlg1.js";
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
K as Alert,
|
|
12
|
+
O as Anchor,
|
|
13
13
|
n as AppBar,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
Q as Attribute,
|
|
15
|
+
U as AttributeList,
|
|
16
|
+
V as Avatar,
|
|
17
|
+
W as Badge,
|
|
18
18
|
p as BadgeGroup,
|
|
19
|
-
|
|
19
|
+
X as BaseImage,
|
|
20
20
|
u as BottomBar,
|
|
21
21
|
q as BottomSheet,
|
|
22
22
|
b as BottomSheetInput,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
Y as Brand,
|
|
24
|
+
ba as Breadcrumbs,
|
|
25
|
+
Z as Button,
|
|
26
|
+
_ as ButtonFloat,
|
|
27
27
|
i as ButtonGroup,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
$ as ButtonIcon,
|
|
29
|
+
aa as ButtonMenuIcon,
|
|
30
|
+
ta as Calculator,
|
|
31
|
+
ea as Card,
|
|
32
32
|
T as CheckboxInput,
|
|
33
33
|
x as ChipMultipleInput,
|
|
34
34
|
h as ChipSingleInput,
|
|
35
|
-
|
|
36
|
-
na as DescriptionList,
|
|
35
|
+
f as DateSinglePickerInput,
|
|
37
36
|
H as Drawer,
|
|
38
|
-
|
|
37
|
+
C as DrawerInput,
|
|
39
38
|
P as EmailInput,
|
|
40
|
-
|
|
39
|
+
sa as FilterChip,
|
|
41
40
|
l as FilterChipGroup,
|
|
42
41
|
I as FormLayout,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
ra as Icon,
|
|
43
|
+
oa as ImageCircle,
|
|
44
|
+
na as ImageRectangle,
|
|
45
|
+
pa as ImageSquare,
|
|
46
|
+
e as LoadingIndicator,
|
|
47
|
+
ua as Menu,
|
|
49
48
|
z as Modal,
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
M as ModalInput,
|
|
50
|
+
ia as NoResults,
|
|
52
51
|
c as PageContent,
|
|
53
52
|
S as PageHeader,
|
|
54
53
|
m as PageLayout,
|
|
55
|
-
|
|
54
|
+
k as PriceInput,
|
|
56
55
|
s as ProgressIndicator,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
A as RadioInput,
|
|
57
|
+
F as SearchInput,
|
|
58
|
+
D as SegmentMultipleInput,
|
|
60
59
|
L as SegmentSingleInput,
|
|
61
60
|
R as SelectInput,
|
|
62
61
|
w as SelectableMultipleInput,
|
|
63
62
|
G as SelectableSingleInput,
|
|
64
63
|
B as SideBar,
|
|
65
64
|
r as Skeleton,
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
ga as Snackbar,
|
|
66
|
+
ha as SnackbarsProvider,
|
|
68
67
|
j as SwitchInput,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
la as Table,
|
|
69
|
+
Ta as Tabs,
|
|
70
|
+
Ia as Text,
|
|
72
71
|
v as TextAreaInput,
|
|
73
72
|
y as TextInput,
|
|
74
|
-
|
|
73
|
+
ca as Tile,
|
|
75
74
|
E as TimePickerInput,
|
|
76
|
-
|
|
75
|
+
ma as Tooltip,
|
|
77
76
|
g as TopBar,
|
|
78
77
|
fa as useSnackbars
|
|
79
78
|
};
|
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-DJNgsR7X.js";
|
|
2
2
|
export {
|
|
3
3
|
r as AppBar,
|
|
4
4
|
e as BadgeGroup,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { M
|
|
1
|
+
import { B as a, D as e, M as t } from "../bottom-sheet-DJgcgmgw.js";
|
|
2
|
+
import { M as m } from "../image-rectangle-BS6j3xEC.js";
|
|
3
|
+
import { T as M } from "../tooltip-J7r2xoUk.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
a as BottomSheet,
|
|
6
|
+
e as Drawer,
|
|
7
|
+
m as Menu,
|
|
7
8
|
t as Modal,
|
|
8
|
-
|
|
9
|
+
M as Tooltip
|
|
9
10
|
};
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { A as t, a as e, b as
|
|
2
|
-
import { S as
|
|
1
|
+
import { A as t, a as e, b as o, c as r, d as n, B as l, p as u, e as c, f as i, h as B, i as I, g, C as m, j as A, F as b, I as C, m as d, o as p, n as T, N as f, T as h, k as x, l as F } from "../image-rectangle-BS6j3xEC.js";
|
|
2
|
+
import { S as k } from "../snackbar-DH8jCh2V.js";
|
|
3
3
|
export {
|
|
4
4
|
t as Alert,
|
|
5
5
|
e as Anchor,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
o as Attribute,
|
|
7
|
+
r as AttributeList,
|
|
8
|
+
n as Avatar,
|
|
9
|
+
l as Badge,
|
|
10
|
+
u as BaseImage,
|
|
11
11
|
c as Brand,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
i as Button,
|
|
13
|
+
B as ButtonFloat,
|
|
14
|
+
I as ButtonIcon,
|
|
15
|
+
g as ButtonMenuIcon,
|
|
16
|
+
m as Calculator,
|
|
17
17
|
A as Card,
|
|
18
|
-
C as DescriptionList,
|
|
19
18
|
b as FilterChip,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
C as Icon,
|
|
20
|
+
d as ImageCircle,
|
|
21
|
+
p as ImageRectangle,
|
|
22
|
+
T as ImageSquare,
|
|
23
|
+
f as NoResults,
|
|
24
|
+
k as Snackbar,
|
|
25
|
+
h as Table,
|
|
26
|
+
x as Text,
|
|
27
|
+
F as Tile
|
|
29
28
|
};
|
|
@@ -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-BS6j3xEC.js";
|
|
4
4
|
import "./snackbar-DH8jCh2V.js";
|
|
5
5
|
import { ChevronRight as T } from "lucide-react";
|
|
6
6
|
const j = d(
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { c as v, j as c, a as w } from "./index-DOdDlCoL.js";
|
|
2
|
+
import { useRef as m, useState as d, useEffect as h, useId as T, cloneElement as j } from "react";
|
|
3
|
+
import { k as y } from "./image-rectangle-BS6j3xEC.js";
|
|
4
|
+
function P(e = "auto") {
|
|
5
|
+
const n = m(null), [a, t] = d("bottom");
|
|
6
|
+
return h(() => {
|
|
7
|
+
if (!open || e !== "auto" || !n.current) {
|
|
8
|
+
t(e === "auto" ? "bottom" : e);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const o = n.current.getBoundingClientRect(), l = window.innerWidth, r = window.innerHeight, i = {
|
|
12
|
+
top: o.top,
|
|
13
|
+
bottom: r - o.bottom,
|
|
14
|
+
left: o.left,
|
|
15
|
+
right: l - o.right
|
|
16
|
+
};
|
|
17
|
+
i.bottom > 64 ? t("bottom") : i.top > 64 ? t("top") : i.right > 128 ? t("right") : t("left");
|
|
18
|
+
}, [e, n]), { position: a, ref: n };
|
|
19
|
+
}
|
|
20
|
+
const E = v(
|
|
21
|
+
"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",
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
position: {
|
|
25
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
26
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
27
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
28
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2",
|
|
29
|
+
auto: "top-full left-1/2 -translate-x-1/2 mt-2"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
position: "auto"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
), O = ({
|
|
37
|
+
children: e,
|
|
38
|
+
content: n,
|
|
39
|
+
position: a = "auto",
|
|
40
|
+
popoverClassName: t,
|
|
41
|
+
delay: o,
|
|
42
|
+
...l
|
|
43
|
+
}) => {
|
|
44
|
+
const r = T(), [i, u] = d(!1), s = m(null), p = () => {
|
|
45
|
+
o ? s.current = setTimeout(() => u(!0), o) : u(!0);
|
|
46
|
+
}, f = () => {
|
|
47
|
+
s.current && clearTimeout(s.current), u(!1);
|
|
48
|
+
};
|
|
49
|
+
h(() => () => {
|
|
50
|
+
s.current && clearTimeout(s.current);
|
|
51
|
+
}, []);
|
|
52
|
+
const b = {
|
|
53
|
+
tabIndex: 0,
|
|
54
|
+
"aria-describedby": r,
|
|
55
|
+
onMouseEnter: p,
|
|
56
|
+
onFocus: p,
|
|
57
|
+
onMouseLeave: f,
|
|
58
|
+
onBlur: f,
|
|
59
|
+
...l
|
|
60
|
+
}, { ref: x, position: g } = P(a);
|
|
61
|
+
return /* @__PURE__ */ c.jsxs("div", { className: "relative w-fit", ref: x, children: [
|
|
62
|
+
j(e, b),
|
|
63
|
+
/* @__PURE__ */ c.jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
id: r,
|
|
67
|
+
className: w(
|
|
68
|
+
E({ position: g }),
|
|
69
|
+
t,
|
|
70
|
+
!i && "opacity-0 pointer-events-none"
|
|
71
|
+
),
|
|
72
|
+
role: "tooltip",
|
|
73
|
+
"aria-hidden": !i,
|
|
74
|
+
children: /* @__PURE__ */ c.jsx(y, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: n })
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] });
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
O as T
|
|
81
|
+
};
|
|
@@ -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 { k as u } from "./image-rectangle-
|
|
4
|
+
import { k as u } from "./image-rectangle-BS6j3xEC.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",
|
|
@@ -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 { ButtonMenuIconProps } from './types';
|
|
2
|
+
export declare const ButtonMenuIcon: import('react').ForwardRefExoticComponent<ButtonMenuIconProps & 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 ButtonMenuIconProps 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
|
+
};
|
|
@@ -6,10 +6,10 @@ export * from './avatar';
|
|
|
6
6
|
export * from './badge';
|
|
7
7
|
export * from './brand';
|
|
8
8
|
export * from './button';
|
|
9
|
+
export * from './button-menu-icon';
|
|
9
10
|
export * from './button-float';
|
|
10
11
|
export * from './button-icon';
|
|
11
12
|
export * from './calculator';
|
|
12
|
-
export * from './calendar';
|
|
13
13
|
export * from './card';
|
|
14
14
|
export * from './filter-chip';
|
|
15
15
|
export * from './icon';
|
|
@@ -18,5 +18,4 @@ export * from './snackbar';
|
|
|
18
18
|
export * from './table';
|
|
19
19
|
export * from './text';
|
|
20
20
|
export * from './tile';
|
|
21
|
-
export * from './description-list';
|
|
22
21
|
export * from './image';
|
|
@@ -55,10 +55,9 @@ const symbolToSubpath = {
|
|
|
55
55
|
"Button": "primitive",
|
|
56
56
|
"ButtonFloat": "primitive",
|
|
57
57
|
"ButtonIcon": "primitive",
|
|
58
|
+
"ButtonMenuIcon": "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,148 +0,0 @@
|
|
|
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-BMEGIW-6.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",
|
|
6
|
-
{
|
|
7
|
-
variants: {
|
|
8
|
-
size: {
|
|
9
|
-
sm: "py-1.5 px-1",
|
|
10
|
-
md: "py-2 px-1"
|
|
11
|
-
},
|
|
12
|
-
open: {
|
|
13
|
-
true: "opacity-100 translate-y-1",
|
|
14
|
-
false: "opacity-0 pointer-events-none translate-y-3"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
size: "md",
|
|
19
|
-
open: !1
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
function E(t, e, r, o) {
|
|
24
|
-
m(() => {
|
|
25
|
-
if (!t) return;
|
|
26
|
-
function n(s) {
|
|
27
|
-
!e.current?.contains(s.target) && !r.current?.contains(s.target) && o();
|
|
28
|
-
}
|
|
29
|
-
return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
|
|
30
|
-
}, [t, o, e, r]);
|
|
31
|
-
}
|
|
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();
|
|
37
|
-
}
|
|
38
|
-
}, [t, e]);
|
|
39
|
-
}
|
|
40
|
-
const F = ({
|
|
41
|
-
isOpen: t,
|
|
42
|
-
onOutsideClick: e,
|
|
43
|
-
size: r = "md",
|
|
44
|
-
content: o,
|
|
45
|
-
children: n
|
|
46
|
-
}) => {
|
|
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, {
|
|
50
|
-
// @ts-expect-error: ref is valid for button or forwardRef components
|
|
51
|
-
ref: s,
|
|
52
|
-
"aria-haspopup": "menu",
|
|
53
|
-
"aria-expanded": t,
|
|
54
|
-
"aria-controls": i,
|
|
55
|
-
tabIndex: 0
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ u.jsx(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
id: i,
|
|
61
|
-
ref: a,
|
|
62
|
-
className: b(I({ size: r, open: t })),
|
|
63
|
-
role: "menu",
|
|
64
|
-
"aria-hidden": !t,
|
|
65
|
-
children: o
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
] });
|
|
69
|
-
};
|
|
70
|
-
function z(t = "auto") {
|
|
71
|
-
const e = c(null), [r, o] = g("bottom");
|
|
72
|
-
return m(() => {
|
|
73
|
-
if (!open || t !== "auto" || !e.current) {
|
|
74
|
-
o(t === "auto" ? "bottom" : t);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const n = e.current.getBoundingClientRect(), s = window.innerWidth, a = window.innerHeight, i = {
|
|
78
|
-
top: n.top,
|
|
79
|
-
bottom: a - n.bottom,
|
|
80
|
-
left: n.left,
|
|
81
|
-
right: s - n.right
|
|
82
|
-
};
|
|
83
|
-
i.bottom > 64 ? o("bottom") : i.top > 64 ? o("top") : i.right > 128 ? o("right") : o("left");
|
|
84
|
-
}, [t, e]), { position: r, ref: e };
|
|
85
|
-
}
|
|
86
|
-
const P = h(
|
|
87
|
-
"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
|
-
{
|
|
89
|
-
variants: {
|
|
90
|
-
position: {
|
|
91
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
92
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
93
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
94
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-2",
|
|
95
|
-
auto: "top-full left-1/2 -translate-x-1/2 mt-2"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
defaultVariants: {
|
|
99
|
-
position: "auto"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
), L = ({
|
|
103
|
-
children: t,
|
|
104
|
-
content: e,
|
|
105
|
-
position: r = "auto",
|
|
106
|
-
popoverClassName: o,
|
|
107
|
-
delay: n,
|
|
108
|
-
...s
|
|
109
|
-
}) => {
|
|
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);
|
|
114
|
-
};
|
|
115
|
-
m(() => () => {
|
|
116
|
-
l.current && clearTimeout(l.current);
|
|
117
|
-
}, []);
|
|
118
|
-
const w = {
|
|
119
|
-
tabIndex: 0,
|
|
120
|
-
"aria-describedby": a,
|
|
121
|
-
onMouseEnter: p,
|
|
122
|
-
onFocus: p,
|
|
123
|
-
onMouseLeave: f,
|
|
124
|
-
onBlur: f,
|
|
125
|
-
...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(
|
|
130
|
-
"div",
|
|
131
|
-
{
|
|
132
|
-
id: a,
|
|
133
|
-
className: b(
|
|
134
|
-
P({ position: T }),
|
|
135
|
-
o,
|
|
136
|
-
!i && "opacity-0 pointer-events-none"
|
|
137
|
-
),
|
|
138
|
-
role: "tooltip",
|
|
139
|
-
"aria-hidden": !i,
|
|
140
|
-
children: /* @__PURE__ */ u.jsx(j, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: e })
|
|
141
|
-
}
|
|
142
|
-
)
|
|
143
|
-
] });
|
|
144
|
-
};
|
|
145
|
-
export {
|
|
146
|
-
F as M,
|
|
147
|
-
L as T
|
|
148
|
-
};
|
|
@@ -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>;
|