@upsoftware_tech/svarium 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -1 +1,15 @@
1
+ resolve: (name) => {
2
+ const localPages = import.meta.glob('./pages/**/*.vue', { eager: true });
3
+ const vendorPages = import.meta.glob('../../node_modules/@upsoftware_tech/svarium/src/pages/**/*.vue', { eager: true });
4
+ let page = localPages[`./pages/${name}.vue`];
5
+ if (!page) {
6
+ page = vendorPages[`../../node_modules/@upsoftware_tech/svarium/src/pages/${name}.vue`];
7
+ }
8
+ if (!page) {
9
+ throw new Error(`Page not found: ${name}`);
10
+ }
11
+ page.default.layout = page.default.layout || AppLayout;
12
+ return page;
13
+ },
14
+
1
15
  @source "../../node_modules/@upsoftware_tech/svarium/dist/**/*.{js,mjs,vue}";
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import { ComputedRef } from 'vue';
7
7
  import { DefineComponent } from 'vue';
8
8
  import { ExtractPropTypes } from 'vue';
9
9
  import { HTMLAttributes } from 'vue';
10
+ import { Icon } from '@iconify/vue';
10
11
  import { Plugin as Plugin_2 } from 'vue';
11
12
  import { PrimitiveProps } from 'reka-ui';
12
13
  import { PublicProps } from 'vue';
@@ -45,12 +46,25 @@ addon: string;
45
46
 
46
47
  declare const __VLS_component_6: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
47
48
 
48
- declare const __VLS_component_7: DefineComponent<Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_8> & Readonly<{}>, {
49
+ declare const __VLS_component_7: DefineComponent<Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_9> & Readonly<{}>, {
49
50
  label: string;
50
51
  name: string;
51
52
  hint: string;
53
+ value: string | number | boolean;
52
54
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
53
55
 
56
+ declare const __VLS_component_8: DefineComponent<Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_13> & Readonly<{}>, {
57
+ offset: number;
58
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
59
+ sidebar: HTMLDivElement;
60
+ sidebar_header: HTMLDivElement;
61
+ sidebar_content: HTMLDivElement;
62
+ sidebar_bottom: HTMLDivElement;
63
+ sidebar_footer: HTMLDivElement;
64
+ }, any>;
65
+
66
+ declare const __VLS_component_9: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
67
+
54
68
  declare type __VLS_Props = Props_4;
55
69
 
56
70
  declare type __VLS_PublicProps = {
@@ -124,6 +138,32 @@ declare function __VLS_template_7(): {
124
138
  rootEl: HTMLDivElement;
125
139
  };
126
140
 
141
+ declare function __VLS_template_8(): {
142
+ attrs: Partial<{}>;
143
+ slots: {
144
+ header?(_: {}): any;
145
+ bottom?(_: {}): any;
146
+ footer?(_: {}): any;
147
+ };
148
+ refs: {
149
+ sidebar: HTMLDivElement;
150
+ sidebar_header: HTMLDivElement;
151
+ sidebar_content: HTMLDivElement;
152
+ sidebar_bottom: HTMLDivElement;
153
+ sidebar_footer: HTMLDivElement;
154
+ };
155
+ rootEl: any;
156
+ };
157
+
158
+ declare function __VLS_template_9(): {
159
+ attrs: Partial<{}>;
160
+ slots: {
161
+ default?(_: {}): any;
162
+ };
163
+ refs: {};
164
+ rootEl: any;
165
+ };
166
+
127
167
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
128
168
 
129
169
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
@@ -138,6 +178,10 @@ declare type __VLS_TemplateResult_6 = ReturnType<typeof __VLS_template_6>;
138
178
 
139
179
  declare type __VLS_TemplateResult_7 = ReturnType<typeof __VLS_template_7>;
140
180
 
181
+ declare type __VLS_TemplateResult_8 = ReturnType<typeof __VLS_template_8>;
182
+
183
+ declare type __VLS_TemplateResult_9 = ReturnType<typeof __VLS_template_9>;
184
+
141
185
  declare type __VLS_WithTemplateSlots<T, S> = T & {
142
186
  new (): {
143
187
  $slots: S;
@@ -180,6 +224,18 @@ declare type __VLS_WithTemplateSlots_7<T, S> = T & {
180
224
  };
181
225
  };
182
226
 
227
+ declare type __VLS_WithTemplateSlots_8<T, S> = T & {
228
+ new (): {
229
+ $slots: S;
230
+ };
231
+ };
232
+
233
+ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
234
+ new (): {
235
+ $slots: S;
236
+ };
237
+ };
238
+
183
239
  export declare const AuthLayout: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
184
240
 
185
241
  export declare const BlockFormLogin: DefineComponent<Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_5> & Readonly<{}>, {
@@ -190,15 +246,30 @@ submitLabel: string;
190
246
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
191
247
 
192
248
  export declare const BlockFormLoginMethodVerification: DefineComponent<Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_6> & Readonly<{}>, {
193
- verificationMethods: VerificationMethod_2[];
249
+ verificationMethods: VerificationMethod[] | Record<string, VerificationMethod>;
194
250
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
195
251
 
196
- export declare const BlockPageLogin: DefineComponent<Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_7> & Readonly<{}>, {
252
+ export declare const BlockFormVerification: DefineComponent<Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_7> & Readonly<{}>, {
253
+ session: string;
254
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
255
+
256
+ export declare const BlockPageLogin: DefineComponent<Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_8> & Readonly<{}>, {
257
+ title: string;
258
+ showResetLink: boolean;
259
+ resetLabel: string;
260
+ submitLabel: string;
197
261
  socials: SocialLink[];
262
+ showRegisterLink: boolean;
263
+ registerLabel: string;
264
+ registerLinkLabel: string;
265
+ registerLink: string;
266
+ subtitle: string;
198
267
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
199
268
 
200
269
  export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
201
270
 
271
+ export declare const ButtonClear: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLButtonElement>;
272
+
202
273
  export declare const ButtonIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
203
274
 
204
275
  export declare const ButtonSubmit: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
@@ -224,6 +295,8 @@ type: (ObjectConstructor | StringConstructor)[];
224
295
  };
225
296
  }>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLUListElement>;
226
297
 
298
+ export { Icon }
299
+
227
300
  export declare const Input: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
228
301
 
229
302
  export declare type LogoConfig = string | {
@@ -231,6 +304,28 @@ export declare type LogoConfig = string | {
231
304
  small?: ThemeableSrc;
232
305
  };
233
306
 
307
+ export declare const NavigationVertical: DefineComponent<Props_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_14> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
308
+
309
+ declare interface OptionGroup {
310
+ label: string;
311
+ items: OptionItem[];
312
+ }
313
+
314
+ declare interface OptionItem {
315
+ id?: string | number;
316
+ name?: string;
317
+ label?: string;
318
+ icon?: string;
319
+ value?: string | number;
320
+ }
321
+
322
+ export declare const Pin: DefineComponent<Props_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_10> & Readonly<{}>, {
323
+ label: string;
324
+ name: string;
325
+ hint: string;
326
+ maxlength: number;
327
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
328
+
234
329
  declare const plugin: Plugin_2<[SvariumOptions]>;
235
330
  export default plugin;
236
331
 
@@ -240,18 +335,51 @@ declare interface Props extends PrimitiveProps {
240
335
  class?: HTMLAttributes["class"];
241
336
  }
242
337
 
338
+ declare interface Props_10 {
339
+ name?: string;
340
+ maxlength?: number;
341
+ hint?: string;
342
+ label?: string;
343
+ }
344
+
345
+ declare interface Props_11 {
346
+ uri?: string;
347
+ data?: any;
348
+ columns?: any;
349
+ rows?: any;
350
+ }
351
+
352
+ declare interface Props_12 {
353
+ placeholder?: string;
354
+ options?: OptionItem[] | OptionGroup[];
355
+ name?: string;
356
+ hint?: string;
357
+ label?: string;
358
+ clear?: boolean;
359
+ modelValue?: any;
360
+ }
361
+
362
+ declare interface Props_13 {
363
+ navigation_id: string | number;
364
+ offset: number;
365
+ }
366
+
367
+ declare interface Props_14 {
368
+ navigation_id: string | number;
369
+ }
370
+
243
371
  declare interface Props_2 {
244
372
  action: string;
245
373
  }
246
374
 
247
375
  declare interface Props_3 {
248
- name: string;
376
+ name?: string;
249
377
  label?: string;
250
378
  hint?: string;
251
379
  }
252
380
 
253
381
  declare interface Props_4 {
254
- name: string;
382
+ name?: string;
255
383
  type?: string;
256
384
  password?: boolean;
257
385
  label?: string;
@@ -268,15 +396,29 @@ declare interface Props_5 {
268
396
  }
269
397
 
270
398
  declare interface Props_6 {
271
- verificationMethods: VerificationMethod_2[];
399
+ verificationMethods?: VerificationMethod[] | Record<string, VerificationMethod>;
272
400
  session: string;
273
401
  }
274
402
 
275
403
  declare interface Props_7 {
276
- socials?: SocialLink[];
404
+ session: string;
277
405
  }
278
406
 
279
407
  declare interface Props_8 {
408
+ socials?: SocialLink[];
409
+ showRegisterLink?: boolean;
410
+ registerLabel?: string;
411
+ registerLinkLabel?: string;
412
+ registerLink?: string;
413
+ showResetLink?: boolean;
414
+ title?: string;
415
+ subtitle?: string;
416
+ resetLabel?: string;
417
+ submitLabel?: string;
418
+ }
419
+
420
+ declare interface Props_9 {
421
+ value?: string | number | boolean;
280
422
  name: string;
281
423
  label?: string;
282
424
  hint?: string;
@@ -284,9 +426,28 @@ declare interface Props_8 {
284
426
 
285
427
  export declare const Radio: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
286
428
 
429
+ export declare const ScrollArea: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
430
+
431
+ export declare const Select: DefineComponent<Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
432
+ "update:modelValue": (...args: any[]) => void;
433
+ }, string, PublicProps, Readonly<Props_12> & Readonly<{
434
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
435
+ }>, {
436
+ options: OptionItem[] | OptionGroup[];
437
+ placeholder: string;
438
+ clear: boolean;
439
+ modelValue: any;
440
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
441
+
442
+ export declare const Sidebar: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
443
+
444
+ export declare const SidebarToggle: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
445
+
446
+ export declare const SidebarUser: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
447
+
287
448
  declare interface SocialLink {
288
449
  id: string;
289
- url: string;
450
+ url?: string;
290
451
  label: string;
291
452
  icon: string;
292
453
  }
@@ -304,6 +465,10 @@ export declare interface SvariumState {
304
465
  logo?: LogoConfig;
305
466
  }
306
467
 
468
+ export declare const Table: DefineComponent<Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_11> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
469
+ tableRef: HTMLDivElement;
470
+ }, HTMLDivElement>;
471
+
307
472
  export declare type ThemeableSrc = string | {
308
473
  light: string;
309
474
  dark: string;
@@ -343,11 +508,12 @@ export declare interface VerificationMethod {
343
508
  disabled: boolean;
344
509
  }
345
510
 
346
- declare interface VerificationMethod_2 {
347
- id: string;
348
- label: string;
349
- description: string;
350
- disabled: boolean;
351
- }
352
-
353
511
  export { }
512
+
513
+
514
+ declare module '@tanstack/vue-table' {
515
+ interface ColumnMeta<TData extends RowData, TValue> {
516
+ type?: 'string' | 'int' | 'bool' | 'select';
517
+ options?: OptionItem[];
518
+ }
519
+ }
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <BlockPageLogin :socials="socials" :showRegisterLink="showRegisterLink" :registerLabel="registerLabel" :registerLinkLabel="registerLinkLabel" :registerLink="registerLink" :showResetLink="showResetLink" :title="title" :subtitle="subtitle" :resetLabel="resetLabel" :submitLabel="submitLabel" />
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ import { AuthLayout, BlockPageLogin } from '@upsoftware_tech/svarium';
7
+
8
+ interface SocialLink {
9
+ id: string;
10
+ url?: string;
11
+ label: string;
12
+ icon: string;
13
+ }
14
+
15
+ interface Props {
16
+ socials?: SocialLink[],
17
+ showRegisterLink?: boolean;
18
+ registerLabel?: string;
19
+ registerLinkLabel?: string;
20
+ registerLink?: string;
21
+ showResetLink?: boolean;
22
+ title?: string;
23
+ subtitle?: string;
24
+ resetLabel?: string,
25
+ submitLabel?: string
26
+ }
27
+
28
+ withDefaults(defineProps<Props>(), {
29
+ socials: () => [],
30
+ showRegisterLink: true,
31
+ registerLabel: 'If you don’t have an account',
32
+ registerLinkLabel: 'sign up here',
33
+ registerLink: '/auth/register',
34
+ showResetLink: true,
35
+ title: 'Welcome back!',
36
+ subtitle: 'Enter your email address and password',
37
+ resetLabel: 'Forgot your password?',
38
+ submitLabel: 'Log in with your email address'
39
+ });
40
+
41
+ defineOptions({
42
+ layout: AuthLayout,
43
+ });
44
+ </script>
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div class="flex flex-col gap-6">
3
+ <div class="flex flex-col gap-6">
4
+ <div class="flex gap-x-4">
5
+ <div>
6
+ <Link :href="`/auth/login/method/${session}`" class="w-8 h-8 flex items-center justify-center rounded-full hover:bg-zinc-100 dark:hover:bg-zinc-800">
7
+ <Icon icon="lucide:chevron-left" class="text-xl" />
8
+ </Link>
9
+ </div>
10
+ <div class="flex flex-1 flex-col gap-2 pt-0.5">
11
+ <h1 class="text-xl font-bold">{{ $t('Verification code') }}</h1>
12
+ <div class="text-sm">{{ $t('Enter the verification code you received') }}</div>
13
+ </div>
14
+ </div>
15
+ <div class="flex flex-col gap-4">
16
+ <BlockFormVerification :session="session" />
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import { AuthLayout, BlockFormVerification } from '@upsoftware_tech/svarium';
24
+ import { Icon } from '@iconify/vue';
25
+ import { Link } from "@inertiajs/vue3";
26
+
27
+ defineOptions({
28
+ layout: AuthLayout
29
+ })
30
+
31
+ interface Props {
32
+ session: string
33
+ }
34
+
35
+ withDefaults(defineProps<Props>(), {
36
+ session: ''
37
+ })
38
+ </script>