ninemoon-ui 0.1.1 → 0.1.3

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.
@@ -32,9 +32,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
32
  const Pop = defineAsyncComponent(() => import("../popover/popover.js"));
33
33
  const props = __props;
34
34
  const heightClass = computed(() => ({
35
- "h-8": props.size === "large",
36
- "h-7": props.size === "default",
37
- "h-6": props.size === "small"
35
+ "h-10": props.size === "large",
36
+ "h-9": props.size === "default",
37
+ "h-8": props.size === "small"
38
38
  }));
39
39
  const emit = __emit;
40
40
  const dateChangeHandle = (e) => {
@@ -45,9 +45,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  const emit = __emit;
46
46
  const props = __props;
47
47
  const heightClass = computed(() => ({
48
- "h-8": props.size === "large",
49
- "h-7": props.size === "default",
50
- "h-6": props.size === "small"
48
+ "h-10": props.size === "large",
49
+ "h-9": props.size === "default",
50
+ "h-8": props.size === "small"
51
51
  }));
52
52
  const deleteDateHandle = () => {
53
53
  emit("update:modelValue", [null, null]);
@@ -116,7 +116,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
116
116
  };
117
117
  }
118
118
  });
119
- const dialog_vue_vue_type_style_index_0_lang = "";
120
119
  export {
121
120
  _sfc_main as default
122
121
  };
@@ -68,8 +68,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
68
68
  }
69
69
  if (validator) {
70
70
  const result = await FunctionToPromise(validator, aimdata);
71
- if (result !== null) {
72
- setErrHandle();
71
+ if (result !== void 0) {
72
+ setErrHandle(result);
73
73
  break;
74
74
  }
75
75
  }
@@ -516,10 +516,12 @@ const LibLoad = {
516
516
  handleLoadingState(el, binding, binding.value);
517
517
  }
518
518
  },
519
- beforeUnmount(el) {
519
+ beforeUnmount(el, binding) {
520
520
  var _a;
521
521
  if (el.__loading_instance__) {
522
- cleanupLoadingState(el, document.body);
522
+ const modifiers = binding.modifiers;
523
+ const target = modifiers.fullScreen ? document.body : el;
524
+ cleanupLoadingState(el, target);
523
525
  (_a = el.__loading_instance__) == null ? void 0 : _a.$el.remove();
524
526
  delete el.__loading_instance__;
525
527
  }
@@ -785,7 +787,7 @@ const useResizeObserver = (callback) => {
785
787
  };
786
788
  const DEFAULT_DEBOUNCE_WAIT = 100;
787
789
  const DEFAULT_HOLD = 0;
788
- const createScrollDirective = (options) => {
790
+ const createLoadingDirective = (options) => {
789
791
  const config = {
790
792
  throttleTime: DEFAULT_DEBOUNCE_WAIT,
791
793
  threshold: DEFAULT_HOLD,
@@ -924,7 +926,7 @@ export {
924
926
  LibLoad as K,
925
927
  LibDialog as L,
926
928
  MessageClass as M,
927
- createScrollDirective as N,
929
+ createLoadingDirective as N,
928
930
  LibCarousel as O,
929
931
  LibCarouselItem as P,
930
932
  LibSwitch as Q,
@@ -17,9 +17,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  setup(__props, { emit: __emit }) {
18
18
  const props = __props;
19
19
  const heightClass = computed(() => ({
20
- "h-8": props.size === "large",
21
- "h-7": props.size === "default",
22
- "h-6": props.size === "small"
20
+ "h-10": props.size === "large",
21
+ "h-9": props.size === "default",
22
+ "h-8": props.size === "small"
23
23
  }));
24
24
  const inputValue = computed({
25
25
  get() {
@@ -42,9 +42,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  setup(__props, { emit: __emit }) {
43
43
  const props = __props;
44
44
  const sizeClass = computed(() => ({
45
- "h-8 w-8": props.size === "large",
46
- "h-7 w-7": props.size === "default",
47
- "h-6 w-6": props.size === "small"
45
+ "h-10 w-10": props.size === "large",
46
+ "h-9 w-9": props.size === "default",
47
+ "h-8 w-8": props.size === "small"
48
48
  }));
49
49
  const bounds = computed(() => ({
50
50
  min: props.min ?? -Infinity,
@@ -1,4 +1,4 @@
1
- import { defineComponent, h, normalizeClass, normalizeStyle, ref, computed, nextTick, openBlock, createElementBlock, withModifiers, renderSlot, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, unref, vShow } from "vue";
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
2
  import { d as debounce, u as usePotion, c as createEscapeDirective } from "../index/index.js";
3
3
  const DEFAULT_DEBOUNCE_WAIT$1 = 100;
4
4
  const createBgClickDirective = (options) => {
@@ -51,7 +51,7 @@ const createBgClickDirective = (options) => {
51
51
  }
52
52
  };
53
53
  };
54
- const DEFAULT_DEBOUNCE_WAIT = 100;
54
+ const DEFAULT_DEBOUNCE_WAIT = 50;
55
55
  const createScrollDirective = (options) => {
56
56
  const config = {
57
57
  debounceWait: DEFAULT_DEBOUNCE_WAIT,
@@ -71,12 +71,14 @@ const createScrollDirective = (options) => {
71
71
  move: moveDom
72
72
  };
73
73
  window.addEventListener("resize", el._watchwindow_handlers_.move);
74
- window.addEventListener("scroll", el._watchwindow_handlers_.move);
74
+ const scrollContainer = typeof config.scrollContainerId === "string" ? document.querySelector(config.scrollContainerId) || window : window;
75
+ scrollContainer.addEventListener("scroll", el._watchwindow_handlers_.move);
75
76
  };
76
77
  const unbindEvents = (el) => {
77
78
  if (el._watchwindow_handlers_) {
78
79
  window.removeEventListener("resize", el._watchwindow_handlers_.move);
79
- window.removeEventListener("scroll", el._watchwindow_handlers_.move);
80
+ const scrollContainer = typeof config.scrollContainerId === "string" ? document.querySelector(config.scrollContainerId) || window : window;
81
+ scrollContainer.removeEventListener("scroll", el._watchwindow_handlers_.move);
80
82
  delete el._watchwindow_handlers_;
81
83
  }
82
84
  };
@@ -122,7 +124,6 @@ const arrowComponent = defineComponent({
122
124
  arrowLeft: { type: Number, required: true },
123
125
  arrowTop: { type: Number, required: true },
124
126
  placement: { type: String, required: true },
125
- arrowshow: { type: Boolean, required: true },
126
127
  exChange: { type: Boolean, required: true },
127
128
  beforebgcolor: { type: String }
128
129
  },
@@ -156,8 +157,6 @@ const arrowComponent = defineComponent({
156
157
  }
157
158
  return classes;
158
159
  };
159
- if (!props.arrowshow)
160
- return;
161
160
  return () => h("span", {
162
161
  class: normalizeClass(getArrowClasses()),
163
162
  style: normalizeStyle(getArrowStyles())
@@ -175,8 +174,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
175
174
  beforeHidden: {},
176
175
  modelValue: { type: Boolean },
177
176
  beforebgcolor: {},
178
- arrowshow: { type: Boolean, default: true },
179
- isselectMode: { type: Boolean, default: false }
177
+ arrowshow: { type: Boolean, default: true }
180
178
  },
181
179
  emits: ["update:modelValue"],
182
180
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -236,12 +234,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
236
234
  arrowLeft.value = position.arrowLeft;
237
235
  exChange.value = position.exChange;
238
236
  };
237
+ const { proxy } = getCurrentInstance();
239
238
  const vScroll = createScrollDirective({
240
239
  onMove: () => {
241
240
  if (shouldShow.value == false)
242
241
  return;
243
242
  setPosition();
244
- }
243
+ },
244
+ // @ts-ignore
245
+ scrollContainerId: proxy.gloablScrollBar ? proxy.gloablScrollBar : void 0
245
246
  });
246
247
  const vClickoutside = createBgClickDirective({
247
248
  onCheckOut: (event, el) => {
@@ -318,14 +319,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
318
319
  style: normalizeStyle({ width: widthNum.value, top: `${Top.value}px`, left: `${Left.value}px` })
319
320
  }, [
320
321
  renderSlot(_ctx.$slots, "default"),
321
- createVNode(unref(arrowComponent), {
322
+ _ctx.arrowshow ? (openBlock(), createBlock(unref(arrowComponent), {
323
+ key: 0,
322
324
  arrowLeft: arrowLeft.value,
323
325
  arrowTop: arrowTop.value,
324
326
  exChange: exChange.value,
325
327
  beforebgcolor: _ctx.beforebgcolor,
326
- placement: _ctx.placement,
327
- arrowshow: _ctx.arrowshow
328
- }, null, 8, ["arrowLeft", "arrowTop", "exChange", "beforebgcolor", "placement", "arrowshow"])
328
+ placement: _ctx.placement
329
+ }, null, 8, ["arrowLeft", "arrowTop", "exChange", "beforebgcolor", "placement"])) : createCommentVNode("", true)
329
330
  ], 6)), [
330
331
  [vShow, shouldShow.value],
331
332
  [unref(vClickoutside)],
@@ -130,12 +130,14 @@ const _hoisted_1 = {
130
130
  key: 0,
131
131
  class: "group/scroll relative h-full overflow-hidden"
132
132
  };
133
+ const _hoisted_2 = ["id"];
133
134
  const _sfc_main = /* @__PURE__ */ defineComponent({
134
135
  __name: "scrollBar",
135
136
  props: {
136
137
  native: { type: Boolean, default: false },
137
138
  height: {},
138
- maxHeight: {}
139
+ maxHeight: {},
140
+ id: {}
139
141
  },
140
142
  setup(__props, { expose: __expose }) {
141
143
  const props = __props;
@@ -216,10 +218,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
216
218
  ref_key: "wrap",
217
219
  ref: wrap,
218
220
  onScrollPassive: handleScroll,
219
- class: "overscroll-contain overflow-auto h-full scrollbar-none uiscroll",
221
+ class: "overscroll-contain overflow-auto h-full scrollbar-none",
220
222
  style: normalizeStyle(warpStyle.value),
221
223
  onTouchstart: _cache[0] || (_cache[0] = ($event) => isTouching.value = true),
222
- onTouchend: _cache[1] || (_cache[1] = ($event) => isTouching.value = false)
224
+ onTouchend: _cache[1] || (_cache[1] = ($event) => isTouching.value = false),
225
+ id: _ctx.id
223
226
  }, [
224
227
  createElementVNode("div", {
225
228
  ref_key: "contentBox",
@@ -227,7 +230,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
227
230
  }, [
228
231
  renderSlot(_ctx.$slots, "default")
229
232
  ], 512)
230
- ], 36),
233
+ ], 44, _hoisted_2),
231
234
  hasHor.value ? (openBlock(), createBlock(_sfc_main$1, {
232
235
  key: 0,
233
236
  move: moveX.value,
@@ -72,12 +72,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
72
  emits: ["update:modelValue", "change"],
73
73
  setup(__props, { emit: __emit }) {
74
74
  const Pop = defineAsyncComponent(() => import("../popover/popover.js"));
75
- const LibScrollBar = defineAsyncComponent(() => import("../scrollBar/scrollBar.js"));
75
+ const LibScrollBar = defineAsyncComponent(
76
+ () => import("../scrollBar/scrollBar.js")
77
+ );
76
78
  const props = __props;
77
79
  const heightClass = computed(() => ({
78
- "h-8": props.size === "large",
79
- "h-7": props.size === "default",
80
- "h-6": props.size === "small"
80
+ "h-10": props.size === "large",
81
+ "h-9": props.size === "default",
82
+ "h-8": props.size === "small"
81
83
  }));
82
84
  const ParentGetChangeHandle = inject("changHandle", (_params) => null);
83
85
  const inputbox = ref();
@@ -14,7 +14,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  },
15
15
  emits: ["update:active"],
16
16
  setup(__props, { emit: __emit }) {
17
- const LibScrollBar = defineAsyncComponent(() => import("../scrollBar/scrollBar.js"));
17
+ const LibScrollBar = defineAsyncComponent(
18
+ () => import("../scrollBar/scrollBar.js")
19
+ );
18
20
  const props = __props;
19
21
  const showBaseline = computed(() => props.type === "line");
20
22
  const emit = __emit;
@@ -140,12 +142,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
142
  }
141
143
  });
142
144
  });
143
- if (showBaseline.value) {
145
+ if (observerRef.value) {
144
146
  observer.observe(observerRef.value);
145
147
  }
146
148
  });
147
149
  onUnmounted(() => {
148
- if (showBaseline.value) {
150
+ if (observerRef.value) {
149
151
  observer.unobserve(observerRef.value);
150
152
  }
151
153
  });
package/dist/tabs.css CHANGED
@@ -1,7 +1,8 @@
1
1
  .ETab {
2
2
  display: flex;
3
- width: -moz-max-content;
4
- width: max-content;
3
+ width: 100%;
4
+ min-width: -moz-max-content;
5
+ min-width: max-content;
5
6
  flex-wrap: nowrap;
6
7
  --tw-text-opacity: 1;
7
8
  color: rgb(102 102 102 / var(--tw-text-opacity, 1))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninemoon-ui",
3
3
  "private": false,
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "author": "zhuboy",
6
6
  "keywords": [
7
7
  "vue3",
@@ -16,7 +16,6 @@
16
16
  "vue": "^3.3.4"
17
17
  },
18
18
  "main": "dist/index.es.js",
19
- "module": "dist/index.umd.js",
20
19
  "devDependencies": {
21
20
  "@vitejs/plugin-vue": "^4.2.3",
22
21
  "autoprefixer": "^10.4.14",
package/dist/dialog.css DELETED
@@ -1,9 +0,0 @@
1
-
2
- .fade-enter-active,
3
- .fade-leave-active {
4
- transition: opacity 0.2s ease;
5
- }
6
- .fade-enter-from,
7
- .fade-leave-to {
8
- opacity: 0;
9
- }