@worldcoin/mini-apps-ui-kit-react 0.0.8 → 1.0.0-canary.1
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 +41 -73
- 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 +69 -57
- 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,31 +1,40 @@
|
|
1
|
-
import { jsxs as e, jsx as
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
2
2
|
import { cn as t } from "../../lib/utils.js";
|
3
|
-
function
|
3
|
+
function s({ className: o }) {
|
4
4
|
return /* @__PURE__ */ e(
|
5
5
|
"svg",
|
6
6
|
{
|
7
|
-
width: "
|
8
|
-
height: "
|
9
|
-
viewBox: "0 0
|
7
|
+
width: "24",
|
8
|
+
height: "24",
|
9
|
+
viewBox: "0 0 24 24",
|
10
10
|
fill: "none",
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
12
|
-
className: t("
|
12
|
+
className: t("size-6", o),
|
13
13
|
children: [
|
14
|
-
/* @__PURE__ */
|
14
|
+
/* @__PURE__ */ r(
|
15
15
|
"path",
|
16
16
|
{
|
17
|
-
d: "
|
17
|
+
d: "M17 17L21 21",
|
18
|
+
stroke: "currentColor",
|
19
|
+
strokeWidth: "2",
|
20
|
+
strokeLinecap: "square",
|
21
|
+
strokeLinejoin: "round"
|
22
|
+
}
|
23
|
+
),
|
24
|
+
/* @__PURE__ */ r(
|
25
|
+
"path",
|
26
|
+
{
|
27
|
+
d: "M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z",
|
18
28
|
stroke: "currentColor",
|
19
29
|
strokeWidth: "2",
|
20
30
|
strokeLinecap: "round",
|
21
31
|
strokeLinejoin: "round"
|
22
32
|
}
|
23
|
-
)
|
24
|
-
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "clip0_352_148", children: /* @__PURE__ */ i("rect", { width: "20", height: "20", fill: "white" }) }) })
|
33
|
+
)
|
25
34
|
]
|
26
35
|
}
|
27
36
|
);
|
28
37
|
}
|
29
38
|
export {
|
30
|
-
|
39
|
+
s as Magnifier
|
31
40
|
};
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { cn as r } from "../../lib/utils.js";
|
3
|
+
const a = ({ className: i }) => /* @__PURE__ */ e(
|
4
|
+
"svg",
|
5
|
+
{
|
6
|
+
width: "25",
|
7
|
+
height: "24",
|
8
|
+
viewBox: "0 0 25 24",
|
9
|
+
fill: "none",
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
11
|
+
className: r("size-6 text-success-600", i),
|
12
|
+
children: [
|
13
|
+
/* @__PURE__ */ t("rect", { x: "0.5", width: "24", height: "24", rx: "12", fill: "currentColor" }),
|
14
|
+
/* @__PURE__ */ t(
|
15
|
+
"rect",
|
16
|
+
{
|
17
|
+
opacity: "0.2",
|
18
|
+
x: "0.5",
|
19
|
+
width: "24",
|
20
|
+
height: "24",
|
21
|
+
rx: "12",
|
22
|
+
fill: "url(#paint0_radial_578_332)"
|
23
|
+
}
|
24
|
+
),
|
25
|
+
/* @__PURE__ */ t(
|
26
|
+
"rect",
|
27
|
+
{
|
28
|
+
x: "0.636364",
|
29
|
+
y: "0.136364",
|
30
|
+
width: "23.7273",
|
31
|
+
height: "23.7273",
|
32
|
+
rx: "11.8636",
|
33
|
+
stroke: "url(#paint1_linear_578_332)",
|
34
|
+
strokeWidth: "0.272727"
|
35
|
+
}
|
36
|
+
),
|
37
|
+
/* @__PURE__ */ t(
|
38
|
+
"path",
|
39
|
+
{
|
40
|
+
d: "M8.54541 12.4091L10.7272 14.5909L16.1818 9.13633",
|
41
|
+
stroke: "white",
|
42
|
+
strokeWidth: "1.5"
|
43
|
+
}
|
44
|
+
),
|
45
|
+
/* @__PURE__ */ e("defs", { children: [
|
46
|
+
/* @__PURE__ */ e(
|
47
|
+
"radialGradient",
|
48
|
+
{
|
49
|
+
id: "paint0_radial_578_332",
|
50
|
+
cx: "0",
|
51
|
+
cy: "0",
|
52
|
+
r: "1",
|
53
|
+
gradientUnits: "userSpaceOnUse",
|
54
|
+
gradientTransform: "translate(5.95455) rotate(63.4349) scale(26.8328 26.7171)",
|
55
|
+
children: [
|
56
|
+
/* @__PURE__ */ t("stop", { stopColor: "white" }),
|
57
|
+
/* @__PURE__ */ t("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
58
|
+
]
|
59
|
+
}
|
60
|
+
),
|
61
|
+
/* @__PURE__ */ e(
|
62
|
+
"linearGradient",
|
63
|
+
{
|
64
|
+
id: "paint1_linear_578_332",
|
65
|
+
x1: "12.5",
|
66
|
+
y1: "0",
|
67
|
+
x2: "12.5",
|
68
|
+
y2: "24",
|
69
|
+
gradientUnits: "userSpaceOnUse",
|
70
|
+
children: [
|
71
|
+
/* @__PURE__ */ t("stop", { stopColor: "white", stopOpacity: "0.3" }),
|
72
|
+
/* @__PURE__ */ t("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
73
|
+
]
|
74
|
+
}
|
75
|
+
)
|
76
|
+
] })
|
77
|
+
]
|
78
|
+
}
|
79
|
+
);
|
80
|
+
export {
|
81
|
+
a as Success
|
82
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
|
-
import { cn as
|
3
|
-
function n({ className:
|
2
|
+
import { cn as o } from "../../lib/utils.js";
|
3
|
+
function n({ className: r }) {
|
4
4
|
return /* @__PURE__ */ t(
|
5
5
|
"svg",
|
6
6
|
{
|
@@ -9,16 +9,15 @@ function n({ className: o }) {
|
|
9
9
|
viewBox: "0 0 16 16",
|
10
10
|
fill: "none",
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
12
|
-
className:
|
12
|
+
className: o("h-4 w-4", r),
|
13
13
|
"data-testid": "tick-icon",
|
14
14
|
children: /* @__PURE__ */ t(
|
15
15
|
"path",
|
16
16
|
{
|
17
|
-
d: "M3.
|
17
|
+
d: "M3.33334 8.66669L6.00001 11.3334L12.6667 4.66669",
|
18
18
|
stroke: "currentColor",
|
19
|
-
strokeWidth: "
|
20
|
-
strokeLinecap: "
|
21
|
-
strokeLinejoin: "round"
|
19
|
+
strokeWidth: "1.5",
|
20
|
+
strokeLinecap: "square"
|
22
21
|
}
|
23
22
|
)
|
24
23
|
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import { cn as o } from "../../lib/utils.js";
|
3
|
+
function n({ className: t }) {
|
4
|
+
return /* @__PURE__ */ r(
|
5
|
+
"svg",
|
6
|
+
{
|
7
|
+
width: "24",
|
8
|
+
height: "24",
|
9
|
+
viewBox: "0 0 24 24",
|
10
|
+
fill: "none",
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
12
|
+
className: o("h-6 w-6", t),
|
13
|
+
children: /* @__PURE__ */ r(
|
14
|
+
"path",
|
15
|
+
{
|
16
|
+
d: "M6.75729 17.2426L11.9999 12M17.2426 6.75736L11.9999 12M11.9999 12L6.75729 6.75736M11.9999 12L17.2426 17.2426",
|
17
|
+
stroke: "currentColor",
|
18
|
+
strokeWidth: "2",
|
19
|
+
strokeLinecap: "square"
|
20
|
+
}
|
21
|
+
)
|
22
|
+
}
|
23
|
+
);
|
24
|
+
}
|
25
|
+
export {
|
26
|
+
n as XMark
|
27
|
+
};
|
@@ -2,14 +2,15 @@ import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
3
3
|
export declare const inputVariants: (props?: ({
|
4
4
|
error?: boolean | null | undefined;
|
5
|
+
isLabel?: boolean | null | undefined;
|
5
6
|
isFocused?: boolean | null | undefined;
|
7
|
+
variant?: "default" | "floating-label" | null | undefined;
|
6
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
7
9
|
export declare const iconVariants: (props?: ({
|
8
10
|
disabled?: boolean | null | undefined;
|
9
|
-
error?: boolean | null | undefined;
|
10
11
|
position?: "end" | "start" | null | undefined;
|
11
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
12
|
-
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style">, VariantProps<typeof inputVariants> {
|
13
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "placeholder">, VariantProps<typeof inputVariants> {
|
13
14
|
/**
|
14
15
|
* If true, the input will display in an error state with error styling
|
15
16
|
*/
|
@@ -49,6 +50,29 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
49
50
|
* @default false
|
50
51
|
*/
|
51
52
|
isFocused?: boolean;
|
53
|
+
/**
|
54
|
+
* Additional class name for the input
|
55
|
+
*/
|
56
|
+
className?: string;
|
57
|
+
/**
|
58
|
+
* Label text to be displayed above the input
|
59
|
+
*/
|
60
|
+
label?: string;
|
61
|
+
/**
|
62
|
+
* Variant of the input
|
63
|
+
* @default "default"
|
64
|
+
*/
|
65
|
+
variant?: "default" | "floating-label";
|
66
|
+
/**
|
67
|
+
* If true, the dividers will be shown
|
68
|
+
* @default true
|
69
|
+
*/
|
70
|
+
showStartDivider?: boolean;
|
71
|
+
/**
|
72
|
+
* If true, the end divider will be shown
|
73
|
+
* @default true
|
74
|
+
*/
|
75
|
+
showEndDivider?: boolean;
|
52
76
|
}
|
53
77
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
54
78
|
export default Input;
|
@@ -1,98 +1,163 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { cva as
|
3
|
-
import * as
|
4
|
-
import { cn as
|
5
|
-
import { Tick as
|
6
|
-
|
7
|
-
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
2
|
+
import { cva as c } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
3
|
+
import * as L from "react";
|
4
|
+
import { cn as e } from "../../lib/utils.js";
|
5
|
+
import { Tick as R } from "../Icons/Tick.js";
|
6
|
+
import { typographyVariants as y } from "../Typography/Typography.js";
|
7
|
+
const d = 1.5, F = c(
|
8
|
+
e(
|
9
|
+
"peer h-[3.5rem] w-full rounded-[0.625rem] border border-gray-100 bg-gray-100 px-4 outline-none transition duration-300",
|
10
|
+
"file:hidden",
|
11
|
+
"invalid:border-error-600 invalid:focus:border-error-600 invalid:bg-gray-0",
|
12
|
+
"placeholder:text-gray-500",
|
13
|
+
"focus:border-gray-300 focus:bg-gray-0 focus-visible:outline-none",
|
14
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
15
|
+
),
|
8
16
|
{
|
9
17
|
variants: {
|
10
18
|
error: {
|
11
|
-
true: "border-error-
|
19
|
+
true: "border-error-600 focus:border-error-600 bg-gray-0"
|
20
|
+
},
|
21
|
+
isLabel: {
|
22
|
+
true: "pt-6 pb-2 placeholder:text-transparent",
|
23
|
+
false: ""
|
12
24
|
},
|
13
25
|
isFocused: {
|
14
|
-
true: "border-gray-
|
26
|
+
true: "focus:border-gray-300 focus:bg-gray-0 focus-visible:outline-none",
|
15
27
|
false: ""
|
28
|
+
},
|
29
|
+
variant: {
|
30
|
+
"floating-label": "pt-6 pb-2 placeholder:text-transparent",
|
31
|
+
default: ""
|
16
32
|
}
|
17
33
|
},
|
18
34
|
defaultVariants: {
|
19
35
|
error: !1,
|
20
|
-
isFocused: !1
|
36
|
+
isFocused: !1,
|
37
|
+
variant: "default"
|
21
38
|
}
|
22
39
|
}
|
23
|
-
),
|
40
|
+
), v = c(
|
24
41
|
"absolute top-1 bottom-1 flex items-center justify-center overflow-hidden text-gray-400",
|
25
42
|
{
|
26
43
|
variants: {
|
27
44
|
disabled: {
|
28
45
|
true: "text-gray-300 cursor-not-allowed"
|
29
46
|
},
|
30
|
-
error: {
|
31
|
-
true: "text-error-700"
|
32
|
-
},
|
33
47
|
position: {
|
34
|
-
start: "left-
|
35
|
-
end: "right-
|
48
|
+
start: "left-0",
|
49
|
+
end: "right-0"
|
36
50
|
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
), h = c("border-r h-[1.625rem] absolute", {
|
54
|
+
variants: {
|
55
|
+
position: {
|
56
|
+
start: "left-0",
|
57
|
+
end: "right-0"
|
37
58
|
},
|
38
|
-
|
39
|
-
|
59
|
+
error: {
|
60
|
+
true: "border-error-600",
|
61
|
+
false: "border-gray-300"
|
40
62
|
}
|
63
|
+
},
|
64
|
+
defaultVariants: {
|
65
|
+
error: !1
|
41
66
|
}
|
42
|
-
),
|
67
|
+
}), T = L.forwardRef(
|
43
68
|
({
|
44
|
-
type:
|
45
|
-
error:
|
46
|
-
startAdornment:
|
69
|
+
type: x = "text",
|
70
|
+
error: t,
|
71
|
+
startAdornment: a,
|
47
72
|
endAdornment: o,
|
48
|
-
isValid:
|
49
|
-
startAdornmentWidth:
|
50
|
-
endAdornmentWidth:
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
73
|
+
isValid: s,
|
74
|
+
startAdornmentWidth: l = d,
|
75
|
+
endAdornmentWidth: p = d,
|
76
|
+
disabled: i,
|
77
|
+
className: N,
|
78
|
+
label: f,
|
79
|
+
id: u,
|
80
|
+
showStartDivider: b,
|
81
|
+
showEndDivider: g,
|
82
|
+
variant: m = "default",
|
83
|
+
...w
|
84
|
+
}, $) => /* @__PURE__ */ n("div", { className: "relative flex w-full items-center group", children: [
|
85
|
+
a && /* @__PURE__ */ n(
|
56
86
|
"div",
|
57
87
|
{
|
58
|
-
className:
|
59
|
-
style: { width: `${
|
60
|
-
children:
|
88
|
+
className: e(v({ disabled: i, position: "start" })),
|
89
|
+
style: { width: `${l + 1}rem` },
|
90
|
+
children: [
|
91
|
+
a,
|
92
|
+
b && /* @__PURE__ */ r("div", { className: h({ position: "end", error: t }) })
|
93
|
+
]
|
61
94
|
}
|
62
95
|
),
|
63
96
|
/* @__PURE__ */ r(
|
64
97
|
"input",
|
65
98
|
{
|
66
|
-
ref:
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
99
|
+
ref: $,
|
100
|
+
id: u,
|
101
|
+
type: x,
|
102
|
+
placeholder: f,
|
103
|
+
disabled: i,
|
104
|
+
className: e(
|
105
|
+
F({ error: t, isLabel: m === "floating-label" }),
|
106
|
+
y({ variant: "body", level: 3 }),
|
107
|
+
N
|
108
|
+
),
|
109
|
+
...w,
|
71
110
|
style: {
|
72
|
-
...
|
73
|
-
paddingLeft: `${1 +
|
111
|
+
...a && {
|
112
|
+
paddingLeft: `${(b ? 1.6 : 1) + l}rem`
|
74
113
|
},
|
75
114
|
...o && {
|
76
|
-
paddingRight: `${1 +
|
115
|
+
paddingRight: `${(g ? 1.6 : 1) + p}rem`
|
77
116
|
},
|
78
|
-
...
|
117
|
+
...s && { paddingRight: `${1 + d}rem` }
|
79
118
|
}
|
80
119
|
}
|
81
120
|
),
|
82
|
-
(
|
121
|
+
(s || o) && /* @__PURE__ */ n(
|
83
122
|
"div",
|
84
123
|
{
|
85
|
-
className:
|
86
|
-
style: { width: `${
|
87
|
-
children:
|
124
|
+
className: e(v({ disabled: i, position: "end" })),
|
125
|
+
style: { width: `${p + 1}rem` },
|
126
|
+
children: [
|
127
|
+
s ? /* @__PURE__ */ r(R, { className: "text-success-700" }) : o,
|
128
|
+
g && /* @__PURE__ */ r("div", { className: h({ position: "start", error: t }) })
|
129
|
+
]
|
130
|
+
}
|
131
|
+
),
|
132
|
+
m === "floating-label" && /* @__PURE__ */ r(
|
133
|
+
"label",
|
134
|
+
{
|
135
|
+
htmlFor: u,
|
136
|
+
className: e(
|
137
|
+
y({ variant: "body", level: 3 }),
|
138
|
+
e(
|
139
|
+
// Initial state
|
140
|
+
"peer-placeholder-shown:text-sm peer-placeholder-shown:translate-y-0",
|
141
|
+
"peer-focus:-translate-y-[0.6rem] peer-focus:text-xs",
|
142
|
+
// End state
|
143
|
+
"absolute text-gray-500 duration-300 transform text-xs",
|
144
|
+
"-translate-y-[0.6rem] z-10 pl-4"
|
145
|
+
)
|
146
|
+
),
|
147
|
+
style: {
|
148
|
+
...a && {
|
149
|
+
paddingLeft: `${1 + l}rem`
|
150
|
+
}
|
151
|
+
},
|
152
|
+
children: f
|
88
153
|
}
|
89
154
|
)
|
90
155
|
] })
|
91
156
|
);
|
92
|
-
|
157
|
+
T.displayName = "Input";
|
93
158
|
export {
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
159
|
+
T as Input,
|
160
|
+
T as default,
|
161
|
+
v as iconVariants,
|
162
|
+
F as inputVariants
|
98
163
|
};
|
@@ -1,9 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
interface ListItemProps extends
|
1
|
+
/**
|
2
|
+
* Props for the ListItem component
|
3
|
+
* @extends {Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style">}
|
4
|
+
*/
|
5
|
+
interface ListItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> {
|
6
|
+
/** The main text label to display */
|
7
|
+
label?: string;
|
8
|
+
/** Secondary descriptive text to show below the label */
|
9
|
+
description?: string;
|
10
|
+
/** Content to render at the start/left of the list item */
|
11
|
+
startAdornment?: React.ReactNode;
|
12
|
+
/** Content to render at the end/right of the list item */
|
13
|
+
endAdornment?: React.ReactNode;
|
14
|
+
/** Child content to render inside the list item */
|
6
15
|
children?: React.ReactNode;
|
16
|
+
/** Whether the list item is disabled */
|
17
|
+
disabled?: boolean;
|
7
18
|
}
|
8
|
-
export declare const ListItem: import('react').ForwardRefExoticComponent<ListItemProps & import('react').RefAttributes<
|
19
|
+
export declare const ListItem: import('react').ForwardRefExoticComponent<ListItemProps & import('react').RefAttributes<HTMLButtonElement>>;
|
9
20
|
export default ListItem;
|
@@ -1,25 +1,32 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { cn as f } from "../../lib/utils.js";
|
3
|
+
import { cva as x } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
4
|
+
import { forwardRef as n } from "react";
|
5
|
+
import { Typography as m } from "../Typography/Typography.js";
|
6
|
+
const d = x(
|
7
|
+
"h-[4.75rem] bg-gray-50 p-4 rounded-2xl flex items-center text-gray-900 w-full disabled:text-gray-400 disabled:cursor-not-allowed"
|
8
|
+
), g = n(
|
9
|
+
({ children: h, label: t, description: l, startAdornment: r, endAdornment: a, disabled: s, ...c }, o) => /* @__PURE__ */ i("button", { ref: o, className: d(), ...c, disabled: s, children: [
|
10
|
+
r && /* @__PURE__ */ e("div", { className: "mr-3 flex-shrink-0", children: r }),
|
11
|
+
/* @__PURE__ */ i("div", { className: "flex flex-col flex-grow min-w-0 items-start gap-0.5", children: [
|
12
|
+
t && /* @__PURE__ */ e(m, { variant: "subtitle", level: 2, className: "truncate grow w-full text-left", children: t }),
|
13
|
+
l && /* @__PURE__ */ e(
|
14
|
+
m,
|
15
|
+
{
|
16
|
+
level: 4,
|
17
|
+
className: f(
|
18
|
+
"truncate grow w-full text-left",
|
19
|
+
s ? "text-gray-400" : "text-gray-500"
|
20
|
+
),
|
21
|
+
children: l
|
22
|
+
}
|
23
|
+
)
|
24
|
+
] }),
|
25
|
+
a && /* @__PURE__ */ e("div", { className: "ml-4 flex-shrink-0", children: a })
|
26
|
+
] })
|
20
27
|
);
|
21
|
-
|
28
|
+
g.displayName = "ListItem";
|
22
29
|
export {
|
23
|
-
|
24
|
-
|
30
|
+
g as ListItem,
|
31
|
+
g as default
|
25
32
|
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
2
|
+
import { cn as t } from "../../lib/utils.js";
|
3
|
+
import { forwardRef as m } from "react";
|
4
|
+
const l = m((r, e) => {
|
5
|
+
const { className: a, ...o } = r;
|
6
|
+
return /* @__PURE__ */ s(
|
7
|
+
"img",
|
8
|
+
{
|
9
|
+
ref: e,
|
10
|
+
alt: "Marble",
|
11
|
+
className: t(
|
12
|
+
"rounded-full border-2 border-gray-100 p-[3px] aspect-square w-[7.5rem] object-cover",
|
13
|
+
a
|
14
|
+
),
|
15
|
+
...o
|
16
|
+
}
|
17
|
+
);
|
18
|
+
});
|
19
|
+
l.displayName = "Marble";
|
20
|
+
export {
|
21
|
+
l as Marble,
|
22
|
+
l as default
|
23
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Marble';
|
@@ -1,8 +1 @@
|
|
1
|
-
|
2
|
-
/**
|
3
|
-
* Additional CSS classes to apply to the Delete icon
|
4
|
-
*/
|
5
|
-
className?: string;
|
6
|
-
}
|
7
|
-
export declare function Delete({ className }: DeleteProps): import("react/jsx-runtime").JSX.Element;
|
8
|
-
export {};
|
1
|
+
export declare function Delete(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { jsx as
|
2
|
-
function
|
3
|
-
return /* @__PURE__ */
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
function o(t) {
|
3
|
+
return /* @__PURE__ */ e(
|
4
4
|
"svg",
|
5
5
|
{
|
6
6
|
width: "24",
|
@@ -8,20 +8,19 @@ function r({ className: e }) {
|
|
8
8
|
viewBox: "0 0 24 24",
|
9
9
|
fill: "none",
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
11
|
-
|
12
|
-
|
13
|
-
children: /* @__PURE__ */ t(
|
11
|
+
...t,
|
12
|
+
children: /* @__PURE__ */ e(
|
14
13
|
"path",
|
15
14
|
{
|
16
|
-
d: "
|
15
|
+
d: "M15 6L9 12L15 18",
|
17
16
|
stroke: "currentColor",
|
18
|
-
strokeWidth: "2",
|
19
|
-
strokeLinecap: "
|
17
|
+
strokeWidth: "2.5",
|
18
|
+
strokeLinecap: "square"
|
20
19
|
}
|
21
20
|
)
|
22
21
|
}
|
23
22
|
);
|
24
23
|
}
|
25
24
|
export {
|
26
|
-
|
25
|
+
o as Delete
|
27
26
|
};
|