@nmorph/nmorph-ui-kit 3.0.4 → 3.0.6
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/chevron-right.svg.js +2 -2
- package/dist/assets/icons/hand.svg.js +10 -28
- package/dist/assets/icons/mic.svg.js +6 -6
- package/dist/assets/icons/mute.svg.js +6 -6
- package/dist/assets/icons/pin.svg.js +5 -5
- package/dist/assets/icons/video-camera-off.svg.js +6 -6
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +9 -9
- package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -1
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +25 -20
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
- package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +23 -18
- package/dist/components/data/nmorph-carousel/NmorphCarousel.css +1 -1
- package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +10 -10
- package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +23 -20
- package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -1
- package/dist/components/data/nmorph-file-card/NmorphFileCard.vue2.js +7 -7
- package/dist/components/data/nmorph-image/NmorphImage.vue2.js +1 -1
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.css +1 -1
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +82 -87
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +80 -35
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +87 -91
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +71 -44
- package/dist/components/data/nmorph-table/NmorphTable.vue.js +114 -162
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -1
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +4 -4
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue2.js +25 -25
- package/dist/components/feedback/nmorph-guide/NmorphGuide.vue2.js +66 -61
- package/dist/components/feedback/nmorph-guide/NmorphGuideStep.vue.js +25 -23
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -1
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +88 -48
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +75 -59
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
- 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/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +128 -95
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +73 -71
- package/dist/components/navigation/nmorph-stepper/NmorphStepper.css +1 -1
- package/dist/components/navigation/nmorph-stepper/NmorphStepper.vue.js +49 -26
- package/dist/index.umd.js +20 -20
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +0 -3
- package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +1 -0
- package/dist/src/components/basic/nmorph-scroll/types.d.ts +1 -0
- package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +1 -0
- package/dist/src/components/data/nmorph-card/types.d.ts +1 -0
- package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +2 -1
- package/dist/src/components/data/nmorph-media-tile/types.d.ts +1 -1
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -0
- package/dist/src/components/data/nmorph-pagination/types.d.ts +1 -0
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +0 -1
- package/dist/src/components/feedback/nmorph-guide/NmorphGuide.vue.d.ts +2 -0
- package/dist/src/components/feedback/nmorph-guide/types.d.ts +4 -0
- package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +2 -0
- package/dist/src/components/feedback/nmorph-tooltip/types.d.ts +2 -0
- package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +10 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import './NmorphTimePicker.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useModifiers as
|
|
5
|
-
import { createCssSizeVariables as
|
|
6
|
-
import { useFocusableInput as
|
|
7
|
-
import { useFormItemInput as
|
|
8
|
-
import { NmorphComponentThickness as
|
|
2
|
+
import { defineComponent as Y, ref as V, computed as u, watch as Z } from "vue";
|
|
3
|
+
import { useI18n as ee } from "vue-i18n";
|
|
4
|
+
import { useModifiers as te } from "../../../utils/create-modifiers.js";
|
|
5
|
+
import { createCssSizeVariables as re } from "../../../utils/common.js";
|
|
6
|
+
import { useFocusableInput as oe } from "../../../hooks/use-focusable-input.js";
|
|
7
|
+
import { useFormItemInput as ne, useFormItemModel as ue } from "../nmorph-form/use-form-item-input.js";
|
|
8
|
+
import { NmorphComponentThickness as le } from "../../../types/common.types.js";
|
|
9
|
+
import se from "../../basic/nmorph-scroll/NmorphScroll.vue.js";
|
|
9
10
|
import ae from "../../../assets/icons/clock.svg.js";
|
|
10
11
|
import ie from "../../../assets/icons/circle-close.svg.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
12
|
+
import me from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
13
|
+
import de from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
|
|
14
|
+
import ce from "../../basic/nmorph-button/NmorphButton.vue.js";
|
|
15
|
+
const xe = /* @__PURE__ */ Y({
|
|
14
16
|
__name: "NmorphTimePicker",
|
|
15
17
|
props: {
|
|
16
18
|
modelValue: { type: [String, null], required: !1, default: null },
|
|
@@ -32,93 +34,93 @@ const Te = /* @__PURE__ */ te({
|
|
|
32
34
|
tabindex: { type: Number, required: !1 }
|
|
33
35
|
},
|
|
34
36
|
emits: ["update:model-value", "focus", "blur"],
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
(e) =>
|
|
37
|
+
setup(_, { expose: B, emit: O }) {
|
|
38
|
+
const r = _, c = O, { t: T } = ee(), { id: F, name: M, autocomplete: H, tabindex: P } = ne(r), { modelValue: s, updateModelValue: p } = ue(
|
|
39
|
+
r,
|
|
40
|
+
(e) => c("update:model-value", e),
|
|
39
41
|
null
|
|
40
42
|
), a = V(!1), {
|
|
41
43
|
elementRef: I,
|
|
42
|
-
focused:
|
|
43
|
-
handleFocus:
|
|
44
|
-
handleBlur:
|
|
45
|
-
} =
|
|
46
|
-
onFocus: () =>
|
|
47
|
-
onBlur: () =>
|
|
48
|
-
}),
|
|
44
|
+
focused: w,
|
|
45
|
+
handleFocus: $,
|
|
46
|
+
handleBlur: z
|
|
47
|
+
} = oe({
|
|
48
|
+
onFocus: () => c("focus"),
|
|
49
|
+
onBlur: () => c("blur")
|
|
50
|
+
}), d = (e) => String(e).padStart(2, "0"), f = (e) => Math.max(1, Math.floor(Number.isFinite(e) ? e : 1)), i = (e) => {
|
|
49
51
|
if (!e) return null;
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
52
|
-
const o = Number(
|
|
53
|
-
return o > 23 || v > 59 ||
|
|
54
|
-
},
|
|
55
|
-
const
|
|
56
|
-
return
|
|
57
|
-
}, h = (e) => e.hour * 3600 + e.minute * 60 + e.second, g =
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
52
|
+
const t = e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);
|
|
53
|
+
if (!t) return null;
|
|
54
|
+
const o = Number(t[1]), v = Number(t[2]), m = Number(t[3] || 0);
|
|
55
|
+
return o > 23 || v > 59 || m > 59 ? null : { hour: o, minute: v, second: m };
|
|
56
|
+
}, N = (e) => {
|
|
57
|
+
const t = `${d(e.hour)}:${d(e.minute)}`;
|
|
58
|
+
return r.showSeconds ? `${t}:${d(e.second)}` : t;
|
|
59
|
+
}, h = (e) => e.hour * 3600 + e.minute * 60 + e.second, g = u(() => i(r.minTime)), y = u(() => i(r.maxTime)), x = u(() => i(s.value)), l = V(x.value || { hour: 0, minute: 0, second: 0 }), k = u(() => r.placeholder || T("pickATime"));
|
|
60
|
+
Z(s, (e) => {
|
|
61
|
+
const t = i(e);
|
|
62
|
+
t && (l.value = t);
|
|
61
63
|
});
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
return !!(g.value &&
|
|
65
|
-
},
|
|
66
|
-
const v = f(o),
|
|
67
|
-
for (let
|
|
68
|
-
return
|
|
69
|
-
const q = { ...l.value, [e]:
|
|
64
|
+
const S = (e) => {
|
|
65
|
+
const t = h(e);
|
|
66
|
+
return !!(g.value && t < h(g.value) || y.value && t > h(y.value));
|
|
67
|
+
}, b = (e, t, o) => {
|
|
68
|
+
const v = f(o), m = /* @__PURE__ */ new Set();
|
|
69
|
+
for (let n = 0; n <= t; n += v) m.add(n);
|
|
70
|
+
return m.add(l.value[e]), Array.from(m).filter((n) => n >= 0 && n <= t).sort((n, q) => n - q).map((n) => {
|
|
71
|
+
const q = { ...l.value, [e]: n };
|
|
70
72
|
return {
|
|
71
|
-
label:
|
|
72
|
-
value:
|
|
73
|
-
disabled:
|
|
73
|
+
label: d(n),
|
|
74
|
+
value: n,
|
|
75
|
+
disabled: S(q)
|
|
74
76
|
};
|
|
75
77
|
});
|
|
76
|
-
},
|
|
77
|
-
const o = { ...l.value, [e]:
|
|
78
|
-
|
|
79
|
-
},
|
|
78
|
+
}, D = u(() => b("hour", 23, r.hourStep)), R = u(() => b("minute", 59, r.minuteStep)), A = u(() => b("second", 59, r.secondStep)), U = (e, t) => {
|
|
79
|
+
const o = { ...l.value, [e]: t };
|
|
80
|
+
S(o) || (l.value = o, p(N(o)));
|
|
81
|
+
}, j = () => {
|
|
80
82
|
p(null), a.value = !1;
|
|
81
|
-
},
|
|
83
|
+
}, E = () => {
|
|
82
84
|
a.value = !1;
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
const
|
|
87
|
-
!o ||
|
|
88
|
-
},
|
|
89
|
-
() =>
|
|
90
|
-
),
|
|
91
|
-
() =>
|
|
92
|
-
nmorph: [
|
|
85
|
+
}, G = () => {
|
|
86
|
+
r.disabled || (a.value = !a.value);
|
|
87
|
+
}, J = (e) => {
|
|
88
|
+
const t = e.target, o = i(t.value);
|
|
89
|
+
!o || S(o) || (l.value = o, p(N(o)));
|
|
90
|
+
}, K = u(() => s.value || k.value), L = u(
|
|
91
|
+
() => r.showSeconds ? f(r.secondStep) : f(r.minuteStep) * 60
|
|
92
|
+
), Q = u(() => r.clearable && !!s.value && !r.disabled), W = u(
|
|
93
|
+
() => te({
|
|
94
|
+
nmorph: [le[r.thickness]],
|
|
93
95
|
"nmorph-time-picker": [
|
|
94
|
-
|
|
96
|
+
r.disabled && "disabled",
|
|
95
97
|
a.value && "open",
|
|
96
|
-
|
|
98
|
+
w.value && "focus",
|
|
97
99
|
!s.value && "placeholder"
|
|
98
100
|
]
|
|
99
101
|
})
|
|
100
|
-
),
|
|
101
|
-
() =>
|
|
102
|
-
nmorph:
|
|
103
|
-
})
|
|
104
|
-
), ee = n(
|
|
105
|
-
() => ne({
|
|
106
|
-
"--nmorph-private-time-picker-width": t.width
|
|
102
|
+
), X = u(
|
|
103
|
+
() => re({
|
|
104
|
+
"--nmorph-private-time-picker-width": r.width
|
|
107
105
|
})
|
|
108
106
|
);
|
|
109
|
-
|
|
110
|
-
const C = { props:
|
|
107
|
+
B({ inputDOMRef: I });
|
|
108
|
+
const C = { props: r, emit: c, t: T, id: F, name: M, autocomplete: H, tabindex: P, modelValue: s, updateModelValue: p, open: a, inputDOMRef: I, focused: w, focusHandler: $, blurHandler: z, pad: d, normalizeStep: f, parseTime: i, formatTime: N, timeToSeconds: h, minTimeParts: g, maxTimeParts: y, modelTimeParts: x, pickerValue: l, placeholderText: k, isOutsideRange: S, getUnitOptions: b, hourOptions: D, minuteOptions: R, secondOptions: A, selectUnit: U, clearHandler: j, closeHandler: E, toggleOpen: G, nativeInputHandler: J, displayValue: K, inputStep: L, showClearButton: Q, modifiers: W, styles: X, get NmorphButton() {
|
|
111
109
|
return ce;
|
|
112
|
-
}, get
|
|
110
|
+
}, get NmorphDropdown() {
|
|
113
111
|
return de;
|
|
112
|
+
}, get NmorphIcon() {
|
|
113
|
+
return me;
|
|
114
114
|
}, get NmorphIconCircleClose() {
|
|
115
115
|
return ie;
|
|
116
116
|
}, get NmorphIconClock() {
|
|
117
117
|
return ae;
|
|
118
|
+
}, get NmorphScroll() {
|
|
119
|
+
return se;
|
|
118
120
|
} };
|
|
119
121
|
return Object.defineProperty(C, "__isScriptSetup", { enumerable: !1, value: !0 }), C;
|
|
120
122
|
}
|
|
121
123
|
});
|
|
122
124
|
export {
|
|
123
|
-
|
|
125
|
+
xe as default
|
|
124
126
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-stepper{width:100%;border-radius:var(--default-border-radius)}.nmorph-stepper.nmorph-stepper--interactive{cursor:grab}.nmorph-stepper.nmorph-stepper--disabled{cursor:not-allowed;opacity:.6}.nmorph-stepper:focus-visible{outline:2px solid var(--nmorph-accent-color);outline-offset:2px}.nmorph-stepper__viewport{width:100%;overflow:hidden;border-radius:inherit;touch-action:pan-y}.nmorph-stepper__track{display:flex;width:100%;min-width:0;transition:transform .24s ease;will-change:transform}.nmorph-stepper__track>*{flex:0 0 100%;width:100%;min-width:100%;max-width:100%}
|
|
1
|
+
.nmorph-stepper{width:100%;border-radius:var(--default-border-radius)}.nmorph-stepper.nmorph-stepper--interactive{cursor:grab}.nmorph-stepper.nmorph-stepper--disabled{cursor:not-allowed;opacity:.6}.nmorph-stepper:focus-visible{outline:2px solid var(--nmorph-accent-color);outline-offset:2px}.nmorph-stepper__viewport{width:100%;overflow:hidden;border-radius:inherit;touch-action:pan-y}.nmorph-stepper__track{display:flex;width:100%;min-width:0;transition:transform .24s ease;will-change:transform}.nmorph-stepper__track>*{flex:0 0 100%;width:100%;min-width:100%;max-width:100%}.nmorph-stepper__indicator{width:100%}
|
|
@@ -1,48 +1,71 @@
|
|
|
1
1
|
import './NmorphStepper.css';
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as i, createElementBlock as
|
|
2
|
+
import d from "./NmorphStepper.vue2.js";
|
|
3
|
+
import { openBlock as i, createElementBlock as t, normalizeClass as p, createElementVNode as a, normalizeStyle as s, renderSlot as l, withModifiers as r, normalizeProps as m, guardReactiveProps as P, createCommentVNode as v } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import f from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const b = ["aria-label", "aria-disabled", "tabindex"], c = {
|
|
7
7
|
class: "nmorph-stepper__viewport",
|
|
8
8
|
"aria-live": "polite",
|
|
9
9
|
"aria-atomic": "true"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
return i(),
|
|
13
|
-
class:
|
|
11
|
+
function h(n, e, k, o, w, y) {
|
|
12
|
+
return i(), t("div", {
|
|
13
|
+
class: p(o.modifiers),
|
|
14
14
|
role: "group",
|
|
15
15
|
"aria-roledescription": "stepper",
|
|
16
|
-
"aria-label":
|
|
17
|
-
"aria-disabled":
|
|
18
|
-
tabindex:
|
|
19
|
-
onWheel:
|
|
20
|
-
onKeydown:
|
|
21
|
-
onPointerdown:
|
|
22
|
-
onPointermove:
|
|
23
|
-
onPointerup:
|
|
24
|
-
onPointercancel:
|
|
25
|
-
onPointerleave:
|
|
26
|
-
onClickCapture:
|
|
16
|
+
"aria-label": o.props.ariaLabel,
|
|
17
|
+
"aria-disabled": o.props.disabled || void 0,
|
|
18
|
+
tabindex: o.tabIndex,
|
|
19
|
+
onWheel: o.handleWheel,
|
|
20
|
+
onKeydown: o.handleKeydown,
|
|
21
|
+
onPointerdown: o.handlePointerDown,
|
|
22
|
+
onPointermove: o.handlePointerMove,
|
|
23
|
+
onPointerup: o.handlePointerEnd,
|
|
24
|
+
onPointercancel: o.clearPointer,
|
|
25
|
+
onPointerleave: o.clearPointer,
|
|
26
|
+
onClickCapture: o.handleClickCapture
|
|
27
27
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
a("div", c, [
|
|
29
|
+
a(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
class: "nmorph-stepper__track",
|
|
33
|
-
style:
|
|
33
|
+
style: s(o.trackStyle)
|
|
34
34
|
},
|
|
35
35
|
[
|
|
36
|
-
|
|
36
|
+
l(n.$slots, "default")
|
|
37
37
|
],
|
|
38
38
|
4
|
|
39
39
|
/* STYLE */
|
|
40
40
|
)
|
|
41
41
|
]),
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
n.$slots.indicator ? (i(), t(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "nmorph-stepper__indicator",
|
|
47
|
+
onPointerdown: e[0] || (e[0] = r(() => {
|
|
48
|
+
}, ["stop"])),
|
|
49
|
+
onPointermove: e[1] || (e[1] = r(() => {
|
|
50
|
+
}, ["stop"])),
|
|
51
|
+
onPointerup: e[2] || (e[2] = r(() => {
|
|
52
|
+
}, ["stop"])),
|
|
53
|
+
onPointercancel: e[3] || (e[3] = r(() => {
|
|
54
|
+
}, ["stop"])),
|
|
55
|
+
onPointerleave: e[4] || (e[4] = r(() => {
|
|
56
|
+
}, ["stop"])),
|
|
57
|
+
onWheel: e[5] || (e[5] = r(() => {
|
|
58
|
+
}, ["stop"]))
|
|
59
|
+
},
|
|
60
|
+
[
|
|
61
|
+
l(n.$slots, "indicator", m(P(o.indicatorSlotProps)))
|
|
62
|
+
],
|
|
63
|
+
32
|
|
64
|
+
/* NEED_HYDRATION */
|
|
65
|
+
)) : v("v-if", !0)
|
|
66
|
+
], 42, b);
|
|
44
67
|
}
|
|
45
|
-
const
|
|
68
|
+
const g = /* @__PURE__ */ f(d, [["render", h], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-stepper/NmorphStepper.vue"]]);
|
|
46
69
|
export {
|
|
47
|
-
|
|
70
|
+
g as default
|
|
48
71
|
};
|