@astryxdesign/core 0.7.6-canary.eecd9c1 → 0.7.6-canary.f73623d
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/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +28 -19
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +27 -0
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +10 -3
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +5 -2
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +36 -10
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +46 -58
- package/dist/ToggleButton/ToggleButtonGroup.d.ts +7 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.js +16 -2
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +37 -5
- package/dist/Token/TokenLink.d.ts.map +1 -1
- package/dist/Token/TokenLink.js +14 -2
- package/dist/i18n/generated-locales/af-ZA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/af-ZA.generated.js +0 -5
- package/dist/i18n/generated-locales/ar-SA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ar-SA.generated.js +0 -5
- package/dist/i18n/generated-locales/ca-ES.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ca-ES.generated.js +0 -5
- package/dist/i18n/generated-locales/cs-CZ.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/cs-CZ.generated.js +0 -5
- package/dist/i18n/generated-locales/da-DK.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/da-DK.generated.js +0 -5
- package/dist/i18n/generated-locales/de-DE.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/de-DE.generated.js +0 -5
- package/dist/i18n/generated-locales/el-GR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/el-GR.generated.js +0 -5
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +1 -5
- package/dist/i18n/generated-locales/es-ES.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/es-ES.generated.js +0 -5
- package/dist/i18n/generated-locales/fi-FI.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/fi-FI.generated.js +0 -5
- package/dist/i18n/generated-locales/fr-FR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/fr-FR.generated.js +0 -5
- package/dist/i18n/generated-locales/he-IL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/he-IL.generated.js +0 -5
- package/dist/i18n/generated-locales/hu-HU.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/hu-HU.generated.js +0 -5
- package/dist/i18n/generated-locales/it-IT.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/it-IT.generated.js +0 -5
- package/dist/i18n/generated-locales/ja-JP.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ja-JP.generated.js +0 -5
- package/dist/i18n/generated-locales/ko-KR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ko-KR.generated.js +0 -5
- package/dist/i18n/generated-locales/nl-NL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/nl-NL.generated.js +0 -5
- package/dist/i18n/generated-locales/no-NO.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/no-NO.generated.js +0 -5
- package/dist/i18n/generated-locales/pl-PL.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pl-PL.generated.js +0 -5
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +1 -5
- package/dist/i18n/generated-locales/pt-BR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pt-BR.generated.js +0 -5
- package/dist/i18n/generated-locales/pt-PT.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pt-PT.generated.js +0 -5
- package/dist/i18n/generated-locales/ro-RO.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ro-RO.generated.js +0 -5
- package/dist/i18n/generated-locales/ru-RU.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/ru-RU.generated.js +0 -5
- package/dist/i18n/generated-locales/sr-SP.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/sr-SP.generated.js +0 -5
- package/dist/i18n/generated-locales/sv-SE.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/sv-SE.generated.js +0 -5
- package/dist/i18n/generated-locales/tr-TR.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/tr-TR.generated.js +0 -5
- package/dist/i18n/generated-locales/uk-UA.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/uk-UA.generated.js +0 -5
- package/dist/i18n/generated-locales/vi-VN.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/vi-VN.generated.js +0 -5
- package/dist/i18n/generated-locales/zh-CN.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/zh-CN.generated.js +0 -5
- package/dist/i18n/generated-locales/zh-TW.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/zh-TW.generated.js +0 -5
- package/locales/af-ZA.json +0 -21
- package/locales/ar-SA.json +0 -21
- package/locales/ca-ES.json +0 -21
- package/locales/cs-CZ.json +0 -21
- package/locales/da-DK.json +0 -21
- package/locales/de-DE.json +0 -21
- package/locales/el-GR.json +0 -21
- package/locales/en.json +3 -19
- package/locales/es-ES.json +0 -21
- package/locales/fi-FI.json +0 -21
- package/locales/fr-FR.json +0 -21
- package/locales/he-IL.json +0 -21
- package/locales/hu-HU.json +0 -21
- package/locales/it-IT.json +0 -21
- package/locales/ja-JP.json +0 -21
- package/locales/ko-KR.json +0 -21
- package/locales/nl-NL.json +0 -21
- package/locales/no-NO.json +0 -21
- package/locales/pl-PL.json +0 -21
- package/locales/pseudo.json +2 -14
- package/locales/pt-BR.json +0 -21
- package/locales/pt-PT.json +0 -21
- package/locales/ro-RO.json +0 -21
- package/locales/ru-RU.json +0 -21
- package/locales/sr-SP.json +0 -21
- package/locales/sv-SE.json +0 -21
- package/locales/tr-TR.json +0 -21
- package/locales/uk-UA.json +0 -21
- package/locales/vi-VN.json +0 -21
- package/locales/zh-CN.json +0 -21
- package/locales/zh-TW.json +0 -21
- package/package.json +4 -4
- package/src/Chat/ChatLayout.spec.md +41 -36
- package/src/Chat/ChatLayoutScrollButton.spec.md +87 -103
- package/src/Chat/ChatSendButton.spec.md +78 -67
- package/src/ContextMenu/ContextMenu.spec.md +84 -56
- package/src/ContextMenu/ContextMenuItem.spec.md +132 -0
- package/src/DropdownMenu/DropdownMenu.spec.md +198 -218
- package/src/DropdownMenu/DropdownMenu.test.tsx +117 -0
- package/src/DropdownMenu/DropdownMenu.tsx +33 -18
- package/src/DropdownMenu/DropdownMenuCheckboxItem.spec.md +192 -0
- package/src/DropdownMenu/DropdownMenuDivider.spec.md +25 -31
- package/src/DropdownMenu/DropdownMenuGroup.spec.md +145 -0
- package/src/DropdownMenu/DropdownMenuItem.spec.md +48 -42
- package/src/DropdownMenu/DropdownMenuRadioGroup.spec.md +34 -37
- package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +54 -53
- package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +47 -41
- package/src/EmptyState/EmptyState.spec.md +35 -29
- package/src/Outline/Outline.spec.md +165 -69
- package/src/Outline/Outline.test.tsx +67 -2
- package/src/Outline/Outline.tsx +23 -0
- package/src/Outline/modules/parseOutlineFromMarkdown.spec.md +3 -4
- package/src/Popover/Popover.test.tsx +44 -0
- package/src/Popover/usePopover.tsx +10 -3
- package/src/RadioList/RadioList.test.tsx +56 -0
- package/src/RadioList/RadioListItem.tsx +5 -2
- package/src/Table/Table.spec.md +1 -1
- package/src/Table/Table.test.tsx +32 -0
- package/src/Table/Table.tsx +43 -11
- package/src/Table/__tests__/Table.a11y.states.ts +1 -5
- package/src/Table/plugins/sortable/useTableSortable.test.tsx +73 -144
- package/src/Table/plugins/sortable/useTableSortable.tsx +44 -73
- package/src/Table/plugins/sortable/useTableSortableState.test.tsx +9 -21
- package/src/ToggleButton/ToggleButton.test.tsx +27 -0
- package/src/ToggleButton/ToggleButtonGroup.tsx +20 -1
- package/src/Token/Token.doc.mjs +2 -2
- package/src/Token/Token.spec.md +41 -51
- package/src/Token/Token.test.tsx +67 -0
- package/src/Token/Token.tsx +60 -5
- package/src/Token/TokenLink.tsx +21 -7
- package/src/i18n/generated-locales/af-ZA.generated.ts +0 -7
- package/src/i18n/generated-locales/ar-SA.generated.ts +0 -6
- package/src/i18n/generated-locales/ca-ES.generated.ts +0 -7
- package/src/i18n/generated-locales/cs-CZ.generated.ts +0 -6
- package/src/i18n/generated-locales/da-DK.generated.ts +0 -6
- package/src/i18n/generated-locales/de-DE.generated.ts +0 -6
- package/src/i18n/generated-locales/el-GR.generated.ts +0 -7
- package/src/i18n/generated-locales/en.generated.ts +1 -6
- package/src/i18n/generated-locales/es-ES.generated.ts +0 -7
- package/src/i18n/generated-locales/fi-FI.generated.ts +0 -6
- package/src/i18n/generated-locales/fr-FR.generated.ts +0 -7
- package/src/i18n/generated-locales/he-IL.generated.ts +0 -6
- package/src/i18n/generated-locales/hu-HU.generated.ts +0 -6
- package/src/i18n/generated-locales/it-IT.generated.ts +0 -7
- package/src/i18n/generated-locales/ja-JP.generated.ts +0 -6
- package/src/i18n/generated-locales/ko-KR.generated.ts +0 -6
- package/src/i18n/generated-locales/nl-NL.generated.ts +0 -6
- package/src/i18n/generated-locales/no-NO.generated.ts +0 -6
- package/src/i18n/generated-locales/pl-PL.generated.ts +0 -7
- package/src/i18n/generated-locales/pseudo.generated.ts +1 -6
- package/src/i18n/generated-locales/pt-BR.generated.ts +0 -7
- package/src/i18n/generated-locales/pt-PT.generated.ts +0 -7
- package/src/i18n/generated-locales/ro-RO.generated.ts +0 -6
- package/src/i18n/generated-locales/ru-RU.generated.ts +0 -7
- package/src/i18n/generated-locales/sr-SP.generated.ts +0 -6
- package/src/i18n/generated-locales/sv-SE.generated.ts +0 -6
- package/src/i18n/generated-locales/tr-TR.generated.ts +0 -7
- package/src/i18n/generated-locales/uk-UA.generated.ts +0 -7
- package/src/i18n/generated-locales/vi-VN.generated.ts +0 -6
- package/src/i18n/generated-locales/zh-CN.generated.ts +0 -6
- package/src/i18n/generated-locales/zh-TW.generated.ts +0 -6
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 3
|
|
3
|
+
template_version: 7
|
|
4
|
+
kind: component
|
|
5
|
+
id: component:ContextMenuItem
|
|
6
|
+
authority: current
|
|
7
|
+
archive_reason: null
|
|
8
|
+
superseded_by: null
|
|
9
|
+
approved_by: cixzhang
|
|
10
|
+
approved_at: 2026-10-31
|
|
11
|
+
owners: [cixzhang]
|
|
12
|
+
review_triggers: [public-api]
|
|
13
|
+
verified_by: [packages/core/src/ContextMenu/ContextMenu.test.tsx]
|
|
14
|
+
modules: []
|
|
15
|
+
families: []
|
|
16
|
+
design_specs: []
|
|
17
|
+
architecture: [architecture:public-component-api]
|
|
18
|
+
contributing: []
|
|
19
|
+
system_specs: []
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# ContextMenuItem component contract
|
|
23
|
+
|
|
24
|
+
## Contract at a glance
|
|
25
|
+
|
|
26
|
+
| Area | Contract |
|
|
27
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| Public contract | `ContextMenuItem` is `DropdownMenuItem` exported from the ContextMenu entry point under this name, with its props type. |
|
|
29
|
+
| Behavior | Identical to `component:DropdownMenuItem` inside a ContextMenu's compound `menuContent`. |
|
|
30
|
+
| End-user impact | A context-menu row looks and behaves exactly like a dropdown-menu row. |
|
|
31
|
+
| Builder impact | Builders compose ContextMenu rows without importing from DropdownMenu. |
|
|
32
|
+
| Compatibility/readiness | Records shipped behavior; no API, default, or DOM change. |
|
|
33
|
+
| Review checks | Reject a ContextMenuItem that diverges from DropdownMenuItem, or a separate implementation behind the name. |
|
|
34
|
+
| Governing rules | `component:DropdownMenuItem`; `architecture:public-component-api`. |
|
|
35
|
+
|
|
36
|
+
This table is a review projection; the body below is authoritative.
|
|
37
|
+
|
|
38
|
+
## Intent
|
|
39
|
+
|
|
40
|
+
Give ContextMenu callers a row under the ContextMenu name without a second row
|
|
41
|
+
implementation.
|
|
42
|
+
|
|
43
|
+
## Compatibility and migration
|
|
44
|
+
|
|
45
|
+
- Released default preserved: yes.
|
|
46
|
+
- Compatibility class: records shipped behavior; no public prop, default,
|
|
47
|
+
export, or DOM change.
|
|
48
|
+
- Controlled/uncontrolled behavior: not applicable.
|
|
49
|
+
- Migration decision: none.
|
|
50
|
+
|
|
51
|
+
Consumer migration instructions belong in consumer docs and release notes.
|
|
52
|
+
|
|
53
|
+
## Ownership boundary
|
|
54
|
+
|
|
55
|
+
**Owns**
|
|
56
|
+
|
|
57
|
+
- The `ContextMenuItem` export name and its `ContextMenuItemProps` type name.
|
|
58
|
+
|
|
59
|
+
**Does not own / non-goals**
|
|
60
|
+
|
|
61
|
+
- Every row behavior, semantic, and target — owned by
|
|
62
|
+
`component:DropdownMenuItem`.
|
|
63
|
+
- The menu around it — owned by `component:ContextMenu`.
|
|
64
|
+
|
|
65
|
+
## Public concepts
|
|
66
|
+
|
|
67
|
+
| Concept | Closed values or states | Meaning | Availability | Default | Owner | Stability | Invalid-value behavior |
|
|
68
|
+
| ---------- | ----------------------- | -------------------------------------------- | ------------- | ------- | --------------------------- | --------- | ---------------------- |
|
|
69
|
+
| Alias name | `ContextMenuItem` | DropdownMenuItem under the ContextMenu name. | Compound mode | — | `component:ContextMenuItem` | stable | Not applicable. |
|
|
70
|
+
|
|
71
|
+
## Behavioral and layout contract
|
|
72
|
+
|
|
73
|
+
| ID | Invariant | Basis |
|
|
74
|
+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
75
|
+
| FR1 | `ContextMenuItem` is the same component as `DropdownMenuItem`, and `ContextMenuItemProps` is `DropdownMenuItemProps`; the row follows `component:DropdownMenuItem`. | Current source |
|
|
76
|
+
|
|
77
|
+
### Allowed variation
|
|
78
|
+
|
|
79
|
+
- **AV1 — None.** The alias adds nothing of its own.
|
|
80
|
+
|
|
81
|
+
### Representative states
|
|
82
|
+
|
|
83
|
+
| State | Required invariant | Allowed variation |
|
|
84
|
+
| ------------ | ----------------------------------------------------- | ----------------- |
|
|
85
|
+
| Compound row | Renders as a DropdownMenuItem row inside ContextMenu. | Row content. |
|
|
86
|
+
|
|
87
|
+
### Transformation and precedence order
|
|
88
|
+
|
|
89
|
+
- **ORD1 — None.** The alias has no precedence of its own.
|
|
90
|
+
|
|
91
|
+
### Performance and resources
|
|
92
|
+
|
|
93
|
+
- **PR1 — None of its own.** Resources are DropdownMenuItem's.
|
|
94
|
+
|
|
95
|
+
## Accessibility contract
|
|
96
|
+
|
|
97
|
+
- **AR1 — Same row.** Semantics and keyboard behavior are
|
|
98
|
+
`component:DropdownMenuItem`'s.
|
|
99
|
+
|
|
100
|
+
## Design relationships
|
|
101
|
+
|
|
102
|
+
| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
|
|
103
|
+
| ---------------- | ---------------------------- | ---------------------------- | -------------- | ------------------ |
|
|
104
|
+
| Row | Same as a dropdown-menu row. | `component:DropdownMenuItem` | Prominent | FR1 |
|
|
105
|
+
|
|
106
|
+
`component:DropdownMenuItem` owns the row's targets and `component:ContextMenu`
|
|
107
|
+
maps the pointer action row in its theming anatomy, so this record carries no
|
|
108
|
+
anatomy-theming map.
|
|
109
|
+
|
|
110
|
+
## Family and system relationships
|
|
111
|
+
|
|
112
|
+
- `component:DropdownMenuItem` owns the row contract.
|
|
113
|
+
- `component:ContextMenu` owns the menu.
|
|
114
|
+
|
|
115
|
+
## Verification map
|
|
116
|
+
|
|
117
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
118
|
+
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
|
|
119
|
+
| FR1, AR1 | `ContextMenu.test.tsx` compound cases ("renders menuContent as menu items", "renders ContextMenuItem endContent", "calls onClick when compound item is clicked") | Compound rows | A ContextMenuItem that does not render or act as a menu row fails. Evidence gap: no test asserts that the export is the same component as DropdownMenuItem. | `audit:ContextMenuItem/api` |
|
|
120
|
+
|
|
121
|
+
## Decision log
|
|
122
|
+
|
|
123
|
+
No component-local decision.
|
|
124
|
+
|
|
125
|
+
## Open questions
|
|
126
|
+
|
|
127
|
+
None.
|
|
128
|
+
|
|
129
|
+
## Content boundary
|
|
130
|
+
|
|
131
|
+
This file does not duplicate consumer prop tables/examples or the row contract.
|
|
132
|
+
It links to their owners.
|