@fluentui/react-toolbar 9.1.16 → 9.1.17
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 +70 -1
- package/CHANGELOG.md +20 -2
- package/lib/Toolbar.js +0 -1
- package/lib/Toolbar.js.map +1 -1
- package/lib/ToolbarButton.js +0 -1
- package/lib/ToolbarButton.js.map +1 -1
- package/lib/ToolbarDivider.js +0 -1
- package/lib/ToolbarDivider.js.map +1 -1
- package/lib/ToolbarGroup.js +0 -1
- package/lib/ToolbarGroup.js.map +1 -1
- package/lib/ToolbarRadioButton.js +0 -1
- package/lib/ToolbarRadioButton.js.map +1 -1
- package/lib/ToolbarRadioGroup.js +0 -1
- package/lib/ToolbarRadioGroup.js.map +1 -1
- package/lib/ToolbarToggleButton.js +0 -1
- package/lib/ToolbarToggleButton.js.map +1 -1
- package/lib/components/Toolbar/Toolbar.js +6 -8
- package/lib/components/Toolbar/Toolbar.js.map +1 -1
- package/lib/components/Toolbar/Toolbar.types.js +0 -1
- package/lib/components/Toolbar/Toolbar.types.js.map +1 -1
- package/lib/components/Toolbar/ToolbarContext.js +7 -8
- package/lib/components/Toolbar/ToolbarContext.js.map +1 -1
- package/lib/components/Toolbar/index.js +0 -1
- package/lib/components/Toolbar/index.js.map +1 -1
- package/lib/components/Toolbar/renderToolbar.js +6 -11
- package/lib/components/Toolbar/renderToolbar.js.map +1 -1
- package/lib/components/Toolbar/useToolbar.js +90 -94
- package/lib/components/Toolbar/useToolbar.js.map +1 -1
- package/lib/components/Toolbar/useToolbarContextValues.js +12 -19
- package/lib/components/Toolbar/useToolbarContextValues.js.map +1 -1
- package/lib/components/Toolbar/useToolbarStyles.styles.js.map +1 -1
- package/lib/components/ToolbarButton/ToolbarButton.js +6 -9
- package/lib/components/ToolbarButton/ToolbarButton.js.map +1 -1
- package/lib/components/ToolbarButton/ToolbarButton.types.js +1 -2
- package/lib/components/ToolbarButton/ToolbarButton.types.js.map +1 -1
- package/lib/components/ToolbarButton/index.js +0 -1
- package/lib/components/ToolbarButton/index.js.map +1 -1
- package/lib/components/ToolbarButton/useToolbarButton.js +10 -15
- package/lib/components/ToolbarButton/useToolbarButton.js.map +1 -1
- package/lib/components/ToolbarButton/useToolbarButtonStyles.styles.js.map +1 -1
- package/lib/components/ToolbarDivider/ToolbarDivider.js +5 -7
- package/lib/components/ToolbarDivider/ToolbarDivider.js.map +1 -1
- package/lib/components/ToolbarDivider/ToolbarDivider.types.js +1 -2
- package/lib/components/ToolbarDivider/ToolbarDivider.types.js.map +1 -1
- package/lib/components/ToolbarDivider/index.js +0 -1
- package/lib/components/ToolbarDivider/index.js.map +1 -1
- package/lib/components/ToolbarDivider/useToolbarDivider.js +6 -8
- package/lib/components/ToolbarDivider/useToolbarDivider.js.map +1 -1
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.styles.js +1 -1
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.styles.js.map +1 -1
- package/lib/components/ToolbarGroup/ToolbarGroup.js +6 -9
- package/lib/components/ToolbarGroup/ToolbarGroup.js.map +1 -1
- package/lib/components/ToolbarGroup/ToolbarGroup.types.js +1 -2
- package/lib/components/ToolbarGroup/ToolbarGroup.types.js.map +1 -1
- package/lib/components/ToolbarGroup/index.js +0 -1
- package/lib/components/ToolbarGroup/index.js.map +1 -1
- package/lib/components/ToolbarGroup/renderToolbarGroup.js +4 -9
- package/lib/components/ToolbarGroup/renderToolbarGroup.js.map +1 -1
- package/lib/components/ToolbarGroup/useToolbarGroup.js +11 -13
- package/lib/components/ToolbarGroup/useToolbarGroup.js.map +1 -1
- package/lib/components/ToolbarGroup/useToolbarGroupStyles.styles.js.map +1 -1
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.js +5 -7
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.js.map +1 -1
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.types.js +1 -2
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.types.js.map +1 -1
- package/lib/components/ToolbarRadioButton/index.js +0 -1
- package/lib/components/ToolbarRadioButton/index.js.map +1 -1
- package/lib/components/ToolbarRadioButton/useToolbarRadioButton.js +27 -31
- package/lib/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -1
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.js.map +1 -1
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.js +9 -12
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +1 -1
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js +1 -2
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +1 -1
- package/lib/components/ToolbarRadioGroup/index.js +0 -1
- package/lib/components/ToolbarRadioGroup/index.js.map +1 -1
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.js +5 -7
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.js.map +1 -1
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.types.js +1 -2
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.types.js.map +1 -1
- package/lib/components/ToolbarToggleButton/index.js +0 -1
- package/lib/components/ToolbarToggleButton/index.js.map +1 -1
- package/lib/components/ToolbarToggleButton/useToolbarToggleButton.js +27 -31
- package/lib/components/ToolbarToggleButton/useToolbarToggleButton.js.map +1 -1
- package/lib/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Toolbar.js +0 -3
- package/lib-commonjs/Toolbar.js.map +1 -1
- package/lib-commonjs/ToolbarButton.js +0 -3
- package/lib-commonjs/ToolbarButton.js.map +1 -1
- package/lib-commonjs/ToolbarDivider.js +0 -3
- package/lib-commonjs/ToolbarDivider.js.map +1 -1
- package/lib-commonjs/ToolbarGroup.js +0 -3
- package/lib-commonjs/ToolbarGroup.js.map +1 -1
- package/lib-commonjs/ToolbarRadioButton.js +0 -3
- package/lib-commonjs/ToolbarRadioButton.js.map +1 -1
- package/lib-commonjs/ToolbarRadioGroup.js +0 -3
- package/lib-commonjs/ToolbarRadioGroup.js.map +1 -1
- package/lib-commonjs/ToolbarToggleButton.js +0 -3
- package/lib-commonjs/ToolbarToggleButton.js.map +1 -1
- package/lib-commonjs/components/Toolbar/Toolbar.js +1 -3
- package/lib-commonjs/components/Toolbar/Toolbar.js.map +1 -1
- package/lib-commonjs/components/Toolbar/Toolbar.types.js +0 -3
- package/lib-commonjs/components/Toolbar/Toolbar.types.js.map +1 -1
- package/lib-commonjs/components/Toolbar/ToolbarContext.js +2 -4
- package/lib-commonjs/components/Toolbar/ToolbarContext.js.map +1 -1
- package/lib-commonjs/components/Toolbar/index.js +0 -3
- package/lib-commonjs/components/Toolbar/index.js.map +1 -1
- package/lib-commonjs/components/Toolbar/renderToolbar.js +1 -3
- package/lib-commonjs/components/Toolbar/renderToolbar.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbar.js +1 -3
- package/lib-commonjs/components/Toolbar/useToolbar.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarContextValues.js +1 -3
- package/lib-commonjs/components/Toolbar/useToolbarContextValues.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.js +0 -2
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToolbarButton/ToolbarButton.js +1 -3
- package/lib-commonjs/components/ToolbarButton/ToolbarButton.js.map +1 -1
- package/lib-commonjs/components/ToolbarButton/ToolbarButton.types.js +0 -3
- package/lib-commonjs/components/ToolbarButton/ToolbarButton.types.js.map +1 -1
- package/lib-commonjs/components/ToolbarButton/index.js +0 -3
- package/lib-commonjs/components/ToolbarButton/index.js.map +1 -1
- package/lib-commonjs/components/ToolbarButton/useToolbarButton.js +1 -3
- package/lib-commonjs/components/ToolbarButton/useToolbarButton.js.map +1 -1
- package/lib-commonjs/components/ToolbarButton/useToolbarButtonStyles.styles.js +0 -2
- package/lib-commonjs/components/ToolbarButton/useToolbarButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.js +1 -3
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.js.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.types.js +0 -3
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.types.js.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/index.js +0 -3
- package/lib-commonjs/components/ToolbarDivider/index.js.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/useToolbarDivider.js +1 -3
- package/lib-commonjs/components/ToolbarDivider/useToolbarDivider.js.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.styles.js +1 -3
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/ToolbarGroup.js +1 -3
- package/lib-commonjs/components/ToolbarGroup/ToolbarGroup.js.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/ToolbarGroup.types.js +0 -3
- package/lib-commonjs/components/ToolbarGroup/ToolbarGroup.types.js.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/index.js +0 -3
- package/lib-commonjs/components/ToolbarGroup/index.js.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/renderToolbarGroup.js +1 -3
- package/lib-commonjs/components/ToolbarGroup/renderToolbarGroup.js.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroup.js +1 -3
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroup.js.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.js +0 -2
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.js +1 -3
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.types.js +0 -3
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.types.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/index.js +0 -3
- package/lib-commonjs/components/ToolbarRadioButton/index.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.js +1 -3
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.js +0 -2
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.js +1 -3
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js +0 -3
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioGroup/index.js +0 -3
- package/lib-commonjs/components/ToolbarRadioGroup/index.js.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/ToolbarToggleButton.js +1 -3
- package/lib-commonjs/components/ToolbarToggleButton/ToolbarToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/ToolbarToggleButton.types.js +0 -3
- package/lib-commonjs/components/ToolbarToggleButton/ToolbarToggleButton.types.js.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/index.js +0 -3
- package/lib-commonjs/components/ToolbarToggleButton/index.js.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButton.js +1 -3
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.js +0 -2
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,76 @@
|
|
|
2
2
|
"name": "@fluentui/react-toolbar",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 31 May 2023 06:43:04 GMT",
|
|
6
|
+
"tag": "@fluentui/react-toolbar_v9.1.17",
|
|
7
|
+
"version": "9.1.17",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "jirivyhnalek@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-toolbar",
|
|
13
|
+
"commit": "77ae630247eb49cecef7bbb3a8564a5e2a83a5fa",
|
|
14
|
+
"comment": "Fixed a bug where ToolbarDivider default styles were prioritized"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "seanmonahan@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-toolbar",
|
|
19
|
+
"commit": "d640b972d7ac86bfb76ae6c6329f12cdd33b3b7c",
|
|
20
|
+
"comment": "chore: Update Griffel to v1.5.7."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-toolbar",
|
|
25
|
+
"comment": "Bump @fluentui/react-button to v9.3.16",
|
|
26
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-toolbar",
|
|
31
|
+
"comment": "Bump @fluentui/react-divider to v9.2.15",
|
|
32
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-toolbar",
|
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.9.2",
|
|
38
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-toolbar",
|
|
43
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6",
|
|
44
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-toolbar",
|
|
49
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.22",
|
|
50
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui/react-toolbar",
|
|
55
|
+
"comment": "Bump @fluentui/react-radio to v9.1.17",
|
|
56
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@fluentui/react-toolbar",
|
|
61
|
+
"comment": "Bump @fluentui/react-tabster to v9.7.5",
|
|
62
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "beachball",
|
|
66
|
+
"package": "@fluentui/react-toolbar",
|
|
67
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22",
|
|
68
|
+
"commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"date": "Thu, 25 May 2023 10:00:48 GMT",
|
|
6
75
|
"tag": "@fluentui/react-toolbar_v9.1.16",
|
|
7
76
|
"version": "9.1.16",
|
|
8
77
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-toolbar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 31 May 2023 06:43:04 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.1.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.1.17)
|
|
8
|
+
|
|
9
|
+
Wed, 31 May 2023 06:43:04 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toolbar_v9.1.16..@fluentui/react-toolbar_v9.1.17)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Fixed a bug where ToolbarDivider default styles were prioritized ([PR #28044](https://github.com/microsoft/fluentui/pull/28044) by jirivyhnalek@microsoft.com)
|
|
15
|
+
- chore: Update Griffel to v1.5.7. ([PR #27925](https://github.com/microsoft/fluentui/pull/27925) by seanmonahan@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-button to v9.3.16 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
17
|
+
- Bump @fluentui/react-divider to v9.2.15 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v9.9.2 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
19
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
20
|
+
- Bump @fluentui/react-context-selector to v9.1.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
21
|
+
- Bump @fluentui/react-radio to v9.1.17 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
22
|
+
- Bump @fluentui/react-tabster to v9.7.5 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
23
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
|
|
24
|
+
|
|
7
25
|
## [9.1.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.1.16)
|
|
8
26
|
|
|
9
|
-
Thu, 25 May 2023
|
|
27
|
+
Thu, 25 May 2023 10:00:48 GMT
|
|
10
28
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toolbar_v9.1.15..@fluentui/react-toolbar_v9.1.16)
|
|
11
29
|
|
|
12
30
|
### Patches
|
package/lib/Toolbar.js
CHANGED
package/lib/Toolbar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Toolbar.ts"],"sourcesContent":["export * from './components/Toolbar/index';\n"],"names":[],"mappings":"AAAA,cAAc,6BAA6B"}
|
package/lib/ToolbarButton.js
CHANGED
package/lib/ToolbarButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ToolbarButton.ts"],"sourcesContent":["export * from './components/ToolbarButton/index';\n"],"names":[],"mappings":"AAAA,cAAc,mCAAmC"}
|
package/lib/ToolbarDivider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ToolbarDivider.ts"],"sourcesContent":["export * from './components/ToolbarDivider/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
|
package/lib/ToolbarGroup.js
CHANGED
package/lib/ToolbarGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ToolbarGroup.ts"],"sourcesContent":["export * from './components/ToolbarGroup/index';\n"],"names":[],"mappings":"AAAA,cAAc,kCAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ToolbarRadioButton.ts"],"sourcesContent":["export * from './components/ToolbarRadioButton/index';\n"],"names":[],"mappings":"AAAA,cAAc,wCAAwC"}
|
package/lib/ToolbarRadioGroup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ToolbarRadioGroup.ts"],"sourcesContent":["export * from './components/ToolbarRadioGroup/index';\n"],"names":[],"mappings":"AAAA,cAAc,uCAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ToolbarToggleButton.ts"],"sourcesContent":["export * from './components/ToolbarToggleButton/index';\n"],"names":[],"mappings":"AAAA,cAAc,yCAAyC"}
|
|
@@ -6,13 +6,11 @@ import { useToolbarContextValues_unstable } from './useToolbarContextValues';
|
|
|
6
6
|
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
7
7
|
/**
|
|
8
8
|
* Toolbar component
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return renderToolbar_unstable(state, contextValues);
|
|
9
|
+
*/ export const Toolbar = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
10
|
+
const state = useToolbar_unstable(props, ref);
|
|
11
|
+
const contextValues = useToolbarContextValues_unstable(state);
|
|
12
|
+
useToolbarStyles_unstable(state);
|
|
13
|
+
useCustomStyleHook_unstable('useToolbarStyles_unstable')(state);
|
|
14
|
+
return renderToolbar_unstable(state, contextValues);
|
|
16
15
|
});
|
|
17
16
|
Toolbar.displayName = 'Toolbar';
|
|
18
|
-
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Toolbar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useToolbar_unstable } from './useToolbar';\nimport { renderToolbar_unstable } from './renderToolbar';\nimport { useToolbarStyles_unstable } from './useToolbarStyles.styles';\nimport type { ToolbarProps } from './Toolbar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToolbarContextValues_unstable } from './useToolbarContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useToolbarStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToolbarStyles_unstable')(state);\n\n return renderToolbar_unstable(state, contextValues);\n});\n\nToolbar.displayName = 'Toolbar';\n"],"names":["React","useToolbar_unstable","renderToolbar_unstable","useToolbarStyles_unstable","useToolbarContextValues_unstable","useCustomStyleHook_unstable","Toolbar","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,4BAA4B;AAGtE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,wBAA6CN,MAAMO,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACzF,MAAMC,QAAQT,oBAAoBO,OAAOC;IACzC,MAAME,gBAAgBP,iCAAiCM;IAEvDP,0BAA0BO;IAE1BL,4BAA4B,6BAA6BK;IAEzD,OAAOR,uBAAuBQ,OAAOC;AACvC,GAAG;AAEHL,QAAQM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Toolbar.types.ts"],"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"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
|
-
export const ToolbarContext =
|
|
2
|
+
export const ToolbarContext = createContext(undefined);
|
|
3
3
|
const toolbarContextDefaultValue = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
size: 'medium',
|
|
5
|
+
handleToggleButton: ()=>null,
|
|
6
|
+
handleRadio: ()=>null,
|
|
7
|
+
vertical: false,
|
|
8
|
+
checkedValues: {}
|
|
9
9
|
};
|
|
10
|
-
export const useToolbarContext_unstable = selector
|
|
11
|
-
//# sourceMappingURL=ToolbarContext.js.map
|
|
10
|
+
export const useToolbarContext_unstable = (selector)=>useContextSelector(ToolbarContext, (ctx = toolbarContextDefaultValue)=>selector(ctx));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ToolbarContext.ts"],"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"],"names":["createContext","useContextSelector","ToolbarContext","undefined","toolbarContextDefaultValue","size","handleToggleButton","handleRadio","vertical","checkedValues","useToolbarContext_unstable","selector","ctx"],"mappings":"AAAA,SAA0BA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAItG,OAAO,MAAMC,iBAAiBF,cAA+CG,WAA2C;AAExH,MAAMC,6BAAkD;IACtDC,MAAM;IACNC,oBAAoB,IAAM,IAAI;IAC9BC,aAAa,IAAM,IAAI;IACvBC,UAAU,KAAK;IACfC,eAAe,CAAC;AAClB;AAEA,OAAO,MAAMC,6BAA6B,CAAIC,WAC5CV,mBAAmBC,gBAAgB,CAACU,MAAMR,0BAA0B,GAAKO,SAASC,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Toolbar';\nexport * from './Toolbar.types';\nexport * from './renderToolbar';\nexport * from './useToolbar';\nexport * from './useToolbarStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,YAAY;AAC1B,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,eAAe;AAC7B,cAAc,4BAA4B"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
2
|
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
import { ToolbarContext } from './ToolbarContext';
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of Toolbar
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
slotProps
|
|
11
|
-
} = getSlotsNext(state);
|
|
12
|
-
return /*#__PURE__*/createElement(ToolbarContext.Provider, {
|
|
13
|
-
value: contextValues.toolbar
|
|
14
|
-
}, /*#__PURE__*/createElement(slots.root, slotProps.root, slotProps.root.children));
|
|
6
|
+
*/ export const renderToolbar_unstable = (state, contextValues)=>{
|
|
7
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
8
|
+
return /*#__PURE__*/ createElement(ToolbarContext.Provider, {
|
|
9
|
+
value: contextValues.toolbar
|
|
10
|
+
}, /*#__PURE__*/ createElement(slots.root, slotProps.root, slotProps.root.children));
|
|
15
11
|
};
|
|
16
|
-
//# sourceMappingURL=renderToolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["renderToolbar.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } 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 } = getSlotsNext<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"],"names":["createElement","getSlotsNext","ToolbarContext","renderToolbar_unstable","state","contextValues","slots","slotProps","Provider","value","toolbar","root","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,cAAc,QAAQ,mBAAmB;AAElD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAqBC,gBAAwC;IAClG,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGN,aAA2BG;IAExD,qBACE,AAdJ,cAcKF,eAAeM,QAAQ;QAACC,OAAOJ,cAAcK,OAAO;qBACnD,AAfN,cAeOJ,MAAMK,IAAI,EAAKJ,UAAUI,IAAI,EAAGJ,UAAUI,IAAI,CAACC,QAAQ;AAG9D,EAAE"}
|
|
@@ -10,103 +10,99 @@ import { useArrowNavigationGroup } from '@fluentui/react-tabster';
|
|
|
10
10
|
*
|
|
11
11
|
* @param props - props from this instance of Toolbar
|
|
12
12
|
* @param ref - reference to root HTMLElement of Toolbar
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
13
|
+
*/ export const useToolbar_unstable = (props, ref)=>{
|
|
14
|
+
const { size ='medium' , vertical =false } = props;
|
|
15
|
+
const arrowNavigationProps = useArrowNavigationGroup({
|
|
16
|
+
circular: true,
|
|
17
|
+
axis: 'both'
|
|
18
|
+
});
|
|
19
|
+
const initialState = {
|
|
20
|
+
size,
|
|
21
|
+
vertical,
|
|
22
|
+
// TODO add appropriate props/defaults
|
|
23
|
+
components: {
|
|
24
|
+
// TODO add each slot's element type or component
|
|
25
|
+
root: 'div'
|
|
26
|
+
},
|
|
27
|
+
// TODO add appropriate slots, for example:
|
|
28
|
+
// mySlot: resolveShorthand(props.mySlot),
|
|
29
|
+
root: getNativeElementProps('div', {
|
|
30
|
+
role: 'toolbar',
|
|
31
|
+
ref,
|
|
32
|
+
...vertical && {
|
|
33
|
+
'aria-orientation': 'vertical'
|
|
34
|
+
},
|
|
35
|
+
...arrowNavigationProps,
|
|
36
|
+
...props
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
const [checkedValues, onCheckedValueChange] = useToolbarSelectableState({
|
|
40
|
+
checkedValues: props.checkedValues,
|
|
41
|
+
defaultCheckedValues: props.defaultCheckedValues,
|
|
42
|
+
onCheckedValueChange: props.onCheckedValueChange
|
|
43
|
+
});
|
|
44
|
+
const handleToggleButton = useEventCallback((e, name, value, checked)=>{
|
|
45
|
+
if (name && value) {
|
|
46
|
+
const checkedItems = (checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues[name]) || [];
|
|
47
|
+
const newCheckedItems = [
|
|
48
|
+
...checkedItems
|
|
49
|
+
];
|
|
50
|
+
if (checked) {
|
|
51
|
+
newCheckedItems.splice(newCheckedItems.indexOf(value), 1);
|
|
52
|
+
} else {
|
|
53
|
+
newCheckedItems.push(value);
|
|
54
|
+
}
|
|
55
|
+
onCheckedValueChange === null || onCheckedValueChange === void 0 ? void 0 : onCheckedValueChange(e, {
|
|
56
|
+
name,
|
|
57
|
+
checkedItems: newCheckedItems
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const handleRadio = useEventCallback((e, name, value, checked)=>{
|
|
62
|
+
if (name && value) {
|
|
63
|
+
onCheckedValueChange === null || onCheckedValueChange === void 0 ? void 0 : onCheckedValueChange(e, {
|
|
64
|
+
name,
|
|
65
|
+
checkedItems: [
|
|
66
|
+
value
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
...initialState,
|
|
73
|
+
handleToggleButton,
|
|
74
|
+
handleRadio,
|
|
75
|
+
checkedValues: checkedValues !== null && checkedValues !== void 0 ? checkedValues : {}
|
|
76
|
+
};
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* Adds appropriate state values and handlers for selectable items
|
|
80
80
|
* i.e checkboxes and radios
|
|
81
|
-
*/
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
...s,
|
|
104
|
-
[name]: checkedItems
|
|
105
|
-
} : {
|
|
106
|
-
[name]: checkedItems
|
|
107
|
-
};
|
|
81
|
+
*/ const useToolbarSelectableState = (state)=>{
|
|
82
|
+
const [checkedValues, setCheckedValues] = useControllableState({
|
|
83
|
+
state: state.checkedValues,
|
|
84
|
+
defaultState: state.defaultCheckedValues,
|
|
85
|
+
initialState: {}
|
|
86
|
+
});
|
|
87
|
+
const { onCheckedValueChange: onCheckedValueChangeOriginal } = state;
|
|
88
|
+
const onCheckedValueChange = useEventCallback((e, { name , checkedItems })=>{
|
|
89
|
+
if (onCheckedValueChangeOriginal) {
|
|
90
|
+
onCheckedValueChangeOriginal(e, {
|
|
91
|
+
name,
|
|
92
|
+
checkedItems
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
setCheckedValues((s)=>{
|
|
96
|
+
return s ? {
|
|
97
|
+
...s,
|
|
98
|
+
[name]: checkedItems
|
|
99
|
+
} : {
|
|
100
|
+
[name]: checkedItems
|
|
101
|
+
};
|
|
102
|
+
});
|
|
108
103
|
});
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
return [
|
|
105
|
+
checkedValues,
|
|
106
|
+
onCheckedValueChange
|
|
107
|
+
];
|
|
111
108
|
};
|
|
112
|
-
//# sourceMappingURL=useToolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["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"],"names":["React","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"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,4BAA4B;AACnF,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,SAASC,uBAAuB,QAAQ,0BAA0B;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAqBC,MAA8C;IACrG,MAAM,EAAEC,MAAO,SAAQ,EAAEC,UAAW,KAAK,CAAA,EAAE,GAAGH;IAE9C,MAAMI,uBAAuBN,wBAAwB;QACnDO,UAAU,IAAI;QACdC,MAAM;IACR;IAEA,MAAMC,eAA0C;QAC9CL;QACAC;QACA,sCAAsC;QACtCK,YAAY;YACV,iDAAiD;YACjDC,MAAM;QACR;QACA,2CAA2C;QAC3C,0CAA0C;QAC1CA,MAAMZ,sBAAsB,OAAO;YACjCa,MAAM;YACNT;YACA,GAAIE,YAAY;gBAAE,oBAAoB;YAAW,CAAC;YAClD,GAAGC,oBAAoB;YACvB,GAAGJ,KAAK;QACV;IACF;IAEA,MAAM,CAACW,eAAeC,qBAAqB,GAAGC,0BAA0B;QACtEF,eAAeX,MAAMW,aAAa;QAClCG,sBAAsBd,MAAMc,oBAAoB;QAChDF,sBAAsBZ,MAAMY,oBAAoB;IAClD;IAEA,MAAMG,qBAAsCpB,iBAC1C,CAACqB,GAA2CC,MAAcC,OAAeC,UAAsB;QAC7F,IAAIF,QAAQC,OAAO;YACjB,MAAME,eAAeT,CAAAA,0BAAAA,2BAAAA,KAAAA,IAAAA,aAAe,CAACM,KAAK,AAAD,KAAK,EAAE;YAChD,MAAMI,kBAAkB;mBAAID;aAAa;YACzC,IAAID,SAAS;gBACXE,gBAAgBC,MAAM,CAACD,gBAAgBE,OAAO,CAACL,QAAQ;YACzD,OAAO;gBACLG,gBAAgBG,IAAI,CAACN;YACvB,CAAC;YACDN,iCAAAA,kCAAAA,KAAAA,IAAAA,qBAAuBI,GAAG;gBAAEC;gBAAMG,cAAcC;YAAgB;QAClE,CAAC;IACH;IAGF,MAAMI,cAA+B9B,iBACnC,CAACqB,GAA2CC,MAAcC,OAAeC,UAAsB;QAC7F,IAAIF,QAAQC,OAAO;YACjBN,iCAAAA,kCAAAA,KAAAA,IAAAA,qBAAuBI,GAAG;gBACxBC;gBACAG,cAAc;oBAACF;iBAAM;YACvB;QACF,CAAC;IACH;IAGF,OAAO;QACL,GAAGX,YAAY;QACfQ;QACAU;QACAd,eAAeA,0BAAAA,2BAAAA,gBAAiB,CAAC,CAAC;IACpC;AACF,EAAE;AAEF;;;CAGC,GACD,MAAME,4BAA4B,CAChCa,QACG;IACH,MAAM,CAACf,eAAegB,iBAAiB,GAAG/B,qBAAqB;QAC7D8B,OAAOA,MAAMf,aAAa;QAC1BiB,cAAcF,MAAMZ,oBAAoB;QACxCP,cAAc,CAAC;IACjB;IACA,MAAM,EAAEK,sBAAsBiB,6BAA4B,EAAE,GAAGH;IAC/D,MAAMd,uBAA6DjB,iBAAiB,CAACqB,GAAG,EAAEC,KAAI,EAAEG,aAAY,EAAE,GAAK;QACjH,IAAIS,8BAA8B;YAChCA,6BAA6Bb,GAAG;gBAAEC;gBAAMG;YAAa;QACvD,CAAC;QAEDO,iBAAiBG,CAAAA,IAAK;YACpB,OAAOA,IAAI;gBAAE,GAAGA,CAAC;gBAAE,CAACb,KAAK,EAAEG;YAAa,IAAI;gBAAE,CAACH,KAAK,EAAEG;YAAa,CAAC;QACtE;IACF;IAEA,OAAO;QAACT;QAAeC;KAAqB;AAC9C"}
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
export function useToolbarContextValues_unstable(state) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
handleRadio,
|
|
15
|
-
checkedValues
|
|
16
|
-
};
|
|
17
|
-
return {
|
|
18
|
-
toolbar
|
|
19
|
-
};
|
|
2
|
+
const { size , handleToggleButton , vertical , checkedValues , handleRadio } = state;
|
|
3
|
+
// This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
|
|
4
|
+
const toolbar = {
|
|
5
|
+
size,
|
|
6
|
+
vertical,
|
|
7
|
+
handleToggleButton,
|
|
8
|
+
handleRadio,
|
|
9
|
+
checkedValues
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
toolbar
|
|
13
|
+
};
|
|
20
14
|
}
|
|
21
|
-
//# sourceMappingURL=useToolbarContextValues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["useToolbarContextValues.tsx"],"sourcesContent":["import type { ToolbarContextValue, ToolbarContextValues, ToolbarState } from './Toolbar.types';\n\nexport function useToolbarContextValues_unstable(state: ToolbarState): ToolbarContextValues {\n const { size, handleToggleButton, vertical, checkedValues, handleRadio } = state;\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const toolbar: ToolbarContextValue = {\n size,\n vertical,\n handleToggleButton,\n handleRadio,\n checkedValues,\n };\n\n return { toolbar };\n}\n"],"names":["useToolbarContextValues_unstable","state","size","handleToggleButton","vertical","checkedValues","handleRadio","toolbar"],"mappings":"AAEA,OAAO,SAASA,iCAAiCC,KAAmB,EAAwB;IAC1F,MAAM,EAAEC,KAAI,EAAEC,mBAAkB,EAAEC,SAAQ,EAAEC,cAAa,EAAEC,YAAW,EAAE,GAAGL;IAC3E,mGAAmG;IACnG,MAAMM,UAA+B;QACnCL;QACAE;QACAD;QACAG;QACAD;IACF;IAEA,OAAO;QAAEE;IAAQ;AACnB,CAAC"}
|