@worldcoin/mini-apps-ui-kit-react 0.0.8 → 1.0.0-canary.0
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/README.md +8 -17
- package/dist/components/AlertDialog/AlertDialog.js +94 -0
- package/dist/components/AlertDialog/index.d.ts +1 -0
- package/dist/components/AlertDialog/index.js +13 -0
- package/dist/components/AlertDialog/types.d.ts +172 -0
- package/dist/components/AlertDialog/types.js +1 -0
- package/dist/components/AlertDialog/use-alert-dialog.d.ts +6 -0
- package/dist/components/AlertDialog/use-alert-dialog.js +11 -0
- package/dist/components/BottomBar/BottomBar.d.ts +13 -0
- package/dist/components/BottomBar/BottomBar.js +21 -0
- package/dist/components/BottomBar/index.d.ts +1 -0
- package/dist/components/BottomBar/index.js +4 -0
- package/dist/components/BulletList/BulletList.d.ts +10 -0
- package/dist/components/BulletList/BulletList.js +11 -0
- package/dist/components/BulletList/index.d.ts +1 -0
- package/dist/components/BulletList/index.js +4 -0
- package/dist/components/BulletListItem/BulletListItem.d.ts +7 -0
- package/dist/components/BulletListItem/BulletListItem.js +23 -0
- package/dist/components/BulletListItem/index.d.ts +1 -0
- package/dist/components/BulletListItem/index.js +4 -0
- package/dist/components/BulletPoint/BulletPoint.d.ts +6 -0
- package/dist/components/BulletPoint/BulletPoint.js +22 -0
- package/dist/components/BulletPoint/index.d.ts +1 -0
- package/dist/components/BulletPoint/index.js +1 -0
- package/dist/components/Button/Button.d.ts +10 -22
- package/dist/components/Button/Button.js +40 -72
- package/dist/components/Checkbox/Checkbox.d.ts +24 -4
- package/dist/components/Checkbox/Checkbox.js +5 -5
- package/dist/components/Chip/Chip.d.ts +2 -1
- package/dist/components/Chip/Chip.js +14 -8
- package/dist/components/ClearButton/Clear.js +14 -14
- package/dist/components/ClearButton/ClearButton.js +11 -11
- package/dist/components/ColorPicker/ColorPicker.js +14 -14
- package/dist/components/CountryDrawer/CountryDrawer.d.ts +12 -0
- package/dist/components/CountryDrawer/CountryDrawer.js +63 -0
- package/dist/components/CountryDrawer/index.d.ts +1 -0
- package/dist/components/CountryDrawer/index.js +4 -0
- package/dist/components/CountryDrawer/useCountryFiltering.d.ts +7 -0
- package/dist/components/CountryDrawer/useCountryFiltering.js +9 -0
- package/dist/components/CountryDrawer/useCountryGrouping.d.ts +13 -0
- package/dist/components/CountryDrawer/useCountryGrouping.js +17 -0
- package/dist/components/Drawer/Drawer.d.ts +28 -6
- package/dist/components/Drawer/Drawer.js +67 -28
- package/dist/components/Drawer/index.js +6 -4
- package/dist/components/Drawer/types.d.ts +167 -0
- package/dist/components/Drawer/types.js +1 -0
- package/dist/components/Drawer/use-drawer.d.ts +8 -0
- package/dist/components/Drawer/use-drawer.js +11 -0
- package/dist/components/Flag/LazyFlag.js +1 -1
- package/dist/components/Flag/flag-components/eu.d.ts +3 -0
- package/dist/components/Flag/flag-components/eu.js +83 -0
- package/dist/components/Flag/flag-components/index.d.ts +1 -0
- package/dist/components/Flag/flag-components/index.js +56 -54
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Icons/ArrowDown.js +26 -0
- package/dist/components/Icons/Eye.d.ts +8 -0
- package/dist/components/Icons/Eye.js +40 -0
- package/dist/components/Icons/EyeClosed.d.ts +8 -0
- package/dist/components/Icons/EyeClosed.js +60 -0
- package/dist/components/Icons/Fail.d.ts +8 -0
- package/dist/components/Icons/Fail.js +82 -0
- package/dist/components/Icons/MagicWand.d.ts +8 -0
- package/dist/components/Icons/MagicWand.js +60 -0
- package/dist/components/Icons/Magnifier.d.ts +1 -1
- package/dist/components/Icons/Magnifier.js +20 -11
- package/dist/components/Icons/Success.d.ts +8 -0
- package/dist/components/Icons/Success.js +82 -0
- package/dist/components/Icons/Tick.js +6 -7
- package/dist/components/Icons/XMark.d.ts +8 -0
- package/dist/components/Icons/XMark.js +27 -0
- package/dist/components/Input/Input.d.ts +26 -2
- package/dist/components/Input/Input.js +116 -51
- package/dist/components/ListItem/ListItem.d.ts +17 -6
- package/dist/components/ListItem/ListItem.js +29 -22
- package/dist/components/Marble/Marble.d.ts +2 -0
- package/dist/components/Marble/Marble.js +23 -0
- package/dist/components/Marble/index.d.ts +1 -0
- package/dist/components/Marble/index.js +4 -0
- package/dist/components/NumberPad/Delete.d.ts +1 -8
- package/dist/components/NumberPad/Delete.js +9 -10
- package/dist/components/NumberPad/NumberPad.js +30 -24
- package/dist/components/OTPField/OTPField.js +8 -8
- package/dist/components/PasswordField/PasswordField.d.ts +13 -0
- package/dist/components/PasswordField/PasswordField.js +45 -0
- package/dist/components/PasswordField/index.d.ts +1 -0
- package/dist/components/PasswordField/index.js +4 -0
- package/dist/components/PasteButton/PasteButton.d.ts +1 -1
- package/dist/components/PasteButton/PasteButton.js +21 -17
- package/dist/components/PhoneField/CountryListItem.d.ts +3 -4
- package/dist/components/PhoneField/CountryListItem.js +21 -25
- package/dist/components/PhoneField/CountrySelectorButton.d.ts +3 -4
- package/dist/components/PhoneField/CountrySelectorButton.js +17 -17
- package/dist/components/PhoneField/GroupedCountryList.d.ts +14 -0
- package/dist/components/PhoneField/GroupedCountryList.js +30 -0
- package/dist/components/PhoneField/PhoneField.d.ts +3 -14
- package/dist/components/PhoneField/PhoneField.js +71 -197
- package/dist/components/PhoneField/constants.js +4 -4
- package/dist/components/Pill/Pill.js +7 -7
- package/dist/components/Progress/Progress.d.ts +14 -0
- package/dist/components/Progress/Progress.js +31 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Progress/index.js +4 -0
- package/dist/components/RadioGroup/RadioGroupItem.js +1 -1
- package/dist/components/SearchField/SearchField.d.ts +6 -1
- package/dist/components/SearchField/SearchField.js +39 -35
- package/dist/components/Select/Select.js +46 -76
- package/dist/components/{Button → Spinner}/Spinner.d.ts +2 -2
- package/dist/components/Spinner/Spinner.js +36 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.js +4 -0
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts +11 -0
- package/dist/components/Tabs/Tabs.js +58 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +5 -0
- package/dist/components/Tabs/types.d.ts +53 -0
- package/dist/components/Tabs/types.js +1 -0
- package/dist/components/TextArea/TextArea.d.ts +25 -0
- package/dist/components/TextArea/TextArea.js +54 -0
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.js +4 -0
- package/dist/components/Toast/Toast.d.ts +9 -0
- package/dist/components/Toast/Toast.js +51 -0
- package/dist/components/Toast/Toaster.d.ts +3 -0
- package/dist/components/Toast/Toaster.js +14 -0
- package/dist/components/Toast/index.d.ts +3 -0
- package/dist/components/Toast/index.js +12 -0
- package/dist/components/Toast/use-toast.d.ts +51 -0
- package/dist/components/Toast/use-toast.js +101 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +5 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +28 -0
- package/dist/components/ToggleGroup/index.d.ts +1 -0
- package/dist/components/ToggleGroup/index.js +5 -0
- package/dist/components/ToggleGroup/types.d.ts +101 -0
- package/dist/components/ToggleGroup/types.js +1 -0
- package/dist/components/Token/Token.d.ts +4 -0
- package/dist/components/Token/Token.js +12 -7
- package/dist/components/Token/icons/btc.d.ts +2 -2
- package/dist/components/Token/icons/btc.js +13 -58
- package/dist/components/Token/icons/dai.d.ts +3 -0
- package/dist/components/Token/icons/dai.js +27 -0
- package/dist/components/Token/icons/eth.d.ts +2 -2
- package/dist/components/Token/icons/eth.js +11 -58
- package/dist/components/Token/icons/index.d.ts +2 -0
- package/dist/components/Token/icons/index.js +8 -4
- package/dist/components/Token/icons/types.d.ts +7 -0
- package/dist/components/Token/icons/types.js +1 -0
- package/dist/components/Token/icons/usdc.d.ts +2 -2
- package/dist/components/Token/icons/usdc.js +16 -56
- package/dist/components/Token/icons/usdt.d.ts +3 -0
- package/dist/components/Token/icons/usdt.js +27 -0
- package/dist/components/Token/icons/utils.d.ts +9 -0
- package/dist/components/Token/icons/utils.js +11 -0
- package/dist/components/Token/icons/wld.d.ts +2 -2
- package/dist/components/Token/icons/wld.js +10 -41
- package/dist/components/TopBar/TopBar.d.ts +11 -0
- package/dist/components/TopBar/TopBar.js +23 -0
- package/dist/components/TopBar/index.d.ts +1 -0
- package/dist/components/TopBar/index.js +4 -0
- package/dist/components/Typography/Typography.d.ts +12 -8
- package/dist/components/Typography/Typography.js +72 -60
- package/dist/components/WalletAddressField/WalletAddressField.d.ts +23 -0
- package/dist/components/WalletAddressField/WalletAddressField.js +81 -0
- package/dist/components/WalletAddressField/index.d.ts +1 -0
- package/dist/components/WalletAddressField/index.js +4 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +91 -45
- package/dist/lib/constants/dropdownStyles.d.ts +1 -1
- package/dist/lib/constants/dropdownStyles.js +2 -2
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@1_tagbd57u5fsqga6qdjecsll7fm/node_modules/@radix-ui/react-collection/dist/index.js +49 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.5_@types_react-dom@18.3.5_@types_react@18.3.18__@types__nitdfoqpcbroetgllwgz3is5ai/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +131 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.4_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._ulc3jfxcmrz2rfz7bui53djdtu/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18_sejcxqoscaweil2bvgwwavaoha/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-progress@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18._wpsg2ubedou6txnsnvgmus4txq/node_modules/@radix-ui/react-progress/dist/index.js +86 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react_ki7uy4u3diz5446cqygvbjwuge/node_modules/@radix-ui/react-roving-focus/dist/index.js +181 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.2_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js +44 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toast@1.2.6_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.1_mux33mveszkw5z6iia6acnivvy/node_modules/@radix-ui/react-toast/dist/index.js +448 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react_3smwloudr6a3igss4kifyxcwju/node_modules/@radix-ui/react-toggle-group/dist/index.js +137 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._yiv2ptaqcv244n5f7zfldmgupm/node_modules/@radix-ui/react-toggle/dist/index.js +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_re_omyrydx3gc2oidaiqb4gsovieq/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -0
- package/dist/tailwind/index.d.ts +41 -25
- package/dist/tailwind/index.js +128 -85
- package/package.json +73 -1
- package/public/fonts/TWKLausanne-350.woff +0 -0
- package/public/fonts/TWKLausanne-350Italic.woff +0 -0
- package/public/fonts/TWKLausanne-500.woff +0 -0
- package/public/fonts/TWKLausanne-500Italic.woff +0 -0
- package/public/fonts/TWKLausanne-600.woff +0 -0
- package/public/fonts/TWKLausanne-600Italic.woff +0 -0
- package/public/globals.css +1 -1
- package/public/images/marbles/marble1.png +0 -0
- package/public/images/marbles/marble2.png +0 -0
- package/public/images/marbles/marble3.svg +36 -0
- package/dist/components/Button/Spinner.js +0 -36
- package/dist/components/PhoneField/ArrowDown.js +0 -27
- package/dist/components/Select/ArrowDown.d.ts +0 -2
- package/dist/components/Select/ArrowDown.js +0 -27
- /package/dist/components/{PhoneField → Icons}/ArrowDown.d.ts +0 -0
@@ -1,93 +1,63 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsxs as
|
2
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
3
3
|
import { DROPDOWN_CONTAINER_STYLES as x } from "../../lib/constants/dropdownStyles.js";
|
4
|
-
import { Root as N, Trigger as
|
5
|
-
import {
|
6
|
-
import { forwardRef as E, useState as C, useEffect as P } from "react";
|
4
|
+
import { Root as N, Trigger as S, Value as I, Icon as R, Portal as V, Content as j, Viewport as A, Item as T, ItemText as D } from "../../node_modules/.pnpm/@radix-ui_react-select@2.1.4_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._atdh45n5c7sked5b6tbwgdz7re/node_modules/@radix-ui/react-select/dist/index.js";
|
5
|
+
import { forwardRef as E, useState as C, useEffect as O } from "react";
|
7
6
|
import { cn as t } from "../../lib/utils.js";
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
|
11
|
-
|
12
|
-
{
|
13
|
-
variants: {
|
14
|
-
isOpen: {
|
15
|
-
true: "border-gray-200 bg-gray-0 shadow-card",
|
16
|
-
false: "border-gray-100 bg-gray-100"
|
17
|
-
},
|
18
|
-
defaultValue: {
|
19
|
-
true: "border-gray-200 bg-gray-0 text-gray-900",
|
20
|
-
false: ""
|
21
|
-
},
|
22
|
-
error: {
|
23
|
-
true: "shadow-none border-error-700 bg-error-100",
|
24
|
-
false: ""
|
25
|
-
},
|
26
|
-
disabled: {
|
27
|
-
true: "cursor-not-allowed opacity-20",
|
28
|
-
false: ""
|
29
|
-
}
|
30
|
-
},
|
31
|
-
defaultVariants: {
|
32
|
-
isOpen: !1,
|
33
|
-
defaultValue: !1,
|
34
|
-
error: !1,
|
35
|
-
disabled: !1
|
36
|
-
}
|
37
|
-
}
|
38
|
-
), k = E(
|
7
|
+
import { ArrowDown as P } from "../Icons/ArrowDown.js";
|
8
|
+
import { inputVariants as _ } from "../Input/Input.js";
|
9
|
+
import { typographyVariants as m } from "../Typography/Typography.js";
|
10
|
+
const $ = E(
|
39
11
|
({
|
40
12
|
options: l = [],
|
41
|
-
placeholder:
|
42
|
-
value:
|
43
|
-
onChange:
|
13
|
+
placeholder: f = "Select...",
|
14
|
+
value: i,
|
15
|
+
onChange: h,
|
44
16
|
open: a,
|
45
17
|
onOpenChange: s,
|
46
18
|
error: p = !1,
|
47
|
-
defaultOpen:
|
48
|
-
disabled:
|
49
|
-
name:
|
50
|
-
defaultValue:
|
19
|
+
defaultOpen: o = !1,
|
20
|
+
disabled: u = !1,
|
21
|
+
name: g,
|
22
|
+
defaultValue: y,
|
51
23
|
...b
|
52
|
-
},
|
53
|
-
const [c,
|
54
|
-
|
24
|
+
}, v) => {
|
25
|
+
const [c, n] = C(a ?? o), w = (e) => {
|
26
|
+
n(e), s == null || s(e);
|
55
27
|
};
|
56
|
-
return
|
57
|
-
a !== void 0 &&
|
58
|
-
}, [a]), Array.isArray(l) || console.error("`options` must be an array of objects with `value` and `label` keys."), /* @__PURE__ */
|
28
|
+
return O(() => {
|
29
|
+
a !== void 0 && n(a);
|
30
|
+
}, [a]), Array.isArray(l) || console.error("`options` must be an array of objects with `value` and `label` keys."), /* @__PURE__ */ d(
|
59
31
|
N,
|
60
32
|
{
|
61
|
-
value:
|
33
|
+
value: i,
|
62
34
|
open: c,
|
63
|
-
onValueChange:
|
64
|
-
defaultOpen:
|
65
|
-
onOpenChange:
|
66
|
-
name:
|
67
|
-
disabled:
|
68
|
-
defaultValue:
|
35
|
+
onValueChange: h,
|
36
|
+
defaultOpen: o,
|
37
|
+
onOpenChange: w,
|
38
|
+
name: g,
|
39
|
+
disabled: u,
|
40
|
+
defaultValue: y,
|
69
41
|
...b,
|
70
42
|
children: [
|
71
|
-
/* @__PURE__ */
|
72
|
-
|
43
|
+
/* @__PURE__ */ d(
|
44
|
+
S,
|
73
45
|
{
|
74
|
-
ref:
|
46
|
+
ref: v,
|
75
47
|
className: t(
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
defaultValue: !!d
|
82
|
-
})
|
48
|
+
m({ variant: "body", level: 3 }),
|
49
|
+
_({ error: p, isFocused: c }),
|
50
|
+
"flex items-center justify-between whitespace-nowrap [&>span:first-of-type]:line-clamp-1",
|
51
|
+
"data-[placeholder]:text-gray-500",
|
52
|
+
"data-[state=closed]:bg-gray-100 data-[state=closed]:border-gray-100"
|
83
53
|
),
|
84
54
|
children: [
|
85
|
-
/* @__PURE__ */ r(
|
86
|
-
/* @__PURE__ */ r(
|
55
|
+
/* @__PURE__ */ r(I, { placeholder: f }),
|
56
|
+
/* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(P, { className: "text-gray-400 size-6" }) })
|
87
57
|
]
|
88
58
|
}
|
89
59
|
),
|
90
|
-
/* @__PURE__ */ r(
|
60
|
+
/* @__PURE__ */ r(V, { children: /* @__PURE__ */ r(j, { position: "popper", className: t(x), children: /* @__PURE__ */ r(
|
91
61
|
A,
|
92
62
|
{
|
93
63
|
className: t(
|
@@ -95,15 +65,15 @@ const $ = D(
|
|
95
65
|
l.length === 0 && "hidden"
|
96
66
|
),
|
97
67
|
children: l.map((e) => /* @__PURE__ */ r(
|
98
|
-
|
68
|
+
T,
|
99
69
|
{
|
100
70
|
value: e.value,
|
101
71
|
className: t(
|
102
|
-
"w-full cursor-pointer select-none rounded-md p-2 font-sans outline-none hover:bg-gray-
|
103
|
-
|
104
|
-
|
72
|
+
"w-full cursor-pointer select-none rounded-md p-2 font-sans outline-none hover:bg-gray-50",
|
73
|
+
i === e.value && "bg-gray-100",
|
74
|
+
m({ variant: "body", level: 2 })
|
105
75
|
),
|
106
|
-
children: /* @__PURE__ */ r(
|
76
|
+
children: /* @__PURE__ */ r(D, { children: e.label })
|
107
77
|
},
|
108
78
|
`${e.value}/${e.label}`
|
109
79
|
))
|
@@ -114,8 +84,8 @@ const $ = D(
|
|
114
84
|
);
|
115
85
|
}
|
116
86
|
);
|
117
|
-
|
87
|
+
$.displayName = "Select";
|
118
88
|
export {
|
119
|
-
|
120
|
-
|
89
|
+
$ as Select,
|
90
|
+
$ as default
|
121
91
|
};
|
@@ -4,5 +4,5 @@ interface SpinnerProps {
|
|
4
4
|
*/
|
5
5
|
className?: string;
|
6
6
|
}
|
7
|
-
declare const Spinner: ({ className }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
8
|
-
export
|
7
|
+
export declare const Spinner: ({ className }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
2
|
+
import { cn as o } from "../../lib/utils.js";
|
3
|
+
const s = ({ className: t }) => /* @__PURE__ */ e(
|
4
|
+
"svg",
|
5
|
+
{
|
6
|
+
width: "24",
|
7
|
+
height: "24",
|
8
|
+
viewBox: "0 0 24 24",
|
9
|
+
fill: "none",
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
11
|
+
className: o("h-6 w-6 animate-spin text-gray-900", t),
|
12
|
+
children: [
|
13
|
+
/* @__PURE__ */ r(
|
14
|
+
"circle",
|
15
|
+
{
|
16
|
+
cx: "12",
|
17
|
+
cy: "12",
|
18
|
+
r: "10.75",
|
19
|
+
stroke: "currentColor",
|
20
|
+
strokeOpacity: "0.16",
|
21
|
+
strokeWidth: "2.5"
|
22
|
+
}
|
23
|
+
),
|
24
|
+
/* @__PURE__ */ r(
|
25
|
+
"path",
|
26
|
+
{
|
27
|
+
d: "M17.8921 1.54613C16.1312 0.553676 14.1482 0.0220795 12.1271 0.000672984C10.1059 -0.0207335 8.11211 0.468744 6.33065 1.42368L7.50987 3.62356C8.92079 2.86725 10.4999 2.47958 12.1007 2.49653C13.7014 2.51349 15.2719 2.93451 16.6665 3.72054L17.8921 1.54613Z",
|
28
|
+
fill: "currentColor"
|
29
|
+
}
|
30
|
+
)
|
31
|
+
]
|
32
|
+
}
|
33
|
+
);
|
34
|
+
export {
|
35
|
+
s as Spinner
|
36
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Spinner';
|
@@ -10,7 +10,7 @@ const n = l(
|
|
10
10
|
checked: e,
|
11
11
|
onCheckedChange: t,
|
12
12
|
disabled: r,
|
13
|
-
className: "relative inline-flex h-
|
13
|
+
className: "relative inline-flex h-6 w-10 items-center rounded-full border-2 transition-all data-[state=checked]:border-gray-900 data-[state=checked]:bg-gray-900 data-[state=unchecked]:border-gray-300 data-[state=unchecked]:bg-gray-300 disabled:cursor-not-allowed disabled:opacity-20",
|
14
14
|
...d,
|
15
15
|
children: /* @__PURE__ */ a(c, { className: "bg-gray-0 block h-5 w-5 transform rounded-full transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0" })
|
16
16
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { TabItemProps, TabsProps } from './types';
|
2
|
+
import * as React from "react";
|
3
|
+
/**
|
4
|
+
* A tab navigation component that allows users to switch between different views
|
5
|
+
*/
|
6
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
7
|
+
/**
|
8
|
+
* Individual tab item that can be selected
|
9
|
+
*/
|
10
|
+
declare const TabItem: React.ForwardRefExoticComponent<TabItemProps & React.RefAttributes<HTMLButtonElement>>;
|
11
|
+
export { Tabs, TabItem };
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"use client";
|
2
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
3
|
+
import { Slot as s } 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";
|
4
|
+
import { Root as c, Item as f } from "../../node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react_3smwloudr6a3igss4kifyxcwju/node_modules/@radix-ui/react-toggle-group/dist/index.js";
|
5
|
+
import * as n from "react";
|
6
|
+
import { cn as o } from "../../lib/utils.js";
|
7
|
+
import { Typography as d } from "../Typography/Typography.js";
|
8
|
+
const p = n.forwardRef(
|
9
|
+
({ children: r, ...a }, e) => /* @__PURE__ */ t(
|
10
|
+
c,
|
11
|
+
{
|
12
|
+
ref: e,
|
13
|
+
type: "single",
|
14
|
+
className: "flex w-full justify-between px-5 items-center",
|
15
|
+
...a,
|
16
|
+
children: /* @__PURE__ */ t("div", { className: "flex w-full", children: r })
|
17
|
+
}
|
18
|
+
)
|
19
|
+
);
|
20
|
+
p.displayName = "Tabs";
|
21
|
+
const x = n.forwardRef(
|
22
|
+
({ icon: r, label: a, activeIcon: e, ...l }, i) => /* @__PURE__ */ m(
|
23
|
+
f,
|
24
|
+
{
|
25
|
+
ref: i,
|
26
|
+
className: o(
|
27
|
+
"flex-1 flex flex-col items-center gap-1 relative min-w-0 group",
|
28
|
+
"focus:outline-none transition-colors duration-200",
|
29
|
+
"text-gray-350 hover:text-gray-500 data-[state=on]:text-gray-900"
|
30
|
+
),
|
31
|
+
...l,
|
32
|
+
children: [
|
33
|
+
/* @__PURE__ */ t(
|
34
|
+
s,
|
35
|
+
{
|
36
|
+
className: o("h-[1.625rem] shrink-0", e && "group-data-[state=on]:hidden"),
|
37
|
+
children: r
|
38
|
+
}
|
39
|
+
),
|
40
|
+
e && /* @__PURE__ */ t(s, { className: "h-[1.625rem] shrink-0 hidden group-data-[state=on]:block", children: e }),
|
41
|
+
a && /* @__PURE__ */ t(
|
42
|
+
d,
|
43
|
+
{
|
44
|
+
as: "span",
|
45
|
+
variant: "subtitle",
|
46
|
+
className: "text-2xs truncate w-full text-center px-1 leading-none",
|
47
|
+
children: a
|
48
|
+
}
|
49
|
+
)
|
50
|
+
]
|
51
|
+
}
|
52
|
+
)
|
53
|
+
);
|
54
|
+
x.displayName = "TabItem";
|
55
|
+
export {
|
56
|
+
x as TabItem,
|
57
|
+
p as Tabs
|
58
|
+
};
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
2
|
+
import * as ToggleGroup from "@radix-ui/react-toggle-group";
|
3
|
+
type BaseToggleGroupProps = ComponentPropsWithoutRef<typeof ToggleGroup.Root>;
|
4
|
+
type BaseToggleGroupItemProps = ComponentPropsWithoutRef<typeof ToggleGroup.Item>;
|
5
|
+
export interface TabsProps extends Omit<BaseToggleGroupProps, "type" | "size" | "orientation"> {
|
6
|
+
/**
|
7
|
+
* Whether the toggle group is disabled
|
8
|
+
*/
|
9
|
+
disabled?: boolean;
|
10
|
+
/**
|
11
|
+
* Whether the toggle group should loop when navigating through items
|
12
|
+
*/
|
13
|
+
loop?: boolean;
|
14
|
+
/**
|
15
|
+
* The default selected tab value
|
16
|
+
*/
|
17
|
+
defaultValue?: string;
|
18
|
+
/**
|
19
|
+
* The selected tab value
|
20
|
+
*/
|
21
|
+
value?: string;
|
22
|
+
/**
|
23
|
+
* Callback when tab selection changes
|
24
|
+
*/
|
25
|
+
onValueChange?: (value: string) => void;
|
26
|
+
/**
|
27
|
+
* The tab items
|
28
|
+
*/
|
29
|
+
children?: ReactNode;
|
30
|
+
}
|
31
|
+
export interface TabItemProps extends Omit<BaseToggleGroupItemProps, "className" | "children"> {
|
32
|
+
/**
|
33
|
+
* The icon to display
|
34
|
+
*/
|
35
|
+
icon: ReactNode;
|
36
|
+
/**
|
37
|
+
* The icon to display when the tab item is active
|
38
|
+
*/
|
39
|
+
activeIcon?: ReactNode;
|
40
|
+
/**
|
41
|
+
* The label text
|
42
|
+
*/
|
43
|
+
label?: string;
|
44
|
+
/**
|
45
|
+
* Whether the tab item is disabled
|
46
|
+
*/
|
47
|
+
disabled?: boolean;
|
48
|
+
/**
|
49
|
+
* The value of the tab item
|
50
|
+
*/
|
51
|
+
value: string;
|
52
|
+
}
|
53
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
2
|
+
import { inputVariants } from '../Input/Input';
|
3
|
+
import * as React from "react";
|
4
|
+
export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "className" | "style" | "placeholder">, VariantProps<typeof inputVariants> {
|
5
|
+
/**
|
6
|
+
* If true, the textarea will display in an error state with error styling
|
7
|
+
*/
|
8
|
+
error?: boolean;
|
9
|
+
/**
|
10
|
+
* If true, the textarea will display in a focused state with focus styling
|
11
|
+
* @default false
|
12
|
+
*/
|
13
|
+
isFocused?: boolean;
|
14
|
+
/**
|
15
|
+
* The label text for the textarea
|
16
|
+
*/
|
17
|
+
label?: string;
|
18
|
+
/**
|
19
|
+
* Variant of the input
|
20
|
+
* @default "default"
|
21
|
+
*/
|
22
|
+
variant?: "default" | "floating-label";
|
23
|
+
}
|
24
|
+
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
25
|
+
export default TextArea;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { cva as d } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
3
|
+
import * as c from "react";
|
4
|
+
import { cn as r } from "../../lib/utils.js";
|
5
|
+
import { inputVariants as x } from "../Input/Input.js";
|
6
|
+
import { typographyVariants as l } from "../Typography/Typography.js";
|
7
|
+
const u = d("min-h-[7.5rem] resize-y", {
|
8
|
+
variants: {
|
9
|
+
variant: {
|
10
|
+
"floating-label": "pt-8",
|
11
|
+
default: "pt-4"
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}), b = c.forwardRef(
|
15
|
+
({ error: s, isFocused: m = !1, disabled: p, label: t, variant: e = "default", id: a, ...i }, f) => /* @__PURE__ */ n("div", { className: "relative flex w-full items-center group", children: [
|
16
|
+
/* @__PURE__ */ o(
|
17
|
+
"textarea",
|
18
|
+
{
|
19
|
+
ref: f,
|
20
|
+
id: a,
|
21
|
+
placeholder: t,
|
22
|
+
disabled: p,
|
23
|
+
className: r(
|
24
|
+
x({ error: s, isFocused: m, variant: e }),
|
25
|
+
l({ variant: "body", level: 3 }),
|
26
|
+
u({ variant: e })
|
27
|
+
),
|
28
|
+
...i
|
29
|
+
}
|
30
|
+
),
|
31
|
+
e === "floating-label" && /* @__PURE__ */ o(
|
32
|
+
"label",
|
33
|
+
{
|
34
|
+
htmlFor: a,
|
35
|
+
className: r(
|
36
|
+
l({ variant: "body", level: 3 }),
|
37
|
+
r(
|
38
|
+
// Initial state
|
39
|
+
"peer-placeholder-shown:text-sm",
|
40
|
+
"peer-focus:text-xs peer-focus:border-gray-300 peer-focus:bg-gray-0",
|
41
|
+
// End state
|
42
|
+
"absolute text-gray-500 duration-300 transform text-xs top-0 pt-4 z-10 pl-4 w-full bg-gray-100 rounded-t-[0.625rem] border-t border-x border-gray-100"
|
43
|
+
)
|
44
|
+
),
|
45
|
+
children: t
|
46
|
+
}
|
47
|
+
)
|
48
|
+
] })
|
49
|
+
);
|
50
|
+
b.displayName = "TextArea";
|
51
|
+
export {
|
52
|
+
b as TextArea,
|
53
|
+
b as default
|
54
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './TextArea';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
2
|
+
import * as React from "react";
|
3
|
+
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
4
|
+
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
5
|
+
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & {
|
6
|
+
variant: "success" | "error";
|
7
|
+
} & React.RefAttributes<HTMLLIElement>>;
|
8
|
+
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
9
|
+
export { type ToastProps, ToastProvider, ToastViewport, Toast };
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use client";
|
2
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
3
|
+
import { cn as s } from "../../lib/utils.js";
|
4
|
+
import { Viewport as o, Root as i, Provider as p } from "../../node_modules/.pnpm/@radix-ui_react-toast@1.2.6_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.1_mux33mveszkw5z6iia6acnivvy/node_modules/@radix-ui/react-toast/dist/index.js";
|
5
|
+
import * as l from "react";
|
6
|
+
import { Fail as c } from "../Icons/Fail.js";
|
7
|
+
import { Success as f } from "../Icons/Success.js";
|
8
|
+
import { Typography as u } from "../Typography/Typography.js";
|
9
|
+
const b = p, x = l.forwardRef(({ className: r, ...a }, t) => /* @__PURE__ */ e(
|
10
|
+
o,
|
11
|
+
{
|
12
|
+
ref: t,
|
13
|
+
className: s(
|
14
|
+
"fixed top-0 z-[100] flex max-h-screen w-full p-4 right-0 left-0 flex-col",
|
15
|
+
r
|
16
|
+
),
|
17
|
+
...a
|
18
|
+
}
|
19
|
+
));
|
20
|
+
x.displayName = o.displayName;
|
21
|
+
const v = l.forwardRef(({ className: r, title: a, variant: t, ...d }, n) => /* @__PURE__ */ e(
|
22
|
+
i,
|
23
|
+
{
|
24
|
+
ref: n,
|
25
|
+
className: s(
|
26
|
+
"group pointer-events-auto relative flex w-full items-center justify-center",
|
27
|
+
"transition-all",
|
28
|
+
"data-[swipe=cancel]:translate-x-0",
|
29
|
+
"data-[swipe=end]:animate-out",
|
30
|
+
"data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]",
|
31
|
+
"data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]",
|
32
|
+
"data-[swipe=move]:transition-none",
|
33
|
+
"data-[state=closed]:animate-out",
|
34
|
+
"data-[state=closed]:slide-out-to-top-full",
|
35
|
+
"data-[state=closed]:fade-out-50",
|
36
|
+
"data-[state=open]:animate-in",
|
37
|
+
"data-[state=open]:slide-in-from-top-full"
|
38
|
+
),
|
39
|
+
...d,
|
40
|
+
children: /* @__PURE__ */ m("div", { className: "grid grid-cols-[auto_1fr] items-center gap-2 rounded-full bg-gray-0 h-9 pl-2 pr-3 border border-gray-200 shrink-0 text-gray-900", children: [
|
41
|
+
t === "success" ? /* @__PURE__ */ e(f, {}) : /* @__PURE__ */ e(c, {}),
|
42
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 items-center", children: /* @__PURE__ */ e(u, { variant: "subtitle", level: 3, children: a }) })
|
43
|
+
] })
|
44
|
+
}
|
45
|
+
));
|
46
|
+
v.displayName = i.displayName;
|
47
|
+
export {
|
48
|
+
v as Toast,
|
49
|
+
b as ToastProvider,
|
50
|
+
x as ToastViewport
|
51
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use client";
|
2
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
3
|
+
import { ToastProvider as a, Toast as m, ToastViewport as n } from "./Toast.js";
|
4
|
+
import { useToast as p } from "./use-toast.js";
|
5
|
+
function u({ duration: t }) {
|
6
|
+
const { toasts: r } = p();
|
7
|
+
return /* @__PURE__ */ i(a, { duration: t, children: [
|
8
|
+
r.map(({ id: s, ...e }) => /* @__PURE__ */ o(m, { ...e }, s)),
|
9
|
+
/* @__PURE__ */ o(n, {})
|
10
|
+
] });
|
11
|
+
}
|
12
|
+
export {
|
13
|
+
u as Toaster
|
14
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Toast as t, ToastProvider as e, ToastViewport as s } from "./Toast.js";
|
2
|
+
import { Toaster as T } from "./Toaster.js";
|
3
|
+
import { reducer as f, toast as m, useToast as x } from "./use-toast.js";
|
4
|
+
export {
|
5
|
+
t as Toast,
|
6
|
+
e as ToastProvider,
|
7
|
+
s as ToastViewport,
|
8
|
+
T as Toaster,
|
9
|
+
f as reducer,
|
10
|
+
m as toast,
|
11
|
+
x as useToast
|
12
|
+
};
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { ToastProps } from './Toast';
|
2
|
+
type ToasterToast = ToastProps & {
|
3
|
+
id: string;
|
4
|
+
};
|
5
|
+
declare const actionTypes: {
|
6
|
+
readonly ADD_TOAST: "ADD_TOAST";
|
7
|
+
readonly UPDATE_TOAST: "UPDATE_TOAST";
|
8
|
+
readonly DISMISS_TOAST: "DISMISS_TOAST";
|
9
|
+
readonly REMOVE_TOAST: "REMOVE_TOAST";
|
10
|
+
};
|
11
|
+
type ActionType = typeof actionTypes;
|
12
|
+
type Action = {
|
13
|
+
type: ActionType["ADD_TOAST"];
|
14
|
+
toast: ToasterToast;
|
15
|
+
} | {
|
16
|
+
type: ActionType["UPDATE_TOAST"];
|
17
|
+
toast: Partial<ToasterToast>;
|
18
|
+
} | {
|
19
|
+
type: ActionType["DISMISS_TOAST"];
|
20
|
+
toastId?: ToasterToast["id"];
|
21
|
+
} | {
|
22
|
+
type: ActionType["REMOVE_TOAST"];
|
23
|
+
toastId?: ToasterToast["id"];
|
24
|
+
};
|
25
|
+
interface State {
|
26
|
+
toasts: ToasterToast[];
|
27
|
+
}
|
28
|
+
export declare const reducer: (state: State, action: Action) => State;
|
29
|
+
type Toast = Omit<ToasterToast, "id">;
|
30
|
+
declare const toast: ({ ...props }: Toast) => {
|
31
|
+
id: string;
|
32
|
+
dismiss: () => void;
|
33
|
+
update: (props: ToasterToast) => void;
|
34
|
+
};
|
35
|
+
declare function useToast(): {
|
36
|
+
toast: {
|
37
|
+
success: (props: Omit<Toast, "variant">) => {
|
38
|
+
id: string;
|
39
|
+
dismiss: () => void;
|
40
|
+
update: (props: ToasterToast) => void;
|
41
|
+
};
|
42
|
+
error: (props: Omit<Toast, "variant">) => {
|
43
|
+
id: string;
|
44
|
+
dismiss: () => void;
|
45
|
+
update: (props: ToasterToast) => void;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
dismiss: (toastId?: string) => void;
|
49
|
+
toasts: ToasterToast[];
|
50
|
+
};
|
51
|
+
export { useToast, toast };
|