@beehexa/design-rules 2611.20.1 → 2611.28.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/dist/catalog.json +6 -6
- package/dist/docs/public/r/field.json +5 -5
- package/dist/docs/src/content/components/field/examples.mdx +1 -1
- package/dist/docs/src/content/components/field/usage.mdx +5 -2
- package/dist/docs/src/content-vi/components/field/examples.mdx +1 -1
- package/dist/docs/src/styles/global.css +1 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/catalog.json
CHANGED
|
@@ -1795,8 +1795,8 @@
|
|
|
1795
1795
|
"status": "active",
|
|
1796
1796
|
"releasePhase": null,
|
|
1797
1797
|
"planned": [],
|
|
1798
|
-
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field
|
|
1799
|
-
"raw": "---\ndescription: Live examples of Field, with the exact Vue file that renders each one.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field
|
|
1798
|
+
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field, wrapped with the label in a `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkboxes with descriptions\n\n`orientation=\"horizontal\"` puts the checkbox beside its label. The box lines up with the first line of the label.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Choice cards\n\nA `FieldLabel` around a whole field makes a card people can click anywhere. The chosen card takes the selected fill and edge.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
1799
|
+
"raw": "---\ndescription: Live examples of Field, with the exact Vue file that renders each one.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field, wrapped with the label in a `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkboxes with descriptions\n\n`orientation=\"horizontal\"` puts the checkbox beside its label. The box lines up with the first line of the label.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Choice cards\n\nA `FieldLabel` around a whole field makes a card people can click anywhere. The chosen card takes the selected fill and edge.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
1800
1800
|
"frontmatter": {
|
|
1801
1801
|
"description": "Live examples of Field, with the exact Vue file that renders each one."
|
|
1802
1802
|
}
|
|
@@ -1811,8 +1811,8 @@
|
|
|
1811
1811
|
"status": "active",
|
|
1812
1812
|
"releasePhase": null,
|
|
1813
1813
|
"planned": [],
|
|
1814
|
-
"body": "\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1815
|
-
"raw": "---\ndescription: Where labels, help text and errors go, and how far apart fields sit.\n---\n\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1814
|
+
"body": "\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first: wrap the label and the help text in `FieldContent` | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Label and the help text above its control (in `FieldContent`) | `space.050` (4 px) |\n| Legend and its description | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| A checkbox or radio group and its error in a field set | `space.150` (12 px), the field set's gap |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control, or above it), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1815
|
+
"raw": "---\ndescription: Where labels, help text and errors go, and how far apart fields sit.\n---\n\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first: wrap the label and the help text in `FieldContent` | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Label and the help text above its control (in `FieldContent`) | `space.050` (4 px) |\n| Legend and its description | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| A checkbox or radio group and its error in a field set | `space.150` (12 px), the field set's gap |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control, or above it), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1816
1816
|
"frontmatter": {
|
|
1817
1817
|
"description": "Where labels, help text and errors go, and how far apart fields sit."
|
|
1818
1818
|
}
|
|
@@ -7696,8 +7696,8 @@
|
|
|
7696
7696
|
"status": "active",
|
|
7697
7697
|
"releasePhase": null,
|
|
7698
7698
|
"planned": [],
|
|
7699
|
-
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field
|
|
7700
|
-
"raw": "---\ndescription: Ví dụ trực tiếp của Trường, kèm đúng file Vue hiển thị từng ví dụ.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field
|
|
7699
|
+
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field, bọc cùng nhãn trong một `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkbox có mô tả\n\n`orientation=\"horizontal\"` đặt checkbox cạnh nhãn. Ô thẳng hàng với dòng đầu của nhãn.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Thẻ lựa chọn\n\nMột `FieldLabel` bao cả field tạo thành thẻ bấm được ở mọi chỗ. Thẻ được chọn dùng nền và viền đang chọn.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
7700
|
+
"raw": "---\ndescription: Ví dụ trực tiếp của Trường, kèm đúng file Vue hiển thị từng ví dụ.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field, bọc cùng nhãn trong một `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkbox có mô tả\n\n`orientation=\"horizontal\"` đặt checkbox cạnh nhãn. Ô thẳng hàng với dòng đầu của nhãn.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Thẻ lựa chọn\n\nMột `FieldLabel` bao cả field tạo thành thẻ bấm được ở mọi chỗ. Thẻ được chọn dùng nền và viền đang chọn.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
7701
7701
|
"frontmatter": {
|
|
7702
7702
|
"description": "Ví dụ trực tiếp của Trường, kèm đúng file Vue hiển thị từng ví dụ."
|
|
7703
7703
|
}
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
{
|
|
23
23
|
"path": "registry/beehexa/ui/field/FieldContent.vue",
|
|
24
24
|
"type": "registry:ui",
|
|
25
|
-
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldContent.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\n//
|
|
25
|
+
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldContent.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\n// A label and its description stacked, space.050 apart (a title and its description): beside a checkbox, radio\n// or switch, or above the control in a vertical field when the help must be read before the control. A vertical\n// field keeps it at its own height (flex-none, index.ts), so a field stretched by its row keeps the control\n// space.100 under the help.\nconst props = defineProps<{\n class?: HTMLAttributes['class']\n}>()\n</script>\n\n<template>\n <div\n data-slot=\"field-content\"\n :class=\"cn(\n 'group/field-content flex flex-1 flex-col gap-(--bh-space-050)',\n props.class,\n )\"\n >\n <slot />\n </div>\n</template>\n"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "registry/beehexa/ui/field/FieldDescription.vue",
|
|
29
29
|
"type": "registry:ui",
|
|
30
|
-
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldDescription.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\n// Help text: font.body.small in color.text.subtle
|
|
30
|
+
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldDescription.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\n// Help text: font.body.small in color.text.subtle, under the control. It has no margin of its own: its container's\n// gap places it. When it must be read before the control, wrap FieldLabel and FieldDescription in FieldContent\n// (space.050). Links in it are underlined in color.link (D3).\nconst props = defineProps<{\n class?: HTMLAttributes['class']\n}>()\n</script>\n\n<template>\n <p\n data-slot=\"field-description\"\n :class=\"cn(\n 'm-0 text-left text-(--bh-color-text-subtle) [font:var(--bh-font-body-small)] group-has-data-horizontal/field:text-balance',\n '[&>a]:text-(--bh-color-link) [&>a]:underline [&>a]:underline-offset-2 [&>a:hover]:text-(--bh-color-link-hover)',\n props.class,\n )\"\n >\n <slot />\n </p>\n</template>\n"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"path": "registry/beehexa/ui/field/FieldError.vue",
|
|
34
34
|
"type": "registry:ui",
|
|
35
|
-
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldError.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\nimport { computed } from 'vue'\n\n// The error under the control: font.body.small in color.text.danger. Say what is wrong and how to fix it.\n// Several errors become a list, space.050 apart.\nconst props = defineProps<{\n class?: HTMLAttributes['class']\n errors?: Array<string | { message: string | undefined } | undefined>\n}>()\n\nconst content = computed(() => {\n if (!props.errors || props.errors.length === 0)\n return null\n\n const uniqueErrors = [\n ...new Map(\n props.errors\n .filter(
|
|
35
|
+
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldError.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\nimport { computed } from 'vue'\n\n// The error under the control: font.body.small in color.text.danger. Say what is wrong and how to fix it.\n// Several errors become a list, space.050 apart.\nconst props = defineProps<{\n class?: HTMLAttributes['class']\n errors?: Array<string | { message: string | undefined } | undefined>\n}>()\n\nconst content = computed(() => {\n if (!props.errors || props.errors.length === 0)\n return null\n\n const uniqueErrors = [\n ...new Map(\n props.errors\n .filter(error => (typeof error === 'string' ? error : error?.message)?.trim())\n .map((error) => {\n const message = typeof error === 'string' ? error : error?.message\n return [message, error]\n }),\n ).values(),\n ]\n\n // [undefined], [''], [' '] or [{ message: undefined }]: nothing to say, so no alert and no gap.\n if (uniqueErrors.length === 0)\n return null\n\n if (uniqueErrors.length === 1 && uniqueErrors[0]) {\n return typeof uniqueErrors[0] === 'string' ? uniqueErrors[0] : uniqueErrors[0].message\n }\n\n return uniqueErrors.map(error => typeof error === 'string' ? error : error?.message)\n})\n</script>\n\n<template>\n <div\n v-if=\"$slots.default || content\"\n role=\"alert\"\n data-slot=\"field-error\"\n :class=\"cn('text-(--bh-color-text-danger) [font:var(--bh-font-body-small)]', props.class)\"\n >\n <slot v-if=\"$slots.default\" />\n\n <template v-else-if=\"typeof content === 'string'\">\n {{ content }}\n </template>\n\n <ul v-else-if=\"Array.isArray(content)\" class=\"m-0 ml-(--bh-space-200) flex list-disc flex-col gap-(--bh-space-050) p-0\">\n <li v-for=\"(error, index) in content\" :key=\"index\">\n {{ error }}\n </li>\n </ul>\n </div>\n</template>\n"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"path": "registry/beehexa/ui/field/FieldGroup.vue",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
{
|
|
48
48
|
"path": "registry/beehexa/ui/field/FieldLegend.vue",
|
|
49
49
|
"type": "registry:ui",
|
|
50
|
-
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldLegend.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\n// Title of a field set: font.heading.xsmall (variant legend) or font.label.default (variant label), color.text.\nconst props = withDefaults(defineProps<{\n class?: HTMLAttributes['class']\n variant?: 'legend' | 'label'\n}>(), {\n variant: 'legend',\n})\n</script>\n\n<template>\n <legend\n data-slot=\"field-legend\"\n :data-variant=\"variant\"\n :class=\"cn('mb-(--bh-space-100) p-0 text-(--bh-color-text) data-[variant=label]:[font:var(--bh-font-label-default)] data-[variant=legend]:[font:var(--bh-font-heading-xsmall)]', props.class)\"\n >\n <slot />\n </legend>\n</template>\n"
|
|
50
|
+
"content": "<!-- Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (FieldLegend.vue), read 2026-11-12 -->\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\n// Title of a field set: font.heading.xsmall (variant legend) or font.label.default (variant label), color.text.\n// space.100 above the field set's content; space.050 above a FieldDescription that follows it. Both go through\n// --field-legend-gap, so an mb-* class on the legend replaces either.\nconst props = withDefaults(defineProps<{\n class?: HTMLAttributes['class']\n variant?: 'legend' | 'label'\n}>(), {\n variant: 'legend',\n})\n</script>\n\n<template>\n <legend\n data-slot=\"field-legend\"\n :data-variant=\"variant\"\n :class=\"cn('mb-(--field-legend-gap) [--field-legend-gap:var(--bh-space-100)] has-[+[data-slot=field-description]]:[--field-legend-gap:var(--bh-space-050)] p-0 text-(--bh-color-text) data-[variant=label]:[font:var(--bh-font-label-default)] data-[variant=legend]:[font:var(--bh-font-heading-xsmall)]', props.class)\"\n >\n <slot />\n </legend>\n</template>\n"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"path": "registry/beehexa/ui/field/FieldSeparator.vue",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
{
|
|
68
68
|
"path": "registry/beehexa/ui/field/index.ts",
|
|
69
69
|
"type": "registry:ui",
|
|
70
|
-
"content": "// Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (index.ts), read 2026-11-12\n// Beehexa Field: the shadcn-vue Field API. Label (font.label.default) above the control, help text\n// (font.body.small, color.text.subtle) and the error (font.body.small, color.text.danger) under it, all space.100\n// apart. Form uses the same placement. An invalid field keeps its label in color.text (D4 asks 7:1 of labels);\n// the control's edge and the error message carry the error.\nimport type { VariantProps } from 'class-variance-authority'\nimport { cva } from 'class-variance-authority'\n\nexport const fieldVariants = cva('group/field flex w-full gap-(--bh-space-100) [font:var(--bh-font-label-default)]', {\n variants: {\n orientation: {\n vertical:\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n // A checkbox or radio beside its label and description lines up with the first line of the label:\n // half the label's line height (1lh, 20 px or 24 px in Vietnamese) minus half the 16 px control.\n horizontal:\n 'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-[calc((1lh_-_var(--bh-size-icon-default))_/_2)]',\n responsive:\n 'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-[calc((1lh_-_var(--bh-size-icon-default))_/_2)]',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n})\n\nexport type FieldVariants = VariantProps<typeof fieldVariants>\n\nexport { default as Field } from './Field.vue'\nexport { default as FieldContent } from './FieldContent.vue'\nexport { default as FieldDescription } from './FieldDescription.vue'\nexport { default as FieldError } from './FieldError.vue'\nexport { default as FieldGroup } from './FieldGroup.vue'\nexport { default as FieldLabel } from './FieldLabel.vue'\nexport { default as FieldLegend } from './FieldLegend.vue'\nexport { default as FieldSeparator } from './FieldSeparator.vue'\nexport { default as FieldSet } from './FieldSet.vue'\nexport { default as FieldTitle } from './FieldTitle.vue'\n"
|
|
70
|
+
"content": "// Source: https://shadcn-vue.com/r/styles/reka-nova/field.json (index.ts), read 2026-11-12\n// Beehexa Field: the shadcn-vue Field API. Label (font.label.default) above the control, help text\n// (font.body.small, color.text.subtle) and the error (font.body.small, color.text.danger) under it, all space.100\n// apart. Form uses the same placement. An invalid field keeps its label in color.text (D4 asks 7:1 of labels);\n// the control's edge and the error message carry the error.\nimport type { VariantProps } from 'class-variance-authority'\nimport { cva } from 'class-variance-authority'\n\nexport const fieldVariants = cva('group/field flex w-full gap-(--bh-space-100) [font:var(--bh-font-label-default)]', {\n variants: {\n orientation: {\n vertical:\n 'flex-col *:w-full [&>.sr-only]:w-auto *:data-[slot=field-content]:flex-none',\n // A checkbox or radio beside its label and description lines up with the first line of the label:\n // half the label's line height (1lh, 20 px or 24 px in Vietnamese) minus half the 16 px control.\n horizontal:\n 'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-[calc((1lh_-_var(--bh-size-icon-default))_/_2)]',\n responsive:\n 'flex-col *:w-full *:data-[slot=field-content]:flex-none @md/field-group:*:data-[slot=field-content]:flex-1 @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-[calc((1lh_-_var(--bh-size-icon-default))_/_2)]',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n})\n\nexport type FieldVariants = VariantProps<typeof fieldVariants>\n\nexport { default as Field } from './Field.vue'\nexport { default as FieldContent } from './FieldContent.vue'\nexport { default as FieldDescription } from './FieldDescription.vue'\nexport { default as FieldError } from './FieldError.vue'\nexport { default as FieldGroup } from './FieldGroup.vue'\nexport { default as FieldLabel } from './FieldLabel.vue'\nexport { default as FieldLegend } from './FieldLegend.vue'\nexport { default as FieldSeparator } from './FieldSeparator.vue'\nexport { default as FieldSet } from './FieldSet.vue'\nexport { default as FieldTitle } from './FieldTitle.vue'\n"
|
|
71
71
|
}
|
|
72
72
|
]
|
|
73
73
|
}
|
|
@@ -13,7 +13,7 @@ Every example is a complete Vue file. Copy it into an app that has the registry
|
|
|
13
13
|
|
|
14
14
|
## A form section
|
|
15
15
|
|
|
16
|
-
A field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field
|
|
16
|
+
A field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field, wrapped with the label in a `FieldContent`.
|
|
17
17
|
|
|
18
18
|
<CodeExample source={FieldStoreDetailsSource} file="FieldStoreDetails.vue">
|
|
19
19
|
<FieldStoreDetails client:visible />
|
|
@@ -16,7 +16,7 @@ Field puts a label, a control, help text and an error in the same places in ever
|
|
|
16
16
|
| Part | Where | Style |
|
|
17
17
|
| --- | --- | --- |
|
|
18
18
|
| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |
|
|
19
|
-
| Help text | Under the control. Between the label and the control only when it must be read first | `font.body.small`, `color.text.subtle` |
|
|
19
|
+
| Help text | Under the control. Between the label and the control only when it must be read first: wrap the label and the help text in `FieldContent` | `font.body.small`, `color.text.subtle` |
|
|
20
20
|
| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |
|
|
21
21
|
|
|
22
22
|
An invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.
|
|
@@ -27,8 +27,11 @@ An invalid field keeps its label in `color.text`: labels need 7:1 (D4). The cont
|
|
|
27
27
|
| --- | --- |
|
|
28
28
|
| Label, control, help text and error in one field | `space.100` (8 px) |
|
|
29
29
|
| A label and its description beside a checkbox | `space.050` (4 px) |
|
|
30
|
+
| Label and the help text above its control (in `FieldContent`) | `space.050` (4 px) |
|
|
31
|
+
| Legend and its description | `space.050` (4 px) |
|
|
30
32
|
| Fields in a group | `space.stack` (16 px) |
|
|
31
33
|
| Checkboxes or radios in a group | `space.150` (12 px) |
|
|
34
|
+
| A checkbox or radio group and its error in a field set | `space.150` (12 px), the field set's gap |
|
|
32
35
|
| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |
|
|
33
36
|
|
|
34
37
|
## Orientation
|
|
@@ -43,4 +46,4 @@ Wrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each optio
|
|
|
43
46
|
|
|
44
47
|
## Parts
|
|
45
48
|
|
|
46
|
-
`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.
|
|
49
|
+
`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control, or above it), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.
|
|
@@ -13,7 +13,7 @@ Mỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã c
|
|
|
13
13
|
|
|
14
14
|
## Một phần của biểu mẫu
|
|
15
15
|
|
|
16
|
-
Một field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field
|
|
16
|
+
Một field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field, bọc cùng nhãn trong một `FieldContent`.
|
|
17
17
|
|
|
18
18
|
<CodeExample source={FieldStoreDetailsSource} file="FieldStoreDetails.vue">
|
|
19
19
|
<FieldStoreDetails client:visible />
|
|
@@ -51,6 +51,7 @@ body { margin: 0; min-width: 320px; overflow-x: hidden; font: var(--bh-font-body
|
|
|
51
51
|
while it runs old CSS and shadcn-vue side by side. */
|
|
52
52
|
@layer theme, base, components, utilities;
|
|
53
53
|
@layer base {
|
|
54
|
+
h1, h2, h3, p { margin-top: 0; }
|
|
54
55
|
b, strong { font-weight: var(--bh-font-weight-semibold); }
|
|
55
56
|
h1, h2, h3, h4, h5, h6 { font-weight: var(--bh-font-weight-semibold); }
|
|
56
57
|
code, kbd, pre, samp { font-family: var(--bh-font-family-mono); }
|
|
@@ -63,7 +64,6 @@ body { margin: 0; min-width: 320px; overflow-x: hidden; font: var(--bh-font-body
|
|
|
63
64
|
|
|
64
65
|
.skip-link { position: fixed; z-index: var(--bh-z-index-toast); top: -5rem; left: 1rem; display: inline-flex; align-items: center; height: var(--bh-size-control-default); padding: 0 var(--bh-space-150); border-radius: var(--bh-radius-075); color: var(--bh-color-text-inverse); background: var(--bh-color-background-neutral-bold); font: var(--bh-font-label-default); }
|
|
65
66
|
.skip-link:focus { top: 1rem; }
|
|
66
|
-
h1, h2, h3, p { margin-top: 0; }
|
|
67
67
|
h1, h2, h3 { text-wrap: balance; }
|
|
68
68
|
|
|
69
69
|
/* Pictures of text: colour specimens, Don't examples and mock-ups draw their words from data-sample.
|
package/dist/index.js
CHANGED
|
@@ -1796,8 +1796,8 @@ export const catalog = [
|
|
|
1796
1796
|
"status": "active",
|
|
1797
1797
|
"releasePhase": null,
|
|
1798
1798
|
"planned": [],
|
|
1799
|
-
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field
|
|
1800
|
-
"raw": "---\ndescription: Live examples of Field, with the exact Vue file that renders each one.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field
|
|
1799
|
+
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field, wrapped with the label in a `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkboxes with descriptions\n\n`orientation=\"horizontal\"` puts the checkbox beside its label. The box lines up with the first line of the label.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Choice cards\n\nA `FieldLabel` around a whole field makes a card people can click anywhere. The chosen card takes the selected fill and edge.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
1800
|
+
"raw": "---\ndescription: Live examples of Field, with the exact Vue file that renders each one.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/en/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/en/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/en/FieldChoiceCards.vue?raw';\n\nEvery example is a complete Vue file. Copy it into an app that has the registry installed, or open it in StackBlitz.\n\n## A form section\n\nA field set with a legend, then fields 16 px apart. Help text goes under the field; when it must be read before typing, as for the return policy, it goes between the label and the field, wrapped with the label in a `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkboxes with descriptions\n\n`orientation=\"horizontal\"` puts the checkbox beside its label. The box lines up with the first line of the label.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Choice cards\n\nA `FieldLabel` around a whole field makes a card people can click anywhere. The chosen card takes the selected fill and edge.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
1801
1801
|
"frontmatter": {
|
|
1802
1802
|
"description": "Live examples of Field, with the exact Vue file that renders each one."
|
|
1803
1803
|
}
|
|
@@ -1812,8 +1812,8 @@ export const catalog = [
|
|
|
1812
1812
|
"status": "active",
|
|
1813
1813
|
"releasePhase": null,
|
|
1814
1814
|
"planned": [],
|
|
1815
|
-
"body": "\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1816
|
-
"raw": "---\ndescription: Where labels, help text and errors go, and how far apart fields sit.\n---\n\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1815
|
+
"body": "\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first: wrap the label and the help text in `FieldContent` | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Label and the help text above its control (in `FieldContent`) | `space.050` (4 px) |\n| Legend and its description | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| A checkbox or radio group and its error in a field set | `space.150` (12 px), the field set's gap |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control, or above it), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1816
|
+
"raw": "---\ndescription: Where labels, help text and errors go, and how far apart fields sit.\n---\n\n> **Draft.** Ported from the shadcn-vue Field (registry, read 12 November 2026) and restyled with Beehexa tokens. Not yet approved.\n\nField puts a label, a control, help text and an error in the same places in every form. Use it around [Input](/components/input/usage/), [Textarea](/components/textarea/usage/), [Native select](/components/native-select/usage/), [Checkbox](/components/checkbox/usage/) and [Radio group](/components/radio-group/usage/). [Form](/components/form/usage/) uses the same placement with validation built in.\n\n## When to use\n\n- **For every form you write by hand.** It keeps spacing and order the same across products.\n- Use [Form](/components/form/usage/) instead when the form validates with vee-validate and a schema.\n\n## Placement\n\n| Part | Where | Style |\n| --- | --- | --- |\n| Label | Above the control; beside a checkbox, radio or switch | `font.label.default`, `color.text` |\n| Help text | Under the control. Between the label and the control only when it must be read first: wrap the label and the help text in `FieldContent` | `font.body.small`, `color.text.subtle` |\n| Error | Under the control, after the help text | `font.body.small`, `color.text.danger` |\n\nAn invalid field keeps its label in `color.text`: labels need 7:1 (D4). The control's red edge and the message show the error, and the message says how to fix it.\n\n## Spacing\n\n| Between | Token |\n| --- | --- |\n| Label, control, help text and error in one field | `space.100` (8 px) |\n| A label and its description beside a checkbox | `space.050` (4 px) |\n| Label and the help text above its control (in `FieldContent`) | `space.050` (4 px) |\n| Legend and its description | `space.050` (4 px) |\n| Fields in a group | `space.stack` (16 px) |\n| Checkboxes or radios in a group | `space.150` (12 px) |\n| A checkbox or radio group and its error in a field set | `space.150` (12 px), the field set's gap |\n| Field sets (form sections) | `space.stack.group` (32 px), which a `FieldSeparator` gives |\n\n## Orientation\n\n- `vertical` (default): label above. Use it for text fields, selects and text areas.\n- `horizontal`: control beside the label. Use it for checkboxes, radios and switches.\n- `responsive`: vertical in a narrow container, horizontal from the `md` container width.\n\n## Choice cards\n\nWrap a whole `Field` in a `FieldLabel` to make a card. Use cards when each option needs a sentence of explanation and there are two to four options. The chosen card uses `color.background.selected` with a `color.border.selected` edge; the checked control is the second cue. Cards have `radius.card` corners and `space.150` padding.\n\n## Parts\n\n`Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldContent` (label and description beside a control, or above it), `FieldTitle` (a label that is not a `<label>`, for cards), `FieldGroup`, `FieldSet`, `FieldLegend`, `FieldSeparator`.\n",
|
|
1817
1817
|
"frontmatter": {
|
|
1818
1818
|
"description": "Where labels, help text and errors go, and how far apart fields sit."
|
|
1819
1819
|
}
|
|
@@ -7697,8 +7697,8 @@ export const catalog = [
|
|
|
7697
7697
|
"status": "active",
|
|
7698
7698
|
"releasePhase": null,
|
|
7699
7699
|
"planned": [],
|
|
7700
|
-
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field
|
|
7701
|
-
"raw": "---\ndescription: Ví dụ trực tiếp của Trường, kèm đúng file Vue hiển thị từng ví dụ.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field
|
|
7700
|
+
"body": "import CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field, bọc cùng nhãn trong một `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkbox có mô tả\n\n`orientation=\"horizontal\"` đặt checkbox cạnh nhãn. Ô thẳng hàng với dòng đầu của nhãn.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Thẻ lựa chọn\n\nMột `FieldLabel` bao cả field tạo thành thẻ bấm được ở mọi chỗ. Thẻ được chọn dùng nền và viền đang chọn.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
7701
|
+
"raw": "---\ndescription: Ví dụ trực tiếp của Trường, kèm đúng file Vue hiển thị từng ví dụ.\n---\nimport CodeExample from '../../../components/CodeExample.astro';\nimport FieldStoreDetails from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue';\nimport FieldStoreDetailsSource from '../../../../registry/beehexa/examples/field/vi/FieldStoreDetails.vue?raw';\nimport FieldCheckboxes from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue';\nimport FieldCheckboxesSource from '../../../../registry/beehexa/examples/field/vi/FieldCheckboxes.vue?raw';\nimport FieldChoiceCards from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue';\nimport FieldChoiceCardsSource from '../../../../registry/beehexa/examples/field/vi/FieldChoiceCards.vue?raw';\n\nMỗi ví dụ là một file Vue hoàn chỉnh. Chép vào ứng dụng đã cài registry, hoặc mở trong StackBlitz.\n\n## Một phần của biểu mẫu\n\nMột field set có legend, rồi các field cách nhau 16 px. Chữ hướng dẫn nằm dưới field; khi cần đọc trước lúc gõ, như chính sách đổi trả, nó nằm giữa nhãn và field, bọc cùng nhãn trong một `FieldContent`.\n\n<CodeExample source={FieldStoreDetailsSource} file=\"FieldStoreDetails.vue\">\n <FieldStoreDetails client:visible />\n</CodeExample>\n\n## Checkbox có mô tả\n\n`orientation=\"horizontal\"` đặt checkbox cạnh nhãn. Ô thẳng hàng với dòng đầu của nhãn.\n\n<CodeExample source={FieldCheckboxesSource} file=\"FieldCheckboxes.vue\">\n <FieldCheckboxes client:visible />\n</CodeExample>\n\n## Thẻ lựa chọn\n\nMột `FieldLabel` bao cả field tạo thành thẻ bấm được ở mọi chỗ. Thẻ được chọn dùng nền và viền đang chọn.\n\n<CodeExample source={FieldChoiceCardsSource} file=\"FieldChoiceCards.vue\">\n <FieldChoiceCards client:visible />\n</CodeExample>\n",
|
|
7702
7702
|
"frontmatter": {
|
|
7703
7703
|
"description": "Ví dụ trực tiếp của Trường, kèm đúng file Vue hiển thị từng ví dụ."
|
|
7704
7704
|
}
|