@noxickon/onyx 1.0.4 → 1.1.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.
@@ -1,31 +1,40 @@
1
- import "../chunks/ui-CWzo2o31.js";
2
- import { u as o } from "../chunks/useAuth-BFgXzu6Q.js";
3
- import { q as l } from "../chunks/hooks-BswtWYGK.js";
4
- const f = ({
5
- children: t,
6
- onAuthenticated: r = null,
7
- onLoading: u = null
8
- }) => {
9
- const { isLoggedIn: n, loading: e } = o();
10
- return e ? u : n ? r : t;
11
- }, g = ({
12
- children: t,
13
- onLoading: r = null,
14
- onUnauthenticated: u = null
15
- }) => {
16
- const { isLoggedIn: n, loading: e } = o();
17
- return e ? r : n ? t : u;
18
- }, m = ({
19
- children: t,
20
- onLoading: r = null,
21
- onUnauthorized: u = null,
22
- roles: n = ["admin"]
23
- }) => {
24
- const { loading: e, user: i } = o();
25
- return e ? r : !i || l(n) || !n.includes(i.role) ? u : t;
1
+ import "../chunks/ui-DGkJW_Fa.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
- f as OxGuestRoute,
29
- g as OxProtectedRoute,
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-12xl: 120rem;
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-inset focus-visible:ring-violet-700;
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-visible:ring-gray-1000 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-gray-100;
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-visible:ring-gray-1000 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset;
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-inset focus-visible:ring-rose-500;
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 enabled:text-gray-1200 inline-flex items-center justify-center rounded-lg border border-transparent bg-transparent transition-colors duration-150 enabled:cursor-pointer;
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 enabled:text-gray-1200 disabled:ox-default-disabled inline-flex items-center justify-center rounded-lg border border-transparent bg-transparent enabled:cursor-pointer enabled:hover:bg-gray-300;
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
  * {