next-ui-lib 0.1.27 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.es.js CHANGED
@@ -59,7 +59,7 @@ const Mn = {
59
59
  }
60
60
  );
61
61
  };
62
- function Ri(e) {
62
+ function Ti(e) {
63
63
  return e && e.__esModule ? e.default : e;
64
64
  }
65
65
  function H(e, i, n) {
@@ -70,7 +70,7 @@ function H(e, i, n) {
70
70
  writable: !0
71
71
  }) : e[i] = n, e;
72
72
  }
73
- var Me, b, Ti, te, Hi, ri, ye = {}, Wi = [], Bn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
73
+ var Me, b, Ri, te, Hi, ri, ye = {}, Wi = [], Bn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
74
74
  function V(e, i) {
75
75
  for (var n in i) e[n] = i[n];
76
76
  return e;
@@ -99,7 +99,7 @@ function be(e, i, n, a, s) {
99
99
  __c: null,
100
100
  __h: null,
101
101
  constructor: void 0,
102
- __v: s ?? ++Ti
102
+ __v: s ?? ++Ri
103
103
  };
104
104
  return s == null && b.vnode != null && b.vnode(f), f;
105
105
  }
@@ -318,7 +318,7 @@ Me = Wi.slice, b = {
318
318
  }
319
319
  throw e;
320
320
  }
321
- }, Ti = 0, E.prototype.setState = function(e, i) {
321
+ }, Ri = 0, E.prototype.setState = function(e, i) {
322
322
  var n;
323
323
  n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = V({}, this.state), typeof e == "function" && (e = e(V({}, n), this.props)), e && V(n, e), e != null && this.__v && (i && this.__h.push(i), ti(this));
324
324
  }, E.prototype.forceUpdate = function(e) {
@@ -348,13 +348,13 @@ function u(e, i, n, a, s) {
348
348
  if (typeof e == "function" && (f = e.defaultProps)) for (o in f) d[o] === void 0 && (d[o] = f[o]);
349
349
  return b.vnode && b.vnode(r), r;
350
350
  }
351
- function Rn(e, i) {
351
+ function Tn(e, i) {
352
352
  try {
353
353
  window.localStorage[`emoji-mart.${e}`] = JSON.stringify(i);
354
354
  } catch {
355
355
  }
356
356
  }
357
- function Tn(e) {
357
+ function Rn(e) {
358
358
  try {
359
359
  const i = window.localStorage[`emoji-mart.${e}`];
360
360
  if (i) return JSON.parse(i);
@@ -362,8 +362,8 @@ function Tn(e) {
362
362
  }
363
363
  }
364
364
  var U = {
365
- set: Rn,
366
- get: Tn
365
+ set: Tn,
366
+ get: Rn
367
367
  };
368
368
  const je = /* @__PURE__ */ new Map(), Hn = [
369
369
  {
@@ -703,7 +703,7 @@ async function Nn(e) {
703
703
  }
704
704
  F.originalCategories = F.categories;
705
705
  }
706
- if (q = (typeof e.i18n == "function" ? await e.i18n() : e.i18n) || (a == "en" ? /* @__PURE__ */ Ri(Ji) : await vi(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${a}.json`)), e.custom) for (let r in e.custom) {
706
+ if (q = (typeof e.i18n == "function" ? await e.i18n() : e.i18n) || (a == "en" ? /* @__PURE__ */ Ti(Ji) : await vi(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${a}.json`)), e.custom) for (let r in e.custom) {
707
707
  r = parseInt(r);
708
708
  const l = e.custom[r], t = e.custom[r - 1];
709
709
  if (!(!l.emojis || !l.emojis.length)) {
@@ -1260,7 +1260,7 @@ b.__e = function(e, i, n) {
1260
1260
  aa(e, i, n);
1261
1261
  };
1262
1262
  var xi = b.unmount;
1263
- function Re() {
1263
+ function Te() {
1264
1264
  this.__u = 0, this.t = null, this.__b = null;
1265
1265
  }
1266
1266
  function fn(e) {
@@ -1273,7 +1273,7 @@ function ke() {
1273
1273
  b.unmount = function(e) {
1274
1274
  var i = e.__c;
1275
1275
  i && i.__R && i.__R(), i && e.__h === !0 && (e.type = null), xi && xi(e);
1276
- }, (Re.prototype = new E()).__c = function(e, i) {
1276
+ }, (Te.prototype = new E()).__c = function(e, i) {
1277
1277
  var n = i.__c, a = this;
1278
1278
  a.t == null && (a.t = []), a.t.push(n);
1279
1279
  var s = fn(a.__v), f = !1, o = function() {
@@ -1299,9 +1299,9 @@ b.unmount = function(e) {
1299
1299
  a.__u++ || r || a.setState({
1300
1300
  __e: a.__b = a.__v.__k[0]
1301
1301
  }), e.then(o, o);
1302
- }, Re.prototype.componentWillUnmount = function() {
1302
+ }, Te.prototype.componentWillUnmount = function() {
1303
1303
  this.t = [];
1304
- }, Re.prototype.render = function(e, i) {
1304
+ }, Te.prototype.render = function(e, i) {
1305
1305
  if (this.__b) {
1306
1306
  if (this.__v.__k) {
1307
1307
  var n = document.createElement("div"), a = this.__v.__k[0].__c;
@@ -2281,7 +2281,7 @@ class Ke extends ea {
2281
2281
  }
2282
2282
  constructor(i) {
2283
2283
  super(i, {
2284
- styles: /* @__PURE__ */ Ri(sn)
2284
+ styles: /* @__PURE__ */ Ti(sn)
2285
2285
  });
2286
2286
  }
2287
2287
  }
@@ -3319,7 +3319,7 @@ const Ye = "-", _a = (e) => {
3319
3319
  }
3320
3320
  return r;
3321
3321
  };
3322
- function Ra() {
3322
+ function Ta() {
3323
3323
  let e = 0, i, n, a = "";
3324
3324
  for (; e < arguments.length; )
3325
3325
  (i = arguments[e++]) && (n = dn(i)) && (a && (a += " "), a += n);
@@ -3333,7 +3333,7 @@ const dn = (e) => {
3333
3333
  e[a] && (i = dn(e[a])) && (n && (n += " "), n += i);
3334
3334
  return n;
3335
3335
  };
3336
- function Ta(e, ...i) {
3336
+ function Ra(e, ...i) {
3337
3337
  let n, a, s, f = o;
3338
3338
  function o(r) {
3339
3339
  const l = i.reduce((t, v) => v(t), e());
@@ -3347,13 +3347,13 @@ function Ta(e, ...i) {
3347
3347
  return s(r, t), t;
3348
3348
  }
3349
3349
  return function() {
3350
- return f(Ra.apply(null, arguments));
3350
+ return f(Ta.apply(null, arguments));
3351
3351
  };
3352
3352
  }
3353
3353
  const M = (e) => {
3354
3354
  const i = (n) => n[e] || [];
3355
3355
  return i.isThemeGetter = !0, i;
3356
- }, ln = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, un = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ha = /^\d+\/\d+$/, Wa = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, La = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ea = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Aa = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Da = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, X = (e) => Ha.test(e), _ = (e) => !!e && !Number.isNaN(Number(e)), O = (e) => !!e && Number.isInteger(Number(e)), Te = (e) => e.endsWith("%") && _(e.slice(0, -1)), I = (e) => Wa.test(e), Na = () => !0, Ia = (e) => (
3356
+ }, ln = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, un = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ha = /^\d+\/\d+$/, Wa = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, La = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ea = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Aa = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Da = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, X = (e) => Ha.test(e), _ = (e) => !!e && !Number.isNaN(Number(e)), O = (e) => !!e && Number.isInteger(Number(e)), Re = (e) => e.endsWith("%") && _(e.slice(0, -1)), I = (e) => Wa.test(e), Na = () => !0, Ia = (e) => (
3357
3357
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
3358
3358
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
3359
3359
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
@@ -3391,7 +3391,7 @@ const M = (e) => {
3391
3391
  repeat: ["", "x", "y", "space", "round"]
3392
3392
  }], ni = () => ["auto", "cover", "contain", Ya, Ua, {
3393
3393
  size: [g, k]
3394
- }], Be = () => [Te, re, Y], R = () => [
3394
+ }], Be = () => [Re, re, Y], T = () => [
3395
3395
  // Deprecated since Tailwind CSS v4.0.0
3396
3396
  "",
3397
3397
  "none",
@@ -3399,7 +3399,7 @@ const M = (e) => {
3399
3399
  l,
3400
3400
  g,
3401
3401
  k
3402
- ], T = () => ["", _, re, Y], ue = () => ["solid", "dashed", "dotted", "double"], ai = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], B = () => [_, Te, Pi, ji], fi = () => [
3402
+ ], R = () => ["", _, re, Y], ue = () => ["solid", "dashed", "dotted", "double"], ai = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], B = () => [_, Re, Pi, ji], fi = () => [
3403
3403
  // Deprecated since Tailwind CSS v4.0.0
3404
3404
  "",
3405
3405
  "none",
@@ -4123,7 +4123,7 @@ const M = (e) => {
4123
4123
  * @see https://tailwindcss.com/docs/font-stretch
4124
4124
  */
4125
4125
  "font-stretch": [{
4126
- "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Te, k]
4126
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Re, k]
4127
4127
  }],
4128
4128
  /**
4129
4129
  * Font Family
@@ -4444,175 +4444,175 @@ const M = (e) => {
4444
4444
  * @see https://tailwindcss.com/docs/border-radius
4445
4445
  */
4446
4446
  rounded: [{
4447
- rounded: R()
4447
+ rounded: T()
4448
4448
  }],
4449
4449
  /**
4450
4450
  * Border Radius Start
4451
4451
  * @see https://tailwindcss.com/docs/border-radius
4452
4452
  */
4453
4453
  "rounded-s": [{
4454
- "rounded-s": R()
4454
+ "rounded-s": T()
4455
4455
  }],
4456
4456
  /**
4457
4457
  * Border Radius End
4458
4458
  * @see https://tailwindcss.com/docs/border-radius
4459
4459
  */
4460
4460
  "rounded-e": [{
4461
- "rounded-e": R()
4461
+ "rounded-e": T()
4462
4462
  }],
4463
4463
  /**
4464
4464
  * Border Radius Top
4465
4465
  * @see https://tailwindcss.com/docs/border-radius
4466
4466
  */
4467
4467
  "rounded-t": [{
4468
- "rounded-t": R()
4468
+ "rounded-t": T()
4469
4469
  }],
4470
4470
  /**
4471
4471
  * Border Radius Right
4472
4472
  * @see https://tailwindcss.com/docs/border-radius
4473
4473
  */
4474
4474
  "rounded-r": [{
4475
- "rounded-r": R()
4475
+ "rounded-r": T()
4476
4476
  }],
4477
4477
  /**
4478
4478
  * Border Radius Bottom
4479
4479
  * @see https://tailwindcss.com/docs/border-radius
4480
4480
  */
4481
4481
  "rounded-b": [{
4482
- "rounded-b": R()
4482
+ "rounded-b": T()
4483
4483
  }],
4484
4484
  /**
4485
4485
  * Border Radius Left
4486
4486
  * @see https://tailwindcss.com/docs/border-radius
4487
4487
  */
4488
4488
  "rounded-l": [{
4489
- "rounded-l": R()
4489
+ "rounded-l": T()
4490
4490
  }],
4491
4491
  /**
4492
4492
  * Border Radius Start Start
4493
4493
  * @see https://tailwindcss.com/docs/border-radius
4494
4494
  */
4495
4495
  "rounded-ss": [{
4496
- "rounded-ss": R()
4496
+ "rounded-ss": T()
4497
4497
  }],
4498
4498
  /**
4499
4499
  * Border Radius Start End
4500
4500
  * @see https://tailwindcss.com/docs/border-radius
4501
4501
  */
4502
4502
  "rounded-se": [{
4503
- "rounded-se": R()
4503
+ "rounded-se": T()
4504
4504
  }],
4505
4505
  /**
4506
4506
  * Border Radius End End
4507
4507
  * @see https://tailwindcss.com/docs/border-radius
4508
4508
  */
4509
4509
  "rounded-ee": [{
4510
- "rounded-ee": R()
4510
+ "rounded-ee": T()
4511
4511
  }],
4512
4512
  /**
4513
4513
  * Border Radius End Start
4514
4514
  * @see https://tailwindcss.com/docs/border-radius
4515
4515
  */
4516
4516
  "rounded-es": [{
4517
- "rounded-es": R()
4517
+ "rounded-es": T()
4518
4518
  }],
4519
4519
  /**
4520
4520
  * Border Radius Top Left
4521
4521
  * @see https://tailwindcss.com/docs/border-radius
4522
4522
  */
4523
4523
  "rounded-tl": [{
4524
- "rounded-tl": R()
4524
+ "rounded-tl": T()
4525
4525
  }],
4526
4526
  /**
4527
4527
  * Border Radius Top Right
4528
4528
  * @see https://tailwindcss.com/docs/border-radius
4529
4529
  */
4530
4530
  "rounded-tr": [{
4531
- "rounded-tr": R()
4531
+ "rounded-tr": T()
4532
4532
  }],
4533
4533
  /**
4534
4534
  * Border Radius Bottom Right
4535
4535
  * @see https://tailwindcss.com/docs/border-radius
4536
4536
  */
4537
4537
  "rounded-br": [{
4538
- "rounded-br": R()
4538
+ "rounded-br": T()
4539
4539
  }],
4540
4540
  /**
4541
4541
  * Border Radius Bottom Left
4542
4542
  * @see https://tailwindcss.com/docs/border-radius
4543
4543
  */
4544
4544
  "rounded-bl": [{
4545
- "rounded-bl": R()
4545
+ "rounded-bl": T()
4546
4546
  }],
4547
4547
  /**
4548
4548
  * Border Width
4549
4549
  * @see https://tailwindcss.com/docs/border-width
4550
4550
  */
4551
4551
  "border-w": [{
4552
- border: T()
4552
+ border: R()
4553
4553
  }],
4554
4554
  /**
4555
4555
  * Border Width X
4556
4556
  * @see https://tailwindcss.com/docs/border-width
4557
4557
  */
4558
4558
  "border-w-x": [{
4559
- "border-x": T()
4559
+ "border-x": R()
4560
4560
  }],
4561
4561
  /**
4562
4562
  * Border Width Y
4563
4563
  * @see https://tailwindcss.com/docs/border-width
4564
4564
  */
4565
4565
  "border-w-y": [{
4566
- "border-y": T()
4566
+ "border-y": R()
4567
4567
  }],
4568
4568
  /**
4569
4569
  * Border Width Start
4570
4570
  * @see https://tailwindcss.com/docs/border-width
4571
4571
  */
4572
4572
  "border-w-s": [{
4573
- "border-s": T()
4573
+ "border-s": R()
4574
4574
  }],
4575
4575
  /**
4576
4576
  * Border Width End
4577
4577
  * @see https://tailwindcss.com/docs/border-width
4578
4578
  */
4579
4579
  "border-w-e": [{
4580
- "border-e": T()
4580
+ "border-e": R()
4581
4581
  }],
4582
4582
  /**
4583
4583
  * Border Width Top
4584
4584
  * @see https://tailwindcss.com/docs/border-width
4585
4585
  */
4586
4586
  "border-w-t": [{
4587
- "border-t": T()
4587
+ "border-t": R()
4588
4588
  }],
4589
4589
  /**
4590
4590
  * Border Width Right
4591
4591
  * @see https://tailwindcss.com/docs/border-width
4592
4592
  */
4593
4593
  "border-w-r": [{
4594
- "border-r": T()
4594
+ "border-r": R()
4595
4595
  }],
4596
4596
  /**
4597
4597
  * Border Width Bottom
4598
4598
  * @see https://tailwindcss.com/docs/border-width
4599
4599
  */
4600
4600
  "border-w-b": [{
4601
- "border-b": T()
4601
+ "border-b": R()
4602
4602
  }],
4603
4603
  /**
4604
4604
  * Border Width Left
4605
4605
  * @see https://tailwindcss.com/docs/border-width
4606
4606
  */
4607
4607
  "border-w-l": [{
4608
- "border-l": T()
4608
+ "border-l": R()
4609
4609
  }],
4610
4610
  /**
4611
4611
  * Divide Width X
4612
4612
  * @see https://tailwindcss.com/docs/border-width#between-children
4613
4613
  */
4614
4614
  "divide-x": [{
4615
- "divide-x": T()
4615
+ "divide-x": R()
4616
4616
  }],
4617
4617
  /**
4618
4618
  * Divide Width X Reverse
@@ -4624,7 +4624,7 @@ const M = (e) => {
4624
4624
  * @see https://tailwindcss.com/docs/border-width#between-children
4625
4625
  */
4626
4626
  "divide-y": [{
4627
- "divide-y": T()
4627
+ "divide-y": R()
4628
4628
  }],
4629
4629
  /**
4630
4630
  * Divide Width Y Reverse
@@ -4786,7 +4786,7 @@ const M = (e) => {
4786
4786
  * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
4787
4787
  */
4788
4788
  "ring-w": [{
4789
- ring: T()
4789
+ ring: R()
4790
4790
  }],
4791
4791
  /**
4792
4792
  * Ring Width Inset
@@ -4825,7 +4825,7 @@ const M = (e) => {
4825
4825
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
4826
4826
  */
4827
4827
  "inset-ring-w": [{
4828
- "inset-ring": T()
4828
+ "inset-ring": R()
4829
4829
  }],
4830
4830
  /**
4831
4831
  * Inset Ring Color
@@ -5834,7 +5834,7 @@ const M = (e) => {
5834
5834
  },
5835
5835
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
5836
5836
  };
5837
- }, nf = /* @__PURE__ */ Ta(ef);
5837
+ }, nf = /* @__PURE__ */ Ra(ef);
5838
5838
  function se(...e) {
5839
5839
  return nf(ya(e));
5840
5840
  }
@@ -5959,7 +5959,7 @@ const Cn = ({
5959
5959
  showPercentage: f = !1,
5960
5960
  loading: o = !1
5961
5961
  }) => {
5962
- const d = Ve[e], r = /* @__PURE__ */ P("div", { className: "flex w-full items-center pt-3", children: [
5962
+ const d = Ve[e], r = /* @__PURE__ */ P("div", { className: "flex w-full items-center pt-1", children: [
5963
5963
  /* @__PURE__ */ w(
5964
5964
  Je,
5965
5965
  {
@@ -6140,7 +6140,7 @@ const Cn = ({
6140
6140
  ] }), df = ({
6141
6141
  profiles: e,
6142
6142
  loading: i = !1,
6143
- buttonColor: n = "amber",
6143
+ buttonColor: n = "lightBlue",
6144
6144
  buttonLabel: a = "more"
6145
6145
  }) => /* @__PURE__ */ w(
6146
6146
  Cn,
@@ -6149,6 +6149,7 @@ const Cn = ({
6149
6149
  button: !0,
6150
6150
  buttonColor: n,
6151
6151
  buttonLabel: a,
6152
+ buttonSize: "small",
6152
6153
  children: /* @__PURE__ */ w("section", { className: "flex flex-col space-y-3 h-full", children: i ? [...Array(10)].map((s, f) => /* @__PURE__ */ P(
6153
6154
  "article",
6154
6155
  {
@@ -6165,9 +6166,9 @@ const Cn = ({
6165
6166
  )) : e.map((s, f) => /* @__PURE__ */ P(
6166
6167
  "article",
6167
6168
  {
6168
- className: `flex items-center space-x-4 px-3 py-1 rounded-lg cursor-pointer ${s.username === "Brandon" ? "border-2 border-[#ffd700] bg-[#ffecb3] hover:border-[#FFC200] hover:bg-[#FFE08A]" : "hover:bg-gray-100 hover:cursor-pointer"}`,
6169
+ className: `flex items-center px-3 py-1 rounded-lg cursor-pointer ${s.selected ? "border-2 border-[#ffd700] bg-[#ffecb3] hover:border-[#FFC200] hover:bg-[#FFE08A]" : "hover:bg-gray-100 hover:cursor-pointer"}`,
6169
6170
  children: [
6170
- /* @__PURE__ */ w("p", { className: "text-lg font-gabaritoBold text-[#374151] w-4", children: f + 1 }),
6171
+ /* @__PURE__ */ w("p", { className: "text-lg font-bold text-sec w-4", children: f + 1 }),
6171
6172
  /* @__PURE__ */ w("div", { className: "w-10 h-10 bg-gray-300 rounded-full overflow-hidden", children: /* @__PURE__ */ w(
6172
6173
  "img",
6173
6174
  {
@@ -6176,8 +6177,8 @@ const Cn = ({
6176
6177
  className: "inline select-none pointer-events-none object-cover"
6177
6178
  }
6178
6179
  ) }),
6179
- /* @__PURE__ */ w("p", { className: "flex-grow text-lg font-gabaritoMedium text-sec", children: s.username }),
6180
- /* @__PURE__ */ P("p", { className: "text-sm font-gabaritoRegular text-[#374151]", children: [
6180
+ /* @__PURE__ */ w("p", { className: "ml-2 flex-grow text-lg font-gabaritoMedium text-sec", children: s.username }),
6181
+ /* @__PURE__ */ P("p", { className: "text-sm font-regular text-sec", children: [
6181
6182
  s.xp,
6182
6183
  " XP"
6183
6184
  ] })
package/dist/ui.umd.js CHANGED
@@ -719,4 +719,4 @@ button {
719
719
  px-4 sm:px-6 py-4 sm:py-6 rounded-xl h-full
720
720
  flex flex-col relative
721
721
  ${s}
722
- `,children:[(e||i||f&&d==="top-right")&&v.jsxs(un,{className:"mb-4 flex items-start justify-between",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[a&&v.jsx(Ie,{color:r,iconSrc:a,onClick:()=>{}}),v.jsxs("div",{children:[e&&v.jsx(cn,{className:"text-main text-xl font-gabaritoBold font-medium leading-5 sm:text-lg md:text-xl",children:e}),i&&v.jsx(vn,{className:"text-sm sm:text-base text-gray-600",children:i})]})]}),f&&d==="top-right"&&v.jsx(je,{label:o,size:m,onClick:k,color:l,variant:t})]}),n&&v.jsx(mn,{className:"flex flex-col gap-4 font-regular",children:n}),f&&d==="bottom-right"&&v.jsx(kn,{className:"flex justify-end pt-2",children:v.jsx(je,{label:o,size:m,onClick:k,color:l,variant:t})})]})},Ua=({bgIconColor:e="amber",iconSrc:i="",label:n="",percentage:a=0,showCard:s=!1,showPercentage:f=!1,loading:o=!1})=>{const d=Be[e],r=v.jsxs("div",{className:"flex w-full items-center pt-3",children:[v.jsx(Ie,{color:e,iconSrc:i,loading:o,onClick:()=>{}}),v.jsxs("div",{className:"flex flex-col ml-3 flex-1",children:[v.jsxs("div",{className:"flex justify-between mb-1 items-end",children:[n&&(o?v.jsx("p",{className:"h-4 w-16 font-gabaritoMedium my-1 rounded-sm animate-pulse",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec text-md",children:n})),f&&v.jsxs("span",{className:"text-base text-gray-500",children:[a,"%"]})]}),o?v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden animate-pulse",style:{backgroundColor:"#F1F1F1"}}):v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden",style:{backgroundColor:Sn.Gray.value},children:v.jsx("div",{className:"absolute top-0 left-0 h-full rounded-2xl transition-all duration-300",style:{width:`${a}%`,background:"linear-gradient(to right, #FFC801, #FFC801)",boxShadow:`0 1px 2px ${d.dark}`}})})]})]});return s?v.jsx(Ye,{children:r}):r},Ka=({color:e="lightBlue"})=>{const[i,n]=K.useState(!1),a={lightBlue:"bg-blue-500",amber:"bg-amber-500",cyan:"bg-cyan-500"},s=f=>{n(f.target.checked)};return v.jsxs("div",{className:"inline-block relative w-12 h-6",children:[v.jsx("input",{checked:i,onChange:s,className:"absolute opacity-0 w-0 h-0",id:`react-switch-${e}`,type:"checkbox"}),v.jsx("label",{className:"block overflow-hidden h-6 rounded-full cursor-pointer bg-gray-300",htmlFor:`react-switch-${e}`,children:v.jsx("span",{className:`block h-6 w-6 rounded-full shadow transform transition-transform duration-200 ${i?`translate-x-full ${a[e]}`:"bg-white"}`})})]})},Ja=({color:e="amber",completed:i,size:n=20,loading:a=!1})=>{const s=Be[e];return a?v.jsx("div",{className:"rounded-full animate-pulse",style:{width:n,height:n,backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):i?v.jsx("div",{className:"flex items-center justify-center border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:s?.value,borderColor:s?.dark},children:v.jsx("img",{src:"src/assets/icons/check.svg",alt:"Icon",width:n*.8,height:n*.8,className:"inline select-none pointer-events-none"})}):v.jsx("div",{className:"border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:"#E5E5E5",borderColor:"#ccc"}})},Ya=({label:e="",color:i="amber",records:n={},emojiId:a="pancakes",loading:s=!1})=>v.jsxs("div",{className:"flex w-full rounded-lg pt-3",children:[v.jsx(Ie,{emojiId:a,color:i,loading:s,onClick:()=>{}}),v.jsxs("div",{className:"w-3/4 h-12 rounded-lg ml-2 flex flex-col justify-between",children:[s?v.jsx("p",{className:"h-4 w-16 mt-1 rounded-sm",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec mb-1",children:e}),v.jsx("div",{className:"flex space-x-2",children:Object.entries(n).map(([f,o])=>v.jsx(Ja,{color:i,completed:o,loading:s}))})]})]}),Za=({profiles:e,loading:i=!1,buttonColor:n="amber",buttonLabel:a="more"})=>v.jsx(Ye,{title:"Leaderboard",button:!0,buttonColor:n,buttonLabel:a,children:v.jsx("section",{className:"flex flex-col space-y-3 h-full",children:i?[...Array(10)].map((s,f)=>v.jsxs("article",{className:"flex w-full rounded-md h-1/3 space-x-2 animate-pulse",children:[v.jsx("div",{className:"w-12 h-12 bg-[#F0F0F1] rounded-full"}),v.jsxs("div",{className:"flex flex-col w-3/4 space-y-2 justify-center",children:[v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-1/2"}),v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-4/5"})]})]},f)):e.map((s,f)=>v.jsxs("article",{className:`flex items-center space-x-4 px-3 py-1 rounded-lg cursor-pointer ${s.username==="Brandon"?"border-2 border-[#ffd700] bg-[#ffecb3] hover:border-[#FFC200] hover:bg-[#FFE08A]":"hover:bg-gray-100 hover:cursor-pointer"}`,children:[v.jsx("p",{className:"text-lg font-gabaritoBold text-[#374151] w-4",children:f+1}),v.jsx("div",{className:"w-10 h-10 bg-gray-300 rounded-full overflow-hidden",children:v.jsx("img",{src:s.avatarUrl,alt:`${s.username} avatar`,className:"inline select-none pointer-events-none object-cover"})}),v.jsx("p",{className:"flex-grow text-lg font-gabaritoMedium text-sec",children:s.username}),v.jsxs("p",{className:"text-sm font-gabaritoRegular text-[#374151]",children:[s.xp," XP"]})]},f))})});T.Button=je,T.Card=Ye,T.Leaderboard=Za,T.ProgressBar=Ua,T.Toggle=Ka,T.WeekStreak=Ya,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
722
+ `,children:[(e||i||f&&d==="top-right")&&v.jsxs(un,{className:"mb-4 flex items-start justify-between",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[a&&v.jsx(Ie,{color:r,iconSrc:a,onClick:()=>{}}),v.jsxs("div",{children:[e&&v.jsx(cn,{className:"text-main text-xl font-gabaritoBold font-medium leading-5 sm:text-lg md:text-xl",children:e}),i&&v.jsx(vn,{className:"text-sm sm:text-base text-gray-600",children:i})]})]}),f&&d==="top-right"&&v.jsx(je,{label:o,size:m,onClick:k,color:l,variant:t})]}),n&&v.jsx(mn,{className:"flex flex-col gap-4 font-regular",children:n}),f&&d==="bottom-right"&&v.jsx(kn,{className:"flex justify-end pt-2",children:v.jsx(je,{label:o,size:m,onClick:k,color:l,variant:t})})]})},Ua=({bgIconColor:e="amber",iconSrc:i="",label:n="",percentage:a=0,showCard:s=!1,showPercentage:f=!1,loading:o=!1})=>{const d=Be[e],r=v.jsxs("div",{className:"flex w-full items-center pt-1",children:[v.jsx(Ie,{color:e,iconSrc:i,loading:o,onClick:()=>{}}),v.jsxs("div",{className:"flex flex-col ml-3 flex-1",children:[v.jsxs("div",{className:"flex justify-between mb-1 items-end",children:[n&&(o?v.jsx("p",{className:"h-4 w-16 font-gabaritoMedium my-1 rounded-sm animate-pulse",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec text-md",children:n})),f&&v.jsxs("span",{className:"text-base text-gray-500",children:[a,"%"]})]}),o?v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden animate-pulse",style:{backgroundColor:"#F1F1F1"}}):v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden",style:{backgroundColor:Sn.Gray.value},children:v.jsx("div",{className:"absolute top-0 left-0 h-full rounded-2xl transition-all duration-300",style:{width:`${a}%`,background:"linear-gradient(to right, #FFC801, #FFC801)",boxShadow:`0 1px 2px ${d.dark}`}})})]})]});return s?v.jsx(Ye,{children:r}):r},Ka=({color:e="lightBlue"})=>{const[i,n]=K.useState(!1),a={lightBlue:"bg-blue-500",amber:"bg-amber-500",cyan:"bg-cyan-500"},s=f=>{n(f.target.checked)};return v.jsxs("div",{className:"inline-block relative w-12 h-6",children:[v.jsx("input",{checked:i,onChange:s,className:"absolute opacity-0 w-0 h-0",id:`react-switch-${e}`,type:"checkbox"}),v.jsx("label",{className:"block overflow-hidden h-6 rounded-full cursor-pointer bg-gray-300",htmlFor:`react-switch-${e}`,children:v.jsx("span",{className:`block h-6 w-6 rounded-full shadow transform transition-transform duration-200 ${i?`translate-x-full ${a[e]}`:"bg-white"}`})})]})},Ja=({color:e="amber",completed:i,size:n=20,loading:a=!1})=>{const s=Be[e];return a?v.jsx("div",{className:"rounded-full animate-pulse",style:{width:n,height:n,backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):i?v.jsx("div",{className:"flex items-center justify-center border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:s?.value,borderColor:s?.dark},children:v.jsx("img",{src:"src/assets/icons/check.svg",alt:"Icon",width:n*.8,height:n*.8,className:"inline select-none pointer-events-none"})}):v.jsx("div",{className:"border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:"#E5E5E5",borderColor:"#ccc"}})},Ya=({label:e="",color:i="amber",records:n={},emojiId:a="pancakes",loading:s=!1})=>v.jsxs("div",{className:"flex w-full rounded-lg pt-3",children:[v.jsx(Ie,{emojiId:a,color:i,loading:s,onClick:()=>{}}),v.jsxs("div",{className:"w-3/4 h-12 rounded-lg ml-2 flex flex-col justify-between",children:[s?v.jsx("p",{className:"h-4 w-16 mt-1 rounded-sm",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec mb-1",children:e}),v.jsx("div",{className:"flex space-x-2",children:Object.entries(n).map(([f,o])=>v.jsx(Ja,{color:i,completed:o,loading:s}))})]})]}),Za=({profiles:e,loading:i=!1,buttonColor:n="lightBlue",buttonLabel:a="more"})=>v.jsx(Ye,{title:"Leaderboard",button:!0,buttonColor:n,buttonLabel:a,buttonSize:"small",children:v.jsx("section",{className:"flex flex-col space-y-3 h-full",children:i?[...Array(10)].map((s,f)=>v.jsxs("article",{className:"flex w-full rounded-md h-1/3 space-x-2 animate-pulse",children:[v.jsx("div",{className:"w-12 h-12 bg-[#F0F0F1] rounded-full"}),v.jsxs("div",{className:"flex flex-col w-3/4 space-y-2 justify-center",children:[v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-1/2"}),v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-4/5"})]})]},f)):e.map((s,f)=>v.jsxs("article",{className:`flex items-center px-3 py-1 rounded-lg cursor-pointer ${s.selected?"border-2 border-[#ffd700] bg-[#ffecb3] hover:border-[#FFC200] hover:bg-[#FFE08A]":"hover:bg-gray-100 hover:cursor-pointer"}`,children:[v.jsx("p",{className:"text-lg font-bold text-sec w-4",children:f+1}),v.jsx("div",{className:"w-10 h-10 bg-gray-300 rounded-full overflow-hidden",children:v.jsx("img",{src:s.avatarUrl,alt:`${s.username} avatar`,className:"inline select-none pointer-events-none object-cover"})}),v.jsx("p",{className:"ml-2 flex-grow text-lg font-gabaritoMedium text-sec",children:s.username}),v.jsxs("p",{className:"text-sm font-regular text-sec",children:[s.xp," XP"]})]},f))})});T.Button=je,T.Card=Ye,T.Leaderboard=Za,T.ProgressBar=Ua,T.Toggle=Ka,T.WeekStreak=Ya,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-ui-lib",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "type": "module",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {