ninemoon-ui 0.1.2 → 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.
- package/dist/components/loadding/loadding.d.ts +1 -1
- package/dist/components/popover/poparrow.d.ts +2 -10
- package/dist/components/popover/popover.vue.d.ts +1 -6
- package/dist/components/scrollBar/scrollBar.vue.d.ts +2 -0
- package/dist/components/scrollloading/scrolllead.d.ts +1 -1
- package/dist/directives/watchwindow.d.ts +1 -0
- package/dist/index.css +24 -966
- package/dist/index.d.ts +18 -24
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +104 -1082
- package/dist/js/date/datepicker.js +3 -3
- package/dist/js/date/datepickerRange.js +3 -3
- package/dist/js/index/index.js +6 -4
- package/dist/js/input/input.js +3 -3
- package/dist/js/numberInput/numberinput.js +3 -3
- package/dist/js/popover/popover.js +15 -14
- package/dist/js/scrollBar/scrollBar.js +7 -4
- package/dist/js/select/select.js +6 -4
- package/dist/js/tabs/tabs.js +3 -1
- package/dist/tabs.css +3 -49
- package/package.json +1 -2
|
@@ -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-
|
|
36
|
-
"h-
|
|
37
|
-
"h-
|
|
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-
|
|
49
|
-
"h-
|
|
50
|
-
"h-
|
|
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]);
|
package/dist/js/index/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
929
|
+
createLoadingDirective as N,
|
|
928
930
|
LibCarousel as O,
|
|
929
931
|
LibCarouselItem as P,
|
|
930
932
|
LibSwitch as Q,
|
package/dist/js/input/input.js
CHANGED
|
@@ -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-
|
|
21
|
-
"h-
|
|
22
|
-
"h-
|
|
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-
|
|
46
|
-
"h-
|
|
47
|
-
"h-
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
],
|
|
233
|
+
], 44, _hoisted_2),
|
|
231
234
|
hasHor.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
232
235
|
key: 0,
|
|
233
236
|
move: moveX.value,
|
package/dist/js/select/select.js
CHANGED
|
@@ -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(
|
|
75
|
+
const LibScrollBar = defineAsyncComponent(
|
|
76
|
+
() => import("../scrollBar/scrollBar.js")
|
|
77
|
+
);
|
|
76
78
|
const props = __props;
|
|
77
79
|
const heightClass = computed(() => ({
|
|
78
|
-
"h-
|
|
79
|
-
"h-
|
|
80
|
-
"h-
|
|
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();
|
package/dist/js/tabs/tabs.js
CHANGED
|
@@ -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(
|
|
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;
|
package/dist/tabs.css
CHANGED
|
@@ -1,54 +1,9 @@
|
|
|
1
|
-
.\!container {
|
|
2
|
-
width: 100% !important
|
|
3
|
-
}
|
|
4
|
-
.container {
|
|
5
|
-
width: 100%
|
|
6
|
-
}
|
|
7
|
-
@media (min-width: 640px) {
|
|
8
|
-
.\!container {
|
|
9
|
-
max-width: 640px !important
|
|
10
|
-
}
|
|
11
|
-
.container {
|
|
12
|
-
max-width: 640px
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
@media (min-width: 768px) {
|
|
16
|
-
.\!container {
|
|
17
|
-
max-width: 768px !important
|
|
18
|
-
}
|
|
19
|
-
.container {
|
|
20
|
-
max-width: 768px
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
@media (min-width: 1024px) {
|
|
24
|
-
.\!container {
|
|
25
|
-
max-width: 1024px !important
|
|
26
|
-
}
|
|
27
|
-
.container {
|
|
28
|
-
max-width: 1024px
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
@media (min-width: 1280px) {
|
|
32
|
-
.\!container {
|
|
33
|
-
max-width: 1280px !important
|
|
34
|
-
}
|
|
35
|
-
.container {
|
|
36
|
-
max-width: 1280px
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
@media (min-width: 1536px) {
|
|
40
|
-
.\!container {
|
|
41
|
-
max-width: 1536px !important
|
|
42
|
-
}
|
|
43
|
-
.container {
|
|
44
|
-
max-width: 1536px
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
@layer {
|
|
48
1
|
.ETab {
|
|
49
2
|
display: flex;
|
|
50
3
|
width: 100%;
|
|
51
|
-
|
|
4
|
+
min-width: -moz-max-content;
|
|
5
|
+
min-width: max-content;
|
|
6
|
+
flex-wrap: nowrap;
|
|
52
7
|
--tw-text-opacity: 1;
|
|
53
8
|
color: rgb(102 102 102 / var(--tw-text-opacity, 1))
|
|
54
9
|
}
|
|
@@ -120,5 +75,4 @@
|
|
|
120
75
|
.ETab_Card .ETab_Line_Btn_Btw {
|
|
121
76
|
--tw-bg-opacity: 1;
|
|
122
77
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))
|
|
123
|
-
}
|
|
124
78
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ninemoon-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.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",
|