@noxickon/onyx 2.0.0 → 2.0.1

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.
@@ -1,8 +1,8 @@
1
- import { a0 as p, e as M, a2 as B, i as I, m as L, a3 as Q, c as U, w as X, v as Z, a4 as ee } from "../chunks/ui-CbFPvWIc.js";
1
+ import { a0 as p, e as M, a4 as Q, a5 as B, i as I, a6 as U, m as L, a7 as X, c as Z, a8 as ee, w as te, v as le, a9 as se } from "../chunks/ui-ULvcrJjV.js";
2
2
  import { jsx as b, jsxs as C } from "react/jsx-runtime";
3
3
  import { d as g } from "../chunks/hooks-CUNBk2tZ.js";
4
4
  import { createContext as z, useState as E, useEffect as j, useContext as T } from "react";
5
- const Fe = (n) => {
5
+ const qe = (n) => {
6
6
  const e = g.c(28);
7
7
  let t, l, s, o, a, i, r;
8
8
  e[0] !== n ? ({
@@ -20,7 +20,7 @@ const Fe = (n) => {
20
20
  let f;
21
21
  e[10] !== a ? (f = p("mx-auto flex max-w-10xl items-center justify-between px-4 py-2.5", a), e[10] = a, e[11] = f) : f = e[11];
22
22
  let u;
23
- e[12] !== c || e[13] !== r ? (u = c ? /* @__PURE__ */ b(M, { "aria-label": "Open menu", "data-ox-slot": "header-toggle", size: "md", variant: "ghost", onClick: r, children: /* @__PURE__ */ b(M.Icon, { path: "mdiMenu" }) }) : null, e[12] = c, e[13] = r, e[14] = u) : u = e[14];
23
+ e[12] !== c || e[13] !== r ? (u = c ? /* @__PURE__ */ b(M, { "aria-label": "Open menu", "data-ox-slot": "header-toggle", size: "md", variant: "ghost", onClick: r, children: /* @__PURE__ */ b(M.Icon, { path: Q }) }) : null, e[12] = c, e[13] = r, e[14] = u) : u = e[14];
24
24
  let m;
25
25
  e[15] !== t ? (m = t ? /* @__PURE__ */ b("div", { children: t }) : null, e[15] = t, e[16] = m) : m = e[16];
26
26
  let x;
@@ -35,7 +35,7 @@ const Fe = (n) => {
35
35
  ] }), e[20] = l, e[21] = f, e[22] = x, e[23] = h) : h = e[23];
36
36
  let v;
37
37
  return e[24] !== o || e[25] !== d || e[26] !== h ? (v = /* @__PURE__ */ b("header", { className: d, "data-ox-slot": "header", ...o, children: h }), e[24] = o, e[25] = d, e[26] = h, e[27] = v) : v = e[27], v;
38
- }, G = "group ox-gray-inset-focus items-center rounded-lg text-sm transition-colors text-left col-span-2 grid grid-cols-subgrid", R = "size-10 justify-center", W = "h-10 w-full px-2", Y = "bg-gray-300 text-gray-1200", te = "h-15", F = z(void 0), le = (n) => {
38
+ }, G = "group ox-gray-inset-focus items-center rounded-lg text-sm transition-colors text-left col-span-2 grid grid-cols-subgrid", R = "size-10 justify-center", W = "h-10 w-full px-2", Y = "bg-gray-300 text-gray-1200", oe = "h-15", F = z(void 0), ae = (n) => {
39
39
  const e = g.c(24);
40
40
  let t, l, s, o, a, i, r;
41
41
  e[0] !== n ? ({
@@ -65,7 +65,7 @@ const Fe = (n) => {
65
65
  }, y = [], e[11] = S, e[12] = y) : (S = e[11], y = e[12]), j(S, y);
66
66
  let N;
67
67
  e[13] !== t || e[14] !== l || e[15] !== s || e[16] !== x || e[17] !== d || e[18] !== u || e[19] !== o ? (N = u ? /* @__PURE__ */ b(I, { open: !x, onOpenChange: ($) => !$ && o?.(), children: /* @__PURE__ */ b(I.Content, { closeOnOutsideClick: o !== void 0, side: "left", children: /* @__PURE__ */ C("nav", { "aria-label": "Mobile navigation", className: p("flex h-screen w-full flex-col bg-gray-100", l), "data-ox-slot": "sidebar", role: "navigation", ...s, children: [
68
- o ? /* @__PURE__ */ b("div", { className: p("flex h-15 items-center gap-[17px] px-4", te), children: /* @__PURE__ */ b(M, { "aria-label": "Close sidebar", size: "md", variant: "ghost", onClick: o, children: /* @__PURE__ */ b(M.Icon, { path: "mdiClose" }) }) }) : null,
68
+ o ? /* @__PURE__ */ b("div", { className: p("flex h-15 items-center gap-[17px] px-4", oe), children: /* @__PURE__ */ b(M, { "aria-label": "Close sidebar", size: "md", variant: "ghost", onClick: o, children: /* @__PURE__ */ b(M.Icon, { path: U }) }) }) : null,
69
69
  t
70
70
  ] }) }) }) : /* @__PURE__ */ b("nav", { "aria-label": "Desktop navigation", className: p("sticky box-content flex flex-col overflow-y-auto bg-gray-100", {
71
71
  "top-0 h-screen": !d,
@@ -80,7 +80,7 @@ const Fe = (n) => {
80
80
  if (!n)
81
81
  throw new Error("useSidebar must be used within a SidebarProvider");
82
82
  return n;
83
- }, se = (n) => {
83
+ }, ne = (n) => {
84
84
  const e = g.c(12);
85
85
  let t, l, s;
86
86
  e[0] !== n ? ({
@@ -99,7 +99,7 @@ const Fe = (n) => {
99
99
  }, '[&_[data-ox-slot="sidebar-link"]]:col-span-2 [&_[data-ox-slot="sidebar-link"]]:grid [&_[data-ox-slot="sidebar-link"]]:grid-cols-subgrid', '[&_[data-ox-slot="sidebar-button"]]:col-span-2 [&_[data-ox-slot="sidebar-button"]]:grid [&_[data-ox-slot="sidebar-button"]]:grid-cols-subgrid', '[&_[data-ox-slot="sidebar-icon"]]:[grid-column-start:var(--ox-menu-icon-col)] [&_[data-ox-slot="sidebar-icon"]]:justify-self-center', '[&_[data-ox-slot="sidebar-label"]]:[grid-column-start:var(--ox-menu-label-col)]', l), e[4] = l, e[5] = i, e[6] = r, e[7] = c) : c = e[7];
100
100
  let d;
101
101
  return e[8] !== t || e[9] !== s || e[10] !== c ? (d = /* @__PURE__ */ b("div", { className: c, "data-ox-slot": "sidebar-body", ...s, children: t }), e[8] = t, e[9] = s, e[10] = c, e[11] = d) : d = e[11], d;
102
- }, oe = (n) => {
102
+ }, re = (n) => {
103
103
  const e = g.c(18);
104
104
  let t, l, s, o, a;
105
105
  e[0] !== n ? ({
@@ -122,7 +122,7 @@ const Fe = (n) => {
122
122
  const m = i ? "active" : "inactive";
123
123
  let x;
124
124
  return e[12] !== t || e[13] !== r || e[14] !== s || e[15] !== u || e[16] !== m ? (x = /* @__PURE__ */ b("button", { className: u, "data-ox-slot": "sidebar-button", disabled: r, type: "button", ...s, "data-ox-state": m, children: t }), e[12] = t, e[13] = r, e[14] = s, e[15] = u, e[16] = m, e[17] = x) : x = e[17], x;
125
- }, ae = (n) => {
125
+ }, ie = (n) => {
126
126
  const e = g.c(10);
127
127
  let t, l, s;
128
128
  e[0] !== n ? ({
@@ -134,7 +134,7 @@ const Fe = (n) => {
134
134
  e[4] !== l ? (o = p("p-4", l), e[4] = l, e[5] = o) : o = e[5];
135
135
  let a;
136
136
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-footer", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
137
- }, ne = (n) => {
137
+ }, ce = (n) => {
138
138
  const e = g.c(17);
139
139
  let t, l, s, o;
140
140
  e[0] !== n ? ({
@@ -161,7 +161,7 @@ const Fe = (n) => {
161
161
  f,
162
162
  t
163
163
  ] }), e[12] = t, e[13] = s, e[14] = r, e[15] = f, e[16] = u) : u = e[16], u;
164
- }, re = (n) => {
164
+ }, de = (n) => {
165
165
  const e = g.c(10);
166
166
  let t, l, s;
167
167
  e[0] !== n ? ({
@@ -173,7 +173,7 @@ const Fe = (n) => {
173
173
  e[4] !== l ? (o = p("flex h-15 items-center px-4", l), e[4] = l, e[5] = o) : o = e[5];
174
174
  let a;
175
175
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-header", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
176
- }, ie = (n) => {
176
+ }, fe = (n) => {
177
177
  const e = g.c(11);
178
178
  let t, l, s;
179
179
  e[0] !== n ? ({
@@ -190,7 +190,7 @@ const Fe = (n) => {
190
190
  }, t), e[4] = t, e[5] = i, e[6] = r) : r = e[6];
191
191
  let c;
192
192
  return e[7] !== l || e[8] !== o || e[9] !== r ? (c = /* @__PURE__ */ b(L, { className: r, "data-ox-slot": "sidebar-icon", size: o, ...l }), e[7] = l, e[8] = o, e[9] = r, e[10] = c) : c = e[10], c;
193
- }, ce = (n) => {
193
+ }, ue = (n) => {
194
194
  const e = g.c(10);
195
195
  let t, l, s;
196
196
  e[0] !== n ? ({
@@ -202,7 +202,7 @@ const Fe = (n) => {
202
202
  e[4] !== l ? (o = p("overflow-hidden text-ellipsis", l), e[4] = l, e[5] = o) : o = e[5];
203
203
  let a;
204
204
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("span", { className: o, "data-ox-slot": "sidebar-label", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
205
- }, de = (n) => {
205
+ }, be = (n) => {
206
206
  const e = g.c(22);
207
207
  let t, l, s, o, a, i;
208
208
  e[0] !== n ? ({
@@ -224,23 +224,23 @@ const Fe = (n) => {
224
224
  "cursor-pointer text-gray-1000 hover:bg-gray-300 hover:text-gray-1200": x,
225
225
  "ox-default-disabled": c
226
226
  }, l), e[7] = l, e[8] = d, e[9] = c, e[10] = u, e[11] = m, e[12] = x, e[13] = h) : h = e[13];
227
- const v = c ? void 0 : o, S = c ? fe : void 0, y = r ? "active" : "inactive";
227
+ const v = c ? void 0 : o, S = c ? me : void 0, y = r ? "active" : "inactive";
228
228
  let N;
229
229
  return e[14] !== t || e[15] !== s || e[16] !== y || e[17] !== f || e[18] !== h || e[19] !== v || e[20] !== S ? (N = /* @__PURE__ */ b("a", { "aria-current": f, className: h, "data-ox-slot": "sidebar-link", href: v, role: "link", onClick: S, ...s, "data-ox-state": y, children: t }), e[14] = t, e[15] = s, e[16] = y, e[17] = f, e[18] = h, e[19] = v, e[20] = S, e[21] = N) : N = e[21], N;
230
230
  };
231
- function fe(n) {
231
+ function me(n) {
232
232
  return n.preventDefault();
233
233
  }
234
- const w = le;
235
- w.Body = se;
236
- w.Button = oe;
237
- w.Footer = ae;
238
- w.Group = ne;
239
- w.Header = re;
240
- w.Icon = ie;
241
- w.Label = ce;
242
- w.Link = de;
243
- const Ve = (n) => {
234
+ const w = ae;
235
+ w.Body = ne;
236
+ w.Button = re;
237
+ w.Footer = ie;
238
+ w.Group = ce;
239
+ w.Header = de;
240
+ w.Icon = fe;
241
+ w.Label = ue;
242
+ w.Link = be;
243
+ const Je = (n) => {
244
244
  const e = g.c(22);
245
245
  let t, l, s, o, a, i, r;
246
246
  e[0] !== n ? ({
@@ -252,7 +252,7 @@ const Ve = (n) => {
252
252
  title: r,
253
253
  ...s
254
254
  } = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a, e[6] = i, e[7] = r) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5], i = e[6], r = e[7]);
255
- const c = i === void 0 ? "purple" : i, d = r || a || o, f = Q[c], u = d ? "main-headline" : void 0;
255
+ const c = i === void 0 ? "purple" : i, d = r || a || o, f = X[c], u = d ? "main-headline" : void 0;
256
256
  let m;
257
257
  e[8] !== l ? (m = p("w-full p-6", l), e[8] = l, e[9] = m) : m = e[9];
258
258
  let x;
@@ -268,7 +268,7 @@ const Ve = (n) => {
268
268
  x,
269
269
  t
270
270
  ] }), e[16] = t, e[17] = s, e[18] = u, e[19] = m, e[20] = x, e[21] = h) : h = e[21], h;
271
- }, Ke = (n) => {
271
+ }, Qe = (n) => {
272
272
  const e = g.c(11);
273
273
  let t, l, s;
274
274
  e[0] !== n ? ({
@@ -283,7 +283,7 @@ const Ve = (n) => {
283
283
  e[4] !== l || e[5] !== a ? (i = p("mx-auto grid min-h-screen max-w-16xl bg-transparent", a, l), e[4] = l, e[5] = a, e[6] = i) : i = e[6];
284
284
  let r;
285
285
  return e[7] !== t || e[8] !== s || e[9] !== i ? (r = /* @__PURE__ */ b("div", { className: i, "data-ox-slot": "app-layout", ...s, children: t }), e[7] = t, e[8] = s, e[9] = i, e[10] = r) : r = e[10], r;
286
- }, ue = (n) => {
286
+ }, xe = (n) => {
287
287
  const e = g.c(10);
288
288
  let t, l, s;
289
289
  e[0] !== n ? ({
@@ -295,7 +295,7 @@ const Ve = (n) => {
295
295
  e[4] !== l ? (o = p("flex flex-col overflow-y-auto", l), e[4] = l, e[5] = o) : o = e[5];
296
296
  let a;
297
297
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("main", { className: o, "data-ox-slot": "main-content", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
298
- }, be = (n) => {
298
+ }, pe = (n) => {
299
299
  const e = g.c(10);
300
300
  let t, l, s;
301
301
  e[0] !== n ? ({
@@ -307,7 +307,7 @@ const Ve = (n) => {
307
307
  e[4] !== l ? (o = p("flex-1 overflow-y-auto px-6 py-6", l), e[4] = l, e[5] = o) : o = e[5];
308
308
  let a;
309
309
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "main-content-body", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
310
- }, me = (n) => {
310
+ }, he = (n) => {
311
311
  const e = g.c(10);
312
312
  let t, l, s;
313
313
  e[0] !== n ? ({
@@ -319,9 +319,9 @@ const Ve = (n) => {
319
319
  e[4] !== l ? (o = p("flex-shrink-0 border-b border-gray-400 bg-gray-100 px-6 py-4", l), e[4] = l, e[5] = o) : o = e[5];
320
320
  let a;
321
321
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "main-content-header", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
322
- }, qe = Object.assign(ue, {
323
- Header: me,
324
- Body: be
322
+ }, Ue = Object.assign(xe, {
323
+ Header: he,
324
+ Body: pe
325
325
  }), V = z(void 0);
326
326
  function H() {
327
327
  const n = T(V);
@@ -329,7 +329,7 @@ function H() {
329
329
  throw new Error("useOxSidebar must be used within a SidebarProvider");
330
330
  return n;
331
331
  }
332
- const xe = 256, pe = (n) => {
332
+ const ge = 256, ve = (n) => {
333
333
  const e = g.c(21);
334
334
  let t, l, s;
335
335
  e[0] !== n ? ({
@@ -354,11 +354,11 @@ const xe = 256, pe = (n) => {
354
354
  e[14] !== l ? (r = p("sticky top-0 flex h-screen flex-col overflow-y-auto bg-gray-150", l), e[14] = l, e[15] = r) : r = e[15];
355
355
  let c;
356
356
  e[16] === Symbol.for("react.memo_cache_sentinel") ? (c = {
357
- width: xe
357
+ width: ge
358
358
  }, e[16] = c) : c = e[16];
359
359
  let d;
360
360
  return e[17] !== t || e[18] !== s || e[19] !== r ? (d = /* @__PURE__ */ b("aside", { className: r, "data-ox-slot": "sidebar", style: c, ...s, children: t }), e[17] = t, e[18] = s, e[19] = r, e[20] = d) : d = e[20], d;
361
- }, he = (n) => {
361
+ }, Se = (n) => {
362
362
  const e = g.c(10);
363
363
  let t, l, s;
364
364
  e[0] !== n ? ({
@@ -370,7 +370,7 @@ const xe = 256, pe = (n) => {
370
370
  e[4] !== l ? (o = p("flex-1 overflow-y-auto p-2", l), e[4] = l, e[5] = o) : o = e[5];
371
371
  let a;
372
372
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-content", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
373
- }, ge = (n) => {
373
+ }, ye = (n) => {
374
374
  const e = g.c(10);
375
375
  let t, l, s;
376
376
  e[0] !== n ? ({
@@ -382,7 +382,7 @@ const xe = 256, pe = (n) => {
382
382
  e[4] !== l ? (o = p("flex shrink-0 flex-col p-2", l), e[4] = l, e[5] = o) : o = e[5];
383
383
  let a;
384
384
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-footer", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
385
- }, ve = (n) => {
385
+ }, Ne = (n) => {
386
386
  const e = g.c(10);
387
387
  let t, l, s;
388
388
  e[0] !== n ? ({
@@ -394,7 +394,7 @@ const xe = 256, pe = (n) => {
394
394
  e[4] !== l ? (o = p("flex flex-wrap items-center gap-2", '[&_[data-ox-slot="sidebar-group-content"]]:w-full', l), e[4] = l, e[5] = o) : o = e[5];
395
395
  let a;
396
396
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-group", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
397
- }, Se = (n) => {
397
+ }, Oe = (n) => {
398
398
  const e = g.c(10);
399
399
  let t, l, s;
400
400
  e[0] !== n ? ({
@@ -406,7 +406,7 @@ const xe = 256, pe = (n) => {
406
406
  e[4] !== l ? (o = p("mr-1.5 inline-flex size-6 shrink-0 items-center justify-center rounded-md", "enabled:cursor-pointer enabled:text-gray-900 enabled:hover:bg-gray-300 enabled:hover:text-gray-1200", "ox-gray-outset-focus disabled:ox-default-disabled", l), e[4] = l, e[5] = o) : o = e[5];
407
407
  let a;
408
408
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("button", { className: o, "data-ox-slot": "sidebar-group-action", type: "button", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
409
- }, ye = (n) => {
409
+ }, Ce = (n) => {
410
410
  const e = g.c(10);
411
411
  let t, l, s;
412
412
  e[0] !== n ? ({
@@ -418,7 +418,7 @@ const xe = 256, pe = (n) => {
418
418
  e[4] !== l ? (o = p(l), e[4] = l, e[5] = o) : o = e[5];
419
419
  let a;
420
420
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-group-content", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
421
- }, Ne = (n) => {
421
+ }, we = (n) => {
422
422
  const e = g.c(10);
423
423
  let t, l, s;
424
424
  e[0] !== n ? ({
@@ -430,7 +430,7 @@ const xe = 256, pe = (n) => {
430
430
  e[4] !== l ? (o = p("flex flex-1 items-center pl-2 text-xs font-medium text-gray-900", l), e[4] = l, e[5] = o) : o = e[5];
431
431
  let a;
432
432
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-group-label", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
433
- }, Oe = (n) => {
433
+ }, $e = (n) => {
434
434
  const e = g.c(10);
435
435
  let t, l, s;
436
436
  e[0] !== n ? ({
@@ -442,7 +442,7 @@ const xe = 256, pe = (n) => {
442
442
  e[4] !== l ? (o = p("flex shrink-0 flex-col p-2", l), e[4] = l, e[5] = o) : o = e[5];
443
443
  let a;
444
444
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-header", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
445
- }, Ce = (n) => {
445
+ }, ke = (n) => {
446
446
  const e = g.c(10);
447
447
  let t, l, s;
448
448
  e[0] !== n ? ({
@@ -454,7 +454,7 @@ const xe = 256, pe = (n) => {
454
454
  e[4] !== l ? (o = p("flex flex-col items-stretch gap-1", l), e[4] = l, e[5] = o) : o = e[5];
455
455
  let a;
456
456
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("ul", { className: o, "data-ox-slot": "sidebar-menu", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
457
- }, we = (n) => {
457
+ }, _e = (n) => {
458
458
  const e = g.c(10);
459
459
  let t, l, s;
460
460
  e[0] !== n ? ({
@@ -466,7 +466,7 @@ const xe = 256, pe = (n) => {
466
466
  e[4] !== l ? (o = p("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-transparent", "enabled:cursor-pointer enabled:bg-transparent enabled:text-gray-1200 enabled:hover:bg-gray-300", "ox-gray-outset-focus disabled:ox-default-disabled", l), e[4] = l, e[5] = o) : o = e[5];
467
467
  let a;
468
468
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("button", { className: o, "data-ox-slot": "sidebar-menu-action", type: "button", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
469
- }, $e = (n) => {
469
+ }, Pe = (n) => {
470
470
  const e = g.c(5), {
471
471
  children: t,
472
472
  className: l
@@ -474,7 +474,7 @@ const xe = 256, pe = (n) => {
474
474
  let s;
475
475
  e[0] !== l ? (s = p("ml-auto", l), e[0] = l, e[1] = s) : s = e[1];
476
476
  let o;
477
- return e[2] !== t || e[3] !== s ? (o = /* @__PURE__ */ b(U, { className: s, "data-ox-slot": "sidebar-menu-badge", size: "sm", children: t }), e[2] = t, e[3] = s, e[4] = o) : o = e[4], o;
477
+ return e[2] !== t || e[3] !== s ? (o = /* @__PURE__ */ b(Z, { className: s, "data-ox-slot": "sidebar-menu-badge", size: "sm", children: t }), e[2] = t, e[3] = s, e[4] = o) : o = e[4], o;
478
478
  }, K = z(void 0), A = () => {
479
479
  const n = T(K);
480
480
  if (!n)
@@ -490,7 +490,7 @@ const xe = 256, pe = (n) => {
490
490
  e[0] !== t ? (o = p("shrink-0", t), e[0] = t, e[1] = o) : o = e[1];
491
491
  let a;
492
492
  return e[2] !== l || e[3] !== s || e[4] !== o ? (a = /* @__PURE__ */ b(L, { className: o, "data-ox-slot": "sidebar-menu-icon", path: l, placeholder: s, size: 0.8 }), e[2] = l, e[3] = s, e[4] = o, e[5] = a) : a = e[5], a;
493
- }, ke = (n) => "href" in n, J = "flex h-9 flex-1 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-left text-sm ox-gray-outset-focus", _e = (n) => {
493
+ }, Me = (n) => "href" in n, J = "flex h-9 flex-1 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-left text-sm ox-gray-outset-focus", Ie = (n) => {
494
494
  const e = g.c(23);
495
495
  let t, l, s, o, a, i;
496
496
  e[0] !== n ? ({
@@ -526,7 +526,7 @@ const xe = 256, pe = (n) => {
526
526
  const h = x, v = r ? "true" : void 0, S = r ? void 0 : s;
527
527
  let y;
528
528
  return e[16] !== t || e[17] !== h || e[18] !== m || e[19] !== a || e[20] !== v || e[21] !== S ? (y = /* @__PURE__ */ b("a", { "aria-disabled": v, className: m, "data-ox-slot": "sidebar-menu-button", href: S, onClick: h, ...a, children: t }), e[16] = t, e[17] = h, e[18] = m, e[19] = a, e[20] = v, e[21] = S, e[22] = y) : y = e[22], y;
529
- }, Pe = (n) => {
529
+ }, Ee = (n) => {
530
530
  const e = g.c(24);
531
531
  let t, l, s, o, a, i;
532
532
  e[0] !== n ? ({
@@ -557,25 +557,25 @@ const xe = 256, pe = (n) => {
557
557
  let S;
558
558
  e[13] !== d || e[14] !== f ? (S = d ? /* @__PURE__ */ b(q, { className: p("ml-auto transition-transform duration-200", {
559
559
  "rotate-180": f
560
- }), path: "mdiChevronDown" }) : null, e[13] = d, e[14] = f, e[15] = S) : S = e[15];
560
+ }), path: ee }) : null, e[13] = d, e[14] = f, e[15] = S) : S = e[15];
561
561
  let y;
562
562
  return e[16] !== x || e[17] !== t || e[18] !== r || e[19] !== v || e[20] !== o || e[21] !== S || e[22] !== c ? (y = /* @__PURE__ */ C("button", { className: x, "data-ox-slot": "sidebar-menu-button", disabled: r, type: c, onClick: v, ...o, children: [
563
563
  t,
564
564
  S
565
565
  ] }), e[16] = x, e[17] = t, e[18] = r, e[19] = v, e[20] = o, e[21] = S, e[22] = c, e[23] = y) : y = e[23], y;
566
- }, Me = (n) => {
566
+ }, Le = (n) => {
567
567
  const e = g.c(2);
568
568
  let t;
569
- return e[0] !== n ? (t = ke(n) ? /* @__PURE__ */ b(_e, { ...n }) : /* @__PURE__ */ b(Pe, { ...n }), e[0] = n, e[1] = t) : t = e[1], t;
569
+ return e[0] !== n ? (t = Me(n) ? /* @__PURE__ */ b(Ie, { ...n }) : /* @__PURE__ */ b(Ee, { ...n }), e[0] = n, e[1] = t) : t = e[1], t;
570
570
  };
571
- function Ie(n) {
571
+ function Be(n) {
572
572
  const e = g.c(7), {
573
573
  children: t,
574
574
  defaultOpen: l,
575
575
  hasSub: s
576
576
  } = n, o = l === void 0 ? !1 : l, a = s === void 0 ? !1 : s, [i, r] = E(o);
577
577
  let c;
578
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (c = () => r(Ee), e[0] = c) : c = e[0];
578
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (c = () => r(ze), e[0] = c) : c = e[0];
579
579
  const d = c;
580
580
  let f;
581
581
  e[1] !== a || e[2] !== i ? (f = {
@@ -587,10 +587,10 @@ function Ie(n) {
587
587
  let u;
588
588
  return e[4] !== t || e[5] !== f ? (u = /* @__PURE__ */ b(K.Provider, { value: f, children: t }), e[4] = t, e[5] = f, e[6] = u) : u = e[6], u;
589
589
  }
590
- function Ee(n) {
590
+ function ze(n) {
591
591
  return !n;
592
592
  }
593
- const Le = (n) => {
593
+ const Te = (n) => {
594
594
  const e = g.c(16);
595
595
  let t, l, s, o, a;
596
596
  e[0] !== n ? ({
@@ -606,14 +606,14 @@ const Le = (n) => {
606
606
  let d;
607
607
  e[8] !== t || e[9] !== s || e[10] !== c ? (d = /* @__PURE__ */ b("li", { className: c, "data-ox-slot": "sidebar-menu-item", ...s, children: t }), e[8] = t, e[9] = s, e[10] = c, e[11] = d) : d = e[11];
608
608
  let f;
609
- return e[12] !== i || e[13] !== r || e[14] !== d ? (f = /* @__PURE__ */ b(Ie, { defaultOpen: i, hasSub: r, children: d }), e[12] = i, e[13] = r, e[14] = d, e[15] = f) : f = e[15], f;
610
- }, Be = (n) => {
609
+ return e[12] !== i || e[13] !== r || e[14] !== d ? (f = /* @__PURE__ */ b(Be, { defaultOpen: i, hasSub: r, children: d }), e[12] = i, e[13] = r, e[14] = d, e[15] = f) : f = e[15], f;
610
+ }, He = (n) => {
611
611
  const e = g.c(2), {
612
612
  className: t
613
613
  } = n;
614
614
  let l;
615
- return e[0] !== t ? (l = /* @__PURE__ */ b(X, { className: t, "data-ox-slot": "sidebar-menu-skeleton", fullWidth: !0, height: 36 }), e[0] = t, e[1] = l) : l = e[1], l;
616
- }, ze = (n) => {
615
+ return e[0] !== t ? (l = /* @__PURE__ */ b(te, { className: t, "data-ox-slot": "sidebar-menu-skeleton", fullWidth: !0, height: 36 }), e[0] = t, e[1] = l) : l = e[1], l;
616
+ }, Ae = (n) => {
617
617
  const e = g.c(13);
618
618
  let t, l, s;
619
619
  e[0] !== n ? ({
@@ -630,7 +630,7 @@ const Le = (n) => {
630
630
  e[6] !== t || e[7] !== s || e[8] !== i ? (r = /* @__PURE__ */ b("ul", { className: i, "data-ox-slot": "sidebar-menu-sub", ...s, children: t }), e[6] = t, e[7] = s, e[8] = i, e[9] = r) : r = e[9];
631
631
  let c;
632
632
  return e[10] !== a || e[11] !== r ? (c = /* @__PURE__ */ b("div", { className: "ox-sidebar-submenu w-content grid w-full", "data-ox-slot": "sidebar-menu-sub-wrapper", "data-ox-state": a, children: r }), e[10] = a, e[11] = r, e[12] = c) : c = e[12], c;
633
- }, Te = (n) => {
633
+ }, De = (n) => {
634
634
  const e = g.c(16);
635
635
  let t, l, s, o;
636
636
  e[0] !== n ? ({
@@ -649,7 +649,7 @@ const Le = (n) => {
649
649
  }
650
650
  let r;
651
651
  return e[12] !== i || e[13] !== t || e[14] !== s ? (r = /* @__PURE__ */ b("button", { className: i, "data-ox-slot": "sidebar-menu-sub-button", type: "button", ...s, children: t }), e[12] = i, e[13] = t, e[14] = s, e[15] = r) : r = e[15], r;
652
- }, He = (n) => {
652
+ }, je = (n) => {
653
653
  const e = g.c(10);
654
654
  let t, l, s;
655
655
  e[0] !== n ? ({
@@ -661,7 +661,7 @@ const Le = (n) => {
661
661
  e[4] !== l ? (o = p("flex items-center gap-2", l), e[4] = l, e[5] = o) : o = e[5];
662
662
  let a;
663
663
  return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("li", { className: o, "data-ox-slot": "sidebar-menu-sub-item", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
664
- }, Ae = (n) => {
664
+ }, Ge = (n) => {
665
665
  const e = g.c(6);
666
666
  let t, l;
667
667
  e[0] !== n ? ({
@@ -669,8 +669,8 @@ const Le = (n) => {
669
669
  ...l
670
670
  } = n, e[0] = n, e[1] = t, e[2] = l) : (t = e[1], l = e[2]);
671
671
  let s;
672
- return e[3] !== t || e[4] !== l ? (s = /* @__PURE__ */ b(Z, { className: t, "data-ox-slot": "sidebar-separator", ...l }), e[3] = t, e[4] = l, e[5] = s) : s = e[5], s;
673
- }, De = (n) => {
672
+ return e[3] !== t || e[4] !== l ? (s = /* @__PURE__ */ b(le, { className: t, "data-ox-slot": "sidebar-separator", ...l }), e[3] = t, e[4] = l, e[5] = s) : s = e[5], s;
673
+ }, Re = (n) => {
674
674
  const e = g.c(12), {
675
675
  className: t,
676
676
  onClick: l
@@ -689,11 +689,11 @@ const Le = (n) => {
689
689
  }, t), e[4] = t, e[5] = r, e[6] = c) : c = e[6];
690
690
  const d = !r;
691
691
  let f;
692
- e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ b(L, { path: ee, size: 0.8 }), e[7] = f) : f = e[7];
692
+ e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ b(L, { path: se, size: 0.8 }), e[7] = f) : f = e[7];
693
693
  let u;
694
694
  return e[8] !== i || e[9] !== c || e[10] !== d ? (u = /* @__PURE__ */ b("button", { "aria-label": "Toggle sidebar", className: c, "data-ox-slot": "sidebar-trigger", disabled: d, type: "button", onClick: i, children: f }), e[8] = i, e[9] = c, e[10] = d, e[11] = u) : u = e[11], u;
695
695
  };
696
- function Je(n) {
696
+ function Xe(n) {
697
697
  const e = g.c(11), {
698
698
  children: t
699
699
  } = n, [l, s] = E(!1), [o, a] = E(!1);
@@ -716,7 +716,7 @@ function Je(n) {
716
716
  const u = f;
717
717
  let m;
718
718
  e[4] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
719
- s(je);
719
+ s(We);
720
720
  }, e[4] = m) : m = e[4];
721
721
  const x = m;
722
722
  let h;
@@ -730,36 +730,36 @@ function Je(n) {
730
730
  let v;
731
731
  return e[8] !== t || e[9] !== h ? (v = /* @__PURE__ */ b(V.Provider, { value: h, children: t }), e[8] = t, e[9] = h, e[10] = v) : v = e[10], v;
732
732
  }
733
- function je(n) {
733
+ function We(n) {
734
734
  return !n;
735
735
  }
736
- const _ = pe, O = Ce, D = ve;
737
- _.Header = Oe;
738
- _.Content = he;
739
- _.Footer = ge;
740
- _.Separator = Ae;
741
- _.Trigger = De;
742
- O.Item = Le;
743
- O.Button = Me;
736
+ const _ = ve, O = ke, D = Ne;
737
+ _.Header = $e;
738
+ _.Content = Se;
739
+ _.Footer = ye;
740
+ _.Separator = Ge;
741
+ _.Trigger = Re;
742
+ O.Item = Te;
743
+ O.Button = Le;
744
744
  O.Icon = q;
745
- O.Badge = $e;
746
- O.Action = we;
747
- O.Skeleton = Be;
748
- O.Sub = ze;
749
- O.SubItem = He;
750
- O.SubButton = Te;
751
- D.Label = Ne;
752
- D.Action = Se;
753
- D.Content = ye;
745
+ O.Badge = Pe;
746
+ O.Action = _e;
747
+ O.Skeleton = He;
748
+ O.Sub = Ae;
749
+ O.SubItem = je;
750
+ O.SubButton = De;
751
+ D.Label = we;
752
+ D.Action = Oe;
753
+ D.Content = Ce;
754
754
  export {
755
- Ke as OxAppLayout,
756
- Fe as OxLegacyHeader,
757
- Ve as OxLegacyMainContent,
755
+ Qe as OxAppLayout,
756
+ qe as OxLegacyHeader,
757
+ Je as OxLegacyMainContent,
758
758
  w as OxLegacySidebar,
759
- qe as OxMainContent,
759
+ Ue as OxMainContent,
760
760
  _ as OxSidebar,
761
761
  D as OxSidebarGroup,
762
762
  O as OxSidebarMenu,
763
- Je as OxSidebarProvider,
763
+ Xe as OxSidebarProvider,
764
764
  H as useOxSidebar
765
765
  };
package/dist/onyx.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunks/ui-9efLp51u.js");exports.OxAccordion=x.OxAccordion;exports.OxAlert=x.OxAlert;exports.OxAvatar=x.OxAvatar;exports.OxBadge=x.OxBadge;exports.OxBreadcrumb=x.OxBreadcrumb;exports.OxButton=x.OxButton;exports.OxCalendar=x.OxCalendar;exports.OxCard=x.OxCard;exports.OxCheckbox=x.OxCheckbox;exports.OxDateInput=x.OxDateInput;exports.OxDescription=x.OxDescription;exports.OxDescriptionList=x.OxDescriptionList;exports.OxDialog=x.OxDialog;exports.OxDrawer=x.OxDrawer;exports.OxDropdown=x.OxDropdown;exports.OxError=x.OxError;exports.OxFileUpload=x.OxFileUpload;exports.OxFloating=x.OxFloating;exports.OxFloatingContext=x.OxFloatingContext;exports.OxForm=x.OxForm;exports.OxHeading=x.OxHeading;exports.OxIcon=x.OxIcon;exports.OxJsonField=x.OxJsonField;exports.OxLabel=x.OxLabel;exports.OxLegend=x.OxLegend;exports.OxLink=x.OxLink;exports.OxNotifications=x.OxNotifications;exports.OxNumberInput=x.OxNumberInput;exports.OxOtpInput=x.OxOtpInput;exports.OxPagination=x.OxPagination;exports.OxPopover=x.OxPopover;exports.OxProgress=x.OxProgress;exports.OxRadio=x.OxRadio;exports.OxSelect=x.OxSelect;exports.OxSeparator=x.OxSeparator;exports.OxSkeleton=x.OxSkeleton;exports.OxSkeletonText=x.OxSkeletonText;exports.OxSlider=x.OxSlider;exports.OxSpinner=x.OxSpinner;exports.OxStatusDisplay=x.OxStatusDisplay;exports.OxStepper=x.OxStepper;exports.OxSwitch=x.OxSwitch;exports.OxTable=x.OxTable;exports.OxTabs=x.OxTabs;exports.OxTextInput=x.OxTextInput;exports.OxTextarea=x.OxTextarea;exports.OxTimeInput=x.OxTimeInput;exports.OxTimeline=x.OxTimeline;exports.OxToast=x.OxToast;exports.OxToastProvider=x.OxToastProvider;exports.OxToggle=x.OxToggle;exports.OxTooltip=x.OxTooltip;exports.useOxFloatingContext=x.useOxFloatingContext;exports.useOxToast=x.useOxToast;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunks/ui-DmUf2PZA.js");exports.OxAccordion=x.OxAccordion;exports.OxAlert=x.OxAlert;exports.OxAvatar=x.OxAvatar;exports.OxBadge=x.OxBadge;exports.OxBreadcrumb=x.OxBreadcrumb;exports.OxButton=x.OxButton;exports.OxCalendar=x.OxCalendar;exports.OxCard=x.OxCard;exports.OxCheckbox=x.OxCheckbox;exports.OxDateInput=x.OxDateInput;exports.OxDescription=x.OxDescription;exports.OxDescriptionList=x.OxDescriptionList;exports.OxDialog=x.OxDialog;exports.OxDrawer=x.OxDrawer;exports.OxDropdown=x.OxDropdown;exports.OxError=x.OxError;exports.OxFileUpload=x.OxFileUpload;exports.OxFloating=x.OxFloating;exports.OxFloatingContext=x.OxFloatingContext;exports.OxForm=x.OxForm;exports.OxHeading=x.OxHeading;exports.OxIcon=x.OxIcon;exports.OxJsonField=x.OxJsonField;exports.OxLabel=x.OxLabel;exports.OxLegend=x.OxLegend;exports.OxLink=x.OxLink;exports.OxNotifications=x.OxNotifications;exports.OxNumberInput=x.OxNumberInput;exports.OxOtpInput=x.OxOtpInput;exports.OxPagination=x.OxPagination;exports.OxPopover=x.OxPopover;exports.OxProgress=x.OxProgress;exports.OxRadio=x.OxRadio;exports.OxSelect=x.OxSelect;exports.OxSeparator=x.OxSeparator;exports.OxSkeleton=x.OxSkeleton;exports.OxSkeletonText=x.OxSkeletonText;exports.OxSlider=x.OxSlider;exports.OxSpinner=x.OxSpinner;exports.OxStatusDisplay=x.OxStatusDisplay;exports.OxStepper=x.OxStepper;exports.OxSwitch=x.OxSwitch;exports.OxTable=x.OxTable;exports.OxTabs=x.OxTabs;exports.OxTextInput=x.OxTextInput;exports.OxTextarea=x.OxTextarea;exports.OxTimeInput=x.OxTimeInput;exports.OxTimeline=x.OxTimeline;exports.OxToast=x.OxToast;exports.OxToastProvider=x.OxToastProvider;exports.OxToggle=x.OxToggle;exports.OxTooltip=x.OxTooltip;exports.useOxFloatingContext=x.useOxFloatingContext;exports.useOxToast=x.useOxToast;
package/dist/onyx.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { O as x, a as O, b as e, c as t, d as o, e as r, f as i, g as n, K as l, N as p, X as d, h as T, p as g, i as u, j as c, Y as S, L as D, k as b, l as m, M as F, Z as I, m as C, n as k, _ as L, $ as P, o as v, q as w, P as A, Q as B, r as f, s as h, t as N, T as y, U as E, v as H, w as J, x as R, y as U, z as j, A as q, B as z, V as G, C as K, D as M, R as Q, W as V, S as W, E as X, H as Y, F as Z, I as _, J as $, u as aa, G as sa } from "./chunks/ui-CbFPvWIc.js";
1
+ import { O as x, a as O, b as e, c as t, d as o, e as r, f as i, g as n, K as l, N as p, X as d, h as T, p as g, i as u, j as c, Y as S, L as D, k as b, l as m, M as F, Z as I, m as C, n as k, _ as L, $ as P, o as v, q as w, P as A, Q as B, r as f, s as h, t as N, T as y, U as E, v as H, w as J, x as R, y as U, z as j, A as q, B as z, V as G, C as K, D as M, R as Q, W as V, S as W, E as X, H as Y, F as Z, I as _, J as $, u as aa, G as sa } from "./chunks/ui-ULvcrJjV.js";
2
2
  export {
3
3
  x as OxAccordion,
4
4
  O as OxAlert,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../chunks/ui-9efLp51u.js"),s=require("react/jsx-runtime"),H=require("../chunks/hooks-UiKjBucd.js"),X=require("@apollo/client");require("react");const Y=require("../chunks/query-CIsrxNi-.js"),Z=X.gql`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../chunks/ui-DmUf2PZA.js"),s=require("react/jsx-runtime"),H=require("../chunks/hooks-UiKjBucd.js"),X=require("@apollo/client");require("react");const Y=require("../chunks/query-CIsrxNi-.js"),Z=X.gql`
2
2
  mutation Login($input: LoginInput!) {
3
3
  login(input: $input) {
4
4
  success
@@ -10,4 +10,4 @@
10
10
  }
11
11
  }
12
12
  }
13
- `,ee=$=>{const e=H.compilerRuntimeExports.c(70);let l,o,a,E,v,I,S;e[0]!==$?({cacheQuery:E,className:l,mutation:v,onSubmit:o,subtitle:I,title:S,...a}=$,e[0]=$,e[1]=l,e[2]=o,e[3]=a,e[4]=E,e[5]=v,e[6]=I,e[7]=S):(l=e[1],o=e[2],a=e[3],E=e[4],v=e[5],I=e[6],S=e[7]);const B=E===void 0?Y.DEFAULT_GET_CURRENT_USER:E,M=v===void 0?Z:v,_=I===void 0?"":I,z=S===void 0?"noxickon":S;let q,T;e[8]===Symbol.for("react.memo_cache_sentinel")?(q={username:"",password:""},T={username:["required"],password:["required"]},e[8]=q,e[9]=T):(q=e[8],T=e[9]);let c;e[10]!==B?(c={update:(r,n)=>{const{data:W}=n;W?.login.success&&r.writeQuery({query:B,data:{me:W.login.me}})}},e[10]=B,e[11]=c):c=e[11];let N;e[12]!==M||e[13]!==c?(N={initialData:q,validationRules:T,operation:M,options:c},e[12]=M,e[13]=c,e[14]=N):N=e[14];const t=H.useForm(N);let C;e[15]!==t||e[16]!==o?(C=async r=>{r.preventDefault(),t.submit({onError:n=>{i.handleGraphQLFormErrors(n,t)},onSuccess:n=>{n.data&&n.data.login.success?o?.(n):console.error("Login failed: Invalid credentials")}})},e[15]=t,e[16]=o,e[17]=C):C=e[17];const P=C;let d;e[18]!==l?(d=i.cn("w-80",l),e[18]=l,e[19]=d):d=e[19];let u;e[20]!==z?(u=s.jsx("h1",{className:"px-2 font-mono text-2xl text-gray-1200",children:z}),e[20]=z,e[21]=u):u=e[21];let m;e[22]!==_?(m=_?s.jsx("p",{className:"px-2 py-1 font-mono text-xs",children:_}):null,e[22]=_,e[23]=m):m=e[23];let x;e[24]!==u||e[25]!==m?(x=s.jsxs("div",{className:"mb-4 text-center",children:[u,m]}),e[24]=u,e[25]=m,e[26]=x):x=e[26];let F;e[27]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(i.OxLabel,{children:"username"}),e[27]=F):F=e[27];const J=t.isLoading;let p;e[28]!==t?(p=t.hasError("username"),e[28]=t,e[29]=p):p=e[29];let f;e[30]!==t?(f=r=>t.setData("username",r),e[30]=t,e[31]=f):f=e[31];let R,D;e[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(i.OxTextInput.Icon,{path:"mdiAccount"}),D=s.jsx(i.OxTextInput,{autoComplete:"off",name:"username",placeholder:"Enter your username"}),e[32]=R,e[33]=D):(R=e[32],D=e[33]);let h;e[34]!==t.data.username||e[35]!==t.isLoading||e[36]!==p||e[37]!==f?(h=s.jsxs(i.OxForm.Field,{children:[F,s.jsxs(i.OxTextInput.Container,{disabled:J,error:p,required:!0,value:t.data.username,onChange:f,children:[R,D]})]}),e[34]=t.data.username,e[35]=t.isLoading,e[36]=p,e[37]=f,e[38]=h):h=e[38];let A;e[39]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(i.OxLabel,{children:"password"}),e[39]=A):A=e[39];const K=t.isLoading;let g;e[40]!==t?(g=t.hasError("password"),e[40]=t,e[41]=g):g=e[41];let y;e[42]!==t?(y=r=>t.setData("password",r),e[42]=t,e[43]=y):y=e[43];let Q,U,k;e[44]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(i.OxTextInput.Icon,{path:"mdiLockOutline"}),U=s.jsx(i.OxTextInput,{autoComplete:"off",name:"password",placeholder:"Enter your password"}),k=s.jsx(i.OxTextInput.VisibilityButton,{}),e[44]=Q,e[45]=U,e[46]=k):(Q=e[44],U=e[45],k=e[46]);let b;e[47]!==t.data.password||e[48]!==t.isLoading||e[49]!==g||e[50]!==y?(b=s.jsxs(i.OxForm.Field,{children:[A,s.jsxs(i.OxTextInput.Container,{disabled:K,error:g,required:!0,type:"password",value:t.data.password,onChange:y,children:[Q,U,k]})]}),e[47]=t.data.password,e[48]=t.isLoading,e[49]=g,e[50]=y,e[51]=b):b=e[51];let L;e[52]!==t.hasErrors?(L=t.hasErrors?s.jsx(i.OxError,{icon:"mdiAlertCircleOutline",children:"username or password is wrong"}):null,e[52]=t.hasErrors,e[53]=L):L=e[53];const V=t.isLoading?"Signing in...":"Sign In";let j;e[54]!==t.isLoading||e[55]!==V?(j=s.jsx(i.OxButton,{disabled:t.isLoading,fullWidth:!0,isLoading:t.isLoading,size:"sm",type:"submit",variant:"primary",children:V}),e[54]=t.isLoading,e[55]=V,e[56]=j):j=e[56];let O;e[57]!==P||e[58]!==h||e[59]!==b||e[60]!==L||e[61]!==j?(O=s.jsxs(i.OxForm,{className:"space-y-6",onSubmit:P,children:[h,b,L,j]}),e[57]=P,e[58]=h,e[59]=b,e[60]=L,e[61]=j,e[62]=O):O=e[62];let w;e[63]!==x||e[64]!==O?(w=s.jsxs("div",{className:"ox-gray-border rounded-lg bg-gray-50 p-6",children:[x,O]}),e[63]=x,e[64]=O,e[65]=w):w=e[65];let G;return e[66]!==a||e[67]!==d||e[68]!==w?(G=s.jsx("div",{className:d,...a,children:w}),e[66]=a,e[67]=d,e[68]=w,e[69]=G):G=e[69],G};exports.OxLogin=ee;
13
+ `,ee=$=>{const e=H.compilerRuntimeExports.c(70);let o,l,a,E,v,I,S;e[0]!==$?({cacheQuery:E,className:o,mutation:v,onSubmit:l,subtitle:I,title:S,...a}=$,e[0]=$,e[1]=o,e[2]=l,e[3]=a,e[4]=E,e[5]=v,e[6]=I,e[7]=S):(o=e[1],l=e[2],a=e[3],E=e[4],v=e[5],I=e[6],S=e[7]);const B=E===void 0?Y.DEFAULT_GET_CURRENT_USER:E,M=v===void 0?Z:v,_=I===void 0?"":I,z=S===void 0?"noxickon":S;let q,T;e[8]===Symbol.for("react.memo_cache_sentinel")?(q={username:"",password:""},T={username:["required"],password:["required"]},e[8]=q,e[9]=T):(q=e[8],T=e[9]);let c;e[10]!==B?(c={update:(r,n)=>{const{data:W}=n;W?.login.success&&r.writeQuery({query:B,data:{me:W.login.me}})}},e[10]=B,e[11]=c):c=e[11];let N;e[12]!==M||e[13]!==c?(N={initialData:q,validationRules:T,operation:M,options:c},e[12]=M,e[13]=c,e[14]=N):N=e[14];const t=H.useForm(N);let F;e[15]!==t||e[16]!==l?(F=async r=>{r.preventDefault(),t.submit({onError:n=>{i.handleGraphQLFormErrors(n,t)},onSuccess:n=>{n.data&&n.data.login.success?l?.(n):console.error("Login failed: Invalid credentials")}})},e[15]=t,e[16]=l,e[17]=F):F=e[17];const P=F;let d;e[18]!==o?(d=i.cn("w-80",o),e[18]=o,e[19]=d):d=e[19];let u;e[20]!==z?(u=s.jsx("h1",{className:"px-2 font-mono text-2xl text-gray-1200",children:z}),e[20]=z,e[21]=u):u=e[21];let m;e[22]!==_?(m=_?s.jsx("p",{className:"px-2 py-1 font-mono text-xs",children:_}):null,e[22]=_,e[23]=m):m=e[23];let x;e[24]!==u||e[25]!==m?(x=s.jsxs("div",{className:"mb-4 text-center",children:[u,m]}),e[24]=u,e[25]=m,e[26]=x):x=e[26];let C;e[27]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(i.OxLabel,{children:"username"}),e[27]=C):C=e[27];const J=t.isLoading;let p;e[28]!==t?(p=t.hasError("username"),e[28]=t,e[29]=p):p=e[29];let f;e[30]!==t?(f=r=>t.setData("username",r),e[30]=t,e[31]=f):f=e[31];let R,D;e[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(i.OxTextInput.Icon,{path:i.mdiAccount}),D=s.jsx(i.OxTextInput,{autoComplete:"off",name:"username",placeholder:"Enter your username"}),e[32]=R,e[33]=D):(R=e[32],D=e[33]);let h;e[34]!==t.data.username||e[35]!==t.isLoading||e[36]!==p||e[37]!==f?(h=s.jsxs(i.OxForm.Field,{children:[C,s.jsxs(i.OxTextInput.Container,{disabled:J,error:p,required:!0,value:t.data.username,onChange:f,children:[R,D]})]}),e[34]=t.data.username,e[35]=t.isLoading,e[36]=p,e[37]=f,e[38]=h):h=e[38];let Q;e[39]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(i.OxLabel,{children:"password"}),e[39]=Q):Q=e[39];const K=t.isLoading;let g;e[40]!==t?(g=t.hasError("password"),e[40]=t,e[41]=g):g=e[41];let y;e[42]!==t?(y=r=>t.setData("password",r),e[42]=t,e[43]=y):y=e[43];let U,k,A;e[44]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(i.OxTextInput.Icon,{path:i.mdiLockOutline}),k=s.jsx(i.OxTextInput,{autoComplete:"off",name:"password",placeholder:"Enter your password"}),A=s.jsx(i.OxTextInput.VisibilityButton,{}),e[44]=U,e[45]=k,e[46]=A):(U=e[44],k=e[45],A=e[46]);let b;e[47]!==t.data.password||e[48]!==t.isLoading||e[49]!==g||e[50]!==y?(b=s.jsxs(i.OxForm.Field,{children:[Q,s.jsxs(i.OxTextInput.Container,{disabled:K,error:g,required:!0,type:"password",value:t.data.password,onChange:y,children:[U,k,A]})]}),e[47]=t.data.password,e[48]=t.isLoading,e[49]=g,e[50]=y,e[51]=b):b=e[51];let L;e[52]!==t.hasErrors?(L=t.hasErrors?s.jsx(i.OxError,{children:"username or password is wrong"}):null,e[52]=t.hasErrors,e[53]=L):L=e[53];const V=t.isLoading?"Signing in...":"Sign In";let j;e[54]!==t.isLoading||e[55]!==V?(j=s.jsx(i.OxButton,{disabled:t.isLoading,fullWidth:!0,isLoading:t.isLoading,size:"sm",type:"submit",variant:"primary",children:V}),e[54]=t.isLoading,e[55]=V,e[56]=j):j=e[56];let O;e[57]!==P||e[58]!==h||e[59]!==b||e[60]!==L||e[61]!==j?(O=s.jsxs(i.OxForm,{className:"space-y-6",onSubmit:P,children:[h,b,L,j]}),e[57]=P,e[58]=h,e[59]=b,e[60]=L,e[61]=j,e[62]=O):O=e[62];let w;e[63]!==x||e[64]!==O?(w=s.jsxs("div",{className:"ox-gray-border rounded-lg bg-gray-50 p-6",children:[x,O]}),e[63]=x,e[64]=O,e[65]=w):w=e[65];let G;return e[66]!==a||e[67]!==d||e[68]!==w?(G=s.jsx("div",{className:d,...a,children:w}),e[66]=a,e[67]=d,e[68]=w,e[69]=G):G=e[69],G};exports.OxLogin=ee;