@mekari/pixel3-tabs 0.0.0
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.
- package/dist/chunk-5R2IYROF.mjs +43 -0
- package/dist/chunk-BCRB3ASV.mjs +29 -0
- package/dist/chunk-DKZ3Z2UI.mjs +61 -0
- package/dist/chunk-JEXLKDPT.mjs +38 -0
- package/dist/chunk-JQQ5YTMJ.mjs +31 -0
- package/dist/chunk-LAMJMXQC.mjs +56 -0
- package/dist/chunk-QVDBBOCQ.mjs +146 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/chunk-S5AGDSR2.mjs +8 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +379 -0
- package/dist/index.mjs +26 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/tabs.context.d.mts +12 -0
- package/dist/modules/tabs.context.d.ts +12 -0
- package/dist/modules/tabs.context.js +33 -0
- package/dist/modules/tabs.context.mjs +9 -0
- package/dist/modules/tabs.hooks.d.mts +56 -0
- package/dist/modules/tabs.hooks.d.ts +56 -0
- package/dist/modules/tabs.hooks.js +174 -0
- package/dist/modules/tabs.hooks.mjs +16 -0
- package/dist/modules/tabs.props.d.mts +62 -0
- package/dist/modules/tabs.props.d.ts +62 -0
- package/dist/modules/tabs.props.js +88 -0
- package/dist/modules/tabs.props.mjs +13 -0
- package/dist/tab-list.d.mts +5 -0
- package/dist/tab-list.d.ts +5 -0
- package/dist/tab-list.js +114 -0
- package/dist/tab-list.mjs +9 -0
- package/dist/tab-panel.d.mts +29 -0
- package/dist/tab-panel.d.ts +29 -0
- package/dist/tab-panel.js +89 -0
- package/dist/tab-panel.mjs +10 -0
- package/dist/tab-panels.d.mts +5 -0
- package/dist/tab-panels.d.ts +5 -0
- package/dist/tab-panels.js +81 -0
- package/dist/tab-panels.mjs +9 -0
- package/dist/tab.d.mts +29 -0
- package/dist/tab.d.ts +29 -0
- package/dist/tab.js +134 -0
- package/dist/tab.mjs +10 -0
- package/dist/tabs.d.mts +56 -0
- package/dist/tabs.d.ts +56 -0
- package/dist/tabs.js +123 -0
- package/dist/tabs.mjs +10 -0
- package/package.json +41 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.tsx
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
MpTab: () => MpTab,
|
|
25
|
+
MpTabList: () => MpTabList,
|
|
26
|
+
MpTabPanel: () => MpTabPanel,
|
|
27
|
+
MpTabPanels: () => MpTabPanels,
|
|
28
|
+
MpTabs: () => MpTabs
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(src_exports);
|
|
31
|
+
|
|
32
|
+
// src/tabs.tsx
|
|
33
|
+
var import_vue2 = require("vue");
|
|
34
|
+
var import_vue3 = require("vue");
|
|
35
|
+
var import_vue4 = require("vue");
|
|
36
|
+
|
|
37
|
+
// src/modules/tabs.props.ts
|
|
38
|
+
var tabsProps = {
|
|
39
|
+
modelValue: {
|
|
40
|
+
type: Number
|
|
41
|
+
},
|
|
42
|
+
defaultValue: {
|
|
43
|
+
type: Number,
|
|
44
|
+
default: 0
|
|
45
|
+
},
|
|
46
|
+
id: {
|
|
47
|
+
type: String
|
|
48
|
+
},
|
|
49
|
+
isManual: {
|
|
50
|
+
type: Boolean
|
|
51
|
+
},
|
|
52
|
+
variantColor: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "blue"
|
|
55
|
+
},
|
|
56
|
+
isShowBorder: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: true
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var tabProps = {
|
|
62
|
+
id: {
|
|
63
|
+
type: String
|
|
64
|
+
},
|
|
65
|
+
isSelected: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
value: {
|
|
70
|
+
type: String
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var selectedBorderProps = {
|
|
74
|
+
isSelected: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var tabPanelProps = {
|
|
80
|
+
isSelected: {
|
|
81
|
+
type: Boolean
|
|
82
|
+
},
|
|
83
|
+
value: {
|
|
84
|
+
type: String
|
|
85
|
+
},
|
|
86
|
+
isKeepAlive: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: true
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// src/modules/tabs.hooks.ts
|
|
93
|
+
var import_vue = require("vue");
|
|
94
|
+
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
95
|
+
var import_recipes = require("@mekari/pixel3-styled-system/recipes");
|
|
96
|
+
var import_pixel3_utils2 = require("@mekari/pixel3-utils");
|
|
97
|
+
|
|
98
|
+
// src/modules/tabs.context.ts
|
|
99
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
100
|
+
var [TabsProvider, useTabsContext] = (0, import_pixel3_utils.usePixelCreateContext)("TabsContext");
|
|
101
|
+
|
|
102
|
+
// src/modules/tabs.hooks.ts
|
|
103
|
+
function useTabs(props, emit) {
|
|
104
|
+
const selectedTab = (0, import_vue.ref)(props.defaultValue);
|
|
105
|
+
const selected = props.isManual ? (0, import_vue.computed)(() => props.modelValue) : selectedTab;
|
|
106
|
+
const id = (0, import_vue.computed)(() => props.id || `tabs-${(0, import_pixel3_utils2.useId)(4)}`);
|
|
107
|
+
const rootAttrs = (0, import_vue.computed)(() => {
|
|
108
|
+
return {
|
|
109
|
+
"data-pixel-component": "MpTabs",
|
|
110
|
+
id: id.value
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
function onChangeTab(value) {
|
|
114
|
+
if (!props.isManual) {
|
|
115
|
+
selectedTab.value = value;
|
|
116
|
+
}
|
|
117
|
+
emit("change", value);
|
|
118
|
+
emit("update:modelValue", value);
|
|
119
|
+
}
|
|
120
|
+
__name(onChangeTab, "onChangeTab");
|
|
121
|
+
return {
|
|
122
|
+
selectedTab: selected,
|
|
123
|
+
onChangeTab,
|
|
124
|
+
rootAttrs,
|
|
125
|
+
id
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
__name(useTabs, "useTabs");
|
|
129
|
+
function useTabList() {
|
|
130
|
+
const {
|
|
131
|
+
rootProps,
|
|
132
|
+
onChangeTab,
|
|
133
|
+
selectedTab,
|
|
134
|
+
id
|
|
135
|
+
} = useTabsContext();
|
|
136
|
+
const {
|
|
137
|
+
isShowBorder
|
|
138
|
+
} = rootProps;
|
|
139
|
+
const rootAttrs = (0, import_vue.reactive)({
|
|
140
|
+
"data-border": isShowBorder.value,
|
|
141
|
+
class: (0, import_css.css)({
|
|
142
|
+
position: "relative",
|
|
143
|
+
"&[data-border=true]": {
|
|
144
|
+
_before: {
|
|
145
|
+
content: '""',
|
|
146
|
+
height: "1px",
|
|
147
|
+
background: "gray.100",
|
|
148
|
+
position: "absolute",
|
|
149
|
+
right: 0,
|
|
150
|
+
left: 0,
|
|
151
|
+
bottom: "1px"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
const tabListAttrs = (0, import_vue.reactive)({
|
|
157
|
+
"data-pixel-component": "MpTabList",
|
|
158
|
+
class: (0, import_recipes.tabListRecipe)()
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
tabsProps: rootProps,
|
|
162
|
+
onChangeTab,
|
|
163
|
+
selectedTab,
|
|
164
|
+
rootAttrs,
|
|
165
|
+
tabListAttrs,
|
|
166
|
+
tabsId: id
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
__name(useTabList, "useTabList");
|
|
170
|
+
function useTab(props, attrs) {
|
|
171
|
+
const {
|
|
172
|
+
rootProps,
|
|
173
|
+
id: tabsId
|
|
174
|
+
} = useTabsContext();
|
|
175
|
+
const {
|
|
176
|
+
variantColor
|
|
177
|
+
} = rootProps;
|
|
178
|
+
const rootAttrs = (0, import_vue.computed)(() => {
|
|
179
|
+
return {
|
|
180
|
+
role: "tab",
|
|
181
|
+
"data-pixel-component": "MpTab",
|
|
182
|
+
class: ["group", (0, import_recipes.tabRecipe)({
|
|
183
|
+
isSelected: props.isSelected,
|
|
184
|
+
variantColor: (0, import_vue.unref)(variantColor)
|
|
185
|
+
})],
|
|
186
|
+
id: props.id || `tab:${tabsId.value}-${attrs.index}`
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
const tabSelectedBorderAttrs = (0, import_vue.computed)(() => {
|
|
190
|
+
return {
|
|
191
|
+
isSelected: props.isSelected
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
return {
|
|
195
|
+
rootAttrs,
|
|
196
|
+
tabSelectedBorderAttrs
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
__name(useTab, "useTab");
|
|
200
|
+
function useTabPanels() {
|
|
201
|
+
const {
|
|
202
|
+
selectedTab
|
|
203
|
+
} = useTabsContext();
|
|
204
|
+
const rootAttrs = (0, import_vue.computed)(() => {
|
|
205
|
+
return {
|
|
206
|
+
"data-pixel-component": "MpTabPanels"
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
return {
|
|
210
|
+
rootAttrs,
|
|
211
|
+
selectedTab
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
__name(useTabPanels, "useTabPanels");
|
|
215
|
+
function useTabPanel(props) {
|
|
216
|
+
const rootAttrs = (0, import_vue.computed)(() => {
|
|
217
|
+
return {
|
|
218
|
+
"data-pixel-component": "MpTabPanel",
|
|
219
|
+
style: {
|
|
220
|
+
display: props.isKeepAlive ? props.isSelected ? "unset" : "none" : ""
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
return {
|
|
225
|
+
rootAttrs
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
__name(useTabPanel, "useTabPanel");
|
|
229
|
+
|
|
230
|
+
// src/tabs.tsx
|
|
231
|
+
var MpTabs = (0, import_vue3.defineComponent)({
|
|
232
|
+
name: "MpTabs",
|
|
233
|
+
props: tabsProps,
|
|
234
|
+
emits: ["change", "update:modelValue"],
|
|
235
|
+
setup(props, {
|
|
236
|
+
slots,
|
|
237
|
+
emit
|
|
238
|
+
}) {
|
|
239
|
+
const {
|
|
240
|
+
rootAttrs,
|
|
241
|
+
selectedTab,
|
|
242
|
+
onChangeTab,
|
|
243
|
+
id
|
|
244
|
+
} = useTabs(props, emit);
|
|
245
|
+
TabsProvider({
|
|
246
|
+
selectedTab,
|
|
247
|
+
onChangeTab,
|
|
248
|
+
rootProps: (0, import_vue4.toRefs)(props),
|
|
249
|
+
id
|
|
250
|
+
});
|
|
251
|
+
return () => {
|
|
252
|
+
return (0, import_vue2.createVNode)("div", rootAttrs.value, [slots.default()]);
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// src/tab-list.tsx
|
|
258
|
+
var import_vue5 = require("vue");
|
|
259
|
+
var import_vue6 = require("vue");
|
|
260
|
+
var MpTabList = (0, import_vue6.defineComponent)({
|
|
261
|
+
name: "MpTabList",
|
|
262
|
+
setup(props, {
|
|
263
|
+
slots
|
|
264
|
+
}) {
|
|
265
|
+
const {
|
|
266
|
+
rootAttrs,
|
|
267
|
+
tabListAttrs,
|
|
268
|
+
onChangeTab,
|
|
269
|
+
selectedTab
|
|
270
|
+
} = useTabList();
|
|
271
|
+
return () => {
|
|
272
|
+
const clones = slots.default().map((vnode, index) => {
|
|
273
|
+
const clone = (0, import_vue6.cloneVNode)(vnode, {
|
|
274
|
+
isSelected: selectedTab.value === index,
|
|
275
|
+
index,
|
|
276
|
+
"aria-selected": selectedTab.value === index,
|
|
277
|
+
onClick: () => {
|
|
278
|
+
onChangeTab(index);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
return clone;
|
|
282
|
+
});
|
|
283
|
+
return (0, import_vue5.createVNode)("div", rootAttrs, [(0, import_vue5.createVNode)("div", tabListAttrs, [clones])]);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// src/tab.tsx
|
|
289
|
+
var import_vue7 = require("vue");
|
|
290
|
+
var import_vue8 = require("vue");
|
|
291
|
+
var import_recipes2 = require("@mekari/pixel3-styled-system/recipes");
|
|
292
|
+
var MpTab = (0, import_vue8.defineComponent)({
|
|
293
|
+
name: "MpTab",
|
|
294
|
+
props: tabProps,
|
|
295
|
+
setup(props, {
|
|
296
|
+
slots,
|
|
297
|
+
attrs
|
|
298
|
+
}) {
|
|
299
|
+
const {
|
|
300
|
+
rootAttrs,
|
|
301
|
+
tabSelectedBorderAttrs
|
|
302
|
+
} = useTab(props, attrs);
|
|
303
|
+
return () => {
|
|
304
|
+
return (0, import_vue7.createVNode)("button", rootAttrs.value, [slots.default(), (0, import_vue7.createVNode)(MpTabSelectedBorder, tabSelectedBorderAttrs.value, null)]);
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
var MpTabSelectedBorder = (0, import_vue8.defineComponent)({
|
|
309
|
+
name: "MpTabSelectedBorder",
|
|
310
|
+
props: selectedBorderProps,
|
|
311
|
+
setup(props) {
|
|
312
|
+
const {
|
|
313
|
+
rootProps
|
|
314
|
+
} = useTabsContext();
|
|
315
|
+
const {
|
|
316
|
+
variantColor
|
|
317
|
+
} = rootProps;
|
|
318
|
+
return () => {
|
|
319
|
+
return (0, import_vue7.createVNode)("div", {
|
|
320
|
+
"class": (0, import_recipes2.selectedBorderRecipe)({
|
|
321
|
+
isSelected: props.isSelected,
|
|
322
|
+
variantColor: (0, import_vue8.unref)(variantColor)
|
|
323
|
+
}),
|
|
324
|
+
"data-pixel-component": "MpTabSelectedBorder"
|
|
325
|
+
}, null);
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// src/tab-panels.tsx
|
|
331
|
+
var import_vue9 = require("vue");
|
|
332
|
+
var import_vue10 = require("vue");
|
|
333
|
+
var MpTabPanels = (0, import_vue10.defineComponent)({
|
|
334
|
+
name: "MpTabPanels",
|
|
335
|
+
setup(props, {
|
|
336
|
+
slots
|
|
337
|
+
}) {
|
|
338
|
+
const {
|
|
339
|
+
rootAttrs,
|
|
340
|
+
selectedTab
|
|
341
|
+
} = useTabPanels();
|
|
342
|
+
return () => {
|
|
343
|
+
const clones = slots.default().map((vnode, index) => {
|
|
344
|
+
const clone = (0, import_vue10.cloneVNode)(vnode, {
|
|
345
|
+
isSelected: selectedTab.value === index
|
|
346
|
+
});
|
|
347
|
+
return clone;
|
|
348
|
+
});
|
|
349
|
+
return (0, import_vue9.createVNode)("div", rootAttrs.value, [clones]);
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
// src/tab-panel.tsx
|
|
355
|
+
var import_vue11 = require("vue");
|
|
356
|
+
var import_vue12 = require("vue");
|
|
357
|
+
var MpTabPanel = (0, import_vue12.defineComponent)({
|
|
358
|
+
name: "MpTabPanel",
|
|
359
|
+
props: tabPanelProps,
|
|
360
|
+
setup(props, {
|
|
361
|
+
slots
|
|
362
|
+
}) {
|
|
363
|
+
const {
|
|
364
|
+
rootAttrs
|
|
365
|
+
} = useTabPanel(props);
|
|
366
|
+
return () => {
|
|
367
|
+
const renderNode = (0, import_vue11.createVNode)("div", rootAttrs.value, [(0, import_vue11.createTextVNode)(" "), slots.default(), (0, import_vue11.createTextVNode)(" ")]);
|
|
368
|
+
return props.isKeepAlive ? renderNode : props.isSelected ? renderNode : null;
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
373
|
+
0 && (module.exports = {
|
|
374
|
+
MpTab,
|
|
375
|
+
MpTabList,
|
|
376
|
+
MpTabPanel,
|
|
377
|
+
MpTabPanels,
|
|
378
|
+
MpTabs
|
|
379
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MpTabList
|
|
3
|
+
} from "./chunk-JEXLKDPT.mjs";
|
|
4
|
+
import {
|
|
5
|
+
MpTabPanel
|
|
6
|
+
} from "./chunk-BCRB3ASV.mjs";
|
|
7
|
+
import {
|
|
8
|
+
MpTabPanels
|
|
9
|
+
} from "./chunk-JQQ5YTMJ.mjs";
|
|
10
|
+
import {
|
|
11
|
+
MpTab
|
|
12
|
+
} from "./chunk-LAMJMXQC.mjs";
|
|
13
|
+
import {
|
|
14
|
+
MpTabs
|
|
15
|
+
} from "./chunk-5R2IYROF.mjs";
|
|
16
|
+
import "./chunk-DKZ3Z2UI.mjs";
|
|
17
|
+
import "./chunk-QVDBBOCQ.mjs";
|
|
18
|
+
import "./chunk-S5AGDSR2.mjs";
|
|
19
|
+
import "./chunk-QZ7VFGWC.mjs";
|
|
20
|
+
export {
|
|
21
|
+
MpTab,
|
|
22
|
+
MpTabList,
|
|
23
|
+
MpTabPanel,
|
|
24
|
+
MpTabPanels,
|
|
25
|
+
MpTabs
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/tabs.props.ts":{"bytes":1609,"imports":[],"format":"esm"},"src/modules/tabs.context.ts":{"bytes":559,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/modules/tabs.hooks.ts":{"bytes":3111,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"src/modules/tabs.context.ts","kind":"import-statement","original":"./tabs.context"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/tabs.tsx":{"bytes":838,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.props.ts","kind":"import-statement","original":"./modules/tabs.props"},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"},{"path":"src/modules/tabs.context.ts","kind":"import-statement","original":"./modules/tabs.context"}],"format":"esm"},"src/tab-list.tsx":{"bytes":919,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"}],"format":"esm"},"src/tab.tsx":{"bytes":1322,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/tabs.props.ts","kind":"import-statement","original":"./modules/tabs.props"},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"},{"path":"src/modules/tabs.context.ts","kind":"import-statement","original":"./modules/tabs.context"}],"format":"esm"},"src/tab-panels.tsx":{"bytes":705,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"}],"format":"esm"},"src/tab-panel.tsx":{"bytes":744,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"},{"path":"src/modules/tabs.props.ts","kind":"import-statement","original":"./modules/tabs.props"}],"format":"esm"},"src/index.tsx":{"bytes":218,"imports":[{"path":"src/tabs.tsx","kind":"import-statement","original":"./tabs"},{"path":"src/tab-list.tsx","kind":"import-statement","original":"./tab-list"},{"path":"src/tab.tsx","kind":"import-statement","original":"./tab"},{"path":"src/tab-panels.tsx","kind":"import-statement","original":"./tab-panels"},{"path":"src/tab-panel.tsx","kind":"import-statement","original":"./tab-panel"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.tsx","inputs":{"src/index.tsx":{"bytesInOutput":235},"src/tabs.tsx":{"bytesInOutput":623},"src/modules/tabs.props.ts":{"bytesInOutput":687},"src/modules/tabs.hooks.ts":{"bytesInOutput":3166},"src/modules/tabs.context.ts":{"bytesInOutput":159},"src/tab-list.tsx":{"bytesInOutput":799},"src/tab.tsx":{"bytesInOutput":1137},"src/tab-panels.tsx":{"bytesInOutput":577},"src/tab-panel.tsx":{"bytesInOutput":556}},"bytes":9235},"dist/tab-list.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/tab-list.tsx","inputs":{"src/tab-list.tsx":{"bytesInOutput":937},"src/modules/tabs.hooks.ts":{"bytesInOutput":1094},"src/modules/tabs.context.ts":{"bytesInOutput":159}},"bytes":3316},"dist/tab-panel.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/tab-panel.tsx","inputs":{"src/tab-panel.tsx":{"bytesInOutput":693},"src/modules/tabs.hooks.ts":{"bytesInOutput":547},"src/modules/tabs.context.ts":{"bytesInOutput":159},"src/modules/tabs.props.ts":{"bytesInOutput":155}},"bytes":2713},"dist/tab-panels.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/tab-panels.tsx","inputs":{"src/tab-panels.tsx":{"bytesInOutput":722},"src/modules/tabs.hooks.ts":{"bytesInOutput":511},"src/modules/tabs.context.ts":{"bytesInOutput":159}},"bytes":2524},"dist/tab.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/tab.tsx","inputs":{"src/tab.tsx":{"bytesInOutput":1252},"src/modules/tabs.props.ts":{"bytesInOutput":230},"src/modules/tabs.hooks.ts":{"bytesInOutput":936},"src/modules/tabs.context.ts":{"bytesInOutput":159}},"bytes":3719},"dist/tabs.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/tabs.tsx","inputs":{"src/tabs.tsx":{"bytesInOutput":743},"src/modules/tabs.props.ts":{"bytesInOutput":302},"src/modules/tabs.hooks.ts":{"bytesInOutput":978},"src/modules/tabs.context.ts":{"bytesInOutput":159}},"bytes":3327},"dist/modules/tabs.context.js":{"imports":[{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/tabs.context.ts","inputs":{"src/modules/tabs.context.ts":{"bytesInOutput":355}},"bytes":1310},"dist/modules/tabs.hooks.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/tabs.hooks.ts","inputs":{"src/modules/tabs.hooks.ts":{"bytesInOutput":3432},"src/modules/tabs.context.ts":{"bytesInOutput":159}},"bytes":4728},"dist/modules/tabs.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/tabs.props.ts","inputs":{"src/modules/tabs.props.ts":{"bytesInOutput":947}},"bytes":1931}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/tabs.props.ts":{"bytes":1609,"imports":[],"format":"esm"},"src/modules/tabs.context.ts":{"bytes":559,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/modules/tabs.hooks.ts":{"bytes":3111,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"src/modules/tabs.context.ts","kind":"import-statement","original":"./tabs.context"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/tabs.tsx":{"bytes":838,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.props.ts","kind":"import-statement","original":"./modules/tabs.props"},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"},{"path":"src/modules/tabs.context.ts","kind":"import-statement","original":"./modules/tabs.context"}],"format":"esm"},"src/tab-list.tsx":{"bytes":919,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"}],"format":"esm"},"src/tab.tsx":{"bytes":1322,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/tabs.props.ts","kind":"import-statement","original":"./modules/tabs.props"},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"},{"path":"src/modules/tabs.context.ts","kind":"import-statement","original":"./modules/tabs.context"}],"format":"esm"},"src/tab-panels.tsx":{"bytes":705,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"}],"format":"esm"},"src/tab-panel.tsx":{"bytes":744,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/tabs.hooks.ts","kind":"import-statement","original":"./modules/tabs.hooks"},{"path":"src/modules/tabs.props.ts","kind":"import-statement","original":"./modules/tabs.props"}],"format":"esm"},"src/index.tsx":{"bytes":218,"imports":[{"path":"src/tabs.tsx","kind":"import-statement","original":"./tabs"},{"path":"src/tab-list.tsx","kind":"import-statement","original":"./tab-list"},{"path":"src/tab.tsx","kind":"import-statement","original":"./tab"},{"path":"src/tab-panels.tsx","kind":"import-statement","original":"./tab-panels"},{"path":"src/tab-panel.tsx","kind":"import-statement","original":"./tab-panel"}],"format":"esm"}},"outputs":{"dist/modules/tabs.props.mjs":{"imports":[{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["selectedBorderProps","tabPanelProps","tabProps","tabsProps"],"entryPoint":"src/modules/tabs.props.ts","inputs":{},"bytes":213},"dist/index.mjs":{"imports":[{"path":"dist/chunk-JEXLKDPT.mjs","kind":"import-statement"},{"path":"dist/chunk-BCRB3ASV.mjs","kind":"import-statement"},{"path":"dist/chunk-JQQ5YTMJ.mjs","kind":"import-statement"},{"path":"dist/chunk-LAMJMXQC.mjs","kind":"import-statement"},{"path":"dist/chunk-5R2IYROF.mjs","kind":"import-statement"},{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTab","MpTabList","MpTabPanel","MpTabPanels","MpTabs"],"entryPoint":"src/index.tsx","inputs":{"src/index.tsx":{"bytesInOutput":0}},"bytes":452},"dist/tab-list.mjs":{"imports":[{"path":"dist/chunk-JEXLKDPT.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTabList"],"entryPoint":"src/tab-list.tsx","inputs":{},"bytes":169},"dist/chunk-JEXLKDPT.mjs":{"imports":[{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true}],"exports":["MpTabList"],"inputs":{"src/tab-list.tsx":{"bytesInOutput":767}},"bytes":866},"dist/tab-panel.mjs":{"imports":[{"path":"dist/chunk-BCRB3ASV.mjs","kind":"import-statement"},{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTabPanel"],"entryPoint":"src/tab-panel.tsx","inputs":{},"bytes":202},"dist/chunk-BCRB3ASV.mjs":{"imports":[{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true}],"exports":["MpTabPanel"],"inputs":{"src/tab-panel.tsx":{"bytesInOutput":544}},"bytes":702},"dist/tab-panels.mjs":{"imports":[{"path":"dist/chunk-JQQ5YTMJ.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTabPanels"],"entryPoint":"src/tab-panels.tsx","inputs":{},"bytes":173},"dist/chunk-JQQ5YTMJ.mjs":{"imports":[{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true}],"exports":["MpTabPanels"],"inputs":{"src/tab-panels.tsx":{"bytesInOutput":558}},"bytes":663},"dist/tab.mjs":{"imports":[{"path":"dist/chunk-LAMJMXQC.mjs","kind":"import-statement"},{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTab"],"entryPoint":"src/tab.tsx","inputs":{},"bytes":192},"dist/chunk-LAMJMXQC.mjs":{"imports":[{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["MpTab"],"inputs":{"src/tab.tsx":{"bytesInOutput":1052}},"bytes":1269},"dist/tabs.mjs":{"imports":[{"path":"dist/chunk-5R2IYROF.mjs","kind":"import-statement"},{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpTabs"],"entryPoint":"src/tabs.tsx","inputs":{},"bytes":194},"dist/chunk-5R2IYROF.mjs":{"imports":[{"path":"dist/chunk-DKZ3Z2UI.mjs","kind":"import-statement"},{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true}],"exports":["MpTabs"],"inputs":{"src/tabs.tsx":{"bytesInOutput":591}},"bytes":787},"dist/chunk-DKZ3Z2UI.mjs":{"imports":[],"exports":["selectedBorderProps","tabPanelProps","tabProps","tabsProps"],"inputs":{"src/modules/tabs.props.ts":{"bytesInOutput":687}},"bytes":793},"dist/modules/tabs.context.mjs":{"imports":[{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["TabsProvider","useTabsContext"],"entryPoint":"src/modules/tabs.context.ts","inputs":{},"bytes":151},"dist/modules/tabs.hooks.mjs":{"imports":[{"path":"dist/chunk-QVDBBOCQ.mjs","kind":"import-statement"},{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["useTab","useTabList","useTabPanel","useTabPanels","useTabs"],"entryPoint":"src/modules/tabs.hooks.ts","inputs":{},"bytes":247},"dist/chunk-QVDBBOCQ.mjs":{"imports":[{"path":"dist/chunk-S5AGDSR2.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["useTab","useTabList","useTabPanel","useTabPanels","useTabs"],"inputs":{"src/modules/tabs.hooks.ts":{"bytesInOutput":2920}},"bytes":3134},"dist/chunk-S5AGDSR2.mjs":{"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["TabsProvider","useTabsContext"],"inputs":{"src/modules/tabs.context.ts":{"bytesInOutput":137}},"bytes":214},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151}}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseTabsReturn } from './tabs.hooks.mjs';
|
|
2
|
+
import { ToRefs } from 'vue';
|
|
3
|
+
import { TabsProps } from './tabs.props.mjs';
|
|
4
|
+
|
|
5
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
6
|
+
interface UseTabsContext extends UseTabsReturn {
|
|
7
|
+
rootProps: ToRefs<TabsProps>;
|
|
8
|
+
}
|
|
9
|
+
declare const TabsProvider: (opts: PartialBy<UseTabsContext, "rootAttrs">) => void;
|
|
10
|
+
declare const useTabsContext: (fallback?: PartialBy<UseTabsContext, "rootAttrs"> | undefined) => PartialBy<UseTabsContext, "rootAttrs">;
|
|
11
|
+
|
|
12
|
+
export { TabsProvider, useTabsContext };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseTabsReturn } from './tabs.hooks.js';
|
|
2
|
+
import { ToRefs } from 'vue';
|
|
3
|
+
import { TabsProps } from './tabs.props.js';
|
|
4
|
+
|
|
5
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
6
|
+
interface UseTabsContext extends UseTabsReturn {
|
|
7
|
+
rootProps: ToRefs<TabsProps>;
|
|
8
|
+
}
|
|
9
|
+
declare const TabsProvider: (opts: PartialBy<UseTabsContext, "rootAttrs">) => void;
|
|
10
|
+
declare const useTabsContext: (fallback?: PartialBy<UseTabsContext, "rootAttrs"> | undefined) => PartialBy<UseTabsContext, "rootAttrs">;
|
|
11
|
+
|
|
12
|
+
export { TabsProvider, useTabsContext };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/modules/tabs.context.ts
|
|
21
|
+
var tabs_context_exports = {};
|
|
22
|
+
__export(tabs_context_exports, {
|
|
23
|
+
TabsProvider: () => TabsProvider,
|
|
24
|
+
useTabsContext: () => useTabsContext
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(tabs_context_exports);
|
|
27
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
28
|
+
var [TabsProvider, useTabsContext] = (0, import_pixel3_utils.usePixelCreateContext)("TabsContext");
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
TabsProvider,
|
|
32
|
+
useTabsContext
|
|
33
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { TabsProps, TabsEmits, TabProps, TabPanelProps } from './tabs.props.mjs';
|
|
3
|
+
|
|
4
|
+
declare function useTabs(props: TabsProps, emit: TabsEmits): {
|
|
5
|
+
selectedTab: vue.Ref<number> | vue.ComputedRef<number | undefined>;
|
|
6
|
+
onChangeTab: (value: number) => void;
|
|
7
|
+
rootAttrs: vue.ComputedRef<{
|
|
8
|
+
'data-pixel-component': string;
|
|
9
|
+
id: string;
|
|
10
|
+
}>;
|
|
11
|
+
id: vue.ComputedRef<string>;
|
|
12
|
+
};
|
|
13
|
+
declare function useTabList(): {
|
|
14
|
+
tabsProps: vue.ToRefs<TabsProps>;
|
|
15
|
+
onChangeTab: (value: number) => void;
|
|
16
|
+
selectedTab: vue.Ref<number> | vue.ComputedRef<number | undefined>;
|
|
17
|
+
rootAttrs: {
|
|
18
|
+
'data-border': boolean;
|
|
19
|
+
class: string;
|
|
20
|
+
};
|
|
21
|
+
tabListAttrs: {
|
|
22
|
+
'data-pixel-component': string;
|
|
23
|
+
class: string;
|
|
24
|
+
};
|
|
25
|
+
tabsId: vue.ComputedRef<string>;
|
|
26
|
+
};
|
|
27
|
+
declare function useTab(props: TabProps, attrs: {
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
}): {
|
|
30
|
+
rootAttrs: vue.ComputedRef<{
|
|
31
|
+
role: string;
|
|
32
|
+
'data-pixel-component': string;
|
|
33
|
+
class: string[];
|
|
34
|
+
id: string;
|
|
35
|
+
}>;
|
|
36
|
+
tabSelectedBorderAttrs: vue.ComputedRef<{
|
|
37
|
+
isSelected: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
};
|
|
40
|
+
declare function useTabPanels(): {
|
|
41
|
+
rootAttrs: vue.ComputedRef<{
|
|
42
|
+
'data-pixel-component': string;
|
|
43
|
+
}>;
|
|
44
|
+
selectedTab: vue.Ref<number> | vue.ComputedRef<number | undefined>;
|
|
45
|
+
};
|
|
46
|
+
declare function useTabPanel(props: TabPanelProps): {
|
|
47
|
+
rootAttrs: vue.ComputedRef<{
|
|
48
|
+
'data-pixel-component': string;
|
|
49
|
+
style: {
|
|
50
|
+
display: string;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
type UseTabsReturn = ReturnType<typeof useTabs>;
|
|
55
|
+
|
|
56
|
+
export { UseTabsReturn, useTab, useTabList, useTabPanel, useTabPanels, useTabs };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { TabsProps, TabsEmits, TabProps, TabPanelProps } from './tabs.props.js';
|
|
3
|
+
|
|
4
|
+
declare function useTabs(props: TabsProps, emit: TabsEmits): {
|
|
5
|
+
selectedTab: vue.Ref<number> | vue.ComputedRef<number | undefined>;
|
|
6
|
+
onChangeTab: (value: number) => void;
|
|
7
|
+
rootAttrs: vue.ComputedRef<{
|
|
8
|
+
'data-pixel-component': string;
|
|
9
|
+
id: string;
|
|
10
|
+
}>;
|
|
11
|
+
id: vue.ComputedRef<string>;
|
|
12
|
+
};
|
|
13
|
+
declare function useTabList(): {
|
|
14
|
+
tabsProps: vue.ToRefs<TabsProps>;
|
|
15
|
+
onChangeTab: (value: number) => void;
|
|
16
|
+
selectedTab: vue.Ref<number> | vue.ComputedRef<number | undefined>;
|
|
17
|
+
rootAttrs: {
|
|
18
|
+
'data-border': boolean;
|
|
19
|
+
class: string;
|
|
20
|
+
};
|
|
21
|
+
tabListAttrs: {
|
|
22
|
+
'data-pixel-component': string;
|
|
23
|
+
class: string;
|
|
24
|
+
};
|
|
25
|
+
tabsId: vue.ComputedRef<string>;
|
|
26
|
+
};
|
|
27
|
+
declare function useTab(props: TabProps, attrs: {
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
}): {
|
|
30
|
+
rootAttrs: vue.ComputedRef<{
|
|
31
|
+
role: string;
|
|
32
|
+
'data-pixel-component': string;
|
|
33
|
+
class: string[];
|
|
34
|
+
id: string;
|
|
35
|
+
}>;
|
|
36
|
+
tabSelectedBorderAttrs: vue.ComputedRef<{
|
|
37
|
+
isSelected: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
};
|
|
40
|
+
declare function useTabPanels(): {
|
|
41
|
+
rootAttrs: vue.ComputedRef<{
|
|
42
|
+
'data-pixel-component': string;
|
|
43
|
+
}>;
|
|
44
|
+
selectedTab: vue.Ref<number> | vue.ComputedRef<number | undefined>;
|
|
45
|
+
};
|
|
46
|
+
declare function useTabPanel(props: TabPanelProps): {
|
|
47
|
+
rootAttrs: vue.ComputedRef<{
|
|
48
|
+
'data-pixel-component': string;
|
|
49
|
+
style: {
|
|
50
|
+
display: string;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
type UseTabsReturn = ReturnType<typeof useTabs>;
|
|
55
|
+
|
|
56
|
+
export { UseTabsReturn, useTab, useTabList, useTabPanel, useTabPanels, useTabs };
|