-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Merge from v2 repo #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
3fa55c1
fix-typo-in-provider-docs (#577)
osamja bfbfaa1
Add required children prop type to TabView (#579)
ross-pfahler a8cce6f
Fix overflow:hidden for overlays (#260)
xitter fb3ecfa
Fix center/right alignment of columns TableView (#564)
ross-pfahler b0b32bf
Only start listening on show, stop on hide and on componentWillUnmoun…
snowystinger bf9d145
Adds custom link support to Breadcrumbs (#571)
ross-pfahler 92cf421
Modal safety (#588)
snowystinger 3c7ceba
remove extraneous dependency on moment at the top level (#591)
snowystinger 7594492
Merge pull request #590 from adobe/master
dannify 809b656
this is v3, so it's ok to remove (#594)
snowystinger 0219d01
chore(release): publish
ca6ca0c
This line needs to stay for master, once v3 is removed from the repo,…
snowystinger e1c4e30
Merge pull request #598 from adobe/release-merge-back-9.26.19
dannify 95da8e1
Update to the Button component stories to add knobs (#581)
sunil-adobe 92807dd
RSP-1311 v3 [Accessibility][Spec] List (#589)
b97be50
RSP-1323 fix jenkins make storybook build errors by updating storyboo…
c57ce7c
Fix #375 RSP-704 [Accessibility][Documentation] Popover labelling imp…
946a889
upgrade all the things and point to yarn registery (#609)
snowystinger 3b81668
Fix #606 Tag - Call preventDefault() on Tag's remove button event. (#…
mraymond77 6e36ae3
Fix #363 / RSP-703 [Accessibility][Documentation] Pagination improvem…
defef73
V3 Radio (#547)
snowystinger b9a810b
V3 textfield followup (#477)
LFDanLu 9b32a52
RSP-1327 v2 [Accessibility] Dropdown/Select should expand with Enter,…
f0415ed
RSP-1311 v3 [Accessibility][Spec] List (fix typo) (#615)
cbd1daa
Fix #619/RSP-1328 [Accessibility] v2 SubMenu selecting item does not …
15b45a7
RSP-1324 : Allow 3 Buttons in Fullscreen Mode (#611)
MidnightCoder06 970a702
RSP-1318 v3 [Accessibility][Spec] Tooltip (#603)
ebd2a7e
v2 quickactions (#573)
ktabors 835a010
Remove personal username from npmrc readme (#627)
LFDanLu ed696be
V3 FieldLabel (#582)
snowystinger f3d0f27
Merge branch 'master' of github.com:adobe/react-spectrum into merge-f…
snowystinger 9e7ec02
don't forget these two :)
snowystinger 4f32c86
Merge branch 'master' into merge-from-v2-repo
snowystinger 0d880d8
removing instances of react-stately/textfield
LFDanLu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 8.* | ||
| 12.* | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,22 +1,53 @@ | ||
| const glob = require('fast-glob'); | ||
| const fs = require('fs'); | ||
| const assert = require('assert'); | ||
| const chalk = require('chalk'); | ||
|
|
||
| let packages = glob.sync(__dirname + '/packages/@react-{aria,spectrum,stately}/*/package.json'); | ||
|
|
||
| let errors = false; | ||
|
|
||
| // soft assert won't fail the whole thing, allowing us to accumulate all errors at once | ||
| // there's probably a nicer way to do this, but well... sometimes it's good enough. feel free to update me :) | ||
| // maybe turn me into an actual eslint plugin so we get their format for styling | ||
| function softAssert(val, message) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol nice - you made my script good! |
||
| try { | ||
| assert(val, message); | ||
| } catch { | ||
| console.error(chalk.red(message)); | ||
| errors = true; | ||
| } | ||
| } | ||
| softAssert.deepEqual = function (val, val2, message) { | ||
| try { | ||
| assert.deepEqual(val, val2, message); | ||
| } catch { | ||
| console.error(chalk.red(message)); | ||
| errors = true; | ||
| } | ||
| } | ||
| softAssert.equal = function (val, val2, message) { | ||
| try { | ||
| assert.equal(val, val2, message); | ||
| } catch { | ||
| console.error(chalk.red(message)); | ||
| errors = true; | ||
| } | ||
| } | ||
|
|
||
| for (let pkg of packages) { | ||
| let json = JSON.parse(fs.readFileSync(pkg)); | ||
| assert(json.main, `${pkg} did not have "main"`); | ||
| assert(json.module, `${pkg} did not have "module"`); | ||
| assert(json.types, `${pkg} did not have "types"`); | ||
| assert(json.source, `${pkg} did not have "source"`); | ||
| assert.deepEqual(json.files, ['dist'], `${pkg} did not match "files"`); | ||
| assert.equal(json.sideEffects, false, `${pkg} is missing sideEffects: false`); | ||
| assert(!json.dependencies || !json.dependencies['@adobe/spectrum-css-temp'], `${pkg} has @adobe/spectrum-css-temp in dependencies instead of devDependencies`); | ||
| assert(json.dependencies && json.dependencies['@babel/runtime'], `${pkg} is missing a dependency on @babel/runtime`); | ||
| softAssert(json.main, `${pkg} did not have "main"`); | ||
| softAssert(json.module, `${pkg} did not have "module"`); | ||
| softAssert(json.types, `${pkg} did not have "types"`); | ||
| softAssert(json.source, `${pkg} did not have "source"`); | ||
| softAssert.deepEqual(json.files, ['dist'], `${pkg} did not match "files"`); | ||
| softAssert.equal(json.sideEffects, false, `${pkg} is missing sideEffects: false`); | ||
| softAssert(!json.dependencies || !json.dependencies['@adobe/spectrum-css-temp'], `${pkg} has @adobe/spectrum-css-temp in dependencies instead of devDependencies`); | ||
| softAssert(json.dependencies && json.dependencies['@babel/runtime'], `${pkg} is missing a dependency on @babel/runtime`); | ||
|
|
||
| if (json.name.startsWith('@react-spectrum') && json.devDependencies && json.devDependencies['@adobe/spectrum-css-temp']) { | ||
| assert.deepEqual(json.targets, { | ||
| softAssert.deepEqual(json.targets, { | ||
| main: { | ||
| includeNodeModules: ['@adobe/spectrum-css-temp'] | ||
| }, | ||
|
|
@@ -26,5 +57,9 @@ for (let pkg of packages) { | |
| }, `${pkg} did not match "targets"`); | ||
| } | ||
|
|
||
| assert(json.publishConfig && json.publishConfig.access === 'public', `${pkg} has missing or incorrect publishConfig`); | ||
| softAssert(json.publishConfig && json.publishConfig.access === 'public', `${pkg} has missing or incorrect publishConfig`); | ||
| } | ||
|
|
||
| if (errors) { | ||
| return process.exit(1); | ||
| } | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -48,12 +48,12 @@ | |
| "@react/collection-view": "^4.1.5", | ||
| "@react/react-spectrum": "^2.24.0", | ||
| "@react/react-spectrum-icons": "^2.1.0", | ||
| "@storybook/addon-a11y": "^5.1.9", | ||
| "@storybook/addon-actions": "^5.1.9", | ||
| "@storybook/addon-info": "^5.1.9", | ||
| "@storybook/addon-knobs": "^5.1.9", | ||
| "@storybook/addon-links": "^5.1.9", | ||
| "@storybook/react": "^5.1.9", | ||
| "@storybook/addon-a11y": "^5.2.1", | ||
| "@storybook/addon-actions": "^5.2.1", | ||
| "@storybook/addon-info": "^5.2.1", | ||
| "@storybook/addon-knobs": "^5.2.1", | ||
| "@storybook/addon-links": "^5.2.1", | ||
| "@storybook/react": "^5.2.1", | ||
| "@testing-library/react": "^8.0.1", | ||
| "@testing-library/user-event": "^4.1.0", | ||
| "@types/react": "^16.8.0", | ||
|
|
@@ -69,6 +69,7 @@ | |
| "babel-plugin-react-remove-properties": "^0.3.0", | ||
| "babel-plugin-transform-glob-import": "^1.0.1", | ||
| "babelify": "^10.0.0", | ||
| "chalk": "^2.4.2", | ||
| "classnames": "^2.2.5", | ||
| "core-js": "^3.0.0", | ||
| "css-loader": "^2.1.1", | ||
|
|
@@ -80,6 +81,7 @@ | |
| "eslint-plugin-react": "^7.12.4", | ||
| "eslint-plugin-react-hooks": "^1.6.0", | ||
| "eslint-plugin-rulesdir": "^0.1.0", | ||
| "fast-glob": "^3.1.0", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was missing but used in package linter |
||
| "file-loader": "^0.9.0", | ||
| "full-icu": "^1.3.0", | ||
| "identity-obj-proxy": "^3.0.0", | ||
|
|
@@ -90,8 +92,6 @@ | |
| "lerna": "^3.13.2", | ||
| "lfcdn": "^0.4.2", | ||
| "md5": "^2.2.1", | ||
| "moment": "^2.15.1", | ||
| "moment-range": "^3.0.3", | ||
| "nyc": "^10.2.0", | ||
| "parcel": "^2.0.0-alpha.2.1", | ||
| "plop": "^2.4.0", | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
| export * from './src'; |
This file contains hidden or 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,30 @@ | ||
| { | ||
| "name": "@react-aria/radio", | ||
| "version": "3.0.0-alpha.1", | ||
| "description": "Spectrum UI components in React", | ||
| "main": "dist/main.js", | ||
| "module": "dist/module.js", | ||
| "types": "dist/types.d.ts", | ||
| "source": "src/index.ts", | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "sideEffects": false, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/adobe/react-spectrum" | ||
| }, | ||
| "dependencies": { | ||
| "@babel/runtime": "^7.6.2", | ||
| "@react-types/radio": "^3.0.0-alpha.1", | ||
| "@react-aria/utils": "^3.0.0-alpha.1", | ||
| "@react-stately/radio": "^3.0.0-alpha.1" | ||
| }, | ||
| "peerDependencies": { | ||
| "react": "^16.8.0", | ||
| "react-dom": "^16.8.0" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| } | ||
| } |
This file contains hidden or 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,2 @@ | ||
| export * from './useRadio'; | ||
| export * from './useRadioGroup'; |
This file contains hidden or 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,54 @@ | ||
| import {AllHTMLAttributes} from 'react'; | ||
| import {LabelPosition, RadioProps} from '@react-types/radio'; | ||
| import {RadioGroupState} from '@react-stately/radio'; | ||
|
|
||
| interface RadioAriaProps extends RadioProps { | ||
| isDisabled?: boolean, | ||
| isRequired?: boolean, | ||
| isReadOnly?: boolean, | ||
| isEmphasized?: boolean, | ||
| labelPosition?: LabelPosition, | ||
| name?: string, | ||
| validationState?: 'valid' | 'invalid', | ||
| selectedRadio?: string, | ||
| setSelectedRadio?: (value: string) => void | ||
| } | ||
|
|
||
| interface RadioAria { | ||
| inputProps: AllHTMLAttributes<HTMLInputElement> | ||
| } | ||
|
|
||
| export function useRadio(props: RadioAriaProps, state: RadioGroupState): RadioAria { | ||
| let { | ||
| value, | ||
| isRequired, | ||
| isReadOnly, | ||
| isDisabled, | ||
| name | ||
| } = props; | ||
| let { | ||
| selectedRadio, | ||
| setSelectedRadio | ||
| } = state; | ||
|
|
||
| let checked = selectedRadio === value; | ||
|
|
||
| let onChange = (e) => { | ||
| e.stopPropagation(); | ||
|
|
||
| setSelectedRadio(value); | ||
| }; | ||
|
|
||
| return { | ||
| inputProps: { | ||
| type: 'radio', | ||
| name, | ||
| disabled: isDisabled, | ||
| readOnly: isReadOnly, | ||
| required: isRequired, | ||
| checked, | ||
| 'aria-checked': checked, | ||
| onChange | ||
| } | ||
| }; | ||
| } |
This file contains hidden or 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,25 @@ | ||
| import {AllHTMLAttributes} from 'react'; | ||
| import {RadioGroupProps} from '@react-types/radio'; | ||
| import {useId} from '@react-aria/utils'; | ||
|
|
||
|
|
||
| interface RadioGroupAria { | ||
| radioGroupProps: AllHTMLAttributes<HTMLElement>, | ||
| radioProps: AllHTMLAttributes<HTMLInputElement> | ||
| } | ||
|
|
||
| export function useRadioGroup(props: RadioGroupProps): RadioGroupAria { | ||
| let defaultGroupId = `${useId()}-group`; | ||
| let { | ||
| name = defaultGroupId | ||
| } = props; | ||
|
|
||
| return { | ||
| radioGroupProps: { | ||
| role: 'radiogroup' | ||
| }, | ||
| radioProps: { | ||
| name | ||
| } | ||
| }; | ||
| } |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newly updated requirement based on work devon did for the build