prometeo-design-system 2.5.4 → 2.5.6

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,19 +2,19 @@ import { j as g } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as W } from "./cn-B6yFEsav.js";
3
3
  import { forwardRef as K, useState as B, useRef as v, useEffect as F, useCallback as c, useMemo as J, useImperativeHandle as Q } from "react";
4
4
  import { createPortal as U } from "react-dom";
5
- const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) => {
6
- const { children: y, defaultOpen: o = !1, onClose: a, snapPoints: d = ["60%"], setSnap: w, snap: p, attachToParent: O = !1 } = u, [E, x] = B(p || "0%"), [r, C] = B(null), Y = v(a), f = v(w), m = v(r);
7
- Y.current = a, m.current = r, F(() => {
8
- o && b();
9
- }, [o]), F(() => {
10
- f.current = w;
5
+ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, o) => {
6
+ const { children: y, defaultOpen: s = !1, onClose: f, snapPoints: d = ["60%"], setSnap: w, snap: p, attachToParent: O = !1 } = u, [E, x] = B(p || "0%"), [r, C] = B(null), Y = v(f), a = v(w), m = v(r);
7
+ Y.current = f, m.current = r, F(() => {
8
+ s && b();
9
+ }, [s]), F(() => {
10
+ a.current = w;
11
11
  }, [w]);
12
12
  const M = c(() => {
13
13
  x("0%"), Y.current?.(m.current), setTimeout(() => C(null), 300);
14
14
  }, []), b = c((H, N) => {
15
15
  console.log(H || d[0] || "60%"), x(H || d[0] || "60%"), C(N ?? null);
16
16
  }, [d]), S = J(() => E !== "0%", [E]);
17
- Q(s, () => ({
17
+ Q(o, () => ({
18
18
  open: b,
19
19
  close: M,
20
20
  isOpen: S,
@@ -22,13 +22,12 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
22
22
  }), [b, M, S]);
23
23
  const L = p || E;
24
24
  return O ? /* @__PURE__ */ g.jsx(q, { ...u, snap: L, setSnap: x, context: r, children: y }) : U(/* @__PURE__ */ g.jsx(q, { ...u, snap: L, setSnap: x, context: r, children: y }), document.body);
25
- }), q = ({ children: u, attachToParent: s = !1, className: y, snap: o, snapPoints: a = ["60%"], setSnap: d, hideOnClose: w = !1, header: p, modal: O = !1, closeOnOverlayClick: E = !1, context: x }) => {
26
- const r = v(null), C = v(null), Y = v(null), f = v(null), m = v(null), M = c(() => {
25
+ }), q = ({ children: u, attachToParent: o = !1, className: y, snap: s, snapPoints: f = ["60%"], setSnap: d, hideOnClose: w = !1, header: p, modal: O = !1, closeOnOverlayClick: E = !1, context: x }) => {
26
+ const r = v(null), C = v(null), Y = v(null), a = v(null), m = v(null), M = c(() => {
27
27
  if (!r.current) return [];
28
- console.log(a, "snapPoints");
29
- const e = s && r.current.parentElement?.offsetHeight || window.innerHeight;
30
- return a?.map((t) => typeof t == "string" && t.endsWith("%") ? parseFloat(t) > 100 ? e : parseFloat(t) / 100 * e : typeof t == "string" && t.endsWith("px") ? parseFloat(t) : typeof t == "number" && t >= 0 && t <= 1 ? t * e : typeof t == "number" ? t : 0) || [];
31
- }, [a, s]), b = c((e, t) => {
28
+ const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
29
+ return f?.map((t) => typeof t == "string" && t.endsWith("%") ? parseFloat(t) > 100 ? e : parseFloat(t) / 100 * e : typeof t == "string" && t.endsWith("px") ? parseFloat(t) : typeof t == "number" && t >= 0 && t <= 1 ? t * e : typeof t == "number" ? t : 0) || [];
30
+ }, [f, o]), b = c((e, t) => {
32
31
  const n = M();
33
32
  if (n.length === 0) return e;
34
33
  if (Math.abs(t) > 0.05)
@@ -42,31 +41,30 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
42
41
  }
43
42
  return n.reduce((l, i) => Math.abs(i - e) < Math.abs(l - e) ? i : l);
44
43
  }, [M]), S = c((e) => {
45
- if (d && a) {
46
- const t = s && r.current?.parentElement?.offsetHeight || window.innerHeight, n = e <= A ? "0%" : `${Math.round(e / t * 100)}%`;
44
+ if (d && f) {
45
+ const t = o && r.current?.parentElement?.offsetHeight || window.innerHeight, n = e <= A ? "0%" : `${Math.round(e / t * 100)}%`;
47
46
  d(n);
48
47
  }
49
- }, [d, a, s]), L = c((e) => {
48
+ }, [d, f, o]), L = c((e) => {
50
49
  r.current && (r.current.style.transition = V, r.current.style.height = `${e}px`);
51
- }, [d, a, s]), R = c(() => {
52
- if (m.current && s) {
50
+ }, [d, f, o]), R = c(() => {
51
+ if (m.current && o) {
53
52
  const { scrollY: e } = m.current;
54
53
  document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, e), m.current = null;
55
54
  }
56
- }, [s]);
55
+ }, [o]);
57
56
  F(() => () => {
58
57
  R();
59
58
  }, [R]), F(() => {
60
- if (!r.current || !o) return;
61
- console.log(o, "new snap");
62
- const e = s && r.current.parentElement?.offsetHeight || window.innerHeight;
59
+ if (!r.current || !s) return;
60
+ const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
63
61
  let t = 0;
64
- typeof o == "string" && o.endsWith("%") ? parseFloat(o) <= 0 ? t = w ? 0 : A : t = parseFloat(o) / 100 * e : typeof o == "string" && o.endsWith("px") ? t = parseFloat(o) : typeof o == "number" && (o >= 0 && o <= 1 ? t = o * e : t = o), L(t);
65
- }, [o, s]);
62
+ typeof s == "string" && s.endsWith("%") ? parseFloat(s) <= 0 ? t = w ? 0 : A : t = parseFloat(s) / 100 * e : typeof s == "string" && s.endsWith("px") ? t = parseFloat(s) : typeof s == "number" && (s >= 0 && s <= 1 ? t = s * e : t = s), L(t);
63
+ }, [s, o]);
66
64
  const H = c((e) => {
67
65
  if (!r.current) return;
68
66
  const t = e.touches[0], n = r.current.offsetHeight;
69
- f.current = {
67
+ a.current = {
70
68
  isDragging: !1,
71
69
  startY: t.clientY,
72
70
  startHeight: n,
@@ -77,7 +75,7 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
77
75
  }, []), N = c((e) => {
78
76
  if (!r.current) return;
79
77
  const t = e, n = r.current.offsetHeight;
80
- f.current = {
78
+ a.current = {
81
79
  isDragging: !1,
82
80
  startY: t.clientY,
83
81
  startHeight: n,
@@ -86,9 +84,9 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
86
84
  velocity: 0
87
85
  };
88
86
  }, []), I = c((e) => {
89
- if (!f.current || !r.current) return;
90
- const t = e.touches[0], n = f.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
91
- if (!n.isDragging && l && (n.isDragging = !0, s)) {
87
+ if (!a.current || !r.current) return;
88
+ const t = e.touches[0], n = a.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
89
+ if (!n.isDragging && l && (n.isDragging = !0, o)) {
92
90
  const i = window.scrollY;
93
91
  m.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
94
92
  }
@@ -100,13 +98,13 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
100
98
  n.velocity = n.velocity * 0.8 + G * 0.2;
101
99
  }
102
100
  n.lastY = t.clientY, n.lastTime = i;
103
- const T = n.startHeight + D, $ = s && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
101
+ const T = n.startHeight + D, $ = o && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
104
102
  r.current.style.transition = "none", r.current.style.height = `${z}px`;
105
103
  }
106
- }, [s]), _ = c((e) => {
107
- if (!f.current || !r.current) return;
108
- const t = e, n = f.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
109
- if (!n.isDragging && l && (n.isDragging = !0, s)) {
104
+ }, [o]), _ = c((e) => {
105
+ if (!a.current || !r.current) return;
106
+ const t = e, n = a.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
107
+ if (!n.isDragging && l && (n.isDragging = !0, o)) {
110
108
  const i = window.scrollY;
111
109
  m.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
112
110
  }
@@ -118,18 +116,18 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
118
116
  n.velocity = n.velocity * 0.8 + G * 0.2;
119
117
  }
120
118
  n.lastY = t.clientY, n.lastTime = i;
121
- const T = n.startHeight + D, $ = s && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
119
+ const T = n.startHeight + D, $ = o && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
122
120
  r.current.style.transition = "none", r.current.style.height = `${z}px`;
123
121
  }
124
- }, [s]), h = c(() => {
125
- if (!f.current || !r.current) return;
126
- const e = f.current;
122
+ }, [o]), h = c(() => {
123
+ if (!a.current || !r.current) return;
124
+ const e = a.current;
127
125
  if (e.isDragging) {
128
126
  R();
129
127
  const t = r.current.offsetHeight, n = b(t, e.velocity);
130
128
  S(n);
131
129
  }
132
- f.current = null;
130
+ a.current = null;
133
131
  }, [b, L, R]);
134
132
  F(() => {
135
133
  const e = Y.current;
@@ -138,7 +136,7 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
138
136
  e.removeEventListener("touchstart", H), e.removeEventListener("touchmove", I), e.removeEventListener("touchend", h), e.removeEventListener("touchcancel", h), e.removeEventListener("mousedown", N), e.removeEventListener("mousemove", _), e.removeEventListener("mouseup", h), e.removeEventListener("mouseleave", h);
139
137
  };
140
138
  }, [H, I, h]);
141
- const k = J(() => o !== "0%", [o]);
139
+ const k = J(() => s !== "0%", [s]);
142
140
  return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
143
141
  O && /* @__PURE__ */ g.jsx(
144
142
  "div",
@@ -155,7 +153,7 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
155
153
  {
156
154
  ref: r,
157
155
  className: W(
158
- s ? "absolute" : "fixed",
156
+ o ? "absolute" : "fixed",
159
157
  "z-60 bottom-0 w-full overflow-hidden",
160
158
  "bg-neutral-default-default",
161
159
  "border-t border-neutral-strong-default rounded-t-[12px]",
@@ -194,17 +192,17 @@ const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, s) =>
194
192
  )
195
193
  ] });
196
194
  }, ne = () => {
197
- const u = v(null), s = c((d, w) => {
195
+ const u = v(null), o = c((d, w) => {
198
196
  u.current?.open(d, w);
199
197
  }, []), y = c(() => {
200
198
  u.current?.close();
201
- }, []), o = c(() => u.current?.isOpen ?? !1, []), a = c(() => u.current?.getContext() ?? null, []);
199
+ }, []), s = c(() => u.current?.isOpen ?? !1, []), f = c(() => u.current?.getContext() ?? null, []);
202
200
  return {
203
- isOpen: o,
204
- open: s,
201
+ isOpen: s,
202
+ open: o,
205
203
  close: y,
206
204
  drawerRef: u,
207
- getContext: a
205
+ getContext: f
208
206
  };
209
207
  };
210
208
  export {
@@ -1,9 +1,9 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as u } from "./cn-B6yFEsav.js";
3
- import { FastField as O, ErrorMessage as q } from "formik";
4
- import { memo as G, useState as I, useRef as H, useCallback as y, useLayoutEffect as J } from "react";
3
+ import { FastField as q, ErrorMessage as G } from "formik";
4
+ import { memo as H, useState as I, useRef as J, useCallback as y, useLayoutEffect as Q } from "react";
5
5
  import { Icons as N } from "./Icons.es.js";
6
- const Q = ({
6
+ const W = ({
7
7
  icon: l,
8
8
  iconPosition: r = "left",
9
9
  label: d,
@@ -15,20 +15,24 @@ const Q = ({
15
15
  placeholder: p,
16
16
  disabled: b = !1,
17
17
  field: t,
18
- form: z,
18
+ innerRef: z,
19
+ form: K,
19
20
  ...a
20
21
  }) => {
21
- const [o, v] = I(!1), [C, K] = I(!1), c = H(null), F = z.getFieldMeta(t.name), k = F.touched && F.error, E = t.value && t.value.toString().length > 0, x = j === "password", M = x ? C ? "text" : "password" : j, P = () => n === "static" ? p || d : p || "", R = () => x ? l ? r === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : l ? r === "left" ? "pl-10" : "pr-10" : "", A = y(() => {
22
+ const [o, v] = I(!1), [C, M] = I(!1), c = J(null), F = K.getFieldMeta(t.name), k = F.touched && F.error, E = t.value && t.value.toString().length > 0, x = j === "password", P = x ? C ? "text" : "password" : j, R = () => n === "static" ? p || d : p || "", A = () => x ? l ? r === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : l ? r === "left" ? "pl-10" : "pr-10" : "", D = y(() => {
22
23
  v(!0), a.onFocus?.();
23
- }, [a]), D = y((i) => {
24
- v(!1), a.onBlur?.(), t.onBlur(i);
25
- }, [t, a]), T = y(() => {
26
- K((i) => !i);
24
+ }, [a]), T = y(
25
+ (i) => {
26
+ v(!1), a.onBlur?.(), t.onBlur(i);
27
+ },
28
+ [t, a]
29
+ ), U = y(() => {
30
+ M((i) => !i);
27
31
  }, []);
28
- J(() => {
32
+ Q(() => {
29
33
  if (c.current) {
30
- const V = ((L) => {
31
- let s = L;
34
+ const L = ((O) => {
35
+ let s = O;
32
36
  for (; s && s !== document.body; ) {
33
37
  const f = window.getComputedStyle(s).backgroundColor;
34
38
  if (f && f !== "transparent" && f !== "rgba(0, 0, 0, 0)")
@@ -37,8 +41,10 @@ const Q = ({
37
41
  }
38
42
  const m = window.getComputedStyle(document.body).backgroundColor;
39
43
  return m && m !== "transparent" && m !== "rgba(0, 0, 0, 0)" ? m : "rgb(255, 255, 255)";
40
- })(c.current.parentElement);
41
- c.current.style.backgroundColor = V;
44
+ })(
45
+ c.current.parentElement
46
+ );
47
+ c.current.style.backgroundColor = L;
42
48
  }
43
49
  }, []);
44
50
  const g = {
@@ -72,7 +78,7 @@ const Q = ({
72
78
  icon: {},
73
79
  placeholder: {}
74
80
  }
75
- }, U = {
81
+ }, V = {
76
82
  none: {
77
83
  label: "left-2 "
78
84
  },
@@ -92,79 +98,108 @@ const Q = ({
92
98
  label: `top-1/2 -translate-y-1/2 scale-100 peer-focus:text-sm peer-placeholder-shown:text-base ${(o || E) && "top-0 scale-90"}`
93
99
  }
94
100
  }, h = b ? "disabled" : k ? "error" : "default";
95
- return /* @__PURE__ */ e.jsxs("div", { className: u("relative w-full bg-inherit", n === "static" && "mt-5", $), children: [
96
- /* @__PURE__ */ e.jsxs("div", { className: "relative bg-inherit", children: [
97
- /* @__PURE__ */ e.jsx(
98
- "input",
99
- {
100
- disabled: b,
101
- id: w || t.name,
102
- type: M,
103
- name: t.name,
104
- value: t.value || "",
105
- placeholder: P(),
106
- onChange: t.onChange,
107
- onFocus: A,
108
- onEmptied: a.onEmptied,
109
- onKeyDown: a.onKeyDown,
110
- onKeyUp: a.onKeyUp,
111
- onBlur: D,
112
- className: u(
113
- "w-full px-3 h-12 text-left border-[1px] rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
114
- "bg-transparent focus:outline-none",
115
- S[n].input,
116
- g[h].input,
117
- R(),
118
- B
119
- )
120
- }
101
+ return /* @__PURE__ */ e.jsxs(
102
+ "div",
103
+ {
104
+ className: u(
105
+ "relative w-full bg-inherit",
106
+ n === "static" && "mt-5",
107
+ $
121
108
  ),
122
- /* @__PURE__ */ e.jsx(
123
- "label",
124
- {
125
- ref: c,
126
- htmlFor: w || a.name,
127
- className: u(
128
- "absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
129
- "prometeo-fonts-label-large text-sm",
130
- U[l ? r : "none"].label,
131
- S[n].label,
132
- g[h].label
109
+ children: [
110
+ /* @__PURE__ */ e.jsxs("div", { className: "relative bg-inherit", children: [
111
+ /* @__PURE__ */ e.jsx(
112
+ "input",
113
+ {
114
+ disabled: b,
115
+ id: w || t.name,
116
+ type: P,
117
+ name: t.name,
118
+ value: t.value || "",
119
+ placeholder: R(),
120
+ onChange: t.onChange,
121
+ onFocus: D,
122
+ onEmptied: a.onEmptied,
123
+ onKeyDown: a.onKeyDown,
124
+ onKeyUp: a.onKeyUp,
125
+ onBlur: T,
126
+ className: u(
127
+ "w-full px-3 h-12 text-left border-[1px] rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
128
+ "bg-transparent focus:outline-none",
129
+ S[n].input,
130
+ g[h].input,
131
+ A(),
132
+ B
133
+ ),
134
+ ref: z
135
+ }
133
136
  ),
134
- children: d
135
- }
136
- ),
137
- l && /* @__PURE__ */ e.jsx("div", { className: u(
138
- "absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
139
- g[h].icon,
140
- r === "left" ? "left-3" : "right-3"
141
- ), children: l }),
142
- x && /* @__PURE__ */ e.jsx(
143
- "button",
144
- {
145
- type: "button",
146
- onClick: T,
147
- className: u(
148
- "absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
149
- "transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
150
- l && r === "right" ? "right-8" : "right-3"
137
+ /* @__PURE__ */ e.jsx(
138
+ "label",
139
+ {
140
+ ref: c,
141
+ htmlFor: w || a.name,
142
+ className: u(
143
+ "absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
144
+ "prometeo-fonts-label-large text-sm",
145
+ V[l ? r : "none"].label,
146
+ S[n].label,
147
+ g[h].label
148
+ ),
149
+ children: d
150
+ }
151
151
  ),
152
- tabIndex: -1,
153
- disabled: b,
154
- children: C ? /* @__PURE__ */ e.jsx(N.EyeVisibility, { size: 24, className: "text-neutral-default-default" }) : /* @__PURE__ */ e.jsx(N.EyeVisibilityOff, { size: 24, className: "text-neutral-default-default" })
155
- }
156
- )
157
- ] }),
158
- k && /* @__PURE__ */ e.jsx(
159
- q,
160
- {
161
- name: t.name,
162
- component: "span",
163
- className: "block text-error-default-default text-xs mt-1"
164
- }
165
- )
166
- ] });
167
- }, W = G(Q), le = (l) => /* @__PURE__ */ e.jsx(O, { name: l.name, children: ({ field: r, form: d }) => /* @__PURE__ */ e.jsx(W, { ...l, field: r, form: d }) });
152
+ l && /* @__PURE__ */ e.jsx(
153
+ "div",
154
+ {
155
+ className: u(
156
+ "absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
157
+ g[h].icon,
158
+ r === "left" ? "left-3" : "right-3"
159
+ ),
160
+ children: l
161
+ }
162
+ ),
163
+ x && /* @__PURE__ */ e.jsx(
164
+ "button",
165
+ {
166
+ type: "button",
167
+ onClick: U,
168
+ className: u(
169
+ "absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
170
+ "transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
171
+ l && r === "right" ? "right-8" : "right-3"
172
+ ),
173
+ tabIndex: -1,
174
+ disabled: b,
175
+ children: C ? /* @__PURE__ */ e.jsx(
176
+ N.EyeVisibility,
177
+ {
178
+ size: 24,
179
+ className: "text-neutral-default-default"
180
+ }
181
+ ) : /* @__PURE__ */ e.jsx(
182
+ N.EyeVisibilityOff,
183
+ {
184
+ size: 24,
185
+ className: "text-neutral-default-default"
186
+ }
187
+ )
188
+ }
189
+ )
190
+ ] }),
191
+ k && /* @__PURE__ */ e.jsx(
192
+ G,
193
+ {
194
+ name: t.name,
195
+ component: "span",
196
+ className: "block text-error-default-default text-xs mt-1"
197
+ }
198
+ )
199
+ ]
200
+ }
201
+ );
202
+ }, X = H(W), ae = (l) => /* @__PURE__ */ e.jsx(q, { name: l.name, children: ({ field: r, form: d }) => /* @__PURE__ */ e.jsx(X, { ...l, field: r, form: d }) });
168
203
  export {
169
- le as default
204
+ ae as default
170
205
  };
@@ -0,0 +1,26 @@
1
+ import { j as n } from "./jsx-runtime-DKDX3adD.js";
2
+ import { useRef as o, createContext as c, useContext as l, memo as d } from "react";
3
+ const a = c(null), x = ({ children: e }) => {
4
+ const r = o(null), s = o(null), u = (t) => {
5
+ t.current && r && (r.current = t.current);
6
+ }, i = (t) => {
7
+ t.current && s && (s.current = t.current);
8
+ };
9
+ return /* @__PURE__ */ n.jsx(a.Provider, { value: { primarySidebarRef: r, registerPrimarySidebar: u, tabBarRef: s, registerTabBar: i }, children: e });
10
+ }, S = () => {
11
+ const e = l(a);
12
+ if (!e)
13
+ throw new Error("useSidebarContext must be used within a SidebarProvider");
14
+ return e;
15
+ }, f = ({
16
+ children: e,
17
+ sidebar: r
18
+ }) => /* @__PURE__ */ n.jsxs("div", { className: "flex h-screen w-full bg-neutral-default-default", children: [
19
+ /* @__PURE__ */ n.jsx(x, { children: r }),
20
+ /* @__PURE__ */ n.jsx("main", { className: "w-full h-full overflow-y-auto", children: e })
21
+ ] }), h = d(f);
22
+ export {
23
+ h as L,
24
+ x as S,
25
+ S as u
26
+ };
@@ -1,4 +1,4 @@
1
- import { L as f } from "./LayoutGeneric-p4Pll4Cm.js";
1
+ import { L as f } from "./LayoutGeneric-CbaoatQB.js";
2
2
  export {
3
3
  f as default
4
4
  };