@juit/vue-z 0.0.64 → 0.0.66
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/index.css +3 -3
- package/dist/index.d.ts +26 -0
- package/dist/index.js +29 -8
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
/* Suffix behind the input */
|
|
34
34
|
.z-suffix {
|
|
35
|
-
&[data-v-
|
|
35
|
+
&[data-v-7f2feeca] {
|
|
36
36
|
user-select: none;
|
|
37
37
|
position: absolute;
|
|
38
38
|
top: 0;
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
overflow: hidden;
|
|
43
43
|
font-weight: 500
|
|
44
44
|
}
|
|
45
|
-
.z-suffix-hidden[data-v-
|
|
45
|
+
.z-suffix-hidden[data-v-7f2feeca] { color: transparent
|
|
46
46
|
}
|
|
47
|
-
.z-suffix-visible[data-v-
|
|
47
|
+
.z-suffix-visible[data-v-7f2feeca] { opacity: 0.5
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4622,6 +4622,18 @@ readonly type: PropType<boolean | "ondemand">;
|
|
|
4622
4622
|
readonly required: false;
|
|
4623
4623
|
readonly default: undefined;
|
|
4624
4624
|
};
|
|
4625
|
+
/** The debounce time in milliseconds for the input field */
|
|
4626
|
+
debounce: {
|
|
4627
|
+
type: NumberConstructor;
|
|
4628
|
+
required: false;
|
|
4629
|
+
default: number;
|
|
4630
|
+
};
|
|
4631
|
+
/** Clearable, when clicked value will become the empty string */
|
|
4632
|
+
clearable: {
|
|
4633
|
+
type: BooleanConstructor;
|
|
4634
|
+
required: false;
|
|
4635
|
+
default: boolean;
|
|
4636
|
+
};
|
|
4625
4637
|
modelValue: {
|
|
4626
4638
|
type: PropType<string>;
|
|
4627
4639
|
required: true;
|
|
@@ -4657,6 +4669,18 @@ readonly type: PropType<boolean | "ondemand">;
|
|
|
4657
4669
|
readonly required: false;
|
|
4658
4670
|
readonly default: undefined;
|
|
4659
4671
|
};
|
|
4672
|
+
/** The debounce time in milliseconds for the input field */
|
|
4673
|
+
debounce: {
|
|
4674
|
+
type: NumberConstructor;
|
|
4675
|
+
required: false;
|
|
4676
|
+
default: number;
|
|
4677
|
+
};
|
|
4678
|
+
/** Clearable, when clicked value will become the empty string */
|
|
4679
|
+
clearable: {
|
|
4680
|
+
type: BooleanConstructor;
|
|
4681
|
+
required: false;
|
|
4682
|
+
default: boolean;
|
|
4683
|
+
};
|
|
4660
4684
|
modelValue: {
|
|
4661
4685
|
type: PropType<string>;
|
|
4662
4686
|
required: true;
|
|
@@ -4669,6 +4693,8 @@ disabled: boolean | undefined;
|
|
|
4669
4693
|
lazyRules: boolean | "ondemand";
|
|
4670
4694
|
bottomSlots: boolean | undefined;
|
|
4671
4695
|
readonly: boolean | undefined;
|
|
4696
|
+
debounce: number;
|
|
4697
|
+
clearable: boolean;
|
|
4672
4698
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
4673
4699
|
|
|
4674
4700
|
declare const __VLS_export_8: DefineComponent<ExtractPropTypes< {
|
package/dist/index.js
CHANGED
|
@@ -1104,12 +1104,14 @@ var text_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1104
1104
|
_props.onClear?.();
|
|
1105
1105
|
};
|
|
1106
1106
|
});
|
|
1107
|
+
/** A reference to the input field */
|
|
1108
|
+
const nativeEl = computed(() => _qinput.value?.nativeEl);
|
|
1107
1109
|
__expose({
|
|
1108
1110
|
focus: () => _qinput.value?.focus(),
|
|
1109
1111
|
resetValidation: () => _qinput.value?.resetValidation(),
|
|
1110
1112
|
validate: () => _qinput.value?.validate() || false,
|
|
1111
1113
|
hasError: computed(() => _qinput.value?.hasError || false),
|
|
1112
|
-
nativeEl
|
|
1114
|
+
nativeEl,
|
|
1113
1115
|
isEditable: _editable,
|
|
1114
1116
|
isDisabled: _disabled,
|
|
1115
1117
|
isInactive: _inactive,
|
|
@@ -1132,7 +1134,10 @@ var text_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1132
1134
|
const _onBeforeinput = (event) => void _emit("beforeinput", event);
|
|
1133
1135
|
const _onBlur = (event) => void _emit("blur", event);
|
|
1134
1136
|
const _onFocus = (event) => void _emit("focus", event);
|
|
1135
|
-
|
|
1137
|
+
function _onInput(event) {
|
|
1138
|
+
if (nativeEl.value.value === "" && _value.value !== "") _update("");
|
|
1139
|
+
_emit("input", event);
|
|
1140
|
+
}
|
|
1136
1141
|
const _onKeydown = (event) => void _emit("keydown", event);
|
|
1137
1142
|
const _onKeyup = (event) => void _emit("keyup", event);
|
|
1138
1143
|
/** "onClick" is only passed through when enabled and we have a listener */
|
|
@@ -1182,13 +1187,13 @@ var text_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1182
1187
|
onMounted(() => {
|
|
1183
1188
|
if (!_qinput.value) throw new Error("No QInput ref");
|
|
1184
1189
|
if (!_helper.value) throw new Error("No ZFormHelper ref");
|
|
1185
|
-
watch(() =>
|
|
1190
|
+
watch(() => nativeEl.value, (newElement, oldElement) => {
|
|
1186
1191
|
_removeEventListeners(oldElement);
|
|
1187
1192
|
_addEventListeners(newElement);
|
|
1188
1193
|
if (newElement) newElement.inputMode = _props.mode;
|
|
1189
1194
|
}, { immediate: true });
|
|
1190
1195
|
});
|
|
1191
|
-
onBeforeUnmount(() => _removeEventListeners(
|
|
1196
|
+
onBeforeUnmount(() => _removeEventListeners(nativeEl.value));
|
|
1192
1197
|
return (_ctx, _cache) => {
|
|
1193
1198
|
return openBlock(), createElementBlock("div", _hoisted_1$11, [createVNode(form_helper_default, {
|
|
1194
1199
|
ref_key: "_helper",
|
|
@@ -1307,7 +1312,7 @@ var text_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
1307
1312
|
])]);
|
|
1308
1313
|
};
|
|
1309
1314
|
}
|
|
1310
|
-
}), [["__scopeId", "data-v-
|
|
1315
|
+
}), [["__scopeId", "data-v-7f2feeca"]]);
|
|
1311
1316
|
//#endregion
|
|
1312
1317
|
//#region lib/inputs/string.vue
|
|
1313
1318
|
var string_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1470,7 +1475,19 @@ var string_default = /* @__PURE__ */ defineComponent({
|
|
|
1470
1475
|
var search_default = /* @__PURE__ */ defineComponent({
|
|
1471
1476
|
name: "ZControlSearch",
|
|
1472
1477
|
__name: "search",
|
|
1473
|
-
props: /* @__PURE__ */ mergeModels(
|
|
1478
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1479
|
+
debounce: {
|
|
1480
|
+
type: Number,
|
|
1481
|
+
required: false,
|
|
1482
|
+
default: 750
|
|
1483
|
+
},
|
|
1484
|
+
clearable: {
|
|
1485
|
+
type: Boolean,
|
|
1486
|
+
required: false,
|
|
1487
|
+
default: false
|
|
1488
|
+
},
|
|
1489
|
+
...componentFormProps
|
|
1490
|
+
}, {
|
|
1474
1491
|
"modelValue": {
|
|
1475
1492
|
type: String,
|
|
1476
1493
|
required: true
|
|
@@ -1491,16 +1508,20 @@ var search_default = /* @__PURE__ */ defineComponent({
|
|
|
1491
1508
|
ref: _zstring,
|
|
1492
1509
|
modelValue: value.value,
|
|
1493
1510
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
1494
|
-
debounce:
|
|
1511
|
+
debounce: __props.debounce,
|
|
1512
|
+
clearable: __props.clearable,
|
|
1495
1513
|
label: _ctx.$t(unref(translations).search),
|
|
1496
1514
|
icon: unref(icons).search,
|
|
1497
1515
|
readonly: _ctx.readonly,
|
|
1498
1516
|
"bottom-slots": _ctx.bottomSlots,
|
|
1499
1517
|
editable: _ctx.editable,
|
|
1500
1518
|
disabled: _ctx.disabled,
|
|
1501
|
-
"lazy-rules": _ctx.lazyRules
|
|
1519
|
+
"lazy-rules": _ctx.lazyRules,
|
|
1520
|
+
onClickIcon: () => {}
|
|
1502
1521
|
}, null, 8, [
|
|
1503
1522
|
"modelValue",
|
|
1523
|
+
"debounce",
|
|
1524
|
+
"clearable",
|
|
1504
1525
|
"label",
|
|
1505
1526
|
"icon",
|
|
1506
1527
|
"readonly",
|