@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.
Files changed (59) hide show
  1. package/dist/assets/icons/chevron-right.svg.js +2 -2
  2. package/dist/assets/icons/hand.svg.js +10 -28
  3. package/dist/assets/icons/mic.svg.js +6 -6
  4. package/dist/assets/icons/mute.svg.js +6 -6
  5. package/dist/assets/icons/pin.svg.js +5 -5
  6. package/dist/assets/icons/video-camera-off.svg.js +6 -6
  7. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -1
  8. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +25 -20
  9. package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
  10. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +19 -17
  11. package/dist/components/data/nmorph-carousel/NmorphCarousel.css +1 -1
  12. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +10 -10
  13. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +23 -20
  14. package/dist/components/data/nmorph-file-card/NmorphFileCard.vue2.js +7 -7
  15. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +1 -1
  16. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.css +1 -1
  17. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.js +5 -5
  18. package/dist/components/data/nmorph-media-gallery/NmorphMediaGallery.vue2.js +184 -145
  19. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.css +1 -1
  20. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +77 -82
  21. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +56 -34
  22. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +87 -91
  23. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +71 -44
  24. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +4 -4
  25. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue2.js +25 -25
  26. package/dist/components/feedback/nmorph-guide/NmorphGuide.vue2.js +66 -61
  27. package/dist/components/feedback/nmorph-guide/NmorphGuideStep.vue.js +25 -23
  28. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -1
  29. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +88 -48
  30. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +75 -59
  31. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
  32. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  33. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +128 -95
  34. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +73 -71
  35. package/dist/components/navigation/nmorph-stepper/NmorphStepper.css +1 -1
  36. package/dist/components/navigation/nmorph-stepper/NmorphStepper.vue.js +49 -26
  37. package/dist/index.umd.js +50 -50
  38. package/dist/package.json.js +1 -1
  39. package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +1 -0
  40. package/dist/src/components/basic/nmorph-scroll/types.d.ts +1 -0
  41. package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +1 -0
  42. package/dist/src/components/data/nmorph-card/types.d.ts +1 -0
  43. package/dist/src/components/data/nmorph-media-gallery/NmorphMediaGallery.vue.d.ts +5 -1
  44. package/dist/src/components/data/nmorph-media-gallery/types.d.ts +8 -2
  45. package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +2 -1
  46. package/dist/src/components/data/nmorph-media-tile/types.d.ts +1 -1
  47. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -0
  48. package/dist/src/components/data/nmorph-pagination/types.d.ts +1 -0
  49. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +1 -1
  50. package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +1 -1
  51. package/dist/src/components/feedback/nmorph-guide/NmorphGuide.vue.d.ts +2 -0
  52. package/dist/src/components/feedback/nmorph-guide/types.d.ts +4 -0
  53. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +2 -0
  54. package/dist/src/components/feedback/nmorph-tooltip/types.d.ts +2 -0
  55. package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +10 -2
  56. package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +1 -1
  57. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +1 -1
  58. package/dist/style.css +1 -1
  59. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  import './NmorphTimePicker.css';
2
- import b from "./NmorphTimePicker.vue2.js";
3
- import { openBlock as i, createElementBlock as n, normalizeStyle as v, normalizeClass as a, createElementVNode as r, withKeys as m, withModifiers as t, createVNode as d, withCtx as p, toDisplayString as c, createCommentVNode as _, createBlock as f, Fragment as s, renderList as h } from "vue";
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 u from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const y = ["aria-expanded", "aria-controls", "tabindex", "onKeydown"], w = ["id", "name", "autocomplete", "step", "value", "disabled"], x = { class: "nmorph-time-picker__selected-value" }, C = ["id"], H = {
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
- }, g = ["disabled", "onClick"], O = {
10
+ }, N = {
11
11
  class: "nmorph-time-picker__column",
12
12
  role: "listbox",
13
13
  "aria-label": "Minutes"
14
- }, N = ["disabled", "onClick"], M = {
14
+ }, O = {
15
15
  class: "nmorph-time-picker__column",
16
16
  role: "listbox",
17
17
  "aria-label": "Seconds"
18
- }, V = ["disabled", "onClick"];
19
- function I(S, l, z, e, B, D) {
20
- return i(), n(
18
+ };
19
+ function H(S, r, B, e, V, I) {
20
+ return i(), a(
21
21
  "div",
22
22
  {
23
- class: a(e.modifiers),
24
- style: v(e.styles)
23
+ class: k(e.modifiers),
24
+ style: b(e.styles)
25
25
  },
26
26
  [
27
- r("div", {
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: l[0] || (l[0] = (...o) => e.focusHandler && e.focusHandler(...o)),
36
- onBlur: l[1] || (l[1] = (...o) => e.blurHandler && e.blurHandler(...o)),
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(t(e.toggleOpen, ["prevent"]), ["space"]),
39
- m(t(e.toggleOpen, ["prevent"]), ["enter"]),
40
- m(t(e.closeHandler, ["prevent"]), ["escape"])
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
- r("input", {
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, w),
54
- d(e.NmorphIcon, { class: "nmorph-time-picker__clock-icon" }, {
55
- default: p(() => [
56
- d(e.NmorphIconClock)
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
- r(
61
+ o(
62
62
  "div",
63
- x,
64
- c(e.displayValue),
63
+ w,
64
+ x(e.displayValue),
65
65
  1
66
66
  /* TEXT */
67
67
  ),
68
- e.showClearButton ? (i(), n("button", {
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: t(e.clearHandler, ["stop"])
73
+ onClick: c(e.clearHandler, ["stop"])
74
74
  }, [
75
- d(e.NmorphIcon, {
75
+ n(e.NmorphIcon, {
76
76
  width: "14px",
77
77
  height: "14px"
78
78
  }, {
79
- default: p(() => [
80
- d(e.NmorphIconCircleClose)
79
+ default: t(() => [
80
+ n(e.NmorphIconCircleClose)
81
81
  ]),
82
82
  _: 1
83
83
  /* STABLE */
84
84
  })
85
- ])) : _("v-if", !0)
86
- ], 40, y),
87
- e.inputDOMRef && !e.props.disabled ? (i(), f(e.NmorphDropdown, {
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: p(() => [
99
- r("div", {
98
+ default: t(() => [
99
+ o("div", {
100
100
  id: `${e.id}-dropdown`,
101
- class: a(["nmorph-time-picker__panel", { "nmorph-time-picker__panel--with-seconds": e.props.showSeconds }])
101
+ class: k(["nmorph-time-picker__panel", { "nmorph-time-picker__panel--with-seconds": e.props.showSeconds }])
102
102
  }, [
103
- r("div", H, [
104
- (i(!0), n(
105
- s,
106
- null,
107
- h(e.hourOptions, (o) => (i(), n("button", {
108
- key: o.value,
109
- type: "button",
110
- class: a(["nmorph-time-picker__option", [
111
- e.optionHeightModifiers,
112
- { "nmorph-time-picker__option--active": o.value === e.pickerValue.hour }
113
- ]]),
114
- disabled: o.disabled,
115
- onClick: (k) => e.selectUnit("hour", o.value)
116
- }, c(o.label), 11, g))),
117
- 128
118
- /* KEYED_FRAGMENT */
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
- l[3] || (l[3] = r(
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
- r("div", O, [
129
- (i(!0), n(
130
- s,
131
- null,
132
- h(e.minuteOptions, (o) => (i(), n("button", {
133
- key: o.value,
134
- type: "button",
135
- class: a(["nmorph-time-picker__option", [
136
- e.optionHeightModifiers,
137
- { "nmorph-time-picker__option--active": o.value === e.pickerValue.minute }
138
- ]]),
139
- disabled: o.disabled,
140
- onClick: (k) => e.selectUnit("minute", o.value)
141
- }, c(o.label), 11, N))),
142
- 128
143
- /* KEYED_FRAGMENT */
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(), n(
168
+ e.props.showSeconds ? (i(), a(
147
169
  s,
148
170
  { key: 0 },
149
171
  [
150
- l[2] || (l[2] = r(
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
- r("div", M, [
158
- (i(!0), n(
159
- s,
160
- null,
161
- h(e.secondOptions, (o) => (i(), n("button", {
162
- key: o.value,
163
- type: "button",
164
- class: a(["nmorph-time-picker__option", [
165
- e.optionHeightModifiers,
166
- { "nmorph-time-picker__option--active": o.value === e.pickerValue.second }
167
- ]]),
168
- disabled: o.disabled,
169
- onClick: (k) => e.selectUnit("second", o.value)
170
- }, c(o.label), 11, V))),
171
- 128
172
- /* KEYED_FRAGMENT */
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
- )) : _("v-if", !0)
179
- ], 10, C)
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"])) : _("v-if", !0)
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 F = /* @__PURE__ */ u(b, [["render", I], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-time-picker/NmorphTimePicker.vue"]]);
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
- F as default
224
+ E as default
192
225
  };
@@ -1,16 +1,18 @@
1
1
  import './NmorphTimePicker.css';
2
- import { defineComponent as te, ref as V, computed as n, watch as re } from "vue";
3
- import { useI18n as oe } from "vue-i18n";
4
- import { useModifiers as _ } from "../../../utils/create-modifiers.js";
5
- import { createCssSizeVariables as ne } from "../../../utils/common.js";
6
- import { useFocusableInput as ue } from "../../../hooks/use-focusable-input.js";
7
- import { useFormItemInput as le, useFormItemModel as se } from "../nmorph-form/use-form-item-input.js";
8
- import { NmorphComponentThickness as O } from "../../../types/common.types.js";
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 de from "../../basic/nmorph-icon/NmorphIcon.vue.js";
12
- import ce from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
13
- const Te = /* @__PURE__ */ te({
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(B, { expose: M, emit: F }) {
36
- const t = B, m = F, { t: T } = oe(), { id: H, name: P, autocomplete: $, tabindex: z } = le(t), { modelValue: s, updateModelValue: p } = se(
37
- t,
38
- (e) => m("update:model-value", 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: k,
43
- handleFocus: D,
44
- handleBlur: R
45
- } = ue({
46
- onFocus: () => m("focus"),
47
- onBlur: () => m("blur")
48
- }), c = (e) => String(e).padStart(2, "0"), f = (e) => Math.max(1, Math.floor(Number.isFinite(e) ? e : 1)), i = (e) => {
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 r = e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);
51
- if (!r) return null;
52
- const o = Number(r[1]), v = Number(r[2]), d = Number(r[3] || 0);
53
- return o > 23 || v > 59 || d > 59 ? null : { hour: o, minute: v, second: d };
54
- }, y = (e) => {
55
- const r = `${c(e.hour)}:${c(e.minute)}`;
56
- return t.showSeconds ? `${r}:${c(e.second)}` : r;
57
- }, h = (e) => e.hour * 3600 + e.minute * 60 + e.second, g = n(() => i(t.minTime)), N = n(() => i(t.maxTime)), w = n(() => i(s.value)), l = V(w.value || { hour: 0, minute: 0, second: 0 }), x = n(() => t.placeholder || T("pickATime"));
58
- re(s, (e) => {
59
- const r = i(e);
60
- r && (l.value = r);
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 b = (e) => {
63
- const r = h(e);
64
- return !!(g.value && r < h(g.value) || N.value && r > h(N.value));
65
- }, S = (e, r, o) => {
66
- const v = f(o), d = /* @__PURE__ */ new Set();
67
- for (let u = 0; u <= r; u += v) d.add(u);
68
- return d.add(l.value[e]), Array.from(d).filter((u) => u >= 0 && u <= r).sort((u, q) => u - q).map((u) => {
69
- const q = { ...l.value, [e]: u };
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: c(u),
72
- value: u,
73
- disabled: b(q)
73
+ label: d(n),
74
+ value: n,
75
+ disabled: S(q)
74
76
  };
75
77
  });
76
- }, A = n(() => S("hour", 23, t.hourStep)), U = n(() => S("minute", 59, t.minuteStep)), j = n(() => S("second", 59, t.secondStep)), E = (e, r) => {
77
- const o = { ...l.value, [e]: r };
78
- b(o) || (l.value = o, p(y(o)));
79
- }, G = () => {
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
- }, J = () => {
83
+ }, E = () => {
82
84
  a.value = !1;
83
- }, K = () => {
84
- t.disabled || (a.value = !a.value);
85
- }, L = (e) => {
86
- const r = e.target, o = i(r.value);
87
- !o || b(o) || (l.value = o, p(y(o)));
88
- }, Q = n(() => s.value || x.value), W = n(
89
- () => t.showSeconds ? f(t.secondStep) : f(t.minuteStep) * 60
90
- ), X = n(() => t.clearable && !!s.value && !t.disabled), Y = n(
91
- () => _({
92
- nmorph: [O[t.thickness]],
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
- t.disabled && "disabled",
96
+ r.disabled && "disabled",
95
97
  a.value && "open",
96
- k.value && "focus",
98
+ w.value && "focus",
97
99
  !s.value && "placeholder"
98
100
  ]
99
101
  })
100
- ), Z = n(
101
- () => _({
102
- nmorph: [O[t.thickness]]
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
- M({ inputDOMRef: I });
110
- const C = { props: t, emit: m, t: T, id: H, name: P, autocomplete: $, tabindex: z, modelValue: s, updateModelValue: p, open: a, inputDOMRef: I, focused: k, focusHandler: D, blurHandler: R, pad: c, normalizeStep: f, parseTime: i, formatTime: y, timeToSeconds: h, minTimeParts: g, maxTimeParts: N, modelTimeParts: w, pickerValue: l, placeholderText: x, isOutsideRange: b, getUnitOptions: S, hourOptions: A, minuteOptions: U, secondOptions: j, selectUnit: E, clearHandler: G, closeHandler: J, toggleOpen: K, nativeInputHandler: L, displayValue: Q, inputStep: W, showClearButton: X, modifiers: Y, optionHeightModifiers: Z, styles: ee, get NmorphDropdown() {
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 NmorphIcon() {
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
- Te as default
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 n from "./NmorphStepper.vue2.js";
3
- import { openBlock as i, createElementBlock as l, normalizeClass as t, createElementVNode as r, normalizeStyle as d, renderSlot as a, normalizeProps as c, guardReactiveProps as p } from "vue";
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 s from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const m = ["aria-label", "aria-disabled", "tabindex"], h = {
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 _(o, P, v, e, b, f) {
12
- return i(), l("div", {
13
- class: t(e.modifiers),
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": e.props.ariaLabel,
17
- "aria-disabled": e.props.disabled || void 0,
18
- tabindex: e.tabIndex,
19
- onWheel: e.handleWheel,
20
- onKeydown: e.handleKeydown,
21
- onPointerdown: e.handlePointerDown,
22
- onPointermove: e.handlePointerMove,
23
- onPointerup: e.handlePointerEnd,
24
- onPointercancel: e.clearPointer,
25
- onPointerleave: e.clearPointer,
26
- onClickCapture: e.handleClickCapture
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
- r("div", h, [
29
- r(
28
+ a("div", c, [
29
+ a(
30
30
  "div",
31
31
  {
32
32
  class: "nmorph-stepper__track",
33
- style: d(e.trackStyle)
33
+ style: s(o.trackStyle)
34
34
  },
35
35
  [
36
- a(o.$slots, "default")
36
+ l(n.$slots, "default")
37
37
  ],
38
38
  4
39
39
  /* STYLE */
40
40
  )
41
41
  ]),
42
- a(o.$slots, "indicator", c(p(e.indicatorSlotProps)))
43
- ], 42, m);
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 C = /* @__PURE__ */ s(n, [["render", _], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-stepper/NmorphStepper.vue"]]);
68
+ const g = /* @__PURE__ */ f(d, [["render", h], ["__file", "/builds/ketjo/nmorph/library/src/components/navigation/nmorph-stepper/NmorphStepper.vue"]]);
46
69
  export {
47
- C as default
70
+ g as default
48
71
  };