@beehexa/design-rules 2611.5.5 → 2611.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AGENTS.md +1 -1
- package/dist/catalog.json +3053 -777
- package/dist/docs/public/_redirects +2 -2
- package/dist/docs/public/r/action-bar.json +26 -0
- package/dist/docs/public/r/beehexa-theme.json +18 -0
- package/dist/docs/public/r/button-group.json +26 -0
- package/dist/docs/public/r/button.json +28 -0
- package/dist/docs/public/r/copy-button.json +26 -0
- package/dist/docs/public/r/dropdown-menu.json +56 -0
- package/dist/docs/public/r/index.json +66 -0
- package/dist/docs/public/r/segmented-control.json +31 -0
- package/dist/docs/public/r/toggle.json +26 -0
- package/dist/docs/public/r/toolbar.json +46 -0
- package/dist/docs/public/r/tooltip.json +41 -0
- package/dist/docs/scripts/color-pairs.mjs +2 -0
- package/dist/docs/src/components/ChildPages.astro +8 -1
- package/dist/docs/src/components/CodeExample.astro +123 -6
- package/dist/docs/src/components/ColorDemo.astro +21 -18
- package/dist/docs/src/components/ComponentTabs.astro +1 -1
- package/dist/docs/src/components/DocsFooter.astro +1 -1
- package/dist/docs/src/components/ElevationDemo.astro +2 -2
- package/dist/docs/src/components/HelpOptions.astro +8 -6
- package/dist/docs/src/components/IconBrowser.astro +2 -2
- package/dist/docs/src/components/LayoutDemo.astro +178 -99
- package/dist/docs/src/components/NativeControlsDemo.astro +169 -44
- package/dist/docs/src/components/NativeFlowDemo.astro +206 -0
- package/dist/docs/src/components/PhaseTable.astro +9 -5
- package/dist/docs/src/components/RoleGuides.astro +30 -22
- package/dist/docs/src/components/RuleDemo.astro +111 -0
- package/dist/docs/src/components/ShapeDemo.astro +25 -37
- package/dist/docs/src/components/SiteHeader.astro +1 -1
- package/dist/docs/src/components/SpacingDemo.astro +5 -3
- package/dist/docs/src/components/SwitchToggle.astro +13 -0
- package/dist/docs/src/components/SystemAreas.astro +9 -6
- package/dist/docs/src/components/TableOfContents.astro +1 -1
- package/dist/docs/src/components/TokenSearch.astro +64 -0
- package/dist/docs/src/components/TokenTable.astro +14 -9
- package/dist/docs/src/components/TypeDemo.astro +1 -1
- package/dist/docs/src/components/logos/LogoClearSpace.astro +1 -1
- package/dist/docs/src/content/components/action-bar/accessibility.mdx +32 -0
- package/dist/docs/src/content/components/action-bar/changelog.mdx +7 -0
- package/dist/docs/src/content/components/action-bar/code.mdx +69 -0
- package/dist/docs/src/content/components/action-bar/examples.mdx +16 -0
- package/dist/docs/src/content/components/action-bar/meta.json +9 -0
- package/dist/docs/src/content/components/action-bar/style.mdx +13 -0
- package/dist/docs/src/content/components/action-bar/usage.mdx +35 -0
- package/dist/docs/src/content/components/button/accessibility.mdx +10 -5
- package/dist/docs/src/content/components/button/changelog.mdx +26 -1
- package/dist/docs/src/content/components/button/code.mdx +130 -25
- package/dist/docs/src/content/components/button/examples.mdx +109 -23
- package/dist/docs/src/content/components/button/meta.json +5 -1
- package/dist/docs/src/content/components/button/style.mdx +72 -0
- package/dist/docs/src/content/components/button/usage.mdx +118 -29
- package/dist/docs/src/content/components/button-group/accessibility.mdx +32 -0
- package/dist/docs/src/content/components/button-group/changelog.mdx +7 -0
- package/dist/docs/src/content/components/button-group/code.mdx +39 -0
- package/dist/docs/src/content/components/button-group/examples.mdx +36 -0
- package/dist/docs/src/content/components/button-group/meta.json +9 -0
- package/dist/docs/src/content/components/button-group/style.mdx +12 -0
- package/dist/docs/src/content/components/button-group/usage.mdx +31 -0
- package/dist/docs/src/content/components/icon-button/accessibility.mdx +35 -0
- package/dist/docs/src/content/components/icon-button/changelog.mdx +7 -0
- package/dist/docs/src/content/components/icon-button/code.mdx +66 -0
- package/dist/docs/src/content/components/icon-button/examples.mdx +46 -0
- package/dist/docs/src/content/components/icon-button/meta.json +9 -0
- package/dist/docs/src/content/components/icon-button/style.mdx +13 -0
- package/dist/docs/src/content/components/icon-button/usage.mdx +42 -0
- package/dist/docs/src/content/components/menu-button/accessibility.mdx +36 -0
- package/dist/docs/src/content/components/menu-button/changelog.mdx +7 -0
- package/dist/docs/src/content/components/menu-button/code.mdx +55 -0
- package/dist/docs/src/content/components/menu-button/examples.mdx +26 -0
- package/dist/docs/src/content/components/menu-button/meta.json +9 -0
- package/dist/docs/src/content/components/menu-button/style.mdx +15 -0
- package/dist/docs/src/content/components/menu-button/usage.mdx +44 -0
- package/dist/docs/src/content/components/resizable-panel/meta.json +5 -1
- package/dist/docs/src/content/{foundations/styles/scrollbars.mdx → components/scrollbar/code.mdx} +20 -39
- package/dist/docs/src/content/components/scrollbar/meta.json +9 -0
- package/dist/docs/src/content/components/scrollbar/usage.mdx +36 -0
- package/dist/docs/src/content/components/segmented-control/accessibility.mdx +32 -0
- package/dist/docs/src/content/components/segmented-control/changelog.mdx +7 -0
- package/dist/docs/src/content/components/segmented-control/code.mdx +46 -0
- package/dist/docs/src/content/components/segmented-control/examples.mdx +26 -0
- package/dist/docs/src/content/components/segmented-control/meta.json +9 -0
- package/dist/docs/src/content/components/segmented-control/style.mdx +13 -0
- package/dist/docs/src/content/components/segmented-control/usage.mdx +38 -0
- package/dist/docs/src/content/components/split-button/accessibility.mdx +32 -0
- package/dist/docs/src/content/components/split-button/changelog.mdx +7 -0
- package/dist/docs/src/content/components/split-button/code.mdx +57 -0
- package/dist/docs/src/content/components/split-button/examples.mdx +26 -0
- package/dist/docs/src/content/components/split-button/meta.json +9 -0
- package/dist/docs/src/content/components/split-button/style.mdx +12 -0
- package/dist/docs/src/content/components/split-button/usage.mdx +28 -0
- package/dist/docs/src/content/components/switch/accessibility.mdx +28 -0
- package/dist/docs/src/content/components/switch/examples.mdx +35 -0
- package/dist/docs/src/content/components/switch/meta.json +9 -0
- package/dist/docs/src/content/components/switch/usage.mdx +44 -0
- package/dist/docs/src/content/components/toggle-button/accessibility.mdx +31 -0
- package/dist/docs/src/content/components/toggle-button/changelog.mdx +7 -0
- package/dist/docs/src/content/components/toggle-button/code.mdx +45 -0
- package/dist/docs/src/content/components/toggle-button/examples.mdx +36 -0
- package/dist/docs/src/content/components/toggle-button/meta.json +9 -0
- package/dist/docs/src/content/components/toggle-button/style.mdx +11 -0
- package/dist/docs/src/content/components/toggle-button/usage.mdx +33 -0
- package/dist/docs/src/content/components/toolbar/accessibility.mdx +33 -0
- package/dist/docs/src/content/components/toolbar/changelog.mdx +7 -0
- package/dist/docs/src/content/components/toolbar/code.mdx +81 -0
- package/dist/docs/src/content/components/toolbar/examples.mdx +16 -0
- package/dist/docs/src/content/components/toolbar/meta.json +9 -0
- package/dist/docs/src/content/components/toolbar/style.mdx +12 -0
- package/dist/docs/src/content/components/toolbar/usage.mdx +36 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/statement.mdx +4 -2
- package/dist/docs/src/content/foundations/guidelines/accessibility/testing.mdx +1 -1
- package/dist/docs/src/content/foundations/guidelines/content/messages.mdx +67 -0
- package/dist/docs/src/content/foundations/guidelines/content/numbers-dates-and-currency.mdx +72 -0
- package/dist/docs/src/content/foundations/guidelines/content/style-and-grammar.mdx +92 -0
- package/dist/docs/src/content/foundations/guidelines/content/terms.mdx +57 -0
- package/dist/docs/src/content/foundations/guidelines/content/voice-and-tone.mdx +48 -0
- package/dist/docs/src/content/foundations/guidelines/content.mdx +22 -17
- package/dist/docs/src/content/foundations/styles/border.mdx +1 -6
- package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +66 -6
- package/dist/docs/src/content/foundations/styles/color/usage.mdx +5 -5
- package/dist/docs/src/content/foundations/styles/data-visualization.mdx +2 -78
- package/dist/docs/src/content/foundations/styles/elevation.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/icons/code.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/icons/library.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/icons/usage.mdx +0 -3
- package/dist/docs/src/content/foundations/styles/interaction-states.mdx +13 -69
- package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +4 -9
- package/dist/docs/src/content/foundations/styles/layout/grid.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +3 -0
- package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +3 -3
- package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/motion.mdx +3 -1
- package/dist/docs/src/content/foundations/styles/radius.mdx +32 -28
- package/dist/docs/src/content/foundations/styles/size-and-density.mdx +7 -6
- package/dist/docs/src/content/foundations/styles/spacing.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/typography/code.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/typography/usage.mdx +7 -0
- package/dist/docs/src/content/foundations/styles/z-index.mdx +3 -16
- package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +51 -2
- package/dist/docs/src/content/foundations/tokens/index.mdx +91 -6
- package/dist/docs/src/content/get-started/content.mdx +25 -3
- package/dist/docs/src/content/get-started/design.mdx +34 -15
- package/dist/docs/src/content/get-started/develop.mdx +83 -28
- package/dist/docs/src/content/get-started/get-help.mdx +21 -5
- package/dist/docs/src/content/get-started/index.mdx +11 -12
- package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +176 -48
- package/dist/docs/src/content/tools/application-content.mdx +52 -13
- package/dist/docs/src/content/tools/editors.mdx +36 -28
- package/dist/docs/src/content/tools/mermaid.mdx +42 -9
- package/dist/docs/src/content/tools/vueflow.mdx +199 -60
- package/dist/docs/src/content-vi/components/action-bar/accessibility.mdx +32 -0
- package/dist/docs/src/content-vi/components/action-bar/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/action-bar/code.mdx +69 -0
- package/dist/docs/src/content-vi/components/action-bar/examples.mdx +16 -0
- package/dist/docs/src/content-vi/components/action-bar/style.mdx +13 -0
- package/dist/docs/src/content-vi/components/action-bar/usage.mdx +35 -0
- package/dist/docs/src/content-vi/components/button/accessibility.mdx +56 -0
- package/dist/docs/src/content-vi/components/button/changelog.mdx +31 -0
- package/dist/docs/src/content-vi/components/button/code.mdx +139 -0
- package/dist/docs/src/content-vi/components/button/examples.mdx +126 -0
- package/dist/docs/src/content-vi/components/button/style.mdx +72 -0
- package/dist/docs/src/content-vi/components/button/usage.mdx +133 -0
- package/dist/docs/src/content-vi/components/button-group/accessibility.mdx +32 -0
- package/dist/docs/src/content-vi/components/button-group/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/button-group/code.mdx +39 -0
- package/dist/docs/src/content-vi/components/button-group/examples.mdx +36 -0
- package/dist/docs/src/content-vi/components/button-group/style.mdx +12 -0
- package/dist/docs/src/content-vi/components/button-group/usage.mdx +31 -0
- package/dist/docs/src/content-vi/components/icon-button/accessibility.mdx +35 -0
- package/dist/docs/src/content-vi/components/icon-button/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/icon-button/code.mdx +66 -0
- package/dist/docs/src/content-vi/components/icon-button/examples.mdx +46 -0
- package/dist/docs/src/content-vi/components/icon-button/style.mdx +13 -0
- package/dist/docs/src/content-vi/components/icon-button/usage.mdx +42 -0
- package/dist/docs/src/content-vi/components/menu-button/accessibility.mdx +36 -0
- package/dist/docs/src/content-vi/components/menu-button/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/menu-button/code.mdx +55 -0
- package/dist/docs/src/content-vi/components/menu-button/examples.mdx +26 -0
- package/dist/docs/src/content-vi/components/menu-button/style.mdx +15 -0
- package/dist/docs/src/content-vi/components/menu-button/usage.mdx +44 -0
- package/dist/docs/src/content-vi/components/resizable-panel/accessibility.mdx +58 -0
- package/dist/docs/src/content-vi/components/resizable-panel/changelog.mdx +20 -0
- package/dist/docs/src/content-vi/components/resizable-panel/code.mdx +78 -0
- package/dist/docs/src/content-vi/components/resizable-panel/examples.mdx +83 -0
- package/dist/docs/src/content-vi/components/resizable-panel/usage.mdx +97 -0
- package/dist/docs/src/content-vi/components/scrollbar/code.mdx +71 -0
- package/dist/docs/src/content-vi/components/scrollbar/usage.mdx +36 -0
- package/dist/docs/src/content-vi/components/segmented-control/accessibility.mdx +32 -0
- package/dist/docs/src/content-vi/components/segmented-control/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/segmented-control/code.mdx +46 -0
- package/dist/docs/src/content-vi/components/segmented-control/examples.mdx +26 -0
- package/dist/docs/src/content-vi/components/segmented-control/style.mdx +13 -0
- package/dist/docs/src/content-vi/components/segmented-control/usage.mdx +38 -0
- package/dist/docs/src/content-vi/components/split-button/accessibility.mdx +32 -0
- package/dist/docs/src/content-vi/components/split-button/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/split-button/code.mdx +57 -0
- package/dist/docs/src/content-vi/components/split-button/examples.mdx +26 -0
- package/dist/docs/src/content-vi/components/split-button/style.mdx +12 -0
- package/dist/docs/src/content-vi/components/split-button/usage.mdx +28 -0
- package/dist/docs/src/content-vi/components/switch/accessibility.mdx +28 -0
- package/dist/docs/src/content-vi/components/switch/examples.mdx +35 -0
- package/dist/docs/src/content-vi/components/switch/usage.mdx +44 -0
- package/dist/docs/src/content-vi/components/toggle-button/accessibility.mdx +31 -0
- package/dist/docs/src/content-vi/components/toggle-button/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/toggle-button/code.mdx +45 -0
- package/dist/docs/src/content-vi/components/toggle-button/examples.mdx +36 -0
- package/dist/docs/src/content-vi/components/toggle-button/style.mdx +11 -0
- package/dist/docs/src/content-vi/components/toggle-button/usage.mdx +33 -0
- package/dist/docs/src/content-vi/components/toolbar/accessibility.mdx +33 -0
- package/dist/docs/src/content-vi/components/toolbar/changelog.mdx +7 -0
- package/dist/docs/src/content-vi/components/toolbar/code.mdx +81 -0
- package/dist/docs/src/content-vi/components/toolbar/examples.mdx +16 -0
- package/dist/docs/src/content-vi/components/toolbar/style.mdx +12 -0
- package/dist/docs/src/content-vi/components/toolbar/usage.mdx +36 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/statement.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/testing.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/guidelines/content/messages.mdx +67 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/numbers-dates-and-currency.mdx +71 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/style-and-grammar.mdx +91 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/terms.mdx +57 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/voice-and-tone.mdx +48 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content.mdx +24 -19
- package/dist/docs/src/content-vi/foundations/styles/border.mdx +1 -5
- package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +65 -6
- package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +7 -7
- package/dist/docs/src/content-vi/foundations/styles/data-visualization.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +3 -3
- package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/icons/library.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +1 -4
- package/dist/docs/src/content-vi/foundations/styles/illustration.mdx +3 -3
- package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +13 -10
- package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +4 -9
- package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/layout/overlays.mdx +3 -0
- package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +4 -4
- package/dist/docs/src/content-vi/foundations/styles/logos/product-logos.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/logos/using-the-logo.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/motion.mdx +3 -1
- package/dist/docs/src/content-vi/foundations/styles/opacity.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/radius.mdx +32 -28
- package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +7 -6
- package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +7 -0
- package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +3 -16
- package/dist/docs/src/content-vi/foundations/tokens/all-tokens.mdx +51 -2
- package/dist/docs/src/content-vi/foundations/tokens/index.mdx +90 -5
- package/dist/docs/src/content-vi/get-started/content.mdx +36 -0
- package/dist/docs/src/content-vi/get-started/design.mdx +49 -0
- package/dist/docs/src/content-vi/get-started/develop.mdx +110 -0
- package/dist/docs/src/content-vi/get-started/get-help.mdx +35 -0
- package/dist/docs/src/content-vi/get-started/index.mdx +49 -0
- package/dist/docs/src/content-vi/release-phases/index.mdx +11 -0
- package/dist/docs/src/content-vi/tools/ai-agents.mdx +36 -0
- package/dist/docs/src/content-vi/tools/ant-design-vue-theme.mdx +676 -0
- package/dist/docs/src/content-vi/tools/application-content.mdx +171 -0
- package/dist/docs/src/content-vi/tools/editors.mdx +254 -0
- package/dist/docs/src/content-vi/tools/eslint.mdx +15 -0
- package/dist/docs/src/content-vi/tools/index.mdx +7 -0
- package/dist/docs/src/content-vi/tools/mermaid.mdx +179 -0
- package/dist/docs/src/content-vi/tools/stylelint.mdx +18 -0
- package/dist/docs/src/content-vi/tools/vueflow.mdx +264 -0
- package/dist/docs/src/content.config.ts +13 -2
- package/dist/docs/src/lib/dates.ts +8 -0
- package/dist/docs/src/lib/i18n.ts +1 -0
- package/dist/docs/src/lib/icons.ts +2 -2
- package/dist/docs/src/lib/lucide-svg.ts +14 -0
- package/dist/docs/src/lib/navigation.ts +7 -4
- package/dist/docs/src/lib/token-descriptions-vi.ts +254 -12
- package/dist/docs/src/lib/tokens.ts +3 -0
- package/dist/docs/src/lib/utils.ts +9 -0
- package/dist/docs/src/styles/chrome.css +7 -7
- package/dist/docs/src/styles/color.css +31 -31
- package/dist/docs/src/styles/docs.css +75 -46
- package/dist/docs/src/styles/elevation.css +1 -1
- package/dist/docs/src/styles/global.css +28 -11
- package/dist/docs/src/styles/icons.css +16 -16
- package/dist/docs/src/styles/kit.css +71 -10
- package/dist/docs/src/styles/layout.css +16 -11
- package/dist/docs/src/styles/logos.css +24 -24
- package/dist/docs/src/styles/opacity.css +3 -3
- package/dist/docs/src/styles/registry.css +10 -0
- package/dist/docs/src/styles/rules.css +24 -0
- package/dist/docs/src/styles/shapes.css +2 -2
- package/dist/docs/src/styles/tokens.css +213 -120
- package/dist/docs/src/styles/tokens.js +69 -32
- package/dist/docs/src/styles/typography.css +9 -9
- package/dist/docs/src/styles/zindex.css +6 -5
- package/dist/docs/tokens/button.json +51 -0
- package/dist/docs/tokens/color.json +13 -8
- package/dist/docs/tokens/components.json +39 -0
- package/dist/docs/tokens/content.json +103 -10
- package/dist/docs/tokens/diagram.json +490 -49
- package/dist/docs/tokens/editor.json +128 -22
- package/dist/docs/tokens/flow.json +412 -80
- package/dist/docs/tokens/layout.json +13 -4
- package/dist/docs/tokens/motion.json +14 -0
- package/dist/docs/tokens/radius.json +9 -9
- package/dist/docs/tokens/renderer.json +8 -0
- package/dist/docs/tokens/resize.json +84 -15
- package/dist/docs/tokens/scrollbar.json +42 -7
- package/dist/docs/tokens/size.json +6 -6
- package/dist/docs/tokens/spacing.json +1 -1
- package/dist/docs/tokens/switch.json +306 -51
- package/dist/docs/tokens/typography.json +1 -1
- package/dist/docs/tokens/visualization.json +465 -53
- package/dist/docs/tokens/z-index.json +0 -10
- package/dist/index.js +3053 -777
- package/package.json +1 -1
- package/dist/docs/src/brand/structure-proposal.md +0 -227
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Keys, what Menu button gives you and what your team does.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Conformance
|
|
6
|
+
|
|
7
|
+
**Menu button meets WCAG 2.2 level AA when used as described on these pages.** It follows the [Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/) of the WAI-ARIA Authoring Practices.
|
|
8
|
+
|
|
9
|
+
## Keyboard
|
|
10
|
+
|
|
11
|
+
| Key | Action |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| <kbd>Enter</kbd>, <kbd>Space</kbd>, <kbd>↓</kbd> | Open the menu and focus the first item. |
|
|
14
|
+
| <kbd>↑</kbd> <kbd>↓</kbd> | Move between items. Typing a letter jumps to an item. |
|
|
15
|
+
| <kbd>Enter</kbd> | Runs the item and closes the menu. |
|
|
16
|
+
| <kbd>Esc</kbd> | Closes the menu and returns focus to the button. |
|
|
17
|
+
|
|
18
|
+
## What Menu button gives you
|
|
19
|
+
|
|
20
|
+
- `aria-haspopup="menu"` and `aria-expanded` on the button.
|
|
21
|
+
- `role="menu"` and `role="menuitem"`, with arrow keys, type-ahead and focus return.
|
|
22
|
+
- The menu stays inside the screen and flips when there is no room.
|
|
23
|
+
|
|
24
|
+
## What your team does
|
|
25
|
+
|
|
26
|
+
- Name an icon-only trigger with what it acts on: "More actions for Orders to ERP".
|
|
27
|
+
- Keep menu items as actions; use navigation for pages and a select for values.
|
|
28
|
+
- Ask for confirmation before a delete item runs.
|
|
29
|
+
|
|
30
|
+
## WCAG criteria
|
|
31
|
+
|
|
32
|
+
| Criterion | Level | How |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| 2.1.1 Keyboard | A | Every item reachable with arrow keys |
|
|
35
|
+
| 2.4.3 Focus Order | A | Focus returns to the button on close |
|
|
36
|
+
| 4.1.2 Name, Role, Value | A | `aria-expanded` follows the menu |
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Install, props and the parts Menu button is built from.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Run these in the app, after `shadcn-vue init` and the Beehexa theme ([Button › Code](/components/button/code/)):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx shadcn-vue@latest add https://beehexa.design/r/button.json
|
|
11
|
+
npx shadcn-vue@latest add https://beehexa.design/r/dropdown-menu.json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Use
|
|
15
|
+
|
|
16
|
+
```vue
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { ChevronDown, FileSpreadsheet, FileText, Link } from '@lucide/vue'
|
|
19
|
+
import { Button } from '@/components/ui/button'
|
|
20
|
+
import {
|
|
21
|
+
DropdownMenu,
|
|
22
|
+
DropdownMenuContent,
|
|
23
|
+
DropdownMenuItem,
|
|
24
|
+
DropdownMenuSeparator,
|
|
25
|
+
DropdownMenuTrigger,
|
|
26
|
+
} from '@/components/ui/dropdown-menu'
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<DropdownMenu>
|
|
31
|
+
<DropdownMenuTrigger as-child>
|
|
32
|
+
<Button variant="outline">Export<ChevronDown /></Button>
|
|
33
|
+
</DropdownMenuTrigger>
|
|
34
|
+
<DropdownMenuContent>
|
|
35
|
+
<DropdownMenuItem><FileText />Export as CSV</DropdownMenuItem>
|
|
36
|
+
<DropdownMenuItem><FileSpreadsheet />Export as Excel</DropdownMenuItem>
|
|
37
|
+
<DropdownMenuSeparator />
|
|
38
|
+
<DropdownMenuItem><Link />Copy link</DropdownMenuItem>
|
|
39
|
+
</DropdownMenuContent>
|
|
40
|
+
</DropdownMenu>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Props
|
|
45
|
+
|
|
46
|
+
| Prop | Values | Notes |
|
|
47
|
+
| --- | --- | --- |
|
|
48
|
+
| DropdownMenuTrigger `as-child` | boolean | Puts the menu behaviour on the Button inside |
|
|
49
|
+
| DropdownMenuContent `align` | `start` (default), `center`, `end` | `end` for a button at the end of a row |
|
|
50
|
+
| DropdownMenuItem `variant` | `default`, `destructive` | Danger tone for delete |
|
|
51
|
+
| DropdownMenuItem `disabled` | boolean | Skipped by arrow keys |
|
|
52
|
+
|
|
53
|
+
## Built on
|
|
54
|
+
|
|
55
|
+
The Dropdown menu wraps the reka-ui DropdownMenu with the same API as shadcn-vue. A menu button is a Button inside `DropdownMenuTrigger as-child`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Live examples of Menu button, with the exact Vue file that renders each one.
|
|
3
|
+
---
|
|
4
|
+
import CodeExample from '../../../components/CodeExample.astro';
|
|
5
|
+
import MenuButtonBasic from '../../../../registry/beehexa/examples/menu-button/en/MenuButtonBasic.vue';
|
|
6
|
+
import MenuButtonBasicSource from '../../../../registry/beehexa/examples/menu-button/en/MenuButtonBasic.vue?raw';
|
|
7
|
+
import MenuButtonMore from '../../../../registry/beehexa/examples/menu-button/en/MenuButtonMore.vue';
|
|
8
|
+
import MenuButtonMoreSource from '../../../../registry/beehexa/examples/menu-button/en/MenuButtonMore.vue?raw';
|
|
9
|
+
|
|
10
|
+
Every example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.
|
|
11
|
+
|
|
12
|
+
## With a label
|
|
13
|
+
|
|
14
|
+
A Default button with a chevron. The menu holds related actions; a separator splits the groups.
|
|
15
|
+
|
|
16
|
+
<CodeExample source={MenuButtonBasicSource} file="MenuButtonBasic.vue">
|
|
17
|
+
<MenuButtonBasic client:visible />
|
|
18
|
+
</CodeExample>
|
|
19
|
+
|
|
20
|
+
## More actions in a row
|
|
21
|
+
|
|
22
|
+
The icon-only "More actions" button at the end of a row. Delete is last, in the danger tone.
|
|
23
|
+
|
|
24
|
+
<CodeExample source={MenuButtonMoreSource} file="MenuButtonMore.vue">
|
|
25
|
+
<MenuButtonMore client:visible />
|
|
26
|
+
</CodeExample>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Parts, tokens, sizes and spacing of Menu button.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Tokens
|
|
6
|
+
|
|
7
|
+
| Part | Tokens and values |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Button while open | `button.background.subtle.pressed` (`aria-expanded="true"`) |
|
|
10
|
+
| Menu | `color.surface.overlay`, border `color.border`, `elevation.shadow.overlay`, `radius.overlay`, padding `space.050`, `z-index.overlay`, 4 px from the button |
|
|
11
|
+
| Item | `size.control.default` high, `font.body.default`, padding `space.100`, `radius.control.small`; icon `color.icon.subtle` |
|
|
12
|
+
| Highlighted item | `color.surface.overlay.hover` |
|
|
13
|
+
| Danger item | `color.text.danger`, icon `color.icon.danger` |
|
|
14
|
+
| Separator | `border.width.default` of `color.border` |
|
|
15
|
+
| Shortcut | `font.body.small`, `color.text.subtle` |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: When to use menu button, its parts, states, keys and accessibility.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> **Draft.** Proposed from the survey of 18 design systems and not yet approved. It is in the registry so teams can try it; the API may still change before approval.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- To hold several related actions that don't fit as buttons: export as CSV, export as Excel, copy a link.
|
|
10
|
+
- As the "More actions" icon button at the end of a row or a card header.
|
|
11
|
+
|
|
12
|
+
## When not to use
|
|
13
|
+
|
|
14
|
+
- When one action is clearly the default. Use a [split button](/components/split-button/usage/).
|
|
15
|
+
- To choose a value for a form. Use a select.
|
|
16
|
+
- To go to other pages. Use navigation.
|
|
17
|
+
|
|
18
|
+
## Anatomy
|
|
19
|
+
|
|
20
|
+
| Part | Required | Notes |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| Button | Yes | Any Button variant and size. |
|
|
23
|
+
| Chevron | Yes, except icon-only | `chevron-down` after the label. |
|
|
24
|
+
| Menu | Yes | `color.surface.overlay`, `elevation.shadow.overlay`, `radius.overlay`, at `z-index.overlay`. |
|
|
25
|
+
| Menu item | Yes | Optional icon, label, optional shortcut. Hover `color.surface.overlay.hover`. |
|
|
26
|
+
|
|
27
|
+
## States
|
|
28
|
+
|
|
29
|
+
The button has the Button states. While its menu is open it keeps the pressed look (`aria-expanded="true"` uses `button.background.subtle.pressed`).
|
|
30
|
+
|
|
31
|
+
## Keyboard
|
|
32
|
+
|
|
33
|
+
| Key | Does |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| Enter, Space, Down arrow | Open the menu and focus the first item |
|
|
36
|
+
| Up arrow | Open the menu and focus the last item |
|
|
37
|
+
| Up and Down arrows | Move between items |
|
|
38
|
+
| Enter | Run the item and close the menu |
|
|
39
|
+
| Esc | Close the menu and return focus to the button |
|
|
40
|
+
|
|
41
|
+
## Accessibility
|
|
42
|
+
|
|
43
|
+
- The button has `aria-haspopup="menu"` and `aria-expanded`.
|
|
44
|
+
- The menu has `role="menu"` and is named by the button; items have `role="menuitem"`.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Resizable panel",
|
|
3
3
|
"description": "Two bounded, state-preserving Vue panes with an accessible pointer, touch and keyboard separator.",
|
|
4
|
-
"group": "Layout"
|
|
4
|
+
"group": "Layout",
|
|
5
|
+
"vi": {
|
|
6
|
+
"title": "Ô kéo giãn",
|
|
7
|
+
"description": "Hai ô Vue có giới hạn, giữ nguyên trạng thái, với thanh chia dùng được bằng con trỏ, cảm ứng và bàn phím."
|
|
8
|
+
}
|
|
5
9
|
}
|
package/dist/docs/src/content/{foundations/styles/scrollbars.mdx → components/scrollbar/code.mdx}
RENAMED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: One native and virtual scrollbar appearance family, native ownership, root scaling and accessible platform fallbacks.
|
|
4
|
-
order: 11
|
|
2
|
+
description: Import the scrollbar CSS once and mark the elements that scroll.
|
|
5
3
|
---
|
|
6
|
-
import TokenTable from '../../../components/TokenTable.astro';
|
|
7
4
|
|
|
8
|
-
##
|
|
5
|
+
## Installation
|
|
9
6
|
|
|
10
7
|
All native-DOM scroll owners share one Beehexa scrollbar appearance, including
|
|
11
8
|
framework Table bodies, Tree/list holders, drawers and native popup portals.
|
|
@@ -95,6 +92,23 @@ Change a retained viewer's display language with Monaco's `setModelLanguage` on
|
|
|
95
92
|
its existing model. Replacing the model also replaces its native view subtree;
|
|
96
93
|
language changes are not a reason to discard retained editor/model identity.
|
|
97
94
|
|
|
95
|
+
Monaco Diff Overview is a separate two-lane change map, not another scrollbar.
|
|
96
|
+
Monaco fixes that map at 30px and gives its viewport marker the full map width,
|
|
97
|
+
without a public marker-width option. Source narrows only the visible marker to
|
|
98
|
+
`scrollbar.width`, aligns it to the inline end and applies the same normal,
|
|
99
|
+
hover and pressed thumb roles and radius. One scoped `!important` overrides
|
|
100
|
+
the native inline marker width. Both map lanes and their change markers remain;
|
|
101
|
+
native marker top/height, pointer delegation, wheel navigation and synchronized
|
|
102
|
+
original/modified scrolling are unchanged. Do not disable `renderOverviewRuler`
|
|
103
|
+
or hide a real editor/modal scrollbar to make their widths appear equal.
|
|
104
|
+
For `monaco-editor-vue3` DiffEditor, bind the Source
|
|
105
|
+
`useBeehexaMonacoDiffOptions(computedOptions)` mount callback as documented in
|
|
106
|
+
the [editor companion](/tools/editors/#public-editor-companion). Unlike its code
|
|
107
|
+
editor, that native Vue wrapper does not watch options after mount. Merely
|
|
108
|
+
passing a computed options prop leaves native scrollbar sizes stale when the
|
|
109
|
+
reader root changes. Update the retained instance; never remount it to resize.
|
|
110
|
+
|
|
111
|
+
|
|
98
112
|
## Source roles and Ant Design Vue 4 evidence
|
|
99
113
|
|
|
100
114
|
These are reusable semantic roles, not an application palette. The installed Ant
|
|
@@ -123,35 +137,6 @@ light and dark mode. Vietnamese uses the same geometry and colors; no locale-onl
|
|
|
123
137
|
scrollbar override is needed. Keep the native reader root size; `0.5rem` is nominal
|
|
124
138
|
8px, not a hardcoded root-font mandate.
|
|
125
139
|
|
|
126
|
-
## Contrast, interaction and native fallbacks
|
|
127
|
-
|
|
128
|
-
The thumb is the foreground, not the track. Keep its opaque source color visibly
|
|
129
|
-
distinguishable from the track in both themes; validate at least 3:1 for the
|
|
130
|
-
thumb/track pair when changing their source aliases. Hover and active use the
|
|
131
|
-
stronger text role, not transparency or an invented shade. Text and focus around
|
|
132
|
-
the scroller still use their own semantic foreground and focus roles. A thin bar
|
|
133
|
-
is not the only input mechanism: preserve wheel, touch, keyboard and assistive
|
|
134
|
-
technology access. Give an otherwise unreachable scroll viewport an appropriate
|
|
135
|
-
accessible name and keyboard focus as needed; do not add redundant tab stops to
|
|
136
|
-
already reachable native components.
|
|
137
|
-
|
|
138
|
-
Engines with WebKit scrollbar pseudo-elements use the token dimension for both
|
|
139
|
-
width and height, track/corner colors, full radius and real thumb hover/active.
|
|
140
|
-
The stylesheet selects that renderer with a feature query and leaves the standard
|
|
141
|
-
scrollbar properties at `auto`, because non-auto standard properties suppress
|
|
142
|
-
pseudo-element rendering in modern Chromium. Standards-only engines use native
|
|
143
|
-
`thin` geometry and the same thumb/track colors; their API does not expose radius,
|
|
144
|
-
corner or thumb hover/drag pseudo-elements, so hover/active colors follow the
|
|
145
|
-
scroll host's corresponding state. Do not claim pixel-identical geometry or
|
|
146
|
-
simulate missing thumb events in JavaScript.
|
|
147
|
-
|
|
148
|
-
OS overlay scrollbars may keep their native visibility, hit area or geometry.
|
|
149
|
-
Keep that platform behavior rather than forcing a persistent gutter, hiding bars
|
|
150
|
-
or drawing a substitute. In forced-colors mode the custom paint/geometry recipe
|
|
151
|
-
is inactive: native system scrollbar colors and dimensions remain available.
|
|
152
|
-
Unsupported engines retain their native scrollbar. None of these fallbacks is
|
|
153
|
-
permission for an application-owned competing scrollbar recipe.
|
|
154
|
-
|
|
155
140
|
## Verification
|
|
156
141
|
|
|
157
142
|
Use the built/packed imports, never copied generated CSS. Compare actual Revisions
|
|
@@ -169,8 +154,4 @@ columns or fake empty scrollbar. Source/build alone is not visual proof.
|
|
|
169
154
|
The package payload checker requires the typed `css/scrollbars` export, resolves a
|
|
170
155
|
strict side-effect import from a real extracted tarball and compares its CSS bytes
|
|
171
156
|
against `src/styles/scrollbars.css`. The complete active rule is discoverable as
|
|
172
|
-
`en/
|
|
173
|
-
|
|
174
|
-
## Tokens
|
|
175
|
-
|
|
176
|
-
<TokenTable prefix="scrollbar" />
|
|
157
|
+
`en/components/scrollbar/code` through `@beehexa/design-rules`.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Scrollbar",
|
|
3
|
+
"description": "One scrollbar appearance for every area that scrolls, on top of the browser's own scrolling.",
|
|
4
|
+
"group": "Layout",
|
|
5
|
+
"vi": {
|
|
6
|
+
"title": "Thanh cuộn",
|
|
7
|
+
"description": "Một kiểu thanh cuộn cho mọi vùng cuộn, dựa trên cơ chế cuộn sẵn có của trình duyệt."
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
---
|
|
3
|
+
import TokenTable from '../../../components/TokenTable.astro';
|
|
4
|
+
|
|
5
|
+
## Contrast, interaction and native fallbacks
|
|
6
|
+
|
|
7
|
+
The thumb is the foreground, not the track. Keep its opaque source color visibly
|
|
8
|
+
distinguishable from the track in both themes; validate at least 3:1 for the
|
|
9
|
+
thumb/track pair when changing their source aliases. Hover and active use the
|
|
10
|
+
stronger text role, not transparency or an invented shade. Text and focus around
|
|
11
|
+
the scroller still use their own semantic foreground and focus roles. A thin bar
|
|
12
|
+
is not the only input mechanism: preserve wheel, touch, keyboard and assistive
|
|
13
|
+
technology access. Give an otherwise unreachable scroll viewport an appropriate
|
|
14
|
+
accessible name and keyboard focus as needed; do not add redundant tab stops to
|
|
15
|
+
already reachable native components.
|
|
16
|
+
|
|
17
|
+
Engines with WebKit scrollbar pseudo-elements use the token dimension for both
|
|
18
|
+
width and height, track/corner colors, full radius and real thumb hover/active.
|
|
19
|
+
The stylesheet selects that renderer with a feature query and leaves the standard
|
|
20
|
+
scrollbar properties at `auto`, because non-auto standard properties suppress
|
|
21
|
+
pseudo-element rendering in modern Chromium. Standards-only engines use native
|
|
22
|
+
`thin` geometry and the same thumb/track colors; their API does not expose radius,
|
|
23
|
+
corner or thumb hover/drag pseudo-elements, so hover/active colors follow the
|
|
24
|
+
scroll host's corresponding state. Do not claim pixel-identical geometry or
|
|
25
|
+
simulate missing thumb events in JavaScript.
|
|
26
|
+
|
|
27
|
+
OS overlay scrollbars may keep their native visibility, hit area or geometry.
|
|
28
|
+
Keep that platform behavior rather than forcing a persistent gutter, hiding bars
|
|
29
|
+
or drawing a substitute. In forced-colors mode the custom paint/geometry recipe
|
|
30
|
+
is inactive: native system scrollbar colors and dimensions remain available.
|
|
31
|
+
Unsupported engines retain their native scrollbar. None of these fallbacks is
|
|
32
|
+
permission for an application-owned competing scrollbar recipe.
|
|
33
|
+
|
|
34
|
+
## Tokens
|
|
35
|
+
|
|
36
|
+
<TokenTable prefix="scrollbar" />
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Keys, what Segmented control gives you and what your team does.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Conformance
|
|
6
|
+
|
|
7
|
+
**Segmented control meets WCAG 2.2 level AA when used as described on these pages.** It follows the [Radio Group pattern](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) of the WAI-ARIA Authoring Practices.
|
|
8
|
+
|
|
9
|
+
## Keyboard
|
|
10
|
+
|
|
11
|
+
| Key | Action |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| <kbd>Tab</kbd> | Moves focus to the selected segment. |
|
|
14
|
+
| <kbd>←</kbd> <kbd>→</kbd> | Select the previous or next segment. |
|
|
15
|
+
|
|
16
|
+
## What Segmented control gives you
|
|
17
|
+
|
|
18
|
+
- `role="radiogroup"` with `role="radio"` and `aria-checked` on each segment.
|
|
19
|
+
- A selected segment that differs in fill, shadow and text colour.
|
|
20
|
+
|
|
21
|
+
## What your team does
|
|
22
|
+
|
|
23
|
+
- Name the control with `aria-label`.
|
|
24
|
+
- Use radio buttons in a form that is submitted.
|
|
25
|
+
|
|
26
|
+
## WCAG criteria
|
|
27
|
+
|
|
28
|
+
| Criterion | Level | How |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| 1.4.1 Use of Color | A | Fill, shadow and text change together |
|
|
31
|
+
| 2.1.1 Keyboard | A | Arrow keys select |
|
|
32
|
+
| 4.1.2 Name, Role, Value | A | `aria-checked` |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Install, props and the parts Segmented control is built from.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Run these in the app, after `shadcn-vue init` and the Beehexa theme ([Button › Code](/components/button/code/)):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx shadcn-vue@latest add https://beehexa.design/r/segmented-control.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Use
|
|
14
|
+
|
|
15
|
+
```vue
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { ref } from 'vue'
|
|
18
|
+
import { SegmentedControl, SegmentedControlItem } from '@/components/ui/segmented-control'
|
|
19
|
+
|
|
20
|
+
const period = ref('week')
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div class="flex flex-col items-start gap-(--bh-space-100)">
|
|
25
|
+
<SegmentedControl v-model="period" aria-label="Period">
|
|
26
|
+
<SegmentedControlItem value="day">Day</SegmentedControlItem>
|
|
27
|
+
<SegmentedControlItem value="week">Week</SegmentedControlItem>
|
|
28
|
+
<SegmentedControlItem value="month">Month</SegmentedControlItem>
|
|
29
|
+
</SegmentedControl>
|
|
30
|
+
<p class="m-0 text-(--bh-color-text-subtle)">Showing syncs by {{ period }}</p>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
| Prop | Values | Notes |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `v-model` (`modelValue`) | string | The selected value |
|
|
40
|
+
| `aria-label` | string | Names the choice, such as "Period" |
|
|
41
|
+
| SegmentedControlItem `value` | string | Required |
|
|
42
|
+
| `disabled` | boolean | On the control or one item |
|
|
43
|
+
|
|
44
|
+
## Built on
|
|
45
|
+
|
|
46
|
+
Wraps the reka-ui RadioGroup: it is a radio group that looks like segments.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Live examples of Segmented control, with the exact Vue file that renders each one.
|
|
3
|
+
---
|
|
4
|
+
import CodeExample from '../../../components/CodeExample.astro';
|
|
5
|
+
import SegmentedText from '../../../../registry/beehexa/examples/segmented-control/en/SegmentedText.vue';
|
|
6
|
+
import SegmentedTextSource from '../../../../registry/beehexa/examples/segmented-control/en/SegmentedText.vue?raw';
|
|
7
|
+
import SegmentedIcons from '../../../../registry/beehexa/examples/segmented-control/en/SegmentedIcons.vue';
|
|
8
|
+
import SegmentedIconsSource from '../../../../registry/beehexa/examples/segmented-control/en/SegmentedIcons.vue?raw';
|
|
9
|
+
|
|
10
|
+
Every example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.
|
|
11
|
+
|
|
12
|
+
## Text
|
|
13
|
+
|
|
14
|
+
Two to five short options. The change applies at once.
|
|
15
|
+
|
|
16
|
+
<CodeExample source={SegmentedTextSource} file="SegmentedText.vue">
|
|
17
|
+
<SegmentedText client:visible />
|
|
18
|
+
</CodeExample>
|
|
19
|
+
|
|
20
|
+
## Icons
|
|
21
|
+
|
|
22
|
+
Icon segments each need an aria-label. Don’t mix icons and text in one control.
|
|
23
|
+
|
|
24
|
+
<CodeExample source={SegmentedIconsSource} file="SegmentedIcons.vue">
|
|
25
|
+
<SegmentedIcons client:visible />
|
|
26
|
+
</CodeExample>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Segmented control",
|
|
3
|
+
"description": "Picks one option out of two to five, and the change applies at once.",
|
|
4
|
+
"group": "Forms",
|
|
5
|
+
"vi": {
|
|
6
|
+
"title": "Segmented control",
|
|
7
|
+
"description": "Chọn một trong hai đến năm lựa chọn, và thay đổi có hiệu lực ngay."
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Parts, tokens, sizes and spacing of Segmented control.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Tokens
|
|
6
|
+
|
|
7
|
+
| Part | Tokens and values |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Track | `color.background.neutral`, `radius.control`, padding `space.050`; 32 px high with 24 px segments |
|
|
10
|
+
| Segment | `size.control.small` high, `font.label.default`, `color.text.subtle`, `radius.control.small` |
|
|
11
|
+
| Hover | `color.background.neutral.hover`, text `color.text` |
|
|
12
|
+
| Selected | `color.surface`, `elevation.shadow.raised`, text `color.text` |
|
|
13
|
+
| Gap | `space.025` |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: When to use segmented control, its parts, states, keys and accessibility.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> **Draft.** Proposed from the survey of 18 design systems and not yet approved. It is in the registry so teams can try it; the API may still change before approval.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- To switch the view, period or format of nearby content: Day, Week, Month; List or Grid.
|
|
10
|
+
- When all options fit in one row and the change applies at once, without a Save button.
|
|
11
|
+
|
|
12
|
+
## When not to use
|
|
13
|
+
|
|
14
|
+
- For more than five options, or long labels. Use a select.
|
|
15
|
+
- In a form that is submitted. Use radio buttons.
|
|
16
|
+
- To run actions. Use a [button group](/components/button-group/usage/).
|
|
17
|
+
|
|
18
|
+
## Anatomy
|
|
19
|
+
|
|
20
|
+
| Part | Notes |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| Track | `color.background.neutral`, `radius.control`, padding `space.050` |
|
|
23
|
+
| Segment | 24 px high, `font.label.default`, text `color.text.subtle`; hover `color.background.neutral.hover` |
|
|
24
|
+
| Selected segment | `color.surface` with `elevation.shadow.raised`, text `color.text` |
|
|
25
|
+
|
|
26
|
+
Segments hold text, or an icon with an `aria-label`. Don't mix both kinds in one control.
|
|
27
|
+
|
|
28
|
+
## Keyboard
|
|
29
|
+
|
|
30
|
+
| Key | Does |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| Tab | Moves focus to the selected segment |
|
|
33
|
+
| Arrow keys | Select the previous or next segment |
|
|
34
|
+
|
|
35
|
+
## Accessibility
|
|
36
|
+
|
|
37
|
+
- `role="radiogroup"` with an `aria-label`; each segment is `role="radio"` with `aria-checked`.
|
|
38
|
+
- The selected segment differs in fill, shadow and text colour, not in colour alone.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Keys, what Split button gives you and what your team does.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Conformance
|
|
6
|
+
|
|
7
|
+
**Split button meets WCAG 2.2 level AA when used as described on these pages.** It follows the [Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/) of the WAI-ARIA Authoring Practices.
|
|
8
|
+
|
|
9
|
+
## Keyboard
|
|
10
|
+
|
|
11
|
+
| Key | Action |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| <kbd>Tab</kbd> | Reaches the action, then the menu half. |
|
|
14
|
+
| <kbd>Enter</kbd> or <kbd>Space</kbd> | Runs the action, or opens the menu on the menu half. |
|
|
15
|
+
| Menu keys | As [menu button](/components/menu-button/accessibility/). |
|
|
16
|
+
|
|
17
|
+
## What Split button gives you
|
|
18
|
+
|
|
19
|
+
- Two real buttons, each with its own focus ring and name.
|
|
20
|
+
- `role="group"` around the pair.
|
|
21
|
+
|
|
22
|
+
## What your team does
|
|
23
|
+
|
|
24
|
+
- Name the group with the action and the menu half with what it offers.
|
|
25
|
+
- Disable both halves together, never one.
|
|
26
|
+
|
|
27
|
+
## WCAG criteria
|
|
28
|
+
|
|
29
|
+
| Criterion | Level | How |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| 4.1.2 Name, Role, Value | A | Each half has a name; the menu half has `aria-expanded` |
|
|
32
|
+
| 2.4.7 Focus Visible | AA | Each half shows its own ring |
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Install, props and the parts Split button is built from.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Run these in the app, after `shadcn-vue init` and the Beehexa theme ([Button › Code](/components/button/code/)):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx shadcn-vue@latest add https://beehexa.design/r/button.json
|
|
11
|
+
npx shadcn-vue@latest add https://beehexa.design/r/button-group.json
|
|
12
|
+
npx shadcn-vue@latest add https://beehexa.design/r/dropdown-menu.json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Use
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<script setup lang="ts">
|
|
19
|
+
import { ChevronDown } from '@lucide/vue'
|
|
20
|
+
import { Button } from '@/components/ui/button'
|
|
21
|
+
import { ButtonGroup } from '@/components/ui/button-group'
|
|
22
|
+
import {
|
|
23
|
+
DropdownMenu,
|
|
24
|
+
DropdownMenuContent,
|
|
25
|
+
DropdownMenuItem,
|
|
26
|
+
DropdownMenuTrigger,
|
|
27
|
+
} from '@/components/ui/dropdown-menu'
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<ButtonGroup aria-label="Run sync">
|
|
32
|
+
<Button>Run now</Button>
|
|
33
|
+
<DropdownMenu>
|
|
34
|
+
<DropdownMenuTrigger as-child>
|
|
35
|
+
<Button size="icon" aria-label="More ways to run"><ChevronDown /></Button>
|
|
36
|
+
</DropdownMenuTrigger>
|
|
37
|
+
<DropdownMenuContent align="end">
|
|
38
|
+
<DropdownMenuItem>Run in test mode</DropdownMenuItem>
|
|
39
|
+
<DropdownMenuItem>Run for one store</DropdownMenuItem>
|
|
40
|
+
<DropdownMenuItem>Schedule…</DropdownMenuItem>
|
|
41
|
+
</DropdownMenuContent>
|
|
42
|
+
</DropdownMenu>
|
|
43
|
+
</ButtonGroup>
|
|
44
|
+
</template>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Props
|
|
48
|
+
|
|
49
|
+
| Prop | Values | Notes |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| ButtonGroup `aria-label` | string | Names the action, such as "Run sync" |
|
|
52
|
+
| Menu half `aria-label` | string | Its own name, such as "More ways to run" |
|
|
53
|
+
| Both halves `variant` | The same Button variant | Primary or Default |
|
|
54
|
+
|
|
55
|
+
## Built on
|
|
56
|
+
|
|
57
|
+
No component of its own, as in shadcn-vue: a joined ButtonGroup with a Button and an icon-only Button that opens a Dropdown menu.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Live examples of Split button, with the exact Vue file that renders each one.
|
|
3
|
+
---
|
|
4
|
+
import CodeExample from '../../../components/CodeExample.astro';
|
|
5
|
+
import SplitButtonPrimary from '../../../../registry/beehexa/examples/split-button/en/SplitButtonPrimary.vue';
|
|
6
|
+
import SplitButtonPrimarySource from '../../../../registry/beehexa/examples/split-button/en/SplitButtonPrimary.vue?raw';
|
|
7
|
+
import SplitButtonDefault from '../../../../registry/beehexa/examples/split-button/en/SplitButtonDefault.vue';
|
|
8
|
+
import SplitButtonDefaultSource from '../../../../registry/beehexa/examples/split-button/en/SplitButtonDefault.vue?raw';
|
|
9
|
+
|
|
10
|
+
Every example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.
|
|
11
|
+
|
|
12
|
+
## Primary
|
|
13
|
+
|
|
14
|
+
The default action runs at once; the chevron half opens the close alternatives.
|
|
15
|
+
|
|
16
|
+
<CodeExample source={SplitButtonPrimarySource} file="SplitButtonPrimary.vue">
|
|
17
|
+
<SplitButtonPrimary client:visible />
|
|
18
|
+
</CodeExample>
|
|
19
|
+
|
|
20
|
+
## Default
|
|
21
|
+
|
|
22
|
+
The same pair in the Default variant, for an action that is not the main one on the screen.
|
|
23
|
+
|
|
24
|
+
<CodeExample source={SplitButtonDefaultSource} file="SplitButtonDefault.vue">
|
|
25
|
+
<SplitButtonDefault client:visible />
|
|
26
|
+
</CodeExample>
|