onchain-uikit 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/dist/index.es.js +154 -172
- package/dist/index.umd.js +30 -0
- package/package.json +4 -2
- package/src/index.ts +2 -1
- package/src/stories/XsButton.tsx +7 -0
- package/vite.config.ts +5 -3
- package/dist/index.cjs.js +0 -30
- package/dist/onchain-uikit.css +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Pe from "react";
|
|
2
|
-
var
|
|
2
|
+
var V = { exports: {} }, k = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -11,19 +11,19 @@ var U = { exports: {} }, I = {};
|
|
|
11
11
|
*/
|
|
12
12
|
var Te;
|
|
13
13
|
function lr() {
|
|
14
|
-
if (Te) return
|
|
14
|
+
if (Te) return k;
|
|
15
15
|
Te = 1;
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
var p,
|
|
19
|
-
|
|
20
|
-
for (p in l)
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof:
|
|
16
|
+
var M = Pe, C = Symbol.for("react.element"), U = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, F = M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, A = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function w(E, l, T) {
|
|
18
|
+
var p, b = {}, R = null, I = null;
|
|
19
|
+
T !== void 0 && (R = "" + T), l.key !== void 0 && (R = "" + l.key), l.ref !== void 0 && (I = l.ref);
|
|
20
|
+
for (p in l) m.call(l, p) && !A.hasOwnProperty(p) && (b[p] = l[p]);
|
|
21
|
+
if (E && E.defaultProps) for (p in l = E.defaultProps, l) b[p] === void 0 && (b[p] = l[p]);
|
|
22
|
+
return { $$typeof: C, type: E, key: R, ref: I, props: b, _owner: F.current };
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return k.Fragment = U, k.jsx = w, k.jsxs = w, k;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var D = {};
|
|
27
27
|
/**
|
|
28
28
|
* @license React
|
|
29
29
|
* react-jsx-runtime.development.js
|
|
@@ -36,14 +36,14 @@ var $ = {};
|
|
|
36
36
|
var Oe;
|
|
37
37
|
function cr() {
|
|
38
38
|
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var
|
|
39
|
+
var M = Pe, C = Symbol.for("react.element"), U = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), E = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), H = Symbol.iterator, Ce = "@@iterator";
|
|
40
40
|
function we(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
43
|
var r = H && e[H] || e[Ce];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var O = M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
47
|
function c(e) {
|
|
48
48
|
{
|
|
49
49
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
@@ -53,10 +53,10 @@ function cr() {
|
|
|
53
53
|
}
|
|
54
54
|
function je(e, r, t) {
|
|
55
55
|
{
|
|
56
|
-
var n =
|
|
57
|
-
|
|
58
|
-
var u = t.map(function(
|
|
59
|
-
return String(
|
|
56
|
+
var n = O.ReactDebugCurrentFrame, o = n.getStackAddendum();
|
|
57
|
+
o !== "" && (r += "%s", t = t.concat([o]));
|
|
58
|
+
var u = t.map(function(i) {
|
|
59
|
+
return String(i);
|
|
60
60
|
});
|
|
61
61
|
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
62
62
|
}
|
|
@@ -64,7 +64,7 @@ function cr() {
|
|
|
64
64
|
var xe = !1, ke = !1, De = !1, Fe = !1, Ae = !1, Z;
|
|
65
65
|
Z = Symbol.for("react.module.reference");
|
|
66
66
|
function Ie(e) {
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === m || e === A || Ae || e === F || e === T || e === p || Fe || e === I || xe || ke || De || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === b || e.$$typeof === w || e.$$typeof === E || e.$$typeof === l || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
@@ -74,13 +74,13 @@ function cr() {
|
|
|
74
74
|
var n = e.displayName;
|
|
75
75
|
if (n)
|
|
76
76
|
return n;
|
|
77
|
-
var
|
|
78
|
-
return
|
|
77
|
+
var o = r.displayName || r.name || "";
|
|
78
|
+
return o !== "" ? t + "(" + o + ")" : t;
|
|
79
79
|
}
|
|
80
80
|
function Q(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function y(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
86
|
if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -88,36 +88,36 @@ function cr() {
|
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
90
90
|
switch (e) {
|
|
91
|
-
case
|
|
91
|
+
case m:
|
|
92
92
|
return "Fragment";
|
|
93
|
-
case
|
|
93
|
+
case U:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case A:
|
|
96
96
|
return "Profiler";
|
|
97
|
-
case
|
|
97
|
+
case F:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
99
|
+
case T:
|
|
100
100
|
return "Suspense";
|
|
101
101
|
case p:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case
|
|
106
|
+
case E:
|
|
107
107
|
var r = e;
|
|
108
108
|
return Q(r) + ".Consumer";
|
|
109
|
-
case
|
|
109
|
+
case w:
|
|
110
110
|
var t = e;
|
|
111
111
|
return Q(t._context) + ".Provider";
|
|
112
112
|
case l:
|
|
113
113
|
return $e(e, e.render, "ForwardRef");
|
|
114
|
-
case
|
|
114
|
+
case b:
|
|
115
115
|
var n = e.displayName || null;
|
|
116
|
-
return n !== null ? n :
|
|
117
|
-
case
|
|
118
|
-
var
|
|
116
|
+
return n !== null ? n : y(e.type) || "Memo";
|
|
117
|
+
case R: {
|
|
118
|
+
var o = e, u = o._payload, i = o._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return y(i(u));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,14 +125,14 @@ function cr() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var
|
|
128
|
+
var _ = Object.assign, j = 0, ee, re, te, ne, ae, ie, oe;
|
|
129
129
|
function ue() {
|
|
130
130
|
}
|
|
131
131
|
ue.__reactDisabledLog = !0;
|
|
132
132
|
function We() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
ee = console.log, re = console.info, te = console.warn, ne = console.error, ae = console.group,
|
|
134
|
+
if (j === 0) {
|
|
135
|
+
ee = console.log, re = console.info, te = console.warn, ne = console.error, ae = console.group, ie = console.groupCollapsed, oe = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
@@ -149,100 +149,100 @@ function cr() {
|
|
|
149
149
|
groupEnd: e
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
j++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
function Ye() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (j--, j === 0) {
|
|
158
158
|
var e = {
|
|
159
159
|
configurable: !0,
|
|
160
160
|
enumerable: !0,
|
|
161
161
|
writable: !0
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
|
-
log:
|
|
164
|
+
log: _({}, e, {
|
|
165
165
|
value: ee
|
|
166
166
|
}),
|
|
167
|
-
info:
|
|
167
|
+
info: _({}, e, {
|
|
168
168
|
value: re
|
|
169
169
|
}),
|
|
170
|
-
warn:
|
|
170
|
+
warn: _({}, e, {
|
|
171
171
|
value: te
|
|
172
172
|
}),
|
|
173
|
-
error:
|
|
173
|
+
error: _({}, e, {
|
|
174
174
|
value: ne
|
|
175
175
|
}),
|
|
176
|
-
group:
|
|
176
|
+
group: _({}, e, {
|
|
177
177
|
value: ae
|
|
178
178
|
}),
|
|
179
|
-
groupCollapsed:
|
|
180
|
-
value: oe
|
|
181
|
-
}),
|
|
182
|
-
groupEnd: m({}, e, {
|
|
179
|
+
groupCollapsed: _({}, e, {
|
|
183
180
|
value: ie
|
|
181
|
+
}),
|
|
182
|
+
groupEnd: _({}, e, {
|
|
183
|
+
value: oe
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
j < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var N =
|
|
191
|
-
function
|
|
190
|
+
var N = O.ReactCurrentDispatcher, B;
|
|
191
|
+
function $(e, r, t) {
|
|
192
192
|
{
|
|
193
193
|
if (B === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
|
-
} catch (
|
|
197
|
-
var n =
|
|
196
|
+
} catch (o) {
|
|
197
|
+
var n = o.stack.trim().match(/\n( *(at )?)/);
|
|
198
198
|
B = n && n[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
201
|
` + B + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var J = !1,
|
|
204
|
+
var J = !1, W;
|
|
205
205
|
{
|
|
206
206
|
var Le = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
-
|
|
207
|
+
W = new Le();
|
|
208
208
|
}
|
|
209
209
|
function se(e, r) {
|
|
210
210
|
if (!e || J)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var t =
|
|
213
|
+
var t = W.get(e);
|
|
214
214
|
if (t !== void 0)
|
|
215
215
|
return t;
|
|
216
216
|
}
|
|
217
217
|
var n;
|
|
218
218
|
J = !0;
|
|
219
|
-
var
|
|
219
|
+
var o = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
221
|
var u;
|
|
222
222
|
u = N.current, N.current = null, We();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
|
-
var
|
|
225
|
+
var i = function() {
|
|
226
226
|
throw Error();
|
|
227
227
|
};
|
|
228
|
-
if (Object.defineProperty(
|
|
228
|
+
if (Object.defineProperty(i.prototype, "props", {
|
|
229
229
|
set: function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
}
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
|
-
Reflect.construct(
|
|
234
|
+
Reflect.construct(i, []);
|
|
235
235
|
} catch (v) {
|
|
236
236
|
n = v;
|
|
237
237
|
}
|
|
238
|
-
Reflect.construct(e, [],
|
|
238
|
+
Reflect.construct(e, [], i);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
|
-
|
|
241
|
+
i.call();
|
|
242
242
|
} catch (v) {
|
|
243
243
|
n = v;
|
|
244
244
|
}
|
|
245
|
-
e.call(
|
|
245
|
+
e.call(i.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
@@ -263,19 +263,19 @@ function cr() {
|
|
|
263
263
|
if (s !== 1 || f !== 1)
|
|
264
264
|
do
|
|
265
265
|
if (s--, f--, f < 0 || a[s] !== d[f]) {
|
|
266
|
-
var
|
|
266
|
+
var g = `
|
|
267
267
|
` + a[s].replace(" at new ", " at ");
|
|
268
|
-
return e.displayName &&
|
|
268
|
+
return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && W.set(e, g), g;
|
|
269
269
|
}
|
|
270
270
|
while (s >= 1 && f >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
J = !1, N.current = u, Ye(), Error.prepareStackTrace =
|
|
275
|
+
J = !1, N.current = u, Ye(), Error.prepareStackTrace = o;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" &&
|
|
277
|
+
var P = e ? e.displayName || e.name : "", h = P ? $(P) : "";
|
|
278
|
+
return typeof e == "function" && W.set(e, h), h;
|
|
279
279
|
}
|
|
280
280
|
function Ve(e, r, t) {
|
|
281
281
|
return se(e, !1);
|
|
@@ -284,59 +284,59 @@ function cr() {
|
|
|
284
284
|
var r = e.prototype;
|
|
285
285
|
return !!(r && r.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Y(e, r, t) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
291
|
return se(e, Me(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
|
-
return
|
|
293
|
+
return $(e);
|
|
294
294
|
switch (e) {
|
|
295
|
-
case
|
|
296
|
-
return
|
|
295
|
+
case T:
|
|
296
|
+
return $("Suspense");
|
|
297
297
|
case p:
|
|
298
|
-
return
|
|
298
|
+
return $("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
302
|
case l:
|
|
303
303
|
return Ve(e.render);
|
|
304
|
-
case
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
var n = e,
|
|
304
|
+
case b:
|
|
305
|
+
return Y(e.type, r, t);
|
|
306
|
+
case R: {
|
|
307
|
+
var n = e, o = n._payload, u = n._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return Y(u(o), r, t);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
316
|
+
var x = Object.prototype.hasOwnProperty, fe = {}, le = O.ReactDebugCurrentFrame;
|
|
317
|
+
function L(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner, t =
|
|
319
|
+
var r = e._owner, t = Y(e.type, e._source, r ? r.type : null);
|
|
320
320
|
le.setExtraStackFrame(t);
|
|
321
321
|
} else
|
|
322
322
|
le.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function Ue(e, r, t, n,
|
|
324
|
+
function Ue(e, r, t, n, o) {
|
|
325
325
|
{
|
|
326
|
-
var u = Function.call.bind(
|
|
327
|
-
for (var
|
|
328
|
-
if (u(e,
|
|
326
|
+
var u = Function.call.bind(x);
|
|
327
|
+
for (var i in e)
|
|
328
|
+
if (u(e, i)) {
|
|
329
329
|
var a = void 0;
|
|
330
330
|
try {
|
|
331
|
-
if (typeof e[
|
|
332
|
-
var d = Error((n || "React class") + ": " + t + " type `" +
|
|
331
|
+
if (typeof e[i] != "function") {
|
|
332
|
+
var d = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
333
|
throw d.name = "Invariant Violation", d;
|
|
334
334
|
}
|
|
335
|
-
a = e[
|
|
335
|
+
a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
336
|
} catch (s) {
|
|
337
337
|
a = s;
|
|
338
338
|
}
|
|
339
|
-
a && !(a instanceof Error) && (
|
|
339
|
+
a && !(a instanceof Error) && (L(o), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), L(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, L(o), c("Failed %s type: %s", t, a.message), L(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -364,14 +364,14 @@ function cr() {
|
|
|
364
364
|
if (Je(e))
|
|
365
365
|
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), ce(e);
|
|
366
366
|
}
|
|
367
|
-
var ve =
|
|
367
|
+
var ve = O.ReactCurrentOwner, qe = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
}, pe,
|
|
372
|
+
}, pe, ge;
|
|
373
373
|
function Ke(e) {
|
|
374
|
-
if (
|
|
374
|
+
if (x.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
376
376
|
if (r && r.isReactWarning)
|
|
377
377
|
return !1;
|
|
@@ -379,7 +379,7 @@ function cr() {
|
|
|
379
379
|
return e.ref !== void 0;
|
|
380
380
|
}
|
|
381
381
|
function Ge(e) {
|
|
382
|
-
if (
|
|
382
|
+
if (x.call(e, "key")) {
|
|
383
383
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
384
384
|
if (r && r.isReactWarning)
|
|
385
385
|
return !1;
|
|
@@ -403,7 +403,7 @@ function cr() {
|
|
|
403
403
|
function He(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var t = function() {
|
|
406
|
-
|
|
406
|
+
ge || (ge = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
407
407
|
};
|
|
408
408
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
409
|
get: t,
|
|
@@ -411,15 +411,15 @@ function cr() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var Ze = function(e, r, t, n,
|
|
414
|
+
var Ze = function(e, r, t, n, o, u, i) {
|
|
415
415
|
var a = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: C,
|
|
418
418
|
// Built-in properties that belong on the element
|
|
419
419
|
type: e,
|
|
420
420
|
key: r,
|
|
421
421
|
ref: t,
|
|
422
|
-
props:
|
|
422
|
+
props: i,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
424
|
_owner: u
|
|
425
425
|
};
|
|
@@ -437,44 +437,44 @@ function cr() {
|
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !1,
|
|
440
|
-
value:
|
|
440
|
+
value: o
|
|
441
441
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
442
442
|
};
|
|
443
|
-
function Qe(e, r, t, n,
|
|
443
|
+
function Qe(e, r, t, n, o) {
|
|
444
444
|
{
|
|
445
|
-
var u,
|
|
446
|
-
t !== void 0 && (de(t), a = "" + t), Ge(r) && (de(r.key), a = "" + r.key), Ke(r) && (d = r.ref, Xe(r,
|
|
445
|
+
var u, i = {}, a = null, d = null;
|
|
446
|
+
t !== void 0 && (de(t), a = "" + t), Ge(r) && (de(r.key), a = "" + r.key), Ke(r) && (d = r.ref, Xe(r, o));
|
|
447
447
|
for (u in r)
|
|
448
|
-
|
|
448
|
+
x.call(r, u) && !qe.hasOwnProperty(u) && (i[u] = r[u]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
450
|
var s = e.defaultProps;
|
|
451
451
|
for (u in s)
|
|
452
|
-
|
|
452
|
+
i[u] === void 0 && (i[u] = s[u]);
|
|
453
453
|
}
|
|
454
454
|
if (a || d) {
|
|
455
455
|
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
-
a && ze(
|
|
456
|
+
a && ze(i, f), d && He(i, f);
|
|
457
457
|
}
|
|
458
|
-
return Ze(e, a, d,
|
|
458
|
+
return Ze(e, a, d, o, n, ve.current, i);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var K =
|
|
462
|
-
function
|
|
461
|
+
var K = O.ReactCurrentOwner, be = O.ReactDebugCurrentFrame;
|
|
462
|
+
function S(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner, t =
|
|
465
|
-
|
|
464
|
+
var r = e._owner, t = Y(e.type, e._source, r ? r.type : null);
|
|
465
|
+
be.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
be.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
469
|
var G;
|
|
470
470
|
G = !1;
|
|
471
471
|
function X(e) {
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === C;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function ye() {
|
|
475
475
|
{
|
|
476
476
|
if (K.current) {
|
|
477
|
-
var e =
|
|
477
|
+
var e = y(K.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -489,7 +489,7 @@ Check the render method of \`` + e + "`.";
|
|
|
489
489
|
var Ee = {};
|
|
490
490
|
function rr(e) {
|
|
491
491
|
{
|
|
492
|
-
var r =
|
|
492
|
+
var r = ye();
|
|
493
493
|
if (!r) {
|
|
494
494
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
495
|
t && (r = `
|
|
@@ -499,7 +499,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
499
499
|
return r;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Re(e, r) {
|
|
503
503
|
{
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
@@ -509,25 +509,25 @@ Check the top-level render call using <` + t + ">.");
|
|
|
509
509
|
return;
|
|
510
510
|
Ee[t] = !0;
|
|
511
511
|
var n = "";
|
|
512
|
-
e && e._owner && e._owner !== K.current && (n = " It was passed a child from " +
|
|
512
|
+
e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + y(e._owner.type) + "."), S(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), S(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function _e(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
519
|
if (q(e))
|
|
520
520
|
for (var t = 0; t < e.length; t++) {
|
|
521
521
|
var n = e[t];
|
|
522
|
-
X(n) &&
|
|
522
|
+
X(n) && Re(n, r);
|
|
523
523
|
}
|
|
524
524
|
else if (X(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var
|
|
528
|
-
if (typeof
|
|
529
|
-
for (var u =
|
|
530
|
-
X(
|
|
527
|
+
var o = we(e);
|
|
528
|
+
if (typeof o == "function" && o !== e.entries)
|
|
529
|
+
for (var u = o.call(e), i; !(i = u.next()).done; )
|
|
530
|
+
X(i.value) && Re(i.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
@@ -541,17 +541,17 @@ Check the top-level render call using <` + t + ">.");
|
|
|
541
541
|
t = r.propTypes;
|
|
542
542
|
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
r.$$typeof ===
|
|
544
|
+
r.$$typeof === b))
|
|
545
545
|
t = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
548
|
if (t) {
|
|
549
|
-
var n =
|
|
549
|
+
var n = y(r);
|
|
550
550
|
Ue(t, e.props, "prop", n, e);
|
|
551
551
|
} else if (r.PropTypes !== void 0 && !G) {
|
|
552
552
|
G = !0;
|
|
553
|
-
var
|
|
554
|
-
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
553
|
+
var o = y(r);
|
|
554
|
+
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
|
|
555
555
|
}
|
|
556
556
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
@@ -561,92 +561,74 @@ Check the top-level render call using <` + t + ">.");
|
|
|
561
561
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
562
562
|
var n = r[t];
|
|
563
563
|
if (n !== "children" && n !== "key") {
|
|
564
|
-
|
|
564
|
+
S(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), S(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (
|
|
568
|
+
e.ref !== null && (S(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), S(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
function me(e, r, t, n,
|
|
571
|
+
var he = {};
|
|
572
|
+
function me(e, r, t, n, o, u) {
|
|
573
573
|
{
|
|
574
|
-
var
|
|
575
|
-
if (!
|
|
574
|
+
var i = Ie(e);
|
|
575
|
+
if (!i) {
|
|
576
576
|
var a = "";
|
|
577
577
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
578
|
var d = er();
|
|
579
|
-
d ? a += d : a +=
|
|
579
|
+
d ? a += d : a += ye();
|
|
580
580
|
var s;
|
|
581
|
-
e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof ===
|
|
581
|
+
e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof === C ? (s = "<" + (y(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
|
|
582
582
|
}
|
|
583
|
-
var f = Qe(e, r, t,
|
|
583
|
+
var f = Qe(e, r, t, o, u);
|
|
584
584
|
if (f == null)
|
|
585
585
|
return f;
|
|
586
|
-
if (
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
586
|
+
if (i) {
|
|
587
|
+
var g = r.children;
|
|
588
|
+
if (g !== void 0)
|
|
589
589
|
if (n)
|
|
590
|
-
if (q(
|
|
591
|
-
for (var
|
|
592
|
-
|
|
593
|
-
Object.freeze && Object.freeze(
|
|
590
|
+
if (q(g)) {
|
|
591
|
+
for (var P = 0; P < g.length; P++)
|
|
592
|
+
_e(g[P], e);
|
|
593
|
+
Object.freeze && Object.freeze(g);
|
|
594
594
|
} else
|
|
595
595
|
c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
596
596
|
else
|
|
597
|
-
|
|
597
|
+
_e(g, e);
|
|
598
598
|
}
|
|
599
|
-
if (
|
|
600
|
-
var
|
|
599
|
+
if (x.call(r, "key")) {
|
|
600
|
+
var h = y(e), v = Object.keys(r).filter(function(fr) {
|
|
601
601
|
return fr !== "key";
|
|
602
602
|
}), z = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
-
if (!
|
|
603
|
+
if (!he[h + z]) {
|
|
604
604
|
var sr = v.length > 0 ? "{" + v.join(": ..., ") + ": ...}" : "{}";
|
|
605
605
|
c(`A props object containing a "key" prop is being spread into JSX:
|
|
606
606
|
let props = %s;
|
|
607
607
|
<%s {...props} />
|
|
608
608
|
React keys must be passed directly to JSX without using spread:
|
|
609
609
|
let props = %s;
|
|
610
|
-
<%s key={someKey} {...props} />`, z,
|
|
610
|
+
<%s key={someKey} {...props} />`, z, h, sr, h), he[h + z] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return e ===
|
|
613
|
+
return e === m ? nr(f) : tr(f), f;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
function ar(e, r, t) {
|
|
617
617
|
return me(e, r, t, !0);
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function ir(e, r, t) {
|
|
620
620
|
return me(e, r, t, !1);
|
|
621
621
|
}
|
|
622
|
-
var
|
|
623
|
-
|
|
624
|
-
}()),
|
|
622
|
+
var or = ir, ur = ar;
|
|
623
|
+
D.Fragment = m, D.jsx = or, D.jsxs = ur;
|
|
624
|
+
}()), D;
|
|
625
625
|
}
|
|
626
626
|
var Se;
|
|
627
627
|
function dr() {
|
|
628
|
-
return Se || (Se = 1, process.env.NODE_ENV === "production" ?
|
|
628
|
+
return Se || (Se = 1, process.env.NODE_ENV === "production" ? V.exports = lr() : V.exports = cr()), V.exports;
|
|
629
629
|
}
|
|
630
630
|
var vr = dr();
|
|
631
|
-
const
|
|
632
|
-
primary: x = !1,
|
|
633
|
-
size: h = "medium",
|
|
634
|
-
backgroundColor: k,
|
|
635
|
-
label: g,
|
|
636
|
-
...O
|
|
637
|
-
}) => {
|
|
638
|
-
const S = x ? "storybook-button--primary" : "storybook-button--secondary";
|
|
639
|
-
return /* @__PURE__ */ vr.jsx(
|
|
640
|
-
"button",
|
|
641
|
-
{
|
|
642
|
-
type: "button",
|
|
643
|
-
className: ["storybook-button", `storybook-button--${h}`, S].join(" "),
|
|
644
|
-
style: { backgroundColor: k },
|
|
645
|
-
...O,
|
|
646
|
-
children: g
|
|
647
|
-
}
|
|
648
|
-
);
|
|
649
|
-
};
|
|
631
|
+
const gr = () => /* @__PURE__ */ vr.jsx("button", { className: "my-button" });
|
|
650
632
|
export {
|
|
651
|
-
|
|
633
|
+
gr as XsButton
|
|
652
634
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
(function(h,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],T):(h=typeof globalThis<"u"?globalThis:h||self,T(h["onchain-uikit-library"]={},h.React))})(this,function(h,T){"use strict";var I={exports:{}},j={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Q;function we(){if(Q)return j;Q=1;var N=T,k=Symbol.for("react.element"),B=Symbol.for("react.fragment"),O=Object.prototype.hasOwnProperty,W=N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Y={key:!0,ref:!0,__self:!0,__source:!0};function D(E,l,S){var p,b={},R=null,$=null;S!==void 0&&(R=""+S),l.key!==void 0&&(R=""+l.key),l.ref!==void 0&&($=l.ref);for(p in l)O.call(l,p)&&!Y.hasOwnProperty(p)&&(b[p]=l[p]);if(E&&E.defaultProps)for(p in l=E.defaultProps,l)b[p]===void 0&&(b[p]=l[p]);return{$$typeof:k,type:E,key:R,ref:$,props:b,_owner:W.current}}return j.Fragment=B,j.jsx=D,j.jsxs=D,j}var x={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var ee;function je(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&function(){var N=T,k=Symbol.for("react.element"),B=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),E=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),te=Symbol.iterator,Fe="@@iterator";function Ae(e){if(e===null||typeof e!="object")return null;var r=te&&e[te]||e[Fe];return typeof r=="function"?r:null}var P=N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ie("error",e,t)}}function Ie(e,r,t){{var n=P.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var We=!1,Ye=!1,$e=!1,Le=!1,Me=!1,ne;ne=Symbol.for("react.module.reference");function Ve(e){return!!(typeof e=="string"||typeof e=="function"||e===O||e===Y||Me||e===W||e===S||e===p||Le||e===$||We||Ye||$e||typeof e=="object"&&e!==null&&(e.$$typeof===R||e.$$typeof===b||e.$$typeof===D||e.$$typeof===E||e.$$typeof===l||e.$$typeof===ne||e.getModuleId!==void 0))}function Ue(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ae(e){return e.displayName||"Context"}function g(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case B:return"Portal";case Y:return"Profiler";case W:return"StrictMode";case S:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return ae(r)+".Consumer";case D:var t=e;return ae(t._context)+".Provider";case l:return Ue(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:g(e.type)||"Memo";case R:{var o=e,u=o._payload,i=o._init;try{return g(i(u))}catch{return null}}}return null}var _=Object.assign,F=0,ie,oe,ue,se,fe,le,ce;function de(){}de.__reactDisabledLog=!0;function Ne(){{if(F===0){ie=console.log,oe=console.info,ue=console.warn,se=console.error,fe=console.group,le=console.groupCollapsed,ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:de,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}F++}}function Be(){{if(F--,F===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:ie}),info:_({},e,{value:oe}),warn:_({},e,{value:ue}),error:_({},e,{value:se}),group:_({},e,{value:fe}),groupCollapsed:_({},e,{value:le}),groupEnd:_({},e,{value:ce})})}F<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=P.ReactCurrentDispatcher,q;function L(e,r,t){{if(q===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return`
|
|
18
|
+
`+q+e}}var K=!1,M;{var Je=typeof WeakMap=="function"?WeakMap:Map;M=new Je}function ve(e,r){if(!e||K)return"";{var t=M.get(e);if(t!==void 0)return t}var n;K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=J.current,J.current=null,Ne();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
|
|
19
|
+
`),d=n.stack.split(`
|
|
20
|
+
`),s=a.length-1,f=d.length-1;s>=1&&f>=0&&a[s]!==d[f];)f--;for(;s>=1&&f>=0;s--,f--)if(a[s]!==d[f]){if(s!==1||f!==1)do if(s--,f--,f<0||a[s]!==d[f]){var y=`
|
|
21
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,y),y}while(s>=1&&f>=0);break}}}finally{K=!1,J.current=u,Be(),Error.prepareStackTrace=o}var w=e?e.displayName||e.name:"",m=w?L(w):"";return typeof e=="function"&&M.set(e,m),m}function qe(e,r,t){return ve(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function V(e,r,t){if(e==null)return"";if(typeof e=="function")return ve(e,Ke(e));if(typeof e=="string")return L(e);switch(e){case S:return L("Suspense");case p:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return qe(e.render);case b:return V(e.type,r,t);case R:{var n=e,o=n._payload,u=n._init;try{return V(u(o),r,t)}catch{}}}return""}var A=Object.prototype.hasOwnProperty,pe={},ye=P.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Ge(e,r,t,n,o){{var u=Function.call.bind(A);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var d=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(U(o),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),U(null)),a instanceof Error&&!(a.message in pe)&&(pe[a.message]=!0,U(o),c("Failed %s type: %s",t,a.message),U(null))}}}var Xe=Array.isArray;function G(e){return Xe(e)}function ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function He(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function ge(e){if(He(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ze(e)),be(e)}var he=P.ReactCurrentOwner,Ze={key:!0,ref:!0,__self:!0,__source:!0},Ee,Re;function Qe(e){if(A.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function er(e){if(A.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function rr(e,r){typeof e.ref=="string"&&he.current}function tr(e,r){{var t=function(){Ee||(Ee=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function nr(e,r){{var t=function(){Re||(Re=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ar=function(e,r,t,n,o,u,i){var a={$$typeof:k,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ir(e,r,t,n,o){{var u,i={},a=null,d=null;t!==void 0&&(ge(t),a=""+t),er(r)&&(ge(r.key),a=""+r.key),Qe(r)&&(d=r.ref,rr(r,o));for(u in r)A.call(r,u)&&!Ze.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||d){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&tr(i,f),d&&nr(i,f)}return ar(e,a,d,o,n,he.current,i)}}var X=P.ReactCurrentOwner,_e=P.ReactDebugCurrentFrame;function C(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(t)}else _e.setExtraStackFrame(null)}var z;z=!1;function H(e){return typeof e=="object"&&e!==null&&e.$$typeof===k}function me(){{if(X.current){var e=g(X.current.type);if(e)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function or(e){return""}var Te={};function ur(e){{var r=me();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function Oe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+g(e._owner.type)+"."),C(e),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),C(null)}}function Se(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];H(n)&&Oe(n,r)}else if(H(e))e._store&&(e._store.validated=!0);else if(e){var o=Ae(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)H(i.value)&&Oe(i.value,r)}}}function sr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=g(r);Ge(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!z){z=!0;var o=g(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){C(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),C(null);break}}e.ref!==null&&(C(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),C(null))}}var Pe={};function Ce(e,r,t,n,o,u){{var i=Ve(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=or();d?a+=d:a+=me();var s;e===null?s="null":G(e)?s="array":e!==void 0&&e.$$typeof===k?(s="<"+(g(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var f=ir(e,r,t,o,u);if(f==null)return f;if(i){var y=r.children;if(y!==void 0)if(n)if(G(y)){for(var w=0;w<y.length;w++)Se(y[w],e);Object.freeze&&Object.freeze(y)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Se(y,e)}if(A.call(r,"key")){var m=g(e),v=Object.keys(r).filter(function(yr){return yr!=="key"}),Z=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!Pe[m+Z]){var pr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,Z,m,pr,m),Pe[m+Z]=!0}}return e===O?fr(f):sr(f),f}}function lr(e,r,t){return Ce(e,r,t,!0)}function cr(e,r,t){return Ce(e,r,t,!1)}var dr=cr,vr=lr;x.Fragment=O,x.jsx=dr,x.jsxs=vr}()),x}var re;function xe(){return re||(re=1,process.env.NODE_ENV==="production"?I.exports=we():I.exports=je()),I.exports}var ke=xe();const De=()=>ke.jsx("button",{className:"my-button"});h.XsButton=De,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onchain-uikit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
7
7
|
"build": "vite build",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"main": "dist/index.cjs.js",
|
|
14
14
|
"module": "dist/index.es.js",
|
|
15
|
-
"
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
16
18
|
"peerDependencies": {
|
|
17
19
|
"antd": "5.1.4"
|
|
18
20
|
},
|
package/src/index.ts
CHANGED
package/vite.config.ts
CHANGED
|
@@ -6,12 +6,13 @@ export default defineConfig({
|
|
|
6
6
|
plugins: [react()],
|
|
7
7
|
build: {
|
|
8
8
|
lib: {
|
|
9
|
-
entry: "./src/index.ts",
|
|
10
|
-
|
|
11
|
-
formats: ["es", "cjs"],
|
|
9
|
+
entry: "./src/index.ts", // 组件库入口文件
|
|
10
|
+
name: "onchain-uikit-library", // 组件库的名称
|
|
11
|
+
// formats: ["es", "cjs"],
|
|
12
12
|
fileName: (format) => `index.${format}.js`,
|
|
13
13
|
},
|
|
14
14
|
rollupOptions: {
|
|
15
|
+
// 确保 external 将 React 和 ReactDOM 排除在打包之外
|
|
15
16
|
external: ["react", "react-dom"],
|
|
16
17
|
// output: {
|
|
17
18
|
// format: "es",
|
|
@@ -21,6 +22,7 @@ export default defineConfig({
|
|
|
21
22
|
// },
|
|
22
23
|
|
|
23
24
|
output: {
|
|
25
|
+
// 使用 UMD 格式时需要手动指定 React 的全局变量名
|
|
24
26
|
globals: {
|
|
25
27
|
react: "React",
|
|
26
28
|
"react-dom": "ReactDOM",
|
package/dist/index.cjs.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("react");var U={exports:{}},I={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Te;function fr(){if(Te)return I;Te=1;var x=Pe,h=Symbol.for("react.element"),k=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,O=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function D(R,f,P){var p,y={},_=null,W=null;P!==void 0&&(_=""+P),f.key!==void 0&&(_=""+f.key),f.ref!==void 0&&(W=f.ref);for(p in f)g.call(f,p)&&!S.hasOwnProperty(p)&&(y[p]=f[p]);if(R&&R.defaultProps)for(p in f=R.defaultProps,f)y[p]===void 0&&(y[p]=f[p]);return{$$typeof:h,type:R,key:_,ref:W,props:y,_owner:O.current}}return I.Fragment=k,I.jsx=D,I.jsxs=D,I}var $={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Oe;function cr(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var x=Pe,h=Symbol.for("react.element"),k=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),R=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),H=Symbol.iterator,Ce="@@iterator";function we(e){if(e===null||typeof e!="object")return null;var r=H&&e[H]||e[Ce];return typeof r=="function"?r:null}var C=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];je("error",e,t)}}function je(e,r,t){{var n=C.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var xe=!1,ke=!1,De=!1,Fe=!1,Ae=!1,Z;Z=Symbol.for("react.module.reference");function Ie(e){return!!(typeof e=="string"||typeof e=="function"||e===g||e===S||Ae||e===O||e===P||e===p||Fe||e===W||xe||ke||De||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===y||e.$$typeof===D||e.$$typeof===R||e.$$typeof===f||e.$$typeof===Z||e.getModuleId!==void 0))}function $e(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function Q(e){return e.displayName||"Context"}function E(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case k:return"Portal";case S:return"Profiler";case O:return"StrictMode";case P:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return Q(r)+".Consumer";case D:var t=e;return Q(t._context)+".Provider";case f:return $e(e,e.render,"ForwardRef");case y:var n=e.displayName||null;return n!==null?n:E(e.type)||"Memo";case _:{var i=e,u=i._payload,o=i._init;try{return E(o(u))}catch{return null}}}return null}var m=Object.assign,F=0,ee,re,te,ne,ae,oe,ie;function ue(){}ue.__reactDisabledLog=!0;function We(){{if(F===0){ee=console.log,re=console.info,te=console.warn,ne=console.error,ae=console.group,oe=console.groupCollapsed,ie=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ue,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}F++}}function Ye(){{if(F--,F===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:m({},e,{value:ee}),info:m({},e,{value:re}),warn:m({},e,{value:te}),error:m({},e,{value:ne}),group:m({},e,{value:ae}),groupCollapsed:m({},e,{value:oe}),groupEnd:m({},e,{value:ie})})}F<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var N=C.ReactCurrentDispatcher,q;function Y(e,r,t){{if(q===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return`
|
|
18
|
-
`+q+e}}var B=!1,L;{var Le=typeof WeakMap=="function"?WeakMap:Map;L=new Le}function se(e,r){if(!e||B)return"";{var t=L.get(e);if(t!==void 0)return t}var n;B=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=N.current,N.current=null,We();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(v){n=v}Reflect.construct(e,[],o)}else{try{o.call()}catch(v){n=v}e.call(o.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
|
|
19
|
-
`),d=n.stack.split(`
|
|
20
|
-
`),s=a.length-1,l=d.length-1;s>=1&&l>=0&&a[s]!==d[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==d[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==d[l]){var b=`
|
|
21
|
-
`+a[s].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,b),b}while(s>=1&&l>=0);break}}}finally{B=!1,N.current=u,Ye(),Error.prepareStackTrace=i}var j=e?e.displayName||e.name:"",T=j?Y(j):"";return typeof e=="function"&&L.set(e,T),T}function Me(e,r,t){return se(e,!1)}function Ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function M(e,r,t){if(e==null)return"";if(typeof e=="function")return se(e,Ve(e));if(typeof e=="string")return Y(e);switch(e){case P:return Y("Suspense");case p:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Me(e.render);case y:return M(e.type,r,t);case _:{var n=e,i=n._payload,u=n._init;try{return M(u(i),r,t)}catch{}}}return""}var A=Object.prototype.hasOwnProperty,le={},fe=C.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=M(e.type,e._source,r?r.type:null);fe.setExtraStackFrame(t)}else fe.setExtraStackFrame(null)}function Ue(e,r,t,n,i){{var u=Function.call.bind(A);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var d=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(V(i),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),V(null)),a instanceof Error&&!(a.message in le)&&(le[a.message]=!0,V(i),c("Failed %s type: %s",t,a.message),V(null))}}}var Ne=Array.isArray;function J(e){return Ne(e)}function qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Be(e){try{return ce(e),!1}catch{return!0}}function ce(e){return""+e}function de(e){if(Be(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qe(e)),ce(e)}var ve=C.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},pe,be;function Ke(e){if(A.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ge(e){if(A.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Xe(e,r){typeof e.ref=="string"&&ve.current}function ze(e,r){{var t=function(){pe||(pe=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function He(e,r){{var t=function(){be||(be=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Ze=function(e,r,t,n,i,u,o){var a={$$typeof:h,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function Qe(e,r,t,n,i){{var u,o={},a=null,d=null;t!==void 0&&(de(t),a=""+t),Ge(r)&&(de(r.key),a=""+r.key),Ke(r)&&(d=r.ref,Xe(r,i));for(u in r)A.call(r,u)&&!Je.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||d){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ze(o,l),d&&He(o,l)}return Ze(e,a,d,i,n,ve.current,o)}}var K=C.ReactCurrentOwner,ye=C.ReactDebugCurrentFrame;function w(e){if(e){var r=e._owner,t=M(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}var G;G=!1;function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===h}function ge(){{if(K.current){var e=E(K.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function er(e){return""}var Ee={};function rr(e){{var r=ge();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function he(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=rr(r);if(Ee[t])return;Ee[t]=!0;var n="";e&&e._owner&&e._owner!==K.current&&(n=" It was passed a child from "+E(e._owner.type)+"."),w(e),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),w(null)}}function Re(e,r){{if(typeof e!="object")return;if(J(e))for(var t=0;t<e.length;t++){var n=e[t];X(n)&&he(n,r)}else if(X(e))e._store&&(e._store.validated=!0);else if(e){var i=we(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)X(o.value)&&he(o.value,r)}}}function tr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===y))t=r.propTypes;else return;if(t){var n=E(r);Ue(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!G){G=!0;var i=E(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){w(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),w(null);break}}e.ref!==null&&(w(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),w(null))}}var _e={};function me(e,r,t,n,i,u){{var o=Ie(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=er();d?a+=d:a+=ge();var s;e===null?s="null":J(e)?s="array":e!==void 0&&e.$$typeof===h?(s="<"+(E(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=Qe(e,r,t,i,u);if(l==null)return l;if(o){var b=r.children;if(b!==void 0)if(n)if(J(b)){for(var j=0;j<b.length;j++)Re(b[j],e);Object.freeze&&Object.freeze(b)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Re(b,e)}if(A.call(r,"key")){var T=E(e),v=Object.keys(r).filter(function(lr){return lr!=="key"}),z=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!_e[T+z]){var sr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,z,T,sr,T),_e[T+z]=!0}}return e===g?nr(l):tr(l),l}}function ar(e,r,t){return me(e,r,t,!0)}function or(e,r,t){return me(e,r,t,!1)}var ir=or,ur=ar;$.Fragment=g,$.jsx=ir,$.jsxs=ur}()),$}var Se;function dr(){return Se||(Se=1,process.env.NODE_ENV==="production"?U.exports=fr():U.exports=cr()),U.exports}var vr=dr();const pr=({primary:x=!1,size:h="medium",backgroundColor:k,label:g,...O})=>{const S=x?"storybook-button--primary":"storybook-button--secondary";return vr.jsx("button",{type:"button",className:["storybook-button",`storybook-button--${h}`,S].join(" "),style:{backgroundColor:k},...O,children:g})};exports.XsButton=pr;
|
package/dist/onchain-uikit.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.storybook-button{display:inline-block;cursor:pointer;border:0;border-radius:3em;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.storybook-button--primary{background-color:#555ab9;color:#fff}.storybook-button--secondary{box-shadow:#00000026 0 0 0 1px inset;background-color:transparent;color:#333}.storybook-button--small{padding:10px 16px;font-size:12px}.storybook-button--medium{padding:11px 20px;font-size:14px}.storybook-button--large{padding:12px 24px;font-size:16px}
|