merge: integrate reviewed M30-M32 with NumberField Slider and migration lessons

This commit is contained in:
maoyingjie
2026-10-23 13:55:44 +08:00
84 changed files with 5673 additions and 10 deletions
+49
View File
@@ -0,0 +1,49 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { createSSRApp, h } from "vue";
import { renderToString } from "@vue/server-renderer";
import {
InputOTP,
InputOTPGroup,
InputOTPSlot,
Label,
Header,
Pagination,
PaginationContent,
PaginationItem,
PaginationLink,
} from "@heroui-vue/components";
const html = await renderToString(
createSSRApp({
render: () =>
h("div", [
h(Header, {}, () => "Heading"),
h(Pagination, {}, () =>
h(PaginationContent, {}, () =>
h(PaginationItem, {}, () =>
h(PaginationLink, { "aria-current": "step" }, () => "1"),
),
),
),
h(InputOTP, { maxLength: 2, defaultValue: "12", name: "code" }, () => [
h(Label, { id: "consumer-label" }, () => "Security code"),
h(InputOTPGroup, {}, () => [
h(InputOTPSlot, { index: 0 }),
h(InputOTPSlot, { index: 1 }),
]),
]),
]),
}),
);
assert(html.includes('data-slot="header"'));
assert(html.includes('aria-current="step"'));
assert.equal(html.match(/aria-labelledby="consumer-label"/g)?.length, 2);
assert(html.includes('value="12"'));
assert(html.includes('name="code"'));
const css = readFileSync(
new URL(import.meta.resolve("@heroui-vue/styles/css")),
"utf8",
);
for (const name of ["hv-header", "hv-pagination", "hv-input-otp"])
assert(css.includes(name));
console.log("M30–M32 independent tarball ESM/SSR/ARIA/CSS passed.");