@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 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,3 +1,4 @@
1
1
  export * from './Flag';
2
2
  export * from './LazyFlag';
3
+ export { isSupportedCountryCode } from './utils';
3
4
  export type { CountryCode } from './Flag';
@@ -1,6 +1,8 @@
1
- import { Flag as a } from "./Flag.js";
2
- import { LazyFlag as f } from "./LazyFlag.js";
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
- a as Flag,
5
- f as LazyFlag
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 i } from "react/jsx-runtime";
3
- import { DROPDOWN_CONTAINER_STYLES as z } from "../../lib/constants/dropdownStyles.js";
4
- import { cn as G } from "../../lib/utils.js";
5
- import { Root as J, Trigger as K, Portal as Q, Content as Z, Viewport as ee, Item as oe } 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 te, useRef as re, useState as w, useImperativeHandle as ne, useMemo as ae } from "react";
7
- import { usePhoneInput as le, parseCountry as I } 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 se, DrawerTrigger as ie, DrawerContent as ce, DrawerClose as ue } from "../Drawer/Drawer.js";
9
- import { Input as de } from "../Input/Input.js";
10
- import { SearchField as me } from "../SearchField/SearchField.js";
11
- import { Typography as F } from "../Typography/Typography.js";
12
- import O from "./CountryListItem.js";
13
- import P from "./CountrySelectorButton.js";
14
- import { extendedCountries as c, DIAL_CODE_PREFIX as y, startAdornmentWidthByDialCodeLength as he } from "./constants.js";
15
- import { getValidatedCountryCode as x, filterCountries as pe } from "./utils.js";
16
- const fe = te(
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: R,
19
- onChange: u,
20
- placeholder: T = "Enter phone number",
21
- defaultCountryCode: l = "US",
22
- hideDialCode: d = !1,
23
- disableDialCodePrefill: $ = !0,
24
- disabled: s = !1,
25
- error: E = !1,
26
- isValid: L,
27
- endAdornment: b,
28
- endAdornmentWidth: V,
29
- countrySelectorMode: W = "dropdown",
30
- ..._
31
- }, B) => {
32
- const g = re(null), [m, h] = w(!1), [j, p] = w(!1), [f, N] = w(""), { inputValue: k, country: C, inputRef: n, handlePhoneValueChange: M, setCountry: q } = le(
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: l.toLowerCase(),
35
- disableDialCodePrefill: $,
36
- value: R,
37
- countries: c,
35
+ defaultCountry: n.toLowerCase(),
36
+ disableDialCodePrefill: E,
37
+ value: T,
38
+ countries: i,
38
39
  onChange: (e) => {
39
- u == null || u(e.phone);
40
+ d == null || d(
41
+ e.phone,
42
+ u(e.country.iso2, n)
43
+ );
40
44
  }
41
45
  }
42
- ), a = x(C.iso2, l), H = 2.8, S = `${y}${C.dialCode}`, U = d ? H : he[C.dialCode.length];
43
- ne(B, () => n.current);
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(), j && requestAnimationFrame(() => {
49
+ e == null || e.preventDefault(), M && requestAnimationFrame(() => {
46
50
  var t;
47
- (t = n.current) == null || t.focus();
48
- }), p(!1);
49
- }, X = (e) => {
51
+ (t = a.current) == null || t.focus();
52
+ }), f(!1);
53
+ }, z = (e) => {
50
54
  var r;
51
- const t = (r = g.current) == null ? void 0 : r.contains(e.target);
52
- p(!!t);
53
- }, D = (e) => {
54
- q(e.toLowerCase()), h(!1);
55
- }, Y = (e) => {
56
- N(e.target.value);
57
- }, A = ae(
58
- () => pe(c, f),
59
- [c, f]
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
- de,
66
+ me,
63
67
  {
64
- ..._,
65
- ref: n,
66
- value: k,
67
- onChange: M,
68
- placeholder: T,
69
- disabled: s,
70
- error: E,
71
- isValid: L,
72
- endAdornment: b,
73
- endAdornmentWidth: V,
74
- startAdornmentWidth: U,
75
- isFocused: m,
76
- startAdornment: W === "drawer" ? /* @__PURE__ */ i(
77
- se,
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: m,
80
- onOpenChange: h,
83
+ open: h,
84
+ onOpenChange: p,
81
85
  onClose: v,
82
86
  onAnimationEnd: (e) => {
83
- e && p(!0);
87
+ e && f(!0);
84
88
  },
85
89
  children: [
86
- /* @__PURE__ */ o(ie, { asChild: !0, className: "outline-none", children: /* @__PURE__ */ o(
87
- P,
90
+ /* @__PURE__ */ o(ce, { asChild: !0, className: "outline-none", children: /* @__PURE__ */ o(
91
+ R,
88
92
  {
89
- disabled: s,
90
- countryCode: a,
91
- hideDialCode: d,
92
- dialCode: S
93
+ disabled: l,
94
+ countryCode: s,
95
+ hideDialCode: m,
96
+ dialCode: D
93
97
  }
94
98
  ) }),
95
- /* @__PURE__ */ o(ce, { className: "h-[96%]", children: /* @__PURE__ */ i("div", { className: "max-w-md w-full mx-auto flex flex-col flex-grow", children: [
96
- /* @__PURE__ */ o(F, { variant: "subtitle", level: 2, className: "px-4 py-2", children: "Select country" }),
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
- me,
102
+ he,
99
103
  {
100
104
  placeholder: "Search name or number",
101
- value: f,
102
- onChange: Y
105
+ value: C,
106
+ onChange: G
103
107
  }
104
108
  ) }),
105
- /* @__PURE__ */ i(
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
- A.map((e) => {
116
- const t = I(e), r = x(
119
+ I.map((e) => {
120
+ const t = O(e), r = u(
117
121
  t.iso2,
118
- l
122
+ n
119
123
  );
120
- return /* @__PURE__ */ o(ue, { className: "block w-full", children: /* @__PURE__ */ o(
121
- O,
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: `${y}${t.dialCode}`,
129
+ dialCode: `${g}${t.dialCode}`,
126
130
  onClick: () => {
127
- D(r), N("");
131
+ A(r), S("");
128
132
  },
129
- isSelected: a === r
133
+ isSelected: s === r
130
134
  }
131
135
  ) }, r);
132
136
  }),
133
- A.length === 0 && /* @__PURE__ */ o(F, { variant: "body", level: 2, className: "text-center", children: "No countries found" })
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__ */ i(
141
- J,
144
+ ) : /* @__PURE__ */ c(
145
+ Q,
142
146
  {
143
- value: a,
144
- open: m,
145
- onOpenChange: h,
146
- onValueChange: D,
147
- disabled: s,
147
+ value: s,
148
+ open: h,
149
+ onOpenChange: p,
150
+ onValueChange: A,
151
+ disabled: l,
148
152
  children: [
149
- /* @__PURE__ */ o(K, { children: /* @__PURE__ */ o(
150
- P,
153
+ /* @__PURE__ */ o(Z, { children: /* @__PURE__ */ o(
154
+ R,
151
155
  {
152
- disabled: s,
153
- countryCode: a,
154
- hideDialCode: d,
155
- dialCode: S
156
+ disabled: l,
157
+ countryCode: s,
158
+ hideDialCode: m,
159
+ dialCode: D
156
160
  }
157
161
  ) }),
158
- /* @__PURE__ */ o(Q, { children: /* @__PURE__ */ o(
159
- Z,
162
+ /* @__PURE__ */ o(ee, { children: /* @__PURE__ */ o(
163
+ oe,
160
164
  {
161
165
  ref: (e) => {
162
- g.current = e, e && n.current && (e.style.width = `${n.current.offsetWidth}px`);
166
+ N.current = e, e && a.current && (e.style.width = `${a.current.offsetWidth}px`);
163
167
  },
164
168
  position: "popper",
165
- className: G(z, "-ml-3 mt-5 w-auto"),
169
+ className: K(J, "-ml-3 mt-5 w-auto"),
166
170
  onCloseAutoFocus: v,
167
- onPointerDown: X,
168
- children: /* @__PURE__ */ o(ee, { className: "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] p-2", children: c.map((e) => {
169
- const t = I(e), r = x(
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
- l
175
+ n
172
176
  );
173
177
  return /* @__PURE__ */ o(
174
- oe,
178
+ re,
175
179
  {
176
180
  value: r,
177
181
  className: "outline-none",
178
182
  children: /* @__PURE__ */ o(
179
- O,
183
+ L,
180
184
  {
181
185
  countryCode: r,
182
186
  countryName: t.name,
183
- dialCode: `${y}${t.dialCode}`,
184
- isSelected: a === r
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
- fe.displayName = "PhoneField";
204
+ ye.displayName = "PhoneField";
201
205
  export {
202
- fe as PhoneField,
203
- fe as default
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 extendedCountries: CountryData[];
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
- }), L = [
13
+ }), w = [
14
14
  ...c,
15
15
  ...l
16
- ].sort((o, t) => o[0].localeCompare(t[0])), h = "+", S = {
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
- L as extendedCountries,
25
- S as startAdornmentWidthByDialCodeLength
24
+ w as extendedCountryDataList,
25
+ D as startAdornmentWidthByDialCodeLength
26
26
  };
@@ -1 +1,2 @@
1
1
  export * from './PhoneField';
2
+ export { getValidatedCountryCode } from './utils';
@@ -1,4 +1,6 @@
1
1
  import { PhoneField as r } from "./PhoneField.js";
2
+ import { getValidatedCountryCode as d } from "./utils.js";
2
3
  export {
3
- r as PhoneField
4
+ r as PhoneField,
5
+ d as getValidatedCountryCode
4
6
  };
@@ -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 d } from "../Flag/utils.js";
3
- import { DIAL_CODE_PREFIX as u } from "./constants.js";
4
- const m = (o, e) => {
5
- const r = o.toUpperCase();
6
- return d(r) ? r : e;
7
- }, l = (o, e) => e ? o.filter((r) => {
8
- const t = a(r), s = t.name.toLowerCase(), C = `${u}${t.dialCode.toLowerCase()}`, n = e.toLowerCase();
9
- return s.includes(n) || C.includes(n);
10
- }) : o;
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
- l as filterCountries,
13
- m as getValidatedCountryCode
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 u } from "./components/Flag/Flag.js";
6
- import { LazyFlag as c } from "./components/Flag/LazyFlag.js";
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 g, inputVariants as h } from "./components/Input/Input.js";
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 y } from "./components/NumberPad/NumberPad.js";
11
- import { OTPField as k } from "./components/OTPField/OTPField.js";
12
- import { Pill as I } from "./components/Pill/Pill.js";
13
- import { RadioGroup as S } from "./components/RadioGroup/RadioGroup.js";
14
- import { RadioGroupItem as b } from "./components/RadioGroup/RadioGroupItem.js";
15
- import { Select as R } from "./components/Select/Select.js";
16
- import { SearchField as z } from "./components/SearchField/SearchField.js";
17
- import { PhoneField as K } from "./components/PhoneField/PhoneField.js";
18
- import { Switch as O } from "./components/Switch/Switch.js";
19
- import { Token as q } from "./components/Token/Token.js";
20
- import { Typography as A, typographyVariants as E } from "./components/Typography/Typography.js";
21
- import { Drawer as J, DrawerClose as M, DrawerContent as Q, DrawerTrigger as U } from "./components/Drawer/Drawer.js";
22
- import { default as X } from "./tailwind/index.js";
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
- J as Drawer,
30
- M as DrawerClose,
31
- Q as DrawerContent,
32
- U as DrawerTrigger,
33
- u as Flag,
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
- c as LazyFlag,
38
+ s as LazyFlag,
37
39
  w as ListItem,
38
- y as NumberPad,
39
- k as OTPField,
40
- K as PhoneField,
41
- I as Pill,
42
- S as RadioGroup,
43
- b as RadioGroupItem,
44
- z as SearchField,
45
- R as Select,
46
- O as Switch,
47
- q as Token,
48
- A as Typography,
49
- g as iconVariants,
50
- h as inputVariants,
51
- E as typographyVariants,
52
- X as uiKitTailwindPlugin
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.2",
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
  }