@nmorph/nmorph-ui-kit 3.0.5 → 3.0.7
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/assets/icons/hand.svg.js +2 -2
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +9 -9
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +34 -36
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +80 -78
- package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +18 -15
- package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -1
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +60 -60
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +118 -94
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +19 -19
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +72 -39
- package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -1
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +5 -5
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +80 -56
- package/dist/components/data/nmorph-table/NmorphTable.css +1 -1
- package/dist/components/data/nmorph-table/NmorphTable.vue.js +114 -162
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +41 -38
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -1
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +8 -8
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +64 -24
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.css +1 -1
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.css +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +0 -3
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -0
- package/dist/src/components/data/nmorph-pagination/types.d.ts +3 -0
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +2 -21
- package/dist/src/components/data/nmorph-table/types.d.ts +11 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './NmorphDrawer.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { createCssSizeVariables as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
2
|
+
import { defineComponent as C, useSlots as N, ref as y, computed as i, watch as S, onBeforeUnmount as b, nextTick as B } from "vue";
|
|
3
|
+
import { useModifiers as A } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssSizeVariables as F } from "../../../utils/common.js";
|
|
5
|
+
import V from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
|
|
6
|
+
import x from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
7
|
+
import z from "../../../assets/icons/cross.svg.js";
|
|
8
|
+
const v = 220, M = /* @__PURE__ */ C({
|
|
9
9
|
__name: "NmorphDrawer",
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: { type: Boolean, required: !1, default: !1 },
|
|
@@ -21,30 +21,70 @@ const w = /* @__PURE__ */ m({
|
|
|
21
21
|
contentClass: { type: String, required: !1, default: "" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["on-close", "update:model-value"],
|
|
24
|
-
setup(
|
|
25
|
-
|
|
26
|
-
const e =
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
setup(h, { expose: w, emit: q }) {
|
|
25
|
+
w();
|
|
26
|
+
const e = h, u = q, m = N(), n = y(e.modelValue), o = y(e.modelValue);
|
|
27
|
+
let r = null, t = null;
|
|
28
|
+
const g = i(
|
|
29
|
+
() => A({
|
|
30
|
+
"nmorph-drawer": [e.placement, o.value && "open"]
|
|
29
31
|
})
|
|
30
|
-
),
|
|
31
|
-
() =>
|
|
32
|
+
), O = i(
|
|
33
|
+
() => F({
|
|
32
34
|
"--nmorph-private-drawer-size": e.size
|
|
33
35
|
})
|
|
34
|
-
),
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
e.closeOnOverlay &&
|
|
38
|
-
},
|
|
39
|
-
|
|
36
|
+
), d = () => {
|
|
37
|
+
u("on-close"), u("update:model-value", !1);
|
|
38
|
+
}, T = () => {
|
|
39
|
+
e.closeOnOverlay && d();
|
|
40
|
+
}, _ = i(() => !!(m.header || e.title || e.showClose)), a = () => {
|
|
41
|
+
r === null || typeof window > "u" || (cancelAnimationFrame(r), r = null);
|
|
42
|
+
}, s = () => {
|
|
43
|
+
t !== null && (clearTimeout(t), t = null);
|
|
44
|
+
}, p = async () => {
|
|
45
|
+
if (s(), n.value = !0, typeof window > "u") {
|
|
46
|
+
o.value = !0;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
await B(), a(), r = requestAnimationFrame(() => {
|
|
50
|
+
o.value = !0, r = null;
|
|
51
|
+
});
|
|
52
|
+
}, f = () => {
|
|
53
|
+
a(), o.value = !1, n.value && (s(), t = setTimeout(() => {
|
|
54
|
+
n.value = !1, t = null;
|
|
55
|
+
}, v));
|
|
56
|
+
};
|
|
57
|
+
S(
|
|
58
|
+
() => e.modelValue,
|
|
59
|
+
(l) => {
|
|
60
|
+
if (l) {
|
|
61
|
+
p();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
f();
|
|
65
|
+
},
|
|
66
|
+
{ immediate: !0 }
|
|
67
|
+
), b(() => {
|
|
68
|
+
a(), s();
|
|
69
|
+
});
|
|
70
|
+
const c = { props: e, emit: u, slots: m, drawerTransitionDuration: v, isVisible: n, isOpen: o, get openAnimationFrame() {
|
|
71
|
+
return r;
|
|
72
|
+
}, set openAnimationFrame(l) {
|
|
73
|
+
r = l;
|
|
74
|
+
}, get closeTimeout() {
|
|
75
|
+
return t;
|
|
76
|
+
}, set closeTimeout(l) {
|
|
77
|
+
t = l;
|
|
78
|
+
}, modifiers: g, drawerStyle: O, closeHandler: d, overlayClickHandler: T, hasHeader: _, clearOpenAnimationFrame: a, clearCloseTimeout: s, openDrawer: p, closeDrawer: f, get NmorphIcon() {
|
|
79
|
+
return x;
|
|
40
80
|
}, get NmorphIconCross() {
|
|
41
|
-
return
|
|
81
|
+
return z;
|
|
42
82
|
}, get NmorphOverlay() {
|
|
43
|
-
return
|
|
83
|
+
return V;
|
|
44
84
|
} };
|
|
45
|
-
return Object.defineProperty(
|
|
85
|
+
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
46
86
|
}
|
|
47
87
|
});
|
|
48
88
|
export {
|
|
49
|
-
|
|
89
|
+
M as default
|
|
50
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-select-button{--nmorph-private-select-button-padding: max(3px, calc(var(--nmorph-private-control-height) * .1333));--nmorph-private-select-button-item-height: calc( var(--nmorph-private-control-height) - var(--nmorph-private-select-button-padding) * 2 );display:inline-flex;align-items:center;width:fit-content;padding:var(--nmorph-private-select-button-padding);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)
|
|
1
|
+
.nmorph-select-button{--nmorph-private-select-button-padding: max(3px, calc(var(--nmorph-private-control-height) * .1333));--nmorph-private-select-button-item-height: calc( var(--nmorph-private-control-height) - var(--nmorph-private-select-button-padding) * 2 );display:inline-flex;align-items:center;width:fit-content;padding:var(--nmorph-private-select-button-padding);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-select-button.nmorph-select-button--disabled{cursor:not-allowed;opacity:.6}.nmorph-select-button.nmorph-select-button--fill{width:100%}.nmorph-select-button.nmorph-select-button--fill>.nmorph-select-button-item{flex:1 1 0;min-width:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-select-button-item{display:inline-flex;justify-content:center;align-items:center;height:var(--nmorph-private-select-button-item-height);padding:0 var(--indentation-04);font-size:var(--nmorph-private-control-font-size);line-height:var(--nmorph-private-control-line-height);border-radius:var(--default-border-radius);transform:translateY(0);cursor:pointer;opacity:.45;transition:
|
|
1
|
+
.nmorph-select-button-item{display:inline-flex;justify-content:center;align-items:center;height:var(--nmorph-private-select-button-item-height);padding:0 var(--indentation-04);font-size:var(--nmorph-private-control-font-size);line-height:var(--nmorph-private-control-line-height);border-radius:var(--default-border-radius);transform:translateY(0);cursor:pointer;opacity:.45;transition:opacity ease-in-out var(--transition-02),transform ease-in-out var(--transition-01)}.nmorph-select-button-item input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.nmorph-select-button-item:focus-visible{outline:2px solid var(--nmorph-accent-color);outline-offset:2px}.nmorph-select-button-item:not(.nmorph-select-button-item--disabled):hover{opacity:.72}.nmorph-select-button-item:not(.nmorph-select-button-item--disabled):active{transform:translateY(1px)}.nmorph-select-button-item .nmorph-select-button-item__content{min-width:0;transform:translateY(var(--nmorph-private-control-text-offset-y))}.nmorph-select-button-item.nmorph-select-button-item--checked{background:var(--nmorph-main-color);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color);opacity:1}.nmorph-select-button-item.nmorph-select-button-item--checked:hover{opacity:1}.nmorph-select-button-item.nmorph-select-button-item--disabled{cursor:not-allowed;opacity:.6}
|