eco-vue-js 0.9.8 → 0.9.10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"WTabsStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsStepper.vue"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAA;AAmF7C,iBAAS,cAAc;;yBA4HO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAoE6xd,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA1Dt6d,OAAO,IAA6B;EAEjD;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;gBA3MJ,IAAI;oBAJA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkPqyd,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;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URE__ */ defineComponent({
9
9
  lessTransitions: { type: Boolean },
10
10
  initTab: {},
11
11
  initTabIndex: {},
12
- disableMinHeight: { type: Boolean }
12
+ disableMinHeight: { type: Boolean },
13
+ noHeader: { type: Boolean },
14
+ stepper: { type: Boolean },
15
+ showHasValue: { type: Boolean }
13
16
  },
14
17
  emits: ["update:current", "update:current-index", "update:first", "update:last", "update:progress", "update:has-changes", "update:current-title"],
15
18
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -25,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
28
  tabsRef.value?.previous();
26
29
  };
27
30
  const next = () => {
28
- const errorMessage = tabsRef.value?.validate(current.value);
31
+ const errorMessage = tabsRef.value?.validateIfNoError(current.value);
29
32
  if (errorMessage) {
30
33
  Notify.warn({ title: "Form contains invalid values", caption: errorMessage.length < 200 ? errorMessage : void 0 });
31
34
  return;
@@ -47,7 +50,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
50
  });
48
51
  return (_ctx, _cache) => {
49
52
  return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "tabs" }, props, {
50
- "no-header": "",
53
+ stepper: "",
54
+ "no-indicator": "",
55
+ "show-has-value": "",
51
56
  "onUpdate:current": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:current", $event)),
52
57
  "onUpdate:currentIndex": _cache[1] || (_cache[1] = ($event) => {
53
58
  current.value = $event;
@@ -1,29 +1,217 @@
1
+ import { nextTick } from 'vue';
1
2
  declare function __VLS_template(): {
2
3
  slots: {
3
4
  default?(_: {}): any;
4
5
  };
5
6
  refs: {
6
- element: HTMLDivElement;
7
+ form: ({
8
+ $: import('vue').ComponentInternalInstance;
9
+ $data: {};
10
+ $props: {
11
+ readonly name?: string | undefined;
12
+ readonly title?: string | undefined;
13
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
14
+ readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
15
+ readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
16
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
17
+ $attrs: {
18
+ [x: string]: unknown;
19
+ };
20
+ $refs: {
21
+ [x: string]: unknown;
22
+ };
23
+ $slots: Readonly<{
24
+ [name: string]: import('vue').Slot<any> | undefined;
25
+ }>;
26
+ $root: import('vue').ComponentPublicInstance | null;
27
+ $parent: import('vue').ComponentPublicInstance | null;
28
+ $host: Element | null;
29
+ $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
30
+ $el: any;
31
+ $options: import('vue').ComponentOptionsBase<Readonly<{
32
+ name?: string;
33
+ title?: string;
34
+ }> & Readonly<{
35
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
36
+ "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
37
+ "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
38
+ }>, {
39
+ isValid: import('vue').ComputedRef<boolean>;
40
+ hasChanges: import('vue').ComputedRef<boolean>;
41
+ hasValue: import('vue').ComputedRef<boolean | null>;
42
+ validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
43
+ invalidate: (payload: {
44
+ [x: string]: string | string[] | undefined;
45
+ }) => void;
46
+ initModel: () => void;
47
+ errorMessage: import('vue').ComputedRef<string>;
48
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
49
+ "update:has-changes": (value: boolean) => any;
50
+ "update:is-valid": (value: boolean | undefined) => any;
51
+ "update:has-value": (value: boolean | null) => any;
52
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
53
+ beforeCreate?: (() => void) | (() => void)[];
54
+ created?: (() => void) | (() => void)[];
55
+ beforeMount?: (() => void) | (() => void)[];
56
+ mounted?: (() => void) | (() => void)[];
57
+ beforeUpdate?: (() => void) | (() => void)[];
58
+ updated?: (() => void) | (() => void)[];
59
+ activated?: (() => void) | (() => void)[];
60
+ deactivated?: (() => void) | (() => void)[];
61
+ beforeDestroy?: (() => void) | (() => void)[];
62
+ beforeUnmount?: (() => void) | (() => void)[];
63
+ destroyed?: (() => void) | (() => void)[];
64
+ unmounted?: (() => void) | (() => void)[];
65
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
66
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
67
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
68
+ };
69
+ $forceUpdate: () => void;
70
+ $nextTick: typeof nextTick;
71
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
72
+ } & Readonly<{}> & Omit<Readonly<{
73
+ name?: string;
74
+ title?: string;
75
+ }> & Readonly<{
76
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
77
+ "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
78
+ "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
79
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
80
+ isValid: import('vue').ComputedRef<boolean>;
81
+ hasChanges: import('vue').ComputedRef<boolean>;
82
+ hasValue: import('vue').ComputedRef<boolean | null>;
83
+ validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
84
+ invalidate: (payload: {
85
+ [x: string]: string | string[] | undefined;
86
+ }) => void;
87
+ initModel: () => void;
88
+ errorMessage: import('vue').ComputedRef<string>;
89
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
90
+ $slots: {
91
+ default?(_: {}): any;
92
+ };
93
+ }) | null;
7
94
  };
8
95
  attrs: Partial<{}>;
9
96
  };
10
97
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
98
  declare const __VLS_component: import('vue').DefineComponent<{
99
+ name: string;
100
+ title: string;
12
101
  active: boolean;
13
102
  removable: boolean;
14
103
  }, {
15
104
  emitHeight: () => void;
105
+ isValid: import('vue').ComputedRef<boolean>;
106
+ hasChanges: import('vue').ComputedRef<boolean>;
107
+ hasValue: import('vue').ComputedRef<boolean | null>;
108
+ errorMessage: import('vue').ComputedRef<string | undefined>;
109
+ validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
110
+ invalidate: (payload: {
111
+ [x: string]: string | string[] | undefined;
112
+ }) => void;
113
+ initModel: () => void;
16
114
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
115
+ "tab:switch": (value: string) => any;
17
116
  "update:height": (value: number) => any;
18
117
  "update:active": () => any;
19
118
  }, string, import('vue').PublicProps, Readonly<{
119
+ name: string;
120
+ title: string;
20
121
  active: boolean;
21
122
  removable: boolean;
22
123
  }> & Readonly<{
124
+ "onTab:switch"?: ((value: string) => any) | undefined;
23
125
  "onUpdate:height"?: ((value: number) => any) | undefined;
24
126
  "onUpdate:active"?: (() => any) | undefined;
25
127
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
26
- element: HTMLDivElement;
128
+ form: ({
129
+ $: import('vue').ComponentInternalInstance;
130
+ $data: {};
131
+ $props: {
132
+ readonly name?: string | undefined;
133
+ readonly title?: string | undefined;
134
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
135
+ readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
136
+ readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
137
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
138
+ $attrs: {
139
+ [x: string]: unknown;
140
+ };
141
+ $refs: {
142
+ [x: string]: unknown;
143
+ };
144
+ $slots: Readonly<{
145
+ [name: string]: import('vue').Slot<any> | undefined;
146
+ }>;
147
+ $root: import('vue').ComponentPublicInstance | null;
148
+ $parent: import('vue').ComponentPublicInstance | null;
149
+ $host: Element | null;
150
+ $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
151
+ $el: any;
152
+ $options: import('vue').ComponentOptionsBase<Readonly<{
153
+ name?: string;
154
+ title?: string;
155
+ }> & Readonly<{
156
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
157
+ "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
158
+ "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
159
+ }>, {
160
+ isValid: import('vue').ComputedRef<boolean>;
161
+ hasChanges: import('vue').ComputedRef<boolean>;
162
+ hasValue: import('vue').ComputedRef<boolean | null>;
163
+ validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
164
+ invalidate: (payload: {
165
+ [x: string]: string | string[] | undefined;
166
+ }) => void;
167
+ initModel: () => void;
168
+ errorMessage: import('vue').ComputedRef<string>;
169
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
170
+ "update:has-changes": (value: boolean) => any;
171
+ "update:is-valid": (value: boolean | undefined) => any;
172
+ "update:has-value": (value: boolean | null) => any;
173
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
174
+ beforeCreate?: (() => void) | (() => void)[];
175
+ created?: (() => void) | (() => void)[];
176
+ beforeMount?: (() => void) | (() => void)[];
177
+ mounted?: (() => void) | (() => void)[];
178
+ beforeUpdate?: (() => void) | (() => void)[];
179
+ updated?: (() => void) | (() => void)[];
180
+ activated?: (() => void) | (() => void)[];
181
+ deactivated?: (() => void) | (() => void)[];
182
+ beforeDestroy?: (() => void) | (() => void)[];
183
+ beforeUnmount?: (() => void) | (() => void)[];
184
+ destroyed?: (() => void) | (() => void)[];
185
+ unmounted?: (() => void) | (() => void)[];
186
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
187
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
188
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
189
+ };
190
+ $forceUpdate: () => void;
191
+ $nextTick: typeof nextTick;
192
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
193
+ } & Readonly<{}> & Omit<Readonly<{
194
+ name?: string;
195
+ title?: string;
196
+ }> & Readonly<{
197
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
198
+ "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
199
+ "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
200
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
201
+ isValid: import('vue').ComputedRef<boolean>;
202
+ hasChanges: import('vue').ComputedRef<boolean>;
203
+ hasValue: import('vue').ComputedRef<boolean | null>;
204
+ validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
205
+ invalidate: (payload: {
206
+ [x: string]: string | string[] | undefined;
207
+ }) => void;
208
+ initModel: () => void;
209
+ errorMessage: import('vue').ComputedRef<string>;
210
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
211
+ $slots: {
212
+ default?(_: {}): any;
213
+ };
214
+ }) | null;
27
215
  }, any>;
28
216
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
217
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"TabItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabItem.vue"],"names":[],"mappings":"AAwGA,iBAAS,cAAc;;yBAuCM,GAAG;;;;;WAUlB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YA7GX,OAAO;eACJ,OAAO;;sBAaG,IAAI;;;;;YAdjB,OAAO;eACJ,OAAO;;;;;;OAwHlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"TabItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabItem.vue"],"names":[],"mappings":"AA0EA,OAAO,EAAW,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAiF7D,iBAAS,cAAc;;yBA6DM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0DgvjB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;WAhDx3jB,OAAO,IAA6B;EAEjD;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;UAhKb,MAAM;WACL,MAAM;YACL,OAAO;eACJ,OAAO;;sBAuBG,IAAI;;;;;;;;;;;;;;;UA1BnB,MAAM;WACL,MAAM;YACL,OAAO;eACJ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA4L4vjB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;OAlBp4jB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,25 +1,31 @@
1
- import { defineComponent, useTemplateRef, watch, nextTick, openBlock, createBlock, KeepAlive, withDirectives, createElementBlock, renderSlot, vShow, createCommentVNode } from 'vue';
1
+ import { defineComponent, useTemplateRef, computed, watch, nextTick, withDirectives, openBlock, createBlock, withCtx, renderSlot, vShow, createCommentVNode } from 'vue';
2
+ import _sfc_main$1 from '../../Form/WForm.vue.js';
2
3
  import { useTabItemActiveListener } from '../use/useTabItemActiveListener.js';
3
4
 
4
- const _hoisted_1 = {
5
- key: 0,
6
- ref: "element"
7
- };
8
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
6
  __name: "TabItem",
10
7
  props: {
8
+ name: {},
9
+ title: {},
11
10
  active: { type: Boolean },
12
11
  removable: { type: Boolean }
13
12
  },
14
- emits: ["update:height", "update:active"],
13
+ emits: ["tab:switch", "update:height", "update:active"],
15
14
  setup(__props, { expose: __expose, emit: __emit }) {
16
15
  const props = __props;
17
16
  const emit = __emit;
18
17
  const { callListeners } = useTabItemActiveListener();
19
- const elementRef = useTemplateRef("element");
18
+ const formRef = useTemplateRef("form");
19
+ const isValid = computed(() => formRef.value?.isValid ?? true);
20
+ const hasChanges = computed(() => formRef.value?.hasChanges ?? false);
21
+ const hasValue = computed(() => formRef.value?.hasValue ?? null);
22
+ const errorMessage = computed(() => formRef.value?.errorMessage);
23
+ const validate = (...args) => formRef.value?.validate(...args);
24
+ const invalidate = (...args) => formRef.value?.invalidate(...args);
25
+ const initModel = () => formRef.value?.initModel();
20
26
  const emitHeight = () => {
21
- if (!elementRef.value) return;
22
- emit("update:height", elementRef.value.offsetHeight);
27
+ if (!formRef.value) return;
28
+ emit("update:height", formRef.value.$el.offsetHeight);
23
29
  };
24
30
  watch(() => props.active, async (value) => {
25
31
  if (value) emit("update:active");
@@ -28,16 +34,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
34
  if (value) callListeners();
29
35
  }, { immediate: true });
30
36
  __expose({
31
- emitHeight
37
+ emitHeight,
38
+ isValid,
39
+ hasChanges,
40
+ hasValue,
41
+ errorMessage,
42
+ validate,
43
+ invalidate,
44
+ initModel
32
45
  });
33
46
  return (_ctx, _cache) => {
34
- return openBlock(), createBlock(KeepAlive, null, [
35
- !_ctx.removable || _ctx.active ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
47
+ return !_ctx.removable || _ctx.active ? withDirectives((openBlock(), createBlock(_sfc_main$1, {
48
+ key: 0,
49
+ ref: "form",
50
+ name: _ctx.name,
51
+ title: _ctx.title,
52
+ "onUpdate:isValid": _cache[0] || (_cache[0] = ($event) => $event === false && _ctx.$emit("tab:switch", _ctx.name))
53
+ }, {
54
+ default: withCtx(() => [
36
55
  renderSlot(_ctx.$slots, "default")
37
- ], 512)), [
38
- [vShow, _ctx.active]
39
- ]) : createCommentVNode("", true)
40
- ], 1024);
56
+ ]),
57
+ _: 3
58
+ }, 8, ["name", "title"])), [
59
+ [vShow, _ctx.active]
60
+ ]) : createCommentVNode("", true);
41
61
  };
42
62
  }
43
63
  });
@@ -1,12 +1,24 @@
1
1
  import { CSSProperties } from 'vue';
2
2
  declare function __VLS_template(): {
3
3
  slots: {
4
- title?(_: {}): any;
5
- suffix?(_: {}): any;
6
- right?(_: {}): any;
4
+ title?(_: {
5
+ hasChanges: boolean;
6
+ hasError: boolean;
7
+ hasValue: boolean;
8
+ }): any;
9
+ suffix?(_: {
10
+ hasChanges: boolean;
11
+ hasError: boolean;
12
+ hasValue: boolean;
13
+ }): any;
14
+ right?(_: {
15
+ hasChanges: boolean;
16
+ hasError: boolean;
17
+ hasValue: boolean;
18
+ }): any;
7
19
  };
8
20
  refs: {
9
- button: HTMLButtonElement;
21
+ container: HTMLDivElement;
10
22
  };
11
23
  attrs: Partial<{}>;
12
24
  };
@@ -16,8 +28,15 @@ declare const __VLS_component: import('vue').DefineComponent<{
16
28
  index: number;
17
29
  hasError: boolean;
18
30
  hasChanges: boolean;
31
+ hasValue: boolean;
19
32
  title: string;
20
33
  icon: SVGComponent | undefined;
34
+ first: boolean;
35
+ last: boolean;
36
+ disabled?: boolean;
37
+ stepper?: boolean;
38
+ showHasValue?: boolean;
39
+ noIndicator?: boolean;
21
40
  side?: boolean;
22
41
  }, {
23
42
  update: () => void;
@@ -34,8 +53,15 @@ declare const __VLS_component: import('vue').DefineComponent<{
34
53
  index: number;
35
54
  hasError: boolean;
36
55
  hasChanges: boolean;
56
+ hasValue: boolean;
37
57
  title: string;
38
58
  icon: SVGComponent | undefined;
59
+ first: boolean;
60
+ last: boolean;
61
+ disabled?: boolean;
62
+ stepper?: boolean;
63
+ showHasValue?: boolean;
64
+ noIndicator?: boolean;
39
65
  side?: boolean;
40
66
  }> & Readonly<{
41
67
  onClick?: ((value: MouseEvent) => any) | undefined;
@@ -46,7 +72,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
46
72
  top: number;
47
73
  }) => any) | undefined;
48
74
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
49
- button: HTMLButtonElement;
75
+ container: HTMLDivElement;
50
76
  }, any>;
51
77
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
52
78
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"TabTitleButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabTitleButton.vue"],"names":[],"mappings":"AA8IA,OAAO,EAAC,KAAK,aAAa,EAA6C,MAAM,KAAK,CAAA;AA0FlF,iBAAS,cAAc;;uBA2HI,GAAG;wBACD,GAAG;uBACJ,GAAG;;;;;WAUjB,OAAO,IAA6B;EAEjD;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YA5OX,OAAO;WACR,MAAM;cACH,OAAO;gBACL,OAAO;WACZ,MAAM;UACP,YAAY,GAAG,SAAS;WACvB,OAAO;;;;;;;cA+O8B,MAAM;;aAAU,MAAM;;;YArP1D,OAAO;WACR,MAAM;cACH,OAAO;gBACL,OAAO;WACZ,MAAM;UACP,YAAY,GAAG,SAAS;WACvB,OAAO;;;;;cA+O8B,MAAM;;aAAU,MAAM;;;;OAIlE,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"TabTitleButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabTitleButton.vue"],"names":[],"mappings":"AAoNA,OAAO,EAAC,KAAK,aAAa,EAA6C,MAAM,KAAK,CAAA;AAqGlF,iBAAS,cAAc;;;;;;YAwNK,GAAG;;;;;YACF,GAAG;;;;;YACJ,GAAG;;;;;WAUjB,OAAO,IAA6B;EAEjD;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YAnVX,OAAO;WACR,MAAM;cACH,OAAO;gBACL,OAAO;cACT,OAAO;WACV,MAAM;UACP,YAAY,GAAG,SAAS;WACvB,OAAO;UACR,OAAO;eACF,OAAO;cACR,OAAO;mBACF,OAAO;kBACR,OAAO;WACd,OAAO;;;;;;;cA+U8B,MAAM;;aAAU,MAAM;;;YA5V1D,OAAO;WACR,MAAM;cACH,OAAO;gBACL,OAAO;cACT,OAAO;WACV,MAAM;UACP,YAAY,GAAG,SAAS;WACvB,OAAO;UACR,OAAO;eACF,OAAO;cACR,OAAO;mBACF,OAAO;kBACR,OAAO;WACd,OAAO;;;;;cA+U8B,MAAM;;aAAU,MAAM;;;;OAIlE,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}