@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,218 +1,92 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsx as
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
|
11
|
-
import { Typography as P } from "../Typography/Typography.js";
|
12
|
-
import L from "./CountryListItem.js";
|
13
|
-
import R from "./CountrySelectorButton.js";
|
14
|
-
import { DIAL_CODE_PREFIX as g, startAdornmentWidthByDialCodeLength as ge } from "./constants.js";
|
15
|
-
import { getCountryDataListByCodes as xe, getValidatedCountryCode as u, filterCountries as Ne } from "./utils.js";
|
16
|
-
const Se = ce(
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
3
|
+
import { forwardRef as B, useMemo as R, useImperativeHandle as W } from "react";
|
4
|
+
import { usePhoneInput as _ } from "../../node_modules/.pnpm/react-international-phone@4.4.0_react@18.3.1/node_modules/react-international-phone/dist/index.js";
|
5
|
+
import { CountryDrawer as $ } from "../CountryDrawer/CountryDrawer.js";
|
6
|
+
import { Input as b } from "../Input/Input.js";
|
7
|
+
import j from "./CountrySelectorButton.js";
|
8
|
+
import { DIAL_CODE_PREFIX as q, startAdornmentWidthByDialCodeLength as H } from "./constants.js";
|
9
|
+
import { getCountryDataListByCodes as M, getValidatedCountryCode as d } from "./utils.js";
|
10
|
+
const N = B(
|
17
11
|
({
|
18
|
-
value:
|
19
|
-
onChange:
|
20
|
-
countries:
|
21
|
-
|
22
|
-
defaultCountryCode:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
}, X) => {
|
38
|
-
const N = ue(null), [h, f] = w(!1), [Y, p] = w(!1), [C, S] = w(""), i = F(() => xe(x), [x]), { inputValue: z, country: y, inputRef: a, handlePhoneValueChange: G, setCountry: J } = me(
|
12
|
+
value: m,
|
13
|
+
onChange: o,
|
14
|
+
countries: r,
|
15
|
+
label: f = "Phone",
|
16
|
+
defaultCountryCode: t = "US",
|
17
|
+
disableDialCodePrefill: c = !0,
|
18
|
+
disabled: l = !1,
|
19
|
+
error: h = !1,
|
20
|
+
isValid: p,
|
21
|
+
endAdornment: C,
|
22
|
+
endAdornmentWidth: y,
|
23
|
+
type: D = "tel",
|
24
|
+
inputMode: A = "tel",
|
25
|
+
autoComplete: w = "tel",
|
26
|
+
autoCapitalize: P = "off",
|
27
|
+
autoCorrect: L = "off",
|
28
|
+
...v
|
29
|
+
}, E) => {
|
30
|
+
const I = R(() => M(r), [r]), { inputValue: S, country: n, inputRef: a, handlePhoneValueChange: g, setCountry: F } = _(
|
39
31
|
{
|
40
|
-
defaultCountry:
|
41
|
-
disableDialCodePrefill:
|
42
|
-
|
43
|
-
|
32
|
+
defaultCountry: t.toLowerCase(),
|
33
|
+
disableDialCodePrefill: c,
|
34
|
+
disableDialCodeAndPrefix: !0,
|
35
|
+
value: m,
|
36
|
+
countries: I,
|
44
37
|
onChange: (e) => {
|
45
|
-
|
38
|
+
o == null || o(
|
46
39
|
e.phone,
|
47
|
-
|
40
|
+
d(e.country.iso2, t)
|
48
41
|
);
|
49
42
|
}
|
50
43
|
}
|
51
|
-
),
|
52
|
-
|
53
|
-
|
54
|
-
e == null || e.preventDefault(), Y && requestAnimationFrame(() => {
|
55
|
-
var o;
|
56
|
-
(o = a.current) == null || o.focus();
|
57
|
-
}), p(!1);
|
58
|
-
}, Z = (e) => {
|
59
|
-
var r;
|
60
|
-
const o = (r = N.current) == null ? void 0 : r.contains(e.target);
|
61
|
-
p(!!o);
|
62
|
-
}, A = (e) => {
|
63
|
-
J(e.toLowerCase()), f(!1);
|
64
|
-
}, ee = (e) => {
|
65
|
-
S(e.target.value);
|
66
|
-
}, I = F(
|
67
|
-
() => Ne(i, C),
|
68
|
-
[i, C]
|
69
|
-
);
|
70
|
-
return /* @__PURE__ */ t(
|
71
|
-
ye,
|
44
|
+
), s = d(n.iso2, t), V = `${q}${n.dialCode}`, x = H[n.dialCode.length];
|
45
|
+
return W(E, () => a.current), /* @__PURE__ */ i(
|
46
|
+
b,
|
72
47
|
{
|
73
|
-
...
|
48
|
+
...v,
|
74
49
|
ref: a,
|
75
|
-
type:
|
76
|
-
inputMode:
|
77
|
-
autoComplete:
|
78
|
-
autoCapitalize:
|
79
|
-
autoCorrect:
|
80
|
-
value:
|
81
|
-
onChange:
|
82
|
-
|
83
|
-
disabled:
|
84
|
-
error:
|
85
|
-
isValid:
|
86
|
-
endAdornment:
|
87
|
-
endAdornmentWidth:
|
88
|
-
startAdornmentWidth:
|
89
|
-
|
90
|
-
startAdornment:
|
91
|
-
|
50
|
+
type: D,
|
51
|
+
inputMode: A,
|
52
|
+
autoComplete: w,
|
53
|
+
autoCapitalize: P,
|
54
|
+
autoCorrect: L,
|
55
|
+
value: S,
|
56
|
+
onChange: g,
|
57
|
+
label: f,
|
58
|
+
disabled: l,
|
59
|
+
error: h,
|
60
|
+
isValid: p,
|
61
|
+
endAdornment: C,
|
62
|
+
endAdornmentWidth: y,
|
63
|
+
startAdornmentWidth: x,
|
64
|
+
showStartDivider: !0,
|
65
|
+
startAdornment: /* @__PURE__ */ i(
|
66
|
+
$,
|
92
67
|
{
|
93
|
-
|
94
|
-
|
95
|
-
|
68
|
+
value: s,
|
69
|
+
defaultValue: t,
|
70
|
+
countries: r,
|
96
71
|
onAnimationEnd: (e) => {
|
97
|
-
e
|
72
|
+
e || requestAnimationFrame(() => {
|
73
|
+
var u;
|
74
|
+
(u = a.current) == null || u.focus();
|
75
|
+
});
|
98
76
|
},
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
countryCode: l,
|
105
|
-
hideDialCode: m,
|
106
|
-
dialCode: D
|
107
|
-
}
|
108
|
-
) }),
|
109
|
-
/* @__PURE__ */ t(pe, { className: "h-[96%]", children: /* @__PURE__ */ c("div", { className: "max-w-md w-full mx-auto flex flex-col flex-grow", children: [
|
110
|
-
/* @__PURE__ */ t(P, { variant: "subtitle", level: 2, className: "px-4 py-2", children: "Select country" }),
|
111
|
-
/* @__PURE__ */ t("div", { className: "px-4 pt-2 pb-4", children: /* @__PURE__ */ t(
|
112
|
-
we,
|
113
|
-
{
|
114
|
-
placeholder: "Search name or number",
|
115
|
-
value: C,
|
116
|
-
onChange: ee
|
117
|
-
}
|
118
|
-
) }),
|
119
|
-
/* @__PURE__ */ c(
|
120
|
-
"div",
|
121
|
-
{
|
122
|
-
className: "no-scrollbar mx-auto w-full flex flex-col flex-grow flex-basis-0 overflow-auto p-2",
|
123
|
-
style: {
|
124
|
-
// Explicitly setting flex-basis ensures that the remaining space in the flex container is used,
|
125
|
-
// height issues are fixed, and proper scrolling is enabled.
|
126
|
-
flexBasis: 0
|
127
|
-
},
|
128
|
-
children: [
|
129
|
-
I.map((e) => {
|
130
|
-
const o = O(e), r = u(
|
131
|
-
o.iso2,
|
132
|
-
n
|
133
|
-
);
|
134
|
-
return /* @__PURE__ */ t(Ce, { className: "block w-full", children: /* @__PURE__ */ t(
|
135
|
-
L,
|
136
|
-
{
|
137
|
-
countryCode: r,
|
138
|
-
countryName: o.name,
|
139
|
-
dialCode: `${g}${o.dialCode}`,
|
140
|
-
onClick: () => {
|
141
|
-
A(r), S("");
|
142
|
-
},
|
143
|
-
isSelected: l === r
|
144
|
-
}
|
145
|
-
) }, r);
|
146
|
-
}),
|
147
|
-
I.length === 0 && /* @__PURE__ */ t(P, { variant: "body", level: 2, className: "text-center", children: "No countries found" })
|
148
|
-
]
|
149
|
-
}
|
150
|
-
)
|
151
|
-
] }) })
|
152
|
-
]
|
153
|
-
}
|
154
|
-
) : /* @__PURE__ */ c(
|
155
|
-
re,
|
156
|
-
{
|
157
|
-
value: l,
|
158
|
-
open: h,
|
159
|
-
onOpenChange: f,
|
160
|
-
onValueChange: A,
|
161
|
-
disabled: s,
|
162
|
-
children: [
|
163
|
-
/* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(
|
164
|
-
R,
|
165
|
-
{
|
166
|
-
disabled: s,
|
167
|
-
countryCode: l,
|
168
|
-
hideDialCode: m,
|
169
|
-
dialCode: D
|
170
|
-
}
|
171
|
-
) }),
|
172
|
-
/* @__PURE__ */ t(ae, { children: /* @__PURE__ */ t(
|
173
|
-
le,
|
174
|
-
{
|
175
|
-
ref: (e) => {
|
176
|
-
N.current = e, e && a.current && (e.style.width = `${a.current.offsetWidth}px`);
|
177
|
-
},
|
178
|
-
position: "popper",
|
179
|
-
className: oe(te, "-ml-3 mt-5 w-auto"),
|
180
|
-
onCloseAutoFocus: v,
|
181
|
-
onPointerDown: Z,
|
182
|
-
children: /* @__PURE__ */ t(se, { className: "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] p-2", children: i.map((e) => {
|
183
|
-
const o = O(e), r = u(
|
184
|
-
o.iso2,
|
185
|
-
n
|
186
|
-
);
|
187
|
-
return /* @__PURE__ */ t(
|
188
|
-
ie,
|
189
|
-
{
|
190
|
-
value: r,
|
191
|
-
className: "outline-none",
|
192
|
-
children: /* @__PURE__ */ t(
|
193
|
-
L,
|
194
|
-
{
|
195
|
-
countryCode: r,
|
196
|
-
countryName: o.name,
|
197
|
-
dialCode: `${g}${o.dialCode}`,
|
198
|
-
isSelected: l === r
|
199
|
-
}
|
200
|
-
)
|
201
|
-
},
|
202
|
-
r
|
203
|
-
);
|
204
|
-
}) })
|
205
|
-
}
|
206
|
-
) })
|
207
|
-
]
|
77
|
+
onChange: (e) => {
|
78
|
+
F(e.toLowerCase());
|
79
|
+
},
|
80
|
+
disabled: l,
|
81
|
+
children: /* @__PURE__ */ i(j, { value: s, label: V })
|
208
82
|
}
|
209
83
|
)
|
210
84
|
}
|
211
85
|
);
|
212
86
|
}
|
213
87
|
);
|
214
|
-
|
88
|
+
N.displayName = "PhoneField";
|
215
89
|
export {
|
216
|
-
|
217
|
-
|
90
|
+
N as PhoneField,
|
91
|
+
N as default
|
218
92
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsx as
|
3
|
-
import { Slot as
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
3
|
+
import { Slot as i } 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
4
|
import { cva as n } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
5
5
|
import { forwardRef as s } from "react";
|
6
6
|
import { cn as m } from "../../lib/utils.js";
|
@@ -19,16 +19,16 @@ const f = n(
|
|
19
19
|
}
|
20
20
|
}
|
21
21
|
), c = s(
|
22
|
-
({ checked:
|
23
|
-
a ?
|
22
|
+
({ checked: r, children: t, asChild: a, ...o }, e) => /* @__PURE__ */ l(
|
23
|
+
a ? i : "button",
|
24
24
|
{
|
25
25
|
ref: e,
|
26
26
|
className: m(
|
27
|
-
f({ checked:
|
28
|
-
p({ variant: "
|
27
|
+
f({ checked: r }),
|
28
|
+
p({ variant: "label", level: 2 })
|
29
29
|
),
|
30
30
|
...o,
|
31
|
-
children:
|
31
|
+
children: t
|
32
32
|
}
|
33
33
|
)
|
34
34
|
);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
interface ProgressProps {
|
2
|
+
/** Value between 0 and 100 representing the progress percentage */
|
3
|
+
value: number;
|
4
|
+
/** Whether to use the child element as the progress indicator */
|
5
|
+
asChild?: boolean;
|
6
|
+
/** Maximum value of the progress bar */
|
7
|
+
max?: number;
|
8
|
+
/** A function to get the accessible label text representing the current value in a human-readable format. If not provided, the value label will be read as the numeric value as a percentage of the max value. */
|
9
|
+
getValueLabel?: (value: number) => string;
|
10
|
+
/** The class name of the progress bar. To customize the background color of the progress bar, use background utility classes. To customize the indicator color, use text color utility classes. */
|
11
|
+
className?: string;
|
12
|
+
}
|
13
|
+
export declare const Progress: ({ value, asChild, max, getValueLabel, className }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
|
14
|
+
export {};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
2
|
+
import { cn as n } from "../../lib/utils.js";
|
3
|
+
import { Root as i, Indicator as l } from "../../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";
|
4
|
+
const d = ({ value: r, asChild: e, max: o, getValueLabel: s, className: a }) => /* @__PURE__ */ t(
|
5
|
+
i,
|
6
|
+
{
|
7
|
+
className: n(
|
8
|
+
"relative h-1.5 w-full overflow-hidden rounded-full bg-gray-100",
|
9
|
+
a
|
10
|
+
),
|
11
|
+
style: {
|
12
|
+
// Fix overflow clipping in Safari
|
13
|
+
// https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0
|
14
|
+
transform: "translateZ(0)"
|
15
|
+
},
|
16
|
+
value: r,
|
17
|
+
max: o,
|
18
|
+
asChild: e,
|
19
|
+
getValueLabel: s,
|
20
|
+
children: /* @__PURE__ */ t(
|
21
|
+
l,
|
22
|
+
{
|
23
|
+
className: "ease-[cubic-bezier(0.65, 0, 0.35, 1)] size-full bg-current transition-transform duration-[660ms]",
|
24
|
+
style: { transform: `translateX(-${100 - Math.min(r, 100)}%)` }
|
25
|
+
}
|
26
|
+
)
|
27
|
+
}
|
28
|
+
);
|
29
|
+
export {
|
30
|
+
d as Progress
|
31
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Progress';
|
@@ -8,7 +8,7 @@ const m = c(
|
|
8
8
|
{
|
9
9
|
ref: d,
|
10
10
|
value: a,
|
11
|
-
className: "
|
11
|
+
className: "size-6 rounded-full border-[0.09375rem] transition-all data-[state=checked]:border-gray-900 data-[state=unchecked]:border-gray-200 data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-transparent disabled:cursor-not-allowed disabled:opacity-50",
|
12
12
|
disabled: r,
|
13
13
|
...t,
|
14
14
|
children: /* @__PURE__ */ e(s, { className: "flex items-center justify-center", children: /* @__PURE__ */ e(i, { className: "text-gray-0" }) })
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { InputProps } from '../Input';
|
2
|
-
export interface SearchFieldProps extends Omit<InputProps, "startAdornment" | "startAdornmentWidth"> {
|
2
|
+
export interface SearchFieldProps extends Omit<InputProps, "startAdornment" | "startAdornmentWidth" | "placeholder"> {
|
3
3
|
/**
|
4
4
|
* If true, the input will display in an error state with error styling
|
5
5
|
*/
|
@@ -18,6 +18,11 @@ export interface SearchFieldProps extends Omit<InputProps, "startAdornment" | "s
|
|
18
18
|
* @default "Paste"
|
19
19
|
*/
|
20
20
|
pasteButtonLabel?: string;
|
21
|
+
/**
|
22
|
+
* Label for the input
|
23
|
+
* @default "Search"
|
24
|
+
*/
|
25
|
+
label?: string;
|
21
26
|
}
|
22
27
|
export declare const SearchField: import('react').ForwardRefExoticComponent<SearchFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
23
28
|
export default SearchField;
|
@@ -1,62 +1,64 @@
|
|
1
1
|
"use client";
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
3
|
-
import { createChangeEvent as
|
4
|
-
import { forwardRef as
|
5
|
-
import
|
6
|
-
import { Magnifier as
|
7
|
-
import { Input as
|
8
|
-
import
|
9
|
-
const
|
3
|
+
import { createChangeEvent as c } from "../../lib/utils.js";
|
4
|
+
import { forwardRef as T, useRef as W, useState as i, useImperativeHandle as N } from "react";
|
5
|
+
import R from "../ClearButton/ClearButton.js";
|
6
|
+
import { Magnifier as x } from "../Icons/Magnifier.js";
|
7
|
+
import { Input as E } from "../Input/Input.js";
|
8
|
+
import H, { PASTE_BUTTON_WIDTH as _ } from "../PasteButton/PasteButton.js";
|
9
|
+
const j = T(
|
10
10
|
({
|
11
|
-
showPasteButton:
|
12
|
-
pasteButtonLabel:
|
13
|
-
isValid:
|
14
|
-
disabled:
|
11
|
+
showPasteButton: l,
|
12
|
+
pasteButtonLabel: d,
|
13
|
+
isValid: s,
|
14
|
+
disabled: u,
|
15
15
|
type: h = "search",
|
16
16
|
autoComplete: A = "off",
|
17
17
|
spellCheck: F = "false",
|
18
|
-
endAdornment:
|
19
|
-
endAdornmentWidth:
|
18
|
+
endAdornment: B,
|
19
|
+
endAdornmentWidth: C,
|
20
|
+
label: I = "Search",
|
20
21
|
...e
|
21
|
-
},
|
22
|
-
const r =
|
23
|
-
|
24
|
-
let
|
25
|
-
return
|
26
|
-
|
22
|
+
}, P) => {
|
23
|
+
const r = W(null), [S, o] = i(!1), [g, v] = i(!1);
|
24
|
+
N(P, () => r.current);
|
25
|
+
let f = B, m = C;
|
26
|
+
return l && !u && !g ? (f = /* @__PURE__ */ a(
|
27
|
+
H,
|
27
28
|
{
|
28
29
|
inputRef: r,
|
29
|
-
label:
|
30
|
+
label: d,
|
30
31
|
onPaste: () => {
|
31
32
|
var t;
|
32
33
|
if (r.current) {
|
33
|
-
const n =
|
34
|
-
(t = e.onChange) == null || t.call(e, n);
|
34
|
+
const n = c(r.current);
|
35
|
+
(t = e.onChange) == null || t.call(e, n), v(!0);
|
35
36
|
}
|
36
37
|
}
|
37
38
|
}
|
38
|
-
), m =
|
39
|
-
|
39
|
+
), m = _) : S && !u && (f = /* @__PURE__ */ a(
|
40
|
+
R,
|
40
41
|
{
|
41
42
|
inputRef: r,
|
42
43
|
onClear: () => {
|
43
44
|
var t;
|
44
45
|
if (r.current) {
|
45
|
-
const n =
|
46
|
+
const n = c(r.current);
|
46
47
|
(t = e.onChange) == null || t.call(e, n);
|
47
48
|
}
|
48
49
|
}
|
49
50
|
}
|
50
|
-
), m =
|
51
|
-
|
51
|
+
), m = 2.3), /* @__PURE__ */ a(
|
52
|
+
E,
|
52
53
|
{
|
53
54
|
...e,
|
54
55
|
ref: r,
|
55
|
-
startAdornment: /* @__PURE__ */ a(
|
56
|
-
isValid:
|
57
|
-
disabled:
|
56
|
+
startAdornment: /* @__PURE__ */ a(x, {}),
|
57
|
+
isValid: s,
|
58
|
+
disabled: u,
|
59
|
+
startAdornmentWidth: 2.3,
|
58
60
|
endAdornmentWidth: m,
|
59
|
-
endAdornment:
|
61
|
+
endAdornment: f,
|
60
62
|
type: h,
|
61
63
|
autoComplete: A,
|
62
64
|
spellCheck: F,
|
@@ -64,16 +66,18 @@ const H = v(
|
|
64
66
|
var n;
|
65
67
|
o(!0), (n = e.onFocus) == null || n.call(e, t);
|
66
68
|
},
|
69
|
+
label: I,
|
67
70
|
onBlur: (t) => {
|
68
71
|
var n;
|
69
72
|
o(!1), (n = e.onBlur) == null || n.call(e, t);
|
70
|
-
}
|
73
|
+
},
|
74
|
+
className: "rounded-full h-[3.125rem]"
|
71
75
|
}
|
72
76
|
);
|
73
77
|
}
|
74
78
|
);
|
75
|
-
|
79
|
+
j.displayName = "SearchField";
|
76
80
|
export {
|
77
|
-
|
78
|
-
|
81
|
+
j as SearchField,
|
82
|
+
j as default
|
79
83
|
};
|