@duskmoon-dev/el-tabs 0.4.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/cjs/index.js +498 -0
- package/dist/cjs/index.js.map +11 -0
- package/dist/cjs/register.js +501 -0
- package/dist/cjs/register.js.map +12 -0
- package/dist/esm/index.js +466 -0
- package/dist/esm/index.js.map +11 -0
- package/dist/esm/register.js +463 -0
- package/dist/esm/register.js.map +12 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/el-dm-tabs.d.ts +106 -0
- package/dist/types/el-dm-tabs.d.ts.map +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/register.d.ts +2 -0
- package/dist/types/register.d.ts.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
6
|
+
var __toCommonJS = (from) => {
|
|
7
|
+
var entry = __moduleCache.get(from), desc;
|
|
8
|
+
if (entry)
|
|
9
|
+
return entry;
|
|
10
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
}));
|
|
16
|
+
__moduleCache.set(from, entry);
|
|
17
|
+
return entry;
|
|
18
|
+
};
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/index.ts
|
|
30
|
+
var exports_src = {};
|
|
31
|
+
__export(exports_src, {
|
|
32
|
+
register: () => register,
|
|
33
|
+
ElDmTabs: () => ElDmTabs,
|
|
34
|
+
ElDmTabPanel: () => ElDmTabPanel,
|
|
35
|
+
ElDmTab: () => ElDmTab
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(exports_src);
|
|
38
|
+
|
|
39
|
+
// src/el-dm-tabs.ts
|
|
40
|
+
var import_el_core = require("@duskmoon-dev/el-core");
|
|
41
|
+
var styles = import_el_core.css`
|
|
42
|
+
:host {
|
|
43
|
+
display: block;
|
|
44
|
+
font-family: inherit;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host([hidden]) {
|
|
48
|
+
display: none !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([orientation='vertical']) {
|
|
52
|
+
display: flex;
|
|
53
|
+
gap: 1rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.tablist {
|
|
57
|
+
display: flex;
|
|
58
|
+
position: relative;
|
|
59
|
+
gap: 0.25rem;
|
|
60
|
+
border-bottom: 1px solid var(--color-outline);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([variant='pills']) .tablist {
|
|
64
|
+
border-bottom: none;
|
|
65
|
+
gap: 0.5rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([variant='enclosed']) .tablist {
|
|
69
|
+
border-bottom: 1px solid var(--color-outline);
|
|
70
|
+
gap: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([orientation='vertical']) .tablist {
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
border-bottom: none;
|
|
76
|
+
border-right: 1px solid var(--color-outline);
|
|
77
|
+
padding-right: 0.5rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host([orientation='vertical'][variant='pills']) .tablist {
|
|
81
|
+
border-right: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host([orientation='vertical'][variant='enclosed']) .tablist {
|
|
85
|
+
border-right: 1px solid var(--color-outline);
|
|
86
|
+
padding-right: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.indicator {
|
|
90
|
+
position: absolute;
|
|
91
|
+
bottom: -1px;
|
|
92
|
+
height: 2px;
|
|
93
|
+
background-color: var(--color-primary);
|
|
94
|
+
transition:
|
|
95
|
+
left 200ms ease,
|
|
96
|
+
width 200ms ease;
|
|
97
|
+
pointer-events: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host([orientation='vertical']) .indicator {
|
|
101
|
+
right: -1px;
|
|
102
|
+
left: auto;
|
|
103
|
+
bottom: auto;
|
|
104
|
+
width: 2px;
|
|
105
|
+
height: auto;
|
|
106
|
+
transition:
|
|
107
|
+
top 200ms ease,
|
|
108
|
+
height 200ms ease;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:host([variant='pills']) .indicator,
|
|
112
|
+
:host([variant='enclosed']) .indicator {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.panels {
|
|
117
|
+
flex: 1;
|
|
118
|
+
min-width: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
::slotted(el-dm-tab-panel) {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
::slotted(el-dm-tab-panel[active]) {
|
|
126
|
+
display: block;
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
|
|
130
|
+
class ElDmTabs extends import_el_core.BaseElement {
|
|
131
|
+
static properties = {
|
|
132
|
+
value: { type: String, reflect: true },
|
|
133
|
+
variant: { type: String, reflect: true, default: "underline" },
|
|
134
|
+
color: { type: String, reflect: true },
|
|
135
|
+
orientation: { type: String, reflect: true, default: "horizontal" }
|
|
136
|
+
};
|
|
137
|
+
_indicatorStyle = "";
|
|
138
|
+
constructor() {
|
|
139
|
+
super();
|
|
140
|
+
this.attachStyles(styles);
|
|
141
|
+
}
|
|
142
|
+
connectedCallback() {
|
|
143
|
+
super.connectedCallback();
|
|
144
|
+
this.addEventListener("tab-click", this._handleTabClick);
|
|
145
|
+
this.addEventListener("keydown", this._handleKeyDown);
|
|
146
|
+
requestAnimationFrame(() => {
|
|
147
|
+
this._initializeSelection();
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
disconnectedCallback() {
|
|
151
|
+
super.disconnectedCallback();
|
|
152
|
+
this.removeEventListener("tab-click", this._handleTabClick);
|
|
153
|
+
this.removeEventListener("keydown", this._handleKeyDown);
|
|
154
|
+
}
|
|
155
|
+
_initializeSelection() {
|
|
156
|
+
const tabs = this._getTabs();
|
|
157
|
+
if (tabs.length === 0)
|
|
158
|
+
return;
|
|
159
|
+
if (!this.value && tabs.length > 0) {
|
|
160
|
+
const firstTab = tabs[0];
|
|
161
|
+
const tabId = firstTab.getAttribute("tab-id");
|
|
162
|
+
if (tabId) {
|
|
163
|
+
this.value = tabId;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
this._updateSelection();
|
|
167
|
+
}
|
|
168
|
+
_getTabs() {
|
|
169
|
+
return Array.from(this.querySelectorAll("el-dm-tab"));
|
|
170
|
+
}
|
|
171
|
+
_getPanels() {
|
|
172
|
+
return Array.from(this.querySelectorAll("el-dm-tab-panel"));
|
|
173
|
+
}
|
|
174
|
+
_handleTabClick = (event) => {
|
|
175
|
+
const { tabId } = event.detail;
|
|
176
|
+
if (tabId && tabId !== this.value) {
|
|
177
|
+
const oldValue = this.value;
|
|
178
|
+
this.value = tabId;
|
|
179
|
+
this._updateSelection();
|
|
180
|
+
this.emit("change", { value: tabId, oldValue });
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
_handleKeyDown = (event) => {
|
|
184
|
+
const target = event.target;
|
|
185
|
+
if (target.tagName !== "EL-DM-TAB")
|
|
186
|
+
return;
|
|
187
|
+
const tabs = this._getTabs();
|
|
188
|
+
const currentIndex = tabs.indexOf(target);
|
|
189
|
+
if (currentIndex === -1)
|
|
190
|
+
return;
|
|
191
|
+
let nextIndex = -1;
|
|
192
|
+
const isVertical = this.orientation === "vertical";
|
|
193
|
+
switch (event.key) {
|
|
194
|
+
case "ArrowLeft":
|
|
195
|
+
if (!isVertical) {
|
|
196
|
+
nextIndex = currentIndex > 0 ? currentIndex - 1 : tabs.length - 1;
|
|
197
|
+
}
|
|
198
|
+
break;
|
|
199
|
+
case "ArrowRight":
|
|
200
|
+
if (!isVertical) {
|
|
201
|
+
nextIndex = currentIndex < tabs.length - 1 ? currentIndex + 1 : 0;
|
|
202
|
+
}
|
|
203
|
+
break;
|
|
204
|
+
case "ArrowUp":
|
|
205
|
+
if (isVertical) {
|
|
206
|
+
nextIndex = currentIndex > 0 ? currentIndex - 1 : tabs.length - 1;
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
case "ArrowDown":
|
|
210
|
+
if (isVertical) {
|
|
211
|
+
nextIndex = currentIndex < tabs.length - 1 ? currentIndex + 1 : 0;
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "Home":
|
|
215
|
+
nextIndex = 0;
|
|
216
|
+
break;
|
|
217
|
+
case "End":
|
|
218
|
+
nextIndex = tabs.length - 1;
|
|
219
|
+
break;
|
|
220
|
+
default:
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
if (nextIndex !== -1) {
|
|
224
|
+
event.preventDefault();
|
|
225
|
+
const nextTab = tabs[nextIndex];
|
|
226
|
+
nextTab.focus();
|
|
227
|
+
const tabId = nextTab.getAttribute("tab-id");
|
|
228
|
+
if (tabId) {
|
|
229
|
+
const oldValue = this.value;
|
|
230
|
+
this.value = tabId;
|
|
231
|
+
this._updateSelection();
|
|
232
|
+
this.emit("change", { value: tabId, oldValue });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
_updateSelection() {
|
|
237
|
+
const tabs = this._getTabs();
|
|
238
|
+
const panels = this._getPanels();
|
|
239
|
+
tabs.forEach((tab) => {
|
|
240
|
+
const tabId = tab.getAttribute("tab-id");
|
|
241
|
+
const isSelected = tabId === this.value;
|
|
242
|
+
tab.setAttribute("aria-selected", String(isSelected));
|
|
243
|
+
tab.setAttribute("tabindex", isSelected ? "0" : "-1");
|
|
244
|
+
if (isSelected) {
|
|
245
|
+
tab.setAttribute("active", "");
|
|
246
|
+
} else {
|
|
247
|
+
tab.removeAttribute("active");
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
panels.forEach((panel) => {
|
|
251
|
+
const panelFor = panel.getAttribute("panel-for");
|
|
252
|
+
const isActive = panelFor === this.value;
|
|
253
|
+
if (isActive) {
|
|
254
|
+
panel.setAttribute("active", "");
|
|
255
|
+
panel.removeAttribute("hidden");
|
|
256
|
+
} else {
|
|
257
|
+
panel.removeAttribute("active");
|
|
258
|
+
panel.setAttribute("hidden", "");
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
this._updateIndicator();
|
|
262
|
+
}
|
|
263
|
+
_updateIndicator() {
|
|
264
|
+
if (this.variant !== "underline")
|
|
265
|
+
return;
|
|
266
|
+
const activeTab = this.querySelector("el-dm-tab[active]");
|
|
267
|
+
if (!activeTab) {
|
|
268
|
+
this._indicatorStyle = "display: none;";
|
|
269
|
+
this.update();
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
const tablist = this.shadowRoot?.querySelector(".tablist");
|
|
273
|
+
if (!tablist)
|
|
274
|
+
return;
|
|
275
|
+
const tablistRect = tablist.getBoundingClientRect();
|
|
276
|
+
const tabRect = activeTab.getBoundingClientRect();
|
|
277
|
+
if (this.orientation === "vertical") {
|
|
278
|
+
const top = tabRect.top - tablistRect.top;
|
|
279
|
+
this._indicatorStyle = `top: ${top}px; height: ${tabRect.height}px;`;
|
|
280
|
+
} else {
|
|
281
|
+
const left = tabRect.left - tablistRect.left;
|
|
282
|
+
this._indicatorStyle = `left: ${left}px; width: ${tabRect.width}px;`;
|
|
283
|
+
}
|
|
284
|
+
this.update();
|
|
285
|
+
}
|
|
286
|
+
render() {
|
|
287
|
+
const colorStyle = this.color ? `--color-primary: var(--color-${this.color}, ${this.color});` : "";
|
|
288
|
+
return `
|
|
289
|
+
<div
|
|
290
|
+
class="tablist"
|
|
291
|
+
role="tablist"
|
|
292
|
+
part="tablist"
|
|
293
|
+
aria-orientation="${this.orientation || "horizontal"}"
|
|
294
|
+
style="${colorStyle}"
|
|
295
|
+
>
|
|
296
|
+
<slot name="tab"></slot>
|
|
297
|
+
<div class="indicator" part="indicator" style="${this._indicatorStyle}"></div>
|
|
298
|
+
</div>
|
|
299
|
+
<div class="panels">
|
|
300
|
+
<slot></slot>
|
|
301
|
+
</div>
|
|
302
|
+
`;
|
|
303
|
+
}
|
|
304
|
+
update() {
|
|
305
|
+
super.update();
|
|
306
|
+
requestAnimationFrame(() => {
|
|
307
|
+
this._updateIndicator();
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
var tabStyles = import_el_core.css`
|
|
312
|
+
:host {
|
|
313
|
+
display: inline-flex;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
:host([hidden]) {
|
|
317
|
+
display: none !important;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.tab {
|
|
321
|
+
display: inline-flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
gap: 0.5rem;
|
|
324
|
+
padding: 0.75rem 1rem;
|
|
325
|
+
border: none;
|
|
326
|
+
background: transparent;
|
|
327
|
+
color: var(--color-on-surface);
|
|
328
|
+
font-family: inherit;
|
|
329
|
+
font-size: 0.875rem;
|
|
330
|
+
font-weight: 500;
|
|
331
|
+
cursor: pointer;
|
|
332
|
+
white-space: nowrap;
|
|
333
|
+
transition:
|
|
334
|
+
color 150ms ease,
|
|
335
|
+
background-color 150ms ease,
|
|
336
|
+
border-color 150ms ease;
|
|
337
|
+
position: relative;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.tab:hover:not(:disabled) {
|
|
341
|
+
color: var(--color-primary);
|
|
342
|
+
background-color: var(--color-surface-variant);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.tab:focus-visible {
|
|
346
|
+
outline: 2px solid var(--color-primary);
|
|
347
|
+
outline-offset: -2px;
|
|
348
|
+
border-radius: 0.25rem;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.tab:disabled {
|
|
352
|
+
opacity: 0.5;
|
|
353
|
+
cursor: not-allowed;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
:host([active]) .tab {
|
|
357
|
+
color: var(--color-primary);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* Pills variant styles */
|
|
361
|
+
:host-context(el-dm-tabs[variant='pills']) .tab {
|
|
362
|
+
border-radius: 9999px;
|
|
363
|
+
padding: 0.5rem 1rem;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
:host-context(el-dm-tabs[variant='pills'][active]) .tab,
|
|
367
|
+
:host([active]):host-context(el-dm-tabs[variant='pills']) .tab {
|
|
368
|
+
background-color: var(--color-primary);
|
|
369
|
+
color: var(--color-on-primary);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* Enclosed variant styles */
|
|
373
|
+
:host-context(el-dm-tabs[variant='enclosed']) .tab {
|
|
374
|
+
border: 1px solid transparent;
|
|
375
|
+
border-bottom: none;
|
|
376
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
377
|
+
margin-bottom: -1px;
|
|
378
|
+
padding: 0.75rem 1.25rem;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
:host([active]):host-context(el-dm-tabs[variant='enclosed']) .tab {
|
|
382
|
+
border-color: var(--color-outline);
|
|
383
|
+
background-color: var(--color-surface);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* Vertical orientation */
|
|
387
|
+
:host-context(el-dm-tabs[orientation='vertical']) .tab {
|
|
388
|
+
width: 100%;
|
|
389
|
+
justify-content: flex-start;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
:host-context(el-dm-tabs[orientation='vertical'][variant='enclosed']) .tab {
|
|
393
|
+
border-radius: 0.5rem 0 0 0.5rem;
|
|
394
|
+
border: 1px solid transparent;
|
|
395
|
+
border-right: none;
|
|
396
|
+
margin-right: -1px;
|
|
397
|
+
margin-bottom: 0;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
:host([active]):host-context(el-dm-tabs[orientation='vertical'][variant='enclosed']) .tab {
|
|
401
|
+
border-color: var(--color-outline);
|
|
402
|
+
}
|
|
403
|
+
`;
|
|
404
|
+
|
|
405
|
+
class ElDmTab extends import_el_core.BaseElement {
|
|
406
|
+
static properties = {
|
|
407
|
+
tabId: { type: String, reflect: true, attribute: "tab-id" },
|
|
408
|
+
disabled: { type: Boolean, reflect: true },
|
|
409
|
+
active: { type: Boolean, reflect: true }
|
|
410
|
+
};
|
|
411
|
+
constructor() {
|
|
412
|
+
super();
|
|
413
|
+
this.attachStyles(tabStyles);
|
|
414
|
+
this.slot = "tab";
|
|
415
|
+
}
|
|
416
|
+
connectedCallback() {
|
|
417
|
+
super.connectedCallback();
|
|
418
|
+
this.setAttribute("role", "tab");
|
|
419
|
+
this.setAttribute("tabindex", this.active ? "0" : "-1");
|
|
420
|
+
}
|
|
421
|
+
_handleClick() {
|
|
422
|
+
if (this.disabled)
|
|
423
|
+
return;
|
|
424
|
+
this.emit("tab-click", { tabId: this.tabId }, { bubbles: true, composed: true });
|
|
425
|
+
}
|
|
426
|
+
render() {
|
|
427
|
+
return `
|
|
428
|
+
<button
|
|
429
|
+
class="tab"
|
|
430
|
+
part="tab"
|
|
431
|
+
?disabled="${this.disabled}"
|
|
432
|
+
aria-selected="${this.active}"
|
|
433
|
+
aria-disabled="${this.disabled}"
|
|
434
|
+
>
|
|
435
|
+
<slot></slot>
|
|
436
|
+
</button>
|
|
437
|
+
`;
|
|
438
|
+
}
|
|
439
|
+
update() {
|
|
440
|
+
super.update();
|
|
441
|
+
const button = this.shadowRoot?.querySelector("button");
|
|
442
|
+
button?.addEventListener("click", this._handleClick.bind(this));
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
var panelStyles = import_el_core.css`
|
|
446
|
+
:host {
|
|
447
|
+
display: block;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
:host([hidden]) {
|
|
451
|
+
display: none !important;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.panel {
|
|
455
|
+
padding: 1rem 0;
|
|
456
|
+
}
|
|
457
|
+
`;
|
|
458
|
+
|
|
459
|
+
class ElDmTabPanel extends import_el_core.BaseElement {
|
|
460
|
+
static properties = {
|
|
461
|
+
panelFor: { type: String, reflect: true, attribute: "panel-for" },
|
|
462
|
+
active: { type: Boolean, reflect: true }
|
|
463
|
+
};
|
|
464
|
+
constructor() {
|
|
465
|
+
super();
|
|
466
|
+
this.attachStyles(panelStyles);
|
|
467
|
+
}
|
|
468
|
+
connectedCallback() {
|
|
469
|
+
super.connectedCallback();
|
|
470
|
+
this.setAttribute("role", "tabpanel");
|
|
471
|
+
if (!this.active) {
|
|
472
|
+
this.setAttribute("hidden", "");
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
render() {
|
|
476
|
+
return `
|
|
477
|
+
<div class="panel" part="panel">
|
|
478
|
+
<slot></slot>
|
|
479
|
+
</div>
|
|
480
|
+
`;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// src/index.ts
|
|
485
|
+
function register() {
|
|
486
|
+
if (!customElements.get("el-dm-tabs")) {
|
|
487
|
+
customElements.define("el-dm-tabs", ElDmTabs);
|
|
488
|
+
}
|
|
489
|
+
if (!customElements.get("el-dm-tab")) {
|
|
490
|
+
customElements.define("el-dm-tab", ElDmTab);
|
|
491
|
+
}
|
|
492
|
+
if (!customElements.get("el-dm-tab-panel")) {
|
|
493
|
+
customElements.define("el-dm-tab-panel", ElDmTabPanel);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
//# debugId=AA944EC74C7ADE5164756E2164756E21
|
|
498
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/el-dm-tabs.ts", "../../src/index.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * DuskMoon Tabs Element\n *\n * A tab navigation component with tab panels for organizing content.\n * Implements WAI-ARIA tabs pattern for accessibility.\n *\n * @element el-dm-tabs\n *\n * @attr {string} value - Currently selected tab id\n * @attr {string} variant - Tab style variant: underline, pills, enclosed\n * @attr {string} color - Color theme for tabs\n * @attr {string} orientation - Tab orientation: horizontal, vertical\n *\n * @slot - Default slot for el-dm-tab and el-dm-tab-panel elements\n *\n * @csspart tablist - The tab list container\n * @csspart indicator - The animated indicator (underline variant)\n *\n * @fires change - Fired when tab selection changes\n */\n\nimport { BaseElement, css } from '@duskmoon-dev/el-core';\n\nexport type TabsVariant = 'underline' | 'pills' | 'enclosed';\nexport type TabsOrientation = 'horizontal' | 'vertical';\n\nconst styles = css`\n :host {\n display: block;\n font-family: inherit;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host([orientation='vertical']) {\n display: flex;\n gap: 1rem;\n }\n\n .tablist {\n display: flex;\n position: relative;\n gap: 0.25rem;\n border-bottom: 1px solid var(--color-outline);\n }\n\n :host([variant='pills']) .tablist {\n border-bottom: none;\n gap: 0.5rem;\n }\n\n :host([variant='enclosed']) .tablist {\n border-bottom: 1px solid var(--color-outline);\n gap: 0;\n }\n\n :host([orientation='vertical']) .tablist {\n flex-direction: column;\n border-bottom: none;\n border-right: 1px solid var(--color-outline);\n padding-right: 0.5rem;\n }\n\n :host([orientation='vertical'][variant='pills']) .tablist {\n border-right: none;\n }\n\n :host([orientation='vertical'][variant='enclosed']) .tablist {\n border-right: 1px solid var(--color-outline);\n padding-right: 0;\n }\n\n .indicator {\n position: absolute;\n bottom: -1px;\n height: 2px;\n background-color: var(--color-primary);\n transition:\n left 200ms ease,\n width 200ms ease;\n pointer-events: none;\n }\n\n :host([orientation='vertical']) .indicator {\n right: -1px;\n left: auto;\n bottom: auto;\n width: 2px;\n height: auto;\n transition:\n top 200ms ease,\n height 200ms ease;\n }\n\n :host([variant='pills']) .indicator,\n :host([variant='enclosed']) .indicator {\n display: none;\n }\n\n .panels {\n flex: 1;\n min-width: 0;\n }\n\n ::slotted(el-dm-tab-panel) {\n display: none;\n }\n\n ::slotted(el-dm-tab-panel[active]) {\n display: block;\n }\n`;\n\nexport class ElDmTabs extends BaseElement {\n static properties = {\n value: { type: String, reflect: true },\n variant: { type: String, reflect: true, default: 'underline' },\n color: { type: String, reflect: true },\n orientation: { type: String, reflect: true, default: 'horizontal' },\n };\n\n declare value: string;\n declare variant: TabsVariant;\n declare color: string;\n declare orientation: TabsOrientation;\n\n private _indicatorStyle = '';\n\n constructor() {\n super();\n this.attachStyles(styles);\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('tab-click', this._handleTabClick as EventListener);\n this.addEventListener('keydown', this._handleKeyDown);\n\n // Initialize selection after DOM is ready\n requestAnimationFrame(() => {\n this._initializeSelection();\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('tab-click', this._handleTabClick as EventListener);\n this.removeEventListener('keydown', this._handleKeyDown);\n }\n\n private _initializeSelection(): void {\n const tabs = this._getTabs();\n if (tabs.length === 0) return;\n\n // If no value set, select first tab\n if (!this.value && tabs.length > 0) {\n const firstTab = tabs[0];\n const tabId = firstTab.getAttribute('tab-id');\n if (tabId) {\n this.value = tabId;\n }\n }\n\n this._updateSelection();\n }\n\n private _getTabs(): HTMLElement[] {\n return Array.from(this.querySelectorAll('el-dm-tab'));\n }\n\n private _getPanels(): HTMLElement[] {\n return Array.from(this.querySelectorAll('el-dm-tab-panel'));\n }\n\n private _handleTabClick = (event: CustomEvent<{ tabId: string }>): void => {\n const { tabId } = event.detail;\n if (tabId && tabId !== this.value) {\n const oldValue = this.value;\n this.value = tabId;\n this._updateSelection();\n this.emit('change', { value: tabId, oldValue });\n }\n };\n\n private _handleKeyDown = (event: KeyboardEvent): void => {\n const target = event.target as HTMLElement;\n if (target.tagName !== 'EL-DM-TAB') return;\n\n const tabs = this._getTabs();\n const currentIndex = tabs.indexOf(target);\n if (currentIndex === -1) return;\n\n let nextIndex = -1;\n const isVertical = this.orientation === 'vertical';\n\n switch (event.key) {\n case 'ArrowLeft':\n if (!isVertical) {\n nextIndex = currentIndex > 0 ? currentIndex - 1 : tabs.length - 1;\n }\n break;\n case 'ArrowRight':\n if (!isVertical) {\n nextIndex = currentIndex < tabs.length - 1 ? currentIndex + 1 : 0;\n }\n break;\n case 'ArrowUp':\n if (isVertical) {\n nextIndex = currentIndex > 0 ? currentIndex - 1 : tabs.length - 1;\n }\n break;\n case 'ArrowDown':\n if (isVertical) {\n nextIndex = currentIndex < tabs.length - 1 ? currentIndex + 1 : 0;\n }\n break;\n case 'Home':\n nextIndex = 0;\n break;\n case 'End':\n nextIndex = tabs.length - 1;\n break;\n default:\n return;\n }\n\n if (nextIndex !== -1) {\n event.preventDefault();\n const nextTab = tabs[nextIndex];\n nextTab.focus();\n const tabId = nextTab.getAttribute('tab-id');\n if (tabId) {\n const oldValue = this.value;\n this.value = tabId;\n this._updateSelection();\n this.emit('change', { value: tabId, oldValue });\n }\n }\n };\n\n private _updateSelection(): void {\n const tabs = this._getTabs();\n const panels = this._getPanels();\n\n // Update tab states\n tabs.forEach((tab) => {\n const tabId = tab.getAttribute('tab-id');\n const isSelected = tabId === this.value;\n tab.setAttribute('aria-selected', String(isSelected));\n tab.setAttribute('tabindex', isSelected ? '0' : '-1');\n if (isSelected) {\n tab.setAttribute('active', '');\n } else {\n tab.removeAttribute('active');\n }\n });\n\n // Update panel states\n panels.forEach((panel) => {\n const panelFor = panel.getAttribute('panel-for');\n const isActive = panelFor === this.value;\n if (isActive) {\n panel.setAttribute('active', '');\n panel.removeAttribute('hidden');\n } else {\n panel.removeAttribute('active');\n panel.setAttribute('hidden', '');\n }\n });\n\n // Update indicator position\n this._updateIndicator();\n }\n\n private _updateIndicator(): void {\n if (this.variant !== 'underline') return;\n\n const activeTab = this.querySelector('el-dm-tab[active]') as HTMLElement | null;\n if (!activeTab) {\n this._indicatorStyle = 'display: none;';\n this.update();\n return;\n }\n\n const tablist = this.shadowRoot?.querySelector('.tablist');\n if (!tablist) return;\n\n const tablistRect = tablist.getBoundingClientRect();\n const tabRect = activeTab.getBoundingClientRect();\n\n if (this.orientation === 'vertical') {\n const top = tabRect.top - tablistRect.top;\n this._indicatorStyle = `top: ${top}px; height: ${tabRect.height}px;`;\n } else {\n const left = tabRect.left - tablistRect.left;\n this._indicatorStyle = `left: ${left}px; width: ${tabRect.width}px;`;\n }\n\n this.update();\n }\n\n render(): string {\n const colorStyle = this.color\n ? `--color-primary: var(--color-${this.color}, ${this.color});`\n : '';\n\n return `\n <div\n class=\"tablist\"\n role=\"tablist\"\n part=\"tablist\"\n aria-orientation=\"${this.orientation || 'horizontal'}\"\n style=\"${colorStyle}\"\n >\n <slot name=\"tab\"></slot>\n <div class=\"indicator\" part=\"indicator\" style=\"${this._indicatorStyle}\"></div>\n </div>\n <div class=\"panels\">\n <slot></slot>\n </div>\n `;\n }\n\n update(): void {\n super.update();\n\n // Re-attach mutation observer after update\n requestAnimationFrame(() => {\n this._updateIndicator();\n });\n }\n}\n\n/**\n * DuskMoon Tab Element\n *\n * Individual tab button within el-dm-tabs.\n *\n * @element el-dm-tab\n *\n * @attr {string} tab-id - Unique identifier for this tab\n * @attr {boolean} disabled - Whether the tab is disabled\n *\n * @slot - Default slot for tab label\n *\n * @csspart tab - The tab button\n */\n\nconst tabStyles = css`\n :host {\n display: inline-flex;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n .tab {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.75rem 1rem;\n border: none;\n background: transparent;\n color: var(--color-on-surface);\n font-family: inherit;\n font-size: 0.875rem;\n font-weight: 500;\n cursor: pointer;\n white-space: nowrap;\n transition:\n color 150ms ease,\n background-color 150ms ease,\n border-color 150ms ease;\n position: relative;\n }\n\n .tab:hover:not(:disabled) {\n color: var(--color-primary);\n background-color: var(--color-surface-variant);\n }\n\n .tab:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: -2px;\n border-radius: 0.25rem;\n }\n\n .tab:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n :host([active]) .tab {\n color: var(--color-primary);\n }\n\n /* Pills variant styles */\n :host-context(el-dm-tabs[variant='pills']) .tab {\n border-radius: 9999px;\n padding: 0.5rem 1rem;\n }\n\n :host-context(el-dm-tabs[variant='pills'][active]) .tab,\n :host([active]):host-context(el-dm-tabs[variant='pills']) .tab {\n background-color: var(--color-primary);\n color: var(--color-on-primary);\n }\n\n /* Enclosed variant styles */\n :host-context(el-dm-tabs[variant='enclosed']) .tab {\n border: 1px solid transparent;\n border-bottom: none;\n border-radius: 0.5rem 0.5rem 0 0;\n margin-bottom: -1px;\n padding: 0.75rem 1.25rem;\n }\n\n :host([active]):host-context(el-dm-tabs[variant='enclosed']) .tab {\n border-color: var(--color-outline);\n background-color: var(--color-surface);\n }\n\n /* Vertical orientation */\n :host-context(el-dm-tabs[orientation='vertical']) .tab {\n width: 100%;\n justify-content: flex-start;\n }\n\n :host-context(el-dm-tabs[orientation='vertical'][variant='enclosed']) .tab {\n border-radius: 0.5rem 0 0 0.5rem;\n border: 1px solid transparent;\n border-right: none;\n margin-right: -1px;\n margin-bottom: 0;\n }\n\n :host([active]):host-context(el-dm-tabs[orientation='vertical'][variant='enclosed']) .tab {\n border-color: var(--color-outline);\n }\n`;\n\nexport class ElDmTab extends BaseElement {\n static properties = {\n tabId: { type: String, reflect: true, attribute: 'tab-id' },\n disabled: { type: Boolean, reflect: true },\n active: { type: Boolean, reflect: true },\n };\n\n declare tabId: string;\n declare disabled: boolean;\n declare active: boolean;\n\n constructor() {\n super();\n this.attachStyles(tabStyles);\n this.slot = 'tab';\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'tab');\n this.setAttribute('tabindex', this.active ? '0' : '-1');\n }\n\n private _handleClick(): void {\n if (this.disabled) return;\n this.emit('tab-click', { tabId: this.tabId }, { bubbles: true, composed: true });\n }\n\n render(): string {\n return `\n <button\n class=\"tab\"\n part=\"tab\"\n ?disabled=\"${this.disabled}\"\n aria-selected=\"${this.active}\"\n aria-disabled=\"${this.disabled}\"\n >\n <slot></slot>\n </button>\n `;\n }\n\n update(): void {\n super.update();\n const button = this.shadowRoot?.querySelector('button');\n button?.addEventListener('click', this._handleClick.bind(this));\n }\n}\n\n/**\n * DuskMoon Tab Panel Element\n *\n * Content panel for el-dm-tabs.\n *\n * @element el-dm-tab-panel\n *\n * @attr {string} panel-for - ID of the tab this panel belongs to\n *\n * @slot - Default slot for panel content\n *\n * @csspart panel - The panel container\n */\n\nconst panelStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n .panel {\n padding: 1rem 0;\n }\n`;\n\nexport class ElDmTabPanel extends BaseElement {\n static properties = {\n panelFor: { type: String, reflect: true, attribute: 'panel-for' },\n active: { type: Boolean, reflect: true },\n };\n\n declare panelFor: string;\n declare active: boolean;\n\n constructor() {\n super();\n this.attachStyles(panelStyles);\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'tabpanel');\n if (!this.active) {\n this.setAttribute('hidden', '');\n }\n }\n\n render(): string {\n return `\n <div class=\"panel\" part=\"panel\">\n <slot></slot>\n </div>\n `;\n }\n}\n",
|
|
6
|
+
"/**\n * @duskmoon-dev/el-tabs\n *\n * DuskMoon Tabs custom elements for tab navigation\n */\n\nimport { ElDmTabs, ElDmTab, ElDmTabPanel } from './el-dm-tabs.js';\n\nexport { ElDmTabs, ElDmTab, ElDmTabPanel };\nexport type { TabsVariant, TabsOrientation } from './el-dm-tabs.js';\n\n/**\n * Register all tab-related custom elements\n *\n * @example\n * ```ts\n * import { register } from '@duskmoon-dev/el-tabs';\n * register();\n * ```\n */\nexport function register(): void {\n if (!customElements.get('el-dm-tabs')) {\n customElements.define('el-dm-tabs', ElDmTabs);\n }\n if (!customElements.get('el-dm-tab')) {\n customElements.define('el-dm-tab', ElDmTab);\n }\n if (!customElements.get('el-dm-tab-panel')) {\n customElements.define('el-dm-tab-panel', ElDmTabPanel);\n }\n}\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBiC,IAAjC;AAKA,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyFR,MAAM,iBAAiB,2BAAY;AAAA,SACjC,aAAa;AAAA,IAClB,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IACrC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM,SAAS,YAAY;AAAA,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