@beehexa/design-rules 2611.4.1 → 2611.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.json +602 -248
- package/dist/docs/public/_redirects +2 -0
- package/dist/docs/scripts/token-utils.d.mts +5 -1
- package/dist/docs/scripts/token-utils.mjs +28 -3
- package/dist/docs/src/brand/structure-proposal.md +1 -1
- package/dist/docs/src/components/ColorDemo.astro +52 -14
- package/dist/docs/src/components/MotionDemo.astro +135 -0
- package/dist/docs/src/components/NativeControlsDemo.astro +279 -0
- package/dist/docs/src/components/OpacityDemo.astro +8 -8
- package/dist/docs/src/components/RoleGuides.astro +2 -2
- package/dist/docs/src/components/ShapeDemo.astro +78 -35
- package/dist/docs/src/components/SiteHeader.astro +19 -4
- package/dist/docs/src/components/SystemAreas.astro +1 -1
- package/dist/docs/src/components/TokenTable.astro +16 -1
- package/dist/docs/src/components/TypeDemo.astro +15 -15
- package/dist/docs/src/components/ZIndexDemo.astro +1 -1
- package/dist/docs/src/components/logos/LogoInUse.astro +3 -3
- package/dist/docs/src/content/components/button/accessibility.mdx +41 -8
- package/dist/docs/src/content/components/button/code.mdx +8 -1
- package/dist/docs/src/content/components/button/examples.mdx +23 -4
- package/dist/docs/src/content/components/button/usage.mdx +26 -0
- package/dist/docs/src/content/components/resizable-panel/accessibility.mdx +61 -0
- package/dist/docs/src/content/components/resizable-panel/changelog.mdx +20 -0
- package/dist/docs/src/content/components/resizable-panel/code.mdx +79 -0
- package/dist/docs/src/content/components/resizable-panel/examples.mdx +85 -0
- package/dist/docs/src/content/components/resizable-panel/meta.json +5 -0
- package/dist/docs/src/content/components/resizable-panel/usage.mdx +101 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/statement.mdx +45 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/testing.mdx +58 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility.mdx +100 -11
- package/dist/docs/src/content/foundations/guidelines/content.mdx +11 -2
- package/dist/docs/src/content/foundations/index.mdx +3 -3
- package/dist/docs/src/content/foundations/styles/border.mdx +10 -3
- package/dist/docs/src/content/foundations/styles/color/accessibility.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/color/index.mdx +14 -2
- package/dist/docs/src/content/foundations/styles/color/palette.mdx +4 -4
- package/dist/docs/src/content/foundations/styles/color/tokens.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/color/usage.mdx +25 -3
- package/dist/docs/src/content/foundations/styles/data-visualization.mdx +76 -0
- package/dist/docs/src/content/foundations/styles/elevation.mdx +7 -1
- package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/icons/code.mdx +6 -18
- package/dist/docs/src/content/foundations/styles/icons/index.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/icons/usage.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/interaction-states.mdx +82 -9
- package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +2 -4
- package/dist/docs/src/content/foundations/styles/layout/breakpoints.mdx +10 -7
- package/dist/docs/src/content/foundations/styles/layout/grid.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/layout/index.mdx +3 -3
- package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +28 -37
- package/dist/docs/src/content/foundations/styles/layout/page-widths.mdx +4 -4
- package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +7 -7
- package/dist/docs/src/content/foundations/styles/logos/index.mdx +13 -2
- package/dist/docs/src/content/foundations/styles/logos/placement-and-containers.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/logos/product-logos.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +3 -1
- package/dist/docs/src/content/foundations/styles/motion.mdx +131 -3
- package/dist/docs/src/content/foundations/styles/opacity.mdx +7 -1
- package/dist/docs/src/content/foundations/styles/radius.mdx +63 -15
- package/dist/docs/src/content/foundations/styles/scrollbars.mdx +176 -0
- package/dist/docs/src/content/foundations/styles/size-and-density.mdx +16 -6
- package/dist/docs/src/content/foundations/styles/spacing.mdx +17 -3
- package/dist/docs/src/content/foundations/styles/typography/code.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/typography/index.mdx +13 -3
- package/dist/docs/src/content/foundations/styles/typography/usage.mdx +5 -3
- package/dist/docs/src/content/foundations/styles/typography/vietnamese.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/z-index.mdx +4 -0
- package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +11 -0
- package/dist/docs/src/content/foundations/tokens/index.mdx +17 -9
- package/dist/docs/src/content/get-started/design.mdx +1 -1
- package/dist/docs/src/content/get-started/develop.mdx +2 -6
- package/dist/docs/src/content/get-started/index.mdx +1 -1
- package/dist/docs/src/content/release-phases/index.mdx +1 -1
- package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +474 -12
- package/dist/docs/src/content/tools/application-content.mdx +166 -32
- package/dist/docs/src/content/tools/editors.mdx +247 -3
- package/dist/docs/src/content/tools/eslint.mdx +1 -1
- package/dist/docs/src/content/tools/index.mdx +2 -2
- package/dist/docs/src/content/tools/mermaid.mdx +108 -13
- package/dist/docs/src/content/tools/vueflow.mdx +58 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/statement.mdx +45 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/testing.mdx +58 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility.mdx +108 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content.mdx +34 -0
- package/dist/docs/src/content-vi/foundations/index.mdx +9 -0
- package/dist/docs/src/content-vi/foundations/styles/border.mdx +9 -3
- package/dist/docs/src/content-vi/foundations/styles/color/accessibility.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/color/index.mdx +14 -2
- package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +5 -5
- package/dist/docs/src/content-vi/foundations/styles/color/tokens.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +24 -2
- package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +7 -1
- package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +6 -18
- package/dist/docs/src/content-vi/foundations/styles/icons/index.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +22 -8
- package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +3 -1
- package/dist/docs/src/content-vi/foundations/styles/layout/breakpoints.mdx +10 -7
- package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/layout/index.mdx +3 -3
- package/dist/docs/src/content-vi/foundations/styles/layout/overlays.mdx +36 -0
- package/dist/docs/src/content-vi/foundations/styles/layout/page-widths.mdx +5 -1
- package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +7 -7
- package/dist/docs/src/content-vi/foundations/styles/logos/index.mdx +13 -2
- package/dist/docs/src/content-vi/foundations/styles/logos/placement-and-containers.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/logos/product-logos.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/logos/using-the-logo.mdx +3 -1
- package/dist/docs/src/content-vi/foundations/styles/motion.mdx +139 -0
- package/dist/docs/src/content-vi/foundations/styles/opacity.mdx +8 -2
- package/dist/docs/src/content-vi/foundations/styles/radius.mdx +63 -15
- package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +16 -6
- package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +17 -3
- package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/typography/index.mdx +14 -4
- package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/typography/vietnamese.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +4 -0
- package/dist/docs/src/content-vi/foundations/tokens/all-tokens.mdx +47 -0
- package/dist/docs/src/content-vi/foundations/tokens/index.mdx +35 -0
- package/dist/docs/src/lib/i18n.ts +0 -1
- package/dist/docs/src/lib/token-descriptions-vi.ts +60 -9
- package/dist/docs/src/lib/tokens.ts +3 -0
- package/dist/docs/src/styles/chrome.css +10 -3
- package/dist/docs/src/styles/color.css +33 -23
- package/dist/docs/src/styles/docs.css +26 -28
- package/dist/docs/src/styles/elevation.css +4 -4
- package/dist/docs/src/styles/global.css +21 -1
- package/dist/docs/src/styles/icons.css +10 -9
- package/dist/docs/src/styles/kit.css +36 -32
- package/dist/docs/src/styles/layout.css +7 -7
- package/dist/docs/src/styles/motion.css +34 -0
- package/dist/docs/src/styles/opacity.css +3 -3
- package/dist/docs/src/styles/scrollbars.css +74 -0
- package/dist/docs/src/styles/shapes.css +21 -11
- package/dist/docs/src/styles/tokens.css +392 -12
- package/dist/docs/src/styles/tokens.js +185 -6
- package/dist/docs/src/styles/typography.css +4 -4
- package/dist/docs/src/styles/zindex.css +10 -7
- package/dist/docs/tokens/color.json +18 -1
- package/dist/docs/tokens/content.json +8 -3
- package/dist/docs/tokens/diagram.json +9 -3
- package/dist/docs/tokens/flow.json +2 -2
- package/dist/docs/tokens/layout.json +4 -0
- package/dist/docs/tokens/motion.json +37 -5
- package/dist/docs/tokens/radius.json +52 -8
- package/dist/docs/tokens/resize.json +12 -0
- package/dist/docs/tokens/scrollbar.json +40 -0
- package/dist/docs/tokens/size.json +1 -1
- package/dist/docs/tokens/spacing.json +31 -1
- package/dist/docs/tokens/switch.json +280 -0
- package/dist/index.js +602 -248
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Usage
|
|
3
|
-
description:
|
|
3
|
+
description: Find the right colour token for any part of a screen, from page backgrounds to status labels, buttons and selected rows.
|
|
4
4
|
order: 2
|
|
5
5
|
---
|
|
6
6
|
import ColorDemo from '../../../../components/ColorDemo.astro';
|
|
7
7
|
|
|
8
|
+
Every colour on a screen answers two questions: what is this, and what does it mean? Answer both and the token name follows.
|
|
9
|
+
|
|
8
10
|
**Pick a token by what you are painting and what it means, not by how it looks.**
|
|
9
11
|
|
|
10
12
|
<ColorDemo kind="example" />
|
|
@@ -35,9 +37,11 @@ import ColorDemo from '../../../../components/ColorDemo.astro';
|
|
|
35
37
|
| Error under a field | `text.danger`, `icon.danger` |
|
|
36
38
|
| Banner for a status | `background.{role}.subtle`, `border.{role}.subtle`, `text`, `icon.{role}` |
|
|
37
39
|
| Status in a table row | A [label](#labels) |
|
|
40
|
+
| Tag: a category on an item | `border`, `text` on `surface` ([which one?](#label-tag-or-chip)) |
|
|
41
|
+
| Chip: a filter or a picked value | `border.bold`, `text` on `surface`, remove icon `icon.subtle`; when on, `background.selected` and `border.selected` |
|
|
38
42
|
| Tooltip | `surface.inverse`, `text.inverse` |
|
|
39
43
|
| Toast | `surface.overlay`, `text`, `icon.{role}`, shadow `elevation.shadow.overlay`; no border |
|
|
40
|
-
| Switch |
|
|
44
|
+
| Switch | Paired `switch.on.{track,thumb,label,border}` / `switch.off.{track,thumb,label,border}`; ON is neutral-bold, OFF has a strong thumb and meaningful edge, not disabled paint. See [interaction states](/foundations/styles/interaction-states/#boolean-switch). |
|
|
41
45
|
| Avatar with initials | `background.neutral`, `text` |
|
|
42
46
|
| Step number, count | `background.neutral.bold`, `text.inverse` |
|
|
43
47
|
| Layer behind a dialog or drawer | `surface.scrim` |
|
|
@@ -94,7 +98,25 @@ Warning is orange, not yellow: yellow is the brand. There is no sixth level; say
|
|
|
94
98
|
| Size | 20 px, padding 6 px; large 24 px, 8 px | 32 px, padding 12 px |
|
|
95
99
|
| Use | Many per screen: status in table rows and lists | One per page: the status the page is about |
|
|
96
100
|
|
|
97
|
-
|
|
101
|
+
### Label, tag or chip
|
|
102
|
+
|
|
103
|
+
Three small elements that look alike but do different jobs. Choose by what people can do with it, not by how it looks.
|
|
104
|
+
|
|
105
|
+
<ColorDemo kind="label-tag-chip" />
|
|
106
|
+
|
|
107
|
+
| | Label | Tag | Chip |
|
|
108
|
+
|---|---|---|---|
|
|
109
|
+
| What it is | A status the system sets | A category or attribute attached to an item | A value people entered or picked |
|
|
110
|
+
| Example | Synced, Failed, Expiring | Orders, Staging, Backend | An active filter, a value in a multi-select |
|
|
111
|
+
| People can | Only read it | Read it, or click it to filter when it links | Remove it, or turn it on and off |
|
|
112
|
+
| States | None | Default; hover and focus only when it links | Default, hover, focus, selected, disabled |
|
|
113
|
+
| Colour | The status role's `border` and `text` | `border` and `text` on `surface` | `border.bold` and `text` on `surface`; when on, `background.selected` and `border.selected` |
|
|
114
|
+
| Size | 20 px, or 24 px large (see above) | 24 px, padding 8 px | 24 px in dense toolbars, 32 px elsewhere |
|
|
115
|
+
| Radius | `radius.050` (4 px) | `radius.050` (4 px) | `radius.pill` (`radius.full`) |
|
|
116
|
+
|
|
117
|
+
- A label never looks clickable: no hover, no pointer, no remove button.
|
|
118
|
+
- A tag never has a remove button. Once it does, it is a chip.
|
|
119
|
+
- A chip always responds to people. If nothing happens when people click it, it is a tag or a label.
|
|
98
120
|
|
|
99
121
|
## Interaction states
|
|
100
122
|
|
|
@@ -77,3 +77,79 @@ dash pattern and explicit labels, not colour alone. Unavailable means no request
|
|
|
77
77
|
to assess. Fault means internal/backend request-processing errors, not a ratio band;
|
|
78
78
|
show a separate fault count, explicit label/icon and cross-hatching. Fetch failures remain errors, not a band. Never turn missing
|
|
79
79
|
data into zero or a healthy result. Use normal `color.text` for text on subtle fills.
|
|
80
|
+
|
|
81
|
+
## Source-owned presentation boundaries
|
|
82
|
+
|
|
83
|
+
Semantic data does not authorize a local CSS recipe. Prefer a source-configured
|
|
84
|
+
native chart, Progress, Tag or Timeline API when it can preserve the required
|
|
85
|
+
structure, behavior and accessibility. Custom SVG/data DOM uses the companion
|
|
86
|
+
`@beehexa/ant-design-vue-tokens/css` source recipes:
|
|
87
|
+
|
|
88
|
+
- `bh-data-track` and `bh-data-fill` own proportional track presentation.
|
|
89
|
+
Default thickness is `timeline-track-height`; `data-bh-density="activity"` uses
|
|
90
|
+
`activity-track-height`. Coordinates, measured widths and percentages remain data.
|
|
91
|
+
- `bh-data-band` is a labeled assessment chip; `bh-data-accent` is a leading
|
|
92
|
+
semantic edge; `bh-data-mark` applies the source mark foreground.
|
|
93
|
+
- `bh-data-line`, `bh-data-point`, `bh-data-grid`, `bh-data-axis`,
|
|
94
|
+
`bh-data-outline` and `bh-data-hatch` own SVG paint/stroke roles.
|
|
95
|
+
`data-bh-density="sparkline"` selects the compact series/point geometry.
|
|
96
|
+
Dash/hatch geometry may encode distinct data classes, never decorative effects.
|
|
97
|
+
- `bh-data-tooltip` owns the source paired tooltip canvas and typography;
|
|
98
|
+
the host preserves containment, positioning and equivalent numeric content.
|
|
99
|
+
|
|
100
|
+
Bind a source semantic discriminator at the relevant host or mark:
|
|
101
|
+
`data-bh-band="good|attention|critical"` maps health assessments to
|
|
102
|
+
success/warning/danger pairs; `data-bh-status="success|warning|danger|info|neutral|disabled"`
|
|
103
|
+
describes an actual operational state. Threshold classification remains domain
|
|
104
|
+
logic and must be explicit in labels; these attributes never calculate a score.
|
|
105
|
+
`data-bh-traffic` uses the six traffic bands above. `data-bh-metric`,
|
|
106
|
+
`data-bh-job-type` and `data-bh-priority` use the exact named source keys.
|
|
107
|
+
Private `--bh-data-*` properties belong to these recipes, not consumer aliases.
|
|
108
|
+
|
|
109
|
+
Native APIs requiring resolved color values use
|
|
110
|
+
`getVisualizationColor(role, { dark })` or
|
|
111
|
+
`getStatusColor(tone, 'text' | 'border' | 'background', { dark })` from
|
|
112
|
+
`@beehexa/ant-design-vue-tokens/visualization`. Keep the mode reactive.
|
|
113
|
+
The caller classifies domain outcomes; source owns the corresponding paint.
|
|
114
|
+
Do not recreate a downstream color map, including token-string maps.
|
|
115
|
+
|
|
116
|
+
### Focus, selection and temporal marks
|
|
117
|
+
|
|
118
|
+
`bh-data-hit-target` owns the transparent SVG hit area and visible keyboard-focus
|
|
119
|
+
stroke; geometry and domain hit interval remain consumer data. A selected region uses
|
|
120
|
+
`bh-data-outline` with `data-bh-shape="selection"` for its no-fill selected frame and
|
|
121
|
+
`bh-data-point` with the same attribute for a selected marker. Selection is not focus.
|
|
122
|
+
`bh-data-grid[data-bh-current="true"]` marks the current time; `bh-data-axis-tick`
|
|
123
|
+
owns a gauge tick's paint while the consumer positions it on the scale.
|
|
124
|
+
|
|
125
|
+
Timeline marks use `bh-data-mark` with `data-bh-mark="timeline-outer|timeline-inner|cluster"`.
|
|
126
|
+
The outer category and inner execution state are independent encodings. Source defaults
|
|
127
|
+
are16/8px for the two diameters; coarse-pointer marks use18/10px. A cluster's minimum
|
|
128
|
+
diameter is24px. Hit targets remain distinct from these visible marks.
|
|
129
|
+
`data-bh-mark="legend|dot"` uses the source8px circular mark; a hidden series label's
|
|
130
|
+
`data-bh-hidden="true"` adds a strike cue rather than changing its meaning through
|
|
131
|
+
opacity alone. `data-bh-selected="true"` adds a separate selected outline.
|
|
132
|
+
|
|
133
|
+
`bh-data-line[data-bh-line="hover"]` owns the hover guide dash pattern; source
|
|
134
|
+
`bh-data-grid` owns grid dashes, and `data-bh-curve="step"` owns a stepped line's
|
|
135
|
+
join. Use source point roles for sparkline endpoints rather than local radius paint.
|
|
136
|
+
`bh-data-connector` describes a relationship between progress items; status is explicit
|
|
137
|
+
and `data-bh-skipped="true"` adds a dashed cue. Prefer native Steps/Progress when they
|
|
138
|
+
can preserve the actual structure. The connector recipe exists for split-edge layouts
|
|
139
|
+
whose paired half-connectors cannot be represented by those native APIs.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
`bh-data-area` fills an SVG area without adding an outline, including a hatch
|
|
143
|
+
pattern canvas. `bh-data-swatch` owns the source12px square legend, frame and
|
|
144
|
+
paired fill; source `data-bh-traffic="degraded"` supplies a dashed outline both
|
|
145
|
+
for a swatch and for `bh-data-outline` intervals. Fault remains a cross-hatch,
|
|
146
|
+
not merely another color. Pattern coordinates and domain intervals remain data.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
Actual native Progress accepts `semanticProgressProps` from
|
|
150
|
+
`@beehexa/ant-design-vue-tokens/visualization`, together with the appropriate
|
|
151
|
+
`data-bh-band` or `data-bh-status` discriminator. These are native stroke/trail
|
|
152
|
+
props using source CSS variables, reactive across themes without a downstream
|
|
153
|
+
color map or a new theme-store dependency. Use native Progress/Steps/Tag/Statistic
|
|
154
|
+
instead of recreating their tracks, connectors, pills or figures in HTML.
|
|
155
|
+
|
|
@@ -14,7 +14,7 @@ Elevation is the distance a surface seems to have from the page, shown with a sh
|
|
|
14
14
|
|
|
15
15
|
- **Each level is a pair: a background and a shadow.** Use the two tokens of a level together.
|
|
16
16
|
- **The further from the page, the larger and softer the shadow.** A card has a faint shadow; a dialog a deep one.
|
|
17
|
-
- **Three levels only.** If everything floats, nothing stands out.
|
|
17
|
+
- **Three shadow levels only.** If everything floats, nothing stands out.
|
|
18
18
|
|
|
19
19
|
Elevation shows how high a surface looks. [Z-index](/foundations/styles/z-index/) decides which surface is drawn on top.
|
|
20
20
|
|
|
@@ -72,4 +72,10 @@ Rows inside a floating surface use the overlay state colours, such as `color.sur
|
|
|
72
72
|
|
|
73
73
|
<TokenTable prefix="elevation" />
|
|
74
74
|
|
|
75
|
+
## Related
|
|
76
|
+
|
|
77
|
+
- [Z-index](/foundations/styles/z-index/): which surface is drawn on top.
|
|
78
|
+
- [Opacity](/foundations/styles/opacity/): the scrim behind dialogs and drawers.
|
|
79
|
+
- [Color usage](/foundations/styles/color/usage/#surfaces-and-backgrounds): surface and background tokens.
|
|
80
|
+
|
|
75
81
|
<TokenTable prefix="color.surface.overlay" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Accessibility
|
|
3
|
-
description:
|
|
3
|
+
description: Some people never see an icon; others need it large and clear. Give each icon a name or hide it, and make clickable icons easy to hit.
|
|
4
4
|
order: 3
|
|
5
5
|
---
|
|
6
6
|
import IconDemo from '../../../../components/IconDemo.astro';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Code
|
|
3
|
-
description:
|
|
3
|
+
description: Install Lucide, import icons by name, and size, colour and label them in Vue, with short notes for React and Astro.
|
|
4
4
|
order: 4
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -107,11 +107,10 @@ Set the gap on the control, from its size: 4 px (`space.050`) with a 16 px icon
|
|
|
107
107
|
Lucide hides an icon from screen readers with `aria-hidden="true"`, unless you give it an `aria-*`, `role` or `title` prop. Name icon-only buttons on the button, and add a tooltip with the same text.
|
|
108
108
|
|
|
109
109
|
```vue
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
</a-tooltip>
|
|
110
|
+
<!-- Wrap the button in your Tooltip component, with the same text: "Settings" -->
|
|
111
|
+
<button type="button" class="icon-button" aria-label="Settings">
|
|
112
|
+
<Settings />
|
|
113
|
+
</button>
|
|
115
114
|
```
|
|
116
115
|
|
|
117
116
|
A meaningful icon on its own gets a role and a label, which also removes `aria-hidden`:
|
|
@@ -120,17 +119,6 @@ A meaningful icon on its own gets a role and a label, which also removes `aria-h
|
|
|
120
119
|
<CircleX role="img" aria-label="Failed" />
|
|
121
120
|
```
|
|
122
121
|
|
|
123
|
-
## Inside Ant Design Vue
|
|
124
|
-
|
|
125
|
-
Put the icon in the `icon` slot and add the `anticon` class, so Ant Design Vue lines it up like its own icons.
|
|
126
|
-
|
|
127
|
-
```vue
|
|
128
|
-
<a-button>
|
|
129
|
-
<template #icon><Plus class="anticon" /></template>
|
|
130
|
-
Add store
|
|
131
|
-
</a-button>
|
|
132
|
-
```
|
|
133
|
-
|
|
134
122
|
## React
|
|
135
123
|
|
|
136
124
|
`lucide-react` has the same icons and props, in camelCase. Set the default size once with `LucideProvider`.
|
|
@@ -162,7 +150,7 @@ import Search from '@lucide/astro/icons/search';
|
|
|
162
150
|
|
|
163
151
|
## Custom icons
|
|
164
152
|
|
|
165
|
-
Lucide
|
|
153
|
+
If Lucide has no icon for something Beehexa needs, draw it on Lucide’s 24 px grid with the same stroke and caps, name it in kebab-case with a `bh-` prefix, and add it to the library.
|
|
166
154
|
|
|
167
155
|
## Updating Lucide
|
|
168
156
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Icons
|
|
3
|
-
description:
|
|
3
|
+
description: Icons help people scan a screen and spot an action. Beehexa uses Lucide's outline icons, with a few rules for size, colour, labels and accessibility.
|
|
4
4
|
order: 11
|
|
5
5
|
sidebarLabel: Overview
|
|
6
6
|
---
|
|
@@ -45,7 +45,7 @@ An icon takes the colour of the text next to it. Use a status colour only when t
|
|
|
45
45
|
| Contrast | 3:1 or more for icons that carry meaning (WCAG 1.4.11) |
|
|
46
46
|
| Target | 24 × 24 or more (WCAG 2.5.8); icon buttons in products are 32 × 32 |
|
|
47
47
|
| Names | One name per meaning, kebab-case, such as `circle-check` |
|
|
48
|
-
| Package | Lucide
|
|
48
|
+
| Package | Lucide 1.62.0, pinned, each icon imported by name |
|
|
49
49
|
| Right to left | Not needed: products are in Vietnamese and English |
|
|
50
50
|
|
|
51
51
|
## In this section
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Usage
|
|
3
|
-
description:
|
|
3
|
+
description: Pick the right size, colour and label for an icon, and use the same icon for the same action everywhere.
|
|
4
4
|
order: 2
|
|
5
5
|
---
|
|
6
6
|
import IconDemo from '../../../../components/IconDemo.astro';
|
|
7
7
|
import ColorDemo from '../../../../components/ColorDemo.astro';
|
|
8
8
|
|
|
9
|
+
An icon works when people learn it once and recognise it everywhere after that.
|
|
10
|
+
|
|
9
11
|
**Use 16 px icons in the colour of the text, with a label, and the same icon for the same meaning everywhere.**
|
|
10
12
|
|
|
11
13
|
## Sizes
|
|
@@ -84,7 +86,7 @@ Use an icon on its own only when all three are true:
|
|
|
84
86
|
|
|
85
87
|
## Common actions
|
|
86
88
|
|
|
87
|
-
**One icon per meaning.** Use this icon whenever you show one of these actions or objects, in every product. If a meaning is missing, ask before you choose one, so it is added here.
|
|
89
|
+
**One icon per meaning.** Use this icon whenever you show one of these actions or objects, in every product. If a meaning is missing, ask the design system team before you choose one, so it is added here.
|
|
88
90
|
|
|
89
91
|
<IconDemo kind="actions" />
|
|
90
92
|
|
|
@@ -1,36 +1,103 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Interaction states
|
|
3
|
-
description:
|
|
3
|
+
description: Every control shows when it is hovered, focused, pressed, selected or turned off, so people know what will happen before they act.
|
|
4
4
|
order: 10
|
|
5
5
|
---
|
|
6
6
|
import TokenTable from '../../../components/TokenTable.astro';
|
|
7
|
+
import NativeControlsDemo from '../../../components/NativeControlsDemo.astro';
|
|
7
8
|
|
|
8
|
-
Every interactive element
|
|
9
|
+
People need to see that a button is under the pointer, that the keyboard is on it, that it was pressed, or that it cannot be used right now. Every interactive element has all of these states. Each state has its own colour token, so every component shows it the same way, in light and dark, without extra code.
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## How it works
|
|
11
12
|
|
|
12
13
|
1. Every state uses its own token. Find the token of the element at rest, then add the state: `color.background.neutral` at rest becomes `color.background.neutral.hover` on hover and `color.background.neutral.pressed` when pressed.
|
|
13
14
|
2. Never draw a state with opacity, a transparent overlay, `filter: brightness()` or a mixed colour. The result changes with whatever is under the element, and its contrast can't be checked.
|
|
14
|
-
3. Never invent a hover or pressed colour. If the token you need doesn't exist, ask
|
|
15
|
+
3. Never invent a hover or pressed colour. If the token you need doesn't exist, ask the design system team to add it.
|
|
15
16
|
4. Keyboard focus is always visible, on every element that can take focus. Hover is never the only way to show something.
|
|
16
17
|
|
|
17
18
|
## Each state
|
|
18
19
|
|
|
19
20
|
| State | When | Background | Text and icon | Border |
|
|
20
21
|
| --- | --- | --- | --- | --- |
|
|
21
|
-
| Rest | Nothing is happening. | The token for the element, such as `color.background.neutral` or `color.background.danger.bold` | The paired text token (see
|
|
22
|
+
| Rest | Nothing is happening. | The token for the element, such as `color.background.neutral` or `color.background.danger.bold` | The paired text token (see [Pairing](/foundations/styles/color/accessibility/#pairing)) | `color.border` or `color.border.bold` |
|
|
22
23
|
| Hover | A pointer is over the element. | The same token plus `.hover`: one step up the scale | Unchanged | Unchanged |
|
|
23
24
|
| Pressed | The element is being clicked or tapped. | The same token plus `.pressed`: two steps up | Unchanged | Unchanged |
|
|
24
|
-
|
|
25
|
-
The primary button is the one exception. It rests on graphite 12, the last step, so it has no step above: on hover it moves one step back (graphite 11) and when pressed two steps back (graphite 10). Its tokens already do this.
|
|
26
25
|
| Focus | The element has keyboard focus (`:focus-visible`). | Unchanged | Unchanged | Add a ring: `outline: var(--bh-border-width-focused) solid var(--bh-color-border-focus); outline-offset: var(--bh-state-focus-offset);` |
|
|
27
|
-
| Selected | The element is chosen, like a table row, a tab or a menu item. | `color.background.selected`, and `color.background.selected.hover` on hover | Unchanged, and a second cue: a check, the yellow indicator bar (`color.border.selected`)
|
|
26
|
+
| Selected | The element is chosen, like a table row, a tab or a menu item. | `color.background.selected`, and `color.background.selected.hover` on hover | Unchanged, and a second cue: a check in a menu, or the yellow indicator bar (`color.border.selected`) | Unchanged |
|
|
28
27
|
| Disabled | The element cannot be used now. | `color.background.disabled` | `color.text.disabled`, `color.icon.disabled` | `color.border.disabled` |
|
|
29
28
|
|
|
29
|
+
Primary buttons and ON Switches are exceptions. They rest on graphite 12, the last step, so they have no step above: on hover they move one step back (graphite 11) and when pressed two steps back (graphite 10). Their tokens already do this.
|
|
30
|
+
|
|
30
31
|
## Rows, menu items and ghost buttons
|
|
31
32
|
|
|
32
33
|
Elements with no fill at rest use `color.background.neutral.subtle`, which is transparent. On hover they take `color.background.neutral.subtle.hover`; when pressed, `color.background.neutral.subtle.pressed`.
|
|
33
34
|
|
|
35
|
+
Native Button variants keep their own roles; `ghost` is not permission to use
|
|
36
|
+
the solid-primary label over a transparent background. Framework “outline”
|
|
37
|
+
aliases can also paint resting shadows. Removing that resting shadow must
|
|
38
|
+
never remove the independent focused color, width and gap. See the
|
|
39
|
+
[native Button state contract and live matrix](/tools/ant-design-vue-theme/#one-native-control-family-distinct-roles)
|
|
40
|
+
for the source-owned alias split, disabled/loading behavior and danger pairs.
|
|
41
|
+
|
|
42
|
+
## Interactive cards
|
|
43
|
+
|
|
44
|
+
A bordered interactive card rests on `color.surface` with `color.border`. Hover
|
|
45
|
+
strengthens its frame to `color.border.bold` and adds `elevation.shadow.raised`;
|
|
46
|
+
it never hides the border or lowers opacity. Keyboard focus keeps that meaningful
|
|
47
|
+
frame and raised shadow and adds the standard focused outline/offset. Keep
|
|
48
|
+
`radius.100` (8 px) in every state. Hoverability alone does not make a Card keyboard
|
|
49
|
+
operable: use a real link/button for its action or provide the appropriate focus
|
|
50
|
+
and keyboard semantics.
|
|
51
|
+
|
|
52
|
+
## Boolean Switch
|
|
53
|
+
|
|
54
|
+
A Switch describes a boolean setting, not business success. ON uses the existing
|
|
55
|
+
neutral-bold family, never success green or brand yellow. OFF is an available
|
|
56
|
+
control with a strong thumb, readable label and meaningful edge; it is not the
|
|
57
|
+
disabled treatment. `switch.on.*` and `switch.off.*` own the paired track, thumb,
|
|
58
|
+
label and border. Never put one shared white thumb/text pair over both tracks.
|
|
59
|
+
|
|
60
|
+
| State | OFF pair | ON pair | Additional cue |
|
|
61
|
+
| --- | --- | --- | --- |
|
|
62
|
+
| Normal | Track `background.neutral`; thumb `icon`; label `text`; edge `border.bold` | Track/edge `background.neutral.bold`; thumb `icon.inverse`; label `text.inverse` | Native thumb position and `aria-checked`; concise On/Off or Bật/Tắt labels |
|
|
63
|
+
| Hover | Track `.hover`; same paired thumb/label and edge | Track/edge `.hover`; same paired inverse thumb/label | Pointer affordance without changing checked state |
|
|
64
|
+
| Pressed | Track `.pressed`; same paired thumb/label; edge graphite 10 | Track/edge `.pressed`; same paired inverse thumb/label | Native press/handle feedback; the stronger OFF edge retains 3:1 against its pressed fill |
|
|
65
|
+
| Focus | `.focus` aliases the normal pair; hover/pressed may coexist | `.focus` aliases the normal pair; hover/pressed may coexist | Independent `switch.focus-ring`, existing focused width and gap; never replace state with ring color |
|
|
66
|
+
| Loading | `.loading` preserves the current normal OFF pair | `.loading` preserves the current normal ON pair | Native spinner with the paired `switch.{off,on}.loading-icon`; native button disabled until work settles. Loading paint takes precedence while the spinner is present, including when disabled is also set. |
|
|
67
|
+
| Disabled | Explicit `.disabled`: background, icon, text and border disabled roles | Same explicit disabled roles, but checked position and label remain ON | Native disabled behavior; no opacity dimming and no change callbacks |
|
|
68
|
+
|
|
69
|
+
All names in the table's color pairs have the `color.` prefix. The exported
|
|
70
|
+
Switch roles are `switch.{off,on}.{track,thumb,label,border}` at rest, plus
|
|
71
|
+
`.hover`, `.pressed`, `.focus`, `.loading` and `.disabled`. They resolve through
|
|
72
|
+
the existing palette in light and dark; there are no copied hex colors, mixed
|
|
73
|
+
states or transparent state overlays. Enabled label and thumb pairs have a
|
|
74
|
+
minimum measured contrast of **5.64:1** across both themes and every state
|
|
75
|
+
(the light ON pressed pair). OFF edges retain at least **3.00:1** against their
|
|
76
|
+
track; the focus ring has at least **6.64:1** against page, surface, subtle and
|
|
77
|
+
overlay surfaces. Disabled pairs are intentionally lower contrast and exempt.
|
|
78
|
+
|
|
79
|
+
Normal and small Switches share these paints and `radius.full`; their existing
|
|
80
|
+
native height, handle size, travel and label spacing do not change. EN and VI use
|
|
81
|
+
the existing source typography and short On/Off or Bật/Tắt labels. Keep the native
|
|
82
|
+
button, controlled `checked`/`v-model:checked`, `change` callback, keyboard handling
|
|
83
|
+
and disabled/loading safety. Do not replace them with a styled checkbox or
|
|
84
|
+
product-specific success palette. Applications own the setting and save operation,
|
|
85
|
+
not Switch skin. The [Ant Design Vue contract](/tools/ant-design-vue-theme/#native-switch-contract)
|
|
86
|
+
documents the actual adapter API and its narrow native gaps.
|
|
87
|
+
|
|
88
|
+
### Live native Switch states
|
|
89
|
+
|
|
90
|
+
This is the real AntD4 Switch under the public theme and companion CSS, not a
|
|
91
|
+
static imitation. Both sizes show initially OFF/ON available, loading and disabled
|
|
92
|
+
examples, localized labels and a visible change counter. The explicitly simulated
|
|
93
|
+
save keeps its checked binding unchanged while pending, then commits it once;
|
|
94
|
+
attempting another activation during loading must not add a save. Use the site's
|
|
95
|
+
light/dark and EN/VI controls, then hover, press and keyboard-focus the examples.
|
|
96
|
+
|
|
97
|
+
<NativeControlsDemo />
|
|
98
|
+
|
|
99
|
+
<TokenTable prefix="switch" />
|
|
100
|
+
|
|
34
101
|
## Disabled
|
|
35
102
|
|
|
36
103
|
- Use the three disabled colour tokens above. Don't lower the opacity.
|
|
@@ -38,7 +105,7 @@ Elements with no fill at rest use `color.background.neutral.subtle`, which is tr
|
|
|
38
105
|
- WCAG doesn't require contrast for disabled controls, so the disabled colours are light on purpose.
|
|
39
106
|
- Prefer telling people why something can't be used, for example in helper text, over a silent disabled control.
|
|
40
107
|
|
|
41
|
-
## Dark
|
|
108
|
+
## Dark mode
|
|
42
109
|
|
|
43
110
|
The same tokens work in dark. In dark, fills get lighter on hover and when pressed instead of darker, and the primary button moves back from graphite 12 the same way; the tokens already do this, so the code doesn’t change.
|
|
44
111
|
|
|
@@ -47,3 +114,9 @@ The same tokens work in dark. In dark, fills get lighter on hover and when press
|
|
|
47
114
|
The colours are on the [Color](/foundations/styles/color/) page. The focus ring width, `border.width.focused`, is on the [Border](/foundations/styles/border/) page. This group holds the gap between a control and its ring.
|
|
48
115
|
|
|
49
116
|
<TokenTable prefix="state" />
|
|
117
|
+
|
|
118
|
+
## Related
|
|
119
|
+
|
|
120
|
+
- [Color usage](/foundations/styles/color/usage/#interaction-states): the state tokens for each part of a screen.
|
|
121
|
+
- [Border](/foundations/styles/border/): the focus ring and the selected bar.
|
|
122
|
+
- [Keyboard and focus](/foundations/guidelines/accessibility/keyboard-and-focus/): where focus goes and how it looks.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: App frame
|
|
3
|
-
description: The header, side navigation and page header
|
|
3
|
+
description: The header, side navigation and page header stay in the same place on every page, so people never have to look for them.
|
|
4
4
|
order: 1
|
|
5
5
|
---
|
|
6
6
|
import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
@@ -27,9 +27,7 @@ below a logo row `min-height: 100%`: that adds the logo height to a full-height
|
|
|
27
27
|
| Holds | Menu button (below 1024 px), logo, global search, workspace switcher, notifications, account |
|
|
28
28
|
| Does not hold | The breadcrumb and page actions. They change with the page, so they go in the page header |
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
The sidebar widths below are `layout.sidebar.expanded` and `layout.sidebar.collapsed`.
|
|
32
|
-
Convert source units at numeric framework API boundaries instead of copying their values.
|
|
30
|
+
In code, the header height is `layout.header.height` and the side navigation widths are `layout.sidebar.expanded` and `layout.sidebar.collapsed`. Use the tokens rather than copying the numbers.
|
|
33
31
|
|
|
34
32
|
## Side navigation
|
|
35
33
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Breakpoints
|
|
3
|
-
description:
|
|
3
|
+
description: Beehexa layouts adapt to the window, from a phone to a wide monitor. See what changes at each width and how to design for it.
|
|
4
4
|
order: 4
|
|
5
5
|
---
|
|
6
6
|
import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
7
7
|
import TokenTable from '../../../../components/TokenTable.astro';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
People check an order on a phone and work through a day of syncs on a wide monitor. The layout changes at a few widths so each screen fits the window it is in.
|
|
10
|
+
|
|
11
|
+
**The layout changes at three window widths: 768, 1024 and 1440 px. Every screen also works at 320 px.**
|
|
10
12
|
|
|
11
13
|
<LayoutDemo kind="breakpoints" />
|
|
12
14
|
|
|
@@ -45,12 +47,13 @@ In code, the base styles are for the smallest window, and each breakpoint adds t
|
|
|
45
47
|
| 360 and 320 px | Phones, and the narrowest window allowed |
|
|
46
48
|
| 400% zoom | People who enlarge the page |
|
|
47
49
|
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
<TokenTable prefix="breakpoint" />
|
|
51
|
-
|
|
52
|
-
## Usage
|
|
50
|
+
## Code
|
|
53
51
|
|
|
54
52
|
- Write media queries with `min-width`: `@media (min-width: 768px)`.
|
|
55
53
|
- CSS custom properties cannot be used in media queries. Use the pixel values of these tokens.
|
|
56
54
|
- Change the layout at breakpoints, never the spacing tokens or text sizes inside a component.
|
|
55
|
+
|
|
56
|
+
## Tokens
|
|
57
|
+
|
|
58
|
+
<TokenTable prefix="breakpoint" />
|
|
59
|
+
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Grid
|
|
3
|
-
description: A
|
|
3
|
+
description: A 4, 8 or 12-column grid keeps content aligned on every screen, with gutters and margins from the spacing tokens.
|
|
4
4
|
order: 3
|
|
5
5
|
---
|
|
6
6
|
import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
7
7
|
|
|
8
|
+
A grid gives every page the same rhythm, so cards, forms and tables line up and screens feel like one product.
|
|
9
|
+
|
|
8
10
|
**Lay out the main content area on 4 columns on phones, 8 on tablets and 12 from 1024 px.**
|
|
9
11
|
|
|
10
12
|
<LayoutDemo kind="grid" />
|
|
@@ -24,7 +26,7 @@ The values are spacing tokens: 16 px is `space.200`, 24 px is `space.300` and 32
|
|
|
24
26
|
- **4 columns on phones** give two halves or four quarters. **8 on tablets** keep the same halves and quarters with more room.
|
|
25
27
|
- **Gutters** are 16 px on phones and 24 px from 768 px, where there is room to separate cards more clearly.
|
|
26
28
|
- **Page margins** start at 16 px and grow to 32 px on wide screens, so content does not touch the edge of a large window.
|
|
27
|
-
- **Every value is a spacing token and a multiple of 8 px
|
|
29
|
+
- **Every value is a spacing token and a multiple of 8 px.** Text line heights sit on the same 4 px grid, so cards, text and controls line up.
|
|
28
30
|
|
|
29
31
|
Use the same gutter between rows, so cards are as far apart down as across.
|
|
30
32
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Layout
|
|
3
|
-
description:
|
|
3
|
+
description: Every Beehexa app shares one frame, so people always know where the menu, search and page actions are.
|
|
4
4
|
order: 4
|
|
5
5
|
sidebarLabel: Overview
|
|
6
6
|
---
|
|
7
7
|
import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
8
8
|
|
|
9
|
-
**Every Beehexa app uses one frame: a header across the top, side navigation on the left, and the page beside it.**
|
|
10
|
-
|
|
11
9
|
People move between screens all day. When the menu, the search and the page actions stay in the same place, they find them without looking.
|
|
12
10
|
|
|
11
|
+
**Every Beehexa app uses one frame: a header across the top, side navigation on the left, and the page beside it.**
|
|
12
|
+
|
|
13
13
|
<LayoutDemo kind="anatomy" />
|
|
14
14
|
|
|
15
15
|
## Where each part is set
|
|
@@ -1,45 +1,36 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
2
|
+
title: Detail overlays
|
|
3
|
+
description: How wide a drawer or panel should be when people inspect a record without leaving the page.
|
|
4
4
|
order: 5
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
When people open an order, a sync log or the settings of a connection, they usually want the list behind it to stay where it is. A detail overlay, a drawer or panel that opens over the page, lets them inspect the record and go straight back to where they were.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
configuration while retaining the page context. A short confirmation dialog is not a data-inspection
|
|
11
|
-
overlay and does not inherit this width contract. Prefer the component's standard content sizing
|
|
12
|
-
for short confirmation/action prompts; do not enlarge it just because a data panel uses a wide role.
|
|
9
|
+
## When to use one
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
Use a detail overlay for the details of a record, structured evidence such as a sync log, or settings that belong to an item on the page.
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
A short confirmation, such as "Delete this store?", is a dialog, not a detail overlay. Keep it at its normal size, however wide the detail overlays in the product are.
|
|
14
|
+
|
|
15
|
+
## Widths
|
|
16
|
+
|
|
17
|
+
| Width | Token | Size |
|
|
17
18
|
| --- | --- | --- |
|
|
18
|
-
| Default
|
|
19
|
-
| Wide
|
|
20
|
-
| Mobile
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Use `--bh-layout-overlay-*` CSS variables in styles, or resolved `tokens.light['layout.overlay.default']`
|
|
37
|
-
when an overlay API expects a CSS length string. Numeric app-frame/page APIs convert source
|
|
38
|
-
`rem` dimensions at their framework boundary. Do not copy these values into a consumer token file.
|
|
39
|
-
The explicit pixel CSS package variant preserves nominal sizes during root-unit migration, not
|
|
40
|
-
an exception from font scaling or responsive behavior.
|
|
41
|
-
|
|
42
|
-
Header/sidebar and page-cap roles are also source tokens: `layout.header.height`,
|
|
43
|
-
`layout.sidebar.expanded`, `layout.sidebar.collapsed`, `layout.page.narrow`, `layout.page.wide`
|
|
44
|
-
and `layout.page.margin.*`. Their detailed semantics remain in [App frame](/foundations/styles/layout/app-frame/)
|
|
45
|
-
and [Page widths](/foundations/styles/layout/page-widths/). Do not use a page cap as a viewport breakpoint.
|
|
19
|
+
| Default | `layout.overlay.default` | From 1024 px: half the window, and at least 900 px |
|
|
20
|
+
| Wide | `layout.overlay.wide` | From 1024 px: 70% of the window |
|
|
21
|
+
| Mobile | `layout.overlay.mobile` | Below 1024 px: the whole window |
|
|
22
|
+
|
|
23
|
+
- **Choose the wide width for the content, not for the product.** A long log or a table with many columns may need it; most drawers do not.
|
|
24
|
+
- **Below 1024 px the overlay fills the window**, so it never makes the page scroll sideways.
|
|
25
|
+
- **The important parts stay in view:** the title, the close or back button, the main action and any error message. Long tables and code scroll inside their own area; text and form labels wrap.
|
|
26
|
+
- **Width is only part of the job.** Focus moves into the overlay when it opens and back to what opened it when it closes, the overlay has a name for screen readers, and its action bar stays visible. See [Keyboard and focus](/foundations/guidelines/accessibility/keyboard-and-focus/#moving-focus).
|
|
27
|
+
|
|
28
|
+
## Labels and values
|
|
29
|
+
|
|
30
|
+
Details are often shown as a list of labels with their values beside them. On wide screens, give the label column at least `layout.description.minimum`. When the overlay is narrower than that, put each label above its value instead.
|
|
31
|
+
|
|
32
|
+
## In code
|
|
33
|
+
|
|
34
|
+
Use the CSS variables `--bh-layout-overlay-default`, `--bh-layout-overlay-wide` and `--bh-layout-overlay-mobile`, or the values in `tokens.light` when a component expects a length. Never copy the numbers into your own files.
|
|
35
|
+
|
|
36
|
+
Page widths cap how wide content grows; they are not breakpoints. The window widths where layouts change are in [Breakpoints](/foundations/styles/layout/breakpoints/). The header and side navigation sizes are in [App frame](/foundations/styles/layout/app-frame/), and the page widths in [Page widths](/foundations/styles/layout/page-widths/).
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Page widths
|
|
3
|
-
description:
|
|
3
|
+
description: Give each page full, wide or narrow content by what it holds, so tables get room and text stays easy to read.
|
|
4
4
|
order: 2
|
|
5
5
|
---
|
|
6
6
|
import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
7
7
|
|
|
8
|
+
A table of orders needs all the room it can get; a settings form reads better in a narrow column. Each page takes the width that suits what it holds.
|
|
9
|
+
|
|
8
10
|
**Pick one of three widths for each page, by what the page holds.**
|
|
9
11
|
|
|
10
12
|
<LayoutDemo kind="widths" />
|
|
@@ -15,9 +17,7 @@ import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
|
15
17
|
| Wide | 1280 px | Dashboards, detail pages, settings overviews, standard pages |
|
|
16
18
|
| Narrow | 768 px | Forms, settings forms, wizard steps, help and documentation pages |
|
|
17
19
|
|
|
18
|
-
Wide and Narrow
|
|
19
|
-
The responsive margins use `layout.page.margin.small`, `.medium` and `.large`.
|
|
20
|
-
Full has no maximum-width cap; do not replace it with an arbitrarily large numeric token.
|
|
20
|
+
In code, Wide and Narrow are `layout.page.wide` and `layout.page.narrow`, and the page margins are `layout.page.margin.small`, `.medium` and `.large`. Full has no maximum, so it has no token: don't stand in a large number for it.
|
|
21
21
|
|
|
22
22
|
- **Full.** Tables and logs show more columns and rows when they use the whole window.
|
|
23
23
|
- **Wide.** Cards and panels stay at a size people can scan on a large monitor.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Downloads and terms
|
|
3
|
-
description: Every logo file,
|
|
3
|
+
description: Every logo file, the colour codes and the typeface, and the terms for using the Beehexa trademark.
|
|
4
4
|
order: 5
|
|
5
5
|
audience: designers, developers, partners, press
|
|
6
6
|
owner: Brand
|
|
@@ -35,13 +35,13 @@ import LogoHero from '../../../../components/logos/LogoHero.astro';
|
|
|
35
35
|
|
|
36
36
|
## Colour codes
|
|
37
37
|
|
|
38
|
-
| Colour | HEX | RGB |
|
|
39
|
-
|
|
40
|
-
| Yellow | #FCB017 | 252 176 23 |
|
|
41
|
-
| Graphite | #2B2A28 | 43 42 40 |
|
|
42
|
-
| White | #FFFFFF | 255 255 255 |
|
|
38
|
+
| Colour | HEX | RGB |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| Yellow | #FCB017 | 252 176 23 |
|
|
41
|
+
| Graphite | #2B2A28 | 43 42 40 |
|
|
42
|
+
| White | #FFFFFF | 255 255 255 |
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
For print, start the yellow from PMS 1235 C, the value in the 2025 brand guide, and approve a printed proof before the full run: this yellow often prints dull in CMYK on uncoated paper. On white paper, the white version is the paper itself.
|
|
45
45
|
|
|
46
46
|
## Typeface
|
|
47
47
|
|