mgv-backoffice 1.18.0 → 1.20.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 (80) hide show
  1. package/README.md +152 -9
  2. package/dist/{src/components → components}/BaseActionButton.vue.d.ts +9 -13
  3. package/dist/{src/components → components}/BaseAlert.vue.d.ts +3 -2
  4. package/dist/components/BaseAppLayout.vue.d.ts +28 -0
  5. package/dist/{src/components → components}/BaseBadge.vue.d.ts +7 -11
  6. package/dist/{src/components → components}/BaseBreadcrumb.vue.d.ts +3 -2
  7. package/dist/{src/components → components}/BaseButton.vue.d.ts +9 -12
  8. package/dist/{src/components → components}/BaseCollapsibleSection.vue.d.ts +7 -11
  9. package/dist/{src/components → components}/BaseConfirmModal.vue.d.ts +9 -12
  10. package/dist/{src/components → components}/BaseCopyButton.vue.d.ts +2 -1
  11. package/dist/{src/components → components}/BaseEntityPickerModal.vue.d.ts +8 -16
  12. package/dist/components/BaseGoogleSignInButton.vue.d.ts +22 -0
  13. package/dist/{src/components → components}/BaseLine.vue.d.ts +2 -1
  14. package/dist/components/BaseLoginForm.vue.d.ts +51 -0
  15. package/dist/{src/components → components}/BaseLogo.vue.d.ts +2 -1
  16. package/dist/{src/components → components}/BaseModal.vue.d.ts +7 -11
  17. package/dist/{src/components → components}/BaseModalShell.vue.d.ts +19 -17
  18. package/dist/{src/components → components}/BaseNotFoundPage.vue.d.ts +3 -2
  19. package/dist/components/BaseNotificationPanel.vue.d.ts +19 -0
  20. package/dist/components/BasePageHeader.vue.d.ts +28 -0
  21. package/dist/{src/components → components}/BaseRow.vue.d.ts +8 -12
  22. package/dist/components/BaseSidebar.vue.d.ts +47 -0
  23. package/dist/{src/components → components}/BaseSpinner.vue.d.ts +2 -1
  24. package/dist/{src/components → components}/BaseTextInputModal.vue.d.ts +8 -16
  25. package/dist/{src/components → components}/BaseToast.vue.d.ts +2 -1
  26. package/dist/{src/components → components}/BaseToolbarButton.vue.d.ts +9 -13
  27. package/dist/components/ColoredSquares.vue.d.ts +23 -0
  28. package/dist/{src/components → components}/EarningsCard.vue.d.ts +3 -2
  29. package/dist/{src/components → components}/EuroAmount.vue.d.ts +2 -1
  30. package/dist/{src/components → components}/Pagination.vue.d.ts +3 -2
  31. package/dist/{src/components → components}/TrendArrow.vue.d.ts +2 -1
  32. package/dist/composables/useNotifications.d.ts +29 -0
  33. package/dist/composables/useSidebarCollapse.d.ts +22 -0
  34. package/dist/index.d.ts +62 -1
  35. package/dist/types/auth.d.ts +11 -0
  36. package/dist/types/notification.d.ts +20 -0
  37. package/dist/ui-lib.css +2 -2
  38. package/dist/ui-lib.js +1088 -671
  39. package/dist/ui-lib.umd.cjs +1 -1
  40. package/package.json +14 -13
  41. package/src/components/BaseAppLayout.vue +4 -1
  42. package/src/components/BaseGoogleSignInButton.vue +83 -0
  43. package/src/components/BaseLoginForm.test.ts +52 -0
  44. package/src/components/BaseLoginForm.vue +204 -0
  45. package/src/components/BaseNotificationPanel.vue +183 -0
  46. package/src/components/BaseSidebar.vue +140 -31
  47. package/src/composables/useNotifications.test.ts +64 -0
  48. package/src/composables/useNotifications.ts +81 -0
  49. package/src/composables/useSidebarCollapse.ts +64 -0
  50. package/src/index.ts +8 -0
  51. package/src/types/auth.ts +11 -0
  52. package/src/types/notification.ts +20 -0
  53. package/dist/src/components/BaseAppLayout.vue.d.ts +0 -31
  54. package/dist/src/components/BasePageHeader.vue.d.ts +0 -31
  55. package/dist/src/components/BaseSidebar.vue.d.ts +0 -46
  56. package/dist/src/components/ColoredSquares.vue.d.ts +0 -27
  57. package/dist/src/index.d.ts +0 -54
  58. /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
  59. /package/dist/{src/composables → composables}/useEscapeKey.d.ts +0 -0
  60. /package/dist/{src/composables → composables}/useMobileSidebar.d.ts +0 -0
  61. /package/dist/{src/composables → composables}/useTheme.d.ts +0 -0
  62. /package/dist/{src/composables → composables}/useThemeClasses.d.ts +0 -0
  63. /package/dist/{src/composables → composables}/useToast.d.ts +0 -0
  64. /package/dist/{src/enums → enums}/AlertEnum.d.ts +0 -0
  65. /package/dist/{src/enums → enums}/BaseBadgeEnum.d.ts +0 -0
  66. /package/dist/{src/enums → enums}/BaseButtonEnum.d.ts +0 -0
  67. /package/dist/{src/enums → enums}/BaseButtonSizeEnum.d.ts +0 -0
  68. /package/dist/{src/enums → enums}/BaseLogoEnum.d.ts +0 -0
  69. /package/dist/{src/enums → enums}/BaseModalEnum.d.ts +0 -0
  70. /package/dist/{src/enums → enums}/BaseToastEnum.d.ts +0 -0
  71. /package/dist/{src/enums → enums}/ColorsEnums.d.ts +0 -0
  72. /package/dist/{src/enums → enums}/LineEnum.d.ts +0 -0
  73. /package/dist/{src/enums → enums}/PositioningEnum.d.ts +0 -0
  74. /package/dist/{src/types → types}/entityPicker.d.ts +0 -0
  75. /package/dist/{src/types → types}/sidebar.d.ts +0 -0
  76. /package/dist/{src/utils → utils}/format.d.ts +0 -0
  77. /package/dist/{src/utils → utils}/httpColors.d.ts +0 -0
  78. /package/dist/{src/utils → utils}/pnl.d.ts +0 -0
  79. /package/dist/{src/utils → utils}/sanitizeHtml.d.ts +0 -0
  80. /package/dist/{src/utils → utils}/util.d.ts +0 -0
package/README.md CHANGED
@@ -13,9 +13,12 @@ npm install mgv-backoffice
13
13
  These must be installed in your project:
14
14
 
15
15
  ```bash
16
- npm install vue@^3.3.0 vue-router@^4.0.0 @heroicons/vue@^2.0.0
16
+ npm install vue@^3.5.0 vue-router@^5.0.0 @heroicons/vue@^2.0.0
17
17
  ```
18
18
 
19
+ > `vue-router` 5.x is required (peer range `^5.0.0`) — it's what the library is
20
+ > developed and tested against. Upgrade from Router 4 before installing this library.
21
+
19
22
  ### Import Styles
20
23
 
21
24
  Include the library's stylesheet in your app entry point:
@@ -227,17 +230,17 @@ SVG brand logo component.
227
230
 
228
231
  | Prop | Type | Default | Description |
229
232
  | ------ | -------- | ---------------------- | ------------ |
230
- | `size` | `String` | `BaseLoginEnum.MEDIUM` | Logo size |
233
+ | `size` | `String` | `BaseLogoEnum.MEDIUM` | Logo size |
231
234
 
232
235
  **Example:**
233
236
 
234
237
  ```vue
235
238
  <template>
236
- <BaseLogo :size="BaseLoginEnum.LARGE" />
239
+ <BaseLogo :size="BaseLogoEnum.LARGE" />
237
240
  </template>
238
241
 
239
242
  <script setup lang="ts">
240
- import { BaseLogo, BaseLoginEnum } from 'mgv-backoffice'
243
+ import { BaseLogo, BaseLogoEnum } from 'mgv-backoffice'
241
244
  </script>
242
245
  ```
243
246
 
@@ -552,7 +555,7 @@ import {
552
555
  BaseBadgeEnum,
553
556
  BaseButtonEnum,
554
557
  BaseButtonSizeEnum,
555
- BaseLoginEnum,
558
+ BaseLogoEnum,
556
559
  BaseModalEnum,
557
560
  BaseToastEnum,
558
561
  ColorsEnums,
@@ -565,9 +568,9 @@ import {
565
568
  | -------------------- |---------------------------------------------------------------|
566
569
  | `AlertEnum` | `WARNING`, `ERROR`, `SUCCESS`, `INFO` |
567
570
  | `BaseBadgeEnum` | `WIN`, `LOSE` |
568
- | `BaseButtonEnum` | `RED`, `BLUE`, `WHITE`, `DARK`, `GREEN`, `YELLOW`, `PURPLE` |
571
+ | `BaseButtonEnum` | `RED`, `BLUE`, `WHITE`, `DARK`, `GREEN`, `EMERALD`, `YELLOW`, `PURPLE`, `SKY`, `GRAY`, `AMBER` |
569
572
  | `BaseButtonSizeEnum` | `EXTRA_SMALL`, `SMALL`, `BASE`, `LARGE`, `EXTRA_LARGE` |
570
- | `BaseLoginEnum` | `SMALL`, `MEDIUM`, `LARGE` |
573
+ | `BaseLogoEnum` | `SMALL`, `MEDIUM`, `LARGE` (`BaseLoginEnum` is a deprecated alias) |
571
574
  | `BaseModalEnum` | `DELETE`, `SUCCESS` |
572
575
  | `BaseToastEnum` | `SUCCESS`, `WARNING`, `ERROR` |
573
576
  | `ColorsEnums` | `NONE`, `RED`, `YELLOW`, `BLACK`, `GRAY`, `GREEN`, `BLUE` |
@@ -704,6 +707,8 @@ computePnL({ buyPrice: 100, lastPrice: 110, filledQty: 5 })
704
707
  ### BaseAppLayout
705
708
 
706
709
  Root layout: dark/light page background, skip link, `<main>`-with-inert wrapper.
710
+ The `<main>` content offset tracks the sidebar width automatically —
711
+ `lg:ml-60` when expanded, `lg:ml-16` when collapsed (via `useSidebarCollapse()`).
707
712
 
708
713
  **Props:**
709
714
 
@@ -724,8 +729,9 @@ Root layout: dark/light page background, skip link, `<main>`-with-inert wrapper.
724
729
  ### BaseSidebar
725
730
 
726
731
  Responsive sidebar with desktop fixed-positioning and mobile off-canvas
727
- behavior, focus management, optional theme toggle, and configurable nav
728
- sections.
732
+ behavior, focus management, optional theme toggle, a desktop collapse
733
+ toggle (icon-only rail), an optional notifications bell, and configurable
734
+ nav sections.
729
735
 
730
736
  **Props:**
731
737
 
@@ -736,6 +742,18 @@ sections.
736
742
  | `appName` | `String` | `''` | Optional app name in the footer. |
737
743
  | `version` | `String` | `''` | Optional version string in the footer. |
738
744
  | `showThemeToggle` | `Boolean` | `true` | Toggle the dark/light switch in the footer. |
745
+ | `collapsible` | `Boolean` | `true` | Show the desktop collapse toggle that shrinks the sidebar to an icon-only rail. |
746
+ | `showNotifications` | `Boolean` | `false` | Show the notifications bell (with unread badge) that toggles `BaseNotificationPanel`. |
747
+
748
+ > **Collapse state** is shared via `useSidebarCollapse()` (and persisted to
749
+ > localStorage) so `BaseAppLayout` can shrink the content offset from
750
+ > `lg:ml-60` to `lg:ml-16` in step with the rail. Collapsing only affects
751
+ > desktop (`lg+`); on mobile the sidebar stays a full off-canvas panel.
752
+
753
+ > **Notifications:** set `:show-notifications="true"` to render the bell,
754
+ > then drop a [`BaseNotificationPanel`](#basenotificationpanel) in your app.
755
+ > Both share state through `useNotifications()`, so the unread badge and the
756
+ > panel stay in sync.
739
757
 
740
758
  **Slots:**
741
759
 
@@ -773,6 +791,127 @@ interface NavSection {
773
791
 
774
792
  ---
775
793
 
794
+ ### BaseNotificationPanel
795
+
796
+ Left-anchored notification drawer (teleported to `<body>`, slides in from
797
+ the left, backdrop + Escape to close). Open/close state and the list live
798
+ in `useNotifications()`, so the sidebar bell and the panel stay in sync.
799
+
800
+ Enable the bell on the sidebar with `:show-notifications="true"`, drop one
801
+ `<BaseNotificationPanel />` anywhere in your app, and feed it data via the
802
+ composable.
803
+
804
+ **Props:**
805
+
806
+ | Prop | Type | Default | Description |
807
+ | ----------------- | --------- | ------------------------------ | ----------- |
808
+ | `title` | `String` | `'Notifications'` | Panel heading. |
809
+ | `emptyText` | `String` | `'You have no notifications.'` | Shown when the list is empty. |
810
+ | `showMarkAllRead` | `Boolean` | `true` | Render the "Mark all as read" action when there are unread items. |
811
+
812
+ **Emits:** `select` (the clicked notification's `id`; the row is also marked read).
813
+
814
+ ```vue
815
+ <script setup lang="ts">
816
+ import { BaseNotificationPanel, useNotifications } from 'mgv-backoffice'
817
+ const { setNotifications } = useNotifications()
818
+ setNotifications([
819
+ { id: 1, title: 'New comment', message: 'Alice replied to your post', time: '2m ago', type: 'info' },
820
+ { id: 2, title: 'Build passed', time: '1h ago', read: true, type: 'success' },
821
+ ])
822
+ </script>
823
+
824
+ <template>
825
+ <BaseSidebar :sections="navSections" :show-notifications="true" />
826
+ <BaseNotificationPanel @select="(id) => goTo(id)" />
827
+ </template>
828
+ ```
829
+
830
+ ```ts
831
+ import type { NotificationItem } from 'mgv-backoffice'
832
+
833
+ interface NotificationItem {
834
+ id: string | number
835
+ title: string
836
+ message?: string
837
+ time?: string // pre-formatted by you
838
+ read?: boolean
839
+ type?: 'info' | 'success' | 'warning' | 'error' // status dot colour
840
+ }
841
+ ```
842
+
843
+ ---
844
+
845
+ ## Authentication
846
+
847
+ ### BaseGoogleSignInButton
848
+
849
+ Google-branded "Sign in with Google" button (official multi-colour "G",
850
+ dark-mode surface swap). Purely presentational — it runs no OAuth itself;
851
+ listen on `click` and start your own Google Identity / Firebase / backend
852
+ flow there.
853
+
854
+ **Props:**
855
+
856
+ | Prop | Type | Default | Description |
857
+ | ---------- | --------- | -------------------------- | ----------- |
858
+ | `label` | `String` | `'Sign in with Google'` | Button text. |
859
+ | `loading` | `Boolean` | `false` | Disables and shows a spinner. |
860
+ | `disabled` | `Boolean` | `false` | Disables without the spinner. |
861
+ | `block` | `Boolean` | `true` | Full-width layout. |
862
+
863
+ **Emits:** `click` (only when not disabled/loading).
864
+
865
+ ### BaseLoginForm
866
+
867
+ Presentational sign-in card: email + password (with show/hide), an optional
868
+ "Remember me" checkbox, an error banner, the Google button + "or" divider,
869
+ and `logo` / `forgot` / `footer` slots. Owns its input state and emits
870
+ `submit` / `google-sign-in`; the app handles the actual request and feeds
871
+ back `loading` / `error`.
872
+
873
+ **Props:**
874
+
875
+ | Prop | Type | Default | Description |
876
+ | --------------- | --------- | ----------- | ----------- |
877
+ | `title` | `String` | `'Sign in'` | Card heading. |
878
+ | `subtitle` | `String` | `''` | Muted line under the heading. |
879
+ | `submitLabel` | `String` | `'Sign in'` | Submit button text. |
880
+ | `loading` | `Boolean` | `false` | Disables the form, spinner on submit. |
881
+ | `googleLoading` | `Boolean` | `false` | Disables the form, spinner on the Google button. |
882
+ | `error` | `String` | `''` | Error banner above the form. |
883
+ | `showGoogle` | `Boolean` | `true` | Render the Google button + divider. |
884
+ | `showRemember` | `Boolean` | `false` | Render the "Remember me" checkbox. |
885
+
886
+ **Emits:** `submit` (`LoginCredentials`), `google-sign-in`.
887
+
888
+ **Slots:** `logo`, `forgot` (next to the password label), `footer`.
889
+
890
+ ```vue
891
+ <script setup lang="ts">
892
+ import { BaseLoginForm } from 'mgv-backoffice'
893
+ import type { LoginCredentials } from 'mgv-backoffice'
894
+
895
+ async function onSubmit(creds: LoginCredentials) { /* call your API */ }
896
+ function onGoogle() { /* start Google OAuth */ }
897
+ </script>
898
+
899
+ <template>
900
+ <BaseLoginForm
901
+ subtitle="Welcome back"
902
+ :show-remember="true"
903
+ @submit="onSubmit"
904
+ @google-sign-in="onGoogle"
905
+ >
906
+ <template #logo><MyLogo /></template>
907
+ <template #forgot><a href="/forgot" class="text-sm text-emerald-600">Forgot?</a></template>
908
+ <template #footer>No account? <a href="/signup" class="text-emerald-600">Sign up</a></template>
909
+ </BaseLoginForm>
910
+ </template>
911
+ ```
912
+
913
+ ---
914
+
776
915
  ## Modals & sections
777
916
 
778
917
  ### BaseModalShell
@@ -1022,6 +1161,8 @@ import {
1022
1161
  useDebouncedRef,
1023
1162
  useToast,
1024
1163
  useMobileSidebar,
1164
+ useSidebarCollapse,
1165
+ useNotifications,
1025
1166
  } from 'mgv-backoffice'
1026
1167
  ```
1027
1168
 
@@ -1034,6 +1175,8 @@ import {
1034
1175
  | `useDebouncedRef(source, delay?)` | Debounced mirror of a ref. Timer cleared on scope dispose. |
1035
1176
  | `useToast(durationMs?)` | Per-component toast state: `{ showToast, toastMessage, toastType, showToastMessage }`. |
1036
1177
  | `useMobileSidebar()` | Singleton state shared between `BaseSidebar` and `BaseAppLayout` for the off-canvas open/closed flag. |
1178
+ | `useSidebarCollapse({ storageKey? })` | Singleton collapsed/expanded state for the desktop sidebar rail, shared between `BaseSidebar` and `BaseAppLayout` and persisted to localStorage (default key `'mgv-sidebar-collapsed'`). |
1179
+ | `useNotifications()` | Singleton notification state shared by the sidebar bell and `BaseNotificationPanel`: `{ notifications, unreadCount, open, openPanel, closePanel, togglePanel, setNotifications, add, remove, markRead, markAllRead, clear }`. |
1037
1180
 
1038
1181
  ---
1039
1182
 
@@ -8,18 +8,13 @@ type __VLS_Props = {
8
8
  ariaLabel?: string;
9
9
  type?: 'button' | 'submit' | 'reset';
10
10
  };
11
- declare function __VLS_template(): {
12
- attrs: Partial<{}>;
13
- slots: {
14
- icon?(_: {
15
- iconClass: string;
16
- }): any;
17
- };
18
- refs: {};
19
- rootEl: any;
11
+ declare var __VLS_1: {
12
+ iconClass: string;
13
+ };
14
+ type __VLS_Slots = {} & {
15
+ icon?: (props: typeof __VLS_1) => any;
20
16
  };
21
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
18
  click: (event: MouseEvent) => any;
24
19
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
25
20
  onClick?: ((event: MouseEvent) => any) | undefined;
@@ -32,9 +27,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
32
27
  fullWidth: boolean;
33
28
  ariaLabel: string;
34
29
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
35
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
36
32
  export default _default;
37
- type __VLS_WithTemplateSlots<T, S> = T & {
33
+ type __VLS_WithSlots<T, S> = T & {
38
34
  new (): {
39
35
  $slots: S;
40
36
  };
@@ -1,6 +1,6 @@
1
1
  import { AlertEnum } from '../enums/AlertEnum';
2
2
  import { PropType } from 'vue';
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
4
  title: {
5
5
  type: StringConstructor;
6
6
  required: false;
@@ -25,5 +25,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
25
25
  }>> & Readonly<{}>, {
26
26
  title: string;
27
27
  color: AlertEnum;
28
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
29
+ declare const _default: typeof __VLS_export;
29
30
  export default _default;
@@ -0,0 +1,28 @@
1
+ interface Props {
2
+ /**
3
+ * Whether the sidebar should currently be rendered. Defaults to true.
4
+ * Set to false for routes that should occupy the full viewport (e.g.
5
+ * landing / marketing pages).
6
+ */
7
+ showSidebar?: boolean;
8
+ /** Skip-link label. Defaults to "Skip to main content". */
9
+ skipLinkLabel?: string;
10
+ }
11
+ declare var __VLS_1: {}, __VLS_3: {};
12
+ type __VLS_Slots = {} & {
13
+ sidebar?: (props: typeof __VLS_1) => any;
14
+ } & {
15
+ default?: (props: typeof __VLS_3) => any;
16
+ };
17
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
18
+ showSidebar: boolean;
19
+ skipLinkLabel: string;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -1,13 +1,8 @@
1
- declare function __VLS_template(): {
2
- attrs: Partial<{}>;
3
- slots: {
4
- default?(_: {}): any;
5
- };
6
- refs: {};
7
- rootEl: any;
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
8
4
  };
9
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
11
6
  color: {
12
7
  type: StringConstructor;
13
8
  required: false;
@@ -18,9 +13,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
18
13
  required: false;
19
14
  };
20
15
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
21
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
22
18
  export default _default;
23
- type __VLS_WithTemplateSlots<T, S> = T & {
19
+ type __VLS_WithSlots<T, S> = T & {
24
20
  new (): {
25
21
  $slots: S;
26
22
  };
@@ -2,7 +2,7 @@ export interface BreadCrumb {
2
2
  name: string;
3
3
  url: string;
4
4
  }
5
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
6
  items: {
7
7
  type: () => BreadCrumb[];
8
8
  required: false;
@@ -27,5 +27,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
27
27
  }>> & Readonly<{}>, {
28
28
  path: string;
29
29
  items: BreadCrumb[];
30
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
31
+ declare const _default: typeof __VLS_export;
31
32
  export default _default;
@@ -1,15 +1,11 @@
1
1
  import { BaseButtonEnum } from '../enums/BaseButtonEnum';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {}): any;
6
- default?(_: {}): any;
7
- };
8
- refs: {};
9
- rootEl: any;
2
+ declare var __VLS_8: {}, __VLS_10: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_8) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_10) => any;
10
7
  };
11
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
13
9
  description: {
14
10
  type: StringConstructor;
15
11
  required: true;
@@ -119,9 +115,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
119
115
  isDisable: boolean;
120
116
  isLoading: boolean;
121
117
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
122
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
118
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
119
+ declare const _default: typeof __VLS_export;
123
120
  export default _default;
124
- type __VLS_WithTemplateSlots<T, S> = T & {
121
+ type __VLS_WithSlots<T, S> = T & {
125
122
  new (): {
126
123
  $slots: S;
127
124
  };
@@ -12,23 +12,19 @@ interface Props {
12
12
  */
13
13
  bodyClass?: string;
14
14
  }
15
- declare function __VLS_template(): {
16
- attrs: Partial<{}>;
17
- slots: {
18
- default?(_: {}): any;
19
- };
20
- refs: {};
21
- rootEl: any;
15
+ declare var __VLS_1: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => any;
22
18
  };
23
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
20
  toggle: () => any;
26
21
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
27
22
  onToggle?: (() => any) | undefined;
28
23
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
30
26
  export default _default;
31
- type __VLS_WithTemplateSlots<T, S> = T & {
27
+ type __VLS_WithSlots<T, S> = T & {
32
28
  new (): {
33
29
  $slots: S;
34
30
  };
@@ -7,17 +7,13 @@ interface Props {
7
7
  variant?: 'danger' | 'warning';
8
8
  submitting?: boolean;
9
9
  }
10
- declare function __VLS_template(): {
11
- attrs: Partial<{}>;
12
- slots: {
13
- message?(_: {}): any;
14
- default?(_: {}): any;
15
- };
16
- refs: {};
17
- rootEl: any;
10
+ declare var __VLS_16: {}, __VLS_18: {};
11
+ type __VLS_Slots = {} & {
12
+ message?: (props: typeof __VLS_16) => any;
13
+ } & {
14
+ default?: (props: typeof __VLS_18) => any;
18
15
  };
19
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
17
  cancel: () => any;
22
18
  confirm: () => any;
23
19
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
@@ -30,9 +26,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
30
26
  variant: "danger" | "warning";
31
27
  submitting: boolean;
32
28
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
34
31
  export default _default;
35
- type __VLS_WithTemplateSlots<T, S> = T & {
32
+ type __VLS_WithSlots<T, S> = T & {
36
33
  new (): {
37
34
  $slots: S;
38
35
  };
@@ -11,7 +11,7 @@ type __VLS_Props = {
11
11
  /** Icon size class. */
12
12
  iconClass?: string;
13
13
  };
14
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
15
  error: (error: unknown) => any;
16
16
  copied: () => any;
17
17
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -23,4 +23,5 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
23
23
  resetMs: number;
24
24
  iconClass: string;
25
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
26
27
  export default _default;
@@ -19,18 +19,11 @@ interface Props {
19
19
  submittingText?: string;
20
20
  submitting?: boolean;
21
21
  }
22
- declare function __VLS_template(): {
23
- attrs: Partial<{}>;
24
- slots: {
25
- icon?(_: {}): any;
26
- };
27
- refs: {
28
- searchInputRef: HTMLInputElement;
29
- };
30
- rootEl: any;
22
+ declare var __VLS_11: {};
23
+ type __VLS_Slots = {} & {
24
+ icon?: (props: typeof __VLS_11) => any;
31
25
  };
32
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
34
27
  cancel: () => any;
35
28
  confirm: (itemId: string) => any;
36
29
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
@@ -46,12 +39,11 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
46
39
  searchPlaceholder: string;
47
40
  emptyMessage: string;
48
41
  noMatchMessage: string;
49
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
50
- searchInputRef: HTMLInputElement;
51
- }, any>;
52
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
44
+ declare const _default: typeof __VLS_export;
53
45
  export default _default;
54
- type __VLS_WithTemplateSlots<T, S> = T & {
46
+ type __VLS_WithSlots<T, S> = T & {
55
47
  new (): {
56
48
  $slots: S;
57
49
  };
@@ -0,0 +1,22 @@
1
+ interface Props {
2
+ /** Button label. Defaults to "Sign in with Google". */
3
+ label?: string;
4
+ /** Disables the button and shows a busy spinner. */
5
+ loading?: boolean;
6
+ /** Disables the button without the busy spinner. */
7
+ disabled?: boolean;
8
+ /** Full-width (block) layout. Defaults to true. */
9
+ block?: boolean;
10
+ }
11
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ click: () => any;
13
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
14
+ onClick?: (() => any) | undefined;
15
+ }>, {
16
+ label: string;
17
+ disabled: boolean;
18
+ loading: boolean;
19
+ block: boolean;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  import { LineEnum } from '../enums/LineEnum';
2
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
3
  mode: {
4
4
  type: StringConstructor;
5
5
  required: false;
@@ -14,4 +14,5 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
14
14
  }>> & Readonly<{}>, {
15
15
  mode: string;
16
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
+ declare const _default: typeof __VLS_export;
17
18
  export default _default;
@@ -0,0 +1,51 @@
1
+ import { LoginCredentials } from '../types/auth';
2
+ interface Props {
3
+ /** Card heading. Defaults to "Sign in". */
4
+ title?: string;
5
+ /** Optional muted line under the heading. */
6
+ subtitle?: string;
7
+ /** Submit button label. Defaults to "Sign in". */
8
+ submitLabel?: string;
9
+ /** Disables the form and shows a spinner on the submit button. */
10
+ loading?: boolean;
11
+ /** Disables the form and shows a spinner on the Google button. */
12
+ googleLoading?: boolean;
13
+ /** Error message rendered above the form (e.g. "Invalid credentials"). */
14
+ error?: string;
15
+ /** Render the "Sign in with Google" button + divider. Defaults to true. */
16
+ showGoogle?: boolean;
17
+ /** Render the "Remember me" checkbox. Defaults to false. */
18
+ showRemember?: boolean;
19
+ }
20
+ declare var __VLS_1: {}, __VLS_10: {}, __VLS_12: {};
21
+ type __VLS_Slots = {} & {
22
+ logo?: (props: typeof __VLS_1) => any;
23
+ } & {
24
+ forgot?: (props: typeof __VLS_10) => any;
25
+ } & {
26
+ footer?: (props: typeof __VLS_12) => any;
27
+ };
28
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
+ submit: (credentials: LoginCredentials) => any;
30
+ "google-sign-in": () => any;
31
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
32
+ onSubmit?: ((credentials: LoginCredentials) => any) | undefined;
33
+ "onGoogle-sign-in"?: (() => any) | undefined;
34
+ }>, {
35
+ title: string;
36
+ error: string;
37
+ subtitle: string;
38
+ loading: boolean;
39
+ submitLabel: string;
40
+ googleLoading: boolean;
41
+ showGoogle: boolean;
42
+ showRemember: boolean;
43
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
44
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
45
+ declare const _default: typeof __VLS_export;
46
+ export default _default;
47
+ type __VLS_WithSlots<T, S> = T & {
48
+ new (): {
49
+ $slots: S;
50
+ };
51
+ };
@@ -1,5 +1,5 @@
1
1
  import { BaseLogoEnum } from '../enums/BaseLogoEnum';
2
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
3
  size: {
4
4
  type: StringConstructor;
5
5
  required: false;
@@ -14,4 +14,5 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
14
14
  }>> & Readonly<{}>, {
15
15
  size: string;
16
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
+ declare const _default: typeof __VLS_export;
17
18
  export default _default;