-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Select disabled state hover style, Combobox disabled state open …
…on chevron click (#26068)
- Loading branch information
Showing
9 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-combobox-3d31acf9-37ca-43e4-8338-1f3ce04d8e7e.json
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,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "fix: disabled cursor style, opening when disabled, and hover styles", | ||
"packageName": "@fluentui/react-combobox", | ||
"email": "sarah.higley@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-select-f9db8e0b-3088-4a68-9179-d5821aebf0cd.json
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,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "fix: no interactive hover style when disabled", | ||
"packageName": "@fluentui/react-select", | ||
"email": "sarah.higley@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
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
31 changes: 31 additions & 0 deletions
31
packages/react-components/react-combobox/stories/Combobox/ComboboxDisabled.stories.tsx
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,31 @@ | ||
import * as React from 'react'; | ||
import { makeStyles, shorthands, useId } from '@fluentui/react-components'; | ||
import { Combobox, Option } from '@fluentui/react-combobox'; | ||
import type { ComboboxProps } from '@fluentui/react-combobox'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
// Stack the label above the field with a gap | ||
display: 'grid', | ||
gridTemplateRows: 'repeat(1fr)', | ||
justifyItems: 'start', | ||
...shorthands.gap('2px'), | ||
maxWidth: '400px', | ||
}, | ||
}); | ||
|
||
export const Disabled = (props: Partial<ComboboxProps>) => { | ||
const comboId = useId('combo-disabled'); | ||
const options = ['Cat', 'Dog', 'Ferret', 'Fish', 'Hamster', 'Snake']; | ||
const styles = useStyles(); | ||
return ( | ||
<div className={styles.root}> | ||
<label id={comboId}>Best pet</label> | ||
<Combobox aria-labelledby={comboId} disabled placeholder="Select an animal" {...props}> | ||
{options.map(option => ( | ||
<Option key={option}>{option}</Option> | ||
))} | ||
</Combobox> | ||
</div> | ||
); | ||
}; |
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
31 changes: 31 additions & 0 deletions
31
packages/react-components/react-combobox/stories/Dropdown/DropdownDisabled.stories.tsx
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,31 @@ | ||
import * as React from 'react'; | ||
import { makeStyles, shorthands, useId } from '@fluentui/react-components'; | ||
import { Dropdown, Option } from '@fluentui/react-combobox'; | ||
import type { DropdownProps } from '@fluentui/react-combobox'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
// Stack the label above the field with a gap | ||
display: 'grid', | ||
gridTemplateRows: 'repeat(1fr)', | ||
justifyItems: 'start', | ||
...shorthands.gap('2px'), | ||
maxWidth: '400px', | ||
}, | ||
}); | ||
|
||
export const Disabled = (props: Partial<DropdownProps>) => { | ||
const comboId = useId('combo-disabled'); | ||
const options = ['Cat', 'Dog', 'Ferret', 'Fish', 'Hamster', 'Snake']; | ||
const styles = useStyles(); | ||
return ( | ||
<div className={styles.root}> | ||
<label id={comboId}>Best pet</label> | ||
<Dropdown aria-labelledby={comboId} disabled placeholder="Select an animal" {...props}> | ||
{options.map(option => ( | ||
<Option key={option}>{option}</Option> | ||
))} | ||
</Dropdown> | ||
</div> | ||
); | ||
}; |
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