diff --git a/.changeset/actionlist2-actionmenu2-prefix-types.md b/.changeset/actionlist2-actionmenu2-prefix-types.md new file mode 100644 index 00000000000..b7d4cd11224 --- /dev/null +++ b/.changeset/actionlist2-actionmenu2-prefix-types.md @@ -0,0 +1,21 @@ +--- +'@primer/react': major +--- + +`ActionList2` exported types are now prefixed with `ActionList`: + +``` +ListProps → ActionListProps +GroupProps → ActionListGroupProps +ItemProps → ActionListItemProps +DescriptionProps → ActionListDescriptionProps +LeadingVisualProps → ActionListLeadingVisualProps, +TrailingVisualProps → ActionListTrailingVisualProps +``` + +`ActionMenu2` exported types are now prefixed with `ActionMenu`: + +``` +MenuButtonProps → ActionMenuButtonProps +MenuAnchorProps → ActionMenuAnchorProps +``` diff --git a/.changeset/deprecate-actionlistv1-promote-actionlistv2.md b/.changeset/deprecate-actionlistv1-promote-actionlistv2.md new file mode 100644 index 00000000000..1979e50e66a --- /dev/null +++ b/.changeset/deprecate-actionlistv1-promote-actionlistv2.md @@ -0,0 +1,154 @@ +--- +'@primer/react': major +--- + +### ActionList + +ActionList has been rewritten with a composable API, design updates and accessibility fixes. + +See full list of props and examples: https://primer.style/react/ActionList + +
| Before (v34) | After (v35) | +
|---|---|
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
| Before (v34) | After (v35) | +
|---|---|
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
| Before (v34) | After (v35) | +
|---|---|
|
+
+```js
+const fieldTypes = [
+ {key: 0, text: 'Text'},
+ {key: 1, text: 'Number'},
+ {key: 3, text: 'Date'},
+ {key: 4, text: 'Single select'},
+ {key: 5, text: 'Iteration'}
+]
+
+const Example = () => {
+ const [selectedType, setSelectedType] = React.useState()
+
+ return (
+ |
+
+
+```jsx
+const fieldTypes = [
+ {id: 0, text: 'Text'},
+ {id: 1, text: 'Number'},
+ {id: 3, text: 'Date'},
+ {id: 4, text: 'Single select'},
+ {id: 5, text: 'Iteration'}
+]
+
+const Example = () => {
+ const [selectedType, setSelectedType] = React.useState()
+
+ render(
+ |
+
| Before | After | +
|---|---|
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
| Before | After | +
|---|---|
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
| Before | After | +
|---|---|
|
+
+```jsx
+const fieldTypes = [
+ {leadingVisual: TypographyIcon, text: 'Text'},
+ {leadingVisual: NumberIcon, text: 'Number'}
+]
+
+const Example = () => {
+ const [selectedItem, setSelectedItem] = React.useState()
+
+ return (
+ |
+
+
+```jsx
+const fieldTypes = [
+ {icon: |
+
| Before | After | +
|---|---|
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
| Before | After | +
|---|---|
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
| Before | After | +
|---|---|
|
+
+```jsx
+ |
+
+
+```jsx
+ |
+
| Before | After | +
|---|---|
|
+
+```jsx
+<>
+ |
+
+
+```jsx
+<>
+ |
+