fantasia-ui 0.2.6 → 0.2.7

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 (140) hide show
  1. package/dist/assets/index.d.ts +5 -0
  2. package/dist/auto-imports.d.ts +623 -0
  3. package/dist/components/index.d.ts +34 -0
  4. package/dist/components/modules/FAffix.d.ts +22 -0
  5. package/dist/components/modules/FAlert.d.ts +21 -0
  6. package/dist/components/modules/FAvatar.d.ts +7 -0
  7. package/dist/components/modules/FBadge.d.ts +25 -0
  8. package/dist/components/modules/FBreadcrumb.d.ts +25 -0
  9. package/dist/components/modules/FButton.d.ts +22 -0
  10. package/dist/components/modules/FCard.d.ts +32 -0
  11. package/dist/components/modules/FCheckbox.d.ts +12 -0
  12. package/dist/components/modules/FCol.d.ts +23 -0
  13. package/dist/components/modules/FContainer.d.ts +21 -0
  14. package/dist/components/modules/FDialog.d.ts +31 -0
  15. package/dist/components/modules/FDivider.d.ts +7 -0
  16. package/dist/components/modules/FDropdown.d.ts +36 -0
  17. package/dist/components/modules/FEditor.d.ts +20 -0
  18. package/dist/components/modules/FForm.d.ts +27 -0
  19. package/dist/components/modules/FFormItem.d.ts +22 -0
  20. package/dist/components/modules/FIcon.d.ts +21 -0
  21. package/dist/components/modules/FImage.d.ts +24 -0
  22. package/dist/components/modules/FInput.d.ts +28 -0
  23. package/dist/components/modules/FLink.d.ts +22 -0
  24. package/dist/components/modules/FLoading.d.ts +7 -0
  25. package/dist/components/modules/FPagination.d.ts +19 -0
  26. package/dist/components/modules/FProgress.d.ts +7 -0
  27. package/dist/components/modules/FRate.d.ts +23 -0
  28. package/dist/components/modules/FRow.d.ts +25 -0
  29. package/dist/components/modules/FSelect.d.ts +18 -0
  30. package/dist/components/modules/FSpace.d.ts +10 -0
  31. package/dist/components/modules/FTable.d.ts +43 -0
  32. package/dist/components/modules/FTabs.d.ts +25 -0
  33. package/dist/components/modules/FTag.d.ts +26 -0
  34. package/dist/components/modules/FText.d.ts +23 -0
  35. package/dist/components/modules/FTooltip.d.ts +32 -0
  36. package/dist/components/modules/FTypography.d.ts +21 -0
  37. package/dist/components/modules/FUpload.d.ts +34 -0
  38. package/dist/env.d.ts +24 -0
  39. package/dist/global.d.ts +45 -0
  40. package/dist/index.d.ts +5 -0
  41. package/dist/types/components/index.d.ts +39 -34
  42. package/dist/types/{types/components → components}/modules/f-avatar.d.ts +2 -2
  43. package/dist/types/{types/components → components}/modules/f-button.d.ts +1 -1
  44. package/dist/types/{types/components → components}/modules/f-card.d.ts +1 -1
  45. package/dist/types/{types/components → components}/modules/f-divider.d.ts +1 -1
  46. package/dist/types/{types/components → components}/modules/f-dropdown.d.ts +2 -2
  47. package/dist/types/{types/components → components}/modules/f-form.d.ts +1 -1
  48. package/dist/types/{types/components → components}/modules/f-menu.d.ts +1 -1
  49. package/dist/types/{types/components → components}/modules/f-result.d.ts +1 -1
  50. package/dist/types/{types/components → components}/modules/f-row.d.ts +1 -1
  51. package/dist/types/{types/components → components}/modules/f-space.d.ts +1 -1
  52. package/dist/types/{types/components → components}/modules/f-tag.d.ts +1 -1
  53. package/dist/types/{types/components → components}/modules/f-toolbar.d.ts +1 -1
  54. package/dist/types/global.d.ts +45 -0
  55. package/dist/types/index.d.ts +1 -5
  56. package/dist/types/volar.d.ts +45 -0
  57. package/dist/{types/utils → utils}/validator.d.ts +1 -1
  58. package/dist/volar.d.ts +45 -0
  59. package/package.json +3 -2
  60. package/dist/types/assets/index.d.ts +0 -5
  61. package/dist/types/assets/index.js +0 -5
  62. package/dist/types/components/index.js +0 -34
  63. package/dist/types/index.js +0 -10
  64. package/dist/types/types/components/index.d.ts +0 -39
  65. package/dist/types/types/components/index.js +0 -39
  66. package/dist/types/types/components/modules/base.js +0 -1
  67. package/dist/types/types/components/modules/f-affix.js +0 -1
  68. package/dist/types/types/components/modules/f-alert.js +0 -1
  69. package/dist/types/types/components/modules/f-avatar.js +0 -1
  70. package/dist/types/types/components/modules/f-badge.js +0 -1
  71. package/dist/types/types/components/modules/f-breadcrumb.js +0 -1
  72. package/dist/types/types/components/modules/f-button.js +0 -1
  73. package/dist/types/types/components/modules/f-card.js +0 -1
  74. package/dist/types/types/components/modules/f-checkbox.js +0 -1
  75. package/dist/types/types/components/modules/f-col.js +0 -1
  76. package/dist/types/types/components/modules/f-container.js +0 -1
  77. package/dist/types/types/components/modules/f-dialog.js +0 -1
  78. package/dist/types/types/components/modules/f-divider.js +0 -1
  79. package/dist/types/types/components/modules/f-dropdown.js +0 -1
  80. package/dist/types/types/components/modules/f-editor.js +0 -1
  81. package/dist/types/types/components/modules/f-form-item.js +0 -1
  82. package/dist/types/types/components/modules/f-form.js +0 -1
  83. package/dist/types/types/components/modules/f-icon.js +0 -1
  84. package/dist/types/types/components/modules/f-image.js +0 -1
  85. package/dist/types/types/components/modules/f-input.js +0 -1
  86. package/dist/types/types/components/modules/f-link.js +0 -1
  87. package/dist/types/types/components/modules/f-loading.js +0 -1
  88. package/dist/types/types/components/modules/f-menu.js +0 -1
  89. package/dist/types/types/components/modules/f-pagination.js +0 -1
  90. package/dist/types/types/components/modules/f-progress.js +0 -1
  91. package/dist/types/types/components/modules/f-rate.js +0 -1
  92. package/dist/types/types/components/modules/f-result.js +0 -1
  93. package/dist/types/types/components/modules/f-row.js +0 -1
  94. package/dist/types/types/components/modules/f-slider-captcha.js +0 -2
  95. package/dist/types/types/components/modules/f-space.js +0 -1
  96. package/dist/types/types/components/modules/f-table.js +0 -1
  97. package/dist/types/types/components/modules/f-tabs.js +0 -1
  98. package/dist/types/types/components/modules/f-tag.js +0 -1
  99. package/dist/types/types/components/modules/f-tagsview.js +0 -1
  100. package/dist/types/types/components/modules/f-text.js +0 -1
  101. package/dist/types/types/components/modules/f-toolbar.js +0 -1
  102. package/dist/types/types/components/modules/f-tooltip.js +0 -1
  103. package/dist/types/types/components/modules/f-typography.js +0 -1
  104. package/dist/types/types/components/modules/f-upload.js +0 -1
  105. package/dist/types/types/index.d.ts +0 -2
  106. package/dist/types/types/index.js +0 -2
  107. package/dist/types/types/models/index.js +0 -1
  108. package/dist/types/utils/general.js +0 -4
  109. package/dist/types/utils/index.js +0 -2
  110. package/dist/types/utils/validator.js +0 -181
  111. /package/dist/types/{types/components → components}/modules/base.d.ts +0 -0
  112. /package/dist/types/{types/components → components}/modules/f-affix.d.ts +0 -0
  113. /package/dist/types/{types/components → components}/modules/f-alert.d.ts +0 -0
  114. /package/dist/types/{types/components → components}/modules/f-badge.d.ts +0 -0
  115. /package/dist/types/{types/components → components}/modules/f-breadcrumb.d.ts +0 -0
  116. /package/dist/types/{types/components → components}/modules/f-checkbox.d.ts +0 -0
  117. /package/dist/types/{types/components → components}/modules/f-col.d.ts +0 -0
  118. /package/dist/types/{types/components → components}/modules/f-container.d.ts +0 -0
  119. /package/dist/types/{types/components → components}/modules/f-dialog.d.ts +0 -0
  120. /package/dist/types/{types/components → components}/modules/f-editor.d.ts +0 -0
  121. /package/dist/types/{types/components → components}/modules/f-form-item.d.ts +0 -0
  122. /package/dist/types/{types/components → components}/modules/f-icon.d.ts +0 -0
  123. /package/dist/types/{types/components → components}/modules/f-image.d.ts +0 -0
  124. /package/dist/types/{types/components → components}/modules/f-input.d.ts +0 -0
  125. /package/dist/types/{types/components → components}/modules/f-link.d.ts +0 -0
  126. /package/dist/types/{types/components → components}/modules/f-loading.d.ts +0 -0
  127. /package/dist/types/{types/components → components}/modules/f-pagination.d.ts +0 -0
  128. /package/dist/types/{types/components → components}/modules/f-progress.d.ts +0 -0
  129. /package/dist/types/{types/components → components}/modules/f-rate.d.ts +0 -0
  130. /package/dist/types/{types/components → components}/modules/f-slider-captcha.d.ts +0 -0
  131. /package/dist/types/{types/components → components}/modules/f-table.d.ts +0 -0
  132. /package/dist/types/{types/components → components}/modules/f-tabs.d.ts +0 -0
  133. /package/dist/types/{types/components → components}/modules/f-tagsview.d.ts +0 -0
  134. /package/dist/types/{types/components → components}/modules/f-text.d.ts +0 -0
  135. /package/dist/types/{types/components → components}/modules/f-tooltip.d.ts +0 -0
  136. /package/dist/types/{types/components → components}/modules/f-typography.d.ts +0 -0
  137. /package/dist/types/{types/components → components}/modules/f-upload.d.ts +0 -0
  138. /package/dist/types/{types/models → models}/index.d.ts +0 -0
  139. /package/dist/{types/utils → utils}/general.d.ts +0 -0
  140. /package/dist/{types/utils → utils}/index.d.ts +0 -0
@@ -0,0 +1,43 @@
1
+ import { FTableProps, FTableColumn } from '../../types/index';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: Partial<Record<`header-${string}`, (_: {
6
+ column: FTableColumn;
7
+ }) => any>> & Partial<Record<`cell-${string}`, (_: {
8
+ row: Record<string, unknown>;
9
+ value: unknown;
10
+ index: number;
11
+ col: FTableColumn;
12
+ }) => any>> & {
13
+ cell?(_: {
14
+ row: Record<string, unknown>;
15
+ value: unknown;
16
+ index: number;
17
+ col: FTableColumn;
18
+ }): any;
19
+ empty?(_: {}): any;
20
+ };
21
+ refs: {
22
+ scrollEl: HTMLDivElement;
23
+ };
24
+ rootEl: HTMLDivElement;
25
+ };
26
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
+ declare const __VLS_component: DefineComponent<FTableProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FTableProps> & Readonly<{}>, {
28
+ loading: boolean;
29
+ rowHeight: number;
30
+ overscan: number;
31
+ showIndex: boolean;
32
+ loadingText: string;
33
+ emptyText: string;
34
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
35
+ scrollEl: HTMLDivElement;
36
+ }, HTMLDivElement>;
37
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,25 @@
1
+ import { FTabsProps } from '../../types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: Partial<Record<string, (_: {}) => any>>;
6
+ refs: {};
7
+ rootEl: HTMLDivElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: DefineComponent<FTabsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
11
+ change: (value: string) => any;
12
+ "update:active": (value: string) => any;
13
+ }, string, PublicProps, Readonly<FTabsProps> & Readonly<{
14
+ onChange?: (value: string) => any;
15
+ "onUpdate:active"?: (value: string) => any;
16
+ }>, {
17
+ type: "line" | "bar" | "card" | "segment";
18
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,26 @@
1
+ import { FTagProps, Size } from '../../types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: {
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {};
9
+ rootEl: HTMLSpanElement;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: DefineComponent<FTagProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
13
+ close: () => any;
14
+ }, string, PublicProps, Readonly<FTagProps> & Readonly<{
15
+ onClose?: () => any;
16
+ }>, {
17
+ type: "round" | "square" | "dot" | "bookmark";
18
+ size: Size;
19
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLSpanElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,23 @@
1
+ import { FTextProps } from '../../types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: {
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {};
9
+ rootEl: any;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: DefineComponent<FTextProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FTextProps> & Readonly<{}>, {
13
+ size: "xs" | "sm" | "normal" | "lg" | "xl" | "2xl" | "3xl";
14
+ weight: "normal" | "medium" | "bold" | "bolder";
15
+ tag: string;
16
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,32 @@
1
+ import { FTooltipProps } from '../../types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: {
6
+ default?(_: {}): any;
7
+ content?(_: {}): any;
8
+ };
9
+ refs: {
10
+ triggerRef: HTMLDivElement;
11
+ tooltipRef: HTMLDivElement;
12
+ };
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: DefineComponent<FTooltipProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FTooltipProps> & Readonly<{}>, {
17
+ disabled: boolean;
18
+ placement: "top" | "bottom" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "top-start" | "top-end" | "left-start" | "left-end" | "left" | "right";
19
+ offset: number;
20
+ delay: number;
21
+ maxWidth: number;
22
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
23
+ triggerRef: HTMLDivElement;
24
+ tooltipRef: HTMLDivElement;
25
+ }, HTMLDivElement>;
26
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
+ export default _default;
28
+ type __VLS_WithTemplateSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,21 @@
1
+ import { FTypographyProps } from '../../types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: {
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {};
9
+ rootEl: HTMLDivElement;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: DefineComponent<FTypographyProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FTypographyProps> & Readonly<{}>, {
13
+ color: string;
14
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,34 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ accept?: string;
4
+ limit?: number;
5
+ progress?: number | null;
6
+ };
7
+ type __VLS_PublicProps = {
8
+ 'file'?: string;
9
+ } & __VLS_Props;
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ default?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: HTMLDivElement;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
20
+ change: (file: File) => any;
21
+ exceed: (file: File) => any;
22
+ "update:file": (value: string) => any;
23
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ onChange?: (file: File) => any;
25
+ onExceed?: (file: File) => any;
26
+ "onUpdate:file"?: (value: string) => any;
27
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
+ export default _default;
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
package/dist/env.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ // 声明样式文件模块
4
+ declare module '*.scss' {
5
+ const content: string;
6
+ export default content;
7
+ }
8
+
9
+ declare module '*.sass' {
10
+ const content: string;
11
+ export default content;
12
+ }
13
+
14
+ declare module '*.css' {
15
+ const content: string;
16
+ export default content;
17
+ }
18
+
19
+ // 声明 Vue 文件
20
+ declare module '*' {
21
+ import type { DefineComponent } from 'vue';
22
+ const component: DefineComponent<{}, {}, any>;
23
+ export default component;
24
+ }
@@ -0,0 +1,45 @@
1
+ // 全局组件类型声明
2
+ // 用于 Vue 3 + Volar 的类型提示
3
+
4
+ import type * as components from './components'
5
+
6
+ declare module '@vue/runtime-core' {
7
+ export interface GlobalComponents {
8
+ FAffix: typeof components.FAffix
9
+ FAlert: typeof components.FAlert
10
+ FAvatar: typeof components.FAvatar
11
+ FBadge: typeof components.FBadge
12
+ FBreadcrumb: typeof components.FBreadcrumb
13
+ FButton: typeof components.FButton
14
+ FCard: typeof components.FCard
15
+ FCheckbox: typeof components.FCheckbox
16
+ FCol: typeof components.FCol
17
+ FContainer: typeof components.FContainer
18
+ FDialog: typeof components.FDialog
19
+ FDivider: typeof components.FDivider
20
+ FDropdown: typeof components.FDropdown
21
+ FEditor: typeof components.FEditor
22
+ FForm: typeof components.FForm
23
+ FFormItem: typeof components.FFormItem
24
+ FIcon: typeof components.FIcon
25
+ FImage: typeof components.FImage
26
+ FInput: typeof components.FInput
27
+ FLink: typeof components.FLink
28
+ FLoading: typeof components.FLoading
29
+ FPagination: typeof components.FPagination
30
+ FProgress: typeof components.FProgress
31
+ FRate: typeof components.FRate
32
+ FRow: typeof components.FRow
33
+ FSelect: typeof components.FSelect
34
+ FSpace: typeof components.FSpace
35
+ FTable: typeof components.FTable
36
+ FTabs: typeof components.FTabs
37
+ FTag: typeof components.FTag
38
+ FText: typeof components.FText
39
+ FTooltip: typeof components.FTooltip
40
+ FTypography: typeof components.FTypography
41
+ FUpload: typeof components.FUpload
42
+ }
43
+ }
44
+
45
+ export {}
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vue';
2
+ declare const install: Plugin;
3
+ export default install;
4
+ export * from './components';
5
+ export * from './types';
@@ -1,34 +1,39 @@
1
- export { default as FIcon } from "./modules/FIcon.vue";
2
- export { default as FImage } from "./modules/FImage.vue";
3
- export { default as FInput } from "./modules/FInput.vue";
4
- export { default as FLoading } from "./modules/FLoading.vue";
5
- export { default as FRate } from './modules/FRate.vue';
6
- export { default as FDropdown } from "./modules/FDropdown.vue";
7
- export { default as FSelect } from "./modules/FSelect.vue";
8
- export { default as FPagination } from "./modules/FPagination.vue";
9
- export { default as FCard } from "./modules/FCard.vue";
10
- export { default as FTag } from "./modules/FTag.vue";
11
- export { default as FTooltip } from "./modules/FTooltip.vue";
12
- export { default as FProgress } from "./modules/FProgress.vue";
13
- export { default as FTabs } from './modules/FTabs.vue';
14
- export { default as FBreadcrumb } from "./modules/FBreadcrumb.vue";
15
- export { default as FCol } from "./modules/FCol.vue";
16
- export { default as FRow } from "./modules/FRow.vue";
17
- export { default as FSpace } from "./modules/FSpace.vue";
18
- export { default as FContainer } from "./modules/FContainer.vue";
19
- export { default as FDivider } from "./modules/FDivider.vue";
20
- export { default as FAvatar } from "./modules/FAvatar.vue";
21
- export { default as FButton } from "./modules/FButton.vue";
22
- export { default as FTypography } from './modules/FTypography.vue';
23
- export { default as FText } from "./modules/FText.vue";
24
- export { default as FLink } from "./modules/FLink.vue";
25
- export { default as FBadge } from "./modules/FBadge.vue";
26
- export { default as FAffix } from "./modules/FAffix.vue";
27
- export { default as FForm } from "./modules/FForm.vue";
28
- export { default as FFormItem } from "./modules/FFormItem.vue";
29
- export { default as FCheckbox } from "./modules/FCheckbox.vue";
30
- export { default as FAlert } from "./modules/FAlert.vue";
31
- export { default as FEditor } from "./modules/FEditor.vue";
32
- export { default as FTable } from "./modules/FTable.vue";
33
- export { default as FDialog } from "./modules/FDialog.vue";
34
- export { default as FUpload } from './modules/FUpload.vue';
1
+ export * from './modules/base';
2
+ export * from './modules/f-dialog';
3
+ export * from './modules/f-pagination';
4
+ export * from './modules/f-slider-captcha';
5
+ export * from './modules/f-upload';
6
+ export * from './modules/f-dropdown';
7
+ export * from './modules/f-tooltip';
8
+ export * from './modules/f-menu';
9
+ export * from './modules/f-icon';
10
+ export * from './modules/f-tagsview';
11
+ export * from './modules/f-toolbar';
12
+ export * from './modules/f-tag';
13
+ export * from './modules/f-table';
14
+ export * from './modules/f-loading';
15
+ export * from './modules/f-button';
16
+ export * from './modules/f-image';
17
+ export * from './modules/f-rate';
18
+ export * from './modules/f-input';
19
+ export * from './modules/f-card';
20
+ export * from './modules/f-progress';
21
+ export * from './modules/f-tabs';
22
+ export * from './modules/f-col';
23
+ export * from './modules/f-row';
24
+ export * from './modules/f-space';
25
+ export * from './modules/f-divider';
26
+ export * from './modules/f-container';
27
+ export * from './modules/f-avatar';
28
+ export * from './modules/f-text';
29
+ export * from './modules/f-link';
30
+ export * from './modules/f-badge';
31
+ export * from './modules/f-affix';
32
+ export * from './modules/f-breadcrumb';
33
+ export * from './modules/f-form';
34
+ export * from './modules/f-form-item';
35
+ export * from './modules/f-checkbox';
36
+ export * from './modules/f-alert';
37
+ export * from './modules/f-editor';
38
+ export * from './modules/f-typography';
39
+ export * from './modules/f-result';
@@ -1,5 +1,5 @@
1
- import type { DefineComponent } from "vue";
2
- import type { Size } from "./base";
1
+ import { DefineComponent } from 'vue';
2
+ import { Size } from './base';
3
3
  interface FAvatarProps {
4
4
  src: string;
5
5
  alt?: string;
@@ -1,4 +1,4 @@
1
- import type { Size } from "./base";
1
+ import { Size } from './base';
2
2
  interface FButtonProps {
3
3
  size?: Size;
4
4
  round?: boolean | number;
@@ -1,4 +1,4 @@
1
- import type { Direction } from "./base";
1
+ import { Direction } from './base';
2
2
  interface FCardProps {
3
3
  hoverable?: boolean;
4
4
  direction?: Direction;
@@ -1,4 +1,4 @@
1
- import type { Direction } from "./base";
1
+ import { Direction } from './base';
2
2
  type Line = 'none' | 'solid' | 'hidden' | 'dashed';
3
3
  interface FDividerProps {
4
4
  color: string;
@@ -1,5 +1,5 @@
1
- import type { Component } from "vue";
2
- import type { Placement } from "./base";
1
+ import { Component } from 'vue';
2
+ import { Placement } from './base';
3
3
  interface FDropdownOption {
4
4
  key: string | number;
5
5
  label: string;
@@ -1,4 +1,4 @@
1
- import { Size } from "./base";
1
+ import { Size } from './base';
2
2
  type LabelPosition = 'left' | 'right' | 'top';
3
3
  type RuleType = 'string' | 'number' | 'boolean' | 'method' | 'regexp' | 'integer' | 'float' | 'array' | 'object' | 'enum' | 'date' | 'url' | 'email' | 'hex';
4
4
  interface FFormProps {
@@ -1,4 +1,4 @@
1
- import type { MenuItem } from "@/types/models";
1
+ import { MenuItem } from '../../models';
2
2
  interface FMenu {
3
3
  items: MenuItem[];
4
4
  depth?: number;
@@ -1,4 +1,4 @@
1
- import type { Component, DefineComponent } from 'vue';
1
+ import { Component, DefineComponent } from 'vue';
2
2
  type ResultStatus = 'success' | 'error' | 'warning' | 'info' | '403' | '404' | '500';
3
3
  interface FResultProps {
4
4
  status?: ResultStatus;
@@ -1,4 +1,4 @@
1
- import type { Align, Justify, Wrap } from "./base";
1
+ import { Align, Justify, Wrap } from './base';
2
2
  interface FRowProps {
3
3
  gutter?: number | [number, number];
4
4
  justify?: Justify;
@@ -1,4 +1,4 @@
1
- import type { Justify, Direction, Size } from "./base";
1
+ import { Justify, Direction, Size } from './base';
2
2
  type Align = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
3
3
  interface FSpaceProps {
4
4
  direction?: Direction;
@@ -1,4 +1,4 @@
1
- import type { Size } from "./base";
1
+ import { Size } from './base';
2
2
  type TagColor = 'purple' | 'pink' | 'blue' | 'cyan' | 'green' | 'gold' | 'orange' | 'red' | 'default';
3
3
  interface FTagProps {
4
4
  color?: TagColor;
@@ -1,4 +1,4 @@
1
- import { Actions } from "@/types/models";
1
+ import { Actions } from '../../models';
2
2
  interface StyleProps {
3
3
  bg?: string;
4
4
  align?: string;
@@ -0,0 +1,45 @@
1
+ // 全局组件类型声明
2
+ // 用于 Vue 3 + Volar 的类型提示
3
+
4
+ import type * as components from './components'
5
+
6
+ declare module '@vue/runtime-core' {
7
+ export interface GlobalComponents {
8
+ FAffix: typeof components.FAffix
9
+ FAlert: typeof components.FAlert
10
+ FAvatar: typeof components.FAvatar
11
+ FBadge: typeof components.FBadge
12
+ FBreadcrumb: typeof components.FBreadcrumb
13
+ FButton: typeof components.FButton
14
+ FCard: typeof components.FCard
15
+ FCheckbox: typeof components.FCheckbox
16
+ FCol: typeof components.FCol
17
+ FContainer: typeof components.FContainer
18
+ FDialog: typeof components.FDialog
19
+ FDivider: typeof components.FDivider
20
+ FDropdown: typeof components.FDropdown
21
+ FEditor: typeof components.FEditor
22
+ FForm: typeof components.FForm
23
+ FFormItem: typeof components.FFormItem
24
+ FIcon: typeof components.FIcon
25
+ FImage: typeof components.FImage
26
+ FInput: typeof components.FInput
27
+ FLink: typeof components.FLink
28
+ FLoading: typeof components.FLoading
29
+ FPagination: typeof components.FPagination
30
+ FProgress: typeof components.FProgress
31
+ FRate: typeof components.FRate
32
+ FRow: typeof components.FRow
33
+ FSelect: typeof components.FSelect
34
+ FSpace: typeof components.FSpace
35
+ FTable: typeof components.FTable
36
+ FTabs: typeof components.FTabs
37
+ FTag: typeof components.FTag
38
+ FText: typeof components.FText
39
+ FTooltip: typeof components.FTooltip
40
+ FTypography: typeof components.FTypography
41
+ FUpload: typeof components.FUpload
42
+ }
43
+ }
44
+
45
+ export {}
@@ -1,6 +1,2 @@
1
- import type { Plugin } from 'vue';
2
- import './styles/base.scss';
3
- declare const install: Plugin;
4
- export default install;
5
1
  export * from './components';
6
- export * from './types';
2
+ export * from './models';
@@ -0,0 +1,45 @@
1
+ // Volar 类型提示支持
2
+ // 用户需要在 tsconfig.json 中引用此文件
3
+
4
+ import type * as components from './components'
5
+
6
+ declare module '@vue/runtime-core' {
7
+ export interface GlobalComponents {
8
+ FAffix: typeof components.FAffix
9
+ FAlert: typeof components.FAlert
10
+ FAvatar: typeof components.FAvatar
11
+ FBadge: typeof components.FBadge
12
+ FBreadcrumb: typeof components.FBreadcrumb
13
+ FButton: typeof components.FButton
14
+ FCard: typeof components.FCard
15
+ FCheckbox: typeof components.FCheckbox
16
+ FCol: typeof components.FCol
17
+ FContainer: typeof components.FContainer
18
+ FDialog: typeof components.FDialog
19
+ FDivider: typeof components.FDivider
20
+ FDropdown: typeof components.FDropdown
21
+ FEditor: typeof components.FEditor
22
+ FForm: typeof components.FForm
23
+ FFormItem: typeof components.FFormItem
24
+ FIcon: typeof components.FIcon
25
+ FImage: typeof components.FImage
26
+ FInput: typeof components.FInput
27
+ FLink: typeof components.FLink
28
+ FLoading: typeof components.FLoading
29
+ FPagination: typeof components.FPagination
30
+ FProgress: typeof components.FProgress
31
+ FRate: typeof components.FRate
32
+ FRow: typeof components.FRow
33
+ FSelect: typeof components.FSelect
34
+ FSpace: typeof components.FSpace
35
+ FTable: typeof components.FTable
36
+ FTabs: typeof components.FTabs
37
+ FTag: typeof components.FTag
38
+ FText: typeof components.FText
39
+ FTooltip: typeof components.FTooltip
40
+ FTypography: typeof components.FTypography
41
+ FUpload: typeof components.FUpload
42
+ }
43
+ }
44
+
45
+ export {}
@@ -1,4 +1,4 @@
1
- import type { Rule, Rules } from "@/types";
1
+ import { Rule, Rules } from '../types';
2
2
  /**
3
3
  * 校验单个值是否符合规则列表(异步,支持 validator 返回 Promise)
4
4
  * @param value 字段值
@@ -0,0 +1,45 @@
1
+ // Volar 类型提示支持
2
+ // 用户需要在 tsconfig.json 中引用此文件
3
+
4
+ import type * as components from './components'
5
+
6
+ declare module '@vue/runtime-core' {
7
+ export interface GlobalComponents {
8
+ FAffix: typeof components.FAffix
9
+ FAlert: typeof components.FAlert
10
+ FAvatar: typeof components.FAvatar
11
+ FBadge: typeof components.FBadge
12
+ FBreadcrumb: typeof components.FBreadcrumb
13
+ FButton: typeof components.FButton
14
+ FCard: typeof components.FCard
15
+ FCheckbox: typeof components.FCheckbox
16
+ FCol: typeof components.FCol
17
+ FContainer: typeof components.FContainer
18
+ FDialog: typeof components.FDialog
19
+ FDivider: typeof components.FDivider
20
+ FDropdown: typeof components.FDropdown
21
+ FEditor: typeof components.FEditor
22
+ FForm: typeof components.FForm
23
+ FFormItem: typeof components.FFormItem
24
+ FIcon: typeof components.FIcon
25
+ FImage: typeof components.FImage
26
+ FInput: typeof components.FInput
27
+ FLink: typeof components.FLink
28
+ FLoading: typeof components.FLoading
29
+ FPagination: typeof components.FPagination
30
+ FProgress: typeof components.FProgress
31
+ FRate: typeof components.FRate
32
+ FRow: typeof components.FRow
33
+ FSelect: typeof components.FSelect
34
+ FSpace: typeof components.FSpace
35
+ FTable: typeof components.FTable
36
+ FTabs: typeof components.FTabs
37
+ FTag: typeof components.FTag
38
+ FText: typeof components.FText
39
+ FTooltip: typeof components.FTooltip
40
+ FTypography: typeof components.FTypography
41
+ FUpload: typeof components.FUpload
42
+ }
43
+ }
44
+
45
+ export {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fantasia-ui",
3
3
  "private": false,
4
- "version": "0.2.6",
4
+ "version": "0.2.7",
5
5
  "type": "module",
6
6
  "main": "dist/fantasia-ui.umd.js",
7
7
  "module": "dist/fantasia-ui.es.js",
@@ -44,7 +44,8 @@
44
44
  "homepage": "https://github.com/shuster/fantasia-ui#readme",
45
45
  "scripts": {
46
46
  "dev": "vite",
47
- "build": "vite build && tsc -p tsconfig.build.json",
47
+ "build": "vite build && node -e \"require('fs').copyFileSync('packages/global.d.ts', 'dist/types/global.d.ts'); require('fs').copyFileSync('packages/volar.d.ts', 'dist/types/volar.d.ts')\"",
48
+ "build:types": "tsc -p tsconfig.build.json",
48
49
  "preview": "vite preview",
49
50
  "prepublishOnly": "pnpm run build",
50
51
  "publish:patch": "npm version patch && npm publish",
@@ -1,5 +0,0 @@
1
- import Theme from './icons/theme-light-dark.svg';
2
- import ThemeDark from './icons/theme-dark.svg';
3
- import ThemeLight from './icons/theme-light.svg';
4
- import PictureError from './icons/picture_error.svg';
5
- export { Theme, ThemeDark, ThemeLight, PictureError };
@@ -1,5 +0,0 @@
1
- import Theme from './icons/theme-light-dark.svg';
2
- import ThemeDark from './icons/theme-dark.svg';
3
- import ThemeLight from './icons/theme-light.svg';
4
- import PictureError from './icons/picture_error.svg';
5
- export { Theme, ThemeDark, ThemeLight, PictureError };