eco-vue-js 0.3.68 → 0.3.70
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ import '../Dropdown/utils/DropdownStyle.js';
|
|
8
8
|
import '../../utils/Modal.js';
|
9
9
|
import '../Link/WLink.vue.js';
|
10
10
|
|
11
|
-
const _hoisted_1 = { class: "font-normal text-center
|
11
|
+
const _hoisted_1 = { class: "font-normal text-center md:text-base text-[0.625rem] whitespace-nowrap" };
|
12
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
13
13
|
__name: "WButtonAction",
|
14
14
|
props: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2JkB,IAAI;oBAQL,IAAI;
|
1
|
+
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2JkB,IAAI;oBAQL,IAAI;QAmpBkB,IAAI;WACpC,GAAG;;uBAnFkB,GAAG;wBACF,GAAG;wBACH,GAAG;uBACH,GAAG;;;YA8D1B,mBAAmB,iEAAkC,IAAI;YACzD,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;YACjD,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,gBAAgB,SAAS,UAAU,GAAG,IAAI;YAC1C,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAvpBF,IAAI;oBAQL,IAAI;QAmpBkB,IAAI;WACpC,GAAG;;uBAnFkB,GAAG;wBACF,GAAG;wBACH,GAAG;uBACH,GAAG;;;YA8D1B,mBAAmB,iEAAkC,IAAI;YACzD,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;YACjD,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,gBAAgB,SAAS,UAAU,GAAG,IAAI;YAC1C,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAvpBF,IAAI;wBAQL,IAAI;YAmpBkB,IAAI;eACpC,GAAG;;2BAnFkB,GAAG;4BACF,GAAG;4BACH,GAAG;2BACH,GAAG;;;gBA8D1B,mBAAmB,iEAAkC,IAAI;gBACzD,gBAAgB,SAAS,aAAa,GAAG,IAAI;gBAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;gBAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;gBAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;gBAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;gBACjD,aAAa,GAAG,IAAI;gBACpB,OAAO,SAAS,UAAU,GAAG,IAAI;gBACjC,MAAM,SAAS,UAAU,GAAG,IAAI;gBAChC,OAAO,SAAS,UAAU,GAAG,IAAI;gBACjC,WAAW,SAAS,UAAU,GAAG,IAAI;gBACrC,gBAAgB,SAAS,UAAU,GAAG,IAAI;gBAC1C,cAAc,SAAS,KAAK,GAAG,IAAI;gBACnC,OAAO,GAAG,IAAI;;;;AAzyBpB,wBAkzBkE"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, ref, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, Fragment, renderSlot, createTextVNode, toDisplayString, createVNode, Transition, withCtx, createCommentVNode, createBlock,
|
1
|
+
import { defineComponent, ref, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderSlot, createTextVNode, toDisplayString, createVNode, Transition, withCtx, createCommentVNode, createBlock, normalizeStyle, withModifiers, resolveDynamicComponent, withKeys, createSlots, unref, nextTick } from 'vue';
|
2
2
|
import WSkeleton from '../Skeleton/WSkeleton.vue.js';
|
3
3
|
import _sfc_main$1 from './components/InputActions.vue.js';
|
4
4
|
import { Notify } from '../../utils/Notify.js';
|
@@ -12,17 +12,21 @@ const _hoisted_1 = {
|
|
12
12
|
const _hoisted_2 = { class: "grid grid-cols-[1fr,auto]" };
|
13
13
|
const _hoisted_3 = {
|
14
14
|
key: 0,
|
15
|
-
class: "
|
15
|
+
class: "relative isolate grid grid-cols-1"
|
16
16
|
};
|
17
17
|
const _hoisted_4 = {
|
18
18
|
key: 0,
|
19
|
-
class: "
|
19
|
+
class: "absolute top-0 left-0 h-full flex items-center justify-center px-3 text-description select-none"
|
20
20
|
};
|
21
21
|
const _hoisted_5 = {
|
22
|
-
key:
|
23
|
-
class: "text-xs font-normal text-
|
22
|
+
key: 0,
|
23
|
+
class: "text-xs font-normal text-negative dark:text-negative-dark absolute right-0 top-full pt-0.5 text-end"
|
24
24
|
};
|
25
25
|
const _hoisted_6 = {
|
26
|
+
key: 1,
|
27
|
+
class: "text-xs font-normal text-description absolute right-0 top-full pt-0.5 whitespace-nowrap"
|
28
|
+
};
|
29
|
+
const _hoisted_7 = {
|
26
30
|
key: 2,
|
27
31
|
ref: "rightContainer",
|
28
32
|
class: "pl-4 flex gap-4 sm-not:flex-col"
|
@@ -207,188 +211,186 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
207
211
|
}]),
|
208
212
|
onClick: _cache[14] || (_cache[14] = ($event) => _ctx.$emit("click:internal", $event))
|
209
213
|
}, [
|
210
|
-
|
211
|
-
|
212
|
-
class: normalizeClass(["text-xs font-semibold text-accent mb-2 duration-500", {
|
213
|
-
"opacity-50": _ctx.disabled && !_ctx.skeleton
|
214
|
-
}])
|
215
|
-
}, [
|
216
|
-
!_ctx.skeleton ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
217
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
218
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
219
|
-
]),
|
220
|
-
createVNode(Transition, {
|
221
|
-
"enter-active-class": "transition-opacity",
|
222
|
-
"leave-active-class": "transition-opacity",
|
223
|
-
"enter-from-class": "opacity-0",
|
224
|
-
"leave-to-class": "opacity-0"
|
225
|
-
}, {
|
226
|
-
default: withCtx(() => [
|
227
|
-
_ctx.required ? (openBlock(), createElementBlock("span", _hoisted_1, " * ")) : createCommentVNode("", true)
|
228
|
-
]),
|
229
|
-
_: 1
|
230
|
-
})
|
231
|
-
], 64)) : (openBlock(), createBlock(WSkeleton, {
|
232
|
-
key: 1,
|
233
|
-
class: "h-4 w-16"
|
234
|
-
}))
|
235
|
-
], 2)) : createCommentVNode("", true),
|
236
|
-
createElementVNode("div", _hoisted_2, [
|
237
|
-
!_ctx.skeleton ? (openBlock(), createElementBlock("label", {
|
214
|
+
createElementVNode("label", { for: inputId }, [
|
215
|
+
_ctx.title || _ctx.$slots.title?.()?.length ? (openBlock(), createElementBlock("div", {
|
238
216
|
key: 0,
|
239
|
-
class: "
|
240
|
-
|
217
|
+
class: normalizeClass(["text-xs font-semibold text-accent mb-2 duration-500", {
|
218
|
+
"opacity-50": _ctx.disabled && !_ctx.skeleton
|
219
|
+
}])
|
241
220
|
}, [
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
"cursor-text": !_ctx.disabled,
|
246
|
-
"pl-1 py-1 gap-1": _ctx.$slots.suffix?.()?.length,
|
247
|
-
"pl-11": _ctx.icon,
|
248
|
-
"border-negative dark:border-negative-dark": _ctx.errorMessage,
|
249
|
-
"border-gray-300 dark:border-gray-700": !_ctx.disabled,
|
250
|
-
"border-gray-300/50 dark:border-gray-700/50": _ctx.disabled
|
251
|
-
}]),
|
252
|
-
style: normalizeStyle({ paddingRight: paddingRight.value + "px" }),
|
253
|
-
onClick: focus,
|
254
|
-
onMousedown: _cache[13] || (_cache[13] = withModifiers(() => {
|
255
|
-
}, ["prevent"]))
|
256
|
-
}, [
|
257
|
-
_ctx.icon ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
258
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { class: "w-5 h-5" }))
|
259
|
-
])) : createCommentVNode("", true),
|
260
|
-
renderSlot(_ctx.$slots, "prefix"),
|
261
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.textarea ? "textarea" : "input"), {
|
262
|
-
id: inputId,
|
263
|
-
ref_key: "input",
|
264
|
-
ref: input,
|
265
|
-
class: normalizeClass(["text-base font-normal outline-0 border-none bg-[inherit] flex-1 max-w-full disabled:opacity-80 disabled:cursor-not-allowed placeholder:text-gray-400 dark:placeholder:text-gray-500 appearance-none", {
|
266
|
-
"min-h-[var(--textarea-height,160px)] w-full p-3": _ctx.textarea,
|
267
|
-
"resize-y": _ctx.resize && _ctx.textarea,
|
268
|
-
"resize-none": !_ctx.resize && _ctx.textarea,
|
269
|
-
"h-[var(--input-height,42px)]": !_ctx.textarea && !_ctx.$slots.suffix?.()?.length,
|
270
|
-
"h-[var(--input-height,34px)]": !_ctx.textarea && _ctx.$slots.suffix?.()?.length,
|
271
|
-
"py-0 pr-1": !_ctx.hideInput && !_ctx.textarea,
|
272
|
-
"pl-3": !_ctx.hideInput && !_ctx.textarea && !_ctx.icon,
|
273
|
-
"w-0 max-w-0 p-0 absolute": _ctx.hideInput,
|
274
|
-
"font-mono": _ctx.mono,
|
275
|
-
"text-secure": _ctx.textSecure && !isSecureVisible.value,
|
276
|
-
"text-black-default dark:text-gray-200": !_ctx.disabled,
|
277
|
-
"text-black-default/50 dark:text-gray-200/50": _ctx.disabled
|
278
|
-
}]),
|
279
|
-
value: _ctx.placeholderSecure && _ctx.modelValue === void 0 && !isFocused.value ? "******" : _ctx.modelValue,
|
280
|
-
placeholder: _ctx.placeholder,
|
281
|
-
type: _ctx.type ?? "text",
|
282
|
-
name: _ctx.name,
|
283
|
-
disabled: _ctx.disabled,
|
284
|
-
readonly: _ctx.readonly,
|
285
|
-
autocomplete: _ctx.autocomplete,
|
286
|
-
size: _ctx.size || void 0,
|
287
|
-
spellcheck: _ctx.spellcheck ? "true" : "false",
|
288
|
-
onInput: handleInputEvent,
|
289
|
-
onKeypress: _cache[0] || (_cache[0] = withKeys(withModifiers(($event) => !_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:enter", $event), ["exact"]), ["enter"])),
|
290
|
-
onKeydown: [
|
291
|
-
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => !_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:up", $event), ["exact", "stop"]), ["up"])),
|
292
|
-
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => !_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:down", $event), ["exact", "stop"]), ["down"])),
|
293
|
-
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => {
|
294
|
-
!_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:delete", $event);
|
295
|
-
handleBackspace($event);
|
296
|
-
}, ["exact", "stop"]), ["delete"]))
|
297
|
-
],
|
298
|
-
onFocus: _cache[4] || (_cache[4] = ($event) => {
|
299
|
-
_ctx.$emit("focus", $event);
|
300
|
-
setIsFocused(true);
|
301
|
-
}),
|
302
|
-
onBlur: _cache[5] || (_cache[5] = ($event) => {
|
303
|
-
_ctx.$emit("blur", $event);
|
304
|
-
setIsFocused(false);
|
305
|
-
isSecureVisible.value = false;
|
306
|
-
}),
|
307
|
-
onClick: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("click", $event)),
|
308
|
-
onMousedown: _cache[7] || (_cache[7] = withModifiers(($event) => _ctx.$emit("mousedown", $event), ["stop"])),
|
309
|
-
onSelect: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("select:input", $event))
|
310
|
-
}, null, 40, ["class", "value", "placeholder", "type", "name", "disabled", "readonly", "autocomplete", "size", "spellcheck"])),
|
311
|
-
createVNode(_sfc_main$1, {
|
312
|
-
loading: _ctx.loading,
|
313
|
-
"allow-clear": _ctx.allowClear && _ctx.modelValue !== "",
|
314
|
-
disabled: _ctx.disabled || _ctx.readonly || _ctx.disabledActions,
|
315
|
-
"text-secure": _ctx.textSecure,
|
316
|
-
"is-secure-visible": isSecureVisible.value,
|
317
|
-
"allow-paste": _ctx.allowPaste,
|
318
|
-
class: "absolute top-0 right-0 bottom-0",
|
319
|
-
"onClick:clear": clearValue,
|
320
|
-
"onClick:slot": _cache[9] || (_cache[9] = ($event) => {
|
321
|
-
isFocused.value ? blur() : focus();
|
322
|
-
_ctx.$emit("click:internal", $event);
|
323
|
-
}),
|
324
|
-
"onShow:secure": _cache[10] || (_cache[10] = ($event) => {
|
325
|
-
isSecureVisible.value = true;
|
326
|
-
_ctx.$emit("click", $event);
|
327
|
-
}),
|
328
|
-
"onHide:secure": _cache[11] || (_cache[11] = ($event) => isSecureVisible.value = false),
|
329
|
-
"onUpdate:width": _cache[12] || (_cache[12] = ($event) => paddingRight.value = $event),
|
330
|
-
"onClick:paste": paste
|
331
|
-
}, createSlots({ _: 2 }, [
|
332
|
-
_ctx.$slots.suffix?.()?.length ? {
|
333
|
-
name: "default",
|
334
|
-
fn: withCtx(() => [
|
335
|
-
renderSlot(_ctx.$slots, "suffix")
|
336
|
-
]),
|
337
|
-
key: "0"
|
338
|
-
} : void 0
|
339
|
-
]), 1032, ["loading", "allow-clear", "disabled", "text-secure", "is-secure-visible", "allow-paste"])
|
340
|
-
], 38),
|
341
|
-
createVNode(Transition, {
|
342
|
-
"enter-active-class": "transition-opacity",
|
343
|
-
"leave-active-class": "transition-opacity",
|
344
|
-
"enter-from-class": "opacity-0",
|
345
|
-
"leave-to-class": "opacity-0"
|
346
|
-
}, {
|
347
|
-
default: withCtx(() => [
|
348
|
-
_ctx.hasChanges ? (openBlock(), createElementBlock("span", {
|
349
|
-
key: 0,
|
350
|
-
class: normalizeClass(["square-2 rounded-full transition-colors absolute top-0 right-0 z-10", {
|
351
|
-
"bg-info dark:bg-info-dark": isFocused.value || _ctx.errorMessage === void 0,
|
352
|
-
"bg-negative dark:bg-negative-dark": !isFocused.value && _ctx.errorMessage !== void 0
|
353
|
-
}])
|
354
|
-
}, null, 2)) : createCommentVNode("", true)
|
355
|
-
]),
|
356
|
-
_: 1
|
357
|
-
}),
|
358
|
-
createVNode(Transition, {
|
359
|
-
"enter-active-class": "transition-opacity",
|
360
|
-
"leave-active-class": "transition-opacity",
|
361
|
-
"enter-from-class": "opacity-0",
|
362
|
-
"leave-to-class": "opacity-0"
|
363
|
-
}, {
|
364
|
-
default: withCtx(() => [
|
365
|
-
_ctx.errorMessage ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(_ctx.errorMessage), 1)) : _ctx.maxLength !== void 0 && isFocused.value ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(unref(numberFormatter).format(String(_ctx.modelValue || "").length)) + " / " + toDisplayString(unref(numberFormatter).format(_ctx.maxLength)), 1)) : createCommentVNode("", true)
|
221
|
+
!_ctx.skeleton ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
222
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
223
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
366
224
|
]),
|
367
|
-
|
368
|
-
|
369
|
-
|
225
|
+
createVNode(Transition, {
|
226
|
+
"enter-active-class": "transition-opacity",
|
227
|
+
"leave-active-class": "transition-opacity",
|
228
|
+
"enter-from-class": "opacity-0",
|
229
|
+
"leave-to-class": "opacity-0"
|
230
|
+
}, {
|
231
|
+
default: withCtx(() => [
|
232
|
+
_ctx.required ? (openBlock(), createElementBlock("span", _hoisted_1, " * ")) : createCommentVNode("", true)
|
233
|
+
]),
|
234
|
+
_: 1
|
235
|
+
})
|
236
|
+
], 64)) : (openBlock(), createBlock(WSkeleton, {
|
237
|
+
key: 1,
|
238
|
+
class: "h-4 w-16"
|
239
|
+
}))
|
240
|
+
], 2)) : createCommentVNode("", true),
|
241
|
+
createElementVNode("div", _hoisted_2, [
|
242
|
+
!_ctx.skeleton ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
243
|
+
createElementVNode("div", {
|
244
|
+
class: normalizeClass(["relative flex flex-wrap border border-solid rounded-xl bg-default dark:bg-default-dark transition-colors duration-75 overflow-hidden min-h-11 w-full", {
|
245
|
+
"focus-within:border-primary-default dark:focus-within:border-primary-dark": !_ctx.disabled && !_ctx.readonly,
|
246
|
+
"cursor-text": !_ctx.disabled,
|
247
|
+
"pl-1 py-1 gap-1": _ctx.$slots.suffix?.()?.length,
|
248
|
+
"pl-11": _ctx.icon,
|
249
|
+
"border-negative dark:border-negative-dark": _ctx.errorMessage,
|
250
|
+
"border-gray-300 dark:border-gray-700": !_ctx.disabled,
|
251
|
+
"border-gray-300/50 dark:border-gray-700/50": _ctx.disabled
|
252
|
+
}]),
|
253
|
+
style: normalizeStyle({ paddingRight: paddingRight.value + "px" }),
|
254
|
+
onClick: focus,
|
255
|
+
onMousedown: _cache[13] || (_cache[13] = withModifiers(() => {
|
256
|
+
}, ["prevent"]))
|
257
|
+
}, [
|
258
|
+
_ctx.icon ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
259
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { class: "w-5 h-5" }))
|
260
|
+
])) : createCommentVNode("", true),
|
261
|
+
renderSlot(_ctx.$slots, "prefix"),
|
262
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.textarea ? "textarea" : "input"), {
|
263
|
+
id: inputId,
|
264
|
+
ref_key: "input",
|
265
|
+
ref: input,
|
266
|
+
class: normalizeClass(["text-base font-normal outline-0 border-none bg-[inherit] flex-1 max-w-full disabled:opacity-80 disabled:cursor-not-allowed placeholder:text-gray-400 dark:placeholder:text-gray-500 appearance-none", {
|
267
|
+
"min-h-[var(--textarea-height,160px)] w-full p-3": _ctx.textarea,
|
268
|
+
"resize-y": _ctx.resize && _ctx.textarea,
|
269
|
+
"resize-none": !_ctx.resize && _ctx.textarea,
|
270
|
+
"h-[var(--input-height,42px)]": !_ctx.textarea && !_ctx.$slots.suffix?.()?.length,
|
271
|
+
"h-[var(--input-height,34px)]": !_ctx.textarea && _ctx.$slots.suffix?.()?.length,
|
272
|
+
"py-0 pr-1": !_ctx.hideInput && !_ctx.textarea,
|
273
|
+
"pl-3": !_ctx.hideInput && !_ctx.textarea && !_ctx.icon,
|
274
|
+
"w-0 max-w-0 p-0 absolute": _ctx.hideInput,
|
275
|
+
"font-mono": _ctx.mono,
|
276
|
+
"text-secure": _ctx.textSecure && !isSecureVisible.value,
|
277
|
+
"text-black-default dark:text-gray-200": !_ctx.disabled,
|
278
|
+
"text-black-default/50 dark:text-gray-200/50": _ctx.disabled
|
279
|
+
}]),
|
280
|
+
value: _ctx.placeholderSecure && _ctx.modelValue === void 0 && !isFocused.value ? "******" : _ctx.modelValue,
|
281
|
+
placeholder: _ctx.placeholder,
|
282
|
+
type: _ctx.type ?? "text",
|
283
|
+
name: _ctx.name,
|
284
|
+
disabled: _ctx.disabled,
|
285
|
+
readonly: _ctx.readonly,
|
286
|
+
autocomplete: _ctx.autocomplete,
|
287
|
+
size: _ctx.size || void 0,
|
288
|
+
spellcheck: _ctx.spellcheck ? "true" : "false",
|
289
|
+
onInput: handleInputEvent,
|
290
|
+
onKeypress: _cache[0] || (_cache[0] = withKeys(withModifiers(($event) => !_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:enter", $event), ["exact"]), ["enter"])),
|
291
|
+
onKeydown: [
|
292
|
+
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => !_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:up", $event), ["exact", "stop"]), ["up"])),
|
293
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => !_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:down", $event), ["exact", "stop"]), ["down"])),
|
294
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => {
|
295
|
+
!_ctx.disabled && !_ctx.readonly && _ctx.$emit("keypress:delete", $event);
|
296
|
+
handleBackspace($event);
|
297
|
+
}, ["exact", "stop"]), ["delete"]))
|
298
|
+
],
|
299
|
+
onFocus: _cache[4] || (_cache[4] = ($event) => {
|
300
|
+
_ctx.$emit("focus", $event);
|
301
|
+
setIsFocused(true);
|
302
|
+
}),
|
303
|
+
onBlur: _cache[5] || (_cache[5] = ($event) => {
|
304
|
+
_ctx.$emit("blur", $event);
|
305
|
+
setIsFocused(false);
|
306
|
+
isSecureVisible.value = false;
|
307
|
+
}),
|
308
|
+
onClick: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("click", $event)),
|
309
|
+
onMousedown: _cache[7] || (_cache[7] = withModifiers(($event) => _ctx.$emit("mousedown", $event), ["stop"])),
|
310
|
+
onSelect: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("select:input", $event))
|
311
|
+
}, null, 40, ["class", "value", "placeholder", "type", "name", "disabled", "readonly", "autocomplete", "size", "spellcheck"])),
|
312
|
+
createVNode(_sfc_main$1, {
|
313
|
+
loading: _ctx.loading,
|
314
|
+
"allow-clear": _ctx.allowClear && _ctx.modelValue !== "",
|
315
|
+
disabled: _ctx.disabled || _ctx.readonly || _ctx.disabledActions,
|
316
|
+
"text-secure": _ctx.textSecure,
|
317
|
+
"is-secure-visible": isSecureVisible.value,
|
318
|
+
"allow-paste": _ctx.allowPaste,
|
319
|
+
class: "absolute top-0 right-0 bottom-0",
|
320
|
+
"onClick:clear": clearValue,
|
321
|
+
"onClick:slot": _cache[9] || (_cache[9] = ($event) => {
|
322
|
+
isFocused.value ? blur() : focus();
|
323
|
+
_ctx.$emit("click:internal", $event);
|
324
|
+
}),
|
325
|
+
"onShow:secure": _cache[10] || (_cache[10] = ($event) => {
|
326
|
+
isSecureVisible.value = true;
|
327
|
+
_ctx.$emit("click", $event);
|
328
|
+
}),
|
329
|
+
"onHide:secure": _cache[11] || (_cache[11] = ($event) => isSecureVisible.value = false),
|
330
|
+
"onUpdate:width": _cache[12] || (_cache[12] = ($event) => paddingRight.value = $event),
|
331
|
+
"onClick:paste": paste
|
332
|
+
}, createSlots({ _: 2 }, [
|
333
|
+
_ctx.$slots.suffix?.()?.length ? {
|
334
|
+
name: "default",
|
335
|
+
fn: withCtx(() => [
|
336
|
+
renderSlot(_ctx.$slots, "suffix")
|
337
|
+
]),
|
338
|
+
key: "0"
|
339
|
+
} : void 0
|
340
|
+
]), 1032, ["loading", "allow-clear", "disabled", "text-secure", "is-secure-visible", "allow-paste"])
|
341
|
+
], 38),
|
342
|
+
createVNode(Transition, {
|
343
|
+
"enter-active-class": "transition-opacity",
|
344
|
+
"leave-active-class": "transition-opacity",
|
345
|
+
"enter-from-class": "opacity-0",
|
346
|
+
"leave-to-class": "opacity-0"
|
347
|
+
}, {
|
348
|
+
default: withCtx(() => [
|
349
|
+
_ctx.hasChanges ? (openBlock(), createElementBlock("span", {
|
350
|
+
key: 0,
|
351
|
+
class: normalizeClass(["square-2 rounded-full transition-colors absolute top-0 right-0 z-10", {
|
352
|
+
"bg-info dark:bg-info-dark": isFocused.value || _ctx.errorMessage === void 0,
|
353
|
+
"bg-negative dark:bg-negative-dark": !isFocused.value && _ctx.errorMessage !== void 0
|
354
|
+
}])
|
355
|
+
}, null, 2)) : createCommentVNode("", true)
|
356
|
+
]),
|
357
|
+
_: 1
|
358
|
+
}),
|
359
|
+
createVNode(Transition, {
|
360
|
+
"enter-active-class": "transition-opacity",
|
361
|
+
"leave-active-class": "transition-opacity",
|
362
|
+
"enter-from-class": "opacity-0",
|
363
|
+
"leave-to-class": "opacity-0"
|
364
|
+
}, {
|
365
|
+
default: withCtx(() => [
|
366
|
+
_ctx.errorMessage ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(_ctx.errorMessage), 1)) : _ctx.maxLength !== void 0 && isFocused.value ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(unref(numberFormatter).format(String(_ctx.modelValue || "").length)) + " / " + toDisplayString(unref(numberFormatter).format(_ctx.maxLength)), 1)) : createCommentVNode("", true)
|
367
|
+
]),
|
368
|
+
_: 1
|
369
|
+
})
|
370
|
+
])) : (openBlock(), createBlock(WSkeleton, {
|
371
|
+
key: 1,
|
372
|
+
class: normalizeClass(["w-full w-skeleton-rounded-xl", {
|
373
|
+
"h-[calc(var(--textarea-height,160px)+2px)]": _ctx.textarea,
|
374
|
+
"h-[calc(var(--input-height,42px)+2px)]": !_ctx.textarea && !_ctx.$slots.suffix?.()?.length,
|
375
|
+
"h-[calc(var(--input-height,34px)+10px)]": !_ctx.textarea && _ctx.$slots.suffix?.()?.length
|
376
|
+
}]),
|
377
|
+
style: { "--skeleton-width": "100%" }
|
378
|
+
}, null, 8, ["class"])),
|
379
|
+
_ctx.$slots.right?.()?.length ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
380
|
+
renderSlot(_ctx.$slots, "right")
|
381
|
+
], 512)) : createCommentVNode("", true)
|
382
|
+
]),
|
383
|
+
_ctx.description ? (openBlock(), createElementBlock("div", {
|
370
384
|
key: 1,
|
371
|
-
class: normalizeClass(["
|
372
|
-
"
|
373
|
-
|
374
|
-
|
375
|
-
}
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
], 512)) : createCommentVNode("", true)
|
381
|
-
]),
|
382
|
-
_ctx.description ? (openBlock(), createElementBlock("div", {
|
383
|
-
key: 1,
|
384
|
-
class: normalizeClass(["text-xs font-normal text-description pt-4 whitespace-pre-wrap break-words text-pretty", {
|
385
|
-
"opacity-50": _ctx.disabled && !_ctx.skeleton
|
386
|
-
}])
|
387
|
-
}, [
|
388
|
-
_ctx.skeleton ? (openBlock(), createBlock(WSkeleton, { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
389
|
-
createTextVNode(toDisplayString(_ctx.description), 1)
|
390
|
-
], 64))
|
391
|
-
], 2)) : createCommentVNode("", true)
|
385
|
+
class: normalizeClass(["text-xs font-normal text-description pt-4 whitespace-pre-wrap break-words text-pretty", {
|
386
|
+
"opacity-50": _ctx.disabled && !_ctx.skeleton
|
387
|
+
}])
|
388
|
+
}, [
|
389
|
+
_ctx.skeleton ? (openBlock(), createBlock(WSkeleton, { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
390
|
+
createTextVNode(toDisplayString(_ctx.description), 1)
|
391
|
+
], 64))
|
392
|
+
], 2)) : createCommentVNode("", true)
|
393
|
+
])
|
392
394
|
], 2);
|
393
395
|
};
|
394
396
|
}
|
package/package.json
CHANGED
@@ -288,13 +288,7 @@ module.exports = plugin(function ({matchUtilities, addVariant, addUtilities, add
|
|
288
288
|
},
|
289
289
|
},
|
290
290
|
|
291
|
-
'.w-ripple-hover:not(:active):hover, .w-ripple-trigger:not(:active):hover .w-ripple-hover': {
|
292
|
-
'& .w-ripple:not(:active)::before, &.w-ripple::before': {
|
293
|
-
'opacity': 'var(--w-ripple-opacity, 0.10)',
|
294
|
-
},
|
295
|
-
},
|
296
|
-
|
297
|
-
'.w-ripple-hover:not(:active):focus, .w-ripple-trigger:not(:active):focus .w-ripple-hover': {
|
291
|
+
'.w-ripple-hover:not(:active):hover, .w-ripple-trigger:not(:active):hover .w-ripple-hover, .w-ripple-hover:not(:active):focus, .w-ripple-trigger:not(:active):focus .w-ripple-hover': {
|
298
292
|
'& .w-ripple:not(:active)::before, &.w-ripple::before': {
|
299
293
|
'opacity': 'var(--w-ripple-opacity, 0.10)',
|
300
294
|
},
|