-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'accessibility/issues/925/dialog-component' of https://g…
…ithub.com/primer/css into accessibility/issues/925/dialog-component
- Loading branch information
Showing
54 changed files
with
1,225 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/css": minor | ||
--- | ||
|
||
Add `.text-capitalize` utility class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Next Major Pull Request | ||
on: | ||
push: | ||
branches: | ||
- 'changeset-release/next_major' | ||
|
||
jobs: | ||
next_major_pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Don't Merge | ||
run: | | ||
echo "Don't merge the next_major, changeset pr into next_major. Instead when you're ready to release a new major version, change the base of this pr to main, and merge." | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
docs/src/stories/components/Navigation/UnderlineNav.stories.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import React from 'react' | ||
import clsx from 'clsx' | ||
import {UnderlineNavItemTemplate} from './UnderlineNavItem.stories' | ||
|
||
export default { | ||
title: 'Components/Navigation/UnderlineNav', | ||
excludeStories: ['UnderlineNavTemplate'], | ||
layout: 'padded', | ||
argTypes: { | ||
variant: { | ||
options: [0, 1, 2], // iterator | ||
mapping: ['', 'UnderlineNav--right', 'UnderlineNav--full'], // values | ||
control: { | ||
type: 'inline-radio', | ||
labels: ['default', 'align-right', 'fullwidth'] | ||
}, | ||
description: 'nav positioning options', | ||
table: { | ||
category: 'CSS' | ||
} | ||
}, | ||
children: { | ||
description: 'creates a slot for children', | ||
table: { | ||
category: 'HTML' | ||
} | ||
}, | ||
actionStart: { | ||
description: 'action to left of nav', | ||
table: { | ||
category: 'HTML' | ||
} | ||
}, | ||
actionEnd: { | ||
description: 'action to right of nav', | ||
table: { | ||
category: 'HTML' | ||
} | ||
} | ||
} | ||
} | ||
|
||
export const UnderlineNavTemplate = ({variant, children, actionStart, actionEnd}) => ( | ||
<> | ||
<nav className={clsx('UnderlineNav', variant && `${variant}`)}> | ||
{actionStart} | ||
{variant === 'UnderlineNav--full' ? ( | ||
<div class="container-lg UnderlineNav-container"> | ||
<ul class="UnderlineNav-body" role="tablist"> | ||
{children} | ||
</ul> | ||
</div> | ||
) : ( | ||
<ul class="UnderlineNav-body" role="tablist"> | ||
{children} | ||
</ul> | ||
)} | ||
{actionEnd} | ||
</nav> | ||
</> | ||
) | ||
|
||
export const Playground = UnderlineNavTemplate.bind({}) | ||
Playground.args = { | ||
variant: 0, | ||
children: ( | ||
<> | ||
<UnderlineNavItemTemplate label="Item" semanticItemType="button" selected usesDataContent /> | ||
<UnderlineNavItemTemplate label="Item" semanticItemType="button" usesDataContent /> | ||
<UnderlineNavItemTemplate label="Item" semanticItemType="button" usesDataContent /> | ||
</> | ||
) | ||
} |
56 changes: 56 additions & 0 deletions
56
docs/src/stories/components/Navigation/UnderlineNavAction.stories.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React from 'react' | ||
import clsx from 'clsx' | ||
import {ButtonTemplate} from '../Button/Button.stories' | ||
import {LinkTemplate} from '../Link/Link.stories' | ||
|
||
export default { | ||
title: 'Components/Navigation/UnderlineNav/Action', | ||
excludeStories: ['UnderlineNavActionTemplate'], | ||
layout: 'padded', | ||
argTypes: { | ||
semanticItemType: { | ||
options: ['button', 'link'], | ||
control: { | ||
type: 'inline-radio' | ||
}, | ||
description: 'item can be a button or a link', | ||
table: { | ||
category: 'HTML' | ||
} | ||
}, | ||
label: { | ||
name: 'label', | ||
type: 'string', | ||
description: 'Item label text', | ||
table: { | ||
category: 'HTML' | ||
} | ||
}, | ||
focusElement: { | ||
control: {type: 'boolean'}, | ||
description: 'set manual focus on item', | ||
table: { | ||
category: 'Interactive' | ||
} | ||
} | ||
} | ||
} | ||
|
||
export const UnderlineNavActionTemplate = ({semanticItemType, label, focusElement}) => { | ||
return ( | ||
<div class="UnderlineNav-actions"> | ||
{semanticItemType === 'button' ? ( | ||
<ButtonTemplate label={label} focusAllElements={focusElement} /> | ||
) : ( | ||
<LinkTemplate label={label} focusAllElements={focusElement} /> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export const Playground = UnderlineNavActionTemplate.bind({}) | ||
Playground.args = { | ||
semanticItemType: 'button', | ||
label: 'Action', | ||
focusElement: false | ||
} |
Oops, something went wrong.