@noxickon/onyx 0.1.0 → 1.0.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.
Files changed (67) hide show
  1. package/dist/chunks/hooks-DiKvsNs-.js +48 -0
  2. package/dist/chunks/hooks-bJFfbTks.js +8624 -0
  3. package/dist/chunks/query-BhvXa-m6.js +10 -0
  4. package/dist/chunks/query-iDn3qBGF.js +14 -0
  5. package/dist/chunks/ui-ChsTPgui.js +41 -0
  6. package/dist/chunks/ui-DxsSYHCv.js +20634 -0
  7. package/dist/chunks/useAuth-BFgXzu6Q.js +12 -0
  8. package/dist/chunks/useAuth-DxoDe3YA.js +1 -0
  9. package/dist/contexts/contexts.cjs.js +5 -0
  10. package/dist/contexts/contexts.es.js +156 -0
  11. package/dist/contexts.d.ts +117 -0
  12. package/dist/hooks/hooks.cjs.js +1 -6
  13. package/dist/hooks/hooks.es.js +11 -1916
  14. package/dist/hooks.d.ts +79 -21
  15. package/dist/index.d.ts +1782 -268
  16. package/dist/layouts/layouts.cjs.js +1 -0
  17. package/dist/layouts/layouts.es.js +688 -0
  18. package/dist/layouts.d.ts +430 -0
  19. package/dist/onyx.cjs.js +1 -1
  20. package/dist/onyx.es.js +53 -1395
  21. package/dist/pages/pages.cjs.js +2 -2
  22. package/dist/pages/pages.es.js +71 -69
  23. package/dist/pages.d.ts +4 -4
  24. package/dist/routes/routes.cjs.js +1 -0
  25. package/dist/routes/routes.es.js +31 -0
  26. package/dist/routes.d.ts +28 -0
  27. package/dist/shared.css +77 -48
  28. package/dist/ui.css +1 -0
  29. package/dist/utils/utils.cjs.js +1 -1
  30. package/dist/utils/utils.es.js +20 -6
  31. package/dist/utils.d.ts +109 -5
  32. package/package.json +39 -28
  33. package/dist/chunks/AuthContext-CaZKJMxQ.js +0 -2149
  34. package/dist/chunks/AuthContext-uU1aP9gj.js +0 -31
  35. package/dist/chunks/Button-D-v4l8ZE.js +0 -20
  36. package/dist/chunks/Button-bARrxYyo.js +0 -11053
  37. package/dist/chunks/Input-CLi1H63d.js +0 -1
  38. package/dist/chunks/Input-dfvmdIHi.js +0 -138
  39. package/dist/chunks/_commonjsHelpers-C6fGbg64.js +0 -6
  40. package/dist/chunks/_commonjsHelpers-DwGv2jUC.js +0 -1
  41. package/dist/chunks/constants-B1_n9ezb.js +0 -1
  42. package/dist/chunks/constants-CDXq37n6.js +0 -4
  43. package/dist/chunks/errorHelper-DbQKxxQA.js +0 -1
  44. package/dist/chunks/errorHelper-qN6iGI6f.js +0 -18
  45. package/dist/chunks/formatTimestamp-CMxOnPo1.js +0 -12
  46. package/dist/chunks/formatTimestamp-TTsNcy7u.js +0 -1
  47. package/dist/chunks/index-CPwC_oqh.js +0 -561
  48. package/dist/chunks/index-DY808_YF.js +0 -2
  49. package/dist/chunks/isObject-BDHKUJKN.js +0 -1
  50. package/dist/chunks/isObject-vmP43YLW.js +0 -6
  51. package/dist/chunks/jsx-runtime--oOP9f8K.js +0 -284
  52. package/dist/chunks/jsx-runtime-CITbqOLs.js +0 -22
  53. package/dist/chunks/tslib.es6-ci7D5hcx.js +0 -44
  54. package/dist/chunks/tslib.es6-nRfFZWHa.js +0 -1
  55. package/dist/chunks/useAuth-BsWbsZD5.js +0 -1
  56. package/dist/chunks/useAuth-CkaMowHd.js +0 -11
  57. package/dist/chunks/useForm-BuzPPZZE.js +0 -3070
  58. package/dist/chunks/useForm-F8doF8lW.js +0 -18
  59. package/dist/chunks/useQuery-Dh3SZN5S.js +0 -1482
  60. package/dist/chunks/useQuery-y4De9xeL.js +0 -2
  61. package/dist/context/context.cjs.js +0 -1
  62. package/dist/context/context.es.js +0 -39
  63. package/dist/context.d.ts +0 -47
  64. package/dist/index.css +0 -1
  65. package/dist/layout/layout.cjs.js +0 -1
  66. package/dist/layout/layout.es.js +0 -265
  67. package/dist/layout.d.ts +0 -90
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/jsx-runtime-CITbqOLs.js");require("react");const o=require("../chunks/Button-D-v4l8ZE.js"),n=require("../chunks/Input-CLi1H63d.js"),i=require("../chunks/AuthContext-uU1aP9gj.js"),p=require("../chunks/useForm-F8doF8lW.js"),g=require("../chunks/errorHelper-DbQKxxQA.js"),j=i.gql`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/ui-ChsTPgui.js");require("react");const n=require("../chunks/hooks-DiKvsNs-.js"),p=require("../chunks/query-BhvXa-m6.js"),c=n.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
- `,E=({cacheQuery:a=i.DEFAULT_GET_CURRENT_USER,className:u,mutation:l=j,onSubmit:d,subtitle:m="",title:x="noxickon"})=>{const e=p.useForm({initialData:{username:"",password:""},validationRules:{username:["required"],password:["required"]},operation:l,options:{update:(t,{data:s})=>{s?.login.success&&t.writeQuery({query:a,data:{me:s.login.me}})}}}),c=async t=>{t.preventDefault(),e.submit({onError:s=>{g.OxHandleGraphQLFormErrors(s,e)},onSuccess:s=>{s.data&&s.data.login.success?d?.(s):console.error("Login failed: Invalid credentials")}})};return r.jsxRuntimeExports.jsx("div",{className:o.twMerge("w-80",u),children:r.jsxRuntimeExports.jsxs("div",{className:"rounded-lg border border-neutral-700 bg-zinc-900/50 p-6 backdrop-blur-xl",children:[r.jsxRuntimeExports.jsxs("div",{className:"mb-4 text-center",children:[r.jsxRuntimeExports.jsx("h1",{className:"px-2 font-mono text-2xl text-white",children:x}),r.jsxRuntimeExports.jsx("p",{className:"px-2 py-1 font-mono text-xs text-neutral-400",children:m})]}),r.jsxRuntimeExports.jsxs(n.OxForm,{className:"space-y-6",onSubmit:c,children:[r.jsxRuntimeExports.jsx(n.OxInput,{autoComplete:"off",disabled:e.isLoading,error:e.hasError("username"),icon:"mdiAccount",label:"username",name:"username",placeholder:"Enter your username",required:!0,type:"text",value:e.data.username,onChange:t=>e.setData("username",t.target.value)}),r.jsxRuntimeExports.jsx(n.OxInput,{autoComplete:"off",disabled:e.isLoading,error:e.hasError("password"),icon:"mdiLockOutline",label:"password",name:"password",placeholder:"Enter your password",required:!0,type:"password",value:e.data.password,onChange:t=>e.setData("password",t.target.value)}),e.hasErrors&&r.jsxRuntimeExports.jsx(n.OxErrorMessage,{icon:"mdiAlertCircleOutline",children:"username or password is wrong"}),r.jsxRuntimeExports.jsx(o.OxButton,{disabled:e.isLoading,fullWidth:!0,isLoading:e.isLoading,size:"md",type:"submit",variant:"primary",children:e.isLoading?"Signing in...":"Sign In"})]})]})})};exports.OxLogin=E;
13
+ `,j=({cacheQuery:i=p.DEFAULT_GET_CURRENT_USER,className:o,mutation:a=c,onSubmit:x,subtitle:u="",title:d="noxickon",...l})=>{const s=n.useForm({initialData:{username:"",password:""},validationRules:{username:["required"],password:["required"]},operation:a,options:{update:(t,{data:r})=>{r?.login.success&&t.writeQuery({query:i,data:{me:r.login.me}})}}}),m=async t=>{t.preventDefault(),s.submit({onError:r=>{e.handleGraphQLFormErrors(r,s)},onSuccess:r=>{r.data&&r.data.login.success?x?.(r):console.error("Login failed: Invalid credentials")}})};return e.jsxRuntimeExports.jsx("div",{className:e.cn("w-80",o),...l,children:e.jsxRuntimeExports.jsxs("div",{className:"ox-gray-border rounded-lg bg-gray-50 p-6",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-4 text-center",children:[e.jsxRuntimeExports.jsx("h1",{className:"text-gray-1200 px-2 font-mono text-2xl",children:d}),e.jsxRuntimeExports.jsx("p",{className:"px-2 py-1 font-mono text-xs",children:u})]}),e.jsxRuntimeExports.jsxs(e.OxForm,{className:"space-y-6",onSubmit:m,children:[e.jsxRuntimeExports.jsxs(e.OxForm.Field,{children:[e.jsxRuntimeExports.jsx(e.OxLabel,{children:"username"}),e.jsxRuntimeExports.jsxs(e.OxTextInput.Container,{disabled:s.isLoading,error:s.hasError("username"),required:!0,value:s.data.username,onChange:t=>s.setData("username",t),children:[e.jsxRuntimeExports.jsx(e.OxTextInput.Icon,{path:"mdiAccount"}),e.jsxRuntimeExports.jsx(e.OxTextInput,{autoComplete:"off",name:"username",placeholder:"Enter your username"})]})]}),e.jsxRuntimeExports.jsxs(e.OxForm.Field,{children:[e.jsxRuntimeExports.jsx(e.OxLabel,{children:"password"}),e.jsxRuntimeExports.jsxs(e.OxTextInput.Container,{disabled:s.isLoading,error:s.hasError("password"),required:!0,type:"password",value:s.data.password,onChange:t=>s.setData("password",t),children:[e.jsxRuntimeExports.jsx(e.OxTextInput.Icon,{path:"mdiLockOutline"}),e.jsxRuntimeExports.jsx(e.OxTextInput,{autoComplete:"off",name:"password",placeholder:"Enter your password"}),e.jsxRuntimeExports.jsx(e.OxTextInput.VisibilityButton,{})]})]}),s.hasErrors?e.jsxRuntimeExports.jsx(e.OxError,{icon:"mdiAlertCircleOutline",children:"username or password is wrong"}):null,e.jsxRuntimeExports.jsx(e.OxButton,{disabled:s.isLoading,fullWidth:!0,isLoading:s.isLoading,size:"sm",type:"submit",variant:"primary",children:s.isLoading?"Signing in...":"Sign In"})]})]})})};exports.OxLogin=j;
@@ -1,11 +1,8 @@
1
- import { j as r } from "../chunks/jsx-runtime--oOP9f8K.js";
1
+ import { _ as e, $ as h, K as i, Y as o, P as n, W as g, e as j, a0 as f } from "../chunks/ui-DxsSYHCv.js";
2
2
  import "react";
3
- import { t as c, O as p } from "../chunks/Button-bARrxYyo.js";
4
- import { O as x, a as o, b as g } from "../chunks/Input-dfvmdIHi.js";
5
- import { g as h, D as f } from "../chunks/AuthContext-CaZKJMxQ.js";
6
- import { u as b } from "../chunks/useForm-BuzPPZZE.js";
7
- import { b as w } from "../chunks/errorHelper-qN6iGI6f.js";
8
- const L = h`
3
+ import { l as L, n as y } from "../chunks/hooks-bJFfbTks.js";
4
+ import { D as w } from "../chunks/query-iDn3qBGF.js";
5
+ const E = y`
9
6
  mutation Login($input: LoginInput!) {
10
7
  login(input: $input) {
11
8
  success
@@ -18,14 +15,15 @@ const L = h`
18
15
  }
19
16
  }
20
17
  `, C = ({
21
- cacheQuery: i = f,
22
- className: n,
23
- mutation: t = L,
24
- onSubmit: d,
25
- subtitle: l = "",
26
- title: u = "noxickon"
18
+ cacheQuery: t = w,
19
+ className: d,
20
+ mutation: l = E,
21
+ onSubmit: u,
22
+ subtitle: m = "",
23
+ title: c = "noxickon",
24
+ ...p
27
25
  }) => {
28
- const e = b({
26
+ const s = L({
29
27
  initialData: {
30
28
  username: "",
31
29
  password: ""
@@ -34,74 +32,78 @@ const L = h`
34
32
  username: ["required"],
35
33
  password: ["required"]
36
34
  },
37
- operation: t,
35
+ operation: l,
38
36
  options: {
39
- update: (a, { data: s }) => {
40
- s?.login.success && a.writeQuery({
41
- query: i,
42
- data: { me: s.login.me }
37
+ update: (a, { data: r }) => {
38
+ r?.login.success && a.writeQuery({
39
+ query: t,
40
+ data: { me: r.login.me }
43
41
  });
44
42
  }
45
43
  }
46
- }), m = async (a) => {
47
- a.preventDefault(), e.submit({
48
- onError: (s) => {
49
- w(s, e);
44
+ }), x = async (a) => {
45
+ a.preventDefault(), s.submit({
46
+ onError: (r) => {
47
+ f(r, s);
50
48
  },
51
- onSuccess: (s) => {
52
- s.data && s.data.login.success ? d?.(s) : console.error("Login failed: Invalid credentials");
49
+ onSuccess: (r) => {
50
+ r.data && r.data.login.success ? u?.(r) : console.error("Login failed: Invalid credentials");
53
51
  }
54
52
  });
55
53
  };
56
- return /* @__PURE__ */ r.jsx("div", { className: c("w-80", n), children: /* @__PURE__ */ r.jsxs("div", { className: "rounded-lg border border-neutral-700 bg-zinc-900/50 p-6 backdrop-blur-xl", children: [
57
- /* @__PURE__ */ r.jsxs("div", { className: "mb-4 text-center", children: [
58
- /* @__PURE__ */ r.jsx("h1", { className: "px-2 font-mono text-2xl text-white", children: u }),
59
- /* @__PURE__ */ r.jsx("p", { className: "px-2 py-1 font-mono text-xs text-neutral-400", children: l })
54
+ return /* @__PURE__ */ e.jsx("div", { className: h("w-80", d), ...p, children: /* @__PURE__ */ e.jsxs("div", { className: "ox-gray-border rounded-lg bg-gray-50 p-6", children: [
55
+ /* @__PURE__ */ e.jsxs("div", { className: "mb-4 text-center", children: [
56
+ /* @__PURE__ */ e.jsx("h1", { className: "text-gray-1200 px-2 font-mono text-2xl", children: c }),
57
+ /* @__PURE__ */ e.jsx("p", { className: "px-2 py-1 font-mono text-xs", children: m })
60
58
  ] }),
61
- /* @__PURE__ */ r.jsxs(x, { className: "space-y-6", onSubmit: m, children: [
62
- /* @__PURE__ */ r.jsx(
63
- o,
59
+ /* @__PURE__ */ e.jsxs(i, { className: "space-y-6", onSubmit: x, children: [
60
+ /* @__PURE__ */ e.jsxs(i.Field, { children: [
61
+ /* @__PURE__ */ e.jsx(o, { children: "username" }),
62
+ /* @__PURE__ */ e.jsxs(
63
+ n.Container,
64
+ {
65
+ disabled: s.isLoading,
66
+ error: s.hasError("username"),
67
+ required: !0,
68
+ value: s.data.username,
69
+ onChange: (a) => s.setData("username", a),
70
+ children: [
71
+ /* @__PURE__ */ e.jsx(n.Icon, { path: "mdiAccount" }),
72
+ /* @__PURE__ */ e.jsx(n, { autoComplete: "off", name: "username", placeholder: "Enter your username" })
73
+ ]
74
+ }
75
+ )
76
+ ] }),
77
+ /* @__PURE__ */ e.jsxs(i.Field, { children: [
78
+ /* @__PURE__ */ e.jsx(o, { children: "password" }),
79
+ /* @__PURE__ */ e.jsxs(
80
+ n.Container,
81
+ {
82
+ disabled: s.isLoading,
83
+ error: s.hasError("password"),
84
+ required: !0,
85
+ type: "password",
86
+ value: s.data.password,
87
+ onChange: (a) => s.setData("password", a),
88
+ children: [
89
+ /* @__PURE__ */ e.jsx(n.Icon, { path: "mdiLockOutline" }),
90
+ /* @__PURE__ */ e.jsx(n, { autoComplete: "off", name: "password", placeholder: "Enter your password" }),
91
+ /* @__PURE__ */ e.jsx(n.VisibilityButton, {})
92
+ ]
93
+ }
94
+ )
95
+ ] }),
96
+ s.hasErrors ? /* @__PURE__ */ e.jsx(g, { icon: "mdiAlertCircleOutline", children: "username or password is wrong" }) : null,
97
+ /* @__PURE__ */ e.jsx(
98
+ j,
64
99
  {
65
- autoComplete: "off",
66
- disabled: e.isLoading,
67
- error: e.hasError("username"),
68
- icon: "mdiAccount",
69
- label: "username",
70
- name: "username",
71
- placeholder: "Enter your username",
72
- required: !0,
73
- type: "text",
74
- value: e.data.username,
75
- onChange: (a) => e.setData("username", a.target.value)
76
- }
77
- ),
78
- /* @__PURE__ */ r.jsx(
79
- o,
80
- {
81
- autoComplete: "off",
82
- disabled: e.isLoading,
83
- error: e.hasError("password"),
84
- icon: "mdiLockOutline",
85
- label: "password",
86
- name: "password",
87
- placeholder: "Enter your password",
88
- required: !0,
89
- type: "password",
90
- value: e.data.password,
91
- onChange: (a) => e.setData("password", a.target.value)
92
- }
93
- ),
94
- e.hasErrors && /* @__PURE__ */ r.jsx(g, { icon: "mdiAlertCircleOutline", children: "username or password is wrong" }),
95
- /* @__PURE__ */ r.jsx(
96
- p,
97
- {
98
- disabled: e.isLoading,
100
+ disabled: s.isLoading,
99
101
  fullWidth: !0,
100
- isLoading: e.isLoading,
101
- size: "md",
102
+ isLoading: s.isLoading,
103
+ size: "sm",
102
104
  type: "submit",
103
105
  variant: "primary",
104
- children: e.isLoading ? "Signing in..." : "Sign In"
106
+ children: s.isLoading ? "Signing in..." : "Sign In"
105
107
  }
106
108
  )
107
109
  ] })
package/dist/pages.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { default as default_2 } from 'react';
2
1
  import { DocumentNode } from 'graphql';
2
+ import { HTMLAttributes } from 'react';
3
+ import { JSX } from 'react/jsx-runtime';
3
4
 
4
- export declare const OxLogin: default_2.FC<OxLoginProps>;
5
+ export declare const OxLogin: ({ cacheQuery, className, mutation, onSubmit, subtitle, title, ...props }: OxLoginProps) => JSX.Element;
5
6
 
6
- export declare interface OxLoginProps {
7
+ export declare interface OxLoginProps extends HTMLAttributes<HTMLDivElement> {
7
8
  cacheQuery?: DocumentNode;
8
- className?: string;
9
9
  mutation?: DocumentNode;
10
10
  onSubmit: (response: unknown) => void;
11
11
  subtitle?: string;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/ui-ChsTPgui.js");const o=require("../chunks/useAuth-DxoDe3YA.js"),s=require("../chunks/hooks-DiKvsNs-.js"),i=({children:t,onAuthenticated:u=null,onLoading:n=null})=>{const{isLoggedIn:e,loading:r}=o.useOxAuth();return r?n:e?u:t},c=({children:t,onLoading:u=null,onUnauthenticated:n=null})=>{const{isLoggedIn:e,loading:r}=o.useOxAuth();return r?u:e?t:n},d=({children:t,onLoading:u=null,onUnauthorized:n=null,roles:e=["admin"]})=>{const{loading:r,user:l}=o.useOxAuth();return r?u:!l||s.isEmpty(e)||!e.includes(l.role)?n:t};exports.OxGuestRoute=i;exports.OxProtectedRoute=c;exports.OxRoleRoute=d;
@@ -0,0 +1,31 @@
1
+ import "../chunks/ui-DxsSYHCv.js";
2
+ import { u as o } from "../chunks/useAuth-BFgXzu6Q.js";
3
+ import { q as l } from "../chunks/hooks-bJFfbTks.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;
26
+ };
27
+ export {
28
+ f as OxGuestRoute,
29
+ g as OxProtectedRoute,
30
+ m as OxRoleRoute
31
+ };
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export declare const OxGuestRoute: ({ children, onAuthenticated, onLoading, }: OxGuestRouteProps) => ReactNode;
4
+
5
+ export declare interface OxGuestRouteProps {
6
+ children: ReactNode;
7
+ onAuthenticated?: ReactNode;
8
+ onLoading?: ReactNode;
9
+ }
10
+
11
+ export declare const OxProtectedRoute: ({ children, onLoading, onUnauthenticated, }: OxProtectedRouteProps) => ReactNode;
12
+
13
+ export declare interface OxProtectedRouteProps {
14
+ children: ReactNode;
15
+ onLoading?: ReactNode;
16
+ onUnauthenticated?: ReactNode;
17
+ }
18
+
19
+ export declare const OxRoleRoute: ({ children, onLoading, onUnauthorized, roles, }: OxRoleRouteProps) => ReactNode;
20
+
21
+ export declare interface OxRoleRouteProps {
22
+ children: ReactNode;
23
+ onLoading?: ReactNode;
24
+ onUnauthorized?: ReactNode;
25
+ roles?: string[];
26
+ }
27
+
28
+ export { }
package/dist/shared.css CHANGED
@@ -1,42 +1,103 @@
1
+ @import './animations.css';
2
+
3
+ :root {
4
+ /* Field components (Input, Radio, Checkbox, etc) */
5
+ --ox-field-control-col: 1;
6
+ --ox-field-control-row: 1;
7
+ --ox-field-label-col: 2;
8
+ --ox-field-label-row: 1;
9
+ --ox-field-desc-row: 2;
10
+
11
+ /* Menu components (Dropdown, Select, etc) */
12
+ --ox-menu-icon-col: 1;
13
+ --ox-menu-label-col: 2;
14
+ --ox-menu-shortcut-col: 3;
15
+ }
16
+
1
17
  @theme {
2
18
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
3
19
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
4
20
 
5
- --color-zinc-1000: #09090b;
6
-
7
21
  --container-8xl: 88rem;
8
22
  --container-9xl: 96rem;
9
23
  --container-10xl: 104rem;
10
24
  --container-12xl: 120rem;
25
+
26
+ --text-xxs: 0.625rem;
27
+ --text-xxs--line-height: 0.875rem;
28
+ --text-xxxs: 0.5rem;
29
+ --text-xxxs--line-height: 0.75rem;
30
+
31
+ --color-gray-50: #0d0d0c;
32
+ --color-gray-100: #111110;
33
+ --color-gray-150: #161615;
34
+ --color-gray-200: #191918;
35
+ --color-gray-300: #222221;
36
+ --color-gray-400: #2a2a28;
37
+ --color-gray-500: #31312e;
38
+ --color-gray-600: #3b3a37;
39
+ --color-gray-700: #494844;
40
+ --color-gray-800: #62605b;
41
+ --color-gray-900: #6f6d66;
42
+ --color-gray-1000: #7c7b74;
43
+ --color-gray-1100: #b5b3ad;
44
+ --color-gray-1200: #fff;
45
+ }
46
+
47
+ @utility ox-default-disabled {
48
+ opacity: 50%;
49
+ cursor: not-allowed;
50
+ color: theme('colors.gray.800');
11
51
  }
12
52
 
13
53
  @layer components {
14
- .default-border {
15
- @apply border border-neutral-700 transition-colors duration-150;
54
+ .ox-gray-border {
55
+ @apply border border-gray-400;
16
56
  }
17
57
 
18
- .default-error-border {
19
- @apply border !border-rose-400;
58
+ .ox-rose-border {
59
+ @apply border border-rose-400;
20
60
  }
21
61
 
22
- .default-outset-focus {
23
- @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-700 focus-visible:ring-offset-1 focus-visible:ring-offset-zinc-900;
62
+ .ox-violet-outset-focus {
63
+ @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-700 focus-visible:ring-offset-1 focus-visible:ring-offset-gray-100;
24
64
  }
25
65
 
26
- .default-inset-focus {
27
- @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-700 focus-visible:ring-inset;
66
+ .ox-violet-outset-within-focus {
67
+ @apply focus-within:ring-2 focus-within:ring-violet-700 focus-within:ring-offset-1 focus-within:ring-offset-gray-100;
28
68
  }
29
69
 
30
- .secondary-outset-focus {
31
- @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-500 focus-visible:ring-offset-1 focus-visible:ring-offset-zinc-900;
70
+ .ox-violet-inset-focus {
71
+ @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-violet-700;
32
72
  }
33
73
 
34
- .secondary-inset-focus {
35
- @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-500 focus-visible:ring-inset;
74
+ .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;
36
76
  }
37
77
 
38
- .default-disabled {
39
- @apply disabled:cursor-not-allowed disabled:text-neutral-500 disabled:hover:bg-transparent disabled:focus-visible:ring-0;
78
+ .ox-gray-inset-focus {
79
+ @apply focus-visible:ring-gray-1000 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset;
80
+ }
81
+
82
+ .ox-rose-outset-focus {
83
+ @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-rose-500 focus-visible:ring-offset-1 focus-visible:ring-offset-gray-100;
84
+ }
85
+
86
+ .ox-rose-inset-focus {
87
+ @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-rose-500;
88
+ }
89
+
90
+ .ox-backdrop-blur-parent {
91
+ backdrop-filter: blur(0);
92
+ -webkit-backdrop-filter: blur(0);
93
+ }
94
+
95
+ .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;
97
+ }
98
+
99
+ .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;
40
101
  }
41
102
 
42
103
  * {
@@ -63,38 +124,6 @@
63
124
  }
64
125
  }
65
126
 
66
- @layer utilities {
67
- @keyframes dropdownInBottom {
68
- 0% {
69
- opacity: 0;
70
- transform: translateY(-4px);
71
- }
72
- 100% {
73
- opacity: 1;
74
- transform: translateY(0);
75
- }
76
- }
77
-
78
- @keyframes dropdownInTop {
79
- 0% {
80
- opacity: 0;
81
- transform: translateY(4px);
82
- }
83
- 100% {
84
- opacity: 1;
85
- transform: translateY(0);
86
- }
87
- }
88
-
89
- .animate-dropdown-in-bottom {
90
- animation: dropdownInBottom 150ms ease-out forwards;
91
- }
92
-
93
- .animate-dropdown-in-top {
94
- animation: dropdownInTop 150ms ease-out forwards;
95
- }
96
- }
97
-
98
127
  input:-webkit-autofill,
99
128
  input:-webkit-autofill:hover,
100
129
  input:-webkit-autofill:focus,