@nmorph/nmorph-ui-kit 3.0.3 → 3.0.5
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-scroll/NmorphScroll.css +1 -1
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +25 -20
- package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +19 -17
- 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.vue2.js +7 -7
- package/dist/components/data/nmorph-image/NmorphImage.vue2.js +1 -1
- package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.css +1 -1
- package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.js +5 -5
- package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue2.js +184 -145
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.css +1 -1
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +77 -82
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +56 -34
- 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-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-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 +50 -50
- package/dist/package.json.js +1 -1
- 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-gallery/NmorphMediaGallery.vue.d.ts +5 -1
- package/dist/src/components/data/nmorph-media-gallery/types.d.ts +8 -2
- 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-qr-code/NmorphQRCode.vue.d.ts +1 -1
- package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -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/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +1 -1
- package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -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
|
};
|
|
@@ -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
|
};
|