zhihao-ui 1.1.4 → 1.1.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/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { makeInstaller } from "@zhihao-ui/utils";
2
- import components from "./components";
2
+ import components from "./componens.ts";
3
3
 
4
4
  const installer = makeInstaller(components);
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zhihao-ui",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "components",
5
5
  "type": "module",
6
6
 
@@ -23,6 +23,6 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "vite-plugin-dts": "^3.9.1",
26
- "@zhihao-ui/components": "workspace:*"
26
+ "@zhihao-ui/components": "workspace:*"
27
27
  }
28
28
  }
package/vite.es.config.ts CHANGED
@@ -14,49 +14,49 @@ function getDirectoriesSync(basePath: string) {
14
14
  );
15
15
  }
16
16
  export default defineConfig({
17
- plugins: [vue(), dts({
18
- tsconfigPath: "../../tsconfig.build.json",
19
- outDir: "dist/types"
20
- })],
21
- build: {
22
- outDir: "dist/es",
23
- lib: {
24
- entry: resolve(__dirname, './index.ts'),
25
- name: "ZhihaoUI",
26
- fileName: "index",
27
- formats: ['es']
28
- },
29
- rollupOptions: {
30
- external: [
31
- 'vue',
32
- "@fortawesome/fontawesome-svg-core",
33
- "@fortawesome/free-solid-svg-icons",
34
- "@fortawesome/vue-fontawesome",
35
- "@popperjs/core",
36
- "async-validator"
37
- ],
38
- output: {
39
- assetFileNames: (assetInfo) => {
40
- if (assetInfo.name === 'style.css') return "index.css"
41
- return assetInfo.name as string
42
- },
43
- manualChunks: (id) => {
44
- if (id.includes('node_modules')) {
45
- return "vendor"
46
- }
47
- if (id.includes('/packages/hooks')) {
48
- return "hooks"
49
- }
50
- if (id.includes('/packages/utils')) {
51
- return "utils"
52
- }
53
- for (const item of getDirectoriesSync("../components")) {
54
- if (id.includes(`/packages/components/${item}`)) {
55
- return item
17
+ plugins: [vue(), dts({
18
+ tsconfigPath: "../../tsconfig.build.json",
19
+ outDir: "dist/types"
20
+ })],
21
+ build: {
22
+ outDir: "dist/es",
23
+ lib: {
24
+ entry: resolve(__dirname, './index.ts'),
25
+ name: "ZhihaoUI",
26
+ fileName: "index",
27
+ formats: ['es']
28
+ },
29
+ rollupOptions: {
30
+ external: [
31
+ 'vue',
32
+ "@fortawesome/fontawesome-svg-core",
33
+ "@fortawesome/free-solid-svg-icons",
34
+ "@fortawesome/vue-fontawesome",
35
+ "@popperjs/core",
36
+ "async-validator"
37
+ ],
38
+ output: {
39
+ assetFileNames: (assetInfo) => {
40
+ if (assetInfo.name === 'style.css') return "index.css"
41
+ return assetInfo.name as string
42
+ },
43
+ manualChunks: (id) => {
44
+ if (id.includes('node_modules')) {
45
+ return "vendor"
46
+ }
47
+ if (id.includes('/packages/hooks')) {
48
+ return "hooks"
49
+ }
50
+ if (id.includes('/packages/utils')) {
51
+ return "utils"
52
+ }
53
+ for (const item of getDirectoriesSync("../components")) {
54
+ if (id.includes(`/packages/components/${item}`)) {
55
+ return item
56
+ }
56
57
  }
57
- }
58
+ },
58
59
  },
59
60
  },
60
- },
61
- }
61
+ }
62
62
  });
@@ -9,46 +9,46 @@ const COMP_NAMES = ['button', 'icon', 'input'];
9
9
 
10
10
 
11
11
  export default defineConfig({
12
- plugins: [vue(), dts({
13
- tsconfigPath: "../../tsconfig.build.json",
14
- outDir: "dist/types"
15
- })],
16
- build: {
17
- outDir: "dist/umd",
18
- lib: {
19
- entry: resolve(__dirname, './index.ts'),
20
- name: "ZhihaoUI",
21
- fileName: "index",
22
- formats: ['umd']
23
- },
24
- rollupOptions: {
25
- external: ['vue'],
26
- output: {
27
- exports: "named",
28
- globals: {
29
- vue: 'Vue'
30
- },
31
- assetFileNames: (assetInfo) => {
32
- if (assetInfo.name === 'style.css') return "index.css"
33
- return assetInfo.name as string
12
+ plugins: [vue(), dts({
13
+ tsconfigPath: "../../tsconfig.build.json",
14
+ outDir: "dist/types"
15
+ })],
16
+ build: {
17
+ outDir: "dist/umd",
18
+ lib: {
19
+ entry: resolve(__dirname, './index.ts'),
20
+ name: "ZhihaoUI",
21
+ fileName: "index",
22
+ formats: ['umd']
23
+ },
24
+ rollupOptions: {
25
+ external: ['vue'],
26
+ output: {
27
+ exports: "named",
28
+ globals: {
29
+ vue: 'Vue'
30
+ },
31
+ assetFileNames: (assetInfo) => {
32
+ if (assetInfo.name === 'style.css') return "index.css"
33
+ return assetInfo.name as string
34
+ },
35
+ // manualChunks: (id) => {
36
+ // if (id.includes('node_modules')) {
37
+ // return "vendor"
38
+ // }
39
+ // if (id.includes('/packages/hooks')) {
40
+ // return "hooks"
41
+ // }
42
+ // if (id.includes('/packages/utils')) {
43
+ // return "utils"
44
+ // }
45
+ // for (const item of COMP_NAMES) {
46
+ // if (id.includes(`/packages/components/${item}`)) {
47
+ // return item
48
+ // }
49
+ // }
50
+ // },
34
51
  },
35
- // manualChunks: (id) => {
36
- // if (id.includes('node_modules')) {
37
- // return "vendor"
38
- // }
39
- // if (id.includes('/packages/hooks')) {
40
- // return "hooks"
41
- // }
42
- // if (id.includes('/packages/utils')) {
43
- // return "utils"
44
- // }
45
- // for (const item of COMP_NAMES) {
46
- // if (id.includes(`/packages/components/${item}`)) {
47
- // return item
48
- // }
49
- // }
50
- // },
51
52
  },
52
- },
53
- }
53
+ }
54
54
  });
package/components.ts DELETED
@@ -1,4 +0,0 @@
1
- import { ZhButton, ZhDatePicker, ZhDetailSubTitle, ZhDialog, ZhEditInfoPair, ZhFileWrapper, ZhGrid, ZhInfoPair, ZhInput, ZhInputNumber , ZhLoading, ZhMessageBox, ZhMoneyInput, ZhPageHeadPanel, ZhToolTips, ZhBaseInfo, ZhDetailHeader} from "@zhihao-ui/components";
2
- import type { Plugin } from "vue"
3
-
4
- export default [ ZhButton, ZhDatePicker, ZhDetailSubTitle, ZhDialog, ZhEditInfoPair, ZhFileWrapper, ZhGrid, ZhInfoPair, ZhInput, ZhInputNumber, ZhLoading, ZhMessageBox, ZhMoneyInput, ZhPageHeadPanel, ZhToolTips, ZhBaseInfo, ZhDetailHeader ] as Plugin[]
@@ -1,53 +0,0 @@
1
- import { defineComponent as f, resolveComponent as s, openBlock as h, createBlock as p, withCtx as u, renderSlot as m } from "vue";
2
- import { w as W } from "./utils-DBdiSe6_.js";
3
- const v = /* @__PURE__ */ f({
4
- name: "ZhBaseInfo",
5
- __name: "BaseInfo",
6
- props: {
7
- contentWidth: { default: void 0 },
8
- labelWidth: { default: "70px" },
9
- infoDirection: { default: "vertical" },
10
- cols: { default: 5 },
11
- gap: { default: 16 }
12
- },
13
- setup(a) {
14
- const t = a, o = ref(), n = ref(), i = ref();
15
- provide("infoLabelWidth", o), provide("infoContentWidth", n), provide("infoDirection", i);
16
- function r() {
17
- o.value = t.labelWidth;
18
- }
19
- function c() {
20
- n.value = t.contentWidth;
21
- }
22
- function l() {
23
- i.value = t.infoDirection;
24
- }
25
- return watch(
26
- () => t.contentWidth,
27
- () => c(),
28
- { immediate: !0 }
29
- ), watch(
30
- () => t.labelWidth,
31
- () => r(),
32
- { immediate: !0 }
33
- ), watch(
34
- () => t.infoDirection,
35
- () => l(),
36
- { immediate: !0 }
37
- ), (e, b) => {
38
- const d = s("grid");
39
- return h(), p(d, {
40
- cols: e.cols,
41
- gap: e.gap
42
- }, {
43
- default: u(() => [
44
- m(e.$slots, "default")
45
- ]),
46
- _: 3
47
- }, 8, ["cols", "gap"]);
48
- };
49
- }
50
- }), C = W(v);
51
- export {
52
- C as Z
53
- };
@@ -1,57 +0,0 @@
1
- import { defineComponent as _, useSlots as h, openBlock as a, createElementBlock as o, createElementVNode as t, renderSlot as l, toDisplayString as i, Fragment as c, renderList as u, unref as f, normalizeClass as p, createCommentVNode as g } from "vue";
2
- import { _ as k } from "./Button-Q7GkKwFF.js";
3
- import { w as D } from "./utils-DBdiSe6_.js";
4
- const y = { class: "common-card" }, E = { class: "detail-header" }, I = { class: "detail-header--left" }, L = { class: "title common-title" }, b = { class: "info-pair--label" }, A = { class: "info-pair--value" }, H = {
5
- key: 1,
6
- class: "detail-header--right"
7
- }, M = { class: "info-pair--label" }, U = { class: "info-pair--value" }, V = /* @__PURE__ */ _({
8
- name: "ZhDetailHeader",
9
- __name: "DetailHeader",
10
- props: {
11
- title: {},
12
- leftInfos: {},
13
- rightInfos: {},
14
- stateMeta: {}
15
- },
16
- setup(v) {
17
- const m = h(), r = v;
18
- return (e, C) => {
19
- var n, d;
20
- return a(), o("div", y, [
21
- t("div", null, [
22
- l(e.$slots, "menu", {}, void 0, !0)
23
- ]),
24
- t("div", E, [
25
- t("div", I, [
26
- t("div", L, i(r.title), 1),
27
- l(e.$slots, "extra-info", {}, void 0, !0),
28
- (a(!0), o(c, null, u(r.leftInfos, (s) => (a(), o("div", {
29
- class: "info-pair",
30
- key: s.value
31
- }, [
32
- t("div", b, i(s.label), 1),
33
- t("div", A, i(s.value ?? e.DEFAULT_VALUE), 1)
34
- ]))), 128))
35
- ]),
36
- l(e.$slots, "default", {}, void 0, !0),
37
- f(m)["right-infos"] ? l(e.$slots, "right-infos", { key: 0 }, void 0, !0) : (a(), o("div", H, [
38
- (a(!0), o(c, null, u(r.rightInfos, (s) => (a(), o("div", {
39
- class: "info-pair",
40
- key: s.value
41
- }, [
42
- t("div", M, i(s.label), 1),
43
- t("div", U, i(s.value ?? e.DEFAULT_VALUE), 1)
44
- ]))), 128)),
45
- e.stateMeta ? (a(), o("div", {
46
- key: 0,
47
- class: p(["state common-title", (n = e.stateMeta) == null ? void 0 : n.state])
48
- }, i((d = e.stateMeta) == null ? void 0 : d.intro), 3)) : g("", !0)
49
- ]))
50
- ])
51
- ]);
52
- };
53
- }
54
- }), $ = /* @__PURE__ */ k(V, [["__scopeId", "data-v-d9112e20"]]), w = D($);
55
- export {
56
- w as Z
57
- };