@fluentui/react-button 9.0.0-rc.10 → 9.0.0-rc.13
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +114 -1
- package/CHANGELOG.md +39 -2
- package/README.md +80 -18
- package/dist/index.d.ts +6 -37
- package/lib/components/Button/Button.types.js.map +1 -1
- package/lib/components/Button/index.js +1 -3
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/useButton.js +0 -3
- package/lib/components/Button/useButton.js.map +1 -1
- package/lib/components/Button/useButtonStyles.js +17 -28
- package/lib/components/Button/useButtonStyles.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib/components/CompoundButton/index.js +1 -3
- package/lib/components/CompoundButton/index.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.js +0 -5
- package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +2 -1
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib/components/MenuButton/index.js +1 -3
- package/lib/components/MenuButton/index.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.js +0 -5
- package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.js +1 -1
- package/lib/components/SplitButton/SplitButton.js.map +1 -1
- package/lib/components/SplitButton/index.js +1 -3
- package/lib/components/SplitButton/index.js.map +1 -1
- package/lib/components/SplitButton/useSplitButton.js +0 -4
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.js +5 -15
- package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib/components/ToggleButton/index.js +1 -3
- package/lib/components/ToggleButton/index.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.js +45 -9
- package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib/index.js +5 -10
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Button/index.js +1 -9
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/useButton.js +0 -3
- package/lib-commonjs/components/Button/useButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButtonStyles.js +18 -29
- package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/index.js +1 -9
- package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +1 -6
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.js +2 -1
- package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/index.js +1 -9
- package/lib-commonjs/components/MenuButton/index.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +1 -6
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.js +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/index.js +1 -9
- package/lib-commonjs/components/SplitButton/index.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.js +0 -4
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +6 -16
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/index.js +1 -9
- package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +47 -10
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib-commonjs/index.js +1 -36
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,120 @@
|
|
2
2
|
"name": "@fluentui/react-button",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Tue, 31 May 2022 21:26:30 GMT",
|
6
|
+
"tag": "@fluentui/react-button_v9.0.0-rc.13",
|
7
|
+
"version": "9.0.0-rc.13",
|
8
|
+
"comments": {
|
9
|
+
"prerelease": [
|
10
|
+
{
|
11
|
+
"author": "olfedias@microsoft.com",
|
12
|
+
"package": "@fluentui/react-button",
|
13
|
+
"commit": "0a5e9fa77a72eecafdd07034ccdc0b95fd49877c",
|
14
|
+
"comment": "chore: Update Griffel to latest version"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-button",
|
19
|
+
"comment": "Bump @fluentui/react-aria to v9.0.0-rc.10",
|
20
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-button",
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.13",
|
26
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-button",
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.10",
|
32
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-button",
|
37
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8",
|
38
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"date": "Thu, 26 May 2022 21:01:23 GMT",
|
45
|
+
"tag": "@fluentui/react-button_v9.0.0-rc.12",
|
46
|
+
"version": "9.0.0-rc.12",
|
47
|
+
"comments": {
|
48
|
+
"prerelease": [
|
49
|
+
{
|
50
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
51
|
+
"package": "@fluentui/react-button",
|
52
|
+
"commit": "cc2a9d0f9b722f68a54da026ab320e3be22c21dd",
|
53
|
+
"comment": "ToggleButton: Differentiating hover and checked styles."
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
57
|
+
"package": "@fluentui/react-button",
|
58
|
+
"commit": "2c84c4f1ad43819325ee0aafa57d42a1f8239113",
|
59
|
+
"comment": "ToggleButton: Apply thicker border width to checked outline toggle buttons."
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "beachball",
|
63
|
+
"package": "@fluentui/react-button",
|
64
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.12",
|
65
|
+
"commit": "3cf55ce998048554bf6a550de44403843ea8ede0"
|
66
|
+
}
|
67
|
+
]
|
68
|
+
}
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"date": "Mon, 23 May 2022 18:56:41 GMT",
|
72
|
+
"tag": "@fluentui/react-button_v9.0.0-rc.11",
|
73
|
+
"version": "9.0.0-rc.11",
|
74
|
+
"comments": {
|
75
|
+
"prerelease": [
|
76
|
+
{
|
77
|
+
"author": "esteban.230@hotmail.com",
|
78
|
+
"package": "@fluentui/react-button",
|
79
|
+
"commit": "5ed22515a7542b432ed694f22606ac3718d501cb",
|
80
|
+
"comment": "Removing <componentName>ClassName exports."
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
84
|
+
"package": "@fluentui/react-button",
|
85
|
+
"commit": "5ed22515a7542b432ed694f22606ac3718d501cb",
|
86
|
+
"comment": "Removing deprecated block prop from all button components."
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"author": "beachball",
|
90
|
+
"package": "@fluentui/react-button",
|
91
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.11",
|
92
|
+
"commit": "d4f80b17690e962d6a24e68959608d1ffe84aef6"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"author": "beachball",
|
96
|
+
"package": "@fluentui/react-button",
|
97
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.9",
|
98
|
+
"commit": "d4f80b17690e962d6a24e68959608d1ffe84aef6"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"author": "beachball",
|
102
|
+
"package": "@fluentui/react-button",
|
103
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.7",
|
104
|
+
"commit": "d4f80b17690e962d6a24e68959608d1ffe84aef6"
|
105
|
+
}
|
106
|
+
],
|
107
|
+
"none": [
|
108
|
+
{
|
109
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
110
|
+
"package": "@fluentui/react-button",
|
111
|
+
"commit": "aa1f446e037786d74a3c14f0bee09dbcf403a929",
|
112
|
+
"comment": "Improving README and updating spec and migration guide."
|
113
|
+
}
|
114
|
+
]
|
115
|
+
}
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"date": "Mon, 23 May 2022 12:14:03 GMT",
|
6
119
|
"tag": "@fluentui/react-button_v9.0.0-rc.10",
|
7
120
|
"version": "9.0.0-rc.10",
|
8
121
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,49 @@
|
|
1
1
|
# Change Log - @fluentui/react-button
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 31 May 2022 21:26:30 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.0.0-rc.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.0-rc.13)
|
8
|
+
|
9
|
+
Tue, 31 May 2022 21:26:30 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-rc.12..@fluentui/react-button_v9.0.0-rc.13)
|
11
|
+
|
12
|
+
### Changes
|
13
|
+
|
14
|
+
- chore: Update Griffel to latest version ([PR #23275](https://github.com/microsoft/fluentui/pull/23275) by olfedias@microsoft.com)
|
15
|
+
- Bump @fluentui/react-aria to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
16
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
18
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
19
|
+
|
20
|
+
## [9.0.0-rc.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.0-rc.12)
|
21
|
+
|
22
|
+
Thu, 26 May 2022 21:01:23 GMT
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-rc.11..@fluentui/react-button_v9.0.0-rc.12)
|
24
|
+
|
25
|
+
### Changes
|
26
|
+
|
27
|
+
- ToggleButton: Differentiating hover and checked styles. ([PR #23209](https://github.com/microsoft/fluentui/pull/23209) by Humberto.Morimoto@microsoft.com)
|
28
|
+
- ToggleButton: Apply thicker border width to checked outline toggle buttons. ([PR #23207](https://github.com/microsoft/fluentui/pull/23207) by Humberto.Morimoto@microsoft.com)
|
29
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
|
30
|
+
|
31
|
+
## [9.0.0-rc.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.0-rc.11)
|
32
|
+
|
33
|
+
Mon, 23 May 2022 18:56:41 GMT
|
34
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-rc.10..@fluentui/react-button_v9.0.0-rc.11)
|
35
|
+
|
36
|
+
### Changes
|
37
|
+
|
38
|
+
- Removing <componentName>ClassName exports. ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by esteban.230@hotmail.com)
|
39
|
+
- Removing deprecated block prop from all button components. ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by Humberto.Morimoto@microsoft.com)
|
40
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.11 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
41
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.9 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
42
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.7 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
43
|
+
|
7
44
|
## [9.0.0-rc.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.0-rc.10)
|
8
45
|
|
9
|
-
Mon, 23 May 2022 12:
|
46
|
+
Mon, 23 May 2022 12:14:03 GMT
|
10
47
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-rc.9..@fluentui/react-button_v9.0.0-rc.10)
|
11
48
|
|
12
49
|
### Changes
|
package/README.md
CHANGED
@@ -2,35 +2,97 @@
|
|
2
2
|
|
3
3
|
**Button components for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
- Buttons enable users to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
|
6
|
+
- CompoundButtons are buttons that can have secondary content that adds extra information to the user.
|
7
|
+
- MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close menus.
|
8
|
+
- SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary action, while interacting with the second one opens a menu with secondary actions.
|
9
|
+
- ToggleButtons are buttons that toggle between two defined states when triggered.
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
13
|
To import Button:
|
14
14
|
|
15
15
|
```js
|
16
|
-
import { Button } from '@fluentui/react-
|
16
|
+
import { Button, CompoundButton, MenuButton, SplitButton, ToggleButton } from '@fluentui/react-components';
|
17
17
|
```
|
18
18
|
|
19
|
-
|
19
|
+
### Examples
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
### Button
|
22
|
+
|
23
|
+
```jsx
|
24
|
+
<Button>Submit</Button>
|
25
|
+
<Button icon={<SVGIcon />} />
|
26
|
+
<Button icon={<SVGIcon />}>Submit</Button>
|
27
|
+
<Button icon={<SVGIcon />} iconPosition="after">Submit</Button>
|
28
|
+
<Button appearance="primary">Submit</Button>
|
29
|
+
<Button disabled>Submit</Button>
|
30
|
+
<Button size="small">Submit</Button>
|
31
|
+
<Button size="large">Submit</Button>
|
23
32
|
```
|
24
33
|
|
25
|
-
###
|
34
|
+
### CompoundButton
|
26
35
|
|
27
36
|
```jsx
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
37
|
+
<CompoundButton icon={<CalendarMonth />} secondaryContent="Secondary content" {...props}>
|
38
|
+
Example
|
39
|
+
</CompoundButton>
|
40
|
+
```
|
41
|
+
|
42
|
+
### MenuButton
|
43
|
+
|
44
|
+
```jsx
|
45
|
+
<Menu>
|
46
|
+
<MenuTrigger>
|
47
|
+
<MenuButton>Example</MenuButton>
|
48
|
+
</MenuTrigger>
|
49
|
+
|
50
|
+
<MenuPopover>
|
51
|
+
<MenuList>
|
52
|
+
<MenuItem>Item a</MenuItem>
|
53
|
+
<MenuItem>Item b</MenuItem>
|
54
|
+
</MenuList>
|
55
|
+
</MenuPopover>
|
56
|
+
</Menu>
|
57
|
+
```
|
58
|
+
|
59
|
+
### SplitButton
|
60
|
+
|
61
|
+
```jsx
|
62
|
+
<Menu positioning="below-end">
|
63
|
+
<MenuTrigger>
|
64
|
+
{(triggerProps: MenuButtonProps) => <SplitButton menuButton={triggerProps}>Example</SplitButton>}
|
65
|
+
</MenuTrigger>
|
66
|
+
|
67
|
+
<MenuPopover>
|
68
|
+
<MenuList>
|
69
|
+
<MenuItem>Item a</MenuItem>
|
70
|
+
<MenuItem>Item b</MenuItem>
|
71
|
+
</MenuList>
|
72
|
+
</MenuPopover>
|
73
|
+
</Menu>
|
74
|
+
```
|
75
|
+
|
76
|
+
### ToggleButton
|
77
|
+
|
78
|
+
```jsx
|
79
|
+
<ToggleButton>Toggle volume</ToggleButton>
|
80
|
+
<ToggleButton defaultChecked={true}>Toggle volume</ToggleButton>
|
81
|
+
<ToggleButton checked={true}>Toggle volume</ToggleButton>
|
82
|
+
<ToggleButton checked={false}>Toggle volume</ToggleButton>
|
36
83
|
```
|
84
|
+
|
85
|
+
See [Fluent UI Storybook](https://aka.ms/fluentui-storybook) for more detailed usage examples.
|
86
|
+
|
87
|
+
Alternatively, run Storybook locally with:
|
88
|
+
|
89
|
+
1. `yarn start`
|
90
|
+
2. Select `react-button` from the list.
|
91
|
+
|
92
|
+
### Specification
|
93
|
+
|
94
|
+
See [SPEC.md](./src/components/Button/SPEC.md).
|
95
|
+
|
96
|
+
### Migration Guide
|
97
|
+
|
98
|
+
If you're upgrading to Fluent UI v9 see [MIGRATION.md](./src/components/Button/MIGRATION.md) for guidance on updating to the latest component implementations.
|
package/dist/index.d.ts
CHANGED
@@ -11,11 +11,6 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
11
11
|
*/
|
12
12
|
export declare const Button: ForwardRefComponent<ButtonProps>;
|
13
13
|
|
14
|
-
/**
|
15
|
-
* @deprecated Use `buttonClassNames.root` instead.
|
16
|
-
*/
|
17
|
-
export declare const buttonClassName: string;
|
18
|
-
|
19
14
|
export declare const buttonClassNames: SlotClassNames<ButtonSlots>;
|
20
15
|
|
21
16
|
export declare type ButtonProps = ComponentProps<ButtonSlots> & {
|
@@ -30,13 +25,6 @@ export declare type ButtonProps = ComponentProps<ButtonSlots> & {
|
|
30
25
|
* @default 'secondary'
|
31
26
|
*/
|
32
27
|
appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';
|
33
|
-
/**
|
34
|
-
* A button can fill the width of its container.
|
35
|
-
* @default false
|
36
|
-
*
|
37
|
-
* @deprecated - Use style overrides instead.
|
38
|
-
*/
|
39
|
-
block?: boolean;
|
40
28
|
/**
|
41
29
|
* When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it
|
42
30
|
* is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this
|
@@ -82,7 +70,7 @@ export declare type ButtonSlots = {
|
|
82
70
|
icon?: Slot<'span'>;
|
83
71
|
};
|
84
72
|
|
85
|
-
export declare type ButtonState = ComponentState<ButtonSlots> & Required<Pick<ButtonProps, 'appearance' | '
|
73
|
+
export declare type ButtonState = ComponentState<ButtonSlots> & Required<Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {
|
86
74
|
/**
|
87
75
|
* A button can contain only an icon.
|
88
76
|
*
|
@@ -96,14 +84,9 @@ export declare type ButtonState = ComponentState<ButtonSlots> & Required<Pick<Bu
|
|
96
84
|
*/
|
97
85
|
export declare const CompoundButton: ForwardRefComponent<CompoundButtonProps>;
|
98
86
|
|
99
|
-
/**
|
100
|
-
* @deprecated Use `compoundButtonClassName.root` instead.
|
101
|
-
*/
|
102
|
-
export declare const compoundButtonClassName: string;
|
103
|
-
|
104
87
|
export declare const compoundButtonClassNames: SlotClassNames<CompoundButtonSlots>;
|
105
88
|
|
106
|
-
export declare type CompoundButtonProps = ComponentProps<Partial<CompoundButtonSlots>> & Pick<ButtonProps, 'appearance' | '
|
89
|
+
export declare type CompoundButtonProps = ComponentProps<Partial<CompoundButtonSlots>> & Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>;
|
107
90
|
|
108
91
|
export declare type CompoundButtonSlots = ButtonSlots & {
|
109
92
|
/**
|
@@ -119,18 +102,14 @@ export declare type CompoundButtonSlots = ButtonSlots & {
|
|
119
102
|
export declare type CompoundButtonState = ComponentState<CompoundButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components'>;
|
120
103
|
|
121
104
|
/**
|
122
|
-
* MenuButtons are buttons that
|
105
|
+
* MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close
|
106
|
+
* menus.
|
123
107
|
*/
|
124
108
|
export declare const MenuButton: ForwardRefComponent<MenuButtonProps>;
|
125
109
|
|
126
|
-
/**
|
127
|
-
* @deprecated Use `menuButtonClassName.root` instead.
|
128
|
-
*/
|
129
|
-
export declare const menuButtonClassName: string;
|
130
|
-
|
131
110
|
export declare const menuButtonClassNames: SlotClassNames<MenuButtonSlots>;
|
132
111
|
|
133
|
-
export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Pick<ButtonProps, 'appearance' | '
|
112
|
+
export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'shape' | 'size'>;
|
134
113
|
|
135
114
|
export declare type MenuButtonSlots = ButtonSlots & {
|
136
115
|
/**
|
@@ -164,16 +143,11 @@ export declare const renderMenuButton_unstable: (state: MenuButtonState) => JSX.
|
|
164
143
|
export declare const renderSplitButton_unstable: (state: SplitButtonState) => JSX.Element;
|
165
144
|
|
166
145
|
/**
|
167
|
-
* SplitButtons are a grouping of two interactive surfaces where
|
146
|
+
* SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary
|
168
147
|
* action, while interacting with the second one opens a menu with secondary actions.
|
169
148
|
*/
|
170
149
|
export declare const SplitButton: ForwardRefComponent<SplitButtonProps>;
|
171
150
|
|
172
|
-
/**
|
173
|
-
* @deprecated Use `splitButtonClassName.root` instead.
|
174
|
-
*/
|
175
|
-
export declare const splitButtonClassName: string;
|
176
|
-
|
177
151
|
export declare const splitButtonClassNames: SlotClassNames<SplitButtonSlots>;
|
178
152
|
|
179
153
|
export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & Omit<ButtonProps, 'root'> & Omit<MenuButtonProps, 'root'>;
|
@@ -200,11 +174,6 @@ export declare type SplitButtonState = ComponentState<SplitButtonSlots> & Omit<B
|
|
200
174
|
*/
|
201
175
|
export declare const ToggleButton: ForwardRefComponent<ToggleButtonProps>;
|
202
176
|
|
203
|
-
/**
|
204
|
-
* @deprecated Use `toggleButtonClassName.root` instead.
|
205
|
-
*/
|
206
|
-
export declare const toggleButtonClassName: string;
|
207
|
-
|
208
177
|
export declare const toggleButtonClassNames: SlotClassNames<ButtonSlots>;
|
209
178
|
|
210
179
|
export declare type ToggleButtonProps = ButtonProps & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.types.js","sourceRoot":"../src/","sources":["components/Button/Button.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n *
|
1
|
+
{"version":3,"file":"Button.types.js","sourceRoot":"../src/","sources":["components/Button/Button.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n *\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n *\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n *\n * @default 'rounded'\n */\n shape?: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n};\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n Required<Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {\n /**\n * A button can contain only an icon.\n *\n * @default false\n */\n iconOnly: boolean;\n };\n"]}
|
@@ -1,7 +1,5 @@
|
|
1
1
|
export * from './Button';
|
2
2
|
export * from './renderButton';
|
3
3
|
export * from './useButton';
|
4
|
-
export {
|
5
|
-
/* eslint-disable-next-line deprecation/deprecation */
|
6
|
-
buttonClassName, buttonClassNames, useButtonStyles_unstable } from './useButtonStyles';
|
4
|
+
export { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles';
|
7
5
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export * from './Button';\n// Explicit exports to omit ButtonCommons\nexport type { ButtonProps, ButtonSlots, ButtonState } from './Button.types';\nexport * from './renderButton';\nexport * from './useButton';\nexport { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles';\n"]}
|
@@ -10,8 +10,6 @@ export const useButton_unstable = (props, ref) => {
|
|
10
10
|
const {
|
11
11
|
appearance = 'secondary',
|
12
12
|
as,
|
13
|
-
// eslint-disable-next-line deprecation/deprecation
|
14
|
-
block = false,
|
15
13
|
disabled = false,
|
16
14
|
disabledFocusable = false,
|
17
15
|
icon,
|
@@ -23,7 +21,6 @@ export const useButton_unstable = (props, ref) => {
|
|
23
21
|
return {
|
24
22
|
// Props passed at the top-level
|
25
23
|
appearance,
|
26
|
-
block,
|
27
24
|
disabled,
|
28
25
|
disabledFocusable,
|
29
26
|
iconPosition,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Button/useButton.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,QAA8B,sBAA9B;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAIA;;;;AAIG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAChC,KADgC,EAEhC,GAFgC,KAGjB;AACf,QAAM;AACJ,IAAA,UAAU,GAAG,WADT;AAEJ,IAAA,EAFI;AAGJ
|
1
|
+
{"version":3,"sources":["components/Button/useButton.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,QAA8B,sBAA9B;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAIA;;;;AAIG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAChC,KADgC,EAEhC,GAFgC,KAGjB;AACf,QAAM;AACJ,IAAA,UAAU,GAAG,WADT;AAEJ,IAAA,EAFI;AAGJ,IAAA,QAAQ,GAAG,KAHP;AAIJ,IAAA,iBAAiB,GAAG,KAJhB;AAKJ,IAAA,IALI;AAMJ,IAAA,YAAY,GAAG,QANX;AAOJ,IAAA,KAAK,GAAG,SAPJ;AAQJ,IAAA,IAAI,GAAG;AARH,MASF,KATJ;AAUA,QAAM,aAAa,GAAG,gBAAgB,CAAC,IAAD,CAAtC;AAEA,SAAO;AACL;AACA,IAAA,UAFK;AAGL,IAAA,QAHK;AAIL,IAAA,iBAJK;AAKL,IAAA,YALK;AAML,IAAA,KANK;AAOL,IAAA,IAPK;AASL;AACA,IAAA,QAAQ,EAAE,OAAO,CAAC,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAE,QAAf,KAA2B,CAAC,KAAK,CAAC,QAAnC,CAVZ;AAYL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE;AAFI,KAbP;AAkBL,IAAA,IAAI,EAAE,qBAAqB,CACzB,EAAE,IAAI,QADmB,EAEzB,aAAa,CAAsB,KAAtB,EAA6B;AACxC,MAAA,QAAQ,EAAE,IAD8B;AAExC,MAAA,YAAY,EAAE;AACZ;AACA,QAAA,GAAG,EAAE,GAFO;AAGZ,QAAA,IAAI,EAAE,QAHM,CAGI;;AAHJ;AAF0B,KAA7B,CAFY,CAlBtB;AA6BL,IAAA,IAAI,EAAE;AA7BD,GAAP;AA+BD,CA/CM","sourcesContent":["import * as React from 'react';\nimport { useARIAButton } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ButtonProps, ButtonState } from './Button.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonState => {\n const {\n appearance = 'secondary',\n as,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = 'medium',\n } = props;\n const iconShorthand = resolveShorthand(icon);\n\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n\n // State calculated from a set of props\n iconOnly: Boolean(iconShorthand?.children && !props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n },\n\n root: getNativeElementProps(\n as || 'button',\n useARIAButton<ARIAButtonSlotProps>(props, {\n required: true,\n defaultProps: {\n // useARIAButton isn't working with React.Ref<HTMLButtonElement | HTMLAnchorElement>\n ref: ref as React.Ref<HTMLButtonElement>,\n type: 'button', // This is added because the default for type is 'submit'\n },\n }),\n ),\n icon: iconShorthand,\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -6,11 +6,6 @@ export const buttonClassNames = {
|
|
6
6
|
root: 'fui-Button',
|
7
7
|
icon: 'fui-Button__icon'
|
8
8
|
};
|
9
|
-
/**
|
10
|
-
* @deprecated Use `buttonClassNames.root` instead.
|
11
|
-
*/
|
12
|
-
|
13
|
-
export const buttonClassName = buttonClassNames.root;
|
14
9
|
const iconSpacingVar = '--fui-Button__icon--spacing';
|
15
10
|
|
16
11
|
const useRootStyles = /*#__PURE__*/__styles({
|
@@ -75,10 +70,6 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
75
70
|
"ze5xyy": "f4xjyn1",
|
76
71
|
"pc6evw": "f9ddjv3"
|
77
72
|
},
|
78
|
-
"block": {
|
79
|
-
"B2u0y6b": "f6dzj5z",
|
80
|
-
"a9b677": "fly5x3f"
|
81
|
-
},
|
82
73
|
"outline": {
|
83
74
|
"De3pzq": "f1c21dwh",
|
84
75
|
"Jwef8y": "fjxutwb",
|
@@ -204,7 +195,7 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
204
195
|
"Bg96gwp": "faaz57k"
|
205
196
|
}
|
206
197
|
}, {
|
207
|
-
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fmrv4ls{vertical-align:middle;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1n52uh2{max-width:280px;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".fz5stix{white-space:nowrap;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1s6fcnf{outline-style:none;}", ".
|
198
|
+
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fmrv4ls{vertical-align:middle;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1n52uh2{max-width:280px;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".fz5stix{white-space:nowrap;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1s6fcnf{outline-style:none;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fhovq9v{background-color:var(--colorSubtleBackground);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".fztplxc{padding-top:var(--spacingVerticalNone);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f9g1xly{padding-bottom:var(--spacingVerticalNone);}", ".frvgh55{height:24px;}", ".fh7ncta{min-width:64px;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".f1d2rq10{height:32px;}", ".f14es27b{min-width:96px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fjodcmx{padding-right:var(--spacingHorizontalL);}", ".fhx4nu{padding-left:var(--spacingHorizontalL);}", ".fbhnoac{height:40px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}"],
|
208
199
|
"h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1xlaoq0:hover{border-bottom-color:var(--colorNeutralStroke1Hover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f8491dx:hover{cursor:pointer;}", ".ft1hn21:hover .fui-Icon-filled{display:inline;}", ".fuxngvv:hover .fui-Icon-regular{display:none;}", ".f141de4g:hover:active{background-color:var(--colorNeutralBackground1Pressed);}", ".f11v6sdu:hover:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f9yn8i4:hover:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f1ajwf28:hover:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f1uwu36w:hover:active{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f9olfzr:hover:active{color:var(--colorNeutralForeground1Pressed);}", ".fiu5zv5:hover:active{outline-style:none;}", ".f1dfjoow:hover:active .fui-Icon-filled{display:inline;}", ".f1j98vj9:hover:active .fui-Icon-regular{display:none;}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f15wkkf3:hover{background-color:var(--colorBrandBackgroundHover);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1rq72xc:hover{color:var(--colorNeutralForegroundOnBrand);}", ".fnp9lpt:hover:active{background-color:var(--colorBrandBackgroundPressed);}", ".f1h0usnq:hover:active{border-top-color:transparent;}", ".fs4ktlq:hover:active{border-right-color:transparent;}", ".fx2bmrt:hover:active{border-left-color:transparent;}", ".f16h9ulv:hover:active{border-bottom-color:transparent;}", ".f1d6v5y2:hover:active{color:var(--colorNeutralForegroundOnBrand);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}", ".fsv2rcd:hover:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}"],
|
209
200
|
"t": ["@media (forced-colors: active){.f8rnyb3:focus{border-top-color:ButtonText;}}", "@media (forced-colors: active){.fhb3ry5:focus{border-right-color:ButtonText;}.f11223yd:focus{border-left-color:ButtonText;}}", "@media (forced-colors: active){.f16e7g02:focus{border-bottom-color:ButtonText;}}", "@media (forced-colors: active){.f11223yd:focus{border-left-color:ButtonText;}.fhb3ry5:focus{border-right-color:ButtonText;}}", "@media (forced-colors: active){.ff1wgvm:hover{border-top-color:Highlight;}}", "@media (forced-colors: active){.fiob0tu:hover{border-right-color:Highlight;}.f1x4h75k:hover{border-left-color:Highlight;}}", "@media (forced-colors: active){.f1j6scgf:hover{border-bottom-color:Highlight;}}", "@media (forced-colors: active){.f1x4h75k:hover{border-left-color:Highlight;}.fiob0tu:hover{border-right-color:Highlight;}}", "@media (forced-colors: active){.f4xjyn1:hover{color:Highlight;}}", "@media (forced-colors: active){.f9ddjv3:hover:active{color:Highlight;}}"]
|
210
201
|
});
|
@@ -320,7 +311,7 @@ const useRootDisabledStyles = /*#__PURE__*/__styles({
|
|
320
311
|
|
321
312
|
const useRootFocusStyles = /*#__PURE__*/__styles({
|
322
313
|
"base": {
|
323
|
-
"
|
314
|
+
"Brovlpu": "ftqa4ok",
|
324
315
|
"Bnmjwt4": "flfsvnh",
|
325
316
|
"Jopkrh": ["f1781m5e", "flvaaa9"],
|
326
317
|
"hhrs2v": "f50u1b5",
|
@@ -332,52 +323,52 @@ const useRootFocusStyles = /*#__PURE__*/__styles({
|
|
332
323
|
"Bgwpjed": "fpt6wn7"
|
333
324
|
},
|
334
325
|
"circular": {
|
335
|
-
"
|
326
|
+
"Brovlpu": "ftqa4ok",
|
336
327
|
"B8j0l6": ["f11yy61d", "f5edc3x"],
|
337
328
|
"Ekyhi": ["f5edc3x", "f11yy61d"],
|
338
329
|
"Bmrpcm6": ["f1aea4n", "f4jo73o"],
|
339
330
|
"Beswxhl": ["f4jo73o", "f1aea4n"]
|
340
331
|
},
|
341
332
|
"rounded": {},
|
333
|
+
"square": {
|
334
|
+
"Brovlpu": "ftqa4ok",
|
335
|
+
"B8j0l6": ["f5oco9f", "fiz44lb"],
|
336
|
+
"Ekyhi": ["fiz44lb", "f5oco9f"],
|
337
|
+
"Bmrpcm6": ["f1d1ywej", "flv4e1y"],
|
338
|
+
"Beswxhl": ["flv4e1y", "f1d1ywej"]
|
339
|
+
},
|
342
340
|
"primary": {
|
343
|
-
"
|
341
|
+
"Brovlpu": "ftqa4ok",
|
344
342
|
"Bnmjwt4": "fbugrqt",
|
345
343
|
"Jopkrh": ["fhoxsto", "f19qf7vm"],
|
346
344
|
"hhrs2v": "f1tl0rof",
|
347
345
|
"B7jbng7": ["f19qf7vm", "fhoxsto"],
|
348
346
|
"D4py6b": "f15m8qn2"
|
349
347
|
},
|
350
|
-
"square": {
|
351
|
-
"B486eqv": "f2hkw1w",
|
352
|
-
"B8j0l6": ["f5oco9f", "fiz44lb"],
|
353
|
-
"Ekyhi": ["fiz44lb", "f5oco9f"],
|
354
|
-
"Bmrpcm6": ["f1d1ywej", "flv4e1y"],
|
355
|
-
"Beswxhl": ["flv4e1y", "f1d1ywej"]
|
356
|
-
},
|
357
348
|
"small": {
|
358
|
-
"
|
349
|
+
"Brovlpu": "ftqa4ok",
|
359
350
|
"B8j0l6": ["f1dzjeht", "f1fw97sp"],
|
360
351
|
"Ekyhi": ["f1fw97sp", "f1dzjeht"],
|
361
352
|
"Bmrpcm6": ["f1hr3vfr", "f1fepg9x"],
|
362
353
|
"Beswxhl": ["f1fepg9x", "f1hr3vfr"]
|
363
354
|
},
|
364
355
|
"medium": {
|
365
|
-
"
|
356
|
+
"Brovlpu": "ftqa4ok",
|
366
357
|
"B8j0l6": ["f1ezw2km", "f18buiid"],
|
367
358
|
"Ekyhi": ["f18buiid", "f1ezw2km"],
|
368
359
|
"Bmrpcm6": ["f1hat8c3", "f10ee3ek"],
|
369
360
|
"Beswxhl": ["f10ee3ek", "f1hat8c3"]
|
370
361
|
},
|
371
362
|
"large": {
|
372
|
-
"
|
363
|
+
"Brovlpu": "ftqa4ok",
|
373
364
|
"B8j0l6": ["f8iz5lg", "fzmqelg"],
|
374
365
|
"Ekyhi": ["fzmqelg", "f8iz5lg"],
|
375
366
|
"Bmrpcm6": ["f1ywuu4l", "f721nif"],
|
376
367
|
"Beswxhl": ["f721nif", "f1ywuu4l"]
|
377
368
|
}
|
378
369
|
}, {
|
379
|
-
"
|
380
|
-
"d": ["[data-keyboard-nav] .flfsvnh:focus{border-top-color:transparent;}", "[data-keyboard-nav] .f1781m5e:focus{border-right-color:transparent;}", "[data-keyboard-nav] .flvaaa9:focus{border-left-color:transparent;}", "[data-keyboard-nav] .f50u1b5:focus{border-bottom-color:transparent;}", "[data-keyboard-nav] .f19j8a82:focus{outline-color:transparent;}", "[data-keyboard-nav] .fgeg2qa:focus{outline-width:var(--strokeWidthThick);}", "[data-keyboard-nav] .fhcq1yo:focus{outline-style:solid;}", "[data-keyboard-nav] .f9ycirn:focus{box-shadow:var(--shadow4),0 0 0 2px var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fpt6wn7:focus{z-index:1;}", "[data-keyboard-nav] .f11yy61d:focus{border-bottom-right-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .f5edc3x:focus{border-bottom-left-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .f1aea4n:focus{border-top-right-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .f4jo73o:focus{border-top-left-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .
|
370
|
+
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
371
|
+
"d": ["[data-keyboard-nav] .flfsvnh:focus{border-top-color:transparent;}", "[data-keyboard-nav] .f1781m5e:focus{border-right-color:transparent;}", "[data-keyboard-nav] .flvaaa9:focus{border-left-color:transparent;}", "[data-keyboard-nav] .f50u1b5:focus{border-bottom-color:transparent;}", "[data-keyboard-nav] .f19j8a82:focus{outline-color:transparent;}", "[data-keyboard-nav] .fgeg2qa:focus{outline-width:var(--strokeWidthThick);}", "[data-keyboard-nav] .fhcq1yo:focus{outline-style:solid;}", "[data-keyboard-nav] .f9ycirn:focus{box-shadow:var(--shadow4),0 0 0 2px var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fpt6wn7:focus{z-index:1;}", "[data-keyboard-nav] .f11yy61d:focus{border-bottom-right-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .f5edc3x:focus{border-bottom-left-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .f1aea4n:focus{border-top-right-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .f4jo73o:focus{border-top-left-radius:var(--borderRadiusCircular);}", "[data-keyboard-nav] .f5oco9f:focus{border-bottom-right-radius:var(--borderRadiusNone);}", "[data-keyboard-nav] .fiz44lb:focus{border-bottom-left-radius:var(--borderRadiusNone);}", "[data-keyboard-nav] .f1d1ywej:focus{border-top-right-radius:var(--borderRadiusNone);}", "[data-keyboard-nav] .flv4e1y:focus{border-top-left-radius:var(--borderRadiusNone);}", "[data-keyboard-nav] .fbugrqt:focus{border-top-color:var(--colorNeutralForegroundOnBrand);}", "[data-keyboard-nav] .fhoxsto:focus{border-right-color:var(--colorNeutralForegroundOnBrand);}", "[data-keyboard-nav] .f19qf7vm:focus{border-left-color:var(--colorNeutralForegroundOnBrand);}", "[data-keyboard-nav] .f1tl0rof:focus{border-bottom-color:var(--colorNeutralForegroundOnBrand);}", "[data-keyboard-nav] .f15m8qn2:focus{box-shadow:var(--shadow2),0 0 0 2px var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1dzjeht:focus{border-bottom-right-radius:var(--borderRadiusSmall);}", "[data-keyboard-nav] .f1fw97sp:focus{border-bottom-left-radius:var(--borderRadiusSmall);}", "[data-keyboard-nav] .f1hr3vfr:focus{border-top-right-radius:var(--borderRadiusSmall);}", "[data-keyboard-nav] .f1fepg9x:focus{border-top-left-radius:var(--borderRadiusSmall);}", "[data-keyboard-nav] .f1ezw2km:focus{border-bottom-right-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f18buiid:focus{border-bottom-left-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1hat8c3:focus{border-top-right-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f10ee3ek:focus{border-top-left-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f8iz5lg:focus{border-bottom-right-radius:var(--borderRadiusLarge);}", "[data-keyboard-nav] .fzmqelg:focus{border-bottom-left-radius:var(--borderRadiusLarge);}", "[data-keyboard-nav] .f1ywuu4l:focus{border-top-right-radius:var(--borderRadiusLarge);}", "[data-keyboard-nav] .f721nif:focus{border-top-left-radius:var(--borderRadiusLarge);}"]
|
381
372
|
});
|
382
373
|
|
383
374
|
const useRootIconOnlyStyles = /*#__PURE__*/__styles({
|
@@ -451,8 +442,6 @@ export const useButtonStyles_unstable = state => {
|
|
451
442
|
const iconStyles = useIconStyles();
|
452
443
|
const {
|
453
444
|
appearance,
|
454
|
-
// eslint-disable-next-line deprecation/deprecation
|
455
|
-
block,
|
456
445
|
disabled,
|
457
446
|
disabledFocusable,
|
458
447
|
iconOnly,
|
@@ -461,7 +450,7 @@ export const useButtonStyles_unstable = state => {
|
|
461
450
|
size
|
462
451
|
} = state;
|
463
452
|
state.root.className = mergeClasses(buttonClassNames.root, // Root styles
|
464
|
-
rootStyles.base, rootStyles.highContrast,
|
453
|
+
rootStyles.base, rootStyles.highContrast, appearance && rootStyles[appearance], rootStyles[size], rootStyles[shape], // Disabled styles
|
465
454
|
(disabled || disabledFocusable) && rootDisabledStyles.base, (disabled || disabledFocusable) && rootDisabledStyles.highContrast, appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance], // Focus styles
|
466
455
|
rootFocusStyles.base, appearance === 'primary' && rootFocusStyles.primary, rootFocusStyles[size], rootFocusStyles[shape], // Icon-only styles
|
467
456
|
iconOnly && rootIconOnlyStyles[size], // User provided class name
|