-
#3900
2f9b5869
Thanks @broccolinisoup! - ActionList: Add ActionList.GroupHeading component to label the group lists and update labelling semantics for accessibility -
#3143
cc0c16e9
Thanks @green6erry! - Adjusts position of children withinPageLayout.Pane
to live above adjustable resize form.
-
#3935
89702725
Thanks @broccolinisoup! - Dialog: Add sx back to dialog footer -
#3918
e8d0c15f
Thanks @dylanatsmith! - Update the spacing for buttons in the footer of a Dialog. -
#3893
a4006e2f
Thanks @stkao05! - Fix MarkdownEditor fullHeight support -
#3895
9daea96b
Thanks @cs25-esc! - AvatarStack: BothdisableExpand
andrightAlign
can be passed together now -
#3667
791c9838
Thanks @six7! - Changes visual appearance of MarkdownEditor -
#3910
988b297d
Thanks @broccolinisoup! - Tooltip (draft): Do not expose the tooltip text to AT when it is not visible -
#3924
e512c049
Thanks @thyeggman! - Fix issue in DataTable so that sort order is determined after column headers are created -
#3916
c2f81b3c
Thanks @strackoverflow! - Fix inconsistent border treatment when there is one avatar in an AvatarStack -
#3925
6b362b2a
Thanks @broccolinisoup! - Tooltip2: make the text prop required
- #3843
4ea8bcf7
Thanks @thyeggman! - Vertically align cell contents inDataTable
-
#3866
22fa0928
Thanks @strackoverflow! - DataTable: fix incorrect pagination steps when defaultPageIndex is provided -
#3888
3e20ab1f
Thanks @strackoverflow! - Select: Add support forsx
prop -
#3870
2c24d6a8
Thanks @siddharthkp! - ActionList: Checkbox inside a disabled item should havenot-allowed
cusor
-
#3384
3633535c
Thanks @joshblack! - Update styled-components and related dependencies to v5.x -
#3384
3633535c
Thanks @joshblack! - Remove components from deprecatedBorderBox
,ChoiceFieldset
,Flex
,Grid
,Position
,Dropdown
,FormGroup
,SelectMenu
,InputField
,Label
-
#3384
3633535c
Thanks @joshblack! - Remove components from draft bundle- Move UnderlineNav2 (draft) to the main bundle
- import {UnderlineNav} from '@primer/react/drafts' + import {UnderlineNav} from '@primer/react'
....
- Remove TreeView from drafts
- import {TreeView} from '@primer/react/drafts' + import {TreeView} from '@primer/react'
- Remove SegmentedControl from drafts
- import {SegmentedControl} from '@primer/react/drafts' + import {SegmentedControl} from '@primer/react'
- Remove NavList from drafts
- import {NavList} from '@primer/react/drafts' + import {NavList} from '@primer/react'
- Remove SplitPageLayout from drafts
- import {SplitPageLayout} from '@primer/react/drafts' + import {SplitPageLayout} from '@primer/react'
-
#3384
3633535c
Thanks @joshblack! - - ChangesleadingIcon
andtrailingIcon
toleadingVisual
andtrailingVisual
- Removes
Button.Counter
as a child component, replacing it with acount
prop. This change allows us to use thetrailingVisual
slot for counters. - Removes the
outline
button variant as we wish to only supportinvisible
buttons.
- Removes
-
#3384
3633535c
Thanks @joshblack! - Remove deprecatedextralarge
variant fromToken
andTextInputWithToken
component -
#3384
3633535c
Thanks @joshblack! - Remove StyledOcticon component. The component was renamed toOcticon
. Update your imports by swappingStyledOcticon
withOcticon
-
#3384
3633535c
Thanks @joshblack! - Deprecates FilterList and FilteredSearch components -
#3384
3633535c
Thanks @joshblack! - Makes @types/styled-components an optional peer dependency, not a dependency -
#3384
3633535c
Thanks @joshblack! - ConfirmationDialog: Use createRoot instead of ReactDOM.render for React 18 compatibility. -
#3384
3633535c
Thanks @joshblack! - Update minimum version for react and react-dom to v18 -
#3384
3633535c
Thanks @joshblack! - RemoveDropdownButton
andDropdownMenu
from deprecated and update the usages across -
#3384
3633535c
Thanks @joshblack! - The Autocomplete component no longer uses the deprecated ActionList component. There have been minor API updates, but it's largely the same. -
#3384
3633535c
Thanks @joshblack! - Removes 'warning' option from form components'validationStatus
props -
#3384
3633535c
Thanks @joshblack! - Remove support foractiveClassName
for Breadcrumb, SubNav, TabNav, UnderlineNav -
#3384
3633535c
Thanks @joshblack! - Ensure ActionList item hasborder-radius
on hover withfull
variant
-
#3384
3633535c
Thanks @joshblack! - Fixes type errors that appeared during v36 development. Likely caused by Button updates -
#3384
3633535c
Thanks @joshblack! - Use IconButton instead of ButtonClose in v1 Dialog. -
#3384
3633535c
Thanks @joshblack! - FilteredActionList now uses new ActionList as a base, and SelectPanel reflects those changes.
-
#3861
85d9e515
Thanks @langermank! - Usebutton
CSS vars for border-color to support a feature flag -
#3862
8cd6007e
Thanks @TylerJDev! - Addsaria-disabled
to inactive pagination buttons.
-
#3839
d463d547
Thanks @joshblack! - Restore Link underline preference to original behavior -
#3836
038a7899
Thanks @xiaolou86! - docs: fix typo
-
#3720
521b02f4
Thanks @mperrotti! - Updates link styles to support underline link preferences. -
#3813
1fcfc478
Thanks @joshblack! - Add support for aref
on the inner in ToggleSwitch
-
#3815
794a477c
Thanks @pksjce! - Update hover styles for ActionList item -
#3691
f4648b19
Thanks @joshblack! - Update ActionList to placeid
on item with an ARIA role -
#3809
6b18eaec
Thanks @gr2m! - exportSelectPanel
from@primer/react/drafts
-
#3683
a84a1498
Thanks @broccolinisoup! - Button: Allow leadingIcon, trailingIcon, trailingAction to be overridable with sx -
#3784
6f4fe7d2
Thanks @radglob! - Revert "Add aria-selected value to ActionList.Item."
-
#3394
9cd50f70
Thanks @broccolinisoup! - Tooltip: Release Tooltip v2 as a draft/experimental -
#3749
b4fe331e
Thanks @thyeggman! - Add suport for sparse sorting to DataTable -
#3581
cc12464d
Thanks @broccolinisoup! - ActionList: Add ActionList.Heading component
-
#3714
88340269
Thanks @iansan5653! - Add support for controlling which sideActionMenu
renders on (via aside
prop onActionMenu.Overlay
) -
#3715
1f889281
Thanks @joshblack! - Add support for leadingVisual and trailingVisual props to Button -
#3739
b90e5476
Thanks @joshblack! - Add the Column type and createColumnHelper function to easily define columns for DataTable -
#3719
500e529d
Thanks @joshblack! - The UnderlineNav, FilterList, and FilteredSearch components will be deprecated in v36 and have been moved to the deprecated entrypoint. To use the new UnderlineNav, migrate to the component available in drafts. -
#3732
8928acc3
Thanks @joshblack! - Add defaulttype="button"
toIconButton
component
-
#3661
25693b08
Thanks @joshblack! - Update thechildren
prop forButton
to be optional -
#3737
a93eca21
Thanks @joshblack! - Restore default main landmark in PageLayout.Content -
#3722
0baa5a7f
Thanks @mattcosta7! - use isomorphic layout effects only
-
#3692
4046e058
Thanks @broccolinisoup! - Octicons: Upgrade react-octicons to v19.7.0 -
#3647
e480a4a4
Thanks @paxos! - Adds onSelectSuggestion callback to -
#3607
c0e22fc1
Thanks @langermank! - Update ActionList checkbox styles to form checkbox styles (impacts ActionMenu and SelectPanel) -
#3632
3a8b841c
Thanks @iansan5653! - Allow consumers to make components that are compatible withFormControl
by reading forwarded props in from theuseFormControlForwardedProps
hook
-
#3675
ade10e64
Thanks @radglob! - PageLayout.Content no longer renders asmain
by default. Instead, developers may add amain
landmark withinPagelayout.Content
themselves. -
#3709
edc0168e
Thanks @mperrotti! - Fixes a bug where children of AvatarStack would still show a transition when the component re-renders with a different number of children. Fixes #3688 -
#3698
d759fd32
Thanks @gracepark! - Adds the defaultOpen prop to NavList.Item -
#3662
2ca670a8
Thanks @joshblack! - Update type exports to prevent missing export warnings -
#3654
556d826a
Thanks @langermank! - Usecontrol
CSS var with fallback for form component border-color -
#3689
5d992715
Thanks @jdrush89! - Fix dialog bug where escape would move focus when dialog was closed
-
#3563
3bb6dc8c
Thanks @radglob! - Add option to specify custom widths for PageLayout.Pane via thewidth
prop.
-
#3619
d4ae582b
Thanks @gr2m! - Includeborder*Color
properties in sx to support named Primer colors -
#3561
94e8d38f
Thanks @joshblack! - Update @react-aria/ssr dependency to ^3.5.0 to address server-side rendering mismatch when using React StrictMode -
#3613
dbcd4072
Thanks @langermank! - [Bug] Removeflex
from Button labels -
#3579
66482a72
Thanks @radglob! - Add aria-selected value to ActionList.Item. -
#3614
709024ff
Thanks @iansan5653! - Automatically repositionInlineAutocomplete
suggestions depending on available space -
#3609
f487a8d6
Thanks @iansan5653! - ExposeuseSlots
fromdrafts/hooks
-
#3611
ace603d8
Thanks @siddharthkp! - NavList: Fix when subNav opens automatically and shows current indicator
-
#3589
d598a53b
Thanks @siddharthkp! - - PageLayout: Undo deprecation ofposition
prop for PageLayout.Pane (Revert #3389)- SplitPageLayout: Undo deprecation of
position
prop for SplitPageLayout.Pane (Revert #3389)
- SplitPageLayout: Undo deprecation of
-
#3510
bdbcfd15
Thanks @camertron! - Implement accessibility audit feedback for ToggleSwitch -
#3466
11b54ac8
Thanks @mperrotti! - Allows consumers to disable the behavior where the AvatarStack expands to show each Avatar on hover. There are also changes that allow users to customize the size of the avatars - even responsively! -
#3390
b4e15b84
Thanks @mperrotti! - The showPages prop on both Pagination components can now accept a responsive value. -
#3496
11cdbdcc
Thanks @joshblack! - Update dependency ranges to use caret ranges instead of pinned versions
-
#3264
5e655203
Thanks @mperrotti! - Adds truncation features to the LabelGroup component:- truncate LabelGroup children after a static number of children (for example, truncate after the 5th label)
- truncate LabelGroup children to fit in the width of the parent
- show full list in an Overlay
- show full list inline
-
#3505
c3f1e3c7
Thanks @siddharthkp! - ActionList: Fix icon and description hover colors for danger variant -
#3520
daee9a9c
Thanks @mattcosta7! - passthrough dom props on toggleswitch -
#3441
90a145cc
Thanks @tomthorogood! - Renders docs.json markdown content -
#3540
a90350cc
Thanks @kendallgassner! - Css styled block fixes -
#3389
57c4bdf9
Thanks @radglob! - Deprecatesposition
prop for PageLayout.Pane and SplitPageLayout.Pane.-<PageLayout> - <PageLayout.Content /> - <PageLayout.Pane position="start" /> -</PageLayout> +<PageLayout> + <PageLayout.Pane /> + <PageLayout.Content /> +</PageLayout>
-
#3490
8d1d5146
Thanks @langermank! - Bug fix: ActionList item label weight and spacing if description exists -
#3361
bea39c24
Thanks @broccolinisoup! - UnderlineNav2: underline nav items' selected state can be managed by the app state -
#3533
33b60551
Thanks @amarmanhala! - Changed div tag to HTML semantic tag header for Header (file Header.tsx) component. -
#3516
33d43459
Thanks @danielguillan! - ActionList: Fixes the width of items for the full variant -
#3517
cf9d8a5e
Thanks @kendallgassner! - Adding aria-attributes and role to the ProgressBar component -
#3539
c02f3a2f
Thanks @mperrotti! - Adds 'display' text size to PRC theme. This size is described in our typography documentation, but was never added to our React theme. -
#3537
311c8c91
Thanks @kendallgassner! - Make checkmark visible on reduced-motion -
#3491
263d5978
Thanks @nicolleromero! - MarkdownViewer: Address scenario in useListInteraction where the position calculation can be incorrect when tasklists appear above legacy task lists -
#3447
40808db7
Thanks @jesskuo4! - [Bug] Leading & Trailing Visual Colors for Button -
#3562
53791841
Thanks @iansan5653! - FixMarkdownEditor
file uploads inserting the URL into the wrong input when an overlay is open -
#3547
7ef802e8
Thanks @mperrotti! - Prevents body scroll when Dialog (the newer Dialog) is open
-
#3446
650a46d5
Thanks @broccolinisoup! - UnderlineNav2: Correct the icon colours to befg.muted
-
#3423
af32ec79
Thanks @japf! - improve performance of the MarkdownEditor component when fullHeight is enabled -
#3437
b298c326
Thanks @mattcosta7! - update icon types and primer octicons -
#3476
379d947e
Thanks @siddharthkp! - ActionMenu: Fix missing divider for first item when the menu is open with mouse -
#3489
c79e78c7
Thanks @adrianababakanian! - Removearia-hidden=true
fromspan
s with required asterisk -
#3196
21fa73cd
Thanks @iansan5653! - FixuseDynamicTextareaHeight
initial render with slots -
#3413
4dc719c4
Thanks @colebemis! - TreeView: Ignore arrow key events when combined with cmd or alt keys to avoid interfering with native browser shortcuts. -
#3411
295c4bcd
Thanks @dusave! - FixDialog2
backdrop color variable -
#3440
99a641bd
Thanks @joshblack! - Add the experimental folder to the npm package for @primer/react
-
#3346
63049234
Thanks @siddharthkp! - ActionMenu: Callingevent.preventDefault
insideonSelect
ofActionList.Item
will prevent the default behavior of closing the menu -
#3276
8abf2688
Thanks @joshblack! - Add experimental Table.ErrorDialog component -
#3244
42a78c11
Thanks @Bestra! - Add pullQueued state to StateLabel -
#3229
c0cbdd08
Thanks @colebemis! - AddminWidth prop to
PageLayout.Paneand
SplitPageLayout.Pane` -
#3343
786013e3
Thanks @mperrotti! - Allows up to 4 levels of nesting in the NavList component. -
#3199
bfd9e0c8
Thanks @joshblack! - Add support for Pagination in DataTable -
#3311
00cf2e3f
Thanks @colebemis! - SelectPanel: Addtitle
prop -
#3148
ac437bb1
Thanks @jonrohan! - Rename component StyledOcticon to Octicon -
#3322
c0b2fcfb
Thanks @colebemis! - SelectPanel: Addsubtitle
prop -
#3295
e71d928c
Thanks @joshblack! - Add @primer/react/experimental entrypoint as an alternative to drafts
-
#3121
3ad56486
Thanks @mperrotti! - Changes the alignment of the validation message icon to be vertically center-aligned with the first line of text. -
#3270
6f2340cc
Thanks @langermank! - Button counter contrast fixes -
#3207
6773b90d
Thanks @colebemis! -MarkdownViewer
is now SSR-compatible -
#3310
5746c746
Thanks @colebemis! - SelectPanel: Addrole="dialog"
to overlay -
#3368
c8095a1d
Thanks @mperrotti! - Correct disabled Button icon fill colors -
#3312
56c9dd2b
Thanks @colebemis! - SelectPanel: Add filter input label and description -
#3332
ff8c6858
Thanks @siddharthkp! - Movelodash.isempty
andlodash.isobject
fromdevDependencies
todependencies
-
#3200
63d8ad6d
Thanks @broccolinisoup! - UnderlineNav2: Add a z-index to make it appear on the top of the stack -
#3350
524120c0
Thanks @langermank! - Loosen@primitives
dependency -
#3300
5d067381
Thanks @jdrush89! - Fixing toggle bug on Treeview when it initially receives focus -
#3277
0ac31da8
Thanks @adrianababakanian! -Pagination
: Use<button>
instead of<span>
for disabled prev/next controls to improve accessibility -
#3262
7f2ddcec
Thanks @mattcosta7! - passthrough form control label props -
#3316
2cf7cdda
Thanks @colebemis! - SelectPanel: Announce changes to screen readers -
#3325
3ece2f6b
Thanks @siddharthkp! - Remove chroma-js dependency. Companion to #3243 -
#3182
7827c711
Thanks @green6erry! - Removed default aria-live polite -
#3291
1378bc1f
Thanks @mattcosta7! - Counter label forwards refs and dom props
-
#3174
d4c6ae5b
Thanks @colebemis! -MarkdownEditor
is now SSR-compatible.Warning: In this new implementation,
MarkdownEditor.Toolbar
,MarkdownEditor.Actions
, andMarkdownEditor.Label
must be direct children ofMarkdownEditor
. -
#3209
a6279536
Thanks @langermank! - Remove--primer
prefix from CSS var -
#3173
6b900e90
Thanks @colebemis! -ActionList
andNavList
are now SSR-compatible.Warning: In this new implementation,
ActionList.LeadingVisual
,ActionList.TrailingVisual,
andActionList.Description
must be direct children ofActionList
. The same applies toNavList
. -
#3198
a273748b
Thanks @langermank! - Bug fix:ButtonGroup
borders show incorrectly on hover
-
#3186
2b147794
Thanks @joshblack! - Modules under an internal export pattern are not able to be imported from outside @primer/react -
#3090
1b8bb16f
Thanks @kendallgassner! - Experimental Support: exporting useResponsiveValue -
#3055
42037c98
Thanks @joshblack! - Add Table.Skeleton component
-
#3124
5b3cf499
Thanks @mattcosta7! - replace createRef with useRef -
#3149
4c2d121f
Thanks @colebemis! -FormControl
is now SSR-compatible.Warning: In this new implementation,
FormControl.Caption
,FormControl.Label
,FormControl.LeadingVisual
, andFormControl.Validation
must be direct children ofFormControl
. -
#3114
f5c7f299
Thanks @radglob! - Adds the option to declare multiple segments in a ProgressBar. -
#3127
5224fcbf
Thanks @siddharthkp! - Suppress SSR warning for useLayoutEffect in NavList, use useIsomorphicLayoutEffect instead of useLayoutEffect -
#3165
d749f495
Thanks @broccolinisoup! - UnderlineNav2: Add transparent outline for focus to support WHCM -
#3120
9e40fdf4
Thanks @simurai! - Bump @primer/primitives to7.11.5
-
#3093
8b5307da
Thanks @simurai! - Bump @primer/primitives to7.11.3
-
#3097
a38c00e6
Thanks @colebemis! -TreeView
is now SSR-compatible.Warning: In this new implementation,
TreeView.LeadingVisual
andTreeView.TrailingView
must be direct children ofTreeView.Item
. -
#3170
1f2df9b7
Thanks @lukasoppermann! - When an inline description is added to the item the normal text is set to bold -
#3160
4b05b19e
Thanks @joshblack! - Update PageLayout.Pane to provide a warning instead of an error when overflow is detected and no label has been provided -
#3094
16cae51a
Thanks @mperrotti! - Fixes styling issue where PointerBox would show a border between the caret and the box if the background color was transparent. -
#3112
bd4e1393
Thanks @langermank! - Adds shadow and color change to IssueLabelToken on hover -
#3146
a19b721c
Thanks @colebemis! -CheckboxGroup
andRadioGroup
are now SSR-compatible.Warning: In this new implementation,
CheckboxGroup.Caption
,CheckboxGroup.Label,
andCheckboxGroup.Validation
must be direct children ofCheckboxGroup
. The same applies toRadioGroup
.
-
#3071
681e2271
Thanks @mperrotti! - Adds a helper component for rendering placeholder text to explain why a DataTable cell has no content. -
#3089
4a6a9f73
Thanks @mperrotti! - Adds the ability to exclose indentation for flat tree views. -
#3011
f8132d8e
Thanks @edersonlucas! - Add thetooltipDirection
property to theTextInput.Action
component to make the tooltip position flexible.
-
#3085
bf8c73b4
Thanks @mperrotti! - Renames DataTable 'shrink' column width to 'growCollapse' -
#3104
e46e33b8
Thanks @iansan5653! - FixIssueLabelToken
treating alternative light schemes as dark
-
#3068
09e11335
Thanks @mperrotti! - Adds text alignment option to columns -
#3012
04d9db02
Thanks @radglob! - AddstabIndex
androle="region"
toPageLayout.Pane
when overflow is detected (scrollHeight > clientHeight). Also requires eitheraria-labelledby
oraria-label
when overflow is detected, and throws an error if neither is defined.
-
#3056
7e4f7714
Thanks @langermank! - Remove incorrect focus styles on ActionList items -
#3061
b71cb1fb
Thanks @broccolinisoup! - Stop renderingactiveClassName
when there is noto
prop is passed for react-router (TabNav, SubNav, BreadCrumb, UnderlineNav v1) -
#3041
e5f13300
Thanks @simurai! - Use open/closed colors forStateLabel
-
#2901
992f1acd
Thanks @joshblack! - Add babel-plugin-dev-expression to transform warning calls in package bundle -
#3027
3153c810
Thanks @talum! - ExportuseResizeObserver
hook
-
#2996
baa63958
Thanks @mperrotti! - Implements column width features for the DataTable -
#3036
51a2cc94
Thanks @colebemis! -PageLayout
andSplitPageLayout
are now SSR-compatible.Warning: In this new implementation,
PageLayout.Header
andPageLayout.Footer
must be direct children ofPageLayout
. The same applies toSplitPageLayout
-
#3029
bb9f1561
Thanks @mperrotti! - Adds new a11y improvements to Pagination. -
#2993
6aa9205e
Thanks @mperrotti! - Makes StateLabel's 'status' prop required -
#3009
cc4e2bc5
Thanks @iansan5653! - Recalculate autocomplete suggestions if the input data changes while the menu is open -
#3010
022d449c
Thanks @broccolinisoup! - SegmentedControl: Resolve axe-violation by adding a discernible text to the icon button and removing the tooltip until it is marked as accessible
-
#2953
91688a41
Thanks @joshblack! - Add Table.Divider and Table.Actions components for Table -
#2985
38ac17a6
Thanks @broccolinisoup! - Hidden: rename prop 'on' -> 'when' -
#2951
eff43b07
Thanks @joshblack! - Add DataTable, Table to drafts entrypoint
-
#2929
ee4b76f8
Thanks @broccolinisoup! - Button: Fixes the style override issue when size is explicitly specified as medium -
#2933
81ed5403
Thanks @langermank! - Bug fix: ButtonGroup hover state causes buttons to shift horizontally -
#2948
0215c969
Thanks @colebemis! - Include story source code ingenerated/components.json
-
#2905
6bf9e677
Thanks @broccolinisoup! - PageHeader: Make default heading levelh2
-
#2973
3a25597a
Thanks @colebemis! - Upgrade @primer/octicons-react dependency to^18.0.0
-
#2910
0c701920
Thanks @iansan5653! - Addisolation:isolate
toButtonGroup
container -
#2843
533f0b4a
Thanks @mperrotti! - Updates the ToggleSwitch styles to be more minimal and less dimensional -
#2702
0121c0f5
Thanks @mperrotti! - Pagination design updates:- Updates spacing inside of the buttons to match the "medium" control metrics: https://primer.style/primitives/spacing#medium
- Updates hover style to align with ActionList items and other elements that may appear on any background color
- Updates ARIA markup to improve assistive technology experience
-
#2974
6a795da6
Thanks @iansan5653! - Fix ellipsis truncation inToken
-
#2925
6f50b156
Thanks @langermank! - Decreaseinvisible
button icon CSS specifity -
#2922
7140ac8f
Thanks @green6erry! - Updated PageLayout.Pane to conditionally include id prop -
#2702
0121c0f5
Thanks @mperrotti! - Updates the visual design of the Pagination component to align with the latest design token usage patterns. Also improves ARIA markup to hide the "..." from assistive technologies. -
#2954
041dd150
Thanks @iansan5653! - AllowReact.ReactNode
asToken
content -
#3004
45107bc5
Thanks @iansan5653! - Add support for custom emojis and a declarative "loading" state inMarkdownEditor
suggestions
-
5967b0a9
Thanks @broccolinisoup! - Issue a deprecation notice for UnderlineNav v1 -
#2815
74df59c4
Thanks @mperrotti! - Addresses feedback from the accessibility team about our SegmentedControl component. These changes include an update to ActionMenu that allows u to specify the ID of the DOM node that labels the menu. -
#2768
5055b91b
Thanks @green6erry! - Confine Heading as prop to header element types -
#2903
13651ba1
Thanks @colebemis! - TreeView promoted to beta status. You can now import it from the main bundle instead of/drafts
:- import {TreeView} from '@primer/react/drafts' + import {TreeView} from '@primer/react'
-
#2792
03b470b0
Thanks @broccolinisoup! - - Add a block prop for full width- Add alignContent prop to align content to center or start for full width buttons
- Use control sizing CSS variable values (not using CSS vars just yet)
- Use height over padding for more control over sizing
- Adjust invisible button variant to match new design using ActionList colors
-
#2868
03ebf41b
Thanks @colebemis! - TreeView: Reliably move focus from loading item to first asynchronously loaded item -
#2845
c31314c8
Thanks @colebemis! - TreeView: When moving focus to TreeView, the current item will be focused by default. -
#2770
3bf1b0e3
Thanks @broccolinisoup! - UnderlineNav2: Handle the case when container is too small to render any items -
d8f18435
Thanks @iansan5653! - Addaria-modal
attribute toDialog
(V2) element -
3127e104
Thanks @jbrown1618! - Upgrade primer/behaviors from 1.3.1 to 1.3.2 -
2a00aab6
Thanks @colebemis! - TreeView: Set aria-selected=true on focused item -
ca7398df
Thanks @broccolinisoup! - CounterLabel: Do not parse children to string for visually hidden content -
#2900
3768cd7d
Thanks @broccolinisoup! - PageHeader: A11y eng review remediations -
8bce9740
Thanks @broccolinisoup! - UnderlineNav2: Update total height of the navigation to48px
-
196a7929
Thanks @iansan5653! - FixuseDynamicTextareaHeight
not taking into account top padding oftextarea
Also makes the hook accept a
RefObject
instead of an element instance -
#2845
c31314c8
Thanks @colebemis! - TabNav: Re-focusing a TabNav will focus the selected tab
-
#2807
81447a10
Thanks @joshblack! - Add defaulttype="button"
forButton
. This removes the implicittype="submit"
for a<button>
and requires an explicittype
to change. -
#2789
44f66cb9
Thanks @green6erry! - warn user if linkas
prop is not or
- #2818
7403a47f
Thanks @iansan5653! - Improve initialuseCombobox
initialization process to avoid race conditions
-
#2732
3f70b2e6
Thanks @renbaoshuo! - Prevent automatic batching updates in ThemeProvider to ensure client use right colorMode -
#2701
73dbefdb
Thanks @mperrotti! - Updates visual design of the Checkbox and Radio component to match the new direction defined by design. -
#2729
4dcf658c
Thanks @broccolinisoup! - PageHeader: Add visual ordering for layout enforcement -
#2710
ac0abd17
Thanks @green6erry! - TreeView: aria status description is now accurate -
#2729
4dcf658c
Thanks @broccolinisoup! - Hidden: Refactor Hidden component to usegetBreakpointsDeclarations
util function to reduce layout shifts -
#2759
693ce68c
Thanks @manuelpuyol! - Update defaultProps to be JS function defaults
-
#2677
d356be83
Thanks @mattcosta7! - update types for button extensions -
#2661
5dd4bb1f
Thanks @joshblack! - Update to React.useId() when using React 18 -
#2694
5a659295
Thanks @broccolinisoup! - PageHeader: export PageHeader in the draft bundle -
#2662
1266b108
Thanks @broccolinisoup! - PageHeader: Add a util function that returns breakpoint styles with the given CSS property and values -
#2593
d8875861
Thanks @radglob! - Make resizable SplitPageLayout.Pane keyboard accessible.
-
#2765
154db4b9
Thanks @iansan5653! - Remove shadow fromMarkdownEditor
textarea
-
#2685
3a8bb765
Thanks @radglob! - Setting overflow: auto without a media query to fix resizable pane bug. -
#2718
9cb01190
Thanks @marywhite! - Prevent default when clicking on MarkdownViewer links with openLinksInNewTab -
#2656
db0db6ec
Thanks @joshblack! - Update useDetailsref
type to HTMLDetailsElement -
#2762
74016a7c
Thanks @mattcosta7! - Token: Update component type to be PolymorphicForwardRefComponent.this avoids types being swallowed by forwardRef (which isn't polymorphic)
-
#2658
20e18c07
Thanks @joshblack! - Update TypeScript types for deprecated ButtonClose to support React 18 -
#2755
dd1e5ce7
Thanks @dwilsonactual! - UpdateisScrollable
utility to only rungetComputedStyle
on scrollable content. -
#2660
1fb6ee9f
Thanks @joshblack! - Update npm package to includedeprecated/package.json
for TypeScript type resolution -
#2721
386561a3
Thanks @simurai! - AddNoto Sans
to fontStack -
#2756
5826b94d
Thanks @broccolinisoup! - Button: Revert new enhancement due to introducing major styling changes -
#2760
24fb9a77
Thanks @broccolinisoup! - Token: OmitonResize
andonResizeCapture
methods that are included in the method expansion and causes type issues in React 18 -
#2757
b55d8232
Thanks @jdrush89! - Making onClick of ActionList.LinkItem functional -
#2697
5efab195
Thanks @keithamus! - Update@github/relative-time-element
package dependency to a range -
#2750
dcb51c64
Thanks @jdrush89! - Show tooltips on focus-within -
#2661
5dd4bb1f
Thanks @joshblack! - Update types for components to work for React 17 and 18
-
#2265
2ef9ad43
Thanks @pksjce! - PageHeader: Draft implementation -
#2484
5eb6939a
Thanks @keithamus! - Add RelativeTime component -
#2657
cc909dc4
Thanks @green6erry! - Assign aria-keyshorcuts and role properties to the correct element in LinkItem.tsx -
#2693
f8939f33
Thanks @broccolinisoup! - Relative Time Element : Publish v4.1.2 in NPM and GPR
-
#2659
84d29977
Thanks @kendallgassner! - Add a console warning if the Button and IconButton as property is used incorrectly -
#2666
d995bb84
Thanks @mattcosta7! - make check for semantic as a compile time effect -
#2639
fd9ab396
Thanks @iansan5653! - FixMarkdownEditor
preview overflowing its container -
#2689
7fc9acd7
Thanks @mperrotti! - Removes useless z-index from the remove button in tokens -
#2635
95ba0790
Thanks @joshblack! - Update Radio to only use disabled when provided and no longer set aria-disabled -
#2640
a8f2289d
Thanks @jdrush89! - TreeView: Add containIntrinsicSize prop and typeahead performance improvement -
#2692
5352bccb
Thanks @jdrush89! - Trigger onSelect when TreeView items are middle clicked
-
#2625
404e2b15
Thanks @broccolinisoup! - UnderlineNav2: Use useIsomorphicLayoutEffect to make it SSR friendly -
#2606
e98bcdf9
Thanks @radglob! - Fix issue where scroll containers nested inside of PageLayout.Pane would be hard to use on mobile.
-
#2591
764bf6b9
Thanks @iansan5653! - AdduseRefObjectAsForwardedRef
to public hooks -
#2618
04683150
Thanks @broccolinisoup! - UnderlineNav2: expose aria-current in the API to enable it to be used as the selected status of UnderlineNav.Item
-
#2592
d9c7290a
Thanks @radglob! - DeleteTreeView.LinkItem
. UseTreeView.Item
and call a navigation function inside theonSelect
callback instead:- <TreeView.LinkItem href="#">... + <TreeView.Item onSelect={() => navigate('#')}>...
-
#2545
eb30fdad
Thanks @joshblack! - Update setTimeout in AutocompleteInput to cancel when unmounting -
#2615
a7455696
Thanks @Swiftwork! - Fix Windows checkout by removing unsupported colon in filename -
#2603
22059e9f
Thanks @broccolinisoup! - UnderlineNav2: Render non-breaking space properly for screen readers -
#2563
3085fde0
Thanks @josepmartins! - Remove deprecated component instances in stories -
#2569
0e7a6388
Thanks @nicolleromero! - Present MarkdownEditor from resizing when rendered in a condensed state -
#2604
7e9e3678
Thanks @broccolinisoup! - Accessibility improvements on CounterLabel for better screen reader announcing
-
#2553
3a4b3124
Thanks @broccolinisoup! - UnderlineNav2: Only allowEnter
andSpace
key to select an UnderlineNav item -
#2506
a20faba0
Thanks @broccolinisoup! - UnderlineNav2: Prevent item width calculation when they are null -
#2549
205e1d29
Thanks @mperrotti! - Adds a focus style to ActionList.LinkItem that is used when the primary input method is a cursor. Before this change, there was only a focus style for when the keyboard is being used as the primary input method. -
#2546
8a8b1a4f
Thanks @joshblack! - Add support for PageUp and PageDown for TreeView -
#2485
e2a2d78c
Thanks @broccolinisoup! - UnderlineNav2: Only run overflow layout function when nav item has a width -
#2552
7877f895
Thanks @broccolinisoup! - UnderlineNav2: Add aria-hidden and sr-only class support for a descriptive "More" button label -
#2550
e13e8ad7
Thanks @broccolinisoup! - UnderlineNav2: Remove focus zone and unnecessary 'Arrow keys' & 'Home' & 'End' button navigation support -
#2551
5bc5c703
Thanks @broccolinisoup! - UnderlineNav2: Add aria-hidden and sr-only class support for descriptive counters -
#2538
bdbccaaf
Thanks @colebemis! - TreeView: Preserve expanded state of nested items when parent item is collapsed.Breaking change
TreeView.Item
andTreeView.LinkItem
now require anid
prop:- <TreeView.Item>...</TreeView.Item> + <TreeView.Item id="unqiue-id">...</TreeView.Item>
This is not in a major release because TreeView is still a
draft
component. -
#2555
dc1cf6da
Thanks @josepmartins! - Remove deprecated components usage in Overlay stories
-
#2510
c326777e
Thanks @langermank! - Remove deprecated focus style primitives -
#2483
23647cfc
Thanks @joshblack! - Add unobserve mock for ResizeObserver in test helpers -
#2504
ea4a3c2a
Thanks @joshblack! - TreeView: Add support for Backspace to move focus to parent item -
#2511
0a94420e
Thanks @joshblack! - Remove selected from<option>
and add defaultValue for<select>
when placeholder is provided -
#2523
50ed6441
Thanks @colebemis! - TreeView: Performance improvements -
#2521
862f93c7
Thanks @colebemis! - TreeView: Fix unexpected scrolling when focusing child items -
#2518
60c36f58
Thanks @colebemis! - TreeView: Remove loading indicator delay
-
#2466
9ff856de
Thanks @broccolinisoup! - UnderlineNav2: Introduce disclosure widget pattern -
#2466
9ff856de
Thanks @broccolinisoup! - UnderlineNav2: Always show at least two items in the overflow menu -
#2352
0c2db835
Thanks @japf! - Add resizable support to the PageLayout component.
-
#2502
6199b10c
Thanks @joshblack! - Add maxWidth to container of PageLayout.{Pane, Content} -
#2490
776fb958
Thanks @colebemis! - ConfirmationDialog: Remove header landmark to improve accessibility -
#2492
cbf0ccfe
Thanks @joshblack! - Add support for aria-current styles in high contrast mode for TreeView -
#2317
a60f0f8d
Thanks @willglas! - useMnemonics hook ignores keydown events from textarea elements -
#2467
d396c89a
Thanks @josepmartins! - Align status components table to primer.style/status table -
#2509
cbcc0225
Thanks @joshblack! - Update FormControl to correctly render Checkbox labels -
#2487
6a30812c
Thanks @lukasoppermann! - fixes colors for done and sponsors label -
#2493
7ea92ab4
Thanks @nicolleromero! - Address scenario in useLinkInterception where onLinkClick was not being called when the DOM was updated outside of React -
#2359
b05fa743
Thanks @joshblack! - UpdateButton
to only spread additionalprops
onto underlying<button>
element. -
#2466
9ff856de
Thanks @broccolinisoup! - UnderlineNav2: Render a visually hidden heading for screen readers when aria-label is present
-
#2447
e03b5e4d
Thanks @broccolinisoup! - UnderlineNav2: Add support and docs for react router configuration -
#2447
e03b5e4d
Thanks @broccolinisoup! - UnderlineNav2: Deprecate coarse input detection and its scroll behaviour
-
#2465
2cd11b7d
Thanks @colebemis! - TreeView: Add aria-atomic attribute to live region -
#2478
7cbb5c98
Thanks @joshblack! - Add support for dynamic aria-expanded support on TreeView.Item -
#2445
6a1a2bdc
Thanks @mattcosta7! - fixes types for Button -
#2464
d68f5ff6
Thanks @colebemis! - TreeView: Fix scroll behavior when focus changes -
#2460
1f25c904
Thanks @colebemis! - TreeView: Improve performance when rendering lots of items -
#2455
77c0259b
Thanks @joshblack! - TreeView: Add support for a skeleton state with the TreeView.SubTreecount
prop -
#2452
aca96c0d
Thanks @colebemis! - TreeView: AddTreeView.ErrorDialog
component -
#2447
e03b5e4d
Thanks @broccolinisoup! - UnderlineNav2: Add string type to thecounter
prop and display loading counter for all -
#2468
9dcf61b6
Thanks @joshblack! - Change focus strategy for TabNav after initial focus is set
-
#2435
e335cc4b
Thanks @colebemis! - SplitPageLayout has moved from@primer/react/drafts
to@primer/react
:- import {SplitPageLayout} from '@primer/react/drafts' + import {SplitPageLayout} from '@primer/react'
- #2428
7ad9e77d
Thanks @joshblack! - Update TreeView focus ring styles and call event.preventDefault() in arrow key events
- #2444
2b6323ca
Thanks @colebemis! - Dialog: Remove landmark elements to improve accessibility
- #2429
e7802ed9
Thanks @colebemis! - TreeView: Addstate
prop toTreeView.SubTree
component
- #2432
99309e00
Thanks @joshblack! - Update useStickyPaneHeight and useMedia to not warn during SSR
- #2433
a08997b3
Thanks @joshblack! - Update TreeView hover and focus styles to work in Windows High Contrast Mode
- #2446
e00d03c1
Thanks @colebemis! - TreeView: Use correct design tokens and icons
- #2429
e7802ed9
Thanks @colebemis! - TreeView: Improve accessibility of async items
- #2434
57c3b4d8
Thanks @joshblack! - Add support for labels in TreeView.LeadingVisual and TreeView.TrailingVisual
- #2360
0f41dfec
Thanks @joshblack! - Update types to support TypeScript v4.8.3
- #2326
31bbec8c
Thanks @joshblack! - Update the sticky layout algorithm for PageLayout and PageLayout.Pane
- #2442
6b559a97
Thanks @joshblack! - Inline ESM-only dependencies in CommonJS bundle
- #2443
3012faec
Thanks @colebemis! - TreeView: Use roving tabindex instead ofaria-activedescendant
for improved VoiceOver support in Safari
- #2378
c35c2ac9
Thanks @broccolinisoup! - UnderlineNav2: Introducing loading states for counters
- #2361
ba7cf923
Thanks @broccolinisoup! - UnderlineNav2: Introduce "keeping the selected item always visible" functionality
- #2297
cad2bc0c
Thanks @broccolinisoup! - UnderlineNav2: Introducing overflow behavior for fine and coarse pointer devices
- #2366
13b44608
Thanks @joshblack! - Update "exports" config to use "import" and "require" for ESM and CommonJS bundles
- #2367
252a605d
Thanks @iansan5653! - Remove non-tab elements fromTabNav
focus zone
- #2368
aeb6152c
Thanks @iansan5653! - AddpasteUrlsAsPlainText
prop to control URL pasting behavior inMarkdownEditor
- #2388
d459364a
Thanks @colebemis! - TreeView: AddTreeView.LoadingItem
component
- #2375
96f3b8a1
Thanks @colebemis! - TreeView: Fix focus styles in styled-components v5.2+
- #2258
270157a6
Thanks @josepmartins! - Add new accessible frontmatter variable
- #2408
c639acb0
Thanks @mattcosta7! - fix react 18 typing for MarkdownEditor.Label
- #2251
4a4e47c0
Thanks @joshblack! - Add support for the dvh unit inPageLayout
in order to correctly display pane contents on iOS devices
- #2323
9c0c1078
Thanks @joshblack! - UpdateButtonBase
to minimize re-renders through stablesx
prop values
- #2357
143286ed
Thanks @colebemis! - Add support for typeahead search of items in a TreeView
- #2391
845001b1
Thanks @joshblack! - Update the files field in package.json to include all package artifacts
- #2424
09728c91
Thanks @iansan5653! - FixMarkdownEditor
suggestions filtering bug and allow lazy-loading suggestions
- #2327
df2a834c
Thanks @joshblack! - [Internal] Update build process to userollup
. This change should be transparent as generated entrypoints remain the same
- #2376
33ba836f
Thanks @colebemis! - TreeView: Increase touch target size for coarse pointers
- #2404
1d1d07b7
Thanks @joshblack! - Update bundle to not inline @github dependencies
- #2419
64f719f1
Thanks @joshblack! - Refactor rollup to support all lib-esm/* export patterns and include utils entrypoint
- #2373
e4af7a74
Thanks @colebemis! - TreeView: Allow expanded state to be controlled
- #2383
81013a7d
Thanks @colebemis! - TreeView: Add support for leading and trailing visuals
- #2406
96b004b7
Thanks @broccolinisoup! - UnderlineNav2: Address accessibility feedback and re-style arrow buttons for scroll behaviour
- #2347
09a5d806
Thanks @mperrotti! - Adds asize
prop to the SegmentedControl component. Users can choose between 'medium' (default), and 'small'. More sizes can be added when/if we find we need them.
- #2324
027e44a7
Thanks @joshblack! - Update PageLayout.Pane to support a ref on the element wrapping children
- #2355
e052644d
Thanks @mperrotti! - Fixes the sx prop on the SegmentedControl buttons by properly merging the sx prop when cloning button children.
- #2305
6cd50a54
Thanks @colebemis! - Add draft TreeView component
- #2350
61a93e20
Thanks @colebemis! - Adds lines to indicate the depth of items in a TreeView
- #2331
31b8804c
Thanks @colebemis! - Adds support for arrow key navigation of a TreeView usingaria-activedescendant
- #2338
68c49803
Thanks @broccolinisoup! - Reverted SelectPanel breaking behavioral changes
- #2348
c76e1610
Thanks @colebemis! - Add acurrent
prop toTreeView.Item
andTreeView.LinkItem
- #2356
e2fb2fca
Thanks @nicolleromero! - MarkdownViewer bug fix: Only runreplaceChildren
whenhtmlContainer
changes
- #2294
4536b87a
Thanks @joshblack! - Add support foraria-label
andaria-labelledby
toPageLayout
- #2262
3ec0c9db
Thanks @broccolinisoup! - RenamestickyTop
prop name for the PageLayout tooffsetHeader
and improve docs
- #2277
cc88235e
Thanks @broccolinisoup! - UnderlineNav.Link renamed to UnderlineNav.Item along with updated styles
- #2266
4cc6e52a
Thanks @siddharthkp! - ActionMenu: Fix keyboard navigation for ActionMenu inside Overlay by re-enabling focus trap. It was disabled in v35.6.0, that led to a regression for ActionMenu within focus zones (example: AnchoredOverlay)
- #2252
e52415e1
Thanks @joshblack! - Update ButtonBase.tsx to memoize calls to styles to improve performance
- #2318
10305092
Thanks @iansan5653! - - FixInlineAutocomplete
accessibility hint affecting page layout outside of the suggestions- Fix suggestion icons not being visible in
InlineAutocomplete
items
- Fix suggestion icons not being visible in
- #2206
3a38e6e3
Thanks @maximedegreve! - Add missing border on avatars
- #2294
4536b87a
Thanks @joshblack! - Change the default markup ofPageLayout.Pane
from<aside>
to<div>
- #2259
0383f1ae
Thanks @joshblack! - Add support for'dark'
and'light'
incolorMode
for ThemeProvider
- #2260
88b8c0e7
Thanks @iansan5653! - Add hooks indrafts/hooks
to@primer/react/drafts
exports
- #2236
8cc0efef
Thanks @iansan5653! - FixMarkdownViewer
doc examples, add Cmd/Ctrl+Shift+P shortcut for togglingMarkdownEditor
view mode, and strictly limit the type of theref
passed toMarkdownEditor
.
- #2242
d46ae9f3
Thanks @broccolinisoup! - Remove z-index assignment that used to be necessary for the dropdown children of FilteredSearch
- #2188
8fc2e422
Thanks @siddharthkp! - Support React.ReactNode as child type in ActionMenu.Overlay
- #2232
a0fcce61
Thanks @broccolinisoup! - Add astickyTop
prop, the height of a sticky header, to thePageLayout.Pane
to push the pane down for the sticky header when necessary.
- #2228
bf99db99
Thanks @mperrotti! - Moves SegmentedControl to the main bundle and updates it's lifecycle status to "Alpha"
- #2239
041d6d0e
Thanks @colebemis! - Add draftSplitPageLayout
component
- #2244
cf6f0e6b
Thanks @iansan5653! - Inline the@koddson/textarea-caret
dependency to fix non-ESM builds
- #2191
7edf1347
Thanks @mperrotti! - Adds responsive behavior to SegmentedControl'sfullWidth
prop.
-
#2174
62dbc981
Thanks @colebemis! - Add a responsivehidden
prop toPageLayout.Header
,PageLayout.Pane
,PageLayout.Content
, andPageLayout.Footer
that allows you to hide layout regions based on the viewport width. Example usage:// Hide pane on narrow viewports <PageLayout.Pane hidden={{narrow: true}}>...</PageLayout.Pane>
-
#2199
fb385b63
Thanks @colebemis! - * Updated theposition
prop inPageLayout.Pane
to use the new responsive prop API introduced in #2174.- Deprecated the
positionWhenNarrow
prop in favor of the new responsive prop API
Before
position="start" positionWhenNarrow="end"
After
position={{regular: 'start', narrow: 'end'}}
- Deprecated the
- #2201
885064ed
Thanks @colebemis! - Addpadding
prop toPageLayout.Header
,PageLayout.Content
,PageLayout.Pane
, andPageLayout.Footer
- #2164
2b5c86e5
Thanks @mperrotti! - Adds support for a responsive 'variant' prop to the SegmentedControl component
-
#2212
04d9d9c1
Thanks @colebemis! - Add asticky
prop to thePageLayout.Pane
component that provides a convenient way for you to make side panes sticky:<PageLayout> - <PageLayout.Pane>...</PageLayout.Pane> + <PageLayout.Pane sticky>...</PageLayout.Pane> <PageLayout.Content>...</PageLayout.Content> </PageLayout>
-
#2198
4d9b7db9
Thanks @colebemis! - * Updated thedivider
prop inPageLayout.Header
,PageLayout.Pane
, andPageLayout.Footer
to use the new responsive prop API introduced in #2174.- Deprecated the
dividerWhenNarrow
prop in favor of the new responsive prop API
Before
divider="line" dividerWhenNarrow="filled"
After
divider={{regular: 'line', narrow: 'filled'}}
- Deprecated the
- #2024
5321f1c9
Thanks @siddharthkp! - ActionMenu: Remove focus trap to enable Tab and Shift+Tab behavior and fix initial focus on click
- #2186
e28aadbd
Thanks @mperrotti! - Updates SegmentedControl styles to use component primitives.
- #2171
384ae6b9
Thanks @anleac! - Support issues closed as not planned, and correct the standard issue closed backgroud colour
- #2157
77e7ab05
Thanks @iansan5653! - AddInlineAutocomplete
component,useCombobox
hook, anduseSyntheticChange
hook to drafts
- #2189
35716587
Thanks @mperrotti! - Makes SegmentedControl uncontrolled by default.
- #2196
5ff5bb81
Thanks @mattcosta7! - update types to allow children for react 18
- #2219
af534f15
Thanks @iansan5653! - Fix slots infinite rendering when nocontext
prop is provided
- #2182
47725a92
Thanks @iansan5653! - - AddMarkdownEditor
andMarkdownViewer
draft components. TheMarkdownEditor
is also known as theCommentBox
component- Add
useUnifiedFileSelect
,useIgnoreKeyboardInputWhileComposing
,useDynamicTextareaHeight
, anduseSafeAsyncCallback
draft hooks
- Add
- #2173
ed609719
Thanks @mperrotti! - Updates styles for the Select component so that the focus outline is even all the way around.
- #2216
82fd8c35
Thanks @iansan5653! - ChangecreateSlots
to use layout effects when registering slots
- #2185
3756a1ed
Thanks @mattcosta7! - Set ConfirmationDialog initial focus based on the confirmationButtonVariant. Whendanger
autoFocus the cancel button, otherwise autoFocus the confirmation button
- #2166
75d21745
Thanks @mattcosta7! - button should be polymorphic
- #2220
f4ef7b4b
Thanks @mperrotti! - - Fixesrole
and keyboard behavior for SegmentedControl.- Fixes a bug where icon-only SegmentedControl buttons did not fill the parent width when the
fullWidth
prop was set - Fixes a bug where click handlers were not passed correctly when the responsive variant was set to
'hideLabels'
- Fixes a bug where icon-only SegmentedControl buttons did not fill the parent width when the
- #2204
522f5806
Thanks @iansan5653! - ReplaceuseCombinedRefs
withuseRefObjectAsForwardedRef
- #2221
9ce64937
Thanks @josepmartins! - Overlay documentation fixes
- #2180
300025d1
Thanks @mattcosta7! - Update the primer/primitives dependency
- #2145
a2950ac4
Thanks @mperrotti! - Updates SegmentedControl component's keyboard navigation to align with the recommendations of GitHub's accessibility team.
- #2143
d9b161a0
Thanks @mperrotti! - Fixes bugs in form components discovered while fixing/improving Storybook and docs.
- #2108
e5be3db3
Thanks @mperrotti! - Adds a draft component to render a basic segmented control.
- #2139
f17446e0
Thanks @owenniblock! - Changes focus rules of TabNav to match WAI-ARIA rules for tablist
- #2099
40da598e
Thanks @siddharthkp! - AnchoredOverlay:aria-expanded
attribute is removed from anchor when overlay is not open
- #2155
003cbcf0
Thanks @mperrotti! - Update Checkbox component to useIsomorphicLayoutEffect instead of useLayoutEffect to support SSR
- #2154
96ad635b
Thanks @mperrotti! - Allow "falsely/empty" Autocomplete.Input values
- #2105
c7bbd06f
Thanks @siddharthkp! - ActionMenu: Replace typeahead behavior with single key mnemonics
- #2125
78dc8134
Thanks @owenniblock! - Adds roles of tablist and tab to the TabNav component, required rearranging the HTML elements to be semantically correct
-
#2120
53713b2f
Thanks @colebemis! - Deprecate SideNav in favor of NavList.<SideNav aria-label="Main"> <SideNav.Link href="/" selected> Home </SideNav.Link> <SideNav.Link href="/about">About</SideNav.Link> <SideNav.Link href="/contact">Contact</SideNav.Link> </SideNav>
<NavList aria-label="Main"> <NavList.Item href="/" aria-current="page"> Home </NavList.Item> <NavList.Item href="/about">About</NavList.Item> <NavList.Item href="/contact">Contact</NavList.Item> </NavList>
- #2133
65fcd9f2
Thanks @mattcosta7! - Passthrough ActionList.Group props from NavList.Group
- #2158
ac92de47
Thanks @owenniblock! - Fixes issue when tabs are not links
-
#2112
74e1d138
Thanks @colebemis! - NavList is ready to use. You can now import it from the main bundle:import {NavList} from '@primer/react'
-
#2083
ea69ccd6
Thanks @ty-v1! - Export new Dialog component from the@primer/react/drafts
bundle:- import {Dialog} from '@primer/react/lib-esm/Dialog/Dialog' + import {Dialog} from '@primer/react/drafts'
- #2095
db5e629c
Thanks @hectahertz! - Communicate the SelectPanel multi-select capability to assistive technologies.
- #2058
ab30f14a
Thanks @colebemis! - Add draft ofNavList
component
- #2038
1c2eeb9c
Thanks @mperrotti! - Fixes accessibility bugs in the Select component.
- #2076
05301033
Thanks @colebemis! - DraftNavList.Item
now accepts anas
prop, allowing it to be rendered as a Next.js or React Router link
- #2082
3252b74c
Thanks @mperrotti! - Fixes broken links in the documentation
-
#2075
56dbbd32
Thanks @colebemis! - Fix overflow issues inPageLayout.Content
Before After
- #2087
b319b29d
Thanks @mperrotti! - Prevents theonRemove
prop from being passed through to the HTML element from Token, AvatarToken, and IssueToken.
- #2077
30f93ffb
Thanks @colebemis! - Adds support for thesx
prop on the draft implementation ofNavList
and all its subcomponents (e.g.,NavList.Item
)
- #2050
0f9edcac
Thanks @mperrotti! - Finishes updating components with the global focus styles defined in Primer CSS (this PR)
- #2054
a682735f
Thanks @colebemis! - Fixes layout bug with ButtonGroup by changing thedisplay
property frominline-block
toinline-flex
- #2064
62d90af8
Thanks @colebemis! - Add support for sub-items in draft implementation of NavList
- #2057
c8f7e235
Thanks @mperrotti! - - addscolor-scheme
style to inputs so they get the correct user-agent dark/light styles- crops ToggleSwitch knob's shadow inside the toggle switch boundaries
- changes FormControl styles to prevent
<select>
,<textarea>
,<input>
from filling the parent's width when theblock
prop has not been passed to the input component
- #2048
4e15985b
Thanks @siddharthkp! - ThemeProvider: Bug fix, incolorMode=auto
, the theme now syncs with system changes.
- #2013
5f6c5e22
Thanks @mperrotti! - 1. Fix a spacing issue with the loading spinner in aTextInputWithTokens
2. Bolds form validation text to be visually balanced with the icon
- #2053
231c70b9
Thanks @langermank! - Namespace UnderlineNav
- #2033
0d7a871a
Thanks @mperrotti! - - Text input inner action's hover bg should not touch the text input edges- Increases touch target area of the text input inner action button
- Deprecated
children
andvariant
props on theTextInputInnerAction
component, but they're still supported for now.
- #1947
edc85c96
Thanks @mperrotti! - Adds the option to render a trailing action inside of the TextInput component
- #1933
ae7650f1
Thanks @mperrotti! - Adds a toggle switch component
- #1973
adbcd3bf
Thanks @colebemis! - ThePageLayout
component now renders HTML5 landmark elements (header
,aside
,footer
) to improve the navigation experience for people using assistive technologies (like screen readers)
- #1998
cd8a5bb3
Thanks @mperrotti! - Updates the API for token components to align with our size-naming ADR, avatar guidelines, and icon guidelines
- #1942
3f50ef54
Thanks @mperrotti! - Adds button element selector to FilteredSearch button styles
- #1920
40ed423e
Thanks @mperrotti! - Adds a loadings state to our text input components
- #1970
3b236044
Thanks @siddharthkp! - ActionMenu: Fix styles for windows high contrast mode
- #1981
e9bb5956
Thanks @mperrotti! - Ensures select option text has acceptable contrast in Firefox when in dark mode
- #1945
ef3b58a1
Thanks @pksjce! - Icon button fixes: Removes iconLabel and adds aria-label to the type
- #1959
2025036e
Thanks @colebemis! - FixTextInput
types
- #1968
1b01485a
Thanks @mperrotti! - Instead of rendering unexpected FormControl children before the rest of the content, we render them in the same spot we'd normally render a Primer input component
- #1958
be8f9014
Thanks @siddharthkp! - ActionList: Add focus styles for Windows high contrast mode ActionList: Fix incorrect role for ActionList.Group outside ActionMenu
- #1949
e430bd8b
Thanks @colebemis! -FormControl
now accepts aref
prop
- #1960
26c7784d
Thanks @colebemis! - Checkbox:value
prop is now optional
-
#1893
17ef5ef8
Thanks @siddharthkp! -⚠️ 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) <ActionList items={[ {text: 'New file'}, {text: 'Copy link'}, {text: 'Edit file'}, ActionList.Divider, {text: 'Delete file', variant: 'danger'}, ]} />
<ActionList> <ActionList.Item>New file</ActionList.Item> <ActionList.Item>Copy link</ActionList.Item> <ActionList.Item>Edit file</ActionList.Item> <ActionList.Divider /> <ActionList.Item variant="danger">Delete file</ActionList.Item> </ActionList>
<ActionList showItemDividers items={[ { key: '0', leadingVisual: LinkIcon, text: 'github/primer', }, { key: '1', leadingVisual: () => <Avatar src="https://github.com/mona.png" />, text: 'mona', description: 'Monalisa Octocat', descriptionVariant: 'block', }, { key: '2', leadingVisual: GearIcon, text: 'View Settings', trailingVisual: ArrowRightIcon, }, ]} />
<ActionList showDividers> <ActionList.Item> <ActionList.LeadingVisual> <LinkIcon /> </ActionList.LeadingVisual> github/primer </ActionList.Item> <ActionList.Item> <ActionList.LeadingVisual> <Avatar src="https://github.com/mona.png" /> </ActionList.LeadingVisual> mona <ActionList.Description variant="block">Monalisa Octocat</ActionList.Description> </ActionList.Item> <ActionList.Item> <ActionList.LeadingVisual> <GearIcon /> </ActionList.LeadingVisual> View settings <ActionList.TrailingVisual> <ArrowRightIcon /> </ActionList.TrailingVisual> </ActionList.Item> </ActionList>
<ActionList groupMetadata={[ {groupId: '0', header: {title: 'Live query'}}, {groupId: '1', header: {title: 'Layout'}}, ]} items={[ {key: '0', text: 'repo:github/github', groupId: '0'}, {key: '1', text: 'Table', groupId: '1'}, {key: '2', text: 'Board', groupId: '1'}, {key: '3', text: 'View settings'}, ]} />
<ActionList> <ActionList.Group title="Live query"> <ActionList.Item>repo:github/github</ActionList.Item> </ActionList.Group> <ActionList.Divider /> <ActionList.Group title="Layout"> <ActionList.Item>Table</ActionList.Item> <ActionList.Item>Board Description</ActionList.Item> </ActionList.Group> <ActionList.Divider /> <ActionList.Item>View settings</ActionList.Item> </ActionList>
To continue to use the deprecated API for now, change the import path to
@primer/react/deprecated
:import {ActionList} from '@primer/react/deprecated'
You can use the one-time codemod to change your import statements automatically.
-
#1883
310e6553
Thanks @siddharthkp! -ActionList2
exported types are now prefixed withActionList
:ListProps → ActionListProps GroupProps → ActionListGroupProps ItemProps → ActionListItemProps DescriptionProps → ActionListDescriptionProps LeadingVisualProps → ActionListLeadingVisualProps, TrailingVisualProps → ActionListTrailingVisualProps
ActionMenu2
exported types are now prefixed withActionMenu
:MenuButtonProps → ActionMenuButtonProps MenuAnchorProps → ActionMenuAnchorProps
-
#1897
d4023572
Thanks @siddharthkp! -⚠️ ActionMenu has been rewritten with a composable API, design updates and accessibility fixes.See full list of props and examples: https://primer.style/react/ActionMenu
Main changes:
- Instead of using
items
prop, useActionList
insideActionMenu
- Instead of using
anchorContent
onActionMenu
, useActionMenu.Button
withchildren
- Instead of using
onAction
prop onActionMenu
, useonSelect
prop onActionList.Item
- Instead of using
groupMetadata
onActionMenu
, useActionList.Group
- Instead of
overlayProps
onActionMenu
, useActionMenu.Overlay
Before (v34) After (v35) <ActionMenu anchorContent="Menu" onAction={fn} items={[ {text: 'New file'}, {text: 'Copy link'}, {text: 'Edit file'}, ActionMenu.Divider, {text: 'Delete file', variant: 'danger'}, ]} overlayProps={{width: 'small'}} />
<ActionMenu> <ActionMenu.Button>Menu</ActionMenu.Button> <ActionMenu.Overlay width="small"> <ActionList> <ActionList.Item onSelect={fn}>New file</ActionList.Item> <ActionList.Item>Copy link</ActionList.Item> <ActionList.Item>Edit file</ActionList.Item> <ActionList.Divider /> <ActionList.Item variant="danger">Delete file</ActionList.Item> </ActionList> </ActionMenu.Overlay> </ActionMenu>
To continue to use the deprecated API for now, change the import path to
@primer/react/deprecated
:import {ActionMenu} from '@primer/react/deprecated'
You can use the one-time codemod to change your import statements automatically.
- Instead of using
-
#1898
d6d1ca4c
Thanks @siddharthkp! -⚠️ DropdownMenu has been deprecated in favor of ActionMenu with ActionListSee example with selection: https://primer.style/react/ActionMenu#with-selection
Migration guide:
- Instead of using
items
prop, useActionList
insideActionMenu
- Use
selectionVariant="single"
onActionList
to set the right semantics for selection - Instead of using
selectedItem
prop, useselected
prop onActionList.Item
- Instead of using
renderAnchor
andplaceholder
props onDropdownMenu
, useActionMenu.Button
orActionMenu.Anchor
- Instead of using
onChange
prop onDropdownMenu
, useonSelect
prop onActionList.Item
- Instead of using
groupMetadata
onDropdownMenu
, useActionList.Group
- Instead of
overlayProps
onDropdownMenu
, useActionMenu.Overlay
Before (v34) After (v35) 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 ( <DropdownMenu renderAnchor={({children, ...anchorProps}) => ( <ButtonInvisible {...anchorProps}> {children} <GearIcon /> </ButtonInvisible> )} placeholder="Field type" items={fieldTypes} selectedItem={selectedType} onChange={setSelectedType} overlayProps={{width: 'medium'}} /> ) }
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( <ActionMenu> <ActionMenu.Button aria-label="Select field type">{selectedType.name || 'Field type'}</ActionMenu.Button> <ActionMenu.Overlay width="medium"> <ActionList selectionVariant="single"> {fieldTypes.map(type => ( <ActionList.Item key={type.id} selected={type.id === selectedType.id} onSelect={() => setSelectedType(type)} > {type.name} </ActionList.Item> ))} </ActionList> </ActionMenu.Overlay> </ActionMenu>, ) }
To continue to use the deprecated API for now, change the import path to
@primer/react/deprecated
:import {DropdownMenu} from '@primer/react/deprecated'
You can use the one-time codemod to change your import statements automatically.
⚠️ DropdownMenu2 has been removed in favor of ActionMenu with ActionList - Instead of using
-
#1889
e9b81fae
Thanks @mperrotti! -The Label component's API and visual design have been updated to be consistent with its counterpart in Primer ViewComponents' Label component.
⚠️ Major changes in the new Label component:- No more
medium
size - onlysmall
andlarge
- Labels are outlined by default, so the
outline
prop has been removed - Custom text and background colors are discouraged, but still possible via the
sx
prop
If you were using the
Label
component to render issue/PR labels, use the IssueLabelToken component instead.Before (v34) After (v35) import {Label} from '@primer/react' function Example() { return ( <> <Label outline>default</Label> <Label variant="small" outline sx={{borderColor: 'danger.emphasis', color: 'danger.fg'}}> danger </Label> </> ) }
import {Label} from '@primer/react' function Example() { return ( <> <Label>default</Label> <Label size="small" variant="danger"> danger </Label> </> ) }
To continue to use the deprecated API for now, change the import path to
@primer/react/deprecated
:import {Label} from '@primer/react/deprecated'
You can use the one-time codemod to change your import statements automatically.
- No more
-
#1908
61404aed
Thanks @pksjce! -Before
v35
,Button
was a set of seven independent components. Inv35
, we've simplified theButton
API.We now support a variant property which takes values
primary
,invisible
,outline
anddanger
Before (v34) After (v35) import {ButtonPrimary, ButtonInvisible, ButtonOutline, ButtonDanger} from '@primer/react' function Example() { return ( <> <ButtonPrimary>Primary Button</ButtonPrimary> <ButtonInvisible>Invisible Button</ButtonInvisible> <ButtonOutline>Outline Button</ButtonOutline> <ButtonDanger>Danger Button</ButtonDanger> </> ) }
import {Button} from '@primer/react' function Example() { return ( <> <Button variant="primary">Primary Button</Button> <Button variant="invisible">Invisible Button</Button> <Button variant="outline">Outline Button</Button> <Button variant="danger">Danger Button</Button> </> ) }
Previously including icons inside buttons required a lot of custom styling. In the new
Button
component, we now support first-classleadingIcon
andtrailingIcon
props:Before (v34) After (v35) <Button> <SearchIcon /> Search </Button>
<Button leadingIcon={SearchIcon}>Search</Button>
Icon-only buttons are common in many applications. We now have a component designed for this use-case:
Before (v34) After (v35) <Button> <XIcon /> </Button>
<IconButton aria-label="Close button" icon={XIcon} />
Previously, we used a
variant
prop to set the size of buttons. We now have a prop calledsize
which is more semantically correct.Before (v34) After (v35) <Button variant="small">Small button</Button>
<Button size="small">Small button</Button>
-
#1900
d61b28ad
Thanks @mperrotti! -⚠️ TheCheckboxGroup
andRadioGroup
components are replacing theChoiceFieldset
component.CheckboxGroup
andRadioGroup
have the ability to render contextual content with your fieldset: labels, validation statuses, captions. They also handle the ARIA attributes that make the form controls accessible to assistive technology.Before (v34) After (v35) import {ChoiceFieldset} from '@primer/react' function Example() { return ( <> {/* Multi-select */} <ChoiceFieldset> <ChoiceFieldset.Legend>Preferred Primer component interface</ChoiceFieldset.Legend> <ChoiceFieldset.List selectionVariant="multiple"> <ChoiceFieldset.Item value="figma">Figma library</ChoiceFieldset.Item> <ChoiceFieldset.Item value="css">Primer CSS</ChoiceFieldset.Item> <ChoiceFieldset.Item value="react">Primer React components</ChoiceFieldset.Item> <ChoiceFieldset.Item value="viewcomponents">Primer ViewComponents</ChoiceFieldset.Item> </ChoiceFieldset.List> </ChoiceFieldset> {/* Single select */} <ChoiceFieldset> <ChoiceFieldset.Legend>Preferred Primer component interface</ChoiceFieldset.Legend> <ChoiceFieldset.List> <ChoiceFieldset.Item value="figma">Figma library</ChoiceFieldset.Item> <ChoiceFieldset.Item value="css">Primer CSS</ChoiceFieldset.Item> <ChoiceFieldset.Item value="react">Primer React components</ChoiceFieldset.Item> <ChoiceFieldset.Item value="viewcomponents">Primer ViewComponents</ChoiceFieldset.Item> </ChoiceFieldset.List> </ChoiceFieldset> </> ) }
import {CheckboxGroup, RadioGroup, FormControl, Checkbox, Radio} from '@primer/react' function Example() { return ( <> {/* Multi-select */} <CheckboxGroup> <CheckboxGroup.Label>Preferred Primer component interface</CheckboxGroup.Label> <FormControl> <Checkbox value="figma" /> <FormControl.Label>Figma</FormControl.Label> </FormControl> <FormControl> <Checkbox value="css" /> <FormControl.Label>CSS</FormControl.Label> </FormControl> <FormControl> <Checkbox value="react" /> <FormControl.Label>Primer React components</FormControl.Label> </FormControl> <FormControl> <Checkbox value="viewcomponents" /> <FormControl.Label>Primer ViewComponents</FormControl.Label> </FormControl> </CheckboxGroup> {/* Single select */} <RadioGroup name="preferred-primer"> <RadioGroup.Label>Preferred Primer component interface</RadioGroup.Label> <FormControl> <Radio value="figma" /> <FormControl.Label>Figma</FormControl.Label> </FormControl> <FormControl> <Radio value="css" /> <FormControl.Label>CSS</FormControl.Label> </FormControl> <FormControl> <Radio value="react" /> <FormControl.Label>Primer React components</FormControl.Label> </FormControl> <FormControl> <Radio value="viewcomponents" /> <FormControl.Label>Primer ViewComponents</FormControl.Label> </FormControl> </RadioGroup> </> ) }
To continue to use the deprecated API for now, change the import path to
@primer/react/deprecated
:import {ChoiceFieldset} from '@primer/react/deprecated'
You can use the one-time codemod to change your import statements automatically.
-
#1882
df757521
Thanks @colebemis! -PageLayout
is being graduated from thedrafts
bundle to themain
bundle.To upgrade, rewrite your imports accordingly:
- import {PageLayout} from '@primer/react/drafts' + import {PageLayout} from '@primer/react'
-
#1888
f94dcd33
Thanks @mperrotti! -⚠️ TheFormControl
component is replacing theFormGroup
,InputField
, andChoiceInputField
components. It has the ability to render contextual content with your inputs: labels, validation statuses, captions. It also handles the ARIA attributes that make the form controls accessible to assistive technology.Before (v34) After (v35) import {FormControl, Checkbox, TextInput} from '@primer/react' function Example() { return ( <> <FormGroup> <FormGroup.Label htmlFor="example-text">Example text</FormGroup.Label> <TextInput id="example-text" /> </FormGroup> {/* OR */} <InputField> <InputField.Label>Example text</InputField.Label> <TextInput /> </InputField> {/* OR */} <ChoiceInputField> <ChoiceInputField.Label>Example text</ChoiceInputField.Label> <Checkbox /> </ChoiceInputField> </> ) }
import {FormGroup, TextInput} from '@primer/react' function Example() { return ( <> <FormControl> <FormControl.Label>Example text</FormControl.Label> <TextInput /> </FormControl> {/* OR */} <FormControl> <FormControl.Label>Example text</FormControl.Label> <Checkbox /> </FormControl> </> ) }
import {InputField, TextInput} from '@primer/react' function Example() { return ( <InputField> <InputField.Label>Example text</InputField.Label> <TextInput /> </InputField> ) }
import {FormControl, TextInput} from '@primer/react' function Example() { return ( <FormControl> <FormControl.Label>Example text</FormControl.Label> <TextInput /> </FormControl> ) }
To continue to use the deprecated API for now, change the import path to
@primer/react/deprecated
:import {FormGroup, ChoiceInputField, InputField} from '@primer/react/deprecated'
You can use the one-time codemod to change your import statements automatically.
-
#1881
8cd12439
Thanks @pksjce! -⚠️ SelectMenu
has been deprecated. Please useActionMenu
instead.Before After <SelectMenu> <Button as="summary">Projects</Button> <SelectMenu.Modal> <SelectMenu.Header>Projects</SelectMenu.Header> <SelectMenu.List> <SelectMenu.Item href="#">Primer React bugs</SelectMenu.Item> <SelectMenu.Item href="#">Primer React roadmap</SelectMenu.Item> <SelectMenu.Item href="#">Project 3</SelectMenu.Item> <SelectMenu.Item href="#">Project 4</SelectMenu.Item> </SelectMenu.List> </SelectMenu.Modal> </SelectMenu>
<ActionMenu> <ActionMenu.Button>Projects</ActionMenu.Button> <ActionMenu.Overlay> <ActionList showDividers> <ActionList.Group title="Projects"> <ActionList.Item>Primer React bugs</ActionList.Item> <ActionList.Item>Primer React roadmap</ActionList.Item> <ActionList.Item>Project three</ActionList.Item> <ActionList.Item>Project four</ActionList.Item> </ActionList.Group> </ActionList> </ActionMenu.Overlay> </ActionMenu>
See https://primer.style/react/ActionMenu for more migration examples.
⚠️ Dropdown
has been deprecated. Please useActionMenu
instead.Before After const fieldTypes = [ {leadingVisual: TypographyIcon, text: 'Text'}, {leadingVisual: NumberIcon, text: 'Number'}, ] const Example = () => { const [selectedItem, setSelectedItem] = React.useState() return ( <DropdownMenu renderAnchor={({children, ...anchorProps}) => <ButtonInvisible {...anchorProps}>{children}</ButtonInvisible>} placeholder="Select a field type" items={fieldTypes} selectedItem={selectedItem} onChange={() => setSelectedIndex(index)} /> ) }
const fieldTypes = [ {icon: <TypographyIcon />, name: 'Text'}, {icon: <NumberIcon />, name: 'Number'}, ] const Example = () => { const [selectedItem, setSelectedItem] = React.useState() return ( <ActionMenu> <ActionMenu.Button>{selectedItem ? selectedItem.name : 'Select a field type'}</ActionMenu.Button> <ActionMenu.Overlay> <ActionList selectionVariant="single"> {fieldTypes.map(field => ( <ActionList.Item onSelect={() => setSelectedItem(field)} key={field.name}> <ActionList.LeadingVisual>{field.icon}</ActionList.LeadingVisual> {field.name} </ActionList.Item> ))} </ActionList> </ActionMenu.Overlay> </ActionMenu> ) }
See https://primer.style/react/ActionMenu for more migration examples.
⚠️ Flex
has been deprecated. Please useBox
instead.Before After <Flex flexWrap="nowrap"> <Box p={3} color="fg.onEmphasis" bg="accent.emphasis"> Item 1 </Box> </Flex>
<Box display="flex" flexWrap="nowrap"> <Box p={3} color="fg.onEmphasis" bg="accent.emphasis"> Item 1 </Box> </Box>
⚠️ Grid
has been deprecated. Please useBox
instead.Before After <Grid gridTemplateColumns="repeat(2, auto)" gridGap={3}> <Box p={3} color="fg.onEmphasis" bg="accent.emphasis"> 1 </Box> <Box p={3} color="fg.onEmphasis" bg="attention.emphasis"> 2 </Box> </Grid>
<Box display="grid" gridTemplateColumns="repeat(2, auto)" gridGap={3}> <Box p={3} color="fg.onEmphasis" bg="accent.emphasis"> 1 </Box> <Box p={3} color="fg.onEmphasis" bg="attention.emphasis"> 2 </Box> </Box>
⚠️ BorderBox
has been deprecated. Please useBox
instead.Before After <BorderBox>Item 1</BorderBox>
<Box borderWidth="1px" borderStyle="solid" borderColor="border.default" borderRadius={2}> Item 1 </Box>
⚠️ Position
has been deprecated. Please useBox
instead.Before After <> <Position position="absolute">...</Position> <Absolute>...</Absolute> <Relative>...</Relative> <Fixed>...</Fixed> <Sticky>...</Sticky> </>
<> <Box position="absolute">...</Box> <Box position="absolute">...</Box> <Box position="relative">...</Box> <Box position="fixed">...</Box> <Box position="sticky">...</Box> </>
- #1921
561aad86
Thanks @siddharthkp! - Add align prop on ActionMenu.Overlay to pass through to AnchoredOverlay
- #1922
b1d7b8c9
Thanks @siddharthkp! - ActionMenu.Button: Fix spacing between text and caret
- #1915
a98091c1
Thanks @siddharthkp! - - Update styles for default variant of Button's active state- Use active state for Button when it is used to open an Overlay
-
#1934
33da6a0e
Thanks @rezrah! - Surfaced the following components and hooks from the root index:- Portal
- AnchoredOverlay
- useFocusTrap
- useFocusZone (and types)
- sx (and types)
- ConfirmationDialogProps
These exports can now be imported from the root index, rather than from their nested subfolders.
E.g.
- import { ConfirmationDialogProps } from '@primer/react/lib-esm/Dialog/ConfirmationDialog'; + import { ConfirmationDialogProps } from '@primer/react';
- #1936
ceaaf171
Thanks @siddharthkp! - ThemeProvider: FixsetColorMode
. Broken in34.6.0
- #1913
92a02377
Thanks @siddharthkp! - Fixes the theming implementation with server side rendering to use a CSRF safe approach
- #1862
eebb3f27
Thanks @mperrotti! - Adds CheckboxGroup and RadioGroup components to replace the ChoiceFieldset component
- #1886
ecbf923e
Thanks @mperrotti! - Makes it possible to render leading and trailing visuals in TextInputWithTokens just like we do in TextInput
- #1914
b651d70d
Thanks @siddharthkp! - ActionMenu: Fix typeahead with leading visuals
- #1834
2abd7b7a
Thanks @siddharthkp! - ActionMenu2 + DropdownMenu2: Implement typeahead search. See detailed spec.
- #1877
50fa9880
Thanks @siddharthkp! - Upgrade @primer/behaviors to 1.1.0
- #1876
6cc9260a
Thanks @siddharthkp! - Better aria roles for ActionList group
- #1848
96a151ac
Thanks @siddharthkp! - Merges drafts/DropdownMenu2 into drafts/ActionMenu2
- #1866
01efa73f
Thanks @siddharthkp! - Fix the behavior of Escape key in nested overlays #1854, now only the top most overlay will close instead of all of them.
- #1855
c3b4ad70
Thanks @jclem! - Fix an issue where transitive dependency interface augmentations appeared in our build output
- #1826
004c4623
Thanks @PeterYangIO! - Remove unnecessary "required field" label title in favor for nativerequired
input attribute
- #1868
f3f42553
Thanks @siddharthkp! - Fixes a bug for theming with server side rendering where the output of the server and client mismatch #1773
- #1831
96473f39
Thanks @mperrotti! - Makes validation styling available for Select and TextInputWithTokens
- #1836
7e8ae653
Thanks @mperrotti! - Introduces FormControl component. The FormControl component combines the functionality of InputField and ChoiceInputField, and will replace FormGroup, InputField, and ChoiceInputField.
- #1846
65c405b6
Thanks @colebemis! - PageLayout: Prevent content region from wrapping on wide viewports
- #1856
3f405221
Thanks @siddharthkp! - Revert "Overlay: Attach escape handler to overlay container"
- #1850
fad43d67
Thanks @mperrotti! - FormControl:- Add
sx
prop - Rename
appearance
prop tovariant
- Add
- #1824
4eab65e5
Thanks @siddharthkp! - Overlay: Attach escape handler to overlay container instead of document to fix stopPropagation
- #1840
1c4786c7
Thanks @jclem! - Set Node.js and npm versions to ">=12" and ">=7", respectively, in package.json manifests, and update package-lock.json files accordingly.
- #1828
6a695bdc
Thanks @siddharthkp! - ActionMenu2 + DropdownMenu2: A keyboard user will be able to wrap through options
-
#1810
35ad7084
Thanks @siddharthkp! - ActionMenu2 + DropdownMenu2: Focus the correct element when Menu is opened with keyboard. See detailed spec.- ArrowDown | Space | Enter: first element
- ArrowUp: last element
- #1842
11011f55
Thanks @jclem! - AllowKeyPaths
type to accept any type in order to remove need for// @ts-ignore
internally.
- #1820
50c7bfaa
Thanks @colebemis! - Add draftPageLayout
component
- #1797
8b376b9d
Thanks @mperrotti! - Introduces a draft for component to replace the existing Label component
- #1759
493c6ea1
Thanks @siddharthkp! - AnchoredOverlay: Add support for passing an id to the anchor. Remove unnecessary aria-labelledby on anchor. ActionMenu v2: Add aria-labelledby for ActionList
- #1779
2630800d
Thanks @siddharthkp! - ActionMenu v2: ActionMenu.Button now uses Button v2
- #1735
8ff114b1
Thanks @siddharthkp! - Add composableDropdownMenu
to@primer/components/drafts
- #1804
aa09ed79
Thanks @rezrah! - Fixes bug in PointerBox component where caret doesn't inherit correct styling. Backwards compatible with previous API.
- #1736
82961d44
Thanks @mperrotti! - Adds a component for a native select input
- #1657
d143c956
Thanks @mperrotti! - Adds ChoiceFieldset component
- #1758
b604403c
Thanks @siddharthkp! - ActionMenu v2: Add aria-expanded to the ActionMenu.Button
- #1770
39a3bc29
Thanks @PeterYangIO! - Adds aria-hidden="true" to InputLabel required asterisk
- #1794
a8c427da
Thanks @rezrah! - replaceLocation | Pathname
union type forto
prop with more appropriateTo
- #1757
6e44d786
Thanks @siddharthkp! - ActionList v2 Divider: Make divider aria-hidden
- #1791
6a8472b4
Thanks @rezrah! - Fix type errors due to missing pathname (string) in union type for LocationDescriptor
- #1611
11382eeb
Thanks @mperrotti! - Adds TextInputField, CheckboxInputField, and RadioInputField components. Also adds a few internal (private to primer/react) components to support form fields
- #1754
08cdb0bc
Thanks @siddharthkp! - Fix title and subtitle tag for Dialog2 and ConfirmationDialog
- #1700
9d2827a9
Thanks @dgreif! - Use extracted @primer/behaviors for hook behaviors
- #1712
4ce8f07b
Thanks @colebemis! - Remove "engines" field from package.json
- #1734
bba4c245
Thanks @siddharthkp! - Button v2 - Fix font family
-
#1676
1195336e
Thanks @colebemis! - Rename npm package from@primer/components
to@primer/react
To upgrade, run:
npm uninstall @primer/components npm install @primer/react
Then update your imports:
- import {Box} from '@primer/components' + import {Box} from '@primer/react'
- #1675
2380b668
Thanks @siddharthkp! - ActionMenu v2: AddedActionMenu.Overlay
which accepts props to customize the Menu overlay.
- #1702
2c42c382
Thanks @colebemis! - UpdateBranchName
styles to match github.com
- #1643
3938550f
Thanks @jfuchs! - Details no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1643
3938550f
Thanks @jfuchs! - Avatar no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1643
3938550f
Thanks @jfuchs! - BranchName no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1643
3938550f
Thanks @jfuchs! - Heading no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1619
a13efa45
Thanks @siddharthkp! - Add composableActionMenu
to@primer/components/drafts
- #1679
006cc80b
Thanks @mattcosta7! - AddresolvedColorScheme
property to the object returned byuseTheme()
- #1668
98dc6336
Thanks @siddharthkp! - ActionList: Fix multiple selection svg by overriding global shape-rendering for github.com
- #1596
5c6dc644
Thanks @dmarcey! - Fix alignment of items in ActionList (single-select) if some of the items have wrapping text.
- #1538
dda6e5d7
Thanks @shiftkey! - Updatetypescript
package to correct generated type declarations.
- #1652
47550d34
Thanks @colebemis! - Fix preval oftheme-preval.js
- #1639
8ce0eb92
Thanks @jfuchs! - Truncate no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Timeline no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Dropdown no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Pagehead no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - LabelGroup no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Link no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Popover no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - StateLabel no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - CircleBadge no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - SelectMenu no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Header no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - UnderlineNav no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Overlay no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - StyledOcticon no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Dialog no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - TabNav no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - SubNav no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Dialog2 no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Buttons no longer accept styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Label no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Flash no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Tooltip no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Pagination no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - Breadcrumbs no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - FilteredSearch no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - SideNav no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - FilterList no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - CounterLabel no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1639
8ce0eb92
Thanks @jfuchs! - FormGroup no longer accepts styled-system props. Please use thesx
prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information aboutsx
and https://primer.style/react/system-props for context on the removal.
- #1598
3bb895f1
Thanks @siddharthkp! - ActionList: Better semantics for accessible ActionList.Group
- #1601
250e4b00
Thanks @siddharthkp! - ActionList: Use icon instead of input for multiple selection in ActionList
- #1629
47fdbf40
Thanks @siddharthkp! - ActionList: Visual update for disabled Items to make them more obvious
- #1486
34cfca53
Thanks @pksjce! - ActionList: Add focus and hover colors to all themes in Item using functional variables
- #1544
5b55b0ab
Thanks @jfuchs! - The sx prop now has types that will inform autocomplete for color and shadow values that are key paths into the theme.
- #1517
561c0bd3
Thanks @siddharthkp! - Add experimentalActionList
with composable API
- #1599
a2e195b0
Thanks @siddharthkp! - ActionList: Better labels and description for accessible ActionList.Item
- #1603
f4057b89
Thanks @siddharthkp! - ActionList: Improve keyboard accessibility with focus styles cross browser
- #1583
24b1ebbc
Thanks @pksjce! - Add a utility to provide useIsoMorphicEffect function and use that instead of useLayoutEffect everywhere
- #1592
8d3d491f
Thanks @rezrah! - Fixes a styling bug in TextInput components while using itsicon
andblock
props together
- #1549
f565840f
Thanks @michael-lefebvre! - FixauxiliaryText
in ActionList Group header
- #1609
5eb7ade9
Thanks @siddharthkp! - Rename@primer/components/unreleased
to@primer/components/drafts
to avoid confusion when referring to it.
- #1523
56e2f159
Thanks @mperrotti! - Add the ability to truncate tokens in the TextInputWithToken component when the input is not focused
- #1529
da566044
Thanks @mperrotti! - Fixes a bug inTextInputWithTokens
where the next token would not receive focus after the user deleted the first token using the keyboard
- #1526
1378e771
Thanks @mperrotti! - replaces flexbox gap usage with margins
- #1521
28b5980c
Thanks @siddharthkp! - AddtrailingVisual
prop to ActionList/ActionMenu. DeprecatetrailingIcon
andtrailingText
props.
-
#1514
dc789025
Thanks @colebemis! - Remove deprecated color variables by upgrading to @primer/primitives v5Note: Install
eslint-plugin-primer-react
to ensure that you're not using any deprecated or removed color variables.
- #1490
c156b07a
Thanks @mperrotti! - AddsAutocomplete
,AutocompleteMenu
,AutocompleteInput
, andAutocompleteOverlay
components
- #1489
273ef29d
Thanks @mperrotti! - Add alphaTextInputWithTokens
component
- #1488
05ac5aab
Thanks @mperrotti! - Add alphaToken
,AvatarToken
,IssueLabelToken
components
- #1500
8c3531aa
Thanks @jfuchs! - Fixed a bug where SelectPanel would not scroll with height:'auto'; maxHeight:'medium' passed to Overlay (https://github.com/github/primer/issues/333)
- #1497
b9d6a662
Thanks @jfuchs! - Updated ActionList's ItemInput type to accept DOM props for divs when renderItem is not provided
- #1463
bde3a034
Thanks @jfuchs! -ActionList.item
accepts anas
prop, allowing it to be a link, or (in combination with the renderItem prop) a Next.js or React Router link
- #1471
f1cebb7e
Thanks @smockle! - Change the button which receives focus when a 'ConfirmationDialog' opens from the secondary (e.g. 'Cancel') to the primary (e.g. 'OK'). Fixes github/primer#313.
- #1448
1a39fb02
Thanks @SferaDev! - Remove.Breadcrumb
classname from the root element of theBreadcrumbs
component. This change shouldn't break anything unless you have styles, scripts, or tests that reference the.Breadcrumb
classname.
- #1474
c54156bc
Thanks @colebemis! - Addlight_protanopia
anddark_protanopia
color blind color schemes
- #1441
f3f5afb9
Thanks @jfuchs! - Fix type error wherecss
is a required prop of some components by excluding storybook stories from TypeScript compilation for builds
- #1446
b4e5287c
Thanks @colebemis! - Fix filter input spacing in SelectPanel
- #1412
627cd3e9
Thanks @colebemis! - Adddark_high_contrast
color scheme
-
#1412
627cd3e9
Thanks @colebemis! - Add new functional color variables to the theme object.Tip: Install
eslint-plugin-primer-react
to ensure that you're not using any deprecated color variables.
- #1414
f4e1de6d
Thanks @jfuchs! - Removed system props support from<TextInput>
and fixed its type definition.
- #1403
65cab2cc
Thanks @mathiasbosman! - Fix the Timeline.Item layout
- #1398
e4dac575
Thanks @jfuchs! - Default portal containers created by primer are absolutely positioned at 0,0
- #1385
5470b61b
Thanks @jfuchs! - Make top and left position explicit props of Overlay handled separately from other styles
- #1388
83b888f0
Thanks @jfuchs! - Overlay takes a portalContainerName prop. This allows overlays with an anchor inside a scrolling container to track with their anchor, so long as the specified portal is also inside that scrolling container.
- #1372
23be0ed7
Thanks @jfuchs! - Extends DropdownMenu to allow anchorRef, open, and onOpenChange props.
- #1386
2ea30b43
Thanks @colebemis! - Bump @primer/primitives dependency to 4.6.4
- #1387
6b4d52da
Thanks @jfuchs! - Guard against MediaQueryList.addEventListener calls where unavailable and possibly fall back to .addListener
- #1368
36f156a0
Thanks @dgreif! - AllowanchorRef
to be passed intoSelectPanel
if you want to use an external anchor
- #1355
3cc7be77
Thanks @colebemis! - Replace octoface icon with spinner in SelectMenu component
- #1315
85d0202b
Thanks @VanAnderson! -Box
now accepts all styled system props.
-
#1316
4c063317
Thanks @VanAnderson! - The following components have been deprecated in favor of theBox
component:Component Replacement Flex
<Box display="flex">
Grid
<Box display="grid">
Position
<Box>
Absolute
<Box position="absolute">
Fixed
<Box position="fixed">
Relative
<Box position="relative">
Sticky
<Box position="sticky">
BorderBox
<Box borderWidth="1px" borderStyle="solid" borderColor="border.primary" borderRadius={2}>
There is a codemod available to upgrade these components:
-
TypeScript example:
npx jscodeshift -t node_modules/@primer/react/codemods/deprecateUtilityComponents.js --parser=tsx path/to/workspace/src/*.tsx
-
Babel example:
npx jscodeshift -t node_modules/@primer/react/codemods/deprecateUtilityComponents.js --parser=babel path/to/workspace/src/*.tsx
-
-
#1336
489a718b
Thanks @VanAnderson! - System props are deprecated in all components exceptBox
. Move all system props into thesx
prop instead. Example:- <Button mr={2}>...</Button> + <Button sx={{mr: 2}}>...</Button>
There is a codemod available to migrate from system props to the
sx
prop:-
TypeScript example:
npx jscodeshift -t node_modules/@primer/react/codemods/removeSystemProps.js --parser=tsx path/to/workspace/src/*.tsx
-
Babel example:
npx jscodeshift -t node_modules/@primer/react/codemods/removeSystemProps.js --parser=babel path/to/workspace/src/*.tsx
-
- #1332
ec11d7b8
Thanks @mattcosta7! - Side effects are properly declared in package.json
- #1308
a8f3ca6d
Thanks @dgreif! - Focus zones will now update active-descendant onmousemove
over focusable elements. ActionList has been updated to handle direct (key press) vs indirect (mousemove
, DOM change, etc.) changes to active-descendant, and will use a distinct background color for the directly activated items.
- #1309
dc17a49e
Thanks @colebemis! - Include all shadow variables in theme object
- #1251
528e9a41
Thanks @VanAnderson! - CalluseOnOutsideClick
handlers in reverse order that they are registered, and allow propagation to stop if default is prevented or an non-outside click is detected.
- #1312
76a38432
Thanks @smockle! - Ensure clicking anAnchoredOverlay
’s trigger allows it to close without immediately reopening.
- #1293
1148a718
Thanks @smockle! - Restore "fix: Don’t focus first 'Item' of 'DropdownMenu' and 'SelectMenu' on open" by deferring the removal of a temporarytabIndex
until focus moves within the container.
- #1279
bb38754f
Thanks @VanAnderson! - Update overlay shadows
- #1297
5fb3683d
Thanks @VanAnderson! - Bump @primer/primitives to 4.4.0
- #1288
15207119
Thanks @dgreif! - Focus zones with anactiveDescendantControl
will now activate the first descendant as soon as the control element is focused, rather than waiting for an up/down arrow press. Descendants stay active until the control element is blurred. This is a breaking change touseFocusZone
, but this behavior is still considered to be inalpha
.
- #1279
bb38754f
Thanks @VanAnderson! - Update TextInput border color
0ffc381c
#1294 Thanks @VanAnderson! - Revert first item focus fix for ActionList components.
68877076
#1275 Thanks @VanAnderson! - data props can be used in overlayProps.
2793ef48
#1286 Thanks @colebemis! -ThemeProvider
now uses the first defined color scheme if passed an invalid color scheme name
321b9a3d
#1266 Thanks @VanAnderson! - Anchored overlay can take an external anchorRef.
f793ed00
#1280 Thanks @VanAnderson! - Export TexContainer from of ActionList/Item.
8368a83e
#1238 Thanks @dgreif! - New sizes for Overlay and Dialog. Sizes have been changed from abbreviations to full words.xs
->xsmall
,sm
->small
,md
->medium
,lg
->large
,xl
->xlarge
. The sizing forOverlay
has also been updated to provide a wider range of options. The original values for Overlay were based on the needs of Dialog, but Dialog is not reliant on Overlay so they don't need to have similar sizing. This is technically a breaking change, but is being released as a minor because these components are both still inalpha
status.
25d88c49
#1253 Thanks @dgreif! - Correct font size and truncate for description within ActionList Items
9cb715cd
#1258 Thanks @dgreif! - prevent focusTrap from causing ablur
if trap container is not in DOM
aa7d80fc
#1246 Thanks @dgreif! - Fix border radius on buttons and titlefont-weight
in ConfirmationDialog
c1991318
#1158 Thanks @dgreif! - Add background styles for focused action list items, instead of using defaultoutline
0d26d2b0
#1240 Thanks @VanAnderson! - Fix check Spacing on selected items for ActionList components.
e009e321
#1235 Thanks @VanAnderson! - Dialog properly auto-focuses cancel button by default when originating from a FocusZone/FocusTrap.
e1bde42b
#1228 Thanks @VanAnderson! - Action Menu correctly fires onAction callback after close.
961c07eb
#1227 Thanks @stephenotalora! - Change focus state style ofSideNav.Link
c63fa4b5
#1215 Thanks @dgreif! - AddselectionVariant: 'multiple'
forItem
s. These will use a checkbox input instead of a checkmark icon for selected state
d78af591
#1214 Thanks @VanAnderson! - renderMenuItem in ActionMenu checks preventDefault for conditionally calling onClose
4ab3d175
#1222 Thanks @dgreif! - Trap focus inAnchoredOverlay
as soon as it opens, regardless of the event that triggered it to open
ff9ce6f1
#1217 Thanks @VanAnderson! - overlayProps passthrough from ActionMenu and DropdownMenu to AnchoredOverlay.
d20a5996
#1209 Thanks @dgreif! - Allow Overlay height and width to be set through AnchoredOverlay Allow ActionList Items to supply anid
instead ofkey
Performance improvements when ActionList is not given any groups Enable focus zone as soon as AnchoredOverlay opens
d29741ca
#1196 Thanks @dgreif! - Allow customchildren
inActionItem
.text
anddescription
can still be provided as a shortcut, butchildren
is now available if you need more control over the rending of the item, without sacrificing benefits fromItem
by usingrenderItem
.
4c2e1a2b
#1195 Thanks @VanAnderson! - Export useConfirm hook and ConfirmationDialog component from index.
c9b4db79
#1199 Thanks @VanAnderson! - Action Menu can have its open state be controlled externally.
3e759e59
#1211 Thanks @VanAnderson! - Use preventDefault on AnchoredOverlay instead of stopPropagation.
7aeb53fe
#1200 Thanks @dgreif! - Perform ActionMenu actions after overlay has closed. This allows the action to move focus if so desired, without the ActionMenu focus trap preventing focus from moving away.
bba66fdd
#1206 Thanks @VanAnderson! - stopPropagation for mousedown and click in AnchoredOverlay based components
b319ce43
#1197 Thanks @dmarcey! - Typescript declare files will now be published to the lib-esm directory, as well as lib
5f85394d
#1157 Thanks @dgreif! - RemoveduseMouseIntent
in favor of:focus-visible
. With the removal ofuseMouseIntent
, theintent-mouse
class will no longer be added to the<body>
. Since:focus-visible
is a relatively new psuedo-class, a polyfill is included. Any focused elements that meet the criteria for:focus-visible
will also have afocus-visible
class added to them by the polyfill.
-
db478205
#1147 Thanks @colebemis! - Type definitions are now being generated by TypeScript instead of manually maintained. These new type definitions may differ from the previous type definitions and cause breaking changes. If you experience any new TypeScript errors, feel free to create an issue or reach out in Slack (#design-systems).-
The following types are no longer exported:
BaseProps UseDetailsProps AnchoredPositionHookSettings AnchorAlignment AnchorSide PositionSettings PaginationHrefBuilder PaginationPageChangeCallback PositionComponentProps
-
Props are now defined with types instead of interfaces which means in some cases you may not be able to create interfaces that
extend
them. To work around this issue, you may need to convert your interfaces to types:import {BoxProps} from '@primer/react' - interface MyFancyBox extends BoxProps {...} + type MyFancyBox = BoxProps & {...}
-
Some components now expect more specific ref types. For example:
- const ref = React.useRef<HTMLElement>(null) + const ref = React.useRef<HTMLButtonElement>(null) return <Button ref={ref}>...</Button>
-
-
016a273f
#1115 Thanks @VanAnderson! - Removes deprecated presentational theme variables in favor of functional variables for styling components that are consistent across multiple themes.If you don't use any color-related system props (e.g.
color
,bg
,borderColor
), all components should work without changes. If you're using color-related system props, you'll need to update them to use the new functional variables. Reference the tables below to see how old variables map to new functional variables.If you have any questions, feel free to reach out in the #design-systems channel.
v25
v26
color="text.gray"
color="text.secondary"
color="text.grayLight"
color="text.tertiary"
color="text.grayDark"
color="text.primary"
color="text.red"
color="text.danger"
color="text.white"
color="text.inverse"
color="gray.6"
color="text.secondary"
color="gray.5"
color="text.tertiary"
color="gray.9"
color="text.primary"
color="red.6"
color="text.danger"
color="white"
color="text.inverse"
color="blue.5"
color="text.link"
color="gray.4"
color="text.disabled"
color="green.5"
color="text.success"
color="yellow.8"
color="text.warning"
v25
v25
color="gray.9"
color="icon.primary"
color="gray.6"
color="icon.secondary"
color="gray.4"
color="icon.tertiary"
color="blue.5"
color="icon.info"
color="red.5"
color="icon.danger"
color="green.6"
color="icon.success"
color="yellow.8"
color="icon.warning"
v25
v26
borderColor="border.blue"
borderColor="border.info"
borderColor="border.blueLight"
n/a borderColor="border.grayLight"
borderColor="border.primary"
borderColor="border.grayDark"
borderColor="border.tertiary"
borderColor="border.grayDarker"
n/a borderColor="border.green"
borderColor="border.success"
borderColor="border.greenLight"
n/a borderColor="border.purple"
n/a borderColor="border.red"
borderColor="border.danger"
borderColor="border.redLight"
n/a borderColor="border.white"
borderColor="border.inverse"
borderColor="border.whiteFace"
n/a borderColor="border.yellow"
borderColor="border.warning"
borderColor="border.blackFade"
borderColor="fade.fg15"
borderColor="border.whiteFade"
borderCOlor="fade.white15"
borderColor="blue.5"
borderColor="border.info"
borderColor="gray.2"
borderColor="border.primary"
borderColor="gray.3"
borderColor="border.tertiary"
borderColor="green.4"
borderColor="border.success"
borderColor="red.5"
borderColor="border.danger"
borderColor="white"
borderColor="border.inverse"
v25
v26
bg="white"
bg="bg.primary"
bg="bg.grayLight"
bg="bg.secondary"
bg="bg.gray"
bg="bg.tertiary"
bg="bg.grayDark"
bg="bg.canvasInverse"
bg="blue.0"
bg="bg.info"
bg="blue.5"
bg="bg.infoInverse"
bg="red.0"
bg="bg.danger"
bg="red.5"
bg="bg.dangerInverse"
bg="green.1"
bg="bg.success"
bg="green.5"
bg="bg.successInverse"
Note the change in pluralization from 'labels' to 'label'.
v25
v26
color="labels.grayDarkText"
color="label.primary.text
borderColor="labels.gray"
borderColor="label.primary.border
color="labels.grayText"
color="label.secondary.text
borderColor="labels.gray"
borderColor="label.secondary.border
color="labels.blueText"
color="label.info.text
borderColor="labels.blue"
borderColor="label.info.border
color="labels.greenText"
color="label.success.text
borderColor="labels.green"
borderColor="label.success.border
color="labels.yellowText"
color="label.warning.text
borderColor="labels.yellow"
borderColor="label.warning.border
color="labels.redText"
color="label.danger.text
borderColor="labels.red"
borderColor="label.danger.border
color="labels.orangeText"
color="label.primary.text
borderColor="labels.orange"
borderColor="label.primary.text
color="labels.pinkText"
n/a borderColor="labels.pink"
n/a color="labels.purpleText"
n/a borderColor="labels.purple"
n/a v25
v26
scheme="gray"
scheme="primary"
scheme="gray-light"
scheme="secondary"
v25
v26
bg="red.5"
bg="prState.closed.bg"
bg="green.5"
bg="prState.open.bg"
bg="purple.5"
bg="prState.merged.bg"
bg="gray.5"
bg="prState.draft.bg"
color="white"
(context: closed PR icon)color="prState.closed.text"
color="white"
(context: open PR icon)color="prState.open.text"
color="white"
(context: merged PR icon)color="prState.merged.text"
color="white"
(context: merged PR icon)color="prState.draft.text"
-
8799f74a
#1112 Thanks @colebemis! - Primer React now supports color modes! 🎉See the new Theming documentation for more details.
- You'll need to replace the
ThemeProvider
fromstyled-components
with the new Primer ReactThemeProvider
:
- import {ThemeProvider} from 'styled-components' - import {theme} from '@primer/react + import {ThemeProvider} from '@primer/react' function App() { return ( - <ThemeProvider theme={theme}> + <ThemeProvider> <div>your app here...</div> </ThemeProvider> ) }
- The structure of the theme object has changed to support color schemes:
const theme = { - colors, - shadows, + colorSchemes: { + light: { + colors, + shadows, + }, + dark: {...}, + dark_dimmed: {...}, + }, space, fonts, fontSizes, fontWeights, lineHeights, borderWidths, radii, breakpoints, sizes, }
- The
theme.colors
andtheme.shadows
objects are no longer available from thetheme
export. Use theuseTheme
hook instead:
- import {theme} from '@primer/react' + import {useTheme} from '@primer/react' function Example() { + const {theme} = useTheme() const myColor = theme.colors.text.primary ... }
- You'll need to replace the
360e3595
#1111 Thanks @VanAnderson! - Update color variable used in ProgressBar (state.success
→bg.successInverse
)
1b3d87d2
#1127 Thanks @VanAnderson! - Bump @primer/primitives from 0.0.0-20211167520 to 0.0.0-20212178221
b9d9d245
#1068 Thanks @colebemis! - Remove propTypes in favor of TypeScript types
-
beef075e
#1094 Thanks @colebemis! - Components no longer have a defaulttheme
prop. To ensure components still render correctly, you'll need pass the Primer theme to a styled-components<ThemeProvider>
at the root of your application:import {ThemeProvider} from 'styled-components' import {theme} from '@primer/react' function App(props) { return ( <div> <ThemeProvider theme={theme}> <div>your app here</div> </ThemeProvider> </div> ) }
397f3360
#1106 Thanks @VanAnderson! - Use functional color variables in Pagination
fa106ea9
#1090 Thanks @colebemis! - Use functional color variables in BaseStyles
fa106ea9
#1090 Thanks @colebemis! - Use functional color variables in BranchName
e93cf268
#1092 Thanks @bscofield! - Use functional color variables in Caret, CircleBadge, Pagehead, ProgressBar, and Popover
5a042778
#1099 Thanks @VanAnderson! - Use functional color variables in FilterList
a886bbcf
#1098 Thanks @bscofield! - Update SelectMenu and child components to use functional color variables
f2c57794
#1085 Thanks @VanAnderson! - Use functional color variables in SideNav
756191e7
#1100 Thanks @VanAnderson! - Use functional color variables in ButtonOutline
6b2dc95f
#1085 Thanks @VanAnderson! - Use functional color variables in TabNav
51d180ac
#1089 Thanks @colebemis! - Use functional color variables in Timeline
51d180ac
#1089 Thanks @colebemis! - Use functional color variables in TextInput
8f2b4d2e
#1100 Thanks @VanAnderson! - Use functional color variables in ButtonPrimary
51d180ac
#1089 Thanks @colebemis! - Use functional color variables in Link
fa106ea9
#1090 Thanks @colebemis! - Use functional color variables in BorderBox
51d180ac
#1089 Thanks @colebemis! - Use functional color variables in Tooltip
1fb750af
#1097 Thanks @VanAnderson! - Use functional color variables in ButtonTableList
ea21d8eb
#1102 Thanks @VanAnderson! - Use functional color variables in Flash
51d180ac
#1089 Thanks @colebemis! - Use functional color variables in UnderlineNav
d0f38c3d
#1102 Thanks @VanAnderson! - Use functional color variables in Header
5df7723a
#1099 Thanks @VanAnderson! - Use functional color variables in DropdownStyles
170876e6
#1097 Thanks @VanAnderson! - Use functional color variables in Button
c44ee363
#1085 Thanks @VanAnderson! - Use functional color variables in SubNav
198e24ad
#1100 Thanks @VanAnderson! - Use functional color variables in ButtonDanger
39371d98
#1099 Thanks @VanAnderson! - Use functional color variables in CounterLabel
92597504
#1100 Thanks @VanAnderson! - Use functional color variables in ButtonClose
fa106ea9
#1090 Thanks @colebemis! - Use functional color variables in AvatarPair
fa106ea9
#1090 Thanks @colebemis! - Use functional color variables in AvatarStack
565f1980
#1097 Thanks @VanAnderson! - Use functional color variables in Breadcrumb
4e19045e
#1085 Thanks @VanAnderson! - Use functional color variables in StateLabel
31025697
#1099 Thanks @VanAnderson! - Use functional color variables in Dialog
67cc5b23
#1097 Thanks @VanAnderson! - Use functional color variables in ButtonInvisible
a42162c0
#1087 Thanks @emplums! - Fix up styles in TabNav allowing for items positioned on the right end of TabNav
c50b9f93
#1059 Thanks @colebemis! - MigrateDropdown
to TypeScript
681799fd
#1066 Thanks @colebemis! - MigrateuseMouseIntent
to TypeScript
eaeb2389
#1055 Thanks @VanAnderson! - Migrateutils
to TypeScript
106eb85e
#1060 Thanks @VanAnderson! - MigrateDialog
to TypeScript
f11e6ac6
#1048 Thanks @colebemis! - MigrateSelectMenu
to TypeScript
bb635a50
#1058 Thanks @colebemis! - Migrate theme to TypeScript
fabca94e
#1047 Thanks @VanAnderson! - MigratePagination
to TypeScript
c868bc96
#1074 Thanks @VanAnderson! - Add functional color variables from Primer Primitives to theme object
e2c90dba
#1049 Thanks @eintxaurtieta! - Added font-family:inherit to TextInput
8de64e95
#1029 Thanks @VanAnderson! - MigrateTabNav
to TypeScript
16aeca6b
#1032 Thanks @colebemis! - MigrateAvatarStack
to TypeScript
4070310a
#1026 Thanks @VanAnderson! - MigrateDetails
to TypeScript
8f483bd9
#1042 Thanks @colebemis! - MigratePointerBox
to TypeScript
c5d2b657
#1035 Thanks @colebemis! - MigrateCircleBadge
to TypeScript
3fcdf25f
#1040 Thanks @VanAnderson! - MigrateSideNav
to TypeScript
ff02c038
#1033 Thanks @colebemis! - MigrateTooltip
to TypeScript
0d62f260
#1030 Thanks @colebemis! - MigrateCaret
to TypeScript
d1785f4c
#1038 Thanks @VanAnderson! - MigrateSubNav
to TypeScript
058e7919
#1036 Thanks @colebemis! - MigrateCircleOcticon
to TypeScript
9b71bf38
#998 Thanks @colebemis! - MigratePosition
to TypeScript
b2ac3010
#1037 Thanks @colebemis! - MigrateTimeline
to TypeScript
ef25d019
#1031 Thanks @colebemis! - MigrateAvatarPair
to TypeScript
62f45a12
#1028 Thanks @colebemis! - MigrateTextInput
to TypeScript
cc36e6b4
#1034 Thanks @colebemis! - MigratePopover
to TypeScript
11340814
#1020 Thanks @VanAnderson! - MigrateHeader
to TypeScript
3e0110bc
#995 Thanks @colebemis! - MigrateFlash
to TypeScript
b0cea82e
#1003 Thanks @colebemis! - MigrateTruncate
to TypeScript
f9a7e78a
#987 Thanks @colebemis! - MigrateProgressBar
to TypeScript
d848b9e0
#993 Thanks @colebemis! - MigrateStyledOcticon
to TypeScript
73bced4b
#1015 Thanks @colebemis! - MigrateFilterList
to TypeScript
b9671ca2
#1005 Thanks @colebemis! - MigrateCounterLabel
to TypeScript
1fb77ac3
#1012 Thanks @colebemis! - MigrateBreadcrumb
to TypeScript
91002078
#1008 Thanks @colebemis! - MigrateStateLabel
to TypeScript
3a3c81a4
#984 Thanks @bscofield! - MigrateAvatar
to TypeScript
df2920f5
#1014 Thanks @colebemis! - MigrateUnderlineNav
to TypeScript
b947aff2
#1006 Thanks @colebemis! - MigrateFilteredSearch
to TypeScript
2e71f70f
#1011 Thanks @VanAnderson! - MigrateLink
to TypeScript
7128403c
#979 Thanks @colebemis! - MigrateText
to TypeScript
fe16e21c
#982 Thanks @colebemis! - MigrateBaseStyles
to TypeScript
ee806857
#975 Thanks @colebemis! - MigrateHeading
to TypeScript
25315571
#976 Thanks @colebemis! - MigrateLabel
to TypeScript
4076bf4e
#986 Thanks @colebemis! - MigrateFlex
to TypeScript
397a46fe
#976 Thanks @colebemis! - MigrateLabelGroup
to TypeScript
dc0df4b2
#973 Thanks @colebemis! - MigrateBorderBox
to TypeScript
0cac0042
#974 Thanks @colebemis! - MigrateBranchName
to TypeScript
755a1a5c
#977 Thanks @colebemis! - MigratePagehead
to TypeScript
34ff4885
#989 Thanks @colebemis! - MigrateGrid
to TypeScript