@ansh-ui/vue 0.2.0 → 0.3.1
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-B6OXKW5Q.js → chunk-AL4PPK25.js} +5 -2
- package/dist/chunk-AL4PPK25.js.map +1 -0
- package/dist/{chunk-2VSROZ2N.js → chunk-D3HH726R.js} +152 -144
- package/dist/chunk-D3HH726R.js.map +1 -0
- package/dist/{chunk-5BQEZYG6.cjs → chunk-EDAF7RAN.cjs} +163 -155
- package/dist/chunk-EDAF7RAN.cjs.map +1 -0
- package/dist/{chunk-TMG3M6TK.js → chunk-G2OX2NH2.js} +3 -3
- package/dist/chunk-G2OX2NH2.js.map +1 -0
- package/dist/{chunk-SOYRICHU.js → chunk-G3EIU6VM.js} +14 -8
- package/dist/chunk-G3EIU6VM.js.map +1 -0
- package/dist/{chunk-KCA7RNJ4.cjs → chunk-IHH6KMBY.cjs} +239 -5
- package/dist/chunk-IHH6KMBY.cjs.map +1 -0
- package/dist/{chunk-J2LA4GRP.cjs → chunk-IO6WJEJI.cjs} +122 -120
- package/dist/chunk-IO6WJEJI.cjs.map +1 -0
- package/dist/{chunk-IOXGBPOV.cjs → chunk-JJBYF7AH.cjs} +14 -8
- package/dist/chunk-JJBYF7AH.cjs.map +1 -0
- package/dist/{chunk-Z7XOFKM4.cjs → chunk-KKCZ5RUE.cjs} +4 -2
- package/dist/chunk-KKCZ5RUE.cjs.map +1 -0
- package/dist/{chunk-6ABPGOJP.js → chunk-LFGAOD32.js} +4 -2
- package/dist/chunk-LFGAOD32.js.map +1 -0
- package/dist/{chunk-EISHOEB6.cjs → chunk-MWGVDY6K.cjs} +3 -3
- package/dist/chunk-MWGVDY6K.cjs.map +1 -0
- package/dist/{chunk-FVKLCGA4.js → chunk-NJMTWLT2.js} +123 -121
- package/dist/chunk-NJMTWLT2.js.map +1 -0
- package/dist/{chunk-T425FIC7.js → chunk-NKRPZTQA.js} +238 -5
- package/dist/chunk-NKRPZTQA.js.map +1 -0
- package/dist/{chunk-JQ4YLXXM.cjs → chunk-PNR4RQ4T.cjs} +5 -2
- package/dist/chunk-PNR4RQ4T.cjs.map +1 -0
- package/dist/data.cjs +16 -16
- package/dist/data.d.cts +54 -52
- package/dist/data.d.ts +54 -52
- package/dist/data.js +1 -1
- package/dist/form.cjs +36 -36
- package/dist/form.d.cts +53 -45
- package/dist/form.d.ts +53 -45
- package/dist/form.js +1 -1
- package/dist/index.cjs +208 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -8
- package/dist/index.d.ts +33 -8
- package/dist/index.js +31 -15
- package/dist/index.js.map +1 -1
- package/dist/layout.cjs +13 -13
- package/dist/layout.d.cts +23 -14
- package/dist/layout.d.ts +23 -14
- package/dist/layout.js +1 -1
- package/dist/motion.cjs +11 -11
- package/dist/motion.d.cts +41 -37
- package/dist/motion.d.ts +41 -37
- package/dist/motion.js +1 -1
- package/dist/navigation.cjs +13 -9
- package/dist/navigation.d.cts +125 -4
- package/dist/navigation.d.ts +125 -4
- package/dist/navigation.js +2 -2
- package/dist/overlay.cjs +14 -14
- package/dist/overlay.d.cts +36 -33
- package/dist/overlay.d.ts +36 -33
- package/dist/overlay.js +2 -2
- package/dist/{position-Cn7qP1pn.d.cts → position-CiY171HP.d.cts} +2 -1
- package/dist/{position-Cn7qP1pn.d.ts → position-CiY171HP.d.ts} +2 -1
- package/dist/primitives.cjs +6 -6
- package/dist/primitives.d.cts +6 -5
- package/dist/primitives.d.ts +6 -5
- package/dist/primitives.js +1 -1
- package/dist/{sidebar-CTZ-Ckko.d.ts → sidebar-B9zDHMbn.d.cts} +5 -4
- package/dist/{sidebar-CQqEmpid.d.cts → sidebar-DMrKHqZ5.d.ts} +5 -4
- package/dist/styles.css +464 -0
- package/dist/{utils-IKPG3zcC.d.cts → utils-D4XwXDeX.d.cts} +2 -1
- package/dist/{utils-IKPG3zcC.d.ts → utils-D4XwXDeX.d.ts} +2 -1
- package/package.json +3 -3
- package/dist/chunk-2VSROZ2N.js.map +0 -1
- package/dist/chunk-5BQEZYG6.cjs.map +0 -1
- package/dist/chunk-6ABPGOJP.js.map +0 -1
- package/dist/chunk-B6OXKW5Q.js.map +0 -1
- package/dist/chunk-EISHOEB6.cjs.map +0 -1
- package/dist/chunk-FVKLCGA4.js.map +0 -1
- package/dist/chunk-IOXGBPOV.cjs.map +0 -1
- package/dist/chunk-J2LA4GRP.cjs.map +0 -1
- package/dist/chunk-JQ4YLXXM.cjs.map +0 -1
- package/dist/chunk-KCA7RNJ4.cjs.map +0 -1
- package/dist/chunk-SOYRICHU.js.map +0 -1
- package/dist/chunk-T425FIC7.js.map +0 -1
- package/dist/chunk-TMG3M6TK.js.map +0 -1
- package/dist/chunk-Z7XOFKM4.cjs.map +0 -1
|
@@ -1,8 +1,126 @@
|
|
|
1
1
|
import { useControllableState } from './chunk-OAQ7MDYX.js';
|
|
2
2
|
import { cx, resolveSlotContent } from './chunk-NJDDNO4C.js';
|
|
3
|
-
import { defineComponent,
|
|
3
|
+
import { defineComponent, h, computed, ref, onBeforeUnmount } from 'vue';
|
|
4
4
|
import { toHex, parseColor, pickReadable } from '@ansh-ui/core';
|
|
5
5
|
|
|
6
|
+
var Pagination = defineComponent({
|
|
7
|
+
name: "AnshPagination",
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: {
|
|
10
|
+
page: { type: Number, required: true },
|
|
11
|
+
pageCount: { type: Number, required: true },
|
|
12
|
+
onPageChange: { type: Function, required: true },
|
|
13
|
+
total: { type: Number, default: void 0 },
|
|
14
|
+
pageSize: { type: Number, default: void 0 },
|
|
15
|
+
siblings: { type: Number, default: 1 }
|
|
16
|
+
},
|
|
17
|
+
setup(props, { attrs }) {
|
|
18
|
+
return () => {
|
|
19
|
+
const pages = [];
|
|
20
|
+
const first = 0;
|
|
21
|
+
const last = props.pageCount - 1;
|
|
22
|
+
for (let index = first; index <= last; index++) {
|
|
23
|
+
const nearCurrent = Math.abs(index - props.page) <= props.siblings;
|
|
24
|
+
const isEdge = index === first || index === last;
|
|
25
|
+
if (nearCurrent || isEdge) {
|
|
26
|
+
pages.push(index);
|
|
27
|
+
} else if (pages[pages.length - 1] !== "gap") {
|
|
28
|
+
pages.push("gap");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const from = props.pageSize ? props.page * props.pageSize + 1 : null;
|
|
32
|
+
const to = props.pageSize && props.total ? Math.min((props.page + 1) * props.pageSize, props.total) : null;
|
|
33
|
+
return h(
|
|
34
|
+
"nav",
|
|
35
|
+
{ class: cx("ansh-pagination", attrs.class), "aria-label": "Pagination" },
|
|
36
|
+
[
|
|
37
|
+
from !== null && to !== null ? h("p", { class: "ansh-pagination__summary" }, `${from}\u2013${to} of ${props.total}`) : null,
|
|
38
|
+
h("ol", { class: "ansh-pagination__list" }, [
|
|
39
|
+
h("li", {}, [
|
|
40
|
+
h(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
class: "ansh-pagination__button ansh-focusable",
|
|
45
|
+
disabled: props.page === 0,
|
|
46
|
+
"aria-label": "Previous page",
|
|
47
|
+
onClick: () => props.onPageChange(props.page - 1)
|
|
48
|
+
},
|
|
49
|
+
[
|
|
50
|
+
h(
|
|
51
|
+
"svg",
|
|
52
|
+
{ viewBox: "0 0 12 12", width: "12", height: "12", "aria-hidden": "true" },
|
|
53
|
+
[
|
|
54
|
+
h("path", {
|
|
55
|
+
d: "M7.5 2.5L4 6l3.5 3.5",
|
|
56
|
+
stroke: "currentColor",
|
|
57
|
+
"stroke-width": "1.5",
|
|
58
|
+
fill: "none",
|
|
59
|
+
"stroke-linecap": "round",
|
|
60
|
+
"stroke-linejoin": "round"
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
)
|
|
66
|
+
]),
|
|
67
|
+
...pages.map(
|
|
68
|
+
(entry, index) => entry === "gap" ? h(
|
|
69
|
+
"li",
|
|
70
|
+
{ key: `gap-${index}`, "aria-hidden": "true", class: "ansh-pagination__gap" },
|
|
71
|
+
"\u2026"
|
|
72
|
+
) : h("li", { key: entry }, [
|
|
73
|
+
h(
|
|
74
|
+
"button",
|
|
75
|
+
{
|
|
76
|
+
type: "button",
|
|
77
|
+
class: cx(
|
|
78
|
+
"ansh-pagination__button",
|
|
79
|
+
entry === props.page && "ansh-pagination__button--current",
|
|
80
|
+
"ansh-focusable"
|
|
81
|
+
),
|
|
82
|
+
"aria-current": entry === props.page ? "page" : void 0,
|
|
83
|
+
"aria-label": `Page ${entry + 1}`,
|
|
84
|
+
onClick: () => props.onPageChange(entry)
|
|
85
|
+
},
|
|
86
|
+
String(entry + 1)
|
|
87
|
+
)
|
|
88
|
+
])
|
|
89
|
+
),
|
|
90
|
+
h("li", {}, [
|
|
91
|
+
h(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
type: "button",
|
|
95
|
+
class: "ansh-pagination__button ansh-focusable",
|
|
96
|
+
disabled: props.page >= props.pageCount - 1,
|
|
97
|
+
"aria-label": "Next page",
|
|
98
|
+
onClick: () => props.onPageChange(props.page + 1)
|
|
99
|
+
},
|
|
100
|
+
[
|
|
101
|
+
h(
|
|
102
|
+
"svg",
|
|
103
|
+
{ viewBox: "0 0 12 12", width: "12", height: "12", "aria-hidden": "true" },
|
|
104
|
+
[
|
|
105
|
+
h("path", {
|
|
106
|
+
d: "M4.5 2.5L8 6l-3.5 3.5",
|
|
107
|
+
stroke: "currentColor",
|
|
108
|
+
"stroke-width": "1.5",
|
|
109
|
+
fill: "none",
|
|
110
|
+
"stroke-linecap": "round",
|
|
111
|
+
"stroke-linejoin": "round"
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
)
|
|
115
|
+
]
|
|
116
|
+
)
|
|
117
|
+
])
|
|
118
|
+
])
|
|
119
|
+
]
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
});
|
|
6
124
|
var DATA_TABLE_PROP_KEYS = [
|
|
7
125
|
"data",
|
|
8
126
|
"columns",
|
|
@@ -30,6 +148,8 @@ function compare(a, b) {
|
|
|
30
148
|
if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
|
|
31
149
|
return String(a).localeCompare(String(b), void 0, { numeric: true, sensitivity: "base" });
|
|
32
150
|
}
|
|
151
|
+
|
|
152
|
+
// src/components/data/table/data-table.ts
|
|
33
153
|
var DataTable = defineComponent(
|
|
34
154
|
(props, { emit, attrs }) => {
|
|
35
155
|
const [sortState, setSortState] = useControllableState(
|
|
@@ -309,124 +429,6 @@ var DataTable = defineComponent(
|
|
|
309
429
|
emits: ["update:sort", "update:selected", "update:page"]
|
|
310
430
|
}
|
|
311
431
|
);
|
|
312
|
-
var Pagination = defineComponent({
|
|
313
|
-
name: "AnshPagination",
|
|
314
|
-
inheritAttrs: false,
|
|
315
|
-
props: {
|
|
316
|
-
page: { type: Number, required: true },
|
|
317
|
-
pageCount: { type: Number, required: true },
|
|
318
|
-
onPageChange: { type: Function, required: true },
|
|
319
|
-
total: { type: Number, default: void 0 },
|
|
320
|
-
pageSize: { type: Number, default: void 0 },
|
|
321
|
-
siblings: { type: Number, default: 1 }
|
|
322
|
-
},
|
|
323
|
-
setup(props, { attrs }) {
|
|
324
|
-
return () => {
|
|
325
|
-
const pages = [];
|
|
326
|
-
const first = 0;
|
|
327
|
-
const last = props.pageCount - 1;
|
|
328
|
-
for (let index = first; index <= last; index++) {
|
|
329
|
-
const nearCurrent = Math.abs(index - props.page) <= props.siblings;
|
|
330
|
-
const isEdge = index === first || index === last;
|
|
331
|
-
if (nearCurrent || isEdge) {
|
|
332
|
-
pages.push(index);
|
|
333
|
-
} else if (pages[pages.length - 1] !== "gap") {
|
|
334
|
-
pages.push("gap");
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
const from = props.pageSize ? props.page * props.pageSize + 1 : null;
|
|
338
|
-
const to = props.pageSize && props.total ? Math.min((props.page + 1) * props.pageSize, props.total) : null;
|
|
339
|
-
return h(
|
|
340
|
-
"nav",
|
|
341
|
-
{ class: cx("ansh-pagination", attrs.class), "aria-label": "Pagination" },
|
|
342
|
-
[
|
|
343
|
-
from !== null && to !== null ? h("p", { class: "ansh-pagination__summary" }, `${from}\u2013${to} of ${props.total}`) : null,
|
|
344
|
-
h("ol", { class: "ansh-pagination__list" }, [
|
|
345
|
-
h("li", {}, [
|
|
346
|
-
h(
|
|
347
|
-
"button",
|
|
348
|
-
{
|
|
349
|
-
type: "button",
|
|
350
|
-
class: "ansh-pagination__button ansh-focusable",
|
|
351
|
-
disabled: props.page === 0,
|
|
352
|
-
"aria-label": "Previous page",
|
|
353
|
-
onClick: () => props.onPageChange(props.page - 1)
|
|
354
|
-
},
|
|
355
|
-
[
|
|
356
|
-
h(
|
|
357
|
-
"svg",
|
|
358
|
-
{ viewBox: "0 0 12 12", width: "12", height: "12", "aria-hidden": "true" },
|
|
359
|
-
[
|
|
360
|
-
h("path", {
|
|
361
|
-
d: "M7.5 2.5L4 6l3.5 3.5",
|
|
362
|
-
stroke: "currentColor",
|
|
363
|
-
"stroke-width": "1.5",
|
|
364
|
-
fill: "none",
|
|
365
|
-
"stroke-linecap": "round",
|
|
366
|
-
"stroke-linejoin": "round"
|
|
367
|
-
})
|
|
368
|
-
]
|
|
369
|
-
)
|
|
370
|
-
]
|
|
371
|
-
)
|
|
372
|
-
]),
|
|
373
|
-
...pages.map(
|
|
374
|
-
(entry, index) => entry === "gap" ? h(
|
|
375
|
-
"li",
|
|
376
|
-
{ key: `gap-${index}`, "aria-hidden": "true", class: "ansh-pagination__gap" },
|
|
377
|
-
"\u2026"
|
|
378
|
-
) : h("li", { key: entry }, [
|
|
379
|
-
h(
|
|
380
|
-
"button",
|
|
381
|
-
{
|
|
382
|
-
type: "button",
|
|
383
|
-
class: cx(
|
|
384
|
-
"ansh-pagination__button",
|
|
385
|
-
entry === props.page && "ansh-pagination__button--current",
|
|
386
|
-
"ansh-focusable"
|
|
387
|
-
),
|
|
388
|
-
"aria-current": entry === props.page ? "page" : void 0,
|
|
389
|
-
"aria-label": `Page ${entry + 1}`,
|
|
390
|
-
onClick: () => props.onPageChange(entry)
|
|
391
|
-
},
|
|
392
|
-
String(entry + 1)
|
|
393
|
-
)
|
|
394
|
-
])
|
|
395
|
-
),
|
|
396
|
-
h("li", {}, [
|
|
397
|
-
h(
|
|
398
|
-
"button",
|
|
399
|
-
{
|
|
400
|
-
type: "button",
|
|
401
|
-
class: "ansh-pagination__button ansh-focusable",
|
|
402
|
-
disabled: props.page >= props.pageCount - 1,
|
|
403
|
-
"aria-label": "Next page",
|
|
404
|
-
onClick: () => props.onPageChange(props.page + 1)
|
|
405
|
-
},
|
|
406
|
-
[
|
|
407
|
-
h(
|
|
408
|
-
"svg",
|
|
409
|
-
{ viewBox: "0 0 12 12", width: "12", height: "12", "aria-hidden": "true" },
|
|
410
|
-
[
|
|
411
|
-
h("path", {
|
|
412
|
-
d: "M4.5 2.5L8 6l-3.5 3.5",
|
|
413
|
-
stroke: "currentColor",
|
|
414
|
-
"stroke-width": "1.5",
|
|
415
|
-
fill: "none",
|
|
416
|
-
"stroke-linecap": "round",
|
|
417
|
-
"stroke-linejoin": "round"
|
|
418
|
-
})
|
|
419
|
-
]
|
|
420
|
-
)
|
|
421
|
-
]
|
|
422
|
-
)
|
|
423
|
-
])
|
|
424
|
-
])
|
|
425
|
-
]
|
|
426
|
-
);
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
432
|
var Table = defineComponent({
|
|
431
433
|
name: "AnshTable",
|
|
432
434
|
inheritAttrs: false,
|
|
@@ -1031,5 +1033,5 @@ var Meter = defineComponent({
|
|
|
1031
1033
|
});
|
|
1032
1034
|
|
|
1033
1035
|
export { Avatar, AvatarGroup, Badge, CircularProgress, CodeBlock, DataTable, DescriptionList, EmptyState, Kbd, Meter, Pagination, Progress, Stat, Table, Timeline };
|
|
1034
|
-
//# sourceMappingURL=chunk-
|
|
1035
|
-
//# sourceMappingURL=chunk-
|
|
1036
|
+
//# sourceMappingURL=chunk-NJMTWLT2.js.map
|
|
1037
|
+
//# sourceMappingURL=chunk-NJMTWLT2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data/table/pagination.ts","../src/components/data/table/types.ts","../src/components/data/table/data-table.ts","../src/components/data/table/table.ts","../src/components/data/display/badge.ts","../src/components/data/display/avatar.ts","../src/components/data/display/kbd.ts","../src/components/data/display/stat.ts","../src/components/data/display/empty-state.ts","../src/components/data/display/description-list.ts","../src/components/data/display/timeline.ts","../src/components/data/display/code-block.ts","../src/components/data/progress.ts"],"names":["defineComponent","h","_","computed","ref"],"mappings":";;;;;AA4BO,IAAM,aAAa,eAAA,CAAgB;AAAA,EACxC,IAAA,EAAM,gBAAA;AAAA,EACN,YAAA,EAAc,KAAA;AAAA,EACd,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,EAAE,IAAA,EAAM,MAAA,EAAQ,UAAU,IAAA,EAAK;AAAA,IACrC,SAAA,EAAW,EAAE,IAAA,EAAM,MAAA,EAAQ,UAAU,IAAA,EAAK;AAAA,IAC1C,YAAA,EAAc,EAAE,IAAA,EAAM,QAAA,EAA8C,UAAU,IAAA,EAAK;AAAA,IACnF,KAAA,EAAO,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAS,MAAA,EAAU;AAAA,IAC1C,QAAA,EAAU,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAS,MAAA,EAAU;AAAA,IAC7C,QAAA,EAAU,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAS,CAAA;AAAE,GACvC;AAAA,EACA,KAAA,CAAM,KAAA,EAAO,EAAE,KAAA,EAAM,EAAG;AACtB,IAAA,OAAO,MAAM;AACX,MAAA,MAAM,QAA+B,EAAC;AACtC,MAAA,MAAM,KAAA,GAAQ,CAAA;AACd,MAAA,MAAM,IAAA,GAAO,MAAM,SAAA,GAAY,CAAA;AAE/B,MAAA,KAAA,IAAS,KAA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export interface PaginationProps {\n /** Zero-based. */\n page: number\n pageCount: number\n onPageChange: (page: number) => void\n /** Total row count, for the \"1–20 of 340\" summary. */\n total?: number\n pageSize?: number\n /** Page buttons either side of the current one. Default `1`. */\n siblings?: number\n}\n\n/**\n * Page navigation.\n *\n * `<nav>` with an ordered list, because that is what a pager is — a list of links to positions in a\n * sequence. The current page is marked `aria-current=\"page\"`, which is how a screen reader user\n * knows where they are without counting buttons.\n *\n * The ellipsis is `aria-hidden`; announcing \"ellipsis\" between page 3 and page 12 conveys nothing\n * that the numbers don't already.\n *\n * Fully controlled, same as the React version — there is no internal page state to fall back to, so\n * `onPageChange` stays a plain callback prop rather than a `v-model`-style emit.\n */\nexport const Pagination = defineComponent({\n name: 'AnshPagination',\n inheritAttrs: false,\n props: {\n page: { type: Number, required: true },\n pageCount: { type: Number, required: true },\n onPageChange: { type: Function as PropType<(page: number) => void>, required: true },\n total: { type: Number, default: undefined },\n pageSize: { type: Number, default: undefined },\n siblings: { type: Number, default: 1 },\n },\n setup(props, { attrs }) {\n return () => {\n const pages: Array<number | 'gap'> = []\n const first = 0\n const last = props.pageCount - 1\n\n for (let index = first; index <= last; index++) {\n const nearCurrent = Math.abs(index - props.page) <= props.siblings\n const isEdge = index === first || index === last\n if (nearCurrent || isEdge) {\n pages.push(index)\n } else if (pages[pages.length - 1] !== 'gap') {\n pages.push('gap')\n }\n }\n\n const from = props.pageSize ? props.page * props.pageSize + 1 : null\n const to =\n props.pageSize && props.total\n ? Math.min((props.page + 1) * props.pageSize, props.total)\n : null\n\n return h(\n 'nav',\n { class: cx('ansh-pagination', attrs.class as string), 'aria-label': 'Pagination' },\n [\n from !== null && to !== null\n ? h('p', { class: 'ansh-pagination__summary' }, `${from}–${to} of ${props.total}`)\n : null,\n\n h('ol', { class: 'ansh-pagination__list' }, [\n h('li', {}, [\n h(\n 'button',\n {\n type: 'button',\n class: 'ansh-pagination__button ansh-focusable',\n disabled: props.page === 0,\n 'aria-label': 'Previous page',\n onClick: () => props.onPageChange(props.page - 1),\n },\n [\n h(\n 'svg',\n { viewBox: '0 0 12 12', width: '12', height: '12', 'aria-hidden': 'true' },\n [\n h('path', {\n d: 'M7.5 2.5L4 6l3.5 3.5',\n stroke: 'currentColor',\n 'stroke-width': '1.5',\n fill: 'none',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n }),\n ],\n ),\n ],\n ),\n ]),\n\n ...pages.map((entry, index) =>\n entry === 'gap'\n ? h(\n 'li',\n { key: `gap-${index}`, 'aria-hidden': 'true', class: 'ansh-pagination__gap' },\n '…',\n )\n : h('li', { key: entry }, [\n h(\n 'button',\n {\n type: 'button',\n class: cx(\n 'ansh-pagination__button',\n entry === props.page && 'ansh-pagination__button--current',\n 'ansh-focusable',\n ),\n 'aria-current': entry === props.page ? 'page' : undefined,\n 'aria-label': `Page ${entry + 1}`,\n onClick: () => props.onPageChange(entry),\n },\n String(entry + 1),\n ),\n ]),\n ),\n\n h('li', {}, [\n h(\n 'button',\n {\n type: 'button',\n class: 'ansh-pagination__button ansh-focusable',\n disabled: props.page >= props.pageCount - 1,\n 'aria-label': 'Next page',\n onClick: () => props.onPageChange(props.page + 1),\n },\n [\n h(\n 'svg',\n { viewBox: '0 0 12 12', width: '12', height: '12', 'aria-hidden': 'true' },\n [\n h('path', {\n d: 'M4.5 2.5L8 6l-3.5 3.5',\n stroke: 'currentColor',\n 'stroke-width': '1.5',\n fill: 'none',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n }),\n ],\n ),\n ],\n ),\n ]),\n ]),\n ],\n )\n }\n },\n})\n\n/** A plain styled table, for content that isn't driven by data props. */\n","import { type VNodeChild } from 'vue'\nimport { type SlotContent } from '../../../primitives/utils'\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface SortState {\n columnId: string\n direction: SortDirection\n}\n\nexport interface Column<T> {\n id: string\n header: SlotContent\n /** Render the cell. Receives the row and its index. */\n cell: (row: T, index: number) => VNodeChild\n /** Allow sorting by this column. */\n sortable?: boolean\n /**\n * Value used for the default comparator. Without it a sortable column falls back to comparing\n * rendered output, which sorts \"10\" before \"9\".\n */\n sortValue?: (row: T) => string | number | Date | null | undefined\n align?: 'start' | 'center' | 'end'\n /** Any CSS width — `'12rem'`, `'25%'`, `'minmax(8rem, 1fr)'`. */\n width?: string\n /** Hide below this breakpoint. Uses the token breakpoints. */\n hideBelow?: 'sm' | 'md' | 'lg'\n /** Short label announced instead of a complex header. */\n ariaLabel?: string\n}\n\nexport interface DataTableProps<T> {\n data: readonly T[]\n columns: ReadonlyArray<Column<T>>\n /** Stable row identity. Required — array index breaks selection the moment rows reorder. */\n getRowId: (row: T) => string\n /** Describes the table for screen readers. Rendered as a visually hidden `<caption>`. */\n caption: string\n /** Row checkboxes plus a header select-all. */\n selectable?: boolean\n /** `v-model:selected` — omit for an uncontrolled table that owns its own selection. */\n selected?: readonly string[]\n /** `v-model:sort` — omit for an uncontrolled table that owns its own sort state. */\n sort?: SortState | null\n defaultSort?: SortState | null\n /** Rows per page. Omit to render everything. */\n pageSize?: number\n /** `v-model:page` — omit for an uncontrolled table that owns its own page. */\n page?: number\n /** Show skeleton rows. */\n loading?: boolean\n /** Rendered in place of the body when there are no rows. */\n emptyState?: SlotContent\n onRowClick?: (row: T) => void\n /** Keep the header visible while the body scrolls. */\n stickyHeader?: boolean\n density?: 'comfortable' | 'compact'\n /** Zebra striping. Off by default — borders read as cleaner at density. */\n striped?: boolean\n /** Per-row extra class, for status highlighting. */\n rowClassName?: (row: T) => string | undefined\n}\n\nexport interface DataTableEmits {\n 'update:sort': (sort: SortState | null) => void\n 'update:selected': (ids: readonly string[]) => void\n 'update:page': (page: number) => void\n}\n\nexport const DATA_TABLE_PROP_KEYS = [\n 'data',\n 'columns',\n 'getRowId',\n 'caption',\n 'selectable',\n 'selected',\n 'sort',\n 'defaultSort',\n 'pageSize',\n 'page',\n 'loading',\n 'emptyState',\n 'onRowClick',\n 'stickyHeader',\n 'density',\n 'striped',\n 'rowClassName',\n] satisfies Array<keyof DataTableProps<unknown>>\n\n/** Default comparator: numbers and dates numerically, strings by locale. */\nexport function compare(a: unknown, b: unknown): number {\n if (a == null && b == null) return 0\n // Nulls sort last in both directions — an empty cell is not \"smallest\", it's absent, and\n // flipping the sort should not fill the top of the table with blanks.\n if (a == null) return 1\n if (b == null) return -1\n\n if (typeof a === 'number' && typeof b === 'number') return a - b\n if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime()\n // `localeCompare` with `numeric` so \"Item 2\" precedes \"Item 10\".\n return String(a).localeCompare(String(b), undefined, { numeric: true, sensitivity: 'base' })\n}\n","import { type SetupContext, type VNodeChild, computed, defineComponent, h } from 'vue'\nimport { cx, resolveSlotContent } from '../../../primitives/utils'\nimport { useControllableState } from '../../../primitives/use-controllable-state'\nimport { Pagination } from './pagination'\nimport {\n type Column,\n DATA_TABLE_PROP_KEYS,\n type DataTableEmits,\n type DataTableProps,\n type SortState,\n compare,\n} from './types'\n\n/**\n * Tables — the Vue counterpart of `@ansh-ui/react`'s `Table`/`DataTable`.\n *\n * A real `<table>` with `<th scope>`, not a grid of divs. The semantics are the entire point: a\n * screen reader announces \"Column 3 of 7, Status, row 12\" only if the markup says so. Every\n * div-based table reimplements navigation badly or not at all, and the CSS argument for divs\n * disappeared when `display: contents` and `position: sticky` landed.\n *\n * `DataTable` adds sorting, selection and pagination on top. It stays deliberately short of a full\n * data grid — no virtualisation, no column resizing, no pinned regions. Those need a different\n * architecture (windowing, measured columns), and half-implementing them produces a component that\n * breaks at exactly the scale it was added for.\n *\n * `DataTable` is generic over the row type `T`, which Vue only supports for a plain (non-SFC)\n * component through `defineComponent`'s \"generic setup function\" overload — the setup function\n * itself stays generic (`<T,>(props: DataTableProps<T>, ctx) => …`) while the runtime `props` list\n * is a plain array of keys. That trade means no per-prop runtime validation or default-value\n * coercion (booleans aren't coerced from attribute presence, defaults are applied by hand inside\n * `setup`, mirroring the destructured defaults the React version uses) — acceptable here because the\n * real contract for a data-shaped component like this is the TypeScript signature, not template\n * shorthand.\n */\n\nexport const DataTable = defineComponent(\n <T>(props: DataTableProps<T>, { emit, attrs }: SetupContext<DataTableEmits>) => {\n const [sortState, setSortState] = useControllableState<SortState | null>(\n () => props.sort,\n props.defaultSort ?? null,\n (next) => emit('update:sort', next),\n )\n const [selection, setSelection] = useControllableState<readonly string[]>(\n () => props.selected,\n [],\n (next) => emit('update:selected', next),\n )\n const [currentPage, setCurrentPage] = useControllableState<number>(\n () => props.page,\n 0,\n (next) => emit('update:page', next),\n )\n\n const sorted = computed<readonly T[]>(() => {\n const state = sortState.value\n if (!state) return props.data\n const column = props.columns.find((c) => c.id === state.columnId)\n const sortValue = column?.sortValue\n if (!sortValue) return props.data\n\n // Copied before sorting: mutating the caller's array in place is a bug that surfaces as\n // \"my list reorders when I open the table\".\n const rows = [...props.data]\n rows.sort((a, b) => {\n const result = compare(sortValue(a), sortValue(b))\n return state.direction === 'asc' ? result : -result\n })\n return rows\n })\n\n const pageCount = computed(() =>\n props.pageSize ? Math.max(1, Math.ceil(sorted.value.length / props.pageSize)) : 1,\n )\n const safePage = computed(() => Math.min(currentPage.value, pageCount.value - 1))\n const visible = computed<readonly T[]>(() => {\n const pageSize = props.pageSize\n if (!pageSize) return sorted.value\n const start = safePage.value * pageSize\n return sorted.value.slice(start, start + pageSize)\n })\n\n const visibleIds = computed(() => visible.value.map(props.getRowId))\n const selectedSet = computed(() => new Set(selection.value))\n\n const allVisibleSelected = computed(\n () =>\n visibleIds.value.length > 0 && visibleIds.value.every((id) => selectedSet.value.has(id)),\n )\n const someVisibleSelected = computed(() =>\n visibleIds.value.some((id) => selectedSet.value.has(id)),\n )\n\n const toggleAll = (): void => {\n if (allVisibleSelected.value) {\n // Only clears the current page. Wiping selections on other pages would silently discard\n // work when someone selects across pages then unticks the header.\n setSelection(selection.value.filter((id) => !visibleIds.value.includes(id)))\n } else {\n setSelection([...new Set([...selection.value, ...visibleIds.value])])\n }\n }\n\n const toggleRow = (rowId: string): void => {\n setSelection(\n selectedSet.value.has(rowId)\n ? selection.value.filter((v) => v !== rowId)\n : [...selection.value, rowId],\n )\n }\n\n const onSort = (column: Column<T>): void => {\n if (!column.sortable) return\n const state = sortState.value\n // asc → desc → none. The third state matters: without it there is no way back to the data's\n // natural order, which is often \"most recent first\" from the server.\n if (state?.columnId !== column.id) {\n setSortState({ columnId: column.id, direction: 'asc' })\n } else if (state.direction === 'asc') {\n setSortState({ columnId: column.id, direction: 'desc' })\n } else {\n setSortState(null)\n }\n }\n\n return () => {\n const columns = props.columns\n const selectable = props.selectable ?? false\n const density = props.density ?? 'comfortable'\n const striped = props.striped ?? false\n const columnCount = columns.length + (selectable ? 1 : 0)\n const onRowClick = props.onRowClick\n\n const renderBody = (): VNodeChild[] => {\n if (props.loading) {\n return Array.from({ length: props.pageSize ?? 5 }, (_, rowIndex) =>\n h('tr', { key: `skeleton-${rowIndex}`, class: 'ansh-table__row' }, [\n ...Array.from({ length: columnCount }, (_, cellIndex) =>\n h('td', { key: cellIndex, class: 'ansh-table__cell' }, [\n h('span', {\n class: 'ansh-skeleton',\n style: { width: `${50 + ((cellIndex * 37) % 40)}%`, height: '1em' },\n }),\n ]),\n ),\n ]),\n )\n }\n\n if (visible.value.length === 0) {\n return [\n h('tr', {}, [\n h('td', { colspan: columnCount, class: 'ansh-table__empty' }, [\n props.emptyState ? resolveSlotContent(props.emptyState) : 'No results',\n ]),\n ]),\n ]\n }\n\n return visible.value.map((row, index) => {\n const rowId = props.getRowId(row)\n const isSelected = selectedSet.value.has(rowId)\n\n return h(\n 'tr',\n {\n key: rowId,\n class: cx(\n 'ansh-table__row',\n isSelected && 'ansh-table__row--selected',\n Boolean(onRowClick) && 'ansh-table__row--clickable',\n props.rowClassName?.(row),\n ),\n 'aria-selected': selectable ? isSelected : undefined,\n // A click that started on a control inside the row belongs to that control —\n // opening a detail view because someone ticked a checkbox is the classic\n // clickable-row bug.\n onClick: onRowClick\n ? (event: MouseEvent) => {\n const target = event.target as HTMLElement\n if (target.closest('button, a, input, select, textarea')) return\n onRowClick(row)\n }\n : undefined,\n },\n [\n selectable\n ? h('td', { class: 'ansh-table__cell ansh-table__cell--check' }, [\n h('input', {\n type: 'checkbox',\n class: 'ansh-table__checkbox',\n checked: isSelected,\n 'aria-label': `Select row ${index + 1}`,\n onChange: () => toggleRow(rowId),\n }),\n ])\n : null,\n\n ...columns.map((column) =>\n h(\n 'td',\n {\n key: column.id,\n class: cx(\n 'ansh-table__cell',\n column.align && `ansh-table__cell--${column.align}`,\n column.hideBelow && `ansh-hide-below-${column.hideBelow}`,\n ),\n },\n [column.cell(row, index)],\n ),\n ),\n ],\n )\n })\n }\n\n return h(\n 'div',\n {\n class: cx(\n 'ansh-table-wrap',\n props.stickyHeader && 'ansh-table-wrap--sticky',\n attrs.class as string,\n ),\n },\n [\n h(\n 'table',\n { class: cx('ansh-table', `ansh-table--${density}`, striped && 'ansh-table--striped') },\n [\n h('caption', { class: 'ansh-visually-hidden' }, [\n props.caption,\n sortState.value\n ? `, sorted by ${columns.find((c) => c.id === sortState.value!.columnId)?.id} ${sortState.value.direction === 'asc' ? 'ascending' : 'descending'}`\n : '',\n ]),\n\n h('thead', { class: 'ansh-table__head' }, [\n h('tr', {}, [\n selectable\n ? h('th', { scope: 'col', class: 'ansh-table__cell ansh-table__cell--check' }, [\n h('input', {\n type: 'checkbox',\n class: 'ansh-table__checkbox',\n checked: allVisibleSelected.value,\n // Mixed state when only some rows are ticked — announced as \"partially\n // checked\" rather than lying about the state. A fresh function\n // identity every render is what makes Vue re-invoke this ref callback\n // (mirroring the React version's inline ref) so the flag stays current.\n ref: (el) => {\n if (el) {\n ;(el as HTMLInputElement).indeterminate =\n !allVisibleSelected.value && someVisibleSelected.value\n }\n },\n 'aria-label': allVisibleSelected.value\n ? 'Deselect all rows'\n : 'Select all rows',\n onChange: toggleAll,\n }),\n ])\n : null,\n\n ...columns.map((column) => {\n const isSorted = sortState.value?.columnId === column.id\n return h(\n 'th',\n {\n key: column.id,\n scope: 'col',\n class: cx(\n 'ansh-table__cell',\n 'ansh-table__cell--head',\n column.align && `ansh-table__cell--${column.align}`,\n column.hideBelow && `ansh-hide-below-${column.hideBelow}`,\n ),\n style: column.width ? { width: column.width } : undefined,\n // `aria-sort` on the header is what makes a screen reader announce the\n // sort state; the arrow glyph alone conveys nothing.\n 'aria-sort': isSorted\n ? sortState.value!.direction === 'asc'\n ? 'ascending'\n : 'descending'\n : undefined,\n },\n [\n column.sortable\n ? h(\n 'button',\n {\n type: 'button',\n class: 'ansh-table__sort ansh-focusable',\n onClick: () => onSort(column),\n 'aria-label': column.ariaLabel\n ? `Sort by ${column.ariaLabel}`\n : typeof column.header === 'string'\n ? `Sort by ${column.header}`\n : 'Sort column',\n },\n [\n h('span', {}, [resolveSlotContent(column.header)]),\n h(\n 'span',\n {\n class: cx(\n 'ansh-table__arrow',\n isSorted && 'ansh-table__arrow--on',\n ),\n 'aria-hidden': 'true',\n 'data-direction': isSorted\n ? sortState.value!.direction\n : 'none',\n },\n [\n h('svg', { viewBox: '0 0 10 12', width: '10', height: '12' }, [\n h('path', {\n d: 'M5 1v10M2 4l3-3 3 3M2 8l3 3 3-3',\n stroke: 'currentColor',\n 'stroke-width': '1.4',\n fill: 'none',\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n }),\n ]),\n ],\n ),\n ],\n )\n : resolveSlotContent(column.header),\n ],\n )\n }),\n ]),\n ]),\n\n h('tbody', {}, renderBody()),\n ],\n ),\n\n // Selection count and page changes announced without stealing focus.\n h(\n 'span',\n { class: 'ansh-visually-hidden', role: 'status', 'aria-live': 'polite' },\n selectable && selection.value.length > 0 ? `${selection.value.length} selected` : '',\n ),\n\n props.pageSize && pageCount.value > 1\n ? h(Pagination, {\n page: safePage.value,\n pageCount: pageCount.value,\n total: sorted.value.length,\n pageSize: props.pageSize,\n onPageChange: setCurrentPage,\n })\n : null,\n ],\n )\n }\n },\n {\n name: 'AnshDataTable',\n inheritAttrs: false,\n props: DATA_TABLE_PROP_KEYS,\n emits: ['update:sort', 'update:selected', 'update:page'],\n },\n)\n","import { type PropType, defineComponent, h } from 'vue'\nimport { cx } from '../../../primitives/utils'\n\nexport const Table = defineComponent({\n name: 'AnshTable',\n inheritAttrs: false,\n props: {\n caption: { type: String, default: undefined },\n density: { type: String as PropType<'comfortable' | 'compact'>, default: 'comfortable' },\n striped: { type: Boolean, default: false },\n },\n setup(props, { slots, attrs }) {\n return () =>\n h('div', { class: cx('ansh-table-wrap', attrs.class as string) }, [\n h(\n 'table',\n {\n class: cx(\n 'ansh-table',\n `ansh-table--${props.density}`,\n props.striped && 'ansh-table--striped',\n ),\n },\n [\n props.caption ? h('caption', { class: 'ansh-visually-hidden' }, props.caption) : null,\n slots.default?.(),\n ],\n ),\n ])\n },\n})\n","import { type PropType, defineComponent, h } from 'vue'\nimport { type SlotContent, cx, resolveSlotContent } from '../../../primitives/utils'\n\n// --- Badge ------------------------------------------------------------------\n\nexport type BadgeTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info'\n\n/**\n * A status label.\n *\n * Every badge carries its meaning in **text**, not just colour. A red badge reading \"Failed\" works\n * for everyone; a red dot alone works for nobody using a screen reader and for the ~4% of the\n * population with a colour vision deficiency. The `dot` is decorative reinforcement.\n *\n * `children` in the React version becomes the default slot here. Badge extends `HTMLAttributes` in\n * React, so — unlike the rest of this file — arbitrary native attributes fall through, not just\n * `class`.\n */\nexport const Badge = defineComponent({\n name: 'AnshBadge',\n inheritAttrs: false,\n props: {\n tone: { type: String as PropType<BadgeTone>, default: 'neutral' },\n variant: { type: String as PropType<'soft' | 'solid' | 'outline'>, default: 'soft' },\n size: { type: String as PropType<'sm' | 'md'>, default: 'md' },\n /** Leading dot. Useful for statuses where the label is short. */\n dot: { type: Boolean, default: false },\n icon: { type: [String, Object, Function] as PropType<SlotContent>, default: undefined },\n },\n setup(props, { slots, attrs }) {\n return () => {\n const { class: attrClass, ...restAttrs } = attrs as Record<string, unknown>\n return h(\n 'span',\n {\n class: cx(\n 'ansh-badge',\n `ansh-badge--${props.tone}`,\n `ansh-badge--${props.variant}`,\n `ansh-badge--${props.size}`,\n attrClass as string,\n ),\n ...restAttrs,\n },\n [\n props.dot ? h('span', { class: 'ansh-badge__dot', 'aria-hidden': 'true' }) : null,\n props.icon\n ? h('span', { class: 'ansh-badge__icon' }, [resolveSlotContent(props.icon)])\n : null,\n slots.default?.(),\n ],\n )\n }\n },\n})\n","import { type PropType, type VNode, computed, defineComponent, h, ref } from 'vue'\nimport { parseColor, pickReadable, toHex } from '@ansh-ui/core'\nimport { cx } from '../../../primitives/utils'\n\n// --- Avatar -------------------------------------------------------------------\n\nexport interface AvatarProps {\n src?: string\n /** The person's name. Used for the alt text and to derive the fallback initials. */\n name: string\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n shape?: 'circle' | 'square'\n /** Presence indicator. */\n status?: 'online' | 'offline' | 'busy' | 'away'\n}\n\n/** First letters of the first and last words — \"Ada Lovelace\" → \"AL\". */\nfunction initials(name: string): string {\n const words = name.trim().split(/\\s+/).filter(Boolean)\n if (words.length === 0) return '?'\n if (words.length === 1) return words[0]!.slice(0, 2).toUpperCase()\n return (words[0]![0]! + words[words.length - 1]![0]!).toUpperCase()\n}\n\n/** Stable hash so the same name always gets the same colour. */\nfunction hash(text: string): number {\n let value = 0\n for (let i = 0; i < text.length; i++) {\n value = (value * 31 + text.charCodeAt(i)) | 0\n }\n return Math.abs(value)\n}\n\n/**\n * Avatar extends `HTMLAttributes` in React too, so arbitrary attributes fall through here as well.\n *\n * The fallback colour is derived from the name via `@ansh-ui/core`'s colour engine, then the *text*\n * colour is chosen for contrast against it with `pickReadable` — reused rather than reimplemented, as\n * required. Picking a random background and hardcoding white text is how you get illegible initials\n * on a pale hue, and it is the most common avatar bug there is.\n */\nexport const Avatar = defineComponent({\n name: 'AnshAvatar',\n inheritAttrs: false,\n props: {\n src: { type: String, default: undefined },\n name: { type: String, required: true },\n size: { type: String as PropType<'xs' | 'sm' | 'md' | 'lg' | 'xl'>, default: 'md' },\n shape: { type: String as PropType<'circle' | 'square'>, default: 'circle' },\n status: {\n type: String as PropType<'online' | 'offline' | 'busy' | 'away'>,\n default: undefined,\n },\n },\n setup(props, { attrs }) {\n const failed = ref(false)\n\n // OKLCH rather than HSL for the generated hue: at fixed HSL lightness the yellows come out far\n // brighter than the blues, so a set of avatars looks uneven. Fixed OKLCH lightness is\n // perceptually even across the whole hue circle, which is the entire reason to use it here.\n const colors = computed(() => {\n const hue = hash(props.name) % 360\n const backgroundHex = toHex(parseColor(`oklch(72% 0.13 ${hue})`))\n return {\n background: backgroundHex,\n foreground: toHex(pickReadable(backgroundHex, '#ffffff', '#101828')),\n }\n })\n\n const showImage = computed(() => Boolean(props.src) && !failed.value)\n\n return () => {\n const { class: attrClass, ...restAttrs } = attrs as Record<string, unknown>\n return h(\n 'span',\n {\n class: cx(\n 'ansh-avatar',\n `ansh-avatar--${props.size}`,\n `ansh-avatar--${props.shape}`,\n attrClass as string,\n ),\n ...restAttrs,\n },\n [\n showImage.value\n ? h('img', {\n src: props.src,\n alt: props.name,\n class: 'ansh-avatar__image',\n // Falling back on error rather than showing a broken-image icon, which is what a\n // bare `<img>` does when a CDN URL expires.\n onError: () => {\n failed.value = true\n },\n })\n : h(\n 'span',\n {\n class: 'ansh-avatar__fallback',\n style: { background: colors.value.background, color: colors.value.foreground },\n 'aria-hidden': 'true',\n },\n initials(props.name),\n ),\n\n // The name is always available to assistive technology, even when the initials are\n // shown as decorative.\n !showImage.value ? h('span', { class: 'ansh-visually-hidden' }, props.name) : null,\n\n props.status\n ? h(\n 'span',\n { class: cx('ansh-avatar__status', `ansh-avatar__status--${props.status}`) },\n [h('span', { class: 'ansh-visually-hidden' }, props.status)],\n )\n : null,\n ],\n )\n }\n },\n})\n\n/** Overlapping avatars with an overflow count. */\nexport const AvatarGroup = defineComponent({\n name: 'AnshAvatarGroup',\n inheritAttrs: false,\n props: {\n /** Maximum shown before collapsing into a \"+N\" chip. Default `4`. */\n max: { type: Number, default: 4 },\n size: { type: String as PropType<AvatarProps['size']>, default: undefined },\n },\n setup(props, { slots, attrs }) {\n return () => {\n const items: VNode[] = slots.default?.() ?? []\n const shown = items.slice(0, props.max)\n const overflow = items.length - shown.length\n\n return h(\n 'span',\n {\n class: cx(\n 'ansh-avatar-group',\n props.size && `ansh-avatar-group--${props.size}`,\n attrs.class as string,\n ),\n },\n [\n shown,\n overflow > 0\n ? h(\n 'span',\n {\n class: cx(\n 'ansh-avatar',\n props.size && `ansh-avatar--${props.size}`,\n 'ansh-avatar--circle',\n 'ansh-avatar--more',\n ),\n },\n [\n h(\n 'span',\n { class: 'ansh-avatar__fallback', 'aria-hidden': 'true' },\n `+${overflow}`,\n ),\n h('span', { class: 'ansh-visually-hidden' }, `and ${overflow} more`),\n ],\n )\n : null,\n ],\n )\n }\n },\n})\n","import { defineComponent, h } from 'vue'\nimport { cx } from '../../../primitives/utils'\n\n// --- Kbd ------------------------------------------------------------------\n\n/**\n * A keyboard key.\n *\n * Splits on `+` so `<Kbd>⌘+K</Kbd>` renders two keys with a separator, and the separator is\n * `aria-hidden` — a screen reader should say \"command K\", not \"command plus K\".\n *\n * The React version types its children as a plain `string` rather than a general `ReactNode`, since\n * the split only makes sense on literal text. The default slot is kept here (matching the React\n * call site, `<Kbd>⌘+K</Kbd>`) rather than switching to a string prop, and the text is recovered from\n * the rendered slot nodes — which is exactly what that slot is expected to contain.\n */\nexport const Kbd = defineComponent({\n name: 'AnshKbd',\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n return () => {\n const nodes = slots.default?.() ?? []\n const text = nodes\n .map((node) => (typeof node.children === 'string' ? node.children : ''))\n .join('')\n const keys = text.split('+').map((key) => key.trim())\n\n return h(\n 'span',\n { class: cx('ansh-kbd-group', attrs.class as string) },\n keys.map((key, index) =>\n h('span', { key: `${key}-${index}` }, [\n index > 0 ? h('span', { class: 'ansh-kbd__plus', 'aria-hidden': 'true' }, '+') : null,\n h('kbd', { class: 'ansh-kbd' }, key),\n ]),\n ),\n )\n }\n },\n})\n","import { type PropType, defineComponent, h } from 'vue'\nimport { type SlotContent, cx, resolveSlotContent } from '../../../primitives/utils'\n\n// --- Stat -------------------------------------------------------------------\n\nexport interface StatProps {\n label: SlotContent\n value: SlotContent\n /** Change since the previous period. Sign decides the direction and colour. */\n delta?: number\n /** How the delta reads — `'2.4%'` or `'+18 users'`. Defaults to the number with a sign. */\n deltaLabel?: string\n /** For metrics where down is good, like churn or latency. */\n invertDelta?: boolean\n hint?: SlotContent\n icon?: SlotContent\n}\n\n/**\n * A single metric — the building block of every dashboard.\n *\n * The delta's direction is shown by an arrow *and* a sign *and* a colour. Three redundant signals\n * because this is the number people scan fastest and misreading it has consequences.\n */\nexport const Stat = defineComponent({\n name: 'AnshStat',\n inheritAttrs: false,\n props: {\n label: { type: [String, Object, Function] as PropType<SlotContent>, required: true },\n value: { type: [String, Object, Function] as PropType<SlotContent>, required: true },\n delta: { type: Number, default: undefined },\n deltaLabel: { type: String, default: undefined },\n invertDelta: { type: Boolean, default: false },\n hint: { type: [String, Object, Function] as PropType<SlotContent>, default: undefined },\n icon: { type: [String, Object, Function] as PropType<SlotContent>, default: undefined },\n },\n setup(props, { attrs }) {\n return () => {\n const delta = props.delta\n const positive = delta !== undefined && delta > 0\n const negative = delta !== undefined && delta < 0\n const good = props.invertDelta ? negative : positive\n\n return h('div', { class: cx('ansh-stat', attrs.class as string) }, [\n h('div', { class: 'ansh-stat__head' }, [\n h('span', { class: 'ansh-stat__label' }, [resolveSlotContent(props.label)]),\n props.icon\n ? h('span', { class: 'ansh-stat__icon' }, [resolveSlotContent(props.icon)])\n : null,\n ]),\n\n h('div', { class: 'ansh-stat__value' }, [resolveSlotContent(props.value)]),\n\n delta !== undefined\n ? h(\n 'div',\n {\n class: cx(\n 'ansh-stat__delta',\n delta !== 0 && (good ? 'ansh-stat__delta--good' : 'ansh-stat__delta--bad'),\n ),\n },\n [\n h(\n 'span',\n { class: 'ansh-stat__arrow', 'aria-hidden': 'true' },\n positive ? '↑' : negative ? '↓' : '→',\n ),\n h('span', {}, props.deltaLabel ?? `${delta > 0 ? '+' : ''}${delta}%`),\n props.hint\n ? h('span', { class: 'ansh-stat__hint' }, [resolveSlotContent(props.hint)])\n : null,\n ],\n )\n : props.hint\n ? h('div', { class: 'ansh-stat__hint' }, [resolveSlotContent(props.hint)])\n : null,\n ])\n }\n },\n})\n","import { type PropType, defineComponent, h } from 'vue'\nimport { type SlotContent, cx, resolveSlotContent } from '../../../primitives/utils'\n\n// --- Empty state --------------------------------------------------------------\n\nexport interface EmptyStateProps {\n title: SlotContent\n description?: SlotContent\n icon?: SlotContent\n /** The action that resolves the emptiness — \"Create your first invoice\". */\n action?: SlotContent\n size?: 'sm' | 'md'\n}\n\n/**\n * The \"nothing here yet\" panel.\n *\n * Always offers the next step. An empty state that only says \"No results\" leaves the user to work\n * out whether the filter is wrong, the data hasn't loaded, or they need to create something — and\n * that ambiguity is where people abandon a screen.\n */\nexport const EmptyState = defineComponent({\n name: 'AnshEmptyState',\n inheritAttrs: false,\n props: {\n title: { type: [String, Object, Function] as PropType<SlotContent>, required: true },\n description: { type: [String, Object, Function] as PropType<SlotContent>, default: undefined },\n icon: { type: [String, Object, Function] as PropType<SlotContent>, default: undefined },\n action: { type: [String, Object, Function] as PropType<SlotContent>, default: undefined },\n size: { type: String as PropType<'sm' | 'md'>, default: 'md' },\n },\n setup(props, { attrs }) {\n return () =>\n h('div', { class: cx('ansh-empty', `ansh-empty--${props.size}`, attrs.class as string) }, [\n props.icon\n ? h('span', { class: 'ansh-empty__icon', 'aria-hidden': 'true' }, [\n resolveSlotContent(props.icon),\n ])\n : null,\n h('p', { class: 'ansh-empty__title' }, [resolveSlotContent(props.title)]),\n props.description\n ? h('p', { class: 'ansh-empty__description' }, [resolveSlotContent(props.description)])\n : null,\n props.action\n ? h('div', { class: 'ansh-empty__action' }, [resolveSlotContent(props.action)])\n : null,\n ])\n },\n})\n","import { type PropType, defineComponent, h } from 'vue'\nimport { type SlotContent, cx, resolveSlotContent } from '../../../primitives/utils'\n\n// --- Description list -----------------------------------------------------\n\nexport interface DescriptionListProps {\n items: ReadonlyArray<{ term: SlotContent; description: SlotContent }>\n /** Side-by-side rather than stacked. Default `'horizontal'` on wide screens. */\n orientation?: 'horizontal' | 'vertical'\n}\n\n/**\n * Key–value pairs — the detail panel of every record in a CRM.\n *\n * A real `<dl>`/`<dt>`/`<dd>`, which is what makes a screen reader pair each label with its value\n * instead of reading twenty unconnected strings.\n */\nexport const DescriptionList = defineComponent({\n name: 'AnshDescriptionList',\n inheritAttrs: false,\n props: {\n items: {\n type: Array as PropType<DescriptionListProps['items']>,\n required: true,\n },\n orientation: { type: String as PropType<'horizontal' | 'vertical'>, default: 'horizontal' },\n },\n setup(props, { attrs }) {\n return () =>\n h(\n 'dl',\n { class: cx('ansh-dl', `ansh-dl--${props.orientation}`, attrs.class as string) },\n props.items.map((item, index) =>\n h('div', { class: 'ansh-dl__row', key: index }, [\n h('dt', { class: 'ansh-dl__term' }, [resolveSlotContent(item.term)]),\n h('dd', { class: 'ansh-dl__description' }, [resolveSlotContent(item.description)]),\n ]),\n ),\n )\n },\n})\n","import { type PropType, defineComponent, h } from 'vue'\nimport { type SlotContent, cx, resolveSlotContent } from '../../../primitives/utils'\nimport { type BadgeTone } from './badge'\n\n// --- Timeline ---------------------------------------------------------------\n\nexport interface TimelineItem {\n id: string\n title: SlotContent\n description?: SlotContent\n /** Rendered as-is; pass an already-formatted string or a `<time>` VNode. */\n timestamp?: SlotContent\n icon?: SlotContent\n tone?: BadgeTone\n}\n\n/**\n * A chronological feed — audit logs, order history, activity streams.\n *\n * An ordered list, because the order carries meaning. The connecting line is drawn with a\n * pseudo-element on the list item rather than a real element, so it can't be selected, read, or land\n * in a copy-paste of the page.\n */\nexport const Timeline = defineComponent({\n name: 'AnshTimeline',\n inheritAttrs: false,\n props: {\n items: { type: Array as PropType<readonly TimelineItem[]>, required: true },\n },\n setup(props, { attrs }) {\n return () =>\n h(\n 'ol',\n { class: cx('ansh-timeline', attrs.class as string) },\n props.items.map((item) =>\n h(\n 'li',\n {\n key: item.id,\n class: cx('ansh-timeline__item', item.tone && `ansh-timeline__item--${item.tone}`),\n },\n [\n h('span', { class: 'ansh-timeline__marker', 'aria-hidden': 'true' }, [\n item.icon ? resolveSlotContent(item.icon) : null,\n ]),\n h('div', { class: 'ansh-timeline__body' }, [\n h('div', { class: 'ansh-timeline__head' }, [\n h('span', { class: 'ansh-timeline__title' }, [resolveSlotContent(item.title)]),\n item.timestamp\n ? h('span', { class: 'ansh-timeline__time' }, [\n resolveSlotContent(item.timestamp),\n ])\n : null,\n ]),\n item.description\n ? h('p', { class: 'ansh-timeline__description' }, [\n resolveSlotContent(item.description),\n ])\n : null,\n ]),\n ],\n ),\n ),\n )\n },\n})\n","import { defineComponent, h, onBeforeUnmount, ref } from 'vue'\nimport { cx } from '../../../primitives/utils'\n\n// --- Code block ---------------------------------------------------------------\n\nexport interface CodeBlockProps {\n code: string\n language?: string\n /** Show a copy button. Default `true`. */\n copyable?: boolean\n /** Show line numbers. */\n lineNumbers?: boolean\n /** Filename or title shown in the header bar. */\n filename?: string\n}\n\n/**\n * A code block with a copy button.\n *\n * No syntax highlighter, matching the React version — shipping one means a tokeniser and a theme in\n * the bundle of every app that displays a snippet, for a cost that lands on consumers who may never\n * render code at all.\n */\nexport const CodeBlock = defineComponent({\n name: 'AnshCodeBlock',\n inheritAttrs: false,\n props: {\n code: { type: String, required: true },\n language: { type: String, default: 'tsx' },\n copyable: { type: Boolean, default: true },\n lineNumbers: { type: Boolean, default: false },\n filename: { type: String, default: undefined },\n },\n setup(props, { attrs }) {\n const copied = ref(false)\n let timer: ReturnType<typeof setTimeout> | undefined\n\n const copy = async (): Promise<void> => {\n try {\n await navigator.clipboard.writeText(props.code)\n copied.value = true\n clearTimeout(timer)\n timer = setTimeout(() => {\n copied.value = false\n }, 1600)\n } catch {\n // Clipboard access is refused on insecure origins and under some permission policies. The\n // code is selectable either way, so failing quietly beats an error dialog.\n }\n }\n\n onBeforeUnmount(() => clearTimeout(timer))\n\n return () => {\n const lines = props.code.split('\\n')\n\n return h('div', { class: cx('ansh-code', attrs.class as string) }, [\n props.filename || props.copyable\n ? h('div', { class: 'ansh-code__bar' }, [\n h('span', { class: 'ansh-code__filename' }, props.filename ?? props.language),\n props.copyable\n ? h(\n 'button',\n { type: 'button', class: 'ansh-code__copy ansh-focusable', onClick: copy },\n [\n copied.value ? 'Copied' : 'Copy',\n h('span', { class: 'ansh-visually-hidden' }, ' code to clipboard'),\n ],\n )\n : null,\n ])\n : null,\n\n h('pre', { class: cx('ansh-code__pre', props.lineNumbers && 'ansh-code__pre--numbered') }, [\n h(\n 'code',\n { class: `language-${props.language}` },\n props.lineNumbers\n ? lines.map((line, index) =>\n h('span', { class: 'ansh-code__line', key: index }, [\n h(\n 'span',\n { class: 'ansh-code__lineno', 'aria-hidden': 'true' },\n String(index + 1),\n ),\n line,\n '\\n',\n ]),\n )\n : props.code,\n ),\n ]),\n ])\n }\n },\n})\n","import { type PropType, defineComponent, h } from 'vue'\nimport { cx } from '../../primitives/utils'\n\n/**\n * Progress indicators — the Vue counterpart of `@ansh-ui/react`'s `Progress`/`CircularProgress`/\n * `Meter`.\n *\n * The distinction that matters and is usually missed: **progress** is work advancing toward\n * completion (`role=\"progressbar\"`), a **meter** is a static measurement within a range\n * (`role=\"meter\"` — disk usage, a score, a quota). Announcing a disk-usage bar as progress tells a\n * screen-reader user that something is loading, which it isn't.\n */\n\nexport interface ProgressProps {\n /** `0`–`max`. Omit for an indeterminate bar. */\n value?: number\n max?: number\n size?: 'sm' | 'md' | 'lg'\n tone?: 'accent' | 'success' | 'warning' | 'danger'\n /** Accessible name — \"Upload progress\", not \"Progress\". */\n label: string\n /** Show the label and percentage above the bar. */\n showLabel?: boolean\n /** Override the announced/displayed text. */\n formatValue?: (value: number, max: number) => string\n}\n\nexport const Progress = defineComponent({\n name: 'AnshProgress',\n inheritAttrs: false,\n props: {\n value: { type: Number, default: undefined },\n max: { type: Number, default: 100 },\n size: { type: String as PropType<'sm' | 'md' | 'lg'>, default: 'md' },\n tone: {\n type: String as PropType<'accent' | 'success' | 'warning' | 'danger'>,\n default: 'accent',\n },\n label: { type: String, required: true },\n showLabel: { type: Boolean, default: false },\n formatValue: {\n type: Function as PropType<(value: number, max: number) => string>,\n default: undefined,\n },\n },\n setup(props, { attrs }) {\n return () => {\n const rawValue = props.value\n const indeterminate = rawValue === undefined\n const clamped = rawValue === undefined ? 0 : Math.min(Math.max(rawValue, 0), props.max)\n const percent = (clamped / props.max) * 100\n const text = props.formatValue\n ? props.formatValue(clamped, props.max)\n : `${Math.round(percent)}%`\n\n return h(\n 'div',\n {\n class: cx(\n 'ansh-progress',\n `ansh-progress--${props.size}`,\n `ansh-progress--${props.tone}`,\n attrs.class as string,\n ),\n },\n [\n props.showLabel\n ? h('div', { class: 'ansh-progress__labels' }, [\n h('span', { class: 'ansh-progress__label' }, props.label),\n !indeterminate ? h('span', { class: 'ansh-progress__value' }, text) : null,\n ])\n : null,\n\n h(\n 'div',\n {\n class: cx(\n 'ansh-progress__track',\n indeterminate && 'ansh-progress__track--indeterminate',\n ),\n role: 'progressbar',\n 'aria-label': props.label,\n // An indeterminate progressbar omits `aria-valuenow` entirely. Setting it to 0 would\n // be announced as \"0 percent\", implying stalled work rather than unknown duration.\n ...(indeterminate\n ? null\n : {\n 'aria-valuenow': clamped,\n 'aria-valuemin': 0,\n 'aria-valuemax': props.max,\n 'aria-valuetext': text,\n }),\n },\n [\n h('div', {\n class: 'ansh-progress__fill',\n style: indeterminate ? undefined : { width: `${percent}%` },\n }),\n ],\n ),\n ],\n )\n }\n },\n})\n\nexport interface CircularProgressProps extends Omit<ProgressProps, 'size'> {\n /** Diameter in px. Default `48`. */\n size?: number\n /** Ring thickness in px. Default `4`. */\n thickness?: number\n}\n\n/**\n * A ring progress indicator.\n *\n * Drawn with `stroke-dasharray` on an SVG circle rather than with conic gradients, so the ends can\n * be rounded and the ring animates smoothly at any size. The circle is rotated -90° so 0% starts at\n * the top, which is where everyone expects it.\n *\n * `children` in the React version — content in the middle, usually the percentage — becomes the\n * default slot here.\n */\nexport const CircularProgress = defineComponent({\n name: 'AnshCircularProgress',\n inheritAttrs: false,\n props: {\n value: { type: Number, default: undefined },\n max: { type: Number, default: 100 },\n size: { type: Number, default: 48 },\n thickness: { type: Number, default: 4 },\n tone: {\n type: String as PropType<'accent' | 'success' | 'warning' | 'danger'>,\n default: 'accent',\n },\n label: { type: String, required: true },\n formatValue: {\n type: Function as PropType<(value: number, max: number) => string>,\n default: undefined,\n },\n },\n setup(props, { attrs, slots }) {\n return () => {\n const rawValue = props.value\n const indeterminate = rawValue === undefined\n const clamped = rawValue === undefined ? 25 : Math.min(Math.max(rawValue, 0), props.max)\n const fraction = clamped / props.max\n\n const radius = (props.size - props.thickness) / 2\n const circumference = 2 * Math.PI * radius\n const text = props.formatValue\n ? props.formatValue(clamped, props.max)\n : `${Math.round(fraction * 100)}%`\n\n return h(\n 'div',\n {\n class: cx(\n 'ansh-ring',\n `ansh-ring--${props.tone}`,\n indeterminate && 'ansh-ring--indeterminate',\n attrs.class as string,\n ),\n style: { width: `${props.size}px`, height: `${props.size}px` },\n role: 'progressbar',\n 'aria-label': props.label,\n ...(indeterminate\n ? null\n : {\n 'aria-valuenow': clamped,\n 'aria-valuemin': 0,\n 'aria-valuemax': props.max,\n 'aria-valuetext': text,\n }),\n },\n [\n h(\n 'svg',\n {\n width: props.size,\n height: props.size,\n viewBox: `0 0 ${props.size} ${props.size}`,\n 'aria-hidden': 'true',\n },\n [\n h('circle', {\n class: 'ansh-ring__track',\n cx: props.size / 2,\n cy: props.size / 2,\n r: radius,\n fill: 'none',\n 'stroke-width': props.thickness,\n }),\n h('circle', {\n class: 'ansh-ring__fill',\n cx: props.size / 2,\n cy: props.size / 2,\n r: radius,\n fill: 'none',\n 'stroke-width': props.thickness,\n 'stroke-linecap': 'round',\n 'stroke-dasharray': circumference,\n 'stroke-dashoffset': circumference * (1 - fraction),\n transform: `rotate(-90 ${props.size / 2} ${props.size / 2})`,\n }),\n ],\n ),\n slots.default ? h('span', { class: 'ansh-ring__content' }, slots.default()) : null,\n ],\n )\n }\n },\n})\n\nexport interface MeterProps {\n value: number\n min?: number\n max?: number\n /** Thresholds that colour the bar — below `low` is danger, above `high` is success. */\n low?: number\n high?: number\n /** Flip the colours, for metrics where high is bad (disk usage, error rate). */\n inverted?: boolean\n label: string\n showValue?: boolean\n formatValue?: (value: number) => string\n}\n\n/**\n * A measurement within a known range — quota, score, capacity.\n *\n * `role=\"meter\"`, not `progressbar`. Colour follows the thresholds, but the numeric value is always\n * rendered too, so the state is never conveyed by colour alone.\n */\nexport const Meter = defineComponent({\n name: 'AnshMeter',\n inheritAttrs: false,\n props: {\n value: { type: Number, required: true },\n min: { type: Number, default: 0 },\n max: { type: Number, default: 100 },\n low: { type: Number, default: undefined },\n high: { type: Number, default: undefined },\n inverted: { type: Boolean, default: false },\n label: { type: String, required: true },\n showValue: { type: Boolean, default: true },\n formatValue: { type: Function as PropType<(value: number) => string>, default: undefined },\n },\n setup(props, { attrs }) {\n return () => {\n const clamped = Math.min(Math.max(props.value, props.min), props.max)\n const percent = ((clamped - props.min) / (props.max - props.min)) * 100\n\n let tone: 'danger' | 'warning' | 'success' = 'success'\n if (props.low !== undefined && clamped < props.low)\n tone = props.inverted ? 'success' : 'danger'\n else if (props.high !== undefined && clamped > props.high)\n tone = props.inverted ? 'danger' : 'success'\n else if (props.low !== undefined || props.high !== undefined) tone = 'warning'\n\n const text = props.formatValue ? props.formatValue(clamped) : String(clamped)\n\n return h('div', { class: cx('ansh-meter', `ansh-meter--${tone}`, attrs.class as string) }, [\n h('div', { class: 'ansh-progress__labels' }, [\n h('span', { class: 'ansh-progress__label' }, props.label),\n props.showValue ? h('span', { class: 'ansh-progress__value' }, text) : null,\n ]),\n h(\n 'div',\n {\n class: 'ansh-progress__track',\n role: 'meter',\n 'aria-label': props.label,\n 'aria-valuenow': clamped,\n 'aria-valuemin': props.min,\n 'aria-valuemax': props.max,\n 'aria-valuetext': text,\n },\n [h('div', { class: 'ansh-progress__fill', style: { width: `${percent}%` } })],\n ),\n ])\n }\n },\n})\n"]}
|