@keyblade/pro-components 0.0.3 → 0.0.5

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/es/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- import { App } from 'vue';
1
+ import type { App } from 'vue';
2
2
  declare const _default: {
3
3
  install(app: App): void;
4
4
  };
5
5
  export default _default;
6
6
  export { default as ProBreadcrumb } from './pro-breadcrumb';
7
7
  export { default as ProLayout } from './pro-layout';
8
- export { EProLayoutTheme } from './pro-layout';
9
8
  export { default as ProMenu } from './pro-menu';
10
9
  export type { IProMenuItem } from './pro-menu';
11
10
  export { default as ProPageWrapper } from './pro-page-wrapper';
package/es/index.js CHANGED
@@ -1,14 +1,13 @@
1
1
  import { ProBreadcrumb } from "./pro-breadcrumb/index.js";
2
- import { ProBreadcrumb as ProBreadcrumb2 } from "./pro-breadcrumb/index.js";
2
+ import { default as default2 } from "./pro-breadcrumb/index.js";
3
3
  import { ProMenu } from "./pro-menu/index.js";
4
- import { ProMenu as ProMenu2 } from "./pro-menu/index.js";
4
+ import { default as default3 } from "./pro-menu/index.js";
5
5
  import { ProPageWrapper } from "./pro-page-wrapper/index.js";
6
- import { ProPageWrapper as ProPageWrapper2 } from "./pro-page-wrapper/index.js";
6
+ import { default as default4 } from "./pro-page-wrapper/index.js";
7
7
  import { ProReuseTabs } from "./pro-reuse-tabs/index.js";
8
- import { ProReuseTabs as ProReuseTabs2 } from "./pro-reuse-tabs/index.js";
8
+ import { default as default5 } from "./pro-reuse-tabs/index.js";
9
9
  import { ProLayout } from "./pro-layout/index.js";
10
- import { ProLayout as ProLayout2 } from "./pro-layout/index.js";
11
- import { EProLayoutTheme } from "./pro-layout/enum.js";
10
+ import { default as default6 } from "./pro-layout/index.js";
12
11
  const index = {
13
12
  install(app) {
14
13
  app.use(ProBreadcrumb);
@@ -19,11 +18,10 @@ const index = {
19
18
  }
20
19
  };
21
20
  export {
22
- EProLayoutTheme,
23
- ProBreadcrumb2 as ProBreadcrumb,
24
- ProLayout2 as ProLayout,
25
- ProMenu2 as ProMenu,
26
- ProPageWrapper2 as ProPageWrapper,
27
- ProReuseTabs2 as ProReuseTabs,
21
+ default2 as ProBreadcrumb,
22
+ default6 as ProLayout,
23
+ default3 as ProMenu,
24
+ default4 as ProPageWrapper,
25
+ default5 as ProReuseTabs,
28
26
  index as default
29
27
  };
@@ -1,4 +1,4 @@
1
- import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
1
+ import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, Ref, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
2
2
  declare const ProBreadcrumb: {
3
3
  new (...args: any[]): {
4
4
  $: ComponentInternalInstance;
@@ -34,7 +34,7 @@ declare const ProBreadcrumb: {
34
34
  }>>, {
35
35
  prefixClsName: string;
36
36
  props: any;
37
- injectValue: never[];
37
+ injectValue: Ref<string[]>;
38
38
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
39
39
  items: string[];
40
40
  }, {}, string> & {
@@ -66,7 +66,7 @@ declare const ProBreadcrumb: {
66
66
  }>> & ShallowUnwrapRef<{
67
67
  prefixClsName: string;
68
68
  props: any;
69
- injectValue: never[];
69
+ injectValue: Ref<string[]>;
70
70
  }> & {} & ComponentCustomProperties & {};
71
71
  __isFragment?: undefined;
72
72
  __isTeleport?: undefined;
@@ -80,7 +80,7 @@ declare const ProBreadcrumb: {
80
80
  }>>, {
81
81
  prefixClsName: string;
82
82
  props: any;
83
- injectValue: never[];
83
+ injectValue: Ref<string[]>;
84
84
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
85
85
  items: string[];
86
86
  }, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
@@ -6,7 +6,8 @@ const ProBreadcrumb = Object.assign(_sfc_main, {
6
6
  app.component("KbProBreadcrumb", _sfc_main);
7
7
  }
8
8
  });
9
+ const ProBreadcrumb$1 = ProBreadcrumb;
9
10
  export {
10
11
  ProBreadcrumb,
11
- ProBreadcrumb as default
12
+ ProBreadcrumb$1 as default
12
13
  };
@@ -1,4 +1,4 @@
1
- import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, type PropType } from 'vue';
1
+ import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, type PropType, type Ref } from 'vue';
2
2
  declare const _sfc_main: DefineComponent<{
3
3
  items: {
4
4
  type: PropType<string[]>;
@@ -8,7 +8,7 @@ declare const _sfc_main: DefineComponent<{
8
8
  }, {
9
9
  prefixClsName: string;
10
10
  props: any;
11
- injectValue: never[];
11
+ injectValue: Ref<string[]>;
12
12
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
13
13
  items: {
14
14
  type: PropType<string[]>;
@@ -1,4 +1,3 @@
1
- import type { EProLayoutTheme } from './enum';
2
1
  import type { IProMenuItem } from '../pro-menu';
3
2
  import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, Ref, ComputedRef, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
4
3
  declare const ProLayout: {
@@ -9,9 +8,10 @@ declare const ProLayout: {
9
8
  menuItems: IProMenuItem[];
10
9
  headerTitle: string;
11
10
  headerLogo: string;
12
- theme: EProLayoutTheme;
11
+ theme: "light" | "dark";
13
12
  footerTitle: string;
14
13
  tabsMode: boolean;
14
+ siderBreakpoint: "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
15
15
  }> & Omit<Readonly<ExtractPropTypes<{
16
16
  menuItems: {
17
17
  type: PropType<IProMenuItem[]>;
@@ -29,9 +29,9 @@ declare const ProLayout: {
29
29
  default: string;
30
30
  };
31
31
  theme: {
32
- type: PropType<EProLayoutTheme>;
32
+ type: PropType<"light" | "dark">;
33
33
  required: false;
34
- default: EProLayoutTheme;
34
+ default: string;
35
35
  };
36
36
  footerTitle: {
37
37
  type: PropType<string>;
@@ -43,9 +43,14 @@ declare const ProLayout: {
43
43
  required: false;
44
44
  default: boolean;
45
45
  };
46
+ siderBreakpoint: {
47
+ type: PropType<"xxl" | "xl" | "lg" | "md" | "sm" | "xs">;
48
+ required: false;
49
+ default: string;
50
+ };
46
51
  }>> & {
47
52
  onCollapse?: ((collapsed: boolean) => any) | undefined;
48
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "menuItems" | "headerTitle" | "headerLogo" | "theme" | "footerTitle" | "tabsMode">;
53
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "menuItems" | "headerTitle" | "headerLogo" | "theme" | "footerTitle" | "tabsMode" | "siderBreakpoint">;
49
54
  $attrs: {
50
55
  [x: string]: unknown;
51
56
  };
@@ -76,9 +81,9 @@ declare const ProLayout: {
76
81
  default: string;
77
82
  };
78
83
  theme: {
79
- type: PropType<EProLayoutTheme>;
84
+ type: PropType<"light" | "dark">;
80
85
  required: false;
81
- default: EProLayoutTheme;
86
+ default: string;
82
87
  };
83
88
  footerTitle: {
84
89
  type: PropType<string>;
@@ -90,6 +95,11 @@ declare const ProLayout: {
90
95
  required: false;
91
96
  default: boolean;
92
97
  };
98
+ siderBreakpoint: {
99
+ type: PropType<"xxl" | "xl" | "lg" | "md" | "sm" | "xs">;
100
+ required: false;
101
+ default: string;
102
+ };
93
103
  }>> & {
94
104
  onCollapse?: ((collapsed: boolean) => any) | undefined;
95
105
  }, {
@@ -127,9 +137,10 @@ declare const ProLayout: {
127
137
  menuItems: IProMenuItem[];
128
138
  headerTitle: string;
129
139
  headerLogo: string;
130
- theme: EProLayoutTheme;
140
+ theme: "light" | "dark";
131
141
  footerTitle: string;
132
142
  tabsMode: boolean;
143
+ siderBreakpoint: "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
133
144
  }, {}, string> & {
134
145
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
135
146
  created?: ((() => void) | (() => void)[]) | undefined;
@@ -167,9 +178,9 @@ declare const ProLayout: {
167
178
  default: string;
168
179
  };
169
180
  theme: {
170
- type: PropType<EProLayoutTheme>;
181
+ type: PropType<"light" | "dark">;
171
182
  required: false;
172
- default: EProLayoutTheme;
183
+ default: string;
173
184
  };
174
185
  footerTitle: {
175
186
  type: PropType<string>;
@@ -181,6 +192,11 @@ declare const ProLayout: {
181
192
  required: false;
182
193
  default: boolean;
183
194
  };
195
+ siderBreakpoint: {
196
+ type: PropType<"xxl" | "xl" | "lg" | "md" | "sm" | "xs">;
197
+ required: false;
198
+ default: string;
199
+ };
184
200
  }>> & {
185
201
  onCollapse?: ((collapsed: boolean) => any) | undefined;
186
202
  } & ShallowUnwrapRef<{
@@ -233,9 +249,9 @@ declare const ProLayout: {
233
249
  default: string;
234
250
  };
235
251
  theme: {
236
- type: PropType<EProLayoutTheme>;
252
+ type: PropType<"light" | "dark">;
237
253
  required: false;
238
- default: EProLayoutTheme;
254
+ default: string;
239
255
  };
240
256
  footerTitle: {
241
257
  type: PropType<string>;
@@ -247,6 +263,11 @@ declare const ProLayout: {
247
263
  required: false;
248
264
  default: boolean;
249
265
  };
266
+ siderBreakpoint: {
267
+ type: PropType<"xxl" | "xl" | "lg" | "md" | "sm" | "xs">;
268
+ required: false;
269
+ default: string;
270
+ };
250
271
  }>> & {
251
272
  onCollapse?: ((collapsed: boolean) => any) | undefined;
252
273
  }, {
@@ -284,12 +305,12 @@ declare const ProLayout: {
284
305
  menuItems: IProMenuItem[];
285
306
  headerTitle: string;
286
307
  headerLogo: string;
287
- theme: EProLayoutTheme;
308
+ theme: "light" | "dark";
288
309
  footerTitle: string;
289
310
  tabsMode: boolean;
311
+ siderBreakpoint: "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
290
312
  }, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
291
313
  install: (app: App) => void;
292
314
  };
293
- export * from './enum';
294
315
  export { ProLayout };
295
316
  export default ProLayout;
@@ -19,7 +19,8 @@ const ProLayout = Object.assign(_sfc_main, {
19
19
  app.component("KbProLayout", _sfc_main);
20
20
  }
21
21
  });
22
+ const ProLayout$1 = ProLayout;
22
23
  export {
23
24
  ProLayout,
24
- ProLayout as default
25
+ ProLayout$1 as default
25
26
  };
@@ -1,6 +1,5 @@
1
1
  import type { DefineComponent, Ref, Slot, ComputedRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, type PropType } from 'vue';
2
2
  import type { IProMenuItem } from '../pro-menu';
3
- import { EProLayoutTheme } from './enum';
4
3
  declare const _sfc_main: DefineComponent<{
5
4
  menuItems: {
6
5
  type: PropType<IProMenuItem[]>;
@@ -18,9 +17,9 @@ declare const _sfc_main: DefineComponent<{
18
17
  default: string;
19
18
  };
20
19
  theme: {
21
- type: PropType<EProLayoutTheme>;
20
+ type: PropType<"light" | "dark">;
22
21
  required: false;
23
- default: EProLayoutTheme;
22
+ default: string;
24
23
  };
25
24
  footerTitle: {
26
25
  type: PropType<string>;
@@ -32,6 +31,11 @@ declare const _sfc_main: DefineComponent<{
32
31
  required: false;
33
32
  default: boolean;
34
33
  };
34
+ siderBreakpoint: {
35
+ type: PropType<"xxl" | "xl" | "lg" | "md" | "sm" | "xs">;
36
+ required: false;
37
+ default: string;
38
+ };
35
39
  }, {
36
40
  prefixClsName: string;
37
41
  props: any;
@@ -80,9 +84,9 @@ declare const _sfc_main: DefineComponent<{
80
84
  default: string;
81
85
  };
82
86
  theme: {
83
- type: PropType<EProLayoutTheme>;
87
+ type: PropType<"light" | "dark">;
84
88
  required: false;
85
- default: EProLayoutTheme;
89
+ default: string;
86
90
  };
87
91
  footerTitle: {
88
92
  type: PropType<string>;
@@ -94,14 +98,20 @@ declare const _sfc_main: DefineComponent<{
94
98
  required: false;
95
99
  default: boolean;
96
100
  };
101
+ siderBreakpoint: {
102
+ type: PropType<"xxl" | "xl" | "lg" | "md" | "sm" | "xs">;
103
+ required: false;
104
+ default: string;
105
+ };
97
106
  }>> & {
98
107
  onCollapse?: ((collapsed: boolean) => any) | undefined;
99
108
  }, {
100
109
  menuItems: IProMenuItem[];
101
110
  headerTitle: string;
102
111
  headerLogo: string;
103
- theme: EProLayoutTheme;
112
+ theme: "light" | "dark";
104
113
  footerTitle: string;
105
114
  tabsMode: boolean;
115
+ siderBreakpoint: "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
106
116
  }>;
107
117
  export default _sfc_main;
@@ -1,6 +1,5 @@
1
1
  import { defineComponent, useCssVars, toRefs, useSlots, provide, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createVNode, createElementVNode, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent, KeepAlive } from "vue";
2
2
  import { useHooks } from "./hooks.js";
3
- import { EProLayoutTheme } from "./enum.js";
4
3
  const _hoisted_1 = ["src"];
5
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
5
  __name: "pro-layout",
@@ -23,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
22
  theme: {
24
23
  type: String,
25
24
  required: false,
26
- default: EProLayoutTheme.light
25
+ default: "light"
27
26
  },
28
27
  footerTitle: {
29
28
  type: String,
@@ -34,6 +33,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
33
  type: Boolean,
35
34
  required: false,
36
35
  default: true
36
+ },
37
+ siderBreakpoint: {
38
+ type: String,
39
+ required: false,
40
+ default: "xl"
37
41
  }
38
42
  },
39
43
  emits: {
@@ -42,8 +46,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
46
  setup(__props, { emit }) {
43
47
  const props = __props;
44
48
  useCssVars((_ctx) => ({
45
- "29cb7150": siderWidthPx,
46
- "7085bb26": siderCollapsedWidthPx
49
+ "1e11aed1": siderWidthPx,
50
+ "043fd9d8": siderCollapsedWidthPx
47
51
  }));
48
52
  const prefixClsName = "keyblade-pro-layout";
49
53
  const { menuItems } = toRefs(props);
@@ -84,10 +88,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
84
88
  };
85
89
  watch(() => props.theme, () => {
86
90
  switch (props.theme) {
87
- case EProLayoutTheme.light:
91
+ case "light":
88
92
  document.body.removeAttribute("arco-theme");
89
93
  break;
90
- case EProLayoutTheme.dark:
94
+ case "dark":
91
95
  document.body.setAttribute("arco-theme", "dark");
92
96
  break;
93
97
  }
@@ -150,7 +154,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
150
154
  class: normalizeClass(`${prefixClsName}-sider`),
151
155
  collapsible: true,
152
156
  width: siderWidth,
153
- breakpoint: "md",
157
+ breakpoint: __props.siderBreakpoint,
154
158
  collapsed: siderCollapsed.value,
155
159
  "hide-trigger": true,
156
160
  onCollapse: onSiderCollapse
@@ -173,7 +177,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
173
177
  ], 2)
174
178
  ]),
175
179
  _: 3
176
- }, 8, ["class", "collapsed"]),
180
+ }, 8, ["class", "breakpoint", "collapsed"]),
177
181
  createVNode(_component_a_layout, {
178
182
  class: normalizeClass(`${prefixClsName}-body` + (siderCollapsed.value ? ` ${prefixClsName}-body-collapsed` : ""))
179
183
  }, {
@@ -6,7 +6,8 @@ const ProMenu = Object.assign(_sfc_main, {
6
6
  app.component("KbProMenu", _sfc_main);
7
7
  }
8
8
  });
9
+ const ProMenu$1 = ProMenu;
9
10
  export {
10
11
  ProMenu,
11
- ProMenu as default
12
+ ProMenu$1 as default
12
13
  };
@@ -7,7 +7,8 @@ const ProPageWrapper = Object.assign(_sfc_main, {
7
7
  app.component("KbProPageWrapper", _sfc_main);
8
8
  }
9
9
  });
10
+ const ProPageWrapper$1 = ProPageWrapper;
10
11
  export {
11
12
  ProPageWrapper,
12
- ProPageWrapper as default
13
+ ProPageWrapper$1 as default
13
14
  };
@@ -7,7 +7,8 @@ const ProReuseTabs = Object.assign(_sfc_main, {
7
7
  app.component("KbProReuseTabs", _sfc_main);
8
8
  }
9
9
  });
10
+ const ProReuseTabs$1 = ProReuseTabs;
10
11
  export {
11
12
  ProReuseTabs,
12
- ProReuseTabs as default
13
+ ProReuseTabs$1 as default
13
14
  };
@@ -1,5 +1,5 @@
1
1
  import type { DefineComponent, ComputedRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, type PropType } from 'vue';
2
- import { IProTab } from './interface';
2
+ import type { IProTab } from './interface';
3
3
  declare const _sfc_main: DefineComponent<{
4
4
  tabs: {
5
5
  type: PropType<IProTab[]>;
package/es/style.css CHANGED
@@ -1,3 +1,8 @@
1
+ .keyblade-pro-reuse-tabs {
2
+ position: relative;
3
+ background-color: var(--color-bg-2);
4
+ padding: 4px 20px;
5
+ }
1
6
  .keyblade-pro-page-wrapper {
2
7
  padding: 0 20px 20px 20px;
3
8
  }
@@ -51,7 +56,7 @@
51
56
  }
52
57
  .keyblade-pro-layout-body {
53
58
  padding-top: 60px;
54
- padding-left: var(--29cb7150);
59
+ padding-left: var(--1e11aed1);
55
60
  min-height: 100vh;
56
61
  overflow-y: hidden;
57
62
  background-color: var(--color-fill-2);
@@ -71,10 +76,5 @@
71
76
  text-align: center;
72
77
  }
73
78
  .keyblade-pro-layout-body-collapsed {
74
- padding-left: var(--7085bb26);
75
- }
76
- .keyblade-pro-reuse-tabs {
77
- position: relative;
78
- background-color: var(--color-bg-2);
79
- padding: 4px 20px;
79
+ padding-left: var(--043fd9d8);
80
80
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "0.0.3",
5
+ "version": "0.0.5",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { App } from 'vue'
1
+ import type { App } from 'vue'
2
2
  import { ProBreadcrumb } from './pro-breadcrumb'
3
3
  import { ProMenu } from './pro-menu'
4
4
  import { ProPageWrapper } from './pro-page-wrapper'
@@ -19,7 +19,6 @@ export default {
19
19
  export { default as ProBreadcrumb } from './pro-breadcrumb'
20
20
 
21
21
  export { default as ProLayout } from './pro-layout'
22
- export { EProLayoutTheme } from './pro-layout'
23
22
 
24
23
  export { default as ProMenu } from './pro-menu'
25
24
  export type { IProMenuItem } from './pro-menu'
@@ -1,5 +0,0 @@
1
- /** 主题 */
2
- export declare enum EProLayoutTheme {
3
- light = "light",
4
- dark = "dark"
5
- }
@@ -1,8 +0,0 @@
1
- var EProLayoutTheme = /* @__PURE__ */ ((EProLayoutTheme2) => {
2
- EProLayoutTheme2["light"] = "light";
3
- EProLayoutTheme2["dark"] = "dark";
4
- return EProLayoutTheme2;
5
- })(EProLayoutTheme || {});
6
- export {
7
- EProLayoutTheme
8
- };