@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.
package/dist/layouts.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { AnchorHTMLAttributes } from 'react';
2
- import { ButtonHTMLAttributes } from 'react';
3
- import { HTMLAttributes } from 'react';
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { ComponentPropsWithRef } from 'react';
4
3
  import { IconProps } from '@mdi/react/dist/IconProps';
5
4
  import { JSX } from 'react/jsx-runtime';
6
5
  import { ReactNode } from 'react';
@@ -138,11 +137,11 @@ declare type ColorStyleName = keyof typeof COLOR_STYLES;
138
137
 
139
138
  export declare const OxAppLayout: ({ children, className, ...domProps }: OxAppLayoutProps) => JSX.Element;
140
139
 
141
- export declare interface OxAppLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
140
+ export declare interface OxAppLayoutProps extends ComponentPropsWithRef<'div'> {
142
141
  children: ReactNode;
143
142
  }
144
143
 
145
- declare interface OxHeaderProps extends Omit<HTMLAttributes<HTMLHeadElement>, 'children'> {
144
+ declare interface OxHeaderProps extends ComponentPropsWithRef<'header'> {
146
145
  brand?: ReactNode;
147
146
  children: ReactNode;
148
147
  hasSidebar?: boolean;
@@ -175,19 +174,19 @@ export declare const OxMainContent: (({ children, className, ...domProps }: OxMa
175
174
  Body: ({ children, className, ...domProps }: OxMainContentBodyProps) => JSX.Element;
176
175
  };
177
176
 
178
- export declare interface OxMainContentBodyProps extends React.HTMLAttributes<HTMLDivElement> {
177
+ export declare interface OxMainContentBodyProps extends ComponentPropsWithRef<'div'> {
179
178
  children: ReactNode;
180
179
  }
181
180
 
182
- export declare interface OxMainContentHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
181
+ export declare interface OxMainContentHeaderProps extends ComponentPropsWithRef<'div'> {
183
182
  children: ReactNode;
184
183
  }
185
184
 
186
- export declare interface OxMainContentProps extends React.HTMLAttributes<HTMLElement> {
185
+ export declare interface OxMainContentProps extends ComponentPropsWithRef<'main'> {
187
186
  children: ReactNode;
188
187
  }
189
188
 
190
- declare interface OxMainContentProps_2 extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
189
+ declare interface OxMainContentProps_2 extends ComponentPropsWithRef<'main'> {
191
190
  children: ReactNode;
192
191
  color?: ColorStyleName;
193
192
  icon?: string;
@@ -209,13 +208,13 @@ declare const OxSidebar_3: ({ children, className, ...domProps }: OxSidebarProps
209
208
 
210
209
  declare const OxSidebarBody: ({ children, className, ...domProps }: OxSidebarBodyProps) => JSX.Element;
211
210
 
212
- declare interface OxSidebarBodyProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
211
+ declare interface OxSidebarBodyProps extends ComponentPropsWithRef<'div'> {
213
212
  children: ReactNode;
214
213
  }
215
214
 
216
215
  declare const OxSidebarButton: ({ active, children, className, disabled, ...domProps }: OxSidebarButtonProps) => JSX.Element;
217
216
 
218
- declare interface OxSidebarButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
217
+ declare interface OxSidebarButtonProps extends ComponentPropsWithRef<'button'> {
219
218
  active?: boolean;
220
219
  children: ReactNode;
221
220
  onClick: () => void;
@@ -223,7 +222,7 @@ declare interface OxSidebarButtonProps extends Omit<ButtonHTMLAttributes<HTMLBut
223
222
 
224
223
  declare const OxSidebarContent: ({ children, className, ...domProps }: OxSidebarContentProps) => JSX.Element;
225
224
 
226
- export declare interface OxSidebarContentProps extends HTMLAttributes<HTMLDivElement> {
225
+ export declare interface OxSidebarContentProps extends ComponentPropsWithRef<'div'> {
227
226
  children: ReactNode;
228
227
  }
229
228
 
@@ -239,11 +238,11 @@ declare const OxSidebarFooter: ({ children, className, ...domProps }: OxSidebarF
239
238
 
240
239
  declare const OxSidebarFooter_2: ({ children, className, ...domProps }: OxSidebarFooterProps) => JSX.Element;
241
240
 
242
- export declare interface OxSidebarFooterProps extends HTMLAttributes<HTMLDivElement> {
241
+ export declare interface OxSidebarFooterProps extends ComponentPropsWithRef<'div'> {
243
242
  children: ReactNode;
244
243
  }
245
244
 
246
- declare interface OxSidebarFooterProps_2 extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
245
+ declare interface OxSidebarFooterProps_2 extends ComponentPropsWithRef<'div'> {
247
246
  children: ReactNode;
248
247
  }
249
248
 
@@ -259,27 +258,27 @@ declare const OxSidebarGroup_3: ({ children, className, ...domProps }: OxSidebar
259
258
 
260
259
  declare const OxSidebarGroupAction: ({ children, className, ...domProps }: OxSidebarGroupActionProps) => JSX.Element;
261
260
 
262
- export declare interface OxSidebarGroupActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
261
+ export declare interface OxSidebarGroupActionProps extends ComponentPropsWithRef<'button'> {
263
262
  children: ReactNode;
264
263
  }
265
264
 
266
265
  declare const OxSidebarGroupContent: ({ children, className, ...domProps }: OxSidebarGroupContentProps) => JSX.Element;
267
266
 
268
- export declare interface OxSidebarGroupContentProps extends HTMLAttributes<HTMLDivElement> {
267
+ export declare interface OxSidebarGroupContentProps extends ComponentPropsWithRef<'div'> {
269
268
  children: ReactNode;
270
269
  }
271
270
 
272
271
  declare const OxSidebarGroupLabel: ({ children, className, ...domProps }: OxSidebarGroupLabelProps) => JSX.Element;
273
272
 
274
- export declare interface OxSidebarGroupLabelProps extends HTMLAttributes<HTMLDivElement> {
273
+ export declare interface OxSidebarGroupLabelProps extends ComponentPropsWithRef<'div'> {
275
274
  children: ReactNode;
276
275
  }
277
276
 
278
- export declare interface OxSidebarGroupProps extends HTMLAttributes<HTMLDivElement> {
277
+ export declare interface OxSidebarGroupProps extends ComponentPropsWithRef<'div'> {
279
278
  children: ReactNode;
280
279
  }
281
280
 
282
- declare interface OxSidebarGroupProps_2 extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
281
+ declare interface OxSidebarGroupProps_2 extends ComponentPropsWithRef<'div'> {
283
282
  children: ReactNode;
284
283
  headline: string;
285
284
  }
@@ -288,11 +287,11 @@ declare const OxSidebarHeader: ({ children, className, ...domProps }: OxSidebarH
288
287
 
289
288
  declare const OxSidebarHeader_2: ({ children, className, ...domProps }: OxSidebarHeaderProps) => JSX.Element;
290
289
 
291
- export declare interface OxSidebarHeaderProps extends HTMLAttributes<HTMLDivElement> {
290
+ export declare interface OxSidebarHeaderProps extends ComponentPropsWithRef<'div'> {
292
291
  children: ReactNode;
293
292
  }
294
293
 
295
- declare interface OxSidebarHeaderProps_2 extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
294
+ declare interface OxSidebarHeaderProps_2 extends ComponentPropsWithRef<'div'> {
296
295
  children: ReactNode;
297
296
  }
298
297
 
@@ -302,13 +301,13 @@ declare type OxSidebarIconProps = OxIconProps;
302
301
 
303
302
  declare const OxSidebarLabel: ({ children, className, ...domProps }: OxSidebarLabelProps) => JSX.Element;
304
303
 
305
- declare interface OxSidebarLabelProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
304
+ declare interface OxSidebarLabelProps extends ComponentPropsWithRef<'span'> {
306
305
  children: ReactNode;
307
306
  }
308
307
 
309
308
  declare const OxSidebarLink: ({ active, children, className, disabled, href, ...domProps }: OxSidebarLinkProps) => JSX.Element;
310
309
 
311
- declare interface OxSidebarLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
310
+ declare interface OxSidebarLinkProps extends ComponentPropsWithRef<'a'> {
312
311
  active?: boolean;
313
312
  children: ReactNode;
314
313
  disabled?: boolean;
@@ -331,7 +330,7 @@ declare const OxSidebarMenu_2: ({ children, className, ...domProps }: OxSidebarM
331
330
 
332
331
  declare const OxSidebarMenuAction: ({ children, className, ...domProps }: OxSidebarMenuActionProps) => JSX.Element;
333
332
 
334
- export declare interface OxSidebarMenuActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
333
+ export declare interface OxSidebarMenuActionProps extends ComponentPropsWithRef<'button'> {
335
334
  children: ReactNode;
336
335
  }
337
336
 
@@ -342,12 +341,19 @@ export declare interface OxSidebarMenuBadgeProps {
342
341
  className?: string;
343
342
  }
344
343
 
345
- declare const OxSidebarMenuButton: ({ children, className, disabled, href, onClick, ...domProps }: OxSidebarMenuButtonProps) => JSX.Element;
344
+ declare const OxSidebarMenuButton: (props: OxSidebarMenuButtonProps) => JSX.Element;
346
345
 
347
- export declare interface OxSidebarMenuButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
348
- children: ReactNode;
349
- href?: string;
350
- }
346
+ export declare type OxSidebarMenuButtonButtonProps = SidebarMenuButtonBaseProps & Omit<ComponentPropsWithRef<'button'>, keyof SidebarMenuButtonBaseProps | 'type'> & {
347
+ href?: never;
348
+ type?: 'button';
349
+ };
350
+
351
+ export declare type OxSidebarMenuButtonLinkProps = SidebarMenuButtonBaseProps & Omit<ComponentPropsWithRef<'a'>, keyof SidebarMenuButtonBaseProps | 'href'> & {
352
+ disabled?: boolean;
353
+ href: string;
354
+ };
355
+
356
+ export declare type OxSidebarMenuButtonProps = OxSidebarMenuButtonLinkProps | OxSidebarMenuButtonButtonProps;
351
357
 
352
358
  declare const OxSidebarMenuIcon: ({ className, path, placeholder }: OxSidebarMenuIconProps) => JSX.Element;
353
359
 
@@ -359,13 +365,13 @@ export declare interface OxSidebarMenuIconProps {
359
365
 
360
366
  declare const OxSidebarMenuItem: ({ children, className, defaultOpen, hasSub, ...domProps }: OxSidebarMenuItemProps) => JSX.Element;
361
367
 
362
- export declare interface OxSidebarMenuItemProps extends HTMLAttributes<HTMLLIElement> {
368
+ export declare interface OxSidebarMenuItemProps extends ComponentPropsWithRef<'li'> {
363
369
  children: ReactNode;
364
370
  defaultOpen?: boolean;
365
371
  hasSub?: boolean;
366
372
  }
367
373
 
368
- export declare interface OxSidebarMenuProps extends HTMLAttributes<HTMLUListElement> {
374
+ export declare interface OxSidebarMenuProps extends ComponentPropsWithRef<'ul'> {
369
375
  children: ReactNode;
370
376
  }
371
377
 
@@ -379,26 +385,26 @@ declare const OxSidebarMenuSub: ({ children, className, ...domProps }: OxSidebar
379
385
 
380
386
  declare const OxSidebarMenuSubButton: ({ children, className, href, ...domProps }: OxSidebarMenuSubButtonProps) => JSX.Element;
381
387
 
382
- export declare interface OxSidebarMenuSubButtonProps extends HTMLAttributes<HTMLButtonElement> {
388
+ export declare interface OxSidebarMenuSubButtonProps extends ComponentPropsWithRef<'button'> {
383
389
  children: ReactNode;
384
390
  href?: string;
385
391
  }
386
392
 
387
393
  declare const OxSidebarMenuSubItem: ({ children, className, ...domProps }: OxSidebarMenuSubItemProps) => JSX.Element;
388
394
 
389
- export declare interface OxSidebarMenuSubItemProps extends HTMLAttributes<HTMLLIElement> {
395
+ export declare interface OxSidebarMenuSubItemProps extends ComponentPropsWithRef<'li'> {
390
396
  children: ReactNode;
391
397
  }
392
398
 
393
- export declare interface OxSidebarMenuSubProps extends HTMLAttributes<HTMLUListElement> {
399
+ export declare interface OxSidebarMenuSubProps extends ComponentPropsWithRef<'ul'> {
394
400
  children: ReactNode;
395
401
  }
396
402
 
397
- export declare interface OxSidebarProps extends HTMLAttributes<HTMLDivElement> {
403
+ export declare interface OxSidebarProps extends ComponentPropsWithoutRef<'aside'> {
398
404
  children: ReactNode;
399
405
  }
400
406
 
401
- declare interface OxSidebarProps_2 extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
407
+ declare interface OxSidebarProps_2 extends ComponentPropsWithRef<'nav'> {
402
408
  children: ReactNode;
403
409
  desktopCollapsed?: boolean;
404
410
  hasHeader?: boolean;
@@ -425,6 +431,10 @@ export declare interface OxSidebarTriggerProps {
425
431
  onClick?: () => void;
426
432
  }
427
433
 
434
+ declare type SidebarMenuButtonBaseProps = {
435
+ children: ReactNode;
436
+ };
437
+
428
438
  export declare function useOxSidebar(): OxSidebarContextType;
429
439
 
430
440
  export { }
package/dist/onyx.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunks/ui-DRaffjpU.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.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.useOxToast=x.useOxToast;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunks/ui-DRRDAnVI.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,55 +1,57 @@
1
- import { O as x, a as O, b as e, c as o, d as t, e as r, f as i, g as n, I as p, L as l, V as d, h as T, o as c, i as u, j as g, W as S, J as D, k as b, K as m, X as I, l as k, m as F, Y as L, Z as P, n as v, p as w, M as A, N as B, q as C, r as f, s as h, R as N, S as y, t as E, u as H, v as J, w as R, x as U, y as j, z as q, T as z, A as G, B as K, P as M, U as Q, Q as V, C as W, F as X, D as Y, G as Z, H as _, E as $ } from "./chunks/ui-CWzo2o31.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-DGkJW_Fa.js";
2
2
  export {
3
3
  x as OxAccordion,
4
4
  O as OxAlert,
5
5
  e as OxAvatar,
6
- o as OxBadge,
7
- t as OxBreadcrumb,
6
+ t as OxBadge,
7
+ o as OxBreadcrumb,
8
8
  r as OxButton,
9
9
  i as OxCalendar,
10
10
  n as OxCard,
11
- p as OxCheckbox,
12
- l as OxDateInput,
11
+ l as OxCheckbox,
12
+ p as OxDateInput,
13
13
  d as OxDescription,
14
14
  T as OxDescriptionList,
15
- c as OxDialog,
15
+ g as OxDialog,
16
16
  u as OxDrawer,
17
- g as OxDropdown,
17
+ c as OxDropdown,
18
18
  S as OxError,
19
19
  D as OxFileUpload,
20
20
  b as OxFloating,
21
- m as OxForm,
21
+ m as OxFloatingContext,
22
+ F as OxForm,
22
23
  I as OxHeading,
23
- k as OxIcon,
24
- F as OxJsonField,
24
+ C as OxIcon,
25
+ k as OxJsonField,
25
26
  L as OxLabel,
26
27
  P as OxLegend,
27
28
  v as OxLink,
28
29
  w as OxNotifications,
29
30
  A as OxNumberInput,
30
31
  B as OxOtpInput,
31
- C as OxPagination,
32
- f as OxPopover,
33
- h as OxProgress,
34
- N as OxRadio,
35
- y as OxSelect,
36
- E as OxSeparator,
37
- H as OxSkeleton,
38
- J as OxSkeletonText,
39
- R as OxSlider,
40
- U as OxSpinner,
41
- j as OxStatusDisplay,
42
- q as OxStepper,
43
- z as OxSwitch,
44
- G as OxTable,
45
- K as OxTabs,
46
- M as OxTextInput,
47
- Q as OxTextarea,
48
- V as OxTimeInput,
49
- W as OxTimeline,
50
- X as OxToast,
51
- Y as OxToastProvider,
52
- Z as OxToggle,
53
- _ as OxTooltip,
54
- $ as useOxToast
32
+ f as OxPagination,
33
+ h as OxPopover,
34
+ N as OxProgress,
35
+ y as OxRadio,
36
+ E as OxSelect,
37
+ H as OxSeparator,
38
+ J as OxSkeleton,
39
+ R as OxSkeletonText,
40
+ U as OxSlider,
41
+ j as OxSpinner,
42
+ q as OxStatusDisplay,
43
+ z as OxStepper,
44
+ G as OxSwitch,
45
+ K as OxTable,
46
+ M as OxTabs,
47
+ Q as OxTextInput,
48
+ V as OxTextarea,
49
+ W as OxTimeInput,
50
+ X as OxTimeline,
51
+ Y as OxToast,
52
+ Z as OxToastProvider,
53
+ _ as OxToggle,
54
+ $ as OxTooltip,
55
+ aa as useOxFloatingContext,
56
+ sa as useOxToast
55
57
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/ui-DRaffjpU.js");require("react");const i=require("../chunks/hooks-DB942JYB.js"),p=require("../chunks/query-D4FW3HN6.js"),c=i.gql`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../chunks/ui-DRRDAnVI.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
- `,j=({cacheQuery:o=p.DEFAULT_GET_CURRENT_USER,className:a,mutation:x=c,onSubmit:u,subtitle:t="",title:d="noxickon",...l})=>{const s=i.useForm({initialData:{username:"",password:""},validationRules:{username:["required"],password:["required"]},operation:x,options:{update:(n,{data:r})=>{r?.login.success&&n.writeQuery({query:o,data:{me:r.login.me}})}}}),m=async n=>{n.preventDefault(),s.submit({onError:r=>{e.handleGraphQLFormErrors(r,s)},onSuccess:r=>{r.data&&r.data.login.success?u?.(r):console.error("Login failed: Invalid credentials")}})};return e.jsxRuntimeExports.jsx("div",{className:e.cn("w-80",a),...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}),t?e.jsxRuntimeExports.jsx("p",{className:"px-2 py-1 font-mono text-xs",children:t}):null]}),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:n=>s.setData("username",n),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:n=>s.setData("password",n),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;
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;
@@ -1,8 +1,10 @@
1
- import { _ as e, $ as h, K as i, Y as t, P as n, W as g, e as j, a0 as f } from "../chunks/ui-CWzo2o31.js";
1
+ import { a0 as Z, R as r, M as H, Y as ee, e as te, a1 as se, _ as K } from "../chunks/ui-DGkJW_Fa.js";
2
+ import { jsx as s, jsxs as o } from "react/jsx-runtime";
3
+ import { d as ie, q as ae } from "../chunks/hooks-CUNBk2tZ.js";
4
+ import { gql as re } from "@apollo/client";
2
5
  import "react";
3
- import { l as L, n as y } from "../chunks/hooks-BswtWYGK.js";
4
- import { D as w } from "../chunks/query-v272k9Fk.js";
5
- const E = y`
6
+ import { D as oe } from "../chunks/query-D2S9cFBP.js";
7
+ const le = re`
6
8
  mutation Login($input: LoginInput!) {
7
9
  login(input: $input) {
8
10
  success
@@ -14,101 +16,127 @@ const E = y`
14
16
  }
15
17
  }
16
18
  }
17
- `, C = ({
18
- cacheQuery: d = w,
19
- className: l,
20
- mutation: u = E,
21
- onSubmit: m,
22
- subtitle: o = "",
23
- title: c = "noxickon",
24
- ...p
25
- }) => {
26
- const s = L({
27
- initialData: {
28
- username: "",
29
- password: ""
30
- },
31
- validationRules: {
32
- username: ["required"],
33
- password: ["required"]
34
- },
35
- operation: u,
36
- options: {
37
- update: (a, { data: r }) => {
38
- r?.login.success && a.writeQuery({
39
- query: d,
40
- data: { me: r.login.me }
41
- });
42
- }
19
+ `, pe = (B) => {
20
+ const e = ie.c(70);
21
+ let l, n, d, S, N, O, C;
22
+ e[0] !== B ? ({
23
+ cacheQuery: S,
24
+ className: l,
25
+ mutation: N,
26
+ onSubmit: n,
27
+ subtitle: O,
28
+ title: C,
29
+ ...d
30
+ } = B, e[0] = B, e[1] = l, e[2] = n, e[3] = d, e[4] = S, e[5] = N, e[6] = O, e[7] = C) : (l = e[1], n = e[2], d = e[3], S = e[4], N = e[5], O = e[6], C = e[7]);
31
+ const M = S === void 0 ? oe : S, z = N === void 0 ? le : N, I = O === void 0 ? "" : O, V = C === void 0 ? "noxickon" : C;
32
+ let q, D;
33
+ e[8] === Symbol.for("react.memo_cache_sentinel") ? (q = {
34
+ username: "",
35
+ password: ""
36
+ }, D = {
37
+ username: ["required"],
38
+ password: ["required"]
39
+ }, e[8] = q, e[9] = D) : (q = e[8], D = e[9]);
40
+ let c;
41
+ e[10] !== M ? (c = {
42
+ update: (i, a) => {
43
+ const {
44
+ data: J
45
+ } = a;
46
+ J?.login.success && i.writeQuery({
47
+ query: M,
48
+ data: {
49
+ me: J.login.me
50
+ }
51
+ });
43
52
  }
44
- }), x = async (a) => {
45
- a.preventDefault(), s.submit({
46
- onError: (r) => {
47
- f(r, s);
53
+ }, e[10] = M, e[11] = c) : c = e[11];
54
+ let F;
55
+ e[12] !== z || e[13] !== c ? (F = {
56
+ initialData: q,
57
+ validationRules: D,
58
+ operation: z,
59
+ options: c
60
+ }, e[12] = z, e[13] = c, e[14] = F) : F = e[14];
61
+ const t = ae(F);
62
+ let R;
63
+ e[15] !== t || e[16] !== n ? (R = async (i) => {
64
+ i.preventDefault(), t.submit({
65
+ onError: (a) => {
66
+ se(a, t);
48
67
  },
49
- onSuccess: (r) => {
50
- r.data && r.data.login.success ? m?.(r) : console.error("Login failed: Invalid credentials");
68
+ onSuccess: (a) => {
69
+ a.data && a.data.login.success ? n?.(a) : console.error("Login failed: Invalid credentials");
51
70
  }
52
71
  });
53
- };
54
- return /* @__PURE__ */ e.jsx("div", { className: h("w-80", l), ...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
- o ? /* @__PURE__ */ e.jsx("p", { className: "px-2 py-1 font-mono text-xs", children: o }) : null
58
- ] }),
59
- /* @__PURE__ */ e.jsxs(i, { className: "space-y-6", onSubmit: x, children: [
60
- /* @__PURE__ */ e.jsxs(i.Field, { children: [
61
- /* @__PURE__ */ e.jsx(t, { 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(t, { 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,
99
- {
100
- disabled: s.isLoading,
101
- fullWidth: !0,
102
- isLoading: s.isLoading,
103
- size: "sm",
104
- type: "submit",
105
- variant: "primary",
106
- children: s.isLoading ? "Signing in..." : "Sign In"
107
- }
108
- )
72
+ }, e[15] = t, e[16] = n, e[17] = R) : R = e[17];
73
+ const W = R;
74
+ let m;
75
+ e[18] !== l ? (m = Z("w-80", l), e[18] = l, e[19] = m) : m = e[19];
76
+ let u;
77
+ e[20] !== V ? (u = /* @__PURE__ */ s("h1", { className: "px-2 font-mono text-2xl text-gray-1200", children: V }), e[20] = V, e[21] = u) : u = e[21];
78
+ let f;
79
+ e[22] !== I ? (f = I ? /* @__PURE__ */ s("p", { className: "px-2 py-1 font-mono text-xs", children: I }) : null, e[22] = I, e[23] = f) : f = e[23];
80
+ let p;
81
+ e[24] !== u || e[25] !== f ? (p = /* @__PURE__ */ o("div", { className: "mb-4 text-center", children: [
82
+ u,
83
+ f
84
+ ] }), e[24] = u, e[25] = f, e[26] = p) : p = e[26];
85
+ let T;
86
+ e[27] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ s(K, { children: "username" }), e[27] = T) : T = e[27];
87
+ const P = t.isLoading;
88
+ let h;
89
+ e[28] !== t ? (h = t.hasError("username"), e[28] = t, e[29] = h) : h = e[29];
90
+ let g;
91
+ e[30] !== t ? (g = (i) => t.setData("username", i), e[30] = t, e[31] = g) : g = e[31];
92
+ let A, Q;
93
+ e[32] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ s(r.Icon, { path: "mdiAccount" }), Q = /* @__PURE__ */ s(r, { autoComplete: "off", name: "username", placeholder: "Enter your username" }), e[32] = A, e[33] = Q) : (A = e[32], Q = e[33]);
94
+ let x;
95
+ e[34] !== t.data.username || e[35] !== t.isLoading || e[36] !== h || e[37] !== g ? (x = /* @__PURE__ */ o(H.Field, { children: [
96
+ T,
97
+ /* @__PURE__ */ o(r.Container, { disabled: P, error: h, required: !0, value: t.data.username, onChange: g, children: [
98
+ A,
99
+ Q
100
+ ] })
101
+ ] }), e[34] = t.data.username, e[35] = t.isLoading, e[36] = h, e[37] = g, e[38] = x) : x = e[38];
102
+ let U;
103
+ e[39] === Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ s(K, { children: "password" }), e[39] = U) : U = e[39];
104
+ const X = t.isLoading;
105
+ let y;
106
+ e[40] !== t ? (y = t.hasError("password"), e[40] = t, e[41] = y) : y = e[41];
107
+ let L;
108
+ e[42] !== t ? (L = (i) => t.setData("password", i), e[42] = t, e[43] = L) : L = e[43];
109
+ let G, $, j;
110
+ e[44] === Symbol.for("react.memo_cache_sentinel") ? (G = /* @__PURE__ */ s(r.Icon, { path: "mdiLockOutline" }), $ = /* @__PURE__ */ s(r, { autoComplete: "off", name: "password", placeholder: "Enter your password" }), j = /* @__PURE__ */ s(r.VisibilityButton, {}), e[44] = G, e[45] = $, e[46] = j) : (G = e[44], $ = e[45], j = e[46]);
111
+ let b;
112
+ e[47] !== t.data.password || e[48] !== t.isLoading || e[49] !== y || e[50] !== L ? (b = /* @__PURE__ */ o(H.Field, { children: [
113
+ U,
114
+ /* @__PURE__ */ o(r.Container, { disabled: X, error: y, required: !0, type: "password", value: t.data.password, onChange: L, children: [
115
+ G,
116
+ $,
117
+ j
109
118
  ] })
110
- ] }) });
119
+ ] }), e[47] = t.data.password, e[48] = t.isLoading, e[49] = y, e[50] = L, e[51] = b) : b = e[51];
120
+ let w;
121
+ e[52] !== t.hasErrors ? (w = t.hasErrors ? /* @__PURE__ */ s(ee, { icon: "mdiAlertCircleOutline", children: "username or password is wrong" }) : null, e[52] = t.hasErrors, e[53] = w) : w = e[53];
122
+ const Y = t.isLoading ? "Signing in..." : "Sign In";
123
+ let E;
124
+ e[54] !== t.isLoading || e[55] !== Y ? (E = /* @__PURE__ */ s(te, { disabled: t.isLoading, fullWidth: !0, isLoading: t.isLoading, size: "sm", type: "submit", variant: "primary", children: Y }), e[54] = t.isLoading, e[55] = Y, e[56] = E) : E = e[56];
125
+ let _;
126
+ e[57] !== W || e[58] !== x || e[59] !== b || e[60] !== w || e[61] !== E ? (_ = /* @__PURE__ */ o(H, { className: "space-y-6", onSubmit: W, children: [
127
+ x,
128
+ b,
129
+ w,
130
+ E
131
+ ] }), e[57] = W, e[58] = x, e[59] = b, e[60] = w, e[61] = E, e[62] = _) : _ = e[62];
132
+ let v;
133
+ e[63] !== p || e[64] !== _ ? (v = /* @__PURE__ */ o("div", { className: "ox-gray-border rounded-lg bg-gray-50 p-6", children: [
134
+ p,
135
+ _
136
+ ] }), e[63] = p, e[64] = _, e[65] = v) : v = e[65];
137
+ let k;
138
+ return e[66] !== d || e[67] !== m || e[68] !== v ? (k = /* @__PURE__ */ s("div", { className: m, ...d, children: v }), e[66] = d, e[67] = m, e[68] = v, e[69] = k) : k = e[69], k;
111
139
  };
112
140
  export {
113
- C as OxLogin
141
+ pe as OxLogin
114
142
  };
package/dist/pages.d.ts CHANGED
@@ -1,10 +1,10 @@
1
+ import { ComponentPropsWithRef } from 'react';
1
2
  import { DocumentNode } from 'graphql';
2
- import { HTMLAttributes } from 'react';
3
3
  import { JSX } from 'react/jsx-runtime';
4
4
 
5
5
  export declare const OxLogin: ({ cacheQuery, className, mutation, onSubmit, subtitle, title, ...props }: OxLoginProps) => JSX.Element;
6
6
 
7
- export declare interface OxLoginProps extends HTMLAttributes<HTMLDivElement> {
7
+ export declare interface OxLoginProps extends ComponentPropsWithRef<'div'> {
8
8
  cacheQuery?: DocumentNode;
9
9
  mutation?: DocumentNode;
10
10
  onSubmit: (response: unknown) => void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/ui-DRaffjpU.js");const o=require("../chunks/useAuth-DxoDe3YA.js"),s=require("../chunks/hooks-DB942JYB.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/ui-DRRDAnVI.js");const d=require("../chunks/useAuth-DxoDe3YA.js"),a=require("../chunks/hooks-UiKjBucd.js"),g=u=>{const{children:i,onAuthenticated:n,onLoading:t}=u,o=n===void 0?null:n,r=t===void 0?null:t,{isLoggedIn:s,loading:e}=d.useOxAuth();return e?r:s?o:i},h=u=>{const{children:i,onLoading:n,onUnauthenticated:t}=u,o=n===void 0?null:n,r=t===void 0?null:t,{isLoggedIn:s,loading:e}=d.useOxAuth();return e?o:s?i:r},O=u=>{const{children:i,onLoading:n,onUnauthorized:t,roles:o}=u,r=n===void 0?null:n,s=t===void 0?null:t,e=o===void 0?["admin"]:o,{loading:l,user:c}=d.useOxAuth();return l?r:!c||a.isEmpty(e)||!e.includes(c.role)?s:i};exports.OxGuestRoute=g;exports.OxProtectedRoute=h;exports.OxRoleRoute=O;