@beehexa/design-rules 2611.5.5 → 2611.6.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/catalog.json +908 -208
- package/dist/docs/public/_redirects +2 -2
- package/dist/docs/scripts/color-pairs.mjs +4 -0
- package/dist/docs/src/components/ChildPages.astro +8 -1
- package/dist/docs/src/components/ColorDemo.astro +12 -9
- package/dist/docs/src/components/DocsFooter.astro +1 -1
- 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 +165 -40
- 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 +24 -36
- package/dist/docs/src/components/SiteHeader.astro +1 -1
- package/dist/docs/src/components/SpacingDemo.astro +2 -0
- 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/button/accessibility.mdx +3 -3
- package/dist/docs/src/content/components/button/changelog.mdx +1 -1
- package/dist/docs/src/content/components/button/examples.mdx +10 -23
- package/dist/docs/src/content/components/button/meta.json +5 -1
- package/dist/docs/src/content/components/button/usage.mdx +13 -26
- 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/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/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/accessibility.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 +5 -6
- package/dist/docs/src/content/foundations/styles/color/accessibility.mdx +31 -7
- package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +66 -6
- package/dist/docs/src/content/foundations/styles/color/palette.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/color/usage.mdx +5 -5
- package/dist/docs/src/content/foundations/styles/data-visualization.mdx +33 -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 +40 -14
- 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 +2 -0
- package/dist/docs/src/content/foundations/styles/radius.mdx +38 -27
- 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 +56 -7
- package/dist/docs/src/content-vi/components/button/accessibility.mdx +51 -0
- package/dist/docs/src/content-vi/components/button/changelog.mdx +6 -0
- package/dist/docs/src/content-vi/components/button/examples.mdx +27 -0
- package/dist/docs/src/content-vi/components/button/usage.mdx +31 -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/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/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/accessibility.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 +5 -5
- package/dist/docs/src/content-vi/foundations/styles/color/accessibility.mdx +30 -7
- 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 +2 -2
- package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +5 -5
- package/dist/docs/src/content-vi/foundations/styles/data-visualization.mdx +31 -1
- package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +1 -1
- 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 +0 -3
- package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +54 -12
- 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 +3 -3
- package/dist/docs/src/content-vi/foundations/styles/motion.mdx +2 -0
- package/dist/docs/src/content-vi/foundations/styles/radius.mdx +38 -27
- 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 +189 -0
- package/dist/docs/src/content.config.ts +12 -1
- package/dist/docs/src/lib/dates.ts +8 -0
- package/dist/docs/src/lib/i18n.ts +1 -0
- package/dist/docs/src/lib/navigation.ts +6 -4
- package/dist/docs/src/lib/token-descriptions-vi.ts +247 -11
- package/dist/docs/src/lib/tokens.ts +3 -0
- package/dist/docs/src/styles/chrome.css +8 -8
- package/dist/docs/src/styles/color.css +31 -31
- package/dist/docs/src/styles/docs.css +55 -40
- package/dist/docs/src/styles/elevation.css +1 -1
- package/dist/docs/src/styles/global.css +13 -4
- package/dist/docs/src/styles/icons.css +16 -16
- package/dist/docs/src/styles/kit.css +29 -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/rules.css +24 -0
- package/dist/docs/src/styles/shapes.css +2 -2
- package/dist/docs/src/styles/tokens.css +228 -147
- package/dist/docs/src/styles/tokens.js +88 -62
- package/dist/docs/src/styles/typography.css +9 -9
- package/dist/docs/src/styles/zindex.css +6 -5
- package/dist/docs/tokens/color.json +24 -14
- 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 +11 -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 +314 -59
- 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 +908 -208
- package/package.json +1 -1
- package/dist/docs/src/brand/structure-proposal.md +0 -227
- package/dist/docs/src/content/components/button/code.mdx +0 -34
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Style and grammar
|
|
3
|
+
description: "Small rules, applied the same way everywhere, make a product feel finished. Capitals, buttons, labels, punctuation and links."
|
|
4
|
+
order: 2
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
A screen where one button says "Save Changes" and the next says "Save changes" looks careless, even if nobody can say why. These rules remove those small differences, so people notice the work, not the words.
|
|
8
|
+
|
|
9
|
+
**Write in sentence case, start buttons with a verb, and end only full sentences with a full stop.**
|
|
10
|
+
|
|
11
|
+
## Capitals
|
|
12
|
+
|
|
13
|
+
Use sentence case everywhere: capitalise only the first word and proper nouns. This applies to buttons, labels, headings, menu items, tabs and page titles, in both languages.
|
|
14
|
+
|
|
15
|
+
| Do | Don't |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| Save changes | Save Changes |
|
|
18
|
+
| Sync orders to the ERP | Sync Orders To The ERP |
|
|
19
|
+
| Lưu thay đổi | Lưu Thay Đổi |
|
|
20
|
+
|
|
21
|
+
Sentence case is easier to read, works the same way in English and Vietnamese, and is what most large design systems use.
|
|
22
|
+
|
|
23
|
+
- **Proper nouns and abbreviations keep their capitals:** Beehexa, HexaSync, ERP, CRM.
|
|
24
|
+
- **Don't capitalise features or common things:** "workflow", "connector", "dashboard", not "Workflow" in the middle of a sentence.
|
|
25
|
+
- **Don't write in all capitals.** It is slower to read, and in Vietnamese the marks crowd the line above. Abbreviations such as API, CSV and SKU are the exception.
|
|
26
|
+
|
|
27
|
+
## Buttons and links
|
|
28
|
+
|
|
29
|
+
- **Start with a verb** and say what will happen: "Sync orders", "Connect store", "Download CSV".
|
|
30
|
+
- **Keep it short:** one to three words. In Vietnamese, two to four.
|
|
31
|
+
- **Leave out "a", "an" and "the":** "Create workflow", not "Create a workflow".
|
|
32
|
+
- **Use the same verb from start to finish.** If the button says "Delete workflow", the confirmation button says "Delete", not "OK" or "Yes".
|
|
33
|
+
- **Name the link by where it goes:** "View sync history", not "Click here" or "Learn more" on its own. A link must make sense from its text (WCAG 2.4.4).
|
|
34
|
+
- **Say "select", not "click"**, because people use touch, keyboards and screen readers too.
|
|
35
|
+
|
|
36
|
+
## Labels and help text
|
|
37
|
+
|
|
38
|
+
- **Labels are nouns,** with no colon at the end: "Store name", "Sync schedule".
|
|
39
|
+
- **Help text under a field is a full sentence** with a full stop: "Orders older than this date are not synced."
|
|
40
|
+
- **Placeholders are not labels.** They disappear when people type. Put anything people need to keep in the label or the help text (WCAG 3.3.2).
|
|
41
|
+
- **Labels and headings say what the field or section is about** (WCAG 2.4.6).
|
|
42
|
+
|
|
43
|
+
## Punctuation
|
|
44
|
+
|
|
45
|
+
| Mark | Rule |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Full stop | End full sentences in messages and help text. Leave it off buttons, labels, headings, menu items and single-sentence tooltips. |
|
|
48
|
+
| Exclamation mark | Don't use it. Calm text is easier to trust. |
|
|
49
|
+
| Question mark | Use it for real questions, such as a confirmation title: "Delete this workflow?" |
|
|
50
|
+
| Colon | Use it before a list or a value in running text. Not at the end of a label. |
|
|
51
|
+
| Quotation marks | Use them to quote the name of something the person typed: Workflow "Daily orders" was saved. |
|
|
52
|
+
| Ampersand (&) | Don't use it in place of "and", unless it is part of a name. |
|
|
53
|
+
| Ellipsis (…) | Use it only to show text has been cut off, or that something is still in progress: "Syncing…" |
|
|
54
|
+
| Slash and > | Don't use them for paths or choices. Write "Go to Settings, then Connectors". Screen readers read > as "greater than". |
|
|
55
|
+
| Abbreviations | Don't write e.g., i.e. or etc. Write "for example" or "such as". |
|
|
56
|
+
|
|
57
|
+
## Grammar
|
|
58
|
+
|
|
59
|
+
- **Use the active voice:** "The ERP rejected the request", not "The request was rejected".
|
|
60
|
+
- **Use contractions in English,** such as "can't" and "don't". They sound natural and are easier to read.
|
|
61
|
+
- **Keep sentences short:** one idea per sentence, about 20 words at most.
|
|
62
|
+
- **Put the most important words first.** People scan the start of a line.
|
|
63
|
+
- **Keep lists short and parallel:** six items or fewer, each starting the same way. End an item with a full stop only if it is a full sentence.
|
|
64
|
+
- **Don't cut text off.** Shorten it or let it wrap. If it has to be cut, such as a long store name, show the full text in a tooltip.
|
|
65
|
+
- **Vietnamese:** write complete words with all their marks, never unaccented text. Don't mix English and Vietnamese in one sentence; use the word from [Terms](/foundations/guidelines/content/terms/).
|
|
66
|
+
|
|
67
|
+
## Writing in two languages
|
|
68
|
+
|
|
69
|
+
**Write the Vietnamese text as Vietnamese, not as a word-for-word copy of the English.** Most style mistakes come from translation: from a machine, or from following the English word order.
|
|
70
|
+
|
|
71
|
+
| English | Don't write | Write | Why |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| Orders synced | Các đơn hàng đã được đồng bộ thành công | Đã đồng bộ đơn hàng | Active, past tense, no "thành công" |
|
|
74
|
+
| You don't have access to this store | Quý khách không có quyền truy cập vào cửa hàng này | Bạn chưa có quyền vào cửa hàng này | "Bạn", and the word from [Terms](/foundations/guidelines/content/terms/) |
|
|
75
|
+
| Click Save | Click vào nút Lưu | Chọn Lưu | No "click", no mixed languages |
|
|
76
|
+
| Sync Orders From Store | Đồng Bộ Đơn Hàng Từ Cửa Hàng | Đồng bộ đơn hàng từ cửa hàng | Sentence case in both languages |
|
|
77
|
+
|
|
78
|
+
- **Read the Vietnamese aloud.** If it sounds like a translation, rewrite it.
|
|
79
|
+
- **Leave room.** Vietnamese is often longer than English. Let text wrap instead of shortening it until the meaning goes.
|
|
80
|
+
|
|
81
|
+
### Strings with values
|
|
82
|
+
|
|
83
|
+
- **Keep a sentence in one string,** with its values inside: `Synced {count} orders from {store}`. Don't join pieces of sentences in code; the word order differs between languages.
|
|
84
|
+
- **Write the plural forms English needs.** Vietnamese has one form for every count: `{count} đơn hàng`. English has two: `1 order`, `2 orders`. Use the plural format of your translation library, such as `{count, plural, one {# order} other {# orders}}`.
|
|
85
|
+
- **Format numbers, dates and money before they go in,** as on [Numbers, dates and currency](/foundations/guidelines/content/numbers-dates-and-currency/).
|
|
86
|
+
- **Don't build a word from parts,** such as an "s" added in code.
|
|
87
|
+
|
|
88
|
+
## Related
|
|
89
|
+
|
|
90
|
+
- [Voice and tone](/foundations/guidelines/content/voice-and-tone/): how Beehexa sounds.
|
|
91
|
+
- [Numbers, dates and currency](/foundations/guidelines/content/numbers-dates-and-currency/): how to write amounts and dates.
|
|
92
|
+
- [Typography usage](/foundations/styles/typography/usage/): text styles and long text.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Terms
|
|
3
|
+
description: "One thing, one name, in both languages. The words Beehexa products use for each thing, in English and Vietnamese."
|
|
4
|
+
order: 5
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
If one screen says "connector", the next says "integration" and the help page says "app", people wonder whether these are three different things. A shared word list ends that question, and lets the English and Vietnamese products say exactly the same thing.
|
|
8
|
+
|
|
9
|
+
**Use the word in this list. Translate every term into Vietnamese; keep only names of products and companies in English.**
|
|
10
|
+
|
|
11
|
+
## Product names
|
|
12
|
+
|
|
13
|
+
Product and company names are never translated and keep their own capitals: Beehexa, HexaSync. In examples, name the kind of system instead of a real product: the online store, the ERP, the CRM.
|
|
14
|
+
|
|
15
|
+
## Word list
|
|
16
|
+
|
|
17
|
+
| English | Vietnamese | Notes |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| sync | đồng bộ | Verb and noun: "Sync orders", "Đồng bộ đơn hàng" |
|
|
20
|
+
| connector | trình kết nối | The part of HexaSync that talks to one system, such as the ERP connector |
|
|
21
|
+
| integration | tích hợp | Two or more systems working together through HexaSync |
|
|
22
|
+
| workflow | quy trình | A set of steps that runs on a schedule or a trigger |
|
|
23
|
+
| mapping | ánh xạ | How a field in one system matches a field in another |
|
|
24
|
+
| field | trường | |
|
|
25
|
+
| log | nhật ký | |
|
|
26
|
+
| dashboard | bảng điều khiển | |
|
|
27
|
+
| settings | cài đặt | |
|
|
28
|
+
| account | tài khoản | |
|
|
29
|
+
| store | cửa hàng | |
|
|
30
|
+
| order | đơn hàng | |
|
|
31
|
+
| product | sản phẩm | |
|
|
32
|
+
| customer | khách hàng | |
|
|
33
|
+
| inventory | tồn kho | |
|
|
34
|
+
| invoice | hóa đơn | |
|
|
35
|
+
| schedule | lịch chạy | |
|
|
36
|
+
| connect, disconnect | kết nối, ngắt kết nối | |
|
|
37
|
+
| retry | thử lại | |
|
|
38
|
+
| sign in, sign out | đăng nhập, đăng xuất | Not "log in" or "login" |
|
|
39
|
+
|
|
40
|
+
## Words to avoid
|
|
41
|
+
|
|
42
|
+
| Avoid | Use instead | Why |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| click, tap | select | People use a mouse, touch, a keyboard or a screen reader |
|
|
45
|
+
| user, người dùng, quý khách | you, bạn | Speak to the person directly |
|
|
46
|
+
| successfully | the past tense: "saved" | The past tense already says it worked |
|
|
47
|
+
| abort, kill, execute | cancel, stop, run | Plain words, without violence |
|
|
48
|
+
| whitelist, blacklist | allowlist, blocklist | Clearer, and doesn't tie colour to good or bad |
|
|
49
|
+
|
|
50
|
+
## Adding a term
|
|
51
|
+
|
|
52
|
+
When a new feature needs a name, check this list first. If nothing fits, agree the English and Vietnamese words with the design system team before the feature ships, then add them here.
|
|
53
|
+
|
|
54
|
+
## Related
|
|
55
|
+
|
|
56
|
+
- [Style and grammar](/foundations/guidelines/content/style-and-grammar/): capitals and proper nouns.
|
|
57
|
+
- [Voice and tone](/foundations/guidelines/content/voice-and-tone/): talking to people.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Voice and tone
|
|
3
|
+
description: "Beehexa always sounds clear, direct and calm. The tone changes with the moment: brief when things go well, careful when they go wrong."
|
|
4
|
+
order: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Think of a colleague who knows the systems well. When the sync works, they don't make a fuss. When it breaks, they tell you exactly what broke and how to fix it, without blame. That colleague is the Beehexa voice.
|
|
8
|
+
|
|
9
|
+
**Our voice stays the same everywhere. Our tone adapts to how the person feels at that moment.**
|
|
10
|
+
|
|
11
|
+
## Voice
|
|
12
|
+
|
|
13
|
+
| We are | So we | We are not |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| Clear | Use plain words and one idea per sentence | Vague or full of jargon |
|
|
16
|
+
| Direct | Lead with the outcome and the next step | Wordy or roundabout |
|
|
17
|
+
| Calm | State facts, even in an error | Alarming, cheerful about problems or overly casual |
|
|
18
|
+
| Helpful | Tell people what they can do now | Only describe what the system did |
|
|
19
|
+
|
|
20
|
+
## Tone by moment
|
|
21
|
+
|
|
22
|
+
| Moment | How people feel | Tone | Example |
|
|
23
|
+
| --- | --- | --- | --- |
|
|
24
|
+
| First use | Curious, unsure | Welcoming and practical | "Connect your first store to start syncing orders." |
|
|
25
|
+
| Success | Satisfied, busy | Brief, in the past tense | "24 orders synced." |
|
|
26
|
+
| Error | Worried, under pressure | Calm, specific, no blame | "Couldn't sync 3 orders. The online store rejected the request because the access has expired. Reconnect the store to try again." |
|
|
27
|
+
| Destructive action | Careful | Serious and precise | "Delete this workflow? Its schedule and history are deleted too. You can't undo this." |
|
|
28
|
+
| Waiting | Impatient | Honest about time | "Syncing 1,200 products. This can take a few minutes." |
|
|
29
|
+
|
|
30
|
+
## Talking to people
|
|
31
|
+
|
|
32
|
+
- **Call the person "you".** In Vietnamese, use "bạn". Don't write "the user", "người dùng" or "quý khách" in the product.
|
|
33
|
+
- **Use "we" only for Beehexa itself**, such as "We'll email you when the import finishes." Most messages need neither "you" nor "we".
|
|
34
|
+
- **Don't say "please" in every message.** Keep it for when you ask people to do something extra for us, such as waiting.
|
|
35
|
+
- **Don't apologise for every error.** Say sorry only when Beehexa caused the problem and it costs the person time.
|
|
36
|
+
|
|
37
|
+
## Do and don't
|
|
38
|
+
|
|
39
|
+
| Do | Don't |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| "Couldn't connect to the ERP. Check your internet connection and try again." | "Oops! Something went wrong 😕" |
|
|
42
|
+
| "Workflow saved." | "Awesome! Your workflow has been saved successfully!" |
|
|
43
|
+
| "You don't have permission to edit this workflow. Ask an admin for access." | "Error 403: Forbidden." |
|
|
44
|
+
|
|
45
|
+
## Related
|
|
46
|
+
|
|
47
|
+
- [Messages](/foundations/guidelines/content/messages/): how to write each kind of message.
|
|
48
|
+
- [Style and grammar](/foundations/guidelines/content/style-and-grammar/): capitals, buttons and punctuation.
|
|
@@ -4,31 +4,36 @@ description: Words are most of the interface. Write product copy that is clear,
|
|
|
4
4
|
order: 2
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
People don't read an interface; they scan it for the next thing to do. Every label, message and empty state either helps them do it or slows them down.
|
|
7
|
+
People don't read an interface; they scan it for the next thing to do. Every label, message and empty state either helps them do it or slows them down. A sync that fails at night is fixed faster when the message says which orders failed and what to do next.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Write so a busy person can act after one read.**
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Principles
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- **Clear first.** Use everyday words and short sentences. Many people read Beehexa products in their second language.
|
|
14
|
+
- **Say what to do.** Lead with the outcome or the next action, not with how the system works.
|
|
15
|
+
- **Same word, same thing.** Once a thing has a name, use that name everywhere, in both languages. See [Terms](/foundations/guidelines/content/terms/).
|
|
16
|
+
- **Calm and honest.** Say what happened, even when it is our fault. Don't hide a problem behind a cheerful word.
|
|
17
|
+
- **Words carry the meaning.** Colour and icons support the words; they never replace them.
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
- Start buttons with a verb: "Save", "Sync orders", "Delete integration".
|
|
17
|
-
- Keep one name for one thing across the product.
|
|
18
|
-
- Use numerals for numbers: "3 orders failed".
|
|
19
|
-
- Avoid jargon unless your readers use it.
|
|
20
|
-
- Write plainly: short sentences, everyday words, one idea at a time. Many people read the product in their second language.
|
|
21
|
-
- Write every status in words. Colour and icons support the words; they never replace them.
|
|
19
|
+
## In this section
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
- [Voice and tone](/foundations/guidelines/content/voice-and-tone/): how Beehexa sounds, and how the tone changes when things go well or wrong.
|
|
22
|
+
- [Style and grammar](/foundations/guidelines/content/style-and-grammar/): capitals, buttons, labels, punctuation and links.
|
|
23
|
+
- [Numbers, dates and currency](/foundations/guidelines/content/numbers-dates-and-currency/): how to write amounts, dates and times in English and Vietnamese.
|
|
24
|
+
- [Messages](/foundations/guidelines/content/messages/): errors, warnings, success messages, empty states and confirmations.
|
|
25
|
+
- [Terms](/foundations/guidelines/content/terms/): the words we use for each thing, in English and Vietnamese.
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
## Standards behind these rules
|
|
28
|
+
|
|
29
|
+
| Standard | What it covers here |
|
|
26
30
|
| --- | --- |
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
31
|
+
| [ISO 24495-1:2023](https://www.iso.org/standard/78907.html), plain language | Write so people can find, understand and use what they need |
|
|
32
|
+
| [WCAG 2.2](https://www.w3.org/TR/WCAG22/) | Headings and labels (2.4.6), link text (2.4.4), labels and instructions (3.3.2), error messages (3.3.1, 3.3.3) |
|
|
33
|
+
| Nghị định 123/2020/NĐ-CP | How numbers and amounts in đồng are written on Vietnamese invoices |
|
|
34
|
+
| [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) | Currency codes such as VND and USD, and the decimals of each currency |
|
|
30
35
|
|
|
31
36
|
## Related
|
|
32
37
|
|
|
33
38
|
- [Accessibility](/foundations/guidelines/accessibility/): names for controls, alt text and plain language.
|
|
34
|
-
- [Typography usage](/foundations/styles/typography/usage/): text styles
|
|
39
|
+
- [Typography usage](/foundations/styles/typography/usage/): text styles and long text.
|
|
@@ -11,11 +11,10 @@ Borders draw the edges people rely on: where a field starts, where one card ends
|
|
|
11
11
|
**Most borders are 1 px. Thicker lines mean something: selected, focused, or a status to notice.**
|
|
12
12
|
|
|
13
13
|
Border colours are colour tokens: `color.border` for dividers and cards, `color.border.bold` for the edges of inputs, checkboxes and selects. See [Tokens](/foundations/styles/color/tokens/#borders).
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
frame. Cards and callouts use `radius.100` (8 px).
|
|
14
|
+
`color.border.bold` resolves to graphite 10 in light and graphite 9 in dark;
|
|
15
|
+
do not replace it with a universal palette step. Check meaningful boundaries
|
|
16
|
+
against every adjacent effective state background, including pressed neutral fills,
|
|
17
|
+
using the [Source contrast requirements](/foundations/styles/color/accessibility/).
|
|
19
18
|
|
|
20
19
|
## The widths
|
|
21
20
|
|
|
@@ -92,5 +91,5 @@ Don't show a state with colour alone. Selected and focused also change the width
|
|
|
92
91
|
|
|
93
92
|
## Related
|
|
94
93
|
|
|
95
|
-
- [Radius](/foundations/styles/radius/): corner
|
|
94
|
+
- [Radius](/foundations/styles/radius/): corner radius steps and the nesting rule.
|
|
96
95
|
- [Interaction states](/foundations/styles/interaction-states/): hover, pressed, selected and disabled.
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Accessibility
|
|
3
|
-
description:
|
|
3
|
+
description: Required colour pairings and rendered-state contrast checks for readable light and dark interfaces.
|
|
4
4
|
order: 6
|
|
5
5
|
---
|
|
6
6
|
import ColorDemo from '../../../../components/ColorDemo.astro';
|
|
7
7
|
|
|
8
8
|
People read Beehexa screens on bright monitors, dim laptops and phones in the sun. Contrast keeps the text readable on all of them.
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
**These are required pairing rules, not a claim that every consuming screen has been audited.** Verify the rendered light and dark surfaces and interaction states.
|
|
11
11
|
|
|
12
12
|
## Contrast
|
|
13
13
|
|
|
14
14
|
| What | Minimum | WCAG 2.2 |
|
|
15
15
|
|---|---|---|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
16
|
+
| Normal text, including labels and status tags | 4.5:1 | 1.4.3 |
|
|
17
|
+
| Large text (at least 24 CSS px, or 18.66 CSS px bold) | 3:1 | 1.4.3 |
|
|
18
|
+
| Meaningful icons, control boundaries and focus indicators | 3:1 against adjacent colours | 1.4.11 |
|
|
19
|
+
| Truly inactive controls and logos | WCAG exceptions apply; read-only business data is not inactive UI | 1.4.3 / 1.4.11 |
|
|
19
20
|
|
|
20
21
|
<ColorDemo kind="contrast" />
|
|
21
22
|
|
|
@@ -23,7 +24,7 @@ Colour is never the only signal (WCAG 1.4.1): statuses are written in words, sel
|
|
|
23
24
|
|
|
24
25
|
## Pairing
|
|
25
26
|
|
|
26
|
-
**
|
|
27
|
+
**Use the Source-paired text, icon, border and background roles.** Measure the effective rendered background, including transparent ancestors, overlays and composites, not a palette swatch alone. Apply the text minimum at rest, hover, pressed and selected states, including selected-hover. A meaningful boundary must remain distinguishable from its adjacent surfaces.
|
|
27
28
|
|
|
28
29
|
<ColorDemo kind="pairing" />
|
|
29
30
|
|
|
@@ -31,4 +32,27 @@ Colour is never the only signal (WCAG 1.4.1): statuses are written in words, sel
|
|
|
31
32
|
|
|
32
33
|
## Checked automatically
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
Token checks cover declared pairs, not every layout, composite or consumer state. Release review must also exercise the actual UI in both themes, with keyboard and pointer, and record any untested surfaces rather than claiming full compliance.
|
|
36
|
+
|
|
37
|
+
## Business data and status labels
|
|
38
|
+
|
|
39
|
+
Read-only identifiers, dependency names, titles and status values are content, not disabled controls. Use `color.text` for primary identity and status text; use `color.text.subtle` intentionally for secondary information only when its effective pair meets the text minimum. Never use `color.text.disabled`, opacity or muted placeholder styling to express read-only data.
|
|
40
|
+
|
|
41
|
+
Status tags retain words and semantic meaning. Use the paired semantic text/fill roles for success, information, warning and danger; ordinary category labels use neutral pairs. Do not put inverse text on a subtle fill or replace status text with a coloured dot alone. These requirements apply to every tag/label, not just a single status component.
|
|
42
|
+
|
|
43
|
+
## Links
|
|
44
|
+
|
|
45
|
+
Links use `color.link` and `color.link.hover`, with noticeable token-based hover feedback and the Source keyboard focus ring. Do not restyle navigation or content links as subtle metadata. Anchors, Ant typography links, link Buttons and prose links have **no underline by default**, including on hover. The only underline opt-in is `.bh-link-underline`; use it explicitly when prose needs an additional link distinction. Provide a non-colour distinction appropriate to the context; do not rely on colour alone.
|
|
46
|
+
|
|
47
|
+
Ordinary documentation prose and the public `.bh-markdown` document recipe use
|
|
48
|
+
Source semibold link text as their persistent non-colour cue while keeping
|
|
49
|
+
underlines off. If surrounding text is already semibold, explicitly opt that
|
|
50
|
+
authored link into `.bh-link-underline` or provide another persistent cue.
|
|
51
|
+
This document treatment does not change navigation or native link Buttons.
|
|
52
|
+
|
|
53
|
+
## Primary references
|
|
54
|
+
|
|
55
|
+
- [WCAG Understanding Contrast (Minimum)](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html)
|
|
56
|
+
- [WCAG Understanding Non-text Contrast](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html)
|
|
57
|
+
- [WCAG Understanding Use of Color](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html)
|
|
58
|
+
- [WCAG Understanding Focus Visible](https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html)
|
|
@@ -13,10 +13,70 @@ Many people switch to dark mode at night, and some prefer it all day. Supporting
|
|
|
13
13
|
|
|
14
14
|
Every colour token has a light and a dark value under the same name. The theme picks the value; your code and designs name the token once. The dark values of every palette step are on [Palette](/foundations/styles/color/palette/), and every role token's are on [Tokens](/foundations/styles/color/tokens/).
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Turn it on in code
|
|
17
|
+
|
|
18
|
+
**Follow the reader's system setting, let them change it, and remember their choice.**
|
|
19
|
+
|
|
20
|
+
The token CSS (`@beehexa/design-tokens/css`) already holds both themes. It picks the dark values in two cases:
|
|
21
|
+
|
|
22
|
+
| Case | What decides the theme |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `data-theme="dark"` on `<html>` | Your product: the reader chose dark |
|
|
25
|
+
| No `data-theme`, and the system is dark | The reader's system setting (`prefers-color-scheme: dark`) |
|
|
26
|
+
|
|
27
|
+
`data-theme="light"` keeps the light values even when the system is dark.
|
|
28
|
+
|
|
29
|
+
Set the theme before the page draws, in a small script in `<head>`, so the page doesn't flash light first:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<script>
|
|
33
|
+
let theme = localStorage.getItem('bh-theme');
|
|
34
|
+
if (theme !== 'light' && theme !== 'dark') {
|
|
35
|
+
theme = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
36
|
+
}
|
|
37
|
+
document.documentElement.dataset.theme = theme;
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- Set `color-scheme` to match (`color-scheme: dark` under `[data-theme='dark']`), so scrollbars, form controls and the browser's own UI follow the theme.
|
|
42
|
+
- Put the theme switch in the header. Save the choice only when the reader picks one; until then, follow the system.
|
|
43
|
+
- A part that must keep one theme whatever the page uses, such as a fixed preview, takes the class `bh-scope-light` or `bh-scope-dark`.
|
|
44
|
+
- Charts, code editors and anything else that needs colour values instead of CSS variables must redraw when the theme changes.
|
|
45
|
+
|
|
46
|
+
## Surfaces and shadows
|
|
47
|
+
|
|
48
|
+
**In light, shadows separate the levels. In dark, the background gets lighter as the surface rises, and the shadow gets stronger.**
|
|
49
|
+
|
|
50
|
+
| Level | Light | Dark |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| Page (`color.surface.page`) | White | Graphite 1, the darkest |
|
|
53
|
+
| Card (`color.surface`), `elevation.shadow.raised` | White, faint graphite shadow | Graphite 2, black shadow at 40% and 30% |
|
|
54
|
+
| Menu, popover, dialog (`color.surface.overlay`), `elevation.shadow.overlay` and `.modal` | White, graphite shadow at 15% | Graphite 3, black shadow at 50% |
|
|
55
|
+
|
|
56
|
+
Dark mode adds no border to show a level. Rows in menus and popovers use the overlay state colours, such as `color.surface.overlay.hover`. See [Elevation](/foundations/styles/elevation/#dark-mode).
|
|
57
|
+
|
|
58
|
+
## Colours that change more
|
|
59
|
+
|
|
60
|
+
- The primary button turns light with dark text. That is intended, not a reason to make it blue.
|
|
61
|
+
- Solid status fills get brighter, with dark text on them (`color.text.on-bold`).
|
|
62
|
+
- Hover and pressed fills get lighter instead of darker. The state tokens already do this; see [Interaction states](/foundations/styles/interaction-states/#dark-mode).
|
|
63
|
+
|
|
64
|
+
## Images and logos
|
|
65
|
+
|
|
66
|
+
- Logos use their dark-background versions: the wordmark turns white, the yellow mark stays. See [Logos](/foundations/styles/logos/).
|
|
67
|
+
- Give screenshots and illustrations a version for each theme. If an image has only a light version, put it on a light frame (`bh-scope-light`) instead of on the dark page.
|
|
68
|
+
- Don't invert images or change them with CSS filters. Colours shift and brand colours break.
|
|
69
|
+
- An image of something turned off fades the same way in both themes (`opacity.disabled`); see [Opacity](/foundations/styles/opacity/).
|
|
70
|
+
|
|
71
|
+
## Check before release
|
|
72
|
+
|
|
73
|
+
- Every screen in both themes, including empty, loading and error states.
|
|
74
|
+
- No colour written by hand and none picked by theme in code. Every colour is a token.
|
|
75
|
+
- Text, icons and borders pass contrast in both themes. The token pairs are checked already; check anything you place on an image.
|
|
76
|
+
- The focus ring is visible on every surface.
|
|
77
|
+
- Menus, popovers and dialogs stand out from the card under them.
|
|
78
|
+
- Charts read in both themes, and no series disappears into the background.
|
|
79
|
+
- Logos, screenshots and illustrations have their dark versions or sit on a light frame.
|
|
80
|
+
- Scrollbars and form controls follow the theme (`color-scheme`).
|
|
81
|
+
- The theme switch works with the keyboard, and the choice is remembered after reload.
|
|
17
82
|
|
|
18
|
-
- Never write a dark colour of your own or pick colours by theme in code.
|
|
19
|
-
- Surfaces get lighter as they rise: page darkest, cards one step lighter.
|
|
20
|
-
- The primary button turns light, and the solid status fills get brighter with dark text on them.
|
|
21
|
-
- Check every screen in both themes before release.
|
|
22
|
-
- Logos use their dark-background versions (see [Logos](/foundations/styles/logos/)).
|
|
@@ -36,7 +36,7 @@ There is no purple, pink or teal. Charts use the same scales. Before giving a ch
|
|
|
36
36
|
- **Steps 9–10:** solid fills, such as a button, and their hover.
|
|
37
37
|
- **Steps 11–12:** text and icons. 11 is secondary, 12 is the default.
|
|
38
38
|
|
|
39
|
-
Graphite
|
|
39
|
+
Graphite supplies neutral roles, but a role need not use the same step in both themes. `color.text` uses step 12 and `color.text.subtle` step 11. `color.text.subtlest` uses step 11 in light and step 10 in dark; `color.border.bold` uses step 10 in light and step 9 in dark. Products use these semantic roles, never hard-coded steps.
|
|
40
40
|
|
|
41
41
|
Yellow is the one exception: its brand fill is step 7, the brand yellow, with graphite text on top. Products don't use yellow for other fills or for text.
|
|
42
42
|
|
|
@@ -52,6 +52,6 @@ In both themes:
|
|
|
52
52
|
|
|
53
53
|
- In blue, green, orange and red, text on a solid fill (steps 9 and 10) reaches 4.5:1 with `text.on-bold`: white in light, dark in dark.
|
|
54
54
|
- Step 11 text reaches 4.5:1 on every background it is paired with.
|
|
55
|
-
-
|
|
55
|
+
- Neutral pressed backgrounds require the stronger light aliases above. Validate semantic pairs against effective backgrounds and all states; graphite step 10 text and step 9 boundaries are not universal contrast guarantees.
|
|
56
56
|
|
|
57
57
|
See [Accessibility](/foundations/styles/color/accessibility/) for the pairs.
|
|
@@ -18,7 +18,8 @@ Every colour on a screen answers two questions: what is this, and what does it m
|
|
|
18
18
|
| Page background | `surface.page` |
|
|
19
19
|
| Card, panel | `surface`, edge `border` |
|
|
20
20
|
| Menu, popover, dialog, drawer | `surface.overlay`; items inside use `surface.overlay.hover`, `.pressed`, `.selected` |
|
|
21
|
-
|
|
|
21
|
+
| App header and side navigation | `surface.page`, edge `border` |
|
|
22
|
+
| Table header, quiet area | `surface.subtle` |
|
|
22
23
|
| Body text, headings, labels | `text` |
|
|
23
24
|
| Descriptions, secondary table columns, navigation | `text.subtle` |
|
|
24
25
|
| Metadata, timestamps, helper text, breadcrumbs | `text.subtlest` |
|
|
@@ -41,7 +42,7 @@ Every colour on a screen answers two questions: what is this, and what does it m
|
|
|
41
42
|
| Chip: a filter or a picked value | `border.bold`, `text` on `surface`, remove icon `icon.subtle`; when on, `background.selected` and `border.selected` |
|
|
42
43
|
| Tooltip | `surface.inverse`, `text.inverse` |
|
|
43
44
|
| Toast | `surface.overlay`, `text`, `icon.{role}`, shadow `elevation.shadow.overlay`; no border |
|
|
44
|
-
| Switch |
|
|
45
|
+
| Switch | `switch.on.*`: track `background.neutral.bold`, thumb `icon.inverse`. `switch.off.*`: track `background.neutral`, edge `border.bold`, thumb `icon`. See [Switch](/components/switch/usage/) |
|
|
45
46
|
| Avatar with initials | `background.neutral`, `text` |
|
|
46
47
|
| Step number, count | `background.neutral.bold`, `text.inverse` |
|
|
47
48
|
| Layer behind a dialog or drawer | `surface.scrim` |
|
|
@@ -95,7 +96,7 @@ Warning is orange, not yellow: yellow is the brand. There is no sixth level; say
|
|
|
95
96
|
| | Label | State label |
|
|
96
97
|
|---|---|---|
|
|
97
98
|
| Looks | Outline in the role's `border`, text in its `text` | Fill in the role's `bold`, text and icon in `text.on-bold` |
|
|
98
|
-
| Size | 20 px, padding 6 px; large 24 px, 8 px | 32 px, padding 12 px |
|
|
99
|
+
| Size | 20 px, padding 6 px; large 24 px, 8 px (`label.height.*`, `label.padding.*`) | 32 px, padding 12 px (`label.height.state`, `label.padding.state`) |
|
|
99
100
|
| Use | Many per screen: status in table rows and lists | One per page: the status the page is about |
|
|
100
101
|
|
|
101
102
|
### Label, tag or chip
|
|
@@ -111,8 +112,7 @@ Three small elements that look alike but do different jobs. Choose by what peopl
|
|
|
111
112
|
| People can | Only read it | Read it, or click it to filter when it links | Remove it, or turn it on and off |
|
|
112
113
|
| States | None | Default; hover and focus only when it links | Default, hover, focus, selected, disabled |
|
|
113
114
|
| 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`) |
|
|
115
|
+
| Size | 20 px, or 24 px large (see above) | 24 px, padding 8 px (`tag.height`, `tag.padding`) | 24 px in dense toolbars, 32 px elsewhere (`chip.height.small`, `.default`) |
|
|
116
116
|
|
|
117
117
|
- A label never looks clickable: no hover, no pointer, no remove button.
|
|
118
118
|
- A tag never has a remove button. Once it does, it is a chip.
|
|
@@ -29,14 +29,45 @@ actual state. Preserve visible status labels and outcome icons.
|
|
|
29
29
|
P1–P5. Priority is not an execution outcome. P1 is highest; P5 is lowest. Do not
|
|
30
30
|
reuse a priority colour to claim success or failure.
|
|
31
31
|
|
|
32
|
+
### Failure without changing category
|
|
33
|
+
|
|
34
|
+
`visualization.failure-shadow` is a static, zero-offset danger shadow with
|
|
35
|
+
`space.050` blur and no spread or outer border. Keep the job-family fill intact;
|
|
36
|
+
this shadow indicates a failed outcome, not selection or keyboard focus. It is
|
|
37
|
+
not an elevation role or a decorative glow. Continue to expose failed counts and
|
|
38
|
+
status labels independently of colour.
|
|
39
|
+
|
|
40
|
+
Opt in on the actual visible mark with `data-bh-failed="true"`:
|
|
41
|
+
|
|
42
|
+
- SVG `.bh-data-point` or `.bh-data-fill` uses the source `drop-shadow` filter.
|
|
43
|
+
- DOM `.bh-data-mark[data-bh-mark="dot"]` uses the same role as a `box-shadow`.
|
|
44
|
+
|
|
45
|
+
Keep `data-bh-job-type` on the mark or its semantic ancestor. Omit the failed
|
|
46
|
+
attribute for nonfailed marks; it must not change their fill or geometry. Native
|
|
47
|
+
focus stays on the existing interactive owner or `.bh-data-hit-target`; do not
|
|
48
|
+
reuse the red shadow as focus. A grouped mark opts in if **any** represented event
|
|
49
|
+
failed. The consumer owns grouping and time bounds, not new paint values.
|
|
50
|
+
Reserve a paint inset so the shadow is not clipped without extending the data
|
|
51
|
+
time domain.
|
|
52
|
+
|
|
53
|
+
For native APIs requiring inline styles, import
|
|
54
|
+
`getVisualizationFailureStyles('svg' | 'dot', { dark })` from
|
|
55
|
+
`@beehexa/ant-design-vue-tokens/visualization` and bind its returned `filter` or
|
|
56
|
+
`boxShadow` only to failed marks. Rem-based blur still follows the reader root.
|
|
57
|
+
|
|
58
|
+
Verify SVG circles and bars plus DOM dots in both themes at roots16/20: category
|
|
59
|
+
fill and native SVG coordinates/height are unchanged; nonfailed marks have no
|
|
60
|
+
failure shadow; failed marks retain it while keyboard focus remains independent.
|
|
61
|
+
|
|
62
|
+
|
|
32
63
|
## Geometry and typography
|
|
33
64
|
|
|
34
65
|
Use `visualization.line-width`, `sparkline-width`, `grid-width`, `point-radius`
|
|
35
66
|
and `hover-point-radius` for SVG series and markers. Strokes are CSS pixel
|
|
36
67
|
dimensions; use a measured viewBox or non-scaling strokes to avoid distortion.
|
|
37
68
|
`timeline-track-height` and `activity-track-height` set compact proportional tracks.
|
|
38
|
-
`ring-size` is a CSS dimension; `ring-width` is
|
|
39
|
-
|
|
69
|
+
`ring-size` is a CSS dimension; `ring-width` is a percentage of the ring size,
|
|
70
|
+
and `ring-gap` is degrees. Convert dimensions only at numeric API boundaries.
|
|
40
71
|
Data coordinates and measured container sizes remain data, not design tokens.
|
|
41
72
|
|
|
42
73
|
`timeline-node-size` and `timeline-node-inner-size` define the outer categorical and
|
|
@@ -77,79 +108,3 @@ dash pattern and explicit labels, not colour alone. Unavailable means no request
|
|
|
77
108
|
to assess. Fault means internal/backend request-processing errors, not a ratio band;
|
|
78
109
|
show a separate fault count, explicit label/icon and cross-hatching. Fetch failures remain errors, not a band. Never turn missing
|
|
79
110
|
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
|
-
|
|
@@ -20,14 +20,14 @@ Elevation shows how high a surface looks. [Z-index](/foundations/styles/z-index/
|
|
|
20
20
|
|
|
21
21
|
| Level | Background | Shadow | Use for |
|
|
22
22
|
|---|---|---|---|
|
|
23
|
-
| Page | `color.surface.page`, `color.surface.subtle` | none | The page,
|
|
23
|
+
| Page | `color.surface.page`, `color.surface.subtle` | none | The page, the app header and side navigation, panels and tables; table headers on `color.surface.subtle` |
|
|
24
24
|
| Raised | `color.surface` | `elevation.shadow.raised` | Cards |
|
|
25
25
|
| Overlay | `color.surface.overlay` | `elevation.shadow.overlay` | Menus, select lists, popovers, date pickers, toasts |
|
|
26
26
|
| Modal | `color.surface.overlay` | `elevation.shadow.modal` | Dialogs, drawers, full sheets |
|
|
27
27
|
|
|
28
28
|
## Page
|
|
29
29
|
|
|
30
|
-
Most of the screen sits on the page with no shadow. Separate panels and tables with a `color.border` border.
|
|
30
|
+
Most of the screen sits on the page with no shadow. Separate panels and tables with a `color.border` border. The app header and side navigation sit on the page too, separated by a `color.border` line. Table headers use `color.surface.subtle`.
|
|
31
31
|
|
|
32
32
|
<ElevationDemo kind="level" item="page" />
|
|
33
33
|
|