eco-vue-js 0.3.69 → 0.3.71

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 md:text-base text-[10px] whitespace-nowrap" };
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,19 +1,43 @@
1
1
  import { SemanticType } from '../../utils/SemanticType';
2
- declare const _default: <Model extends string | number | boolean | null>(__VLS_props: {
2
+ declare const _default: <Model extends string | number | boolean | null, Entity extends Record<string, unknown>>(__VLS_props: ({
3
3
  modelValue: Model;
4
4
  title?: string | undefined;
5
5
  list: Model[];
6
+ valueGetter: never;
6
7
  disabled?: boolean | undefined;
7
8
  loading?: string | number | undefined;
8
9
  minimize?: boolean | undefined;
9
10
  wrap?: boolean | undefined;
10
11
  semanticType?: SemanticType | undefined;
11
12
  stretch?: boolean | undefined;
12
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
13
+ } | {
14
+ modelValue: Model;
15
+ title?: string | undefined;
16
+ list: Entity[];
17
+ valueGetter: (value: Entity) => Model;
18
+ disabled?: boolean | undefined;
19
+ loading?: string | number | undefined;
20
+ minimize?: boolean | undefined;
21
+ wrap?: boolean | undefined;
22
+ semanticType?: SemanticType | undefined;
23
+ stretch?: boolean | undefined;
24
+ }) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
13
25
  props: {
14
26
  modelValue: Model;
15
27
  title?: string | undefined;
16
28
  list: Model[];
29
+ valueGetter: never;
30
+ disabled?: boolean | undefined;
31
+ loading?: string | number | undefined;
32
+ minimize?: boolean | undefined;
33
+ wrap?: boolean | undefined;
34
+ semanticType?: SemanticType | undefined;
35
+ stretch?: boolean | undefined;
36
+ } | {
37
+ modelValue: Model;
38
+ title?: string | undefined;
39
+ list: Entity[];
40
+ valueGetter: (value: Entity) => Model;
17
41
  disabled?: boolean | undefined;
18
42
  loading?: string | number | undefined;
19
43
  minimize?: boolean | undefined;
@@ -24,8 +48,9 @@ declare const _default: <Model extends string | number | boolean | null>(__VLS_p
24
48
  expose(exposed: {}): void;
25
49
  attrs: any;
26
50
  slots: {
51
+ title?(_: {}): any;
27
52
  default?(_: {
28
- item: Model;
53
+ item: Entity;
29
54
  }): any;
30
55
  };
31
56
  emit: (e: 'update:modelValue', value: Model) => void;
@@ -34,6 +59,18 @@ declare const _default: <Model extends string | number | boolean | null>(__VLS_p
34
59
  modelValue: Model;
35
60
  title?: string | undefined;
36
61
  list: Model[];
62
+ valueGetter: never;
63
+ disabled?: boolean | undefined;
64
+ loading?: string | number | undefined;
65
+ minimize?: boolean | undefined;
66
+ wrap?: boolean | undefined;
67
+ semanticType?: SemanticType | undefined;
68
+ stretch?: boolean | undefined;
69
+ } | {
70
+ modelValue: Model;
71
+ title?: string | undefined;
72
+ list: Entity[];
73
+ valueGetter: (value: Entity) => Model;
37
74
  disabled?: boolean | undefined;
38
75
  loading?: string | number | undefined;
39
76
  minimize?: boolean | undefined;
@@ -44,8 +81,9 @@ declare const _default: <Model extends string | number | boolean | null>(__VLS_p
44
81
  expose(exposed: {}): void;
45
82
  attrs: any;
46
83
  slots: {
84
+ title?(_: {}): any;
47
85
  default?(_: {
48
- item: Model;
86
+ item: Entity;
49
87
  }): any;
50
88
  };
51
89
  emit: (e: 'update:modelValue', value: Model) => void;
@@ -57,6 +95,18 @@ declare const _default: <Model extends string | number | boolean | null>(__VLS_p
57
95
  modelValue: Model;
58
96
  title?: string | undefined;
59
97
  list: Model[];
98
+ valueGetter: never;
99
+ disabled?: boolean | undefined;
100
+ loading?: string | number | undefined;
101
+ minimize?: boolean | undefined;
102
+ wrap?: boolean | undefined;
103
+ semanticType?: SemanticType | undefined;
104
+ stretch?: boolean | undefined;
105
+ } | {
106
+ modelValue: Model;
107
+ title?: string | undefined;
108
+ list: Entity[];
109
+ valueGetter: (value: Entity) => Model;
60
110
  disabled?: boolean | undefined;
61
111
  loading?: string | number | undefined;
62
112
  minimize?: boolean | undefined;
@@ -67,8 +117,9 @@ declare const _default: <Model extends string | number | boolean | null>(__VLS_p
67
117
  expose(exposed: {}): void;
68
118
  attrs: any;
69
119
  slots: {
120
+ title?(_: {}): any;
70
121
  default?(_: {
71
- item: Model;
122
+ item: Entity;
72
123
  }): any;
73
124
  };
74
125
  emit: (e: 'update:modelValue', value: Model) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonGroup.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;;yBAiKV,IAAI;WACpC,GAAG;;;;YA9BoB,GAAG;;cAyB3B,mBAAmB,mBAAiB,IAAI;;;;;;;;;;;;;yBAIP,IAAI;WACpC,GAAG;;;;YA9BoB,GAAG;;cAyB3B,mBAAmB,mBAAiB,IAAI;;;;;;;;;;;;;;;;6BAIP,IAAI;eACpC,GAAG;;;;gBA9BoB,GAAG;;kBAyB3B,mBAAmB,mBAAiB,IAAI;;;AA3J9C,wBAoKkE"}
1
+ {"version":3,"file":"WButtonGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonGroup.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;;;;;iBAWlC,KAAK;;;;;;;;;;;;;;;;;;;;;;;qBAAL,KAAK;;;;;;;;;;;;;;;;;;;yBA6KmB,IAAI;WACpC,GAAG;;uBAtBkB,GAAG;;;YACD,GAAG;;cAgB3B,mBAAmB,mBAAiB,IAAI;;;;;;qBAzK/B,KAAK;;;;;;;;;;;;;;;;;;;yBA6KmB,IAAI;WACpC,GAAG;;uBAtBkB,GAAG;;;YACD,GAAG;;cAgB3B,mBAAmB,mBAAiB,IAAI;;;;;;;;;yBAzK/B,KAAK;;;;;;;;;;;;;;;;;;;6BA6KmB,IAAI;eACpC,GAAG;;2BAtBkB,GAAG;;;gBACD,GAAG;;kBAgB3B,mBAAmB,mBAAiB,IAAI;;;AAlL9C,wBA2LkE"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList, createBlock, unref, withCtx, renderSlot } from 'vue';
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList, createBlock, unref, withCtx } from 'vue';
2
2
  import _sfc_main$1 from './WButton.vue.js';
3
3
  import { SemanticType } from '../../utils/SemanticType.js';
4
4
 
@@ -8,6 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  modelValue: {},
9
9
  title: {},
10
10
  list: {},
11
+ valueGetter: { type: Function },
11
12
  disabled: { type: Boolean },
12
13
  loading: {},
13
14
  minimize: { type: Boolean },
@@ -17,12 +18,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
18
  },
18
19
  emits: ["update:modelValue"],
19
20
  setup(__props) {
21
+ const props = __props;
22
+ const getValue = (item) => {
23
+ if ("valueGetter" in props && typeof item === "object") {
24
+ return props.valueGetter(item);
25
+ } else {
26
+ return item;
27
+ }
28
+ };
20
29
  return (_ctx, _cache) => {
21
30
  return openBlock(), createElementBlock("div", null, [
22
- _ctx.title ? (openBlock(), createElementBlock("div", {
31
+ _ctx.title || _ctx.$slots.title?.().length ? (openBlock(), createElementBlock("div", {
23
32
  key: 0,
24
33
  class: normalizeClass(["text-xs font-semibold text-accent mb-2", { "opacity-60": _ctx.disabled }])
25
- }, toDisplayString(_ctx.title), 3)) : createCommentVNode("", true),
34
+ }, [
35
+ renderSlot(_ctx.$slots, "title", {}, () => [
36
+ createTextVNode(toDisplayString(_ctx.title), 1)
37
+ ])
38
+ ], 2)) : createCommentVNode("", true),
26
39
  createElementVNode("div", {
27
40
  class: normalizeClass(["flex px-px", {
28
41
  "flex-wrap gap-2": _ctx.wrap
@@ -31,21 +44,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
44
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index) => {
32
45
  return openBlock(), createBlock(_sfc_main$1, {
33
46
  key: index,
34
- "semantic-type": item === _ctx.modelValue ? _ctx.semanticType ?? unref(SemanticType).PRIMARY : unref(SemanticType).SECONDARY,
35
- loading: item === _ctx.loading,
36
- disabled: _ctx.disabled || _ctx.loading !== void 0 && item !== _ctx.loading,
47
+ "semantic-type": getValue(item) === _ctx.modelValue ? _ctx.semanticType ?? unref(SemanticType).PRIMARY : unref(SemanticType).SECONDARY,
48
+ loading: getValue(item) === _ctx.loading,
49
+ disabled: _ctx.disabled || _ctx.loading !== void 0 && getValue(item) !== _ctx.loading,
37
50
  minimize: _ctx.minimize,
38
51
  class: normalizeClass(_ctx.wrap ? [
39
- item !== _ctx.modelValue && "-mx-px"
52
+ getValue(item) !== _ctx.modelValue && "-mx-px"
40
53
  ] : [
41
- index !== _ctx.list.length - 1 ? "rounded-r-none border-r-0" : item !== _ctx.modelValue && "-mr-px",
42
- index !== 0 ? "rounded-l-none border-l-0" : item !== _ctx.modelValue && "-ml-px",
54
+ index !== _ctx.list.length - 1 ? "rounded-r-none border-r-0" : getValue(item) !== _ctx.modelValue && "-mr-px",
55
+ index !== 0 ? "rounded-l-none border-l-0" : getValue(item) !== _ctx.modelValue && "-ml-px",
43
56
  _ctx.stretch ? "flex-1" : void 0
44
57
  ]),
45
- onClick: ($event) => item !== _ctx.modelValue && _ctx.$emit("update:modelValue", item)
58
+ onClick: ($event) => getValue(item) !== _ctx.modelValue && _ctx.$emit("update:modelValue", getValue(item))
46
59
  }, {
47
60
  default: withCtx(() => [
48
- renderSlot(_ctx.$slots, "default", { item })
61
+ renderSlot(_ctx.$slots, "default", {
62
+ item
63
+ })
49
64
  ]),
50
65
  _: 2
51
66
  }, 1032, ["semantic-type", "loading", "disabled", "minimize", "class", "onClick"]);
@@ -1 +1 @@
1
- {"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2JkB,IAAI;oBAQL,IAAI;QA2oBkB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA/oBF,IAAI;oBAQL,IAAI;QA2oBkB,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,GAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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, createElementVNode, normalizeStyle, withModifiers, resolveDynamicComponent, withKeys, createSlots, unref, nextTick } from 'vue';
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: "absolute top-0 left-0 h-full flex items-center justify-center px-3 text-description select-none"
15
+ class: "relative isolate grid grid-cols-1"
16
16
  };
17
17
  const _hoisted_4 = {
18
18
  key: 0,
19
- class: "text-xs font-normal text-negative dark:text-negative-dark absolute right-0 pt-0.5 text-end"
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: 1,
23
- class: "text-xs font-normal text-description absolute right-0 pt-0.5 whitespace-nowrap"
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
- _ctx.title || _ctx.$slots.title?.()?.length ? (openBlock(), createElementBlock("div", {
211
- key: 0,
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: "relative isolate overflow-hidden",
240
- for: inputId
217
+ class: normalizeClass(["text-xs font-semibold text-accent mb-2 duration-500", {
218
+ "opacity-50": _ctx.disabled && !_ctx.skeleton
219
+ }])
241
220
  }, [
242
- createElementVNode("div", {
243
- 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", {
244
- "focus-within:border-primary-default dark:focus-within:border-primary-dark": !_ctx.disabled && !_ctx.readonly,
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
- _: 1
368
- })
369
- ])) : (openBlock(), createBlock(WSkeleton, {
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(["w-full w-skeleton-rounded-xl", {
372
- "h-[calc(var(--textarea-height,160px)+2px)]": _ctx.textarea,
373
- "h-[calc(var(--input-height,42px)+2px)]": !_ctx.textarea && !_ctx.$slots.suffix?.()?.length,
374
- "h-[calc(var(--input-height,34px)+10px)]": !_ctx.textarea && _ctx.$slots.suffix?.()?.length
375
- }]),
376
- style: { "--skeleton-width": "100%" }
377
- }, null, 8, ["class"])),
378
- _ctx.$slots.right?.()?.length ? (openBlock(), createElementBlock("div", _hoisted_6, [
379
- renderSlot(_ctx.$slots, "right")
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
  }
@@ -103,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
103
  key: 0,
104
104
  "parent-element": tooltipMeta.value.parent,
105
105
  "horizontal-align": unref(HorizontalAlign).CENTER,
106
- "max-height": 120,
106
+ "max-height": 200,
107
107
  "max-width": 240,
108
108
  "emit-update": "",
109
109
  class: "z-[10000] [--arrow-size:8px] transition-[top,bottom,left,right]",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.3.69",
7
+ "version": "0.3.71",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",