-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Api review #143
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
Api review #143
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1ae82fe
Starting API review
snowystinger f93611f
Revert api so they aren't split
snowystinger 2fe2ab8
drop the word props
snowystinger 491b53f
make sure extends are included
snowystinger cf96aaf
Some more spec updates
devongovett a2b93a2
Merge branch 'api-review' of github.com:adobe/react-spectrum-v3 into …
devongovett 5ae6c00
Form
snowystinger c748627
Merge branch 'api-review' of github.com:adobe/react-spectrum-v3 into …
snowystinger d0775a2
Merge branch 'master' into api-review
snowystinger a941ae8
prop changed
snowystinger 21cf3cb
put button's emphasized back even though it's not implemented yet
snowystinger 813da14
Merge branch 'master' into api-review
dannify 3b9040d
Merge branch 'master' into api-review
dannify 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
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,42 +1,46 @@ | ||
| # Form and FieldLabel | ||
| # Form and Label | ||
|
|
||
| ```typescript | ||
| interface Form { | ||
| interface Form extends DOMProps, StyleProps, LabelableProps { | ||
| children: ReactElement<FormItem> | ReactElement<FormItem>[] | ||
| isQuiet?: boolean, | ||
| isEmphasized?: boolean, | ||
| isDisabled?: boolean, | ||
| isRequired?: boolean, | ||
| isReadOnly?: boolean, | ||
| validationState?: ValidationState | ||
| } | ||
|
|
||
| export interface LabelProps extends DOMProps { | ||
| children?: ReactElement | ReactElement[], | ||
| labelFor?: string, | ||
| label?: ReactNode, | ||
| htmlFor?: string | ||
| } | ||
|
|
||
| interface FieldLabelBase extends LabelProps, DOMProps, StyleProps { | ||
| labelPosition?: 'top' | 'side', // default ? | ||
| labelAlign?: 'start' | 'end', // Default start | ||
| interface Label extends DOMProps, StyleProps { | ||
| children?: ReactNode, | ||
| htmlFor?: string, // for compatibility with React | ||
| for?: string, | ||
| labelPosition?: LabelPosition, // default top | ||
| labelAlign?: Alignment, // default start | ||
| isRequired?: boolean, | ||
| necessityIndicator?: 'icon' | 'label' | ||
| necessityIndicator?: NecessityIndicator // default icon | ||
| } | ||
|
|
||
| interface FormItem extends FieldLabelBase {} | ||
| interface FieldLabel extends FieldLabelBase {} | ||
| ``` | ||
|
|
||
| ## FormItem Changes | ||
| ## Form Changes | ||
| | **v2** | **v3** | **Notes** | | ||
| | -------------------------- | -------------------------- | ----------- | | ||
| | `labelAlign="left"` | `labelAlign="start"` | rtl support | | ||
| | `labelAlign="right"` | `labelAlign="end"` | rtl support | | ||
| | `labelFor` | - | internal | | ||
| | - | `isQuiet` | added | | ||
| | - | `isEmphasized` | added | | ||
| | - | `isDisabled` | added | | ||
| | - | `isRequired` | added | | ||
| | - | `necessityIndicator` | added | | ||
| | - | `labelPosition` | added | | ||
| | - | `isReadOnly` | added | | ||
| | - | `validationState` | added | | ||
|
|
||
| ## FieldLabel Changes | ||
| | **v2** | **v3** | **Notes** | | ||
| | ------------------ | ------------------------ | ----------- | | ||
| | `position="left"` | `labelAlign="start"` | rtl support | | ||
| | `position="right"` | `labelAlign="end"` | rtl support | | ||
| | `necessity` | `isRequired` | | | ||
| | - | `labelPosition` | added | | ||
| | **v2** | **v3** | **Notes** | | ||
| | -------------------------- | -------------------------- | --------------------- | | ||
| | `FieldLabel` | `Label` | component name change | | ||
| | `labelAlign="left"` | `labelAlign="start"` | rtl support | | ||
| | `labelAlign="right"` | `labelAlign="end"` | rtl support | | ||
| | `labelFor` | `for` | internal | | ||
| | - | `isRequired` | added | | ||
| | - | `isReadOnly` | added | | ||
| | - | `validationState` | added | | ||
| | - | `necessityIndicator` | added | | ||
| | - | `labelPosition` | added | | ||
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.