eco-vue-js 0.9.1 → 0.9.3

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":"WModalStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/WModalStepper.vue"],"names":[],"mappings":"AA8NA,iBAAS,cAAc;;uBAsPI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAyEq+O,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA/D3mP,OAAO,IAA6B;EAEjD;AA0BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAnWT,OAAO;eACN,OAAO;mBACH,OAAO;;gBA6BP,IAAI;oBANA,IAAI;;;;;;;;;cAzBb,OAAO;eACN,OAAO;mBACH,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmY2+O,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,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AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,11 +1,10 @@
1
- import { defineComponent, useSlots, useTemplateRef, computed, ref, watch, openBlock, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createElementVNode, normalizeStyle, unref, createVNode } from 'vue';
2
- import _sfc_main$2 from '../Button/WButton.vue.js';
1
+ import { defineComponent, useTemplateRef, ref, openBlock, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createVNode, unref } from 'vue';
2
+ import _sfc_main$3 from '../Button/WButton.vue.js';
3
3
  import _sfc_main$1 from './WModalWrapper.vue.js';
4
- import _sfc_main$3 from '../Tabs/WTabs.vue.js';
5
- import { Notify } from '../../utils/Notify.js';
4
+ import _sfc_main$2 from '../Progress/WProgress.vue.js';
5
+ import _sfc_main$4 from '../Tabs/WTabsStepper.vue.js';
6
6
  import { SemanticType } from '../../utils/SemanticType.js';
7
7
 
8
- const _hoisted_1 = { class: "h-1 w-full bg-gray-200 dark:bg-gray-700" };
9
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
9
  __name: "WModalStepper",
11
10
  props: {
@@ -13,31 +12,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
12
  disabled: { type: Boolean },
14
13
  disabledNext: { type: Boolean }
15
14
  },
16
- emits: ["close:modal", "submit", "next", "previous", "update:current", "update:has-changes"],
17
- setup(__props, { expose: __expose, emit: __emit }) {
18
- const emit = __emit;
19
- const slots = useSlots();
20
- const tabsRef = useTemplateRef("tabs");
21
- const defaultSlots = computed(() => slots.default?.() ?? []);
22
- const tabsLength = ref(0);
23
- const current = ref(0);
15
+ emits: ["close:modal", "submit", "update:has-changes"],
16
+ setup(__props, { expose: __expose }) {
17
+ const tabsStepperRef = useTemplateRef("tabsStepper");
18
+ const first = ref(true);
19
+ const last = ref(false);
24
20
  const currentTitle = ref();
21
+ const progress = ref(0);
25
22
  const previous = () => {
26
- emit("previous", current.value);
27
- tabsRef.value?.previous();
23
+ tabsStepperRef.value?.previous();
28
24
  };
29
25
  const next = () => {
30
- emit("next", current.value);
31
- const errorMessage = tabsRef.value?.validate(current.value);
32
- if (errorMessage) {
33
- Notify.warn({ title: "Form contains invalid values", caption: errorMessage.length < 200 ? errorMessage : void 0 });
34
- return;
35
- }
36
- tabsRef.value?.next();
26
+ tabsStepperRef.value?.next();
37
27
  };
38
- watch(current, (value) => {
39
- emit("update:current", value);
40
- }, { immediate: true });
41
28
  __expose({
42
29
  next,
43
30
  previous
@@ -50,75 +37,72 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
37
  ])
51
38
  ]),
52
39
  subtitle: withCtx(() => [
53
- createElementVNode("div", _hoisted_1, [
54
- createElementVNode("div", {
55
- class: "bg-primary-default dark:bg-primary-dark h-full transition-[width]",
56
- style: normalizeStyle({
57
- width: 100 * (current.value + 1) / tabsLength.value + "%"
58
- })
59
- }, null, 4)
60
- ])
40
+ createVNode(_sfc_main$2, { "model-value": progress.value }, null, 8, ["model-value"])
61
41
  ]),
62
42
  actions: withCtx(() => [
63
- current.value === 0 ? (openBlock(), createBlock(_sfc_main$2, {
43
+ first.value ? (openBlock(), createBlock(_sfc_main$3, {
64
44
  key: 0,
65
45
  disabled: _ctx.loading || _ctx.disabled,
66
46
  "semantic-type": unref(SemanticType).SECONDARY,
67
47
  class: "w-full",
68
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("close:modal"))
48
+ onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("close:modal"))
69
49
  }, {
70
- default: withCtx(() => _cache[6] || (_cache[6] = [
50
+ default: withCtx(() => _cache[9] || (_cache[9] = [
71
51
  createTextVNode(" Close ")
72
52
  ])),
73
53
  _: 1
74
- }, 8, ["disabled", "semantic-type"])) : (openBlock(), createBlock(_sfc_main$2, {
54
+ }, 8, ["disabled", "semantic-type"])) : (openBlock(), createBlock(_sfc_main$3, {
75
55
  key: 1,
76
56
  disabled: _ctx.loading || _ctx.disabled,
77
57
  "semantic-type": unref(SemanticType).SECONDARY,
78
58
  class: "w-full",
79
- onClick: previous
59
+ onClick: _cache[6] || (_cache[6] = ($event) => unref(tabsStepperRef)?.previous())
80
60
  }, {
81
- default: withCtx(() => _cache[7] || (_cache[7] = [
61
+ default: withCtx(() => _cache[10] || (_cache[10] = [
82
62
  createTextVNode(" Back ")
83
63
  ])),
84
64
  _: 1
85
65
  }, 8, ["disabled", "semantic-type"])),
86
- current.value === tabsLength.value - 1 ? (openBlock(), createBlock(_sfc_main$2, {
66
+ last.value ? (openBlock(), createBlock(_sfc_main$3, {
87
67
  key: 2,
88
68
  "semantic-type": unref(SemanticType).PRIMARY,
89
69
  loading: _ctx.loading,
90
70
  disabled: _ctx.disabled || _ctx.disabledNext,
91
71
  class: "w-full",
92
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("submit"))
72
+ onClick: _cache[7] || (_cache[7] = ($event) => _ctx.$emit("submit"))
93
73
  }, {
94
- default: withCtx(() => _cache[8] || (_cache[8] = [
74
+ default: withCtx(() => _cache[11] || (_cache[11] = [
95
75
  createTextVNode(" Submit ")
96
76
  ])),
97
77
  _: 1
98
- }, 8, ["semantic-type", "loading", "disabled"])) : (openBlock(), createBlock(_sfc_main$2, {
78
+ }, 8, ["semantic-type", "loading", "disabled"])) : (openBlock(), createBlock(_sfc_main$3, {
99
79
  key: 3,
100
80
  "semantic-type": unref(SemanticType).PRIMARY,
101
81
  loading: _ctx.loading,
102
82
  disabled: _ctx.disabled || _ctx.disabledNext,
103
83
  class: "w-full",
104
- onClick: next
84
+ onClick: _cache[8] || (_cache[8] = ($event) => unref(tabsStepperRef)?.next())
105
85
  }, {
106
- default: withCtx(() => _cache[9] || (_cache[9] = [
86
+ default: withCtx(() => _cache[12] || (_cache[12] = [
107
87
  createTextVNode(" Next ")
108
88
  ])),
109
89
  _: 1
110
90
  }, 8, ["semantic-type", "loading", "disabled"]))
111
91
  ]),
112
92
  default: withCtx(() => [
113
- createVNode(_sfc_main$3, {
114
- ref: "tabs",
115
- "custom-slots": defaultSlots.value,
116
- "no-header": "",
117
- "onUpdate:currentIndex": _cache[0] || (_cache[0] = ($event) => current.value = $event),
118
- "onUpdate:currentTitle": _cache[1] || (_cache[1] = ($event) => currentTitle.value = $event),
119
- "onUpdate:hasChanges": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:has-changes", $event)),
120
- "onUpdate:tabsLength": _cache[3] || (_cache[3] = ($event) => tabsLength.value = $event)
121
- }, null, 8, ["custom-slots"])
93
+ createVNode(_sfc_main$4, {
94
+ ref: "tabsStepper",
95
+ "onUpdate:first": _cache[0] || (_cache[0] = ($event) => first.value = $event),
96
+ "onUpdate:last": _cache[1] || (_cache[1] = ($event) => last.value = $event),
97
+ "onUpdate:currentTitle": _cache[2] || (_cache[2] = ($event) => currentTitle.value = $event),
98
+ "onUpdate:hasChanges": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("update:has-changes", $event)),
99
+ "onUpdate:progress": _cache[4] || (_cache[4] = ($event) => progress.value = $event)
100
+ }, {
101
+ default: withCtx(() => [
102
+ renderSlot(_ctx.$slots, "default")
103
+ ]),
104
+ _: 3
105
+ }, 512)
122
106
  ]),
123
107
  _: 3
124
108
  });
@@ -0,0 +1,7 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ modelValue: number;
3
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
4
+ modelValue: number;
5
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
7
+ //# sourceMappingURL=WProgress.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WProgress.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/WProgress.vue"],"names":[],"mappings":";gBAoBc,MAAM;;gBAAN,MAAM;;AA8DpB,wBAMG"}
@@ -0,0 +1,23 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle } from 'vue';
2
+
3
+ const _hoisted_1 = { class: "h-1 w-full bg-gray-200 dark:bg-gray-700" };
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "WProgress",
6
+ props: {
7
+ modelValue: {}
8
+ },
9
+ setup(__props) {
10
+ return (_ctx, _cache) => {
11
+ return openBlock(), createElementBlock("div", _hoisted_1, [
12
+ createElementVNode("div", {
13
+ class: "bg-primary-default dark:bg-primary-dark h-full transition-[width]",
14
+ style: normalizeStyle({
15
+ width: _ctx.modelValue + "%"
16
+ })
17
+ }, null, 4)
18
+ ]);
19
+ };
20
+ }
21
+ });
22
+
23
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './WProgress.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -1,14 +1,7 @@
1
- import { CSSProperties, VNode, nextTick } from 'vue';
1
+ import { TabsProps } from './types';
2
+ import { CSSProperties, nextTick } from 'vue';
2
3
  import { default as WForm } from '../Form/WForm.vue';
3
- declare const _default: import('vue').DefineComponent<{
4
- customSlots?: VNode[];
5
- lessTransitions?: boolean;
6
- initTab?: number;
7
- side?: boolean;
8
- disableMinHeight?: boolean;
9
- noHeader?: boolean;
10
- switchToNew?: boolean;
11
- }, {
4
+ declare const _default: import('vue').DefineComponent<TabsProps, {
12
5
  updateCurrent: (value: string) => void;
13
6
  updateIndex: (value: number) => void;
14
7
  next: () => void;
@@ -24,15 +17,7 @@ declare const _default: import('vue').DefineComponent<{
24
17
  "update:current-index": (value: number) => any;
25
18
  "update:current-title": (value: string) => any;
26
19
  "update:tabs-length": (value: number) => any;
27
- }, string, import('vue').PublicProps, Readonly<{
28
- customSlots?: VNode[];
29
- lessTransitions?: boolean;
30
- initTab?: number;
31
- side?: boolean;
32
- disableMinHeight?: boolean;
33
- noHeader?: boolean;
34
- switchToNew?: boolean;
35
- }> & Readonly<{
20
+ }, string, import('vue').PublicProps, Readonly<TabsProps> & Readonly<{
36
21
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
37
22
  "onUpdate:current"?: ((value: string) => any) | undefined;
38
23
  "onUpdate:current-index"?: ((value: number) => any) | undefined;
@@ -155,6 +140,7 @@ declare const _default: import('vue').DefineComponent<{
155
140
  $data: {};
156
141
  $props: {
157
142
  readonly active: boolean;
143
+ readonly removable: boolean;
158
144
  readonly "onUpdate:height"?: ((value: number) => any) | undefined;
159
145
  readonly "onUpdate:active"?: (() => any) | undefined;
160
146
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
@@ -176,6 +162,7 @@ declare const _default: import('vue').DefineComponent<{
176
162
  $el: any;
177
163
  $options: import('vue').ComponentOptionsBase<Readonly<{
178
164
  active: boolean;
165
+ removable: boolean;
179
166
  }> & Readonly<{
180
167
  "onUpdate:height"?: ((value: number) => any) | undefined;
181
168
  "onUpdate:active"?: (() => any) | undefined;
@@ -206,6 +193,7 @@ declare const _default: import('vue').DefineComponent<{
206
193
  $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;
207
194
  } & Readonly<{}> & Omit<Readonly<{
208
195
  active: boolean;
196
+ removable: boolean;
209
197
  }> & Readonly<{
210
198
  "onUpdate:height"?: ((value: number) => any) | undefined;
211
199
  "onUpdate:active"?: (() => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AAsSA,OAAO,EAAC,KAAK,aAAa,EAAkB,KAAK,KAAK,EAAoB,QAAQ,EAAyE,MAAM,KAAK,CAAA;AAEtK,OAAO,KAAK,MAAM,6B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AAK,CAAA;AAEtK,OAAO,KAAK,MAAM,6BAA6B,CAAA;;2BAsEjB,MAAM;yBAMR,MAAM;gBAcjB,IAAI;oBAIA,IAAI;sBAUA,MAAM,6GAAqE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;wBAIhI,MAAM;;UAAuE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC;uBAIvI,MAAM,KAAsE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA0PhI,GAAG,8CACO,GAAG,yBAE9B,GAAG,6DAEW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCALA,GAAG,8CACO,GAAG,yBAE9B,GAAG,6DAEW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCALA,GAAG,8CACO,GAAG,yBAE9B,GAAG,6DAEW,GAAG;;;;;;;;;;;;;;;;;;;;;AA4J9B,wBAeG"}
@@ -22,14 +22,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
22
  const emit = __emit;
23
23
  const slots = useSlots();
24
24
  const buttonContainerRef = useTemplateRef("buttonContainer");
25
- const defaultSlots = computed(() => {
26
- const result = [];
27
- (props.customSlots ?? slots.default?.() ?? []).forEach((item) => {
28
- if (Array.isArray(item.children)) result.push(...item.children);
29
- if (typeof item.type === "symbol") return;
30
- result.push(item);
25
+ const defaultSlotsRaw = computed(() => props.customSlots ?? slots.default?.() ?? []);
26
+ const unwrapSlots = (slots2) => {
27
+ return slots2.flatMap((slot) => {
28
+ if (Array.isArray(slot?.children)) return unwrapSlots(slot.children);
29
+ else if (typeof slot.type !== "symbol") return slot;
30
+ else return [];
31
31
  });
32
- return result;
32
+ };
33
+ const defaultSlots = computed(() => {
34
+ return unwrapSlots(defaultSlotsRaw.value);
33
35
  });
34
36
  const defaultSlotsKeys = computed(() => defaultSlots.value.map((item) => item.props?.name));
35
37
  const current = ref(defaultSlotsKeys.value[props.initTab ?? 0]);
@@ -63,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
65
  };
64
66
  const setCurrentDebounced = debounce((value) => {
65
67
  if (current.value === value || !defaultSlotsKeys.value.includes(value)) return;
66
- if (!defaultSlots.value[defaultSlotsKeys.value.indexOf(value)].children?.default) return;
68
+ if (defaultSlots.value[defaultSlotsKeys.value.indexOf(value)].props?.disabled !== void 0) return;
67
69
  isDirect.value = defaultSlotsKeys.value.indexOf(current.value) < defaultSlotsKeys.value.indexOf(value);
68
70
  current.value = value;
69
71
  }, 100);
@@ -141,7 +143,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
143
  });
142
144
  return (_ctx, _cache) => {
143
145
  return openBlock(), createElementBlock("div", {
144
- class: normalizeClass(["mb-8 grid gap-4", {
146
+ class: normalizeClass(["grid gap-4", {
145
147
  "grid grid-cols-1": !_ctx.side,
146
148
  "grid grid-cols-[auto,1fr] items-start": _ctx.side
147
149
  }])
@@ -202,15 +204,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
202
204
  style: normalizeStyle(indicatorStyle.value)
203
205
  }, null, 6)
204
206
  ], 2)) : createCommentVNode("", true),
205
- createElementVNode("div", {
207
+ defaultSlots.value.some((slot) => slot.children?.default) ? (openBlock(), createElementBlock("div", {
208
+ key: 1,
206
209
  class: "relative h-full transition-[min-height] duration-300",
207
210
  style: normalizeStyle({ minHeight: minHeight.value ? minHeight.value + "px" : "auto", "--direction-factor": isDirect.value ? "1" : "-1" })
208
211
  }, [
209
212
  createVNode(TransitionGroup, {
210
213
  "enter-active-class": "transition-[transform,opacity] duration-[250ms] w-full",
211
214
  "leave-active-class": "transition-[transform,opacity] duration-[250ms] w-full absolute top-0",
212
- "enter-from-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor))]",
213
- "leave-to-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor)*-1)]"
215
+ "enter-from-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "opacity-0 translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor))]",
216
+ "leave-to-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "opacity-0 translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor)*-1)]"
214
217
  }, {
215
218
  default: withCtx(() => [
216
219
  (openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlots.value, (slot) => {
@@ -219,7 +222,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
219
222
  ref: "tabItem",
220
223
  key: slot.props?.name,
221
224
  active: slot.props?.name === current.value,
222
- class: "width-full",
225
+ removable: slot.props?.removable,
223
226
  "onUpdate:height": _cache[1] || (_cache[1] = ($event) => !_ctx.disableMinHeight && updateHeight($event)),
224
227
  "onUpdate:active": ($event) => _ctx.$emit("update:current-title", slot.props?.title)
225
228
  }, {
@@ -233,18 +236,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
233
236
  "onUpdate:hasChanges": ($event) => hasChangesMap[slot.props?.name] = $event
234
237
  }, {
235
238
  default: withCtx(() => [
236
- (openBlock(), createBlock(resolveDynamicComponent(slot.children?.default)))
239
+ (openBlock(), createBlock(resolveDynamicComponent(slot)))
237
240
  ]),
238
241
  _: 2
239
242
  }, 1032, ["name", "title", "onUpdate:isValid", "onUpdate:hasChanges"])
240
243
  ]),
241
244
  _: 2
242
- }, 1032, ["active", "onUpdate:active"]);
245
+ }, 1032, ["active", "removable", "onUpdate:active"]);
243
246
  }), 128))
244
247
  ]),
245
248
  _: 1
246
249
  }, 8, ["enter-from-class", "leave-to-class"])
247
- ], 4)
250
+ ], 4)) : createCommentVNode("", true)
248
251
  ], 2);
249
252
  };
250
253
  }
@@ -18,10 +18,14 @@ declare const __VLS_component: import('vue').DefineComponent<{
18
18
  title: string;
19
19
  name: string;
20
20
  icon?: SVGComponent;
21
+ disabled?: boolean;
22
+ removable?: boolean;
21
23
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
22
24
  title: string;
23
25
  name: string;
24
26
  icon?: SVGComponent;
27
+ disabled?: boolean;
28
+ removable?: boolean;
25
29
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
31
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WTabsItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsItem.vue"],"names":[],"mappings":"AAuCA,iBAAS,cAAc;;kBAVX,MAAM,IAAI;gBACZ,MAAM,IAAI;iBACT,MAAM,IAAI;gBACX,MAAM,IAAI;;kBAHR,MAAM,IAAI;gBACZ,MAAM,IAAI;iBACT,MAAM,IAAI;gBACX,MAAM,IAAI;;;WAsCN,OAAO,IAA6B;EAEjD;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WA3DZ,MAAM;UACP,MAAM;WACL,YAAY;;WAFZ,MAAM;UACP,MAAM;WACL,YAAY;iGA+DnB,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":"WTabsItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsItem.vue"],"names":[],"mappings":"AA2CA,iBAAS,cAAc;;kBAVX,MAAM,IAAI;gBACZ,MAAM,IAAI;iBACT,MAAM,IAAI;gBACX,MAAM,IAAI;;kBAHR,MAAM,IAAI;gBACZ,MAAM,IAAI;iBACT,MAAM,IAAI;gBACX,MAAM,IAAI;;;WAsCN,OAAO,IAA6B;EAEjD;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WA7DZ,MAAM;UACP,MAAM;WACL,YAAY;eACR,OAAO;gBACN,OAAO;;WAJZ,MAAM;UACP,MAAM;WACL,YAAY;eACR,OAAO;gBACN,OAAO;iGA+DnB,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"}
@@ -5,7 +5,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  props: {
6
6
  title: {},
7
7
  name: {},
8
- icon: {}
8
+ icon: {},
9
+ disabled: { type: Boolean },
10
+ removable: { type: Boolean }
9
11
  },
10
12
  setup(__props) {
11
13
  return (_ctx, _cache) => {