@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.
Files changed (116) hide show
  1. package/CHANGELOG.md +468 -0
  2. package/dist/components/action/Button.stories.d.ts +8 -14
  3. package/dist/components/action/Button.vue.d.ts +11 -11
  4. package/dist/components/action/ButtonLink.stories.d.ts +4 -10
  5. package/dist/components/action/ButtonLink.vue.d.ts +17 -19
  6. package/dist/components/action/ButtonToggle.stories.d.ts +6 -10
  7. package/dist/components/action/ButtonToggle.vue.d.ts +7 -11
  8. package/dist/components/action/Link.stories.d.ts +4 -10
  9. package/dist/components/action/Link.vue.d.ts +7 -11
  10. package/dist/components/base/Action.vue.d.ts +7 -11
  11. package/dist/components/base/Box.vue.d.ts +13 -11
  12. package/dist/components/base/BrowserOnly.vue.d.ts +9 -12
  13. package/dist/components/base/ErrorBoundary.vue.d.ts +17 -15
  14. package/dist/components/base/Img.vue.d.ts +16 -56
  15. package/dist/components/base/Input.vue.d.ts +13 -15
  16. package/dist/components/base/Select.vue.d.ts +2 -1
  17. package/dist/components/base/Wrapper.vue.d.ts +12 -15
  18. package/dist/components/box/Action.stories.d.ts +4 -11
  19. package/dist/components/box/Action.vue.d.ts +3 -2
  20. package/dist/components/box/Message.stories.d.ts +4 -10
  21. package/dist/components/box/Message.vue.d.ts +7 -11
  22. package/dist/components/collapse/Simple.stories.d.ts +4 -11
  23. package/dist/components/collapse/Simple.vue.d.ts +7 -11
  24. package/dist/components/dropdown/Simple.stories.d.ts +4 -8
  25. package/dist/components/dropdown/Simple.vue.d.ts +37 -41
  26. package/dist/components/form/Input.stories.d.ts +3 -2
  27. package/dist/components/form/Input.vue.d.ts +2 -1
  28. package/dist/components/form/InputCountriesAPI.vue.d.ts +11 -19
  29. package/dist/components/form/InputLoop.vue.d.ts +12 -7
  30. package/dist/components/form/InputNValues.vue.d.ts +13 -6
  31. package/dist/components/form/InputOptions.vue.d.ts +19 -23
  32. package/dist/components/form/Simple.stories.d.ts +9 -5
  33. package/dist/components/form/Simple.vue.d.ts +17 -11
  34. package/dist/components/form/Stages.stories.d.ts +8 -69
  35. package/dist/components/form/Stages.vue.d.ts +29 -28
  36. package/dist/components/icon/Fa.stories.d.ts +4 -10
  37. package/dist/components/icon/Fa.vue.d.ts +2 -1
  38. package/dist/components/icon/Simple.stories.d.ts +4 -8
  39. package/dist/components/icon/Simple.vue.d.ts +7 -11
  40. package/dist/components/input/Color.stories.d.ts +4 -8
  41. package/dist/components/input/Color.vue.d.ts +11 -2
  42. package/dist/components/input/File.stories.d.ts +4 -10
  43. package/dist/components/input/File.vue.d.ts +6 -1
  44. package/dist/components/input/Text.stories.d.ts +4 -11
  45. package/dist/components/input/Text.vue.d.ts +2 -1
  46. package/dist/components/input/Toggle.stories.d.ts +4 -10
  47. package/dist/components/input/Toggle.vue.d.ts +9 -13
  48. package/dist/components/loader/Content.stories.d.ts +4 -8
  49. package/dist/components/loader/Content.vue.d.ts +7 -11
  50. package/dist/components/loader/ContentFetch.stories.d.ts +5 -8
  51. package/dist/components/loader/ContentFetch.vue.d.ts +19 -11
  52. package/dist/components/loader/Simple.stories.d.ts +4 -8
  53. package/dist/components/loader/Simple.vue.d.ts +7 -11
  54. package/dist/components/modal/Simple.stories.d.ts +5 -8
  55. package/dist/components/modal/Simple.vue.d.ts +53 -53
  56. package/dist/components/pagination/Content.stories.d.ts +4 -7
  57. package/dist/components/pagination/Content.vue.d.ts +29 -12
  58. package/dist/components/pagination/ContentTable.stories.d.ts +6 -8
  59. package/dist/components/pagination/ContentTable.vue.d.ts +62 -25
  60. package/dist/components/pagination/Simple.stories.d.ts +5 -8
  61. package/dist/components/pagination/Simple.vue.d.ts +12 -7
  62. package/dist/components/select/Choice.stories.d.ts +6 -11
  63. package/dist/components/select/Choice.vue.d.ts +2 -1
  64. package/dist/components/select/Filter.stories.d.ts +5 -11
  65. package/dist/components/select/Filter.vue.d.ts +2 -1
  66. package/dist/components/select/Simple.stories.d.ts +4 -11
  67. package/dist/components/select/Simple.vue.d.ts +2 -1
  68. package/dist/components/slider/Simple.stories.d.ts +4 -8
  69. package/dist/components/slider/Simple.vue.d.ts +50 -0
  70. package/dist/components/table/Body.vue.d.ts +33 -21
  71. package/dist/components/table/HeadActions.vue.d.ts +31 -0
  72. package/dist/components/table/HeadContent.vue.d.ts +22 -0
  73. package/dist/components/table/Simple.stories.d.ts +9 -33
  74. package/dist/components/table/Simple.vue.d.ts +43 -28
  75. package/dist/components/value/Complex.stories.d.ts +4 -8
  76. package/dist/components/value/Complex.vue.d.ts +2 -1
  77. package/dist/components/value/List.stories.d.ts +4 -27
  78. package/dist/components/value/List.vue.d.ts +2 -12
  79. package/dist/components/value/Simple.stories.d.ts +5 -10
  80. package/dist/components/value/Simple.vue.d.ts +10 -5
  81. package/dist/composables/theme.d.ts +8 -1
  82. package/dist/composables/utils.d.ts +2 -1
  83. package/dist/index-Bbn-n1yC.js +7098 -0
  84. package/dist/index-CyI1yZlR.cjs +4 -0
  85. package/dist/index.cjs +1 -0
  86. package/dist/index.js +45 -1
  87. package/dist/plugin.cjs +1 -0
  88. package/dist/plugin.js +902 -1
  89. package/dist/theme-CChhGSbE.cjs +1 -0
  90. package/dist/theme-DWMJmaKP.js +83 -0
  91. package/dist/theme.cjs +1 -0
  92. package/dist/theme.js +7 -1
  93. package/dist/types/plugin.d.ts +9 -1
  94. package/dist/types/props.d.ts +60 -17
  95. package/dist/types/storybook.d.ts +10 -0
  96. package/package.json +40 -31
  97. package/dist/components/table/Head.vue.d.ts +0 -25
  98. package/dist/index-BtJc7cX1.js +0 -4
  99. package/dist/index-DTG4ktcY.mjs +0 -6753
  100. package/dist/index.mjs +0 -45
  101. package/dist/plugin.mjs +0 -874
  102. package/dist/screens/DropdownWithToggle.stories.d.ts +0 -11
  103. package/dist/screens/DropdownWithToggle.vue.d.ts +0 -2
  104. package/dist/screens/FormWithFetch.stories.d.ts +0 -11
  105. package/dist/screens/FormWithFetch.vue.d.ts +0 -2
  106. package/dist/screens/ModalWithFormStages.stories.d.ts +0 -11
  107. package/dist/screens/ModalWithFormStages.vue.d.ts +0 -2
  108. package/dist/screens/ModalWithToggle.stories.d.ts +0 -11
  109. package/dist/screens/ModalWithToggle.vue.d.ts +0 -2
  110. package/dist/screens/PaginationContentWithTable.stories.d.ts +0 -11
  111. package/dist/screens/PaginationContentWithTable.vue.d.ts +0 -8
  112. package/dist/screens/TableWithNestedTable.stories.d.ts +0 -11
  113. package/dist/screens/TableWithNestedTable.vue.d.ts +0 -8
  114. package/dist/theme-DSVG59vT.js +0 -1
  115. package/dist/theme-DVpUQx-w.mjs +0 -78
  116. package/dist/theme.mjs +0 -7
@@ -1,10 +1,6 @@
1
- import type { StoryObj } from "@storybook/vue3";
2
- import Content from "./Content.vue";
3
- declare const meta: {
4
- title: string;
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 function __VLS_template(): {
45
- attrs: Partial<{}>;
46
- slots: {
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
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
53
- declare const __VLS_component: import("vue").DefineComponent<iLoaderContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<iLoaderContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
54
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
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 __VLS_WithTemplateSlots<T, S> = T & {
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 ContentFetch from "./ContentFetch.vue";
3
- declare const meta: {
4
- title: string;
5
- component: Record<keyof typeof ContentFetch, unknown>;
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 | undefined>, errors: Ref<unknown>) => (...args: Pi) => Promise<Ti>);
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 _default: <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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
46
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
47
- readonly onRefresh?: ((...args: any[]) => any) | undefined;
48
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onRefresh"> & Partial<{}> & iLoaderContentFetchProps<T, P>> & import("vue").PublicProps;
49
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
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
- }): any;
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 Simple from "./Simple.vue";
3
- declare const meta: {
4
- title: string;
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 function __VLS_template(): {
16
- attrs: Partial<{}>;
17
- slots: {
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
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
- declare const __VLS_component: import("vue").DefineComponent<iLoaderSimpleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<iLoaderSimpleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLSpanElement>;
25
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
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 __VLS_WithTemplateSlots<T, S> = T & {
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 Simple from "./Simple.vue";
3
- declare const meta: {
4
- title: string;
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 function __VLS_template(): {
8
- attrs: Partial<{}>;
9
- slots: {
10
- toggle?(_: {
11
- toggleModal: typeof toggleModal;
12
- model: boolean;
13
- }): any;
14
- header?(_: {
15
- toggleModal: typeof toggleModal;
16
- model: boolean;
17
- modalRef: HTMLDialogElement | undefined;
18
- invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
19
- }): any;
20
- content?(_: {
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
- }): any;
26
- default?(_: {
27
- toggleModal: typeof toggleModal;
28
- model: boolean;
29
- modalRef: HTMLDialogElement | undefined;
30
- invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
31
- }): any;
32
- default?(_: {
33
- toggleModal: typeof toggleModal;
34
- model: boolean;
35
- modalRef: HTMLDialogElement | undefined;
36
- invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
37
- }): any;
38
- footer?(_: {
39
- toggleModal: typeof toggleModal;
40
- model: boolean;
41
- modalRef: HTMLDialogElement | undefined;
42
- invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
43
- }): any;
44
- "footer-actions"?(_: {
45
- toggleModal: typeof toggleModal;
46
- model: boolean;
47
- modalRef: HTMLDialogElement | undefined;
48
- invertedTheme: [import("@open-xamu-co/ui-common-types").tThemeModifier, import("@open-xamu-co/ui-common-types").tThemeModifier];
49
- save: (e: Event) => void;
50
- }): any;
51
- };
52
- refs: {
53
- modalRef: HTMLDialogElement;
54
- };
55
- rootEl: any;
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
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
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 _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
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 __VLS_WithTemplateSlots<T, S> = T & {
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
- title: string;
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: Ri extends iGetPage<Ti, Ci> ? iGetPage<Ti, Ci> : (params?: iPagination) => Promise<Ri | undefined>;
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 _default: <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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
55
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
56
- readonly onRefresh?: ((...args: any[]) => any) | undefined;
57
- readonly onHasContent?: ((...args: any[]) => any) | undefined;
58
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onRefresh" | "onHasContent"> & Partial<{}> & iPCProps<T, C, R>> & import("vue").PublicProps;
59
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
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
- }): any;
81
+ }) => any;
68
82
  };
69
- emit: (event: "refresh" | "hasContent", ...args: any[]) => void;
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 ContentTable from "./ContentTable.vue";
3
- declare const meta: {
4
- title: string;
5
- component: Record<keyof typeof ContentTable, unknown>;
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
- tableProps?: Omit<iTableProps<TMi>, "nodes" | "refresh">;
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 _default: <T extends Record<string, any>, TM extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
34
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & iPaginationContentTableProps<T, TM>> & import("vue").PublicProps;
35
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
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
- }): any;
42
- headActions?(_: {
43
- hasContent: false;
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
- }): any;
46
- headActions?(_: {
47
- hasContent: boolean;
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
- }): any;
50
- tableChildren?(_: {
51
- hasContent: boolean;
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
- node: TM;
54
- updateNodeAndRefresh: (node: TM) => Promise<void>;
55
- cloneNodeAndRefresh: (node: TM, toggleModal?: (m?: boolean) => any) => Promise<void>;
56
- deleteNodeAndRefresh: (node: TM, toggleModal?: (m?: boolean) => any, modalRef?: HTMLElement) => Promise<void>;
57
- deleteNodesAndRefresh: (nodes?: TM[] | undefined) => Promise<void>;
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
- }): any;
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 Simple from "./Simple.vue";
3
- declare const meta: {
4
- title: string;
5
- component: Record<keyof typeof Simple, unknown>;
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 _default: <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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
15
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
16
- readonly "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
17
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:model-value"> & Partial<{}> & iPaginationSimpleProps<T, C>> & import("vue").PublicProps;
18
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
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 type { iSelectOption } from "@open-xamu-co/ui-common-types";
3
- import Choice from "./Choice.vue";
4
- declare const meta: {
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 _default: import("vue").DefineComponent<iSelectSimpleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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;