kui-vue 3.6.9 → 3.6.10

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 (68) hide show
  1. package/components/alert/alert.jsx +1 -1
  2. package/components/backtop/backtop.jsx +1 -1
  3. package/components/button/button.jsx +1 -1
  4. package/components/carousel/carousel.jsx +1 -1
  5. package/components/checkbox/checkbox.jsx +1 -1
  6. package/components/checkbox/styles/index.less +3 -0
  7. package/components/collapse/collapsePanel.jsx +1 -1
  8. package/components/colorPicker/presets.jsx +1 -1
  9. package/components/components.js +1 -2
  10. package/components/datePicker/datepicker.jsx +1 -1
  11. package/components/drawer/drawer.jsx +1 -1
  12. package/components/dropdown/dropdownButton.jsx +1 -1
  13. package/components/empty/empty.jsx +1 -1
  14. package/components/image/image.jsx +1 -1
  15. package/components/image/preview.jsx +6 -5
  16. package/components/image/styles/index.less +0 -8
  17. package/components/index.js +16 -35
  18. package/components/input/input.jsx +1 -1
  19. package/components/inputNumber/inputNumber.jsx +1 -1
  20. package/components/loading/loading.jsx +0 -6
  21. package/components/message/index.js +0 -6
  22. package/components/message/inner.jsx +1 -1
  23. package/components/modal/index.js +4 -7
  24. package/components/modal/modal.jsx +2 -3
  25. package/components/modal/toast.jsx +1 -1
  26. package/components/notice/index.js +0 -6
  27. package/components/page/page.jsx +1 -1
  28. package/components/popconfirm/popconfirm.jsx +1 -1
  29. package/components/progress/progress.jsx +1 -1
  30. package/components/radio/styles/index.less +3 -0
  31. package/components/rate/star.jsx +1 -1
  32. package/components/select/option.jsx +1 -1
  33. package/components/select/select.jsx +1 -1
  34. package/components/statCard/statNumber.jsx +2 -2
  35. package/components/statCard/{countup.jsx → statup/countup.jsx} +1 -1
  36. package/components/switch/switch.jsx +1 -1
  37. package/components/table/table.jsx +1 -1
  38. package/components/tabs/tabs.jsx +1 -1
  39. package/components/tag/tag.jsx +1 -1
  40. package/components/tree/tree.jsx +1 -1
  41. package/components/treeselect/treeselect.jsx +1 -1
  42. package/components/upload/fileList.jsx +1 -1
  43. package/components/upload/selector.jsx +1 -1
  44. package/components/utils/theme.js +0 -10
  45. package/components/utils/vue.js +8 -0
  46. package/dist/k-ui.cjs.js +2 -2
  47. package/dist/k-ui.css +2 -2
  48. package/dist/k-ui.d.ts +373 -373
  49. package/dist/k-ui.esm.js +2 -2
  50. package/dist/k-ui.umd.js +2 -2
  51. package/dist/locale/de.js +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/en.js +1 -1
  54. package/dist/locale/fr.js +1 -1
  55. package/dist/locale/it.js +1 -1
  56. package/dist/locale/ja.js +1 -1
  57. package/dist/locale/ko.js +1 -1
  58. package/dist/locale/ru.js +1 -1
  59. package/dist/locale/th.js +1 -1
  60. package/dist/locale/uk.js +1 -1
  61. package/dist/locale/vi.js +1 -1
  62. package/dist/locale/zh-CN.js +1 -1
  63. package/dist/locale/zh-TW.js +1 -1
  64. package/package.json +13 -13
  65. package/types/index.d.ts +38 -38
  66. package/components/utils/i18n.js +0 -32
  67. /package/components/statCard/{countup.js → statup/countup.js} +0 -0
  68. /package/components/statCard/{rollup.jsx → statup/rollup.jsx} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  CheckmarkCircle,
7
7
  AlertCircle,
8
8
  Close,
9
- } from "kui-icons";
9
+ } from "kui-icons/dist/icons";
10
10
  import { getTransitionProp } from "../base/transition";
11
11
  import { withInstall } from "../utils/vue";
12
12
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  import Icon from "../icon";
3
3
  import scroll from "../directives/scroll";
4
- import { ArrowUp } from "kui-icons";
4
+ import { ArrowUp } from "kui-icons/dist/icons";
5
5
  import { withInstall } from '../utils/vue';
6
6
  import { defineComponent, ref } from "vue";
7
7
  const BackTop = defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, computed } from "vue";
2
2
  import Icon from "../icon";
3
- import { Loading } from "kui-icons";
3
+ import { Loading } from "kui-icons/dist/icons";
4
4
  import { getChildren } from "../utils/vnode";
5
5
  import { withInstall } from "../utils/vue";
6
6
  import { colors } from "../const/var";
@@ -1,6 +1,6 @@
1
1
  import Icon from "../icon";
2
2
  import resize from "../directives/resize";
3
- import { ArrowBack, ArrowForward } from "kui-icons";
3
+ import { ArrowBack, ArrowForward } from "kui-icons/dist/icons";
4
4
  import {
5
5
  defineComponent,
6
6
  provide,
@@ -1,5 +1,5 @@
1
1
  import Icon from "../icon";
2
- import { Checkmark } from "kui-icons";
2
+ import { Checkmark } from "kui-icons/dist/icons";
3
3
  import { defineComponent, ref, watch } from "vue";
4
4
  import { withInstall } from "../utils/vue";
5
5
 
@@ -35,6 +35,7 @@
35
35
  outline: 2px solid transparent;
36
36
  outline-offset: 1px;
37
37
  border-radius: 3px;
38
+ flex-shrink: 0;
38
39
  }
39
40
 
40
41
  .k-icon {
@@ -91,6 +92,8 @@
91
92
  padding-left: 8px;
92
93
  vertical-align: middle;
93
94
  font-size: 14px;
95
+ overflow: hidden;
96
+ text-overflow: ellipsis;
94
97
  }
95
98
  }
96
99
 
@@ -1,6 +1,6 @@
1
1
  import Icon from "../icon";
2
2
  import { getTransitionProp } from "../base/transition";
3
- import { ChevronUp } from "kui-icons";
3
+ import { ChevronUp } from "kui-icons/dist/icons";
4
4
  import {
5
5
  defineComponent,
6
6
  ref,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, reactive, ref, onMounted, watch } from "vue";
2
2
  import Color from "color";
3
- import { Checkmark } from "kui-icons";
3
+ import { Checkmark } from "kui-icons/dist/icons";
4
4
  import Icon from "../icon";
5
5
  export default defineComponent({
6
6
  name: "Presets",
@@ -77,8 +77,7 @@ import loading from "./loading";
77
77
  export { loading };
78
78
 
79
79
  import modal from "./modal";
80
- const Modal = modal;
81
- export { modal, Modal };
80
+ export { modal, modal as Modal };
82
81
 
83
82
  import { Menu, MenuGroup, MenuItem, SubMenu, MenuDivider } from "./menu";
84
83
  export { Menu, MenuGroup, MenuItem, SubMenu, MenuDivider };
@@ -21,7 +21,7 @@ import {
21
21
  ChevronForward,
22
22
  ChevronDoubleForward,
23
23
  ArrowForward,
24
- } from "kui-icons";
24
+ } from "kui-icons/dist/icons";
25
25
  import { setPlacement } from "../utils/placement";
26
26
  import transfer from "../directives/transfer";
27
27
  import resize from "../directives/resize";
@@ -1,6 +1,6 @@
1
1
  import { Button } from "../button";
2
2
  import transfer from "../directives/transfer";
3
- import { Close } from "kui-icons";
3
+ import { Close } from "kui-icons/dist/icons";
4
4
  import {
5
5
  defineComponent,
6
6
  inject,
@@ -3,7 +3,7 @@ import ButtonGroup from "../button/buttonGroup";
3
3
  import Dropdown from "./dropdown";
4
4
  import TriggerButton from "./trigger";
5
5
  import { defineComponent, ref, inject } from "vue";
6
- import { Ellipsis } from "kui-icons";
6
+ import { Ellipsis } from "kui-icons/dist/icons";
7
7
  import { withInstall } from "../utils/vue";
8
8
  const DropdownButton = defineComponent({
9
9
  name: "DropdownButton",
@@ -1,5 +1,5 @@
1
1
  import Icon from "../icon";
2
- import { FileTrayOutline } from "kui-icons";
2
+ import { FileTrayOutline } from "kui-icons/dist/icons";
3
3
  import zhCN from "../locale/zh-CN";
4
4
  import { defineComponent, inject, computed } from "vue";
5
5
  import { withInstall } from "../utils/vue";
@@ -8,7 +8,7 @@ import {
8
8
  } from "vue";
9
9
  import Icon from "../icon";
10
10
  import newInstance from "./instance";
11
- import { Loading, IconImage, EyeOutline } from "kui-icons";
11
+ import { Loading, IconImage, EyeOutline } from "kui-icons/dist/icons";
12
12
  import { withInstall } from "../utils/vue";
13
13
  import { loadImage } from "./utils";
14
14
 
@@ -12,7 +12,6 @@ import Icon from "../icon";
12
12
  import { getChildren } from "../utils/vnode";
13
13
  import { withInstall } from "../utils/vue";
14
14
  import {
15
- Refresh,
16
15
  Close,
17
16
  ArrowDown,
18
17
  IconImage,
@@ -24,7 +23,9 @@ import {
24
23
  ChevronUp,
25
24
  ChevronForward,
26
25
  Loading,
27
- } from "kui-icons";
26
+ RotateLeft,
27
+ RotateRight,
28
+ } from "kui-icons/dist/icons";
28
29
  import Slider from "../slider";
29
30
  import { Button } from "../button";
30
31
  import { loadImage } from "./utils";
@@ -411,13 +412,13 @@ const ImagePreview = defineComponent({
411
412
  class="k-image-preview-action k-image-preview-action-rotate-left"
412
413
  onClick={() => setRotate(1)}
413
414
  >
414
- <Icon type={Refresh} />
415
+ <Icon type={RotateLeft} />
415
416
  </li>
416
417
  <li
417
418
  class="k-image-preview-action k-image-preview-action-rotate-right"
418
419
  onClick={() => setRotate(0)}
419
420
  >
420
- <Icon type={Refresh} />
421
+ <Icon type={RotateRight} />
421
422
  </li>
422
423
  <li
423
424
  class={[
@@ -430,7 +431,7 @@ const ImagePreview = defineComponent({
430
431
  </li>
431
432
  <li class="k-image-preview-action k-image-preview-action-scale">
432
433
  <Slider
433
- modelValue={state.scale}
434
+ value={state.scale}
434
435
  min={1}
435
436
  max={maxScale}
436
437
  size="small"
@@ -147,14 +147,6 @@
147
147
  background-color: var(--kui-color-border);
148
148
  }
149
149
 
150
- .k-image-preview-action-rotate-left .k-icon {
151
- transform: rotateY(-180deg) rotate(45deg);
152
- }
153
-
154
- .k-image-preview-action-rotate-right .k-icon {
155
- transform: rotate(45deg);
156
- }
157
-
158
150
  .k-image-preview-action-disabled {
159
151
  opacity: 0.6;
160
152
  cursor: not-allowed;
@@ -1,49 +1,30 @@
1
- import pkg from "../package.json";
2
- import locale from "./utils/i18n";
3
-
1
+ import { version } from "../package.json";
4
2
  import * as components from "./components";
5
- import "./styles/index.less";
6
-
3
+ import { globalComponents, installGlobal } from "./utils/vue";
7
4
  export * from "./components";
5
+ import "./styles/index.less";
8
6
 
9
7
  const UI = {
10
- version: pkg.version,
11
- locale: locale.use,
12
- i18n: locale.i18n,
8
+ version: version,
13
9
  lang: {},
14
- install: function (app, opts = {}) {
15
- if (opts.locale) {
16
- locale.use(opts.locale);
17
- }
18
- if (opts.i18n) {
19
- locale.setI18n(opts.i18n);
20
- }
21
-
10
+ install: function (app) {
22
11
  Object.keys(components).forEach((key) => {
23
12
  const component = components[key];
24
- if (!key.startsWith("K")) {
25
- const kebabName =
26
- "k-" +
27
- key
28
- .replace(/([A-Z])/g, "-$1")
29
- .replace(/^-/, "")
30
- .toLowerCase();
13
+ if (globalComponents.includes(key)) {
14
+ installGlobal(app, component);
15
+ } else if (!key.startsWith("K")) {
16
+ const name = key
17
+ .replace(/([A-Z])/g, "-$1")
18
+ .replace(/^-/, "")
19
+ .toLowerCase();
20
+ const kebabName = `k-${name}`;
31
21
  app.component(kebabName, component);
22
+ app.component(key, component);
23
+ } else {
24
+ app.component(key, component);
32
25
  }
33
- app.component(key, component);
34
26
  });
35
- app.prototype.$message = components.message;
36
- app.prototype.$notice = components.notice;
37
- app.prototype.$modal = components.modal;
38
- app.prototype.$loading = components.loading;
39
- app.prototype.$image = components.KImage;
40
- app.prototype.$theme = components.theme;
41
27
  },
42
28
  };
43
29
 
44
- // auto install
45
- // if (typeof window !== 'undefined' && window.Vue) {
46
- // UI.install(window.Vue);
47
- // }
48
-
49
30
  export default UI;
@@ -1,6 +1,6 @@
1
1
  import Icon from "../icon";
2
2
  import { isEmpty } from "../utils/number";
3
- import { Search, CloseCircle, EyeOutline, EyeOffOutline } from "kui-icons";
3
+ import { Search, CloseCircle, EyeOutline, EyeOffOutline } from "kui-icons/dist/icons";
4
4
  import InputGroup from "./inputGroup.jsx";
5
5
  import { defineComponent, ref, nextTick, watch, inject, provide } from "vue";
6
6
  import { withInstall } from "../utils/vue";
@@ -3,7 +3,7 @@ import Big from "big.js";
3
3
  import Input from "../input/input";
4
4
  import Icon from "../icon";
5
5
  import { withInstall } from "../utils/vue";
6
- import { ChevronUp, ChevronDown } from "kui-icons";
6
+ import { ChevronUp, ChevronDown } from "kui-icons/dist/icons";
7
7
  import { sizeMap, filterSize } from "../utils/size";
8
8
  import { normalize, isValidBig } from "../utils/number";
9
9
  const InputNumber = defineComponent({
@@ -130,11 +130,5 @@ let Loading = {
130
130
  loadInstance = null;
131
131
  }
132
132
  },
133
- install(app) {
134
- // app.provide("loading", Loading);
135
- // 可选:同时挂到 globalProperties 兼容 this.$loading
136
- // app.config.globalProperties.$loading = Loading; //for 3
137
- app.prototype.$loading = Loading;
138
- },
139
133
  };
140
134
  export default withInstall(Loading);
@@ -20,12 +20,6 @@ let Message = {
20
20
  messageInstance = null;
21
21
  }
22
22
  },
23
- install(app) {
24
- // app.provide("message", Message);
25
- // 可选:同时挂到 globalProperties 兼容 this.$message
26
- // app.config.globalProperties.$message = Message; //for 3
27
- app.prototype.$message = Message;
28
- },
29
23
  };
30
24
  ["info", "success", "warning", "error"].forEach((type) => {
31
25
  Message[type] = (content, duration, onClose) => {
@@ -6,7 +6,7 @@ import {
6
6
  CloseCircle,
7
7
  CheckmarkCircle,
8
8
  AlertCircle,
9
- } from "kui-icons";
9
+ } from "kui-icons/dist/icons";
10
10
  import { defineComponent } from "vue";
11
11
  export default defineComponent({
12
12
  props: {
@@ -3,6 +3,7 @@ import Toast from "./toast";
3
3
  // import { /*createVNode, render,*/ inject } from "vue"; // for 3
4
4
  import { createVNode, render } from "../utils/vue"; //for 2
5
5
  import { recordMousePoint } from "../config/context";
6
+ import { withInstall } from "../utils/vue";
6
7
  let modalList = [];
7
8
 
8
9
  recordMousePoint();
@@ -23,7 +24,7 @@ let showModal = (props = {}, context = null) => {
23
24
  },
24
25
  },
25
26
  },
26
- context
27
+ context,
27
28
  );
28
29
  render(vm, container);
29
30
 
@@ -54,9 +55,5 @@ Modal.destroyAll = () => {
54
55
  toast.destroy();
55
56
  });
56
57
  };
57
- Modal.install = (app) => {
58
- // app.provide("modal", Modal);
59
- // app.config.globalProperties.$modal = Modal;
60
- app.prototype.$modal = Modal;
61
- };
62
- export default Modal;
58
+
59
+ export default withInstall(Modal);
@@ -1,6 +1,6 @@
1
1
  import { Button } from "../button";
2
2
  import transfer from "../directives/transfer";
3
- import { Close } from "kui-icons";
3
+ import { Close } from "kui-icons/dist/icons";
4
4
  import { getMousePoint } from "../config/context";
5
5
  import {
6
6
  defineComponent,
@@ -13,7 +13,6 @@ import {
13
13
  inject,
14
14
  } from "vue";
15
15
  import zhCN from "../locale/zh-CN";
16
- import { withInstall } from "../utils/vue";
17
16
  const Modal = defineComponent({
18
17
  name: "Modal",
19
18
  directives: { transfer },
@@ -282,4 +281,4 @@ const Modal = defineComponent({
282
281
  };
283
282
  },
284
283
  });
285
- export default withInstall(Modal);
284
+ export default Modal;
@@ -8,7 +8,7 @@ import {
8
8
  CheckmarkCircle,
9
9
  AlertCircle,
10
10
  HelpCircle,
11
- } from "kui-icons";
11
+ } from "kui-icons/dist/icons";
12
12
  import zhCN from "../locale/zh-CN";
13
13
  export default defineComponent({
14
14
  name: "Toast",
@@ -23,12 +23,6 @@ let Notice = {
23
23
  noticeInstance = null;
24
24
  }
25
25
  },
26
- install(app) {
27
- // app.provide("notice", Notice);
28
- // 可选:同时挂到 globalProperties 兼容 this.$notice
29
- // app.config.globalProperties.$notice = Notice;
30
- app.prototype.$notice = Notice;
31
- },
32
26
  };
33
27
 
34
28
  ["info", "success", "warning", "error"].forEach((type) => {
@@ -6,7 +6,7 @@ import {
6
6
  ChevronDoubleBack,
7
7
  Ellipsis,
8
8
  ChevronDoubleForward,
9
- } from "kui-icons";
9
+ } from "kui-icons/dist/icons";
10
10
  import { ref, defineComponent, watch, inject, nextTick, computed } from "vue";
11
11
  import { withInstall } from "../utils/vue";
12
12
 
@@ -10,7 +10,7 @@ import {
10
10
  } from "vue";
11
11
  import transfer from "../directives/transfer";
12
12
  import { getChildren } from "../utils/vnode";
13
- import { HelpCircle } from "kui-icons";
13
+ import { HelpCircle } from "kui-icons/dist/icons";
14
14
  import Icon from "../icon";
15
15
  import { Button } from "../button";
16
16
  import { setPlacement } from "../utils/placement";
@@ -1,5 +1,5 @@
1
1
  import Icon from "../icon";
2
- import { CheckmarkCircle, CloseCircle, Close, Checkmark } from "kui-icons";
2
+ import { CheckmarkCircle, CloseCircle, Close, Checkmark } from "kui-icons/dist/icons";
3
3
  import { defineComponent, watch, ref } from "vue";
4
4
  import { withInstall } from "../utils/vue";
5
5
  const Progress = defineComponent({
@@ -95,6 +95,7 @@
95
95
  background-color: var(--kui-color-bg-component);
96
96
  outline: 2px solid transparent;
97
97
  outline-offset: 1px;
98
+ flex-shrink: 0;
98
99
  &:after {
99
100
  box-sizing: content-box;
100
101
  width: 0;
@@ -132,6 +133,8 @@
132
133
  .k-radio-label {
133
134
  font-size: 14px;
134
135
  margin-left: 8px;
136
+ overflow: hidden;
137
+ text-overflow: ellipsis;
135
138
  }
136
139
  }
137
140
  .k-radio-light {
@@ -1,6 +1,6 @@
1
1
  import Icon from "../icon";
2
2
  import Tooltip from "../tooltip";
3
- import { Star } from "kui-icons";
3
+ import { Star } from "kui-icons/dist/icons";
4
4
  import { defineComponent, ref } from "vue";
5
5
  export default defineComponent({
6
6
  name: "Star",
@@ -1,5 +1,5 @@
1
1
  import Icon from "../icon";
2
- import { Checkmark } from "kui-icons";
2
+ import { Checkmark } from "kui-icons/dist/icons";
3
3
  import {
4
4
  defineComponent,
5
5
  computed,
@@ -7,7 +7,7 @@ import zhCN from "../locale/zh-CN";
7
7
  import { isEmpty } from "../utils/number";
8
8
  import { getChildren } from "../utils/vnode";
9
9
  import { setPlacement } from "../utils/placement";
10
- import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons";
10
+ import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons/dist/icons";
11
11
  import { withInstall } from "../utils/vue";
12
12
  import {
13
13
  ref,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent } from "vue";
2
2
  import { withInstall } from "../utils/vue.js";
3
- import CountUp from "./countup.jsx";
4
- import RollUp from "./rollup.jsx";
3
+ import CountUp from "./statup/countup.jsx";
4
+ import RollUp from "./statup/rollup.jsx";
5
5
  const StatNumber = defineComponent({
6
6
  name: "StatNumber",
7
7
  props: {
@@ -1,6 +1,6 @@
1
1
  import { CountUp } from "./countup.js";
2
2
  import { ref, watch, onMounted, defineComponent, onUnmounted } from "vue";
3
- import { withInstall } from "../utils/vue.js";
3
+ import { withInstall } from "../../utils/vue.js";
4
4
  const CountUpNumber = defineComponent({
5
5
  name: "CountUpNumber",
6
6
  props: {
@@ -1,5 +1,5 @@
1
1
  import Icon from "../icon";
2
- import { Loading } from "kui-icons";
2
+ import { Loading } from "kui-icons/dist/icons";
3
3
  import { defineComponent, ref, watch } from "vue";
4
4
  import { withInstall } from "../utils/vue";
5
5
  const Switch = defineComponent({
@@ -9,7 +9,7 @@ import {
9
9
  h,
10
10
  } from "vue";
11
11
  import { Checkbox } from "../checkbox";
12
- import { CaretUp, CaretDown } from "kui-icons";
12
+ import { CaretUp, CaretDown } from "kui-icons/dist/icons";
13
13
  import Empty from "../empty";
14
14
  import Spin from "../spin";
15
15
  import { withInstall } from "../utils/vue";
@@ -1,6 +1,6 @@
1
1
  import Icon from "../icon";
2
2
  import { getChildren } from "../utils/vnode";
3
- import { Close, ChevronBack, ChevronForward } from "kui-icons";
3
+ import { Close, ChevronBack, ChevronForward } from "kui-icons/dist/icons";
4
4
  import {
5
5
  defineComponent,
6
6
  onMounted,
@@ -1,5 +1,5 @@
1
1
  import Icon from "../icon";
2
- import { Close } from "kui-icons";
2
+ import { Close } from "kui-icons/dist/icons";
3
3
  import { defineComponent, /*Transition,*/ ref } from "vue";
4
4
  import { isColor } from "../utils/color";
5
5
  import { withInstall } from "../utils/vue";
@@ -7,7 +7,7 @@ import {
7
7
  RemoveCircleOutline,
8
8
  AddCircleOutline,
9
9
  ChevronForward,
10
- } from "kui-icons";
10
+ } from "kui-icons/dist/icons";
11
11
  import { buildTree, updateParentIndeterminate } from "./utils";
12
12
  const Tree = defineComponent({
13
13
  name: "Tree",
@@ -5,7 +5,7 @@ import resize from "../directives/resize";
5
5
  import zhCN from "../locale/zh-CN";
6
6
  import { isEmpty } from "../utils/number";
7
7
  import { setPlacement } from "../utils/placement";
8
- import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons";
8
+ import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons/dist/icons";
9
9
  import { withInstall } from "../utils/vue";
10
10
  import Tree from "../tree";
11
11
  import { buildTree } from "../tree/utils";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent } from "vue";
2
- import { DocumentTextOutline, Close, AlertCircle } from "kui-icons";
2
+ import { DocumentTextOutline, Close, AlertCircle } from "kui-icons/dist/icons";
3
3
  import Icon from "../icon";
4
4
  import { Button } from "../button";
5
5
  import Tooltip from "../tooltip";
@@ -1,6 +1,6 @@
1
1
  import { ref, defineComponent } from "vue";
2
2
  import Icon from "../icon";
3
- import { Add } from "kui-icons";
3
+ import { Add } from "kui-icons/dist/icons";
4
4
 
5
5
  export default defineComponent({
6
6
  name: "Selector",
@@ -15,16 +15,6 @@ const toggle = () => {
15
15
 
16
16
  const Theme = {
17
17
  name: "Theme",
18
- install(app) {
19
- app.prototype.$theme = Theme;
20
- // for 3
21
- // app.provide("theme", Theme);
22
- // app.config.globalProperties.$theme = Theme;
23
- },
24
- useTheme() {
25
- // return inject("theme", null); //for 3
26
- return Theme
27
- },
28
18
  setThemeMode(event, callback) {
29
19
  const x = event.clientX;
30
20
  const y = event.clientY;
@@ -1,5 +1,13 @@
1
+ const globalComponents = ["message", "modal", "notice", "loading", "theme"];
2
+ export { globalComponents };
3
+
1
4
  import { getAppContext } from "../config/context";
2
5
 
6
+ export const installGlobal = (app, component) => {
7
+ if (globalComponents.includes(component.name)) {
8
+ app.prototype[`$${component.name}`] = component;
9
+ }
10
+ };
3
11
  export const withInstall = (component) => {
4
12
  component.install = function (app) {
5
13
  app.component(component.name, component);