@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,10 +1,10 @@
|
|
|
1
1
|
import './NmorphTooltip.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { usePlacement as
|
|
4
|
-
import { useZIndex as
|
|
5
|
-
import { useModifiers as
|
|
6
|
-
import { createCssSizeVariables as
|
|
7
|
-
const
|
|
2
|
+
import { defineComponent as Z, ref as l, useSlots as $, computed as t, watch as H, onBeforeUnmount as J } from "vue";
|
|
3
|
+
import { usePlacement as K } from "../../../hooks/use-placement.js";
|
|
4
|
+
import { useZIndex as Q } from "../../../hooks/use-z-index.js";
|
|
5
|
+
import { useModifiers as X } from "../../../utils/create-modifiers.js";
|
|
6
|
+
import { createCssSizeVariables as ee } from "../../../utils/common.js";
|
|
7
|
+
const E = 600, ie = /* @__PURE__ */ Z({
|
|
8
8
|
__name: "NmorphTooltip",
|
|
9
9
|
props: {
|
|
10
10
|
text: { type: String, required: !1, default: "" },
|
|
@@ -17,60 +17,63 @@ const P = 600, $ = /* @__PURE__ */ j({
|
|
|
17
17
|
openDelay: { type: Number, required: !1, default: 0 },
|
|
18
18
|
closeDelay: { type: Number, required: !1, default: 0 },
|
|
19
19
|
zIndex: { type: Number, required: !1, default: void 0 },
|
|
20
|
+
teleportTo: { type: null, required: !1, default: "body" },
|
|
21
|
+
disabledTeleport: { type: Boolean, required: !1, default: !0 },
|
|
20
22
|
width: { type: [Number, String], required: !1, default: void 0 },
|
|
21
23
|
maxWidth: { type: [Number, String], required: !1, default: void 0 },
|
|
22
24
|
height: { type: [Number, String], required: !1, default: void 0 }
|
|
23
25
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const e =
|
|
26
|
+
setup(k, { expose: z }) {
|
|
27
|
+
const e = k, n = l(e.forceShow), I = l(null), q = l(null), T = l(null), x = $(), a = l(null), u = l(null), s = l(null), i = l("mouse"), f = l(!1), m = t(() => !!(e.text || x.content)), b = t(() => n.value && m.value && !e.disabled), { placement: g, placementCoords: S, placementReady: C } = K({
|
|
26
28
|
initialPlacement: e.position,
|
|
27
|
-
contentDOMElement:
|
|
28
|
-
relativeElement:
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
contentDOMElement: T,
|
|
30
|
+
relativeElement: q,
|
|
31
|
+
enabled: b
|
|
32
|
+
}), R = t(
|
|
33
|
+
() => X({
|
|
31
34
|
"nmorph-tooltip": [
|
|
32
|
-
|
|
35
|
+
g.value,
|
|
33
36
|
e.disabled && "disabled",
|
|
34
37
|
!!e.forceCoordinate?.x && !!e.forceCoordinate?.y && "force-coords"
|
|
35
38
|
]
|
|
36
39
|
})
|
|
37
|
-
),
|
|
38
|
-
n.value && clearTimeout(n.value), n.value = null;
|
|
39
|
-
}, c = () => {
|
|
40
|
+
), p = () => {
|
|
40
41
|
a.value && clearTimeout(a.value), a.value = null;
|
|
41
|
-
},
|
|
42
|
+
}, d = () => {
|
|
42
43
|
u.value && clearTimeout(u.value), u.value = null;
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
}, v = () => {
|
|
45
|
+
s.value && clearTimeout(s.value), s.value = null;
|
|
46
|
+
}, r = (o) => {
|
|
47
|
+
if (p(), d(), e.disabled || !m.value) {
|
|
48
|
+
n.value = !1;
|
|
46
49
|
return;
|
|
47
50
|
}
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
if (
|
|
51
|
+
n.value = o;
|
|
52
|
+
}, c = () => {
|
|
53
|
+
if (d(), !(e.disabled || !m.value)) {
|
|
51
54
|
if (e.openDelay <= 0) {
|
|
52
|
-
|
|
55
|
+
r(!0);
|
|
53
56
|
return;
|
|
54
57
|
}
|
|
55
|
-
|
|
58
|
+
p(), a.value = setTimeout(() => r(!0), e.openDelay);
|
|
56
59
|
}
|
|
57
60
|
}, h = () => {
|
|
58
61
|
if (!e.forceShow) {
|
|
59
|
-
if (
|
|
60
|
-
|
|
62
|
+
if (p(), e.closeDelay <= 0) {
|
|
63
|
+
r(!1);
|
|
61
64
|
return;
|
|
62
65
|
}
|
|
63
|
-
|
|
66
|
+
d(), u.value = setTimeout(() => r(!1), e.closeDelay);
|
|
64
67
|
}
|
|
65
68
|
}, y = () => {
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
e.trigger !== "hover" || i.value !== "mouse" ||
|
|
69
|
-
},
|
|
69
|
+
n.value ? h() : c();
|
|
70
|
+
}, L = () => {
|
|
71
|
+
e.trigger !== "hover" || i.value !== "mouse" || c();
|
|
72
|
+
}, W = () => {
|
|
70
73
|
e.trigger !== "hover" || i.value !== "mouse" || h();
|
|
71
|
-
},
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
+
}, j = (o) => {
|
|
75
|
+
if (f.value) {
|
|
76
|
+
f.value = !1, o.preventDefault();
|
|
74
77
|
return;
|
|
75
78
|
}
|
|
76
79
|
if (e.disabled || e.trigger === "manual") return;
|
|
@@ -80,42 +83,55 @@ const P = 600, $ = /* @__PURE__ */ j({
|
|
|
80
83
|
return;
|
|
81
84
|
}
|
|
82
85
|
e.trigger === "click" && y();
|
|
83
|
-
},
|
|
84
|
-
i.value =
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
},
|
|
86
|
+
}, A = (o) => {
|
|
87
|
+
i.value = o.pointerType || "mouse", !(e.disabled || e.touch !== "longpress") && (o.pointerType !== "touch" && o.pointerType !== "pen" || (v(), s.value = setTimeout(() => {
|
|
88
|
+
f.value = !0, c();
|
|
89
|
+
}, E)));
|
|
90
|
+
}, F = () => {
|
|
88
91
|
v();
|
|
89
|
-
},
|
|
90
|
-
() =>
|
|
92
|
+
}, w = t(() => e.forceCoordinate ? "100%" : "auto"), D = Q(
|
|
93
|
+
() => n.value,
|
|
91
94
|
() => e.zIndex
|
|
92
|
-
),
|
|
93
|
-
"--nmorph-private-tooltip-root-width":
|
|
94
|
-
"--nmorph-private-tooltip-z-index":
|
|
95
|
-
...
|
|
95
|
+
), P = t(() => ({
|
|
96
|
+
"--nmorph-private-tooltip-root-width": w.value,
|
|
97
|
+
"--nmorph-private-tooltip-z-index": D.value,
|
|
98
|
+
...ee({
|
|
96
99
|
"--nmorph-private-tooltip-width": e.width,
|
|
97
100
|
"--nmorph-private-tooltip-max-width": e.maxWidth,
|
|
98
101
|
"--nmorph-private-tooltip-height": e.height
|
|
99
102
|
})
|
|
100
|
-
})),
|
|
101
|
-
|
|
103
|
+
})), N = t(
|
|
104
|
+
() => !e.disabledTeleport && !e.forceCoordinate && typeof document < "u"
|
|
105
|
+
), _ = t(() => N.value && b.value), B = t(() => g.value.split("-")[0]), G = t(() => [
|
|
106
|
+
"nmorph-tooltip__info-content",
|
|
107
|
+
`nmorph-tooltip__info-content--${B.value}`,
|
|
108
|
+
_.value && "nmorph-tooltip__info-content--teleported"
|
|
109
|
+
]), U = t(() => ({
|
|
110
|
+
...P.value,
|
|
111
|
+
..._.value ? {
|
|
112
|
+
left: S.value.x,
|
|
113
|
+
top: S.value.y,
|
|
114
|
+
visibility: C.value ? "visible" : "hidden"
|
|
115
|
+
} : {}
|
|
116
|
+
}));
|
|
117
|
+
H(
|
|
102
118
|
() => [e.forceShow, e.disabled],
|
|
103
|
-
([
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
|
|
119
|
+
([o, M], V) => {
|
|
120
|
+
const Y = V?.[0] ?? !1;
|
|
121
|
+
if (M) {
|
|
122
|
+
r(!1);
|
|
107
123
|
return;
|
|
108
124
|
}
|
|
109
|
-
|
|
125
|
+
o ? r(!0) : Y && r(!1);
|
|
110
126
|
},
|
|
111
127
|
{ immediate: !0 }
|
|
112
|
-
),
|
|
113
|
-
|
|
114
|
-
}),
|
|
115
|
-
const
|
|
116
|
-
return Object.defineProperty(
|
|
128
|
+
), J(() => {
|
|
129
|
+
p(), d(), v();
|
|
130
|
+
}), z({ tooltipBody: T, open: c, close: h, toggle: y });
|
|
131
|
+
const O = { LONG_PRESS_DELAY_IN_MS: E, props: e, showTooltip: n, tooltipDOMRef: I, slotDOMRef: q, tooltipBody: T, slots: x, openTimer: a, closeTimer: u, longPressTimer: s, lastPointerType: i, suppressNextClick: f, hasTooltipContent: m, shouldRenderTooltip: b, placement: g, placementCoords: S, placementReady: C, modifiers: R, clearOpenTimer: p, clearCloseTimer: d, clearLongPressTimer: v, setTooltipOpen: r, open: c, close: h, toggle: y, handleMouseEnter: L, handleMouseLeave: W, handleClick: j, handlePointerDown: A, handlePointerEnd: F, rootWidth: w, zIndex: D, styles: P, canTeleportTooltip: N, teleportTooltip: _, placementSide: B, tooltipContentClass: G, tooltipContentStyle: U };
|
|
132
|
+
return Object.defineProperty(O, "__isScriptSetup", { enumerable: !1, value: !0 }), O;
|
|
117
133
|
}
|
|
118
134
|
});
|
|
119
135
|
export {
|
|
120
|
-
|
|
136
|
+
ie as default
|
|
121
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-file-upload{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__trigger{position:relative;width:100%;min-width:0}.nmorph-file-upload input{display:none}.nmorph-file-upload .nmorph-file-upload__list{width:100%;min-width:0;margin-top:var(--indentation-03)}.nmorph-file-upload .nmorph-file-upload__list>div{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__file{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin-bottom:
|
|
1
|
+
.nmorph-file-upload{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__trigger{position:relative;width:100%;min-width:0}.nmorph-file-upload input{display:none}.nmorph-file-upload .nmorph-file-upload__list{width:100%;min-width:0;margin-top:var(--indentation-03)}.nmorph-file-upload .nmorph-file-upload__list>div{display:grid;gap:var(--indentation-02);box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__file{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin-bottom:0;padding:var(--indentation-02) var(--indentation-03);overflow:hidden;background:var(--nmorph-main-color);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)}.nmorph-file-upload.nmorph-file-upload--compact .nmorph-file-upload__file{padding:var(--indentation-01) var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-grid .nmorph-file-upload__list>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-grid .nmorph-file-upload__file{margin-bottom:0}.nmorph-file-upload.nmorph-file-upload--layout-inline .nmorph-file-upload__list>div{display:flex;flex-wrap:wrap;gap:var(--indentation-02)}.nmorph-file-upload.nmorph-file-upload--layout-inline .nmorph-file-upload__file{width:auto;margin-bottom:0}.nmorph-file-upload .nmorph-file-upload__file>.nmorph-image-preview{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file>.nmorph-video-preview,.nmorph-file-upload .nmorph-file-upload__file>.nmorph-audio-preview,.nmorph-file-upload .nmorph-file-upload__file>.nmorph-file-card{flex:1 1 0;min-width:0}.nmorph-file-upload .nmorph-file-upload__file-info{display:flex;flex:1 1 0;gap:var(--indentation-02);align-items:center;min-width:0;max-width:100%;overflow:hidden}.nmorph-file-upload .nmorph-file-upload__file-info>.nmorph-icon{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-name{display:block;flex:1 1 0;width:var(--nmorph-private-file-upload-name-width, auto);min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-file-upload .nmorph-file-upload__remove-file{flex:0 0 auto}
|
|
@@ -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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-time-picker{--nmorph-private-time-picker-width:
|
|
1
|
+
.nmorph-time-picker{--nmorph-private-time-picker-width: fit-content;position:relative;display:inline-block;width:var(--nmorph-private-time-picker-width);min-width:0;height:var(--nmorph-private-control-height)}.nmorph-time-picker .nmorph-time-picker__input{display:inline-flex;gap:8px;align-items:center;box-sizing:border-box;width:100%;min-width:0;height:100%;padding:0 var(--default-indentation-input);overflow:hidden;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-outset);cursor:pointer}.nmorph-time-picker .nmorph-time-picker__native{position:absolute;width:0;height:0;padding:0;border:0;opacity:0;pointer-events:none}.nmorph-time-picker .nmorph-time-picker__clock-icon{flex:0 0 auto}.nmorph-time-picker .nmorph-time-picker__selected-value{flex:0 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transform:translateY(var(--nmorph-private-control-text-offset-y))}.nmorph-time-picker .nmorph-time-picker__clear{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;width:18px;height:18px;padding:0;color:var(--nmorph-text-color);background:transparent;border:0;cursor:pointer}.nmorph-time-picker.nmorph-time-picker--open .nmorph-time-picker__input{box-shadow:var(--nmorph-shadow-inset)}.nmorph-time-picker.nmorph-time-picker--focus{outline:2px solid var(--nmorph-accent-color)}.nmorph-time-picker.nmorph-time-picker--placeholder .nmorph-time-picker__selected-value{color:var(--nmorph-placeholder-text-color)}.nmorph-time-picker.nmorph-time-picker--disabled{cursor:not-allowed;opacity:.6}.nmorph-time-picker.nmorph-time-picker--disabled .nmorph-time-picker__input{pointer-events:none}.nmorph-time-picker__panel{display:grid;grid-template-columns:minmax(64px,1fr) 8px minmax(64px,1fr);gap:8px;align-items:start;box-sizing:border-box;width:100%;padding:10px;color:var(--nmorph-text-color)}.nmorph-time-picker__panel--with-seconds{grid-template-columns:minmax(64px,1fr) 8px minmax(64px,1fr) 8px minmax(64px,1fr)}.nmorph-time-picker__column{min-width:0;padding:4px;background:color-mix(in srgb,var(--nmorph-text-color) 4%,transparent);border-radius:var(--default-border-radius)}.nmorph-time-picker__column .nmorph-scroll{display:grid;grid-auto-flow:row;grid-template-columns:minmax(0,1fr)}.nmorph-time-picker__column .nmorph-scroll__viewport{padding:0 2px 0 0}.nmorph-time-picker__separator{display:flex;justify-content:center;align-items:flex-start;min-width:8px;padding-top:calc((var(--nmorph-private-control-height) - 1em) / 2 + 2px);color:var(--nmorph-semi-contrast-text-color);font-weight:var(--font-weight-bold);line-height:1}.nmorph-time-picker__option{width:100%;min-width:0}.nmorph-time-picker__option .nmorph-button__content{width:100%;min-width:0;padding-right:var(--indentation-02);padding-left:var(--indentation-02);background:transparent}.nmorph-time-picker__option.nmorph-button--plain .nmorph-button__content:not(:disabled,[loading=true]):hover{background:color-mix(in srgb,var(--nmorph-accent-color) 14%,transparent)}.nmorph-time-picker__option.nmorph-button.nmorph-button--active .nmorph-button__content{color:var(--nmorph-focus-text-color);background:var(--nmorph-accent-color);border-color:var(--nmorph-accent-color);box-shadow:none}.nmorph-time-picker__option.nmorph-button.nmorph-button--active .nmorph-button__content span,.nmorph-time-picker__option.nmorph-button.nmorph-button--active .nmorph-button__content .nmorph-icon{color:var(--nmorph-focus-text-color);--nmorph-private-icon-color: var(--nmorph-focus-text-color)}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import './NmorphTimePicker.css';
|
|
2
|
-
import
|
|
3
|
-
import { openBlock as i, createElementBlock as
|
|
2
|
+
import v from "./NmorphTimePicker.vue2.js";
|
|
3
|
+
import { openBlock as i, createElementBlock as a, normalizeStyle as b, normalizeClass as k, createElementVNode as o, withKeys as m, withModifiers as c, createVNode as n, withCtx as t, toDisplayString as x, createCommentVNode as p, createBlock as d, Fragment as s, renderList as h } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import f from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const u = ["aria-expanded", "aria-controls", "tabindex", "onKeydown"], g = ["id", "name", "autocomplete", "step", "value", "disabled"], w = { class: "nmorph-time-picker__selected-value" }, y = ["id"], C = {
|
|
7
7
|
class: "nmorph-time-picker__column",
|
|
8
8
|
role: "listbox",
|
|
9
9
|
"aria-label": "Hours"
|
|
10
|
-
},
|
|
10
|
+
}, N = {
|
|
11
11
|
class: "nmorph-time-picker__column",
|
|
12
12
|
role: "listbox",
|
|
13
13
|
"aria-label": "Minutes"
|
|
14
|
-
},
|
|
14
|
+
}, O = {
|
|
15
15
|
class: "nmorph-time-picker__column",
|
|
16
16
|
role: "listbox",
|
|
17
17
|
"aria-label": "Seconds"
|
|
18
|
-
}
|
|
19
|
-
function
|
|
20
|
-
return i(),
|
|
18
|
+
};
|
|
19
|
+
function H(S, r, B, e, V, I) {
|
|
20
|
+
return i(), a(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
|
-
class:
|
|
24
|
-
style:
|
|
23
|
+
class: k(e.modifiers),
|
|
24
|
+
style: b(e.styles)
|
|
25
25
|
},
|
|
26
26
|
[
|
|
27
|
-
|
|
27
|
+
o("div", {
|
|
28
28
|
ref: "inputDOMRef",
|
|
29
29
|
class: "nmorph-time-picker__input",
|
|
30
30
|
role: "combobox",
|
|
@@ -32,15 +32,15 @@ function I(S, l, z, e, B, D) {
|
|
|
32
32
|
"aria-controls": `${e.id}-dropdown`,
|
|
33
33
|
tabindex: e.props.disabled ? -1 : e.tabindex,
|
|
34
34
|
onClick: e.toggleOpen,
|
|
35
|
-
onFocus:
|
|
36
|
-
onBlur:
|
|
35
|
+
onFocus: r[0] || (r[0] = (...l) => e.focusHandler && e.focusHandler(...l)),
|
|
36
|
+
onBlur: r[1] || (r[1] = (...l) => e.blurHandler && e.blurHandler(...l)),
|
|
37
37
|
onKeydown: [
|
|
38
|
-
m(
|
|
39
|
-
m(
|
|
40
|
-
m(
|
|
38
|
+
m(c(e.toggleOpen, ["prevent"]), ["space"]),
|
|
39
|
+
m(c(e.toggleOpen, ["prevent"]), ["enter"]),
|
|
40
|
+
m(c(e.closeHandler, ["prevent"]), ["escape"])
|
|
41
41
|
]
|
|
42
42
|
}, [
|
|
43
|
-
|
|
43
|
+
o("input", {
|
|
44
44
|
id: e.id,
|
|
45
45
|
class: "nmorph-time-picker__native",
|
|
46
46
|
name: e.name,
|
|
@@ -50,41 +50,41 @@ function I(S, l, z, e, B, D) {
|
|
|
50
50
|
value: e.modelValue || "",
|
|
51
51
|
disabled: e.props.disabled,
|
|
52
52
|
onInput: e.nativeInputHandler
|
|
53
|
-
}, null, 40,
|
|
54
|
-
|
|
55
|
-
default:
|
|
56
|
-
|
|
53
|
+
}, null, 40, g),
|
|
54
|
+
n(e.NmorphIcon, { class: "nmorph-time-picker__clock-icon" }, {
|
|
55
|
+
default: t(() => [
|
|
56
|
+
n(e.NmorphIconClock)
|
|
57
57
|
]),
|
|
58
58
|
_: 1
|
|
59
59
|
/* STABLE */
|
|
60
60
|
}),
|
|
61
|
-
|
|
61
|
+
o(
|
|
62
62
|
"div",
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
w,
|
|
64
|
+
x(e.displayValue),
|
|
65
65
|
1
|
|
66
66
|
/* TEXT */
|
|
67
67
|
),
|
|
68
|
-
e.showClearButton ? (i(),
|
|
68
|
+
e.showClearButton ? (i(), a("button", {
|
|
69
69
|
key: 0,
|
|
70
70
|
class: "nmorph-time-picker__clear",
|
|
71
71
|
type: "button",
|
|
72
72
|
"aria-label": "Clear time",
|
|
73
|
-
onClick:
|
|
73
|
+
onClick: c(e.clearHandler, ["stop"])
|
|
74
74
|
}, [
|
|
75
|
-
|
|
75
|
+
n(e.NmorphIcon, {
|
|
76
76
|
width: "14px",
|
|
77
77
|
height: "14px"
|
|
78
78
|
}, {
|
|
79
|
-
default:
|
|
80
|
-
|
|
79
|
+
default: t(() => [
|
|
80
|
+
n(e.NmorphIconCircleClose)
|
|
81
81
|
]),
|
|
82
82
|
_: 1
|
|
83
83
|
/* STABLE */
|
|
84
84
|
})
|
|
85
|
-
])) :
|
|
86
|
-
], 40,
|
|
87
|
-
e.inputDOMRef && !e.props.disabled ? (i(),
|
|
85
|
+
])) : p("v-if", !0)
|
|
86
|
+
], 40, u),
|
|
87
|
+
e.inputDOMRef && !e.props.disabled ? (i(), d(e.NmorphDropdown, {
|
|
88
88
|
key: 0,
|
|
89
89
|
open: e.open,
|
|
90
90
|
"relative-element": e.inputDOMRef,
|
|
@@ -95,98 +95,131 @@ function I(S, l, z, e, B, D) {
|
|
|
95
95
|
onOnOutsideClick: e.closeHandler,
|
|
96
96
|
onOnEscapeKeydown: e.closeHandler
|
|
97
97
|
}, {
|
|
98
|
-
default:
|
|
99
|
-
|
|
98
|
+
default: t(() => [
|
|
99
|
+
o("div", {
|
|
100
100
|
id: `${e.id}-dropdown`,
|
|
101
|
-
class:
|
|
101
|
+
class: k(["nmorph-time-picker__panel", { "nmorph-time-picker__panel--with-seconds": e.props.showSeconds }])
|
|
102
102
|
}, [
|
|
103
|
-
|
|
104
|
-
(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
103
|
+
o("div", C, [
|
|
104
|
+
n(e.NmorphScroll, {
|
|
105
|
+
height: "210px",
|
|
106
|
+
gap: 6,
|
|
107
|
+
"scroll-x-prop": "hidden",
|
|
108
|
+
"css-scroll-behavior": "auto"
|
|
109
|
+
}, {
|
|
110
|
+
default: t(() => [
|
|
111
|
+
(i(!0), a(
|
|
112
|
+
s,
|
|
113
|
+
null,
|
|
114
|
+
h(e.hourOptions, (l) => (i(), d(e.NmorphButton, {
|
|
115
|
+
key: l.value,
|
|
116
|
+
class: "nmorph-time-picker__option",
|
|
117
|
+
design: "plain",
|
|
118
|
+
text: l.label,
|
|
119
|
+
thickness: e.props.thickness,
|
|
120
|
+
active: l.value === e.pickerValue.hour,
|
|
121
|
+
disabled: l.disabled,
|
|
122
|
+
onClick: (_) => e.selectUnit("hour", l.value)
|
|
123
|
+
}, null, 8, ["text", "thickness", "active", "disabled", "onClick"]))),
|
|
124
|
+
128
|
|
125
|
+
/* KEYED_FRAGMENT */
|
|
126
|
+
))
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
/* STABLE */
|
|
130
|
+
})
|
|
120
131
|
]),
|
|
121
|
-
|
|
132
|
+
r[3] || (r[3] = o(
|
|
122
133
|
"div",
|
|
123
134
|
{ class: "nmorph-time-picker__separator" },
|
|
124
135
|
":",
|
|
125
136
|
-1
|
|
126
137
|
/* CACHED */
|
|
127
138
|
)),
|
|
128
|
-
|
|
129
|
-
(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
o("div", N, [
|
|
140
|
+
n(e.NmorphScroll, {
|
|
141
|
+
height: "210px",
|
|
142
|
+
gap: 6,
|
|
143
|
+
"scroll-x-prop": "hidden",
|
|
144
|
+
"css-scroll-behavior": "auto"
|
|
145
|
+
}, {
|
|
146
|
+
default: t(() => [
|
|
147
|
+
(i(!0), a(
|
|
148
|
+
s,
|
|
149
|
+
null,
|
|
150
|
+
h(e.minuteOptions, (l) => (i(), d(e.NmorphButton, {
|
|
151
|
+
key: l.value,
|
|
152
|
+
class: "nmorph-time-picker__option",
|
|
153
|
+
design: "plain",
|
|
154
|
+
text: l.label,
|
|
155
|
+
thickness: e.props.thickness,
|
|
156
|
+
active: l.value === e.pickerValue.minute,
|
|
157
|
+
disabled: l.disabled,
|
|
158
|
+
onClick: (_) => e.selectUnit("minute", l.value)
|
|
159
|
+
}, null, 8, ["text", "thickness", "active", "disabled", "onClick"]))),
|
|
160
|
+
128
|
|
161
|
+
/* KEYED_FRAGMENT */
|
|
162
|
+
))
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
/* STABLE */
|
|
166
|
+
})
|
|
145
167
|
]),
|
|
146
|
-
e.props.showSeconds ? (i(),
|
|
168
|
+
e.props.showSeconds ? (i(), a(
|
|
147
169
|
s,
|
|
148
170
|
{ key: 0 },
|
|
149
171
|
[
|
|
150
|
-
|
|
172
|
+
r[2] || (r[2] = o(
|
|
151
173
|
"div",
|
|
152
174
|
{ class: "nmorph-time-picker__separator" },
|
|
153
175
|
":",
|
|
154
176
|
-1
|
|
155
177
|
/* CACHED */
|
|
156
178
|
)),
|
|
157
|
-
|
|
158
|
-
(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
179
|
+
o("div", O, [
|
|
180
|
+
n(e.NmorphScroll, {
|
|
181
|
+
height: "210px",
|
|
182
|
+
gap: 6,
|
|
183
|
+
"scroll-x-prop": "hidden",
|
|
184
|
+
"css-scroll-behavior": "auto"
|
|
185
|
+
}, {
|
|
186
|
+
default: t(() => [
|
|
187
|
+
(i(!0), a(
|
|
188
|
+
s,
|
|
189
|
+
null,
|
|
190
|
+
h(e.secondOptions, (l) => (i(), d(e.NmorphButton, {
|
|
191
|
+
key: l.value,
|
|
192
|
+
class: "nmorph-time-picker__option",
|
|
193
|
+
design: "plain",
|
|
194
|
+
text: l.label,
|
|
195
|
+
thickness: e.props.thickness,
|
|
196
|
+
active: l.value === e.pickerValue.second,
|
|
197
|
+
disabled: l.disabled,
|
|
198
|
+
onClick: (_) => e.selectUnit("second", l.value)
|
|
199
|
+
}, null, 8, ["text", "thickness", "active", "disabled", "onClick"]))),
|
|
200
|
+
128
|
|
201
|
+
/* KEYED_FRAGMENT */
|
|
202
|
+
))
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
/* STABLE */
|
|
206
|
+
})
|
|
174
207
|
])
|
|
175
208
|
],
|
|
176
209
|
64
|
|
177
210
|
/* STABLE_FRAGMENT */
|
|
178
|
-
)) :
|
|
179
|
-
], 10,
|
|
211
|
+
)) : p("v-if", !0)
|
|
212
|
+
], 10, y)
|
|
180
213
|
]),
|
|
181
214
|
_: 1
|
|
182
215
|
/* STABLE */
|
|
183
|
-
}, 8, ["open", "relative-element", "width", "z-index", "aria-label"])) :
|
|
216
|
+
}, 8, ["open", "relative-element", "width", "z-index", "aria-label"])) : p("v-if", !0)
|
|
184
217
|
],
|
|
185
218
|
6
|
|
186
219
|
/* CLASS, STYLE */
|
|
187
220
|
);
|
|
188
221
|
}
|
|
189
|
-
const
|
|
222
|
+
const E = /* @__PURE__ */ f(v, [["render", H], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-time-picker/NmorphTimePicker.vue"]]);
|
|
190
223
|
export {
|
|
191
|
-
|
|
224
|
+
E as default
|
|
192
225
|
};
|