@fluentui/react-toolbar 9.0.0-rc.4 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +87 -7
- package/CHANGELOG.md +33 -8
- package/dist/index.d.ts +20 -0
- package/lib/ToolbarRadioGroup.js +2 -0
- package/lib/ToolbarRadioGroup.js.map +1 -0
- package/lib/components/Toolbar/useToolbar.js +3 -0
- package/lib/components/Toolbar/useToolbar.js.map +1 -1
- package/lib/components/ToolbarRadioButton/useToolbarRadioButton.js +3 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -1
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.js +18 -0
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +1 -0
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js +2 -0
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +1 -0
- package/lib/components/ToolbarRadioGroup/index.js +3 -0
- package/lib/components/ToolbarRadioGroup/index.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-amd/Toolbar.js +6 -0
- package/lib-amd/Toolbar.js.map +1 -0
- package/lib-amd/ToolbarButton.js +6 -0
- package/lib-amd/ToolbarButton.js.map +1 -0
- package/lib-amd/ToolbarDivider.js +6 -0
- package/lib-amd/ToolbarDivider.js.map +1 -0
- package/lib-amd/ToolbarGroup.js +6 -0
- package/lib-amd/ToolbarGroup.js.map +1 -0
- package/lib-amd/ToolbarRadioButton.js +6 -0
- package/lib-amd/ToolbarRadioButton.js.map +1 -0
- package/lib-amd/ToolbarRadioGroup.js +6 -0
- package/lib-amd/ToolbarRadioGroup.js.map +1 -0
- package/lib-amd/ToolbarToggleButton.js +6 -0
- package/lib-amd/ToolbarToggleButton.js.map +1 -0
- package/lib-amd/components/Toolbar/Toolbar.js +16 -0
- package/lib-amd/components/Toolbar/Toolbar.js.map +1 -0
- package/lib-amd/components/Toolbar/Toolbar.types.js +5 -0
- package/lib-amd/components/Toolbar/Toolbar.types.js.map +1 -0
- package/lib-amd/components/Toolbar/ToolbarContext.js +21 -0
- package/lib-amd/components/Toolbar/ToolbarContext.js.map +1 -0
- package/lib-amd/components/Toolbar/index.js +10 -0
- package/lib-amd/components/Toolbar/index.js.map +1 -0
- package/lib-amd/components/Toolbar/renderToolbar.js +15 -0
- package/lib-amd/components/Toolbar/renderToolbar.js.map +1 -0
- package/lib-amd/components/Toolbar/useToolbar.js +85 -0
- package/lib-amd/components/Toolbar/useToolbar.js.map +1 -0
- package/lib-amd/components/Toolbar/useToolbarContextValues.js +19 -0
- package/lib-amd/components/Toolbar/useToolbarContextValues.js.map +1 -0
- package/lib-amd/components/Toolbar/useToolbarStyles.js +38 -0
- package/lib-amd/components/Toolbar/useToolbarStyles.js.map +1 -0
- package/lib-amd/components/ToolbarButton/ToolbarButton.js +17 -0
- package/lib-amd/components/ToolbarButton/ToolbarButton.js.map +1 -0
- package/lib-amd/components/ToolbarButton/ToolbarButton.types.js +5 -0
- package/lib-amd/components/ToolbarButton/ToolbarButton.types.js.map +1 -0
- package/lib-amd/components/ToolbarButton/index.js +9 -0
- package/lib-amd/components/ToolbarButton/index.js.map +1 -0
- package/lib-amd/components/ToolbarButton/useToolbarButton.js +18 -0
- package/lib-amd/components/ToolbarButton/useToolbarButton.js.map +1 -0
- package/lib-amd/components/ToolbarButton/useToolbarButtonStyles.js +26 -0
- package/lib-amd/components/ToolbarButton/useToolbarButtonStyles.js.map +1 -0
- package/lib-amd/components/ToolbarDivider/ToolbarDivider.js +15 -0
- package/lib-amd/components/ToolbarDivider/ToolbarDivider.js.map +1 -0
- package/lib-amd/components/ToolbarDivider/ToolbarDivider.types.js +5 -0
- package/lib-amd/components/ToolbarDivider/ToolbarDivider.types.js.map +1 -0
- package/lib-amd/components/ToolbarDivider/index.js +9 -0
- package/lib-amd/components/ToolbarDivider/index.js.map +1 -0
- package/lib-amd/components/ToolbarDivider/useToolbarDivider.js +20 -0
- package/lib-amd/components/ToolbarDivider/useToolbarDivider.js.map +1 -0
- package/lib-amd/components/ToolbarDivider/useToolbarDividerStyles.js +27 -0
- package/lib-amd/components/ToolbarDivider/useToolbarDividerStyles.js.map +1 -0
- package/lib-amd/components/ToolbarGroup/ToolbarGroup.js +17 -0
- package/lib-amd/components/ToolbarGroup/ToolbarGroup.js.map +1 -0
- package/lib-amd/components/ToolbarGroup/ToolbarGroup.types.js +5 -0
- package/lib-amd/components/ToolbarGroup/ToolbarGroup.types.js.map +1 -0
- package/lib-amd/components/ToolbarGroup/index.js +10 -0
- package/lib-amd/components/ToolbarGroup/index.js.map +1 -0
- package/lib-amd/components/ToolbarGroup/renderToolbarGroup.js +14 -0
- package/lib-amd/components/ToolbarGroup/renderToolbarGroup.js.map +1 -0
- package/lib-amd/components/ToolbarGroup/useToolbarGroup.js +20 -0
- package/lib-amd/components/ToolbarGroup/useToolbarGroup.js.map +1 -0
- package/lib-amd/components/ToolbarGroup/useToolbarGroupStyles.js +24 -0
- package/lib-amd/components/ToolbarGroup/useToolbarGroupStyles.js.map +1 -0
- package/lib-amd/components/ToolbarRadioButton/ToolbarRadioButton.js +15 -0
- package/lib-amd/components/ToolbarRadioButton/ToolbarRadioButton.js.map +1 -0
- package/lib-amd/components/ToolbarRadioButton/ToolbarRadioButton.types.js +5 -0
- package/lib-amd/components/ToolbarRadioButton/ToolbarRadioButton.types.js.map +1 -0
- package/lib-amd/components/ToolbarRadioButton/index.js +9 -0
- package/lib-amd/components/ToolbarRadioButton/index.js.map +1 -0
- package/lib-amd/components/ToolbarRadioButton/useToolbarRadioButton.js +28 -0
- package/lib-amd/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -0
- package/lib-amd/components/ToolbarRadioButton/useToolbarRadioButtonStyles.js +20 -0
- package/lib-amd/components/ToolbarRadioButton/useToolbarRadioButtonStyles.js.map +1 -0
- package/lib-amd/components/ToolbarRadioGroup/ToolbarRadioGroup.js +17 -0
- package/lib-amd/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +1 -0
- package/lib-amd/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js +5 -0
- package/lib-amd/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +1 -0
- package/lib-amd/components/ToolbarRadioGroup/index.js +7 -0
- package/lib-amd/components/ToolbarRadioGroup/index.js.map +1 -0
- package/lib-amd/components/ToolbarToggleButton/ToolbarToggleButton.js +15 -0
- package/lib-amd/components/ToolbarToggleButton/ToolbarToggleButton.js.map +1 -0
- package/lib-amd/components/ToolbarToggleButton/ToolbarToggleButton.types.js +5 -0
- package/lib-amd/components/ToolbarToggleButton/ToolbarToggleButton.types.js.map +1 -0
- package/lib-amd/components/ToolbarToggleButton/index.js +9 -0
- package/lib-amd/components/ToolbarToggleButton/index.js.map +1 -0
- package/lib-amd/components/ToolbarToggleButton/useToolbarToggleButton.js +32 -0
- package/lib-amd/components/ToolbarToggleButton/useToolbarToggleButton.js.map +1 -0
- package/lib-amd/components/ToolbarToggleButton/useToolbarToggleButtonStyles.js +20 -0
- package/lib-amd/components/ToolbarToggleButton/useToolbarToggleButtonStyles.js.map +1 -0
- package/lib-amd/index.js +27 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-commonjs/ToolbarRadioGroup.js +8 -0
- package/lib-commonjs/ToolbarRadioGroup.js.map +1 -0
- package/lib-commonjs/components/Toolbar/useToolbar.js +3 -0
- package/lib-commonjs/components/Toolbar/useToolbar.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.js +3 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.js +24 -0
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +1 -0
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js +6 -0
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +1 -0
- package/lib-commonjs/components/ToolbarRadioGroup/index.js +9 -0
- package/lib-commonjs/components/ToolbarRadioGroup/index.js.map +1 -0
- package/lib-commonjs/index.js +8 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -9
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,87 @@
|
|
|
2
2
|
"name": "@fluentui/react-toolbar",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 18 Jan 2023 16:30:58 GMT",
|
|
6
|
+
"tag": "@fluentui/react-toolbar_v9.0.0",
|
|
7
|
+
"version": "9.0.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "lingfangao@hotmail.com",
|
|
12
|
+
"package": "@fluentui/react-toolbar",
|
|
13
|
+
"commit": "c00be5f379d806949158774212e1681f7c3d1325",
|
|
14
|
+
"comment": "Release `@fluentui/react-toolbar` as stable"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-toolbar",
|
|
19
|
+
"comment": "Bump @fluentui/react-button to v9.1.16",
|
|
20
|
+
"commit": "13cf1d07a6df4617106c731ba0379b6102a08104"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-toolbar",
|
|
25
|
+
"comment": "Bump @fluentui/react-radio to v9.0.19",
|
|
26
|
+
"commit": "13cf1d07a6df4617106c731ba0379b6102a08104"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-toolbar",
|
|
31
|
+
"comment": "Bump @fluentui/react-tabster to v9.4.0",
|
|
32
|
+
"commit": "13cf1d07a6df4617106c731ba0379b6102a08104"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"date": "Mon, 16 Jan 2023 08:38:51 GMT",
|
|
39
|
+
"tag": "@fluentui/react-toolbar_v9.0.0-rc.5",
|
|
40
|
+
"version": "9.0.0-rc.5",
|
|
41
|
+
"comments": {
|
|
42
|
+
"none": [
|
|
43
|
+
{
|
|
44
|
+
"author": "martinhochel@microsoft.com",
|
|
45
|
+
"package": "@fluentui/react-toolbar",
|
|
46
|
+
"commit": "64bb45980d68de1219c6b36a7db5363f0a9cff9f",
|
|
47
|
+
"comment": "chore: migrate to packaged scripts"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"prerelease": [
|
|
51
|
+
{
|
|
52
|
+
"author": "chassunc@microsoft.com",
|
|
53
|
+
"package": "@fluentui/react-toolbar",
|
|
54
|
+
"commit": "d755a63d9e2f7c46c1f0f7d96fa4b8ad8e8edc40",
|
|
55
|
+
"comment": "feat: add new ToolbarRadioGroup component and a11y fixes"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"author": "beachball",
|
|
59
|
+
"package": "@fluentui/react-toolbar",
|
|
60
|
+
"comment": "Bump @fluentui/react-button to v9.1.15",
|
|
61
|
+
"commit": "a870d8360e47f3ea03358c4e75e89e08a74845d7"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"author": "beachball",
|
|
65
|
+
"package": "@fluentui/react-toolbar",
|
|
66
|
+
"comment": "Bump @fluentui/react-divider to v9.1.11",
|
|
67
|
+
"commit": "a870d8360e47f3ea03358c4e75e89e08a74845d7"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"author": "beachball",
|
|
71
|
+
"package": "@fluentui/react-toolbar",
|
|
72
|
+
"comment": "Bump @fluentui/react-radio to v9.0.18",
|
|
73
|
+
"commit": "a870d8360e47f3ea03358c4e75e89e08a74845d7"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"author": "beachball",
|
|
77
|
+
"package": "@fluentui/react-toolbar",
|
|
78
|
+
"comment": "Bump @fluentui/react-tabster to v9.3.7",
|
|
79
|
+
"commit": "a870d8360e47f3ea03358c4e75e89e08a74845d7"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"date": "Mon, 09 Jan 2023 14:35:02 GMT",
|
|
6
86
|
"tag": "@fluentui/react-toolbar_v9.0.0-rc.4",
|
|
7
87
|
"version": "9.0.0-rc.4",
|
|
8
88
|
"comments": {
|
|
@@ -19,37 +99,37 @@
|
|
|
19
99
|
"author": "beachball",
|
|
20
100
|
"package": "@fluentui/react-toolbar",
|
|
21
101
|
"comment": "Bump @fluentui/react-button to v9.1.14",
|
|
22
|
-
"commit": "
|
|
102
|
+
"commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
|
|
23
103
|
},
|
|
24
104
|
{
|
|
25
105
|
"author": "beachball",
|
|
26
106
|
"package": "@fluentui/react-toolbar",
|
|
27
107
|
"comment": "Bump @fluentui/react-divider to v9.1.10",
|
|
28
|
-
"commit": "
|
|
108
|
+
"commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
|
|
29
109
|
},
|
|
30
110
|
{
|
|
31
111
|
"author": "beachball",
|
|
32
112
|
"package": "@fluentui/react-toolbar",
|
|
33
113
|
"comment": "Bump @fluentui/react-utilities to v9.4.0",
|
|
34
|
-
"commit": "
|
|
114
|
+
"commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
|
|
35
115
|
},
|
|
36
116
|
{
|
|
37
117
|
"author": "beachball",
|
|
38
118
|
"package": "@fluentui/react-toolbar",
|
|
39
119
|
"comment": "Bump @fluentui/react-context-selector to v9.1.5",
|
|
40
|
-
"commit": "
|
|
120
|
+
"commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
|
|
41
121
|
},
|
|
42
122
|
{
|
|
43
123
|
"author": "beachball",
|
|
44
124
|
"package": "@fluentui/react-toolbar",
|
|
45
125
|
"comment": "Bump @fluentui/react-radio to v9.0.17",
|
|
46
|
-
"commit": "
|
|
126
|
+
"commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
|
|
47
127
|
},
|
|
48
128
|
{
|
|
49
129
|
"author": "beachball",
|
|
50
130
|
"package": "@fluentui/react-toolbar",
|
|
51
131
|
"comment": "Bump @fluentui/react-tabster to v9.3.6",
|
|
52
|
-
"commit": "
|
|
132
|
+
"commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
|
|
53
133
|
}
|
|
54
134
|
]
|
|
55
135
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,47 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-toolbar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 18 Jan 2023 16:30:58 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.0.0)
|
|
8
|
+
|
|
9
|
+
Wed, 18 Jan 2023 16:30:58 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toolbar_v9.0.0-rc.5..@fluentui/react-toolbar_v9.0.0)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Release `@fluentui/react-toolbar` as stable ([PR #26384](https://github.com/microsoft/fluentui/pull/26384) by lingfangao@hotmail.com)
|
|
15
|
+
- Bump @fluentui/react-button to v9.1.16 ([PR #26377](https://github.com/microsoft/fluentui/pull/26377) by beachball)
|
|
16
|
+
- Bump @fluentui/react-radio to v9.0.19 ([PR #26377](https://github.com/microsoft/fluentui/pull/26377) by beachball)
|
|
17
|
+
- Bump @fluentui/react-tabster to v9.4.0 ([PR #26377](https://github.com/microsoft/fluentui/pull/26377) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.0.0-rc.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.0.0-rc.5)
|
|
20
|
+
|
|
21
|
+
Mon, 16 Jan 2023 08:38:51 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toolbar_v9.0.0-rc.4..@fluentui/react-toolbar_v9.0.0-rc.5)
|
|
23
|
+
|
|
24
|
+
### Changes
|
|
25
|
+
|
|
26
|
+
- feat: add new ToolbarRadioGroup component and a11y fixes ([PR #26275](https://github.com/microsoft/fluentui/pull/26275) by chassunc@microsoft.com)
|
|
27
|
+
- Bump @fluentui/react-button to v9.1.15 ([commit](https://github.com/microsoft/fluentui/commit/a870d8360e47f3ea03358c4e75e89e08a74845d7) by beachball)
|
|
28
|
+
- Bump @fluentui/react-divider to v9.1.11 ([commit](https://github.com/microsoft/fluentui/commit/a870d8360e47f3ea03358c4e75e89e08a74845d7) by beachball)
|
|
29
|
+
- Bump @fluentui/react-radio to v9.0.18 ([commit](https://github.com/microsoft/fluentui/commit/a870d8360e47f3ea03358c4e75e89e08a74845d7) by beachball)
|
|
30
|
+
- Bump @fluentui/react-tabster to v9.3.7 ([commit](https://github.com/microsoft/fluentui/commit/a870d8360e47f3ea03358c4e75e89e08a74845d7) by beachball)
|
|
31
|
+
|
|
7
32
|
## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.0.0-rc.4)
|
|
8
33
|
|
|
9
|
-
Mon, 09 Jan 2023 14:
|
|
34
|
+
Mon, 09 Jan 2023 14:35:02 GMT
|
|
10
35
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toolbar_v9.0.0-rc.3..@fluentui/react-toolbar_v9.0.0-rc.4)
|
|
11
36
|
|
|
12
37
|
### Changes
|
|
13
38
|
|
|
14
|
-
- Bump @fluentui/react-button to v9.1.14 ([PR #
|
|
15
|
-
- Bump @fluentui/react-divider to v9.1.10 ([PR #
|
|
16
|
-
- Bump @fluentui/react-utilities to v9.4.0 ([PR #
|
|
17
|
-
- Bump @fluentui/react-context-selector to v9.1.5 ([PR #
|
|
18
|
-
- Bump @fluentui/react-radio to v9.0.17 ([PR #
|
|
19
|
-
- Bump @fluentui/react-tabster to v9.3.6 ([PR #
|
|
39
|
+
- Bump @fluentui/react-button to v9.1.14 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
|
|
40
|
+
- Bump @fluentui/react-divider to v9.1.10 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
|
|
41
|
+
- Bump @fluentui/react-utilities to v9.4.0 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
|
|
42
|
+
- Bump @fluentui/react-context-selector to v9.1.5 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
|
|
43
|
+
- Bump @fluentui/react-radio to v9.0.17 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
|
|
44
|
+
- Bump @fluentui/react-tabster to v9.3.6 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
|
|
20
45
|
|
|
21
46
|
## [9.0.0-rc.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.0.0-rc.3)
|
|
22
47
|
|
package/dist/index.d.ts
CHANGED
|
@@ -166,6 +166,26 @@ export declare type ToolbarRadioButtonProps = ComponentProps<ButtonSlots> & Part
|
|
|
166
166
|
*/
|
|
167
167
|
export declare type ToolbarRadioButtonState = ComponentState<Partial<ButtonSlots>> & ToggleButtonState & Required<Pick<ToggleButtonProps, 'checked'>> & Pick<ToolbarRadioButtonProps, 'name' | 'value'>;
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* ToolbarRadioGroup component is a Button to be used inside Toolbar
|
|
171
|
+
* which will respect toolbar props such as `size`
|
|
172
|
+
*/
|
|
173
|
+
export declare const ToolbarRadioGroup: ForwardRefComponent<ToolbarRadioGroupProps>;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* ToolbarButton Props
|
|
177
|
+
*/
|
|
178
|
+
export declare type ToolbarRadioGroupProps = ComponentProps<ToolbarRadioGroupSlots>;
|
|
179
|
+
|
|
180
|
+
declare type ToolbarRadioGroupSlots = {
|
|
181
|
+
root: Slot<'div'>;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* State used in rendering ToolbarButton
|
|
186
|
+
*/
|
|
187
|
+
export declare type ToolbarRadioGroupState = ComponentState<ToolbarRadioGroupSlots>;
|
|
188
|
+
|
|
169
189
|
export declare type ToolbarSlots = {
|
|
170
190
|
root: Slot<'div'>;
|
|
171
191
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarRadioGroup.js","sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/ToolbarRadioGroup.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC","sourcesContent":["export * from './components/ToolbarRadioGroup/index';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AACA,SAASA,gBAAgB,EAAEC,oBAAoB,QAAQ,2BAA2B;AAClF,SAASC,qBAAqB,QAAQ,2BAA2B;AAEjE,SAASC,uBAAuB,QAAQ,yBAAyB;AAEjE;;;;;;;;;AASA,OAAO,MAAMC,mBAAmB,GAAG,CAACC,KAAmB,EAAEC,GAA2B,KAAkB;EACpG,MAAM;IAAEC,IAAI,GAAG,QAAQ;IAAEC,QAAQ,GAAG;EAAK,CAAE,GAAGH,KAAK;EAEnD,MAAMI,oBAAoB,GAAGN,uBAAuB,CAAC;IACnDO,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE;GACP,CAAC;EAEF,MAAMC,YAAY,GAA8B;IAC9CL,IAAI;IACJC,QAAQ;IACR;IACAK,UAAU,EAAE;MACV;MACAC,IAAI,EAAE;KACP;IACD;IACA;IACAA,IAAI,EAAEZ,qBAAqB,CAAC,KAAK,EAAE;MACjCa,IAAI,EAAE,SAAS;MACfT,GAAG;MACH,
|
|
1
|
+
{"version":3,"mappings":"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","names":["useEventCallback","useControllableState","getNativeElementProps","useArrowNavigationGroup","useToolbar_unstable","props","ref","size","vertical","arrowNavigationProps","circular","axis","initialState","components","root","role","checkedValues","onCheckedValueChange","useToolbarSelectableState","defaultCheckedValues","handleToggleButton","e","name","value","checked","checkedItems","newCheckedItems","splice","indexOf","push","handleRadio","state","setCheckedValues","defaultState","onCheckedValueChangeOriginal","s"],"sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/components/Toolbar/useToolbar.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback, useControllableState } from '@fluentui/react-utilities';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { ToggableHandler, ToolbarProps, ToolbarState, UninitializedToolbarState } from './Toolbar.types';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Toolbar.\n *\n * The returned state can be modified with hooks such as useToolbarStyles_unstable,\n * before being passed to renderToolbar_unstable.\n *\n * @param props - props from this instance of Toolbar\n * @param ref - reference to root HTMLElement of Toolbar\n */\nexport const useToolbar_unstable = (props: ToolbarProps, ref: React.Ref<HTMLElement>): ToolbarState => {\n const { size = 'medium', vertical = false } = props;\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n });\n\n const initialState: UninitializedToolbarState = {\n size,\n vertical,\n // TODO add appropriate props/defaults\n components: {\n // TODO add each slot's element type or component\n root: 'div',\n },\n // TODO add appropriate slots, for example:\n // mySlot: resolveShorthand(props.mySlot),\n root: getNativeElementProps('div', {\n role: 'toolbar',\n ref,\n ...(vertical && { 'aria-orientation': 'vertical' }),\n ...arrowNavigationProps,\n ...props,\n }),\n };\n\n const [checkedValues, onCheckedValueChange] = useToolbarSelectableState({\n checkedValues: props.checkedValues,\n defaultCheckedValues: props.defaultCheckedValues,\n onCheckedValueChange: props.onCheckedValueChange,\n });\n\n const handleToggleButton: ToggableHandler = useEventCallback(\n (e: React.MouseEvent | React.KeyboardEvent, name: string, value: string, checked?: boolean) => {\n if (name && value) {\n const checkedItems = checkedValues?.[name] || [];\n const newCheckedItems = [...checkedItems];\n if (checked) {\n newCheckedItems.splice(newCheckedItems.indexOf(value), 1);\n } else {\n newCheckedItems.push(value);\n }\n onCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n }\n },\n );\n\n const handleRadio: ToggableHandler = useEventCallback(\n (e: React.MouseEvent | React.KeyboardEvent, name: string, value: string, checked?: boolean) => {\n if (name && value) {\n onCheckedValueChange?.(e, {\n name,\n checkedItems: [value],\n });\n }\n },\n );\n\n return {\n ...initialState,\n handleToggleButton,\n handleRadio,\n checkedValues: checkedValues ?? {},\n };\n};\n\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useToolbarSelectableState = (\n state: Pick<ToolbarProps, 'checkedValues' | 'defaultCheckedValues' | 'onCheckedValueChange'>,\n) => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: state.checkedValues,\n defaultState: state.defaultCheckedValues,\n initialState: {},\n });\n const { onCheckedValueChange: onCheckedValueChangeOriginal } = state;\n const onCheckedValueChange: ToolbarState['onCheckedValueChange'] = useEventCallback((e, { name, checkedItems }) => {\n if (onCheckedValueChangeOriginal) {\n onCheckedValueChangeOriginal(e, { name, checkedItems });\n }\n\n setCheckedValues(s => {\n return s ? { ...s, [name]: checkedItems } : { [name]: checkedItems };\n });\n });\n\n return [checkedValues, onCheckedValueChange] as const;\n};\n"]}
|
|
@@ -20,6 +20,8 @@ export const useToolbarRadioButton_unstable = (props, ref) => {
|
|
|
20
20
|
const toggleButtonState = useToggleButton_unstable({
|
|
21
21
|
size,
|
|
22
22
|
checked,
|
|
23
|
+
role: 'radio',
|
|
24
|
+
'aria-checked': checked,
|
|
23
25
|
...props
|
|
24
26
|
}, ref);
|
|
25
27
|
const state = {
|
|
@@ -31,6 +33,7 @@ export const useToolbarRadioButton_unstable = (props, ref) => {
|
|
|
31
33
|
handleRadio === null || handleRadio === void 0 ? void 0 : handleRadio(e, state.name, state.value, state.checked);
|
|
32
34
|
onClickOriginal === null || onClickOriginal === void 0 ? void 0 : onClickOriginal(e);
|
|
33
35
|
});
|
|
36
|
+
state.root['aria-pressed'] = undefined;
|
|
34
37
|
state.root.onClick = handleOnClick;
|
|
35
38
|
return state;
|
|
36
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AACA,SAASA,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,0BAA0B,QAAQ,2BAA2B;AAGtE;;;;;;AAMA,OAAO,MAAMC,8BAA8B,GAAG,CAC5CC,KAA8B,EAC9BC,GAAqD,KAC1B;EAC3B,MAAMC,WAAW,GAAGJ,0BAA0B,CAACK,GAAG,IAAIA,GAAG,CAACD,WAAW,CAAC;EACtE,MAAME,OAAO,GAAGN,0BAA0B,CAACK,GAAG,IAAG;IAAA;IAAC,QAAC,EAAC,SAAG,CAACE,aAAa,CAACL,KAAK,CAACM,IAAI,CAAC,0CAAEC,QAAQ,CAACP,KAAK,CAACQ,KAAK,CAAC;EAAA,EAAC;EACzG,MAAMC,IAAI,GAAGX,0BAA0B,CAACK,GAAG,IAAIA,GAAG,CAACM,IAAI,CAAC;EAExD,MAAM;IAAEC,OAAO,EAAEC;EAAe,CAAE,GAAGX,KAAK;EAC1C,MAAMY,iBAAiB,GAAGf,wBAAwB,
|
|
1
|
+
{"version":3,"mappings":"AACA,SAASA,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,0BAA0B,QAAQ,2BAA2B;AAGtE;;;;;;AAMA,OAAO,MAAMC,8BAA8B,GAAG,CAC5CC,KAA8B,EAC9BC,GAAqD,KAC1B;EAC3B,MAAMC,WAAW,GAAGJ,0BAA0B,CAACK,GAAG,IAAIA,GAAG,CAACD,WAAW,CAAC;EACtE,MAAME,OAAO,GAAGN,0BAA0B,CAACK,GAAG,IAAG;IAAA;IAAC,QAAC,EAAC,SAAG,CAACE,aAAa,CAACL,KAAK,CAACM,IAAI,CAAC,0CAAEC,QAAQ,CAACP,KAAK,CAACQ,KAAK,CAAC;EAAA,EAAC;EACzG,MAAMC,IAAI,GAAGX,0BAA0B,CAACK,GAAG,IAAIA,GAAG,CAACM,IAAI,CAAC;EAExD,MAAM;IAAEC,OAAO,EAAEC;EAAe,CAAE,GAAGX,KAAK;EAC1C,MAAMY,iBAAiB,GAAGf,wBAAwB,CAChD;IAAEY,IAAI;IAAEL,OAAO;IAAES,IAAI,EAAE,OAAO;IAAE,cAAc,EAAET,OAAO;IAAE,GAAGJ;EAAK,CAAE,EACnEC,GAAG,CACJ;EACD,MAAMa,KAAK,GAA4B;IACrC,GAAGF,iBAAiB;IACpBN,IAAI,EAAEN,KAAK,CAACM,IAAI;IAChBE,KAAK,EAAER,KAAK,CAACQ;GACd;EAED,MAAMO,aAAa,GAAGnB,gBAAgB,CACnCoB,CAAoG,IAAI;IACvGd,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAGc,CAAC,EAAEF,KAAK,CAACR,IAAI,EAAEQ,KAAK,CAACN,KAAK,EAAEM,KAAK,CAACV,OAAO,CAAC;IACxDO,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAGK,CAAC,CAAC;EACtB,CAAC,CACF;EACDF,KAAK,CAACG,IAAI,CAAC,cAAc,CAAC,GAAGC,SAAS;EACtCJ,KAAK,CAACG,IAAI,CAACP,OAAO,GAAGK,aAAa;EAClC,OAAOD,KAAK;AACd,CAAC","names":["useEventCallback","useToggleButton_unstable","useToolbarContext_unstable","useToolbarRadioButton_unstable","props","ref","handleRadio","ctx","checked","checkedValues","name","includes","value","size","onClick","onClickOriginal","toggleButtonState","role","state","handleOnClick","e","root","undefined"],"sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/components/ToolbarRadioButton/useToolbarRadioButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useToggleButton_unstable } from '@fluentui/react-button';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\nimport { ToolbarRadioButtonProps, ToolbarRadioButtonState } from './ToolbarRadioButton.types';\n\n/**\n * Given user props, defines default props for the RadioButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the RadioButton component.\n * @param ref - User provided ref to be passed to the RadioButton component.\n */\nexport const useToolbarRadioButton_unstable = (\n props: ToolbarRadioButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToolbarRadioButtonState => {\n const handleRadio = useToolbarContext_unstable(ctx => ctx.handleRadio);\n const checked = useToolbarContext_unstable(ctx => !!ctx.checkedValues[props.name]?.includes(props.value));\n const size = useToolbarContext_unstable(ctx => ctx.size);\n\n const { onClick: onClickOriginal } = props;\n const toggleButtonState = useToggleButton_unstable(\n { size, checked, role: 'radio', 'aria-checked': checked, ...props },\n ref,\n );\n const state: ToolbarRadioButtonState = {\n ...toggleButtonState,\n name: props.name,\n value: props.value,\n };\n\n const handleOnClick = useEventCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent> & React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {\n handleRadio?.(e, state.name, state.value, state.checked);\n onClickOriginal?.(e);\n },\n );\n state.root['aria-pressed'] = undefined;\n state.root.onClick = handleOnClick;\n return state;\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { renderToolbarGroup_unstable, useToolbarGroupStyles_unstable, useToolbarGroup_unstable } from '../../ToolbarGroup';
|
|
3
|
+
/**
|
|
4
|
+
* ToolbarRadioGroup component is a Button to be used inside Toolbar
|
|
5
|
+
* which will respect toolbar props such as `size`
|
|
6
|
+
*/
|
|
7
|
+
export const ToolbarRadioGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
|
+
const state = useToolbarGroup_unstable({
|
|
9
|
+
role: 'radiogroup',
|
|
10
|
+
...props
|
|
11
|
+
}, ref);
|
|
12
|
+
useToolbarGroupStyles_unstable(state);
|
|
13
|
+
return renderToolbarGroup_unstable(state);
|
|
14
|
+
// Casting is required due to lack of distributive union to support unions on @types/react
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
ToolbarRadioGroup.displayName = 'ToolbarRadioGroup';
|
|
18
|
+
//# sourceMappingURL=ToolbarRadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SACEC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,wBAAwB,QACnB,oBAAoB;AAE3B;;;;AAIA,OAAO,MAAMC,iBAAiB,gBAAgDJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC5G,MAAMC,KAAK,GAAGL,wBAAwB,CAAC;IAAEM,IAAI,EAAE,YAAY;IAAE,GAAGH;EAAK,CAAE,EAAEC,GAAG,CAAC;EAC7EL,8BAA8B,CAACM,KAAK,CAAC;EACrC,OAAOP,2BAA2B,CAACO,KAAK,CAAC;EACzC;AACF,CAAC,CAAgD;;AAEjDJ,iBAAiB,CAACM,WAAW,GAAG,mBAAmB","names":["React","renderToolbarGroup_unstable","useToolbarGroupStyles_unstable","useToolbarGroup_unstable","ToolbarRadioGroup","forwardRef","props","ref","state","role","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/components/ToolbarRadioGroup/ToolbarRadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ToolbarRadioGroupProps } from './ToolbarRadioGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport {\n renderToolbarGroup_unstable,\n useToolbarGroupStyles_unstable,\n useToolbarGroup_unstable,\n} from '../../ToolbarGroup';\n\n/**\n * ToolbarRadioGroup component is a Button to be used inside Toolbar\n * which will respect toolbar props such as `size`\n */\nexport const ToolbarRadioGroup: ForwardRefComponent<ToolbarRadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useToolbarGroup_unstable({ role: 'radiogroup', ...props }, ref);\n useToolbarGroupStyles_unstable(state);\n return renderToolbarGroup_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToolbarRadioGroupProps>;\n\nToolbarRadioGroup.displayName = 'ToolbarRadioGroup';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarRadioGroup.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/components/ToolbarRadioGroup/ToolbarRadioGroup.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ToolbarRadioGroupSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * ToolbarButton Props\n */\nexport type ToolbarRadioGroupProps = ComponentProps<ToolbarRadioGroupSlots>;\n\n/**\n * State used in rendering ToolbarButton\n */\nexport type ToolbarRadioGroupState = ComponentState<ToolbarRadioGroupSlots>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/components/ToolbarRadioGroup/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './ToolbarRadioGroup';\nexport * from './ToolbarRadioGroup.types';\n"]}
|
package/lib/index.js
CHANGED
|
@@ -4,4 +4,5 @@ export { ToolbarDivider, useToolbarDividerStyles_unstable, useToolbarDivider_uns
|
|
|
4
4
|
export { ToolbarToggleButton, useToolbarToggleButtonStyles_unstable, useToolbarToggleButton_unstable } from './ToolbarToggleButton';
|
|
5
5
|
export { ToolbarRadioButton, useToolbarRadioButtonStyles_unstable, useToolbarRadioButton_unstable } from './ToolbarRadioButton';
|
|
6
6
|
export { ToolbarGroup, useToolbarGroupStyles_unstable, useToolbarGroup_unstable, renderToolbarGroup_unstable, toolbarGroupClassNames } from './ToolbarGroup';
|
|
7
|
+
export { ToolbarRadioGroup } from './ToolbarRadioGroup';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAAA,SACEA,OAAO,EACPC,sBAAsB,EACtBC,iBAAiB,EACjBC,yBAAyB,EACzBC,mBAAmB,QACd,WAAW;AAElB,SAASC,aAAa,QAAQ,iBAAiB;AAO/C,SAASC,cAAc,EAAEC,gCAAgC,EAAEC,0BAA0B,QAAQ,kBAAkB;AAE/G,SACEC,mBAAmB,EACnBC,qCAAqC,EACrCC,+BAA+B,QAC1B,uBAAuB;AAE9B,SACEC,kBAAkB,EAClBC,oCAAoC,EACpCC,8BAA8B,QACzB,sBAAsB;AAE7B,SACEC,YAAY,EACZC,8BAA8B,EAC9BC,wBAAwB,EACxBC,2BAA2B,EAC3BC,sBAAsB,QACjB,gBAAgB","names":["Toolbar","renderToolbar_unstable","toolbarClassNames","useToolbarStyles_unstable","useToolbar_unstable","ToolbarButton","ToolbarDivider","useToolbarDividerStyles_unstable","useToolbarDivider_unstable","ToolbarToggleButton","useToolbarToggleButtonStyles_unstable","useToolbarToggleButton_unstable","ToolbarRadioButton","useToolbarRadioButtonStyles_unstable","useToolbarRadioButton_unstable","ToolbarGroup","useToolbarGroupStyles_unstable","useToolbarGroup_unstable","renderToolbarGroup_unstable","toolbarGroupClassNames"],"sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/index.ts"],"sourcesContent":["export {\n Toolbar,\n renderToolbar_unstable,\n toolbarClassNames,\n useToolbarStyles_unstable,\n useToolbar_unstable,\n} from './Toolbar';\nexport type { ToolbarContextValue, ToolbarContextValues, ToolbarProps, ToolbarSlots, ToolbarState } from './Toolbar';\nexport { ToolbarButton } from './ToolbarButton';\nexport type {\n ToolbarButtonProps,\n ToolbarButtonState,\n useToolbarButtonStyles_unstable,\n useToolbarButton_unstable,\n} from './ToolbarButton';\nexport { ToolbarDivider, useToolbarDividerStyles_unstable, useToolbarDivider_unstable } from './ToolbarDivider';\nexport type { ToolbarDividerProps, ToolbarDividerState } from './ToolbarDivider';\nexport {\n ToolbarToggleButton,\n useToolbarToggleButtonStyles_unstable,\n useToolbarToggleButton_unstable,\n} from './ToolbarToggleButton';\nexport type { ToolbarToggleButtonProps, ToolbarToggleButtonState } from './ToolbarToggleButton';\nexport {\n ToolbarRadioButton,\n useToolbarRadioButtonStyles_unstable,\n useToolbarRadioButton_unstable,\n} from './ToolbarRadioButton';\nexport type { ToolbarRadioButtonProps, ToolbarRadioButtonState } from './ToolbarRadioButton';\nexport {\n ToolbarGroup,\n useToolbarGroupStyles_unstable,\n useToolbarGroup_unstable,\n renderToolbarGroup_unstable,\n toolbarGroupClassNames,\n} from './ToolbarGroup';\nexport type { ToolbarGroupProps, ToolbarGroupState } from './ToolbarGroup';\n"]}
|
|
1
|
+
{"version":3,"mappings":"AAAA,SACEA,OAAO,EACPC,sBAAsB,EACtBC,iBAAiB,EACjBC,yBAAyB,EACzBC,mBAAmB,QACd,WAAW;AAElB,SAASC,aAAa,QAAQ,iBAAiB;AAO/C,SAASC,cAAc,EAAEC,gCAAgC,EAAEC,0BAA0B,QAAQ,kBAAkB;AAE/G,SACEC,mBAAmB,EACnBC,qCAAqC,EACrCC,+BAA+B,QAC1B,uBAAuB;AAE9B,SACEC,kBAAkB,EAClBC,oCAAoC,EACpCC,8BAA8B,QACzB,sBAAsB;AAE7B,SACEC,YAAY,EACZC,8BAA8B,EAC9BC,wBAAwB,EACxBC,2BAA2B,EAC3BC,sBAAsB,QACjB,gBAAgB;AAEvB,SAASC,iBAAiB,QAAQ,qBAAqB","names":["Toolbar","renderToolbar_unstable","toolbarClassNames","useToolbarStyles_unstable","useToolbar_unstable","ToolbarButton","ToolbarDivider","useToolbarDividerStyles_unstable","useToolbarDivider_unstable","ToolbarToggleButton","useToolbarToggleButtonStyles_unstable","useToolbarToggleButton_unstable","ToolbarRadioButton","useToolbarRadioButtonStyles_unstable","useToolbarRadioButton_unstable","ToolbarGroup","useToolbarGroupStyles_unstable","useToolbarGroup_unstable","renderToolbarGroup_unstable","toolbarGroupClassNames","ToolbarRadioGroup"],"sourceRoot":"../src/","sources":["packages/react-components/react-toolbar/src/index.ts"],"sourcesContent":["export {\n Toolbar,\n renderToolbar_unstable,\n toolbarClassNames,\n useToolbarStyles_unstable,\n useToolbar_unstable,\n} from './Toolbar';\nexport type { ToolbarContextValue, ToolbarContextValues, ToolbarProps, ToolbarSlots, ToolbarState } from './Toolbar';\nexport { ToolbarButton } from './ToolbarButton';\nexport type {\n ToolbarButtonProps,\n ToolbarButtonState,\n useToolbarButtonStyles_unstable,\n useToolbarButton_unstable,\n} from './ToolbarButton';\nexport { ToolbarDivider, useToolbarDividerStyles_unstable, useToolbarDivider_unstable } from './ToolbarDivider';\nexport type { ToolbarDividerProps, ToolbarDividerState } from './ToolbarDivider';\nexport {\n ToolbarToggleButton,\n useToolbarToggleButtonStyles_unstable,\n useToolbarToggleButton_unstable,\n} from './ToolbarToggleButton';\nexport type { ToolbarToggleButtonProps, ToolbarToggleButtonState } from './ToolbarToggleButton';\nexport {\n ToolbarRadioButton,\n useToolbarRadioButtonStyles_unstable,\n useToolbarRadioButton_unstable,\n} from './ToolbarRadioButton';\nexport type { ToolbarRadioButtonProps, ToolbarRadioButtonState } from './ToolbarRadioButton';\nexport {\n ToolbarGroup,\n useToolbarGroupStyles_unstable,\n useToolbarGroup_unstable,\n renderToolbarGroup_unstable,\n toolbarGroupClassNames,\n} from './ToolbarGroup';\nexport type { ToolbarGroupProps, ToolbarGroupState } from './ToolbarGroup';\nexport { ToolbarRadioGroup } from './ToolbarRadioGroup';\nexport type { ToolbarRadioGroupProps, ToolbarRadioGroupState } from './ToolbarRadioGroup';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./components/Toolbar/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(index_1, exports);
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-toolbar/src/Toolbar.ts"],"names":[],"mappings":";;;IAAA,uCAA2C","sourcesContent":["export * from './components/Toolbar/index';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./components/ToolbarButton/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(index_1, exports);
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=ToolbarButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarButton.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-toolbar/src/ToolbarButton.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/ToolbarButton/index';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./components/ToolbarDivider/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(index_1, exports);
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=ToolbarDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarDivider.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-toolbar/src/ToolbarDivider.ts"],"names":[],"mappings":";;;IAAA,uCAAkD","sourcesContent":["export * from './components/ToolbarDivider/index';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./components/ToolbarGroup/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(index_1, exports);
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=ToolbarGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarGroup.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-toolbar/src/ToolbarGroup.ts"],"names":[],"mappings":";;;IAAA,uCAAgD","sourcesContent":["export * from './components/ToolbarGroup/index';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./components/ToolbarRadioButton/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(index_1, exports);
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=ToolbarRadioButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarRadioButton.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-toolbar/src/ToolbarRadioButton.ts"],"names":[],"mappings":";;;IAAA,uCAAsD","sourcesContent":["export * from './components/ToolbarRadioButton/index';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./components/ToolbarRadioGroup/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(index_1, exports);
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=ToolbarRadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarRadioGroup.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-toolbar/src/ToolbarRadioGroup.ts"],"names":[],"mappings":";;;IAAA,uCAAqD","sourcesContent":["export * from './components/ToolbarRadioGroup/index';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./components/ToolbarToggleButton/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(index_1, exports);
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=ToolbarToggleButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarToggleButton.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-toolbar/src/ToolbarToggleButton.ts"],"names":[],"mappings":";;;IAAA,uCAAuD","sourcesContent":["export * from './components/ToolbarToggleButton/index';\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
define(["require", "exports", "react", "./useToolbar", "./renderToolbar", "./useToolbarStyles", "./useToolbarContextValues"], function (require, exports, React, useToolbar_1, renderToolbar_1, useToolbarStyles_1, useToolbarContextValues_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Toolbar = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Toolbar component
|
|
7
|
+
*/
|
|
8
|
+
exports.Toolbar = React.forwardRef(function (props, ref) {
|
|
9
|
+
var state = useToolbar_1.useToolbar_unstable(props, ref);
|
|
10
|
+
var contextValues = useToolbarContextValues_1.useToolbarContextValues_unstable(state);
|
|
11
|
+
useToolbarStyles_1.useToolbarStyles_unstable(state);
|
|
12
|
+
return renderToolbar_1.renderToolbar_unstable(state, contextValues);
|
|
13
|
+
});
|
|
14
|
+
exports.Toolbar.displayName = 'Toolbar';
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-toolbar/src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":";;;;IAQA;;OAEG;IACU,QAAA,OAAO,GAAsC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACpF,IAAM,KAAK,GAAG,gCAAmB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9C,IAAM,aAAa,GAAG,0DAAgC,CAAC,KAAK,CAAC,CAAC;QAC9D,4CAAyB,CAAC,KAAK,CAAC,CAAC;QACjC,OAAO,sCAAsB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,eAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import * as React from 'react';\nimport { useToolbar_unstable } from './useToolbar';\nimport { renderToolbar_unstable } from './renderToolbar';\nimport { useToolbarStyles_unstable } from './useToolbarStyles';\nimport type { ToolbarProps } from './Toolbar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToolbarContextValues_unstable } from './useToolbarContextValues';\n\n/**\n * Toolbar component\n */\nexport const Toolbar: ForwardRefComponent<ToolbarProps> = React.forwardRef((props, ref) => {\n const state = useToolbar_unstable(props, ref);\n const contextValues = useToolbarContextValues_unstable(state);\n useToolbarStyles_unstable(state);\n return renderToolbar_unstable(state, contextValues);\n});\n\nToolbar.displayName = 'Toolbar';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-toolbar/src/components/Toolbar/Toolbar.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ToolbarSlots = {\n root: Slot<'div'>;\n};\n\nexport type ToolbarCheckedValueChangeData = {\n /** The items for this value that are checked */\n checkedItems: string[];\n /** The name of the value */\n name: string;\n};\n\nexport type ToolbarCheckedValueChangeEvent = React.MouseEvent | React.KeyboardEvent;\n\n/**\n * Toolbar Props\n */\nexport type ToolbarProps = ComponentProps<ToolbarSlots> & {\n /**\n * Toolbar can have small or medium size\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Toolbar can be vertical styled\n * @default false\n */\n vertical?: boolean;\n\n /**\n * Map of all checked values\n */\n checkedValues?: Record<string, string[]>;\n\n /**\n * Default values to be checked on mount\n */\n defaultCheckedValues?: Record<string, string[]>;\n\n /**\n * Callback when checked items change for value with a name\n *\n * @param event - React's original SyntheticEvent\n * @param data - A data object with relevant information\n */\n onCheckedValueChange?: (e: ToolbarCheckedValueChangeEvent, data: ToolbarCheckedValueChangeData) => void;\n};\n\n/**\n * State used in rendering Toolbar\n */\nexport type ToolbarState = ComponentState<ToolbarSlots> &\n Required<Pick<ToolbarProps, 'size' | 'checkedValues' | 'vertical'>> &\n Pick<ToolbarProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & {\n /*\n * Toggles the state of a ToggleButton item\n */\n handleToggleButton: ToggableHandler;\n /*\n * Toggles the state of a ToggleButton item\n */\n handleRadio: ToggableHandler;\n };\n\nexport type ToolbarContextValue = Pick<ToolbarState, 'size' | 'vertical' | 'checkedValues'> & {\n handleToggleButton?: ToggableHandler;\n handleRadio?: ToggableHandler;\n};\n\nexport type ToolbarContextValues = {\n toolbar: ToolbarContextValue;\n};\n\nexport type UninitializedToolbarState = Omit<ToolbarState, 'checkedValues' | 'handleToggleButton' | 'handleRadio'> &\n Partial<Pick<ToolbarState, 'checkedValues'>>;\n\nexport type ToggableHandler = (\n e: React.MouseEvent | React.KeyboardEvent,\n name: string,\n value: string,\n checked?: boolean,\n) => void;\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
define(["require", "exports", "@fluentui/react-context-selector"], function (require, exports, react_context_selector_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useToolbarContext_unstable = exports.ToolbarContext = void 0;
|
|
5
|
+
exports.ToolbarContext = react_context_selector_1.createContext(undefined);
|
|
6
|
+
var toolbarContextDefaultValue = {
|
|
7
|
+
size: 'medium',
|
|
8
|
+
handleToggleButton: function () { return null; },
|
|
9
|
+
handleRadio: function () { return null; },
|
|
10
|
+
vertical: false,
|
|
11
|
+
checkedValues: {},
|
|
12
|
+
};
|
|
13
|
+
var useToolbarContext_unstable = function (selector) {
|
|
14
|
+
return react_context_selector_1.useContextSelector(exports.ToolbarContext, function (ctx) {
|
|
15
|
+
if (ctx === void 0) { ctx = toolbarContextDefaultValue; }
|
|
16
|
+
return selector(ctx);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
exports.useToolbarContext_unstable = useToolbarContext_unstable;
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=ToolbarContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarContext.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-toolbar/src/components/Toolbar/ToolbarContext.ts"],"names":[],"mappings":";;;;IAIa,QAAA,cAAc,GAAG,sCAAa,CAAkC,SAAS,CAAiC,CAAC;IAExH,IAAM,0BAA0B,GAAwB;QACtD,IAAI,EAAE,QAAoB;QAC1B,kBAAkB,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QAC9B,WAAW,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;QACvB,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,EAAE;KAClB,CAAC;IAEK,IAAM,0BAA0B,GAAG,UAAI,QAAiD;QAC7F,OAAA,2CAAkB,CAAC,sBAAc,EAAE,UAAC,GAAgC;YAAhC,oBAAA,EAAA,gCAAgC;YAAK,OAAA,QAAQ,CAAC,GAAG,CAAC;QAAb,CAAa,CAAC;IAAvF,CAAuF,CAAC;IAD7E,QAAA,0BAA0B,8BACmD","sourcesContent":["import { ContextSelector, createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { ToolbarContextValue } from './Toolbar.types';\n\nexport const ToolbarContext = createContext<ToolbarContextValue | undefined>(undefined) as Context<ToolbarContextValue>;\n\nconst toolbarContextDefaultValue: ToolbarContextValue = {\n size: 'medium' as 'medium',\n handleToggleButton: () => null,\n handleRadio: () => null,\n vertical: false,\n checkedValues: {},\n};\n\nexport const useToolbarContext_unstable = <T>(selector: ContextSelector<ToolbarContextValue, T>): T =>\n useContextSelector(ToolbarContext, (ctx = toolbarContextDefaultValue) => selector(ctx));\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./Toolbar", "./Toolbar.types", "./renderToolbar", "./useToolbar", "./useToolbarStyles"], function (require, exports, tslib_1, Toolbar_1, Toolbar_types_1, renderToolbar_1, useToolbar_1, useToolbarStyles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(Toolbar_1, exports);
|
|
5
|
+
tslib_1.__exportStar(Toolbar_types_1, exports);
|
|
6
|
+
tslib_1.__exportStar(renderToolbar_1, exports);
|
|
7
|
+
tslib_1.__exportStar(useToolbar_1, exports);
|
|
8
|
+
tslib_1.__exportStar(useToolbarStyles_1, exports);
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-toolbar/src/components/Toolbar/index.ts"],"names":[],"mappings":";;;IAAA,yCAA0B;IAC1B,+CAAgC;IAChC,+CAAgC;IAChC,4CAA6B;IAC7B,kDAAmC","sourcesContent":["export * from './Toolbar';\nexport * from './Toolbar.types';\nexport * from './renderToolbar';\nexport * from './useToolbar';\nexport * from './useToolbarStyles';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "./ToolbarContext"], function (require, exports, tslib_1, React, react_utilities_1, ToolbarContext_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.renderToolbar_unstable = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Render the final JSX of Toolbar
|
|
7
|
+
*/
|
|
8
|
+
var renderToolbar_unstable = function (state, contextValues) {
|
|
9
|
+
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
|
10
|
+
return (React.createElement(ToolbarContext_1.ToolbarContext.Provider, { value: contextValues.toolbar },
|
|
11
|
+
React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), slotProps.root.children)));
|
|
12
|
+
};
|
|
13
|
+
exports.renderToolbar_unstable = renderToolbar_unstable;
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=renderToolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderToolbar.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-toolbar/src/components/Toolbar/renderToolbar.tsx"],"names":[],"mappings":";;;;IAKA;;OAEG;IACI,IAAM,sBAAsB,GAAG,UAAC,KAAmB,EAAE,aAAmC;QACvF,IAAA,KAAuB,0BAAQ,CAAe,KAAK,CAAC,EAAlD,KAAK,WAAA,EAAE,SAAS,eAAkC,CAAC;QAE3D,OAAO,CACL,oBAAC,+BAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,aAAa,CAAC,OAAO;YACnD,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAc,CAC9C,CAC3B,CAAC;IACJ,CAAC,CAAC;IARW,QAAA,sBAAsB,0BAQjC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ToolbarState, ToolbarSlots, ToolbarContextValues } from './Toolbar.types';\nimport { ToolbarContext } from './ToolbarContext';\n\n/**\n * Render the final JSX of Toolbar\n */\nexport const renderToolbar_unstable = (state: ToolbarState, contextValues: ToolbarContextValues) => {\n const { slots, slotProps } = getSlots<ToolbarSlots>(state);\n\n return (\n <ToolbarContext.Provider value={contextValues.toolbar}>\n <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root>\n </ToolbarContext.Provider>\n );\n};\n"]}
|