@noxickon/onyx 1.0.5 → 1.2.0
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/animations.css +25 -72
- package/dist/chunks/{hooks-B6Ov6Z0O.js → hooks-CUNBk2tZ.js} +2719 -2417
- package/dist/chunks/hooks-UiKjBucd.js +47 -0
- package/dist/chunks/ui-BohXdfTx.js +20 -0
- package/dist/chunks/ui-D6kNTsYs.js +20744 -0
- package/dist/contexts/contexts.cjs.js +2 -2
- package/dist/contexts/contexts.es.js +172 -140
- package/dist/hooks/hooks.cjs.js +1 -1
- package/dist/hooks/hooks.es.js +2 -2
- package/dist/index.d.ts +249 -210
- package/dist/layouts/layouts.cjs.js +1 -1
- package/dist/layouts/layouts.es.js +749 -673
- package/dist/layouts.d.ts +46 -36
- package/dist/onyx.cjs.js +1 -1
- package/dist/onyx.es.js +36 -34
- package/dist/pages/pages.cjs.js +2 -2
- package/dist/pages/pages.es.js +120 -94
- package/dist/pages.d.ts +2 -2
- package/dist/routes/routes.cjs.js +1 -1
- package/dist/routes/routes.es.js +36 -27
- package/dist/shared.css +15 -10
- package/dist/ui.css +1 -1
- package/dist/utils/utils.cjs.js +1 -1
- package/dist/utils/utils.es.js +1 -1
- package/package.json +4 -3
- package/dist/chunks/hooks-BGvU5VHk.js +0 -27
- package/dist/chunks/ui-CZGrB58H.js +0 -20
- package/dist/chunks/ui-Dmzl3_Y3.js +0 -20368
package/dist/routes/routes.es.js
CHANGED
|
@@ -1,31 +1,40 @@
|
|
|
1
|
-
import "../chunks/ui-
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import "../chunks/ui-D6kNTsYs.js";
|
|
2
|
+
import { u as s } from "../chunks/useAuth-BFgXzu6Q.js";
|
|
3
|
+
import { v as a } from "../chunks/hooks-CUNBk2tZ.js";
|
|
4
|
+
const v = (e) => {
|
|
5
|
+
const {
|
|
6
|
+
children: r,
|
|
7
|
+
onAuthenticated: n,
|
|
8
|
+
onLoading: o
|
|
9
|
+
} = e, t = n === void 0 ? null : n, d = o === void 0 ? null : o, {
|
|
10
|
+
isLoggedIn: u,
|
|
11
|
+
loading: i
|
|
12
|
+
} = s();
|
|
13
|
+
return i ? d : u ? t : r;
|
|
14
|
+
}, L = (e) => {
|
|
15
|
+
const {
|
|
16
|
+
children: r,
|
|
17
|
+
onLoading: n,
|
|
18
|
+
onUnauthenticated: o
|
|
19
|
+
} = e, t = n === void 0 ? null : n, d = o === void 0 ? null : o, {
|
|
20
|
+
isLoggedIn: u,
|
|
21
|
+
loading: i
|
|
22
|
+
} = s();
|
|
23
|
+
return i ? t : u ? r : d;
|
|
24
|
+
}, m = (e) => {
|
|
25
|
+
const {
|
|
26
|
+
children: r,
|
|
27
|
+
onLoading: n,
|
|
28
|
+
onUnauthorized: o,
|
|
29
|
+
roles: t
|
|
30
|
+
} = e, d = n === void 0 ? null : n, u = o === void 0 ? null : o, i = t === void 0 ? ["admin"] : t, {
|
|
31
|
+
loading: l,
|
|
32
|
+
user: c
|
|
33
|
+
} = s();
|
|
34
|
+
return l ? d : !c || a(i) || !i.includes(c.role) ? u : r;
|
|
26
35
|
};
|
|
27
36
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
v as OxGuestRoute,
|
|
38
|
+
L as OxProtectedRoute,
|
|
30
39
|
m as OxRoleRoute
|
|
31
40
|
};
|
package/dist/shared.css
CHANGED
|
@@ -18,10 +18,15 @@
|
|
|
18
18
|
--font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
|
|
19
19
|
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
|
|
20
20
|
|
|
21
|
-
--container-8xl: 88rem;
|
|
22
|
-
--container-9xl: 96rem;
|
|
23
|
-
--container-10xl: 104rem;
|
|
24
|
-
--container-
|
|
21
|
+
--container-8xl: 88rem; /* 1408px */
|
|
22
|
+
--container-9xl: 96rem; /* 1536px */
|
|
23
|
+
--container-10xl: 104rem; /* 1664px */
|
|
24
|
+
--container-11xl: 112rem; /* 1792px */
|
|
25
|
+
--container-12xl: 120rem; /* 1920px - Full HD */
|
|
26
|
+
--container-13xl: 128rem; /* 2048px */
|
|
27
|
+
--container-14xl: 136rem; /* 2176px */
|
|
28
|
+
--container-15xl: 144rem; /* 2304px */
|
|
29
|
+
--container-16xl: 160rem; /* 2560px - 2K/QHD */
|
|
25
30
|
|
|
26
31
|
--text-xxs: 0.625rem;
|
|
27
32
|
--text-xxs--line-height: 0.875rem;
|
|
@@ -68,15 +73,15 @@
|
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
.ox-violet-inset-focus {
|
|
71
|
-
@apply focus:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
76
|
+
@apply focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-700 focus-visible:ring-inset;
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
.ox-gray-outset-focus {
|
|
75
|
-
@apply focus
|
|
80
|
+
@apply focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-1000 focus-visible:ring-offset-1 focus-visible:ring-offset-gray-100;
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
.ox-gray-inset-focus {
|
|
79
|
-
@apply focus
|
|
84
|
+
@apply focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-1000 focus-visible:ring-inset;
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
.ox-rose-outset-focus {
|
|
@@ -84,7 +89,7 @@
|
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
.ox-rose-inset-focus {
|
|
87
|
-
@apply focus:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
92
|
+
@apply focus:outline-none focus-visible:ring-2 focus-visible:ring-rose-500 focus-visible:ring-inset;
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
.ox-backdrop-blur-parent {
|
|
@@ -93,11 +98,11 @@
|
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
.ox-pagination-button-base {
|
|
96
|
-
@apply
|
|
101
|
+
@apply inline-flex items-center justify-center rounded-lg border border-transparent bg-transparent transition-colors duration-150 enabled:cursor-pointer enabled:text-gray-1200;
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
.ox-pagination-button {
|
|
100
|
-
@apply
|
|
105
|
+
@apply inline-flex items-center justify-center rounded-lg border border-transparent bg-transparent enabled:cursor-pointer enabled:text-gray-1200 enabled:hover:bg-gray-300 disabled:ox-default-disabled;
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
* {
|