@nova-kits/components 1.0.2 → 1.0.3-alpha.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.
@@ -1,11 +1,4 @@
1
- import { type ClassValue, type StyleValue } from 'vue';
2
- export interface LayoutProps {
3
- defaultSidebarWidth?: number;
4
- collapsed?: boolean;
5
- activeKey?: string;
6
- class?: ClassValue;
7
- style?: StyleValue;
8
- }
1
+ import type { LayoutProps } from './typing';
9
2
  declare var __VLS_1: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
10
3
  type __VLS_Slots = {} & {
11
4
  header?: (props: typeof __VLS_1) => any;
@@ -25,8 +18,8 @@ declare const __VLS_base: import("vue").DefineComponent<LayoutProps, {}, {}, {},
25
18
  }>, {
26
19
  defaultSidebarWidth: number;
27
20
  collapsed: boolean;
28
- style: string | false | import("vue").CSSProperties | StyleValue[] | null;
29
- class: string | false | Record<string, any> | ClassValue[] | null;
21
+ style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
22
+ class: string | false | Record<string, any> | import("vue").ClassValue[] | null;
30
23
  activeKey: string;
31
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,9 +1,5 @@
1
1
  import 'splitpanes/dist/splitpanes.css';
2
- type __VLS_Props = {
3
- defaultSidebarWidth?: number;
4
- collapsed?: boolean;
5
- containerWidth?: number;
6
- };
2
+ import type { LayoutContentProps } from './typing';
7
3
  declare var __VLS_15: {}, __VLS_23: {}, __VLS_25: {};
8
4
  type __VLS_Slots = {} & {
9
5
  left?: (props: typeof __VLS_15) => any;
@@ -12,11 +8,11 @@ type __VLS_Slots = {} & {
12
8
  } & {
13
9
  default?: (props: typeof __VLS_25) => any;
14
10
  };
15
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ declare const __VLS_base: import("vue").DefineComponent<LayoutContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
12
  "update:sidebarWidth": (value: number) => any;
17
13
  "update:collapsed": (value: boolean) => any;
18
14
  collapse: (value: boolean) => any;
19
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ }, string, import("vue").PublicProps, Readonly<LayoutContentProps> & Readonly<{
20
16
  "onUpdate:sidebarWidth"?: ((value: number) => any) | undefined;
21
17
  "onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
22
18
  onCollapse?: ((value: boolean) => any) | undefined;
@@ -1,11 +1,9 @@
1
- type __VLS_Props = {
2
- to: 'header' | 'footer';
3
- };
1
+ import type { LayoutPortalProps } from './typing';
4
2
  declare var __VLS_7: {};
5
3
  type __VLS_Slots = {} & {
6
4
  default?: (props: typeof __VLS_7) => any;
7
5
  };
8
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_base: import("vue").DefineComponent<LayoutPortalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LayoutPortalProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
7
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
8
  declare const _default: typeof __VLS_export;
11
9
  export default _default;
@@ -1,16 +1,4 @@
1
- import { type ClassValue, type StyleValue } from 'vue';
2
- export interface Tab {
3
- label?: string;
4
- key: string;
5
- }
6
- export interface LayoutTabsProps {
7
- tabs?: Tab[];
8
- activeKey?: string;
9
- defaultSidebarWidth?: number;
10
- collapsed?: boolean;
11
- class?: ClassValue;
12
- style?: StyleValue;
13
- }
1
+ import type { LayoutTabsProps } from './typing';
14
2
  declare var __VLS_1: {}, __VLS_27: {}, __VLS_30: string, __VLS_31: {}, __VLS_33: {};
15
3
  type __VLS_Slots = {} & {
16
4
  [K in NonNullable<typeof __VLS_30>]?: (props: typeof __VLS_31) => any;
@@ -34,10 +22,10 @@ declare const __VLS_base: import("vue").DefineComponent<LayoutTabsProps, {}, {},
34
22
  }>, {
35
23
  defaultSidebarWidth: number;
36
24
  collapsed: boolean;
37
- style: string | false | import("vue").CSSProperties | StyleValue[] | null;
38
- class: string | false | Record<string, any> | ClassValue[] | null;
25
+ style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
26
+ class: string | false | Record<string, any> | import("vue").ClassValue[] | null;
39
27
  activeKey: string;
40
- tabs: Tab[];
28
+ tabs: import("./typing").Tab[];
41
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
30
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
43
31
  declare const _default: typeof __VLS_export;
@@ -3,6 +3,7 @@ export { default as NLayoutTabs } from './LayoutTabs.vue';
3
3
  export { default as NLayoutPortal } from './LayoutPortal.vue';
4
4
  export { default as NLayoutContent } from './LayoutContent.vue';
5
5
  export { useTabFocus } from './composables/useLayoutContext';
6
+ export type * from './typing';
6
7
  import _NLayout from './Layout.vue';
7
8
  import _NLayoutTabs from './LayoutTabs.vue';
8
9
  import _NLayoutPortal from './LayoutPortal.vue';
@@ -0,0 +1,28 @@
1
+ import type { ClassValue, StyleValue } from 'vue';
2
+ export interface LayoutProps {
3
+ defaultSidebarWidth?: number;
4
+ collapsed?: boolean;
5
+ activeKey?: string;
6
+ class?: ClassValue;
7
+ style?: StyleValue;
8
+ }
9
+ export interface Tab {
10
+ label?: string;
11
+ key: string;
12
+ }
13
+ export interface LayoutTabsProps {
14
+ tabs?: Tab[];
15
+ activeKey?: string;
16
+ defaultSidebarWidth?: number;
17
+ collapsed?: boolean;
18
+ class?: ClassValue;
19
+ style?: StyleValue;
20
+ }
21
+ export interface LayoutContentProps {
22
+ defaultSidebarWidth?: number;
23
+ collapsed?: boolean;
24
+ containerWidth?: number;
25
+ }
26
+ export interface LayoutPortalProps {
27
+ to: 'header' | 'footer';
28
+ }
@@ -0,0 +1,47 @@
1
+ import type { StyleValue, ClassValue } from 'vue';
2
+ interface SectionProps {
3
+ /** 标题 */
4
+ title?: string;
5
+ /** 容器样式 */
6
+ style?: StyleValue;
7
+ /** 容器类名 */
8
+ class?: ClassValue;
9
+ /** 标签页配置 */
10
+ tabs?: {
11
+ title?: string;
12
+ key: string;
13
+ forceRender?: boolean;
14
+ }[];
15
+ /** 是否隐藏标签栏 */
16
+ hideTabBar?: boolean;
17
+ /** 内容区域样式 */
18
+ bodyStyle?: StyleValue;
19
+ /** 弹性布局 */
20
+ flex?: boolean | number;
21
+ /** 是否启用标题背景色 */
22
+ titleBar?: boolean;
23
+ }
24
+ declare var __VLS_1: {}, __VLS_18: `tab-${string}`, __VLS_19: {}, __VLS_21: {};
25
+ type __VLS_Slots = {} & {
26
+ [K in NonNullable<typeof __VLS_18>]?: (props: typeof __VLS_19) => any;
27
+ } & {
28
+ actions?: (props: typeof __VLS_1) => any;
29
+ } & {
30
+ default?: (props: typeof __VLS_21) => any;
31
+ };
32
+ declare const __VLS_base: import("vue").DefineComponent<SectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
+ "tab-change": (activeKey: string, activeIndex: number) => any;
34
+ }, string, import("vue").PublicProps, Readonly<SectionProps> & Readonly<{
35
+ "onTab-change"?: ((activeKey: string, activeIndex: number) => any) | undefined;
36
+ }>, {
37
+ hideTabBar: boolean;
38
+ titleBar: boolean;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
+ declare const _default: typeof __VLS_export;
42
+ export default _default;
43
+ type __VLS_WithSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,3 @@
1
+ import Section from './Section.vue';
2
+ export { Section, Section as NSection };
3
+ export default Section;
@@ -1 +1 @@
1
- export declare const PREFIX_CLS = "nova";
1
+ export declare const PREFIX_CLS = "nv";
package/dist/index.d.ts CHANGED
@@ -2,7 +2,9 @@ import { App } from 'vue';
2
2
  export * from 'element-plus';
3
3
  import 'element-plus/dist/index.css';
4
4
  import './styles/scrollbar.scss';
5
+ import './styles/_variables.scss';
5
6
  export { NLayoutWithSub as NLayout, NLayoutTabs, NLayoutPortal, useTabFocus } from './Layout/index';
7
+ export { NSection } from './Section/index';
6
8
  export declare function install(app: App): void;
7
9
  declare const _default: {
8
10
  install: typeof install;