@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.
Files changed (37) hide show
  1. package/dist/components/AlertDialog/AlertDialog.js +58 -65
  2. package/dist/components/CircularIcon/CircularIcon.d.ts +2 -2
  3. package/dist/components/CircularIcon/CircularIcon.js +15 -9
  4. package/dist/components/CountryDrawer/CountryDrawer.d.ts +12 -1
  5. package/dist/components/CountryDrawer/CountryDrawer.js +43 -41
  6. package/dist/components/Drawer/Drawer.js +43 -42
  7. package/dist/components/Input/Input.d.ts +11 -41
  8. package/dist/components/Input/Input.js +172 -126
  9. package/dist/components/Input/index.js +2 -4
  10. package/dist/components/OTPField/OTPField.d.ts +3 -0
  11. package/dist/components/OTPField/OTPField.js +46 -28
  12. package/dist/components/OTPField/index.js +3 -2
  13. package/dist/components/PasswordField/PasswordField.d.ts +1 -1
  14. package/dist/components/PasswordField/PasswordField.js +24 -27
  15. package/dist/components/PasteButton/PasteButton.d.ts +0 -1
  16. package/dist/components/PasteButton/PasteButton.js +5 -6
  17. package/dist/components/PhoneField/PhoneField.d.ts +1 -6
  18. package/dist/components/PhoneField/PhoneField.js +46 -49
  19. package/dist/components/PhoneField/constants.d.ts +0 -1
  20. package/dist/components/PhoneField/constants.js +12 -18
  21. package/dist/components/SearchField/SearchField.d.ts +1 -1
  22. package/dist/components/SearchField/SearchField.js +42 -45
  23. package/dist/components/Select/Select.d.ts +6 -0
  24. package/dist/components/Select/Select.js +77 -44
  25. package/dist/components/Select/index.js +3 -2
  26. package/dist/components/Tabs/Tabs.js +16 -15
  27. package/dist/components/TextArea/TextArea.d.ts +6 -2
  28. package/dist/components/TextArea/TextArea.js +44 -25
  29. package/dist/components/TopBar/TopBar.d.ts +3 -1
  30. package/dist/components/TopBar/TopBar.js +30 -20
  31. package/dist/components/WalletAddressField/WalletAddressField.d.ts +1 -1
  32. package/dist/components/WalletAddressField/WalletAddressField.js +29 -31
  33. package/dist/index.js +21 -21
  34. package/dist/tailwind/index.d.ts +36 -0
  35. package/dist/tailwind/index.js +97 -12
  36. package/package.json +1 -1
  37. package/public/globals.css +1 -1
@@ -1,91 +1,84 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
3
- import { cn as s } from "../../lib/utils.js";
4
- import * as i from "react";
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 c } from "../BottomBar/BottomBar.js";
7
- import { Button as g } from "../Button/Button.js";
8
- import { XMark as f } from "../Icons/XMark.js";
9
- import { Typography as m } from "../Typography/Typography.js";
10
- import { AlertDialogContext as p, useAlertDialog as D } from "./use-alert-dialog.js";
11
- const A = ({ dismissible: e = !0, modal: l = !0, ...t }) => /* @__PURE__ */ r(p.Provider, { value: { dismissible: e }, children: /* @__PURE__ */ r(
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: e,
16
- modal: l,
17
- ...t
15
+ dismissible: l,
16
+ modal: r,
17
+ ...a
18
18
  }
19
19
  ) });
20
- A.displayName = "AlertDialog";
21
- const h = i.forwardRef((e, l) => /* @__PURE__ */ r(o.Trigger, { ref: l, ...e }));
22
- h.displayName = "AlertDialogTrigger";
23
- const u = o.Portal, d = i.forwardRef((e, l) => /* @__PURE__ */ r(o.Close, { ref: l, ...e }));
24
- d.displayName = "AlertDialogClose";
25
- const y = i.forwardRef(({ className: e, children: l, ...t }, a) => /* @__PURE__ */ n(u, { children: [
26
- /* @__PURE__ */ r(
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: a,
30
- className: s("fixed inset-0 z-50 bg-gray-900/40", e),
31
- ...t
29
+ ref: t,
30
+ className: i("fixed inset-0 z-50 bg-gray-900/40", l),
31
+ ...a
32
32
  }
33
33
  ),
34
- /* @__PURE__ */ r(
34
+ /* @__PURE__ */ e(
35
35
  o.Content,
36
36
  {
37
- ref: a,
38
- className: s("fixed inset-x-0 bottom-0 z-50 mt-24 h-auto", e),
39
- ...t,
40
- children: /* @__PURE__ */ r("div", { className: "flex flex-col rounded-[1.75rem] bg-gray-0 m-3 p-8", children: l })
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 N = ({ icon: e, children: l, ...t }) => {
46
- const { dismissible: a } = D();
47
- return /* @__PURE__ */ n(
48
- "div",
49
- {
50
- className: s(
51
- "flex justify-between gap-4 mb-4 w-full",
52
- e ? "items-start" : "items-center"
53
- ),
54
- ...t,
55
- children: [
56
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-6", children: [
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
- N.displayName = "AlertDialogHeader";
66
- const x = (e) => /* @__PURE__ */ r(c, { ...e });
67
- x.displayName = "AlertDialogFooter";
68
- const v = i.forwardRef(({ className: e, children: l, ...t }, a) => /* @__PURE__ */ r(o.Title, { ref: a, ...t, asChild: !0, children: /* @__PURE__ */ r(m, { variant: "heading", level: 2, children: l }) }));
69
- v.displayName = "AlertDialogTitle";
70
- const C = i.forwardRef(({ className: e, children: l, ...t }, a) => /* @__PURE__ */ r(
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: a,
74
- className: s("text-gray-500 mb-8", e),
75
- ...t,
66
+ ref: t,
67
+ className: i("text-gray-500 mb-8", l),
68
+ ...a,
76
69
  asChild: !0,
77
- children: /* @__PURE__ */ r(m, { children: l })
70
+ children: /* @__PURE__ */ e(d, { children: r })
78
71
  }
79
72
  ));
80
- C.displayName = "AlertDialogDescription";
73
+ w.displayName = "AlertDialogDescription";
81
74
  export {
82
- A as AlertDialog,
83
- d as AlertDialogClose,
75
+ u as AlertDialog,
76
+ g as AlertDialogClose,
84
77
  y as AlertDialogContent,
85
- C as AlertDialogDescription,
86
- x as AlertDialogFooter,
87
- N as AlertDialogHeader,
88
- u as AlertDialogPortal,
89
- v as AlertDialogTitle,
90
- h as AlertDialogTrigger
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 m } 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 l } from "../../lib/utils.js";
4
- const o = {
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
- }, t = {
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 a({ children: i, className: r, size: e = "md" }) {
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: l(
26
+ className: o(
22
27
  "rounded-full flex items-center justify-center",
23
- o[e],
28
+ t[e],
24
29
  r
25
30
  ),
26
- children: /* @__PURE__ */ s(m, { className: t[e], children: i })
31
+ ...m,
32
+ children: /* @__PURE__ */ s(l, { className: c[e], children: i })
27
33
  }
28
34
  );
29
35
  }
30
36
  export {
31
- a as CircularIcon
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 l, jsx as e } from "react/jsx-runtime";
3
- import { useState as i, useRef as S } from "react";
4
- import { Button as w } from "../Button/Button.js";
5
- import { Drawer as v, DrawerTrigger as x, DrawerContent as D, DrawerClose as T } from "../Drawer/Drawer.js";
6
- import { XMark as F } from "../Icons/XMark.js";
7
- import { GroupedCountryList as N } from "../PhoneField/GroupedCountryList.js";
8
- import { SearchField as j } from "../SearchField/SearchField.js";
9
- import { TopBar as B } from "../TopBar/TopBar.js";
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 H({
13
- onChange: s,
14
- value: u,
15
- countries: c,
16
- onAnimationEnd: m,
17
- disabled: f = !1,
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: p = "US"
19
+ defaultValue: f = "US",
20
+ title: p = "Country",
21
+ searchLabel: d
20
22
  }) {
21
- const [t, o] = i(""), [n, a] = i(!1), d = S(null), C = (r) => {
22
- o(r.target.value);
23
- }, g = G({
24
- countries: c,
25
- searchText: t
26
- }), y = O({
27
- countries: g,
28
- defaultValue: p
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__ */ l(v, { open: n, onOpenChange: a, onAnimationEnd: m, height: "full", children: [
31
- /* @__PURE__ */ e(x, { asChild: !0, className: "outline-none", disabled: f, children: h }),
32
- /* @__PURE__ */ l(D, { children: [
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
- B,
36
+ F,
35
37
  {
36
- title: "Country",
37
- startAdornment: /* @__PURE__ */ e(T, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ e(F, {}) }) })
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
- j,
42
+ /* @__PURE__ */ e("div", { className: "p-6 shrink-0", children: /* @__PURE__ */ e(
43
+ B,
42
44
  {
43
- ref: d,
44
- value: t,
45
- onChange: C,
46
- autoFocus: n
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 h-full", children: /* @__PURE__ */ e(
50
- N,
51
+ /* @__PURE__ */ e("div", { className: "no-scrollbar w-full overflow-auto px-6 grow", children: /* @__PURE__ */ e(
52
+ k,
51
53
  {
52
- groupedCountries: y,
54
+ groupedCountries: S,
53
55
  onSelect: (r) => {
54
- s(r), o(""), a(!1);
56
+ l(r), t(""), n(!1);
55
57
  },
56
- value: u
58
+ value: s
57
59
  }
58
60
  ) })
59
61
  ] })
60
62
  ] });
61
63
  }
62
64
  export {
63
- H as CountryDrawer
65
+ J as CountryDrawer
64
66
  };
@@ -1,45 +1,46 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
3
- import { cn as c } from "../../lib/utils.js";
4
- import * as t from "react";
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 m } from "../Button/Button.js";
8
- import { XMark as f } from "../Icons/XMark.js";
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 h } from "./use-drawer.js";
11
- const y = ({
10
+ import { useDrawer as d, DrawerContext as p } from "./use-drawer.js";
11
+ const u = ({
12
12
  dismissible: a = !0,
13
- height: r = "full",
14
- modal: l = !0,
15
- ...s
16
- }) => /* @__PURE__ */ e(h.Provider, { value: { dismissible: a, height: r }, children: /* @__PURE__ */ e(
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: l,
21
+ modal: t,
22
22
  direction: "bottom",
23
- ...s
23
+ handleOnly: !0,
24
+ ...o
24
25
  }
25
26
  ) });
26
- y.displayName = "Drawer";
27
- const u = t.forwardRef((a, r) => /* @__PURE__ */ e(i.Trigger, { ref: r, ...a }));
28
- u.displayName = i.Trigger.displayName;
29
- const w = t.forwardRef((a, r) => /* @__PURE__ */ e(i.Close, { ref: r, ...a })), p = t.forwardRef((a, r) => /* @__PURE__ */ e(i.Overlay, { ref: r, className: "fixed inset-0 z-50 bg-gray-900/40", ...a }));
30
- p.displayName = i.Overlay.displayName;
31
- const N = t.forwardRef((a, r) => {
32
- const { height: l } = d();
33
- return /* @__PURE__ */ o(i.Portal, { children: [
34
- /* @__PURE__ */ e(i.Overlay, { className: "fixed inset-0 z-50", children: /* @__PURE__ */ e("div", { className: "w-full h-full bg-gray-900 opacity-40" }) }),
35
- /* @__PURE__ */ e(
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: r,
39
+ ref: e,
39
40
  ...a,
40
- className: c(
41
- "fixed inset-x-0 bottom-0 z-50 mt-24 bg-gray-0 outline-none",
42
- l === "full" ? "h-screen rounded-none" : "h-auto rounded-t-[1.75rem]",
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 g = ({ icon: a, children: r, ...l }) => {
51
- const { dismissible: s } = d();
52
- return /* @__PURE__ */ o("div", { className: "flex justify-between items-center gap-4 mb-2 w-full", ...l, children: [
53
- s && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(m, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ e(f, {}) }) }) }),
54
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-6", children: r }),
55
- s && /* @__PURE__ */ e("div", { className: "shrink-0 size-10" })
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
- g.displayName = "DrawerHeader";
59
- const D = t.forwardRef(({ className: a, ...r }, l) => /* @__PURE__ */ e(i.Title, { ref: l, ...r, asChild: !0, children: /* @__PURE__ */ e(n, { variant: "subtitle", level: 1, children: r.children }) }));
60
- D.displayName = i.Title.displayName;
61
- const v = t.forwardRef(({ className: a, ...r }, l) => /* @__PURE__ */ e(i.Description, { ref: l, className: "text-gray-500", ...r, asChild: !0, children: /* @__PURE__ */ e(n, { variant: "body", level: 2, children: r.children }) }));
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
- y as Drawer,
65
- w as DrawerClose,
65
+ u as Drawer,
66
+ y as DrawerClose,
66
67
  N as DrawerContent,
67
- g as DrawerHeader,
68
- D as DrawerTitle,
69
- u as DrawerTrigger
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 declare const inputVariants: (props?: ({
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
- * Width of the start adornment in rem
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 dividers will be shown
68
- * @default true
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 true
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;