@upsoftware_tech/svarium 1.0.4 → 1.0.5

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/index.d.ts CHANGED
@@ -16,9 +16,7 @@ import { VariantProps } from 'class-variance-authority';
16
16
 
17
17
  declare const __VLS_component: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
18
18
 
19
- declare const __VLS_component_10: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
20
-
21
- declare const __VLS_component_11: DefineComponent<Props_19, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_19> & Readonly<{}>, {
19
+ declare const __VLS_component_10: DefineComponent<Props_21, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_21> & Readonly<{}>, {
22
20
  right: boolean;
23
21
  left: boolean;
24
22
  orientation: "horizontal" | "vertical";
@@ -68,15 +66,7 @@ value: string | number | boolean;
68
66
  hint: string;
69
67
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
70
68
 
71
- declare const __VLS_component_9: DefineComponent<Props_18, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_18> & Readonly<{}>, {
72
- offset: number;
73
- }, {}, {}, {}, string, ComponentProvideOptions, false, {
74
- sidebar: HTMLDivElement;
75
- sidebar_header: HTMLDivElement;
76
- sidebar_content: HTMLDivElement;
77
- sidebar_bottom: HTMLDivElement;
78
- sidebar_footer: HTMLDivElement;
79
- }, any>;
69
+ declare const __VLS_component_9: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
80
70
 
81
71
  declare type __VLS_Props = Props;
82
72
 
@@ -100,15 +90,6 @@ declare function __VLS_template(): {
100
90
  };
101
91
 
102
92
  declare function __VLS_template_10(): {
103
- attrs: Partial<{}>;
104
- slots: {
105
- default?(_: {}): any;
106
- };
107
- refs: {};
108
- rootEl: any;
109
- };
110
-
111
- declare function __VLS_template_11(): {
112
93
  attrs: Partial<{}>;
113
94
  slots: {
114
95
  default?(_: {}): any;
@@ -187,17 +168,9 @@ declare function __VLS_template_8(): {
187
168
  declare function __VLS_template_9(): {
188
169
  attrs: Partial<{}>;
189
170
  slots: {
190
- header?(_: {}): any;
191
- bottom?(_: {}): any;
192
- footer?(_: {}): any;
193
- };
194
- refs: {
195
- sidebar: HTMLDivElement;
196
- sidebar_header: HTMLDivElement;
197
- sidebar_content: HTMLDivElement;
198
- sidebar_bottom: HTMLDivElement;
199
- sidebar_footer: HTMLDivElement;
171
+ default?(_: {}): any;
200
172
  };
173
+ refs: {};
201
174
  rootEl: any;
202
175
  };
203
176
 
@@ -205,8 +178,6 @@ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
205
178
 
206
179
  declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
207
180
 
208
- declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
209
-
210
181
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
211
182
 
212
183
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -235,12 +206,6 @@ declare type __VLS_WithTemplateSlots_10<T, S> = T & {
235
206
  };
236
207
  };
237
208
 
238
- declare type __VLS_WithTemplateSlots_11<T, S> = T & {
239
- new (): {
240
- $slots: S;
241
- };
242
- };
243
-
244
209
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
245
210
  new (): {
246
211
  $slots: S;
@@ -291,6 +256,13 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
291
256
 
292
257
  export declare const AppLayout: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
293
258
 
259
+ export declare const Aside: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
260
+
261
+ declare interface AsideConfig {
262
+ enabled: boolean;
263
+ width?: number;
264
+ }
265
+
294
266
  export declare const AuthLayout: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
295
267
 
296
268
  export declare const BlockFormLogin: DefineComponent<Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_7> & Readonly<{}>, {
@@ -363,9 +335,16 @@ export declare const ColorMode: DefineComponent<Props_3, {}, {}, {}, {}, Compone
363
335
  declare type ColorModeVariants = VariantProps<typeof colorModeVariants>;
364
336
 
365
337
  declare const colorModeVariants: (props?: ({
366
- variant?: "default" | "switch" | "group" | "dropdown" | null | undefined;
338
+ variant?: "default" | "switch" | "dropdown" | "group" | null | undefined;
367
339
  } & ClassProp) | undefined) => string;
368
340
 
341
+ declare interface ComponentProps {
342
+ name?: string;
343
+ props?: {
344
+ [key: string]: any;
345
+ };
346
+ }
347
+
369
348
  export declare const FlashMessage: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
370
349
 
371
350
  export declare const Form: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
@@ -393,7 +372,7 @@ export declare type LogoConfig = string | {
393
372
  small?: ThemeableSrc;
394
373
  };
395
374
 
396
- export declare const NavigationVertical: DefineComponent<Props_20, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_20> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
375
+ export declare const NavigationVertical: DefineComponent<Props_22, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_22> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
397
376
 
398
377
  declare interface OptionGroup {
399
378
  label: string;
@@ -495,14 +474,15 @@ declare interface Props_17 {
495
474
  }
496
475
 
497
476
  declare interface Props_18 {
498
- navigation_id: string | number;
499
477
  offset?: number;
500
478
  }
501
479
 
502
480
  declare interface Props_19 {
503
- orientation?: 'horizontal' | 'vertical';
504
- left?: boolean;
505
- right?: boolean;
481
+ themeToggle?: boolean;
482
+ locale?: boolean;
483
+ twoFactor?: boolean;
484
+ activityLog?: boolean;
485
+ logout?: boolean;
506
486
  }
507
487
 
508
488
  declare interface Props_2 extends PrimitiveProps {
@@ -512,6 +492,17 @@ declare interface Props_2 extends PrimitiveProps {
512
492
  }
513
493
 
514
494
  declare interface Props_20 {
495
+ title?: string;
496
+ showBorder?: boolean;
497
+ }
498
+
499
+ declare interface Props_21 {
500
+ orientation?: 'horizontal' | 'vertical';
501
+ left?: boolean;
502
+ right?: boolean;
503
+ }
504
+
505
+ declare interface Props_22 {
515
506
  navigation_id: string | number;
516
507
  }
517
508
 
@@ -565,7 +556,7 @@ declare interface Props_9 {
565
556
 
566
557
  export declare const Radio: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
567
558
 
568
- export declare const ScrollArea: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
559
+ export declare const ScrollArea: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
569
560
 
570
561
  export declare const Select: DefineComponent<Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
571
562
  "update:modelValue": (...args: any[]) => void;
@@ -578,13 +569,63 @@ modelValue: any;
578
569
  options: OptionItem[] | OptionGroup[];
579
570
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
580
571
 
581
- export declare const Separator: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
572
+ export declare const Separator: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
582
573
 
583
- export declare const Sidebar: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
574
+ export declare const Sidebar: DefineComponent<Props_18, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_18> & Readonly<{}>, {
575
+ offset: number;
576
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
577
+ sidebar_root: HTMLDivElement;
578
+ sidebar_header: HTMLDivElement;
579
+ sidebar_top: HTMLDivElement;
580
+ sidebar_content: HTMLDivElement;
581
+ sidebar_bottom: HTMLDivElement;
582
+ sidebar_footer: HTMLDivElement;
583
+ }, any>;
584
584
 
585
- export declare const SidebarToggle: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
585
+ declare interface SidebarBottomConfig {
586
+ enabled: boolean;
587
+ component?: ComponentProps;
588
+ }
586
589
 
587
- export declare const SidebarUser: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
590
+ declare interface SidebarConfig {
591
+ enabled: boolean;
592
+ width?: number;
593
+ position?: 'right' | 'left';
594
+ component?: ComponentProps;
595
+ themeToggle?: boolean;
596
+ minimal?: boolean;
597
+ header?: SidebarHeaderConfig;
598
+ footer?: SidebarFooterConfig;
599
+ top?: SidebarTopConfig;
600
+ bottom?: SidebarBottomConfig;
601
+ }
602
+
603
+ declare interface SidebarFooterConfig {
604
+ enabled: boolean;
605
+ component?: ComponentProps;
606
+ }
607
+
608
+ export declare const SidebarHeader: DefineComponent<Props_20, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_20> & Readonly<{}>, {
609
+ showBorder: boolean;
610
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
611
+
612
+ declare interface SidebarHeaderConfig {
613
+ enabled: boolean;
614
+ }
615
+
616
+ export declare const SidebarToggle: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
617
+
618
+ declare interface SidebarTopConfig {
619
+ enabled: boolean;
620
+ }
621
+
622
+ export declare const SidebarUser: DefineComponent<Props_19, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_19> & Readonly<{}>, {
623
+ locale: boolean;
624
+ themeToggle: boolean;
625
+ twoFactor: boolean;
626
+ activityLog: boolean;
627
+ logout: boolean;
628
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
588
629
 
589
630
  declare interface SocialLink {
590
631
  id: string;
@@ -629,6 +670,7 @@ export declare function (): {
629
670
  };
630
671
 
631
672
  export declare function (): {
673
+ aside: ComputedRef<AsideConfig>;
632
674
  state: SvariumState;
633
675
  logo: ComputedRef< {
634
676
  default: {
@@ -640,6 +682,7 @@ export declare function (): {
640
682
  dark: string;
641
683
  };
642
684
  }>;
685
+ sidebar: ComputedRef<SidebarConfig>;
643
686
  getLogo: (variant: "default" | "small", mode: "light" | "dark") => string;
644
687
  };
645
688
 
@@ -665,6 +708,13 @@ export declare interface VerificationMethod {
665
708
  export { }
666
709
 
667
710
 
711
+ declare module 'vue' {
712
+ interface ComponentCustomProperties {
713
+ route: typeof import('ziggy-js').route;
714
+ }
715
+ }
716
+
717
+
668
718
  declare module '@tanstack/vue-table' {
669
719
  interface ColumnMeta<TData extends RowData, TValue> {
670
720
  type?: 'string' | 'int' | 'bool' | 'select';
@@ -35,12 +35,12 @@ const props = withDefaults(defineProps<Props>(), {
35
35
  showRegisterLink: true,
36
36
  registerLabel: 'If you don’t have an account',
37
37
  registerLinkLabel: 'sign up here',
38
- registerLink: '/auth/register',
38
+ registerLink: 'panel.auth.register',
39
39
  showResetLink: true,
40
40
  title: 'Welcome back!',
41
41
  subtitle: 'Enter your email address and password',
42
42
  resetLabel: 'Forgot your password?',
43
- resetLink: '/auth/reset',
43
+ resetLink: 'panel.auth.reset',
44
44
  submitLabel: 'Log in with your email address',
45
45
  minimal: false,
46
46
  cols: 2,
@@ -3,7 +3,7 @@
3
3
  <div class="flex flex-col gap-6">
4
4
  <div class="flex gap-x-4">
5
5
  <div>
6
- <Link :href="`/auth/reset`" class="w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-100 dark:hover:bg-gray-800">
6
+ <Link :href="route('panel.auth.reset')" class="w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-100 dark:hover:bg-gray-800">
7
7
  <Icon icon="lucide:chevron-left" class="text-xl" />
8
8
  </Link>
9
9
  </div>
@@ -3,7 +3,7 @@
3
3
  <div class="flex flex-col gap-6">
4
4
  <div class="flex gap-x-4">
5
5
  <div>
6
- <Link :href="`/auth/login/method/${session}`" class="w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-100 dark:hover:bg-gray-800">
6
+ <Link :href="route(routeName.name, routeName.params)" class="w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-100 dark:hover:bg-gray-800">
7
7
  <Icon icon="lucide:chevron-left" class="text-xl" />
8
8
  </Link>
9
9
  </div>
@@ -23,6 +23,7 @@
23
23
  import { AuthLayout, BlockFormVerification } from '@upsoftware_tech/svarium';
24
24
  import { Icon } from '@iconify/vue';
25
25
  import { Link } from "@inertiajs/vue3";
26
+ import {computed} from "vue";
26
27
 
27
28
  defineOptions({
28
29
  layout: AuthLayout
@@ -38,4 +39,13 @@ const props = withDefaults(defineProps<Props>(), {
38
39
  session: '',
39
40
  remember: false
40
41
  })
42
+
43
+ const routeName = computed(() => {
44
+ if (props.type === 'login') {
45
+ return {name: 'panel.auth.method', params: { type: 'login', userAuth: props.session}};
46
+ } else if (props.type === 'reset') {
47
+ return {name: 'panel.auth.reset', params: {}};
48
+ }
49
+ return {name: 'panel.auth.login', params: {}};
50
+ })
41
51
  </script>