@zoobzio/nuxt 0.0.10 → 0.0.12
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 +119 -22
- package/app/app.d.ts +51 -0
- package/app/components/accordion.ts +13 -0
- package/app/components/breadcrumb.ts +12 -0
- package/app/components/browser.ts +41 -0
- package/app/components/calendar.ts +13 -0
- package/app/components/checkbox.ts +9 -0
- package/app/components/command.ts +20 -0
- package/app/components/date-filters.ts +22 -0
- package/app/components/date-picker.ts +14 -0
- package/app/components/date-range-picker.ts +14 -0
- package/app/components/directory.ts +12 -0
- package/app/components/editor.ts +11 -0
- package/app/components/facets.ts +13 -0
- package/app/components/file-input.ts +10 -0
- package/app/components/form-field.ts +25 -0
- package/app/components/form.ts +10 -0
- package/app/components/hero.ts +9 -0
- package/app/components/icon.ts +36 -0
- package/app/components/keywords.ts +20 -0
- package/app/components/menu.ts +17 -0
- package/app/components/multi-select.ts +12 -0
- package/app/components/pagination.ts +18 -0
- package/app/components/range-calendar.ts +13 -0
- package/app/components/rich-text.ts +11 -0
- package/app/components/scroller.ts +9 -0
- package/app/components/segmented-control.ts +12 -0
- package/app/components/select.ts +9 -0
- package/app/components/table.ts +50 -0
- package/app/components/tabs.ts +12 -0
- package/app/components/tags-input.ts +9 -0
- package/app/components/toast.ts +9 -0
- package/app/components/tree.ts +14 -0
- package/app/constants/editor.ts +23 -0
- package/app/types/icon.ts +10 -0
- package/app/utils/editor.ts +10 -0
- package/modules/imports/constant.ts +41 -6
- package/modules/imports/index.ts +1 -1
- package/nuxt.config.ts +11 -0
- package/package.json +9 -7
- package/app/components/breadcrumb.vue +0 -65
- package/app/components/browser.vue +0 -79
- package/app/components/directory.vue +0 -65
- package/app/components/hero.vue +0 -59
- package/app/components/menu.vue +0 -64
- package/app/components/segmented-control.vue +0 -67
- package/app/components/table.vue +0 -68
- package/app/components/tabs.vue +0 -63
- package/app/components/tree.vue +0 -67
package/app/components/menu.vue
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
MenuContext,
|
|
4
|
-
MenuEmits,
|
|
5
|
-
MenuItem,
|
|
6
|
-
MenuPassthrough,
|
|
7
|
-
MenuProps,
|
|
8
|
-
MenuSlots,
|
|
9
|
-
} from "@zoobzio/vue/types/components/menu";
|
|
10
|
-
import type { Context } from "@zoobzio/vue/types/context";
|
|
11
|
-
import type { Passthrough } from "@zoobzio/vue/types/passthrough";
|
|
12
|
-
import type { VNodeProps } from "vue";
|
|
13
|
-
|
|
14
|
-
import Core from "@zoobzio/vue/components/menu.vue";
|
|
15
|
-
|
|
16
|
-
import NuxtLink from "#app/components/nuxt-link";
|
|
17
|
-
import { shallowRef, useAttrs } from "vue";
|
|
18
|
-
import { useContext } from "@zoobzio/vue/composables/context";
|
|
19
|
-
import { useExplicit } from "@zoobzio/vue/composables/explicit";
|
|
20
|
-
import { useForward } from "@zoobzio/vue/composables/forward";
|
|
21
|
-
import { usePassthrough } from "@zoobzio/vue/composables/passthrough";
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<script setup lang="ts" generic="T extends MenuItem">
|
|
25
|
-
defineOptions({ inheritAttrs: false });
|
|
26
|
-
|
|
27
|
-
const props = defineProps<MenuProps<T>>();
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits<MenuEmits<T>>();
|
|
30
|
-
|
|
31
|
-
const slots = defineSlots<MenuSlots<T>>();
|
|
32
|
-
|
|
33
|
-
const attrs = useAttrs();
|
|
34
|
-
|
|
35
|
-
const explicit = useExplicit(props);
|
|
36
|
-
|
|
37
|
-
const el = shallowRef<{ ctx: Context<MenuContext<T>> } | null>(null);
|
|
38
|
-
|
|
39
|
-
const pt = usePassthrough<MenuPassthrough<T>>(() => ({
|
|
40
|
-
pt: props.pt,
|
|
41
|
-
layer: { link: () => ({ as: NuxtLink }) },
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
const ctx = useContext(() => el.value?.ctx);
|
|
45
|
-
|
|
46
|
-
const Menu = useForward<Passthrough<MenuProps<T>, MenuEmits<T>> & VNodeProps>({
|
|
47
|
-
component: Core,
|
|
48
|
-
props: () => ({
|
|
49
|
-
...attrs,
|
|
50
|
-
...explicit.value,
|
|
51
|
-
pt: pt.value,
|
|
52
|
-
ref: el,
|
|
53
|
-
onSelect: (item: T) => emit("select", item),
|
|
54
|
-
"onUpdate:open": (value: boolean) => emit("update:open", value),
|
|
55
|
-
}),
|
|
56
|
-
slots,
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
defineExpose({ ctx });
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<template>
|
|
63
|
-
<Menu />
|
|
64
|
-
</template>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
SegmentedControlContext,
|
|
4
|
-
SegmentedControlEmits,
|
|
5
|
-
SegmentedControlOption,
|
|
6
|
-
SegmentedControlPassthrough,
|
|
7
|
-
SegmentedControlProps,
|
|
8
|
-
SegmentedControlSlots,
|
|
9
|
-
} from "@zoobzio/vue/types/components/segmented-control";
|
|
10
|
-
import type { Context } from "@zoobzio/vue/types/context";
|
|
11
|
-
import type { Passthrough } from "@zoobzio/vue/types/passthrough";
|
|
12
|
-
import type { VNodeProps } from "vue";
|
|
13
|
-
|
|
14
|
-
import Core from "@zoobzio/vue/components/segmented-control.vue";
|
|
15
|
-
|
|
16
|
-
import NuxtLink from "#app/components/nuxt-link";
|
|
17
|
-
import { shallowRef, useAttrs } from "vue";
|
|
18
|
-
import { useContext } from "@zoobzio/vue/composables/context";
|
|
19
|
-
import { useExplicit } from "@zoobzio/vue/composables/explicit";
|
|
20
|
-
import { useForward } from "@zoobzio/vue/composables/forward";
|
|
21
|
-
import { usePassthrough } from "@zoobzio/vue/composables/passthrough";
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<script setup lang="ts" generic="T extends SegmentedControlOption">
|
|
25
|
-
defineOptions({ inheritAttrs: false });
|
|
26
|
-
|
|
27
|
-
const props = defineProps<SegmentedControlProps<T>>();
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits<SegmentedControlEmits>();
|
|
30
|
-
|
|
31
|
-
const slots = defineSlots<SegmentedControlSlots<T>>();
|
|
32
|
-
|
|
33
|
-
const attrs = useAttrs();
|
|
34
|
-
|
|
35
|
-
const explicit = useExplicit(props);
|
|
36
|
-
|
|
37
|
-
const el = shallowRef<{ ctx: Context<SegmentedControlContext<T>> } | null>(
|
|
38
|
-
null,
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
const pt = usePassthrough<SegmentedControlPassthrough<T>>(() => ({
|
|
42
|
-
pt: props.pt,
|
|
43
|
-
layer: { link: () => ({ as: NuxtLink }) },
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
|
-
const ctx = useContext(() => el.value?.ctx);
|
|
47
|
-
|
|
48
|
-
const SegmentedControl = useForward<
|
|
49
|
-
Passthrough<SegmentedControlProps<T>, SegmentedControlEmits> & VNodeProps
|
|
50
|
-
>({
|
|
51
|
-
component: Core,
|
|
52
|
-
props: () => ({
|
|
53
|
-
...attrs,
|
|
54
|
-
...explicit.value,
|
|
55
|
-
pt: pt.value,
|
|
56
|
-
ref: el,
|
|
57
|
-
"onUpdate:modelValue": (value: string) => emit("update:modelValue", value),
|
|
58
|
-
}),
|
|
59
|
-
slots,
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
defineExpose({ ctx });
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<template>
|
|
66
|
-
<SegmentedControl />
|
|
67
|
-
</template>
|
package/app/components/table.vue
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
TableContext,
|
|
4
|
-
TableEmits,
|
|
5
|
-
TableProps,
|
|
6
|
-
TableSlots,
|
|
7
|
-
} from "@zoobzio/vue/types/components/table";
|
|
8
|
-
import type { TableBodyPassthrough } from "@zoobzio/vue/types/components/table-body";
|
|
9
|
-
import type { Context } from "@zoobzio/vue/types/context";
|
|
10
|
-
import type { Passthrough } from "@zoobzio/vue/types/passthrough";
|
|
11
|
-
import type { VNodeProps } from "vue";
|
|
12
|
-
|
|
13
|
-
import Core from "@zoobzio/vue/components/table.vue";
|
|
14
|
-
|
|
15
|
-
import NuxtLink from "#app/components/nuxt-link";
|
|
16
|
-
import { shallowRef, useAttrs } from "vue";
|
|
17
|
-
import { useContext } from "@zoobzio/vue/composables/context";
|
|
18
|
-
import { useExplicit } from "@zoobzio/vue/composables/explicit";
|
|
19
|
-
import { useForward } from "@zoobzio/vue/composables/forward";
|
|
20
|
-
import { usePassthrough } from "@zoobzio/vue/composables/passthrough";
|
|
21
|
-
|
|
22
|
-
type TableUpdated = TableEmits<unknown>["updated"][0];
|
|
23
|
-
type TableFiltered = TableEmits<unknown>["filtered"][0];
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<script setup lang="ts" generic="T">
|
|
27
|
-
defineOptions({ inheritAttrs: false });
|
|
28
|
-
|
|
29
|
-
const props = defineProps<TableProps<T>>();
|
|
30
|
-
|
|
31
|
-
const emit = defineEmits<TableEmits<T>>();
|
|
32
|
-
|
|
33
|
-
const slots = defineSlots<TableSlots<T>>();
|
|
34
|
-
|
|
35
|
-
const attrs = useAttrs();
|
|
36
|
-
|
|
37
|
-
const explicit = useExplicit(props);
|
|
38
|
-
|
|
39
|
-
const el = shallowRef<{ ctx: Context<TableContext<T>> } | null>(null);
|
|
40
|
-
|
|
41
|
-
const body = usePassthrough<TableBodyPassthrough<T>>(() => ({
|
|
42
|
-
pt: props.pt?.body,
|
|
43
|
-
layer: { link: () => ({ as: NuxtLink }) },
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
|
-
const ctx = useContext(() => el.value?.ctx);
|
|
47
|
-
|
|
48
|
-
const Table = useForward<
|
|
49
|
-
Passthrough<TableProps<T>, TableEmits<T>> & VNodeProps
|
|
50
|
-
>({
|
|
51
|
-
component: Core,
|
|
52
|
-
props: () => ({
|
|
53
|
-
...attrs,
|
|
54
|
-
...explicit.value,
|
|
55
|
-
pt: { ...props.pt, body: body.value },
|
|
56
|
-
ref: el,
|
|
57
|
-
onUpdated: (event: TableUpdated) => emit("updated", event),
|
|
58
|
-
onFiltered: (event: TableFiltered) => emit("filtered", event),
|
|
59
|
-
}),
|
|
60
|
-
slots,
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
defineExpose({ ctx });
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<template>
|
|
67
|
-
<Table />
|
|
68
|
-
</template>
|
package/app/components/tabs.vue
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
TabsContext,
|
|
4
|
-
TabsEmits,
|
|
5
|
-
TabsOption,
|
|
6
|
-
TabsPassthrough,
|
|
7
|
-
TabsProps,
|
|
8
|
-
TabsSlots,
|
|
9
|
-
} from "@zoobzio/vue/types/components/tabs";
|
|
10
|
-
import type { Context } from "@zoobzio/vue/types/context";
|
|
11
|
-
import type { Passthrough } from "@zoobzio/vue/types/passthrough";
|
|
12
|
-
import type { VNodeProps } from "vue";
|
|
13
|
-
|
|
14
|
-
import Core from "@zoobzio/vue/components/tabs.vue";
|
|
15
|
-
|
|
16
|
-
import NuxtLink from "#app/components/nuxt-link";
|
|
17
|
-
import { shallowRef, useAttrs } from "vue";
|
|
18
|
-
import { useContext } from "@zoobzio/vue/composables/context";
|
|
19
|
-
import { useExplicit } from "@zoobzio/vue/composables/explicit";
|
|
20
|
-
import { useForward } from "@zoobzio/vue/composables/forward";
|
|
21
|
-
import { usePassthrough } from "@zoobzio/vue/composables/passthrough";
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<script setup lang="ts" generic="T extends TabsOption">
|
|
25
|
-
defineOptions({ inheritAttrs: false });
|
|
26
|
-
|
|
27
|
-
const props = defineProps<TabsProps<T>>();
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits<TabsEmits>();
|
|
30
|
-
|
|
31
|
-
const slots = defineSlots<TabsSlots<T>>();
|
|
32
|
-
|
|
33
|
-
const attrs = useAttrs();
|
|
34
|
-
|
|
35
|
-
const explicit = useExplicit(props);
|
|
36
|
-
|
|
37
|
-
const el = shallowRef<{ ctx: Context<TabsContext<T>> } | null>(null);
|
|
38
|
-
|
|
39
|
-
const pt = usePassthrough<TabsPassthrough<T>>(() => ({
|
|
40
|
-
pt: props.pt,
|
|
41
|
-
layer: { link: () => ({ as: NuxtLink }) },
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
const ctx = useContext(() => el.value?.ctx);
|
|
45
|
-
|
|
46
|
-
const Tabs = useForward<Passthrough<TabsProps<T>, TabsEmits> & VNodeProps>({
|
|
47
|
-
component: Core,
|
|
48
|
-
props: () => ({
|
|
49
|
-
...attrs,
|
|
50
|
-
...explicit.value,
|
|
51
|
-
pt: pt.value,
|
|
52
|
-
ref: el,
|
|
53
|
-
"onUpdate:modelValue": (value: string) => emit("update:modelValue", value),
|
|
54
|
-
}),
|
|
55
|
-
slots,
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
defineExpose({ ctx });
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<template>
|
|
62
|
-
<Tabs />
|
|
63
|
-
</template>
|
package/app/components/tree.vue
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
TreeContext,
|
|
4
|
-
TreeEmits,
|
|
5
|
-
TreeNode,
|
|
6
|
-
TreePassthrough,
|
|
7
|
-
TreeProps,
|
|
8
|
-
TreeSlots,
|
|
9
|
-
} from "@zoobzio/vue/types/components/tree";
|
|
10
|
-
import type { Context } from "@zoobzio/vue/types/context";
|
|
11
|
-
import type { Passthrough } from "@zoobzio/vue/types/passthrough";
|
|
12
|
-
import type { VNodeProps } from "vue";
|
|
13
|
-
|
|
14
|
-
import Core from "@zoobzio/vue/components/tree.vue";
|
|
15
|
-
|
|
16
|
-
import NuxtLink from "#app/components/nuxt-link";
|
|
17
|
-
import { shallowRef, useAttrs } from "vue";
|
|
18
|
-
import { useContext } from "@zoobzio/vue/composables/context";
|
|
19
|
-
import { useExplicit } from "@zoobzio/vue/composables/explicit";
|
|
20
|
-
import { useForward } from "@zoobzio/vue/composables/forward";
|
|
21
|
-
import { usePassthrough } from "@zoobzio/vue/composables/passthrough";
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<script setup lang="ts" generic="T extends TreeNode & { children?: T[] }">
|
|
25
|
-
defineOptions({ inheritAttrs: false });
|
|
26
|
-
|
|
27
|
-
const props = defineProps<TreeProps<T>>();
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits<TreeEmits<T>>();
|
|
30
|
-
|
|
31
|
-
const slots = defineSlots<TreeSlots<T>>();
|
|
32
|
-
|
|
33
|
-
const attrs = useAttrs();
|
|
34
|
-
|
|
35
|
-
const explicit = useExplicit(props);
|
|
36
|
-
|
|
37
|
-
const el = shallowRef<{ ctx: Context<TreeContext<T>> } | null>(null);
|
|
38
|
-
|
|
39
|
-
const pt = usePassthrough<TreePassthrough<T>>(() => ({
|
|
40
|
-
pt: props.pt,
|
|
41
|
-
layer: { link: () => ({ as: NuxtLink }) },
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
const ctx = useContext(() => el.value?.ctx);
|
|
45
|
-
|
|
46
|
-
const Tree = useForward<Passthrough<TreeProps<T>, TreeEmits<T>> & VNodeProps>({
|
|
47
|
-
component: Core,
|
|
48
|
-
props: () => ({
|
|
49
|
-
...attrs,
|
|
50
|
-
...explicit.value,
|
|
51
|
-
pt: pt.value,
|
|
52
|
-
ref: el,
|
|
53
|
-
"onUpdate:modelValue": (value: T | undefined) =>
|
|
54
|
-
emit("update:modelValue", value),
|
|
55
|
-
"onUpdate:expanded": (value: string[]) => emit("update:expanded", value),
|
|
56
|
-
onSelect: (node: T) => emit("select", node),
|
|
57
|
-
onToggle: (node: T, expanded: boolean) => emit("toggle", node, expanded),
|
|
58
|
-
}),
|
|
59
|
-
slots,
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
defineExpose({ ctx });
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<template>
|
|
66
|
-
<Tree />
|
|
67
|
-
</template>
|