@moondreamsdev/dreamer-ui 1.7.7-test.3 → 1.7.7-test.4

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.
@@ -2,8 +2,8 @@ import { jsxs as E, jsx as u, Fragment as J } from "react/jsx-runtime";
2
2
  import z, { useId as I, useState as x, createElement as Y, useEffect as C, useCallback as A, useMemo as W, useRef as j, isValidElement as P, cloneElement as ee } from "react";
3
3
  import { join as w } from "./utils.esm.js";
4
4
  import { b as te, C as re, a as ne, c as oe, E as ae, Q as se } from "./QuestionMarkCircled-BVBF3skB.js";
5
- import { n as H } from "./Toast-vensJgtx.js";
6
- import { A as tt, T as rt } from "./Toast-vensJgtx.js";
5
+ import { n as H } from "./Toast-CKF3_Xwk.js";
6
+ import { A as et, T as tt } from "./Toast-CKF3_Xwk.js";
7
7
  import { E as ie, X as le } from "./X-CIoyLewf.js";
8
8
  import { createPortal as M } from "react-dom";
9
9
  function q({
@@ -71,7 +71,7 @@ function q({
71
71
  )
72
72
  ] });
73
73
  }
74
- function Ke({
74
+ function qe({
75
75
  id: o,
76
76
  items: a = [],
77
77
  children: e,
@@ -240,7 +240,7 @@ function be(o) {
240
240
  }
241
241
  }, [o, n]), a;
242
242
  }
243
- function Ge({
243
+ function Ke({
244
244
  ref: o,
245
245
  id: a,
246
246
  size: e = 20,
@@ -292,7 +292,7 @@ function Ge({
292
292
  }
293
293
  );
294
294
  }
295
- function We({
295
+ function Ge({
296
296
  children: o,
297
297
  className: a,
298
298
  linkTo: e,
@@ -370,7 +370,7 @@ const he = {
370
370
  variant: "default",
371
371
  rounded: "none"
372
372
  };
373
- function Ue({
373
+ function We({
374
374
  variant: o = Q.variant,
375
375
  rounded: a,
376
376
  displayOnlyMode: e = !1,
@@ -424,7 +424,7 @@ function Ue({
424
424
  !e && /* @__PURE__ */ u(S, { elementId: c, type: "success", message: t })
425
425
  ] });
426
426
  }
427
- function _e({
427
+ function Ue({
428
428
  display: o = "inline",
429
429
  width: a = "fit-content",
430
430
  className: e = "",
@@ -498,7 +498,7 @@ function we(o, a) {
498
498
  document.body.style.overflow = "auto", e.current instanceof HTMLElement && e.current.focus();
499
499
  }), [a, n]);
500
500
  }
501
- function Qe({
501
+ function _e({
502
502
  id: o,
503
503
  isOpen: a,
504
504
  onClose: e,
@@ -748,7 +748,7 @@ function xe(o, a) {
748
748
  };
749
749
  }, [o, v, l, i]);
750
750
  }
751
- function Xe({
751
+ function Qe({
752
752
  options: o = [],
753
753
  value: a,
754
754
  onChange: e,
@@ -812,43 +812,36 @@ const Ee = {
812
812
  vertical: "w-2"
813
813
  }
814
814
  }, Ne = {
815
- default: "bg-border",
816
- muted: "bg-muted",
817
- accent: "bg-accent"
818
- }, Ce = {
819
815
  horizontal: "w-full",
820
816
  vertical: "min-h-4 h-full"
821
817
  };
822
- function Ze({
818
+ function Xe({
823
819
  orientation: o = "horizontal",
824
820
  decorative: a = !1,
825
821
  thickness: e = "thin",
826
- variant: n = "default",
827
- className: t,
828
- ...r
822
+ className: n,
823
+ ...t
829
824
  }) {
830
- const s = w(
831
- "shrink-0",
832
- Ce[o],
825
+ const r = w(
826
+ "shrink-0 bg-border",
827
+ Ne[o],
833
828
  Ee[e][o],
834
- Ne[n],
835
- t
829
+ n
836
830
  );
837
831
  return /* @__PURE__ */ u(
838
832
  "div",
839
833
  {
840
- ...r,
841
- className: s,
834
+ ...t,
835
+ className: r,
842
836
  role: a ? "presentation" : "separator",
843
837
  "aria-orientation": a ? void 0 : o,
844
838
  "aria-hidden": a,
845
839
  "data-orientation": o,
846
- "data-thickness": e,
847
- "data-variant": n
840
+ "data-thickness": e
848
841
  }
849
842
  );
850
843
  }
851
- function Je({ children: o, ref: a, ...e }) {
844
+ function Ze({ children: o, ref: a, ...e }) {
852
845
  if (P(o)) {
853
846
  let n = { ...e };
854
847
  return o.props && (n = { ...n, ...o.props }), ee(o, {
@@ -860,7 +853,7 @@ function Je({ children: o, ref: a, ...e }) {
860
853
  }
861
854
  return Y("div", { ...e, ref: a }, o);
862
855
  }
863
- function Ae({ elementId: o, maxLength: a }) {
856
+ function Ce({ elementId: o, maxLength: a }) {
864
857
  const [e, n] = x(0);
865
858
  return C(() => {
866
859
  const t = document.getElementById(o);
@@ -893,7 +886,7 @@ function Ae({ elementId: o, maxLength: a }) {
893
886
  }
894
887
  );
895
888
  }
896
- function Ie(o, a) {
889
+ function Ae(o, a) {
897
890
  C(() => {
898
891
  const e = document.getElementById(o);
899
892
  if (!e)
@@ -910,11 +903,11 @@ function Ie(o, a) {
910
903
  };
911
904
  }, [o, a]);
912
905
  }
913
- const $e = {
906
+ const Ie = {
914
907
  base: "",
915
908
  "left-line": "border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",
916
909
  outline: "border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"
917
- }, Te = {
910
+ }, $e = {
918
911
  none: "rounded-none",
919
912
  sm: "rounded-sm",
920
913
  md: "rounded-md",
@@ -924,7 +917,7 @@ const $e = {
924
917
  variant: "outline",
925
918
  rounded: "none"
926
919
  };
927
- function Ye({
920
+ function Je({
928
921
  variant: o = X.variant,
929
922
  rounded: a,
930
923
  displayOnlyMode: e = !1,
@@ -937,15 +930,15 @@ function Ye({
937
930
  ...l
938
931
  }) {
939
932
  const b = I();
940
- Ie(b, s || e);
933
+ Ae(b, s || e);
941
934
  let i = a;
942
935
  o === "outline" && !a && (i = "md"), i = i || X.rounded;
943
936
  let v = r;
944
937
  (e || o === "left-line" && !r) && (v = !0);
945
938
  const m = w(
946
939
  "appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",
947
- !e && $e[o],
948
- !e && Te[i],
940
+ !e && Ie[o],
941
+ !e && $e[i],
949
942
  !e && "px-2 py-1",
950
943
  e && "pointer-events-none",
951
944
  v && "no-resize-handle",
@@ -966,12 +959,12 @@ function Ye({
966
959
  className: m
967
960
  }
968
961
  ),
969
- d > 0 && /* @__PURE__ */ u(Ae, { elementId: b, maxLength: d }),
962
+ d > 0 && /* @__PURE__ */ u(Ce, { elementId: b, maxLength: d }),
970
963
  !e && /* @__PURE__ */ u(S, { elementId: b, type: "error", message: n }),
971
964
  !e && /* @__PURE__ */ u(S, { elementId: b, type: "success", message: t })
972
965
  ] });
973
966
  }
974
- const De = {
967
+ const Te = {
975
968
  sm: {
976
969
  container: "h-5 min-w-9 w-9",
977
970
  thumb: "h-4 w-4",
@@ -987,7 +980,7 @@ const De = {
987
980
  thumb: "h-6 w-6",
988
981
  translate: "translate-x-6"
989
982
  }
990
- }, ze = {
983
+ }, De = {
991
984
  default: {
992
985
  unchecked: "bg-muted",
993
986
  checked: "bg-primary"
@@ -1004,7 +997,7 @@ const De = {
1004
997
  variant: "default",
1005
998
  size: "md"
1006
999
  };
1007
- function Me({
1000
+ function Ye({
1008
1001
  ref: o,
1009
1002
  id: a,
1010
1003
  size: e = Z.size,
@@ -1028,7 +1021,7 @@ function Me({
1028
1021
  }
1029
1022
  }, h = ($) => {
1030
1023
  ($.key === " " || $.key === "Enter") && ($.preventDefault(), g());
1031
- }, y = De[e], p = ze[n], N = w(
1024
+ }, y = Te[e], p = De[n], N = w(
1032
1025
  // Base styles
1033
1026
  "relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out",
1034
1027
  "focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
@@ -1072,7 +1065,7 @@ function Me({
1072
1065
  );
1073
1066
  }
1074
1067
  const R = 8, B = 4, T = 6;
1075
- function ke(o) {
1068
+ function ze(o) {
1076
1069
  return { calculatePosition: A(
1077
1070
  (e, n) => {
1078
1071
  const t = e.getBoundingClientRect(), r = n.getBoundingClientRect(), s = {
@@ -1160,7 +1153,7 @@ function ke(o) {
1160
1153
  [o]
1161
1154
  ) };
1162
1155
  }
1163
- function Le(o, a, e) {
1156
+ function ke(o, a, e) {
1164
1157
  const n = j(null), t = j(null), r = A(() => {
1165
1158
  if (!n.current || !t.current) return;
1166
1159
  const s = o(n.current, t.current);
@@ -1178,7 +1171,7 @@ function Le(o, a, e) {
1178
1171
  updatePosition: r
1179
1172
  };
1180
1173
  }
1181
- function Re(o, a, e, n, t, r, s, d, c) {
1174
+ function Le(o, a, e, n, t, r, s, d, c) {
1182
1175
  const l = j(null), b = A(() => {
1183
1176
  o || (l.current && clearTimeout(l.current), l.current = window.setTimeout(() => {
1184
1177
  e(!0), requestAnimationFrame(() => {
@@ -1207,7 +1200,7 @@ function Re(o, a, e, n, t, r, s, d, c) {
1207
1200
  timeoutRef: l
1208
1201
  };
1209
1202
  }
1210
- function Oe({
1203
+ function Me({
1211
1204
  id: o,
1212
1205
  children: a,
1213
1206
  message: e,
@@ -1216,7 +1209,7 @@ function Oe({
1216
1209
  delay: r = 200,
1217
1210
  className: s
1218
1211
  }) {
1219
- const [d, c] = x(!1), [l, b] = x(!1), [i, v] = x(null), [f, m] = x(!1), [g, h] = x(!1), [y, p] = x(!1), { calculatePosition: N } = ke(n), { triggerRef: D, tooltipRef: $, updatePosition: F } = Le(N, l, v), { showTooltip: k, hideTooltip: L, timeoutRef: U } = Re(
1212
+ const [d, c] = x(!1), [l, b] = x(!1), [i, v] = x(null), [f, m] = x(!1), [g, h] = x(!1), [y, p] = x(!1), { calculatePosition: N } = ze(n), { triggerRef: D, tooltipRef: $, updatePosition: F } = ke(N, l, v), { showTooltip: k, hideTooltip: L, timeoutRef: U } = Le(
1220
1213
  t,
1221
1214
  r,
1222
1215
  b,
@@ -1276,24 +1269,24 @@ function Oe({
1276
1269
  ] });
1277
1270
  }
1278
1271
  export {
1279
- Ke as Accordion,
1272
+ qe as Accordion,
1280
1273
  q as AccordionItem,
1281
- tt as ActionModal,
1274
+ et as ActionModal,
1282
1275
  me as Button,
1283
1276
  de as ButtonLoadingDots,
1284
- Ge as Checkbox,
1285
- We as Clickable,
1286
- Ue as Input,
1287
- _e as Label,
1288
- Qe as Modal,
1289
- Xe as RadioGroup,
1277
+ Ke as Checkbox,
1278
+ Ge as Clickable,
1279
+ We as Input,
1280
+ Ue as Label,
1281
+ _e as Modal,
1282
+ Qe as RadioGroup,
1290
1283
  G as RadioGroupItem,
1291
1284
  ye as RadioInput,
1292
- Ze as Separator,
1293
- Je as Slot,
1294
- Ye as Textarea,
1295
- rt as Toast,
1296
- Me as Toggle,
1297
- Oe as Tooltip
1285
+ Xe as Separator,
1286
+ Ze as Slot,
1287
+ Je as Textarea,
1288
+ tt as Toast,
1289
+ Ye as Toggle,
1290
+ Me as Tooltip
1298
1291
  };
1299
1292
  //# sourceMappingURL=components.esm.js.map