@voicenter-team/voicenter-ui-plus 4.0.0-beta.6 → 4.0.0-beta.8

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 (93) hide show
  1. package/README.md +4 -1
  2. package/library/assets/components/VcFilterBar/VcFilterAddMenu.css +1 -0
  3. package/library/assets/components/VcFilterBar/VcFilterBar.css +1 -0
  4. package/library/assets/components/VcFilterBar/VcFilterChip.css +1 -0
  5. package/library/assets/components/VcFilterBar/VcFilterChipEditor.css +1 -0
  6. package/library/assets/components/VcFilterBar/VcFilterEditorModal.css +1 -0
  7. package/library/assets/components/VcFilterBar/VcFilterEditorPanel.css +1 -0
  8. package/library/assets/components/VcFilterBar/editors/VcFilterBooleanEditor.css +1 -0
  9. package/library/assets/components/VcFilterBar/editors/VcFilterMultiselectEditor.css +1 -0
  10. package/library/assets/components/VcFilterBar/editors/VcFilterRangeEditor.css +1 -0
  11. package/library/assets/components/VcFilterBar/editors/VcFilterSelectEditor.css +1 -0
  12. package/library/assets/components/VcFilterBar/editors/VcFilterTextEditor.css +1 -0
  13. package/library/assets/components/VcFilterBar/editors/VcFilterTextListEditor.css +1 -0
  14. package/library/assets/components/VcTimeInput/VcTimeInput.css +1 -1
  15. package/library/components/VcFilterBar/VcFilterAddMenu.vue.mjs +380 -0
  16. package/library/components/VcFilterBar/VcFilterAddMenu.vue3.mjs +5 -0
  17. package/library/components/VcFilterBar/VcFilterBar.vue.mjs +469 -0
  18. package/library/components/VcFilterBar/VcFilterBar.vue3.mjs +5 -0
  19. package/library/components/VcFilterBar/VcFilterChip.vue.mjs +136 -0
  20. package/library/components/VcFilterBar/VcFilterChip.vue3.mjs +5 -0
  21. package/library/components/VcFilterBar/VcFilterChipEditor.vue.mjs +133 -0
  22. package/library/components/VcFilterBar/VcFilterChipEditor.vue3.mjs +5 -0
  23. package/library/components/VcFilterBar/VcFilterEditorModal.vue.mjs +90 -0
  24. package/library/components/VcFilterBar/VcFilterEditorModal.vue3.mjs +5 -0
  25. package/library/components/VcFilterBar/VcFilterEditorPanel.vue.mjs +179 -0
  26. package/library/components/VcFilterBar/VcFilterEditorPanel.vue3.mjs +5 -0
  27. package/library/components/VcFilterBar/editors/VcFilterBooleanEditor.vue.mjs +62 -0
  28. package/library/components/VcFilterBar/editors/VcFilterBooleanEditor.vue3.mjs +5 -0
  29. package/library/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue.mjs +199 -0
  30. package/library/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue3.mjs +5 -0
  31. package/library/components/VcFilterBar/editors/VcFilterRangeEditor.vue.mjs +124 -0
  32. package/library/components/VcFilterBar/editors/VcFilterRangeEditor.vue3.mjs +5 -0
  33. package/library/components/VcFilterBar/editors/VcFilterSelectEditor.vue.mjs +96 -0
  34. package/library/components/VcFilterBar/editors/VcFilterSelectEditor.vue3.mjs +5 -0
  35. package/library/components/VcFilterBar/editors/VcFilterTextEditor.vue.mjs +58 -0
  36. package/library/components/VcFilterBar/editors/VcFilterTextEditor.vue3.mjs +5 -0
  37. package/library/components/VcFilterBar/editors/VcFilterTextListEditor.vue.mjs +155 -0
  38. package/library/components/VcFilterBar/editors/VcFilterTextListEditor.vue3.mjs +5 -0
  39. package/library/components/VcFilterBar/filterBarChip.mjs +59 -0
  40. package/library/components/VcFilterBar/filterBarDate.mjs +69 -0
  41. package/library/components/VcFilterBar/filterBarDraft.mjs +86 -0
  42. package/library/components/VcFilterBar/filterBarEditors.mjs +36 -0
  43. package/library/components/VcFilterBar/filterBarErrors.mjs +57 -0
  44. package/library/components/VcFilterBar/filterBarModel.mjs +378 -0
  45. package/library/components/VcFilterBar/filterBarOptions.mjs +253 -0
  46. package/library/components/VcFilterBar/filterBarSearch.mjs +89 -0
  47. package/library/components/VcFilterBar/filterBarValidate.mjs +99 -0
  48. package/library/components/VcTimeInput/VcTimeInput.vue.mjs +178 -36
  49. package/library/index.mjs +227 -162
  50. package/library/index.mjs.br +0 -0
  51. package/library/index.mjs.gz +0 -0
  52. package/library/localization/locales/en.json.mjs +51 -1
  53. package/library/plugin-components.gen.mjs +125 -122
  54. package/library/plugin.mjs +225 -160
  55. package/library/plugin.mjs.br +0 -0
  56. package/library/plugin.mjs.gz +0 -0
  57. package/library/style.css +25 -1
  58. package/library/style.css.br +0 -0
  59. package/library/style.css.gz +0 -0
  60. package/library/tokens/tokens.mjs +2 -0
  61. package/library/types/components/VcFilterBar/VcFilterAddMenu.vue.d.ts +39 -0
  62. package/library/types/components/VcFilterBar/VcFilterBar.vue.d.ts +132 -0
  63. package/library/types/components/VcFilterBar/VcFilterChip.vue.d.ts +42 -0
  64. package/library/types/components/VcFilterBar/VcFilterChipEditor.vue.d.ts +46 -0
  65. package/library/types/components/VcFilterBar/VcFilterEditorModal.vue.d.ts +40 -0
  66. package/library/types/components/VcFilterBar/VcFilterEditorPanel.vue.d.ts +116 -0
  67. package/library/types/components/VcFilterBar/editors/VcFilterBooleanEditor.vue.d.ts +66 -0
  68. package/library/types/components/VcFilterBar/editors/VcFilterMultiselectEditor.vue.d.ts +73 -0
  69. package/library/types/components/VcFilterBar/editors/VcFilterRangeEditor.vue.d.ts +62 -0
  70. package/library/types/components/VcFilterBar/editors/VcFilterSelectEditor.vue.d.ts +62 -0
  71. package/library/types/components/VcFilterBar/editors/VcFilterTextEditor.vue.d.ts +68 -0
  72. package/library/types/components/VcFilterBar/editors/VcFilterTextListEditor.vue.d.ts +64 -0
  73. package/library/types/components/VcFilterBar/filterBarChip.d.ts +23 -0
  74. package/library/types/components/VcFilterBar/filterBarDate.d.ts +14 -0
  75. package/library/types/components/VcFilterBar/filterBarDraft.d.ts +28 -0
  76. package/library/types/components/VcFilterBar/filterBarEditors.d.ts +7 -0
  77. package/library/types/components/VcFilterBar/filterBarErrors.d.ts +22 -0
  78. package/library/types/components/VcFilterBar/filterBarModel.d.ts +83 -0
  79. package/library/types/components/VcFilterBar/filterBarOptions.d.ts +52 -0
  80. package/library/types/components/VcFilterBar/filterBarSearch.d.ts +23 -0
  81. package/library/types/components/VcFilterBar/filterBarValidate.d.ts +34 -0
  82. package/library/types/components/VcJsonSchema/Components/JsonSchemaEditor.vue.d.ts +1 -1
  83. package/library/types/components/VcTimeInput/VcTimeInput.vue.d.ts +29 -6
  84. package/library/types/components/exports.d.ts +3 -1
  85. package/library/types/components.gen.d.ts +1 -0
  86. package/library/types/entity/components/Table/VcEntityListTable.vue.d.ts +3 -3
  87. package/library/types/index.d.ts +8 -0
  88. package/library/types/localization/locales/en.json.d.ts +51 -1
  89. package/library/types/tokens/tokens.d.ts +2 -1
  90. package/library/types/types/VcFilterBar.types.d.ts +329 -0
  91. package/library/types/types/VcTimeInput.types.d.ts +3 -0
  92. package/library/types/types/index.d.ts +2 -0
  93. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import '../../assets/components/VcTimeInput/VcTimeInput.css';
2
- import { defineComponent, ref, reactive, computed, watch, onMounted, openBlock, createElementBlock, normalizeStyle, unref, createElementVNode, normalizeClass, withDirectives, createVNode, toDisplayString, createCommentVNode, withModifiers, vModelText } from "vue";
2
+ import { defineComponent, ref, reactive, computed, watch, onMounted, openBlock, createElementBlock, normalizeStyle, unref, createElementVNode, normalizeClass, withDirectives, createVNode, toDisplayString, createCommentVNode, withModifiers, vModelText, createBlock } from "vue";
3
3
  import _sfc_main$1 from "../VcIcon/VcIcon.vue.mjs";
4
4
  import '../../assets/components/VcIcon/VcIcon.css';/* empty css */
5
- import { Minus, Plus } from "@lucide/vue";
5
+ import { Minus, X, Plus } from "@lucide/vue";
6
6
  import { longPress } from "../../directives/long-press.mjs";
7
7
  import useInputBase from "../../composables/input/useInputBase.mjs";
8
8
  import { DEFAULT_COLOR } from "../../enum/inputDefaults.mjs";
@@ -12,12 +12,22 @@ const _hoisted_2 = {
12
12
  "data-test": "time-input-container"
13
13
  };
14
14
  const _hoisted_3 = ["disabled"];
15
- const _hoisted_4 = { class: "divider-wrapper" };
15
+ const _hoisted_4 = {
16
+ key: 1,
17
+ class: "divider-wrapper"
18
+ };
16
19
  const _hoisted_5 = { class: "divider" };
17
20
  const _hoisted_6 = ["disabled"];
18
- const _hoisted_7 = { class: "divider-wrapper" };
21
+ const _hoisted_7 = {
22
+ key: 3,
23
+ class: "divider-wrapper"
24
+ };
19
25
  const _hoisted_8 = { class: "divider" };
20
26
  const _hoisted_9 = ["disabled"];
27
+ const _hoisted_10 = {
28
+ key: 0,
29
+ class: "vc-time-input__clearable"
30
+ };
21
31
  const CLASS_FOR_COLOR = "vc-time-input-color--";
22
32
  const _sfc_main = /* @__PURE__ */ defineComponent({
23
33
  ...{
@@ -34,9 +44,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
44
  emptyDataText: { default: "" },
35
45
  placeholder: { default: "" },
36
46
  allowMouseWheel: { type: Boolean, default: false },
47
+ clearable: { type: Boolean, default: false },
48
+ format: { default: "hh:mm:ss" },
37
49
  id: { default: void 0 },
38
50
  disabled: { type: Boolean, default: false },
39
- clearable: { type: Boolean },
40
51
  isError: { type: Boolean, default: false },
41
52
  emptyText: {},
42
53
  prefixIcon: {},
@@ -46,9 +57,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
57
  prefixIconColor: {},
47
58
  color: { default: DEFAULT_COLOR }
48
59
  },
49
- emits: ["input", "update:modelValue"],
60
+ emits: ["input", "update:modelValue", "clear"],
50
61
  setup(__props, { emit: __emit }) {
62
+ const UNIT_OF = {
63
+ hh: "hours",
64
+ mm: "minutes",
65
+ ss: "seconds"
66
+ };
51
67
  const vLongPress = { ...longPress };
68
+ const EMPTY_TIME = {
69
+ hours: "",
70
+ minutes: "",
71
+ seconds: ""
72
+ };
52
73
  const props = __props;
53
74
  const emit = __emit;
54
75
  const { maxWidthStyle, inputClasses } = useInputBase(props, {
@@ -66,23 +87,59 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
66
87
  const timeModel = computed(() => {
67
88
  return props.modelValue || 0;
68
89
  });
90
+ const isEmptyModel = computed(() => {
91
+ return props.clearable && (props.modelValue === void 0 || props.modelValue === null);
92
+ });
93
+ const shownModel = computed(() => {
94
+ return isEmptyModel.value ? void 0 : timeModel.value;
95
+ });
96
+ const isEmpty = computed(() => {
97
+ return props.clearable && !hasTime(timeSettingModel);
98
+ });
99
+ const showClear = computed(() => {
100
+ return !isEmpty.value && !props.disabled;
101
+ });
69
102
  const disabledDecreaseBtn = computed(() => {
103
+ if (isEmpty.value) {
104
+ return props.disabled;
105
+ }
70
106
  const _time = timeModel.value;
71
107
  return _time <= props.minValue || props.disabled;
72
108
  });
73
109
  const disabledIncreaseBtn = computed(() => {
110
+ if (isEmpty.value) {
111
+ return props.disabled;
112
+ }
74
113
  const _time = timeModel.value;
75
114
  return props.maxValue !== 0 && _time >= props.maxValue || props.disabled;
76
115
  });
77
116
  const hideInputs = computed(() => {
117
+ if (props.clearable) {
118
+ return !isFocus.value && isEmpty.value && !!(props.emptyDataText || props.placeholder);
119
+ }
78
120
  const _time = props.modelValue || timeModel.value;
79
121
  return !!(!isFocus.value && _time === 0 && props.emptyDataText);
80
122
  });
123
+ const units = computed(() => props.format.split(":").map((part) => UNIT_OF[part]).filter((unit) => !!unit));
124
+ const lastUnit = computed(() => units.value[units.value.length - 1] ?? "seconds");
125
+ function clearHiddenUnits() {
126
+ if (props.clearable && units.value.every((unit) => timeSettingModel[unit] === "")) {
127
+ return;
128
+ }
129
+ const order = ["hours", "minutes", "seconds"];
130
+ order.slice(order.indexOf(lastUnit.value) + 1).forEach((unit) => {
131
+ timeSettingModel[unit] = "00";
132
+ });
133
+ }
134
+ function inputStyle(unit) {
135
+ const digits = timeSettingModel[unit].length;
136
+ return unit === units.value[0] && digits > 2 ? { width: `calc(${digits}ch + 0.5rem)` } : void 0;
137
+ }
81
138
  const placeholderInput = computed(() => {
82
- return props.emptyDataText || props.placeholder || "00:00:00";
139
+ return props.emptyDataText || props.placeholder || units.value.map(() => "00").join(props.divider);
83
140
  });
84
141
  function onClickWrapper() {
85
- onClickInput("seconds");
142
+ onClickInput(lastUnit.value);
86
143
  }
87
144
  const onLongPressDecrease = () => {
88
145
  return decrease();
@@ -105,7 +162,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
105
162
  return parseInt(hours2) * 3600 + parseInt(minutes2) * 60 + parseInt(seconds2);
106
163
  }
107
164
  function onPlaceholderClick() {
108
- onClickInput("seconds");
165
+ onClickInput(lastUnit.value);
109
166
  }
110
167
  function onClickInput(type) {
111
168
  var _a, _b, _c;
@@ -130,7 +187,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
130
187
  if (timeValue < 0) {
131
188
  timeValue = 0;
132
189
  }
133
- if (["minutes", "seconds"].includes(type) && timeValue > 59) {
190
+ if (["minutes", "seconds"].includes(type) && type !== units.value[0] && timeValue > 59) {
134
191
  timeValue = 59;
135
192
  }
136
193
  return timeValue;
@@ -142,8 +199,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142
199
  return `${val}`;
143
200
  }
144
201
  function getTimeData(value) {
145
- const hours2 = Math.floor(value / 3600);
146
- const minutes2 = Math.floor(value / 60 - hours2 * 60);
202
+ const first = units.value[0];
203
+ const hours2 = first === "hours" ? Math.floor(value / 3600) : 0;
204
+ const minutes2 = first === "seconds" ? 0 : Math.floor((value - hours2 * 3600) / 60);
147
205
  const seconds2 = Math.floor(value - hours2 * 3600 - minutes2 * 60);
148
206
  return {
149
207
  hours: hours2,
@@ -151,10 +209,64 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
151
209
  seconds: seconds2
152
210
  };
153
211
  }
212
+ function hasTime(time) {
213
+ return time.hours !== "" || time.minutes !== "" || time.seconds !== "";
214
+ }
215
+ function hasBlankPart(time) {
216
+ return time.hours === "" || time.minutes === "" || time.seconds === "";
217
+ }
218
+ function setEmptyTime() {
219
+ timeSettingModel.hours = EMPTY_TIME.hours;
220
+ timeSettingModel.minutes = EMPTY_TIME.minutes;
221
+ timeSettingModel.seconds = EMPTY_TIME.seconds;
222
+ }
223
+ function fillBlankParts() {
224
+ const zero = setFormatValue(0);
225
+ if (timeSettingModel.hours === "") {
226
+ timeSettingModel.hours = zero;
227
+ }
228
+ if (timeSettingModel.minutes === "") {
229
+ timeSettingModel.minutes = zero;
230
+ }
231
+ if (timeSettingModel.seconds === "") {
232
+ timeSettingModel.seconds = zero;
233
+ }
234
+ }
235
+ function normaliseTimePart(val, type) {
236
+ if (isEmpty.value) {
237
+ return;
238
+ }
239
+ timeSettingModel[type] = updateTimeInput(val, type);
240
+ if (props.clearable) {
241
+ fillBlankParts();
242
+ }
243
+ }
244
+ function clampTime(time) {
245
+ if (props.maxValue > 0 && time > props.maxValue) {
246
+ return props.maxValue;
247
+ }
248
+ return Math.max(time, props.minValue, 0);
249
+ }
250
+ function stepFromEmpty(delta) {
251
+ setTimeData(clampTime(delta));
252
+ }
253
+ function onClear() {
254
+ setEmptyTime();
255
+ emit("update:modelValue", void 0);
256
+ emit("input", {
257
+ seconds: void 0,
258
+ string: { ...EMPTY_TIME }
259
+ });
260
+ emit("clear");
261
+ }
154
262
  function decrease() {
155
263
  if (disabledDecreaseBtn.value) {
156
264
  return;
157
265
  }
266
+ if (isEmpty.value) {
267
+ stepFromEmpty(-props.step);
268
+ return;
269
+ }
158
270
  let _nevTime = timeModel.value - props.step;
159
271
  if (_nevTime <= 0) {
160
272
  _nevTime = 0;
@@ -167,8 +279,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
167
279
  if (disabledIncreaseBtn.value) {
168
280
  return;
169
281
  }
282
+ if (isEmpty.value) {
283
+ stepFromEmpty(props.step);
284
+ return;
285
+ }
170
286
  let _nevTime = timeModel.value + props.step;
171
- if (_nevTime >= props.maxValue) {
287
+ if (props.maxValue > 0 && _nevTime >= props.maxValue) {
172
288
  _nevTime = props.maxValue;
173
289
  }
174
290
  setTimeData(_nevTime);
@@ -182,7 +298,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
182
298
  watch(
183
299
  () => timeSettingModel.seconds,
184
300
  (val) => {
185
- timeSettingModel.seconds = updateTimeInput(val, "seconds");
301
+ normaliseTimePart(val, "seconds");
186
302
  },
187
303
  {
188
304
  immediate: true
@@ -191,7 +307,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
191
307
  watch(
192
308
  () => timeSettingModel.minutes,
193
309
  (val) => {
194
- timeSettingModel.minutes = updateTimeInput(val, "minutes");
310
+ normaliseTimePart(val, "minutes");
195
311
  },
196
312
  {
197
313
  immediate: true
@@ -200,16 +316,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
200
316
  watch(
201
317
  () => timeSettingModel.hours,
202
318
  (val) => {
203
- timeSettingModel.hours = updateTimeInput(val, "hours");
319
+ normaliseTimePart(val, "hours");
204
320
  },
205
321
  {
206
322
  immediate: true
207
323
  }
208
324
  );
209
325
  watch(
210
- timeModel,
326
+ shownModel,
211
327
  (val) => {
212
- if (props.maxValue > 0 && val > props.maxValue) {
328
+ if (val === void 0) {
329
+ setEmptyTime();
330
+ } else if (props.maxValue > 0 && val > props.maxValue) {
213
331
  setTimeData(props.maxValue);
214
332
  } else if (val < props.minValue) {
215
333
  setTimeData(props.minValue);
@@ -222,6 +340,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
222
340
  watch(
223
341
  timeSettingModel,
224
342
  (val) => {
343
+ if (props.clearable && hasBlankPart(val)) {
344
+ return;
345
+ }
225
346
  const _seconds = getSecondsOfTime(val);
226
347
  emit("update:modelValue", _seconds);
227
348
  emit("input", {
@@ -232,6 +353,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
232
353
  { deep: true }
233
354
  );
234
355
  onMounted(() => {
356
+ if (isEmptyModel.value) {
357
+ return;
358
+ }
235
359
  if (timeModel.value < props.minValue) {
236
360
  const res = {
237
361
  seconds: props.minValue || 0,
@@ -239,12 +363,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
239
363
  };
240
364
  emit("update:modelValue", props.minValue);
241
365
  emit("input", res);
242
- } else if (timeModel.value > props.maxValue) {
366
+ } else if (props.maxValue > 0 && timeModel.value > props.maxValue) {
243
367
  const res = {
244
368
  seconds: props.maxValue || 0,
245
369
  string: { ...timeSettingModel }
246
370
  };
247
- emit("update:modelValue", props.minValue);
371
+ emit("update:modelValue", props.maxValue);
248
372
  emit("input", res);
249
373
  }
250
374
  });
@@ -290,59 +414,77 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
290
414
  onClick: withModifiers(onClickWrapper, ["stop", "self"]),
291
415
  onWheel: onWheelMouse
292
416
  }, [
293
- withDirectives(createElementVNode("input", {
417
+ units.value.includes("hours") ? withDirectives((openBlock(), createElementBlock("input", {
418
+ key: 0,
294
419
  ref_key: "hours",
295
420
  ref: hours,
296
421
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => timeSettingModel.hours = $event),
297
422
  class: "vc-time-input__input hours",
423
+ style: normalizeStyle(inputStyle("hours")),
298
424
  type: "number",
299
425
  "data-test": "hours",
300
426
  disabled: __props.disabled,
301
427
  placeholder: "00",
302
428
  onFocusin: _cache[1] || (_cache[1] = ($event) => isFocus.value = true),
303
429
  onFocusout: _cache[2] || (_cache[2] = ($event) => isFocus.value = false),
304
- onClick: _cache[3] || (_cache[3] = ($event) => onClickInput("hours"))
305
- }, null, 40, _hoisted_3), [
430
+ onClick: _cache[3] || (_cache[3] = ($event) => onClickInput("hours")),
431
+ onInput: clearHiddenUnits
432
+ }, null, 44, _hoisted_3)), [
306
433
  [vModelText, timeSettingModel.hours]
307
- ]),
308
- createElementVNode("div", _hoisted_4, [
434
+ ]) : createCommentVNode("", true),
435
+ units.value.includes("hours") && units.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_4, [
309
436
  createElementVNode("span", _hoisted_5, toDisplayString(__props.divider), 1)
310
- ]),
311
- withDirectives(createElementVNode("input", {
437
+ ])) : createCommentVNode("", true),
438
+ units.value.includes("minutes") ? withDirectives((openBlock(), createElementBlock("input", {
439
+ key: 2,
312
440
  ref_key: "minutes",
313
441
  ref: minutes,
314
442
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => timeSettingModel.minutes = $event),
315
443
  class: "vc-time-input__input minutes",
444
+ style: normalizeStyle(inputStyle("minutes")),
316
445
  type: "number",
317
446
  "data-test": "minutes",
318
447
  disabled: __props.disabled,
319
448
  placeholder: "00",
320
449
  onFocusin: _cache[5] || (_cache[5] = ($event) => isFocus.value = true),
321
450
  onFocusout: _cache[6] || (_cache[6] = ($event) => isFocus.value = false),
322
- onClick: _cache[7] || (_cache[7] = ($event) => onClickInput("minutes"))
323
- }, null, 40, _hoisted_6), [
451
+ onClick: _cache[7] || (_cache[7] = ($event) => onClickInput("minutes")),
452
+ onInput: clearHiddenUnits
453
+ }, null, 44, _hoisted_6)), [
324
454
  [vModelText, timeSettingModel.minutes]
325
- ]),
326
- createElementVNode("div", _hoisted_7, [
455
+ ]) : createCommentVNode("", true),
456
+ units.value.includes("minutes") && units.value.includes("seconds") ? (openBlock(), createElementBlock("div", _hoisted_7, [
327
457
  createElementVNode("span", _hoisted_8, toDisplayString(__props.divider), 1)
328
- ]),
329
- withDirectives(createElementVNode("input", {
458
+ ])) : createCommentVNode("", true),
459
+ units.value.includes("seconds") ? withDirectives((openBlock(), createElementBlock("input", {
460
+ key: 4,
330
461
  ref_key: "seconds",
331
462
  ref: seconds,
332
463
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => timeSettingModel.seconds = $event),
333
464
  class: "vc-time-input__input seconds",
465
+ style: normalizeStyle(inputStyle("seconds")),
334
466
  type: "number",
335
467
  "data-test": "seconds",
336
468
  disabled: __props.disabled,
337
469
  placeholder: "00",
338
470
  onFocusin: _cache[9] || (_cache[9] = ($event) => isFocus.value = true),
339
471
  onFocusout: _cache[10] || (_cache[10] = ($event) => isFocus.value = false),
340
- onClick: _cache[11] || (_cache[11] = ($event) => onClickInput("seconds"))
341
- }, null, 40, _hoisted_9), [
472
+ onClick: _cache[11] || (_cache[11] = ($event) => onClickInput("seconds")),
473
+ onInput: clearHiddenUnits
474
+ }, null, 44, _hoisted_9)), [
342
475
  [vModelText, timeSettingModel.seconds]
343
- ])
476
+ ]) : createCommentVNode("", true)
344
477
  ], 32)
345
478
  ]),
479
+ __props.clearable ? (openBlock(), createElementBlock("div", _hoisted_10, [
480
+ showClear.value ? (openBlock(), createBlock(_sfc_main$1, {
481
+ key: 0,
482
+ icon: unref(X),
483
+ class: "icon-xs",
484
+ "data-test": "clear-button",
485
+ onClick: onClear
486
+ }, null, 8, ["icon"])) : createCommentVNode("", true)
487
+ ])) : createCommentVNode("", true),
346
488
  withDirectives((openBlock(), createElementBlock("div", {
347
489
  class: normalizeClass(["vc-time-input__btn-increase", {
348
490
  "is-disabled": disabledIncreaseBtn.value