@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
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
/foundations/styles/grid/ /foundations/styles/layout/grid/ 301
|
|
6
6
|
/foundations/styles/breakpoints/ /foundations/styles/layout/breakpoints/ 301
|
|
7
7
|
/foundations/styles/icons/creating-icons/ /foundations/styles/icons/code/#custom-icons 301
|
|
8
|
-
/
|
|
9
|
-
/vi/
|
|
8
|
+
/foundations/styles/scrollbars/ /components/scrollbar/usage/ 301
|
|
9
|
+
/vi/foundations/styles/scrollbars/ /vi/components/scrollbar/usage/ 301
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "action-bar",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Action bar",
|
|
6
|
+
"description": "Beehexa Action bar: actions for selected rows, with a live count and a clear button.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"@lucide/vue"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"utils",
|
|
12
|
+
"https://beehexa.design/r/button.json"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/action-bar/ActionBar.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { X } from '@lucide/vue'\nimport { Button } from '@/components/ui/button'\nimport { cn } from '@/lib/utils'\n\n// Beehexa Action bar: actions for the rows selected in a table or list.\n// Shown while `open` (at least one row selected). `status` is the count, such as \"3 connections selected\";\n// a polite live region that is always in the page announces it on every change.\n// Esc inside the bar and the close button emit \"clear\"; clear the selection and return focus to the table.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n open: boolean\n status: string\n /** Name of the region, such as \"Actions for selected rows\". */\n label: string\n clearLabel?: string\n class?: HTMLAttributes['class']\n}>(), { clearLabel: 'Clear selection' })\nconst emit = defineEmits<{ clear: [] }>()\n</script>\n\n<template>\n <span class=\"sr-only\" aria-live=\"polite\">{{ open ? status : '' }}</span>\n <div\n v-if=\"open\"\n v-bind=\"$attrs\"\n role=\"region\"\n data-slot=\"action-bar\"\n :aria-label=\"label\"\n :class=\"cn(\n 'flex flex-wrap items-center gap-(--bh-space-200) rounded-(--bh-radius-card) border-(length:--bh-border-width-default) border-(--bh-color-border)',\n 'bg-(--bh-color-surface-overlay) py-(--bh-space-100) ps-(--bh-space-200) pe-(--bh-space-100) text-(--bh-color-text) shadow-(--bh-elevation-shadow-overlay)',\n props.class,\n )\"\n @keydown.esc=\"emit('clear')\"\n >\n <p class=\"m-0 [font:var(--bh-font-label-default)]\">{{ status }}</p>\n <div class=\"flex flex-wrap items-center gap-(--bh-space-100)\">\n <slot />\n </div>\n <Button variant=\"ghost\" size=\"icon-sm\" class=\"ms-auto\" :aria-label=\"clearLabel\" @click=\"emit('clear')\">\n <X />\n </Button>\n </div>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/action-bar/index.ts",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "export { default as ActionBar } from './ActionBar.vue'\n"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "beehexa-theme",
|
|
4
|
+
"type": "registry:file",
|
|
5
|
+
"title": "Beehexa theme for shadcn-vue",
|
|
6
|
+
"description": "Maps the shadcn-vue colour and radius variables to Beehexa design tokens, light and dark.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"@beehexa/design-tokens"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "registry/beehexa/theme/beehexa-shadcn.css",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"target": "src/assets/beehexa-shadcn.css",
|
|
15
|
+
"content": "/*\n * Beehexa theme for shadcn-vue (Tailwind CSS v4).\n * Maps the shadcn-vue colour and radius variables to Beehexa design tokens, so every\n * shadcn-vue component picks up Beehexa colours in light and dark without editing it.\n *\n * Import after Tailwind and after the Beehexa tokens:\n * @import 'tailwindcss';\n * @import '@beehexa/design-tokens/css';\n * @import './beehexa-shadcn.css';\n *\n * Dark mode: Beehexa switches on data-theme=\"dark\" (or the system setting when data-theme is\n * not \"light\"). The custom variant below makes Tailwind's dark: follow the same switch, so set\n * data-theme on <html> instead of the .dark class.\n */\n@custom-variant dark (&:where([data-theme='dark'], [data-theme='dark'] *));\n\n:root {\n --radius: calc(var(--bh-radius-control) / 0.8); /* rounded-md = radius.control (6 px) */\n\n --background: var(--bh-color-surface-page);\n --foreground: var(--bh-color-text);\n --card: var(--bh-color-surface);\n --card-foreground: var(--bh-color-text);\n --popover: var(--bh-color-surface-overlay);\n --popover-foreground: var(--bh-color-text);\n\n --primary: var(--bh-color-background-primary);\n --primary-foreground: var(--bh-color-text-inverse);\n --secondary: var(--bh-color-background-neutral);\n --secondary-foreground: var(--bh-color-text);\n --muted: var(--bh-color-background-neutral);\n --muted-foreground: var(--bh-color-text-subtle);\n --accent: var(--bh-color-background-neutral-subtle-hover);\n --accent-foreground: var(--bh-color-text);\n --destructive: var(--bh-color-background-danger-bold);\n --destructive-foreground: var(--bh-color-text-on-bold);\n\n --border: var(--bh-color-border);\n --input: var(--bh-color-border-bold);\n --ring: var(--bh-color-border-focus);\n\n --sidebar: var(--bh-color-surface-page);\n --sidebar-foreground: var(--bh-color-text);\n --sidebar-primary: var(--bh-color-background-primary);\n --sidebar-primary-foreground: var(--bh-color-text-inverse);\n --sidebar-accent: var(--bh-color-background-selected);\n --sidebar-accent-foreground: var(--bh-color-text);\n --sidebar-border: var(--bh-color-border);\n --sidebar-ring: var(--bh-color-border-focus);\n}\n\n@theme inline {\n --color-background: var(--background);\n --color-foreground: var(--foreground);\n --color-card: var(--card);\n --color-card-foreground: var(--card-foreground);\n --color-popover: var(--popover);\n --color-popover-foreground: var(--popover-foreground);\n --color-primary: var(--primary);\n --color-primary-foreground: var(--primary-foreground);\n --color-secondary: var(--secondary);\n --color-secondary-foreground: var(--secondary-foreground);\n --color-muted: var(--muted);\n --color-muted-foreground: var(--muted-foreground);\n --color-accent: var(--accent);\n --color-accent-foreground: var(--accent-foreground);\n --color-destructive: var(--destructive);\n --color-destructive-foreground: var(--destructive-foreground);\n --color-border: var(--border);\n --color-input: var(--input);\n --color-ring: var(--ring);\n --color-sidebar: var(--sidebar);\n --color-sidebar-foreground: var(--sidebar-foreground);\n --color-sidebar-primary: var(--sidebar-primary);\n --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);\n --color-sidebar-accent: var(--sidebar-accent);\n --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);\n --color-sidebar-border: var(--sidebar-border);\n --color-sidebar-ring: var(--sidebar-ring);\n --radius-sm: calc(var(--radius) * 0.6);\n --radius-md: calc(var(--radius) * 0.8);\n --radius-lg: var(--radius);\n --radius-xl: calc(var(--radius) * 1.4);\n}\n"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "button-group",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Button group",
|
|
6
|
+
"description": "Beehexa Button group: joined (shadcn-vue ButtonGroup) or spaced, role=\"group\".",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"class-variance-authority",
|
|
9
|
+
"@beehexa/design-tokens"
|
|
10
|
+
],
|
|
11
|
+
"registryDependencies": [
|
|
12
|
+
"utils"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/button-group/ButtonGroup.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport type { ButtonGroupVariants } from '.'\nimport { cn } from '@/lib/utils'\nimport { buttonGroupVariants } from '.'\n\n// Name the set with aria-label, such as \"Date range\". All buttons in a group use the same size.\nconst props = withDefaults(defineProps<{\n variant?: ButtonGroupVariants['variant']\n class?: HTMLAttributes['class']\n}>(), { variant: 'joined' })\n</script>\n\n<template>\n <div\n role=\"group\"\n data-slot=\"button-group\"\n :data-variant=\"variant\"\n :class=\"cn(buttonGroupVariants({ variant }), props.class)\"\n >\n <slot />\n </div>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/button-group/index.ts",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "import type { VariantProps } from 'class-variance-authority'\nimport { cva } from 'class-variance-authority'\n\nexport { default as ButtonGroup } from './ButtonGroup.vue'\n\n// Beehexa Button group. Guidelines: https://beehexa.design/components/button-group/usage/\n// joined (default, as the shadcn-vue ButtonGroup): actions on one thing that read as one control.\n// Only the outer corners keep the radius; touching borders overlap into one line (DECISIONS D2).\n// The hovered or focused button sits above its neighbours so its border and focus ring show whole.\n// spaced: the actions at the end of a form, dialog or card. 8 px apart; 12 px for icon-only buttons.\nexport const buttonGroupVariants = cva('', {\n variants: {\n variant: {\n joined: [\n 'inline-flex w-fit items-stretch',\n '[&>*:not(:first-child)]:-ms-(--bh-border-width-default) [&>*:not(:first-child)]:rounded-s-none [&>*:not(:last-child)]:rounded-e-none',\n '[&>*:hover]:z-1 [&>*:focus-visible]:z-2',\n // Two primary buttons side by side: the divider is one step lighter than the fill.\n '[&>[data-variant=default]:not(:first-child)]:border-s-(--bh-color-background-primary-hover)',\n ],\n spaced: 'flex flex-wrap items-center gap-(--bh-space-100) has-[>[data-size^=icon]]:gap-(--bh-space-150)',\n },\n },\n defaultVariants: { variant: 'joined' },\n})\n\nexport type ButtonGroupVariants = VariantProps<typeof buttonGroupVariants>\n"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "button",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Button",
|
|
6
|
+
"description": "Beehexa Button: the shadcn-vue Button API, styled with Beehexa design tokens, with loading and unavailable states.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"reka-ui",
|
|
9
|
+
"class-variance-authority",
|
|
10
|
+
"@lucide/vue",
|
|
11
|
+
"@beehexa/design-tokens"
|
|
12
|
+
],
|
|
13
|
+
"registryDependencies": [
|
|
14
|
+
"utils"
|
|
15
|
+
],
|
|
16
|
+
"files": [
|
|
17
|
+
{
|
|
18
|
+
"path": "registry/beehexa/ui/button/Button.vue",
|
|
19
|
+
"type": "registry:ui",
|
|
20
|
+
"content": "<script setup lang=\"ts\">\nimport type { PrimitiveProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { LoaderCircle } from '@lucide/vue'\nimport type { ButtonVariants } from '.'\nimport { Primitive } from 'reka-ui'\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '.'\n\ninterface Props extends PrimitiveProps {\n variant?: ButtonVariants['variant']\n size?: ButtonVariants['size']\n class?: HTMLAttributes['class']\n /**\n * Beehexa addition. Shows a spinner in place of the icon, sets aria-busy and ignores clicks.\n * Keep the button and its focus; change the label to say what is happening (\"Syncing…\").\n */\n loading?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n as: 'button',\n loading: false,\n})\n\n// The spinner shows only once the wait passes motion.wait.spinner (300 ms), so quick actions don't flash it.\n// aria-busy and the click guard start at once.\nconst SPINNER_DELAY_MS = 300\nconst showSpinner = ref(false)\nlet spinnerTimer: ReturnType<typeof setTimeout> | undefined\nwatch(() => props.loading, (loading) => {\n clearTimeout(spinnerTimer)\n showSpinner.value = false\n if (loading) spinnerTimer = setTimeout(() => { showSpinner.value = true }, SPINNER_DELAY_MS)\n}, { immediate: true })\nonBeforeUnmount(() => clearTimeout(spinnerTimer))\n\n// Loading and unavailable (aria-disabled=\"true\") buttons stay focusable but do nothing.\nfunction onClickCapture(event: MouseEvent) {\n const target = event.currentTarget as HTMLElement | null\n if (props.loading || target?.getAttribute('aria-disabled') === 'true') {\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n}\n</script>\n\n<template>\n <Primitive\n data-slot=\"button\"\n :data-variant=\"variant ?? 'default'\"\n :data-size=\"size ?? 'default'\"\n :as=\"as\"\n :as-child=\"asChild\"\n :type=\"as === 'button' && !asChild ? 'button' : undefined\"\n :aria-busy=\"loading || undefined\"\n :class=\"cn(buttonVariants({ variant, size }), props.class)\"\n @click.capture=\"onClickCapture\"\n >\n <!-- Lucide loader-circle (DECISIONS D11). It slows down under reduced motion but keeps turning: it shows work is running. -->\n <LoaderCircle\n v-if=\"loading && showSpinner\"\n data-spinner\n aria-hidden=\"true\"\n class=\"animate-spin motion-reduce:animate-[spin_1.6s_linear_infinite]\"\n />\n <slot />\n </Primitive>\n</template>\n"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "registry/beehexa/ui/button/index.ts",
|
|
24
|
+
"type": "registry:ui",
|
|
25
|
+
"content": "import type { VariantProps } from 'class-variance-authority'\nimport { cva } from 'class-variance-authority'\n\nexport { default as Button } from './Button.vue'\n\n// Beehexa Button for shadcn-vue. Same API as the shadcn-vue Button (variant, size, as, asChild),\n// styled only with Beehexa design tokens from @beehexa/design-tokens/css (the --bh-* variables).\n// Guidelines: https://beehexa.design/components/button/usage/\n//\n// shadcn variant -> Beehexa variant\n// default -> Primary: the one main action in a screen or dialog\n// outline, secondary -> Default: most actions (Beehexa has no filled secondary; both look the same)\n// ghost -> Subtle: toolbars, table rows\n// destructive -> Danger: confirms delete or can't-undo actions\n// ghost-destructive -> Danger tone on a subtle button: \"Remove\" in a row (Beehexa addition)\n// link -> Inline link-style action, always underlined\n// Sizes follow the field heights: sm 24 px, default 32 px, lg 40 px (xs is kept as an alias of sm).\nexport const buttonVariants = cva(\n [\n 'relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-(--bh-space-control-gap) whitespace-nowrap',\n 'rounded-(--bh-radius-control) border-(length:--bh-border-width-default) border-transparent [font:var(--bh-font-label-default)]',\n 'transition-colors duration-(--bh-motion-duration-fast) ease-(--bh-motion-easing-standard)',\n // Focus: a 2 px ring 2 px away, on keyboard focus only. Never removed.\n 'outline-none focus-visible:outline-solid focus-visible:outline-(length:--bh-border-width-focused) focus-visible:outline-(color:--bh-color-border-focus) focus-visible:outline-offset-(--bh-state-focus-offset)',\n // Icons: 16 px, decorative.\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--bh-size-icon-default)\",\n // Loading: keep colours and focus; once the spinner shows (after 300 ms), it takes the icon's place.\n 'aria-busy:cursor-progress [&:has([data-spinner])_svg:not([data-spinner])]:hidden',\n // Disabled and unavailable (aria-disabled): disabled colours, never transparency.\n 'disabled:cursor-not-allowed disabled:border-(--bh-color-border-disabled)! disabled:bg-(--bh-color-background-disabled)! disabled:text-(--bh-color-text-disabled)!',\n 'aria-disabled:cursor-not-allowed aria-disabled:border-(--bh-color-border-disabled)! aria-disabled:bg-(--bh-color-background-disabled)! aria-disabled:text-(--bh-color-text-disabled)!',\n // Touch screens: a 44 px tap area around the visible button.\n \"pointer-coarse:before:absolute pointer-coarse:before:top-1/2 pointer-coarse:before:left-1/2 pointer-coarse:before:size-[max(100%,var(--bh-size-target-touch))] pointer-coarse:before:-translate-1/2 pointer-coarse:before:content-['']\",\n ],\n {\n variants: {\n variant: {\n 'default':\n 'border-(--bh-color-background-primary) bg-(--bh-color-background-primary) text-(--bh-color-text-inverse) hover:border-(--bh-color-background-primary-hover) hover:bg-(--bh-color-background-primary-hover) active:border-(--bh-color-background-primary-pressed) active:bg-(--bh-color-background-primary-pressed)',\n 'outline':\n 'border-(--bh-color-border) bg-(--bh-color-surface) text-(--bh-color-text) hover:border-(--bh-color-border-hover) hover:bg-(--bh-button-background-subtle-hover) active:border-(--bh-color-border-hover) active:bg-(--bh-button-background-subtle-pressed) aria-expanded:bg-(--bh-button-background-subtle-pressed) aria-pressed:border-(--bh-button-border-selected) aria-pressed:bg-(--bh-button-background-selected)',\n 'secondary':\n 'border-(--bh-color-border) bg-(--bh-color-surface) text-(--bh-color-text) hover:border-(--bh-color-border-hover) hover:bg-(--bh-button-background-subtle-hover) active:border-(--bh-color-border-hover) active:bg-(--bh-button-background-subtle-pressed) aria-expanded:bg-(--bh-button-background-subtle-pressed) aria-pressed:border-(--bh-button-border-selected) aria-pressed:bg-(--bh-button-background-selected)',\n 'ghost':\n 'bg-transparent text-(--bh-color-text) hover:bg-(--bh-button-background-subtle-hover) active:bg-(--bh-button-background-subtle-pressed) aria-expanded:bg-(--bh-button-background-subtle-pressed) aria-pressed:border-(--bh-button-border-selected) aria-pressed:bg-(--bh-button-background-selected)',\n 'destructive':\n 'border-(--bh-color-background-danger-bold) bg-(--bh-color-background-danger-bold) text-(--bh-color-text-on-bold) hover:border-(--bh-color-background-danger-bold-hover) hover:bg-(--bh-color-background-danger-bold-hover) active:border-(--bh-color-background-danger-bold-pressed) active:bg-(--bh-color-background-danger-bold-pressed)',\n 'ghost-destructive':\n 'bg-transparent text-(--bh-color-text-danger) hover:bg-(--bh-color-background-danger-subtle-hover) active:bg-(--bh-color-background-danger-subtle-pressed)',\n 'link':\n 'bg-transparent text-(--bh-color-link) underline underline-offset-2 hover:text-(--bh-color-link-hover)',\n },\n size: {\n 'default': 'h-(--bh-size-control-default) px-(--bh-space-control-x)',\n 'sm': 'h-(--bh-size-control-small) rounded-(--bh-radius-control-small) px-(--bh-space-control-x-small) [font:var(--bh-font-label-small)]',\n 'xs': 'h-(--bh-size-control-small) rounded-(--bh-radius-control-small) px-(--bh-space-control-x-small) [font:var(--bh-font-label-small)]',\n 'lg': 'h-(--bh-size-control-large) px-(--bh-space-control-x-large)',\n 'icon': 'size-(--bh-size-control-default)',\n 'icon-sm': 'size-(--bh-size-control-small) rounded-(--bh-radius-control-small)',\n 'icon-xs': 'size-(--bh-size-control-small) rounded-(--bh-radius-control-small)',\n 'icon-lg': 'size-(--bh-size-control-large)',\n },\n },\n compoundVariants: [\n // A link has no fill or border; unavailable and disabled only grey the text.\n // A button with no fill at rest keeps no fill when it can't be used: only the text turns grey.\n { variant: ['ghost', 'ghost-destructive'], class: 'disabled:border-transparent! disabled:bg-transparent! aria-disabled:border-transparent! aria-disabled:bg-transparent!' },\n { variant: 'link', class: 'h-auto px-0 disabled:border-transparent! disabled:bg-transparent! aria-disabled:border-transparent! aria-disabled:bg-transparent! disabled:no-underline aria-disabled:no-underline' },\n ],\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n)\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>\n"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "copy-button",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Copy button",
|
|
6
|
+
"description": "Beehexa Copy button: an icon button that copies a value, shows a check for 2 s and announces \"Copied\".",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"@lucide/vue"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"https://beehexa.design/r/button.json",
|
|
12
|
+
"https://beehexa.design/r/tooltip.json"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/copy-button/CopyButton.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { Check, Copy } from '@lucide/vue'\nimport { onBeforeUnmount, ref } from 'vue'\nimport { Button } from '@/components/ui/button'\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'\n\n// Beehexa Copy button: a preset of Icon button (Subtle, small, next to the value).\n// After a click the icon turns into a check for 2 s and a polite live region says `copiedLabel`. No toast.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<{\n /** The text that goes to the clipboard. */\n value: string\n /** Accessible name and tooltip: \"Copy\" plus what it copies, such as \"Copy API key\". */\n label?: string\n /** Said by the live region and shown in the tooltip after copying. */\n copiedLabel?: string\n size?: 'icon' | 'icon-sm' | 'icon-lg'\n class?: HTMLAttributes['class']\n}>(), {\n label: 'Copy',\n copiedLabel: 'Copied',\n size: 'icon-sm',\n})\n\nconst COPIED_MS = 2000\nconst copied = ref(false)\nlet timer: ReturnType<typeof setTimeout> | undefined\n\nasync function copy() {\n try {\n await navigator.clipboard.writeText(props.value)\n }\n catch {\n return // The clipboard is blocked (no permission or no secure context): keep the copy icon.\n }\n copied.value = true\n clearTimeout(timer)\n timer = setTimeout(() => { copied.value = false }, COPIED_MS)\n}\nonBeforeUnmount(() => clearTimeout(timer))\n</script>\n\n<template>\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger as-child>\n <Button\n v-bind=\"$attrs\"\n data-slot=\"copy-button\"\n variant=\"ghost\"\n :size=\"size\"\n :aria-label=\"label\"\n :class=\"props.class\"\n @click=\"copy\"\n >\n <Check v-if=\"copied\" />\n <Copy v-else />\n </Button>\n </TooltipTrigger>\n <TooltipContent>{{ copied ? copiedLabel : label }}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n <span class=\"sr-only\" role=\"status\">{{ copied ? copiedLabel : '' }}</span>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/copy-button/index.ts",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "export { default as CopyButton } from './CopyButton.vue'\n"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "dropdown-menu",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Dropdown menu",
|
|
6
|
+
"description": "Beehexa Dropdown menu: the shadcn-vue DropdownMenu API on the overlay surface, for menu buttons and split buttons.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"reka-ui",
|
|
9
|
+
"@beehexa/design-tokens"
|
|
10
|
+
],
|
|
11
|
+
"registryDependencies": [
|
|
12
|
+
"utils"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/dropdown-menu/DropdownMenu.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { DropdownMenuRootEmits, DropdownMenuRootProps } from 'reka-ui'\nimport { DropdownMenuRoot, useForwardPropsEmits } from 'reka-ui'\n\nconst props = defineProps<DropdownMenuRootProps>()\nconst emits = defineEmits<DropdownMenuRootEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n</script>\n\n<template>\n <DropdownMenuRoot data-slot=\"dropdown-menu\" v-bind=\"forwarded\">\n <slot />\n </DropdownMenuRoot>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/dropdown-menu/DropdownMenuContent.vue",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "<script setup lang=\"ts\">\nimport type { DropdownMenuContentEmits, DropdownMenuContentProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { DropdownMenuContent, DropdownMenuPortal, useForwardPropsEmits } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\ndefineOptions({ inheritAttrs: false })\n\n// Overlay surface, shadow and radius; 4 px from the button, lined up with its start edge.\n// At least 8rem wide (the shadcn-vue default) and never narrower than the button.\nconst props = withDefaults(defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(), {\n sideOffset: 4,\n align: 'start',\n})\nconst emits = defineEmits<DropdownMenuContentEmits>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\nconst forwarded = useForwardPropsEmits(delegated, emits)\n</script>\n\n<template>\n <DropdownMenuPortal>\n <DropdownMenuContent\n data-slot=\"dropdown-menu-content\"\n v-bind=\"{ ...forwarded, ...$attrs }\"\n :class=\"cn(\n 'z-(--bh-z-index-overlay) min-w-[max(8rem,var(--reka-dropdown-menu-trigger-width))] max-h-(--reka-dropdown-menu-content-available-height) overflow-y-auto',\n 'rounded-(--bh-radius-overlay) border-(length:--bh-border-width-default) border-(--bh-color-border) bg-(--bh-color-surface-overlay) p-(--bh-space-050) text-(--bh-color-text) shadow-(--bh-elevation-shadow-overlay)',\n props.class,\n )\"\n >\n <slot />\n </DropdownMenuContent>\n </DropdownMenuPortal>\n</template>\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/beehexa/ui/dropdown-menu/DropdownMenuItem.vue",
|
|
27
|
+
"type": "registry:ui",
|
|
28
|
+
"content": "<script setup lang=\"ts\">\nimport type { DropdownMenuItemProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { DropdownMenuItem, useForwardProps } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\n// Item: optional icon, label, optional shortcut. Highlight (hover and arrow keys) uses color.surface.overlay.hover.\n// variant=\"destructive\" for delete and other can't-undo actions.\nconst props = withDefaults(defineProps<DropdownMenuItemProps & {\n class?: HTMLAttributes['class']\n variant?: 'default' | 'destructive'\n}>(), { variant: 'default' })\nconst delegated = computed(() => {\n const { class: _class, variant: _variant, ...rest } = props\n return rest\n})\nconst forwarded = useForwardProps(delegated)\n</script>\n\n<template>\n <DropdownMenuItem\n data-slot=\"dropdown-menu-item\"\n :data-variant=\"variant\"\n v-bind=\"forwarded\"\n :class=\"cn(\n 'relative flex h-(--bh-size-control-default) cursor-pointer select-none items-center gap-(--bh-space-100) rounded-(--bh-radius-control-small) px-(--bh-space-100) [font:var(--bh-font-body-default)] outline-none',\n 'data-highlighted:bg-(--bh-color-surface-overlay-hover) data-disabled:cursor-not-allowed data-disabled:text-(--bh-color-text-disabled)',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--bh-size-icon-default) [&_svg]:text-(--bh-color-icon-subtle)\",\n 'data-[variant=destructive]:text-(--bh-color-text-danger) data-[variant=destructive]:[&_svg]:text-(--bh-color-icon-danger)',\n props.class,\n )\"\n >\n <slot />\n </DropdownMenuItem>\n</template>\n"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "registry/beehexa/ui/dropdown-menu/DropdownMenuLabel.vue",
|
|
32
|
+
"type": "registry:ui",
|
|
33
|
+
"content": "<script setup lang=\"ts\">\nimport type { DropdownMenuLabelProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { DropdownMenuLabel } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\nconst props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes['class'] }>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\n</script>\n\n<template>\n <DropdownMenuLabel\n data-slot=\"dropdown-menu-label\"\n v-bind=\"delegated\"\n :class=\"cn('px-(--bh-space-100) py-(--bh-space-050) text-(--bh-color-text-subtle) [font:var(--bh-font-label-small)]', props.class)\"\n >\n <slot />\n </DropdownMenuLabel>\n</template>\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "registry/beehexa/ui/dropdown-menu/DropdownMenuSeparator.vue",
|
|
37
|
+
"type": "registry:ui",
|
|
38
|
+
"content": "<script setup lang=\"ts\">\nimport type { DropdownMenuSeparatorProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { DropdownMenuSeparator } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\nconst props = defineProps<DropdownMenuSeparatorProps & { class?: HTMLAttributes['class'] }>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\n</script>\n\n<template>\n <DropdownMenuSeparator\n data-slot=\"dropdown-menu-separator\"\n v-bind=\"delegated\"\n :class=\"cn('-mx-(--bh-space-050) my-(--bh-space-050) h-(--bh-border-width-default) bg-(--bh-color-border)', props.class)\"\n />\n</template>\n"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "registry/beehexa/ui/dropdown-menu/DropdownMenuShortcut.vue",
|
|
42
|
+
"type": "registry:ui",
|
|
43
|
+
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\nconst props = defineProps<{ class?: HTMLAttributes['class'] }>()\n</script>\n\n<template>\n <span\n data-slot=\"dropdown-menu-shortcut\"\n :class=\"cn('ms-auto ps-(--bh-space-200) text-(--bh-color-text-subtle) [font:var(--bh-font-body-small)]', props.class)\"\n >\n <slot />\n </span>\n</template>\n"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "registry/beehexa/ui/dropdown-menu/DropdownMenuTrigger.vue",
|
|
47
|
+
"type": "registry:ui",
|
|
48
|
+
"content": "<script setup lang=\"ts\">\nimport type { DropdownMenuTriggerProps } from 'reka-ui'\nimport { DropdownMenuTrigger } from 'reka-ui'\n\n// Use as-child with a Button: the button gets aria-haspopup=\"menu\" and aria-expanded,\n// and keeps its pressed look while the menu is open.\nconst props = defineProps<DropdownMenuTriggerProps>()\n</script>\n\n<template>\n <DropdownMenuTrigger data-slot=\"dropdown-menu-trigger\" v-bind=\"props\">\n <slot />\n </DropdownMenuTrigger>\n</template>\n"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "registry/beehexa/ui/dropdown-menu/index.ts",
|
|
52
|
+
"type": "registry:ui",
|
|
53
|
+
"content": "export { default as DropdownMenu } from './DropdownMenu.vue'\nexport { default as DropdownMenuContent } from './DropdownMenuContent.vue'\nexport { default as DropdownMenuItem } from './DropdownMenuItem.vue'\nexport { default as DropdownMenuLabel } from './DropdownMenuLabel.vue'\nexport { default as DropdownMenuSeparator } from './DropdownMenuSeparator.vue'\nexport { default as DropdownMenuShortcut } from './DropdownMenuShortcut.vue'\nexport { default as DropdownMenuTrigger } from './DropdownMenuTrigger.vue'\nexport { DropdownMenuGroup } from 'reka-ui'\n"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "beehexa",
|
|
3
|
+
"homepage": "https://beehexa.design",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"name": "beehexa-theme",
|
|
7
|
+
"type": "registry:file",
|
|
8
|
+
"title": "Beehexa theme for shadcn-vue",
|
|
9
|
+
"description": "Maps the shadcn-vue colour and radius variables to Beehexa design tokens, light and dark."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "button",
|
|
13
|
+
"type": "registry:ui",
|
|
14
|
+
"title": "Button",
|
|
15
|
+
"description": "Beehexa Button: the shadcn-vue Button API, styled with Beehexa design tokens, with loading and unavailable states."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "tooltip",
|
|
19
|
+
"type": "registry:ui",
|
|
20
|
+
"title": "Tooltip",
|
|
21
|
+
"description": "Beehexa Tooltip: the shadcn-vue Tooltip API with an inverse surface, small body text and a 4 px offset. Text only."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "copy-button",
|
|
25
|
+
"type": "registry:ui",
|
|
26
|
+
"title": "Copy button",
|
|
27
|
+
"description": "Beehexa Copy button: an icon button that copies a value, shows a check for 2 s and announces \"Copied\"."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "button-group",
|
|
31
|
+
"type": "registry:ui",
|
|
32
|
+
"title": "Button group",
|
|
33
|
+
"description": "Beehexa Button group: joined (shadcn-vue ButtonGroup) or spaced, role=\"group\"."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "dropdown-menu",
|
|
37
|
+
"type": "registry:ui",
|
|
38
|
+
"title": "Dropdown menu",
|
|
39
|
+
"description": "Beehexa Dropdown menu: the shadcn-vue DropdownMenu API on the overlay surface, for menu buttons and split buttons."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "toggle",
|
|
43
|
+
"type": "registry:ui",
|
|
44
|
+
"title": "Toggle",
|
|
45
|
+
"description": "Beehexa Toggle button: the shadcn-vue Toggle API with the Button styles and the Beehexa on state."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "segmented-control",
|
|
49
|
+
"type": "registry:ui",
|
|
50
|
+
"title": "Segmented control",
|
|
51
|
+
"description": "Beehexa Segmented control: a radio group shown as segments, for switching a view or period."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "toolbar",
|
|
55
|
+
"type": "registry:ui",
|
|
56
|
+
"title": "Toolbar",
|
|
57
|
+
"description": "Beehexa Toolbar: role=\"toolbar\" with roving focus, icon tools, toggle tools and separators."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "action-bar",
|
|
61
|
+
"type": "registry:ui",
|
|
62
|
+
"title": "Action bar",
|
|
63
|
+
"description": "Beehexa Action bar: actions for selected rows, with a live count and a clear button."
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "segmented-control",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Segmented control",
|
|
6
|
+
"description": "Beehexa Segmented control: a radio group shown as segments, for switching a view or period.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"reka-ui",
|
|
9
|
+
"@beehexa/design-tokens"
|
|
10
|
+
],
|
|
11
|
+
"registryDependencies": [
|
|
12
|
+
"utils"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/segmented-control/SegmentedControl.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { RadioGroupRootEmits, RadioGroupRootProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { RadioGroupRoot, useForwardPropsEmits } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\n// Beehexa Segmented control: one choice out of two to five, applied at once (role=\"radiogroup\").\n// Name it with aria-label. Tab reaches the selected segment; arrow keys select the next one.\nconst props = withDefaults(defineProps<RadioGroupRootProps & { class?: HTMLAttributes['class'] }>(), {\n orientation: 'horizontal',\n loop: true,\n})\nconst emits = defineEmits<RadioGroupRootEmits>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\nconst forwarded = useForwardPropsEmits(delegated, emits)\n</script>\n\n<template>\n <RadioGroupRoot\n data-slot=\"segmented-control\"\n v-bind=\"forwarded\"\n :class=\"cn('inline-flex w-fit items-center gap-(--bh-space-025) rounded-(--bh-radius-control) bg-(--bh-color-background-neutral) p-(--bh-space-050)', props.class)\"\n >\n <slot />\n </RadioGroupRoot>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/segmented-control/SegmentedControlItem.vue",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "<script setup lang=\"ts\">\nimport type { RadioGroupItemProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { RadioGroupItem, useForwardProps } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\n// A segment: text, or an icon with aria-label. Selected: raised surface, shadow and full-strength text,\n// so the choice never rests on colour alone.\nconst props = defineProps<RadioGroupItemProps & { class?: HTMLAttributes['class'] }>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\nconst forwarded = useForwardProps(delegated)\n</script>\n\n<template>\n <RadioGroupItem\n data-slot=\"segmented-control-item\"\n v-bind=\"forwarded\"\n :class=\"cn(\n 'inline-flex h-(--bh-size-control-small) min-w-(--bh-size-control-small) cursor-pointer items-center justify-center gap-(--bh-space-control-gap) whitespace-nowrap rounded-(--bh-radius-control-small) px-(--bh-space-control-x-small)',\n 'text-(--bh-color-text-subtle) [font:var(--bh-font-label-default)] transition-colors duration-(--bh-motion-duration-fast) ease-(--bh-motion-easing-standard)',\n 'data-[state=unchecked]:hover:bg-(--bh-color-background-neutral-hover) data-[state=unchecked]:hover:text-(--bh-color-text)',\n 'data-[state=checked]:bg-(--bh-color-surface) data-[state=checked]:text-(--bh-color-text) data-[state=checked]:shadow-(--bh-elevation-shadow-raised)',\n 'data-disabled:cursor-not-allowed data-disabled:text-(--bh-color-text-disabled)',\n 'outline-none focus-visible:outline-solid focus-visible:outline-(length:--bh-border-width-focused) focus-visible:outline-(color:--bh-color-border-focus) focus-visible:outline-offset-(--bh-state-focus-offset)',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--bh-size-icon-default)\",\n props.class,\n )\"\n >\n <slot />\n </RadioGroupItem>\n</template>\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/beehexa/ui/segmented-control/index.ts",
|
|
27
|
+
"type": "registry:ui",
|
|
28
|
+
"content": "export { default as SegmentedControl } from './SegmentedControl.vue'\nexport { default as SegmentedControlItem } from './SegmentedControlItem.vue'\n"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "toggle",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Toggle",
|
|
6
|
+
"description": "Beehexa Toggle button: the shadcn-vue Toggle API with the Button styles and the Beehexa on state.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"reka-ui"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"utils",
|
|
12
|
+
"https://beehexa.design/r/button.json"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/toggle/Toggle.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { ToggleEmits, ToggleProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport type { ButtonVariants } from '@/components/ui/button'\nimport { computed } from 'vue'\nimport { Toggle, useForwardPropsEmits } from 'reka-ui'\nimport { buttonVariants } from '@/components/ui/button'\nimport { cn } from '@/lib/utils'\n\n// Beehexa Toggle button: a button that stays on or off (aria-pressed).\n// Same API as the shadcn-vue Toggle. variant \"default\" is the Subtle button, \"outline\" the Default button.\n// On: fill button.background.selected and border button.border.selected (DECISIONS D15), from the Button styles.\nconst props = withDefaults(defineProps<ToggleProps & {\n variant?: 'default' | 'outline'\n size?: ButtonVariants['size']\n class?: HTMLAttributes['class']\n}>(), {\n variant: 'default',\n size: 'default',\n})\nconst emits = defineEmits<ToggleEmits>()\nconst delegated = computed(() => {\n const { class: _class, variant: _variant, size: _size, ...rest } = props\n return rest\n})\nconst forwarded = useForwardPropsEmits(delegated, emits)\n</script>\n\n<template>\n <Toggle\n v-slot=\"slotProps\"\n data-slot=\"toggle\"\n v-bind=\"forwarded\"\n :class=\"cn(buttonVariants({ variant: variant === 'outline' ? 'outline' : 'ghost', size }), props.class)\"\n >\n <slot v-bind=\"slotProps\" />\n </Toggle>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/toggle/index.ts",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "export { default as Toggle } from './Toggle.vue'\n"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "toolbar",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Toolbar",
|
|
6
|
+
"description": "Beehexa Toolbar: role=\"toolbar\" with roving focus, icon tools, toggle tools and separators.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"reka-ui"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"utils",
|
|
12
|
+
"https://beehexa.design/r/button.json"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/toolbar/Toolbar.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { ToolbarRootProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { ToolbarRoot } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\n// Beehexa Toolbar (role=\"toolbar\"): name it with aria-label, such as \"Diagram tools\".\n// Tab enters on the last-used tool and the next Tab leaves; arrow keys, Home and End move between tools.\nconst props = withDefaults(defineProps<ToolbarRootProps & { class?: HTMLAttributes['class'] }>(), {\n orientation: 'horizontal',\n loop: true,\n})\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\n</script>\n\n<template>\n <ToolbarRoot\n data-slot=\"toolbar\"\n v-bind=\"delegated\"\n :class=\"cn('inline-flex w-fit items-center gap-(--bh-space-050) rounded-(--bh-radius-control) border-(length:--bh-border-width-default) border-(--bh-color-border) bg-(--bh-color-surface) p-(--bh-space-050)', props.class)\"\n >\n <slot />\n </ToolbarRoot>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/toolbar/ToolbarButton.vue",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "<script setup lang=\"ts\">\nimport type { ToolbarButtonProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport type { ButtonVariants } from '@/components/ui/button'\nimport { computed } from 'vue'\nimport { ToolbarButton } from 'reka-ui'\nimport { buttonVariants } from '@/components/ui/button'\nimport { cn } from '@/lib/utils'\n\n// A tool: a Subtle icon button by default. An icon-only tool needs aria-label.\nconst props = withDefaults(defineProps<ToolbarButtonProps & {\n variant?: ButtonVariants['variant']\n size?: ButtonVariants['size']\n class?: HTMLAttributes['class']\n}>(), { variant: 'ghost', size: 'icon' })\nconst delegated = computed(() => {\n const { class: _class, variant: _variant, size: _size, ...rest } = props\n return rest\n})\n</script>\n\n<template>\n <ToolbarButton\n data-slot=\"toolbar-button\"\n v-bind=\"delegated\"\n :class=\"cn(buttonVariants({ variant, size }), props.class)\"\n >\n <slot />\n </ToolbarButton>\n</template>\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/beehexa/ui/toolbar/ToolbarSeparator.vue",
|
|
27
|
+
"type": "registry:ui",
|
|
28
|
+
"content": "<script setup lang=\"ts\">\nimport type { ToolbarSeparatorProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { ToolbarSeparator } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\nconst props = defineProps<ToolbarSeparatorProps & { class?: HTMLAttributes['class'] }>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\n</script>\n\n<template>\n <ToolbarSeparator\n data-slot=\"toolbar-separator\"\n v-bind=\"delegated\"\n :class=\"cn('mx-(--bh-space-050) my-(--bh-space-050) w-(--bh-border-width-default) self-stretch bg-(--bh-color-border)', props.class)\"\n />\n</template>\n"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "registry/beehexa/ui/toolbar/ToolbarToggleGroup.vue",
|
|
32
|
+
"type": "registry:ui",
|
|
33
|
+
"content": "<script setup lang=\"ts\">\nimport type { ToolbarToggleGroupEmits, ToolbarToggleGroupProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { ToolbarToggleGroup, useForwardPropsEmits } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\n// Toggle tools. type=\"multiple\": each one on or off (aria-pressed). type=\"single\": one of them (aria-checked).\nconst props = defineProps<ToolbarToggleGroupProps & { class?: HTMLAttributes['class'] }>()\nconst emits = defineEmits<ToolbarToggleGroupEmits>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\nconst forwarded = useForwardPropsEmits(delegated, emits)\n</script>\n\n<template>\n <ToolbarToggleGroup\n data-slot=\"toolbar-toggle-group\"\n v-bind=\"forwarded\"\n :class=\"cn('inline-flex items-center gap-(--bh-space-050)', props.class)\"\n >\n <slot />\n </ToolbarToggleGroup>\n</template>\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "registry/beehexa/ui/toolbar/ToolbarToggleItem.vue",
|
|
37
|
+
"type": "registry:ui",
|
|
38
|
+
"content": "<script setup lang=\"ts\">\nimport type { ToolbarToggleItemProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport type { ButtonVariants } from '@/components/ui/button'\nimport { computed } from 'vue'\nimport { ToolbarToggleItem } from 'reka-ui'\nimport { buttonVariants } from '@/components/ui/button'\nimport { cn } from '@/lib/utils'\n\n// On: the toggle-button look (DECISIONS D15), in single and multiple groups alike.\nconst props = withDefaults(defineProps<ToolbarToggleItemProps & {\n size?: ButtonVariants['size']\n class?: HTMLAttributes['class']\n}>(), { size: 'icon' })\nconst delegated = computed(() => {\n const { class: _class, size: _size, ...rest } = props\n return rest\n})\n</script>\n\n<template>\n <ToolbarToggleItem\n data-slot=\"toolbar-toggle-item\"\n v-bind=\"delegated\"\n :class=\"cn(buttonVariants({ variant: 'ghost', size }), 'data-[state=on]:border-(--bh-button-border-selected) data-[state=on]:bg-(--bh-button-background-selected)', props.class)\"\n >\n <slot />\n </ToolbarToggleItem>\n</template>\n"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "registry/beehexa/ui/toolbar/index.ts",
|
|
42
|
+
"type": "registry:ui",
|
|
43
|
+
"content": "export { default as Toolbar } from './Toolbar.vue'\nexport { default as ToolbarButton } from './ToolbarButton.vue'\nexport { default as ToolbarSeparator } from './ToolbarSeparator.vue'\nexport { default as ToolbarToggleGroup } from './ToolbarToggleGroup.vue'\nexport { default as ToolbarToggleItem } from './ToolbarToggleItem.vue'\n"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://shadcn-vue.com/schema/registry-item.json",
|
|
3
|
+
"name": "tooltip",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"title": "Tooltip",
|
|
6
|
+
"description": "Beehexa Tooltip: the shadcn-vue Tooltip API with an inverse surface, small body text and a 4 px offset. Text only.",
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"reka-ui",
|
|
9
|
+
"@beehexa/design-tokens"
|
|
10
|
+
],
|
|
11
|
+
"registryDependencies": [
|
|
12
|
+
"utils"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/beehexa/ui/tooltip/Tooltip.vue",
|
|
17
|
+
"type": "registry:ui",
|
|
18
|
+
"content": "<script setup lang=\"ts\">\nimport type { TooltipRootEmits, TooltipRootProps } from 'reka-ui'\nimport { TooltipRoot, useForwardPropsEmits } from 'reka-ui'\n\nconst props = defineProps<TooltipRootProps>()\nconst emits = defineEmits<TooltipRootEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n</script>\n\n<template>\n <TooltipRoot data-slot=\"tooltip\" v-bind=\"forwarded\">\n <slot />\n </TooltipRoot>\n</template>\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/beehexa/ui/tooltip/TooltipContent.vue",
|
|
22
|
+
"type": "registry:ui",
|
|
23
|
+
"content": "<script setup lang=\"ts\">\nimport type { TooltipContentEmits, TooltipContentProps } from 'reka-ui'\nimport type { HTMLAttributes } from 'vue'\nimport { computed } from 'vue'\nimport { TooltipContent, TooltipPortal, useForwardPropsEmits } from 'reka-ui'\nimport { cn } from '@/lib/utils'\n\ndefineOptions({ inheritAttrs: false })\n\n// Beehexa tooltip: inverse surface, small body text, 4 px from the trigger, text only.\n// Survey 54: inverse container is the common default; Fluent's offset is 4 px.\nconst props = withDefaults(defineProps<TooltipContentProps & { class?: HTMLAttributes['class'] }>(), {\n sideOffset: 4,\n})\nconst emits = defineEmits<TooltipContentEmits>()\nconst delegated = computed(() => {\n const { class: _class, ...rest } = props\n return rest\n})\nconst forwarded = useForwardPropsEmits(delegated, emits)\n</script>\n\n<template>\n <TooltipPortal>\n <TooltipContent\n data-slot=\"tooltip-content\"\n v-bind=\"{ ...forwarded, ...$attrs }\"\n :class=\"cn(\n 'z-(--bh-z-index-tooltip) max-w-80 rounded-(--bh-radius-control-small) bg-(--bh-color-surface-inverse) px-(--bh-space-100) py-(--bh-space-050) text-(--bh-color-text-inverse) [font:var(--bh-font-body-small)]',\n props.class,\n )\"\n >\n <slot />\n </TooltipContent>\n </TooltipPortal>\n</template>\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/beehexa/ui/tooltip/TooltipProvider.vue",
|
|
27
|
+
"type": "registry:ui",
|
|
28
|
+
"content": "<script setup lang=\"ts\">\nimport type { TooltipProviderProps } from 'reka-ui'\nimport { TooltipProvider } from 'reka-ui'\n\n// motion.wait.tooltip.show (300 ms) before the first tooltip; the next one within\n// skipDelayDuration shows at once. Hide waits motion.wait.tooltip.hide (100 ms) in the content.\nconst props = withDefaults(defineProps<TooltipProviderProps>(), {\n delayDuration: 300,\n skipDelayDuration: 300,\n})\n</script>\n\n<template>\n <TooltipProvider v-bind=\"props\">\n <slot />\n </TooltipProvider>\n</template>\n"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "registry/beehexa/ui/tooltip/TooltipTrigger.vue",
|
|
32
|
+
"type": "registry:ui",
|
|
33
|
+
"content": "<script setup lang=\"ts\">\nimport type { TooltipTriggerProps } from 'reka-ui'\nimport { TooltipTrigger } from 'reka-ui'\n\nconst props = defineProps<TooltipTriggerProps>()\n</script>\n\n<template>\n <TooltipTrigger data-slot=\"tooltip-trigger\" v-bind=\"props\">\n <slot />\n </TooltipTrigger>\n</template>\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "registry/beehexa/ui/tooltip/index.ts",
|
|
37
|
+
"type": "registry:ui",
|
|
38
|
+
"content": "// Beehexa Tooltip for shadcn-vue: the shadcn-vue Tooltip API, styled with Beehexa tokens.\n// Text only. For links or buttons inside, use a popover.\nexport { default as Tooltip } from './Tooltip.vue'\nexport { default as TooltipContent } from './TooltipContent.vue'\nexport { default as TooltipProvider } from './TooltipProvider.vue'\nexport { default as TooltipTrigger } from './TooltipTrigger.vue'\n"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -19,6 +19,8 @@ const neutralFills = [
|
|
|
19
19
|
'surface.overlay.selected',
|
|
20
20
|
'surface.overlay.selected.hover',
|
|
21
21
|
];
|
|
22
|
+
// Neutral pressed fills are not listed: they show only while the element is held down, and text and
|
|
23
|
+
// borders keep their rest colour (Interaction states).
|
|
22
24
|
|
|
23
25
|
/** @type {Array<{ fg: string; on: string[]; min: number }>} */
|
|
24
26
|
export const pairs = [
|
|
@@ -18,7 +18,14 @@ const lang = langOf(Astro.url.pathname);
|
|
|
18
18
|
<section class="child-pages">
|
|
19
19
|
{group.label && <h2>{group.label}</h2>}
|
|
20
20
|
<ul class="card-grid">
|
|
21
|
-
{items.map((item) =>
|
|
21
|
+
{items.map((item) => (
|
|
22
|
+
<li>
|
|
23
|
+
<a class="card" href={localize(item.href, lang)}>
|
|
24
|
+
{item.title} <span aria-hidden="true">→</span>
|
|
25
|
+
{item.description && <p>{item.description}</p>}
|
|
26
|
+
</a>
|
|
27
|
+
</li>
|
|
28
|
+
))}
|
|
22
29
|
</ul>
|
|
23
30
|
</section>
|
|
24
31
|
);
|