@juanitte/inoui 1.1.1 → 1.1.3

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/ino-ui.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as T, Fragment as Bt } from "react/jsx-runtime";
2
- import { useState as G, useEffect as Me, useLayoutEffect as Ht, useMemo as Qe, useContext as Wt, createContext as Ut, useRef as q, useCallback as j, Children as or, isValidElement as ir, cloneElement as Ar, Fragment as kn, forwardRef as Qt, useImperativeHandle as sr, Component as ps } from "react";
2
+ import { useState as G, useEffect as Me, useLayoutEffect as Ht, useMemo as Qe, useContext as Wt, createContext as Gt, useRef as q, useCallback as j, Children as or, isValidElement as ir, cloneElement as Ar, Fragment as kn, forwardRef as Qt, useImperativeHandle as sr, Component as ps } from "react";
3
3
  import { createPortal as mr } from "react-dom";
4
4
  function gs(e) {
5
5
  const t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
@@ -58,7 +58,7 @@ function ms(e) {
58
58
  900: ar(t, Math.min(n + 10, 100), s[900])
59
59
  };
60
60
  }
61
- const Jn = Ut(null), ys = {
61
+ const Jn = Gt(null), ys = {
62
62
  primary: "#8c75d1",
63
63
  secondary: "#78808bff",
64
64
  success: "#79bc58",
@@ -1090,7 +1090,7 @@ function nl(e) {
1090
1090
  );
1091
1091
  return [g, y];
1092
1092
  }
1093
- const Yo = Ut(null);
1093
+ const Yo = Gt(null);
1094
1094
  function ol() {
1095
1095
  const e = Wt(Yo);
1096
1096
  if (!e) throw new Error("useApp must be used within an <App> component");
@@ -1157,7 +1157,7 @@ const sh = Object.assign(il, { useApp: ol }), Ko = {
1157
1157
  defaultRequiredMessage: "Este campo es obligatorio",
1158
1158
  defaultPatternMessage: "No coincide con el patrón requerido"
1159
1159
  }
1160
- }, Wn = Ut(null), sl = {
1160
+ }, Wn = Gt(null), sl = {
1161
1161
  locale: Ko
1162
1162
  };
1163
1163
  function ur() {
@@ -1580,7 +1580,7 @@ function vl(e, t, n, o) {
1580
1580
  function xl(e) {
1581
1581
  return e === "top" ? "bottom" : e === "topLeft" ? "bottomLeft" : e === "topRight" ? "bottomRight" : e === "bottom" ? "top" : e === "bottomLeft" ? "topLeft" : e === "bottomRight" ? "topRight" : e === "left" ? "right" : e === "leftTop" ? "rightTop" : e === "leftBottom" ? "rightBottom" : e === "right" ? "left" : e === "rightTop" ? "leftTop" : e === "rightBottom" ? "leftBottom" : e;
1582
1582
  }
1583
- function Gt({
1583
+ function Xt({
1584
1584
  content: e,
1585
1585
  children: t,
1586
1586
  placement: n,
@@ -2031,7 +2031,7 @@ function Bl({
2031
2031
  style: { ...h?.root, ...g },
2032
2032
  children: [
2033
2033
  e,
2034
- x && /* @__PURE__ */ r(Gt, { content: k, disabled: !k, children: /* @__PURE__ */ r("sup", { className: K(_, E), style: R, children: m }) })
2034
+ x && /* @__PURE__ */ r(Xt, { content: k, disabled: !k, children: /* @__PURE__ */ r("sup", { className: K(_, E), style: R, children: m }) })
2035
2035
  ]
2036
2036
  }
2037
2037
  ) : x ? /* @__PURE__ */ r(
@@ -2039,7 +2039,7 @@ function Bl({
2039
2039
  {
2040
2040
  className: K("ino-badge--standalone", p, y?.root),
2041
2041
  style: { ...h?.root, ...g },
2042
- children: /* @__PURE__ */ r(Gt, { content: k, disabled: !k, children: /* @__PURE__ */ r("sup", { className: K(_, E), style: R, children: m }) })
2042
+ children: /* @__PURE__ */ r(Xt, { content: k, disabled: !k, children: /* @__PURE__ */ r("sup", { className: K(_, E), style: R, children: m }) })
2043
2043
  }
2044
2044
  ) : null;
2045
2045
  }
@@ -2610,7 +2610,7 @@ function ph({
2610
2610
  );
2611
2611
  let R = e;
2612
2612
  s && (R = /* @__PURE__ */ r("mark", { className: "ino-text__mark", children: R })), l && (R = /* @__PURE__ */ r("code", { className: "ino-text__code", children: R })), c && (R = /* @__PURE__ */ r("kbd", { className: "ino-text__kbd", children: R }));
2613
- const I = g && /* @__PURE__ */ r(Gt, { content: b ? "Copiado!" : "Copiar", delay: 100, children: /* @__PURE__ */ r(
2613
+ const I = g && /* @__PURE__ */ r(Xt, { content: b ? "Copiado!" : "Copiar", delay: 100, children: /* @__PURE__ */ r(
2614
2614
  "button",
2615
2615
  {
2616
2616
  onClick: L,
@@ -2896,7 +2896,7 @@ const en = 24, qo = {
2896
2896
  lg: 992,
2897
2897
  xl: 1200,
2898
2898
  xxl: 1600
2899
- }, Nl = ["xxl", "xl", "lg", "md", "sm", "xs"], Go = Ut({ gutter: [0, 0] });
2899
+ }, Nl = ["xxl", "xl", "lg", "md", "sm", "xs"], Go = Gt({ gutter: [0, 0] });
2900
2900
  function _n(e, t) {
2901
2901
  if (typeof e != "object" || e === null)
2902
2902
  return e;
@@ -3005,7 +3005,7 @@ const yh = {
3005
3005
  lg: 992,
3006
3006
  xl: 1200,
3007
3007
  xxl: 1600
3008
- }, Xo = Ut({ siderCollapsed: !1 });
3008
+ }, Xo = Gt({ siderCollapsed: !1 });
3009
3009
  function Hl({
3010
3010
  children: e,
3011
3011
  hasSider: t,
@@ -3130,7 +3130,7 @@ const vh = Object.assign(Hl, {
3130
3130
  Footer: Vl,
3131
3131
  Content: Yl,
3132
3132
  Sider: Kl
3133
- }), Fn = Ut(null);
3133
+ }), Fn = Gt(null);
3134
3134
  function xh() {
3135
3135
  return Wt(Fn);
3136
3136
  }
@@ -3739,7 +3739,7 @@ function ic({
3739
3739
  }
3740
3740
  );
3741
3741
  return /* @__PURE__ */ T("div", { className: k ? void 0 : "ino-anchor__link-wrapper--horizontal", children: [
3742
- typeof $.title == "string" ? /* @__PURE__ */ r(Gt, { content: $.title, delay: 600, children: P }) : P,
3742
+ P,
3743
3743
  k && $.children && $.children.length > 0 && /* @__PURE__ */ r("div", { children: R($.children, A + 1) })
3744
3744
  ] }, $.key);
3745
3745
  }), I = K(
@@ -4383,7 +4383,7 @@ function yc({
4383
4383
  style: p,
4384
4384
  title: u ? void 0 : e.title,
4385
4385
  onClick: g,
4386
- children: u && e.title ? /* @__PURE__ */ r(Gt, { content: e.title, position: "right", delay: 100, children: y }) : y
4386
+ children: u && e.title ? /* @__PURE__ */ r(Xt, { content: e.title, position: "right", delay: 100, children: y }) : y
4387
4387
  }
4388
4388
  );
4389
4389
  }
@@ -4683,7 +4683,7 @@ function _r({
4683
4683
  {
4684
4684
  style: { listStyle: "none", cursor: o ? "not-allowed" : "pointer" },
4685
4685
  onClick: o ? void 0 : a,
4686
- children: w && b ? /* @__PURE__ */ r(Gt, { content: w, delay: 300, children: m }) : m
4686
+ children: w && b ? /* @__PURE__ */ r(Xt, { content: w, delay: 300, children: m }) : m
4687
4687
  }
4688
4688
  );
4689
4689
  }
@@ -7151,7 +7151,7 @@ function qc() {
7151
7151
  function Gc() {
7152
7152
  return /* @__PURE__ */ r("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ r("line", { x1: "2.5", y1: "5", x2: "7.5", y2: "5" }) });
7153
7153
  }
7154
- const si = Ut(null);
7154
+ const si = Gt(null);
7155
7155
  function li({
7156
7156
  checked: e,
7157
7157
  defaultChecked: t = !1,
@@ -7307,7 +7307,7 @@ function ci() {
7307
7307
  /* @__PURE__ */ r("line", { x1: "9", y1: "3", x2: "3", y2: "9" })
7308
7308
  ] });
7309
7309
  }
7310
- function Xt(e, t, n) {
7310
+ function Ut(e, t, n) {
7311
7311
  return Math.max(t, Math.min(n, e));
7312
7312
  }
7313
7313
  function Lr(e, t, n) {
@@ -7441,8 +7441,8 @@ function ro(e, t, n) {
7441
7441
  u.preventDefault();
7442
7442
  const a = e.current.getBoundingClientRect();
7443
7443
  o.current(
7444
- Xt((u.clientX - a.left) / a.width, 0, 1),
7445
- Xt((u.clientY - a.top) / a.height, 0, 1)
7444
+ Ut((u.clientX - a.left) / a.width, 0, 1),
7445
+ Ut((u.clientY - a.top) / a.height, 0, 1)
7446
7446
  );
7447
7447
  }, d = () => {
7448
7448
  l.current && (l.current = !1, s.current());
@@ -7454,8 +7454,8 @@ function ro(e, t, n) {
7454
7454
  if (c.preventDefault(), l.current = !0, !e.current) return;
7455
7455
  const d = e.current.getBoundingClientRect();
7456
7456
  o.current(
7457
- Xt((c.clientX - d.left) / d.width, 0, 1),
7458
- Xt((c.clientY - d.top) / d.height, 0, 1)
7457
+ Ut((c.clientX - d.left) / d.width, 0, 1),
7458
+ Ut((c.clientY - d.top) / d.height, 0, 1)
7459
7459
  );
7460
7460
  };
7461
7461
  }
@@ -7585,17 +7585,17 @@ function na({ color: e, format: t, disabledAlpha: n, onColorChange: o, onFormatC
7585
7585
  c(wr(e).toUpperCase());
7586
7586
  }, { r: f, g: p, b: g } = Lr(e.h, e.s, e.b), y = (m, k) => {
7587
7587
  if (isNaN(k)) return;
7588
- const M = m === "r" ? Xt(k, 0, 255) : f, B = m === "g" ? Xt(k, 0, 255) : p, S = m === "b" ? Xt(k, 0, 255) : g, L = Kr(M, B, S);
7588
+ const M = m === "r" ? Ut(k, 0, 255) : f, B = m === "g" ? Ut(k, 0, 255) : p, S = m === "b" ? Ut(k, 0, 255) : g, L = Kr(M, B, S);
7589
7589
  o({ ...L, a: e.a });
7590
7590
  }, h = (m, k) => {
7591
7591
  isNaN(k) || o({
7592
- h: m === "h" ? Xt(k, 0, 360) : e.h,
7593
- s: m === "s" ? Xt(k, 0, 100) : e.s,
7594
- b: m === "b" ? Xt(k, 0, 100) : e.b,
7592
+ h: m === "h" ? Ut(k, 0, 360) : e.h,
7593
+ s: m === "s" ? Ut(k, 0, 100) : e.s,
7594
+ b: m === "b" ? Ut(k, 0, 100) : e.b,
7595
7595
  a: e.a
7596
7596
  });
7597
7597
  }, v = (m) => {
7598
- isNaN(m) || o({ ...e, a: Xt(m, 0, 100) / 100 });
7598
+ isNaN(m) || o({ ...e, a: Ut(m, 0, 100) / 100 });
7599
7599
  }, [w, C] = G(!1), b = q(null);
7600
7600
  Me(() => {
7601
7601
  if (!w) return;
@@ -7786,7 +7786,7 @@ function ia({ stops: e, activeIndex: t, angle: n, onSelectStop: o, onMoveStop: s
7786
7786
  const b = (m) => {
7787
7787
  if (f.current === null || !a.current) return;
7788
7788
  m.preventDefault();
7789
- const k = a.current.getBoundingClientRect(), M = Xt((m.clientX - k.left) / k.width * 100, 0, 100);
7789
+ const k = a.current.getBoundingClientRect(), M = Ut((m.clientX - k.left) / k.width * 100, 0, 100);
7790
7790
  p.current(f.current, Math.round(M));
7791
7791
  }, x = () => {
7792
7792
  f.current !== null && (f.current = null, g.current());
@@ -7797,7 +7797,7 @@ function ia({ stops: e, activeIndex: t, angle: n, onSelectStop: o, onMoveStop: s
7797
7797
  }, []);
7798
7798
  const y = (b) => {
7799
7799
  if (!a.current) return;
7800
- const x = a.current.getBoundingClientRect(), m = Xt((b.clientX - x.left) / x.width * 100, 0, 100);
7800
+ const x = a.current.getBoundingClientRect(), m = Ut((b.clientX - x.left) / x.width * 100, 0, 100);
7801
7801
  l(Math.round(m));
7802
7802
  }, h = (b, x) => {
7803
7803
  b.stopPropagation(), b.preventDefault(), f.current = x, o(x);
@@ -7862,7 +7862,7 @@ function ia({ stops: e, activeIndex: t, angle: n, onSelectStop: o, onMoveStop: s
7862
7862
  min: 0,
7863
7863
  max: 360,
7864
7864
  value: n,
7865
- onChange: (b) => d(Xt(+b.target.value, 0, 360)),
7865
+ onChange: (b) => d(Ut(+b.target.value, 0, 360)),
7866
7866
  style: {
7867
7867
  height: "1.5rem",
7868
7868
  width: "3rem",
@@ -8615,7 +8615,7 @@ function da(e) {
8615
8615
  return ".+";
8616
8616
  }
8617
8617
  }
8618
- const ua = new ai(), di = Ut(null);
8618
+ const ua = new ai(), di = Gt(null);
8619
8619
  function $h({ adapter: e, children: t }) {
8620
8620
  return /* @__PURE__ */ r(di.Provider, { value: e, children: t });
8621
8621
  }
@@ -10159,7 +10159,7 @@ class Dh {
10159
10159
  return `Q${t}`;
10160
10160
  }
10161
10161
  }
10162
- const Ba = new ai(), ki = Ut(null);
10162
+ const Ba = new ai(), ki = Gt(null);
10163
10163
  function Ph({ adapter: e, children: t }) {
10164
10164
  return /* @__PURE__ */ r(ki.Provider, { value: e, children: t });
10165
10165
  }
@@ -11796,7 +11796,7 @@ const sn = {
11796
11796
  function fd(e) {
11797
11797
  return `translate3d(${e.x}px, ${e.y}px, 0) scale(${e.scale}) rotate(${e.rotate}deg) scaleX(${e.flipX ? -1 : 1}) scaleY(${e.flipY ? -1 : 1})`;
11798
11798
  }
11799
- const Bi = Ut({
11799
+ const Bi = Gt({
11800
11800
  isGroup: !1,
11801
11801
  register: () => () => {
11802
11802
  },
@@ -12924,7 +12924,7 @@ class It {
12924
12924
  s && s.scrollIntoView({ behavior: "smooth", block: "nearest", ...n });
12925
12925
  }
12926
12926
  }
12927
- const Xr = Ut(null), Kn = Ut(null), Ii = Ut(null);
12927
+ const Xr = Gt(null), Kn = Gt(null), Ii = Gt(null);
12928
12928
  function Ri(e) {
12929
12929
  const t = q(null);
12930
12930
  t.current || (t.current = new It());
@@ -14803,7 +14803,7 @@ const Yh = Qt(function(t, n) {
14803
14803
  small: "sm",
14804
14804
  middle: "md",
14805
14805
  large: "lg"
14806
- }, no = Ut(null);
14806
+ }, no = Gt(null);
14807
14807
  function Di({
14808
14808
  checked: e,
14809
14809
  defaultChecked: t = !1,
@@ -15225,7 +15225,7 @@ function ou({
15225
15225
  ]
15226
15226
  }
15227
15227
  );
15228
- return O ? /* @__PURE__ */ r(Gt, { content: O, children: ae }, Y) : /* @__PURE__ */ r("span", { children: ae }, Y);
15228
+ return O ? /* @__PURE__ */ r(Xt, { content: O, children: ae }, Y) : /* @__PURE__ */ r("span", { children: ae }, Y);
15229
15229
  })
15230
15230
  }
15231
15231
  );
@@ -20777,7 +20777,7 @@ function Wf({
20777
20777
  f
20778
20778
  ),
20779
20779
  children: [
20780
- n.showPreviewIcon && (b || e.url || e.thumbUrl) && /* @__PURE__ */ r(Gt, { content: "Preview", children: /* @__PURE__ */ r(
20780
+ n.showPreviewIcon && (b || e.url || e.thumbUrl) && /* @__PURE__ */ r(Xt, { content: "Preview", children: /* @__PURE__ */ r(
20781
20781
  "button",
20782
20782
  {
20783
20783
  type: "button",
@@ -20794,7 +20794,7 @@ function Wf({
20794
20794
  children: M(n.previewIcon, /* @__PURE__ */ r(Bf, {}))
20795
20795
  }
20796
20796
  ) }),
20797
- n.showDownloadIcon && b && /* @__PURE__ */ r(Gt, { content: "Download", children: /* @__PURE__ */ r(
20797
+ n.showDownloadIcon && b && /* @__PURE__ */ r(Xt, { content: "Download", children: /* @__PURE__ */ r(
20798
20798
  "button",
20799
20799
  {
20800
20800
  type: "button",
@@ -20811,7 +20811,7 @@ function Wf({
20811
20811
  children: M(n.downloadIcon, /* @__PURE__ */ r(zo, {}))
20812
20812
  }
20813
20813
  ) }),
20814
- n.showRemoveIcon && !o && /* @__PURE__ */ r(Gt, { content: "Remove", children: /* @__PURE__ */ r(
20814
+ n.showRemoveIcon && !o && /* @__PURE__ */ r(Xt, { content: "Remove", children: /* @__PURE__ */ r(
20815
20815
  "button",
20816
20816
  {
20817
20817
  type: "button",
@@ -20902,7 +20902,7 @@ function Wf({
20902
20902
  }
20903
20903
  ) : /* @__PURE__ */ r("span", { style: { flexShrink: 0, display: "flex", color: C ? i.colorError : i.colorTextMuted }, children: /* @__PURE__ */ r(_f, {}) }),
20904
20904
  /* @__PURE__ */ T("div", { style: { flex: 1, minWidth: 0 }, children: [
20905
- /* @__PURE__ */ r(Gt, { content: e.name, children: /* @__PURE__ */ r(
20905
+ /* @__PURE__ */ r(Xt, { content: e.name, children: /* @__PURE__ */ r(
20906
20906
  "span",
20907
20907
  {
20908
20908
  style: {
@@ -20958,7 +20958,7 @@ function Wf({
20958
20958
  f
20959
20959
  ),
20960
20960
  children: [
20961
- n.showDownloadIcon && b && /* @__PURE__ */ r(Gt, { content: "Download", children: /* @__PURE__ */ r(
20961
+ n.showDownloadIcon && b && /* @__PURE__ */ r(Xt, { content: "Download", children: /* @__PURE__ */ r(
20962
20962
  "button",
20963
20963
  {
20964
20964
  type: "button",
@@ -20975,7 +20975,7 @@ function Wf({
20975
20975
  children: M(n.downloadIcon, /* @__PURE__ */ r(zo, {}))
20976
20976
  }
20977
20977
  ) }),
20978
- n.showRemoveIcon && !o && /* @__PURE__ */ r(Gt, { content: "Remove", children: /* @__PURE__ */ r(
20978
+ n.showRemoveIcon && !o && /* @__PURE__ */ r(Xt, { content: "Remove", children: /* @__PURE__ */ r(
20979
20979
  "button",
20980
20980
  {
20981
20981
  type: "button",
@@ -21496,7 +21496,7 @@ function Kf(e) {
21496
21496
  return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
21497
21497
  }, [e]), t;
21498
21498
  }
21499
- const ts = Ut({});
21499
+ const ts = Gt({});
21500
21500
  function rs({
21501
21501
  src: e,
21502
21502
  srcSet: t,
@@ -25241,7 +25241,7 @@ function E0({
25241
25241
  ]
25242
25242
  }
25243
25243
  );
25244
- return A && p != null ? /* @__PURE__ */ r(Gt, { content: /* @__PURE__ */ r("span", { children: p }), children: N }) : N;
25244
+ return A && p != null ? /* @__PURE__ */ r(Xt, { content: /* @__PURE__ */ r("span", { children: p }), children: N }) : N;
25245
25245
  }
25246
25246
  function D0({
25247
25247
  percent: e,
@@ -25348,7 +25348,7 @@ function D0({
25348
25348
  ]
25349
25349
  }
25350
25350
  );
25351
- return A && f != null ? /* @__PURE__ */ r(Gt, { content: /* @__PURE__ */ r("span", { children: f }), children: N }) : N;
25351
+ return A && f != null ? /* @__PURE__ */ r(Xt, { content: /* @__PURE__ */ r("span", { children: f }), children: N }) : N;
25352
25352
  }
25353
25353
  function fs(e, t) {
25354
25354
  switch (e) {
@@ -25758,7 +25758,7 @@ export {
25758
25758
  Zh as TimePicker,
25759
25759
  cp as Timeline,
25760
25760
  Qh as Toggle,
25761
- Gt as Tooltip,
25761
+ Xt as Tooltip,
25762
25762
  ap as Tour,
25763
25763
  Jh as Transfer,
25764
25764
  tp as Tree,