@nmorph/nmorph-ui-kit 2.2.15 → 2.2.17
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/README.md +0 -8
- package/dist/components/basic/nmorph-button/NmorphButton.css +1 -1
- package/dist/components/basic/nmorph-button/NmorphButton.vue.js +12 -12
- package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +17 -14
- package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +1 -1
- package/dist/components/data/nmorph-calendar/utils.js +65 -52
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +39 -37
- package/dist/components/data/nmorph-table/NmorphTable.css +1 -1
- package/dist/components/data/nmorph-table/NmorphTable.vue.js +228 -225
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +57 -43
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +47 -47
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +28 -25
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +102 -92
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +67 -44
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.css +1 -1
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +45 -33
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue2.js +1 -1
- package/dist/components/form/nmorph-form/use-form-item-input.js +7 -8
- package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
- package/dist/components/form/nmorph-select/NmorphSelect.vue.js +135 -125
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +76 -65
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.js +15 -12
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +15 -14
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +22 -21
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +16 -16
- package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.css +1 -0
- package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.js +51 -0
- package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue2.js +72 -0
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.css +1 -1
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue.js +23 -23
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +31 -25
- package/dist/components/others/nmorph-overlay/NmorphOverlay.vue.js +42 -18
- package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +66 -19
- package/dist/hooks/use-common-styles.js +42 -33
- package/dist/hooks/use-virtual-list.js +65 -37
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +539 -0
- package/dist/index.es.js +656 -653
- package/dist/index.umd.js +63 -65
- package/dist/nuxt.mjs +10 -5
- package/dist/outside-hooks/use-nmorph-theme.js +97 -98
- package/dist/package.json.js +1 -1
- package/dist/plugin.js +43 -43
- package/dist/src/components/data/nmorph-calendar/types.d.ts +8 -1
- package/dist/src/components/data/nmorph-calendar/utils.d.ts +2 -1
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +2 -0
- package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +2 -0
- package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +2 -0
- package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +13 -1
- package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +2 -0
- package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +2 -0
- package/dist/src/components/navigation/index.d.ts +1 -0
- package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +64 -0
- package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +10 -0
- package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +12 -1
- package/dist/src/hooks/use-virtual-list.d.ts +3 -0
- package/dist/src/icons.d.ts +3 -0
- package/dist/src/styles.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/styles.d.ts +2 -0
- package/dist/styles.js +7 -0
- package/dist/utils/theme-style.js +27 -38
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -11,14 +11,6 @@ Neumorphism is a design trend that blends elements of flat design and skeuomorph
|
|
|
11
11
|
tactile interfaces with raised or inset effects, subtle gradients, and delicate shadows. This style aims to make UI
|
|
12
12
|
components feel tangible and visually engaging.
|
|
13
13
|
|
|
14
|
-
## Status: Testing
|
|
15
|
-
|
|
16
|
-
The library is currently in its **testing phase**. As the sole developer behind this project, I am working on improving
|
|
17
|
-
its stability, fixing bugs, and ensuring high-quality components.
|
|
18
|
-
|
|
19
|
-
If you encounter any issues, please don't hesitate to report them. Your feedback is highly appreciated and will help
|
|
20
|
-
enhance the library.
|
|
21
|
-
|
|
22
14
|
**Documentation:** For detailed instructions and examples, visit the [official documentation site](https://nmorph.dev).
|
|
23
15
|
|
|
24
16
|
---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-button{display:inline-block;width:auto}.nmorph-button.nmorph--fill{width:100%}.nmorph-button .nmorph-button__content{display:flex;gap:var(--indentation-02);justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:var(--height);padding:var(--indentation-00) var(--indentation-04);line-height:0;background:var(--nmorph-main-color);border:none;border-radius:var(--default-border-radius);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);cursor:pointer}.nmorph-button .nmorph-button__content span{--color: var(--nmorph-
|
|
1
|
+
.nmorph-button{display:inline-block;width:auto}.nmorph-button.nmorph--fill{width:100%}.nmorph-button .nmorph-button__content{display:flex;gap:var(--indentation-02);justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:var(--height);padding:var(--indentation-00) var(--indentation-04);line-height:0;background:var(--nmorph-main-color);border:none;border-radius:var(--default-border-radius);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);color:var(--nmorph-button-color, var(--nmorph-text-color));cursor:pointer}.nmorph-button .nmorph-button__content span{color:var(--nmorph-button-color, var(--nmorph-text-color));--color: var(--nmorph-button-color, var(--nmorph-text-color))}.nmorph-button .nmorph-button__content>.nmorph-icon{flex-shrink:0;--color: var(--nmorph-button-color, var(--nmorph-text-color))}.nmorph-button .nmorph-button__content:disabled{pointer-events:none}.nmorph-button .nmorph-button__content[loading=true]{cursor:default}.nmorph-button.nmorph-button--ripple .nmorph-button__content{position:relative;overflow:hidden}.nmorph-button.nmorph-button--ripple .nmorph-button__content:after{position:absolute;top:0;left:0;width:100%;height:100%;background-image:radial-gradient(circle,var(--nmorph-main-color) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:scale(10);opacity:0;transition:transform .3s,opacity 1s;content:""}.nmorph-button.nmorph-button--ripple .nmorph-button__content:active:after{transform:scale(0);opacity:.3;transition:0s}.nmorph-button.nmorph-button--accent-bg-on-hover .nmorph-button__content:not(:disabled,[loading=true]):hover{background:var(--nmorph-accent-color);color:var(--nmorph-white-color);box-shadow:none}.nmorph-button.nmorph-button--accent-bg-on-hover .nmorph-button__content:not(:disabled,[loading=true]):hover .nmorph-icon{--color: var(--nmorph-white-color)}.nmorph-button.nmorph-button--accent-bg-on-hover .nmorph-button__content:not(:disabled,[loading=true]):hover span{color:var(--nmorph-white-color)}.nmorph-button.nmorph-button--round .nmorph-button__content{border-radius:var(--border-radius-200)}.nmorph-button.nmorph-button--circle{width:var(--height)}.nmorph-button.nmorph-button--circle .nmorph-button__content{border-radius:var(--border-radius-circular)}.nmorph-button.nmorph-button--transparent{padding:var(--indentation-00)}.nmorph-button.nmorph-button--transparent .nmorph-button__content:not(:disabled,[loading=true]):hover{color:var(--nmorph-accent-color);background:transparent;box-shadow:none}.nmorph-button.nmorph-button--transparent.nmorph-button--custom-color .nmorph-button__content:not(:disabled,[loading=true]):hover{color:var(--nmorph-button-hover-color)}.nmorph-button.nmorph-button--transparent .nmorph-button__content:not(:disabled,[loading=true]):hover span{color:var(--nmorph-accent-color)}.nmorph-button.nmorph-button--transparent.nmorph-button--custom-color .nmorph-button__content:not(:disabled,[loading=true]):hover span{color:var(--nmorph-button-hover-color);--color: var(--nmorph-button-hover-color)}.nmorph-button.nmorph-button--transparent .nmorph-button__content:not(:disabled,[loading=true]):hover .nmorph-icon{--color: var(--nmorph-accent-color)}.nmorph-button.nmorph-button--transparent.nmorph-button--custom-color .nmorph-button__content:not(:disabled,[loading=true]):hover .nmorph-icon{--color: var(--nmorph-button-hover-color)}.nmorph-button.nmorph-button--transparent .nmorph-button__content{color:var(--nmorph-button-color, var(--transparent-button-color, var(--nmorph-text-color)));background:transparent;box-shadow:none}.nmorph-button.nmorph-button--transparent .nmorph-button__content span{color:var(--nmorph-button-color, var(--transparent-button-color, var(--nmorph-text-color)));--color: var(--nmorph-button-color, var(--transparent-button-color, var(--nmorph-text-color)))}.nmorph-button.nmorph-button--transparent .nmorph-button__content .nmorph-icon{--color: var(--nmorph-button-color, var(--transparent-button-color, var(--nmorph-text-color)))}.nmorph-button.nmorph-button--square,.nmorph-button.nmorph-button--icon-only{width:var(--height);height:var(--height)}.nmorph-button.nmorph-button--icon-only .nmorph-button__content{padding:0}.nmorph-button.nmorph-button.nmorph--thin-component{font-weight:400;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-button.nmorph-button--disabled{cursor:not-allowed;opacity:.6}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './NmorphButton.css';
|
|
2
2
|
import d from "./NmorphButton.vue2.js";
|
|
3
|
-
import { openBlock as e, createElementBlock as r, normalizeStyle as s, normalizeClass as c, createElementVNode as m, createBlock as
|
|
3
|
+
import { openBlock as e, createElementBlock as r, normalizeStyle as s, normalizeClass as c, createElementVNode as m, createBlock as i, withCtx as l, createVNode as p, renderSlot as n, Fragment as f, createCommentVNode as a, toDisplayString as h } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import y from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const _ = ["disabled", "loading", "type", "tabindex"], b = { key: 1 };
|
|
@@ -9,7 +9,7 @@ function k(t, N, g, o, S, B) {
|
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
11
|
class: c(o.modifiers),
|
|
12
|
-
style: s(o.
|
|
12
|
+
style: s(o.buttonColorStyles)
|
|
13
13
|
},
|
|
14
14
|
[
|
|
15
15
|
m("button", {
|
|
@@ -20,17 +20,17 @@ function k(t, N, g, o, S, B) {
|
|
|
20
20
|
type: o.props.type,
|
|
21
21
|
tabindex: o.props.tabindex
|
|
22
22
|
}, [
|
|
23
|
-
o.props.loading ? (e(),
|
|
23
|
+
o.props.loading ? (e(), i(o.NmorphIcon, {
|
|
24
24
|
key: 0,
|
|
25
25
|
size: o.loadingButtonSize
|
|
26
26
|
}, {
|
|
27
|
-
default:
|
|
27
|
+
default: l(() => [
|
|
28
28
|
p(o.NmorphIconLoading)
|
|
29
29
|
]),
|
|
30
30
|
_: 1
|
|
31
31
|
/* STABLE */
|
|
32
|
-
}, 8, ["size"])) : o.hasIconOnlySlot ? (e(),
|
|
33
|
-
default:
|
|
32
|
+
}, 8, ["size"])) : o.hasIconOnlySlot ? (e(), i(o.NmorphIcon, { key: 1 }, {
|
|
33
|
+
default: l(() => [
|
|
34
34
|
n(t.$slots, "icon-only")
|
|
35
35
|
]),
|
|
36
36
|
_: 3
|
|
@@ -39,13 +39,13 @@ function k(t, N, g, o, S, B) {
|
|
|
39
39
|
f,
|
|
40
40
|
{ key: 2 },
|
|
41
41
|
[
|
|
42
|
-
o.hasIconSlot ? (e(),
|
|
43
|
-
default:
|
|
42
|
+
o.hasIconSlot ? (e(), i(o.NmorphIcon, { key: 0 }, {
|
|
43
|
+
default: l(() => [
|
|
44
44
|
n(t.$slots, "icon")
|
|
45
45
|
]),
|
|
46
46
|
_: 3
|
|
47
47
|
/* FORWARDED */
|
|
48
|
-
})) :
|
|
48
|
+
})) : a("v-if", !0),
|
|
49
49
|
n(t.$slots, "default"),
|
|
50
50
|
o.props.text !== void 0 ? (e(), r(
|
|
51
51
|
"span",
|
|
@@ -53,7 +53,7 @@ function k(t, N, g, o, S, B) {
|
|
|
53
53
|
h(o.props.text),
|
|
54
54
|
1
|
|
55
55
|
/* TEXT */
|
|
56
|
-
)) :
|
|
56
|
+
)) : a("v-if", !0),
|
|
57
57
|
n(t.$slots, "append")
|
|
58
58
|
],
|
|
59
59
|
64
|
|
@@ -65,7 +65,7 @@ function k(t, N, g, o, S, B) {
|
|
|
65
65
|
/* CLASS, STYLE */
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const u = /* @__PURE__ */ y(d, [["render", k], ["__file", "/builds/ketjo/nmorph/library/src/components/basic/nmorph-button/NmorphButton.vue"]]);
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
u as default
|
|
71
71
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './NmorphButton.css';
|
|
2
|
-
import { defineComponent as c, useSlots as m, computed as
|
|
3
|
-
import { NmorphComponentHeight as
|
|
2
|
+
import { defineComponent as c, useSlots as m, computed as o, ref as h } from "vue";
|
|
3
|
+
import { NmorphComponentHeight as y } from "../../../types/index.js";
|
|
4
4
|
import { useModifiers as g } from "../../../utils/create-modifiers.js";
|
|
5
5
|
import b from "../../../assets/icons/loading.svg.js";
|
|
6
6
|
import q from "../nmorph-icon/NmorphIcon.vue.js";
|
|
7
|
-
const
|
|
7
|
+
const $ = /* @__PURE__ */ c({
|
|
8
8
|
__name: "NmorphButton",
|
|
9
9
|
props: {
|
|
10
10
|
styleType: { type: null, required: !1, default: "default" },
|
|
@@ -23,28 +23,31 @@ const I = /* @__PURE__ */ c({
|
|
|
23
23
|
height: { type: null, required: !1, default: "basic" },
|
|
24
24
|
disabled: { type: Boolean, required: !1, default: !1 }
|
|
25
25
|
},
|
|
26
|
-
setup(i, { expose:
|
|
27
|
-
const e = i,
|
|
26
|
+
setup(i, { expose: u }) {
|
|
27
|
+
const e = i, t = m(), s = o(() => !!t.icon), r = o(() => !!t["icon-only"]), p = o(
|
|
28
28
|
() => g({
|
|
29
|
-
nmorph: [
|
|
29
|
+
nmorph: [y[e.height], `${e.fill && "fill"}`],
|
|
30
30
|
"nmorph-button": [
|
|
31
31
|
e.styleType,
|
|
32
32
|
e.shape,
|
|
33
33
|
`${e.disabled && "disabled"}`,
|
|
34
34
|
`${e.accentBgOnHover && "accent-bg-on-hover"}`,
|
|
35
35
|
`${e.ripple && "ripple"}`,
|
|
36
|
-
`${r.value && "icon-only"}
|
|
36
|
+
`${r.value && "icon-only"}`,
|
|
37
|
+
`${e.color && "custom-color"}`
|
|
37
38
|
]
|
|
38
39
|
})
|
|
39
|
-
), l =
|
|
40
|
+
), l = h(null), n = {
|
|
40
41
|
thin: "small",
|
|
41
42
|
basic: "medium",
|
|
42
43
|
thick: "large"
|
|
43
|
-
}, d =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
}, d = o(() => n[e.height]), f = o(() => e.color ? {
|
|
45
|
+
"--nmorph-button-color": e.color,
|
|
46
|
+
"--transparent-button-color": e.color,
|
|
47
|
+
"--nmorph-button-hover-color": `color-mix(in srgb, ${e.color} 75%, var(--nmorph-white-color))`
|
|
48
|
+
} : {});
|
|
49
|
+
u({ buttonDOMElement: l });
|
|
50
|
+
const a = { props: e, slots: t, hasIconSlot: s, hasIconOnlySlot: r, modifiers: p, buttonDOMElement: l, iconSizeMap: n, loadingButtonSize: d, buttonColorStyles: f, get NmorphIcon() {
|
|
48
51
|
return q;
|
|
49
52
|
}, get NmorphIconLoading() {
|
|
50
53
|
return b;
|
|
@@ -53,5 +56,5 @@ const I = /* @__PURE__ */ c({
|
|
|
53
56
|
}
|
|
54
57
|
});
|
|
55
58
|
export {
|
|
56
|
-
|
|
59
|
+
$ as default
|
|
57
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-badge{position:relative;display:inline-block;height:fit-content;--dot-size: 4px}.nmorph-badge .nmorph-badge__container{position:absolute;display:inline-flex;justify-content:center;align-items:center;background:var(--nmorph-badge-color);border-radius:var(--default-border-radius);opacity:1}.nmorph-badge.nmorph-badge--tag{position:static;display:inline-flex}.nmorph-badge .nmorph-badge__container--tag{position:static}.nmorph-badge .nmorph-badge__content{padding:2px 4px;color:var(--nmorph-light-shade-color);font-size:var(--font-size-base);line-height:var(--line-height-regular)}.nmorph-badge.nmorph-badge--tiny .nmorph-badge__content{font-size:var(--font-size-tiny)}.nmorph-badge.nmorph-badge--extra-small .nmorph-badge__content{font-size:var(--font-size-extra-small)}.nmorph-badge .nmorph-badge__container--hidden{opacity:0}.nmorph-badge .nmorph-badge__dot{width:var(--dot-size);height:var(--dot-size);border-radius:var(--border-radius-circular)}
|
|
1
|
+
.nmorph-badge{position:relative;display:inline-block;height:fit-content;--dot-size: 4px}.nmorph-badge .nmorph-badge__container{position:absolute;display:inline-flex;justify-content:center;align-items:center;background:var(--nmorph-badge-color);border-radius:var(--default-border-radius);opacity:1}.nmorph-badge.nmorph-badge--tag{position:static;display:inline-flex}.nmorph-badge .nmorph-badge__container--tag{position:static}.nmorph-badge .nmorph-badge__content{box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;min-width:calc(1em * var(--line-height-regular) + 4px);padding:2px 4px;color:var(--nmorph-light-shade-color);font-size:var(--font-size-base);line-height:var(--line-height-regular);text-align:center}.nmorph-badge.nmorph-badge--tiny .nmorph-badge__content{font-size:var(--font-size-tiny)}.nmorph-badge.nmorph-badge--extra-small .nmorph-badge__content{font-size:var(--font-size-extra-small)}.nmorph-badge .nmorph-badge__container--hidden{opacity:0}.nmorph-badge .nmorph-badge__dot{width:var(--dot-size);height:var(--dot-size);border-radius:var(--border-radius-circular)}
|
|
@@ -14,7 +14,7 @@ const ne = /* @__PURE__ */ R({
|
|
|
14
14
|
initialDate: { type: Date, required: !1, default: () => /* @__PURE__ */ new Date() },
|
|
15
15
|
range: { type: null, required: !1, default: void 0 },
|
|
16
16
|
type: { type: null, required: !1, default: "date" },
|
|
17
|
-
modelValue: { type: [Date, Array], required: !1, default: () => /* @__PURE__ */ new Date() }
|
|
17
|
+
modelValue: { type: [Date, Array, null], required: !1, default: () => /* @__PURE__ */ new Date() }
|
|
18
18
|
},
|
|
19
19
|
emits: ["update:model-value", "update-initial-date"],
|
|
20
20
|
setup(N, { expose: _, emit: b }) {
|
|
@@ -1,83 +1,96 @@
|
|
|
1
|
-
import { useCalendarTexts as
|
|
2
|
-
const
|
|
1
|
+
import { useCalendarTexts as F } from "./hooks/use-calendar-texts.js";
|
|
2
|
+
const H = (t) => {
|
|
3
3
|
const e = t - t % 10, a = [];
|
|
4
4
|
for (let n = 0; n < 10; n++)
|
|
5
5
|
a.push(e + n);
|
|
6
6
|
return a;
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
}, W = {
|
|
8
|
+
year: "numeric",
|
|
9
|
+
month: "2-digit",
|
|
10
|
+
day: "2-digit"
|
|
11
|
+
}, T = (t) => String(t).padStart(2, "0"), C = (t, e) => {
|
|
12
|
+
const a = {
|
|
13
|
+
YYYY: String(t.getFullYear()),
|
|
14
|
+
YY: String(t.getFullYear()).slice(-2),
|
|
15
|
+
MM: T(t.getMonth() + 1),
|
|
16
|
+
M: String(t.getMonth() + 1),
|
|
17
|
+
DD: T(t.getDate()),
|
|
18
|
+
D: String(t.getDate())
|
|
13
19
|
};
|
|
14
|
-
return
|
|
15
|
-
},
|
|
20
|
+
return e.replace(/YYYY|YY|MM|M|DD|D/g, (n) => a[n]);
|
|
21
|
+
}, P = (t, e = {}) => {
|
|
22
|
+
if (!t) return;
|
|
23
|
+
const a = (n) => e.formatter ? e.formatter(n) : e.format ? C(n, e.format) : new Intl.DateTimeFormat(e.locale || "en-CA", e.options || W).format(
|
|
24
|
+
n
|
|
25
|
+
);
|
|
26
|
+
return Array.isArray(t) ? t.map((n) => n ? a(n) : null) : a(t);
|
|
27
|
+
}, Z = (t) => P(t), b = (t, e) => t.getMonth() > e.getMonth(), j = (t, e) => t.getMonth() < e.getMonth(), q = (t) => {
|
|
16
28
|
const e = /* @__PURE__ */ new Date();
|
|
17
29
|
if (!t) return !0;
|
|
18
30
|
const a = t && t[0], n = t && t[1];
|
|
19
31
|
return e >= a && e <= n;
|
|
20
|
-
},
|
|
21
|
-
const { months: e } =
|
|
32
|
+
}, z = (t) => {
|
|
33
|
+
const { months: e } = F();
|
|
22
34
|
return e[t];
|
|
23
|
-
}, R = (t) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, x = (t, e) => [0, 2, 4, 6, 7, 9, 11].includes(e) ? 31 : [3, 5, 8, 10].includes(e) ? 30 : R(t) ? 29 : 28, k = (t) => new Date(t.getFullYear(), t.getMonth(), t.getDate()),
|
|
24
|
-
const a = (o) => e ? o < k(e[0]) || o > k(e[1]) : !1, n = t.value.getFullYear(),
|
|
25
|
-
let
|
|
26
|
-
const
|
|
27
|
-
let c = g -
|
|
28
|
-
const
|
|
35
|
+
}, R = (t) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, x = (t, e) => [0, 2, 4, 6, 7, 9, 11].includes(e) ? 31 : [3, 5, 8, 10].includes(e) ? 30 : R(t) ? 29 : 28, k = (t) => new Date(t.getFullYear(), t.getMonth(), t.getDate()), E = (t, e) => {
|
|
36
|
+
const a = (o) => e ? o < k(e[0]) || o > k(e[1]) : !1, n = t.value.getFullYear(), s = t.value.getMonth(), S = new Date(n, s, 1).getDay() + 1, y = x(n, s), A = 7 + S - 8;
|
|
37
|
+
let d = 7 - (new Date(n, s, y).getDay() + 1);
|
|
38
|
+
const h = /* @__PURE__ */ new Date(), M = h.getDate(), i = h.getMonth(), l = s - 1, g = x(n, l);
|
|
39
|
+
let c = g - A;
|
|
40
|
+
const f = [];
|
|
29
41
|
for (; c < g; ) {
|
|
30
42
|
c++;
|
|
31
|
-
const o =
|
|
32
|
-
|
|
43
|
+
const o = i === l && M === c, r = new Date(n, l, c);
|
|
44
|
+
f.push({
|
|
33
45
|
value: c,
|
|
34
46
|
monthType: "previous",
|
|
35
47
|
isToday: o,
|
|
36
|
-
date:
|
|
37
|
-
hidden: a(
|
|
48
|
+
date: r,
|
|
49
|
+
hidden: a(r)
|
|
38
50
|
});
|
|
39
51
|
}
|
|
40
|
-
const
|
|
52
|
+
const m = s + 1, Y = [];
|
|
41
53
|
let u = 0;
|
|
42
|
-
for (;
|
|
43
|
-
u++,
|
|
44
|
-
const o =
|
|
45
|
-
|
|
54
|
+
for (; d; ) {
|
|
55
|
+
u++, d--;
|
|
56
|
+
const o = i === m && M === u, r = new Date(n, m, u);
|
|
57
|
+
Y.push({
|
|
46
58
|
value: u,
|
|
47
59
|
monthType: "next",
|
|
48
60
|
isToday: o,
|
|
49
|
-
date:
|
|
50
|
-
hidden: a(
|
|
61
|
+
date: r,
|
|
62
|
+
hidden: a(r)
|
|
51
63
|
});
|
|
52
64
|
}
|
|
53
|
-
let
|
|
54
|
-
const
|
|
55
|
-
for (;
|
|
56
|
-
const o =
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
value:
|
|
65
|
+
let D = 0;
|
|
66
|
+
const p = [];
|
|
67
|
+
for (; D < y; ) {
|
|
68
|
+
const o = h.getDate();
|
|
69
|
+
D++;
|
|
70
|
+
const r = i === s && o === D, v = new Date(n, s, D);
|
|
71
|
+
p.push({
|
|
72
|
+
value: D,
|
|
61
73
|
monthType: "current",
|
|
62
|
-
isToday:
|
|
63
|
-
date:
|
|
64
|
-
hidden: a(
|
|
74
|
+
isToday: r,
|
|
75
|
+
date: v,
|
|
76
|
+
hidden: a(v)
|
|
65
77
|
});
|
|
66
78
|
}
|
|
67
|
-
const
|
|
68
|
-
for (let o = 0; o <
|
|
69
|
-
const
|
|
70
|
-
|
|
79
|
+
const I = [...f, ...p, ...Y], w = [];
|
|
80
|
+
for (let o = 0; o < I.length; o += 7) {
|
|
81
|
+
const r = I.slice(o, o + 7);
|
|
82
|
+
w.push(r);
|
|
71
83
|
}
|
|
72
|
-
return
|
|
84
|
+
return w.filter((o) => !o.every((r) => r.hidden));
|
|
73
85
|
};
|
|
74
86
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
P as formatDate,
|
|
88
|
+
Z as formatDateIntl,
|
|
89
|
+
H as getDecadeYears,
|
|
90
|
+
E as getMonthDaysByWeek,
|
|
91
|
+
z as getMonthName,
|
|
92
|
+
j as hasAnyRangeDateInNextMonth,
|
|
93
|
+
b as hasAnyRangeDateInPrevMonth,
|
|
94
|
+
q as isTodayInMonthRange,
|
|
82
95
|
k as resetTimeToZero
|
|
83
96
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './NmorphImagePreview.css';
|
|
2
2
|
import g from "./NmorphImagePreview.vue2.js";
|
|
3
|
-
import { openBlock as l, createElementBlock as a, Fragment as s, normalizeClass as h, createElementVNode as i, createVNode as
|
|
3
|
+
import { openBlock as l, createElementBlock as a, Fragment as s, normalizeClass as h, createElementVNode as i, createVNode as e, createSlots as _, withCtx as r, renderSlot as m, createCommentVNode as t, createBlock as c, Teleport as p, normalizeStyle as k, renderList as w, resolveDynamicComponent as v } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
5
|
+
import N from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const y = { class: "nmorph-image-preview__content" }, C = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "nmorph-image-preview__left"
|
|
@@ -10,25 +10,25 @@ const y = { class: "nmorph-image-preview__content" }, C = {
|
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "nmorph-image-preview__right"
|
|
12
12
|
}, S = { class: "nmorph-image-preview__actions" }, b = { class: "nmorph-image-preview__action-element" };
|
|
13
|
-
function B(n, z, D,
|
|
13
|
+
function B(n, z, D, o, H, L) {
|
|
14
14
|
return l(), a(
|
|
15
15
|
s,
|
|
16
16
|
null,
|
|
17
17
|
[
|
|
18
|
-
|
|
18
|
+
o.props.showTrigger ? (l(), a(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
21
|
key: 0,
|
|
22
|
-
class: h(
|
|
22
|
+
class: h(o.modifiers)
|
|
23
23
|
},
|
|
24
24
|
[
|
|
25
25
|
i("div", {
|
|
26
26
|
class: "nmorph-image-preview__trigger",
|
|
27
|
-
onClick:
|
|
27
|
+
onClick: o.clickHandler
|
|
28
28
|
}, [
|
|
29
|
-
o
|
|
30
|
-
src:
|
|
31
|
-
alt:
|
|
29
|
+
e(o.NmorphImage, {
|
|
30
|
+
src: o.triggerSource,
|
|
31
|
+
alt: o.props.alt,
|
|
32
32
|
fit: "cover",
|
|
33
33
|
"frame-border": 0
|
|
34
34
|
}, _({
|
|
@@ -59,22 +59,24 @@ function B(n, z, D, e, H, L) {
|
|
|
59
59
|
i(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
|
-
class: h(["nmorph-image-preview__portal",
|
|
62
|
+
class: h(["nmorph-image-preview__portal", o.modifiers])
|
|
63
63
|
},
|
|
64
64
|
[
|
|
65
|
-
o
|
|
66
|
-
show:
|
|
67
|
-
"z-index":
|
|
68
|
-
|
|
65
|
+
e(o.NmorphOverlay, {
|
|
66
|
+
show: o.open,
|
|
67
|
+
"z-index": o.props.zIndex,
|
|
68
|
+
"trap-focus": "",
|
|
69
|
+
onOnOutsideClick: o.closeHandler,
|
|
70
|
+
onOnEscapeKeydown: o.closeHandler
|
|
69
71
|
}, {
|
|
70
72
|
default: r(() => [
|
|
71
73
|
i("div", y, [
|
|
72
|
-
o
|
|
73
|
-
src:
|
|
74
|
-
alt:
|
|
74
|
+
e(o.NmorphImage, {
|
|
75
|
+
src: o.triggerSource,
|
|
76
|
+
alt: o.props.alt,
|
|
75
77
|
fit: "cover",
|
|
76
78
|
"frame-border": 0,
|
|
77
|
-
style: k({ transform: `rotate(${
|
|
79
|
+
style: k({ transform: `rotate(${o.rotateLevel}deg) scale(${o.scaleLevel})` })
|
|
78
80
|
}, _({
|
|
79
81
|
_: 2
|
|
80
82
|
/* DYNAMIC */
|
|
@@ -95,12 +97,12 @@ function B(n, z, D, e, H, L) {
|
|
|
95
97
|
} : void 0
|
|
96
98
|
]), 1032, ["src", "alt", "style"])
|
|
97
99
|
]),
|
|
98
|
-
|
|
99
|
-
o
|
|
100
|
+
o.multipleSources ? (l(), a("div", C, [
|
|
101
|
+
e(o.NmorphButton, { onClick: o.previousHandler }, {
|
|
100
102
|
default: r(() => [
|
|
101
|
-
o
|
|
103
|
+
e(o.NmorphIcon, null, {
|
|
102
104
|
default: r(() => [
|
|
103
|
-
o
|
|
105
|
+
e(o.NmorphIconChevronDown)
|
|
104
106
|
]),
|
|
105
107
|
_: 1
|
|
106
108
|
/* STABLE */
|
|
@@ -110,12 +112,12 @@ function B(n, z, D, e, H, L) {
|
|
|
110
112
|
/* STABLE */
|
|
111
113
|
})
|
|
112
114
|
])) : t("v-if", !0),
|
|
113
|
-
|
|
114
|
-
o
|
|
115
|
+
o.multipleSources ? (l(), a("div", I, [
|
|
116
|
+
e(o.NmorphButton, { onClick: o.nextHandler }, {
|
|
115
117
|
default: r(() => [
|
|
116
|
-
o
|
|
118
|
+
e(o.NmorphIcon, null, {
|
|
117
119
|
default: r(() => [
|
|
118
|
-
o
|
|
120
|
+
e(o.NmorphIconChevronDown)
|
|
119
121
|
]),
|
|
120
122
|
_: 1
|
|
121
123
|
/* STABLE */
|
|
@@ -129,16 +131,16 @@ function B(n, z, D, e, H, L) {
|
|
|
129
131
|
(l(), a(
|
|
130
132
|
s,
|
|
131
133
|
null,
|
|
132
|
-
|
|
134
|
+
w(o.actions, (d, f) => i("div", {
|
|
133
135
|
key: f,
|
|
134
136
|
class: "nmorph-image-preview__action-element"
|
|
135
137
|
}, [
|
|
136
|
-
o
|
|
138
|
+
e(o.NmorphButton, {
|
|
137
139
|
onClick: d.handler
|
|
138
140
|
}, {
|
|
139
141
|
default: r(() => [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
e(
|
|
143
|
+
o.NmorphIcon,
|
|
142
144
|
null,
|
|
143
145
|
{
|
|
144
146
|
default: r(() => [
|
|
@@ -159,14 +161,14 @@ function B(n, z, D, e, H, L) {
|
|
|
159
161
|
/* STABLE_FRAGMENT */
|
|
160
162
|
)),
|
|
161
163
|
i("div", b, [
|
|
162
|
-
o
|
|
163
|
-
disabled:
|
|
164
|
-
onClick:
|
|
164
|
+
e(o.NmorphButton, {
|
|
165
|
+
disabled: o.scaleLevel === 1,
|
|
166
|
+
onClick: o.enlargeShrinkActionData.handler
|
|
165
167
|
}, {
|
|
166
168
|
default: r(() => [
|
|
167
|
-
o
|
|
169
|
+
e(o.NmorphIcon, null, {
|
|
168
170
|
default: r(() => [
|
|
169
|
-
(l(), c(v(
|
|
171
|
+
(l(), c(v(o.enlargeShrinkActionData.icon)))
|
|
170
172
|
]),
|
|
171
173
|
_: 1
|
|
172
174
|
/* STABLE */
|
|
@@ -191,7 +193,7 @@ function B(n, z, D, e, H, L) {
|
|
|
191
193
|
/* STABLE_FRAGMENT */
|
|
192
194
|
);
|
|
193
195
|
}
|
|
194
|
-
const
|
|
196
|
+
const A = /* @__PURE__ */ N(g, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-image-preview/NmorphImagePreview.vue"]]);
|
|
195
197
|
export {
|
|
196
|
-
|
|
198
|
+
A as default
|
|
197
199
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-table{--border-color: var(--nmorph-info-text-color);--table-cell-height: auto;--table-background-row-hover: var(--nmorph-info-color)}.nmorph-table .nmorph-table__header th{border-bottom:0}.nmorph-table .nmorph-table__button-wrapper{display:flex;align-items:center;margin-left:var(--indentation-03)}.nmorph-table table{width:calc(100% - 2px);margin-left:1px;border-collapse:collapse;border-spacing:0}.nmorph-table .nmorph-table__table-data{padding:var(--indentation-03) 0;border-bottom:1px solid var(--border-color)}.nmorph-table .nmorph-table__table-data--bordered{border:1px solid var(--border-color)}.nmorph-table .nmorph-table__cell{padding:0 var(--indentation-03)}.nmorph-table .nmorph-table__cell-content{display:flex;align-items:center}.nmorph-table .nmorph-table__cell--data{height:var(--table-cell-height)}.nmorph-table .nmorph-table__body{position:relative}.nmorph-table .nmorph-table__body--virtual{overflow-x:hidden}.nmorph-table .nmorph-table__body--virtual .nmorph-table__table-data{height:var(--table-virtual-row-height);padding-top:0;padding-bottom:0}.nmorph-table .nmorph-table__virtual-spacer{position:relative;min-width:100%}.nmorph-table .nmorph-table__virtual-content{position:absolute;top:0;right:0;left:0}.nmorph-table .nmorph-table__table-data-row--row-hover:hover{background:var(--table-background-row-hover)}.nmorph-table--nmorph{overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--
|
|
1
|
+
.nmorph-table{--border-color: var(--nmorph-info-text-color);--table-cell-height: auto;--table-background-row-hover: var(--nmorph-info-color)}.nmorph-table .nmorph-table__header th{border-bottom:0}.nmorph-table .nmorph-table__button-wrapper{display:flex;align-items:center;margin-left:var(--indentation-03)}.nmorph-table table{width:calc(100% - 2px);margin-left:1px;border-collapse:collapse;border-spacing:0}.nmorph-table .nmorph-table__table-data{padding:var(--indentation-03) 0;border-bottom:1px solid var(--border-color)}.nmorph-table .nmorph-table__table-data--bordered{border:1px solid var(--border-color)}.nmorph-table .nmorph-table__cell{padding:0 var(--indentation-03)}.nmorph-table .nmorph-table__cell-content{display:flex;align-items:center}.nmorph-table .nmorph-table__cell--data{height:var(--table-cell-height)}.nmorph-table .nmorph-table__body{position:relative}.nmorph-table .nmorph-table__body--virtual{overflow-x:hidden}.nmorph-table .nmorph-table__body--virtual .nmorph-table__table-data{height:var(--table-virtual-row-height);padding-top:0;padding-bottom:0}.nmorph-table .nmorph-table__body--virtual.nmorph-table__body--dynamic .nmorph-table__table-data{height:auto}.nmorph-table .nmorph-table__virtual-spacer{position:relative;min-width:100%}.nmorph-table .nmorph-table__virtual-content{position:absolute;top:0;right:0;left:0}.nmorph-table .nmorph-table__table-data-row--row-hover:hover,.nmorph-table .nmorph-table__table-data-row--active{background:var(--table-background-row-hover)}.nmorph-table--nmorph{overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-outset);--border-color: transparent}.nmorph-table--nmorph .nmorph-table__button-wrapper{padding:var(--indentation-02)}.nmorph-table--nmorph .nmorph-table__table-row{background:var(--nmorph-main-color);box-shadow:var(--nmorph-shadow-inset)}
|