@coinloger/dev-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: 'primary' | 'secondary' | 'outline';
5
+ size?: 'sm' | 'md' | 'lg' | 'xl';
6
+ }
7
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ export default function ButtonDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
4
+ title?: React.ReactNode;
5
+ footer?: React.ReactNode;
6
+ }
7
+ export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export default function CardDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
+ label?: string;
5
+ error?: boolean;
6
+ helperText?: string;
7
+ fullWidth?: boolean;
8
+ }
9
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export default function InputDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
4
+ bordered?: boolean;
5
+ striped?: boolean;
6
+ hover?: boolean;
7
+ size?: 'sm' | 'md';
8
+ }
9
+ export declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export default function TableDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ThemeDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ThemeConfig } from './types';
2
+
3
+ declare const defaultTheme: ThemeConfig;
4
+ export default defaultTheme;
package/dist/dev-ui.js ADDED
@@ -0,0 +1,690 @@
1
+ import P from "react";
2
+ var Z = { exports: {} }, N = {};
3
+ /**
4
+ * @license React
5
+ * react-jsx-runtime.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var Oe;
13
+ function cr() {
14
+ if (Oe) return N;
15
+ Oe = 1;
16
+ var R = P, f = Symbol.for("react.element"), h = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, y = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function j(E, l, k) {
18
+ var m, O = {}, x = null, Y = null;
19
+ k !== void 0 && (x = "" + k), l.key !== void 0 && (x = "" + l.key), l.ref !== void 0 && (Y = l.ref);
20
+ for (m in l) d.call(l, m) && !_.hasOwnProperty(m) && (O[m] = l[m]);
21
+ if (E && E.defaultProps) for (m in l = E.defaultProps, l) O[m] === void 0 && (O[m] = l[m]);
22
+ return { $$typeof: f, type: E, key: x, ref: Y, props: O, _owner: y.current };
23
+ }
24
+ return N.Fragment = h, N.jsx = j, N.jsxs = j, N;
25
+ }
26
+ var W = {};
27
+ /**
28
+ * @license React
29
+ * react-jsx-runtime.development.js
30
+ *
31
+ * Copyright (c) Facebook, Inc. and its affiliates.
32
+ *
33
+ * This source code is licensed under the MIT license found in the
34
+ * LICENSE file in the root directory of this source tree.
35
+ */
36
+ var we;
37
+ function fr() {
38
+ return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var R = P, f = Symbol.for("react.element"), h = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), E = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, xe = "@@iterator";
40
+ function Ce(e) {
41
+ if (e === null || typeof e != "object")
42
+ return null;
43
+ var r = Q && e[Q] || e[xe];
44
+ return typeof r == "function" ? r : null;
45
+ }
46
+ var D = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function v(e) {
48
+ {
49
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
50
+ t[n - 1] = arguments[n];
51
+ Se("error", e, t);
52
+ }
53
+ }
54
+ function Se(e, r, t) {
55
+ {
56
+ var n = D.ReactDebugCurrentFrame, o = n.getStackAddendum();
57
+ o !== "" && (r += "%s", t = t.concat([o]));
58
+ var u = t.map(function(i) {
59
+ return String(i);
60
+ });
61
+ u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
62
+ }
63
+ }
64
+ var Pe = !1, ke = !1, De = !1, Fe = !1, Ae = !1, ee;
65
+ ee = Symbol.for("react.module.reference");
66
+ function Ie(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === d || e === _ || Ae || e === y || e === k || e === m || Fe || e === Y || Pe || ke || De || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === O || e.$$typeof === j || e.$$typeof === E || e.$$typeof === l || // This needs to include all possible module reference object
68
+ // types supported by any Flight configuration anywhere since
69
+ // we don't know which Flight build this will end up being used
70
+ // with.
71
+ e.$$typeof === ee || e.getModuleId !== void 0));
72
+ }
73
+ function $e(e, r, t) {
74
+ var n = e.displayName;
75
+ if (n)
76
+ return n;
77
+ var o = r.displayName || r.name || "";
78
+ return o !== "" ? t + "(" + o + ")" : t;
79
+ }
80
+ function re(e) {
81
+ return e.displayName || "Context";
82
+ }
83
+ function w(e) {
84
+ if (e == null)
85
+ return null;
86
+ if (typeof e.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
+ return e.displayName || e.name || null;
88
+ if (typeof e == "string")
89
+ return e;
90
+ switch (e) {
91
+ case d:
92
+ return "Fragment";
93
+ case h:
94
+ return "Portal";
95
+ case _:
96
+ return "Profiler";
97
+ case y:
98
+ return "StrictMode";
99
+ case k:
100
+ return "Suspense";
101
+ case m:
102
+ return "SuspenseList";
103
+ }
104
+ if (typeof e == "object")
105
+ switch (e.$$typeof) {
106
+ case E:
107
+ var r = e;
108
+ return re(r) + ".Consumer";
109
+ case j:
110
+ var t = e;
111
+ return re(t._context) + ".Provider";
112
+ case l:
113
+ return $e(e, e.render, "ForwardRef");
114
+ case O:
115
+ var n = e.displayName || null;
116
+ return n !== null ? n : w(e.type) || "Memo";
117
+ case x: {
118
+ var o = e, u = o._payload, i = o._init;
119
+ try {
120
+ return w(i(u));
121
+ } catch {
122
+ return null;
123
+ }
124
+ }
125
+ }
126
+ return null;
127
+ }
128
+ var C = Object.assign, I = 0, te, ne, ae, ie, oe, ue, se;
129
+ function le() {
130
+ }
131
+ le.__reactDisabledLog = !0;
132
+ function Ne() {
133
+ {
134
+ if (I === 0) {
135
+ te = console.log, ne = console.info, ae = console.warn, ie = console.error, oe = console.group, ue = console.groupCollapsed, se = console.groupEnd;
136
+ var e = {
137
+ configurable: !0,
138
+ enumerable: !0,
139
+ value: le,
140
+ writable: !0
141
+ };
142
+ Object.defineProperties(console, {
143
+ info: e,
144
+ log: e,
145
+ warn: e,
146
+ error: e,
147
+ group: e,
148
+ groupCollapsed: e,
149
+ groupEnd: e
150
+ });
151
+ }
152
+ I++;
153
+ }
154
+ }
155
+ function We() {
156
+ {
157
+ if (I--, I === 0) {
158
+ var e = {
159
+ configurable: !0,
160
+ enumerable: !0,
161
+ writable: !0
162
+ };
163
+ Object.defineProperties(console, {
164
+ log: C({}, e, {
165
+ value: te
166
+ }),
167
+ info: C({}, e, {
168
+ value: ne
169
+ }),
170
+ warn: C({}, e, {
171
+ value: ae
172
+ }),
173
+ error: C({}, e, {
174
+ value: ie
175
+ }),
176
+ group: C({}, e, {
177
+ value: oe
178
+ }),
179
+ groupCollapsed: C({}, e, {
180
+ value: ue
181
+ }),
182
+ groupEnd: C({}, e, {
183
+ value: se
184
+ })
185
+ });
186
+ }
187
+ I < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ }
189
+ }
190
+ var B = D.ReactCurrentDispatcher, J;
191
+ function L(e, r, t) {
192
+ {
193
+ if (J === void 0)
194
+ try {
195
+ throw Error();
196
+ } catch (o) {
197
+ var n = o.stack.trim().match(/\n( *(at )?)/);
198
+ J = n && n[1] || "";
199
+ }
200
+ return `
201
+ ` + J + e;
202
+ }
203
+ }
204
+ var K = !1, V;
205
+ {
206
+ var Ye = typeof WeakMap == "function" ? WeakMap : Map;
207
+ V = new Ye();
208
+ }
209
+ function ce(e, r) {
210
+ if (!e || K)
211
+ return "";
212
+ {
213
+ var t = V.get(e);
214
+ if (t !== void 0)
215
+ return t;
216
+ }
217
+ var n;
218
+ K = !0;
219
+ var o = Error.prepareStackTrace;
220
+ Error.prepareStackTrace = void 0;
221
+ var u;
222
+ u = B.current, B.current = null, Ne();
223
+ try {
224
+ if (r) {
225
+ var i = function() {
226
+ throw Error();
227
+ };
228
+ if (Object.defineProperty(i.prototype, "props", {
229
+ set: function() {
230
+ throw Error();
231
+ }
232
+ }), typeof Reflect == "object" && Reflect.construct) {
233
+ try {
234
+ Reflect.construct(i, []);
235
+ } catch (b) {
236
+ n = b;
237
+ }
238
+ Reflect.construct(e, [], i);
239
+ } else {
240
+ try {
241
+ i.call();
242
+ } catch (b) {
243
+ n = b;
244
+ }
245
+ e.call(i.prototype);
246
+ }
247
+ } else {
248
+ try {
249
+ throw Error();
250
+ } catch (b) {
251
+ n = b;
252
+ }
253
+ e();
254
+ }
255
+ } catch (b) {
256
+ if (b && n && typeof b.stack == "string") {
257
+ for (var a = b.stack.split(`
258
+ `), p = n.stack.split(`
259
+ `), s = a.length - 1, c = p.length - 1; s >= 1 && c >= 0 && a[s] !== p[c]; )
260
+ c--;
261
+ for (; s >= 1 && c >= 0; s--, c--)
262
+ if (a[s] !== p[c]) {
263
+ if (s !== 1 || c !== 1)
264
+ do
265
+ if (s--, c--, c < 0 || a[s] !== p[c]) {
266
+ var g = `
267
+ ` + a[s].replace(" at new ", " at ");
268
+ return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, g), g;
269
+ }
270
+ while (s >= 1 && c >= 0);
271
+ break;
272
+ }
273
+ }
274
+ } finally {
275
+ K = !1, B.current = u, We(), Error.prepareStackTrace = o;
276
+ }
277
+ var A = e ? e.displayName || e.name : "", S = A ? L(A) : "";
278
+ return typeof e == "function" && V.set(e, S), S;
279
+ }
280
+ function Le(e, r, t) {
281
+ return ce(e, !1);
282
+ }
283
+ function Ve(e) {
284
+ var r = e.prototype;
285
+ return !!(r && r.isReactComponent);
286
+ }
287
+ function M(e, r, t) {
288
+ if (e == null)
289
+ return "";
290
+ if (typeof e == "function")
291
+ return ce(e, Ve(e));
292
+ if (typeof e == "string")
293
+ return L(e);
294
+ switch (e) {
295
+ case k:
296
+ return L("Suspense");
297
+ case m:
298
+ return L("SuspenseList");
299
+ }
300
+ if (typeof e == "object")
301
+ switch (e.$$typeof) {
302
+ case l:
303
+ return Le(e.render);
304
+ case O:
305
+ return M(e.type, r, t);
306
+ case x: {
307
+ var n = e, o = n._payload, u = n._init;
308
+ try {
309
+ return M(u(o), r, t);
310
+ } catch {
311
+ }
312
+ }
313
+ }
314
+ return "";
315
+ }
316
+ var $ = Object.prototype.hasOwnProperty, fe = {}, de = D.ReactDebugCurrentFrame;
317
+ function U(e) {
318
+ if (e) {
319
+ var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
320
+ de.setExtraStackFrame(t);
321
+ } else
322
+ de.setExtraStackFrame(null);
323
+ }
324
+ function Me(e, r, t, n, o) {
325
+ {
326
+ var u = Function.call.bind($);
327
+ for (var i in e)
328
+ if (u(e, i)) {
329
+ var a = void 0;
330
+ try {
331
+ if (typeof e[i] != "function") {
332
+ var p = 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
+ throw p.name = "Invariant Violation", p;
334
+ }
335
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
+ } catch (s) {
337
+ a = s;
338
+ }
339
+ a && !(a instanceof Error) && (U(o), v("%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 fe) && (fe[a.message] = !0, U(o), v("Failed %s type: %s", t, a.message), U(null));
340
+ }
341
+ }
342
+ }
343
+ var Ue = Array.isArray;
344
+ function q(e) {
345
+ return Ue(e);
346
+ }
347
+ function Be(e) {
348
+ {
349
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
+ return t;
351
+ }
352
+ }
353
+ function Je(e) {
354
+ try {
355
+ return ve(e), !1;
356
+ } catch {
357
+ return !0;
358
+ }
359
+ }
360
+ function ve(e) {
361
+ return "" + e;
362
+ }
363
+ function pe(e) {
364
+ if (Je(e))
365
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), ve(e);
366
+ }
367
+ var be = D.ReactCurrentOwner, Ke = {
368
+ key: !0,
369
+ ref: !0,
370
+ __self: !0,
371
+ __source: !0
372
+ }, he, me;
373
+ function qe(e) {
374
+ if ($.call(e, "ref")) {
375
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
+ if (r && r.isReactWarning)
377
+ return !1;
378
+ }
379
+ return e.ref !== void 0;
380
+ }
381
+ function Ge(e) {
382
+ if ($.call(e, "key")) {
383
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
+ if (r && r.isReactWarning)
385
+ return !1;
386
+ }
387
+ return e.key !== void 0;
388
+ }
389
+ function ze(e, r) {
390
+ typeof e.ref == "string" && be.current;
391
+ }
392
+ function Xe(e, r) {
393
+ {
394
+ var t = function() {
395
+ he || (he = !0, v("%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));
396
+ };
397
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
+ get: t,
399
+ configurable: !0
400
+ });
401
+ }
402
+ }
403
+ function He(e, r) {
404
+ {
405
+ var t = function() {
406
+ me || (me = !0, v("%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
+ };
408
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
+ get: t,
410
+ configurable: !0
411
+ });
412
+ }
413
+ }
414
+ var Ze = function(e, r, t, n, o, u, i) {
415
+ var a = {
416
+ // This tag allows us to uniquely identify this as a React Element
417
+ $$typeof: f,
418
+ // Built-in properties that belong on the element
419
+ type: e,
420
+ key: r,
421
+ ref: t,
422
+ props: i,
423
+ // Record the component responsible for creating this element.
424
+ _owner: u
425
+ };
426
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
427
+ configurable: !1,
428
+ enumerable: !1,
429
+ writable: !0,
430
+ value: !1
431
+ }), Object.defineProperty(a, "_self", {
432
+ configurable: !1,
433
+ enumerable: !1,
434
+ writable: !1,
435
+ value: n
436
+ }), Object.defineProperty(a, "_source", {
437
+ configurable: !1,
438
+ enumerable: !1,
439
+ writable: !1,
440
+ value: o
441
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
+ };
443
+ function Qe(e, r, t, n, o) {
444
+ {
445
+ var u, i = {}, a = null, p = null;
446
+ t !== void 0 && (pe(t), a = "" + t), Ge(r) && (pe(r.key), a = "" + r.key), qe(r) && (p = r.ref, ze(r, o));
447
+ for (u in r)
448
+ $.call(r, u) && !Ke.hasOwnProperty(u) && (i[u] = r[u]);
449
+ if (e && e.defaultProps) {
450
+ var s = e.defaultProps;
451
+ for (u in s)
452
+ i[u] === void 0 && (i[u] = s[u]);
453
+ }
454
+ if (a || p) {
455
+ var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ a && Xe(i, c), p && He(i, c);
457
+ }
458
+ return Ze(e, a, p, o, n, be.current, i);
459
+ }
460
+ }
461
+ var G = D.ReactCurrentOwner, ye = D.ReactDebugCurrentFrame;
462
+ function F(e) {
463
+ if (e) {
464
+ var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
465
+ ye.setExtraStackFrame(t);
466
+ } else
467
+ ye.setExtraStackFrame(null);
468
+ }
469
+ var z;
470
+ z = !1;
471
+ function X(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === f;
473
+ }
474
+ function _e() {
475
+ {
476
+ if (G.current) {
477
+ var e = w(G.current.type);
478
+ if (e)
479
+ return `
480
+
481
+ Check the render method of \`` + e + "`.";
482
+ }
483
+ return "";
484
+ }
485
+ }
486
+ function er(e) {
487
+ return "";
488
+ }
489
+ var ge = {};
490
+ function rr(e) {
491
+ {
492
+ var r = _e();
493
+ if (!r) {
494
+ var t = typeof e == "string" ? e : e.displayName || e.name;
495
+ t && (r = `
496
+
497
+ Check the top-level render call using <` + t + ">.");
498
+ }
499
+ return r;
500
+ }
501
+ }
502
+ function Re(e, r) {
503
+ {
504
+ if (!e._store || e._store.validated || e.key != null)
505
+ return;
506
+ e._store.validated = !0;
507
+ var t = rr(r);
508
+ if (ge[t])
509
+ return;
510
+ ge[t] = !0;
511
+ var n = "";
512
+ e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + w(e._owner.type) + "."), F(e), v('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), F(null);
513
+ }
514
+ }
515
+ function Ee(e, r) {
516
+ {
517
+ if (typeof e != "object")
518
+ return;
519
+ if (q(e))
520
+ for (var t = 0; t < e.length; t++) {
521
+ var n = e[t];
522
+ X(n) && Re(n, r);
523
+ }
524
+ else if (X(e))
525
+ e._store && (e._store.validated = !0);
526
+ else if (e) {
527
+ var o = Ce(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
+ }
532
+ }
533
+ }
534
+ function tr(e) {
535
+ {
536
+ var r = e.type;
537
+ if (r == null || typeof r == "string")
538
+ return;
539
+ var t;
540
+ if (typeof r == "function")
541
+ t = r.propTypes;
542
+ else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
543
+ // Inner props are checked in the reconciler.
544
+ r.$$typeof === O))
545
+ t = r.propTypes;
546
+ else
547
+ return;
548
+ if (t) {
549
+ var n = w(r);
550
+ Me(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !z) {
552
+ z = !0;
553
+ var o = w(r);
554
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
555
+ }
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
+ }
558
+ }
559
+ function nr(e) {
560
+ {
561
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
+ var n = r[t];
563
+ if (n !== "children" && n !== "key") {
564
+ F(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), F(null);
565
+ break;
566
+ }
567
+ }
568
+ e.ref !== null && (F(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
569
+ }
570
+ }
571
+ var Te = {};
572
+ function je(e, r, t, n, o, u) {
573
+ {
574
+ var i = Ie(e);
575
+ if (!i) {
576
+ var a = "";
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
+ var p = er();
579
+ p ? a += p : a += _e();
580
+ var s;
581
+ e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof === f ? (s = "<" + (w(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, v("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
+ }
583
+ var c = Qe(e, r, t, o, u);
584
+ if (c == null)
585
+ return c;
586
+ if (i) {
587
+ var g = r.children;
588
+ if (g !== void 0)
589
+ if (n)
590
+ if (q(g)) {
591
+ for (var A = 0; A < g.length; A++)
592
+ Ee(g[A], e);
593
+ Object.freeze && Object.freeze(g);
594
+ } else
595
+ v("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
+ else
597
+ Ee(g, e);
598
+ }
599
+ if ($.call(r, "key")) {
600
+ var S = w(e), b = Object.keys(r).filter(function(lr) {
601
+ return lr !== "key";
602
+ }), H = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!Te[S + H]) {
604
+ var sr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
605
+ v(`A props object containing a "key" prop is being spread into JSX:
606
+ let props = %s;
607
+ <%s {...props} />
608
+ React keys must be passed directly to JSX without using spread:
609
+ let props = %s;
610
+ <%s key={someKey} {...props} />`, H, S, sr, S), Te[S + H] = !0;
611
+ }
612
+ }
613
+ return e === d ? nr(c) : tr(c), c;
614
+ }
615
+ }
616
+ function ar(e, r, t) {
617
+ return je(e, r, t, !0);
618
+ }
619
+ function ir(e, r, t) {
620
+ return je(e, r, t, !1);
621
+ }
622
+ var or = ir, ur = ar;
623
+ W.Fragment = d, W.jsx = or, W.jsxs = ur;
624
+ }()), W;
625
+ }
626
+ process.env.NODE_ENV === "production" ? Z.exports = cr() : Z.exports = fr();
627
+ var T = Z.exports;
628
+ const dr = P.forwardRef(
629
+ ({ className: R, variant: f = "primary", size: h = "md", ...d }, y) => {
630
+ const _ = [
631
+ "ui-btn",
632
+ `ui-btn-${f}`,
633
+ `ui-btn-${h}`,
634
+ R
635
+ ].filter(Boolean).join(" ");
636
+ return /* @__PURE__ */ T.jsx("button", { ref: y, className: _, ...d });
637
+ }
638
+ );
639
+ dr.displayName = "Button";
640
+ const vr = P.forwardRef(
641
+ ({ className: R, label: f, error: h, helperText: d, fullWidth: y, id: _, ...j }, E) => {
642
+ const l = _ || P.useId();
643
+ return /* @__PURE__ */ T.jsxs("div", { className: `ui-input-wrapper ${y ? "ui-input-wrapper-full" : ""}`, children: [
644
+ f && /* @__PURE__ */ T.jsx("label", { htmlFor: l, className: "ui-label", children: f }),
645
+ /* @__PURE__ */ T.jsx(
646
+ "input",
647
+ {
648
+ ref: E,
649
+ id: l,
650
+ className: `
651
+ ui-input
652
+ ${h ? "ui-input-error" : ""}
653
+ ${R || ""}
654
+ `,
655
+ ...j
656
+ }
657
+ ),
658
+ d && /* @__PURE__ */ T.jsx("span", { className: `ui-helper-text ${h ? "ui-helper-text-error" : ""}`, children: d })
659
+ ] });
660
+ }
661
+ );
662
+ vr.displayName = "Input";
663
+ const pr = P.forwardRef(
664
+ ({ className: R, title: f, footer: h, children: d, ...y }, _) => /* @__PURE__ */ T.jsxs("div", { ref: _, className: `ui-card ${R || ""}`, ...y, children: [
665
+ f && /* @__PURE__ */ T.jsx("div", { className: "ui-card__header", children: f }),
666
+ /* @__PURE__ */ T.jsx("div", { className: "ui-card__body", children: d }),
667
+ h && /* @__PURE__ */ T.jsx("div", { className: "ui-card__footer", children: h })
668
+ ] })
669
+ );
670
+ pr.displayName = "Card";
671
+ const br = P.forwardRef(
672
+ ({ className: R, bordered: f = !0, striped: h, hover: d, size: y = "md", children: _, ...j }, E) => {
673
+ const l = [
674
+ "ui-table",
675
+ f && "ui-table-bordered",
676
+ h && "ui-table-striped",
677
+ d && "ui-table-hover",
678
+ y === "sm" && "ui-table-sm",
679
+ R
680
+ ].filter(Boolean).join(" ");
681
+ return /* @__PURE__ */ T.jsx("div", { className: "ui-table-responsive", children: /* @__PURE__ */ T.jsx("table", { ref: E, className: l, ...j, children: _ }) });
682
+ }
683
+ );
684
+ br.displayName = "Table";
685
+ export {
686
+ dr as Button,
687
+ pr as Card,
688
+ vr as Input,
689
+ br as Table
690
+ };
@@ -0,0 +1,5 @@
1
+
2
+ export * from './components/Button/Button';
3
+ export * from './components/Input/Input';
4
+ export * from './components/Card/Card';
5
+ export * from './components/Table/Table';
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ :root{--ui-primary: #2563eb;--ui-primary-hover: color-mix(in srgb, var(--ui-primary), black 10%);--ui-primary-active: color-mix(in srgb, var(--ui-primary), black 20%);--ui-primary-light: #eff6ff;--ui-text-main: #111827;--ui-text-muted: #6b7280;--ui-border: #e5e7eb;--ui-border-hover: #d1d5db;--ui-bg-main: #ffffff;--ui-bg-subtle: #f9fafb;--ui-danger: #ef4444;--ui-success: #10b981;--ui-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--ui-font-size-sm: 12px;--ui-font-size-md: 13px;--ui-font-size-lg: 16px;--ui-font-size-xl: 21px;--ui-spacing-xs: .25rem;--ui-spacing-sm: .5rem;--ui-spacing-md: 1rem;--ui-spacing-lg: 1.5rem;--ui-radius-sm: 2px;--ui-radius-md: 4px;--ui-radius-lg: 8px;--ui-radius-xl: 16px;--ui-radius-full: 9999px;--ui-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--ui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--ui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -2px rgb(0 0 0 / .05);--ui-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 10px 10px -5px rgb(0 0 0 / .04);--ui-btn-bg: transparent;--ui-btn-text: var(--ui-text-main);--ui-btn-border: transparent;--ui-btn-radius: var(--ui-radius-md);--ui-btn-padding: .5rem 1rem;--ui-btn-font-size: .95rem;--ui-btn-radius-sm: var(--ui-radius-md);--ui-btn-radius-md: var(--ui-radius-md);--ui-btn-radius-lg: var(--ui-radius-md);--ui-btn-radius-xl: var(--ui-radius-md);--ui-btn-padding-sm: .1rem .5rem;--ui-btn-padding-md: .25rem .5rem;--ui-btn-padding-lg: .25rem 1rem;--ui-btn-padding-xl: .5rem 1rem;--ui-btn-font-size-sm: var(--ui-font-size-sm);--ui-btn-font-size-md: var(--ui-font-size-md);--ui-btn-font-size-lg: var(--ui-font-size-lg);--ui-btn-font-size-xl: var(--ui-font-size-xl);--ui-input-radius: var(--ui-radius-md);--ui-card-radius: var(--ui-radius-md)}*,*:before,*:after{box-sizing:border-box}*{margin:0;padding:0}body{line-height:1;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;outline:none}table{border-collapse:collapse}button{background:none;border:none;cursor:pointer}.ui-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--ui-btn-padding);font-size:var(--ui-btn-font-size);border:1px solid transparent;border-radius:var(--ui-radius-md);font-family:var(--ui-font-family);font-weight:500;cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1);line-height:1.5;text-decoration:none;-webkit-user-select:none;user-select:none}.ui-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.ui-btn-primary{background-color:var(--ui-primary);color:#fff;border-color:var(--ui-primary)}.ui-btn-primary:hover{background-color:var(--ui-primary-hover);border-color:var(--ui-primary-hover)}.ui-btn-primary:active{background-color:var(--ui-primary-active)}.ui-btn-secondary{background-color:#fff;color:var(--ui-text-main);border:1px solid var(--ui-border);box-shadow:var(--ui-shadow-sm)}.ui-btn-secondary:hover{background-color:var(--ui-bg-subtle);border-color:var(--ui-border-hover);color:#000}.ui-btn-outline{background-color:transparent;color:var(--ui-primary);border-color:var(--ui-primary)}.ui-btn-outline:hover{background-color:var(--ui-primary-light)}.ui-btn-sm{--ui-btn-padding: var(--ui-btn-padding-sm);--ui-btn-font-size: var(--ui-btn-font-size-sm);border-radius:var(--ui-btn-radius-sm, var(--ui-radius-sm))}.ui-btn-md{--ui-btn-padding: var(--ui-btn-padding-md);--ui-btn-font-size: var(--ui-btn-font-size-md);border-radius:var(--ui-btn-radius-md, var(--ui-radius-md))}.ui-btn-lg{--ui-btn-padding: var(--ui-btn-padding-lg);--ui-btn-font-size: var(--ui-btn-font-size-lg);border-radius:var(--ui-btn-radius-lg, var(--ui-radius-lg))}.ui-btn-xl{--ui-btn-padding: var(--ui-btn-padding-xl);--ui-btn-font-size: var(--ui-btn-font-size-xl);border-radius:var(--ui-btn-radius-xl, var(--ui-radius-xl))}.ui-btn:focus-visible{outline:2px solid var(--ui-primary);outline-offset:2px}.ui-btn:disabled,.ui-btn[aria-disabled=true]{opacity:.6;cursor:not-allowed;pointer-events:none;filter:grayscale(.5)}.ui-input-wrapper{display:inline-flex;flex-direction:column;gap:.375rem}.ui-input-wrapper-full{display:flex;width:100%}.ui-label{font-size:.875rem;font-weight:500;color:var(--ui-text-main)}.ui-input{display:block;width:100%;padding:.5rem .75rem;font-size:.95rem;font-family:var(--ui-font-family);color:var(--ui-text-main);background-color:var(--ui-bg-main);border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.ui-input::placeholder{color:var(--ui-text-muted);opacity:.8}.ui-input:hover{border-color:var(--ui-border-hover)}.ui-input:focus{border-color:var(--ui-primary);outline:0;box-shadow:0 0 0 3px var(--ui-primary-light)}.ui-input-error{border-color:var(--ui-danger)}.ui-input-error:focus{box-shadow:0 0 0 3px #ef444426}.ui-helper-text{font-size:.8rem;color:var(--ui-text-muted)}.ui-helper-text-error{color:var(--ui-danger)}.ui-card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:var(--ui-bg-main);border:1px solid var(--ui-border);border-radius:var(--ui-radius-lg);transition:border-color .2s ease}.ui-card:hover{border-color:var(--ui-border-hover)}.ui-card__header{padding:1rem 1.25rem;margin-bottom:0;background-color:transparent;border-bottom:1px solid var(--ui-border);font-weight:600;font-size:1.1rem;color:var(--ui-text-main)}.ui-card__body{flex:1 1 auto;padding:1.25rem;color:var(--ui-text-muted);font-size:.95rem;line-height:1.6}.ui-card__footer{padding:1rem 1.25rem;background-color:var(--ui-bg-subtle);border-top:1px solid var(--ui-border);display:flex;align-items:center;border-bottom-left-radius:calc(var(--ui-radius-lg) - 1px);border-bottom-right-radius:calc(var(--ui-radius-lg) - 1px)}.ui-table{width:100%;margin-bottom:1rem;color:var(--ui-text-main);background-color:transparent;border-collapse:collapse;font-family:var(--ui-font-family);font-size:.95rem}.ui-table th,.ui-table td{padding:.75rem;vertical-align:top;border-bottom:1px solid var(--ui-border);text-align:left}.ui-table th{font-weight:600;color:var(--ui-text-main);background-color:var(--ui-bg-subtle);border-bottom-width:2px}.ui-table-bordered,.ui-table-bordered th,.ui-table-bordered td{border:1px solid var(--ui-border)}.ui-table-striped tbody tr:nth-of-type(odd){background-color:var(--ui-bg-subtle)}.ui-table-hover tbody tr:hover{background-color:var(--ui-primary-light);color:var(--ui-primary-dark)}.ui-table-sm th,.ui-table-sm td{padding:.375rem;font-size:.875rem}.ui-table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
@@ -0,0 +1,44 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface ThemeConfig {
4
+ colors?: {
5
+ primary?: string;
6
+ secondary?: string;
7
+ background?: string;
8
+ text?: string;
9
+ };
10
+ components?: {
11
+ Button?: {
12
+ radius?: string;
13
+ padding?: string;
14
+ sizes?: {
15
+ sm?: {
16
+ radius?: string;
17
+ padding?: string;
18
+ fontSize?: string;
19
+ };
20
+ md?: {
21
+ radius?: string;
22
+ padding?: string;
23
+ fontSize?: string;
24
+ };
25
+ lg?: {
26
+ radius?: string;
27
+ padding?: string;
28
+ fontSize?: string;
29
+ };
30
+ };
31
+ };
32
+ Input?: {
33
+ radius?: string;
34
+ };
35
+ Card?: {
36
+ radius?: string;
37
+ shadow?: string;
38
+ };
39
+ };
40
+ }
41
+ export declare const ThemeProvider: ({ theme, children }: {
42
+ theme: ThemeConfig;
43
+ children: React.ReactNode;
44
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ export interface ThemeConfig {
2
+ prefix?: string;
3
+ colors?: {
4
+ primary?: string;
5
+ secondary?: string;
6
+ background?: string;
7
+ text?: string;
8
+ [key: string]: string | undefined;
9
+ };
10
+ typography?: {
11
+ 'font-family'?: string;
12
+ 'font-size-sm'?: string;
13
+ 'font-size-md'?: string;
14
+ 'font-size-lg'?: string;
15
+ 'font-size-xl'?: string;
16
+ [key: string]: string | undefined;
17
+ };
18
+ spacing?: {
19
+ [key: string]: string;
20
+ };
21
+ radius?: {
22
+ [key: string]: string;
23
+ };
24
+ shadows?: {
25
+ [key: string]: string;
26
+ };
27
+ components?: {
28
+ [key: string]: {
29
+ [key: string]: string | object | undefined;
30
+ };
31
+ };
32
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@coinloger/dev-ui",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ },
16
+ "./style.css": "./dist/style.css"
17
+ },
18
+ "scripts": {
19
+ "dev": "vite",
20
+ "build": "tsc && vite build",
21
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
22
+ "preview": "vite preview",
23
+ "generate:theme": "node scripts/generate-theme.js",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "peerDependencies": {
27
+ "react": "^18.2.0",
28
+ "react-dom": "^18.2.0"
29
+ },
30
+ "dependencies": {
31
+ "clsx": "^2.1.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/react": "^18.2.64",
35
+ "@types/react-dom": "^18.2.21",
36
+ "@typescript-eslint/eslint-plugin": "^7.1.1",
37
+ "@typescript-eslint/parser": "^7.1.1",
38
+ "@vitejs/plugin-react": "^4.2.1",
39
+ "eslint": "^8.57.0",
40
+ "eslint-plugin-react-hooks": "^4.6.0",
41
+ "eslint-plugin-react-refresh": "^0.4.5",
42
+ "jiti": "^2.6.1",
43
+ "ts-node": "^10.9.2",
44
+ "typescript": "^5.2.2",
45
+ "vite": "^5.1.4",
46
+ "vite-plugin-dts": "^3.7.3"
47
+ }
48
+ }