@worldcoin/mini-apps-ui-kit-react 0.0.2 → 0.0.3
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/LICENSE.md +1 -1
- package/README.md +24 -0
- package/dist/components/Flag/index.d.ts +1 -0
- package/dist/components/Flag/index.js +6 -4
- package/dist/components/PhoneField/PhoneField.d.ts +6 -1
- package/dist/components/PhoneField/PhoneField.js +121 -117
- package/dist/components/PhoneField/constants.d.ts +1 -1
- package/dist/components/PhoneField/constants.js +4 -4
- package/dist/components/PhoneField/index.d.ts +1 -0
- package/dist/components/PhoneField/index.js +3 -1
- package/dist/components/PhoneField/utils.d.ts +1 -0
- package/dist/components/PhoneField/utils.js +20 -11
- package/dist/index.js +41 -37
- package/package.json +14 -12
- package/public/globals.css +1 -1881
- package/public/SFMono-Regular.otf +0 -0
package/LICENSE.md
CHANGED
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -89,3 +89,27 @@ To use the UI Kit components with their proper styling, you need to import the s
|
|
89
89
|
```typescript
|
90
90
|
import "@worldcoin/mini-apps-ui-kit-react/styles.css";
|
91
91
|
```
|
92
|
+
|
93
|
+
## Import Methods
|
94
|
+
|
95
|
+
The library supports two different import methods:
|
96
|
+
|
97
|
+
### Default Import
|
98
|
+
|
99
|
+
Import components from the main entry point:
|
100
|
+
|
101
|
+
```typescript
|
102
|
+
import { Button } from "@worldcoin/mini-apps-ui-kit-react";
|
103
|
+
```
|
104
|
+
|
105
|
+
This method is simpler but includes all components in your bundle, even if you're not using them.
|
106
|
+
|
107
|
+
### Component-Level Import
|
108
|
+
|
109
|
+
Import components directly from their individual modules:
|
110
|
+
|
111
|
+
```typescript
|
112
|
+
import { Button } from "@worldcoin/mini-apps-ui-kit-react/Button";
|
113
|
+
```
|
114
|
+
|
115
|
+
This method enables tree-shaking and reduces your final bundle size by only including the components you actually use. Recommended for production applications where bundle size is a concern.
|
@@ -1,6 +1,8 @@
|
|
1
|
-
import { Flag as
|
2
|
-
import { LazyFlag as
|
1
|
+
import { Flag as e } from "./Flag.js";
|
2
|
+
import { LazyFlag as t } from "./LazyFlag.js";
|
3
|
+
import { isSupportedCountryCode as f } from "./utils.js";
|
3
4
|
export {
|
4
|
-
|
5
|
-
|
5
|
+
e as Flag,
|
6
|
+
t as LazyFlag,
|
7
|
+
f as isSupportedCountryCode
|
6
8
|
};
|
@@ -8,7 +8,12 @@ export interface PhoneFieldProps extends Omit<InputProps, "onChange" | "startAdo
|
|
8
8
|
/**
|
9
9
|
* Callback triggered when the phone number changes.
|
10
10
|
*/
|
11
|
-
onChange?: (phone: string) => void;
|
11
|
+
onChange?: (phone: string, countryCode: CountryCode) => void;
|
12
|
+
/**
|
13
|
+
* List of countries to display in the country selector.
|
14
|
+
* If not provided, all countries will be displayed.
|
15
|
+
*/
|
16
|
+
countries?: CountryCode[];
|
12
17
|
/**
|
13
18
|
* If true, the dial code will be hidden.
|
14
19
|
* The dial code is still displayed at the start of the input and in the dropdown.
|
@@ -1,108 +1,112 @@
|
|
1
1
|
"use client";
|
2
|
-
import { jsx as o, jsxs as
|
3
|
-
import { DROPDOWN_CONTAINER_STYLES as
|
4
|
-
import { cn as
|
5
|
-
import { Root as
|
6
|
-
import { forwardRef as
|
7
|
-
import { usePhoneInput as le, parseCountry as
|
8
|
-
import { Drawer as
|
9
|
-
import { Input as
|
10
|
-
import { SearchField as
|
11
|
-
import { Typography as
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import {
|
15
|
-
import { getValidatedCountryCode as
|
16
|
-
const
|
2
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
3
|
+
import { DROPDOWN_CONTAINER_STYLES as J } from "../../lib/constants/dropdownStyles.js";
|
4
|
+
import { cn as K } from "../../lib/utils.js";
|
5
|
+
import { Root as Q, Trigger as Z, Portal as ee, Content as oe, Viewport as te, Item as re } 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";
|
6
|
+
import { forwardRef as ne, useRef as ae, useState as w, useMemo as F, useImperativeHandle as se } from "react";
|
7
|
+
import { usePhoneInput as le, parseCountry as O } from "../../node_modules/.pnpm/react-international-phone@4.4.0_react@18.3.1/node_modules/react-international-phone/dist/index.js";
|
8
|
+
import { Drawer as ie, DrawerTrigger as ce, DrawerContent as ue, DrawerClose as de } from "../Drawer/Drawer.js";
|
9
|
+
import { Input as me } from "../Input/Input.js";
|
10
|
+
import { SearchField as he } from "../SearchField/SearchField.js";
|
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 pe } from "./constants.js";
|
15
|
+
import { getCountryDataListByCodes as fe, getValidatedCountryCode as u, filterCountries as Ce } from "./utils.js";
|
16
|
+
const ye = ne(
|
17
17
|
({
|
18
|
-
value:
|
19
|
-
onChange:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
value: T,
|
19
|
+
onChange: d,
|
20
|
+
countries: x,
|
21
|
+
placeholder: $ = "Enter phone number",
|
22
|
+
defaultCountryCode: n = "US",
|
23
|
+
hideDialCode: m = !1,
|
24
|
+
disableDialCodePrefill: E = !0,
|
25
|
+
disabled: l = !1,
|
26
|
+
error: b = !1,
|
27
|
+
isValid: V,
|
28
|
+
endAdornment: W,
|
29
|
+
endAdornmentWidth: B,
|
30
|
+
countrySelectorMode: _ = "dropdown",
|
31
|
+
...j
|
32
|
+
}, k) => {
|
33
|
+
const N = ae(null), [h, p] = w(!1), [M, f] = w(!1), [C, S] = w(""), i = F(() => fe(x), [x]), { inputValue: q, country: y, inputRef: a, handlePhoneValueChange: H, setCountry: U } = le(
|
33
34
|
{
|
34
|
-
defaultCountry:
|
35
|
-
disableDialCodePrefill:
|
36
|
-
value:
|
37
|
-
countries:
|
35
|
+
defaultCountry: n.toLowerCase(),
|
36
|
+
disableDialCodePrefill: E,
|
37
|
+
value: T,
|
38
|
+
countries: i,
|
38
39
|
onChange: (e) => {
|
39
|
-
|
40
|
+
d == null || d(
|
41
|
+
e.phone,
|
42
|
+
u(e.country.iso2, n)
|
43
|
+
);
|
40
44
|
}
|
41
45
|
}
|
42
|
-
),
|
43
|
-
|
46
|
+
), s = u(y.iso2, n), X = 2.8, D = `${g}${y.dialCode}`, Y = m ? X : pe[y.dialCode.length];
|
47
|
+
se(k, () => a.current);
|
44
48
|
const v = (e) => {
|
45
|
-
e == null || e.preventDefault(),
|
49
|
+
e == null || e.preventDefault(), M && requestAnimationFrame(() => {
|
46
50
|
var t;
|
47
|
-
(t =
|
48
|
-
}),
|
49
|
-
},
|
51
|
+
(t = a.current) == null || t.focus();
|
52
|
+
}), f(!1);
|
53
|
+
}, z = (e) => {
|
50
54
|
var r;
|
51
|
-
const t = (r =
|
52
|
-
|
53
|
-
},
|
54
|
-
|
55
|
-
},
|
56
|
-
|
57
|
-
},
|
58
|
-
() =>
|
59
|
-
[
|
55
|
+
const t = (r = N.current) == null ? void 0 : r.contains(e.target);
|
56
|
+
f(!!t);
|
57
|
+
}, A = (e) => {
|
58
|
+
U(e.toLowerCase()), p(!1);
|
59
|
+
}, G = (e) => {
|
60
|
+
S(e.target.value);
|
61
|
+
}, I = F(
|
62
|
+
() => Ce(i, C),
|
63
|
+
[i, C]
|
60
64
|
);
|
61
65
|
return /* @__PURE__ */ o(
|
62
|
-
|
66
|
+
me,
|
63
67
|
{
|
64
|
-
...
|
65
|
-
ref:
|
66
|
-
value:
|
67
|
-
onChange:
|
68
|
-
placeholder:
|
69
|
-
disabled:
|
70
|
-
error:
|
71
|
-
isValid:
|
72
|
-
endAdornment:
|
73
|
-
endAdornmentWidth:
|
74
|
-
startAdornmentWidth:
|
75
|
-
isFocused:
|
76
|
-
startAdornment:
|
77
|
-
|
68
|
+
...j,
|
69
|
+
ref: a,
|
70
|
+
value: q,
|
71
|
+
onChange: H,
|
72
|
+
placeholder: $,
|
73
|
+
disabled: l,
|
74
|
+
error: b,
|
75
|
+
isValid: V,
|
76
|
+
endAdornment: W,
|
77
|
+
endAdornmentWidth: B,
|
78
|
+
startAdornmentWidth: Y,
|
79
|
+
isFocused: h,
|
80
|
+
startAdornment: _ === "drawer" ? /* @__PURE__ */ c(
|
81
|
+
ie,
|
78
82
|
{
|
79
|
-
open:
|
80
|
-
onOpenChange:
|
83
|
+
open: h,
|
84
|
+
onOpenChange: p,
|
81
85
|
onClose: v,
|
82
86
|
onAnimationEnd: (e) => {
|
83
|
-
e &&
|
87
|
+
e && f(!0);
|
84
88
|
},
|
85
89
|
children: [
|
86
|
-
/* @__PURE__ */ o(
|
87
|
-
|
90
|
+
/* @__PURE__ */ o(ce, { asChild: !0, className: "outline-none", children: /* @__PURE__ */ o(
|
91
|
+
R,
|
88
92
|
{
|
89
|
-
disabled:
|
90
|
-
countryCode:
|
91
|
-
hideDialCode:
|
92
|
-
dialCode:
|
93
|
+
disabled: l,
|
94
|
+
countryCode: s,
|
95
|
+
hideDialCode: m,
|
96
|
+
dialCode: D
|
93
97
|
}
|
94
98
|
) }),
|
95
|
-
/* @__PURE__ */ o(
|
96
|
-
/* @__PURE__ */ o(
|
99
|
+
/* @__PURE__ */ o(ue, { className: "h-[96%]", children: /* @__PURE__ */ c("div", { className: "max-w-md w-full mx-auto flex flex-col flex-grow", children: [
|
100
|
+
/* @__PURE__ */ o(P, { variant: "subtitle", level: 2, className: "px-4 py-2", children: "Select country" }),
|
97
101
|
/* @__PURE__ */ o("div", { className: "px-4 pt-2 pb-4", children: /* @__PURE__ */ o(
|
98
|
-
|
102
|
+
he,
|
99
103
|
{
|
100
104
|
placeholder: "Search name or number",
|
101
|
-
value:
|
102
|
-
onChange:
|
105
|
+
value: C,
|
106
|
+
onChange: G
|
103
107
|
}
|
104
108
|
) }),
|
105
|
-
/* @__PURE__ */
|
109
|
+
/* @__PURE__ */ c(
|
106
110
|
"div",
|
107
111
|
{
|
108
112
|
className: "no-scrollbar mx-auto w-full flex flex-col flex-grow flex-basis-0 overflow-auto p-2",
|
@@ -112,76 +116,76 @@ const fe = te(
|
|
112
116
|
flexBasis: 0
|
113
117
|
},
|
114
118
|
children: [
|
115
|
-
|
116
|
-
const t =
|
119
|
+
I.map((e) => {
|
120
|
+
const t = O(e), r = u(
|
117
121
|
t.iso2,
|
118
|
-
|
122
|
+
n
|
119
123
|
);
|
120
|
-
return /* @__PURE__ */ o(
|
121
|
-
|
124
|
+
return /* @__PURE__ */ o(de, { className: "block w-full", children: /* @__PURE__ */ o(
|
125
|
+
L,
|
122
126
|
{
|
123
127
|
countryCode: r,
|
124
128
|
countryName: t.name,
|
125
|
-
dialCode: `${
|
129
|
+
dialCode: `${g}${t.dialCode}`,
|
126
130
|
onClick: () => {
|
127
|
-
|
131
|
+
A(r), S("");
|
128
132
|
},
|
129
|
-
isSelected:
|
133
|
+
isSelected: s === r
|
130
134
|
}
|
131
135
|
) }, r);
|
132
136
|
}),
|
133
|
-
|
137
|
+
I.length === 0 && /* @__PURE__ */ o(P, { variant: "body", level: 2, className: "text-center", children: "No countries found" })
|
134
138
|
]
|
135
139
|
}
|
136
140
|
)
|
137
141
|
] }) })
|
138
142
|
]
|
139
143
|
}
|
140
|
-
) : /* @__PURE__ */
|
141
|
-
|
144
|
+
) : /* @__PURE__ */ c(
|
145
|
+
Q,
|
142
146
|
{
|
143
|
-
value:
|
144
|
-
open:
|
145
|
-
onOpenChange:
|
146
|
-
onValueChange:
|
147
|
-
disabled:
|
147
|
+
value: s,
|
148
|
+
open: h,
|
149
|
+
onOpenChange: p,
|
150
|
+
onValueChange: A,
|
151
|
+
disabled: l,
|
148
152
|
children: [
|
149
|
-
/* @__PURE__ */ o(
|
150
|
-
|
153
|
+
/* @__PURE__ */ o(Z, { children: /* @__PURE__ */ o(
|
154
|
+
R,
|
151
155
|
{
|
152
|
-
disabled:
|
153
|
-
countryCode:
|
154
|
-
hideDialCode:
|
155
|
-
dialCode:
|
156
|
+
disabled: l,
|
157
|
+
countryCode: s,
|
158
|
+
hideDialCode: m,
|
159
|
+
dialCode: D
|
156
160
|
}
|
157
161
|
) }),
|
158
|
-
/* @__PURE__ */ o(
|
159
|
-
|
162
|
+
/* @__PURE__ */ o(ee, { children: /* @__PURE__ */ o(
|
163
|
+
oe,
|
160
164
|
{
|
161
165
|
ref: (e) => {
|
162
|
-
|
166
|
+
N.current = e, e && a.current && (e.style.width = `${a.current.offsetWidth}px`);
|
163
167
|
},
|
164
168
|
position: "popper",
|
165
|
-
className:
|
169
|
+
className: K(J, "-ml-3 mt-5 w-auto"),
|
166
170
|
onCloseAutoFocus: v,
|
167
|
-
onPointerDown:
|
168
|
-
children: /* @__PURE__ */ o(
|
169
|
-
const t =
|
171
|
+
onPointerDown: z,
|
172
|
+
children: /* @__PURE__ */ o(te, { className: "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] p-2", children: i.map((e) => {
|
173
|
+
const t = O(e), r = u(
|
170
174
|
t.iso2,
|
171
|
-
|
175
|
+
n
|
172
176
|
);
|
173
177
|
return /* @__PURE__ */ o(
|
174
|
-
|
178
|
+
re,
|
175
179
|
{
|
176
180
|
value: r,
|
177
181
|
className: "outline-none",
|
178
182
|
children: /* @__PURE__ */ o(
|
179
|
-
|
183
|
+
L,
|
180
184
|
{
|
181
185
|
countryCode: r,
|
182
186
|
countryName: t.name,
|
183
|
-
dialCode: `${
|
184
|
-
isSelected:
|
187
|
+
dialCode: `${g}${t.dialCode}`,
|
188
|
+
isSelected: s === r
|
185
189
|
}
|
186
190
|
)
|
187
191
|
},
|
@@ -197,8 +201,8 @@ const fe = te(
|
|
197
201
|
);
|
198
202
|
}
|
199
203
|
);
|
200
|
-
|
204
|
+
ye.displayName = "PhoneField";
|
201
205
|
export {
|
202
|
-
|
203
|
-
|
206
|
+
ye as PhoneField,
|
207
|
+
ye as default
|
204
208
|
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { CountryData } from 'react-international-phone';
|
2
|
-
export declare const
|
2
|
+
export declare const extendedCountryDataList: CountryData[];
|
3
3
|
export declare const DIAL_CODE_PREFIX = "+";
|
4
4
|
export declare const startAdornmentWidthByDialCodeLength: Record<string, number>;
|
@@ -10,10 +10,10 @@ const r = new Set(
|
|
10
10
|
), l = Object.entries(i).filter(([o]) => m.includes(o.toLowerCase())).map(([o, t]) => {
|
11
11
|
const { name: n, phone: a } = t, u = a[0].toString(), C = o.toLowerCase();
|
12
12
|
return [n, C, u];
|
13
|
-
}),
|
13
|
+
}), w = [
|
14
14
|
...c,
|
15
15
|
...l
|
16
|
-
].sort((o, t) => o[0].localeCompare(t[0])), h = "+",
|
16
|
+
].sort((o, t) => o[0].localeCompare(t[0])), h = "+", D = {
|
17
17
|
1: 4.4,
|
18
18
|
2: 5.2,
|
19
19
|
3: 5.8,
|
@@ -21,6 +21,6 @@ const r = new Set(
|
|
21
21
|
};
|
22
22
|
export {
|
23
23
|
h as DIAL_CODE_PREFIX,
|
24
|
-
|
25
|
-
|
24
|
+
w as extendedCountryDataList,
|
25
|
+
D as startAdornmentWidthByDialCodeLength
|
26
26
|
};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { CountryData } from 'react-international-phone';
|
2
2
|
import { CountryCode } from '../Flag';
|
3
3
|
export declare const getValidatedCountryCode: (code: string, defaultCountryCode: CountryCode) => CountryCode;
|
4
|
+
export declare const getCountryDataListByCodes: (countryCodes: CountryCode[] | undefined) => CountryData[];
|
4
5
|
export declare const filterCountries: (countries: CountryData[], searchText: string) => CountryData[];
|
@@ -1,14 +1,23 @@
|
|
1
1
|
import { parseCountry as a } from "../../node_modules/.pnpm/react-international-phone@4.4.0_react@18.3.1/node_modules/react-international-phone/dist/index.js";
|
2
|
-
import { isSupportedCountryCode as
|
3
|
-
import { DIAL_CODE_PREFIX as
|
4
|
-
const
|
5
|
-
const r =
|
6
|
-
return
|
7
|
-
},
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
import { isSupportedCountryCode as u } from "../Flag/utils.js";
|
3
|
+
import { extendedCountryDataList as s, DIAL_CODE_PREFIX as p } from "./constants.js";
|
4
|
+
const f = (t, e) => {
|
5
|
+
const r = t.toUpperCase();
|
6
|
+
return u(r) ? r : e;
|
7
|
+
}, m = (t) => {
|
8
|
+
if (!(t != null && t.length))
|
9
|
+
return s;
|
10
|
+
const e = new Set(t);
|
11
|
+
return s.filter((r) => {
|
12
|
+
const o = a(r).iso2.toUpperCase();
|
13
|
+
return e.has(o);
|
14
|
+
});
|
15
|
+
}, L = (t, e) => e ? t.filter((r) => {
|
16
|
+
const o = a(r), i = o.name.toLowerCase(), C = `${p}${o.dialCode.toLowerCase()}`, n = e.toLowerCase();
|
17
|
+
return i.includes(n) || C.includes(n);
|
18
|
+
}) : t;
|
11
19
|
export {
|
12
|
-
|
13
|
-
m as
|
20
|
+
L as filterCountries,
|
21
|
+
m as getCountryDataListByCodes,
|
22
|
+
f as getValidatedCountryCode
|
14
23
|
};
|
package/dist/index.js
CHANGED
@@ -2,52 +2,56 @@ import { Button as t } from "./components/Button/Button.js";
|
|
2
2
|
import { Checkbox as m } from "./components/Checkbox/Checkbox.js";
|
3
3
|
import { Chip as f } from "./components/Chip/Chip.js";
|
4
4
|
import { ColorPickerGroup as x, ColorPickerItem as n } from "./components/ColorPicker/ColorPicker.js";
|
5
|
-
import { Flag as
|
6
|
-
import { LazyFlag as
|
5
|
+
import { Flag as d } from "./components/Flag/Flag.js";
|
6
|
+
import { LazyFlag as s } from "./components/Flag/LazyFlag.js";
|
7
|
+
import { isSupportedCountryCode as c } from "./components/Flag/utils.js";
|
7
8
|
import * as r from "./components/Form/Form.js";
|
8
|
-
import { Input as F, iconVariants as
|
9
|
+
import { Input as F, iconVariants as h, inputVariants as y } from "./components/Input/Input.js";
|
9
10
|
import { ListItem as w } from "./components/ListItem/ListItem.js";
|
10
|
-
import { NumberPad as
|
11
|
-
import { OTPField as
|
12
|
-
import { Pill as
|
13
|
-
import { RadioGroup as
|
14
|
-
import { RadioGroupItem as
|
15
|
-
import { Select as
|
16
|
-
import { SearchField as
|
17
|
-
import { PhoneField as
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
import {
|
21
|
-
import {
|
22
|
-
import {
|
11
|
+
import { NumberPad as k } from "./components/NumberPad/NumberPad.js";
|
12
|
+
import { OTPField as I } from "./components/OTPField/OTPField.js";
|
13
|
+
import { Pill as V } from "./components/Pill/Pill.js";
|
14
|
+
import { RadioGroup as b } from "./components/RadioGroup/RadioGroup.js";
|
15
|
+
import { RadioGroupItem as R } from "./components/RadioGroup/RadioGroupItem.js";
|
16
|
+
import { Select as z } from "./components/Select/Select.js";
|
17
|
+
import { SearchField as K } from "./components/SearchField/SearchField.js";
|
18
|
+
import { PhoneField as O } from "./components/PhoneField/PhoneField.js";
|
19
|
+
import { getValidatedCountryCode as q } from "./components/PhoneField/utils.js";
|
20
|
+
import { Switch as A } from "./components/Switch/Switch.js";
|
21
|
+
import { Token as H } from "./components/Token/Token.js";
|
22
|
+
import { Typography as M, typographyVariants as Q } from "./components/Typography/Typography.js";
|
23
|
+
import { Drawer as W, DrawerClose as X, DrawerContent as Y, DrawerTrigger as Z } from "./components/Drawer/Drawer.js";
|
24
|
+
import { default as rr } from "./tailwind/index.js";
|
23
25
|
export {
|
24
26
|
t as Button,
|
25
27
|
m as Checkbox,
|
26
28
|
f as Chip,
|
27
29
|
x as ColorPickerGroup,
|
28
30
|
n as ColorPickerItem,
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
W as Drawer,
|
32
|
+
X as DrawerClose,
|
33
|
+
Y as DrawerContent,
|
34
|
+
Z as DrawerTrigger,
|
35
|
+
d as Flag,
|
34
36
|
r as Form,
|
35
37
|
F as Input,
|
36
|
-
|
38
|
+
s as LazyFlag,
|
37
39
|
w as ListItem,
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
h as
|
51
|
-
|
52
|
-
|
40
|
+
k as NumberPad,
|
41
|
+
I as OTPField,
|
42
|
+
O as PhoneField,
|
43
|
+
V as Pill,
|
44
|
+
b as RadioGroup,
|
45
|
+
R as RadioGroupItem,
|
46
|
+
K as SearchField,
|
47
|
+
z as Select,
|
48
|
+
A as Switch,
|
49
|
+
H as Token,
|
50
|
+
M as Typography,
|
51
|
+
q as getValidatedCountryCode,
|
52
|
+
h as iconVariants,
|
53
|
+
y as inputVariants,
|
54
|
+
c as isSupportedCountryCode,
|
55
|
+
Q as typographyVariants,
|
56
|
+
rr as uiKitTailwindPlugin
|
53
57
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@worldcoin/mini-apps-ui-kit-react",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.3",
|
4
4
|
"type": "module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -99,16 +99,6 @@
|
|
99
99
|
},
|
100
100
|
"./styles.css": "./public/globals.css"
|
101
101
|
},
|
102
|
-
"scripts": {
|
103
|
-
"storybook": "storybook dev -p 6006",
|
104
|
-
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
105
|
-
"sb:move": "mv ./storybook-static ../../storybook-static",
|
106
|
-
"dev:sb": "concurrently \"tailwindcss -i ./styles/globals.css -o ./public/globals.css --watch\" \"pnpm storybook\"",
|
107
|
-
"build:tailwind": "tailwindcss -i ./styles/globals.css -o ./public/globals.css",
|
108
|
-
"build:sb": "pnpm build:tailwind && storybook build",
|
109
|
-
"build": "pnpm build:tailwind && tsc -b ./tsconfig.lib.json && vite build",
|
110
|
-
"lint": "eslint ."
|
111
|
-
},
|
112
102
|
"peerDependencies": {
|
113
103
|
"react": "^18 || ^19",
|
114
104
|
"react-dom": "^18 || ^19",
|
@@ -126,9 +116,11 @@
|
|
126
116
|
"@storybook/addon-interactions": "^8.4.7",
|
127
117
|
"@storybook/addon-onboarding": "^8.4.7",
|
128
118
|
"@storybook/blocks": "^8.4.7",
|
119
|
+
"@storybook/manager-api": "^8.5.5",
|
129
120
|
"@storybook/react": "^8.4.7",
|
130
121
|
"@storybook/react-vite": "^8.4.7",
|
131
122
|
"@storybook/test": "^8.4.7",
|
123
|
+
"@storybook/theming": "^8.5.5",
|
132
124
|
"@types/glob": "^8.1.0",
|
133
125
|
"@types/react": "^18.3.12",
|
134
126
|
"@types/react-dom": "^18.3.1",
|
@@ -168,5 +160,15 @@
|
|
168
160
|
},
|
169
161
|
"description": "React components UI Kit library for Mini Apps",
|
170
162
|
"author": "",
|
171
|
-
"license": "ISC"
|
163
|
+
"license": "ISC",
|
164
|
+
"scripts": {
|
165
|
+
"storybook": "storybook dev -p 6006",
|
166
|
+
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
167
|
+
"sb:move": "mv ./storybook-static ../../storybook-static",
|
168
|
+
"dev:sb": "concurrently \"tailwindcss -i ./styles/globals.css -o ./public/globals.css --watch\" \"pnpm storybook\"",
|
169
|
+
"build:tailwind": "tailwindcss -i ./styles/globals.css -o ./public/globals.css --minify",
|
170
|
+
"build:sb": "pnpm build:tailwind && storybook build",
|
171
|
+
"build": "pnpm build:tailwind && tsc -b ./tsconfig.lib.json && vite build",
|
172
|
+
"lint": "eslint ."
|
173
|
+
}
|
172
174
|
}
|