@frigear-nu/admin 0.1.2 → 0.1.3

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 (35) hide show
  1. package/README.md +5 -3
  2. package/dist/module.d.mts +5 -1
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +4 -5
  5. package/dist/runtime/app/layouts/admin.d.vue.ts +2 -2
  6. package/dist/runtime/app/layouts/admin.vue +21 -98
  7. package/dist/runtime/app/layouts/admin.vue.d.ts +2 -2
  8. package/package.json +5 -5
  9. package/dist/runtime/app/components/AdminEmpty.d.vue.ts +0 -18
  10. package/dist/runtime/app/components/AdminEmpty.vue +0 -24
  11. package/dist/runtime/app/components/AdminEmpty.vue.d.ts +0 -18
  12. package/dist/runtime/app/components/AdminKeyValue.d.vue.ts +0 -22
  13. package/dist/runtime/app/components/AdminKeyValue.vue +0 -25
  14. package/dist/runtime/app/components/AdminKeyValue.vue.d.ts +0 -22
  15. package/dist/runtime/app/components/AdminListCard.d.vue.ts +0 -24
  16. package/dist/runtime/app/components/AdminListCard.vue +0 -31
  17. package/dist/runtime/app/components/AdminListCard.vue.d.ts +0 -24
  18. package/dist/runtime/app/components/AdminPage.d.vue.ts +0 -13
  19. package/dist/runtime/app/components/AdminPage.vue +0 -6
  20. package/dist/runtime/app/components/AdminPage.vue.d.ts +0 -13
  21. package/dist/runtime/app/components/AdminPageHeader.d.vue.ts +0 -29
  22. package/dist/runtime/app/components/AdminPageHeader.vue +0 -43
  23. package/dist/runtime/app/components/AdminPageHeader.vue.d.ts +0 -29
  24. package/dist/runtime/app/components/AdminSection.d.vue.ts +0 -26
  25. package/dist/runtime/app/components/AdminSection.vue +0 -37
  26. package/dist/runtime/app/components/AdminSection.vue.d.ts +0 -26
  27. package/dist/runtime/app/components/AdminStatCard.d.vue.ts +0 -20
  28. package/dist/runtime/app/components/AdminStatCard.vue +0 -26
  29. package/dist/runtime/app/components/AdminStatCard.vue.d.ts +0 -20
  30. package/dist/runtime/app/components/AdminTable.d.vue.ts +0 -28
  31. package/dist/runtime/app/components/AdminTable.vue +0 -42
  32. package/dist/runtime/app/components/AdminTable.vue.d.ts +0 -28
  33. package/dist/runtime/app/components/AdminToolbar.d.vue.ts +0 -13
  34. package/dist/runtime/app/components/AdminToolbar.vue +0 -6
  35. package/dist/runtime/app/components/AdminToolbar.vue.d.ts +0 -13
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # @frigear-nu/admin
2
2
 
3
- Generic admin area: an `admin` layout with a grouped sidebar (the `admin.nav` menu: Overview, Manage and Settings, see
4
- `ADMIN_NAV_GROUPS`) and a guarded dashboard (the `admin.dashboard` widget areas). Other modules register their admin
3
+ Generic admin area: an `admin` layout built on the shared `AppShell` from `@frigear-nu/ui` with a grouped sidebar (the
4
+ `admin.nav` menu: Overview, Manage and Settings, see `ADMIN_NAV_GROUPS`), a ⌘K palette over the same entries, a
5
+ back-to-site link and the account menu in the sidebar footer. The navbar shows a muted area › section eyebrow, not a
6
+ title: every page renders the one `<h1>` through `PageHeading`. The area also has a guarded dashboard (the `admin.dashboard` widget areas). Other modules register their admin
5
7
  pages, nav entries and widgets into it. Pages are built from the `@frigear-nu/ui` page patterns (`PageHeading`,
6
- `SectionCard`, `TableCard`, …); the `Admin*` components are deprecated aliases over them.
8
+ `SectionCard`, `TableCard`, …).
7
9
 
8
10
  See the [documentation](../../apps/docs/content/4.modules/02.admin.md) for usage.
package/dist/module.d.mts CHANGED
@@ -14,7 +14,11 @@ type ModuleOptions = {
14
14
  * (only when that module is installed). Defaults to `['admin']`. Pass `false` to set no rule and guard the area yourself.
15
15
  */
16
16
  roles?: string[] | false;
17
- /** Applies the `admin` layout to every page under `base` that has no layout of its own. Defaults to `true`. */
17
+ /**
18
+ * Applies the `admin` layout to every page under `base` that has no layout of its own. An `admin` layout of the
19
+ * app (`app/layouts/admin.vue`) or a layer replaces the module's and the area still renders in it. `false`
20
+ * registers no layout and sets no layout rule. Defaults to `true`.
21
+ */
18
22
  layout?: boolean;
19
23
  };
20
24
  };
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@frigear-nu/admin",
3
3
  "configKey": "admin",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addLayout, addComponent, hasNuxtModule, extendPages } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, hasNuxtModule, extendPages } from '@nuxt/kit';
2
2
  import { registerModule, registerTailwindSource, registerLocales } from '@frigear-nu/module-kit/utils';
3
3
  import { extendMenu } from '@frigear-nu/menu/utils';
4
4
  import { ADMIN_NAV_GROUPS } from '../dist/runtime/utils/index.js';
@@ -28,10 +28,6 @@ const module$1 = defineNuxtModule({
28
28
  const base = trimSlash(settings.base ?? "/admin");
29
29
  const dashboardPath = settings.dashboard === false ? void 0 : typeof settings.dashboard === "string" ? settings.dashboard : base;
30
30
  nuxt.options.runtimeConfig.public.admin = { base, dashboard: dashboardPath };
31
- addLayout({ src: resolver.resolve("./runtime/app/layouts/admin.vue"), filename: "admin.vue" }, "admin");
32
- for (const name of ["AdminPage", "AdminPageHeader", "AdminSection", "AdminToolbar", "AdminEmpty", "AdminTable", "AdminStatCard", "AdminKeyValue", "AdminListCard"]) {
33
- addComponent({ name, filePath: resolver.resolve(`./runtime/app/components/${name}.vue`) });
34
- }
35
31
  const prefixes = ["", ...(nuxt.options.i18n?.locales ?? []).map((locale) => typeof locale === "string" ? locale : locale.code).map((code) => `/${code}`)];
36
32
  const bases = prefixes.map((prefix) => `${prefix}${base}`);
37
33
  if (settings.roles !== false) {
@@ -45,6 +41,9 @@ const module$1 = defineNuxtModule({
45
41
  }
46
42
  }
47
43
  if (settings.layout !== false) {
44
+ nuxt.hook("app:resolve", (app) => {
45
+ app.layouts.admin ||= { name: "admin", file: resolver.resolve("./runtime/app/layouts/admin.vue") };
46
+ });
48
47
  const rules = nuxt.options.routeRules ||= {};
49
48
  for (const prefixed of bases) {
50
49
  for (const pattern of [prefixed, `${prefixed}/**`]) {
@@ -1,6 +1,6 @@
1
- declare var __VLS_79: {};
1
+ declare var __VLS_14: {};
2
2
  type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_79) => any;
3
+ default?: (props: typeof __VLS_14) => any;
4
4
  };
5
5
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
6
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,15 +1,10 @@
1
1
  <script setup>
2
2
  defineOptions({ name: "AdminLayout" });
3
3
  const t = useModuleT("admin");
4
- const route = useRoute();
5
4
  const config = useRuntimeConfig().public.admin;
6
- const LanguageSelect = resolveComponent("LanguageSelect");
7
5
  const AccountMenu = resolveComponent("AccountMenu");
8
6
  const optional = (component) => typeof component === "string" ? void 0 : component;
9
- const nuxtApp = useNuxtApp();
10
- const multiLocale = (nuxtApp.$i18n?.locales?.value?.length ?? 0) > 1;
11
7
  const home = config?.dashboard ?? config?.base ?? "/admin";
12
- const { localize } = useLocaleLink();
13
8
  const { data: items } = await useMenu("admin.nav.*");
14
9
  const groupOf = (group) => group === "nav.overview" ? "overview" : group === "nav.settings" ? "settings" : "manage";
15
10
  const byGroup = (name) => (items.value ?? []).filter((item) => groupOf(item.group) === name);
@@ -23,11 +18,6 @@ const groups = computed(() => [
23
18
  { id: "settings", label: t("nav.groups.settings", "Settings"), links: settings.value }
24
19
  ].filter((group) => group.links.length));
25
20
  const navigation = computed(() => groups.value.map((group) => group.label ? [{ type: "label", label: group.label }, ...group.links] : group.links));
26
- const title = computed(() => groups.value.flatMap((group) => group.links).find((link) => link.active)?.label ?? t("title", "Administration"));
27
- const sidebarOpen = ref(false);
28
- watch(() => route.path, () => {
29
- sidebarOpen.value = false;
30
- });
31
21
  const searchGroups = computed(() => groups.value.map((group) => ({
32
22
  id: `admin-nav-${group.id}`,
33
23
  label: group.label ?? t("search.goTo", "Go to"),
@@ -36,93 +26,26 @@ const searchGroups = computed(() => groups.value.map((group) => ({
36
26
  </script>
37
27
 
38
28
  <template>
39
- <UDashboardGroup unit="rem">
40
- <UDashboardSidebar
41
- id="admin"
42
- v-model:open="sidebarOpen"
43
- collapsible
44
- resizable
45
- class="bg-elevated/25"
46
- :ui="{ footer: 'lg:border-t lg:border-default flex-col items-stretch gap-1' }"
47
- >
48
- <template #header="{ collapsed }">
49
- <NuxtLink
50
- :to="localize(home)"
51
- class="flex min-w-0 items-center gap-2"
52
- >
53
- <span class="bg-primary text-inverted flex size-7 shrink-0 items-center justify-center rounded-lg">
54
- <UIcon
55
- name="i-lucide-layout-dashboard"
56
- class="size-4"
57
- />
58
- </span>
59
- <span
60
- v-if="!collapsed"
61
- class="text-highlighted truncate font-semibold"
62
- >{{ t("title", "Administration") }}</span>
63
- </NuxtLink>
64
- </template>
29
+ <!-- The dashboard chrome (brand, sidebar, eyebrow navbar, language select) is the shared `AppShell`; this layout only
30
+ feeds it the admin menus and the account menu. Paths are passed raw: the shell localises them. -->
31
+ <AppShell
32
+ id="admin"
33
+ :title="t('title', 'Administration')"
34
+ :home="home"
35
+ :navigation="navigation"
36
+ :nav-label="t('nav.label', 'Admin navigation')"
37
+ :search-groups="searchGroups"
38
+ :back-to="{ to: '/', label: t('backToSite', 'Back to the site') }"
39
+ >
40
+ <template #sidebar-footer="{ collapsed }">
41
+ <component
42
+ :is="optional(AccountMenu)"
43
+ v-if="optional(AccountMenu)"
44
+ block
45
+ :collapsed="collapsed"
46
+ />
47
+ </template>
65
48
 
66
- <template #default="{ collapsed }">
67
- <UDashboardSearchButton
68
- :collapsed="collapsed"
69
- class="bg-transparent ring-default"
70
- />
71
-
72
- <UNavigationMenu
73
- :collapsed="collapsed"
74
- :items="navigation"
75
- orientation="vertical"
76
- tooltip
77
- :aria-label="t('nav.label', 'Admin navigation')"
78
- />
79
- </template>
80
-
81
- <template #footer="{ collapsed }">
82
- <UButton
83
- :to="localize('/')"
84
- color="neutral"
85
- variant="ghost"
86
- icon="i-lucide-arrow-left"
87
- :label="collapsed ? void 0 : t('backToSite', 'Back to the site')"
88
- :square="collapsed"
89
- block
90
- class="justify-start"
91
- />
92
- <component
93
- :is="optional(AccountMenu)"
94
- v-if="optional(AccountMenu)"
95
- block
96
- :collapsed="collapsed"
97
- />
98
- </template>
99
- </UDashboardSidebar>
100
-
101
- <UDashboardSearch :groups="searchGroups" />
102
-
103
- <UDashboardPanel id="admin-main">
104
- <template #header>
105
- <UDashboardNavbar
106
- :title="title"
107
- :ui="{ right: 'gap-2' }"
108
- >
109
- <template #leading>
110
- <UDashboardSidebarCollapse />
111
- </template>
112
- <template #right>
113
- <component
114
- :is="optional(LanguageSelect)"
115
- v-if="optional(LanguageSelect) && multiLocale"
116
- />
117
- </template>
118
- </UDashboardNavbar>
119
- </template>
120
-
121
- <template #body>
122
- <div class="mx-auto w-full max-w-7xl">
123
- <slot />
124
- </div>
125
- </template>
126
- </UDashboardPanel>
127
- </UDashboardGroup>
49
+ <slot />
50
+ </AppShell>
128
51
  </template>
@@ -1,6 +1,6 @@
1
- declare var __VLS_79: {};
1
+ declare var __VLS_14: {};
2
2
  type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_79) => any;
3
+ default?: (props: typeof __VLS_14) => any;
4
4
  };
5
5
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
6
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frigear-nu/admin",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Generic admin area: shell layout, guarded dashboard and navigation that other modules contribute to through @frigear-nu/menu and @frigear-nu/widget.",
5
5
  "homepage": "https://docs.frigear.dev/modules/admin",
6
6
  "repository": {
@@ -30,10 +30,10 @@
30
30
  "playground"
31
31
  ],
32
32
  "dependencies": {
33
- "@frigear-nu/menu": "0.1.2",
34
- "@frigear-nu/module-kit": "1.1.2",
35
- "@frigear-nu/ui": "0.1.2",
36
- "@frigear-nu/widget": "0.1.2",
33
+ "@frigear-nu/menu": "0.1.3",
34
+ "@frigear-nu/module-kit": "1.1.3",
35
+ "@frigear-nu/ui": "0.1.3",
36
+ "@frigear-nu/widget": "0.1.3",
37
37
  "@nuxt/kit": "^4.6.1",
38
38
  "nuxt-auth-utils": "^0.5.30"
39
39
  },
@@ -1,18 +0,0 @@
1
- type __VLS_Props = {
2
- icon?: string;
3
- title: string;
4
- description?: string;
5
- };
6
- declare var __VLS_9: {};
7
- type __VLS_Slots = {} & {
8
- default?: (props: typeof __VLS_9) => any;
9
- };
10
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
- declare const _default: typeof __VLS_export;
13
- export default _default;
14
- type __VLS_WithSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };
@@ -1,24 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- icon: { type: String, required: false },
4
- title: { type: String, required: true },
5
- description: { type: String, required: false }
6
- });
7
- </script>
8
-
9
- <template>
10
- <UEmpty
11
- :icon="icon"
12
- :title="title"
13
- :description="description"
14
- variant="naked"
15
- class="py-10"
16
- >
17
- <template
18
- v-if="$slots.default"
19
- #actions
20
- >
21
- <slot />
22
- </template>
23
- </UEmpty>
24
- </template>
@@ -1,18 +0,0 @@
1
- type __VLS_Props = {
2
- icon?: string;
3
- title: string;
4
- description?: string;
5
- };
6
- declare var __VLS_9: {};
7
- type __VLS_Slots = {} & {
8
- default?: (props: typeof __VLS_9) => any;
9
- };
10
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
- declare const _default: typeof __VLS_export;
13
- export default _default;
14
- type __VLS_WithSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };
@@ -1,22 +0,0 @@
1
- export interface AdminKeyValueItem {
2
- key: string;
3
- label: string;
4
- value?: string | number | null;
5
- }
6
- type __VLS_Props = {
7
- items: AdminKeyValueItem[];
8
- loading?: boolean;
9
- };
10
- declare var __VLS_10: string, __VLS_11: any;
11
- type __VLS_Slots = {} & {
12
- [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
13
- };
14
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
- declare const _default: typeof __VLS_export;
17
- export default _default;
18
- type __VLS_WithSlots<T, S> = T & {
19
- new (): {
20
- $slots: S;
21
- };
22
- };
@@ -1,25 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- items: { type: Array, required: true },
4
- loading: { type: Boolean, required: false }
5
- });
6
- </script>
7
-
8
- <template>
9
- <DescriptionList
10
- :items="items"
11
- :loading="loading"
12
- align="end"
13
- empty="–"
14
- >
15
- <template
16
- v-for="(_, name) in $slots"
17
- #[name]="slotProps"
18
- >
19
- <slot
20
- :name="name"
21
- v-bind="slotProps ?? {}"
22
- />
23
- </template>
24
- </DescriptionList>
25
- </template>
@@ -1,22 +0,0 @@
1
- export interface AdminKeyValueItem {
2
- key: string;
3
- label: string;
4
- value?: string | number | null;
5
- }
6
- type __VLS_Props = {
7
- items: AdminKeyValueItem[];
8
- loading?: boolean;
9
- };
10
- declare var __VLS_10: string, __VLS_11: any;
11
- type __VLS_Slots = {} & {
12
- [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
13
- };
14
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
- declare const _default: typeof __VLS_export;
17
- export default _default;
18
- type __VLS_WithSlots<T, S> = T & {
19
- new (): {
20
- $slots: S;
21
- };
22
- };
@@ -1,24 +0,0 @@
1
- type __VLS_Props = {
2
- title: string;
3
- description?: string;
4
- loading?: boolean;
5
- isEmpty?: boolean;
6
- empty?: string;
7
- to?: string;
8
- toLabel?: string;
9
- };
10
- declare var __VLS_9: {}, __VLS_11: {};
11
- type __VLS_Slots = {} & {
12
- actions?: (props: typeof __VLS_9) => any;
13
- } & {
14
- default?: (props: typeof __VLS_11) => any;
15
- };
16
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
- declare const _default: typeof __VLS_export;
19
- export default _default;
20
- type __VLS_WithSlots<T, S> = T & {
21
- new (): {
22
- $slots: S;
23
- };
24
- };
@@ -1,31 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- title: { type: String, required: true },
4
- description: { type: String, required: false },
5
- loading: { type: Boolean, required: false },
6
- isEmpty: { type: Boolean, required: false },
7
- empty: { type: String, required: false },
8
- to: { type: String, required: false },
9
- toLabel: { type: String, required: false }
10
- });
11
- </script>
12
-
13
- <template>
14
- <ListCard
15
- :title="title"
16
- :description="description"
17
- :loading="loading"
18
- :is-empty="isEmpty"
19
- :empty="empty"
20
- :to="to"
21
- :to-label="toLabel"
22
- >
23
- <template
24
- v-if="$slots.actions"
25
- #actions
26
- >
27
- <slot name="actions" />
28
- </template>
29
- <slot />
30
- </ListCard>
31
- </template>
@@ -1,24 +0,0 @@
1
- type __VLS_Props = {
2
- title: string;
3
- description?: string;
4
- loading?: boolean;
5
- isEmpty?: boolean;
6
- empty?: string;
7
- to?: string;
8
- toLabel?: string;
9
- };
10
- declare var __VLS_9: {}, __VLS_11: {};
11
- type __VLS_Slots = {} & {
12
- actions?: (props: typeof __VLS_9) => any;
13
- } & {
14
- default?: (props: typeof __VLS_11) => any;
15
- };
16
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
- declare const _default: typeof __VLS_export;
19
- export default _default;
20
- type __VLS_WithSlots<T, S> = T & {
21
- new (): {
22
- $slots: S;
23
- };
24
- };
@@ -1,13 +0,0 @@
1
- declare var __VLS_1: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_1) => any;
4
- };
5
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
- declare const _default: typeof __VLS_export;
8
- export default _default;
9
- type __VLS_WithSlots<T, S> = T & {
10
- new (): {
11
- $slots: S;
12
- };
13
- };
@@ -1,6 +0,0 @@
1
- <!-- @deprecated: use a plain `<div class="flex flex-col gap-4">` as the page root -->
2
- <template>
3
- <div class="flex flex-col gap-4">
4
- <slot />
5
- </div>
6
- </template>
@@ -1,13 +0,0 @@
1
- declare var __VLS_1: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_1) => any;
4
- };
5
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
- declare const _default: typeof __VLS_export;
8
- export default _default;
9
- type __VLS_WithSlots<T, S> = T & {
10
- new (): {
11
- $slots: S;
12
- };
13
- };
@@ -1,29 +0,0 @@
1
- type __VLS_Props = {
2
- title?: string;
3
- description?: string;
4
- back?: {
5
- label: string;
6
- to: string;
7
- };
8
- };
9
- declare var __VLS_9: {}, __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_20: {};
10
- type __VLS_Slots = {} & {
11
- title?: (props: typeof __VLS_9) => any;
12
- } & {
13
- description?: (props: typeof __VLS_12) => any;
14
- } & {
15
- default?: (props: typeof __VLS_15) => any;
16
- } & {
17
- links?: (props: typeof __VLS_18) => any;
18
- } & {
19
- actions?: (props: typeof __VLS_20) => any;
20
- };
21
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
- declare const _default: typeof __VLS_export;
24
- export default _default;
25
- type __VLS_WithSlots<T, S> = T & {
26
- new (): {
27
- $slots: S;
28
- };
29
- };
@@ -1,43 +0,0 @@
1
- <script setup>
2
- const props = defineProps({
3
- title: { type: String, required: false },
4
- description: { type: String, required: false },
5
- back: { type: Object, required: false }
6
- });
7
- const breadcrumb = computed(() => props.back ? [{ label: props.back.label, to: props.back.to }, ...props.title ? [{ label: props.title }] : []] : void 0);
8
- </script>
9
-
10
- <template>
11
- <PageHeading
12
- :title="title"
13
- :description="description"
14
- :breadcrumb="breadcrumb"
15
- >
16
- <template
17
- v-if="$slots.title"
18
- #title
19
- >
20
- <slot name="title" />
21
- </template>
22
- <template
23
- v-if="$slots.description"
24
- #description
25
- >
26
- <slot name="description" />
27
- </template>
28
- <template
29
- v-if="$slots.default"
30
- #default
31
- >
32
- <slot />
33
- </template>
34
- <template
35
- v-if="$slots.links || $slots.actions"
36
- #actions
37
- >
38
- <slot name="links">
39
- <slot name="actions" />
40
- </slot>
41
- </template>
42
- </PageHeading>
43
- </template>
@@ -1,29 +0,0 @@
1
- type __VLS_Props = {
2
- title?: string;
3
- description?: string;
4
- back?: {
5
- label: string;
6
- to: string;
7
- };
8
- };
9
- declare var __VLS_9: {}, __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_20: {};
10
- type __VLS_Slots = {} & {
11
- title?: (props: typeof __VLS_9) => any;
12
- } & {
13
- description?: (props: typeof __VLS_12) => any;
14
- } & {
15
- default?: (props: typeof __VLS_15) => any;
16
- } & {
17
- links?: (props: typeof __VLS_18) => any;
18
- } & {
19
- actions?: (props: typeof __VLS_20) => any;
20
- };
21
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
- declare const _default: typeof __VLS_export;
24
- export default _default;
25
- type __VLS_WithSlots<T, S> = T & {
26
- new (): {
27
- $slots: S;
28
- };
29
- };
@@ -1,26 +0,0 @@
1
- type __VLS_Props = {
2
- title?: string;
3
- description?: string;
4
- loading?: boolean;
5
- };
6
- declare var __VLS_9: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {}, __VLS_19: {};
7
- type __VLS_Slots = {} & {
8
- header?: (props: typeof __VLS_9) => any;
9
- } & {
10
- actions?: (props: typeof __VLS_12) => any;
11
- } & {
12
- flush?: (props: typeof __VLS_14) => any;
13
- } & {
14
- default?: (props: typeof __VLS_16) => any;
15
- } & {
16
- footer?: (props: typeof __VLS_19) => any;
17
- };
18
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_WithSlots<T, S> = T & {
23
- new (): {
24
- $slots: S;
25
- };
26
- };
@@ -1,37 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- title: { type: String, required: false },
4
- description: { type: String, required: false },
5
- loading: { type: Boolean, required: false }
6
- });
7
- </script>
8
-
9
- <template>
10
- <SectionCard
11
- :title="title"
12
- :description="description"
13
- :loading="loading"
14
- :flush="!!$slots.flush"
15
- >
16
- <template
17
- v-if="$slots.header"
18
- #header
19
- >
20
- <slot name="header" />
21
- </template>
22
- <template
23
- v-if="$slots.actions"
24
- #actions
25
- >
26
- <slot name="actions" />
27
- </template>
28
- <slot name="flush" />
29
- <slot />
30
- <template
31
- v-if="$slots.footer"
32
- #footer
33
- >
34
- <slot name="footer" />
35
- </template>
36
- </SectionCard>
37
- </template>
@@ -1,26 +0,0 @@
1
- type __VLS_Props = {
2
- title?: string;
3
- description?: string;
4
- loading?: boolean;
5
- };
6
- declare var __VLS_9: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {}, __VLS_19: {};
7
- type __VLS_Slots = {} & {
8
- header?: (props: typeof __VLS_9) => any;
9
- } & {
10
- actions?: (props: typeof __VLS_12) => any;
11
- } & {
12
- flush?: (props: typeof __VLS_14) => any;
13
- } & {
14
- default?: (props: typeof __VLS_16) => any;
15
- } & {
16
- footer?: (props: typeof __VLS_19) => any;
17
- };
18
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_WithSlots<T, S> = T & {
23
- new (): {
24
- $slots: S;
25
- };
26
- };
@@ -1,20 +0,0 @@
1
- type __VLS_Props = {
2
- label: string;
3
- icon?: string;
4
- to?: string;
5
- loading?: boolean;
6
- empty?: string;
7
- };
8
- declare var __VLS_9: {};
9
- type __VLS_Slots = {} & {
10
- default?: (props: typeof __VLS_9) => any;
11
- };
12
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
- declare const _default: typeof __VLS_export;
15
- export default _default;
16
- type __VLS_WithSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
19
- };
20
- };
@@ -1,26 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- label: { type: String, required: true },
4
- icon: { type: String, required: false },
5
- to: { type: String, required: false },
6
- loading: { type: Boolean, required: false },
7
- empty: { type: String, required: false }
8
- });
9
- </script>
10
-
11
- <template>
12
- <StatCard
13
- :label="label"
14
- :icon="icon"
15
- :to="to"
16
- :loading="loading"
17
- :empty="empty"
18
- >
19
- <template
20
- v-if="$slots.default"
21
- #default
22
- >
23
- <slot />
24
- </template>
25
- </StatCard>
26
- </template>
@@ -1,20 +0,0 @@
1
- type __VLS_Props = {
2
- label: string;
3
- icon?: string;
4
- to?: string;
5
- loading?: boolean;
6
- empty?: string;
7
- };
8
- declare var __VLS_9: {};
9
- type __VLS_Slots = {} & {
10
- default?: (props: typeof __VLS_9) => any;
11
- };
12
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
- declare const _default: typeof __VLS_export;
15
- export default _default;
16
- type __VLS_WithSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
19
- };
20
- };
@@ -1,28 +0,0 @@
1
- import type { TableColumn, TableRow } from '@nuxt/ui';
2
- declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: import("vue").PublicProps & __VLS_PrettifyLocal<{
4
- data: T[];
5
- columns: TableColumn<T>[];
6
- loading?: boolean;
7
- empty?: string;
8
- } & {
9
- onSelect?: ((e: Event, row: TableRow<T>) => any) | undefined;
10
- }> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {
16
- [x: string]: ((props: any) => any) | undefined;
17
- };
18
- emit: (evt: "select", e: Event, row: TableRow<T>) => void;
19
- }>) => import("vue").VNode & {
20
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
21
- };
22
- declare const _default: typeof __VLS_export;
23
- export default _default;
24
- type __VLS_PrettifyLocal<T> = (T extends any ? {
25
- [K in keyof T]: T[K];
26
- } : {
27
- [K in keyof T as K]: T[K];
28
- }) & {};
@@ -1,42 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- data: { type: Array, required: true },
4
- columns: { type: Array, required: true },
5
- loading: { type: Boolean, required: false },
6
- empty: { type: String, required: false }
7
- });
8
- const emit = defineEmits(["select"]);
9
- </script>
10
-
11
- <template>
12
- <TableCard>
13
- <UTable
14
- :data="data"
15
- :columns="columns"
16
- :loading="loading"
17
- :ui="tableUi()"
18
- @select="(e, row) => emit('select', e, row)"
19
- >
20
- <template
21
- v-for="(_, name) in $slots"
22
- #[name]="slotProps"
23
- >
24
- <slot
25
- :name="name"
26
- v-bind="slotProps ?? {}"
27
- />
28
- </template>
29
- <template
30
- v-if="empty && !$slots.empty"
31
- #empty
32
- >
33
- <UEmpty
34
- icon="i-lucide-inbox"
35
- :title="empty"
36
- variant="naked"
37
- class="py-10"
38
- />
39
- </template>
40
- </UTable>
41
- </TableCard>
42
- </template>
@@ -1,28 +0,0 @@
1
- import type { TableColumn, TableRow } from '@nuxt/ui';
2
- declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: import("vue").PublicProps & __VLS_PrettifyLocal<{
4
- data: T[];
5
- columns: TableColumn<T>[];
6
- loading?: boolean;
7
- empty?: string;
8
- } & {
9
- onSelect?: ((e: Event, row: TableRow<T>) => any) | undefined;
10
- }> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {
16
- [x: string]: ((props: any) => any) | undefined;
17
- };
18
- emit: (evt: "select", e: Event, row: TableRow<T>) => void;
19
- }>) => import("vue").VNode & {
20
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
21
- };
22
- declare const _default: typeof __VLS_export;
23
- export default _default;
24
- type __VLS_PrettifyLocal<T> = (T extends any ? {
25
- [K in keyof T]: T[K];
26
- } : {
27
- [K in keyof T as K]: T[K];
28
- }) & {};
@@ -1,13 +0,0 @@
1
- declare var __VLS_8: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_8) => any;
4
- };
5
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
- declare const _default: typeof __VLS_export;
8
- export default _default;
9
- type __VLS_WithSlots<T, S> = T & {
10
- new (): {
11
- $slots: S;
12
- };
13
- };
@@ -1,6 +0,0 @@
1
- <!-- @deprecated: use PageToolbar from @frigear-nu/ui -->
2
- <template>
3
- <PageToolbar>
4
- <slot />
5
- </PageToolbar>
6
- </template>
@@ -1,13 +0,0 @@
1
- declare var __VLS_8: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_8) => any;
4
- };
5
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
- declare const _default: typeof __VLS_export;
8
- export default _default;
9
- type __VLS_WithSlots<T, S> = T & {
10
- new (): {
11
- $slots: S;
12
- };
13
- };