ninemoon-ui 0.1.8 → 0.1.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 (39) hide show
  1. package/dist/components/date/datepicker.vue.d.ts +3 -3
  2. package/dist/components/date/datepickerRange.vue.d.ts +2 -2
  3. package/dist/components/form/form.vue.d.ts +5 -0
  4. package/dist/components/form/formlabel.vue.d.ts +10 -0
  5. package/dist/components/input/input.vue.d.ts +10 -3
  6. package/dist/components/numberInput/numberinput.vue.d.ts +3 -3
  7. package/dist/components/select/select.vue.d.ts +3 -3
  8. package/dist/components/table/table.vue.d.ts +8 -1
  9. package/dist/components/table/tableItem.vue.d.ts +2 -0
  10. package/dist/{tabs.css → css/style.css} +81 -0
  11. package/dist/directives/index.d.ts +1 -2
  12. package/dist/directives/looplead.d.ts +19 -0
  13. package/dist/directives/scrolllead.d.ts +3 -11
  14. package/dist/directives/watchwindow.d.ts +1 -1
  15. package/dist/hooks/teleportcontainer.d.ts +5 -0
  16. package/dist/index.d.ts +128 -30
  17. package/dist/index.es.js +26 -27
  18. package/dist/js/badge/badge.js +3 -3
  19. package/dist/js/carousel/carousel.js +1 -1
  20. package/dist/js/check/checkbox.js +4 -4
  21. package/dist/js/date/datepicker.js +4 -3
  22. package/dist/js/date/datepickerRange.js +22 -17
  23. package/dist/js/dialog/dialog.js +36 -37
  24. package/dist/js/form/form.js +3 -1
  25. package/dist/js/form/formlabel.js +39 -8
  26. package/dist/js/image/image.js +2 -2
  27. package/dist/js/index/index.js +131 -113
  28. package/dist/js/input/input.js +26 -6
  29. package/dist/js/numberInput/numberinput.js +2 -1
  30. package/dist/js/pagination/pagination.js +2 -1
  31. package/dist/js/popover/popover.js +10 -16
  32. package/dist/js/radio/radiobox.js +4 -4
  33. package/dist/js/select/select.js +4 -3
  34. package/dist/js/table/table.js +243 -188
  35. package/dist/js/table/tableItem.js +2 -1
  36. package/dist/js/tabs/tabs.js +0 -1
  37. package/package.json +2 -1
  38. package/dist/directives/whitespaceclick.d.ts +0 -12
  39. package/dist/index.css +0 -80
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, onUnmounted, createBlock, Teleport, createVNode, TransitionGroup, withCtx, Fragment, renderList, normalizeClass, resolveDynamicComponent, createTextVNode, toDisplayString, createCommentVNode, createApp, isVNode, watch, computed, Transition, withDirectives, withModifiers, unref, reactive, defineAsyncComponent } from "vue";
7
+ import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, onUnmounted, createBlock, Teleport, unref, createVNode, TransitionGroup, withCtx, Fragment, renderList, normalizeClass, resolveDynamicComponent, createTextVNode, toDisplayString, createCommentVNode, createApp, isVNode, watch, computed, Transition, withDirectives, withModifiers, reactive, defineAsyncComponent } from "vue";
8
8
  const _export_sfc = (sfc, props) => {
9
9
  const target = sfc.__vccOpts || sfc;
10
10
  for (const [key, val] of props) {
@@ -82,6 +82,17 @@ function _sfc_render$1(_ctx, _cache) {
82
82
  ]));
83
83
  }
84
84
  const infoTip = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$1]]);
85
+ let cachedContainer;
86
+ const selector = `popper-container`;
87
+ const usePopperContainer = () => {
88
+ if (!cachedContainer && !document.querySelector(`#${selector}`)) {
89
+ const container = document.createElement("div");
90
+ container.id = selector;
91
+ cachedContainer = container;
92
+ document.body.appendChild(container);
93
+ }
94
+ return { container: cachedContainer };
95
+ };
85
96
  const _hoisted_1$3 = { class: "pointer-events-none fixed right-0 left-0 bottom-0 top-4 z-2000 space-y-5" };
86
97
  const _hoisted_2$1 = { class: "pointer-events-auto inline-flex items-center space-x-3 bg-white p-3 text-sm text-word3 drop-shadow" };
87
98
  const _hoisted_3$1 = { class: "flex-1" };
@@ -146,7 +157,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
146
157
  dealConfig
147
158
  });
148
159
  return (_ctx, _cache) => {
149
- return openBlock(), createBlock(Teleport, { to: "body" }, [
160
+ return openBlock(), createBlock(Teleport, {
161
+ to: `#${unref(selector)}`
162
+ }, [
150
163
  createElementVNode("div", _hoisted_1$3, [
151
164
  createVNode(TransitionGroup, { name: "message" }, {
152
165
  default: withCtx(() => [
@@ -190,7 +203,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
190
203
  _: 1
191
204
  })
192
205
  ])
193
- ]);
206
+ ], 8, ["to"]);
194
207
  };
195
208
  }
196
209
  });
@@ -277,6 +290,11 @@ const createEscapeDirective = (options) => {
277
290
  ...options
278
291
  };
279
292
  const bindEvents = (el, binding) => {
293
+ if (el.__Escape_Handler__) {
294
+ const index2 = handlerStack.indexOf(el.__Escape_Handler__);
295
+ if (index2 !== -1)
296
+ handlerStack.splice(index2, 1);
297
+ }
280
298
  const thisHandler = (e) => {
281
299
  e.preventDefault();
282
300
  config.onEscape(e);
@@ -302,20 +320,17 @@ const createEscapeDirective = (options) => {
302
320
  };
303
321
  return {
304
322
  mounted(el, binding) {
305
- bindEvents(el);
323
+ if (binding.value)
324
+ bindEvents(el);
306
325
  },
307
326
  updated(el, binding) {
308
- if (el.__Escape_Handler__) {
309
- const index2 = handlerStack.indexOf(el.__Escape_Handler__);
310
- if (index2 !== -1)
311
- handlerStack.splice(index2, 1);
327
+ if (binding.value !== binding.oldValue) {
328
+ if (binding.value) {
329
+ bindEvents(el);
330
+ } else {
331
+ unbindEvents(el);
332
+ }
312
333
  }
313
- const newHandler = (e) => {
314
- e.preventDefault();
315
- config.onEscape(e);
316
- };
317
- handlerStack.push(newHandler);
318
- el.__Escape_Handler__ = newHandler;
319
334
  },
320
335
  beforeUnmount(el) {
321
336
  unbindEvents(el);
@@ -403,7 +418,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
403
418
  ])
404
419
  ])
405
420
  ], 2)), [
406
- [unref(vEsc)]
421
+ [unref(vEsc), visible.value]
407
422
  ]) : createCommentVNode("", true)
408
423
  ]),
409
424
  _: 1
@@ -624,11 +639,17 @@ const createArrowKeysDirective = (options) => {
624
639
  };
625
640
  return {
626
641
  mounted(el, binding) {
627
- bindEvents(el);
642
+ if (binding.value)
643
+ bindEvents(el);
628
644
  },
629
645
  updated(el, binding) {
630
- unbindEvents(el);
631
- bindEvents(el);
646
+ if (binding.value !== binding.oldValue) {
647
+ if (binding.value) {
648
+ bindEvents(el);
649
+ } else {
650
+ unbindEvents(el);
651
+ }
652
+ }
632
653
  },
633
654
  unmounted(el) {
634
655
  unbindEvents(el);
@@ -905,14 +926,24 @@ const createDraggableDirective = (options) => {
905
926
  };
906
927
  return {
907
928
  mounted(el, binding) {
908
- bindEvents(el);
929
+ if (binding.value)
930
+ bindEvents(el);
931
+ },
932
+ updated(el, binding) {
933
+ if (binding.value !== binding.oldValue) {
934
+ if (binding.value) {
935
+ bindEvents(el);
936
+ } else {
937
+ unbindEvents(el);
938
+ }
939
+ }
909
940
  },
910
941
  beforeUnmount(el) {
911
942
  unbindEvents(el);
912
943
  }
913
944
  };
914
945
  };
915
- const DEFAULT_DEBOUNCE_WAIT$2 = 100;
946
+ const DEFAULT_DEBOUNCE_WAIT$2 = 50;
916
947
  const createBgClickDirective = (options) => {
917
948
  const config = {
918
949
  debounceWait: DEFAULT_DEBOUNCE_WAIT$2,
@@ -932,24 +963,25 @@ const createBgClickDirective = (options) => {
932
963
  click: clickDom
933
964
  };
934
965
  if (config.moveModel) {
935
- document.addEventListener("mousemove", clickDom);
966
+ window.addEventListener("mousemove", clickDom, true);
936
967
  } else {
937
- document.addEventListener("click", clickDom);
968
+ window.addEventListener("click", clickDom, true);
938
969
  }
939
970
  };
940
971
  const unbindEvents = (el) => {
941
972
  if (el._checkout_handlers_) {
942
973
  if (config.moveModel) {
943
- document.removeEventListener("mousemove", el._checkout_handlers_.click);
974
+ window.removeEventListener("mousemove", el._checkout_handlers_.click, true);
944
975
  } else {
945
- document.removeEventListener("click", el._checkout_handlers_.click);
976
+ window.removeEventListener("click", el._checkout_handlers_.click, true);
946
977
  }
947
978
  delete el._checkout_handlers_;
948
979
  }
949
980
  };
950
981
  return {
951
982
  mounted(el, binding) {
952
- bindEvents(el);
983
+ if (binding.value)
984
+ bindEvents(el);
953
985
  },
954
986
  beforeUnmount(el) {
955
987
  unbindEvents(el);
@@ -957,73 +989,73 @@ const createBgClickDirective = (options) => {
957
989
  // 添加 updated 钩子处理配置变化
958
990
  updated(el, binding) {
959
991
  if (binding.value !== binding.oldValue) {
960
- unbindEvents(el);
961
- bindEvents(el);
992
+ if (binding.value) {
993
+ bindEvents(el);
994
+ } else {
995
+ unbindEvents(el);
996
+ }
962
997
  }
963
998
  }
964
999
  };
965
1000
  };
966
1001
  const DEFAULT_DEBOUNCE_WAIT$1 = 100;
967
- const DEFAULT_HOLD = 0;
1002
+ const DEFAULT_HOLD = 300;
968
1003
  const createLoadingDirective = (options) => {
969
1004
  const config = {
970
- throttleTime: DEFAULT_DEBOUNCE_WAIT$1,
1005
+ debounceTime: DEFAULT_DEBOUNCE_WAIT$1,
971
1006
  threshold: DEFAULT_HOLD,
972
1007
  edge: "bottom",
973
1008
  onWheel: () => {
974
1009
  },
975
1010
  ...options
976
1011
  };
977
- const checkEdgeProximity = (el, edge) => {
978
- const { scrollTop, scrollHeight, clientHeight } = el;
1012
+ const checkEdges = (el, edge) => {
1013
+ const rect = el.getBoundingClientRect();
1014
+ const windowHeight = window.innerHeight;
1015
+ console.log(rect.bottom, rect.top, windowHeight);
979
1016
  const threshold = config.threshold;
980
- const epsilon = 0.1;
981
- if (scrollHeight <= clientHeight) {
982
- return edge === "top" ? scrollTop === 0 : true;
983
- }
984
- const maxScroll = scrollHeight - clientHeight;
985
1017
  switch (edge) {
986
1018
  case "top":
987
- return scrollTop <= threshold + epsilon;
1019
+ return rect.top >= -threshold && rect.top <= threshold;
988
1020
  case "bottom": {
989
- const remaining = maxScroll - scrollTop;
990
- return remaining <= threshold + epsilon;
1021
+ const bottomDistance = windowHeight - rect.bottom;
1022
+ return bottomDistance >= 0 && bottomDistance <= threshold;
991
1023
  }
992
1024
  default:
993
1025
  return false;
994
1026
  }
995
1027
  };
996
1028
  const bindEvents = (el, binding) => {
997
- const isScrollable = el.scrollHeight > el.clientHeight;
998
- if (!isScrollable)
999
- return;
1000
1029
  if (el._scroll_handlers_)
1001
1030
  return;
1002
- const wheelDom = throttle(() => {
1003
- if (checkEdgeProximity(el, config.edge)) {
1031
+ const wheelDom = debounce(() => {
1032
+ if (checkEdges(el, config.edge)) {
1004
1033
  config.onWheel();
1005
1034
  }
1006
- }, config.throttleTime);
1035
+ }, config.debounceTime);
1007
1036
  el._scroll_handlers_ = {
1008
1037
  wheel: wheelDom
1009
1038
  };
1010
- el.addEventListener("wheel", el._scroll_handlers_.wheel);
1039
+ window.addEventListener("wheel", el._scroll_handlers_.wheel);
1011
1040
  };
1012
1041
  const unbindEvents = (el) => {
1013
1042
  if (el._scroll_handlers_) {
1014
- el.removeEventListener("wheel", el._scroll_handlers_.wheel);
1043
+ window.removeEventListener("wheel", el._scroll_handlers_.wheel);
1015
1044
  delete el._scroll_handlers_;
1016
1045
  }
1017
1046
  };
1018
1047
  return {
1019
1048
  mounted(el, binding) {
1020
- bindEvents(el);
1049
+ if (binding.value)
1050
+ bindEvents(el);
1021
1051
  },
1022
1052
  updated(el, binding) {
1023
- if (binding.value.ableLoading === false) {
1024
- unbindEvents(el);
1025
- } else {
1026
- bindEvents(el);
1053
+ if (binding.value !== binding.oldValue) {
1054
+ if (binding.value) {
1055
+ bindEvents(el);
1056
+ } else {
1057
+ unbindEvents(el);
1058
+ }
1027
1059
  }
1028
1060
  },
1029
1061
  beforeUnmount(el) {
@@ -1031,7 +1063,7 @@ const createLoadingDirective = (options) => {
1031
1063
  }
1032
1064
  };
1033
1065
  };
1034
- const DEFAULT_DEBOUNCE_WAIT = 50;
1066
+ const DEFAULT_DEBOUNCE_WAIT = 20;
1035
1067
  const createScrollDirective = (options) => {
1036
1068
  const config = {
1037
1069
  debounceWait: DEFAULT_DEBOUNCE_WAIT,
@@ -1064,7 +1096,9 @@ const createScrollDirective = (options) => {
1064
1096
  };
1065
1097
  return {
1066
1098
  mounted(el, binding) {
1067
- bindEvents(el);
1099
+ if (binding.value) {
1100
+ bindEvents(el);
1101
+ }
1068
1102
  },
1069
1103
  beforeUnmount(el) {
1070
1104
  unbindEvents(el);
@@ -1072,8 +1106,11 @@ const createScrollDirective = (options) => {
1072
1106
  // 添加 updated 钩子处理配置变化
1073
1107
  updated(el, binding) {
1074
1108
  if (binding.value !== binding.oldValue) {
1075
- unbindEvents(el);
1076
- bindEvents(el);
1109
+ if (binding.value) {
1110
+ bindEvents(el);
1111
+ } else {
1112
+ unbindEvents(el);
1113
+ }
1077
1114
  }
1078
1115
  }
1079
1116
  };
@@ -1102,38 +1139,17 @@ const createWheelDirective = (options) => {
1102
1139
  };
1103
1140
  return {
1104
1141
  mounted(el, binding) {
1105
- bindEvents(el);
1106
- },
1107
- beforeUnmount(el) {
1108
- unbindEvents(el);
1109
- }
1110
- };
1111
- };
1112
- const createBgClickeDirective = (options) => {
1113
- const config = {
1114
- onBgPicture: () => {
1142
+ if (binding.value)
1143
+ bindEvents(el);
1115
1144
  },
1116
- ...options
1117
- };
1118
- const bindEvents = (el, binding) => {
1119
- const bgPictureHandler = (e) => {
1120
- e.preventDefault();
1121
- config.onBgPicture(e);
1122
- };
1123
- el._bgPicture_handlers_ = {
1124
- bgPicture: bgPictureHandler
1125
- };
1126
- el.addEventListener("click", bgPictureHandler);
1127
- };
1128
- const unbindEvents = (el) => {
1129
- if (el._bgPicture_handlers_) {
1130
- el.removeEventListener("click", el._bgPicture_handlers_.bgPicture);
1131
- delete el._bgPicture_handlers_;
1132
- }
1133
- };
1134
- return {
1135
- mounted(el, binding) {
1136
- bindEvents(el);
1145
+ updated(el, binding) {
1146
+ if (binding.value !== binding.oldValue) {
1147
+ if (binding.value) {
1148
+ bindEvents(el);
1149
+ } else {
1150
+ unbindEvents(el);
1151
+ }
1152
+ }
1137
1153
  },
1138
1154
  beforeUnmount(el) {
1139
1155
  unbindEvents(el);
@@ -1141,6 +1157,7 @@ const createBgClickeDirective = (options) => {
1141
1157
  };
1142
1158
  };
1143
1159
  const tailwind = "";
1160
+ const tabs = "";
1144
1161
  const LibDialog = defineAsyncComponent(() => import("../dialog/dialog.js"));
1145
1162
  const LibForm = defineAsyncComponent(() => import("../form/form.js"));
1146
1163
  const LibFormLabel = defineAsyncComponent(() => import("../form/formlabel.js"));
@@ -1168,6 +1185,7 @@ const LibScrollBar = defineAsyncComponent(() => import("../scrollBar/scrollBar.j
1168
1185
  const LibCarousel = defineAsyncComponent(() => import("../carousel/carousel.js"));
1169
1186
  const LibCarouselItem = defineAsyncComponent(() => import("../carousel/carouselitem.js"));
1170
1187
  const LibSwitch = defineAsyncComponent(() => import("../switch/switch.js"));
1188
+ usePopperContainer();
1171
1189
  const index = {
1172
1190
  install(app) {
1173
1191
  app.component("LibDialog", LibDialog);
@@ -1200,27 +1218,27 @@ const index = {
1200
1218
  }
1201
1219
  };
1202
1220
  export {
1203
- LibBadge as A,
1204
- LibPopover as B,
1221
+ LibPagination as A,
1222
+ LibBadge as B,
1205
1223
  CloseIcon as C,
1206
- LibNumberInput as D,
1207
- LibRadioBox as E,
1208
- LibRadioGroup as F,
1209
- LibCheckGroup as G,
1210
- LibCheckBox as H,
1211
- LibUpload as I,
1212
- LibTabs as J,
1213
- LibTabsPane as K,
1224
+ LibPopover as D,
1225
+ LibNumberInput as E,
1226
+ LibRadioBox as F,
1227
+ LibRadioGroup as G,
1228
+ LibCheckGroup as H,
1229
+ LibCheckBox as I,
1230
+ LibUpload as J,
1231
+ LibTabs as K,
1214
1232
  LibDialog as L,
1215
- LibScrollBar as M,
1216
- MessageClass as N,
1217
- AlertFunction as O,
1218
- LibLoad as P,
1219
- LibCarousel as Q,
1220
- LibCarouselItem as R,
1221
- LibSwitch as S,
1222
- createLoadingDirective as T,
1223
- createBgClickeDirective as U,
1233
+ LibTabsPane as M,
1234
+ LibScrollBar as N,
1235
+ MessageClass as O,
1236
+ AlertFunction as P,
1237
+ LibLoad as Q,
1238
+ LibCarousel as R,
1239
+ LibCarouselItem as S,
1240
+ LibSwitch as T,
1241
+ createLoadingDirective as U,
1224
1242
  _export_sfc as _,
1225
1243
  createArrowKeysDirective as a,
1226
1244
  createDraggableDirective as b,
@@ -1240,12 +1258,12 @@ export {
1240
1258
  LibInput as p,
1241
1259
  LibSelect as q,
1242
1260
  LibSelectOption as r,
1243
- LibTable as s,
1244
- LibTableItem as t,
1261
+ selector as s,
1262
+ LibTable as t,
1245
1263
  usePotion as u,
1246
- LibImage as v,
1247
- LibDatePicker as w,
1248
- LibDatePickerRange as x,
1249
- LibMenu as y,
1250
- LibPagination as z
1264
+ LibTableItem as v,
1265
+ LibImage as w,
1266
+ LibDatePicker as x,
1267
+ LibDatePickerRange as y,
1268
+ LibMenu as z
1251
1269
  };
@@ -1,8 +1,9 @@
1
- import { defineComponent, computed, inject, openBlock, createElementBlock, renderSlot, withDirectives, createElementVNode, normalizeClass, vModelDynamic, createVNode, vShow } from "vue";
1
+ import { defineComponent, computed, inject, openBlock, createElementBlock, renderSlot, withDirectives, normalizeClass, vModelDynamic, vModelText, createElementVNode, createVNode, vShow } from "vue";
2
2
  import { d as delIcon } from "../delete/delete.js";
3
3
  import "../index/index.js";
4
4
  const _hoisted_1 = { class: "relative flex h-full w-full items-center overflow-hidden rounded border border-solid" };
5
- const _hoisted_2 = ["placeholder", "type"];
5
+ const _hoisted_2 = ["placeholder", "type", "autocomplete"];
6
+ const _hoisted_3 = ["placeholder", "rows", "autocomplete"];
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  __name: "input",
8
9
  props: {
@@ -11,15 +12,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  type: { default: "text" },
12
13
  placeHolder: {},
13
14
  clearable: { type: Boolean, default: false },
14
- size: { default: "default" }
15
+ rows: {},
16
+ size: { default: "default" },
17
+ autocomplete: { default: "off" }
15
18
  },
16
19
  emits: ["update:modelValue", "blur", "input", "change"],
17
20
  setup(__props, { emit: __emit }) {
18
21
  const props = __props;
22
+ const isTextarea = computed(() => props.type === "textarea");
19
23
  const heightClass = computed(() => ({
20
24
  "h-10": props.size === "large",
21
25
  "h-9": props.size === "default",
22
- "h-8": props.size === "small"
26
+ "h-8": props.size === "small",
27
+ "h-7": props.size === "mini"
23
28
  }));
24
29
  const inputValue = computed({
25
30
  get() {
@@ -77,16 +82,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
82
  return (_ctx, _cache) => {
78
83
  return openBlock(), createElementBlock("div", _hoisted_1, [
79
84
  renderSlot(_ctx.$slots, "prepend"),
80
- withDirectives(createElementVNode("input", {
85
+ !isTextarea.value ? withDirectives((openBlock(), createElementBlock("input", {
86
+ key: 0,
81
87
  class: normalizeClass(["w-full px-2 outline-none appearance-none", heightClass.value]),
82
88
  placeholder: _ctx.placeHolder,
83
89
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
84
90
  type: _ctx.type,
91
+ autocomplete: _ctx.autocomplete,
85
92
  onBlur: handleBlur,
86
93
  onInput: handleInput,
87
94
  onChange: handleChange
88
- }, null, 42, _hoisted_2), [
95
+ }, null, 42, _hoisted_2)), [
89
96
  [vModelDynamic, inputValue.value]
97
+ ]) : withDirectives((openBlock(), createElementBlock("textarea", {
98
+ key: 1,
99
+ class: normalizeClass(["w-full h-full px-2 outline-none appearance-none", heightClass.value]),
100
+ placeholder: _ctx.placeHolder,
101
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputValue.value = $event),
102
+ autosize: "",
103
+ rows: _ctx.rows,
104
+ autocomplete: _ctx.autocomplete,
105
+ onBlur: handleBlur,
106
+ onInput: handleInput,
107
+ onChange: handleChange
108
+ }, null, 42, _hoisted_3)), [
109
+ [vModelText, inputValue.value]
90
110
  ]),
91
111
  withDirectives(createElementVNode("button", {
92
112
  type: "button",
@@ -44,7 +44,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  const sizeClass = computed(() => ({
45
45
  "h-10 w-10": props.size === "large",
46
46
  "h-9 w-9": props.size === "default",
47
- "h-8 w-8": props.size === "small"
47
+ "h-8 w-8": props.size === "small",
48
+ "h-7 w-7": props.size === "mini"
48
49
  }));
49
50
  const bounds = computed(() => ({
50
51
  min: props.min ?? -Infinity,
@@ -129,7 +129,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
129
129
  showSizeSelector.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
130
130
  createVNode(unref(LibSelect), {
131
131
  modelValue: size.value,
132
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => size.value = $event)
132
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => size.value = $event),
133
+ size: "mini"
133
134
  }, {
134
135
  default: withCtx(() => [
135
136
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sizeArr, (i) => {
@@ -1,5 +1,5 @@
1
- import { defineComponent, h, normalizeClass, normalizeStyle, ref, computed, nextTick, getCurrentInstance, openBlock, createElementBlock, withModifiers, renderSlot, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, unref, createCommentVNode, vShow } from "vue";
2
- import { u as usePotion, h as createScrollDirective, i as createBgClickDirective, c as createEscapeDirective } from "../index/index.js";
1
+ import { defineComponent, h, normalizeClass, normalizeStyle, ref, computed, nextTick, getCurrentInstance, openBlock, createElementBlock, withModifiers, renderSlot, createBlock, Teleport, unref, createVNode, Transition, withCtx, withDirectives, createCommentVNode, vShow } from "vue";
2
+ import { u as usePotion, h as createScrollDirective, i as createBgClickDirective, c as createEscapeDirective, s as selector } from "../index/index.js";
3
3
  const PLACEMENT_GROUPS = {
4
4
  top: ["topleft", "topmiddle", "topright"],
5
5
  bottom: ["bottomleft", "bottommiddle", "bottomright"],
@@ -139,17 +139,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
139
139
  const { proxy } = getCurrentInstance();
140
140
  const vScroll = createScrollDirective({
141
141
  onMove: () => {
142
- if (shouldShow.value == false)
143
- return;
144
142
  setPosition();
145
143
  },
146
- // @ts-ignore
147
- scrollContainerId: proxy.gloablScrollBar ? proxy.gloablScrollBar : void 0
144
+ scrollContainerId: (proxy == null ? void 0 : proxy.gloablScrollBar) ? proxy == null ? void 0 : proxy.gloablScrollBar : void 0
148
145
  });
149
146
  const vClickoutside = createBgClickDirective({
150
147
  onCheckOut: (event, el) => {
151
- if (shouldShow.value == false)
152
- return;
153
148
  if (el.contains(event.target)) {
154
149
  return;
155
150
  } else if (base.value.contains(event.target)) {
@@ -162,9 +157,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
162
157
  });
163
158
  const vEsc = createEscapeDirective({
164
159
  onEscape: () => {
165
- if (shouldShow.value == false)
166
- return;
167
- console.log("work");
168
160
  hideHandle();
169
161
  }
170
162
  });
@@ -211,7 +203,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
211
203
  onMouseenter: withModifiers(hovershowHandle, ["prevent"])
212
204
  }, [
213
205
  renderSlot(_ctx.$slots, "reference"),
214
- (openBlock(), createBlock(Teleport, { to: "body" }, [
206
+ (openBlock(), createBlock(Teleport, {
207
+ to: `#${unref(selector)}`
208
+ }, [
215
209
  createVNode(Transition, { name: "opecity" }, {
216
210
  default: withCtx(() => [
217
211
  withDirectives((openBlock(), createElementBlock("div", {
@@ -231,14 +225,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
231
225
  }, null, 8, ["arrowLeft", "arrowTop", "exChange", "beforebgcolor", "placement"])) : createCommentVNode("", true)
232
226
  ], 6)), [
233
227
  [vShow, shouldShow.value],
234
- [unref(vClickoutside)],
235
- [unref(vEsc)],
236
- [unref(vScroll)]
228
+ [unref(vClickoutside), shouldShow.value],
229
+ [unref(vEsc), shouldShow.value],
230
+ [unref(vScroll), shouldShow.value]
237
231
  ])
238
232
  ]),
239
233
  _: 3
240
234
  })
241
- ]))
235
+ ], 8, ["to"]))
242
236
  ], 544);
243
237
  };
244
238
  }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, computed, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelRadio, toDisplayString } from "vue";
2
2
  const _hoisted_1 = ["value", "disabled"];
3
- const _hoisted_2 = { class: "pl-2 peer-disabled:text-word9" };
3
+ const _hoisted_2 = { class: "peer-disabled:text-word9 px-2 py-1 bg-white text-word6 peer-checked:bg-[#1890ff] peer-checked:text-white" };
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "radiobox",
6
6
  props: {
@@ -28,18 +28,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  const emit = __emit;
29
29
  return (_ctx, _cache) => {
30
30
  return openBlock(), createElementBlock("label", {
31
- class: normalizeClass(["select-none inline-flex items-center", { "cursor-not-allowed": _ctx.disabled }])
31
+ class: normalizeClass(["select-none text-sm inline-flex items-center cursor-pointer first:rounded-l-md last:rounded-r-md border-t border-b border-l last:border-r overflow-hidden", { "cursor-not-allowed": _ctx.disabled }])
32
32
  }, [
33
33
  withDirectives(createElementVNode("input", {
34
34
  type: "radio",
35
35
  value: _ctx.value,
36
36
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checkedState.value = $event),
37
37
  disabled: _ctx.disabled,
38
- class: "peer disabled:cursor-not-allowed form-tick appearance-none h-4 w-4 rounded-full border border-gray-300 checked:border-transparent checked:bg-blue-600 focus:outline-none"
38
+ class: "peer hidden disabled:cursor-not-allowed form-tick appearance-none h-4 w-4 rounded-full border border-gray-300 checked:border-transparent checked:bg-blue-600 focus:outline-none"
39
39
  }, null, 8, _hoisted_1), [
40
40
  [vModelRadio, checkedState.value]
41
41
  ]),
42
- createElementVNode("span", _hoisted_2, toDisplayString(_ctx.label), 1)
42
+ createElementVNode("div", _hoisted_2, toDisplayString(_ctx.label), 1)
43
43
  ], 2);
44
44
  };
45
45
  }
@@ -21,7 +21,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  const heightClass = computed(() => ({
22
22
  "h-10": props.size === "large",
23
23
  "h-9": props.size === "default",
24
- "h-8": props.size === "small"
24
+ "h-8": props.size === "small",
25
+ "h-7": props.size === "mini"
25
26
  }));
26
27
  const ParentGetChangeHandle = inject("changHandle", (_params) => null);
27
28
  const inputbox = ref();
@@ -113,7 +114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
113
114
  type: "text",
114
115
  disabled: _ctx.disabled,
115
116
  readonly: !_ctx.filter,
116
- class: normalizeClass(["w-full cursor-pointer appearance-none px-2 text-sm outline-none disabled:cursor-default text-word3", heightClass.value]),
117
+ class: normalizeClass(["w-full cursor-pointer appearance-none pl-2 text-sm outline-none disabled:cursor-default text-word3", heightClass.value]),
117
118
  placeholder: _ctx.placeHolder
118
119
  }, null, 10, _hoisted_1),
119
120
  createVNode(ArrowIcon, {
@@ -134,7 +135,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
134
135
  _: 3
135
136
  }, 512)
136
137
  ])), [
137
- [unref(vArrowKeys)]
138
+ [unref(vArrowKeys), showOption.value]
138
139
  ])
139
140
  ]),
140
141
  _: 3