base6-ui 2.0.26 → 2.0.28

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 (89) hide show
  1. package/dist/_utils/composable/use-omit-props.d.ts +2 -0
  2. package/dist/_utils/simply-omit.d.ts +1 -0
  3. package/dist/components/button-list/index.d.ts +2 -0
  4. package/dist/components/button-list/src/button-list.d.ts +35 -0
  5. package/dist/components/button-list/src/interface.d.ts +48 -0
  6. package/dist/components/data-table/data-table.d.ts +2 -7094
  7. package/dist/components/data-table/interface.d.ts +26 -2
  8. package/dist/components/index.d.ts +2 -0
  9. package/dist/components/shape-button/index.d.ts +2 -0
  10. package/dist/components/shape-button/src/cssVar.d.ts +7 -0
  11. package/dist/components/shape-button/src/interface.d.ts +667 -0
  12. package/dist/components/shape-button/src/shape-button.d.ts +4 -0
  13. package/dist/hooks/useBodenHttpMessage.d.ts +7 -1
  14. package/dist/index.css +1 -1
  15. package/dist/index.umd.js +3 -3
  16. package/dist/locale/http/en-us.d.ts +96 -42
  17. package/es/_utils/composable/use-omit-props.d.ts +2 -0
  18. package/es/_utils/composable/use-omit-props.mjs +12 -0
  19. package/es/_utils/simply-omit.d.ts +1 -0
  20. package/es/_utils/simply-omit.mjs +9 -0
  21. package/es/_virtual/virtual_svg-icons-register.mjs +1 -1
  22. package/es/components/button-list/index.d.ts +2 -0
  23. package/es/components/button-list/src/button-list.d.ts +35 -0
  24. package/es/components/button-list/src/button-list.mjs +63 -0
  25. package/es/components/button-list/src/interface.d.ts +48 -0
  26. package/es/components/button-list/src/interface.mjs +12 -0
  27. package/es/components/data-table/data-table.d.ts +2 -7094
  28. package/es/components/data-table/data-table.mjs +34 -29
  29. package/es/components/data-table/interface.d.ts +26 -2
  30. package/es/components/data-table/interface.mjs +17 -7
  31. package/es/components/index.d.ts +2 -0
  32. package/es/components/shape-button/index.d.ts +2 -0
  33. package/es/components/shape-button/src/cssVar.d.ts +7 -0
  34. package/es/components/shape-button/src/cssVar.mjs +65 -0
  35. package/es/components/shape-button/src/interface.d.ts +667 -0
  36. package/es/components/shape-button/src/interface.mjs +30 -0
  37. package/es/components/shape-button/src/shape-button.d.ts +4 -0
  38. package/es/components/shape-button/src/shape-button.mjs +52 -0
  39. package/es/components/system-actions/index.vue.mjs +2 -2
  40. package/es/components/system-actions/index.vue2.mjs +43 -48
  41. package/es/config/themes/components/card/dark.mjs +1 -1
  42. package/es/config/themes/components/dataTable/dark.mjs +3 -3
  43. package/es/config/themes/components/inputNumber/light.mjs +7 -5
  44. package/es/hooks/useBodenHttpMessage.d.ts +7 -1
  45. package/es/hooks/useBodenHttpMessage.mjs +17 -71
  46. package/es/index.css +1 -1
  47. package/es/index.mjs +104 -96
  48. package/es/locale/http/en-us.d.ts +96 -42
  49. package/es/locale/http/en-us.mjs +96 -85
  50. package/es/locale/http/zh-cn.mjs +95 -83
  51. package/es/node_modules/.pnpm/naive-ui@2.43.1_vue@3.5.22_typescript@5.7.2_/node_modules/naive-ui/es/_utils/css/format-length.mjs +22 -0
  52. package/lib/_utils/composable/use-omit-props.d.ts +2 -0
  53. package/lib/_utils/composable/use-omit-props.js +1 -0
  54. package/lib/_utils/simply-omit.d.ts +1 -0
  55. package/lib/_utils/simply-omit.js +1 -0
  56. package/lib/_virtual/virtual_svg-icons-register.js +1 -1
  57. package/lib/components/button-list/index.d.ts +2 -0
  58. package/lib/components/button-list/src/button-list.d.ts +35 -0
  59. package/lib/components/button-list/src/button-list.js +1 -0
  60. package/lib/components/button-list/src/interface.d.ts +48 -0
  61. package/lib/components/button-list/src/interface.js +1 -0
  62. package/lib/components/data-table/data-table.d.ts +2 -7094
  63. package/lib/components/data-table/data-table.js +1 -1
  64. package/lib/components/data-table/interface.d.ts +26 -2
  65. package/lib/components/data-table/interface.js +1 -1
  66. package/lib/components/index.d.ts +2 -0
  67. package/lib/components/shape-button/index.d.ts +2 -0
  68. package/lib/components/shape-button/src/cssVar.d.ts +7 -0
  69. package/lib/components/shape-button/src/cssVar.js +1 -0
  70. package/lib/components/shape-button/src/interface.d.ts +667 -0
  71. package/lib/components/shape-button/src/interface.js +1 -0
  72. package/lib/components/shape-button/src/shape-button.d.ts +4 -0
  73. package/lib/components/shape-button/src/shape-button.js +1 -0
  74. package/lib/components/system-actions/index.vue.js +1 -1
  75. package/lib/components/system-actions/index.vue2.js +1 -1
  76. package/lib/config/themes/components/card/dark.js +1 -1
  77. package/lib/config/themes/components/dataTable/dark.js +1 -1
  78. package/lib/config/themes/components/inputNumber/light.js +1 -1
  79. package/lib/hooks/useBodenHttpMessage.d.ts +7 -1
  80. package/lib/hooks/useBodenHttpMessage.js +1 -1
  81. package/lib/index.css +1 -1
  82. package/lib/index.js +1 -1
  83. package/lib/locale/http/en-us.d.ts +96 -42
  84. package/lib/locale/http/en-us.js +1 -1
  85. package/lib/locale/http/zh-cn.js +1 -1
  86. package/lib/node_modules/.pnpm/naive-ui@2.43.1_vue@3.5.22_typescript@5.7.2_/node_modules/naive-ui/es/_utils/css/format-length.js +1 -0
  87. package/package.json +1 -1
  88. package/es/components/system-actions/cssVar.mjs +0 -65
  89. package/lib/components/system-actions/cssVar.js +0 -1
@@ -0,0 +1,52 @@
1
+ import { defineComponent as u, createVNode as i, mergeProps as m, computed as r, resolveComponent as a } from "vue";
2
+ import { NButton as c } from "naive-ui";
3
+ import { bodenShapeButtonProps as p, bodenShapeButtonExtendProps as h } from "./interface.mjs";
4
+ import { getButtonThemeOverrides as l } from "./cssVar.mjs";
5
+ import { useOmitProps as f } from "../../../_utils/composable/use-omit-props.mjs";
6
+ import g from "../../../hooks/useNaiveConfigProvideContext.mjs";
7
+ const v = "BodenShapeButton", $ = /* @__PURE__ */ u({
8
+ name: v,
9
+ props: p,
10
+ slots: Object,
11
+ setup(e) {
12
+ const o = f(e, h), t = g(), n = r(() => {
13
+ const {
14
+ name: d = "light"
15
+ } = t?.mergedThemeRef.value || {};
16
+ return d !== "light";
17
+ }), s = r(() => ({
18
+ paddingMedium: "0",
19
+ borderRadiusMedium: e.shape === "circle" ? "50%" : "10px",
20
+ ...l(n.value)
21
+ }));
22
+ return {
23
+ containerStyle: r(() => ({
24
+ width: `${e.width}px`,
25
+ minHeight: `${e.height}px`
26
+ })),
27
+ buttonProps: o,
28
+ shapeThemeOverrides: s
29
+ };
30
+ },
31
+ render() {
32
+ const {
33
+ $props: e,
34
+ $attrs: o,
35
+ $slots: t
36
+ } = this, n = {
37
+ ...t,
38
+ default: () => t.default ? t.default() : e.content,
39
+ icon: () => t.icon ? t.icon() : e.icon ? i(a("SvgIcon"), {
40
+ icon: e.icon
41
+ }, null) : void 0
42
+ };
43
+ return i(c, m(o, this.buttonProps, {
44
+ class: "boden-shape-button",
45
+ style: this.containerStyle,
46
+ themeOverrides: this.shapeThemeOverrides
47
+ }), n);
48
+ }
49
+ });
50
+ export {
51
+ $ as default
52
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-760e521d"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d89a84b2"]]);
5
5
  export {
6
- s as default
6
+ a as default
7
7
  };
@@ -1,11 +1,12 @@
1
- import { NButton as T, NDropdown as x } from "naive-ui";
2
- import { defineComponent as z, computed as m, h as p, createElementBlock as B, openBlock as I, createVNode as t, withCtx as n, unref as l, createElementVNode as h, toDisplayString as N } from "vue";
3
- import { SvgIcon as o } from "../../node_modules/.pnpm/lib-materials@0.0.8_typescript@5.7.2/node_modules/lib-materials/dist/lib-materials.mjs";
4
- import { useLocale as O } from "../../hooks/useLocale.mjs";
5
- import { useAnimationHook as L } from "../../hooks/useAnimationHook.mjs";
1
+ import { NDropdown as B, NButton as x } from "naive-ui";
2
+ import { defineComponent as z, computed as u, h as g, createElementBlock as I, openBlock as N, createVNode as t, unref as o, withCtx as s, createElementVNode as p, toDisplayString as T } from "vue";
3
+ import { SvgIcon as n } from "../../node_modules/.pnpm/lib-materials@0.0.8_typescript@5.7.2/node_modules/lib-materials/dist/lib-materials.mjs";
4
+ import d from "../shape-button/src/shape-button.mjs";
5
+ import "../shape-button/src/interface.mjs";
6
+ import { useLocale as L } from "../../hooks/useLocale.mjs";
7
+ import { useAnimationHook as O } from "../../hooks/useAnimationHook.mjs";
6
8
  import w from "../../hooks/useNaiveConfigProvideContext.mjs";
7
- import { getButtonThemeOverrides as D } from "./cssVar.mjs";
8
- const U = { class: "boden-system-actions-container" }, E = { class: "user-trigger" }, P = { class: "name" }, F = /* @__PURE__ */ z({
9
+ const D = { class: "boden-system-actions-container" }, U = { class: "user-trigger" }, E = { class: "name" }, F = /* @__PURE__ */ z({
9
10
  name: "BaseSystemActions",
10
11
  __name: "index",
11
12
  props: {
@@ -14,74 +15,68 @@ const U = { class: "boden-system-actions-container" }, E = { class: "user-trigge
14
15
  userInfo: {}
15
16
  },
16
17
  emits: ["toggleSystemTheme", "toggleSystemLang", "toggleUserItem"],
17
- setup(a, { emit: f }) {
18
- const s = a, i = f, y = w(), { t: u } = O(), { toggleAnimationByClipCircle: _ } = L(), r = m(() => {
18
+ setup(l, { emit: f }) {
19
+ const i = l, r = f, y = w(), { t: m } = L(), { toggleAnimationByClipCircle: _ } = O(), c = u(() => {
19
20
  const {
20
21
  name: e = "light"
21
22
  } = y?.mergedThemeRef.value || {};
22
23
  return e !== "light";
23
- }), g = m(() => D(r.value)), v = m(() => s.userActionOption && s.userActionOption.length ? s.userActionOption : [
24
+ }), h = u(() => i.userActionOption && i.userActionOption.length ? i.userActionOption : [
24
25
  {
25
- label: u("boden.systemActions.userCenter"),
26
+ label: m("boden.systemActions.userCenter"),
26
27
  key: "user-center",
27
- icon: () => p(o, { icon: "layout-user-center", size: "16" })
28
+ icon: () => g(n, { icon: "layout-user-center", size: "16" })
28
29
  },
29
30
  {
30
- label: u("boden.systemActions.logout"),
31
+ label: m("boden.systemActions.logout"),
31
32
  key: "logout",
32
- icon: () => p(o, { icon: "layout-logout", size: "16" })
33
+ icon: () => g(n, { icon: "layout-logout", size: "16" })
33
34
  }
34
35
  ]), S = () => {
35
- i("toggleSystemLang");
36
+ r("toggleSystemLang");
36
37
  }, k = (e) => {
37
- i("toggleSystemTheme", e);
38
- }, C = (e, d) => {
39
- i("toggleUserItem", e, d);
40
- }, A = (e) => {
41
- _(e, r.value, k);
38
+ r("toggleSystemTheme", e);
39
+ }, v = (e, a) => {
40
+ r("toggleUserItem", e, a);
41
+ }, C = (e) => {
42
+ _(e, c.value, k);
42
43
  };
43
- return (e, d) => {
44
- const c = T, b = x;
45
- return I(), B("div", U, [
46
- t(c, {
47
- "theme-overrides": g.value,
48
- onClick: A
49
- }, {
50
- default: n(() => [
51
- t(l(o), {
52
- icon: "layout-theme",
44
+ return (e, a) => {
45
+ const A = x, b = B;
46
+ return N(), I("div", D, [
47
+ t(o(d), { onClick: C }, {
48
+ default: s(() => [
49
+ t(o(n), {
50
+ icon: `layout-theme${c.value ? "-dark" : ""}`,
53
51
  size: "16"
54
- })
52
+ }, null, 8, ["icon"])
55
53
  ]),
56
54
  _: 1
57
- }, 8, ["theme-overrides"]),
58
- t(c, {
59
- "theme-overrides": g.value,
60
- onClick: S
61
- }, {
62
- default: n(() => [
63
- t(l(o), {
55
+ }),
56
+ t(o(d), { onClick: S }, {
57
+ default: s(() => [
58
+ t(o(n), {
64
59
  icon: "layout-lang",
65
60
  size: "16"
66
61
  })
67
62
  ]),
68
63
  _: 1
69
- }, 8, ["theme-overrides"]),
64
+ }),
70
65
  t(b, {
71
66
  placement: "bottom",
72
67
  trigger: "click",
73
- options: v.value,
74
- onSelect: C
68
+ options: h.value,
69
+ onSelect: v
75
70
  }, {
76
- default: n(() => [
77
- h("div", E, [
78
- t(c, { text: "" }, {
79
- default: n(() => [
80
- t(l(o), {
81
- icon: `layout-user-${r.value ? "dark" : "light"}`,
71
+ default: s(() => [
72
+ p("div", U, [
73
+ t(A, { text: "" }, {
74
+ default: s(() => [
75
+ t(o(n), {
76
+ icon: `layout-user-${c.value ? "dark" : "light"}`,
82
77
  size: "32"
83
78
  }, null, 8, ["icon"]),
84
- h("span", P, N(a.userInfo?.name), 1)
79
+ p("span", E, T(l.userInfo?.name), 1)
85
80
  ]),
86
81
  _: 1
87
82
  })
@@ -4,7 +4,7 @@ import "../../token/light.mjs";
4
4
  const c = {
5
5
  color: o["bg-color-3"],
6
6
  paddingMedium: "16px 24px",
7
- borderColor: r["color-gray-3"],
7
+ borderColor: r["color-gray-4"],
8
8
  textColor: o["color-text-3"],
9
9
  titleTextColor: o["color-text-1"],
10
10
  closeIconColor: o["color-text-1"],
@@ -3,10 +3,10 @@ import o from "../../token/dark.mjs";
3
3
  import "../../token/light.mjs";
4
4
  import { DataTableThemeCommon as t } from "./common.mjs";
5
5
  import { merge as e } from "../../../../node_modules/.pnpm/es-toolkit@1.41.0/node_modules/es-toolkit/dist/object/merge.mjs";
6
- const d = e(
6
+ const c = e(
7
7
  {
8
8
  tdColor: o["bg-color-2"],
9
- tdColorStriped: o["fill-color-5"],
9
+ tdColorStriped: "#29292B",
10
10
  tdTextColor: r["color-gray-10"],
11
11
  thColor: o["bg-color-2"],
12
12
  thColorHover: o["bg-color-2"],
@@ -23,5 +23,5 @@ const d = e(
23
23
  { ...t }
24
24
  );
25
25
  export {
26
- d as DataTableThemeDark
26
+ c as DataTableThemeDark
27
27
  };
@@ -1,11 +1,13 @@
1
1
  import o from "../../color/light.mjs";
2
- import { InputNumberThemeCommon as r } from "./common.mjs";
3
- const e = {
4
- ...r,
2
+ import "../../token/dark.mjs";
3
+ import r from "../../token/light.mjs";
4
+ import { InputNumberThemeCommon as l } from "./common.mjs";
5
+ const i = {
6
+ ...l,
5
7
  innerControlsBackground: o["color-gray-3"],
6
8
  innerControlsDisabledBackground: o["color-gray-3"],
7
9
  outerControlsBorderStyle: `1px solid ${o["color-gray-4"]}`,
8
- outerControlsBackground: "",
10
+ outerControlsBackground: r["bg-color-3"],
9
11
  outerControlsBorderStyleDisabled: `1px solid ${o["color-gray-2"]}`,
10
12
  outerControlsBackgroundDisabled: o["color-gray-2"],
11
13
  controlFontColorDisabled: o["color-gray-4"],
@@ -13,5 +15,5 @@ const e = {
13
15
  outerControlsOpacityDisabled: 1
14
16
  };
15
17
  export {
16
- e as InputNumberThemeLight
18
+ i as InputNumberThemeLight
17
19
  };
@@ -1,4 +1,10 @@
1
1
  import { BodenLocaleLang } from '../components/config-provider/types';
2
+ import { TranslatorOption } from './useLocale';
2
3
  export declare const useBodenHttpMessage: () => {
3
- httpMessage: (httpStatus: number, httpCode: number, lang?: BodenLocaleLang) => string;
4
+ $t: (params: {
5
+ httpStatus: number;
6
+ httpCode?: number;
7
+ option?: TranslatorOption | number | string;
8
+ locale?: BodenLocaleLang;
9
+ }) => string;
4
10
  };
@@ -1,73 +1,19 @@
1
- import a from "../locale/http/en-us.mjs";
2
- import f from "../locale/http/zh-cn.mjs";
3
- const n = {
4
- "en-US": a,
5
- "zh-CN": f
6
- }, g = () => {
7
- const i = (s, u) => {
8
- const e = n[u];
9
- if (e) {
10
- if (s === 1) return e.success.unknown;
11
- if (s === 2) return e.success.warning;
12
- if (s === 200) return e.success.success;
13
- if (s >= 1e4 && s <= 19999) return e.success.parameterProblem;
14
- if (s === 2e4) return e.success.userExists;
15
- if (s === 20001) return e.success.userIncorrectCode;
16
- if (s === 20002) return e.success.userInvalidPassword;
17
- if (s === 20003) return e.success.userPhoneNotRegistered;
18
- if (s === 20004) return e.success.userBeenDisabled;
19
- if (s === 20005) return e.success.userPhoneBeenRegistered;
20
- if (s === 20006) return e.success.userBeenRegistered;
21
- if (s === 20007) return e.success.userNotExists;
22
- if (s === 21e3) return e.success.TeamNameRepeat;
23
- if (s === 21001) return e.success.TeamNotExists;
24
- if (s === 21002) return e.success.TeamUsersNotBeenAdmin;
25
- if (s === 3e4) return e.success.resourceExists;
26
- if (s === 30001) return e.success.resourceBeenBound;
27
- if (s === 30002) return e.success.resourceCannotModified;
28
- if (s === 30003) return e.success.resourceCannotDeleted;
29
- if (s === 30004) return e.success.resourceBeenClaimed;
30
- if (s === 30005) return e.success.resourceBeenSuspended;
31
- if (s === 30006) return e.success.resourceNotExist;
32
- if (s === 30007) return e.success.resourceBeingCreated;
33
- if (s === 30008) return e.success.resourceBeingUpdated;
34
- if (s === 30009) return e.success.resourceBeingDeleted;
35
- if (s === 30010) return e.success.resourceBeingSubmitted;
36
- if (s === 30011) return e.success.resourceBeingRejected;
37
- if (s === 30012) return e.success.resourceBeingOccupied;
38
- if (s === 30013) return e.success.resourceNotSupport;
39
- if (s === 30014) return e.success.resourceUnauthorized;
40
- if (s === 4e4) return e.success.InternalInterfaceConnectionFailed;
41
- if (s === 40001) return e.success.InternalInterfaceTimeout;
42
- if (s === 40002) return e.success.InternalInterfaceCallError;
43
- if (s === 40003) return e.success.InternalInterfaceReturnedNoValue;
44
- if (s === 5e4) return e.success.FileUploadFailed;
45
- if (s === 50001) return e.success.FileDownloadFailed;
46
- if (s === 50002) return e.success.FileNotExist;
47
- if (s === 50003) return e.success.FileGenerationFailed;
48
- if (s === 50010) return e.success.FileImportedErrorByParameter;
49
- }
50
- };
51
- return {
52
- httpMessage: (s, u, e = "en-US") => {
53
- const c = n[e];
54
- let r = "";
55
- if (!c) return r;
56
- switch (s) {
57
- case 401:
58
- r = c.unauthorized;
59
- break;
60
- case 403:
61
- r = c.forbidden;
62
- break;
63
- case 200:
64
- r = i(u, e) || "";
65
- break;
66
- }
67
- return r;
68
- }
69
- };
70
- };
1
+ import m from "../locale/http/en-us.mjs";
2
+ import c from "../locale/http/zh-cn.mjs";
3
+ import { get as g } from "../node_modules/.pnpm/es-toolkit@1.41.0/node_modules/es-toolkit/dist/compat/object/get.mjs";
4
+ const f = {
5
+ "en-US": m,
6
+ "zh-CN": c
7
+ }, C = () => ({
8
+ $t: (r) => {
9
+ const { httpStatus: e, httpCode: s, option: t, locale: p = "en-US" } = r, a = f[p];
10
+ let o = `${e}`;
11
+ return e === 200 && (o += `.${s ?? 0}`), g(a, o).replace(
12
+ /\{(\w+)\}/g,
13
+ (u, n) => typeof t == "string" || typeof t == "number" ? `${t}` : `${t?.[n] ?? `{${n}}`}`
14
+ );
15
+ }
16
+ });
71
17
  export {
72
- g as useBodenHttpMessage
18
+ C as useBodenHttpMessage
73
19
  };