eco-vue-js 0.10.36 → 0.10.37

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 (34) hide show
  1. package/dist/components/ActionsBar/WActionsBar.vue.d.ts +1 -0
  2. package/dist/components/ActionsBar/WActionsBar.vue.d.ts.map +1 -1
  3. package/dist/components/ActionsBar/WActionsBar.vue.js +4 -3
  4. package/dist/components/Button/WButtonAction.vue.d.ts +1 -0
  5. package/dist/components/Button/WButtonAction.vue.d.ts.map +1 -1
  6. package/dist/components/Button/WButtonAction.vue.js +17 -6
  7. package/dist/components/Form/WForm.vue.d.ts +4 -0
  8. package/dist/components/Form/WForm.vue.d.ts.map +1 -1
  9. package/dist/components/Form/WForm.vue.js +11 -2
  10. package/dist/components/Form/WFormValidator.vue.d.ts +2 -0
  11. package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
  12. package/dist/components/Form/WFormValidator.vue.js +24 -25
  13. package/dist/components/Form/models/injection.d.ts +1 -0
  14. package/dist/components/Form/models/injection.d.ts.map +1 -1
  15. package/dist/components/Form/models/injection.js +2 -1
  16. package/dist/components/Form/use/useFormValueMap.d.ts.map +1 -1
  17. package/dist/components/Form/use/useFormValueMap.js +2 -6
  18. package/dist/components/FormAsync/WFormAsyncToggle.vue.d.ts +3 -1
  19. package/dist/components/FormAsync/WFormAsyncToggle.vue.d.ts.map +1 -1
  20. package/dist/components/FormAsync/WFormAsyncToggle.vue.js +10 -2
  21. package/dist/components/Input/WInput.vue.js +1 -1
  22. package/dist/components/Modal/WModalStepper.vue.d.ts +40 -8
  23. package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
  24. package/dist/components/Modal/WModalWrapper.vue.js +3 -3
  25. package/dist/components/Tabs/WTabs.vue.d.ts +48 -24
  26. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  27. package/dist/components/Tabs/WTabs.vue.js +2 -2
  28. package/dist/components/Tabs/components/TabItem.vue.d.ts +20 -4
  29. package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
  30. package/dist/components/Toggle/WToggle.vue.d.ts +3 -1
  31. package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
  32. package/dist/components/Toggle/WToggle.vue.js +10 -6
  33. package/package.json +1 -1
  34. package/tailwind-base/plugins/default.ts +1 -0
@@ -2,6 +2,7 @@ import { Component, VNode } from 'vue';
2
2
  type __VLS_Props = {
3
3
  filter?: Component;
4
4
  bottom?: Component;
5
+ textFilter?: string;
5
6
  };
6
7
  declare function __VLS_template(): {
7
8
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"WActionsBar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionsBar/WActionsBar.vue"],"names":[],"mappings":"AAsEA;AA2HA,OAAO,EAAC,KAAK,SAAS,EAAE,KAAK,KAAK,EAA6C,MAAM,KAAK,CAAA;AAS1F,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,CAAC;AAwCF,iBAAS,cAAc;WAgHT,OAAO,IAA6B;;cAvH1C,MAAM,KAAK,EAAE;iBACV,MAAM,KAAK,EAAE;iBACb,MAAM,KAAK,EAAE;;cAFhB,MAAM,KAAK,EAAE;iBACV,MAAM,KAAK,EAAE;iBACb,MAAM,KAAK,EAAE;;;;EA0HvB;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WActionsBar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionsBar/WActionsBar.vue"],"names":[],"mappings":"AAsEA;AA4HA,OAAO,EAAC,KAAK,SAAS,EAAE,KAAK,KAAK,EAA6C,MAAM,KAAK,CAAA;AAS1F,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;AAwCF,iBAAS,cAAc;WAgHT,OAAO,IAA6B;;cAvH1C,MAAM,KAAK,EAAE;iBACV,MAAM,KAAK,EAAE;iBACb,MAAM,KAAK,EAAE;;cAFhB,MAAM,KAAK,EAAE;iBACV,MAAM,KAAK,EAAE;iBACb,MAAM,KAAK,EAAE;;;;EA0HvB;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -31,7 +31,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  __name: "WActionsBar",
32
32
  props: {
33
33
  filter: {},
34
- bottom: {}
34
+ bottom: {},
35
+ textFilter: {}
35
36
  },
36
37
  setup(__props) {
37
38
  const props = __props;
@@ -83,13 +84,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
83
84
  _ctx.$slots.top && (hasFilter.value || _ctx.bottom || _ctx.$slots.bottom) ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
84
85
  hasFilter.value ? (openBlock(), createBlock(_sfc_main$1, {
85
86
  key: 1,
86
- title: "Filters",
87
+ title: _ctx.textFilter ?? "Filters",
87
88
  icon: markRaw(unref(IconFilter)),
88
89
  active: isOpen.value,
89
90
  count: filterCount.value,
90
91
  "semantic-type": unref(SemanticType).PRIMARY,
91
92
  onClick: toggle
92
- }, null, 8, ["icon", "active", "count", "semantic-type"])) : createCommentVNode("", true),
93
+ }, null, 8, ["title", "icon", "active", "count", "semantic-type"])) : createCommentVNode("", true),
93
94
  renderSlot(_ctx.$slots, "bottom", {}, () => [
94
95
  _ctx.bottom ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.bottom), { key: 0 })) : createCommentVNode("", true)
95
96
  ])
@@ -10,6 +10,7 @@ interface Props extends Partial<LinkProps> {
10
10
  disabled?: boolean;
11
11
  skeleton?: boolean;
12
12
  tooltipText?: string;
13
+ titleText?: boolean;
13
14
  }
14
15
  declare function __VLS_template(): {
15
16
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonAction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonAction.vue"],"names":[],"mappings":"AAwDA;AAAA,OAwGO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAU5C,OAAO,EAAC,YAAY,EAA+B,MAAM,sBAAsB,CAAA;AAE/E,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAmCD,iBAAS,cAAc;WAiIT,OAAO,IAA6B;;sBAVvB,GAAG;;;;EAe7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;WAjMX,MAAM;eAvHE,YAAY;UAmHrB,YAAY;SAGb,QAAQ,GAAG,GAAG;kBAEL,YAAY;iBAGb,MAAM;6EAsMpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WButtonAction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonAction.vue"],"names":[],"mappings":"AAsEA;AAAA,OAuHO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAU5C,OAAO,EAAC,YAAY,EAA+B,MAAM,sBAAsB,CAAA;AAE/E,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAmCD,iBAAS,cAAc;WAqJT,OAAO,IAA6B;;sBAVvB,GAAG;;;;EAe7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;WAtNX,MAAM;eAtIE,YAAY;UAkIrB,YAAY;SAGb,QAAQ,GAAG,GAAG;kBAEL,YAAY;iBAGb,MAAM;6EA2NpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createElementBlock, createCommentVNode, normalizeClass, withDirectives, renderSlot, vShow } from 'vue';
1
+ import { defineComponent, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createElementBlock, createCommentVNode, normalizeClass, withDirectives, renderSlot, vShow, Fragment, createTextVNode, toDisplayString } from 'vue';
2
2
  import { RouterLink } from 'vue-router';
3
3
  import _sfc_main$1 from '../Counter/WCounter.vue.js';
4
4
  import _sfc_main$2 from '../Shine/WShine.vue.js';
@@ -19,6 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  disabled: { type: Boolean },
20
20
  skeleton: { type: Boolean },
21
21
  tooltipText: { default: void 0 },
22
+ titleText: { type: Boolean },
22
23
  to: { default: void 0 }
23
24
  },
24
25
  emits: ["click"],
@@ -27,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
28
  const isBackdrop = useIsBackdrop();
28
29
  return (_ctx, _cache) => {
29
30
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.to !== void 0 ? _ctx.disabled || _ctx.skeleton ? "a" : unref(RouterLink) : _ctx.tag), mergeProps(_ctx.to !== void 0 && !_ctx.disabled && !_ctx.skeleton ? { to: _ctx.to } : void 0, {
30
- class: ["w-ripple-trigger group block h-[3.25rem] w-full px-1 py-0.5", {
31
+ class: ["w-ripple-trigger group grid w-full grid-cols-1 py-1", {
31
32
  "cursor-not-allowed opacity-50": _ctx.disabled,
32
33
  "cursor-progress": _ctx.skeleton
33
34
  }],
@@ -37,10 +38,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
38
  default: withCtx(() => [
38
39
  _ctx.skeleton ? (openBlock(), createBlock(WSkeleton, {
39
40
  key: 0,
40
- class: "w-skeleton-w-full w-skeleton-h-auto w-skeleton-rounded-full aspect-square"
41
+ class: "w-skeleton-w-auto w-skeleton-h-auto w-skeleton-rounded-full mx-1 aspect-square"
41
42
  })) : (openBlock(), createElementBlock("div", {
42
43
  key: 1,
43
- class: normalizeClass(["relative grid aspect-square w-full select-none items-center justify-center gap-1 rounded-full bg-[200%_auto] [background-position:right]", {
44
+ class: normalizeClass(["relative mx-1 grid aspect-square select-none items-center justify-center gap-1 rounded-full bg-[200%_auto] [background-position:right]", {
44
45
  "w-ripple w-ripple-hover cursor-pointer": !_ctx.disabled && !_ctx.skeleton,
45
46
  "text-primary dark:text-primary-dark": _ctx.active && _ctx.semanticType === unref(SemanticType).SECONDARY,
46
47
  [unref(semanticTypeBackgroundMap)[_ctx.semanticType]]: true
@@ -64,9 +65,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
65
  ]),
65
66
  !_ctx.disabled && !unref(isBackdrop) ? (openBlock(), createBlock(_sfc_main$2, { key: 1 })) : createCommentVNode("", true)
66
67
  ], 2)),
67
- _ctx.tooltipText || _ctx.title ? (openBlock(), createBlock(_sfc_main$3, {
68
+ _ctx.titleText ? (openBlock(), createElementBlock("div", {
68
69
  key: 2,
69
- text: _ctx.tooltipText ?? _ctx.title,
70
+ class: normalizeClass(["text-3xs mt-1 text-center", {
71
+ "self-center": !_ctx.skeleton
72
+ }])
73
+ }, [
74
+ _ctx.skeleton ? (openBlock(), createBlock(WSkeleton, { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
75
+ createTextVNode(toDisplayString(_ctx.title), 1)
76
+ ], 64))
77
+ ], 2)) : createCommentVNode("", true),
78
+ _ctx.tooltipText || !_ctx.titleText && _ctx.title ? (openBlock(), createBlock(_sfc_main$3, {
79
+ key: 3,
80
+ text: _ctx.tooltipText ?? (_ctx.titleText ? void 0 : _ctx.title),
70
81
  left: ""
71
82
  }, null, 8, ["text"])) : createCommentVNode("", true)
72
83
  ]),
@@ -19,6 +19,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
19
19
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
20
20
  hasValue: import('vue').Ref<boolean | null, boolean | null>;
21
21
  hasValueMap: import('vue').Ref<Record<string, boolean | null>, Record<string, boolean | null>>;
22
+ hasShown: import('vue').Ref<boolean, boolean>;
23
+ hasShownMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
22
24
  validate: import('vue').Ref<(silent?: boolean, path?: ValidatePath) => string | undefined, (silent?: boolean, path?: ValidatePath) => string | undefined>;
23
25
  validateMap: import('vue').Ref<Record<string, (silent?: boolean, path?: ValidatePath) => string | undefined>, Record<string, (silent?: boolean, path?: ValidatePath) => string | undefined>>;
24
26
  invalidate: import('vue').Ref<(messages: Record<string, string | string[] | undefined>) => void, (messages: Record<string, string | string[] | undefined>) => void>;
@@ -31,10 +33,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
31
33
  "update:is-valid": (value: boolean | undefined) => any;
32
34
  "update:has-changes": (value: boolean) => any;
33
35
  "update:has-value": (value: boolean | null) => any;
36
+ "update:has-shown": (value: boolean) => any;
34
37
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
35
38
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
36
39
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
37
40
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
41
+ "onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
38
42
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
39
43
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
40
44
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WForm.vue"],"names":[],"mappings":"AAKA;AAkKA,OAAO,EAAC,KAAK,YAAY,EAAiB,MAAM,gBAAgB,CAAA;AAGhE,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AA2JF,iBAAS,cAAc;WA6BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;kFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WForm.vue"],"names":[],"mappings":"AAKA;AA8KA,OAAO,EAAC,KAAK,YAAY,EAAiB,MAAM,gBAAgB,CAAA;AAGhE,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAyKF,iBAAS,cAAc;WA6BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;kFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, toRef, computed, provide, inject, watch, onBeforeUnmount, createBlock, openBlock, resolveDynamicComponent, withCtx, renderSlot } from 'vue';
2
2
  import _sfc_main$1 from '../EmptyComponent/WEmptyComponent.vue.js';
3
- import { wFormTitleUpdater, wFormUnlistener, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormValidateUpdater } from './models/injection.js';
3
+ import { wFormTitleUpdater, wFormUnlistener, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormHasShownUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormValidateUpdater } from './models/injection.js';
4
4
  import { compileMessage } from './models/utils.js';
5
5
  import { useFormValueMap } from './use/useFormValueMap.js';
6
6
 
@@ -11,7 +11,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  title: {},
12
12
  noTag: { type: Boolean }
13
13
  },
14
- emits: ["update:is-valid", "update:has-changes", "update:has-value"],
14
+ emits: ["update:is-valid", "update:has-changes", "update:has-value", "update:has-shown"],
15
15
  setup(__props, { expose: __expose, emit: __emit }) {
16
16
  const props = __props;
17
17
  const emit = __emit;
@@ -40,6 +40,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
40
  return items.length !== 0 && items.every((value) => value);
41
41
  })
42
42
  );
43
+ const hasShownMap = useFormValueMap(
44
+ wFormHasShownUpdater,
45
+ name,
46
+ (map) => computed(() => Object.values(map.value).some((value) => value))
47
+ );
43
48
  const validateMap = useFormValueMap(
44
49
  wFormValidateUpdater,
45
50
  name,
@@ -81,6 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
81
86
  errorMessageMap.unlistener(key);
82
87
  hasChangesMap.unlistener(key);
83
88
  hasValueMap.unlistener(key);
89
+ hasShownMap.unlistener(key);
84
90
  validateMap.unlistener(key);
85
91
  invalidateMap.unlistener(key);
86
92
  initModelMap.unlistener(key);
@@ -90,6 +96,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
96
  watch(errorMessageMap.map, () => emit("update:is-valid", isValid.value));
91
97
  watch(hasChangesMap.value, (value) => emit("update:has-changes", value));
92
98
  watch(hasValueMap.value, (value) => emit("update:has-value", value));
99
+ watch(hasShownMap.value, (value) => emit("update:has-shown", value));
93
100
  onBeforeUnmount(() => {
94
101
  if (props.name) {
95
102
  unlistenerInjected?.(props.name);
@@ -102,6 +109,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
102
109
  hasChangesMap: hasChangesMap.map,
103
110
  hasValue: hasValueMap.value,
104
111
  hasValueMap: hasValueMap.map,
112
+ hasShown: hasShownMap.value,
113
+ hasShownMap: hasShownMap.map,
105
114
  validate: validateMap.value,
106
115
  validateMap: validateMap.map,
107
116
  invalidate: invalidateMap.value,
@@ -29,11 +29,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
29
29
  "update:is-valid": (value: boolean) => any;
30
30
  "update:has-changes": (value: boolean) => any;
31
31
  "update:has-value": (value: boolean | null) => any;
32
+ "update:has-shown": (value: boolean) => any;
32
33
  invalidate: (value: Record<string, string | string[] | undefined>) => any;
33
34
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
34
35
  "onUpdate:is-valid"?: ((value: boolean) => any) | undefined;
35
36
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
36
37
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
38
+ "onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
37
39
  onInvalidate?: ((value: Record<string, string | string[] | undefined>) => any) | undefined;
38
40
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
39
41
  component: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAYA;AAsTA,OAAO,EAAC,KAAK,KAAK,EAAyF,MAAM,KAAK,CAAA;AAUtH,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;IACpC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAiSF,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;iBAxDvC,MAAM,KAAK,EAAE;;iBAAb,MAAM,KAAK,EAAE;;;;;;EA6DvB;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;wBA9FC,MAAM;qBA5EN,IAAI;;;;;;;;;;;;;OAoLxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAaA;AA2TA,OAAO,EAAC,KAAK,KAAK,EAAyF,MAAM,KAAK,CAAA;AAUtH,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;IACpC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAuSF,iBAAS,cAAc;WAyDT,OAAO,IAA6B;;iBA9DvC,MAAM,KAAK,EAAE;;iBAAb,MAAM,KAAK,EAAE;;;;;;EAmEvB;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;wBAvGC,MAAM;qBA7EN,IAAI;;;;;;;;;;;;;;;OA8LxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -3,7 +3,7 @@ import { useIsInsideTab } from '../Tabs/use/useIsInsideTab.js';
3
3
  import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
4
4
  import { debounce } from '../../utils/utils.js';
5
5
  import { validateRequired } from '../../utils/validate.js';
6
- import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
6
+ import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormHasShownUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
7
7
  import { scrollToValidator } from './models/utils.js';
8
8
 
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -17,7 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  noChanges: { type: Boolean },
18
18
  hasValue: { type: Boolean }
19
19
  },
20
- emits: ["update:has-changes", "update:has-value", "update:is-valid", "invalidate"],
20
+ emits: ["update:has-changes", "update:has-value", "update:has-shown", "update:is-valid", "invalidate"],
21
21
  setup(__props, { expose: __expose, emit: __emit }) {
22
22
  const props = __props;
23
23
  const emit = __emit;
@@ -25,6 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  const errorMessageUpdater = inject(wFormErrorMessageUpdater, void 0);
26
26
  const hasChangesUpdater = inject(wFormHasChangesUpdater, void 0);
27
27
  const hasValueUpdater = inject(wFormHasValueUpdater, void 0);
28
+ const hasShownUpdater = inject(wFormHasShownUpdater, void 0);
28
29
  const validateUpdater = inject(wFormValidateUpdater, void 0);
29
30
  const invalidateUpdater = inject(wFormInvalidateUpdater, void 0);
30
31
  const initModelUpdater = inject(wFormInitModelUpdater, void 0);
@@ -45,6 +46,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
46
  return void 0;
46
47
  });
47
48
  const initModelValue = ref();
49
+ const isErrorShown = ref(false);
48
50
  const required = computed(() => componentSlot.value?.props?.required !== void 0 ? componentSlot.value?.props?.required !== false : void 0);
49
51
  const mandatory = computed(() => componentSlot.value?.props?.mandatory !== void 0 ? componentSlot.value?.props?.mandatory !== false : void 0);
50
52
  const skeleton = computed(() => componentSlot.value?.props?.skeleton !== void 0 ? componentSlot.value?.props?.skeleton !== false : void 0);
@@ -64,7 +66,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
66
  }
65
67
  }
66
68
  });
67
- const hasBeenValidated = ref(false);
68
69
  const hasValueExact = computed(() => {
69
70
  if (props.hasValue) return true;
70
71
  if (!required.value && !mandatory.value) return null;
@@ -118,7 +119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
119
  const validateOnUpdate = (value) => {
119
120
  const message = _validate(value);
120
121
  errorMessage.value = message;
121
- hasBeenValidated.value = true;
122
+ if (!message) isErrorShown.value = false;
122
123
  return message;
123
124
  };
124
125
  const _validateOnUpdate = (value) => {
@@ -138,9 +139,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
138
139
  const doValidate = (silent, path) => {
139
140
  if (props.name && path && !path[props.name]) return;
140
141
  const message = _validate(modelValue.value);
142
+ errorMessage.value = message;
141
143
  if (!silent) {
142
- errorMessage.value = message;
143
- hasBeenValidated.value = true;
144
+ isErrorShown.value = true;
144
145
  if (!isInsideTab) scrollTo();
145
146
  }
146
147
  return message;
@@ -153,41 +154,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
153
154
  else if (message instanceof Array) errorMessage.value = message.join(", ");
154
155
  };
155
156
  const initModel = () => {
157
+ isErrorShown.value = false;
156
158
  initModelValue.value = modelValue.value;
159
+ validateOnUpdate(modelValue.value);
157
160
  };
158
161
  const scrollTo = () => {
159
162
  if (!errorMessage.value) return;
160
- const element = componentRef.value.$el;
163
+ const element = componentRef.value?.$el;
161
164
  if (element instanceof HTMLDivElement) scrollToValidator(element);
162
165
  };
163
166
  const scrollToDebounced = debounce(scrollTo, 300);
164
167
  useTabActiveListener(scrollToDebounced);
165
168
  watch(errorMessage, (value) => {
166
169
  if (value === null) return;
167
- if (props.name) {
168
- errorMessageUpdater?.(props.name, value);
169
- }
170
+ if (props.name) errorMessageUpdater?.(props.name, value);
170
171
  emit("update:is-valid", !value);
171
172
  });
172
173
  watch(hasChanges, (value) => {
173
- if (props.name) {
174
- hasChangesUpdater?.(props.name, value);
175
- }
174
+ if (props.name) hasChangesUpdater?.(props.name, value);
176
175
  emit("update:has-changes", value);
177
176
  });
178
177
  watch(_hasValue, (value) => {
179
- if (props.name) {
180
- hasValueUpdater?.(props.name, value);
181
- }
178
+ if (props.name) hasValueUpdater?.(props.name, value);
182
179
  emit("update:has-value", value);
183
180
  }, { immediate: true });
181
+ watch(isErrorShown, (value) => {
182
+ if (props.name) hasShownUpdater?.(props.name, value);
183
+ emit("update:has-shown", value);
184
+ });
184
185
  watch(title, (value) => {
185
- if (props.name) {
186
- titleUpdater?.(props.name, value);
187
- }
186
+ if (props.name) titleUpdater?.(props.name, value);
188
187
  }, { immediate: true });
189
188
  watch(required, () => {
190
- if (hasBeenValidated.value) doValidate();
189
+ doValidate();
191
190
  });
192
191
  watch(skeleton, (value) => {
193
192
  if (!value) initModel();
@@ -201,12 +200,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
201
200
  }
202
201
  });
203
202
  onBeforeUnmount(() => {
204
- if (props.name) {
205
- unlistener?.(props.name);
206
- }
203
+ if (props.name) unlistener?.(props.name);
207
204
  });
208
205
  __expose({
209
206
  validateOnUpdate() {
207
+ isErrorShown.value = true;
210
208
  return validateOnUpdate(modelValue.value);
211
209
  },
212
210
  invalidate(message) {
@@ -217,12 +215,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
215
  return (_ctx, _cache) => {
218
216
  return openBlock(), createBlock(resolveDynamicComponent(componentSlot.value), {
219
217
  ref: "component",
220
- "error-message": errorMessage.value,
218
+ "error-message": isErrorShown.value ? errorMessage.value : void 0,
221
219
  "has-changes": _ctx.noChanges ? void 0 : hasChanges.value,
222
220
  "onUpdate:modelValue": _validateOnUpdate,
223
221
  onSelect: _validateOnSelect,
224
222
  onUnselect: _validateOnUnselect,
225
- onInitModel: initModel
223
+ onInitModel: initModel,
224
+ onBlur: _cache[0] || (_cache[0] = ($event) => isErrorShown.value = true)
226
225
  }, null, 40, ["error-message", "has-changes"]);
227
226
  };
228
227
  }
@@ -4,6 +4,7 @@ export declare const wFormTitleUpdater: InjectionKey<(key: string, value: string
4
4
  export declare const wFormErrorMessageUpdater: InjectionKey<(key: string, value: string | undefined) => void>;
5
5
  export declare const wFormHasChangesUpdater: InjectionKey<(key: string, value: boolean) => void>;
6
6
  export declare const wFormHasValueUpdater: InjectionKey<(key: string, value: boolean | null) => void>;
7
+ export declare const wFormHasShownUpdater: InjectionKey<(key: string, value: boolean) => void>;
7
8
  export declare const wFormValidateUpdater: InjectionKey<(key: string, value: (silent?: boolean, path?: ValidatePath) => string | undefined) => void>;
8
9
  export declare const wFormInvalidateUpdater: InjectionKey<(key: string, value: (messages: Record<string, string | string[] | undefined>) => void) => void>;
9
10
  export declare const wFormInitModelUpdater: InjectionKey<(key: string, value: () => void) => void>;
@@ -1 +1 @@
1
- {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/models/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAA;AAErC,eAAO,MAAM,iBAAiB,EAAkC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,wBAAwB,EAAyC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE5I,eAAO,MAAM,sBAAsB,EAAuC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC,CAAA;AAE7H,eAAO,MAAM,oBAAoB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC,CAAA;AAEhI,eAAO,MAAM,oBAAoB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE/K,eAAO,MAAM,sBAAsB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,KAAK,IAAI,KAAK,IAAI,CAAC,CAAA;AAErL,eAAO,MAAM,qBAAqB,EAAsC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,eAAe,EAAgC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,CAAA"}
1
+ {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/models/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAA;AAErC,eAAO,MAAM,iBAAiB,EAAkC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,wBAAwB,EAAyC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE5I,eAAO,MAAM,sBAAsB,EAAuC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC,CAAA;AAE7H,eAAO,MAAM,oBAAoB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC,CAAA;AAEhI,eAAO,MAAM,oBAAoB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC,CAAA;AAEzH,eAAO,MAAM,oBAAoB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE/K,eAAO,MAAM,sBAAsB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,KAAK,IAAI,KAAK,IAAI,CAAC,CAAA;AAErL,eAAO,MAAM,qBAAqB,EAAsC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,eAAe,EAAgC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,CAAA"}
@@ -2,9 +2,10 @@ const wFormTitleUpdater = Symbol("wFormTitleUpdater");
2
2
  const wFormErrorMessageUpdater = Symbol("wFormErrorMessageUpdater");
3
3
  const wFormHasChangesUpdater = Symbol("wFormHasChangesUpdater");
4
4
  const wFormHasValueUpdater = Symbol("wFormHasValueUpdater");
5
+ const wFormHasShownUpdater = Symbol("wFormHasShownUpdater");
5
6
  const wFormValidateUpdater = Symbol("wFormValidateUpdater");
6
7
  const wFormInvalidateUpdater = Symbol("wFormValidateUpdater");
7
8
  const wFormInitModelUpdater = Symbol("wFormInitModelUpdater");
8
9
  const wFormUnlistener = Symbol("wFormUnlistener");
9
10
 
10
- export { wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormTitleUpdater, wFormUnlistener, wFormValidateUpdater };
11
+ export { wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasShownUpdater, wFormHasValueUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormTitleUpdater, wFormUnlistener, wFormValidateUpdater };
@@ -1 +1 @@
1
- {"version":3,"file":"useFormValueMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/use/useFormValueMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,GAAG,EAAoD,MAAM,KAAK,CAAA;AAElG,eAAO,MAAM,eAAe,GAAI,KAAK,EAAE,WAAW,SAAS,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EACtK,cAAc,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,EAC/D,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAC7B,aAAa,WAAW,KACvB;IACD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;IAC/B,KAAK,EAAE,WAAW,SAAS,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAA;CAwChF,CAAA"}
1
+ {"version":3,"file":"useFormValueMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/use/useFormValueMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,GAAG,EAAoD,MAAM,KAAK,CAAA;AAElG,eAAO,MAAM,eAAe,GAAI,KAAK,EAAE,WAAW,SAAS,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EACtK,cAAc,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,EAC/D,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAC7B,aAAa,WAAW,KACvB;IACD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;IAC/B,KAAK,EAAE,WAAW,SAAS,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAA;CAoChF,CAAA"}
@@ -15,15 +15,11 @@ const useFormValueMap = (injectionKey, name, valueGetter) => {
15
15
  const value = isRef(valueGetter) ? valueGetter : valueGetter(map);
16
16
  if (isRef(value)) {
17
17
  watch(value, (value2) => {
18
- if (name.value) {
19
- updaterInjected?.(name.value, value2);
20
- }
18
+ if (name.value) updaterInjected?.(name.value, value2);
21
19
  }, { immediate: true });
22
20
  } else {
23
21
  onBeforeMount(() => {
24
- if (name.value) {
25
- updaterInjected?.(name.value, value);
26
- }
22
+ if (name.value) updaterInjected?.(name.value, value);
27
23
  });
28
24
  }
29
25
  return {
@@ -5,7 +5,9 @@ declare const _default: <Model, FieldType extends boolean | null, QueryParams>(_
5
5
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSuccess"> & FormAsyncToggleProps<Model, FieldType, QueryParams> & Partial<{}>> & import('vue').PublicProps;
6
6
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
7
7
  attrs: any;
8
- slots: {};
8
+ slots: {
9
+ title?(_: {}): any;
10
+ };
9
11
  emit: (e: "success", value: Model) => void;
10
12
  }>) => import('vue').VNode & {
11
13
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -1 +1 @@
1
- {"version":3,"file":"WFormAsyncToggle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FormAsync/WFormAsyncToggle.vue"],"names":[],"mappings":"AAWA;AAAA,OA6BO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;yBAMhC,KAAK,EAAE,SAAS,SAAS,OAAO,GAAG,IAAI,EAAE,WAAW,EACpE,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAuFO,mBAAmB,CAAC;;qMAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;cApFL,SAAS,SAAS,KAAK,KAAG,IAAI;EAwFhC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAlGzE,wBAkG4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"WFormAsyncToggle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FormAsync/WFormAsyncToggle.vue"],"names":[],"mappings":"AAkBA;AAAA,OAoCO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;yBAMhC,KAAK,EAAE,SAAS,SAAS,OAAO,GAAG,IAAI,EAAE,WAAW,EACpE,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAiGO,mBAAmB,CAAC;;qMAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBAnCgB,GAAG;;cA3DxB,SAAS,SAAS,KAAK,KAAG,IAAI;EAkGhC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA5GzE,wBA4G4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, mergeProps, unref } from 'vue';
1
+ import { defineComponent, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, renderSlot } from 'vue';
2
2
  import _sfc_main$1 from '../Toggle/WToggle.vue.js';
3
3
  import { useFormAsync } from './use/useFormAsync.js';
4
4
 
@@ -37,7 +37,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
37
  modelValue: unref(modelValue),
38
38
  loading: _ctx.loading || !unref(data) || unref(submitting),
39
39
  disabled: !unref(data) || unref(isLoadingError) || _ctx.disabled
40
- }, { "onUpdate:modelValue": unref(showModal) }), null, 16, ["onUpdate:modelValue"]);
40
+ }, { "onUpdate:modelValue": unref(showModal) }), createSlots({ _: 2 }, [
41
+ _ctx.$slots.title ? {
42
+ name: "title",
43
+ fn: withCtx(() => [
44
+ renderSlot(_ctx.$slots, "title")
45
+ ]),
46
+ key: "0"
47
+ } : void 0
48
+ ]), 1040, ["onUpdate:modelValue"]);
41
49
  };
42
50
  }
43
51
  });
@@ -221,7 +221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
221
221
  name: "field",
222
222
  fn: withCtx(({ id, setFocused, focused }) => [
223
223
  createElementVNode("div", {
224
- class: normalizeClass(["relative grid min-h-[--w-input-height,2.75rem] grid-cols-[auto,1fr,auto] overflow-hidden rounded-[--w-input-rounded,0.75rem] border border-solid transition-colors duration-75", {
224
+ class: normalizeClass(["relative grid min-h-[--w-input-min-height,var(--w-input-height,2.75rem)] grid-cols-[auto,1fr,auto] overflow-hidden rounded-[--w-input-rounded,0.75rem] border border-solid transition-colors duration-75", {
225
225
  "focus-within:border-primary dark:focus-within:border-primary-dark focus-within:outline-primary/20 dark:focus-within:outline-primary-dark/20 focus-within:outline focus-within:outline-2": !_ctx.disabled && !_ctx.readonly && !_ctx.unclickable,
226
226
  "cursor-text": !_ctx.disabled,
227
227
  "border-negative dark:border-negative-dark": _ctx.errorMessage,