@open-xamu-co/ui-components-vue 3.1.0-next.9 → 4.0.0-next.1
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/CHANGELOG.md +468 -0
- package/dist/components/action/Button.stories.d.ts +8 -14
- package/dist/components/action/Button.vue.d.ts +11 -11
- package/dist/components/action/ButtonLink.stories.d.ts +4 -10
- package/dist/components/action/ButtonLink.vue.d.ts +17 -19
- package/dist/components/action/ButtonToggle.stories.d.ts +6 -10
- package/dist/components/action/ButtonToggle.vue.d.ts +7 -11
- package/dist/components/action/Link.stories.d.ts +4 -10
- package/dist/components/action/Link.vue.d.ts +7 -11
- package/dist/components/base/Action.vue.d.ts +7 -11
- package/dist/components/base/Box.vue.d.ts +13 -11
- package/dist/components/base/BrowserOnly.vue.d.ts +9 -12
- package/dist/components/base/ErrorBoundary.vue.d.ts +17 -15
- package/dist/components/base/Img.vue.d.ts +16 -56
- package/dist/components/base/Input.vue.d.ts +13 -15
- package/dist/components/base/Select.vue.d.ts +2 -1
- package/dist/components/base/Wrapper.vue.d.ts +12 -15
- package/dist/components/box/Action.stories.d.ts +4 -11
- package/dist/components/box/Action.vue.d.ts +3 -2
- package/dist/components/box/Message.stories.d.ts +4 -10
- package/dist/components/box/Message.vue.d.ts +7 -11
- package/dist/components/collapse/Simple.stories.d.ts +4 -11
- package/dist/components/collapse/Simple.vue.d.ts +7 -11
- package/dist/components/dropdown/Simple.stories.d.ts +4 -8
- package/dist/components/dropdown/Simple.vue.d.ts +37 -41
- package/dist/components/form/Input.stories.d.ts +3 -2
- package/dist/components/form/Input.vue.d.ts +2 -1
- package/dist/components/form/InputCountriesAPI.vue.d.ts +11 -19
- package/dist/components/form/InputLoop.vue.d.ts +12 -7
- package/dist/components/form/InputNValues.vue.d.ts +13 -6
- package/dist/components/form/InputOptions.vue.d.ts +19 -23
- package/dist/components/form/Simple.stories.d.ts +9 -5
- package/dist/components/form/Simple.vue.d.ts +17 -11
- package/dist/components/form/Stages.stories.d.ts +8 -69
- package/dist/components/form/Stages.vue.d.ts +29 -28
- package/dist/components/icon/Fa.stories.d.ts +4 -10
- package/dist/components/icon/Fa.vue.d.ts +2 -1
- package/dist/components/icon/Simple.stories.d.ts +4 -8
- package/dist/components/icon/Simple.vue.d.ts +7 -11
- package/dist/components/input/Color.stories.d.ts +4 -8
- package/dist/components/input/Color.vue.d.ts +11 -2
- package/dist/components/input/File.stories.d.ts +4 -10
- package/dist/components/input/File.vue.d.ts +6 -1
- package/dist/components/input/Text.stories.d.ts +4 -11
- package/dist/components/input/Text.vue.d.ts +2 -1
- package/dist/components/input/Toggle.stories.d.ts +4 -10
- package/dist/components/input/Toggle.vue.d.ts +9 -13
- package/dist/components/loader/Content.stories.d.ts +4 -8
- package/dist/components/loader/Content.vue.d.ts +7 -11
- package/dist/components/loader/ContentFetch.stories.d.ts +5 -8
- package/dist/components/loader/ContentFetch.vue.d.ts +19 -11
- package/dist/components/loader/Simple.stories.d.ts +4 -8
- package/dist/components/loader/Simple.vue.d.ts +7 -11
- package/dist/components/modal/Simple.stories.d.ts +5 -8
- package/dist/components/modal/Simple.vue.d.ts +53 -53
- package/dist/components/pagination/Content.stories.d.ts +4 -7
- package/dist/components/pagination/Content.vue.d.ts +29 -12
- package/dist/components/pagination/ContentTable.stories.d.ts +6 -8
- package/dist/components/pagination/ContentTable.vue.d.ts +62 -25
- package/dist/components/pagination/Simple.stories.d.ts +5 -8
- package/dist/components/pagination/Simple.vue.d.ts +12 -7
- package/dist/components/select/Choice.stories.d.ts +6 -11
- package/dist/components/select/Choice.vue.d.ts +2 -1
- package/dist/components/select/Filter.stories.d.ts +5 -11
- package/dist/components/select/Filter.vue.d.ts +2 -1
- package/dist/components/select/Simple.stories.d.ts +4 -11
- package/dist/components/select/Simple.vue.d.ts +2 -1
- package/dist/components/slider/Simple.stories.d.ts +4 -8
- package/dist/components/slider/Simple.vue.d.ts +50 -0
- package/dist/components/table/Body.vue.d.ts +33 -21
- package/dist/components/table/HeadActions.vue.d.ts +31 -0
- package/dist/components/table/HeadContent.vue.d.ts +22 -0
- package/dist/components/table/Simple.stories.d.ts +9 -33
- package/dist/components/table/Simple.vue.d.ts +43 -28
- package/dist/components/value/Complex.stories.d.ts +4 -8
- package/dist/components/value/Complex.vue.d.ts +2 -1
- package/dist/components/value/List.stories.d.ts +4 -27
- package/dist/components/value/List.vue.d.ts +2 -12
- package/dist/components/value/Simple.stories.d.ts +5 -10
- package/dist/components/value/Simple.vue.d.ts +10 -5
- package/dist/composables/theme.d.ts +8 -1
- package/dist/composables/utils.d.ts +2 -1
- package/dist/index-Bbn-n1yC.js +7098 -0
- package/dist/index-CyI1yZlR.cjs +4 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +45 -1
- package/dist/plugin.cjs +1 -0
- package/dist/plugin.js +902 -1
- package/dist/theme-CChhGSbE.cjs +1 -0
- package/dist/theme-DWMJmaKP.js +83 -0
- package/dist/theme.cjs +1 -0
- package/dist/theme.js +7 -1
- package/dist/types/plugin.d.ts +9 -1
- package/dist/types/props.d.ts +60 -17
- package/dist/types/storybook.d.ts +10 -0
- package/package.json +40 -31
- package/dist/components/table/Head.vue.d.ts +0 -25
- package/dist/index-BtJc7cX1.js +0 -4
- package/dist/index-DTG4ktcY.mjs +0 -6753
- package/dist/index.mjs +0 -45
- package/dist/plugin.mjs +0 -874
- package/dist/screens/DropdownWithToggle.stories.d.ts +0 -11
- package/dist/screens/DropdownWithToggle.vue.d.ts +0 -2
- package/dist/screens/FormWithFetch.stories.d.ts +0 -11
- package/dist/screens/FormWithFetch.vue.d.ts +0 -2
- package/dist/screens/ModalWithFormStages.stories.d.ts +0 -11
- package/dist/screens/ModalWithFormStages.vue.d.ts +0 -2
- package/dist/screens/ModalWithToggle.stories.d.ts +0 -11
- package/dist/screens/ModalWithToggle.vue.d.ts +0 -2
- package/dist/screens/PaginationContentWithTable.stories.d.ts +0 -11
- package/dist/screens/PaginationContentWithTable.vue.d.ts +0 -8
- package/dist/screens/TableWithNestedTable.stories.d.ts +0 -11
- package/dist/screens/TableWithNestedTable.vue.d.ts +0 -8
- package/dist/theme-DSVG59vT.js +0 -1
- package/dist/theme-DVpUQx-w.mjs +0 -78
- package/dist/theme.mjs +0 -7
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
2
|
-
import
|
|
3
|
-
declare const meta:
|
|
4
|
-
|
|
5
|
-
component: Record<keyof typeof Content, unknown>;
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
type Story = StoryObj<typeof Content>;
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import LoaderContent from "./Content.vue";
|
|
3
|
+
declare const meta: Meta<typeof LoaderContent>;
|
|
4
|
+
type Story = StoryObj<typeof meta>;
|
|
9
5
|
export declare const Sample: Story;
|
|
10
6
|
export default meta;
|
|
@@ -41,19 +41,15 @@ interface iLoaderContentProps extends iUseThemeProps {
|
|
|
41
41
|
el?: vComponent | string;
|
|
42
42
|
loaderClasses?: tProps<string>;
|
|
43
43
|
}
|
|
44
|
-
declare
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
default?(_: {}): any;
|
|
48
|
-
};
|
|
49
|
-
refs: {};
|
|
50
|
-
rootEl: any;
|
|
44
|
+
declare var __VLS_66: {};
|
|
45
|
+
type __VLS_Slots = {} & {
|
|
46
|
+
default?: (props: typeof __VLS_66) => any;
|
|
51
47
|
};
|
|
52
|
-
|
|
53
|
-
declare const
|
|
54
|
-
declare const _default:
|
|
48
|
+
declare const __VLS_base: import("vue").DefineComponent<iLoaderContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<iLoaderContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
50
|
+
declare const _default: typeof __VLS_export;
|
|
55
51
|
export default _default;
|
|
56
|
-
type
|
|
52
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
53
|
new (): {
|
|
58
54
|
$slots: S;
|
|
59
55
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
type Story = StoryObj<typeof ContentFetch>;
|
|
1
|
+
import type { StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import type { GenericMeta } from "../../types/storybook";
|
|
3
|
+
import LoaderContentFetch from "./ContentFetch.vue";
|
|
4
|
+
declare const meta: GenericMeta<typeof LoaderContentFetch>;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
9
6
|
export declare const Sample: Story;
|
|
10
7
|
export default meta;
|
|
@@ -26,7 +26,7 @@ export interface iLoaderContentFetchProps<Ti, Pi extends any[]> extends iUseThem
|
|
|
26
26
|
*
|
|
27
27
|
* Hydration is conditioned to the context (disabled, loading...)
|
|
28
28
|
*/
|
|
29
|
-
hydratablePromise?: false | ((content: Ref<Ti | null
|
|
29
|
+
hydratablePromise?: false | ((content: Ref<Ti | null>, errors: Ref<unknown>) => (...args: Pi) => Promise<Ti>);
|
|
30
30
|
payload?: Pi;
|
|
31
31
|
/**
|
|
32
32
|
* Component or tag to render on loader
|
|
@@ -42,25 +42,33 @@ export interface iLoaderContentFetchProps<Ti, Pi extends any[]> extends iUseThem
|
|
|
42
42
|
*/
|
|
43
43
|
client?: boolean;
|
|
44
44
|
}
|
|
45
|
-
declare const
|
|
46
|
-
props: __VLS_PrettifyLocal<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
declare const __VLS_export: <T, P extends any[] = any[]>(__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<{
|
|
46
|
+
props: __VLS_PrettifyLocal<iLoaderContentFetchProps<T, P> & {
|
|
47
|
+
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
"onHas-content"?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
onHydrate?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
}> & import("vue").PublicProps & (typeof globalThis extends {
|
|
51
|
+
__VLS_PROPS_FALLBACK: infer P_1;
|
|
52
|
+
} ? P_1 : {});
|
|
53
|
+
expose: (exposed: {}) => void;
|
|
50
54
|
attrs: any;
|
|
51
55
|
slots: {
|
|
52
|
-
default
|
|
56
|
+
default?: (props: {
|
|
53
57
|
content: NonNullable<T>;
|
|
54
58
|
refresh: (opts?: any) => Promise<void>;
|
|
55
59
|
loading: boolean;
|
|
56
60
|
errors: unknown;
|
|
57
|
-
|
|
61
|
+
hydrate: (newContent: T | null, newErrors?: unknown) => void;
|
|
62
|
+
}) => any;
|
|
58
63
|
};
|
|
59
|
-
emit: (event: "refresh", ...args: any[]) => void;
|
|
64
|
+
emit: (event: "refresh" | "has-content" | "hydrate", ...args: any[]) => void;
|
|
60
65
|
}>) => import("vue").VNode & {
|
|
61
66
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
62
67
|
};
|
|
68
|
+
declare const _default: typeof __VLS_export;
|
|
63
69
|
export default _default;
|
|
64
|
-
type __VLS_PrettifyLocal<T> = {
|
|
70
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
65
71
|
[K in keyof T]: T[K];
|
|
66
|
-
}
|
|
72
|
+
} : {
|
|
73
|
+
[K in keyof T as K]: T[K];
|
|
74
|
+
}) & {};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
2
|
-
import
|
|
3
|
-
declare const meta:
|
|
4
|
-
|
|
5
|
-
component: Record<keyof typeof Simple, unknown>;
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
type Story = StoryObj<typeof Simple>;
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import LoaderSimple from "./Simple.vue";
|
|
3
|
+
declare const meta: Meta<typeof LoaderSimple>;
|
|
4
|
+
type Story = StoryObj<typeof meta>;
|
|
9
5
|
export declare const Sample: Story;
|
|
10
6
|
export default meta;
|
|
@@ -12,19 +12,15 @@ interface iLoaderSimpleProps extends iUseThemeProps {
|
|
|
12
12
|
*/
|
|
13
13
|
speed?: number;
|
|
14
14
|
}
|
|
15
|
-
declare
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
default?(_: {}): any;
|
|
19
|
-
};
|
|
20
|
-
refs: {};
|
|
21
|
-
rootEl: HTMLSpanElement;
|
|
15
|
+
declare var __VLS_1: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
default?: (props: typeof __VLS_1) => any;
|
|
22
18
|
};
|
|
23
|
-
|
|
24
|
-
declare const
|
|
25
|
-
declare const _default:
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<iLoaderSimpleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<iLoaderSimpleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
26
22
|
export default _default;
|
|
27
|
-
type
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
24
|
new (): {
|
|
29
25
|
$slots: S;
|
|
30
26
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
2
|
-
import
|
|
3
|
-
declare const meta:
|
|
4
|
-
|
|
5
|
-
component: Record<keyof typeof Simple, unknown>;
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
type Story = StoryObj<typeof Simple>;
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import ModalSimple from "./Simple.vue";
|
|
3
|
+
declare const meta: Meta<typeof ModalSimple>;
|
|
4
|
+
type Story = StoryObj<typeof meta>;
|
|
9
5
|
export declare const Sample: Story;
|
|
6
|
+
export declare const WithFormStages: Story;
|
|
10
7
|
export default meta;
|
|
@@ -4,58 +4,57 @@ import type { iModalProps } from "../../types/props";
|
|
|
4
4
|
* @param success whether the modal action was successfull or not
|
|
5
5
|
*/
|
|
6
6
|
declare function toggleModal(success?: boolean): Promise<boolean | undefined>;
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
7
|
+
declare var __VLS_8: {
|
|
8
|
+
toggleModal: typeof toggleModal;
|
|
9
|
+
model: boolean;
|
|
10
|
+
}, __VLS_16: {
|
|
11
|
+
toggleModal: typeof toggleModal;
|
|
12
|
+
model: boolean;
|
|
13
|
+
modalRef: HTMLDialogElement | undefined;
|
|
14
|
+
invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
|
|
15
|
+
}, __VLS_31: {
|
|
16
|
+
toggleModal: typeof toggleModal;
|
|
17
|
+
model: boolean;
|
|
18
|
+
modalRef: HTMLDialogElement | undefined;
|
|
19
|
+
invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
|
|
20
|
+
}, __VLS_33: {
|
|
21
|
+
toggleModal: typeof toggleModal;
|
|
22
|
+
model: boolean;
|
|
23
|
+
modalRef: HTMLDialogElement | undefined;
|
|
24
|
+
invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
|
|
25
|
+
}, __VLS_35: {
|
|
26
|
+
toggleModal: typeof toggleModal;
|
|
27
|
+
model: boolean;
|
|
28
|
+
modalRef: HTMLDialogElement | undefined;
|
|
29
|
+
invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
|
|
30
|
+
}, __VLS_37: {
|
|
31
|
+
toggleModal: typeof toggleModal;
|
|
32
|
+
model: boolean;
|
|
33
|
+
modalRef: HTMLDialogElement | undefined;
|
|
34
|
+
invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
|
|
35
|
+
save: (e: Event) => void;
|
|
36
|
+
}, __VLS_85: {
|
|
37
|
+
toggleModal: typeof toggleModal;
|
|
38
|
+
model: boolean;
|
|
39
|
+
modalRef: HTMLDialogElement | undefined;
|
|
40
|
+
invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
|
|
41
|
+
};
|
|
42
|
+
type __VLS_Slots = {} & {
|
|
43
|
+
toggle?: (props: typeof __VLS_8) => any;
|
|
44
|
+
} & {
|
|
45
|
+
header?: (props: typeof __VLS_16) => any;
|
|
46
|
+
} & {
|
|
47
|
+
content?: (props: typeof __VLS_31) => any;
|
|
48
|
+
} & {
|
|
49
|
+
default?: (props: typeof __VLS_33) => any;
|
|
50
|
+
} & {
|
|
51
|
+
footer?: (props: typeof __VLS_35) => any;
|
|
52
|
+
} & {
|
|
53
|
+
'footer-actions'?: (props: typeof __VLS_37) => any;
|
|
54
|
+
} & {
|
|
55
|
+
default?: (props: typeof __VLS_85) => any;
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
declare const __VLS_component: import("vue").DefineComponent<iModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
57
|
+
declare const __VLS_base: import("vue").DefineComponent<iModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
59
58
|
close: (...args: any[]) => void;
|
|
60
59
|
save: (...args: any[]) => void;
|
|
61
60
|
"update:model-value": (...args: any[]) => void;
|
|
@@ -66,9 +65,10 @@ declare const __VLS_component: import("vue").DefineComponent<iModalProps, {}, {}
|
|
|
66
65
|
}>, {
|
|
67
66
|
theme: import("@open-xamu-co/ui-common-types").tThemeTuple | import("@open-xamu-co/ui-common-types").tProp<import("@open-xamu-co/ui-common-types").tThemeModifier>;
|
|
68
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
69
|
-
declare const
|
|
68
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
69
|
+
declare const _default: typeof __VLS_export;
|
|
70
70
|
export default _default;
|
|
71
|
-
type
|
|
71
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
72
72
|
new (): {
|
|
73
73
|
$slots: S;
|
|
74
74
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
1
|
+
import type { StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import type { GenericMeta } from "../../types/storybook";
|
|
2
3
|
import Content from "./Content.vue";
|
|
3
|
-
declare const meta:
|
|
4
|
-
|
|
5
|
-
component: Record<keyof typeof Content, unknown>;
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
type Story = StoryObj<typeof Content>;
|
|
4
|
+
declare const meta: GenericMeta<typeof Content>;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
9
6
|
export declare const Sample: Story;
|
|
10
7
|
export default meta;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
1
2
|
import type { iGetPage, iPage, iPagination } from "@open-xamu-co/ui-common-types";
|
|
2
3
|
import type { iUseThemeProps } from "../../types/props";
|
|
3
4
|
export interface iPCProps<Ti, Ci extends string | number = string, Ri = never> extends iPagination, iUseThemeProps {
|
|
4
5
|
/**
|
|
5
6
|
* Function used to fetch the page
|
|
6
7
|
*/
|
|
7
|
-
page
|
|
8
|
+
page?: Ri extends iGetPage<Ti, Ci> ? iGetPage<Ti, Ci> : (params?: iPagination) => Promise<Ri | undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* Function used to fetch the page and hydrate the content
|
|
11
|
+
*/
|
|
12
|
+
hydratablePage?: (content: Ref<iPage<Ti, Ci> | null | undefined>, errors: Ref<unknown>) => Ri extends iGetPage<Ti, Ci> ? iGetPage<Ti, Ci> : (params?: iPagination) => Promise<Ri | undefined>;
|
|
8
13
|
/**
|
|
9
14
|
* Path used as key for the cache
|
|
10
15
|
*/
|
|
@@ -50,27 +55,39 @@ export interface iPCProps<Ti, Ci extends string | number = string, Ri = never> e
|
|
|
50
55
|
* Whether to fetch data on client side only
|
|
51
56
|
*/
|
|
52
57
|
client?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Additional class for the pagination
|
|
60
|
+
*
|
|
61
|
+
* @example --txtColor
|
|
62
|
+
*/
|
|
63
|
+
paginationClass?: string | string[] | Record<string, boolean>;
|
|
53
64
|
}
|
|
54
|
-
declare const
|
|
55
|
-
props: __VLS_PrettifyLocal<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
} & import("vue").
|
|
59
|
-
|
|
65
|
+
declare const __VLS_export: <T, C extends string | number = string, R = never>(__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<{
|
|
66
|
+
props: __VLS_PrettifyLocal<iPCProps<T, C, R> & {
|
|
67
|
+
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
"onHas-content"?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
}> & import("vue").PublicProps & (typeof globalThis extends {
|
|
70
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
71
|
+
} ? P : {});
|
|
72
|
+
expose: (exposed: {}) => void;
|
|
60
73
|
attrs: any;
|
|
61
74
|
slots: {
|
|
62
|
-
default
|
|
75
|
+
default?: (props: {
|
|
76
|
+
hydrateNodes: ((newContent: T[] | null, newErrors?: unknown) => void) | undefined;
|
|
63
77
|
content: NoInfer<T>[];
|
|
64
78
|
pagination: iPagination;
|
|
65
79
|
currentPage: iPage<T, C>;
|
|
66
80
|
refresh: (opts?: any) => Promise<void>;
|
|
67
|
-
})
|
|
81
|
+
}) => any;
|
|
68
82
|
};
|
|
69
|
-
emit: (event: "refresh" | "
|
|
83
|
+
emit: (event: "refresh" | "has-content", ...args: any[]) => void;
|
|
70
84
|
}>) => import("vue").VNode & {
|
|
71
85
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
72
86
|
};
|
|
87
|
+
declare const _default: typeof __VLS_export;
|
|
73
88
|
export default _default;
|
|
74
|
-
type __VLS_PrettifyLocal<T> = {
|
|
89
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
75
90
|
[K in keyof T]: T[K];
|
|
76
|
-
}
|
|
91
|
+
} : {
|
|
92
|
+
[K in keyof T as K]: T[K];
|
|
93
|
+
}) & {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
type Story = StoryObj<typeof ContentTable>;
|
|
1
|
+
import type { StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import type { GenericMeta } from "../../types/storybook";
|
|
3
|
+
import PaginationContentTable from "./ContentTable.vue";
|
|
4
|
+
declare const meta: GenericMeta<typeof PaginationContentTable>;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
9
6
|
export declare const Sample: Story;
|
|
7
|
+
export declare const Data: Story;
|
|
10
8
|
export default meta;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { iGetPage, tThemeModifier, tThemeTuple } from "@open-xamu-co/ui-common-types";
|
|
1
|
+
import type { iGetPage, iNodeFn, tThemeModifier, tThemeTuple } from "@open-xamu-co/ui-common-types";
|
|
2
2
|
import type { iTableProps } from "@open-xamu-co/ui-components-vue";
|
|
3
3
|
export interface iPaginationContentTableProps<Ti extends Record<string, any>, TMi extends Record<string, any>> {
|
|
4
4
|
/**
|
|
@@ -7,6 +7,7 @@ export interface iPaginationContentTableProps<Ti extends Record<string, any>, TM
|
|
|
7
7
|
url: string;
|
|
8
8
|
page: iGetPage<Ti>;
|
|
9
9
|
defaults?: Record<string, any>;
|
|
10
|
+
/** Map node data as required */
|
|
10
11
|
mapNode?: (node: Ti) => TMi;
|
|
11
12
|
preventAutoload?: boolean;
|
|
12
13
|
/**
|
|
@@ -14,7 +15,8 @@ export interface iPaginationContentTableProps<Ti extends Record<string, any>, TM
|
|
|
14
15
|
*/
|
|
15
16
|
refresh?: () => void;
|
|
16
17
|
noContentMessage?: string;
|
|
17
|
-
|
|
18
|
+
renderErrorMessage?: string;
|
|
19
|
+
tableProps?: Omit<iTableProps<Ti, TMi>, "nodes" | "refresh">;
|
|
18
20
|
theme?: tThemeModifier | tThemeTuple;
|
|
19
21
|
client?: boolean;
|
|
20
22
|
/**
|
|
@@ -29,40 +31,75 @@ export interface iPaginationContentTableProps<Ti extends Record<string, any>, TM
|
|
|
29
31
|
* @example --txtColor
|
|
30
32
|
*/
|
|
31
33
|
modalClass?: string | string[] | Record<string, boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Function used to create a node
|
|
36
|
+
*/
|
|
37
|
+
createNode?: iNodeFn<NoInfer<Ti>, []>;
|
|
38
|
+
/**
|
|
39
|
+
* Prevent node functions from triggering refresh event (useful with firebase hydration)
|
|
40
|
+
*/
|
|
41
|
+
omitRefresh?: boolean;
|
|
32
42
|
}
|
|
33
|
-
declare const
|
|
34
|
-
props: __VLS_PrettifyLocal<
|
|
35
|
-
|
|
43
|
+
declare const __VLS_export: <T extends Record<string, any>, TM extends Record<string, any> = T>(__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<{
|
|
44
|
+
props: __VLS_PrettifyLocal<iPaginationContentTableProps<T, TM> & {
|
|
45
|
+
"onCreate-node-and-refresh"?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
}> & import("vue").PublicProps & (typeof globalThis extends {
|
|
47
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
48
|
+
} ? P : {});
|
|
49
|
+
expose: (exposed: {}) => void;
|
|
36
50
|
attrs: any;
|
|
37
51
|
slots: {
|
|
38
|
-
default
|
|
39
|
-
hasContent: boolean;
|
|
52
|
+
default?: (props: {
|
|
40
53
|
refreshData: () => void;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
hasContent: boolean | undefined;
|
|
55
|
+
hydrateData: ((newContent: T[] | null, newErrors?: unknown) => void) | undefined;
|
|
56
|
+
createNodeAndRefresh: () => Promise<import("@open-xamu-co/ui-common-types").iNodeFnResponse<NoInfer<T>>>;
|
|
57
|
+
}) => any;
|
|
58
|
+
} & {
|
|
59
|
+
headActions?: (props: {
|
|
44
60
|
refreshData: () => void;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
61
|
+
hasContent: false | undefined;
|
|
62
|
+
hydrateData: ((newContent: T[] | null, newErrors?: unknown) => void) | undefined;
|
|
63
|
+
createNodeAndRefresh: () => Promise<import("@open-xamu-co/ui-common-types").iNodeFnResponse<NoInfer<T>>>;
|
|
64
|
+
}) => any;
|
|
65
|
+
} & {
|
|
66
|
+
headActions?: (props: {
|
|
48
67
|
refreshData: () => void;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
hasContent: true;
|
|
69
|
+
hydrateData: ((newContent: T[] | null, newErrors?: unknown) => void) | undefined;
|
|
70
|
+
createNodeAndRefresh: () => Promise<import("@open-xamu-co/ui-common-types").iNodeFnResponse<NoInfer<T>>>;
|
|
71
|
+
nodes: NoInfer<T>[];
|
|
72
|
+
mappedNodes: import("@open-xamu-co/ui-components-vue").iMappedNodes<NoInfer<T>, TM>;
|
|
73
|
+
updateNodeAndRefresh: iNodeFn<NoInfer<T>>;
|
|
74
|
+
cloneNodeAndRefresh: iNodeFn<NoInfer<T>, [NoInfer<T>, ((m?: boolean) => any) | undefined, (HTMLElement | undefined)?]>;
|
|
75
|
+
deleteNodeAndRefresh: iNodeFn<NoInfer<T>, [NoInfer<T>, ((m?: boolean) => any) | undefined, (HTMLElement | undefined)?]>;
|
|
76
|
+
deleteNodesAndRefresh: (nodes?: NoInfer<T>[] | undefined) => Promise<void>;
|
|
77
|
+
}) => any;
|
|
78
|
+
} & {
|
|
79
|
+
tableChildren?: (props: {
|
|
52
80
|
refreshData: () => void;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
81
|
+
hasContent: boolean | undefined;
|
|
82
|
+
hydrateData: ((newContent: T[] | null, newErrors?: unknown) => void) | undefined;
|
|
83
|
+
createNodeAndRefresh: () => Promise<import("@open-xamu-co/ui-common-types").iNodeFnResponse<NoInfer<T>>>;
|
|
84
|
+
node: NoInfer<T>;
|
|
85
|
+
mappedNode: TM;
|
|
86
|
+
updateNodeAndRefresh: iNodeFn<NoInfer<T>>;
|
|
87
|
+
cloneNodeAndRefresh: iNodeFn<NoInfer<T>, [NoInfer<T>, ((m?: boolean) => any) | undefined, (HTMLElement | undefined)?]>;
|
|
88
|
+
deleteNodeAndRefresh: iNodeFn<NoInfer<T>, [NoInfer<T>, ((m?: boolean) => any) | undefined, (HTMLElement | undefined)?]>;
|
|
89
|
+
deleteNodesAndRefresh: (nodes?: NoInfer<T>[] | undefined) => Promise<void>;
|
|
90
|
+
createNodeChildrenAndRefresh: iNodeFn<NoInfer<T>>;
|
|
58
91
|
show: boolean;
|
|
59
|
-
|
|
92
|
+
hydrateParentNode: (newNode: NoInfer<T> | null, _newErrors?: unknown) => void;
|
|
93
|
+
}) => any;
|
|
60
94
|
};
|
|
61
|
-
emit:
|
|
95
|
+
emit: (event: "create-node-and-refresh", ...args: any[]) => void;
|
|
62
96
|
}>) => import("vue").VNode & {
|
|
63
97
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
64
98
|
};
|
|
99
|
+
declare const _default: typeof __VLS_export;
|
|
65
100
|
export default _default;
|
|
66
|
-
type __VLS_PrettifyLocal<T> = {
|
|
101
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
67
102
|
[K in keyof T]: T[K];
|
|
68
|
-
}
|
|
103
|
+
} : {
|
|
104
|
+
[K in keyof T as K]: T[K];
|
|
105
|
+
}) & {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
type Story = StoryObj<typeof Simple>;
|
|
1
|
+
import type { StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import type { GenericMeta } from "../../types/storybook";
|
|
3
|
+
import PaginationSimple from "./Simple.vue";
|
|
4
|
+
declare const meta: GenericMeta<typeof PaginationSimple>;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
9
6
|
export declare const Sample: Story;
|
|
10
7
|
export default meta;
|
|
@@ -11,18 +11,23 @@ export interface iPaginationSimpleProps<Ti, Ci extends string | number> extends
|
|
|
11
11
|
modelValue?: iPagination;
|
|
12
12
|
currentPage?: iPage<Ti, Ci> | null;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
15
|
-
props: __VLS_PrettifyLocal<
|
|
16
|
-
|
|
17
|
-
} & import("vue").
|
|
18
|
-
|
|
14
|
+
declare const __VLS_export: <T, C extends string | number>(__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<{
|
|
15
|
+
props: __VLS_PrettifyLocal<iPaginationSimpleProps<T, C> & {
|
|
16
|
+
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
}> & import("vue").PublicProps & (typeof globalThis extends {
|
|
18
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
19
|
+
} ? P : {});
|
|
20
|
+
expose: (exposed: {}) => void;
|
|
19
21
|
attrs: any;
|
|
20
22
|
slots: {};
|
|
21
23
|
emit: (event: "update:model-value", ...args: any[]) => void;
|
|
22
24
|
}>) => import("vue").VNode & {
|
|
23
25
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
24
26
|
};
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
25
28
|
export default _default;
|
|
26
|
-
type __VLS_PrettifyLocal<T> = {
|
|
29
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
27
30
|
[K in keyof T]: T[K];
|
|
28
|
-
}
|
|
31
|
+
} : {
|
|
32
|
+
[K in keyof T as K]: T[K];
|
|
33
|
+
}) & {};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/vue3";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
title: string;
|
|
6
|
-
component: Record<keyof typeof Choice, unknown>;
|
|
7
|
-
args: {
|
|
8
|
-
options: iSelectOption[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
type Story = StoryObj<typeof Choice>;
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
2
|
+
import SelectChoice from "./Choice.vue";
|
|
3
|
+
declare const meta: Meta<typeof SelectChoice>;
|
|
4
|
+
type Story = StoryObj<typeof meta>;
|
|
12
5
|
export declare const Sample: Story;
|
|
6
|
+
export declare const WithOptions: Story;
|
|
7
|
+
export declare const WithMultipleOptions: Story;
|
|
13
8
|
export default meta;
|
|
@@ -10,9 +10,10 @@ interface iSelectSimpleProps extends iSelectProps, iUseModifiersProps, iUseState
|
|
|
10
10
|
*/
|
|
11
11
|
toggle?: boolean;
|
|
12
12
|
}
|
|
13
|
-
declare const
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<iSelectSimpleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
14
|
"update:model-value": (...args: any[]) => void;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<iSelectSimpleProps> & Readonly<{
|
|
16
16
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
17
17
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
18
19
|
export default _default;
|