@beehexa/design-rules 2611.5.2 → 2611.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/catalog.json CHANGED
@@ -1210,8 +1210,8 @@
1210
1210
  "status": "active",
1211
1211
  "releasePhase": null,
1212
1212
  "planned": [],
1213
- "body": "import NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1214
- "raw": "---\ntitle: Ant Design Vue theme\ndescription: Make Ant Design Vue components use Beehexa design tokens, breakpoints, grid, control heights and app frame.\norder: 3\n---\nimport NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1213
+ "body": "import NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## Thin navigation Progress\n\nFor route-loading feedback use real native `Progress` with `bh-ant-navigation-progress`,\n`showInfo=false`, `status=\"normal\"`, `strokeLinecap=\"square\"` and its native size tuple.\nUse `border.width.focused` for the thin line and `color.brand.yellow` for its optional\nbrand stroke. The application owns fixed viewport positioning at `top: 0`, width and\nthe loading z-index; the adapter removes AntD's inline baseline gap and outer margins,\nso the actual ink begins at the allocated top edge without negative offsets.\n\nProgress reflects completed navigation milestones, not invented network percentages.\nKeep the previous page while guards and route chunks resolve, advance to100%, and await\nthe actual finite native width transition before committing the new page. Cancellation,\nerrors and superseding navigation must clear their own progress without clearing a newer\nrequest. The source width transition uses `motion.duration.default` and\n`motion.easing.linear`; reduced motion removes it. Keep a named progressbar with actual\nmilestone values, and never use a page-covering scrim just to load a route.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1214
+ "raw": "---\ntitle: Ant Design Vue theme\ndescription: Make Ant Design Vue components use Beehexa design tokens, breakpoints, grid, control heights and app frame.\norder: 3\n---\nimport NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## Thin navigation Progress\n\nFor route-loading feedback use real native `Progress` with `bh-ant-navigation-progress`,\n`showInfo=false`, `status=\"normal\"`, `strokeLinecap=\"square\"` and its native size tuple.\nUse `border.width.focused` for the thin line and `color.brand.yellow` for its optional\nbrand stroke. The application owns fixed viewport positioning at `top: 0`, width and\nthe loading z-index; the adapter removes AntD's inline baseline gap and outer margins,\nso the actual ink begins at the allocated top edge without negative offsets.\n\nProgress reflects completed navigation milestones, not invented network percentages.\nKeep the previous page while guards and route chunks resolve, advance to100%, and await\nthe actual finite native width transition before committing the new page. Cancellation,\nerrors and superseding navigation must clear their own progress without clearing a newer\nrequest. The source width transition uses `motion.duration.default` and\n`motion.easing.linear`; reduced motion removes it. Keep a named progressbar with actual\nmilestone values, and never use a page-covering scrim just to load a route.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1215
1215
  "frontmatter": {
1216
1216
  "title": "Ant Design Vue theme",
1217
1217
  "description": "Make Ant Design Vue components use Beehexa design tokens, breakpoints, grid, control heights and app frame.",
@@ -592,6 +592,23 @@ upload and countdown progress do not opt in. The shared live matrix below
592
592
  includes a real native no-opt-in comparison, editable total and first/middle/
593
593
  final controls; check both root16 and root20, light/dark and narrow widths.
594
594
 
595
+ ## Thin navigation Progress
596
+
597
+ For route-loading feedback use real native `Progress` with `bh-ant-navigation-progress`,
598
+ `showInfo=false`, `status="normal"`, `strokeLinecap="square"` and its native size tuple.
599
+ Use `border.width.focused` for the thin line and `color.brand.yellow` for its optional
600
+ brand stroke. The application owns fixed viewport positioning at `top: 0`, width and
601
+ the loading z-index; the adapter removes AntD's inline baseline gap and outer margins,
602
+ so the actual ink begins at the allocated top edge without negative offsets.
603
+
604
+ Progress reflects completed navigation milestones, not invented network percentages.
605
+ Keep the previous page while guards and route chunks resolve, advance to100%, and await
606
+ the actual finite native width transition before committing the new page. Cancellation,
607
+ errors and superseding navigation must clear their own progress without clearing a newer
608
+ request. The source width transition uses `motion.duration.default` and
609
+ `motion.easing.linear`; reduced motion removes it. Keep a named progressbar with actual
610
+ milestone values, and never use a page-covering scrim just to load a route.
611
+
595
612
  ## One native control family, distinct roles
596
613
 
597
614
  Use native default Button for compact bordered utility triggers (including
package/dist/index.js CHANGED
@@ -1211,8 +1211,8 @@ export const catalog = [
1211
1211
  "status": "active",
1212
1212
  "releasePhase": null,
1213
1213
  "planned": [],
1214
- "body": "import NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1215
- "raw": "---\ntitle: Ant Design Vue theme\ndescription: Make Ant Design Vue components use Beehexa design tokens, breakpoints, grid, control heights and app frame.\norder: 3\n---\nimport NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1214
+ "body": "import NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## Thin navigation Progress\n\nFor route-loading feedback use real native `Progress` with `bh-ant-navigation-progress`,\n`showInfo=false`, `status=\"normal\"`, `strokeLinecap=\"square\"` and its native size tuple.\nUse `border.width.focused` for the thin line and `color.brand.yellow` for its optional\nbrand stroke. The application owns fixed viewport positioning at `top: 0`, width and\nthe loading z-index; the adapter removes AntD's inline baseline gap and outer margins,\nso the actual ink begins at the allocated top edge without negative offsets.\n\nProgress reflects completed navigation milestones, not invented network percentages.\nKeep the previous page while guards and route chunks resolve, advance to100%, and await\nthe actual finite native width transition before committing the new page. Cancellation,\nerrors and superseding navigation must clear their own progress without clearing a newer\nrequest. The source width transition uses `motion.duration.default` and\n`motion.easing.linear`; reduced motion removes it. Keep a named progressbar with actual\nmilestone values, and never use a page-covering scrim just to load a route.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1215
+ "raw": "---\ntitle: Ant Design Vue theme\ndescription: Make Ant Design Vue components use Beehexa design tokens, breakpoints, grid, control heights and app frame.\norder: 3\n---\nimport NativeControlsDemo from '../../components/NativeControlsDemo.astro';\n\n`@beehexa/ant-design-vue-tokens` owns the reusable Ant Design Vue 4 adapter.\nUse its typed ESM API and companion CSS, backed by `@beehexa/design-tokens`.\nFrameworks are peers: `ant-design-vue@^4.2.6` and `vue@^3.3.0`; neither is bundled.\nUnreleased `0.0.0` packages use explicit local development references; only the authorized\nrelease runner stamps real package versions. Do not copy a theme palette into an application.\n\n**Beehexa tokens are the source of truth. Ant Design Vue only reads them.**\n\nThis page is the only place where the Beehexa foundations meet Ant Design Vue. The foundation pages stay the same whatever the product is built with.\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { computed, watchEffect } from 'vue';\nimport { createAntDesignVueTheme, getAntDesignVuePopupContainer, useAntDesignVueRootFontSize } from '@beehexa/ant-design-vue-tokens';\nimport '@beehexa/design-tokens/css';\nimport '@beehexa/ant-design-vue-tokens/css';\n\nconst props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>();\nconst rootFontSize = useAntDesignVueRootFontSize();\nconst theme = computed(() => createAntDesignVueTheme({\n dark: props.dark, locale: props.locale, rootFontSize: rootFontSize.value\n}));\nwatchEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.dataset.theme = props.dark ? 'dark' : 'light';\n document.documentElement.lang = props.locale;\n});\n</script>\n\n<template>\n <a-config-provider :theme=\"theme\" :get-popup-container=\"getAntDesignVuePopupContainer\">\n <App />\n </a-config-provider>\n</template>\n```\n\n`createAntDesignVueTheme({ dark = false, locale = 'en', rootFontSize = 16 } = {})`\nreturns the native `ThemeConfig`. Recompute on theme/language/root-font changes;\neach call returns a fresh object. `locale` selects source typography, not messages.\nThe setup-only source observer measures one inert1rem probe and cleans it up.\nThis keeps numeric native size/type/radius APIs aligned with scalable CSS units;\npixel-based borders and breakpoints do not scale. The pure factory reads no DOM.\nPass the appropriate AntD language pack through `ConfigProvider.locale`, and configure the\ndate library separately. Render native `useMessage`, `useNotification` and `useModal`\nholders in a feedback host inside the sole root provider. Bind application notify facades\nto those hook APIs; never use detached raw static feedback APIs. The factory sets\n`hashed: false` because AntD4 contextual message/notification holders otherwise retain\nstale hashes across theme/locale changes. Keep an existing notice open while switching\ndark/Vietnamese to light/English; its typography and paint must follow the active theme.\n\nKeep document `data-theme` and `lang` synchronized for teleported overlays. Import\ncompanion CSS after application/framework styles. Use a native 16px root and 14px body;\nnumeric APIs resolve source rem at 16px. The pixel entrypoint is not the dashboard path.\n\n## Overlay ownership and bounded native content\n\nTriggered popups use `getAntDesignVuePopupContainer` to stay inside their nearest native\nModal/Drawer or custom `data-bh-overlay-owner` host. Native Modal/Drawer roots remain\nbody-hosted for viewport geometry. Provider-bound modal facades default their invocation\n`zIndex` through `getAntDesignVueModalZIndex()` while preserving explicit caller values;\nthis keeps keyboard/awaited confirmations above their live owner. Nested drawers use\n`getAntDesignVueOverlayZIndex(fullscreen, ownerZIndex)` as `rootStyle.zIndex` so\nsurface and mask move together; AntD4's `zIndex` prop styles only the content wrapper.\nBody-teleported fullscreen editors/images and fullscreen native Modals capture\n`getAntDesignVueFullscreenZIndex()` before mounting their root. This combines the\nfullscreen role with above-owner ordering; a fixed450 must not fall below a nested\nnative Drawer451. Mark custom roots only once they are active, avoiding self-counting.\nTour's inline native default also requires its public\n`zIndex` prop bound to `z-index.spotlight`.\n\nDrawer wrappers intentionally inherit `pointer-events: none`; native content restores\npointer entry only for its own subtree. The companion CSS also restores\n`pointer-events: auto` on actual native popup roots portaled into that wrapper\n(Dropdown, Select/Picker/Cascader/TreeSelect/Mentions, submenu, Tooltip/Popover and\nTour). The wrapper stays pointer-transparent. Do not relocate popups into a scrolling\nbody, change z-indices or add page overrides to solve this inherited-pointer gap.\n\nThe companion CSS provides opt-in native structural contracts, not application selectors:\n\n- `bh-ant-fill-drawer` / `bh-ant-drawer-flush`: bounded body, intrinsic header/footer,\n optional zero body padding; bind through `rootClassName`. Keep the native body's\n default automatic overflow rather than suppressing access when intrinsic\n controls or preserved pane minima exceed a short allocation. Do not repeat\n body flex/overflow styles at consumers.\n- `bh-ant-fill-modal`: bind through native `wrapClassName`, not the unsupported\n Modal `rootClassName`. The real fixed overlay allocates a token-inset bounded\n dialog; its content/focus wrapper and body fill around intrinsic header/footer.\n Width remains the caller's native width, bounded by the available overlay.\n Use for interactive renderer inspection, not short confirmations. The renderer\n viewport alone owns below-minimum overflow; do not subtract guessed chrome heights.\n- `bh-ant-fill-tabs`: bounded native wrappers and active pane. Nested tabs opt in separately;\n `bh-ant-fill-tabs--scroll` enables pane scrolling and `bh-ant-tabs-mobile-inset` adds the\n source mobile inset. Inactive panes stay hidden.\n Inner tabs inside that scrolling document can instead add\n `bh-ant-fill-tabs--document`: wrappers keep intrinsic content height and grow\n into adequate space, without clipping a renderer after long metadata exhausts\n the allocation. The outer native scroll pane owns vertical access; do not put\n both modifiers on the same root. Only the interactive renderer host receives\n `--bh-layout-renderer-minimum-block-size`, not outer panes or static fields.\n- `bh-ant-fill-spin` / `bh-ant-fill-card`: carry an existing bounded host through native wrappers.\n Static document/tree/list content can remain nonshrinking and overflow-visible\n inside the native Card's existing scroll owner. Do not pair that Card scroller\n with a second zero-height inner scroller when its header exhausts a tiny pane.\n This document composition adds no SDK-readable minimum to ordinary fields.\n- `bh-ant-fit-empty`: only on a real native Empty inside an already allocated\n placeholder. Native illustration choice alone does not guarantee a fit in a\n short host. The opt-in removes outer and description paragraph margins (the\n parent owns its inset), bounds the root and lets the image row shrink before\n the intrinsic description/footer. The image keeps its native preferred height\n and removes its inline baseline strut; neither enlarged artwork nor paragraph\n margins consume a tiny host. It adds no readable-renderer minimum, palette,\n text typography, image replacement or overflow suppression. Preserve the parent's one genuine\n scroll owner when even the intrinsic text/actions cannot fit. Ordinary\n document/list/table empties omit it and retain native defaults. The live native\n family below compares 2/4/12rem allocations, the simple illustration and the\n unchanged no-opt-in base.\n- `AntDesignVuePopupScope`: only for retained renderers moved across native\n overlay owners. Wrap the existing subtree outside its Teleport and pass the\n existing HTMLElement root as `owner`; keep owner attributes on that actual\n root. Keep a real element as the consuming component's root when callers use\n `v-show` or other element directives; put the scope inside that existing root,\n not in its place. A stable native popup holder moves with the owner because\n AntD4 caches the first portal container. Nested scopes inherit the enclosing target.\n Native ConfigProvider theme/locale, menus, focus and no-trigger body portals\n remain native; no editor/model/graph rekey or global popup z-index is involved.\n Fullscreen capture handlers yield menu/listbox Escape via\n `isAntDesignVueMenuEvent(event)` before closing their own overlay.\n Native Drawer portals can use the same stable host through the public scoped\n slot: `<AntDesignVuePopupScope v-slot=\"{ getContainer }\">` with\n `<a-drawer :get-container=\"getContainer\">`. HTML attributes on the scope\n belong to that actual portal host; conditionally expose `role=\"dialog\"`,\n `aria-label` and `aria-modal` only while open when the native Drawer drops\n these attributes. Do not add a second dialog wrapper or mutate native DOM.\n AntD4 Flex also drops attributes other than class/style: use an existing real\n semantic element when a controlled ID, region name or tab stop must survive.\n- Independently selectable, disclosable choices compose actual Card title slots\n with sibling native disclosure and selection Buttons plus a shortcut Tag.\n Keep Card headers noninteractive; each Button owns only its own action.\n AntD4 Collapse headers retain an ancestor `role=\"button\"`/tab stop even in\n icon-only mode, so do not nest independently actionable choices there.\n Native conditional Card body slots own expanded content; no private header\n role/keyboard patch or special choice-collapse CSS is needed.\n- `bh-ant-inspection-descriptions`: source desktop label minimum and mobile stacked rows.\n- `bh-ant-data-table`: generic pending/success/error row classes plus public `customCell`\n markers `data-bh-cell-interaction=\"editable|readonly\"` and `data-bh-cell-state=\"changed\"`.\n Native selection outranks operational row paint; changed cells keep diff paint on hover.\n `bh-ant-table-nowrap` is an independent horizontal-content opt-in.\n Add `bh-ant-row-indicators` for a `border.width.accent` inset danger marker on the\n first cell of `bh-ant-row-error` rows. This non-colour issue cue does not change\n column geometry, override selection or replace status text/icons.\n- `data-bh-tone=\"warning\"` on a native Badge root selects\n `color.background.warning.bold` / `color.text.on-bold` for its count only.\n Native operational status dots keep their separate source semantics and circles.\n- Native Button `data-bh-target=\"touch\"` selects `size.target.touch` as minimum\n width/height without repainting it. `data-bh-target=\"responsive\"` applies the\n same target only for coarse pointers. Keep native type, size, disabled and\n keyboard semantics; no page-owned target sizing is needed.\n- The observed root can also be passed to `tokenPixels(name, locale, rootFontSize)`\n for actual Avatar/Image numeric props replacing scalable rem CSS. Child setup\n calls reuse the sole provider's readonly measurement, not another observer.\n\nKeep custom business data/slot meaning and host structure in the consumer, not\npresentation recipes. Do not recreate native selectors through per-page\n`:deep(.ant-*)`, global overrides or priority escalation.\n\n## Token mapping\n\n| Ant Design token | Beehexa token |\n| --- | --- |\n| `colorPrimary` | `color.background.neutral.bold` |\n| `colorText` | `color.text` |\n| `colorBorder` | `color.border` |\n| `borderRadius` | `radius.100` (8 px) |\n| `borderRadiusXS` / `borderRadiusSM` | `radius.025` (2 px) / `radius.050` (4 px) |\n| `borderRadiusLG` / `borderRadiusOuter` | `radius.150` (12 px) / `radius.075` (6 px) |\n| `fontFamily` | `font.family.sans` |\n\nUse the complete [Radius role scale](/foundations/styles/radius/), not one radius\nfor every component. Buttons, inputs and selects use `radius.050` (4 px) at\nsmall/default/large sizes, including explicit circle/round Button sizing. Menu\nframes/items, checkboxes, tags and badge counts also use 4 px. A Select popup is\na separate surface and retains `radius.100` (8 px), as do Card/Popover/Tooltip/Alert.\nModal/Drawer use `radius.150` (12 px). Groups with 4 px padding use\n8 px outside and nested 4 px inside; groups with 8 px padding use 12 px outside\nand nested 4 px inside. `radius.200` (16 px) has no current component role.\nFull-width tables, joined Search edges\nand fullscreen surfaces remain square. `radius.full` is for avatars, switches\nand pill-shaped chips; true radio/status circles and graph geometry remain intact.\n`radius.025` (2 px) and `radius.075` (6 px) are nested parts, not control defaults.\nThe adapter pins role-specific component aliases and the companion CSS closes\nfixed badge/Switch/Segmented/Drawer recipes. Consumers must remove competing\ncorner overrides, not add `.ant-*` radius patches.\nExplicit Button `shape=\"circle\"` / `shape=\"round\"` props keep their native sizing,\nbut the source companion still gives them the 4 px control corner. They are not\navatar, Switch or pill-chip roles.\n\nThe adapter also pins semantic hover/pressed/disabled/link/status/selection/focus roles instead\nof allowing a framework-generated blue palette to leak through. Inputs, selects, checkboxes\nand radios use `color.border.bold` while cards/tables use `color.border`. Layout header and\nsider and mobile navigation drawer share `color.surface.subtle`; there is no separate shell palette or nested isolated\ntheme. Use `font.body.default` for table data, `font.label.small` for headers/tags,\n`font.heading.medium` for modal titles and `font.heading.small` for drawer titles.\n\nNative Menu icons keep the source icon box and a `space.050` title gap. Title text\nuses `font.label.default` rather than the row-height line box, keeping Vietnamese\nlabels and adjacent consumer-owned title/tag content vertically aligned.\n\n### Ant Design Vue 4 component contracts\n\n- Table reads `colorFillAlter`, `colorTextHeading`, `controlItemBgActive` and\n `controlItemBgActiveHover`. AntD5 names such as `headerBg` and `headerColor` are ignored\n by AntD Vue 4.2.6 and must not be used.\n- Switch reads OFF tracks from `colorTextQuaternary`/`colorTextTertiary`, ON tracks from\n `colorPrimary`/`colorPrimaryHover`, its shared thumb from `colorWhite`, **both** labels\n from `colorTextLightSolid`, and disabled/loading opacity from `opacityLoading`.\n These are component-scoped mappings, not changes to global primary/text colors.\n AntD5 `trackBg`/`handleBg`-style names are not the AntD4 state API.\n- Menu reads `colorItem*`, `radiusItem`, `radiusSubMenuItem` and `colorActiveBar*`.\n Explicit `theme=\"dark\"` menus receive the same source roles. Selection has a visible bar,\n not a heavier label that shifts its neighbours or merely a changed fill.\n- Form controls share source outline/focus/disabled roles. Validation retains danger/warning\n text/icons and native state semantics. Do not replace meaningful input borders with divider\n hairlines.\n- Tag status presets are `success`, `processing`, `warning`, `error`; default is neutral.\n They use source foreground and outline pairs. Arbitrary hue presets are not status names.\n Badge counts are neutral; error/processing status dots retain their semantics.\n- Tooltip and Message use the inverse surface/text pair. Modal/Drawer content uses surface,\n scrim and overlay elevation. Progress is neutral by default and semantic on success/error.\n\n### Native Switch contract\n\nUse the native Switch inside the existing root ConfigProvider. `enabled`,\n`saving`, `unavailable` and `locale` below are application state; do not create a\nnested provider or local theme just for schedules, permissions or status toggles.\n\n```vue\n<a-switch\n v-model:checked=\"enabled\"\n :loading=\"saving\"\n :disabled=\"unavailable\"\n :checked-children=\"locale === 'vi' ? 'Bật' : 'On'\"\n :un-checked-children=\"locale === 'vi' ? 'Tắt' : 'Off'\"\n :aria-label=\"settingLabel\"\n/>\n```\n\n`switch.on.*` is neutral-bold, never business-success green. `switch.off.*` has a\nstrong thumb, readable label and meaningful boundary so enabled OFF cannot be\nmistaken for disabled. The source defines paired track/thumb/label/border roles\nfor normal, hover, pressed, focus, loading and disabled; normal and `size=\"small\"`\nuse the same light/dark palette and existing native geometry. Native thumb\nposition, `aria-checked`, labels and the separate focus ring provide non-color\ncues. Short EN/VI state labels use the existing source typography, not a patched\nheight or a consumer font declaration.\n\nAntD4 supports only one shared thumb/label pair, no pressed track paint and no\nexplicit disabled color pairs. Its spinner foreground and translucent green\nthumb shadow are also not configurable as paired parts. The companion CSS closes\nthose evidenced gaps, while normal/hover track paint stays in native aliases.\n`opacityLoading: 1` removes native loading/disabled dimming; explicit opaque\ndisabled roles remain distinct from enabled OFF. Loading retains the current\nnormal checked pair and a high-contrast native spinner, including when both\nloading and disabled props are set. It never predicts or changes the saved value.\n\nKeep native controlled binding, `change` callback and keyboard operation. The\nnative button is disabled during loading; pending/disabled activation must not\nsave twice or update checked state. Business save operations and errors remain\napplication-owned. See the [active interaction-state demo](/foundations/styles/interaction-states/#live-native-switch-states)\nfor both sizes, OFF/ON loading and disabled states, EN/VI labels, visible callback\ncounts and a delayed controlled-save example. No consumer `.ant-switch` patch,\npalette literal or custom Switch implementation is necessary.\n\n### Companion CSS and structural classes\n\nUse component tokens first. The package CSS fills actual AntD4 gaps: semantic label/header/title\ntypography, hard-coded submenu fill, selected bar colors, keyboard focus offsets, safe areas,\nresponsive Tour placement, reduced motion and neutral Badge count without recoloring error dots.\nApplication selectors and palette overrides belong neither in that CSS nor in a dashboard theme.\nConsumers retain genuine portal layout and scrolling mechanics only. Framework paint\nand typography fixes belong to the package, not duplicated consumer overrides.\n\nBordered Descriptions clip cell backgrounds inside the native rounded frame instead of\npainting over its left corners. Header-only Cards omit the orphan header/body divider\nand retain all four rounded corners; Cards with body/cover/actions keep native separation.\nBordered hoverable Cards keep `color.border.bold` plus `elevation.shadow.raised` on\nhover and keyboard focus, rather than AntD4's transparent hover border. Focus also\nuses the standard outline/offset; the application still owns keyboard action semantics.\nThese framework fixes are automatic, not per-page overrides.\n\nNative Search, Input addon buttons, compact InputGroup and horizontal Space.Compact\nshare an intrinsic flex-stretched row: input and action top/bottom edges stay aligned,\nadjacent borders overlap once, exposed corners stay 4 px and touching corners stay zero.\nSource font roles are retained. Small Vietnamese fields/actions grow together to 26 px;\ndo not clip accents or shrink type to force 24 px. Default actions share field\nerror/warning/disabled borders; primary/danger actions retain their semantic roles.\nClear icons keep an icon-sized line box so they cannot inflate affix wrappers.\n\n`bh-ant-tag-large` on a Tag selects the source large label (24px minimum, 8px inline padding);\nthe default is 20px minimum/6px. Both grow for Vietnamese line boxes rather than clipping marks.\n`bh-ant-tree-fill` on an actual Tree fills a bounded flex host, including below an\nintrinsic summary. Root and list establish the min-height-zero chain; only the\nnative list holder scrolls, preserving its keyboard scroll target. Do not pass a\nfixed height or add another wrapping scroller. Intrinsic trees omit this opt-in.\nKeyboard-navigation consumers bind the native `activeKey` / `onActiveChange` pair:\nstate `ref<TreeProps['activeKey']>()`, then `:active-key=\"activeKey\"`\nand `@active-change=\"activeKey = $event ?? undefined\"`. AntD 4.2's uncontrolled\nactive-change path does not retain the requested node; a CSS fill opt-in cannot\nsupply that navigation state.\n\nFor data inspection, bind `width=\"var(--bh-ant-overlay-width)\"` and apply\n`bh-ant-inspection-modal` or Drawer `rootClassName=\"bh-ant-inspection-drawer\"`.\nAdd `bh-ant-inspection-modal--wide` / `bh-ant-inspection-drawer--wide` only for an explicit\ncontent-heavy variant. The variable selects `layout.overlay.default` / `.wide`, and `.mobile`\nbelow `breakpoint.lg`. Short confirmations and navigation drawers retain their own widths.\nFullscreen modes are Modal `wrapClassName=\"full-screen\"` and Drawer\n`rootClassName=\"fullscreen\"`; AntD4 Modal has no `rootClassName` prop. These preserve\nbounded scroll mechanics, not decoration.\n\n### Verify the actual framework\n\nExercise light/dark × English/Vietnamese with the real CSS imported: buttons and validated\ninputs/selects, ordinary/selected/hovered table row checkboxes, sorting/filter portals,\nexpanded/collapsed/horizontal and submenu navigation, form help/error, Tooltip/Message,\nModal/Drawer and default/wide/fullscreen inspection at 1023/1024px. Check keyboard focus,\ntouch hit areas, reduced motion, narrow Tour and focus return. Use\n**ỔN ĐỊNH · ẤN ĐỘ · ẪM · Ở ĐÂY CÓ ƯU ĐÃI** in controls, tags and rows.\nCompilation alone does not establish those rendering/interaction outcomes.\n\n\n## Spacing\n\nAnt Design Vue sizes come from `sizeUnit` and `sizeStep`. Keep both at 4, so `size` is 16 px. The theme then sets each size from a [spacing](/foundations/styles/spacing/) token.\n\n| Beehexa token | Value | Ant Design Vue tokens |\n|---|---|---|\n| `space.050` | 4 px | `sizeXXS, paddingXXS, marginXXS` |\n| `space.100` | 8 px | `sizeXS, paddingXS, marginXS` |\n| `space.150` | 12 px | `sizeSM, paddingSM, marginSM` |\n| `space.200` | 16 px | `size, sizeMS, padding, margin` |\n| `space.250` | 20 px | `sizeMD, paddingMD, marginMD` |\n| `space.300` | 24 px | `sizeLG, paddingLG, marginLG` |\n| `space.400` | 32 px | `sizeXL, paddingXL, marginXL` |\n| `space.600` | 48 px | `sizeXXL, marginXXL` |\n\n`space.0`, `space.025`, `space.075`, `space.500`, `space.800` and `space.1000` have no Ant Design Vue token. Use their CSS variables in your own styles.\n\nProps that take a number, such as `size` on `a-space` and `gutter` on `a-row`, take pixels. Use a value from the scale: `<a-space :size=\"8\">`.\n\n## Control height\n\n| Beehexa token | Height | Ant Design Vue token | Component prop |\n|---|---|---|---|\n| `size.control.small` | 24 px | `controlHeightSM` | `size=\"small\"` |\n| `size.control.default` | 32 px | `controlHeight` | None |\n| `size.control.large` | 40 px | `controlHeightLG` | `size=\"large\"` |\n\nThese are Ant Design Vue’s own heights. The theme still sets each one from its size token, so a change to the token reaches the components. See [Size and density](/foundations/styles/size-and-density/).\n\n## Breakpoints\n\n**Override the `screen*` tokens with the Beehexa [breakpoints](/foundations/styles/layout/breakpoints/).** The default Ant Design Vue values are different (576, 992, 1200 and 1600 px).\n\nThe `Min` and `Max` tokens are computed from the defaults, not from your overrides. Set them too: each `Max` is the next breakpoint minus 1.\n\n| Beehexa | Value | Ant Design Vue tokens |\n|---|---|---|\n| `breakpoint.xs` | 0 | `screenXSMax: 767` |\n| `breakpoint.md` | 768 px | `screenSM`, `screenSMMin`, `screenMD`, `screenMDMin`: 768; `screenSMMax`, `screenMDMax`: 1023 |\n| `breakpoint.lg` | 1024 px | `screenLG`, `screenLGMin`: 1024; `screenLGMax`: 1439 |\n| `breakpoint.xl` | 1440 px | `screenXL`, `screenXLMin`, `screenXXL`, `screenXXLMin`: 1440 |\n\nAnt Design Vue has six breakpoints and Beehexa has four, so `sm` switches with `md`, and `xxl` with `xl`. Use the `xs`, `md`, `lg` and `xl` props of `a-col`.\n\nThe props of `a-col` and the responsive `gutter` of `a-row` then switch at the Beehexa widths. Do not use `xxxl`: its media query is malformed in Ant Design Vue 4.2.6 and never matches.\n\n## Grid\n\nAnt Design Vue divides a row into 24 parts. The Beehexa [grid](/foundations/styles/layout/grid/) has 4, 8 or 12 columns, and each one fits 24 exactly.\n\n| Beehexa grid | Window | `a-col` span |\n|---|---|---|\n| 4 columns | Below 768 px | Beehexa span × 6 |\n| 8 columns | 768 to 1023 px | Beehexa span × 3 |\n| 12 columns | 1024 px and up | Beehexa span × 2 |\n\n| Layout | Beehexa spans (4 / 8 / 12 / 12) | Props of each `a-col` |\n|---|---|---|\n| Cards, 1 to 4 a row | 4 / 4 / 4 / 3 | `:xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\"` |\n| Main panel | 4 / 8 / 8 / 9 | `:xs=\"24\" :lg=\"16\" :xl=\"18\"` |\n| Side panel | 4 / 8 / 4 / 3 | `:xs=\"24\" :lg=\"8\" :xl=\"6\"` |\n| Summary tile | 2 / 2 / 3 / 2 | `:xs=\"12\" :md=\"6\" :xl=\"4\"` |\n\nAnt Design Vue rows have no gutter by default. Set it from the spacing tokens, and set the page margin on the content area.\n\n```vue\n<a-row :gutter=\"[{ xs: 16, md: 24 }, { xs: 16, md: 24 }]\">\n <a-col :xs=\"24\" :md=\"12\" :lg=\"8\" :xl=\"6\">\n <OrderSummary />\n </a-col>\n</a-row>\n```\n\n## App frame\n\n| Region | Beehexa | Ant Design Vue |\n|---|---|---|\n| Header | 48 px | `<a-layout-header style=\"height: 48px; line-height: 48px\">` |\n| Side navigation, open | 280 px | `<a-layout-sider :width=\"280\">` |\n| Side navigation, collapsed | 64 px | `<a-layout-sider :collapsed-width=\"64\">` |\n\nThe header is 64 px by default and has no token for its height, so set it in the header’s style.\n\nThe `breakpoint` prop of `a-layout-sider` uses fixed widths that ignore the `screen*` tokens. Do not use it. Set `collapsed` from your own media query and the user’s choice: open from 1024 px, collapsed to the rail when the user asks, and the choice remembered. Below 1024 px, hide the sider and show the menu in `a-drawer`.\n\nSee [Layout](/foundations/styles/layout/) for the frame.\n\n## Interactive table rows\n\nBind `data-bh-interactive=\"true\"` through `customRow` only when the complete row\nalready has an activation handler. The source companion owns the pointer cursor;\nnative selection keys/classes retain their selection recipe. Preserve accessible\nrow actions, keyboard behavior and actual record activation rather than replacing\nselection with a custom outline.\n\n\n## Native composition and optional variants\n\nUse the real native component. These opt-ins do not authorize a div-based\nreplacement, a skin-only wrapper, or copying Card/Button geometry into the app.\n\n- Native Card's `hoverable` prop remains optional. `data-bh-selected=\"true\"`\n adds a selected fill and independent inset cue; omitting it restores the base.\n- Reuse `bh-data-accent` with an existing semantic `data-bh-status`, `data-bh-band`,\n `data-bh-metric`, `data-bh-job-type` or `data-bh-priority` for an optional leading\n edge on a real Card. It adds no selection or hover behavior. A status/category\n edge survives selection; keyboard focus remains a separate outside outline.\n Bind the discriminator appropriate to that mark rather than conflating status\n with categorical identity. Labels are still mandatory.\n- `data-bh-layout=\"content\"` on a real Button allows a multiline composed label:\n auto height, normal wrapping, start alignment and the source default-control\n minimum height. Native props, padding and keyboard activation remain native.\n Use ordinary Button size/block props when they suffice.\n- `bh-ant-shell-region` removes native Header/Footer padding only when the region\n already contains the composed app header/footer. It does not change native\n height, paint or the surrounding responsive page-region layout.\n- `bh-card-link` on a real navigation anchor wrapping Card removes competing\n link paint/underline and supplies source keyboard focus, not Card skin.\n\nBusiness components may own data, state, behavior and meaningful composition of\nthese primitives. Inventory and remove redundant replacement components and every\nobsolete caller/import/export. Generated rich content must mount real native\nenhancement controls when the host framework permits it; a producer stylesheet\nalone is not evidence of missing native capability.\n\n\n### Operational and composed native content\n\n`Steps[data-bh-operational=\"true\"]` uses success/info/danger/subtle for native\nfinish/process/error/wait states. It leaves categorical navigation Steps unchanged.\nAn actual Step's `data-bh-skipped=\"true\"` adds a dashed tail in either orientation;\nthe caller retains ordering and the relationship's meaning. Custom icon slots do\nnot require rebuilding the Steps primitive.\n\n`Result[data-bh-layout=\"step\"]` retains a composed report's icon-and-title header\nrow, with subtitle/content and extra/actions below at full width. It only changes\nnative layout/padding; status paint and native slots remain native.\n\nThe native Tree title `data-bh-highlighted=\"true\"` is a temporary locator cue,\nnot a selected key or keyboard focus. Native selected/disabled treenodes suppress\nit; the source outline does not change title geometry.\n\nUse `bh-partner-logo-image` on a real Image for connector/brand assets.\nBind only the Source partner-image height and `width=\"auto\"`; native Image plus\nthe adapter preserves its intrinsic aspect ratio without a square frame or crop.\nActual identity Avatars stay native. Do not use brand hue as operational status.\n\n### Native Image preview\n\nThe official Image `zIndexPopupBase` and `zIndexPopup` tokens use the fullscreen\nband. That alone cannot clear an owner nested above it: AntD4.2.6 Preview drops\nboth declared Dialog `zIndex` and `wrapProps`. The setup composable\n`useNativeImagePreviewContainer(labelGetter)` from\n`@beehexa/ant-design-vue-tokens/image` owns the official lazy body portal:\npass its getter to native `preview.getContainer`. It names the real native\ndialog, reacts to locale changes and captures a layer above live owners on\neach opening, excluding its own previous layer. A closed portal is not an\noverlay owner. Its observer/container are disposed on unmount. Native Image\nstill owns zoom/pan, keyboard close and focus return; there is no custom viewer.\n\n\n`bh-ant-card-flush` opts a real Card body out of inset only for an edge-to-edge\nembedded editor, canvas or composed pane. Ordinary cards retain native padding.\nReuse `bh-ant-fill-card` and `bh-ant-fill-spin` for existing bounded flex hosts;\ndo not create parallel fill aliases or restore private consumer selectors.\nThe flush Card clips embedded paint to its native rounded frame. A direct\nbrowser iframe child has its UA border removed to avoid a second frame;\nsandbox/srcdoc and embedded-document behavior remain browser-owned.\n\n`semanticTableComponents` from `@beehexa/ant-design-vue-tokens/table` extends\nthe real Table's public `components` API. A column's `customCell` may return\n`{ scope: 'row' }`; its body cell becomes a semantic `th`, forwarding the native\nattributes and slot. Other cells remain `td`. AntD4 has no row-scope column prop\nand its body-cell CSS only targets `td`, so the source companion supplies the\nmatching row-header size/border/hover/selection recipe for this actual HTML\nsemantics gap. Native columns, rows and Summary remain native.\n\nAn actual native ListItem may opt into `data-bh-interactive=\"true\"` for a rich\nactivation row when no narrower native control meets its content contract.\nThe opt-in supplies hover/pointer/focus only; the consumer supplies a real action,\nkeyboard activation and accessible role. Do not nest competing interactive targets.\n\n\nConnector and partner brands share `content.partner-logo.image-size` as their\nrendered height, not a width cap. Keep natural width; wrap rows when needed.\nSemantic icon-height roles likewise preserve proportional width and hit targets.\nNative Table already styles `tfoot > tr > th` geometry at each size; the companion\nadds only its missing Summary row-header border and semantic weight/alignment.\n`a-typography-link[data-bh-target=\"responsive\"]` uses the source minimum24px\ntarget, increasing to44px only on coarse pointers; it adds no link skin.\n\n\nFlush Cards clip embedded paint to their actual rounded frame. Native Drawer\nfooters retain their canonical inset or the device's safe-area inset, whichever\nis larger. `Spin[data-bh-mode=\"nonblocking\"]` removes the native veil/pointer\nblock only for progressive content that remains inspectable; omit it for actual\nblocking work such as export. This does not change spinner timing or graph data.\n\n\n## Read-only segmented native Progress\n\nFor “Step 3 of 7” feedback, use the real native `Progress` with its actual\n`steps` and `percent`. This is not navigation: do not substitute `Steps`,\n`Segmented`, a fabricated row of marks, or another progress engine.\n\nAntD4 `size=\"small\"` deliberately renders each step as a **2 × 8px vertical\nfragment**. Its native `[width, height]` tuple means **per-segment** geometry.\nThe source helper resolves `content.step-progress.segment-width` and\n`segment-height` to16 ×4px at root16 and20 ×5px at root20. Bind it reactively:\n\n```vue\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport {\n getAntDesignVueStepProgressSize,\n useAntDesignVueRootFontSize\n} from '@beehexa/ant-design-vue-tokens'\nimport { getStatusColor } from '@beehexa/ant-design-vue-tokens/visualization'\n\nconst props = defineProps<{ total: number; index: number; dark: boolean }>()\nconst rootFontSize = useAntDesignVueRootFontSize()\nconst progressSize = computed(() => getAntDesignVueStepProgressSize(rootFontSize.value))\n</script>\n\n<template>\n <a-space align=\"center\" wrap>\n <span>Step {{ props.index }} of {{ props.total }}</span>\n <a-progress\n class=\"bh-ant-step-progress\"\n :steps=\"props.total\"\n :percent=\"props.index / props.total * 100\"\n :size=\"progressSize\"\n :stroke-color=\"getStatusColor('info', 'border', { dark: props.dark })\"\n :show-info=\"false\"\n aria-hidden=\"true\"\n />\n </a-space>\n</template>\n```\n\nThe feature owns the real positive total, current index, status text and\nbusiness transitions. The helper supplies geometry only; native Progress\nowns the rendered count and active marks. Hide the redundant bar from assistive\ntechnology only when adjacent text already conveys the same progress.\n\n`bh-ant-step-progress` opts that native root into intrinsic inline width,\nzero native outer margins, the source `content.step-progress.gap` (4px at\nroot16), and wrapping without a trailing item margin. CSS does not replace\nthe native size API or set per-mark width/height. The bar follows the status\non a wide row and wraps within the available width on mobile.\n\nOmit the class and helper to retain the native base. Ordinary percentage,\nupload and countdown progress do not opt in. The shared live matrix below\nincludes a real native no-opt-in comparison, editable total and first/middle/\nfinal controls; check both root16 and root20, light/dark and narrow widths.\n\n## Thin navigation Progress\n\nFor route-loading feedback use real native `Progress` with `bh-ant-navigation-progress`,\n`showInfo=false`, `status=\"normal\"`, `strokeLinecap=\"square\"` and its native size tuple.\nUse `border.width.focused` for the thin line and `color.brand.yellow` for its optional\nbrand stroke. The application owns fixed viewport positioning at `top: 0`, width and\nthe loading z-index; the adapter removes AntD's inline baseline gap and outer margins,\nso the actual ink begins at the allocated top edge without negative offsets.\n\nProgress reflects completed navigation milestones, not invented network percentages.\nKeep the previous page while guards and route chunks resolve, advance to100%, and await\nthe actual finite native width transition before committing the new page. Cancellation,\nerrors and superseding navigation must clear their own progress without clearing a newer\nrequest. The source width transition uses `motion.duration.default` and\n`motion.easing.linear`; reduced motion removes it. Keep a named progressbar with actual\nmilestone values, and never use a page-covering scrim just to load a route.\n\n## One native control family, distinct roles\n\nUse native default Button for compact bordered utility triggers (including\nlanguage and theme), with the same native size as adjacent page controls.\nUse the public `#icon` slot and one label child; icon-only Buttons still need\nan accessible name. Do not disguise `type=\"text\"` globally as a default Button.\nA frameless account/avatar menu legitimately uses `type=\"text\"`, a real Avatar\nand native Space: center it in the row rather than inventing a shell skin.\n\nButton small/default/large use source control heights24/32/40px at the nominal\nroot; typography is label-small for small and label-default otherwise.\nButton/Input/Select and Menu frame corners use radius050; Select popup is100.\nThe numeric theme/root observer and rem CSS scale together.\nAntD4 only inserts margin for `.anticon` siblings, not Lucide SVGs in `#icon`;\nthe source supplies one space100 flex gap for all real Buttons and removes\nthe competing native/loading-icon margin. No shell-specific class is needed.\nNative default/primary/text/link, disabled/loading, hover/pressed and keyboard\nfocus remain distinct. `data-bh-target=\"responsive\"` adds touch minimums only\non coarse pointers. Open Dropdown/Menu state is not Button selection; keep\n`aria-expanded`, menu keyboard behavior and focus return in the actual feature.\n\nThe primary neutral-bold/inverse pair is intentional: graphite in light mode,\nlight graphite with dark text in dark mode. A pale dark-mode Continue action\nis not a reason to recolor every primary or text Button blue. Link actions\nretain the source link palette; default utility actions remain bordered.\n\n| Native variant | Source role and state contract |\n| --- | --- |\n| Default / dashed | Surface, text and border; neutral-subtle hover/pressed fill. Dashed retains its native dashed outline. |\n| Primary | Neutral-bold/inverse pair and its own bold hover/pressed roles. |\n| Danger primary | Danger-bold/on-bold pair, including hover/pressed. |\n| Danger default / dashed / text / ghost | Readable danger text; outlined variants retain danger borders. Available non-link variants use danger-subtle hover/pressed fill. Ghost starts transparent, never with the solid on-bold label. |\n| Link / text | Distinct link/frameless roles, not a disguised default Button. |\n| Ghost | Native transparent outlined variant with a role-appropriate foreground and host context; not a solid primary. |\n| Disabled / loading | Native blocking behavior and disabled aliases remain authoritative, including disabled anchor Buttons. Loading does not fade an otherwise readable source pair. |\n\nAntD4 paints a **resting lower shadow** from `controlOutline` on primary,\n`controlTmpOutline` on default, and `colorErrorOutline` on danger-primary.\nThose names are not exclusively keyboard-focus inputs. Reusing the global\nblue focus alias there produces a stranded blue stripe even after all\nanimations finish. The source scopes these three Button component aliases\nto transparent; it does not clear the global focus role or set its width\nto zero.\n\nNative Button keyboard focus instead reads `colorPrimaryBorder` and\n`lineWidthBold`. Its component overrides use source focus color/width.\nThe companion's enabled `:focus-visible` rule supplies the independent,\ngapped source outline/offset. Default/dashed state fills and the separate\ndanger text/on-bold pairs are the remaining native-token gaps; source CSS\nhandles only those cases, excluding disabled controls and genuine selection.\nApps must not add a local shadow/border reset or a focus suppression.\n\n### Live native state and progress matrix\n\nUse the site theme/language controls and browser root font preference.\nChange Button size, hover/hold a press, Tab/Enter/Space through available\nactions, and inspect actual activation counts. Loading/disabled Buttons and\nthe disabled native anchor must not activate. Progress uses the same actual\ncount/index for its opt-in and no-opt-in renderers.\n\n<NativeControlsDemo />\n\n\n### Native mobile composition and bounded content\n\nThe adapter stretches joined Input/Search/compact-group fields and their actions\nas one row, including validation, disabled states and coarse-pointer targets.\nIcon-only Buttons keep their native size proportions; on coarse pointers both\naxes reach `size.target.touch`. Content-layout Buttons retain multiline text\nwithout overriding explicit or responsive touch minimums.\n\nBelow `breakpoint.md`, every native Card header/meta title wraps, including\ndescendant Typography ellipsis, Tags and Space. This is global readable content,\nnot an optional consumer override. Header extras remain available. Standard\nTimeline dots, tails and custom dots align to the first content line; wrapped\nevent content stays in the native timeline column. Label/alternate/right\ntimelines retain their distinct native alignment.\n\nAntD4 Flex does not forward arbitrary `role`, `aria-*`, `data-*` or DOM listeners.\nDo not put required semantics, source opt-ins or keyboard handlers on it. Use\nnative Space/Typography where appropriate, or retain a real semantic host with\nminimal structural flex/grid CSS. Do not introduce a forwarding wrapper.\n\nUse `bh-content-toolbar` and `bh-content-toolbar__group` on actual toolbar hosts;\nthe source owns spacing, padding, wrapping and mobile control minimums. These\nrecipes apply to editor/diagram/graph controls, not page-specific skins.\nKeep the host and its flex children shrinkable with `min-width: 0`.\n\nBind `bh-ant-fill-spin` through Spin's **wrapperClassName**, not its class:\nthe nested-loading wrapper carries the bounded height. Drawer fill/flush modes\ntraverse the native content-wrapper/content/wrapper-body chain; header/footer\nremain intrinsic and the body owns the remaining space. Tabs fill only their\nown active pane. Consumers supply the actual bounded parent, not guessed\nviewport-minus-header heights. Monaco/Mermaid observe that host's dimensions\nwithout replacing the editor model or resetting existing chart pan/zoom.\n\n",
1216
1216
  "frontmatter": {
1217
1217
  "title": "Ant Design Vue theme",
1218
1218
  "description": "Make Ant Design Vue components use Beehexa design tokens, breakpoints, grid, control heights and app frame.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beehexa/design-rules",
3
- "version": "2611.5.2",
3
+ "version": "2611.5.3",
4
4
  "description": "Complete source-content Beehexa design usage rules for tools and agents",
5
5
  "repository": {
6
6
  "type": "git",