@rinzai/zen 0.0.10 → 0.0.12

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.
Files changed (63) hide show
  1. package/dist/badge/index.d.ts +20 -0
  2. package/dist/badge/index.d.ts.map +1 -0
  3. package/dist/{component/Component.stories.d.ts → badge/index.stories.d.ts} +3 -3
  4. package/dist/badge/index.stories.d.ts.map +1 -0
  5. package/dist/button/index.d.ts +5 -6
  6. package/dist/button/index.d.ts.map +1 -1
  7. package/dist/button/{Button.stories.d.ts → index.stories.d.ts} +1 -1
  8. package/dist/button/index.stories.d.ts.map +1 -0
  9. package/dist/collapse/index.d.ts +16 -0
  10. package/dist/collapse/index.d.ts.map +1 -0
  11. package/dist/collapse/index.stories.d.ts +4 -0
  12. package/dist/collapse/index.stories.d.ts.map +1 -0
  13. package/dist/component/index.d.ts +6 -9
  14. package/dist/component/index.d.ts.map +1 -1
  15. package/dist/component/index.stories.d.ts +25 -0
  16. package/dist/component/index.stories.d.ts.map +1 -0
  17. package/dist/container/index.d.ts +3 -2
  18. package/dist/container/index.d.ts.map +1 -1
  19. package/dist/container/index.stories.d.ts +5 -0
  20. package/dist/container/index.stories.d.ts.map +1 -0
  21. package/dist/dropdown/index.d.ts +20 -0
  22. package/dist/dropdown/index.d.ts.map +1 -0
  23. package/dist/dropdown/index.stories.d.ts +7 -0
  24. package/dist/dropdown/index.stories.d.ts.map +1 -0
  25. package/dist/icons/chevron-down.d.ts +3 -0
  26. package/dist/icons/chevron-down.d.ts.map +1 -0
  27. package/dist/icons/chevron-up.d.ts +3 -0
  28. package/dist/icons/chevron-up.d.ts.map +1 -0
  29. package/dist/icons/icon.types.d.ts +4 -0
  30. package/dist/icons/icon.types.d.ts.map +1 -0
  31. package/dist/icons/index.d.ts +4 -0
  32. package/dist/icons/index.d.ts.map +1 -0
  33. package/dist/icons/search.d.ts +3 -0
  34. package/dist/icons/search.d.ts.map +1 -0
  35. package/dist/icons/x-mark.d.ts +3 -0
  36. package/dist/icons/x-mark.d.ts.map +1 -0
  37. package/dist/index.d.ts +6 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/input/index.d.ts +5 -0
  40. package/dist/input/index.d.ts.map +1 -0
  41. package/dist/input/index.stories.d.ts +4 -0
  42. package/dist/input/index.stories.d.ts.map +1 -0
  43. package/dist/popover/index.d.ts +20 -0
  44. package/dist/popover/index.d.ts.map +1 -0
  45. package/dist/toggle/index.d.ts +2 -2
  46. package/dist/toggle/index.d.ts.map +1 -1
  47. package/dist/toggle/{Toggle.Stories.d.ts → index.stories.d.ts} +1 -1
  48. package/dist/toggle/index.stories.d.ts.map +1 -0
  49. package/dist/utils/cva.d.ts +2 -2
  50. package/dist/utils/cva.d.ts.map +1 -1
  51. package/dist/utils/cx.d.ts.map +1 -1
  52. package/dist/utils/useClickOutside.d.ts +3 -0
  53. package/dist/utils/useClickOutside.d.ts.map +1 -0
  54. package/dist/zen.js +2639 -0
  55. package/package.json +79 -79
  56. package/dist/button/Button.stories.d.ts.map +0 -1
  57. package/dist/component/Component.stories.d.ts.map +0 -1
  58. package/dist/container/Container.stories.d.ts +0 -21
  59. package/dist/container/Container.stories.d.ts.map +0 -1
  60. package/dist/style.css +0 -1
  61. package/dist/toggle/Toggle.Stories.d.ts.map +0 -1
  62. package/dist/zen.es.js +0 -743
  63. package/dist/zen.umd.js +0 -27
package/dist/zen.es.js DELETED
@@ -1,743 +0,0 @@
1
- import we, { forwardRef as fr } from "react";
2
- var ee = { exports: {} }, W = {};
3
- /**
4
- * @license React
5
- * react-jsx-runtime.development.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 Ce;
13
- function cr() {
14
- return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
15
- var f = we, l = Symbol.for("react.element"), a = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), T = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), k = Symbol.iterator, Pe = "@@iterator";
16
- function Se(e) {
17
- if (e === null || typeof e != "object")
18
- return null;
19
- var r = k && e[k] || e[Pe];
20
- return typeof r == "function" ? r : null;
21
- }
22
- var A = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
23
- function E(e) {
24
- {
25
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
26
- t[n - 1] = arguments[n];
27
- ke("error", e, t);
28
- }
29
- }
30
- function ke(e, r, t) {
31
- {
32
- var n = A.ReactDebugCurrentFrame, u = n.getStackAddendum();
33
- u !== "" && (r += "%s", t = t.concat([u]));
34
- var s = t.map(function(o) {
35
- return String(o);
36
- });
37
- s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
38
- }
39
- }
40
- var Ae = !1, De = !1, Fe = !1, Ne = !1, Ie = !1, re;
41
- re = Symbol.for("react.module.reference");
42
- function $e(e) {
43
- return !!(typeof e == "string" || typeof e == "function" || e === c || e === b || Ie || e === y || e === p || e === v || Ne || e === P || Ae || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === h || e.$$typeof === j || e.$$typeof === T || e.$$typeof === g || // This needs to include all possible module reference object
44
- // types supported by any Flight configuration anywhere since
45
- // we don't know which Flight build this will end up being used
46
- // with.
47
- e.$$typeof === re || e.getModuleId !== void 0));
48
- }
49
- function We(e, r, t) {
50
- var n = e.displayName;
51
- if (n)
52
- return n;
53
- var u = r.displayName || r.name || "";
54
- return u !== "" ? t + "(" + u + ")" : t;
55
- }
56
- function te(e) {
57
- return e.displayName || "Context";
58
- }
59
- function C(e) {
60
- if (e == null)
61
- return null;
62
- if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
63
- return e.displayName || e.name || null;
64
- if (typeof e == "string")
65
- return e;
66
- switch (e) {
67
- case c:
68
- return "Fragment";
69
- case a:
70
- return "Portal";
71
- case b:
72
- return "Profiler";
73
- case y:
74
- return "StrictMode";
75
- case p:
76
- return "Suspense";
77
- case v:
78
- return "SuspenseList";
79
- }
80
- if (typeof e == "object")
81
- switch (e.$$typeof) {
82
- case T:
83
- var r = e;
84
- return te(r) + ".Consumer";
85
- case j:
86
- var t = e;
87
- return te(t._context) + ".Provider";
88
- case g:
89
- return We(e, e.render, "ForwardRef");
90
- case h:
91
- var n = e.displayName || null;
92
- return n !== null ? n : C(e.type) || "Memo";
93
- case x: {
94
- var u = e, s = u._payload, o = u._init;
95
- try {
96
- return C(o(s));
97
- } catch {
98
- return null;
99
- }
100
- }
101
- }
102
- return null;
103
- }
104
- var S = Object.assign, I = 0, ne, ae, ie, oe, ue, se, le;
105
- function fe() {
106
- }
107
- fe.__reactDisabledLog = !0;
108
- function Ye() {
109
- {
110
- if (I === 0) {
111
- ne = console.log, ae = console.info, ie = console.warn, oe = console.error, ue = console.group, se = console.groupCollapsed, le = console.groupEnd;
112
- var e = {
113
- configurable: !0,
114
- enumerable: !0,
115
- value: fe,
116
- writable: !0
117
- };
118
- Object.defineProperties(console, {
119
- info: e,
120
- log: e,
121
- warn: e,
122
- error: e,
123
- group: e,
124
- groupCollapsed: e,
125
- groupEnd: e
126
- });
127
- }
128
- I++;
129
- }
130
- }
131
- function Ve() {
132
- {
133
- if (I--, I === 0) {
134
- var e = {
135
- configurable: !0,
136
- enumerable: !0,
137
- writable: !0
138
- };
139
- Object.defineProperties(console, {
140
- log: S({}, e, {
141
- value: ne
142
- }),
143
- info: S({}, e, {
144
- value: ae
145
- }),
146
- warn: S({}, e, {
147
- value: ie
148
- }),
149
- error: S({}, e, {
150
- value: oe
151
- }),
152
- group: S({}, e, {
153
- value: ue
154
- }),
155
- groupCollapsed: S({}, e, {
156
- value: se
157
- }),
158
- groupEnd: S({}, e, {
159
- value: le
160
- })
161
- });
162
- }
163
- I < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
164
- }
165
- }
166
- var q = A.ReactCurrentDispatcher, J;
167
- function V(e, r, t) {
168
- {
169
- if (J === void 0)
170
- try {
171
- throw Error();
172
- } catch (u) {
173
- var n = u.stack.trim().match(/\n( *(at )?)/);
174
- J = n && n[1] || "";
175
- }
176
- return `
177
- ` + J + e;
178
- }
179
- }
180
- var G = !1, L;
181
- {
182
- var Le = typeof WeakMap == "function" ? WeakMap : Map;
183
- L = new Le();
184
- }
185
- function ce(e, r) {
186
- if (!e || G)
187
- return "";
188
- {
189
- var t = L.get(e);
190
- if (t !== void 0)
191
- return t;
192
- }
193
- var n;
194
- G = !0;
195
- var u = Error.prepareStackTrace;
196
- Error.prepareStackTrace = void 0;
197
- var s;
198
- s = q.current, q.current = null, Ye();
199
- try {
200
- if (r) {
201
- var o = function() {
202
- throw Error();
203
- };
204
- if (Object.defineProperty(o.prototype, "props", {
205
- set: function() {
206
- throw Error();
207
- }
208
- }), typeof Reflect == "object" && Reflect.construct) {
209
- try {
210
- Reflect.construct(o, []);
211
- } catch (O) {
212
- n = O;
213
- }
214
- Reflect.construct(e, [], o);
215
- } else {
216
- try {
217
- o.call();
218
- } catch (O) {
219
- n = O;
220
- }
221
- e.call(o.prototype);
222
- }
223
- } else {
224
- try {
225
- throw Error();
226
- } catch (O) {
227
- n = O;
228
- }
229
- e();
230
- }
231
- } catch (O) {
232
- if (O && n && typeof O.stack == "string") {
233
- for (var i = O.stack.split(`
234
- `), _ = n.stack.split(`
235
- `), d = i.length - 1, m = _.length - 1; d >= 1 && m >= 0 && i[d] !== _[m]; )
236
- m--;
237
- for (; d >= 1 && m >= 0; d--, m--)
238
- if (i[d] !== _[m]) {
239
- if (d !== 1 || m !== 1)
240
- do
241
- if (d--, m--, m < 0 || i[d] !== _[m]) {
242
- var R = `
243
- ` + i[d].replace(" at new ", " at ");
244
- return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, R), R;
245
- }
246
- while (d >= 1 && m >= 0);
247
- break;
248
- }
249
- }
250
- } finally {
251
- G = !1, q.current = s, Ve(), Error.prepareStackTrace = u;
252
- }
253
- var F = e ? e.displayName || e.name : "", Te = F ? V(F) : "";
254
- return typeof e == "function" && L.set(e, Te), Te;
255
- }
256
- function Ue(e, r, t) {
257
- return ce(e, !1);
258
- }
259
- function Me(e) {
260
- var r = e.prototype;
261
- return !!(r && r.isReactComponent);
262
- }
263
- function U(e, r, t) {
264
- if (e == null)
265
- return "";
266
- if (typeof e == "function")
267
- return ce(e, Me(e));
268
- if (typeof e == "string")
269
- return V(e);
270
- switch (e) {
271
- case p:
272
- return V("Suspense");
273
- case v:
274
- return V("SuspenseList");
275
- }
276
- if (typeof e == "object")
277
- switch (e.$$typeof) {
278
- case g:
279
- return Ue(e.render);
280
- case h:
281
- return U(e.type, r, t);
282
- case x: {
283
- var n = e, u = n._payload, s = n._init;
284
- try {
285
- return U(s(u), r, t);
286
- } catch {
287
- }
288
- }
289
- }
290
- return "";
291
- }
292
- var M = Object.prototype.hasOwnProperty, de = {}, ve = A.ReactDebugCurrentFrame;
293
- function B(e) {
294
- if (e) {
295
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
296
- ve.setExtraStackFrame(t);
297
- } else
298
- ve.setExtraStackFrame(null);
299
- }
300
- function Be(e, r, t, n, u) {
301
- {
302
- var s = Function.call.bind(M);
303
- for (var o in e)
304
- if (s(e, o)) {
305
- var i = void 0;
306
- try {
307
- if (typeof e[o] != "function") {
308
- var _ = 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`.");
309
- throw _.name = "Invariant Violation", _;
310
- }
311
- i = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
312
- } catch (d) {
313
- i = d;
314
- }
315
- i && !(i instanceof Error) && (B(u), E("%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 i), B(null)), i instanceof Error && !(i.message in de) && (de[i.message] = !0, B(u), E("Failed %s type: %s", t, i.message), B(null));
316
- }
317
- }
318
- }
319
- var ze = Array.isArray;
320
- function K(e) {
321
- return ze(e);
322
- }
323
- function qe(e) {
324
- {
325
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
326
- return t;
327
- }
328
- }
329
- function Je(e) {
330
- try {
331
- return me(e), !1;
332
- } catch {
333
- return !0;
334
- }
335
- }
336
- function me(e) {
337
- return "" + e;
338
- }
339
- function ye(e) {
340
- if (Je(e))
341
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), me(e);
342
- }
343
- var $ = A.ReactCurrentOwner, Ge = {
344
- key: !0,
345
- ref: !0,
346
- __self: !0,
347
- __source: !0
348
- }, be, ge, H;
349
- H = {};
350
- function Ke(e) {
351
- if (M.call(e, "ref")) {
352
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
353
- if (r && r.isReactWarning)
354
- return !1;
355
- }
356
- return e.ref !== void 0;
357
- }
358
- function He(e) {
359
- if (M.call(e, "key")) {
360
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
361
- if (r && r.isReactWarning)
362
- return !1;
363
- }
364
- return e.key !== void 0;
365
- }
366
- function Xe(e, r) {
367
- if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
368
- var t = C($.current.type);
369
- H[t] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', C($.current.type), e.ref), H[t] = !0);
370
- }
371
- }
372
- function Ze(e, r) {
373
- {
374
- var t = function() {
375
- be || (be = !0, E("%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));
376
- };
377
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
378
- get: t,
379
- configurable: !0
380
- });
381
- }
382
- }
383
- function Qe(e, r) {
384
- {
385
- var t = function() {
386
- ge || (ge = !0, E("%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));
387
- };
388
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
389
- get: t,
390
- configurable: !0
391
- });
392
- }
393
- }
394
- var er = function(e, r, t, n, u, s, o) {
395
- var i = {
396
- // This tag allows us to uniquely identify this as a React Element
397
- $$typeof: l,
398
- // Built-in properties that belong on the element
399
- type: e,
400
- key: r,
401
- ref: t,
402
- props: o,
403
- // Record the component responsible for creating this element.
404
- _owner: s
405
- };
406
- return i._store = {}, Object.defineProperty(i._store, "validated", {
407
- configurable: !1,
408
- enumerable: !1,
409
- writable: !0,
410
- value: !1
411
- }), Object.defineProperty(i, "_self", {
412
- configurable: !1,
413
- enumerable: !1,
414
- writable: !1,
415
- value: n
416
- }), Object.defineProperty(i, "_source", {
417
- configurable: !1,
418
- enumerable: !1,
419
- writable: !1,
420
- value: u
421
- }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
422
- };
423
- function rr(e, r, t, n, u) {
424
- {
425
- var s, o = {}, i = null, _ = null;
426
- t !== void 0 && (ye(t), i = "" + t), He(r) && (ye(r.key), i = "" + r.key), Ke(r) && (_ = r.ref, Xe(r, u));
427
- for (s in r)
428
- M.call(r, s) && !Ge.hasOwnProperty(s) && (o[s] = r[s]);
429
- if (e && e.defaultProps) {
430
- var d = e.defaultProps;
431
- for (s in d)
432
- o[s] === void 0 && (o[s] = d[s]);
433
- }
434
- if (i || _) {
435
- var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
436
- i && Ze(o, m), _ && Qe(o, m);
437
- }
438
- return er(e, i, _, u, n, $.current, o);
439
- }
440
- }
441
- var X = A.ReactCurrentOwner, pe = A.ReactDebugCurrentFrame;
442
- function D(e) {
443
- if (e) {
444
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
445
- pe.setExtraStackFrame(t);
446
- } else
447
- pe.setExtraStackFrame(null);
448
- }
449
- var Z;
450
- Z = !1;
451
- function Q(e) {
452
- return typeof e == "object" && e !== null && e.$$typeof === l;
453
- }
454
- function he() {
455
- {
456
- if (X.current) {
457
- var e = C(X.current.type);
458
- if (e)
459
- return `
460
-
461
- Check the render method of \`` + e + "`.";
462
- }
463
- return "";
464
- }
465
- }
466
- function tr(e) {
467
- {
468
- if (e !== void 0) {
469
- var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
470
- return `
471
-
472
- Check your code at ` + r + ":" + t + ".";
473
- }
474
- return "";
475
- }
476
- }
477
- var Ee = {};
478
- function nr(e) {
479
- {
480
- var r = he();
481
- if (!r) {
482
- var t = typeof e == "string" ? e : e.displayName || e.name;
483
- t && (r = `
484
-
485
- Check the top-level render call using <` + t + ">.");
486
- }
487
- return r;
488
- }
489
- }
490
- function _e(e, r) {
491
- {
492
- if (!e._store || e._store.validated || e.key != null)
493
- return;
494
- e._store.validated = !0;
495
- var t = nr(r);
496
- if (Ee[t])
497
- return;
498
- Ee[t] = !0;
499
- var n = "";
500
- e && e._owner && e._owner !== X.current && (n = " It was passed a child from " + C(e._owner.type) + "."), D(e), E('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), D(null);
501
- }
502
- }
503
- function Re(e, r) {
504
- {
505
- if (typeof e != "object")
506
- return;
507
- if (K(e))
508
- for (var t = 0; t < e.length; t++) {
509
- var n = e[t];
510
- Q(n) && _e(n, r);
511
- }
512
- else if (Q(e))
513
- e._store && (e._store.validated = !0);
514
- else if (e) {
515
- var u = Se(e);
516
- if (typeof u == "function" && u !== e.entries)
517
- for (var s = u.call(e), o; !(o = s.next()).done; )
518
- Q(o.value) && _e(o.value, r);
519
- }
520
- }
521
- }
522
- function ar(e) {
523
- {
524
- var r = e.type;
525
- if (r == null || typeof r == "string")
526
- return;
527
- var t;
528
- if (typeof r == "function")
529
- t = r.propTypes;
530
- else if (typeof r == "object" && (r.$$typeof === g || // Note: Memo only checks outer props here.
531
- // Inner props are checked in the reconciler.
532
- r.$$typeof === h))
533
- t = r.propTypes;
534
- else
535
- return;
536
- if (t) {
537
- var n = C(r);
538
- Be(t, e.props, "prop", n, e);
539
- } else if (r.PropTypes !== void 0 && !Z) {
540
- Z = !0;
541
- var u = C(r);
542
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
543
- }
544
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
545
- }
546
- }
547
- function ir(e) {
548
- {
549
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
550
- var n = r[t];
551
- if (n !== "children" && n !== "key") {
552
- D(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
553
- break;
554
- }
555
- }
556
- e.ref !== null && (D(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
557
- }
558
- }
559
- function xe(e, r, t, n, u, s) {
560
- {
561
- var o = $e(e);
562
- if (!o) {
563
- var i = "";
564
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
565
- var _ = tr(u);
566
- _ ? i += _ : i += he();
567
- var d;
568
- e === null ? d = "null" : K(e) ? d = "array" : e !== void 0 && e.$$typeof === l ? (d = "<" + (C(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, i);
569
- }
570
- var m = rr(e, r, t, u, s);
571
- if (m == null)
572
- return m;
573
- if (o) {
574
- var R = r.children;
575
- if (R !== void 0)
576
- if (n)
577
- if (K(R)) {
578
- for (var F = 0; F < R.length; F++)
579
- Re(R[F], e);
580
- Object.freeze && Object.freeze(R);
581
- } else
582
- E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
583
- else
584
- Re(R, e);
585
- }
586
- return e === c ? ir(m) : ar(m), m;
587
- }
588
- }
589
- function or(e, r, t) {
590
- return xe(e, r, t, !0);
591
- }
592
- function ur(e, r, t) {
593
- return xe(e, r, t, !1);
594
- }
595
- var sr = ur, lr = or;
596
- W.Fragment = c, W.jsx = sr, W.jsxs = lr;
597
- }()), W;
598
- }
599
- var Y = {};
600
- /**
601
- * @license React
602
- * react-jsx-runtime.production.min.js
603
- *
604
- * Copyright (c) Facebook, Inc. and its affiliates.
605
- *
606
- * This source code is licensed under the MIT license found in the
607
- * LICENSE file in the root directory of this source tree.
608
- */
609
- var Oe;
610
- function dr() {
611
- if (Oe)
612
- return Y;
613
- Oe = 1;
614
- var f = we, l = Symbol.for("react.element"), a = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, y = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
615
- function j(T, g, p) {
616
- var v, h = {}, x = null, P = null;
617
- p !== void 0 && (x = "" + p), g.key !== void 0 && (x = "" + g.key), g.ref !== void 0 && (P = g.ref);
618
- for (v in g)
619
- c.call(g, v) && !b.hasOwnProperty(v) && (h[v] = g[v]);
620
- if (T && T.defaultProps)
621
- for (v in g = T.defaultProps, g)
622
- h[v] === void 0 && (h[v] = g[v]);
623
- return { $$typeof: l, type: T, key: x, ref: P, props: h, _owner: y.current };
624
- }
625
- return Y.Fragment = a, Y.jsx = j, Y.jsxs = j, Y;
626
- }
627
- process.env.NODE_ENV === "production" ? ee.exports = dr() : ee.exports = cr();
628
- var w = ee.exports;
629
- const z = fr(
630
- ({ tag: f, children: l, visible: a = !0, ...c }, y) => {
631
- const b = f || "div";
632
- return a ? /* @__PURE__ */ w.jsx(b, { ref: y, ...c, children: l }) : /* @__PURE__ */ w.jsx(w.Fragment, {});
633
- }
634
- ), N = (...f) => f.reduce((l, a) => a == null || a === !1 ? l : typeof a == "string" || typeof a == "number" ? l + " " + a : Array.isArray(a) ? l + " " + N(...a) : typeof a == "object" ? l + " " + Object.entries(a).reduce((c, [y, b]) => b == null || b === !1 ? c : typeof b == "string" || typeof b == "number" ? c + " " + y + "-" + b : typeof b == "boolean" && b ? c + " " + y : c, "") : l, ""), je = (f) => typeof f == "boolean" ? `${f}` : f === 0 ? "0" : f, vr = (f, l) => (a) => {
635
- var g;
636
- if ((l == null ? void 0 : l.variants) == null)
637
- return N(f, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
638
- const { variants: c, defaultVariants: y } = l, b = Object.keys(c).map((p) => {
639
- const v = a == null ? void 0 : a[p], h = y == null ? void 0 : y[p];
640
- if (v === null)
641
- return null;
642
- const x = je(v) || je(h);
643
- return c[p][x];
644
- }), j = a && Object.entries(a).reduce(
645
- (p, [v, h]) => (h === void 0 || (p[v] = h), p),
646
- {}
647
- ), T = (g = l == null ? void 0 : l.compoundVariants) == null ? void 0 : g.reduce(
648
- (p, { class: v, className: h, ...x }) => Object.entries(x).every(
649
- ([P, k]) => Array.isArray(k) ? k.includes(
650
- {
651
- ...y,
652
- ...j
653
- }[P]
654
- ) : {
655
- ...y,
656
- ...j
657
- }[P] === k
658
- ) ? [...p, v, h] : p,
659
- []
660
- );
661
- return N(f, b, T, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
662
- }, gr = (f) => {
663
- let { children: l, className: a, variant: c = "primary", size: y = "medium", rounded: b = "md" } = f;
664
- return /* @__PURE__ */ w.jsx(z, { tag: "button", className: mr({ variant: c, size: y, rounded: b, className: a }), children: l });
665
- }, mr = vr("zen__button inline-flex items-center justify-center transition font-semibold", {
666
- variants: {
667
- variant: {
668
- primary: "bg-primary hover:bg-primary/90 text-primary-foreground",
669
- secondary: "bg-secondary hover:bg-secondary/90 text-secondary-foreground",
670
- muted: "bg-muted hover:bg-muted/90 text-muted-foreground",
671
- destructive: "bg-destructive hover:bg-destructive/90 text-destructive-foreground",
672
- link: "bg-transparent hover:underline text-primary-foreground"
673
- },
674
- size: {
675
- small: "text-sm px-2 py-1",
676
- medium: "text-md px-3 py-2",
677
- large: "text-lg px-4 py-3"
678
- },
679
- rounded: {
680
- none: "rounded-none",
681
- sm: "rounded-sm",
682
- md: "rounded-md",
683
- lg: "rounded-lg",
684
- xl: "rounded-xl",
685
- full: "rounded-full"
686
- }
687
- },
688
- defaultVariants: {
689
- variant: "primary",
690
- size: "medium",
691
- rounded: "md"
692
- }
693
- }), yr = (f) => /* @__PURE__ */ w.jsx(z, { tag: "div", ...f });
694
- function pr(f) {
695
- const { className: l, checked: a, onChange: c, ...y } = f;
696
- return /* @__PURE__ */ w.jsxs(
697
- z,
698
- {
699
- tag: "div",
700
- className: N(
701
- "rounded-full",
702
- "w-10 h-5",
703
- "bg-secondary border border-muted",
704
- "flex items-center",
705
- l
706
- ),
707
- onClick: () => {
708
- c(!a);
709
- },
710
- children: [
711
- /* @__PURE__ */ w.jsx(
712
- z,
713
- {
714
- tag: "input",
715
- type: "checkbox",
716
- className: N("hidden"),
717
- checked: a,
718
- onChange: () => {
719
- },
720
- ...y
721
- }
722
- ),
723
- /* @__PURE__ */ w.jsx(
724
- yr,
725
- {
726
- className: N(
727
- "rounded-full w-4 h-4 bg-primary transition",
728
- a ? "translate-x-5" : "translate-x-1"
729
- )
730
- }
731
- )
732
- ]
733
- }
734
- );
735
- }
736
- export {
737
- gr as Button,
738
- z as Component,
739
- yr as Container,
740
- pr as Toggle,
741
- vr as cva,
742
- N as cx
743
- };