libreria-atomic-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # Libreria Atomic UI
2
+
3
+ Pequeña librería de componentes organizada según Atomic Design (atoms, molecules, organisms) para React + TypeScript.
4
+
5
+ Instrucciones rápidas:
6
+
7
+ - Instalar dependencias:
8
+
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ - Desarrollo del example:
14
+
15
+ ```bash
16
+ npm run dev:example
17
+ ```
18
+
19
+ - Construir la librería (usa Vite library mode):
20
+
21
+ ```bash
22
+ npm run build
23
+ ```
24
+
25
+ Exporta los componentes desde `src/` por capas.
@@ -0,0 +1,646 @@
1
+ import Se from "react";
2
+ var H = { exports: {} }, A = {};
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 Te;
13
+ function cr() {
14
+ if (Te) return A;
15
+ Te = 1;
16
+ var g = Se, h = Symbol.for("react.element"), w = Symbol.for("react.fragment"), j = Object.prototype.hasOwnProperty, $ = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, W = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function k(R, f, O) {
18
+ var p, E = {}, m = null, Y = null;
19
+ O !== void 0 && (m = "" + O), f.key !== void 0 && (m = "" + f.key), f.ref !== void 0 && (Y = f.ref);
20
+ for (p in f) j.call(f, p) && !W.hasOwnProperty(p) && (E[p] = f[p]);
21
+ if (R && R.defaultProps) for (p in f = R.defaultProps, f) E[p] === void 0 && (E[p] = f[p]);
22
+ return { $$typeof: h, type: R, key: m, ref: Y, props: E, _owner: $.current };
23
+ }
24
+ return A.Fragment = w, A.jsx = k, A.jsxs = k, A;
25
+ }
26
+ var I = {};
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 je;
37
+ function dr() {
38
+ return je || (je = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var g = Se, h = Symbol.for("react.element"), w = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), R = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Z = Symbol.iterator, Pe = "@@iterator";
40
+ function Ce(e) {
41
+ if (e === null || typeof e != "object")
42
+ return null;
43
+ var r = Z && e[Z] || e[Pe];
44
+ return typeof r == "function" ? r : null;
45
+ }
46
+ var S = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function c(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
+ we("error", e, t);
52
+ }
53
+ }
54
+ function we(e, r, t) {
55
+ {
56
+ var n = S.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 ke = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, Q;
65
+ Q = Symbol.for("react.module.reference");
66
+ function $e(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === j || e === W || Ie || e === $ || e === O || e === p || Ae || e === Y || ke || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === E || e.$$typeof === k || e.$$typeof === R || e.$$typeof === f || // 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 === Q || e.getModuleId !== void 0));
72
+ }
73
+ function We(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 ee(e) {
81
+ return e.displayName || "Context";
82
+ }
83
+ function _(e) {
84
+ if (e == null)
85
+ return null;
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")
87
+ return e.displayName || e.name || null;
88
+ if (typeof e == "string")
89
+ return e;
90
+ switch (e) {
91
+ case j:
92
+ return "Fragment";
93
+ case w:
94
+ return "Portal";
95
+ case W:
96
+ return "Profiler";
97
+ case $:
98
+ return "StrictMode";
99
+ case O:
100
+ return "Suspense";
101
+ case p:
102
+ return "SuspenseList";
103
+ }
104
+ if (typeof e == "object")
105
+ switch (e.$$typeof) {
106
+ case R:
107
+ var r = e;
108
+ return ee(r) + ".Consumer";
109
+ case k:
110
+ var t = e;
111
+ return ee(t._context) + ".Provider";
112
+ case f:
113
+ return We(e, e.render, "ForwardRef");
114
+ case E:
115
+ var n = e.displayName || null;
116
+ return n !== null ? n : _(e.type) || "Memo";
117
+ case m: {
118
+ var o = e, u = o._payload, i = o._init;
119
+ try {
120
+ return _(i(u));
121
+ } catch {
122
+ return null;
123
+ }
124
+ }
125
+ }
126
+ return null;
127
+ }
128
+ var x = Object.assign, D = 0, re, te, ne, ae, ie, oe, ue;
129
+ function se() {
130
+ }
131
+ se.__reactDisabledLog = !0;
132
+ function Ye() {
133
+ {
134
+ if (D === 0) {
135
+ re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, ue = console.groupEnd;
136
+ var e = {
137
+ configurable: !0,
138
+ enumerable: !0,
139
+ value: se,
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
+ D++;
153
+ }
154
+ }
155
+ function Le() {
156
+ {
157
+ if (D--, D === 0) {
158
+ var e = {
159
+ configurable: !0,
160
+ enumerable: !0,
161
+ writable: !0
162
+ };
163
+ Object.defineProperties(console, {
164
+ log: x({}, e, {
165
+ value: re
166
+ }),
167
+ info: x({}, e, {
168
+ value: te
169
+ }),
170
+ warn: x({}, e, {
171
+ value: ne
172
+ }),
173
+ error: x({}, e, {
174
+ value: ae
175
+ }),
176
+ group: x({}, e, {
177
+ value: ie
178
+ }),
179
+ groupCollapsed: x({}, e, {
180
+ value: oe
181
+ }),
182
+ groupEnd: x({}, e, {
183
+ value: ue
184
+ })
185
+ });
186
+ }
187
+ D < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ }
189
+ }
190
+ var N = S.ReactCurrentDispatcher, B;
191
+ function L(e, r, t) {
192
+ {
193
+ if (B === void 0)
194
+ try {
195
+ throw Error();
196
+ } catch (o) {
197
+ var n = o.stack.trim().match(/\n( *(at )?)/);
198
+ B = n && n[1] || "";
199
+ }
200
+ return `
201
+ ` + B + e;
202
+ }
203
+ }
204
+ var J = !1, V;
205
+ {
206
+ var Ve = typeof WeakMap == "function" ? WeakMap : Map;
207
+ V = new Ve();
208
+ }
209
+ function le(e, r) {
210
+ if (!e || J)
211
+ return "";
212
+ {
213
+ var t = V.get(e);
214
+ if (t !== void 0)
215
+ return t;
216
+ }
217
+ var n;
218
+ J = !0;
219
+ var o = Error.prepareStackTrace;
220
+ Error.prepareStackTrace = void 0;
221
+ var u;
222
+ u = N.current, N.current = null, Ye();
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 (v) {
236
+ n = v;
237
+ }
238
+ Reflect.construct(e, [], i);
239
+ } else {
240
+ try {
241
+ i.call();
242
+ } catch (v) {
243
+ n = v;
244
+ }
245
+ e.call(i.prototype);
246
+ }
247
+ } else {
248
+ try {
249
+ throw Error();
250
+ } catch (v) {
251
+ n = v;
252
+ }
253
+ e();
254
+ }
255
+ } catch (v) {
256
+ if (v && n && typeof v.stack == "string") {
257
+ for (var a = v.stack.split(`
258
+ `), d = n.stack.split(`
259
+ `), s = a.length - 1, l = d.length - 1; s >= 1 && l >= 0 && a[s] !== d[l]; )
260
+ l--;
261
+ for (; s >= 1 && l >= 0; s--, l--)
262
+ if (a[s] !== d[l]) {
263
+ if (s !== 1 || l !== 1)
264
+ do
265
+ if (s--, l--, l < 0 || a[s] !== d[l]) {
266
+ var b = `
267
+ ` + a[s].replace(" at new ", " at ");
268
+ return e.displayName && b.includes("<anonymous>") && (b = b.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, b), b;
269
+ }
270
+ while (s >= 1 && l >= 0);
271
+ break;
272
+ }
273
+ }
274
+ } finally {
275
+ J = !1, N.current = u, Le(), Error.prepareStackTrace = o;
276
+ }
277
+ var C = e ? e.displayName || e.name : "", T = C ? L(C) : "";
278
+ return typeof e == "function" && V.set(e, T), T;
279
+ }
280
+ function Me(e, r, t) {
281
+ return le(e, !1);
282
+ }
283
+ function Ue(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 le(e, Ue(e));
292
+ if (typeof e == "string")
293
+ return L(e);
294
+ switch (e) {
295
+ case O:
296
+ return L("Suspense");
297
+ case p:
298
+ return L("SuspenseList");
299
+ }
300
+ if (typeof e == "object")
301
+ switch (e.$$typeof) {
302
+ case f:
303
+ return Me(e.render);
304
+ case E:
305
+ return M(e.type, r, t);
306
+ case m: {
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 F = Object.prototype.hasOwnProperty, fe = {}, ce = S.ReactDebugCurrentFrame;
317
+ function U(e) {
318
+ if (e) {
319
+ var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
320
+ ce.setExtraStackFrame(t);
321
+ } else
322
+ ce.setExtraStackFrame(null);
323
+ }
324
+ function Ne(e, r, t, n, o) {
325
+ {
326
+ var u = Function.call.bind(F);
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 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
+ throw d.name = "Invariant Violation", d;
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), 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 fe) && (fe[a.message] = !0, U(o), c("Failed %s type: %s", t, a.message), U(null));
340
+ }
341
+ }
342
+ }
343
+ var Be = Array.isArray;
344
+ function q(e) {
345
+ return Be(e);
346
+ }
347
+ function Je(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 qe(e) {
354
+ try {
355
+ return de(e), !1;
356
+ } catch {
357
+ return !0;
358
+ }
359
+ }
360
+ function de(e) {
361
+ return "" + e;
362
+ }
363
+ function ve(e) {
364
+ if (qe(e))
365
+ return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), de(e);
366
+ }
367
+ var pe = S.ReactCurrentOwner, Ke = {
368
+ key: !0,
369
+ ref: !0,
370
+ __self: !0,
371
+ __source: !0
372
+ }, ye, be;
373
+ function ze(e) {
374
+ if (F.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 (F.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 Xe(e, r) {
390
+ typeof e.ref == "string" && pe.current;
391
+ }
392
+ function He(e, r) {
393
+ {
394
+ var t = function() {
395
+ ye || (ye = !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));
396
+ };
397
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
+ get: t,
399
+ configurable: !0
400
+ });
401
+ }
402
+ }
403
+ function Ze(e, r) {
404
+ {
405
+ var t = function() {
406
+ 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));
407
+ };
408
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
+ get: t,
410
+ configurable: !0
411
+ });
412
+ }
413
+ }
414
+ var Qe = 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: h,
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 er(e, r, t, n, o) {
444
+ {
445
+ var u, i = {}, a = null, d = null;
446
+ t !== void 0 && (ve(t), a = "" + t), Ge(r) && (ve(r.key), a = "" + r.key), ze(r) && (d = r.ref, Xe(r, o));
447
+ for (u in r)
448
+ F.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 || d) {
455
+ var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ a && He(i, l), d && Ze(i, l);
457
+ }
458
+ return Qe(e, a, d, o, n, pe.current, i);
459
+ }
460
+ }
461
+ var K = S.ReactCurrentOwner, ge = S.ReactDebugCurrentFrame;
462
+ function P(e) {
463
+ if (e) {
464
+ var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
465
+ ge.setExtraStackFrame(t);
466
+ } else
467
+ ge.setExtraStackFrame(null);
468
+ }
469
+ var z;
470
+ z = !1;
471
+ function G(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === h;
473
+ }
474
+ function he() {
475
+ {
476
+ if (K.current) {
477
+ var e = _(K.current.type);
478
+ if (e)
479
+ return `
480
+
481
+ Check the render method of \`` + e + "`.";
482
+ }
483
+ return "";
484
+ }
485
+ }
486
+ function rr(e) {
487
+ return "";
488
+ }
489
+ var Ee = {};
490
+ function tr(e) {
491
+ {
492
+ var r = he();
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 _e(e, r) {
503
+ {
504
+ if (!e._store || e._store.validated || e.key != null)
505
+ return;
506
+ e._store.validated = !0;
507
+ var t = tr(r);
508
+ if (Ee[t])
509
+ return;
510
+ Ee[t] = !0;
511
+ var n = "";
512
+ e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + _(e._owner.type) + "."), P(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), P(null);
513
+ }
514
+ }
515
+ function Re(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
+ G(n) && _e(n, r);
523
+ }
524
+ else if (G(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
+ G(i.value) && _e(i.value, r);
531
+ }
532
+ }
533
+ }
534
+ function nr(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 === f || // Note: Memo only checks outer props here.
543
+ // Inner props are checked in the reconciler.
544
+ r.$$typeof === E))
545
+ t = r.propTypes;
546
+ else
547
+ return;
548
+ if (t) {
549
+ var n = _(r);
550
+ Ne(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !z) {
552
+ z = !0;
553
+ var o = _(r);
554
+ c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
555
+ }
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
+ }
558
+ }
559
+ function ar(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
+ P(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), P(null);
565
+ break;
566
+ }
567
+ }
568
+ e.ref !== null && (P(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), P(null));
569
+ }
570
+ }
571
+ var me = {};
572
+ function xe(e, r, t, n, o, u) {
573
+ {
574
+ var i = $e(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 d = rr();
579
+ d ? a += d : a += he();
580
+ var s;
581
+ e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof === h ? (s = "<" + (_(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
+ }
583
+ var l = er(e, r, t, o, u);
584
+ if (l == null)
585
+ return l;
586
+ if (i) {
587
+ var b = r.children;
588
+ if (b !== void 0)
589
+ if (n)
590
+ if (q(b)) {
591
+ for (var C = 0; C < b.length; C++)
592
+ Re(b[C], e);
593
+ Object.freeze && Object.freeze(b);
594
+ } else
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
+ else
597
+ Re(b, e);
598
+ }
599
+ if (F.call(r, "key")) {
600
+ var T = _(e), v = Object.keys(r).filter(function(fr) {
601
+ return fr !== "key";
602
+ }), X = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!me[T + X]) {
604
+ var lr = v.length > 0 ? "{" + v.join(": ..., ") + ": ...}" : "{}";
605
+ c(`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} />`, X, T, lr, T), me[T + X] = !0;
611
+ }
612
+ }
613
+ return e === j ? ar(l) : nr(l), l;
614
+ }
615
+ }
616
+ function ir(e, r, t) {
617
+ return xe(e, r, t, !0);
618
+ }
619
+ function or(e, r, t) {
620
+ return xe(e, r, t, !1);
621
+ }
622
+ var ur = or, sr = ir;
623
+ I.Fragment = j, I.jsx = ur, I.jsxs = sr;
624
+ }()), I;
625
+ }
626
+ process.env.NODE_ENV === "production" ? H.exports = cr() : H.exports = dr();
627
+ var y = H.exports;
628
+ const Oe = ({ variant: g = "primary", children: h, ...w }) => /* @__PURE__ */ y.jsxs("button", { style: { all: "unset" }, ...w, children: [
629
+ /* @__PURE__ */ y.jsx("button", { style: Object.assign({}, { padding: 0 }, {}), "aria-hidden": !0 }),
630
+ /* @__PURE__ */ y.jsx("span", { style: { display: "inline-block" }, children: /* @__PURE__ */ y.jsx("button", { style: { display: "none" } }) }),
631
+ /* @__PURE__ */ y.jsx("span", { style: { display: "inline-block", padding: "8px 12px", borderRadius: 6, background: g === "primary" ? "#1f6feb" : "#e5e7eb", color: g === "primary" ? "#fff" : "#111" }, children: h })
632
+ ] }), pr = ({ label: g, ...h }) => /* @__PURE__ */ y.jsxs("label", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
633
+ g && /* @__PURE__ */ y.jsx("span", { style: { fontSize: 13, color: "#111" }, children: g }),
634
+ /* @__PURE__ */ y.jsx("input", { ...h, style: { padding: "8px 10px", borderRadius: 6, border: "1px solid #d1d5db" } })
635
+ ] }), yr = () => /* @__PURE__ */ y.jsxs("header", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: 16, borderBottom: "1px solid #e5e7eb" }, children: [
636
+ /* @__PURE__ */ y.jsx("div", { style: { fontWeight: 700 }, children: "Libreria" }),
637
+ /* @__PURE__ */ y.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
638
+ /* @__PURE__ */ y.jsx(Oe, { variant: "secondary", children: "Sign in" }),
639
+ /* @__PURE__ */ y.jsx(Oe, { children: "Primary" })
640
+ ] })
641
+ ] });
642
+ export {
643
+ Oe as Button,
644
+ yr as Header,
645
+ pr as Input
646
+ };
@@ -0,0 +1,30 @@
1
+ (function(g,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],O):(g=typeof globalThis<"u"?globalThis:g||self,O(g.LibreriaAtomicUI={},g.React))})(this,function(g,O){"use strict";var J={exports:{}},D={};/**
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 re;function Ce(){if(re)return D;re=1;var h=O,E=Symbol.for("react.element"),A=Symbol.for("react.fragment"),S=Object.prototype.hasOwnProperty,$=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,L={key:!0,ref:!0,__self:!0,__source:!0};function I(m,f,P){var y,R={},T=null,M=null;P!==void 0&&(T=""+P),f.key!==void 0&&(T=""+f.key),f.ref!==void 0&&(M=f.ref);for(y in f)S.call(f,y)&&!L.hasOwnProperty(y)&&(R[y]=f[y]);if(m&&m.defaultProps)for(y in f=m.defaultProps,f)R[y]===void 0&&(R[y]=f[y]);return{$$typeof:E,type:m,key:T,ref:M,props:R,_owner:$.current}}return D.Fragment=A,D.jsx=I,D.jsxs=I,D}var F={};/**
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 te;function we(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var h=O,E=Symbol.for("react.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),m=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),ne=Symbol.iterator,Fe="@@iterator";function Ae(e){if(e===null||typeof e!="object")return null;var r=ne&&e[ne]||e[Fe];return typeof r=="function"?r:null}var C=h.__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=C.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,ae;ae=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===S||e===L||Me||e===$||e===P||e===y||Le||e===M||We||Ye||$e||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===R||e.$$typeof===I||e.$$typeof===m||e.$$typeof===f||e.$$typeof===ae||e.getModuleId!==void 0))}function Ve(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ie(e){return e.displayName||"Context"}function _(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 S:return"Fragment";case A:return"Portal";case L:return"Profiler";case $:return"StrictMode";case P:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case m:var r=e;return ie(r)+".Consumer";case I:var t=e;return ie(t._context)+".Provider";case f:return Ve(e,e.render,"ForwardRef");case R:var n=e.displayName||null;return n!==null?n:_(e.type)||"Memo";case T:{var o=e,u=o._payload,i=o._init;try{return _(i(u))}catch{return null}}}return null}var x=Object.assign,W=0,oe,ue,se,le,fe,ce,de;function ve(){}ve.__reactDisabledLog=!0;function Ne(){{if(W===0){oe=console.log,ue=console.info,se=console.warn,le=console.error,fe=console.group,ce=console.groupCollapsed,de=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function Be(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x({},e,{value:oe}),info:x({},e,{value:ue}),warn:x({},e,{value:se}),error:x({},e,{value:le}),group:x({},e,{value:fe}),groupCollapsed:x({},e,{value:ce}),groupEnd:x({},e,{value:de})})}W<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=C.ReactCurrentDispatcher,z;function U(e,r,t){{if(z===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);z=n&&n[1]||""}return`
18
+ `+z+e}}var G=!1,V;{var Je=typeof WeakMap=="function"?WeakMap:Map;V=new Je}function pe(e,r){if(!e||G)return"";{var t=V.get(e);if(t!==void 0)return t}var n;G=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.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,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"&&V.set(e,b),b}while(s>=1&&l>=0);break}}}finally{G=!1,q.current=u,Be(),Error.prepareStackTrace=o}var k=e?e.displayName||e.name:"",j=k?U(k):"";return typeof e=="function"&&V.set(e,j),j}function Ke(e,r,t){return pe(e,!1)}function qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,qe(e));if(typeof e=="string")return U(e);switch(e){case P:return U("Suspense");case y:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Ke(e.render);case R:return N(e.type,r,t);case T:{var n=e,o=n._payload,u=n._init;try{return N(u(o),r,t)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,ye={},be=C.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);be.setExtraStackFrame(t)}else be.setExtraStackFrame(null)}function ze(e,r,t,n,o){{var u=Function.call.bind(Y);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)&&(B(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),B(null)),a instanceof Error&&!(a.message in ye)&&(ye[a.message]=!0,B(o),c("Failed %s type: %s",t,a.message),B(null))}}}var Ge=Array.isArray;function H(e){return Ge(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Xe(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function he(e){if(Xe(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),ge(e)}var Ee=C.ReactCurrentOwner,Ze={key:!0,ref:!0,__self:!0,__source:!0},Re,_e;function Qe(e){if(Y.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(Y.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"&&Ee.current}function tr(e,r){{var t=function(){Re||(Re=!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(){_e||(_e=!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:E,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&&(he(t),a=""+t),er(r)&&(he(r.key),a=""+r.key),Qe(r)&&(d=r.ref,rr(r,o));for(u in r)Y.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 l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&tr(i,l),d&&nr(i,l)}return ar(e,a,d,o,n,Ee.current,i)}}var X=C.ReactCurrentOwner,me=C.ReactDebugCurrentFrame;function w(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);me.setExtraStackFrame(t)}else me.setExtraStackFrame(null)}var Z;Z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===E}function Te(){{if(X.current){var e=_(X.current.type);if(e)return`
22
+
23
+ Check the render method of \``+e+"`."}return""}}function or(e){return""}var xe={};function ur(e){{var r=Te();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 je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(xe[t])return;xe[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+_(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 Oe(e,r){{if(typeof e!="object")return;if(H(e))for(var t=0;t<e.length;t++){var n=e[t];Q(n)&&je(n,r)}else if(Q(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;)Q(i.value)&&je(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===f||r.$$typeof===R))t=r.propTypes;else return;if(t){var n=_(r);ze(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Z){Z=!0;var o=_(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 lr(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 Se={};function Pe(e,r,t,n,o,u){{var i=Ue(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+=Te();var s;e===null?s="null":H(e)?s="array":e!==void 0&&e.$$typeof===E?(s="<"+(_(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=ir(e,r,t,o,u);if(l==null)return l;if(i){var b=r.children;if(b!==void 0)if(n)if(H(b)){for(var k=0;k<b.length;k++)Oe(b[k],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 Oe(b,e)}if(Y.call(r,"key")){var j=_(e),v=Object.keys(r).filter(function(yr){return yr!=="key"}),ee=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!Se[j+ee]){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} />`,ee,j,pr,j),Se[j+ee]=!0}}return e===S?lr(l):sr(l),l}}function fr(e,r,t){return Pe(e,r,t,!0)}function cr(e,r,t){return Pe(e,r,t,!1)}var dr=cr,vr=fr;F.Fragment=S,F.jsx=dr,F.jsxs=vr}()),F}process.env.NODE_ENV==="production"?J.exports=Ce():J.exports=we();var p=J.exports;const K=({variant:h="primary",children:E,...A})=>p.jsxs("button",{style:{all:"unset"},...A,children:[p.jsx("button",{style:Object.assign({},{padding:0},{}),"aria-hidden":!0}),p.jsx("span",{style:{display:"inline-block"},children:p.jsx("button",{style:{display:"none"}})}),p.jsx("span",{style:{display:"inline-block",padding:"8px 12px",borderRadius:6,background:h==="primary"?"#1f6feb":"#e5e7eb",color:h==="primary"?"#fff":"#111"},children:E})]}),ke=({label:h,...E})=>p.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:6},children:[h&&p.jsx("span",{style:{fontSize:13,color:"#111"},children:h}),p.jsx("input",{...E,style:{padding:"8px 10px",borderRadius:6,border:"1px solid #d1d5db"}})]}),De=()=>p.jsxs("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:16,borderBottom:"1px solid #e5e7eb"},children:[p.jsx("div",{style:{fontWeight:700},children:"Libreria"}),p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsx(K,{variant:"secondary",children:"Sign in"}),p.jsx(K,{children:"Primary"})]})]});g.Button=K,g.Header=De,g.Input=ke,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "libreria-atomic-ui",
3
+ "version": "0.1.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/your-username/libreria-atomic-ui.git"
7
+ },
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "main": "dist/index.cjs.js",
12
+ "module": "dist/index.esm.js",
13
+ "types": "dist/index.d.ts",
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "dev": "vite",
19
+ "dev:example": "vite --config example/vite.config.ts",
20
+ "build": "vite build",
21
+ "build:example": "cd example && npm run build",
22
+ "preview": "vite preview",
23
+ "prepare": "npm run build"
24
+ },
25
+ "peerDependencies": {
26
+ "react": "^18.0.0",
27
+ "react-dom": "^18.0.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/react": "^18.0.0",
31
+ "@types/react-dom": "^18.0.0",
32
+ "@vitejs/plugin-react": "^4.0.0",
33
+ "typescript": "^5.0.0",
34
+ "vite": "^5.0.0"
35
+ }
36
+ }