@moondreamsdev/dreamer-ui 1.7.7-test.21 → 1.7.7-test.22

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 (60) hide show
  1. package/dist/Toast-CUHmqnRs.cjs +2 -0
  2. package/dist/Toast-CUHmqnRs.cjs.map +1 -0
  3. package/dist/{Toast-BFQrI1bB.js → Toast-PqPYiAd5.js} +29 -28
  4. package/dist/Toast-PqPYiAd5.js.map +1 -0
  5. package/dist/components.cjs.js +1 -1
  6. package/dist/components.cjs.js.map +1 -1
  7. package/dist/components.esm.js +37 -37
  8. package/dist/components.esm.js.map +1 -1
  9. package/dist/providers.cjs.js +1 -1
  10. package/dist/providers.esm.js +1 -1
  11. package/dist/src/components/accordion/AccordionItem.d.ts +1 -0
  12. package/dist/src/components/accordion/index.d.ts +2 -4
  13. package/dist/src/components/actionmodal/index.d.ts +1 -2
  14. package/dist/src/components/button/Button.d.ts +1 -1
  15. package/dist/src/components/button/LoadingDots.d.ts +1 -1
  16. package/dist/src/components/button/index.d.ts +2 -4
  17. package/dist/src/components/carousel/Carousel.d.ts +1 -1
  18. package/dist/src/components/carousel/hooks.d.ts +1 -0
  19. package/dist/src/components/carousel/index.d.ts +1 -2
  20. package/dist/src/components/checkbox/Checkbox.d.ts +1 -1
  21. package/dist/src/components/checkbox/index.d.ts +1 -1
  22. package/dist/src/components/clickable/Clickable.d.ts +3 -3
  23. package/dist/src/components/clickable/index.d.ts +1 -1
  24. package/dist/src/components/input/Input.d.ts +2 -3
  25. package/dist/src/components/input/index.d.ts +1 -1
  26. package/dist/src/components/pagination/Pagination.d.ts +2 -3
  27. package/dist/src/components/pagination/index.d.ts +1 -1
  28. package/dist/src/components/panel/Panel.d.ts +1 -1
  29. package/dist/src/components/panel/index.d.ts +1 -3
  30. package/dist/src/components/radiogroup/RadioGroupItem.d.ts +1 -0
  31. package/dist/src/components/scroll-area/ScrollArea.d.ts +1 -1
  32. package/dist/src/components/scroll-area/hooks.d.ts +1 -0
  33. package/dist/src/components/scroll-area/index.d.ts +1 -2
  34. package/dist/src/components/select/Select.d.ts +1 -1
  35. package/dist/src/components/select/index.d.ts +1 -2
  36. package/dist/src/components/separator/Separator.d.ts +1 -1
  37. package/dist/src/components/separator/index.d.ts +1 -2
  38. package/dist/src/components/skeleton/Skeleton.d.ts +1 -1
  39. package/dist/src/components/skeleton/index.d.ts +1 -1
  40. package/dist/src/components/slider/Slider.d.ts +1 -1
  41. package/dist/src/components/slider/index.d.ts +1 -2
  42. package/dist/src/components/tabs/TabsContent.d.ts +1 -0
  43. package/dist/src/components/tabs/TabsContext.d.ts +1 -0
  44. package/dist/src/components/tabs/TabsList.d.ts +1 -0
  45. package/dist/src/components/tabs/TabsTrigger.d.ts +1 -0
  46. package/dist/src/components/textarea/Textarea.d.ts +2 -3
  47. package/dist/src/components/textarea/index.d.ts +1 -1
  48. package/dist/src/components/toast/Toast.d.ts +1 -0
  49. package/dist/src/components/toast/index.d.ts +1 -2
  50. package/dist/src/components/toggle/Toggle.d.ts +1 -1
  51. package/dist/src/components/toggle/index.d.ts +1 -2
  52. package/dist/src/components/tooltip/hooks.d.ts +1 -0
  53. package/dist/src/components/tooltip/index.d.ts +1 -2
  54. package/dist/src/hooks/useActionModal.d.ts +1 -0
  55. package/dist/src/hooks/useToast.d.ts +1 -0
  56. package/dist/src/symbols/index.d.ts +1 -0
  57. package/package.json +2 -2
  58. package/dist/Toast-B-Zu6Kp_.cjs +0 -2
  59. package/dist/Toast-B-Zu6Kp_.cjs.map +0 -1
  60. package/dist/Toast-BFQrI1bB.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { jsxs as k, jsx as c, Fragment as ne } from "react/jsx-runtime";
2
- import G, { useId as P, useState as A, createElement as Te, useEffect as z, useRef as B, useCallback as C, useMemo as J, isValidElement as De, cloneElement as Re } from "react";
2
+ import F, { useId as P, useState as A, createElement as Te, useEffect as z, useRef as B, useCallback as C, useMemo as J, isValidElement as De, cloneElement as Re } from "react";
3
3
  import { join as w } from "./utils.esm.js";
4
4
  import { d as Ae, e as Ie, f as Ce, C as ze, a as Se, g as Le, E as Ve, Q as We, b as Be, c as He } from "./QuestionMarkCircled-CY81euqP.js";
5
- import { n as V, a as je, u as he } from "./Toast-BFQrI1bB.js";
6
- import { A as nr, T as ar } from "./Toast-BFQrI1bB.js";
7
- import { E as Fe, X as ve } from "./X-CIoyLewf.js";
5
+ import { n as V, a as je, u as he } from "./Toast-PqPYiAd5.js";
6
+ import { A as nr, T as ar } from "./Toast-PqPYiAd5.js";
7
+ import { E as Ge, X as ve } from "./X-CIoyLewf.js";
8
8
  import { createPortal as pe } from "react-dom";
9
9
  function fe({
10
10
  id: r,
@@ -107,8 +107,8 @@ function Rt({
107
107
  g
108
108
  );
109
109
  }),
110
- o.length === 0 && t && G.Children.map(t, (p, y) => {
111
- if (G.isValidElement(p) && p.type === fe) {
110
+ o.length === 0 && t && F.Children.map(t, (p, y) => {
111
+ if (F.isValidElement(p) && p.type === fe) {
112
112
  const g = p.props.id || h(y);
113
113
  return /* @__PURE__ */ Te(
114
114
  fe,
@@ -146,7 +146,7 @@ function Me() {
146
146
  t
147
147
  )) });
148
148
  }
149
- const Ge = {
149
+ const Fe = {
150
150
  base: "",
151
151
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
152
152
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -188,7 +188,7 @@ function qe({
188
188
  r === "link" && !o ? f = "fitted" : f = o || me.size;
189
189
  const l = w(
190
190
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
191
- Ge[r],
191
+ Fe[r],
192
192
  Pe[f],
193
193
  Ke[t],
194
194
  n && "relative pointer-events-none",
@@ -358,12 +358,12 @@ function St({
358
358
  gap: E = 8
359
359
  }) {
360
360
  var W, te;
361
- const S = B(null), I = G.Children.toArray(r).filter(G.isValidElement), $ = I.length, { screenSize: M } = _e(), L = J(() => {
361
+ const S = B(null), I = F.Children.toArray(r).filter(F.isValidElement), $ = I.length, { screenSize: M } = _e(), L = J(() => {
362
362
  if (typeof l == "number")
363
363
  return l;
364
364
  if (typeof l == "object" && l && M) {
365
- const Z = ["2xl", "xl", "lg", "md", "sm", "xs"], F = Z.indexOf(M);
366
- for (let O = F; O < Z.length; O++) {
365
+ const Z = ["2xl", "xl", "lg", "md", "sm", "xs"], G = Z.indexOf(M);
366
+ for (let O = G; O < Z.length; O++) {
367
367
  const re = Z[O];
368
368
  if (l[re] !== void 0)
369
369
  return l[re];
@@ -383,8 +383,8 @@ function St({
383
383
  (Z) => {
384
384
  if (L === 1)
385
385
  return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };
386
- const F = E * (L - 1) / L;
387
- return Z % L === 0 ? { leftWidth: 0, rightWidth: E / 2, widthReduction: F } : Z % L === L - 1 ? { leftWidth: E / 2, rightWidth: 0, widthReduction: F } : { leftWidth: E / 2, rightWidth: E / 2, widthReduction: F };
386
+ const G = E * (L - 1) / L;
387
+ return Z % L === 0 ? { leftWidth: 0, rightWidth: E / 2, widthReduction: G } : Z % L === L - 1 ? { leftWidth: E / 2, rightWidth: 0, widthReduction: G } : { leftWidth: E / 2, rightWidth: E / 2, widthReduction: G };
388
388
  },
389
389
  [L, E]
390
390
  ), q = () => {
@@ -400,7 +400,7 @@ function St({
400
400
  h === "aligned" ? "disabled:opacity-90" : "disabled:opacity-50"
401
401
  );
402
402
  return /* @__PURE__ */ k("div", { className: w("relative", n), "data-carousel-wrapper": "true", children: [
403
- !f && /* @__PURE__ */ c(ne, { children: p ? G.cloneElement(
403
+ !f && /* @__PURE__ */ c(ne, { children: p ? F.cloneElement(
404
404
  p,
405
405
  {
406
406
  onClick: q,
@@ -455,8 +455,8 @@ function St({
455
455
  transform: `translateX(${ue}%)`,
456
456
  width: `${$ / L * 100}%`
457
457
  },
458
- children: I.map((Z, F) => {
459
- const { leftWidth: O, rightWidth: re, widthReduction: $e } = Q(F);
458
+ children: I.map((Z, G) => {
459
+ const { leftWidth: O, rightWidth: re, widthReduction: $e } = Q(G);
460
460
  return /* @__PURE__ */ c(
461
461
  "div",
462
462
  {
@@ -466,33 +466,33 @@ function St({
466
466
  marginRight: re > 0 ? `${re}px` : void 0,
467
467
  marginLeft: O > 0 ? `${O}px` : void 0
468
468
  },
469
- "data-slide-index": F,
469
+ "data-slide-index": G,
470
470
  children: Z
471
471
  },
472
- F
472
+ G
473
473
  );
474
474
  })
475
475
  }
476
476
  ),
477
- !m && /* @__PURE__ */ c("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2", children: Array.from({ length: Math.ceil($ / L) }).map((Z, F) => /* @__PURE__ */ c(
477
+ !m && /* @__PURE__ */ c("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2", children: Array.from({ length: Math.ceil($ / L) }).map((Z, G) => /* @__PURE__ */ c(
478
478
  "button",
479
479
  {
480
480
  type: "button",
481
- onClick: () => K(F),
481
+ onClick: () => K(G),
482
482
  className: w(
483
483
  "w-2 h-2 rounded-full transition-colors duration-200",
484
- F === U ? "bg-accent" : "bg-muted hover:bg-muted-foreground/50",
484
+ G === U ? "bg-accent" : "bg-muted hover:bg-muted-foreground/50",
485
485
  N
486
486
  ),
487
- "aria-label": `Go to slide ${F + 1}`,
488
- "data-carousel-dot": F
487
+ "aria-label": `Go to slide ${G + 1}`,
488
+ "data-carousel-dot": G
489
489
  },
490
- F
490
+ G
491
491
  )) })
492
492
  ]
493
493
  }
494
494
  ),
495
- !f && /* @__PURE__ */ c(ne, { children: y ? G.cloneElement(
495
+ !f && /* @__PURE__ */ c(ne, { children: y ? F.cloneElement(
496
496
  y,
497
497
  {
498
498
  onClick: Y,
@@ -652,7 +652,7 @@ function le({ elementId: r, type: o, message: t }) {
652
652
  ),
653
653
  role: "status",
654
654
  children: [
655
- o === "error" ? /* @__PURE__ */ c(Fe, {}) : /* @__PURE__ */ c(Se, {}),
655
+ o === "error" ? /* @__PURE__ */ c(Ge, {}) : /* @__PURE__ */ c(Se, {}),
656
656
  /* @__PURE__ */ c("span", { id: `${r}-${o}-message`, children: t })
657
657
  ]
658
658
  }
@@ -830,7 +830,7 @@ function Ht({
830
830
  }) {
831
831
  const u = P(), h = r || `modal-${u}`, v = r ? `${r}-title` : `modal-title-${u}`, { show: p, shouldRender: y } = Je(o);
832
832
  if (Oe(h, y), Ye(y, t), !y) return null;
833
- const g = () => n ? G.isValidElement(n) ? /* @__PURE__ */ c("div", { className: "mb-4", children: n }) : /* @__PURE__ */ c("h2", { className: "mb-4 text-xl font-semibold", id: v, children: n }) : null, x = () => f.length === 0 ? null : /* @__PURE__ */ c("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: f.map((N, E) => {
833
+ const g = () => n ? F.isValidElement(n) ? /* @__PURE__ */ c("div", { className: "mb-4", children: n }) : /* @__PURE__ */ c("h2", { className: "mb-4 text-xl font-semibold", id: v, children: n }) : null, x = () => f.length === 0 ? null : /* @__PURE__ */ c("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: f.map((N, E) => {
834
834
  const { label: S, className: I, ...$ } = N;
835
835
  return /* @__PURE__ */ c(qe, { className: I, type: "button", ...$, "data-modal-action": "true", children: S }, E);
836
836
  }) });
@@ -1059,7 +1059,7 @@ const ot = {
1059
1059
  screen: "w-screen"
1060
1060
  }
1061
1061
  };
1062
- function Ft({
1062
+ function Gt({
1063
1063
  ref: r,
1064
1064
  id: o,
1065
1065
  isOpen: t,
@@ -1077,11 +1077,11 @@ function Ft({
1077
1077
  }) {
1078
1078
  const h = P(), v = o || `panel-${h}`, p = o ? `${o}-title` : `panel-title-${h}`, { show: y, shouldRender: g } = rt(t);
1079
1079
  if (at(v, g), nt(g, n), !g) return null;
1080
- const x = () => e ? G.isValidElement(e) ? /* @__PURE__ */ c("div", { children: e }) : /* @__PURE__ */ c("h2", { className: "text-2xl font-semibold", id: p, children: e }) : null, N = () => {
1080
+ const x = () => e ? F.isValidElement(e) ? /* @__PURE__ */ c("div", { children: e }) : /* @__PURE__ */ c("h2", { className: "text-2xl font-semibold", id: p, children: e }) : null, N = () => {
1081
1081
  if (!s) return null;
1082
- if (G.isValidElement(s)) {
1082
+ if (F.isValidElement(s)) {
1083
1083
  const E = s, S = E.props.className || "";
1084
- return G.cloneElement(E, { className: V("px-6 py-4", S) });
1084
+ return F.cloneElement(E, { className: V("px-6 py-4", S) });
1085
1085
  }
1086
1086
  return /* @__PURE__ */ c("div", { className: "px-6 py-4", children: s });
1087
1087
  };
@@ -1355,7 +1355,7 @@ function Mt({
1355
1355
  },
1356
1356
  `${l.value}-${b}`
1357
1357
  )),
1358
- m.length === 0 && e && G.Children.map(e, (l) => G.isValidElement(l) && l.type === be ? /* @__PURE__ */ c(
1358
+ m.length === 0 && e && F.Children.map(e, (l) => F.isValidElement(l) && l.type === be ? /* @__PURE__ */ c(
1359
1359
  be,
1360
1360
  {
1361
1361
  ...l.props,
@@ -1428,7 +1428,7 @@ function lt(r) {
1428
1428
  handleScroll: h
1429
1429
  };
1430
1430
  }
1431
- function Gt({
1431
+ function Ft({
1432
1432
  className: r,
1433
1433
  thumbClassName: o,
1434
1434
  viewportClassName: t,
@@ -2595,7 +2595,7 @@ function er({
2595
2595
  i
2596
2596
  ), L = P(), U = r ?? L;
2597
2597
  return /* @__PURE__ */ k(ne, { children: [
2598
- G.cloneElement(o, {
2598
+ F.cloneElement(o, {
2599
2599
  ref: (j) => {
2600
2600
  N.current = j;
2601
2601
  },
@@ -2647,19 +2647,19 @@ export {
2647
2647
  fe as AccordionItem,
2648
2648
  nr as ActionModal,
2649
2649
  qe as Button,
2650
- Me as ButtonLoadingDots,
2651
2650
  St as Carousel,
2652
2651
  Lt as Checkbox,
2653
2652
  Vt as Clickable,
2654
2653
  Wt as Input,
2655
2654
  Bt as Label,
2655
+ Me as LoadingDots,
2656
2656
  Ht as Modal,
2657
2657
  jt as Pagination,
2658
- Ft as Panel,
2658
+ Gt as Panel,
2659
2659
  Mt as RadioGroup,
2660
2660
  be as RadioGroupItem,
2661
2661
  st as RadioInput,
2662
- Gt as ScrollArea,
2662
+ Ft as ScrollArea,
2663
2663
  Pt as Select,
2664
2664
  Kt as Separator,
2665
2665
  qt as Skeleton,