Skip to content
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

feat(react-components): Add InfoButton to unstable exports #25686

Merged
merged 3 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "feat: Adding InfoButton to unstable.",
"packageName": "@fluentui/react-components",
"email": "esteban.230@hotmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "chore: Making the package public and preparing to add to unstable.",
"packageName": "@fluentui/react-infobutton",
"email": "esteban.230@hotmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ import { FieldProps } from '@fluentui/react-field';
import { FieldSlots } from '@fluentui/react-field';
import { FieldState } from '@fluentui/react-field';
import { getFieldClassNames } from '@fluentui/react-field';
import { InfoButton } from '@fluentui/react-infobutton';
import { infoButtonClassNames } from '@fluentui/react-infobutton';
import { InfoButtonProps } from '@fluentui/react-infobutton';
import { InfoButtonSlots } from '@fluentui/react-infobutton';
import { InfoButtonState } from '@fluentui/react-infobutton';
import { InputField_unstable as InputField } from '@fluentui/react-input';
import { inputFieldClassNames } from '@fluentui/react-input';
import { InputFieldProps_unstable as InputFieldProps } from '@fluentui/react-input';
Expand Down Expand Up @@ -112,6 +117,7 @@ import { renderCardPreview_unstable } from '@fluentui/react-card';
import { renderCombobox_unstable } from '@fluentui/react-combobox';
import { renderDropdown_unstable } from '@fluentui/react-combobox';
import { renderField_unstable } from '@fluentui/react-field';
import { renderInfoButton_unstable } from '@fluentui/react-infobutton';
import { renderListbox_unstable } from '@fluentui/react-combobox';
import { renderOption_unstable } from '@fluentui/react-combobox';
import { renderOptionGroup_unstable } from '@fluentui/react-combobox';
Expand Down Expand Up @@ -237,6 +243,8 @@ import { useDropdown_unstable } from '@fluentui/react-combobox';
import { useDropdownStyles_unstable } from '@fluentui/react-combobox';
import { useField_unstable } from '@fluentui/react-field';
import { useFieldStyles_unstable } from '@fluentui/react-field';
import { useInfoButton_unstable } from '@fluentui/react-infobutton';
import { useInfoButtonStyles_unstable } from '@fluentui/react-infobutton';
import { useIsOverflowGroupVisible } from '@fluentui/react-overflow';
import { useIsOverflowItemVisible } from '@fluentui/react-overflow';
import { useListbox_unstable } from '@fluentui/react-combobox';
Expand Down Expand Up @@ -401,6 +409,16 @@ export { FieldState }

export { getFieldClassNames }

export { InfoButton }

export { infoButtonClassNames }

export { InfoButtonProps }

export { InfoButtonSlots }

export { InfoButtonState }

export { InputField }

export { inputFieldClassNames }
Expand Down Expand Up @@ -495,6 +513,8 @@ export { renderDropdown_unstable }

export { renderField_unstable }

export { renderInfoButton_unstable }

export { renderListbox_unstable }

export { renderOption_unstable }
Expand Down Expand Up @@ -746,6 +766,10 @@ export { useField_unstable }

export { useFieldStyles_unstable }

export { useInfoButton_unstable }

export { useInfoButtonStyles_unstable }

export { useIsOverflowGroupVisible }

export { useIsOverflowItemVisible }
Expand Down
1 change: 1 addition & 0 deletions packages/react-components/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@fluentui/react-divider": "^9.1.4",
"@fluentui/react-field": "9.0.0-alpha.8",
"@fluentui/react-image": "^9.0.11",
"@fluentui/react-infobutton": "9.0.0-beta.0",
"@fluentui/react-input": "^9.2.5",
"@fluentui/react-label": "^9.0.10",
"@fluentui/react-link": "^9.0.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ export type {
ToolbarToggleButtonState,
} from '@fluentui/react-toolbar';

export {
InfoButton,
infoButtonClassNames,
useInfoButton_unstable,
useInfoButtonStyles_unstable,
renderInfoButton_unstable,
} from '@fluentui/react-infobutton';
export type { InfoButtonProps, InfoButtonSlots, InfoButtonState } from '@fluentui/react-infobutton';

export {
Overflow,
OverflowItem,
Expand Down
24 changes: 24 additions & 0 deletions packages/react-components/react-infobutton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,28 @@

**React Infobutton components for [Fluent UI React](https://react.fluentui.dev/)**

## STATUS: WIP 🚧

These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.

## Usage

To import InfoButton:

```js
import { InfoButton } from '@fluentui/react-infobutton';
```

Once the InfoButton component graduates to a production release, the component will be available at:

```js
import { InfoButton } from '@fluentui/react-components';
```

### Examples

```jsx
const InfoButtonExample = () => {
return <InfoButton content="This is an InfoButton's content." />;
};
```
3 changes: 1 addition & 2 deletions packages/react-components/react-infobutton/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@fluentui/react-infobutton",
"version": "9.0.0-alpha.0",
"private": true,
"version": "9.0.0-beta.0",
"description": "React components for building web experiences",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
InfoButtons provide a way to display additional information about a form field or an area in the UI.

<!-- Don't allow prettier to collapse code block into single line -->
<!-- prettier-ignore -->
> **⚠️ Preview components are considered unstable:**
>
> ```jsx
>
> import { InfoButton } from '@fluentui/react-components/unstable';
>
> ```
>
> - Features and APIs may change before final release
> - Please contact us if you intend to use this in your product