@nmorph/nmorph-ui-kit 0.2.12 → 0.2.13
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/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, computed as
|
|
1
|
+
import { defineComponent as T, computed as v, ref as x, openBlock as o, createElementBlock as a, normalizeClass as H, createElementVNode as n, createBlock as P, unref as _, renderSlot as A, toDisplayString as R, createCommentVNode as O, useCssVars as I, normalizeStyle as N, resolveDynamicComponent as O2, createStaticVNode as Ye, createTextVNode as ee, onUnmounted as pe, onMounted as Y, watch as K, withDirectives as Ge, vShow as Ke, reactive as le, createVNode as M, withCtx as E, Fragment as L, renderList as U, provide as J, nextTick as Ve, inject as Q, Teleport as ie, withModifiers as ne, useSlots as Xe, readonly as q2, TransitionGroup as de, mergeProps as ye, withKeys as P2, resolveComponent as Je, pushScopeId as R2, popScopeId as E2 } from "vue";
|
|
2
2
|
import { createI18n as F2 } from "vue-i18n";
|
|
3
3
|
var te = /* @__PURE__ */ ((e) => (e.thick = "thick-component", e.default = "default-height-component", e.thin = "thin-component", e))(te || {}), j2 = /* @__PURE__ */ ((e) => (e.ascending = "ascending", e.descending = "descending", e))(j2 || {}), W2 = /* @__PURE__ */ ((e) => (e.row = "row", e.column = "column", e))(W2 || {}), Qe = /* @__PURE__ */ ((e) => (e.inset = "inset", e.outset = "outset", e.combined = "combined", e))(Qe || {}), Ze = /* @__PURE__ */ ((e) => (e.accent = "accent", e.success = "success", e.error = "error", e.warning = "warning", e))(Ze || {}), c = /* @__PURE__ */ ((e) => (e["add-location"] = "add-location", e.aim = "aim", e["alarm-clock"] = "alarm-clock", e.apple = "apple", e.archive = "archive", e["arrow-down"] = "arrow-down", e["arrow-left"] = "arrow-left", e["arrow-right"] = "arrow-right", e["arrow-up"] = "arrow-up", e.audio = "audio", e.avatar = "avatar", e.back = "back", e["bell-filled"] = "bell-filled", e.bell = "bell", e.bicycle = "bicycle", e["bottom-left"] = "bottom-left", e["bottom-right"] = "bottom-right", e.bottom = "bottom", e.burger = "burger", e.calendar = "calendar", e.camera = "camera", e["caret-bottom"] = "caret-bottom", e["caret-left"] = "caret-left", e["caret-right"] = "caret-right", e["caret-top"] = "caret-top", e.cellphone = "cellphone", e["chat-dot-round"] = "chat-dot-round", e["chat-dot-square"] = "chat-dot-square", e["chat-line-round"] = "chat-line-round", e["chat-line-square"] = "chat-line-square", e["chat-round"] = "chat-round", e["chat-square"] = "chat-square", e.check = "check", e.checked = "checked", e.cherry = "cherry", e["chevron-double-down"] = "chevron-double-down", e["chevron-down"] = "chevron-down", e["chrome-filled"] = "chrome-filled", e["circle-check-filled"] = "circle-check-filled", e["circle-check"] = "circle-check", e["circle-close-filled"] = "circle-close-filled", e["circle-close"] = "circle-close", e["circle-plus-filled"] = "circle-plus-filled", e["circle-plus"] = "circle-plus", e.clock = "clock", e.close = "close", e.cloudy = "cloudy", e.code = "code", e["coffee-cup"] = "coffee-cup", e.coffee = "coffee", e.coin = "coin", e["collection-tag"] = "collection-tag", e.collection = "collection", e.compass = "compass", e.connection = "connection", e.coordinate = "coordinate", e["copy-document"] = "copy-document", e.copy = "copy", e.cpu = "cpu", e["credit-card"] = "credit-card", e.crop = "crop", e.cross = "cross", e["delete-filled"] = "delete-filled", e.delete = "delete", e.dessert = "dessert", e.discount = "discount", e.doc = "doc", e["document-add"] = "document-add", e["document-checked"] = "document-checked", e["document-copy"] = "document-copy", e["document-delete"] = "document-delete", e["document-remove"] = "document-remove", e.document = "document", e.download = "download", e["edit-pen"] = "edit-pen", e.edit = "edit", e.enlarge = "enlarge", e.error = "error", e.expand = "expand", e["eye-blocked"] = "eye-blocked", e.eye = "eye", e.failed = "failed", e.files = "files", e.film = "film", e.filter = "filter", e.finished = "finished", e.flag = "flag", e.fold = "fold", e["folder-add"] = "folder-add", e["folder-checked"] = "folder-checked", e["folder-delete"] = "folder-delete", e["folder-opened"] = "folder-opened", e.folder = "folder", e.food = "food", e["fork-spoon"] = "fork-spoon", e["full-screen"] = "full-screen", e.goblet = "goblet", e["gold-medal"] = "gold-medal", e["goods-filled"] = "goods-filled", e.goods = "goods", e.grape = "grape", e.grid = "grid", e.guide = "guide", e.handbag = "handbag", e.headset = "headset", e.histogram = "histogram", e["hot-water"] = "hot-water", e.house = "house", e["ice-cream-round"] = "ice-cream-round", e["ice-drink"] = "ice-drink", e["info-filled"] = "info-filled", e.info = "info", e.image = "image", e.key = "key", e["knife-fork"] = "knife-fork", e.lightning = "lightning", e.link = "link", e.list = "list", e.loader = "loader", e.loading = "loading", e["location-filled"] = "location-filled", e["location-information"] = "location-information", e.location = "location", e.lock = "lock", e.logo = "logo", e.lollipop = "lollipop", e["magic-stick"] = "magic-stick", e.magnet = "magnet", e.male = "male", e.management = "management", e["map-location"] = "map-location", e.medal = "medal", e.memo = "memo", e.menu = "menu", e["message-box"] = "message-box", e.message = "message", e.mic = "mic", e.microphone = "microphone", e.minus = "minus", e.money = "money", e.monitor = "monitor", e.moon = "moon", e["more-filled"] = "more-filled", e.more = "more", e["mostly-cloudy"] = "mostly-cloudy", e.mouse = "mouse", e.mug = "mug", e["mute-notification"] = "mute-notification", e.mute = "mute", e["no-smoking"] = "no-smoking", e.notebook = "notebook", e.notification = "notification", e["office-building"] = "office-building", e.operation = "operation", e.opportunity = "opportunity", e.orange = "orange", e.paperclip = "paperclip", e["partly-cloudy"] = "partly-cloudy", e.pear = "pear", e["phone-filled"] = "phone-filled", e.phone = "phone", e.picture = "picture", e["pie-chart"] = "pie-chart", e.place = "place", e.platform = "platform", e.plus = "plus", e.pointer = "pointer", e.position = "position", e["post-card"] = "post-card", e.pouring = "pouring", e.present = "present", e["price-tag"] = "price-tag", e.printer = "printer", e.promotion = "promotion", e["quartz-watch"] = "quartz-watch", e["question-filled"] = "question-filled", e.rank = "rank", e["reading-lamp"] = "reading-lamp", e.reading = "reading", e["refresh-left"] = "refresh-left", e["refresh-right"] = "refresh-right", e.refresh = "refresh", e.refrigerator = "refrigerator", e["remove-filled"] = "remove-filled", e.remove = "remove", e["rotate-left"] = "rotate-left", e["rotate-right"] = "rotate-right", e["scale-to-original"] = "scale-to-original", e.school = "school", e.scissor = "scissor", e.search = "search", e.select = "select", e.sell = "sell", e["semi-select"] = "semi-select", e.service = "service", e.setting = "setting", e.share = "share", e.ship = "ship", e.shop = "shop", e["shopping-bag"] = "shopping-bag", e["shopping-cart-full"] = "shopping-cart-full", e["shopping-cart"] = "shopping-cart", e.shrink = "shrink", e.smoking = "smoking", e.soccer = "soccer", e["sold-out"] = "sold-out", e["sort-down"] = "sort-down", e["sort-up"] = "sort-up", e.sort = "sort", e.stamp = "stamp", e["star-filled"] = "star-filled", e.star = "star", e["success-filled"] = "success-filled", e.success = "success", e.sugar = "sugar", e.sunny = "sunny", e.sunrise = "sunrise", e.sunset = "sunset", e["switch-button"] = "switch-button", e["switch-filled"] = "switch-filled", e.switch = "switch", e["takeaway-box"] = "takeaway-box", e.ticket = "ticket", e.tickets = "tickets", e.time = "time", e.timer = "timer", e["toilet-paper"] = "toilet-paper", e.tools = "tools", e["top-left"] = "top-left", e["top-right"] = "top-right", e.top = "top", e["trend-charts"] = "trend-charts", e["triangle-down"] = "triangle-down", e["trophy-base"] = "trophy-base", e.trophy = "trophy", e["turn-off"] = "turn-off", e.umbrella = "umbrella", e.unlock = "unlock", e["upload-filled"] = "upload-filled", e.upload = "upload", e["user-filled"] = "user-filled", e.user = "user", e.van = "van", e["video-camera"] = "video-camera", e["video-pause"] = "video-pause", e["video-play"] = "video-play", e.video = "video", e.view = "view", e["wallet-filled"] = "wallet-filled", e.wallet = "wallet", e["warn-triangle-filled"] = "warn-triangle-filled", e.warning = "warning", e.watch = "watch", e["wind-power"] = "wind-power", e["zoom-in"] = "zoom-in", e["zoom-out"] = "zoom-out", e))(c || {}), L2 = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(L2 || {}), U2 = /* @__PURE__ */ ((e) => (e.fill = "fill", e.contain = "contain", e.cover = "cover", e.none = "none", e["scale-down"] = "scale-down", e))(U2 || {}), oe = /* @__PURE__ */ ((e) => (e.en = "en", e.ru = "ru", e))(oe || {});
|
|
4
4
|
const Y2 = (e, t) => {
|
|
@@ -44,7 +44,7 @@ const Y2 = (e, t) => {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click"],
|
|
46
46
|
setup(e, { expose: t, emit: s }) {
|
|
47
|
-
const l = e, r =
|
|
47
|
+
const l = e, r = v(
|
|
48
48
|
() => D({
|
|
49
49
|
nmorph: [te[l.height], `${l.fill && "fill"}`],
|
|
50
50
|
"nmorph-button": [
|
|
@@ -60,7 +60,7 @@ const Y2 = (e, t) => {
|
|
|
60
60
|
thin: "small",
|
|
61
61
|
default: "medium",
|
|
62
62
|
thick: "large"
|
|
63
|
-
}, u =
|
|
63
|
+
}, u = v(() => d[l.height]);
|
|
64
64
|
return t({ buttonRef: i }), (m, g) => (o(), a("div", {
|
|
65
65
|
class: H(r.value)
|
|
66
66
|
}, [
|
|
@@ -107,7 +107,7 @@ const Q2 = {
|
|
|
107
107
|
I((i) => ({
|
|
108
108
|
"2f7363e1": r.value
|
|
109
109
|
}));
|
|
110
|
-
const t = e, s =
|
|
110
|
+
const t = e, s = v(
|
|
111
111
|
() => D({
|
|
112
112
|
"nmorph-icon": [
|
|
113
113
|
`${!t.width && !t.height && t.size}`,
|
|
@@ -115,10 +115,10 @@ const Q2 = {
|
|
|
115
115
|
`${t.height ? "custom-height" : ""}`
|
|
116
116
|
]
|
|
117
117
|
})
|
|
118
|
-
), l =
|
|
118
|
+
), l = v(() => {
|
|
119
119
|
const i = {};
|
|
120
120
|
return t.width && (i["--width"] = t.width), t.height && (i["--height"] = t.height), i;
|
|
121
|
-
}), r =
|
|
121
|
+
}), r = v(() => `var(${t.color})`);
|
|
122
122
|
return (i, h) => (o(), a("div", {
|
|
123
123
|
class: H(s.value),
|
|
124
124
|
style: N(l.value)
|
|
@@ -2811,7 +2811,7 @@ const Vf = { render: kf }, n2 = {
|
|
|
2811
2811
|
disabled: { type: Boolean, default: !1 }
|
|
2812
2812
|
},
|
|
2813
2813
|
setup(e) {
|
|
2814
|
-
const t = e, s =
|
|
2814
|
+
const t = e, s = v(
|
|
2815
2815
|
() => D({
|
|
2816
2816
|
"nmorph-link": [t.color, `${t.underline && "underline"}`, `${t.disabled && "disabled"}`]
|
|
2817
2817
|
})
|
|
@@ -2852,19 +2852,19 @@ const Bf = /* @__PURE__ */ T({
|
|
|
2852
2852
|
},
|
|
2853
2853
|
emits: ["on-scroll", "update:modelValue", "on-scroll-end"],
|
|
2854
2854
|
setup(e, { emit: t }) {
|
|
2855
|
-
I((
|
|
2855
|
+
I((p) => ({
|
|
2856
2856
|
bd47d458: i.value,
|
|
2857
2857
|
"6f33bd73": h.value,
|
|
2858
2858
|
53434826: r.value,
|
|
2859
2859
|
53434824: l.value,
|
|
2860
2860
|
aa996170: w.value
|
|
2861
2861
|
}));
|
|
2862
|
-
const s = e, l =
|
|
2862
|
+
const s = e, l = v(() => s.scrollYProp), r = v(() => s.scrollXProp), i = v(() => s.scrollYProp !== "hidden" ? "--scrollbar-width" : "0"), h = v(() => s.scrollXProp !== "hidden" ? "--scrollbar-height" : "0");
|
|
2863
2863
|
let d;
|
|
2864
2864
|
const u = t, m = () => {
|
|
2865
2865
|
u("on-scroll-end");
|
|
2866
|
-
}, g = (
|
|
2867
|
-
if (u("on-scroll",
|
|
2866
|
+
}, g = (p) => {
|
|
2867
|
+
if (u("on-scroll", p), !y.value)
|
|
2868
2868
|
return;
|
|
2869
2869
|
const $ = y.value.scrollLeft, f = y.value.scrollTop;
|
|
2870
2870
|
u("update:modelValue", { x: $, y: f }), d !== void 0 && clearTimeout(d), d = setTimeout(() => {
|
|
@@ -2874,12 +2874,12 @@ const Bf = /* @__PURE__ */ T({
|
|
|
2874
2874
|
pe(() => {
|
|
2875
2875
|
d !== void 0 && clearTimeout(d);
|
|
2876
2876
|
});
|
|
2877
|
-
const k =
|
|
2877
|
+
const k = v(
|
|
2878
2878
|
() => D({
|
|
2879
2879
|
"nmorph-scroll": []
|
|
2880
2880
|
})
|
|
2881
|
-
), y = x(null), b = (
|
|
2882
|
-
const { x: $, y: f } =
|
|
2881
|
+
), y = x(null), b = (p) => {
|
|
2882
|
+
const { x: $, y: f } = p;
|
|
2883
2883
|
y.value?.scrollTo({
|
|
2884
2884
|
left: $,
|
|
2885
2885
|
top: f,
|
|
@@ -2890,19 +2890,19 @@ const Bf = /* @__PURE__ */ T({
|
|
|
2890
2890
|
b(s.modelValue);
|
|
2891
2891
|
}), K(
|
|
2892
2892
|
() => s.modelValue,
|
|
2893
|
-
(
|
|
2894
|
-
b(
|
|
2893
|
+
(p) => {
|
|
2894
|
+
b(p);
|
|
2895
2895
|
},
|
|
2896
2896
|
{ deep: !0, immediate: !0 }
|
|
2897
2897
|
);
|
|
2898
|
-
const w =
|
|
2899
|
-
return (
|
|
2898
|
+
const w = v(() => s.cssScrollBehavior);
|
|
2899
|
+
return (p, $) => (o(), a("div", {
|
|
2900
2900
|
ref_key: "scrollDOMContainer",
|
|
2901
2901
|
ref: y,
|
|
2902
2902
|
class: H(k.value),
|
|
2903
2903
|
onWheelPassive: g
|
|
2904
2904
|
}, [
|
|
2905
|
-
A(
|
|
2905
|
+
A(p.$slots, "default")
|
|
2906
2906
|
], 34));
|
|
2907
2907
|
}
|
|
2908
2908
|
});
|
|
@@ -2923,11 +2923,11 @@ const Cf = ["src", "srcset", "alt"], Sf = { class: "nmorph-avatar__fallback" },
|
|
|
2923
2923
|
75318566: m.value,
|
|
2924
2924
|
"6c0db3e8": g.fit
|
|
2925
2925
|
}));
|
|
2926
|
-
const s = e, l = t, r = x(!1), i =
|
|
2926
|
+
const s = e, l = t, r = x(!1), i = v(
|
|
2927
2927
|
() => D({
|
|
2928
2928
|
"nmorph-avatar": [s.shape]
|
|
2929
2929
|
})
|
|
2930
|
-
), h =
|
|
2930
|
+
), h = v(
|
|
2931
2931
|
() => D({
|
|
2932
2932
|
"nmorph-avatar__image": [`${r.value && "hide"}`]
|
|
2933
2933
|
})
|
|
@@ -2935,7 +2935,7 @@ const Cf = ["src", "srcset", "alt"], Sf = { class: "nmorph-avatar__fallback" },
|
|
|
2935
2935
|
l("error"), r.value = !0;
|
|
2936
2936
|
}, u = () => {
|
|
2937
2937
|
r.value = !1;
|
|
2938
|
-
}, m =
|
|
2938
|
+
}, m = v(() => ` ${s.size}px`);
|
|
2939
2939
|
return (g, k) => (o(), a("div", {
|
|
2940
2940
|
class: H(i.value)
|
|
2941
2941
|
}, [
|
|
@@ -2976,15 +2976,15 @@ const Df = {
|
|
|
2976
2976
|
I((m) => ({
|
|
2977
2977
|
"22efcb97": m.color
|
|
2978
2978
|
}));
|
|
2979
|
-
const t = e, s =
|
|
2979
|
+
const t = e, s = v(
|
|
2980
2980
|
() => D({
|
|
2981
2981
|
"nmorph-badge": [`${t.hidden && "hidden"}`]
|
|
2982
2982
|
})
|
|
2983
|
-
), l =
|
|
2983
|
+
), l = v(
|
|
2984
2984
|
() => D({
|
|
2985
2985
|
"nmorph-badge__container": [`${t.hidden && "hidden"}`]
|
|
2986
2986
|
})
|
|
2987
|
-
), r =
|
|
2987
|
+
), r = v(() => typeof Number(t.value) == "number" && Number(t.value) > t.max ? `${t.max}+` : t.value), i = v(() => {
|
|
2988
2988
|
const m = `-${d?.value / 2 + t.offsetX}px`, g = `-${u?.value / 2 + t.offsetY}px`;
|
|
2989
2989
|
return {
|
|
2990
2990
|
x: m,
|
|
@@ -3020,7 +3020,7 @@ const qf = ["data-date", "onClick"], l2 = /* @__PURE__ */ T({
|
|
|
3020
3020
|
},
|
|
3021
3021
|
emits: ["update:modelValue", "update-initial-date"],
|
|
3022
3022
|
setup(e, { emit: t }) {
|
|
3023
|
-
const s = e, l = t, r =
|
|
3023
|
+
const s = e, l = t, r = v(
|
|
3024
3024
|
() => D({
|
|
3025
3025
|
"nmorph-calendar": []
|
|
3026
3026
|
})
|
|
@@ -3047,7 +3047,7 @@ const qf = ["data-date", "onClick"], l2 = /* @__PURE__ */ T({
|
|
|
3047
3047
|
}
|
|
3048
3048
|
);
|
|
3049
3049
|
const g = (C) => C, k = () => {
|
|
3050
|
-
i.value =
|
|
3050
|
+
i.value = p.value;
|
|
3051
3051
|
}, y = () => {
|
|
3052
3052
|
i.value = /* @__PURE__ */ new Date();
|
|
3053
3053
|
}, b = () => {
|
|
@@ -3059,7 +3059,7 @@ const qf = ["data-date", "onClick"], l2 = /* @__PURE__ */ T({
|
|
|
3059
3059
|
S === "next" && b(), S === "previous" && k();
|
|
3060
3060
|
const { date: F } = C;
|
|
3061
3061
|
d.value = F, l("update:modelValue", d.value);
|
|
3062
|
-
},
|
|
3062
|
+
}, p = v(() => new Date(i.value.setMonth(i.value.getMonth() - 1))), $ = v(() => new Date(i.value.setMonth(i.value.getMonth() + 1))), f = v(() => {
|
|
3063
3063
|
const { range: C } = s, S = C ? c2(i.value, C[0]) : !0, B = C ? i2(i.value, C[1]) : !0, F = d2(s.range);
|
|
3064
3064
|
return {
|
|
3065
3065
|
showPreviousMonthButton: S,
|
|
@@ -3174,12 +3174,12 @@ const He = [
|
|
|
3174
3174
|
}, ze = (e) => He[e], Pf = (e) => e % 4 === 0 && e % 100 !== 0 || e % 400 === 0, Ee = (e, t) => [0, 2, 4, 6, 7, 9, 11].includes(t) ? 31 : [3, 5, 8, 10].includes(t) ? 30 : Pf(e) ? 29 : 28, h2 = (e, t) => {
|
|
3175
3175
|
const s = (G) => t ? G < t[0] || G > t[1] : !1, l = e.value.getFullYear(), r = e.value.getMonth(), h = new Date(l, r, 1).getDay() + 1, d = Ee(l, r), u = 7 + h - 8;
|
|
3176
3176
|
let k = 7 - (new Date(l, r, d).getDay() + 1);
|
|
3177
|
-
const y = /* @__PURE__ */ new Date(), b = y.getDate(), w = y.getMonth(),
|
|
3177
|
+
const y = /* @__PURE__ */ new Date(), b = y.getDate(), w = y.getMonth(), p = r - 1, $ = Ee(l, p);
|
|
3178
3178
|
let f = $ - u;
|
|
3179
3179
|
const z = [];
|
|
3180
3180
|
for (; f < $; ) {
|
|
3181
3181
|
f++;
|
|
3182
|
-
const G = w ===
|
|
3182
|
+
const G = w === p && b === f, Z = new Date(l, p, f);
|
|
3183
3183
|
z.push({
|
|
3184
3184
|
value: f,
|
|
3185
3185
|
monthType: "previous",
|
|
@@ -3232,7 +3232,7 @@ const He = [
|
|
|
3232
3232
|
},
|
|
3233
3233
|
emits: ["click-previous-month", "click-today", "click-next-month"],
|
|
3234
3234
|
setup(e, { emit: t }) {
|
|
3235
|
-
const s = e, l = t, r =
|
|
3235
|
+
const s = e, l = t, r = v(
|
|
3236
3236
|
() => D({
|
|
3237
3237
|
"nmorph-calendar-header": []
|
|
3238
3238
|
})
|
|
@@ -3272,7 +3272,7 @@ const Ff = { class: "nmorph-card__header" }, jf = { class: "nmorph-card__content
|
|
|
3272
3272
|
shadowType: { default: Qe.outset }
|
|
3273
3273
|
},
|
|
3274
3274
|
setup(e) {
|
|
3275
|
-
const t = e, s =
|
|
3275
|
+
const t = e, s = v(
|
|
3276
3276
|
() => D({
|
|
3277
3277
|
"nmorph-card": [t.shadowType]
|
|
3278
3278
|
})
|
|
@@ -3303,7 +3303,7 @@ const Uf = ["id"], Yf = { class: "nmorph-carousel__elements-indicator" }, Gf = [
|
|
|
3303
3303
|
s.value = s.value + 1;
|
|
3304
3304
|
}, r = () => {
|
|
3305
3305
|
s.value = s.value - 1;
|
|
3306
|
-
}, i = e, h = t, d =
|
|
3306
|
+
}, i = e, h = t, d = v(
|
|
3307
3307
|
() => D({
|
|
3308
3308
|
"nmorph-carousel": []
|
|
3309
3309
|
})
|
|
@@ -3325,7 +3325,7 @@ const Uf = ["id"], Yf = { class: "nmorph-carousel__elements-indicator" }, Gf = [
|
|
|
3325
3325
|
const w = (V, C) => {
|
|
3326
3326
|
const S = V;
|
|
3327
3327
|
k[C] = S;
|
|
3328
|
-
},
|
|
3328
|
+
}, p = v(() => `translateX(-${s.value * 100}%)`), $ = x(!0), f = (V) => V === s.value - 1, z = (V) => {
|
|
3329
3329
|
s.value = V + 1;
|
|
3330
3330
|
};
|
|
3331
3331
|
return (V, C) => (o(), a("div", {
|
|
@@ -3335,7 +3335,7 @@ const Uf = ["id"], Yf = { class: "nmorph-carousel__elements-indicator" }, Gf = [
|
|
|
3335
3335
|
ref_key: "carouselWrapper",
|
|
3336
3336
|
ref: g,
|
|
3337
3337
|
class: H(["nmorph-carousel__wrapper", { "transition-enabled": $.value }]),
|
|
3338
|
-
style: N({ transform:
|
|
3338
|
+
style: N({ transform: p.value })
|
|
3339
3339
|
}, [
|
|
3340
3340
|
(o(!0), a(L, null, U(u.value, (S, B) => (o(), a("div", {
|
|
3341
3341
|
id: `nmorph-carousel-item-${_(m)}-${S}`,
|
|
@@ -3378,7 +3378,7 @@ const Xf = /* @__PURE__ */ T({
|
|
|
3378
3378
|
name: {}
|
|
3379
3379
|
},
|
|
3380
3380
|
setup(e) {
|
|
3381
|
-
const t = e, s =
|
|
3381
|
+
const t = e, s = v(
|
|
3382
3382
|
() => D({
|
|
3383
3383
|
"nmorph-carousel-item": []
|
|
3384
3384
|
})
|
|
@@ -3423,7 +3423,7 @@ const Xf = /* @__PURE__ */ T({
|
|
|
3423
3423
|
i("update:modelValue", l.value);
|
|
3424
3424
|
};
|
|
3425
3425
|
J("collapse-data", l), J("update-model", r);
|
|
3426
|
-
const i = t, h =
|
|
3426
|
+
const i = t, h = v(
|
|
3427
3427
|
() => D({
|
|
3428
3428
|
"nmorph-collapse": []
|
|
3429
3429
|
})
|
|
@@ -3445,11 +3445,11 @@ const Xf = /* @__PURE__ */ T({
|
|
|
3445
3445
|
},
|
|
3446
3446
|
emits: ["click-item"],
|
|
3447
3447
|
setup(e, { emit: t }) {
|
|
3448
|
-
const s = e, l = t, r = x(!1), i =
|
|
3448
|
+
const s = e, l = t, r = x(!1), i = v(
|
|
3449
3449
|
() => D({
|
|
3450
3450
|
"nmorph-collapse-item": [`${s.disabled && "disabled"}`, `${r.value && "is-open"}`]
|
|
3451
3451
|
})
|
|
3452
|
-
), h =
|
|
3452
|
+
), h = v(
|
|
3453
3453
|
() => D({
|
|
3454
3454
|
nmorph: [te[s.height]]
|
|
3455
3455
|
})
|
|
@@ -3516,11 +3516,11 @@ const Zf = ["src", "alt", "srcset"], Nf = {
|
|
|
3516
3516
|
s.value = !0;
|
|
3517
3517
|
}, i = () => {
|
|
3518
3518
|
s.value = !0, l.value = !0;
|
|
3519
|
-
}, h =
|
|
3519
|
+
}, h = v(
|
|
3520
3520
|
() => D({
|
|
3521
3521
|
"nmorph-image": []
|
|
3522
3522
|
})
|
|
3523
|
-
), d =
|
|
3523
|
+
), d = v(() => t.fit);
|
|
3524
3524
|
return (u, m) => (o(), a("div", {
|
|
3525
3525
|
class: H(h.value)
|
|
3526
3526
|
}, [
|
|
@@ -3563,11 +3563,11 @@ const eg = { class: "nmorph-image-preview__content" }, tg = {
|
|
|
3563
3563
|
},
|
|
3564
3564
|
emits: ["on-close", "on-open"],
|
|
3565
3565
|
setup(e, { emit: t }) {
|
|
3566
|
-
const s = e, l = x(s.show), r =
|
|
3566
|
+
const s = e, l = x(s.show), r = v(
|
|
3567
3567
|
() => D({
|
|
3568
3568
|
"nmorph-image-preview": [`${l.value && "opened"}`]
|
|
3569
3569
|
})
|
|
3570
|
-
), i = x(s.initialIndex), h =
|
|
3570
|
+
), i = x(s.initialIndex), h = v(() => typeof s.src == "string" ? s.src : s.src[i.value]), d = x(1), u = () => {
|
|
3571
3571
|
l.value = !0, B("on-open");
|
|
3572
3572
|
}, m = () => {
|
|
3573
3573
|
l.value = !1, B("on-close");
|
|
@@ -3579,7 +3579,7 @@ const eg = { class: "nmorph-image-preview__content" }, tg = {
|
|
|
3579
3579
|
d.value < s.maxScaleLevel && (d.value += s.scaleStep), d.value = parseFloat(d.value.toFixed(3));
|
|
3580
3580
|
}, b = () => {
|
|
3581
3581
|
d.value > s.minScaleLevel && (d.value -= s.scaleStep), d.value = parseFloat(d.value.toFixed(3));
|
|
3582
|
-
}, w =
|
|
3582
|
+
}, w = v(() => d.value < 1), p = () => {
|
|
3583
3583
|
d.value = 1;
|
|
3584
3584
|
}, $ = () => {
|
|
3585
3585
|
d.value = 1;
|
|
@@ -3589,14 +3589,14 @@ const eg = { class: "nmorph-image-preview__content" }, tg = {
|
|
|
3589
3589
|
}, V = () => {
|
|
3590
3590
|
const j = s.src.length - 1, X = i.value + 1;
|
|
3591
3591
|
X > j ? i.value = 0 : i.value = X;
|
|
3592
|
-
}, C =
|
|
3592
|
+
}, C = v(() => {
|
|
3593
3593
|
let j = {
|
|
3594
3594
|
icon: "shrink",
|
|
3595
3595
|
handler: $
|
|
3596
3596
|
};
|
|
3597
3597
|
return w.value && (j = {
|
|
3598
3598
|
icon: "enlarge",
|
|
3599
|
-
handler:
|
|
3599
|
+
handler: p
|
|
3600
3600
|
}), j;
|
|
3601
3601
|
}), S = [
|
|
3602
3602
|
{
|
|
@@ -3615,7 +3615,7 @@ const eg = { class: "nmorph-image-preview__content" }, tg = {
|
|
|
3615
3615
|
icon: "zoom-out",
|
|
3616
3616
|
handler: b
|
|
3617
3617
|
}
|
|
3618
|
-
], B = t, F =
|
|
3618
|
+
], B = t, F = v(() => Array.isArray(s.src) && s.src.length > 0);
|
|
3619
3619
|
return (j, X) => (o(), a("div", {
|
|
3620
3620
|
class: H(r.value)
|
|
3621
3621
|
}, [
|
|
@@ -3706,7 +3706,7 @@ const ag = /* @__PURE__ */ T({
|
|
|
3706
3706
|
},
|
|
3707
3707
|
emits: ["prev-click", "next-click", "update:modelValue", "update:range"],
|
|
3708
3708
|
setup(e, { emit: t }) {
|
|
3709
|
-
const s = e, l = t, r = x(s.range), i =
|
|
3709
|
+
const s = e, l = t, r = x(s.range), i = v(
|
|
3710
3710
|
() => D({
|
|
3711
3711
|
"nmorph-pagination": [`${s.disabled && "disabled"}`]
|
|
3712
3712
|
})
|
|
@@ -3714,27 +3714,27 @@ const ag = /* @__PURE__ */ T({
|
|
|
3714
3714
|
u.value = String(Number(u.value) - 1);
|
|
3715
3715
|
}, d = () => {
|
|
3716
3716
|
u.value = String(Number(u.value) + 1);
|
|
3717
|
-
}, u = x(String(s.modelValue)), m =
|
|
3718
|
-
const
|
|
3719
|
-
return Array.from({ length:
|
|
3720
|
-
}), g =
|
|
3721
|
-
K(u, (
|
|
3722
|
-
l("update:modelValue", Number(
|
|
3717
|
+
}, u = x(String(s.modelValue)), m = v(() => {
|
|
3718
|
+
const p = s.total / s.pagerCount + 1, $ = p % 1 === 0 ? -1 : 0;
|
|
3719
|
+
return Array.from({ length: p + $ }, (f, z) => ({ value: String(z + 1), label: String(z + 1) }));
|
|
3720
|
+
}), g = v(() => s.hideOnSinglePage || s.total / s.pagerCount > 1);
|
|
3721
|
+
K(u, (p) => {
|
|
3722
|
+
l("update:modelValue", Number(p)), w();
|
|
3723
3723
|
}), K(
|
|
3724
3724
|
() => s.pagerCount,
|
|
3725
3725
|
() => {
|
|
3726
3726
|
w();
|
|
3727
3727
|
}
|
|
3728
3728
|
);
|
|
3729
|
-
const k = (
|
|
3730
|
-
u.value =
|
|
3731
|
-
}, y =
|
|
3732
|
-
const
|
|
3733
|
-
r.value = [$,
|
|
3729
|
+
const k = (p) => {
|
|
3730
|
+
u.value = p;
|
|
3731
|
+
}, y = v(() => Number(u.value) === 1), b = v(() => m.value.length === Number(u.value)), w = () => {
|
|
3732
|
+
const p = Number(u.value) * s.pagerCount, $ = p - s.pagerCount;
|
|
3733
|
+
r.value = [$, p], l("update:range", r.value);
|
|
3734
3734
|
};
|
|
3735
3735
|
return Y(() => {
|
|
3736
3736
|
w();
|
|
3737
|
-
}), (
|
|
3737
|
+
}), (p, $) => g.value ? (o(), a("div", {
|
|
3738
3738
|
key: 0,
|
|
3739
3739
|
class: H(i.value)
|
|
3740
3740
|
}, [
|
|
@@ -3806,15 +3806,15 @@ const lg = {
|
|
|
3806
3806
|
"3b0b01ec": g.value,
|
|
3807
3807
|
"514b0928": y.strokeWidth
|
|
3808
3808
|
}));
|
|
3809
|
-
const t = e, s =
|
|
3809
|
+
const t = e, s = v(
|
|
3810
3810
|
() => D({
|
|
3811
3811
|
"nmorph-progress": []
|
|
3812
3812
|
})
|
|
3813
|
-
), l =
|
|
3813
|
+
), l = v(() => `${t.percentage}%`), r = v(() => Array.isArray(t.color) ? t.color.find((y) => y.percentage <= t.percentage)?.color : typeof t.color == "function" ? t.color(t.percentage) : t.color), i = v(() => t.indeterminate ? "var(--animation)" : "none"), h = x(null), d = x(1), u = v(() => `${d.value} ${d.value}`), m = v(() => d.value - t.percentage / 100 * d.value);
|
|
3814
3814
|
Y(() => {
|
|
3815
3815
|
h.value && (d.value = 2 * Math.PI * h.value.r.baseVal.value);
|
|
3816
3816
|
});
|
|
3817
|
-
const g =
|
|
3817
|
+
const g = v(() => `${t.circleSize}px`), k = v(() => `${t.percentage}%`);
|
|
3818
3818
|
return (y, b) => (o(), a("div", {
|
|
3819
3819
|
class: H(s.value)
|
|
3820
3820
|
}, [
|
|
@@ -3876,7 +3876,7 @@ const mg = {
|
|
|
3876
3876
|
rows: { default: 0 }
|
|
3877
3877
|
},
|
|
3878
3878
|
setup(e) {
|
|
3879
|
-
const t = e, s =
|
|
3879
|
+
const t = e, s = v(
|
|
3880
3880
|
() => D({
|
|
3881
3881
|
"nmorph-skeleton": [`${t.animated && t.loading && "loading"}`]
|
|
3882
3882
|
})
|
|
@@ -3900,7 +3900,7 @@ const $g = { class: "nmorph-skeleton-item__element" }, v2 = /* @__PURE__ */ T({
|
|
|
3900
3900
|
variant: { default: "text" }
|
|
3901
3901
|
},
|
|
3902
3902
|
setup(e) {
|
|
3903
|
-
const t = e, s =
|
|
3903
|
+
const t = e, s = v(
|
|
3904
3904
|
() => D({
|
|
3905
3905
|
"nmorph-skeleton-item": [t.variant]
|
|
3906
3906
|
})
|
|
@@ -3925,7 +3925,7 @@ const ue = "10px", xg = /* @__PURE__ */ T({
|
|
|
3925
3925
|
},
|
|
3926
3926
|
emits: ["sort"],
|
|
3927
3927
|
setup(e, { emit: t }) {
|
|
3928
|
-
const s = e, l = t, r =
|
|
3928
|
+
const s = e, l = t, r = v(
|
|
3929
3929
|
() => D({
|
|
3930
3930
|
"nmorph-sort-button": [`${s.value}`]
|
|
3931
3931
|
})
|
|
@@ -3970,13 +3970,13 @@ const yg = { class: "nmorph-table__wrapper" }, Mg = { class: "nmorph-table__head
|
|
|
3970
3970
|
style: { default: "nmorph" }
|
|
3971
3971
|
},
|
|
3972
3972
|
setup(e) {
|
|
3973
|
-
const t = e, s =
|
|
3973
|
+
const t = e, s = v(
|
|
3974
3974
|
() => D({
|
|
3975
3975
|
"nmorph-table": [`${t.style}`]
|
|
3976
3976
|
})
|
|
3977
3977
|
), l = x(t.data), r = x(t.sort), i = (b, w) => {
|
|
3978
|
-
r.value && (r.value[w] = b, l.value.sort((
|
|
3979
|
-
const f = String(
|
|
3978
|
+
r.value && (r.value[w] = b, l.value.sort((p, $) => {
|
|
3979
|
+
const f = String(p[w]).toLowerCase(), z = String($[w]).toLowerCase();
|
|
3980
3980
|
if (!r.value)
|
|
3981
3981
|
return 0;
|
|
3982
3982
|
const V = r.value[w];
|
|
@@ -3984,9 +3984,9 @@ const yg = { class: "nmorph-table__wrapper" }, Mg = { class: "nmorph-table__head
|
|
|
3984
3984
|
}));
|
|
3985
3985
|
}, h = x(null), d = x([]);
|
|
3986
3986
|
J("table-data", { rows: l, columns: d });
|
|
3987
|
-
const u =
|
|
3988
|
-
const b = d.value.map((z) => z.width).filter((z) => !!z), w = b.length,
|
|
3989
|
-
return h.value?.clientWidth ? (h.value?.clientWidth -
|
|
3987
|
+
const u = v(() => {
|
|
3988
|
+
const b = d.value.map((z) => z.width).filter((z) => !!z), w = b.length, p = b.reduce((z, V) => (z += Number(V), z), 0), $ = d.value.length - w;
|
|
3989
|
+
return h.value?.clientWidth ? (h.value?.clientWidth - p) / $ : 0;
|
|
3990
3990
|
}), m = (b) => b !== "" ? b : u.value, g = x(0);
|
|
3991
3991
|
K(
|
|
3992
3992
|
() => t.data,
|
|
@@ -4007,29 +4007,29 @@ const yg = { class: "nmorph-table__wrapper" }, Mg = { class: "nmorph-table__head
|
|
|
4007
4007
|
n("div", yg, [
|
|
4008
4008
|
n("table", Mg, [
|
|
4009
4009
|
n("colgroup", null, [
|
|
4010
|
-
(o(!0), a(L, null, U(d.value, (
|
|
4011
|
-
key:
|
|
4012
|
-
style: N({ width: `${m(
|
|
4013
|
-
"data-src": `${m(
|
|
4010
|
+
(o(!0), a(L, null, U(d.value, (p) => (o(), a("col", {
|
|
4011
|
+
key: p.prop,
|
|
4012
|
+
style: N({ width: `${m(p.width)}px` }),
|
|
4013
|
+
"data-src": `${m(p.width)}px`
|
|
4014
4014
|
}, null, 12, bg))), 128))
|
|
4015
4015
|
]),
|
|
4016
4016
|
n("thead", null, [
|
|
4017
4017
|
n("tr", kg, [
|
|
4018
|
-
(o(!0), a(L, null, U(d.value, (
|
|
4018
|
+
(o(!0), a(L, null, U(d.value, (p, $) => (o(), a("th", {
|
|
4019
4019
|
key: $,
|
|
4020
4020
|
class: H(["nmorph-table__table-data", { "nmorph-table__table-data--bordered": t.bordered }])
|
|
4021
4021
|
}, [
|
|
4022
4022
|
n("div", Vg, [
|
|
4023
4023
|
n("div", {
|
|
4024
|
-
style: N({ "justify-content":
|
|
4024
|
+
style: N({ "justify-content": p.alignment }),
|
|
4025
4025
|
class: "nmorph-table__cell-content"
|
|
4026
4026
|
}, [
|
|
4027
|
-
n("span", null, R(
|
|
4028
|
-
r.value && r.value[
|
|
4027
|
+
n("span", null, R(p.label), 1),
|
|
4028
|
+
r.value && r.value[p.prop] ? (o(), P(xg, {
|
|
4029
4029
|
key: 0,
|
|
4030
4030
|
class: "nmorph-table__button-wrapper",
|
|
4031
|
-
value: r.value[
|
|
4032
|
-
onSort: (f) => i(f,
|
|
4031
|
+
value: r.value[p.prop],
|
|
4032
|
+
onSort: (f) => i(f, p.prop)
|
|
4033
4033
|
}, null, 8, ["value", "onSort"])) : O("", !0)
|
|
4034
4034
|
], 4)
|
|
4035
4035
|
])
|
|
@@ -4040,13 +4040,13 @@ const yg = { class: "nmorph-table__wrapper" }, Mg = { class: "nmorph-table__head
|
|
|
4040
4040
|
n("div", Hg, [
|
|
4041
4041
|
n("table", null, [
|
|
4042
4042
|
n("colgroup", null, [
|
|
4043
|
-
(o(!0), a(L, null, U(d.value, (
|
|
4044
|
-
key:
|
|
4045
|
-
style: N({ width: `${m(
|
|
4043
|
+
(o(!0), a(L, null, U(d.value, (p) => (o(), a("col", {
|
|
4044
|
+
key: p.prop,
|
|
4045
|
+
style: N({ width: `${m(p.width)}px` })
|
|
4046
4046
|
}, null, 4))), 128))
|
|
4047
4047
|
]),
|
|
4048
4048
|
n("tbody", null, [
|
|
4049
|
-
(o(!0), a(L, null, U(l.value, (
|
|
4049
|
+
(o(!0), a(L, null, U(l.value, (p, $) => (o(), a("tr", {
|
|
4050
4050
|
key: $,
|
|
4051
4051
|
class: H(["nmorph-table__table-data-row", { "nmorph-table__table-data-row--row-hover": t.rowHover }])
|
|
4052
4052
|
}, [
|
|
@@ -4058,16 +4058,16 @@ const yg = { class: "nmorph-table__wrapper" }, Mg = { class: "nmorph-table__head
|
|
|
4058
4058
|
id: `table-cell-${_(y)}-${$}-${f.prop}`,
|
|
4059
4059
|
style: N({ "text-align": f.alignment }),
|
|
4060
4060
|
class: "nmorph-table__cell nmorph-table__cell--data"
|
|
4061
|
-
}, R(k(
|
|
4061
|
+
}, R(k(p[f.prop])), 13, zg)
|
|
4062
4062
|
], 2))), 128))
|
|
4063
4063
|
], 2))), 128))
|
|
4064
4064
|
])
|
|
4065
4065
|
]),
|
|
4066
4066
|
n("table", null, [
|
|
4067
4067
|
n("colgroup", null, [
|
|
4068
|
-
(o(!0), a(L, null, U(d.value, (
|
|
4069
|
-
key:
|
|
4070
|
-
style: N({ width: `${m(
|
|
4068
|
+
(o(!0), a(L, null, U(d.value, (p) => (o(), a("col", {
|
|
4069
|
+
key: p.prop,
|
|
4070
|
+
style: N({ width: `${m(p.width)}px` })
|
|
4071
4071
|
}, null, 4))), 128))
|
|
4072
4072
|
]),
|
|
4073
4073
|
n("tbody", Bg, [
|
|
@@ -4085,11 +4085,11 @@ const m2 = /* @__PURE__ */ T({
|
|
|
4085
4085
|
row: {}
|
|
4086
4086
|
},
|
|
4087
4087
|
setup(e) {
|
|
4088
|
-
const t = Q("column-property", void 0), s = Q("table-identifier", void 0), l = e, r =
|
|
4088
|
+
const t = Q("column-property", void 0), s = Q("table-identifier", void 0), l = e, r = v(
|
|
4089
4089
|
() => D({
|
|
4090
4090
|
"nmorph-table-cell": []
|
|
4091
4091
|
})
|
|
4092
|
-
), i =
|
|
4092
|
+
), i = v(() => `#table-cell-${s}-${l.row}-${t}`), h = x(!1);
|
|
4093
4093
|
return Y(async () => {
|
|
4094
4094
|
await Ve();
|
|
4095
4095
|
const d = document.querySelector(i.value);
|
|
@@ -4112,7 +4112,7 @@ const m2 = /* @__PURE__ */ T({
|
|
|
4112
4112
|
prop: {}
|
|
4113
4113
|
},
|
|
4114
4114
|
setup(e) {
|
|
4115
|
-
const t = Q("table-data", void 0), s = Q("table-identifier", void 0), l = e, r =
|
|
4115
|
+
const t = Q("table-data", void 0), s = Q("table-identifier", void 0), l = e, r = v(
|
|
4116
4116
|
() => D({
|
|
4117
4117
|
"nmorph-table-column": []
|
|
4118
4118
|
})
|
|
@@ -4148,7 +4148,7 @@ const m2 = /* @__PURE__ */ T({
|
|
|
4148
4148
|
},
|
|
4149
4149
|
emits: ["close"],
|
|
4150
4150
|
setup(e, { emit: t }) {
|
|
4151
|
-
const s = e, l =
|
|
4151
|
+
const s = e, l = v(
|
|
4152
4152
|
() => D({
|
|
4153
4153
|
nmorph: [te[s.height]],
|
|
4154
4154
|
"nmorph-tag": [`${s.transparent && "transparent"}`]
|
|
@@ -4193,7 +4193,7 @@ const Ag = ["innerHTML"], Dg = {
|
|
|
4193
4193
|
},
|
|
4194
4194
|
emits: ["close"],
|
|
4195
4195
|
setup(e, { emit: t }) {
|
|
4196
|
-
const s = e, l = t, r =
|
|
4196
|
+
const s = e, l = t, r = v(
|
|
4197
4197
|
() => D({
|
|
4198
4198
|
"nmorph-alert": [s.type, `${s.bordered && "bordered"}`, `${s.fill && "fill"}`]
|
|
4199
4199
|
})
|
|
@@ -4266,7 +4266,7 @@ const Fg = { class: "nmorph-dialog__header" }, jg = { class: "nmorph-dialog__tit
|
|
|
4266
4266
|
},
|
|
4267
4267
|
emits: ["on-close", "update:modelValue"],
|
|
4268
4268
|
setup(e, { emit: t }) {
|
|
4269
|
-
const s = e, l = t, r =
|
|
4269
|
+
const s = e, l = t, r = v(
|
|
4270
4270
|
() => D({
|
|
4271
4271
|
"nmorph-dialog": []
|
|
4272
4272
|
})
|
|
@@ -4308,7 +4308,7 @@ const Fg = { class: "nmorph-dialog__header" }, jg = { class: "nmorph-dialog__tit
|
|
|
4308
4308
|
});
|
|
4309
4309
|
var Ug = /* @__PURE__ */ ((e) => (e["contains-one"] = "contains-one", e["not-contains"] = "not-contains", e["full-eq"] = "full-eq", e))(Ug || {}), Yg = /* @__PURE__ */ ((e) => (e.eq = "eq", e.gte = "gte", e.lte = "lte", e.gt = "gt", e.lt = "lt", e))(Yg || {}), Gg = /* @__PURE__ */ ((e) => (e.eq = "eq", e["not-eq"] = "not-eq", e))(Gg || {});
|
|
4310
4310
|
const Fe = (e) => {
|
|
4311
|
-
const { inputValue: t, rules: s } = e, l = x([]), r =
|
|
4311
|
+
const { inputValue: t, rules: s } = e, l = x([]), r = v(() => l.value.length === 0), i = x(!1);
|
|
4312
4312
|
return {
|
|
4313
4313
|
touched: i,
|
|
4314
4314
|
valid: r,
|
|
@@ -4321,7 +4321,7 @@ const Fe = (e) => {
|
|
|
4321
4321
|
return console.warn("The input value and the provided rules do not match"), null;
|
|
4322
4322
|
if (i.value || (i.value = !0), m) {
|
|
4323
4323
|
const w = s;
|
|
4324
|
-
l.value = w.reduce((
|
|
4324
|
+
l.value = w.reduce((p, $) => (d.match($.pattern) || p.push($.error), p), []);
|
|
4325
4325
|
}
|
|
4326
4326
|
if (g) {
|
|
4327
4327
|
const w = ($, f, z) => {
|
|
@@ -4337,19 +4337,19 @@ const Fe = (e) => {
|
|
|
4337
4337
|
case "gte":
|
|
4338
4338
|
return $ >= f;
|
|
4339
4339
|
}
|
|
4340
|
-
},
|
|
4341
|
-
l.value =
|
|
4340
|
+
}, p = s;
|
|
4341
|
+
l.value = p.reduce(($, f) => (w(d, f.compareValue, f.numberCompareType) && $.push(f.error), $), []);
|
|
4342
4342
|
}
|
|
4343
4343
|
if (k) {
|
|
4344
4344
|
const w = s;
|
|
4345
|
-
l.value = w.reduce((
|
|
4345
|
+
l.value = w.reduce((p, $) => {
|
|
4346
4346
|
let f = !1;
|
|
4347
4347
|
const { compareValue: z, booleanCompareType: V } = $;
|
|
4348
|
-
return V === "not-eq" && (f = d === z), V === "eq" && (f = d !== z), f ||
|
|
4348
|
+
return V === "not-eq" && (f = d === z), V === "eq" && (f = d !== z), f || p.push($.error), p;
|
|
4349
4349
|
}, []);
|
|
4350
4350
|
}
|
|
4351
4351
|
if (y) {
|
|
4352
|
-
const w = s,
|
|
4352
|
+
const w = s, p = ($, f, z) => {
|
|
4353
4353
|
switch (z) {
|
|
4354
4354
|
case "contains-one":
|
|
4355
4355
|
return $.some((S) => f.includes(S));
|
|
@@ -4362,7 +4362,7 @@ const Fe = (e) => {
|
|
|
4362
4362
|
return !$.some((S) => f.includes(S));
|
|
4363
4363
|
}
|
|
4364
4364
|
};
|
|
4365
|
-
l.value = w.reduce(($, f) => (
|
|
4365
|
+
l.value = w.reduce(($, f) => (p(d, f.compareValue, f.arrayCompareType) || $.push(f.error), $), []);
|
|
4366
4366
|
}
|
|
4367
4367
|
}
|
|
4368
4368
|
};
|
|
@@ -4399,13 +4399,13 @@ const Fe = (e) => {
|
|
|
4399
4399
|
console.warn("Relative element is not an HTMLElement");
|
|
4400
4400
|
return;
|
|
4401
4401
|
}
|
|
4402
|
-
const b = y.getBoundingClientRect(), { x: w, y:
|
|
4403
|
-
h.value === "top" &&
|
|
4402
|
+
const b = y.getBoundingClientRect(), { x: w, y: p } = b, $ = b.width, f = b.height, z = window.innerWidth, V = window.innerHeight;
|
|
4403
|
+
h.value === "top" && p - k < 0 && (h.value = "bottom"), h.value === "bottom" && p + f + k > V && (h.value = "top"), h.value === "left" && w - g < 0 && (h.value = "right"), h.value === "right" && w + $ + g > z && (h.value = "left"), h.value === "top" && (d.value = { x: `${w + i}px`, y: `${p + r}px` }), h.value === "bottom" && (d.value = { x: `${w + i}px`, y: `${p + f + r}px` }), h.value === "right" && (d.value = { x: `${w + i}px`, y: `${p + r}px` }), h.value === "left" && (d.value = { x: `${w + $ + i}px`, y: `${p + r}px` });
|
|
4404
4404
|
});
|
|
4405
4405
|
};
|
|
4406
4406
|
return { placement: h, placementCoords: d };
|
|
4407
4407
|
}, Tx = () => {
|
|
4408
|
-
}, Xg = "@nmorph/nmorph-ui-kit", Jg = "module", Qg = "0.2.
|
|
4408
|
+
}, Xg = "@nmorph/nmorph-ui-kit", Jg = "module", Qg = "0.2.13", Zg = "MIT", Ng = {
|
|
4409
4409
|
node: "18.13.0",
|
|
4410
4410
|
npm: "8.19.3"
|
|
4411
4411
|
}, Ig = "./dist/index.d.ts", ew = "./dist/index.umd.js", tw = "./dist/index.es.js", nw = "./dist/style.css", ow = [
|
|
@@ -4569,19 +4569,19 @@ const Fe = (e) => {
|
|
|
4569
4569
|
G2("warn", `NMORPH(v${iw.version})`);
|
|
4570
4570
|
const s = { ..._w, ...e }, l = (w) => {
|
|
4571
4571
|
try {
|
|
4572
|
-
const
|
|
4572
|
+
const p = pw(w), $ = je(p, s.darkShadeGeneratorCoefficient), f = je(p, s.lightShadeGeneratorCoefficient);
|
|
4573
4573
|
return [
|
|
4574
4574
|
{ name: "--nmorph-dark-shade-color", color: $ },
|
|
4575
4575
|
{ name: "--nmorph-light-shade-color", color: f }
|
|
4576
4576
|
];
|
|
4577
|
-
} catch (
|
|
4578
|
-
console.error(
|
|
4577
|
+
} catch (p) {
|
|
4578
|
+
console.error(p.message);
|
|
4579
4579
|
}
|
|
4580
|
-
}, r = (w) => Object.entries(w).map(([
|
|
4581
|
-
name: `--nmorph-${qe(
|
|
4580
|
+
}, r = (w) => Object.entries(w).map(([p, $]) => ({
|
|
4581
|
+
name: `--nmorph-${qe(p)}-color`,
|
|
4582
4582
|
color: $
|
|
4583
|
-
})), i = (w,
|
|
4584
|
-
const $ = (V) => V.map((C) => `${C.name}: ${C.color};`).join(" "), f = Object.entries(
|
|
4583
|
+
})), i = (w, p) => {
|
|
4584
|
+
const $ = (V) => V.map((C) => `${C.name}: ${C.color};`).join(" "), f = Object.entries(p).map(([V, C]) => `--${qe(V)}: ${C};`).join(" "), z = [];
|
|
4585
4585
|
return Object.entries(w).forEach(([V, C]) => {
|
|
4586
4586
|
if (V === "common")
|
|
4587
4587
|
z.push($(mw(x2, C)));
|
|
@@ -4600,10 +4600,10 @@ const Fe = (e) => {
|
|
|
4600
4600
|
}
|
|
4601
4601
|
`;
|
|
4602
4602
|
}, h = {};
|
|
4603
|
-
Object.entries(s.themes).forEach(([w,
|
|
4603
|
+
Object.entries(s.themes).forEach(([w, p]) => {
|
|
4604
4604
|
h[w] = [];
|
|
4605
|
-
const $ = !!
|
|
4606
|
-
!!
|
|
4605
|
+
const $ = !!p.darkShade, f = !!p.lightShade;
|
|
4606
|
+
!!p.main && !$ && !f && (h[w] = l(p.main)), h[w] = [...h[w], ...r(p)];
|
|
4607
4607
|
});
|
|
4608
4608
|
const d = document.createElement("style");
|
|
4609
4609
|
d.type = "text/css", d.innerHTML = i(h, s.other), document.head.appendChild(d);
|
|
@@ -4679,7 +4679,7 @@ const Fe = (e) => {
|
|
|
4679
4679
|
initialPlacement: "top",
|
|
4680
4680
|
contentDOMElement: l,
|
|
4681
4681
|
relativeElement: r
|
|
4682
|
-
}), h =
|
|
4682
|
+
}), h = v(
|
|
4683
4683
|
() => D({
|
|
4684
4684
|
"nmorph-tooltip": [i.value]
|
|
4685
4685
|
})
|
|
@@ -4687,7 +4687,7 @@ const Fe = (e) => {
|
|
|
4687
4687
|
s.value = !0;
|
|
4688
4688
|
}, u = () => {
|
|
4689
4689
|
t.forceShow || (s.value = !1);
|
|
4690
|
-
}, m =
|
|
4690
|
+
}, m = v(() => t.forceCoordinate ? "100%" : "auto");
|
|
4691
4691
|
return (g, k) => (o(), a("div", {
|
|
4692
4692
|
class: H(h.value)
|
|
4693
4693
|
}, [
|
|
@@ -4783,7 +4783,7 @@ const kw = {
|
|
|
4783
4783
|
Y(() => {
|
|
4784
4784
|
m("inputDOMRef", i);
|
|
4785
4785
|
});
|
|
4786
|
-
const i = x(null), h = s !== void 0, d = h ? x(s.value) : x(r.modelValue), u =
|
|
4786
|
+
const i = x(null), h = s !== void 0, d = h ? x(s.value) : x(r.modelValue), u = v(() => h ? s.value.includes(r.id) : r.modelValue), m = t, g = () => {
|
|
4787
4787
|
if (!r.disabled) {
|
|
4788
4788
|
if (!h) {
|
|
4789
4789
|
d.value = !d.value, m("update:modelValue", d.value);
|
|
@@ -4791,7 +4791,7 @@ const kw = {
|
|
|
4791
4791
|
}
|
|
4792
4792
|
l && Array.isArray(d.value) && l(r.id, d.value);
|
|
4793
4793
|
}
|
|
4794
|
-
}, k =
|
|
4794
|
+
}, k = v(
|
|
4795
4795
|
() => D({
|
|
4796
4796
|
"nmorph-checkbox": [`${u.value && "checked"}`, `${r.disabled && "disabled"}`, r.styleType]
|
|
4797
4797
|
})
|
|
@@ -4853,7 +4853,7 @@ const qw = { class: "nmorph-checkbox-group__wrapper" }, Pw = { class: "nmorph-ch
|
|
|
4853
4853
|
setup(e, { emit: t }) {
|
|
4854
4854
|
const s = e, l = x(s.modelValue), r = t, i = (d) => {
|
|
4855
4855
|
l.value.includes(d) ? l.value = l.value.filter((u) => u !== d) : l.value.push(d), r("update:modelValue", l.value);
|
|
4856
|
-
}, h =
|
|
4856
|
+
}, h = v(
|
|
4857
4857
|
() => D({
|
|
4858
4858
|
"nmorph-checkbox-group": [s.styleType, s.direction]
|
|
4859
4859
|
})
|
|
@@ -4897,7 +4897,7 @@ const Ew = { class: "nmorph-autocomplete__input-content" }, Fw = {
|
|
|
4897
4897
|
},
|
|
4898
4898
|
emits: ["update:modelValue", "select"],
|
|
4899
4899
|
setup(e, { emit: t }) {
|
|
4900
|
-
const s = e, l = x(s.modelValue), r = t, i =
|
|
4900
|
+
const s = e, l = x(s.modelValue), r = t, i = v(
|
|
4901
4901
|
() => D({
|
|
4902
4902
|
"nmorph-autocomplete": []
|
|
4903
4903
|
})
|
|
@@ -4905,7 +4905,7 @@ const Ew = { class: "nmorph-autocomplete__input-content" }, Fw = {
|
|
|
4905
4905
|
l.value = w, r("update:modelValue", l.value);
|
|
4906
4906
|
}, d = x(!1), u = x(null), m = () => {
|
|
4907
4907
|
d.value = !1;
|
|
4908
|
-
}, g =
|
|
4908
|
+
}, g = v(() => s.list.filter((w) => Object.keys(w).some((p) => String(w[p]).toLowerCase().includes(l.value.toLowerCase()))));
|
|
4909
4909
|
K(g, (w) => {
|
|
4910
4910
|
d.value = w.length > 0;
|
|
4911
4911
|
});
|
|
@@ -4920,7 +4920,7 @@ const Ew = { class: "nmorph-autocomplete__input-content" }, Fw = {
|
|
|
4920
4920
|
w !== "" && s.actionCallback && (b.value = !0, await s.actionCallback(), b.value = !1);
|
|
4921
4921
|
}), K(b, (w) => {
|
|
4922
4922
|
w && (d.value = !0);
|
|
4923
|
-
}), (w,
|
|
4923
|
+
}), (w, p) => (o(), a("div", {
|
|
4924
4924
|
class: H(i.value)
|
|
4925
4925
|
}, [
|
|
4926
4926
|
n("div", Ew, [
|
|
@@ -4976,7 +4976,7 @@ const Le = /* @__PURE__ */ T({
|
|
|
4976
4976
|
__name: "NmorphClearButton",
|
|
4977
4977
|
emits: ["clear"],
|
|
4978
4978
|
setup(e, { emit: t }) {
|
|
4979
|
-
const s = t, l =
|
|
4979
|
+
const s = t, l = v(
|
|
4980
4980
|
() => D({
|
|
4981
4981
|
"nmorph-input-clear-button": []
|
|
4982
4982
|
})
|
|
@@ -5014,7 +5014,7 @@ const Le = /* @__PURE__ */ T({
|
|
|
5014
5014
|
setup(e, { emit: t }) {
|
|
5015
5015
|
const s = e, l = x(s.initialStartDate), r = x(
|
|
5016
5016
|
s.initialEndDate ?? new Date(new Date(s.initialStartDate).setMonth(s.initialStartDate.getMonth() + 1))
|
|
5017
|
-
), i = x(s.modelValue), h = t, d =
|
|
5017
|
+
), i = x(s.modelValue), h = t, d = v(
|
|
5018
5018
|
() => D({
|
|
5019
5019
|
nmorph: [te[s.height]],
|
|
5020
5020
|
"nmorph-date-picker": [`${s.disabled && "disabled"}`, s.type]
|
|
@@ -5023,7 +5023,7 @@ const Le = /* @__PURE__ */ T({
|
|
|
5023
5023
|
u.value = !1;
|
|
5024
5024
|
}, k = () => {
|
|
5025
5025
|
u.value = !u.value;
|
|
5026
|
-
}, y =
|
|
5026
|
+
}, y = v(() => i.value ? Array.isArray(i.value) ? i.value.length === 0 ? s.placeholder : ce(i.value).join(", ") : ce(i.value) : s.placeholder), b = v(() => {
|
|
5027
5027
|
if (Array.isArray(i.value)) {
|
|
5028
5028
|
const V = ce(i.value[0]) ?? s.startDatePlaceholder, C = ce(i.value[1]) ?? s.endDatePlaceholder;
|
|
5029
5029
|
return {
|
|
@@ -5037,7 +5037,7 @@ const Le = /* @__PURE__ */ T({
|
|
|
5037
5037
|
i.value = V, h("update:modelValue", i.value);
|
|
5038
5038
|
};
|
|
5039
5039
|
s.type === "date" && Array.isArray(i.value) && console.warn('If you decide to use type "date" the passed property must be an Date object'), (s.type === "dates" || s.type === "daterange") && !Array.isArray(i.value) && console.warn('If you decide to use type "dates" or "daterange" the passed property must be an array');
|
|
5040
|
-
const
|
|
5040
|
+
const p = (V) => {
|
|
5041
5041
|
const C = V;
|
|
5042
5042
|
if (Array.isArray(i.value)) {
|
|
5043
5043
|
if (s.type === "dates") {
|
|
@@ -5047,7 +5047,7 @@ const Le = /* @__PURE__ */ T({
|
|
|
5047
5047
|
} else
|
|
5048
5048
|
i.value = C;
|
|
5049
5049
|
h("update:modelValue", i.value);
|
|
5050
|
-
}, $ =
|
|
5050
|
+
}, $ = v(() => Array.isArray(i.value) ? i.value.length > 0 : !!i.value), f = (V) => {
|
|
5051
5051
|
Array.isArray(i.value) && (i.value[0] = V, h("update:modelValue", i.value));
|
|
5052
5052
|
}, z = (V) => {
|
|
5053
5053
|
Array.isArray(i.value) && (i.value[1] = V, h("update:modelValue", i.value));
|
|
@@ -5089,7 +5089,7 @@ const Le = /* @__PURE__ */ T({
|
|
|
5089
5089
|
"selected-values": i.value,
|
|
5090
5090
|
"initial-date": l.value,
|
|
5091
5091
|
type: V.type,
|
|
5092
|
-
onUpdateSelectedValue:
|
|
5092
|
+
onUpdateSelectedValue: p
|
|
5093
5093
|
}, null, 8, ["selected-values", "initial-date", "type"])
|
|
5094
5094
|
]),
|
|
5095
5095
|
_: 1
|
|
@@ -5177,7 +5177,7 @@ const s$ = { class: "nmorph-year-month-picker__header" }, a$ = { class: "nmorph-
|
|
|
5177
5177
|
deep: !0
|
|
5178
5178
|
}
|
|
5179
5179
|
);
|
|
5180
|
-
const u = t, m =
|
|
5180
|
+
const u = t, m = v(
|
|
5181
5181
|
() => D({
|
|
5182
5182
|
"nmorph-year-month-picker": []
|
|
5183
5183
|
})
|
|
@@ -5195,7 +5195,7 @@ const s$ = { class: "nmorph-year-month-picker__header" }, a$ = { class: "nmorph-
|
|
|
5195
5195
|
$ === "decrease" ? h.value = h.value - 1 : h.value = h.value + 1, u("update-year", String(h.value));
|
|
5196
5196
|
}, b = ($) => {
|
|
5197
5197
|
$ === "decrease" ? l.type === "year" ? k("decrease") : y("decrease") : l.type === "year" ? k("increase") : y("increase");
|
|
5198
|
-
}, w =
|
|
5198
|
+
}, w = v(() => l.type === "year" ? `${r.value[0].label} - ${r.value[r.value.length - 1].label}` : String(h.value)), p = () => {
|
|
5199
5199
|
l.type === "month" && u("back-to-years");
|
|
5200
5200
|
};
|
|
5201
5201
|
return ($, f) => (o(), a("div", {
|
|
@@ -5219,7 +5219,7 @@ const s$ = { class: "nmorph-year-month-picker__header" }, a$ = { class: "nmorph-
|
|
|
5219
5219
|
M(_(W), {
|
|
5220
5220
|
text: w.value,
|
|
5221
5221
|
"style-type": "transparent",
|
|
5222
|
-
onClick:
|
|
5222
|
+
onClick: p
|
|
5223
5223
|
}, null, 8, ["text"])
|
|
5224
5224
|
]),
|
|
5225
5225
|
M(_(W), {
|
|
@@ -5256,11 +5256,11 @@ const ve = /* @__PURE__ */ T({
|
|
|
5256
5256
|
},
|
|
5257
5257
|
emits: ["update-selected-value"],
|
|
5258
5258
|
setup(e, { emit: t }) {
|
|
5259
|
-
const s = e, l = t, r =
|
|
5259
|
+
const s = e, l = t, r = v(
|
|
5260
5260
|
() => D({
|
|
5261
5261
|
"nmorph-date-picker-content": []
|
|
5262
5262
|
})
|
|
5263
|
-
), i = x(s.initialDate), h = x("calendar"), d =
|
|
5263
|
+
), i = x(s.initialDate), h = x("calendar"), d = v(() => new Date(i.value.setMonth(i.value.getMonth() - 1))), u = v(() => new Date(i.value.setMonth(i.value.getMonth() + 1))), m = v(() => new Date(i.value.setFullYear(i.value.getFullYear() - 1))), g = v(() => new Date(i.value.setFullYear(i.value.getFullYear() + 1))), k = () => {
|
|
5264
5264
|
i.value = d.value;
|
|
5265
5265
|
}, y = () => {
|
|
5266
5266
|
i.value = u.value;
|
|
@@ -5268,7 +5268,7 @@ const ve = /* @__PURE__ */ T({
|
|
|
5268
5268
|
i.value = m.value;
|
|
5269
5269
|
}, w = () => {
|
|
5270
5270
|
i.value = g.value;
|
|
5271
|
-
},
|
|
5271
|
+
}, p = () => {
|
|
5272
5272
|
h.value = "year";
|
|
5273
5273
|
}, $ = () => {
|
|
5274
5274
|
h.value = "month";
|
|
@@ -5300,7 +5300,7 @@ const ve = /* @__PURE__ */ T({
|
|
|
5300
5300
|
onNextMonth: y,
|
|
5301
5301
|
onPrevYear: b,
|
|
5302
5302
|
onNextYear: w,
|
|
5303
|
-
onChangeYear:
|
|
5303
|
+
onChangeYear: p,
|
|
5304
5304
|
onChangeMonth: $
|
|
5305
5305
|
}, null, 8, ["date"])
|
|
5306
5306
|
]),
|
|
@@ -5329,7 +5329,7 @@ const ve = /* @__PURE__ */ T({
|
|
|
5329
5329
|
},
|
|
5330
5330
|
emits: ["prev-month", "next-month", "prev-year", "next-year", "change-year", "change-month"],
|
|
5331
5331
|
setup(e, { emit: t }) {
|
|
5332
|
-
const s = e, l = t, r =
|
|
5332
|
+
const s = e, l = t, r = v(
|
|
5333
5333
|
() => D({
|
|
5334
5334
|
"nmorph-date-picker-header": []
|
|
5335
5335
|
})
|
|
@@ -5424,8 +5424,8 @@ const d$ = { class: "nmorph-file-upload__trigger" }, h$ = ["multiple"], u$ = { c
|
|
|
5424
5424
|
setup(e, { emit: t }) {
|
|
5425
5425
|
const s = e, l = (b) => b.split("/")[1], r = (b) => {
|
|
5426
5426
|
const w = l(b);
|
|
5427
|
-
let
|
|
5428
|
-
return w in me && (
|
|
5427
|
+
let p = "doc";
|
|
5428
|
+
return w in me && (p = "image"), w in ge && (p = "audio"), w in fe && (p = "video"), w in we && (p = "archive"), p;
|
|
5429
5429
|
};
|
|
5430
5430
|
let i = le(s.modelValue);
|
|
5431
5431
|
const h = x(null), d = () => {
|
|
@@ -5433,11 +5433,11 @@ const d$ = { class: "nmorph-file-upload__trigger" }, h$ = ["multiple"], u$ = { c
|
|
|
5433
5433
|
}, u = (b) => {
|
|
5434
5434
|
const w = b.target;
|
|
5435
5435
|
if (w.files) {
|
|
5436
|
-
if (Array.from(w.files).forEach((
|
|
5437
|
-
const $ = l(
|
|
5436
|
+
if (Array.from(w.files).forEach((p) => {
|
|
5437
|
+
const $ = l(p.type);
|
|
5438
5438
|
if (!s.allowedTypes.includes($))
|
|
5439
|
-
return k("on-unsupported-file-type-error",
|
|
5440
|
-
const f = URL.createObjectURL(
|
|
5439
|
+
return k("on-unsupported-file-type-error", p.type);
|
|
5440
|
+
const f = URL.createObjectURL(p), z = { data: p, previewUrl: f };
|
|
5441
5441
|
i.push(z);
|
|
5442
5442
|
}), i.length === 0)
|
|
5443
5443
|
return;
|
|
@@ -5449,13 +5449,13 @@ const d$ = { class: "nmorph-file-upload__trigger" }, h$ = ["multiple"], u$ = { c
|
|
|
5449
5449
|
i.map((b) => b.data)
|
|
5450
5450
|
);
|
|
5451
5451
|
}, g = (b) => {
|
|
5452
|
-
const w = i.findIndex((
|
|
5452
|
+
const w = i.findIndex((p) => p.data.name === b);
|
|
5453
5453
|
w !== -1 && (URL.revokeObjectURL(i[w].previewUrl), i.splice(w, 1), m());
|
|
5454
5454
|
};
|
|
5455
5455
|
Y(() => {
|
|
5456
5456
|
k("inputDOMRef", h);
|
|
5457
5457
|
});
|
|
5458
|
-
const k = t, y =
|
|
5458
|
+
const k = t, y = v(
|
|
5459
5459
|
() => D({
|
|
5460
5460
|
nmorph: [`${s.fill && "fill"}`],
|
|
5461
5461
|
"nmorph-file-upload": [`${s.disabled && "disabled"}`]
|
|
@@ -5487,24 +5487,24 @@ const d$ = { class: "nmorph-file-upload__trigger" }, h$ = ["multiple"], u$ = { c
|
|
|
5487
5487
|
tag: "div"
|
|
5488
5488
|
}, {
|
|
5489
5489
|
default: E(() => [
|
|
5490
|
-
(o(!0), a(L, null, U(_(i), ({ data:
|
|
5491
|
-
key:
|
|
5490
|
+
(o(!0), a(L, null, U(_(i), ({ data: p, previewUrl: $ }) => (o(), a("div", {
|
|
5491
|
+
key: p.name,
|
|
5492
5492
|
class: "nmorph-file-upload__file"
|
|
5493
5493
|
}, [
|
|
5494
5494
|
M(_(_2), { src: $ }, null, 8, ["src"]),
|
|
5495
5495
|
n("div", _$, [
|
|
5496
5496
|
M(_(q), {
|
|
5497
|
-
name: r(
|
|
5497
|
+
name: r(p.type),
|
|
5498
5498
|
width: "14px",
|
|
5499
5499
|
height: "17px"
|
|
5500
5500
|
}, null, 8, ["name"]),
|
|
5501
|
-
n("span", v$, R(
|
|
5501
|
+
n("span", v$, R(p.name), 1)
|
|
5502
5502
|
]),
|
|
5503
5503
|
n("div", p$, [
|
|
5504
5504
|
M(_(W), {
|
|
5505
5505
|
height: "thin",
|
|
5506
5506
|
"style-type": "transparent",
|
|
5507
|
-
onClick: (f) => g(
|
|
5507
|
+
onClick: (f) => g(p.name)
|
|
5508
5508
|
}, {
|
|
5509
5509
|
default: E(() => [
|
|
5510
5510
|
M(_(q), { name: "error" })
|
|
@@ -5535,7 +5535,7 @@ const f$ = {
|
|
|
5535
5535
|
},
|
|
5536
5536
|
emits: ["formValidator"],
|
|
5537
5537
|
setup(e, { emit: t }) {
|
|
5538
|
-
const s = e, l =
|
|
5538
|
+
const s = e, l = v(
|
|
5539
5539
|
() => D({
|
|
5540
5540
|
"nmorph-form": []
|
|
5541
5541
|
})
|
|
@@ -5558,7 +5558,7 @@ const f$ = {
|
|
|
5558
5558
|
staticHeight: { type: Boolean, default: !1 }
|
|
5559
5559
|
},
|
|
5560
5560
|
setup(e) {
|
|
5561
|
-
const t = e, s =
|
|
5561
|
+
const t = e, s = v(() => (Array.isArray(t.errors) ? t.errors : t.errors.value).reverse()), l = v(
|
|
5562
5562
|
() => D({
|
|
5563
5563
|
nmorph: [te[t.height]],
|
|
5564
5564
|
"nmorph-error-box": [`${t.staticHeight && "static-height"}`, `${s.value.length === 0 && "empty"}`]
|
|
@@ -5592,11 +5592,11 @@ const xe = "18px", x$ = /* @__PURE__ */ T({
|
|
|
5592
5592
|
I((r) => ({
|
|
5593
5593
|
bd9433c4: xe
|
|
5594
5594
|
}));
|
|
5595
|
-
const t = e, s =
|
|
5595
|
+
const t = e, s = v(
|
|
5596
5596
|
() => D({
|
|
5597
5597
|
"nmorph-validation-icon": [t.valid ? "valid" : "invalid"]
|
|
5598
5598
|
})
|
|
5599
|
-
), l =
|
|
5599
|
+
), l = v(() => t.valid ? "success" : "error");
|
|
5600
5600
|
return (r, i) => (o(), a("div", {
|
|
5601
5601
|
class: H(s.value)
|
|
5602
5602
|
}, [
|
|
@@ -5621,9 +5621,9 @@ const y$ = { key: 0 }, M$ = { class: "nmorph-form-item__content" }, b$ = /* @__P
|
|
|
5621
5621
|
validate: { type: Boolean, default: !0 }
|
|
5622
5622
|
},
|
|
5623
5623
|
setup(e) {
|
|
5624
|
-
const t = e, s = Q("form-data", void 0), l =
|
|
5624
|
+
const t = e, s = Q("form-data", void 0), l = v(() => s?.fields[t.id]), r = v(() => t.validate && l.value), i = v(
|
|
5625
5625
|
() => !!r.value && !!l?.value?.touched && t.showValidationIcon
|
|
5626
|
-
), h =
|
|
5626
|
+
), h = v(() => r.value && l.value?.touched), d = v(
|
|
5627
5627
|
() => D({
|
|
5628
5628
|
"nmorph-form-item": [
|
|
5629
5629
|
`${t.label && "labeled"}`,
|
|
@@ -5673,10 +5673,10 @@ const k$ = { class: "nmorph-number-input__content" }, V$ = { class: "nmorph-numb
|
|
|
5673
5673
|
},
|
|
5674
5674
|
emits: ["inputDOMRef", "update:modelValue"],
|
|
5675
5675
|
setup(e, { emit: t }) {
|
|
5676
|
-
I((
|
|
5676
|
+
I((p) => ({
|
|
5677
5677
|
f154b2b0: m.value
|
|
5678
5678
|
}));
|
|
5679
|
-
const s = e, l =
|
|
5679
|
+
const s = e, l = v(
|
|
5680
5680
|
() => D({
|
|
5681
5681
|
nmorph: [te[s.height], `${s.fill && "fill"}`],
|
|
5682
5682
|
"nmorph-number-input": [
|
|
@@ -5688,7 +5688,7 @@ const k$ = { class: "nmorph-number-input__content" }, V$ = { class: "nmorph-numb
|
|
|
5688
5688
|
r.value += s.step;
|
|
5689
5689
|
}, h = () => {
|
|
5690
5690
|
r.value -= s.step;
|
|
5691
|
-
}, d =
|
|
5691
|
+
}, d = v(() => r.value <= s.min), u = v(() => r.value >= s.max), m = v(() => s.height === "thick" ? "16px" : "12px"), g = {
|
|
5692
5692
|
thick: {
|
|
5693
5693
|
default: "12px",
|
|
5694
5694
|
right: "8px"
|
|
@@ -5701,26 +5701,26 @@ const k$ = { class: "nmorph-number-input__content" }, V$ = { class: "nmorph-numb
|
|
|
5701
5701
|
default: "8px",
|
|
5702
5702
|
right: "5px"
|
|
5703
5703
|
}
|
|
5704
|
-
}, k =
|
|
5705
|
-
const
|
|
5706
|
-
return g[s.height][
|
|
5707
|
-
}), y = t, b = (
|
|
5708
|
-
const $ =
|
|
5704
|
+
}, k = v(() => {
|
|
5705
|
+
const p = s.actionBtnPositionRight ? "right" : "default";
|
|
5706
|
+
return g[s.height][p];
|
|
5707
|
+
}), y = t, b = (p) => {
|
|
5708
|
+
const $ = p.target;
|
|
5709
5709
|
let f = Number($.value);
|
|
5710
5710
|
r.value = f;
|
|
5711
5711
|
};
|
|
5712
|
-
K(r, (
|
|
5713
|
-
|
|
5712
|
+
K(r, (p) => {
|
|
5713
|
+
p > s.max && (r.value = s.max, w.value?.blur()), r.value < s.min && (r.value = s.min, w.value?.blur()), y("update:modelValue", p);
|
|
5714
5714
|
}), Y(() => {
|
|
5715
5715
|
y("inputDOMRef", w);
|
|
5716
5716
|
});
|
|
5717
5717
|
const w = x(null);
|
|
5718
|
-
return (
|
|
5718
|
+
return (p, $) => (o(), a("div", {
|
|
5719
5719
|
class: H(l.value)
|
|
5720
5720
|
}, [
|
|
5721
5721
|
n("div", k$, [
|
|
5722
5722
|
n("div", V$, [
|
|
5723
|
-
|
|
5723
|
+
p.actionBtnPositionRight ? O("", !0) : (o(), a("div", H$, [
|
|
5724
5724
|
M(_(W), {
|
|
5725
5725
|
"style-type": "transparent",
|
|
5726
5726
|
disabled: d.value,
|
|
@@ -5747,7 +5747,7 @@ const k$ = { class: "nmorph-number-input__content" }, V$ = { class: "nmorph-numb
|
|
|
5747
5747
|
max: s.max,
|
|
5748
5748
|
onInput: b
|
|
5749
5749
|
}, null, 40, z$),
|
|
5750
|
-
|
|
5750
|
+
p.actionBtnPositionRight ? (o(), a("div", C$, [
|
|
5751
5751
|
n("div", S$, [
|
|
5752
5752
|
M(_(W), {
|
|
5753
5753
|
"style-type": "transparent",
|
|
@@ -5837,7 +5837,7 @@ const T$ = { class: "nmorph-select__content" }, O$ = {
|
|
|
5837
5837
|
}
|
|
5838
5838
|
l("update:modelValue", r.value);
|
|
5839
5839
|
}
|
|
5840
|
-
}, g =
|
|
5840
|
+
}, g = v(
|
|
5841
5841
|
() => D({
|
|
5842
5842
|
nmorph: [te[s.height], `${s.fill && "fill"}`],
|
|
5843
5843
|
"nmorph-select": [
|
|
@@ -5862,7 +5862,7 @@ const T$ = { class: "nmorph-select__content" }, O$ = {
|
|
|
5862
5862
|
}), pe(() => {
|
|
5863
5863
|
document.removeEventListener("click", y);
|
|
5864
5864
|
});
|
|
5865
|
-
const b =
|
|
5865
|
+
const b = v(() => typeof r.value == "string" ? r.value === "" ? s.noElementPlaceholder : s.options.find((f) => f.value === r.value)?.label : r.value), w = v(() => s.options.length > 0 ? s.options : s.optionsMap), p = v(() => w.value.length > 0 ? w.value.filter((z) => r.value.includes(z.value)).map((z) => ({ text: z.label, value: z.value })) : Array.isArray(r.value) ? r.value.map((z) => ({ text: z, value: z })) : [{ text: r.value, value: r.value }]);
|
|
5866
5866
|
J("select-selected-value", r), J("select-change-selected-value", m);
|
|
5867
5867
|
const $ = x(null);
|
|
5868
5868
|
return (f, z) => (o(), a("div", {
|
|
@@ -5877,12 +5877,12 @@ const T$ = { class: "nmorph-select__content" }, O$ = {
|
|
|
5877
5877
|
}, [
|
|
5878
5878
|
typeof r.value == "string" ? (o(), a("div", O$, R(b.value), 1)) : O("", !0),
|
|
5879
5879
|
r.value.length <= 0 ? (o(), a("div", q$, R(s.noElementPlaceholder), 1)) : (o(), a("div", P$, [
|
|
5880
|
-
(o(!0), a(L, null, U(
|
|
5880
|
+
(o(!0), a(L, null, U(p.value, (V) => (o(), P(_(g2), ye({
|
|
5881
5881
|
key: V.value,
|
|
5882
5882
|
ref_for: !0
|
|
5883
5883
|
}, V, {
|
|
5884
5884
|
transparent: "",
|
|
5885
|
-
removable:
|
|
5885
|
+
removable: p.value.length > 1 || !s.valueRequired,
|
|
5886
5886
|
height: "thin",
|
|
5887
5887
|
onClose: m
|
|
5888
5888
|
}), null, 16, ["removable"]))), 128))
|
|
@@ -5931,7 +5931,7 @@ const E$ = { class: "nmorph-select-option__content" }, z2 = /* @__PURE__ */ T({
|
|
|
5931
5931
|
setup(e, { emit: t }) {
|
|
5932
5932
|
const s = Q("select-selected-value", void 0), l = Q("select-change-selected-value", void 0), r = e, i = t, h = () => {
|
|
5933
5933
|
r.disabled || (i("change-value", r.value), l && l(r.value));
|
|
5934
|
-
}, d =
|
|
5934
|
+
}, d = v(() => typeof s?.value == "string" ? s.value === r.value : Array.isArray(s?.value) ? s.value.some((m) => m === r.value) : !1), u = v(
|
|
5935
5935
|
() => D({
|
|
5936
5936
|
nmorph: [te[r.height]],
|
|
5937
5937
|
"nmorph-select-option": [
|
|
@@ -5973,7 +5973,7 @@ const F$ = { class: "nmorph-slider__content" }, j$ = { class: "nmorph-slider__in
|
|
|
5973
5973
|
I((V) => ({
|
|
5974
5974
|
a08b3702: r
|
|
5975
5975
|
}));
|
|
5976
|
-
const s = e, l =
|
|
5976
|
+
const s = e, l = v(
|
|
5977
5977
|
() => D({
|
|
5978
5978
|
nmorph: [`${s.fill && "fill"}`],
|
|
5979
5979
|
"nmorph-slider": [`${s.disabled && "disabled"}`]
|
|
@@ -5982,7 +5982,7 @@ const F$ = { class: "nmorph-slider__content" }, j$ = { class: "nmorph-slider__in
|
|
|
5982
5982
|
K(d, () => {
|
|
5983
5983
|
h("update:modelValue", d.value);
|
|
5984
5984
|
});
|
|
5985
|
-
const m =
|
|
5985
|
+
const m = v(() => {
|
|
5986
5986
|
const V = g.value - g.value, C = s.max - s.min + V, S = (d.value - s.min) / C * 100, B = u.value?.clientWidth || 0, F = Ue / B * 100, j = F / 2;
|
|
5987
5987
|
let X = S - j;
|
|
5988
5988
|
const G = `${Math.max(0, Math.min(100 - F, X))}%`, Z = `${X + j}%`;
|
|
@@ -6008,7 +6008,7 @@ const F$ = { class: "nmorph-slider__content" }, j$ = { class: "nmorph-slider__in
|
|
|
6008
6008
|
d.value = Math.round(d.value / s.step) * s.step, d.value = Math.max(s.min, Math.min(s.max, d.value));
|
|
6009
6009
|
}, w = () => {
|
|
6010
6010
|
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", w);
|
|
6011
|
-
},
|
|
6011
|
+
}, p = () => {
|
|
6012
6012
|
s.disabled || (document.addEventListener("mousemove", b), document.addEventListener("mouseup", w));
|
|
6013
6013
|
}, $ = x(null), f = () => {
|
|
6014
6014
|
s.showTooltip && (i.value = !0);
|
|
@@ -6039,7 +6039,7 @@ const F$ = { class: "nmorph-slider__content" }, j$ = { class: "nmorph-slider__in
|
|
|
6039
6039
|
style: N({ left: m.value.thumb }),
|
|
6040
6040
|
onMouseenter: f,
|
|
6041
6041
|
onMouseleave: z,
|
|
6042
|
-
onMousedown:
|
|
6042
|
+
onMousedown: p
|
|
6043
6043
|
}, null, 36)
|
|
6044
6044
|
], 512)
|
|
6045
6045
|
])
|
|
@@ -6059,7 +6059,7 @@ const L$ = ["value", "disabled"], U$ = { class: "nmorph-switch-thumb" }, Y$ = /*
|
|
|
6059
6059
|
},
|
|
6060
6060
|
emits: ["inputDOMRef", "update:modelValue"],
|
|
6061
6061
|
setup(e, { emit: t }) {
|
|
6062
|
-
const s = e, l =
|
|
6062
|
+
const s = e, l = v(
|
|
6063
6063
|
() => D({
|
|
6064
6064
|
"nmorph-switch": [
|
|
6065
6065
|
`${s.disabled && "disabled"}`,
|
|
@@ -6131,7 +6131,7 @@ const G$ = { class: "nmorph-text-input__input-side" }, K$ = {
|
|
|
6131
6131
|
I(($) => ({
|
|
6132
6132
|
"1b4d3fbc": w.value
|
|
6133
6133
|
}));
|
|
6134
|
-
const s = e, l =
|
|
6134
|
+
const s = e, l = v(
|
|
6135
6135
|
() => D({
|
|
6136
6136
|
nmorph: [te[s.height], `${u.value && "focused"}`, `${s.fill && "fill"}`],
|
|
6137
6137
|
"nmorph-text-input": [`${s.typePassword && "password"}`]
|
|
@@ -6141,7 +6141,7 @@ const G$ = { class: "nmorph-text-input__input-side" }, K$ = {
|
|
|
6141
6141
|
y("update:modelValue", f.value);
|
|
6142
6142
|
}, i = x(!1), h = () => {
|
|
6143
6143
|
s.clearable ? y("update:modelValue", "") : i.value = !i.value;
|
|
6144
|
-
}, d =
|
|
6144
|
+
}, d = v(() => s.typePassword && !i.value && !s.clearable ? "password" : "text"), u = x(!1), m = () => {
|
|
6145
6145
|
y("focus"), u.value = !0;
|
|
6146
6146
|
}, g = () => {
|
|
6147
6147
|
y("blur"), u.value = !1;
|
|
@@ -6149,12 +6149,12 @@ const G$ = { class: "nmorph-text-input__input-side" }, K$ = {
|
|
|
6149
6149
|
Y(() => {
|
|
6150
6150
|
y("inputDOMRef", k);
|
|
6151
6151
|
});
|
|
6152
|
-
const b =
|
|
6152
|
+
const b = v(() => s.clearable ? "error" : i.value ? "eye-blocked" : "eye"), w = v(() => p["prepend-icon"] ? "28px" : "8px"), p = Xe();
|
|
6153
6153
|
return ($, f) => (o(), a("div", {
|
|
6154
6154
|
class: H(l.value)
|
|
6155
6155
|
}, [
|
|
6156
6156
|
n("div", G$, [
|
|
6157
|
-
_(
|
|
6157
|
+
_(p)["prepend-icon"] ? (o(), a("div", K$, [
|
|
6158
6158
|
A($.$slots, "prepend-icon")
|
|
6159
6159
|
])) : O("", !0),
|
|
6160
6160
|
n("input", {
|
|
@@ -6211,7 +6211,7 @@ const J$ = { class: "nmorph-time-picker__content" }, Q$ = { class: "nmorph-time-
|
|
|
6211
6211
|
});
|
|
6212
6212
|
const m = () => {
|
|
6213
6213
|
h.value = !h.value;
|
|
6214
|
-
}, g =
|
|
6214
|
+
}, g = v(
|
|
6215
6215
|
() => D({
|
|
6216
6216
|
nmorph: [te[s.height]],
|
|
6217
6217
|
"nmorph-time-picker": [`${s.disabled && "disabled"}`, `${h.value && "open"}`]
|
|
@@ -6221,7 +6221,7 @@ const J$ = { class: "nmorph-time-picker__content" }, Q$ = { class: "nmorph-time-
|
|
|
6221
6221
|
}, w = (S) => {
|
|
6222
6222
|
const B = S;
|
|
6223
6223
|
d.value = [B, d.value[1], d.value[2]], b();
|
|
6224
|
-
},
|
|
6224
|
+
}, p = (S) => {
|
|
6225
6225
|
const B = S;
|
|
6226
6226
|
d.value = [d.value[0], B, d.value[2]], b();
|
|
6227
6227
|
}, $ = (S) => {
|
|
@@ -6238,7 +6238,7 @@ const J$ = { class: "nmorph-time-picker__content" }, Q$ = { class: "nmorph-time-
|
|
|
6238
6238
|
const S = ke(s.modelValue).split(":").map((B) => Number(B));
|
|
6239
6239
|
d.value = S;
|
|
6240
6240
|
})();
|
|
6241
|
-
const V =
|
|
6241
|
+
const V = v(() => `${_e}px`), C = v(() => u.value ? "——:——:——" : ke(s.modelValue));
|
|
6242
6242
|
return (S, B) => {
|
|
6243
6243
|
const F = Je("NmorphTimeRoller");
|
|
6244
6244
|
return o(), a("div", {
|
|
@@ -6285,7 +6285,7 @@ const J$ = { class: "nmorph-time-picker__content" }, Q$ = { class: "nmorph-time-
|
|
|
6285
6285
|
"selected-value": d.value[1],
|
|
6286
6286
|
"disabled-range": S.disabledMinutes,
|
|
6287
6287
|
"step-height": _e,
|
|
6288
|
-
onValueChanged:
|
|
6288
|
+
onValueChanged: p
|
|
6289
6289
|
}, null, 8, ["set-value-on-mount", "values", "selected-value", "disabled-range"]),
|
|
6290
6290
|
M(F, {
|
|
6291
6291
|
"set-value-on-mount": !u.value,
|
|
@@ -6343,7 +6343,7 @@ const ke = (e) => {
|
|
|
6343
6343
|
void 0
|
|
6344
6344
|
), r = e, i = () => {
|
|
6345
6345
|
l && !r.disabled && l(r.value);
|
|
6346
|
-
}, h =
|
|
6346
|
+
}, h = v(() => s?.value === r.value), d = v(
|
|
6347
6347
|
() => D({
|
|
6348
6348
|
"nmorph-radio": [`${r.disabled && "disabled"}`, `${h.value && "checked"}`, r.styleType]
|
|
6349
6349
|
})
|
|
@@ -6414,7 +6414,7 @@ const ux = { class: "nmorph-radio-group__wrapper" }, _x = { class: "nmorph-radio
|
|
|
6414
6414
|
);
|
|
6415
6415
|
const r = t, i = (d) => {
|
|
6416
6416
|
l.value = d, r("update:modelValue", l.value);
|
|
6417
|
-
}, h =
|
|
6417
|
+
}, h = v(
|
|
6418
6418
|
() => D({ "nmorph-radio-group": [s.styleType, s.direction, `${s.fill && "fill"}`] })
|
|
6419
6419
|
);
|
|
6420
6420
|
return J("radio-group-selected-value", l), J("change-radio-button-value-handler", i), (d, u) => (o(), a("div", {
|
|
@@ -6448,7 +6448,7 @@ const vx = /* @__PURE__ */ T({
|
|
|
6448
6448
|
"28ac814d": r.value,
|
|
6449
6449
|
"5c1e7dcc": i.value
|
|
6450
6450
|
}));
|
|
6451
|
-
const s = e, l = t, r =
|
|
6451
|
+
const s = e, l = t, r = v(() => `${s.right}px`), i = v(() => `${s.bottom}px`), h = v(
|
|
6452
6452
|
() => D({
|
|
6453
6453
|
"nmorph-backtop": [`${m.value && "show"}`]
|
|
6454
6454
|
})
|
|
@@ -6502,7 +6502,7 @@ const px = ["id"], mx = {
|
|
|
6502
6502
|
setup(e) {
|
|
6503
6503
|
const t = e, s = x([]), l = he();
|
|
6504
6504
|
J("breadcrumb-data", { breadcrumbs: s, breadcrumbId: l });
|
|
6505
|
-
const r =
|
|
6505
|
+
const r = v(
|
|
6506
6506
|
() => D({
|
|
6507
6507
|
"nmorph-breadcrumb": []
|
|
6508
6508
|
})
|
|
@@ -6531,7 +6531,7 @@ const gx = /* @__PURE__ */ T({
|
|
|
6531
6531
|
replace: { type: Boolean, default: !1 }
|
|
6532
6532
|
},
|
|
6533
6533
|
setup(e) {
|
|
6534
|
-
const t = e, s =
|
|
6534
|
+
const t = e, s = v(
|
|
6535
6535
|
() => D({
|
|
6536
6536
|
"nmorph-breadcrumb-item": []
|
|
6537
6537
|
})
|
|
@@ -6583,11 +6583,11 @@ const re = /* @__PURE__ */ T({
|
|
|
6583
6583
|
relativeElement: s.relativeElement,
|
|
6584
6584
|
yOffset: s.yOffset,
|
|
6585
6585
|
xOffset: s.xOffset
|
|
6586
|
-
}), h =
|
|
6586
|
+
}), h = v(
|
|
6587
6587
|
() => D({
|
|
6588
6588
|
"nmorph-dropdown": [`${!s.open && "closed"}`]
|
|
6589
6589
|
})
|
|
6590
|
-
), d =
|
|
6590
|
+
), d = v(() => s.fillWidth ? `${s.relativeElement?.clientWidth}px` : `${s.width}px`), u = () => {
|
|
6591
6591
|
l("on-outside-click");
|
|
6592
6592
|
};
|
|
6593
6593
|
return (m, g) => (o(), P(_($e), {
|
|
@@ -6617,7 +6617,7 @@ const wx = { class: "nmorph-tabs__label-list" }, $x = ["id", "onClick"], xx = {
|
|
|
6617
6617
|
},
|
|
6618
6618
|
emits: ["update:model-value", "tab-change"],
|
|
6619
6619
|
setup(e, { emit: t }) {
|
|
6620
|
-
const s = e, l = t, r =
|
|
6620
|
+
const s = e, l = t, r = v(
|
|
6621
6621
|
() => D({
|
|
6622
6622
|
"nmorph-tabs": [`${s.stretch && "stretch"}`]
|
|
6623
6623
|
})
|
|
@@ -6672,7 +6672,7 @@ const Ae = (e, t) => {
|
|
|
6672
6672
|
disabled: { type: Boolean, default: !1 }
|
|
6673
6673
|
},
|
|
6674
6674
|
setup(e) {
|
|
6675
|
-
const t = e, s =
|
|
6675
|
+
const t = e, s = v(
|
|
6676
6676
|
() => D({
|
|
6677
6677
|
"nmorph-tab-pane": []
|
|
6678
6678
|
})
|
|
@@ -6701,7 +6701,7 @@ const Ae = (e, t) => {
|
|
|
6701
6701
|
direction: { default: "horizontal" }
|
|
6702
6702
|
},
|
|
6703
6703
|
setup(e) {
|
|
6704
|
-
const t = e, s =
|
|
6704
|
+
const t = e, s = v(
|
|
6705
6705
|
() => D({
|
|
6706
6706
|
"nmorph-divider": [t.direction]
|
|
6707
6707
|
})
|
|
@@ -6720,7 +6720,7 @@ const $e = /* @__PURE__ */ T({
|
|
|
6720
6720
|
},
|
|
6721
6721
|
emits: ["on-outside-click"],
|
|
6722
6722
|
setup(e, { emit: t }) {
|
|
6723
|
-
const s = e, l =
|
|
6723
|
+
const s = e, l = v(
|
|
6724
6724
|
() => D({
|
|
6725
6725
|
"nmorph-overlay": [
|
|
6726
6726
|
`${s.outsideClickEmitEvent && "outside-click"}`,
|
|
@@ -6750,28 +6750,32 @@ const Vx = /* @__PURE__ */ T({
|
|
|
6750
6750
|
props: {
|
|
6751
6751
|
notifications: {},
|
|
6752
6752
|
placement: { default: "top-right" },
|
|
6753
|
-
zIndex: { default: 1e3 }
|
|
6753
|
+
zIndex: { default: 1e3 },
|
|
6754
|
+
quantity: { default: 100 }
|
|
6754
6755
|
},
|
|
6755
6756
|
setup(e) {
|
|
6756
|
-
const t = x([]), s =
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6757
|
+
const t = x([]), s = v(() => i.notifications.filter((d) => !t.value.includes(d.id))), l = v(() => {
|
|
6758
|
+
const d = Math.max(s.value.length - i.quantity, 0);
|
|
6759
|
+
return s.value.slice(d);
|
|
6760
|
+
}), r = (d) => {
|
|
6761
|
+
t.value = [...t.value, d];
|
|
6762
|
+
}, i = e, h = v(() => i.zIndex);
|
|
6763
|
+
return (d, u) => (o(), a("div", {
|
|
6764
|
+
class: H(`nmorph-notification-provider nmorph-notification-provider--${i.placement}`),
|
|
6765
|
+
style: N({ zIndex: h.value })
|
|
6762
6766
|
}, [
|
|
6763
6767
|
M(de, {
|
|
6764
6768
|
name: "nmorph-notification",
|
|
6765
6769
|
tag: "div"
|
|
6766
6770
|
}, {
|
|
6767
6771
|
default: E(() => [
|
|
6768
|
-
(o(!0), a(L, null, U(
|
|
6769
|
-
key:
|
|
6770
|
-
style: N({ width:
|
|
6772
|
+
(o(!0), a(L, null, U(l.value, (m) => (o(), a("div", {
|
|
6773
|
+
key: m.id,
|
|
6774
|
+
style: N({ width: m.width }),
|
|
6771
6775
|
class: "nmorph-notification-provider__notification"
|
|
6772
6776
|
}, [
|
|
6773
|
-
M(_(w2), ye({ ref_for: !0 },
|
|
6774
|
-
onClose: () =>
|
|
6777
|
+
M(_(w2), ye({ ref_for: !0 }, m, {
|
|
6778
|
+
onClose: () => r(m.id)
|
|
6775
6779
|
}), null, 16, ["onClose"])
|
|
6776
6780
|
], 4))), 128))
|
|
6777
6781
|
]),
|
|
@@ -6780,7 +6784,7 @@ const Vx = /* @__PURE__ */ T({
|
|
|
6780
6784
|
], 6));
|
|
6781
6785
|
}
|
|
6782
6786
|
});
|
|
6783
|
-
const Hx = /* @__PURE__ */ Be(Vx, [["__scopeId", "data-v-
|
|
6787
|
+
const Hx = /* @__PURE__ */ Be(Vx, [["__scopeId", "data-v-7dfd8bbe"]]);
|
|
6784
6788
|
var T2 = /* @__PURE__ */ ((e) => (e["top-left"] = "top-left", e["top-center"] = "top-center", e["top-right"] = "top-right", e["bottom-left"] = "bottom-left", e["bottom-center"] = "bottom-center", e["bottom-right"] = "bottom-right", e))(T2 || {});
|
|
6785
6789
|
const zx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6786
6790
|
__proto__: null,
|