@worldcoin/mini-apps-ui-kit-react 1.0.0-canary.14 → 1.0.0-canary.16
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/components/AlertDialog/AlertDialog.js +58 -65
- package/dist/components/CircularIcon/CircularIcon.d.ts +2 -2
- package/dist/components/CircularIcon/CircularIcon.js +15 -9
- package/dist/components/CountryDrawer/CountryDrawer.d.ts +12 -1
- package/dist/components/CountryDrawer/CountryDrawer.js +43 -41
- package/dist/components/Drawer/Drawer.js +43 -42
- package/dist/components/Input/Input.d.ts +11 -41
- package/dist/components/Input/Input.js +172 -126
- package/dist/components/Input/index.js +2 -4
- package/dist/components/OTPField/OTPField.d.ts +3 -0
- package/dist/components/OTPField/OTPField.js +46 -28
- package/dist/components/OTPField/index.js +3 -2
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.js +24 -27
- package/dist/components/PasteButton/PasteButton.d.ts +0 -1
- package/dist/components/PasteButton/PasteButton.js +5 -6
- package/dist/components/PhoneField/PhoneField.d.ts +1 -6
- package/dist/components/PhoneField/PhoneField.js +46 -49
- package/dist/components/PhoneField/constants.d.ts +0 -1
- package/dist/components/PhoneField/constants.js +12 -18
- package/dist/components/SearchField/SearchField.d.ts +1 -1
- package/dist/components/SearchField/SearchField.js +42 -45
- package/dist/components/Select/Select.d.ts +6 -0
- package/dist/components/Select/Select.js +77 -44
- package/dist/components/Select/index.js +3 -2
- package/dist/components/Tabs/Tabs.js +16 -15
- package/dist/components/TextArea/TextArea.d.ts +6 -2
- package/dist/components/TextArea/TextArea.js +44 -25
- package/dist/components/TopBar/TopBar.d.ts +3 -1
- package/dist/components/TopBar/TopBar.js +30 -20
- package/dist/components/WalletAddressField/WalletAddressField.d.ts +1 -1
- package/dist/components/WalletAddressField/WalletAddressField.js +29 -31
- package/dist/index.js +21 -21
- package/dist/tailwind/index.d.ts +36 -0
- package/dist/tailwind/index.js +97 -12
- package/package.json +1 -1
- package/public/globals.css +1 -1
@@ -1,91 +1,84 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsx as
|
3
|
-
import { cn as
|
4
|
-
import * as
|
2
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
3
|
+
import { cn as i } from "../../lib/utils.js";
|
4
|
+
import * as s from "react";
|
5
5
|
import { Drawer as o } from "../../node_modules/.pnpm/vaul@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.18_react-dom@18.3._7iqkcrcg5qjc3n2ixm6rnrnx3e/node_modules/vaul/dist/index.js";
|
6
|
-
import { BottomBar as
|
7
|
-
import { Button as
|
8
|
-
import { XMark as
|
9
|
-
import { Typography as
|
10
|
-
import { AlertDialogContext as
|
11
|
-
const
|
6
|
+
import { BottomBar as f } from "../BottomBar/BottomBar.js";
|
7
|
+
import { Button as p } from "../Button/Button.js";
|
8
|
+
import { XMark as D } from "../Icons/XMark.js";
|
9
|
+
import { Typography as d } from "../Typography/Typography.js";
|
10
|
+
import { AlertDialogContext as h, useAlertDialog as A } from "./use-alert-dialog.js";
|
11
|
+
const u = ({ dismissible: l = !0, modal: r = !0, ...a }) => /* @__PURE__ */ e(h.Provider, { value: { dismissible: l }, children: /* @__PURE__ */ e(
|
12
12
|
o.Root,
|
13
13
|
{
|
14
14
|
shouldScaleBackground: !1,
|
15
|
-
dismissible:
|
16
|
-
modal:
|
17
|
-
...
|
15
|
+
dismissible: l,
|
16
|
+
modal: r,
|
17
|
+
...a
|
18
18
|
}
|
19
19
|
) });
|
20
|
-
|
21
|
-
const
|
22
|
-
|
23
|
-
const
|
24
|
-
|
25
|
-
const y =
|
26
|
-
/* @__PURE__ */
|
20
|
+
u.displayName = "AlertDialog";
|
21
|
+
const N = s.forwardRef((l, r) => /* @__PURE__ */ e(o.Trigger, { ref: r, ...l }));
|
22
|
+
N.displayName = "AlertDialogTrigger";
|
23
|
+
const x = o.Portal, g = s.forwardRef((l, r) => /* @__PURE__ */ e(o.Close, { ref: r, ...l }));
|
24
|
+
g.displayName = "AlertDialogClose";
|
25
|
+
const y = s.forwardRef(({ className: l, children: r, ...a }, t) => /* @__PURE__ */ n(x, { children: [
|
26
|
+
/* @__PURE__ */ e(
|
27
27
|
o.Overlay,
|
28
28
|
{
|
29
|
-
ref:
|
30
|
-
className:
|
31
|
-
...
|
29
|
+
ref: t,
|
30
|
+
className: i("fixed inset-0 z-50 bg-gray-900/40", l),
|
31
|
+
...a
|
32
32
|
}
|
33
33
|
),
|
34
|
-
/* @__PURE__ */
|
34
|
+
/* @__PURE__ */ e(
|
35
35
|
o.Content,
|
36
36
|
{
|
37
|
-
ref:
|
38
|
-
className:
|
39
|
-
...
|
40
|
-
children: /* @__PURE__ */
|
37
|
+
ref: t,
|
38
|
+
className: i("fixed inset-x-0 bottom-0 z-50 mt-24 h-auto", l),
|
39
|
+
...a,
|
40
|
+
children: /* @__PURE__ */ e("div", { className: "flex flex-col rounded-[1.75rem] bg-gray-0 m-3 p-8", children: r })
|
41
41
|
}
|
42
42
|
)
|
43
43
|
] }));
|
44
44
|
y.displayName = "AlertDialogContent";
|
45
|
-
const
|
46
|
-
const { dismissible:
|
47
|
-
return /* @__PURE__ */ n(
|
48
|
-
"div",
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
e,
|
58
|
-
l
|
59
|
-
] }),
|
60
|
-
a && /* @__PURE__ */ r("div", { className: "shrink-0", children: /* @__PURE__ */ r(d, { asChild: !0, children: /* @__PURE__ */ r(g, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ r(f, {}) }) }) })
|
61
|
-
]
|
62
|
-
}
|
63
|
-
);
|
45
|
+
const v = ({ icon: l, children: r, ...a }) => {
|
46
|
+
const { dismissible: t } = A(), c = t && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ e(p, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ e(D, {}) }) }) }), m = "flex justify-between w-full";
|
47
|
+
return l ? /* @__PURE__ */ n("div", { className: "mb-4 flex flex-col gap-6", children: [
|
48
|
+
/* @__PURE__ */ n("div", { className: i(m), ...a, children: [
|
49
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col", children: l }),
|
50
|
+
c
|
51
|
+
] }),
|
52
|
+
r
|
53
|
+
] }) : /* @__PURE__ */ n("div", { className: i(m, "gap-4 mb-4 items-center"), ...a, children: [
|
54
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-6", children: r }),
|
55
|
+
c
|
56
|
+
] });
|
64
57
|
};
|
65
|
-
|
66
|
-
const
|
67
|
-
|
68
|
-
const
|
69
|
-
|
70
|
-
const
|
58
|
+
v.displayName = "AlertDialogHeader";
|
59
|
+
const C = (l) => /* @__PURE__ */ e(f, { ...l });
|
60
|
+
C.displayName = "AlertDialogFooter";
|
61
|
+
const b = s.forwardRef(({ className: l, children: r, ...a }, t) => /* @__PURE__ */ e(o.Title, { ref: t, ...a, asChild: !0, children: /* @__PURE__ */ e(d, { variant: "heading", level: 2, children: r }) }));
|
62
|
+
b.displayName = "AlertDialogTitle";
|
63
|
+
const w = s.forwardRef(({ className: l, children: r, ...a }, t) => /* @__PURE__ */ e(
|
71
64
|
o.Description,
|
72
65
|
{
|
73
|
-
ref:
|
74
|
-
className:
|
75
|
-
...
|
66
|
+
ref: t,
|
67
|
+
className: i("text-gray-500 mb-8", l),
|
68
|
+
...a,
|
76
69
|
asChild: !0,
|
77
|
-
children: /* @__PURE__ */
|
70
|
+
children: /* @__PURE__ */ e(d, { children: r })
|
78
71
|
}
|
79
72
|
));
|
80
|
-
|
73
|
+
w.displayName = "AlertDialogDescription";
|
81
74
|
export {
|
82
|
-
|
83
|
-
|
75
|
+
u as AlertDialog,
|
76
|
+
g as AlertDialogClose,
|
84
77
|
y as AlertDialogContent,
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
78
|
+
w as AlertDialogDescription,
|
79
|
+
C as AlertDialogFooter,
|
80
|
+
v as AlertDialogHeader,
|
81
|
+
x as AlertDialogPortal,
|
82
|
+
b as AlertDialogTitle,
|
83
|
+
N as AlertDialogTrigger
|
91
84
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
export type CircularIconSize = "xs" | "sm" | "md" | "lg" | "xl";
|
3
|
-
export interface CircularIconProps {
|
3
|
+
export interface CircularIconProps extends React.HTMLAttributes<HTMLDivElement> {
|
4
4
|
children?: ReactNode;
|
5
5
|
className?: string;
|
6
6
|
size?: CircularIconSize;
|
7
7
|
}
|
8
|
-
export declare function CircularIcon({ children, className, size }: CircularIconProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export declare function CircularIcon({ children, className, size, ...props }: CircularIconProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,32 +1,38 @@
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
2
|
-
import { Slot as
|
3
|
-
import { cn as
|
4
|
-
const
|
2
|
+
import { Slot as l } from "../../node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js";
|
3
|
+
import { cn as o } from "../../lib/utils.js";
|
4
|
+
const t = {
|
5
5
|
xs: "size-6",
|
6
6
|
sm: "size-11",
|
7
7
|
md: "size-12",
|
8
8
|
lg: "size-16",
|
9
9
|
xl: "size-[5.5rem]"
|
10
|
-
},
|
10
|
+
}, c = {
|
11
11
|
xs: "size-[0.875rem]",
|
12
12
|
sm: "size-[1.5rem]",
|
13
13
|
md: "size-[1.625rem]",
|
14
14
|
lg: "size-[2.125rem]",
|
15
15
|
xl: "size-12"
|
16
16
|
};
|
17
|
-
function
|
17
|
+
function d({
|
18
|
+
children: i,
|
19
|
+
className: r,
|
20
|
+
size: e = "md",
|
21
|
+
...m
|
22
|
+
}) {
|
18
23
|
return /* @__PURE__ */ s(
|
19
24
|
"div",
|
20
25
|
{
|
21
|
-
className:
|
26
|
+
className: o(
|
22
27
|
"rounded-full flex items-center justify-center",
|
23
|
-
|
28
|
+
t[e],
|
24
29
|
r
|
25
30
|
),
|
26
|
-
|
31
|
+
...m,
|
32
|
+
children: /* @__PURE__ */ s(l, { className: c[e], children: i })
|
27
33
|
}
|
28
34
|
);
|
29
35
|
}
|
30
36
|
export {
|
31
|
-
|
37
|
+
d as CircularIcon
|
32
38
|
};
|
@@ -1,12 +1,23 @@
|
|
1
1
|
import { CountryCode } from '../Flag';
|
2
2
|
interface CountryDrawerProps {
|
3
|
+
/** Currently selected country code */
|
3
4
|
value: CountryCode;
|
5
|
+
/** Optional list of country codes to show. If not provided, shows all countries */
|
4
6
|
countries?: CountryCode[];
|
7
|
+
/** Whether the drawer trigger is disabled */
|
5
8
|
disabled?: boolean;
|
9
|
+
/** Default country code when no value is selected */
|
6
10
|
defaultValue?: CountryCode;
|
11
|
+
/** Content to render as the drawer trigger */
|
7
12
|
children: React.ReactNode;
|
13
|
+
/** Title text shown in the drawer header */
|
14
|
+
title?: string;
|
15
|
+
/** Label text shown in the search field */
|
16
|
+
searchLabel?: string;
|
17
|
+
/** Callback fired when a country is selected */
|
8
18
|
onChange: (countryCode: string) => void;
|
19
|
+
/** Optional callback fired when drawer open/close animation completes */
|
9
20
|
onAnimationEnd?: (open: boolean) => void;
|
10
21
|
}
|
11
|
-
export declare function CountryDrawer({ onChange, value, countries, onAnimationEnd, disabled, children, defaultValue, }: CountryDrawerProps): import("react/jsx-runtime").JSX.Element;
|
22
|
+
export declare function CountryDrawer({ onChange, value, countries, onAnimationEnd, disabled, children, defaultValue, title, searchLabel, }: CountryDrawerProps): import("react/jsx-runtime").JSX.Element;
|
12
23
|
export {};
|
@@ -1,64 +1,66 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsxs as
|
3
|
-
import { useState as i, useRef as
|
4
|
-
import { Button as
|
5
|
-
import { Drawer as
|
6
|
-
import { XMark as
|
7
|
-
import { GroupedCountryList as
|
8
|
-
import { SearchField as
|
9
|
-
import { TopBar as
|
2
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
3
|
+
import { useState as i, useRef as v } from "react";
|
4
|
+
import { Button as x } from "../Button/Button.js";
|
5
|
+
import { Drawer as D, DrawerTrigger as T, DrawerContent as N, DrawerClose as b } from "../Drawer/Drawer.js";
|
6
|
+
import { XMark as j } from "../Icons/XMark.js";
|
7
|
+
import { GroupedCountryList as k } from "../PhoneField/GroupedCountryList.js";
|
8
|
+
import { SearchField as B } from "../SearchField/SearchField.js";
|
9
|
+
import { TopBar as F } from "../TopBar/TopBar.js";
|
10
10
|
import { useCountryFiltering as G } from "./useCountryFiltering.js";
|
11
11
|
import { useCountryGrouping as O } from "./useCountryGrouping.js";
|
12
|
-
function
|
13
|
-
onChange:
|
14
|
-
value:
|
15
|
-
countries:
|
16
|
-
onAnimationEnd:
|
17
|
-
disabled:
|
12
|
+
function J({
|
13
|
+
onChange: l,
|
14
|
+
value: s,
|
15
|
+
countries: u,
|
16
|
+
onAnimationEnd: c,
|
17
|
+
disabled: m = !1,
|
18
18
|
children: h,
|
19
|
-
defaultValue:
|
19
|
+
defaultValue: f = "US",
|
20
|
+
title: p = "Country",
|
21
|
+
searchLabel: d
|
20
22
|
}) {
|
21
|
-
const [
|
22
|
-
|
23
|
-
},
|
24
|
-
countries:
|
25
|
-
searchText:
|
26
|
-
}),
|
27
|
-
countries:
|
28
|
-
defaultValue:
|
23
|
+
const [o, t] = i(""), [C, n] = i(!1), g = v(null), w = (r) => {
|
24
|
+
t(r.target.value);
|
25
|
+
}, y = G({
|
26
|
+
countries: u,
|
27
|
+
searchText: o
|
28
|
+
}), S = O({
|
29
|
+
countries: y,
|
30
|
+
defaultValue: f
|
29
31
|
});
|
30
|
-
return /* @__PURE__ */
|
31
|
-
/* @__PURE__ */ e(
|
32
|
-
/* @__PURE__ */
|
32
|
+
return /* @__PURE__ */ a(D, { open: C, onOpenChange: n, onAnimationEnd: c, height: "full", children: [
|
33
|
+
/* @__PURE__ */ e(T, { asChild: !0, className: "outline-none", disabled: m, children: h }),
|
34
|
+
/* @__PURE__ */ a(N, { children: [
|
33
35
|
/* @__PURE__ */ e(
|
34
|
-
|
36
|
+
F,
|
35
37
|
{
|
36
|
-
title:
|
37
|
-
startAdornment: /* @__PURE__ */ e(
|
38
|
+
title: p,
|
39
|
+
startAdornment: /* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(x, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ e(j, {}) }) })
|
38
40
|
}
|
39
41
|
),
|
40
|
-
/* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ e(
|
41
|
-
|
42
|
+
/* @__PURE__ */ e("div", { className: "p-6 shrink-0", children: /* @__PURE__ */ e(
|
43
|
+
B,
|
42
44
|
{
|
43
|
-
ref:
|
44
|
-
value:
|
45
|
-
onChange:
|
46
|
-
|
45
|
+
ref: g,
|
46
|
+
value: o,
|
47
|
+
onChange: w,
|
48
|
+
label: d
|
47
49
|
}
|
48
50
|
) }),
|
49
|
-
/* @__PURE__ */ e("div", { className: "no-scrollbar w-full overflow-auto px-6
|
50
|
-
|
51
|
+
/* @__PURE__ */ e("div", { className: "no-scrollbar w-full overflow-auto px-6 grow", children: /* @__PURE__ */ e(
|
52
|
+
k,
|
51
53
|
{
|
52
|
-
groupedCountries:
|
54
|
+
groupedCountries: S,
|
53
55
|
onSelect: (r) => {
|
54
|
-
|
56
|
+
l(r), t(""), n(!1);
|
55
57
|
},
|
56
|
-
value:
|
58
|
+
value: s
|
57
59
|
}
|
58
60
|
) })
|
59
61
|
] })
|
60
62
|
] });
|
61
63
|
}
|
62
64
|
export {
|
63
|
-
|
65
|
+
J as CountryDrawer
|
64
66
|
};
|
@@ -1,45 +1,46 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsx as
|
3
|
-
import { cn as
|
4
|
-
import * as
|
2
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
3
|
+
import { cn as m } from "../../lib/utils.js";
|
4
|
+
import * as l from "react";
|
5
5
|
import { Drawer as i } from "../../node_modules/.pnpm/vaul@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.18_react-dom@18.3._7iqkcrcg5qjc3n2ixm6rnrnx3e/node_modules/vaul/dist/index.js";
|
6
6
|
import "../BottomBar/BottomBar.js";
|
7
|
-
import { Button as
|
8
|
-
import { XMark as
|
7
|
+
import { Button as f } from "../Button/Button.js";
|
8
|
+
import { XMark as h } from "../Icons/XMark.js";
|
9
9
|
import { Typography as n } from "../Typography/Typography.js";
|
10
|
-
import { useDrawer as d, DrawerContext as
|
11
|
-
const
|
10
|
+
import { useDrawer as d, DrawerContext as p } from "./use-drawer.js";
|
11
|
+
const u = ({
|
12
12
|
dismissible: a = !0,
|
13
|
-
height:
|
14
|
-
modal:
|
15
|
-
...
|
16
|
-
}) => /* @__PURE__ */
|
13
|
+
height: e = "full",
|
14
|
+
modal: t = !0,
|
15
|
+
...o
|
16
|
+
}) => /* @__PURE__ */ r(p.Provider, { value: { dismissible: a, height: e }, children: /* @__PURE__ */ r(
|
17
17
|
i.Root,
|
18
18
|
{
|
19
19
|
shouldScaleBackground: !1,
|
20
20
|
dismissible: a,
|
21
|
-
modal:
|
21
|
+
modal: t,
|
22
22
|
direction: "bottom",
|
23
|
-
|
23
|
+
handleOnly: !0,
|
24
|
+
...o
|
24
25
|
}
|
25
26
|
) });
|
26
|
-
|
27
|
-
const
|
28
|
-
|
29
|
-
const
|
30
|
-
|
31
|
-
const N =
|
32
|
-
const { height:
|
33
|
-
return /* @__PURE__ */
|
34
|
-
/* @__PURE__ */
|
35
|
-
/* @__PURE__ */
|
27
|
+
u.displayName = "Drawer";
|
28
|
+
const w = l.forwardRef((a, e) => /* @__PURE__ */ r(i.Trigger, { ref: e, ...a }));
|
29
|
+
w.displayName = i.Trigger.displayName;
|
30
|
+
const y = l.forwardRef((a, e) => /* @__PURE__ */ r(i.Close, { ref: e, ...a })), c = l.forwardRef((a, e) => /* @__PURE__ */ r(i.Overlay, { ref: e, className: "fixed inset-0 z-50 bg-gray-900/40", ...a }));
|
31
|
+
c.displayName = i.Overlay.displayName;
|
32
|
+
const N = l.forwardRef((a, e) => {
|
33
|
+
const { height: t } = d();
|
34
|
+
return /* @__PURE__ */ s(i.Portal, { children: [
|
35
|
+
/* @__PURE__ */ r(c, {}),
|
36
|
+
/* @__PURE__ */ r(
|
36
37
|
i.Content,
|
37
38
|
{
|
38
|
-
ref:
|
39
|
+
ref: e,
|
39
40
|
...a,
|
40
|
-
className:
|
41
|
-
"fixed inset-x-0 bottom-0 z-50
|
42
|
-
|
41
|
+
className: m(
|
42
|
+
"fixed inset-x-0 bottom-0 z-50 bg-gray-0 outline-none flex flex-col",
|
43
|
+
t === "full" ? "top-0 rounded-none" : "h-auto rounded-t-[1.75rem]",
|
43
44
|
a.className
|
44
45
|
)
|
45
46
|
}
|
@@ -47,24 +48,24 @@ const N = t.forwardRef((a, r) => {
|
|
47
48
|
] });
|
48
49
|
});
|
49
50
|
N.displayName = "DrawerContent";
|
50
|
-
const
|
51
|
-
const { dismissible:
|
52
|
-
return /* @__PURE__ */
|
53
|
-
|
54
|
-
/* @__PURE__ */
|
55
|
-
|
51
|
+
const D = ({ icon: a, children: e, ...t }) => {
|
52
|
+
const { dismissible: o } = d();
|
53
|
+
return /* @__PURE__ */ s("div", { className: "flex justify-between items-center gap-4 mb-2 w-full", ...t, children: [
|
54
|
+
o && /* @__PURE__ */ r("div", { className: "shrink-0", children: /* @__PURE__ */ r(y, { asChild: !0, children: /* @__PURE__ */ r(f, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ r(h, {}) }) }) }),
|
55
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-6", children: e }),
|
56
|
+
o && /* @__PURE__ */ r("div", { className: "shrink-0 size-10" })
|
56
57
|
] });
|
57
58
|
};
|
58
|
-
|
59
|
-
const
|
60
|
-
|
61
|
-
const v =
|
59
|
+
D.displayName = "DrawerHeader";
|
60
|
+
const g = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(i.Title, { ref: t, ...e, asChild: !0, children: /* @__PURE__ */ r(n, { variant: "subtitle", level: 1, children: e.children }) }));
|
61
|
+
g.displayName = i.Title.displayName;
|
62
|
+
const v = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(i.Description, { ref: t, className: "text-gray-500", ...e, asChild: !0, children: /* @__PURE__ */ r(n, { variant: "body", level: 2, children: e.children }) }));
|
62
63
|
v.displayName = i.Description.displayName;
|
63
64
|
export {
|
64
|
-
|
65
|
-
|
65
|
+
u as Drawer,
|
66
|
+
y as DrawerClose,
|
66
67
|
N as DrawerContent,
|
67
|
-
|
68
|
-
|
69
|
-
|
68
|
+
D as DrawerHeader,
|
69
|
+
g as DrawerTitle,
|
70
|
+
w as DrawerTrigger
|
70
71
|
};
|
@@ -1,16 +1,5 @@
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
2
1
|
import * as React from "react";
|
3
|
-
export
|
4
|
-
error?: boolean | null | undefined;
|
5
|
-
isLabel?: boolean | null | undefined;
|
6
|
-
isFocused?: boolean | null | undefined;
|
7
|
-
variant?: "default" | "floating-label" | null | undefined;
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
9
|
-
export declare const iconVariants: (props?: ({
|
10
|
-
disabled?: boolean | null | undefined;
|
11
|
-
position?: "end" | "start" | null | undefined;
|
12
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
13
|
-
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "placeholder">, VariantProps<typeof inputVariants> {
|
2
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "placeholder" | "size"> {
|
14
3
|
/**
|
15
4
|
* If true, the input will display in an error state with error styling
|
16
5
|
*/
|
@@ -21,41 +10,18 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
21
10
|
isValid?: boolean;
|
22
11
|
/**
|
23
12
|
* Element to be rendered at the start (left side) of the input.
|
24
|
-
* The component passed to this prop must accept a `style` prop.
|
25
|
-
* The component should use currentColor to match the Input's styling.
|
26
|
-
* To change styles based on input focus, use Tailwind's `group-*` modifiers
|
27
|
-
* since the input is wrapped in a group class.
|
28
13
|
*/
|
29
14
|
startAdornment?: React.ReactNode;
|
30
15
|
/**
|
31
16
|
* Element to be rendered at the end (right side) of the input.
|
32
|
-
* The component passed to this prop must accept a `style` prop.
|
33
|
-
* The component should use currentColor to match the Input's styling.
|
34
|
-
* To change styles based on input focus, use Tailwind's `group-*` modifiers
|
35
|
-
* since the input is wrapped in a group class.
|
36
17
|
*/
|
37
18
|
endAdornment?: React.ReactNode;
|
38
19
|
/**
|
39
|
-
*
|
40
|
-
* @default 1.25
|
41
|
-
*/
|
42
|
-
startAdornmentWidth?: number;
|
43
|
-
/**
|
44
|
-
* Width of the end adornment in rem
|
45
|
-
* @default 1.25
|
46
|
-
*/
|
47
|
-
endAdornmentWidth?: number;
|
48
|
-
/**
|
49
|
-
* If true, the input will display in a focused state with focus styling
|
50
|
-
* @default false
|
51
|
-
*/
|
52
|
-
isFocused?: boolean;
|
53
|
-
/**
|
54
|
-
* Additional class name for the input
|
20
|
+
* Additional class name for the input container
|
55
21
|
*/
|
56
22
|
className?: string;
|
57
23
|
/**
|
58
|
-
* Label text to be displayed above the input
|
24
|
+
* Label text to be displayed above the input or as floating label
|
59
25
|
*/
|
60
26
|
label?: string;
|
61
27
|
/**
|
@@ -64,15 +30,19 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
64
30
|
*/
|
65
31
|
variant?: "default" | "floating-label";
|
66
32
|
/**
|
67
|
-
* If true, the
|
68
|
-
* @default
|
33
|
+
* If true, the start divider will be shown when startAdornment is present.
|
34
|
+
* @default false // Default dividers to false
|
69
35
|
*/
|
70
36
|
showStartDivider?: boolean;
|
71
37
|
/**
|
72
|
-
* If true, the end divider will be shown
|
73
|
-
* @default
|
38
|
+
* If true, the end divider will be shown when endAdornment or isValid is present.
|
39
|
+
* @default false // Default dividers to false
|
74
40
|
*/
|
75
41
|
showEndDivider?: boolean;
|
42
|
+
/**
|
43
|
+
* Id for the input element, used for label association. Auto-generated if not provided.
|
44
|
+
*/
|
45
|
+
id?: string;
|
76
46
|
}
|
77
47
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
78
48
|
export default Input;
|