fix(docs): restore button, toggle and nav demos to the pinned cn baseline

- button-group: restore all 9 cn demos incl. merge dropdown menu copy,
  custom-styles merge dropdown, sizes variant=secondary, orientation icon
  groups, full-width second group and the disabled child override
- toggle-button / toggle-button-group: restore cn copy, structure, button
  counts, theme custom-styles classes and aria-labels
- accordion-custom-styles: restore the 3-item collectibles scenario with the
  original 3dicons images, surface variant, selectors and hover motion
- disclosure-group-controlled: restore HeroUI Native / Expo copy and image
  semantics (Expo brand icon adapted to Tabler IconBrandReactNative)
- button-basic / button-loading-state: converge to baseline (console report,
  no added status paragraph) keeping the duplicate-trigger guard
- restore per-demo root gap/alignment/wrap classes instead of demo-row
- icon semantics per task card: search glyph kept on 搜索 buttons,
  rotate-back glyph restored (IconRefresh), person-search glyph restored
  (IconUserSearch); accordion item icons sized to the baseline 16px
This commit is contained in:
maoyingjie
2026-10-28 09:42:17 +08:00
parent df954aface
commit 896bac2cd7
41 changed files with 830 additions and 412 deletions
+49 -24
View File
@@ -1,33 +1,58 @@
<script setup lang="ts">
import {
ButtonGroup,
Button,
ButtonGroup,
ButtonGroupSeparator,
} from "@heroui-vue/components";
import {
IconAlignCenter,
IconAlignJustified,
IconAlignLeft,
IconAlignRight,
} from "@tabler/icons-vue";
</script>
<template>
<div class="demo-row">
<ButtonGroup orientation="horizontal">
<Button>First</Button>
<Button>
<ButtonGroupSeparator />
Second
</Button>
<Button>
<ButtonGroupSeparator />
Third
</Button>
</ButtonGroup>
<ButtonGroup orientation="vertical">
<Button>First</Button>
<Button>
<ButtonGroupSeparator />
Second
</Button>
<Button>
<ButtonGroupSeparator />
Third
</Button>
</ButtonGroup>
<div class="flex items-start gap-8">
<div class="flex flex-col gap-2">
<span class="text-sm text-muted">横向</span>
<ButtonGroup orientation="horizontal" variant="tertiary">
<Button is-icon-only aria-label="左对齐">
<IconAlignLeft aria-hidden="true" />
</Button>
<Button is-icon-only aria-label="居中对齐">
<ButtonGroupSeparator />
<IconAlignCenter aria-hidden="true" />
</Button>
<Button is-icon-only aria-label="右对齐">
<ButtonGroupSeparator />
<IconAlignRight aria-hidden="true" />
</Button>
<Button is-icon-only aria-label="两端对齐">
<ButtonGroupSeparator />
<IconAlignJustified aria-hidden="true" />
</Button>
</ButtonGroup>
</div>
<div class="flex flex-col gap-2">
<span class="text-sm text-muted">纵向</span>
<ButtonGroup orientation="vertical" variant="tertiary">
<Button is-icon-only aria-label="左对齐">
<IconAlignLeft aria-hidden="true" />
</Button>
<Button is-icon-only aria-label="居中对齐">
<ButtonGroupSeparator />
<IconAlignCenter aria-hidden="true" />
</Button>
<Button is-icon-only aria-label="右对齐">
<ButtonGroupSeparator />
<IconAlignRight aria-hidden="true" />
</Button>
<Button is-icon-only aria-label="两端对齐">
<ButtonGroupSeparator />
<IconAlignJustified aria-hidden="true" />
</Button>
</ButtonGroup>
</div>
</div>
</template>