@noxickon/onyx 4.0.1 → 4.0.2
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/pages/pages.cjs.js +1 -1
- package/dist/pages/pages.es.js +54 -54
- package/package.json +1 -1
package/dist/pages/pages.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/ui-B0Ma5GdK.js"),s=require("react/jsx-runtime"),Q=require("../chunks/hooks-CNgb50x1.js");require("react");const X=require("lucide-react"),se=Y=>{const e=Q.compilerRuntimeExports.c(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/ui-B0Ma5GdK.js"),s=require("react/jsx-runtime"),Q=require("../chunks/hooks-CNgb50x1.js");require("react");const X=require("lucide-react"),se=Y=>{const e=Q.compilerRuntimeExports.c(65),{className:Z,error:a,isLoading:V,loadingLabel:W,onSubmit:N,passwordLabel:$,passwordPlaceholder:z,submitLabel:A,subtitle:G,title:H,usernameLabel:J,usernamePlaceholder:K}=Y,r=V===void 0?!1:V,ee=W===void 0?"Signing in...":W,T=$===void 0?"password":$,P=z===void 0?"Enter your password":z,te=A===void 0?"Sign In":A,S=G===void 0?"":G,D=H===void 0?"noxickon":H,R=J===void 0?"username":J,k=K===void 0?"Enter your username":K;let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q={initialData:{password:"",username:""},validationRules:{password:["required"],username:["required"]}},e[0]=q):q=e[0];const t=Q.useFormState(q);let I;e[1]!==t||e[2]!==N?(I=async y=>{y.preventDefault(),t.validate()&&await N(t.data)},e[1]=t,e[2]=N,e[3]=I):I=e[3];const B=I,M=Z??"w-80";let o;e[4]!==D?(o=s.jsx("h1",{className:"px-2 font-mono text-2xl text-foreground",children:D}),e[4]=D,e[5]=o):o=e[5];let i;e[6]!==S?(i=S?s.jsx("p",{className:"px-2 py-1 font-mono text-xs text-muted-foreground",children:S}):null,e[6]=S,e[7]=i):i=e[7];let n;e[8]!==o||e[9]!==i?(n=s.jsxs("div",{className:"mb-4 text-center",children:[o,i]}),e[8]=o,e[9]=i,e[10]=n):n=e[10];let d;e[11]!==R?(d=s.jsx(l.OxLabel,{children:R}),e[11]=R,e[12]=d):d=e[12];let c;e[13]!==a||e[14]!==t?(c=t.hasError("username")||!!a,e[13]=a,e[14]=t,e[15]=c):c=e[15];let u;e[16]!==t?(u=y=>t.setData("username",y),e[16]=t,e[17]=u):u=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(l.OxIcon,{icon:X.User}),e[18]=_):_=e[18];let m;e[19]!==k?(m=s.jsx(l.OxTextInput,{autoComplete:"off",name:"username",placeholder:k}),e[19]=k,e[20]=m):m=e[20];let x;e[21]!==t.data.username||e[22]!==c||e[23]!==u||e[24]!==m?(x=s.jsxs(l.OxTextInput.Container,{error:c,value:t.data.username,onChange:u,children:[_,m]}),e[21]=t.data.username,e[22]=c,e[23]=u,e[24]=m,e[25]=x):x=e[25];let f;e[26]!==r||e[27]!==d||e[28]!==x?(f=s.jsxs(l.OxForm.Field,{disabled:r,required:!0,children:[d,x]}),e[26]=r,e[27]=d,e[28]=x,e[29]=f):f=e[29];let p;e[30]!==T?(p=s.jsx(l.OxLabel,{children:T}),e[30]=T,e[31]=p):p=e[31];let h;e[32]!==a||e[33]!==t?(h=t.hasError("password")||!!a,e[32]=a,e[33]=t,e[34]=h):h=e[34];let b;e[35]!==t?(b=y=>t.setData("password",y),e[35]=t,e[36]=b):b=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(l.OxIcon,{icon:X.Lock}),e[37]=C):C=e[37];let j;e[38]!==P?(j=s.jsx(l.OxTextInput,{autoComplete:"off",name:"password",placeholder:P}),e[38]=P,e[39]=j):j=e[39];let E;e[40]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(l.OxTextInput.VisibilityButton,{}),e[40]=E):E=e[40];let O;e[41]!==t.data.password||e[42]!==h||e[43]!==b||e[44]!==j?(O=s.jsxs(l.OxTextInput.Container,{error:h,type:"password",value:t.data.password,onChange:b,children:[C,j,E]}),e[41]=t.data.password,e[42]=h,e[43]=b,e[44]=j,e[45]=O):O=e[45];let v;e[46]!==r||e[47]!==p||e[48]!==O?(v=s.jsxs(l.OxForm.Field,{disabled:r,required:!0,children:[p,O]}),e[46]=r,e[47]=p,e[48]=O,e[49]=v):v=e[49];let w;e[50]!==a?(w=a?s.jsx(l.OxError,{children:a}):null,e[50]=a,e[51]=w):w=e[51];const U=r?ee:te;let g;e[52]!==r||e[53]!==U?(g=s.jsx(l.OxButton,{disabled:r,fullWidth:!0,isLoading:r,type:"submit",variant:"gradient",children:U}),e[52]=r,e[53]=U,e[54]=g):g=e[54];let L;e[55]!==B||e[56]!==f||e[57]!==v||e[58]!==w||e[59]!==g?(L=s.jsxs(l.OxForm,{className:"space-y-6",onSubmit:B,children:[f,v,w,g]}),e[55]=B,e[56]=f,e[57]=v,e[58]=w,e[59]=g,e[60]=L):L=e[60];let F;return e[61]!==M||e[62]!==n||e[63]!==L?(F=s.jsxs(l.OxCard,{className:M,children:[n,L]}),e[61]=M,e[62]=n,e[63]=L,e[64]=F):F=e[64],F};exports.OxLogin=se;
|
package/dist/pages/pages.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a4 as
|
|
2
|
-
import { jsxs as
|
|
1
|
+
import { a4 as _, a0 as W, ad as Y, r as Z, ab as le, g as re, i as oe } from "../chunks/ui-DrKTwQ0M.js";
|
|
2
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { d as ie, z as ne } from "../chunks/hooks-6tQOArBm.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { User as de, Lock as ce } from "lucide-react";
|
|
6
6
|
const be = (ee) => {
|
|
7
|
-
const e = ie.c(
|
|
7
|
+
const e = ie.c(65), {
|
|
8
8
|
className: te,
|
|
9
|
-
error:
|
|
9
|
+
error: l,
|
|
10
10
|
isLoading: $,
|
|
11
11
|
loadingLabel: A,
|
|
12
12
|
onSubmit: I,
|
|
@@ -31,79 +31,79 @@ const be = (ee) => {
|
|
|
31
31
|
}, e[0] = E) : E = e[0];
|
|
32
32
|
const t = ne(E);
|
|
33
33
|
let N;
|
|
34
|
-
e[1] !== t || e[2] !== I ? (N = async (
|
|
35
|
-
|
|
34
|
+
e[1] !== t || e[2] !== I ? (N = async (O) => {
|
|
35
|
+
O.preventDefault(), t.validate() && await I(t.data);
|
|
36
36
|
}, e[1] = t, e[2] = I, e[3] = N) : N = e[3];
|
|
37
37
|
const T = N, U = te ?? "w-80";
|
|
38
|
-
let r;
|
|
39
|
-
e[4] !== B ? (r = /* @__PURE__ */ a("h1", { className: "px-2 font-mono text-2xl text-foreground", children: B }), e[4] = B, e[5] = r) : r = e[5];
|
|
40
38
|
let o;
|
|
41
|
-
e[
|
|
39
|
+
e[4] !== B ? (o = /* @__PURE__ */ a("h1", { className: "px-2 font-mono text-2xl text-foreground", children: B }), e[4] = B, e[5] = o) : o = e[5];
|
|
42
40
|
let i;
|
|
43
|
-
e[
|
|
44
|
-
r,
|
|
45
|
-
o
|
|
46
|
-
] }), e[8] = r, e[9] = o, e[10] = i) : i = e[10];
|
|
41
|
+
e[6] !== C ? (i = C ? /* @__PURE__ */ a("p", { className: "px-2 py-1 font-mono text-xs text-muted-foreground", children: C }) : null, e[6] = C, e[7] = i) : i = e[7];
|
|
47
42
|
let n;
|
|
48
|
-
e[
|
|
43
|
+
e[8] !== o || e[9] !== i ? (n = /* @__PURE__ */ r("div", { className: "mb-4 text-center", children: [
|
|
44
|
+
o,
|
|
45
|
+
i
|
|
46
|
+
] }), e[8] = o, e[9] = i, e[10] = n) : n = e[10];
|
|
49
47
|
let d;
|
|
50
|
-
e[
|
|
48
|
+
e[11] !== R ? (d = /* @__PURE__ */ a(Y, { children: R }), e[11] = R, e[12] = d) : d = e[12];
|
|
51
49
|
let c;
|
|
52
|
-
e[
|
|
53
|
-
let q;
|
|
54
|
-
e[17] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ a(Z, { icon: de }), e[17] = q) : q = e[17];
|
|
50
|
+
e[13] !== l || e[14] !== t ? (c = t.hasError("username") || !!l, e[13] = l, e[14] = t, e[15] = c) : c = e[15];
|
|
55
51
|
let m;
|
|
56
|
-
e[
|
|
52
|
+
e[16] !== t ? (m = (O) => t.setData("username", O), e[16] = t, e[17] = m) : m = e[17];
|
|
53
|
+
let q;
|
|
54
|
+
e[18] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ a(Z, { icon: de }), e[18] = q) : q = e[18];
|
|
57
55
|
let u;
|
|
58
|
-
e[
|
|
59
|
-
q,
|
|
60
|
-
m
|
|
61
|
-
] }), e[20] = t.data.username, e[21] = d, e[22] = c, e[23] = m, e[24] = u) : u = e[24];
|
|
56
|
+
e[19] !== z ? (u = /* @__PURE__ */ a(_, { autoComplete: "off", name: "username", placeholder: z }), e[19] = z, e[20] = u) : u = e[20];
|
|
62
57
|
let f;
|
|
63
|
-
e[
|
|
64
|
-
|
|
58
|
+
e[21] !== t.data.username || e[22] !== c || e[23] !== m || e[24] !== u ? (f = /* @__PURE__ */ r(_.Container, { error: c, value: t.data.username, onChange: m, children: [
|
|
59
|
+
q,
|
|
65
60
|
u
|
|
66
|
-
] }), e[
|
|
61
|
+
] }), e[21] = t.data.username, e[22] = c, e[23] = m, e[24] = u, e[25] = f) : f = e[25];
|
|
67
62
|
let p;
|
|
68
|
-
e[
|
|
63
|
+
e[26] !== s || e[27] !== d || e[28] !== f ? (p = /* @__PURE__ */ r(W.Field, { disabled: s, required: !0, children: [
|
|
64
|
+
d,
|
|
65
|
+
f
|
|
66
|
+
] }), e[26] = s, e[27] = d, e[28] = f, e[29] = p) : p = e[29];
|
|
69
67
|
let h;
|
|
70
|
-
e[
|
|
68
|
+
e[30] !== j ? (h = /* @__PURE__ */ a(Y, { children: j }), e[30] = j, e[31] = h) : h = e[31];
|
|
71
69
|
let b;
|
|
72
|
-
e[33] !== t ? (b =
|
|
73
|
-
let D;
|
|
74
|
-
e[35] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ a(Z, { icon: ce }), e[35] = D) : D = e[35];
|
|
70
|
+
e[32] !== l || e[33] !== t ? (b = t.hasError("password") || !!l, e[32] = l, e[33] = t, e[34] = b) : b = e[34];
|
|
75
71
|
let x;
|
|
76
|
-
e[
|
|
77
|
-
let
|
|
78
|
-
e[
|
|
72
|
+
e[35] !== t ? (x = (O) => t.setData("password", O), e[35] = t, e[36] = x) : x = e[36];
|
|
73
|
+
let D;
|
|
74
|
+
e[37] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ a(Z, { icon: ce }), e[37] = D) : D = e[37];
|
|
79
75
|
let w;
|
|
80
|
-
e[
|
|
76
|
+
e[38] !== k ? (w = /* @__PURE__ */ a(_, { autoComplete: "off", name: "password", placeholder: k }), e[38] = k, e[39] = w) : w = e[39];
|
|
77
|
+
let F;
|
|
78
|
+
e[40] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ a(_.VisibilityButton, {}), e[40] = F) : F = e[40];
|
|
79
|
+
let v;
|
|
80
|
+
e[41] !== t.data.password || e[42] !== b || e[43] !== x || e[44] !== w ? (v = /* @__PURE__ */ r(_.Container, { error: b, type: "password", value: t.data.password, onChange: x, children: [
|
|
81
81
|
D,
|
|
82
|
-
|
|
82
|
+
w,
|
|
83
83
|
F
|
|
84
|
-
] }), e[
|
|
85
|
-
let v;
|
|
86
|
-
e[44] !== s || e[45] !== p || e[46] !== w ? (v = /* @__PURE__ */ l(W.Field, { disabled: s, required: !0, children: [
|
|
87
|
-
p,
|
|
88
|
-
w
|
|
89
|
-
] }), e[44] = s, e[45] = p, e[46] = w, e[47] = v) : v = e[47];
|
|
84
|
+
] }), e[41] = t.data.password, e[42] = b, e[43] = x, e[44] = w, e[45] = v) : v = e[45];
|
|
90
85
|
let g;
|
|
91
|
-
e[48] !==
|
|
92
|
-
|
|
86
|
+
e[46] !== s || e[47] !== h || e[48] !== v ? (g = /* @__PURE__ */ r(W.Field, { disabled: s, required: !0, children: [
|
|
87
|
+
h,
|
|
88
|
+
v
|
|
89
|
+
] }), e[46] = s, e[47] = h, e[48] = v, e[49] = g) : g = e[49];
|
|
93
90
|
let L;
|
|
94
|
-
e[50] !==
|
|
91
|
+
e[50] !== l ? (L = l ? /* @__PURE__ */ a(le, { children: l }) : null, e[50] = l, e[51] = L) : L = e[51];
|
|
92
|
+
const V = s ? se : ae;
|
|
95
93
|
let y;
|
|
96
|
-
e[
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
e[52] !== s || e[53] !== V ? (y = /* @__PURE__ */ a(re, { disabled: s, fullWidth: !0, isLoading: s, type: "submit", variant: "gradient", children: V }), e[52] = s, e[53] = V, e[54] = y) : y = e[54];
|
|
95
|
+
let S;
|
|
96
|
+
e[55] !== T || e[56] !== p || e[57] !== g || e[58] !== L || e[59] !== y ? (S = /* @__PURE__ */ r(W, { className: "space-y-6", onSubmit: T, children: [
|
|
97
|
+
p,
|
|
99
98
|
g,
|
|
100
|
-
L
|
|
101
|
-
] }), e[53] = T, e[54] = f, e[55] = v, e[56] = g, e[57] = L, e[58] = y) : y = e[58];
|
|
102
|
-
let P;
|
|
103
|
-
return e[59] !== U || e[60] !== i || e[61] !== y ? (P = /* @__PURE__ */ l(oe, { className: U, children: [
|
|
104
|
-
i,
|
|
99
|
+
L,
|
|
105
100
|
y
|
|
106
|
-
] }), e[
|
|
101
|
+
] }), e[55] = T, e[56] = p, e[57] = g, e[58] = L, e[59] = y, e[60] = S) : S = e[60];
|
|
102
|
+
let P;
|
|
103
|
+
return e[61] !== U || e[62] !== n || e[63] !== S ? (P = /* @__PURE__ */ r(oe, { className: U, children: [
|
|
104
|
+
n,
|
|
105
|
+
S
|
|
106
|
+
] }), e[61] = U, e[62] = n, e[63] = S, e[64] = P) : P = e[64], P;
|
|
107
107
|
};
|
|
108
108
|
export {
|
|
109
109
|
be as OxLogin
|