@fluentui/react-toolbar 9.0.0-beta.8 → 9.0.0-beta.9
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 +75 -4
- package/CHANGELOG.md +22 -5
- package/dist/index.d.ts +18 -7
- package/lib/components/Toolbar/Toolbar.types.js.map +1 -1
- package/lib/components/Toolbar/ToolbarContext.js +6 -8
- package/lib/components/Toolbar/ToolbarContext.js.map +1 -1
- package/lib/components/Toolbar/useToolbar.js +3 -1
- package/lib/components/Toolbar/useToolbar.js.map +1 -1
- package/lib/components/Toolbar/useToolbarContextValues.js +6 -2
- package/lib/components/Toolbar/useToolbarContextValues.js.map +1 -1
- package/lib/components/Toolbar/useToolbarStyles.js +13 -2
- package/lib/components/Toolbar/useToolbarStyles.js.map +1 -1
- package/lib/components/ToolbarButton/ToolbarButton.js +2 -4
- package/lib/components/ToolbarButton/ToolbarButton.js.map +1 -1
- package/lib/components/ToolbarDivider/ToolbarDivider.js +3 -5
- package/lib/components/ToolbarDivider/ToolbarDivider.js.map +1 -1
- package/lib/components/ToolbarDivider/ToolbarDivider.types.js.map +1 -1
- package/lib/components/ToolbarDivider/index.js +1 -0
- package/lib/components/ToolbarDivider/index.js.map +1 -1
- package/lib/components/ToolbarDivider/useToolbarDivider.js +20 -0
- package/lib/components/ToolbarDivider/useToolbarDivider.js.map +1 -0
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.js +8 -2
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.js.map +1 -1
- package/lib/components/ToolbarRadio/ToolbarRadio.js +2 -4
- package/lib/components/ToolbarRadio/ToolbarRadio.js.map +1 -1
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.types.js.map +1 -1
- package/lib/components/ToolbarToggleButton/useToolbarToggleButton.js +14 -6
- package/lib/components/ToolbarToggleButton/useToolbarToggleButton.js.map +1 -1
- package/lib-commonjs/components/Toolbar/ToolbarContext.js +8 -10
- package/lib-commonjs/components/Toolbar/ToolbarContext.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbar.js +3 -1
- package/lib-commonjs/components/Toolbar/useToolbar.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarContextValues.js +6 -2
- package/lib-commonjs/components/Toolbar/useToolbarContextValues.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarStyles.js +13 -2
- package/lib-commonjs/components/Toolbar/useToolbarStyles.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/ToolbarDivider/ToolbarDivider.js +3 -4
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.js.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/index.js +2 -0
- package/lib-commonjs/components/ToolbarDivider/index.js.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/useToolbarDivider.js +31 -0
- package/lib-commonjs/components/ToolbarDivider/useToolbarDivider.js.map +1 -0
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.js +8 -2
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadio/ToolbarRadio.js +1 -3
- package/lib-commonjs/components/ToolbarRadio/ToolbarRadio.js.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButton.js +13 -5
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButton.js.map +1 -1
- package/package.json +9 -8
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,78 @@
|
|
|
2
2
|
"name": "@fluentui/react-toolbar",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 13 Oct 2022 10:59:40 GMT",
|
|
6
|
+
"tag": "@fluentui/react-toolbar_v9.0.0-beta.9",
|
|
7
|
+
"version": "9.0.0-beta.9",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "lingfangao@hotmail.com",
|
|
12
|
+
"package": "@fluentui/react-toolbar",
|
|
13
|
+
"commit": "2d36a7c692d301b420b6a4b1a78b139fdc955612",
|
|
14
|
+
"comment": "fix: Toolbar selection should work"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "olfedias@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-toolbar",
|
|
19
|
+
"commit": "1a527d440e0497ef8046b3ce240492241e7a04ac",
|
|
20
|
+
"comment": "chore: Update Griffel to latest version"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-toolbar",
|
|
25
|
+
"comment": "Bump @fluentui/react-button to v9.1.4",
|
|
26
|
+
"commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-toolbar",
|
|
31
|
+
"comment": "Bump @fluentui/react-divider to v9.1.1",
|
|
32
|
+
"commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-toolbar",
|
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.1.1",
|
|
38
|
+
"commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-toolbar",
|
|
43
|
+
"comment": "Bump @fluentui/react-context-selector to v9.0.4",
|
|
44
|
+
"commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-toolbar",
|
|
49
|
+
"comment": "Bump @fluentui/react-radio to v9.0.8",
|
|
50
|
+
"commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui/react-toolbar",
|
|
55
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.3",
|
|
56
|
+
"commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@fluentui/react-toolbar",
|
|
61
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.15",
|
|
62
|
+
"commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"none": [
|
|
66
|
+
{
|
|
67
|
+
"author": "chassunc@microsoft.com",
|
|
68
|
+
"package": "@fluentui/react-toolbar",
|
|
69
|
+
"commit": "41c30da2fdb58551d5ec3ce2450ccab5d2d49969",
|
|
70
|
+
"comment": "chore: update api"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"date": "Mon, 03 Oct 2022 22:24:42 GMT",
|
|
6
77
|
"tag": "@fluentui/react-toolbar_v9.0.0-beta.8",
|
|
7
78
|
"version": "9.0.0-beta.8",
|
|
8
79
|
"comments": {
|
|
@@ -11,19 +82,19 @@
|
|
|
11
82
|
"author": "beachball",
|
|
12
83
|
"package": "@fluentui/react-toolbar",
|
|
13
84
|
"comment": "Bump @fluentui/react-button to v9.1.3",
|
|
14
|
-
"commit": "
|
|
85
|
+
"commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
|
|
15
86
|
},
|
|
16
87
|
{
|
|
17
88
|
"author": "beachball",
|
|
18
89
|
"package": "@fluentui/react-toolbar",
|
|
19
90
|
"comment": "Bump @fluentui/react-radio to v9.0.7",
|
|
20
|
-
"commit": "
|
|
91
|
+
"commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
|
|
21
92
|
},
|
|
22
93
|
{
|
|
23
94
|
"author": "beachball",
|
|
24
95
|
"package": "@fluentui/react-toolbar",
|
|
25
96
|
"comment": "Bump @fluentui/react-tabster to v9.1.2",
|
|
26
|
-
"commit": "
|
|
97
|
+
"commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
|
|
27
98
|
}
|
|
28
99
|
]
|
|
29
100
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-toolbar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 13 Oct 2022 10:59:40 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.0.0-beta.9)
|
|
8
|
+
|
|
9
|
+
Thu, 13 Oct 2022 10:59:40 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toolbar_v9.0.0-beta.8..@fluentui/react-toolbar_v9.0.0-beta.9)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- fix: Toolbar selection should work ([PR #25153](https://github.com/microsoft/fluentui/pull/25153) by lingfangao@hotmail.com)
|
|
15
|
+
- chore: Update Griffel to latest version ([PR #25075](https://github.com/microsoft/fluentui/pull/25075) by olfedias@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-button to v9.1.4 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
|
|
17
|
+
- Bump @fluentui/react-divider to v9.1.1 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v9.1.1 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
|
|
19
|
+
- Bump @fluentui/react-context-selector to v9.0.4 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
|
|
20
|
+
- Bump @fluentui/react-radio to v9.0.8 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
|
|
21
|
+
- Bump @fluentui/react-tabster to v9.1.3 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
|
|
22
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.15 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
|
|
23
|
+
|
|
7
24
|
## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.0.0-beta.8)
|
|
8
25
|
|
|
9
|
-
Mon, 03 Oct 2022 22:
|
|
26
|
+
Mon, 03 Oct 2022 22:24:42 GMT
|
|
10
27
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toolbar_v9.0.0-beta.7..@fluentui/react-toolbar_v9.0.0-beta.8)
|
|
11
28
|
|
|
12
29
|
### Changes
|
|
13
30
|
|
|
14
|
-
- Bump @fluentui/react-button to v9.1.3 ([PR #
|
|
15
|
-
- Bump @fluentui/react-radio to v9.0.7 ([PR #
|
|
16
|
-
- Bump @fluentui/react-tabster to v9.1.2 ([PR #
|
|
31
|
+
- Bump @fluentui/react-button to v9.1.3 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
|
|
32
|
+
- Bump @fluentui/react-radio to v9.0.7 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
|
|
33
|
+
- Bump @fluentui/react-tabster to v9.1.2 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
|
|
17
34
|
|
|
18
35
|
## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-toolbar_v9.0.0-beta.7)
|
|
19
36
|
|
package/dist/index.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ declare type ToolbarCheckedValueChangeEvent = React_2.MouseEvent | React_2.Keybo
|
|
|
65
65
|
|
|
66
66
|
export declare const toolbarClassNames: SlotClassNames<ToolbarSlots>;
|
|
67
67
|
|
|
68
|
-
export declare type ToolbarContextValue = Pick<
|
|
68
|
+
export declare type ToolbarContextValue = Pick<ToolbarState, 'size' | 'vertical' | 'checkedValues'> & {
|
|
69
69
|
handleToggleButton?: ToggableHandler;
|
|
70
70
|
};
|
|
71
71
|
|
|
@@ -81,7 +81,14 @@ export declare const ToolbarDivider: ForwardRefComponent<ToolbarDividerProps>;
|
|
|
81
81
|
/**
|
|
82
82
|
* ToolbarDivider Props
|
|
83
83
|
*/
|
|
84
|
-
export declare type ToolbarDividerProps = ComponentProps<Partial<DividerSlots
|
|
84
|
+
export declare type ToolbarDividerProps = ComponentProps<Partial<DividerSlots>> & {
|
|
85
|
+
/**
|
|
86
|
+
* A divider can be horizontal or vertical (default).
|
|
87
|
+
*
|
|
88
|
+
* @default true
|
|
89
|
+
*/
|
|
90
|
+
vertical?: boolean;
|
|
91
|
+
};
|
|
85
92
|
|
|
86
93
|
/**
|
|
87
94
|
* State used in rendering ToolbarDivider
|
|
@@ -98,6 +105,11 @@ export declare type ToolbarProps = ComponentProps<ToolbarSlots> & {
|
|
|
98
105
|
* @default medium
|
|
99
106
|
*/
|
|
100
107
|
size?: 'small' | 'medium';
|
|
108
|
+
/**
|
|
109
|
+
* Toolbar can be vertical styled
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
vertical?: boolean;
|
|
101
113
|
/**
|
|
102
114
|
* Map of all checked values
|
|
103
115
|
*/
|
|
@@ -157,7 +169,7 @@ export declare type ToolbarSlots = {
|
|
|
157
169
|
/**
|
|
158
170
|
* State used in rendering Toolbar
|
|
159
171
|
*/
|
|
160
|
-
export declare type ToolbarState = ComponentState<ToolbarSlots> & Required<Pick<ToolbarProps, 'size' | 'checkedValues'>> & Pick<ToolbarProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & {
|
|
172
|
+
export declare type ToolbarState = ComponentState<ToolbarSlots> & Required<Pick<ToolbarProps, 'size' | 'checkedValues' | 'vertical'>> & Pick<ToolbarProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & {
|
|
161
173
|
handleToggleButton: ToggableHandler;
|
|
162
174
|
};
|
|
163
175
|
|
|
@@ -171,15 +183,14 @@ export declare const ToolbarToggleButton: ForwardRefComponent<ToolbarToggleButto
|
|
|
171
183
|
*/
|
|
172
184
|
export declare type ToolbarToggleButtonProps = ComponentProps<ButtonSlots> & Partial<Pick<ToggleButtonProps, 'disabled' | 'disabledFocusable' | 'size'>> & {
|
|
173
185
|
appearance?: 'primary' | 'subtle';
|
|
186
|
+
name: string;
|
|
187
|
+
value: string;
|
|
174
188
|
};
|
|
175
189
|
|
|
176
190
|
/**
|
|
177
191
|
* State used in rendering ToolbarToggleButton
|
|
178
192
|
*/
|
|
179
|
-
export declare type ToolbarToggleButtonState = ComponentState<Partial<ButtonSlots>> & ToggleButtonState & Required<Pick<ToggleButtonProps, 'checked'>> &
|
|
180
|
-
name?: string;
|
|
181
|
-
value?: string;
|
|
182
|
-
};
|
|
193
|
+
export declare type ToolbarToggleButtonState = ComponentState<Partial<ButtonSlots>> & ToggleButtonState & Required<Pick<ToggleButtonProps, 'checked'>> & Pick<ToolbarToggleButtonProps, 'name' | 'value'>;
|
|
183
194
|
|
|
184
195
|
/**
|
|
185
196
|
* Create the state required to render Toolbar.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.types.js","sourceRoot":"../src/","sources":["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';\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'>> &\n Pick<ToolbarProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & {\n /*\n * Toggles the state of a ToggleButton item\n */\n handleToggleButton: ToggableHandler;\n };\n\nexport type ToolbarContextValue = Pick<
|
|
1
|
+
{"version":3,"file":"Toolbar.types.js","sourceRoot":"../src/","sources":["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';\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\nexport type ToolbarContextValue = Pick<ToolbarState, 'size' | 'vertical' | 'checkedValues'> & {\n handleToggleButton?: ToggableHandler;\n};\n\nexport type ToolbarContextValues = {\n toolbar: ToolbarContextValue;\n};\n\nexport type UninitializedToolbarState = Omit<ToolbarState, 'checkedValues' | 'handleToggleButton'> &\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"]}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const ToolbarContext = /*#__PURE__*/
|
|
1
|
+
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
|
+
export const ToolbarContext = /*#__PURE__*/createContext(undefined);
|
|
3
3
|
const toolbarContextDefaultValue = {
|
|
4
4
|
size: 'medium',
|
|
5
|
-
handleToggleButton: () => null
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _a;
|
|
9
|
-
|
|
10
|
-
return (_a = React.useContext(ToolbarContext)) !== null && _a !== void 0 ? _a : toolbarContextDefaultValue;
|
|
5
|
+
handleToggleButton: () => null,
|
|
6
|
+
vertical: false,
|
|
7
|
+
checkedValues: {}
|
|
11
8
|
};
|
|
9
|
+
export const useToolbarContext_unstable = selector => useContextSelector(ToolbarContext, (ctx = toolbarContextDefaultValue) => selector(ctx));
|
|
12
10
|
//# sourceMappingURL=ToolbarContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/ToolbarContext.
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/ToolbarContext.ts"],"names":[],"mappings":"AAAA,SAA0B,aAA1B,EAAyC,kBAAzC,QAAmE,kCAAnE;AAIA,OAAO,MAAM,cAAc,gBAAG,aAAa,CAAkC,SAAlC,CAApC;AAEP,MAAM,0BAA0B,GAAwB;EACtD,IAAI,EAAE,QADgD;EAEtD,kBAAkB,EAAE,MAAM,IAF4B;EAGtD,QAAQ,EAAE,KAH4C;EAItD,aAAa,EAAE;AAJuC,CAAxD;AAOA,OAAO,MAAM,0BAA0B,GAAO,QAAJ,IACxC,kBAAkB,CAAC,cAAD,EAAiB,CAAC,GAAG,GAAG,0BAAP,KAAsC,QAAQ,CAAC,GAAD,CAA/D,CADb","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 vertical: false,\n checkedValues: {},\n};\n\nexport const useToolbarContext_unstable = <T>(selector: ContextSelector<ToolbarContextValue, T>): T =>\n useContextSelector(ToolbarContext, (ctx = toolbarContextDefaultValue) => selector(ctx));\n"],"sourceRoot":"../src/"}
|
|
@@ -13,7 +13,8 @@ import { useArrowNavigationGroup } from '@fluentui/react-tabster';
|
|
|
13
13
|
|
|
14
14
|
export const useToolbar_unstable = (props, ref) => {
|
|
15
15
|
const {
|
|
16
|
-
size = 'medium'
|
|
16
|
+
size = 'medium',
|
|
17
|
+
vertical = false
|
|
17
18
|
} = props;
|
|
18
19
|
const arrowNavigationProps = useArrowNavigationGroup({
|
|
19
20
|
circular: true,
|
|
@@ -21,6 +22,7 @@ export const useToolbar_unstable = (props, ref) => {
|
|
|
21
22
|
});
|
|
22
23
|
const initialState = {
|
|
23
24
|
size,
|
|
25
|
+
vertical,
|
|
24
26
|
// TODO add appropriate props/defaults
|
|
25
27
|
components: {
|
|
26
28
|
// TODO add each slot's element type or component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/useToolbar.ts"],"names":[],"mappings":"AACA,SAAS,gBAAT,EAA2B,oBAA3B,QAAuD,2BAAvD;AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,uBAAT,QAAwC,yBAAxC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;EACpG,MAAM;IAAE,IAAI,GAAG;
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/useToolbar.ts"],"names":[],"mappings":"AACA,SAAS,gBAAT,EAA2B,oBAA3B,QAAuD,2BAAvD;AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,uBAAT,QAAwC,yBAAxC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;EACpG,MAAM;IAAE,IAAI,GAAG,QAAT;IAAmB,QAAQ,GAAG;EAA9B,IAAwC,KAA9C;EAEA,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;IACnD,QAAQ,EAAE,IADyC;IAEnD,IAAI,EAAE;EAF6C,CAAD,CAApD;EAKA,MAAM,YAAY,GAA8B;IAC9C,IAD8C;IAE9C,QAF8C;IAG9C;IACA,UAAU,EAAE;MACV;MACA,IAAI,EAAE;IAFI,CAJkC;IAQ9C;IACA;IACA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,IAAI,EAAE,SAD2B;MAEjC,GAFiC;MAGjC,GAAG,oBAH8B;MAIjC,GAAG;IAJ8B,CAAR;EAVmB,CAAhD;EAkBA,MAAM,CAAC,aAAD,EAAgB,gBAAhB,IAAoC,oBAAoB,CAAC;IAC7D,KAAK,EAAE,YAAY,CAAC,aADyC;IAE7D,YAAY,EAAE,YAAY,CAAC,oBAFkC;IAG7D,YAAY,EAAE;EAH+C,CAAD,CAA9D;EAMA,MAAM;IAAE;EAAF,IAA2B,YAAjC;EAEA,MAAM,kBAAkB,GAAoB,gBAAgB,CAC1D,CAAC,CAAD,EAA4C,IAA5C,EAA2D,KAA3D,EAA2E,OAA3E,KAAgG;IAC9F,IAAI,IAAI,IAAI,KAAZ,EAAmB;MACjB,MAAM,YAAY,GAAG,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAG,IAAH,CAAb,KAAyB,EAA9C;MACA,MAAM,eAAe,GAAG,CAAC,GAAG,YAAJ,CAAxB;;MACA,IAAI,OAAJ,EAAa;QACX,eAAe,CAAC,MAAhB,CAAuB,eAAe,CAAC,OAAhB,CAAwB,KAAxB,CAAvB,EAAuD,CAAvD;MACD,CAFD,MAEO;QACL,eAAe,CAAC,IAAhB,CAAqB,KAArB;MACD;;MAED,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,EAAM;QAAE,IAAF;QAAQ,YAAY,EAAE;MAAtB,CAAN,CAApB;MACA,gBAAgB,CAAC,CAAC,KAAK,EAAE,GAAG,CAAL;QAAQ,CAAC,IAAD,GAAQ;MAAhB,CAAL,CAAF,CAAhB;IACD;EACF,CAdyD,CAA5D;EAiBA,OAAO,EACL,GAAG,YADE;IAEL,kBAFK;IAGL,aAAa,EAAE,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAA,aAAA,GAAiB;EAH3B,CAAP;AAKD,CAxDM","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: 'horizontal',\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 ...arrowNavigationProps,\n ...props,\n }),\n };\n\n const [checkedValues, setCheckedValues] = useControllableState({\n state: initialState.checkedValues,\n defaultState: initialState.defaultCheckedValues,\n initialState: {},\n });\n\n const { onCheckedValueChange } = initialState;\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\n onCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n }\n },\n );\n\n return {\n ...initialState,\n handleToggleButton,\n checkedValues: checkedValues ?? {},\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
export function useToolbarContextValues_unstable(state) {
|
|
2
2
|
const {
|
|
3
3
|
size,
|
|
4
|
-
handleToggleButton
|
|
4
|
+
handleToggleButton,
|
|
5
|
+
vertical,
|
|
6
|
+
checkedValues
|
|
5
7
|
} = state; // This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
|
|
6
8
|
|
|
7
9
|
const toolbar = {
|
|
8
10
|
size,
|
|
9
|
-
|
|
11
|
+
vertical,
|
|
12
|
+
handleToggleButton,
|
|
13
|
+
checkedValues
|
|
10
14
|
};
|
|
11
15
|
return {
|
|
12
16
|
toolbar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/useToolbarContextValues.tsx"],"names":[],"mappings":"AAEA,OAAM,SAAU,gCAAV,CAA2C,KAA3C,EAA8D;EAClE,MAAM;IAAE,IAAF;IAAQ;
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/useToolbarContextValues.tsx"],"names":[],"mappings":"AAEA,OAAM,SAAU,gCAAV,CAA2C,KAA3C,EAA8D;EAClE,MAAM;IAAE,IAAF;IAAQ,kBAAR;IAA4B,QAA5B;IAAsC;EAAtC,IAAwD,KAA9D,CADkE,CAElE;;EACA,MAAM,OAAO,GAAwB;IACnC,IADmC;IAEnC,QAFmC;IAGnC,kBAHmC;IAInC;EAJmC,CAArC;EAOA,OAAO;IAAE;EAAF,CAAP;AACD","sourcesContent":["import type { ToolbarContextValue, ToolbarContextValues, ToolbarState } from './Toolbar.types';\n\nexport function useToolbarContextValues_unstable(state: ToolbarState): ToolbarContextValues {\n const { size, handleToggleButton, vertical, checkedValues } = 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 checkedValues,\n };\n\n return { toolbar };\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -9,11 +9,19 @@ export const toolbarClassNames = {
|
|
|
9
9
|
const useStyles = /*#__PURE__*/__styles({
|
|
10
10
|
"root": {
|
|
11
11
|
"mc9l5x": "f22iagw",
|
|
12
|
+
"z8tnut": "f10ra9hq",
|
|
13
|
+
"z189sj": ["f19lj068", "f177v4lu"],
|
|
14
|
+
"Byoj8tv": "f1y2xyjm",
|
|
15
|
+
"uwmqm3": ["f177v4lu", "f19lj068"],
|
|
12
16
|
"i8kkvl": "f4px1ci",
|
|
13
17
|
"Belr9w4": "fn67r4l"
|
|
18
|
+
},
|
|
19
|
+
"vertical": {
|
|
20
|
+
"Beiy3e4": "f1vx9l62",
|
|
21
|
+
"a9b677": "f1acs6jw"
|
|
14
22
|
}
|
|
15
23
|
}, {
|
|
16
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}"]
|
|
24
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10ra9hq{padding-top:4px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1y2xyjm{padding-bottom:4px;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1acs6jw{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}"]
|
|
17
25
|
});
|
|
18
26
|
/**
|
|
19
27
|
* Apply styling to the Toolbar slots based on the state
|
|
@@ -22,7 +30,10 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
22
30
|
|
|
23
31
|
export const useToolbarStyles_unstable = state => {
|
|
24
32
|
const styles = useStyles();
|
|
25
|
-
|
|
33
|
+
const {
|
|
34
|
+
vertical
|
|
35
|
+
} = state;
|
|
36
|
+
state.root.className = mergeClasses(toolbarClassNames.root, styles.root, vertical && styles.vertical, state.root.className);
|
|
26
37
|
return state;
|
|
27
38
|
};
|
|
28
39
|
//# sourceMappingURL=useToolbarStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/useToolbarStyles.ts"],"names":[],"mappings":"AACA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAGA,OAAO,MAAM,iBAAiB,GAAiC;EAC7D,IAAI,EAAE;AADuD,CAAxD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/useToolbarStyles.ts"],"names":[],"mappings":"AACA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAGA,OAAO,MAAM,iBAAiB,GAAiC;EAC7D,IAAI,EAAE;AADuD,CAAxD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAYA;;AAEG;;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAAsC;EAC7E,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,iBAAiB,CAAC,IADe,EAEjC,MAAM,CAAC,IAF0B,EAGjC,QAAQ,IAAI,MAAM,CAAC,QAHc,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;EAOA,OAAO,KAAP;AACD,CAXM","sourcesContent":["import { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { ToolbarSlots, ToolbarState } from './Toolbar.types';\n\nexport const toolbarClassNames: SlotClassNames<ToolbarSlots> = {\n root: 'fui-Toolbar',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.padding('4px', '8px', '4px', '8px'),\n ...shorthands.gap('8px'),\n },\n vertical: {\n flexDirection: 'column',\n width: 'fit-content',\n },\n});\n\n/**\n * Apply styling to the Toolbar slots based on the state\n */\nexport const useToolbarStyles_unstable = (state: ToolbarState): ToolbarState => {\n const styles = useStyles();\n const { vertical } = state;\n state.root.className = mergeClasses(\n toolbarClassNames.root,\n styles.root,\n vertical && styles.vertical,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from '@fluentui/react-button';
|
|
3
|
-
import {
|
|
3
|
+
import { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';
|
|
4
4
|
/**
|
|
5
5
|
* ToolbarButton component is a Button to be used inside Toolbar
|
|
6
6
|
* which will respect toolbar props such as `size`
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
export const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
-
const
|
|
11
|
-
size
|
|
12
|
-
} = useToolbarContext();
|
|
10
|
+
const size = useToolbarContext_unstable(ctx => ctx.size);
|
|
13
11
|
const state = useButton_unstable({
|
|
14
12
|
size,
|
|
15
13
|
appearance: 'transparent',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarButton/ToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,SAAS,qBAAT,EAAgC,wBAAhC,EAA0D,kBAA1D,QAAoF,wBAApF;AACA,SAAS,
|
|
1
|
+
{"version":3,"sources":["components/ToolbarButton/ToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,SAAS,qBAAT,EAAgC,wBAAhC,EAA0D,kBAA1D,QAAoF,wBAApF;AACA,SAAS,0BAAT,QAA2C,2BAA3C;AAEA;;;AAGG;;AACH,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM,IAAI,GAAG,0BAA0B,CAAC,GAAG,IAAI,GAAG,CAAC,IAAZ,CAAvC;EACA,MAAM,KAAK,GAAG,kBAAkB,CAAC;IAAE,IAAF;IAAQ,UAAU,EAAE,aAApB;IAAmC,GAAG;EAAtC,CAAD,EAAgD,GAAhD,CAAhC;EACA,wBAAwB,CAAC,KAAD,CAAxB;EACA,OAAO,qBAAqB,CAAC,KAAD,CAA5B,CAJoG,CAKpG;AACD,CANqE,CAA/D;AAQP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport type { ToolbarButtonProps } from './ToolbarButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from '@fluentui/react-button';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * ToolbarButton component is a Button to be used inside Toolbar\n * which will respect toolbar props such as `size`\n */\nexport const ToolbarButton: ForwardRefComponent<ToolbarButtonProps> = React.forwardRef((props, ref) => {\n const size = useToolbarContext_unstable(ctx => ctx.size);\n const state = useButton_unstable({ size, appearance: 'transparent', ...props }, ref);\n useButtonStyles_unstable(state);\n return renderButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToolbarButtonProps>;\n\nToolbarButton.displayName = 'ToolbarButton';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useToolbarDividerStyles_unstable } from './useToolbarDividerStyles';
|
|
3
|
-
import { renderDivider_unstable
|
|
3
|
+
import { renderDivider_unstable } from '@fluentui/react-divider';
|
|
4
|
+
import { useToolbarDivider_unstable } from './useToolbarDivider';
|
|
4
5
|
/**
|
|
5
6
|
* ToolbarDivider component
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
export const ToolbarDivider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
|
-
const state =
|
|
10
|
-
vertical: true,
|
|
11
|
-
...props
|
|
12
|
-
}, ref);
|
|
10
|
+
const state = useToolbarDivider_unstable(props, ref);
|
|
13
11
|
useToolbarDividerStyles_unstable(state);
|
|
14
12
|
return renderDivider_unstable(state);
|
|
15
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarDivider/ToolbarDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AAGA,SAAS,sBAAT,
|
|
1
|
+
{"version":3,"sources":["components/ToolbarDivider/ToolbarDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AAGA,SAAS,sBAAT,QAAuC,yBAAvC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAEA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtG,MAAM,KAAK,GAAG,0BAA0B,CAAC,KAAD,EAAQ,GAAR,CAAxC;EACA,gCAAgC,CAAC,KAAD,CAAhC;EACA,OAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CAJuE,CAAjE;AAMP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { useToolbarDividerStyles_unstable } from './useToolbarDividerStyles';\nimport type { ToolbarDividerProps } from './ToolbarDivider.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderDivider_unstable } from '@fluentui/react-divider';\nimport { useToolbarDivider_unstable } from './useToolbarDivider';\n\n/**\n * ToolbarDivider component\n */\nexport const ToolbarDivider: ForwardRefComponent<ToolbarDividerProps> = React.forwardRef((props, ref) => {\n const state = useToolbarDivider_unstable(props, ref);\n useToolbarDividerStyles_unstable(state);\n return renderDivider_unstable(state);\n});\n\nToolbarDivider.displayName = 'ToolbarDivider';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarDivider.types.js","sourceRoot":"../src/","sources":["components/ToolbarDivider/ToolbarDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport { DividerSlots, DividerState } from '@fluentui/react-divider';\n\n/**\n * ToolbarDivider Props\n */\nexport type ToolbarDividerProps = ComponentProps<Partial<DividerSlots
|
|
1
|
+
{"version":3,"file":"ToolbarDivider.types.js","sourceRoot":"../src/","sources":["components/ToolbarDivider/ToolbarDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport { DividerSlots, DividerState } from '@fluentui/react-divider';\n\n/**\n * ToolbarDivider Props\n */\nexport type ToolbarDividerProps = ComponentProps<Partial<DividerSlots>> & {\n /**\n * A divider can be horizontal or vertical (default).\n *\n * @default true\n */\n vertical?: boolean;\n};\n\n/**\n * State used in rendering ToolbarDivider\n */\nexport type ToolbarDividerState = ComponentState<Partial<DividerSlots>> & DividerState;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ToolbarDivider/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './ToolbarDivider';\nexport * from './ToolbarDivider.types';\nexport * from './useToolbarDividerStyles';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ToolbarDivider/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './ToolbarDivider';\nexport * from './ToolbarDivider.types';\nexport * from './useToolbarDividerStyles';\nexport * from './useToolbarDivider';\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useDivider_unstable } from '@fluentui/react-divider';
|
|
2
|
+
import { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';
|
|
3
|
+
/**
|
|
4
|
+
* Create the state required to render ToolbarDivider.
|
|
5
|
+
*
|
|
6
|
+
* The returned state can be modified with hooks such as useToolbarDividerStyles_unstable,
|
|
7
|
+
* before being passed to renderToolbar_unstable.
|
|
8
|
+
*
|
|
9
|
+
* @param props - props from this instance of ToolbarDivider
|
|
10
|
+
* @param ref - reference to root HTMLElement of ToolbarDivider
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const useToolbarDivider_unstable = (props, ref) => {
|
|
14
|
+
const vertical = useToolbarContext_unstable(ctx => ctx.vertical);
|
|
15
|
+
return useDivider_unstable({
|
|
16
|
+
vertical: !vertical,
|
|
17
|
+
...props
|
|
18
|
+
}, ref);
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useToolbarDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/ToolbarDivider/useToolbarDivider.ts"],"names":[],"mappings":"AAEA,SAAS,mBAAT,QAAoC,yBAApC;AACA,SAAS,0BAAT,QAA2C,2BAA3C;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,QAAQ,GAAG,0BAA0B,CAAC,GAAG,IAAI,GAAG,CAAC,QAAZ,CAA3C;EACA,OAAO,mBAAmB,CAAC;IAAE,QAAQ,EAAE,CAAC,QAAb;IAAuB,GAAG;EAA1B,CAAD,EAAoC,GAApC,CAA1B;AACD,CANM","sourcesContent":["import * as React from 'react';\nimport { ToolbarDividerProps, ToolbarDividerState } from './ToolbarDivider.types';\nimport { useDivider_unstable } from '@fluentui/react-divider';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * Create the state required to render ToolbarDivider.\n *\n * The returned state can be modified with hooks such as useToolbarDividerStyles_unstable,\n * before being passed to renderToolbar_unstable.\n *\n * @param props - props from this instance of ToolbarDivider\n * @param ref - reference to root HTMLElement of ToolbarDivider\n */\nexport const useToolbarDivider_unstable = (\n props: ToolbarDividerProps,\n ref: React.Ref<HTMLElement>,\n): ToolbarDividerState => {\n const vertical = useToolbarContext_unstable(ctx => ctx.vertical);\n return useDivider_unstable({ vertical: !vertical, ...props }, ref);\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -5,9 +5,12 @@ const useBaseStyles = /*#__PURE__*/__styles({
|
|
|
5
5
|
"root": {
|
|
6
6
|
"mc9l5x": "ftuwxu6",
|
|
7
7
|
"B2u0y6b": "f1lwjmbk"
|
|
8
|
+
},
|
|
9
|
+
"vertical": {
|
|
10
|
+
"B2u0y6b": "fe668z"
|
|
8
11
|
}
|
|
9
12
|
}, {
|
|
10
|
-
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1lwjmbk{max-width:1px;}"]
|
|
13
|
+
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1lwjmbk{max-width:1px;}", ".fe668z{max-width:initial;}"]
|
|
11
14
|
});
|
|
12
15
|
/**
|
|
13
16
|
* Apply styling to the ToolbarDivider slots based on the state
|
|
@@ -16,8 +19,11 @@ const useBaseStyles = /*#__PURE__*/__styles({
|
|
|
16
19
|
|
|
17
20
|
export const useToolbarDividerStyles_unstable = state => {
|
|
18
21
|
useDividerStyles_unstable(state);
|
|
22
|
+
const {
|
|
23
|
+
vertical
|
|
24
|
+
} = state;
|
|
19
25
|
const toolbarDividerStyles = useBaseStyles();
|
|
20
|
-
state.root.className = mergeClasses(state.root.className, toolbarDividerStyles.root);
|
|
26
|
+
state.root.className = mergeClasses(state.root.className, toolbarDividerStyles.root, !vertical && toolbarDividerStyles.vertical);
|
|
21
27
|
return state;
|
|
22
28
|
};
|
|
23
29
|
//# sourceMappingURL=useToolbarDividerStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarDivider/useToolbarDividerStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,yBAAT,QAA0C,yBAA1C;;AAGA,MAAM,aAAa,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;
|
|
1
|
+
{"version":3,"sources":["components/ToolbarDivider/useToolbarDividerStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,yBAAT,QAA0C,yBAA1C;;AAGA,MAAM,aAAa,gBAAG;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;AAWA;;AAEG;;;AACH,OAAO,MAAM,gCAAgC,GAAI,KAAD,IAAoD;EAClG,yBAAyB,CAAC,KAAD,CAAzB;EACA,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,MAAM,oBAAoB,GAAG,aAAa,EAA1C;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,KAAK,CAAC,IAAN,CAAW,SADsB,EAEjC,oBAAoB,CAAC,IAFY,EAGjC,CAAC,QAAD,IAAa,oBAAoB,CAAC,QAHD,CAAnC;EAKA,OAAO,KAAP;AACD,CAVM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { useDividerStyles_unstable } from '@fluentui/react-divider';\nimport type { ToolbarDividerState } from './ToolbarDivider.types';\n\nconst useBaseStyles = makeStyles({\n // Base styles\n root: {\n display: 'inline-flex',\n maxWidth: '1px',\n },\n vertical: {\n maxWidth: 'initial',\n },\n});\n\n/**\n * Apply styling to the ToolbarDivider slots based on the state\n */\nexport const useToolbarDividerStyles_unstable = (state: ToolbarDividerState): ToolbarDividerState => {\n useDividerStyles_unstable(state);\n const { vertical } = state;\n const toolbarDividerStyles = useBaseStyles();\n state.root.className = mergeClasses(\n state.root.className,\n toolbarDividerStyles.root,\n !vertical && toolbarDividerStyles.vertical,\n );\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useRadio_unstable, renderRadio_unstable } from '@fluentui/react-radio';
|
|
3
3
|
import { useToolbarRadioStyles_unstable } from './useToolbarRadioStyles';
|
|
4
|
-
import {
|
|
4
|
+
import { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';
|
|
5
5
|
/**
|
|
6
6
|
* ToolbarRadio component is a Radio to be used inside Toolbar
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
export const ToolbarRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
-
const
|
|
11
|
-
size
|
|
12
|
-
} = useToolbarContext();
|
|
10
|
+
const size = useToolbarContext_unstable(ctx => ctx.size);
|
|
13
11
|
const state = useRadio_unstable(props, ref);
|
|
14
12
|
useToolbarRadioStyles_unstable({
|
|
15
13
|
size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadio/ToolbarRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,SAAS,iBAAT,EAA4B,oBAA5B,QAAwD,uBAAxD;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,
|
|
1
|
+
{"version":3,"sources":["components/ToolbarRadio/ToolbarRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,SAAS,iBAAT,EAA4B,oBAA5B,QAAwD,uBAAxD;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,0BAAT,QAA2C,2BAA3C;AAEA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAClG,MAAM,IAAI,GAAG,0BAA0B,CAAC,GAAG,IAAI,GAAG,CAAC,IAAZ,CAAvC;EACA,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;EACA,8BAA8B,CAAC;IAAE,IAAF;IAAQ,GAAG;EAAX,CAAD,CAA9B;EACA,OAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALmE,CAA7D;AAOP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport type { ToolbarRadioProps } from './ToolbarRadio.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRadio_unstable, renderRadio_unstable } from '@fluentui/react-radio';\nimport { useToolbarRadioStyles_unstable } from './useToolbarRadioStyles';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * ToolbarRadio component is a Radio to be used inside Toolbar\n */\nexport const ToolbarRadio: ForwardRefComponent<ToolbarRadioProps> = React.forwardRef((props, ref) => {\n const size = useToolbarContext_unstable(ctx => ctx.size);\n const state = useRadio_unstable(props, ref);\n useToolbarRadioStyles_unstable({ size, ...state });\n return renderRadio_unstable(state);\n}) as ForwardRefComponent<ToolbarRadioProps>;\n\nToolbarRadio.displayName = 'ToolbarRadio';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarToggleButton.types.js","sourceRoot":"../src/","sources":["components/ToolbarToggleButton/ToolbarToggleButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport { ToggleButtonProps, ButtonSlots, ToggleButtonState } from '@fluentui/react-button';\n\n/**\n * ToolbarToggleButton Props\n */\nexport type ToolbarToggleButtonProps = ComponentProps<ButtonSlots> &\n Partial<Pick<ToggleButtonProps, 'disabled' | 'disabledFocusable' | 'size'>> & {\n appearance?: 'primary' | 'subtle';\n };\n\n/**\n * State used in rendering ToolbarToggleButton\n */\nexport type ToolbarToggleButtonState = ComponentState<Partial<ButtonSlots>> &\n ToggleButtonState &\n Required<Pick<ToggleButtonProps, 'checked'>>
|
|
1
|
+
{"version":3,"file":"ToolbarToggleButton.types.js","sourceRoot":"../src/","sources":["components/ToolbarToggleButton/ToolbarToggleButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport { ToggleButtonProps, ButtonSlots, ToggleButtonState } from '@fluentui/react-button';\n\n/**\n * ToolbarToggleButton Props\n */\nexport type ToolbarToggleButtonProps = ComponentProps<ButtonSlots> &\n Partial<Pick<ToggleButtonProps, 'disabled' | 'disabledFocusable' | 'size'>> & {\n appearance?: 'primary' | 'subtle';\n name: string;\n value: string;\n };\n\n/**\n * State used in rendering ToolbarToggleButton\n */\nexport type ToolbarToggleButtonState = ComponentState<Partial<ButtonSlots>> &\n ToggleButtonState &\n Required<Pick<ToggleButtonProps, 'checked'>> &\n Pick<ToolbarToggleButtonProps, 'name' | 'value'>;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useToggleButton_unstable } from '@fluentui/react-button';
|
|
2
|
-
import {
|
|
2
|
+
import { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';
|
|
3
3
|
/**
|
|
4
4
|
* Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
|
|
5
5
|
* processed state.
|
|
@@ -8,17 +8,25 @@ import { useToolbarContext } from '../Toolbar/ToolbarContext';
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export const useToolbarToggleButton_unstable = (props, ref) => {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const handleToggleButton = useToolbarContext_unstable(ctx => ctx.handleToggleButton);
|
|
12
|
+
const checked = useToolbarContext_unstable(ctx => {
|
|
13
|
+
var _a;
|
|
14
|
+
|
|
15
|
+
return !!((_a = ctx.checkedValues[props.name]) === null || _a === void 0 ? void 0 : _a.includes(props.value));
|
|
16
|
+
});
|
|
17
|
+
const size = useToolbarContext_unstable(ctx => ctx.size);
|
|
15
18
|
const {
|
|
16
19
|
onClick: onClickOriginal
|
|
17
20
|
} = props;
|
|
18
|
-
const
|
|
21
|
+
const toggleButtonState = useToggleButton_unstable({
|
|
19
22
|
size,
|
|
23
|
+
checked,
|
|
20
24
|
...props
|
|
21
25
|
}, ref);
|
|
26
|
+
const state = { ...toggleButtonState,
|
|
27
|
+
name: props.name,
|
|
28
|
+
value: props.value
|
|
29
|
+
};
|
|
22
30
|
|
|
23
31
|
const handleOnClick = e => {
|
|
24
32
|
if (state.disabled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarToggleButton/useToolbarToggleButton.ts"],"names":[],"mappings":"AACA,SAAS,wBAAT,QAAyC,wBAAzC;AACA,SAAS,
|
|
1
|
+
{"version":3,"sources":["components/ToolbarToggleButton/useToolbarToggleButton.ts"],"names":[],"mappings":"AACA,SAAS,wBAAT,QAAyC,wBAAzC;AACA,SAAS,0BAAT,QAA2C,2BAA3C;AAGA;;;;;AAKG;;AACH,OAAO,MAAM,+BAA+B,GAAG,CAC7C,KAD6C,EAE7C,GAF6C,KAGjB;EAC5B,MAAM,kBAAkB,GAAG,0BAA0B,CAAC,GAAG,IAAI,GAAG,CAAC,kBAAZ,CAArD;EACA,MAAM,OAAO,GAAG,0BAA0B,CAAC,GAAG,IAAG;IAAA,IAAA,EAAA;;IAAC,OAAA,CAAC,EAAC,CAAA,EAAA,GAAA,GAAG,CAAC,aAAJ,CAAkB,KAAK,CAAC,IAAxB,CAAA,MAA6B,IAA7B,IAA6B,EAAA,KAAA,KAAA,CAA7B,GAA6B,KAAA,CAA7B,GAA6B,EAAA,CAAE,QAAF,CAAW,KAAK,CAAC,KAAjB,CAA9B,CAAD;EAAsD,CAA9D,CAA1C;EACA,MAAM,IAAI,GAAG,0BAA0B,CAAC,GAAG,IAAI,GAAG,CAAC,IAAZ,CAAvC;EAEA,MAAM;IAAE,OAAO,EAAE;EAAX,IAA+B,KAArC;EACA,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;IAAE,IAAF;IAAQ,OAAR;IAAiB,GAAG;EAApB,CAAD,EAA8B,GAA9B,CAAlD;EACA,MAAM,KAAK,GAA6B,EACtC,GAAG,iBADmC;IAEtC,IAAI,EAAE,KAAK,CAAC,IAF0B;IAGtC,KAAK,EAAE,KAAK,CAAC;EAHyB,CAAxC;;EAMA,MAAM,aAAa,GACjB,CADoB,IAElB;IACF,IAAI,KAAK,CAAC,QAAV,EAAoB;MAClB,CAAC,CAAC,cAAF;MACA,CAAC,CAAC,eAAF;MACA;IACD;;IAED,kBAAkB,KAAA,IAAlB,IAAA,kBAAkB,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAA,kBAAkB,CAAG,CAAH,EAAM,KAAK,CAAC,IAAZ,EAAkB,KAAK,CAAC,KAAxB,EAA+B,KAAK,CAAC,OAArC,CAAlB;IACA,eAAe,KAAA,IAAf,IAAA,eAAe,KAAA,KAAA,CAAf,GAAe,KAAA,CAAf,GAAA,eAAe,CAAG,CAAH,CAAf;EACD,CAXD;;EAaA,KAAK,CAAC,IAAN,CAAW,OAAX,GAAqB,aAArB;EACA,OAAO,KAAP;AACD,CA/BM","sourcesContent":["import * as React from 'react';\nimport { useToggleButton_unstable } from '@fluentui/react-button';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\nimport { ToolbarToggleButtonProps, ToolbarToggleButtonState } from './ToolbarToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToolbarToggleButton_unstable = (\n props: ToolbarToggleButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToolbarToggleButtonState => {\n const handleToggleButton = useToolbarContext_unstable(ctx => ctx.handleToggleButton);\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({ size, checked, ...props }, ref);\n const state: ToolbarToggleButtonState = {\n ...toggleButtonState,\n name: props.name,\n value: props.value,\n };\n\n const handleOnClick = (\n e: React.MouseEvent<HTMLButtonElement, MouseEvent> & React.MouseEvent<HTMLAnchorElement, MouseEvent>,\n ) => {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n handleToggleButton?.(e, state.name, state.value, state.checked);\n onClickOriginal?.(e);\n };\n\n state.root.onClick = handleOnClick;\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -3,21 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useToolbarContext_unstable = exports.ToolbarContext = void 0;
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
|
|
9
9
|
|
|
10
|
-
exports.ToolbarContext = /*#__PURE__*/
|
|
10
|
+
exports.ToolbarContext = /*#__PURE__*/react_context_selector_1.createContext(undefined);
|
|
11
11
|
const toolbarContextDefaultValue = {
|
|
12
12
|
size: 'medium',
|
|
13
|
-
handleToggleButton: () => null
|
|
13
|
+
handleToggleButton: () => null,
|
|
14
|
+
vertical: false,
|
|
15
|
+
checkedValues: {}
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
const
|
|
17
|
-
var _a;
|
|
18
|
+
const useToolbarContext_unstable = selector => react_context_selector_1.useContextSelector(exports.ToolbarContext, (ctx = toolbarContextDefaultValue) => selector(ctx));
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
exports.useToolbarContext = useToolbarContext;
|
|
20
|
+
exports.useToolbarContext_unstable = useToolbarContext_unstable;
|
|
23
21
|
//# sourceMappingURL=ToolbarContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/ToolbarContext.
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/ToolbarContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAAiB,wBAAA,CAAA,aAAA,CAA+C,SAA/C,CAAjB;AAEb,MAAM,0BAA0B,GAAwB;EACtD,IAAI,EAAE,QADgD;EAEtD,kBAAkB,EAAE,MAAM,IAF4B;EAGtD,QAAQ,EAAE,KAH4C;EAItD,aAAa,EAAE;AAJuC,CAAxD;;AAOO,MAAM,0BAA0B,GAAO,QAAJ,IACxC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,cAAnB,EAAmC,CAAC,GAAG,GAAG,0BAAP,KAAsC,QAAQ,CAAC,GAAD,CAAjF,CADK;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","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 vertical: false,\n checkedValues: {},\n};\n\nexport const useToolbarContext_unstable = <T>(selector: ContextSelector<ToolbarContextValue, T>): T =>\n useContextSelector(ToolbarContext, (ctx = toolbarContextDefaultValue) => selector(ctx));\n"],"sourceRoot":"../src/"}
|
|
@@ -23,7 +23,8 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
|
|
23
23
|
|
|
24
24
|
const useToolbar_unstable = (props, ref) => {
|
|
25
25
|
const {
|
|
26
|
-
size = 'medium'
|
|
26
|
+
size = 'medium',
|
|
27
|
+
vertical = false
|
|
27
28
|
} = props;
|
|
28
29
|
const arrowNavigationProps = react_tabster_1.useArrowNavigationGroup({
|
|
29
30
|
circular: true,
|
|
@@ -31,6 +32,7 @@ const useToolbar_unstable = (props, ref) => {
|
|
|
31
32
|
});
|
|
32
33
|
const initialState = {
|
|
33
34
|
size,
|
|
35
|
+
vertical,
|
|
34
36
|
// TODO add appropriate props/defaults
|
|
35
37
|
components: {
|
|
36
38
|
// TODO add each slot's element type or component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/useToolbar.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;EACpG,MAAM;IAAE,IAAI,GAAG;
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/useToolbar.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;EACpG,MAAM;IAAE,IAAI,GAAG,QAAT;IAAmB,QAAQ,GAAG;EAA9B,IAAwC,KAA9C;EAEA,MAAM,oBAAoB,GAAG,eAAA,CAAA,uBAAA,CAAwB;IACnD,QAAQ,EAAE,IADyC;IAEnD,IAAI,EAAE;EAF6C,CAAxB,CAA7B;EAKA,MAAM,YAAY,GAA8B;IAC9C,IAD8C;IAE9C,QAF8C;IAG9C;IACA,UAAU,EAAE;MACV;MACA,IAAI,EAAE;IAFI,CAJkC;IAQ9C;IACA;IACA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,IAAI,EAAE,SAD2B;MAEjC,GAFiC;MAGjC,GAAG,oBAH8B;MAIjC,GAAG;IAJ8B,CAA7B;EAVwC,CAAhD;EAkBA,MAAM,CAAC,aAAD,EAAgB,gBAAhB,IAAoC,iBAAA,CAAA,oBAAA,CAAqB;IAC7D,KAAK,EAAE,YAAY,CAAC,aADyC;IAE7D,YAAY,EAAE,YAAY,CAAC,oBAFkC;IAG7D,YAAY,EAAE;EAH+C,CAArB,CAA1C;EAMA,MAAM;IAAE;EAAF,IAA2B,YAAjC;EAEA,MAAM,kBAAkB,GAAoB,iBAAA,CAAA,gBAAA,CAC1C,CAAC,CAAD,EAA4C,IAA5C,EAA2D,KAA3D,EAA2E,OAA3E,KAAgG;IAC9F,IAAI,IAAI,IAAI,KAAZ,EAAmB;MACjB,MAAM,YAAY,GAAG,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAG,IAAH,CAAb,KAAyB,EAA9C;MACA,MAAM,eAAe,GAAG,CAAC,GAAG,YAAJ,CAAxB;;MACA,IAAI,OAAJ,EAAa;QACX,eAAe,CAAC,MAAhB,CAAuB,eAAe,CAAC,OAAhB,CAAwB,KAAxB,CAAvB,EAAuD,CAAvD;MACD,CAFD,MAEO;QACL,eAAe,CAAC,IAAhB,CAAqB,KAArB;MACD;;MAED,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,EAAM;QAAE,IAAF;QAAQ,YAAY,EAAE;MAAtB,CAAN,CAApB;MACA,gBAAgB,CAAC,CAAC,KAAK,EAAE,GAAG,CAAL;QAAQ,CAAC,IAAD,GAAQ;MAAhB,CAAL,CAAF,CAAhB;IACD;EACF,CAdyC,CAA5C;EAiBA,OAAO,EACL,GAAG,YADE;IAEL,kBAFK;IAGL,aAAa,EAAE,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAA,aAAA,GAAiB;EAH3B,CAAP;AAKD,CAxDM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","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: 'horizontal',\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 ...arrowNavigationProps,\n ...props,\n }),\n };\n\n const [checkedValues, setCheckedValues] = useControllableState({\n state: initialState.checkedValues,\n defaultState: initialState.defaultCheckedValues,\n initialState: {},\n });\n\n const { onCheckedValueChange } = initialState;\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\n onCheckedValueChange?.(e, { name, checkedItems: newCheckedItems });\n setCheckedValues(s => ({ ...s, [name]: newCheckedItems }));\n }\n },\n );\n\n return {\n ...initialState,\n handleToggleButton,\n checkedValues: checkedValues ?? {},\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -8,12 +8,16 @@ exports.useToolbarContextValues_unstable = void 0;
|
|
|
8
8
|
function useToolbarContextValues_unstable(state) {
|
|
9
9
|
const {
|
|
10
10
|
size,
|
|
11
|
-
handleToggleButton
|
|
11
|
+
handleToggleButton,
|
|
12
|
+
vertical,
|
|
13
|
+
checkedValues
|
|
12
14
|
} = state; // This context is created with "@fluentui/react-context-selector", these is no sense to memoize it
|
|
13
15
|
|
|
14
16
|
const toolbar = {
|
|
15
17
|
size,
|
|
16
|
-
|
|
18
|
+
vertical,
|
|
19
|
+
handleToggleButton,
|
|
20
|
+
checkedValues
|
|
17
21
|
};
|
|
18
22
|
return {
|
|
19
23
|
toolbar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/useToolbarContextValues.tsx"],"names":[],"mappings":";;;;;;;AAEA,SAAgB,gCAAhB,CAAiD,KAAjD,EAAoE;EAClE,MAAM;IAAE,IAAF;IAAQ;
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/useToolbarContextValues.tsx"],"names":[],"mappings":";;;;;;;AAEA,SAAgB,gCAAhB,CAAiD,KAAjD,EAAoE;EAClE,MAAM;IAAE,IAAF;IAAQ,kBAAR;IAA4B,QAA5B;IAAsC;EAAtC,IAAwD,KAA9D,CADkE,CAElE;;EACA,MAAM,OAAO,GAAwB;IACnC,IADmC;IAEnC,QAFmC;IAGnC,kBAHmC;IAInC;EAJmC,CAArC;EAOA,OAAO;IAAE;EAAF,CAAP;AACD;;AAXD,OAAA,CAAA,gCAAA,GAAA,gCAAA","sourcesContent":["import type { ToolbarContextValue, ToolbarContextValues, ToolbarState } from './Toolbar.types';\n\nexport function useToolbarContextValues_unstable(state: ToolbarState): ToolbarContextValues {\n const { size, handleToggleButton, vertical, checkedValues } = 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 checkedValues,\n };\n\n return { toolbar };\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -17,11 +17,19 @@ exports.toolbarClassNames = {
|
|
|
17
17
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
18
18
|
"root": {
|
|
19
19
|
"mc9l5x": "f22iagw",
|
|
20
|
+
"z8tnut": "f10ra9hq",
|
|
21
|
+
"z189sj": ["f19lj068", "f177v4lu"],
|
|
22
|
+
"Byoj8tv": "f1y2xyjm",
|
|
23
|
+
"uwmqm3": ["f177v4lu", "f19lj068"],
|
|
20
24
|
"i8kkvl": "f4px1ci",
|
|
21
25
|
"Belr9w4": "fn67r4l"
|
|
26
|
+
},
|
|
27
|
+
"vertical": {
|
|
28
|
+
"Beiy3e4": "f1vx9l62",
|
|
29
|
+
"a9b677": "f1acs6jw"
|
|
22
30
|
}
|
|
23
31
|
}, {
|
|
24
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}"]
|
|
32
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10ra9hq{padding-top:4px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1y2xyjm{padding-bottom:4px;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1acs6jw{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}"]
|
|
25
33
|
});
|
|
26
34
|
/**
|
|
27
35
|
* Apply styling to the Toolbar slots based on the state
|
|
@@ -30,7 +38,10 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
30
38
|
|
|
31
39
|
const useToolbarStyles_unstable = state => {
|
|
32
40
|
const styles = useStyles();
|
|
33
|
-
|
|
41
|
+
const {
|
|
42
|
+
vertical
|
|
43
|
+
} = state;
|
|
44
|
+
state.root.className = react_1.mergeClasses(exports.toolbarClassNames.root, styles.root, vertical && styles.vertical, state.root.className);
|
|
34
45
|
return state;
|
|
35
46
|
};
|
|
36
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Toolbar/useToolbarStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,iBAAA,GAAkD;EAC7D,IAAI,EAAE;AADuD,CAAlD;AAIb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;
|
|
1
|
+
{"version":3,"sources":["components/Toolbar/useToolbarStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,iBAAA,GAAkD;EAC7D,IAAI,EAAE;AADuD,CAAlD;AAIb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAYA;;AAEG;;;AACI,MAAM,yBAAyB,GAAI,KAAD,IAAsC;EAC7E,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,iBAAA,CAAkB,IADG,EAErB,MAAM,CAAC,IAFc,EAGrB,QAAQ,IAAI,MAAM,CAAC,QAHE,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAOA,OAAO,KAAP;AACD,CAXM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { ToolbarSlots, ToolbarState } from './Toolbar.types';\n\nexport const toolbarClassNames: SlotClassNames<ToolbarSlots> = {\n root: 'fui-Toolbar',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.padding('4px', '8px', '4px', '8px'),\n ...shorthands.gap('8px'),\n },\n vertical: {\n flexDirection: 'column',\n width: 'fit-content',\n },\n});\n\n/**\n * Apply styling to the Toolbar slots based on the state\n */\nexport const useToolbarStyles_unstable = (state: ToolbarState): ToolbarState => {\n const styles = useStyles();\n const { vertical } = state;\n state.root.className = mergeClasses(\n toolbarClassNames.root,\n styles.root,\n vertical && styles.vertical,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -17,9 +17,7 @@ const ToolbarContext_1 = /*#__PURE__*/require("../Toolbar/ToolbarContext");
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
exports.ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
20
|
-
const
|
|
21
|
-
size
|
|
22
|
-
} = ToolbarContext_1.useToolbarContext();
|
|
20
|
+
const size = ToolbarContext_1.useToolbarContext_unstable(ctx => ctx.size);
|
|
23
21
|
const state = react_button_1.useButton_unstable({
|
|
24
22
|
size,
|
|
25
23
|
appearance: 'transparent',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarButton/ToolbarButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;AAGG;;;AACU,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM
|
|
1
|
+
{"version":3,"sources":["components/ToolbarButton/ToolbarButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;AAGG;;;AACU,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM,IAAI,GAAG,gBAAA,CAAA,0BAAA,CAA2B,GAAG,IAAI,GAAG,CAAC,IAAtC,CAAb;EACA,MAAM,KAAK,GAAG,cAAA,CAAA,kBAAA,CAAmB;IAAE,IAAF;IAAQ,UAAU,EAAE,aAApB;IAAmC,GAAG;EAAtC,CAAnB,EAAkE,GAAlE,CAAd;EACA,cAAA,CAAA,wBAAA,CAAyB,KAAzB;EACA,OAAO,cAAA,CAAA,qBAAA,CAAsB,KAAtB,CAAP,CAJoG,CAKpG;AACD,CANqE,CAAzD;AAQb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport type { ToolbarButtonProps } from './ToolbarButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from '@fluentui/react-button';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * ToolbarButton component is a Button to be used inside Toolbar\n * which will respect toolbar props such as `size`\n */\nexport const ToolbarButton: ForwardRefComponent<ToolbarButtonProps> = React.forwardRef((props, ref) => {\n const size = useToolbarContext_unstable(ctx => ctx.size);\n const state = useButton_unstable({ size, appearance: 'transparent', ...props }, ref);\n useButtonStyles_unstable(state);\n return renderButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToolbarButtonProps>;\n\nToolbarButton.displayName = 'ToolbarButton';\n"],"sourceRoot":"../src/"}
|
|
@@ -10,16 +10,15 @@ const React = /*#__PURE__*/require("react");
|
|
|
10
10
|
const useToolbarDividerStyles_1 = /*#__PURE__*/require("./useToolbarDividerStyles");
|
|
11
11
|
|
|
12
12
|
const react_divider_1 = /*#__PURE__*/require("@fluentui/react-divider");
|
|
13
|
+
|
|
14
|
+
const useToolbarDivider_1 = /*#__PURE__*/require("./useToolbarDivider");
|
|
13
15
|
/**
|
|
14
16
|
* ToolbarDivider component
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
exports.ToolbarDivider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
19
|
-
const state =
|
|
20
|
-
vertical: true,
|
|
21
|
-
...props
|
|
22
|
-
}, ref);
|
|
21
|
+
const state = useToolbarDivider_1.useToolbarDivider_unstable(props, ref);
|
|
23
22
|
useToolbarDividerStyles_1.useToolbarDividerStyles_unstable(state);
|
|
24
23
|
return react_divider_1.renderDivider_unstable(state);
|
|
25
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarDivider/ToolbarDivider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtG,MAAM,KAAK,GAAG,
|
|
1
|
+
{"version":3,"sources":["components/ToolbarDivider/ToolbarDivider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtG,MAAM,KAAK,GAAG,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,EAAkC,GAAlC,CAAd;EACA,yBAAA,CAAA,gCAAA,CAAiC,KAAjC;EACA,OAAO,eAAA,CAAA,sBAAA,CAAuB,KAAvB,CAAP;AACD,CAJuE,CAA3D;AAMb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { useToolbarDividerStyles_unstable } from './useToolbarDividerStyles';\nimport type { ToolbarDividerProps } from './ToolbarDivider.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderDivider_unstable } from '@fluentui/react-divider';\nimport { useToolbarDivider_unstable } from './useToolbarDivider';\n\n/**\n * ToolbarDivider component\n */\nexport const ToolbarDivider: ForwardRefComponent<ToolbarDividerProps> = React.forwardRef((props, ref) => {\n const state = useToolbarDivider_unstable(props, ref);\n useToolbarDividerStyles_unstable(state);\n return renderDivider_unstable(state);\n});\n\nToolbarDivider.displayName = 'ToolbarDivider';\n"],"sourceRoot":"../src/"}
|
|
@@ -11,4 +11,6 @@ tslib_1.__exportStar(require("./ToolbarDivider"), exports);
|
|
|
11
11
|
tslib_1.__exportStar(require("./ToolbarDivider.types"), exports);
|
|
12
12
|
|
|
13
13
|
tslib_1.__exportStar(require("./useToolbarDividerStyles"), exports);
|
|
14
|
+
|
|
15
|
+
tslib_1.__exportStar(require("./useToolbarDivider"), exports);
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarDivider/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './ToolbarDivider';\nexport * from './ToolbarDivider.types';\nexport * from './useToolbarDividerStyles';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["components/ToolbarDivider/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './ToolbarDivider';\nexport * from './ToolbarDivider.types';\nexport * from './useToolbarDividerStyles';\nexport * from './useToolbarDivider';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useToolbarDivider_unstable = void 0;
|
|
7
|
+
|
|
8
|
+
const react_divider_1 = /*#__PURE__*/require("@fluentui/react-divider");
|
|
9
|
+
|
|
10
|
+
const ToolbarContext_1 = /*#__PURE__*/require("../Toolbar/ToolbarContext");
|
|
11
|
+
/**
|
|
12
|
+
* Create the state required to render ToolbarDivider.
|
|
13
|
+
*
|
|
14
|
+
* The returned state can be modified with hooks such as useToolbarDividerStyles_unstable,
|
|
15
|
+
* before being passed to renderToolbar_unstable.
|
|
16
|
+
*
|
|
17
|
+
* @param props - props from this instance of ToolbarDivider
|
|
18
|
+
* @param ref - reference to root HTMLElement of ToolbarDivider
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const useToolbarDivider_unstable = (props, ref) => {
|
|
23
|
+
const vertical = ToolbarContext_1.useToolbarContext_unstable(ctx => ctx.vertical);
|
|
24
|
+
return react_divider_1.useDivider_unstable({
|
|
25
|
+
vertical: !vertical,
|
|
26
|
+
...props
|
|
27
|
+
}, ref);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.useToolbarDivider_unstable = useToolbarDivider_unstable;
|
|
31
|
+
//# sourceMappingURL=useToolbarDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/ToolbarDivider/useToolbarDivider.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,QAAQ,GAAG,gBAAA,CAAA,0BAAA,CAA2B,GAAG,IAAI,GAAG,CAAC,QAAtC,CAAjB;EACA,OAAO,eAAA,CAAA,mBAAA,CAAoB;IAAE,QAAQ,EAAE,CAAC,QAAb;IAAuB,GAAG;EAA1B,CAApB,EAAuD,GAAvD,CAAP;AACD,CANM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { ToolbarDividerProps, ToolbarDividerState } from './ToolbarDivider.types';\nimport { useDivider_unstable } from '@fluentui/react-divider';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * Create the state required to render ToolbarDivider.\n *\n * The returned state can be modified with hooks such as useToolbarDividerStyles_unstable,\n * before being passed to renderToolbar_unstable.\n *\n * @param props - props from this instance of ToolbarDivider\n * @param ref - reference to root HTMLElement of ToolbarDivider\n */\nexport const useToolbarDivider_unstable = (\n props: ToolbarDividerProps,\n ref: React.Ref<HTMLElement>,\n): ToolbarDividerState => {\n const vertical = useToolbarContext_unstable(ctx => ctx.vertical);\n return useDivider_unstable({ vertical: !vertical, ...props }, ref);\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -13,9 +13,12 @@ const useBaseStyles = /*#__PURE__*/react_1.__styles({
|
|
|
13
13
|
"root": {
|
|
14
14
|
"mc9l5x": "ftuwxu6",
|
|
15
15
|
"B2u0y6b": "f1lwjmbk"
|
|
16
|
+
},
|
|
17
|
+
"vertical": {
|
|
18
|
+
"B2u0y6b": "fe668z"
|
|
16
19
|
}
|
|
17
20
|
}, {
|
|
18
|
-
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1lwjmbk{max-width:1px;}"]
|
|
21
|
+
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1lwjmbk{max-width:1px;}", ".fe668z{max-width:initial;}"]
|
|
19
22
|
});
|
|
20
23
|
/**
|
|
21
24
|
* Apply styling to the ToolbarDivider slots based on the state
|
|
@@ -24,8 +27,11 @@ const useBaseStyles = /*#__PURE__*/react_1.__styles({
|
|
|
24
27
|
|
|
25
28
|
const useToolbarDividerStyles_unstable = state => {
|
|
26
29
|
react_divider_1.useDividerStyles_unstable(state);
|
|
30
|
+
const {
|
|
31
|
+
vertical
|
|
32
|
+
} = state;
|
|
27
33
|
const toolbarDividerStyles = useBaseStyles();
|
|
28
|
-
state.root.className = react_1.mergeClasses(state.root.className, toolbarDividerStyles.root);
|
|
34
|
+
state.root.className = react_1.mergeClasses(state.root.className, toolbarDividerStyles.root, !vertical && toolbarDividerStyles.vertical);
|
|
29
35
|
return state;
|
|
30
36
|
};
|
|
31
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarDivider/useToolbarDividerStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGA,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;
|
|
1
|
+
{"version":3,"sources":["components/ToolbarDivider/useToolbarDividerStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGA,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;AAWA;;AAEG;;;AACI,MAAM,gCAAgC,GAAI,KAAD,IAAoD;EAClG,eAAA,CAAA,yBAAA,CAA0B,KAA1B;EACA,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,MAAM,oBAAoB,GAAG,aAAa,EAA1C;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,KAAK,CAAC,IAAN,CAAW,SADU,EAErB,oBAAoB,CAAC,IAFA,EAGrB,CAAC,QAAD,IAAa,oBAAoB,CAAC,QAHb,CAAvB;EAKA,OAAO,KAAP;AACD,CAVM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { useDividerStyles_unstable } from '@fluentui/react-divider';\nimport type { ToolbarDividerState } from './ToolbarDivider.types';\n\nconst useBaseStyles = makeStyles({\n // Base styles\n root: {\n display: 'inline-flex',\n maxWidth: '1px',\n },\n vertical: {\n maxWidth: 'initial',\n },\n});\n\n/**\n * Apply styling to the ToolbarDivider slots based on the state\n */\nexport const useToolbarDividerStyles_unstable = (state: ToolbarDividerState): ToolbarDividerState => {\n useDividerStyles_unstable(state);\n const { vertical } = state;\n const toolbarDividerStyles = useBaseStyles();\n state.root.className = mergeClasses(\n state.root.className,\n toolbarDividerStyles.root,\n !vertical && toolbarDividerStyles.vertical,\n );\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -18,9 +18,7 @@ const ToolbarContext_1 = /*#__PURE__*/require("../Toolbar/ToolbarContext");
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
exports.ToolbarRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
|
-
const
|
|
22
|
-
size
|
|
23
|
-
} = ToolbarContext_1.useToolbarContext();
|
|
21
|
+
const size = ToolbarContext_1.useToolbarContext_unstable(ctx => ctx.size);
|
|
24
22
|
const state = react_radio_1.useRadio_unstable(props, ref);
|
|
25
23
|
useToolbarRadioStyles_1.useToolbarRadioStyles_unstable({
|
|
26
24
|
size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadio/ToolbarRadio.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAClG,MAAM
|
|
1
|
+
{"version":3,"sources":["components/ToolbarRadio/ToolbarRadio.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAClG,MAAM,IAAI,GAAG,gBAAA,CAAA,0BAAA,CAA2B,GAAG,IAAI,GAAG,CAAC,IAAtC,CAAb;EACA,MAAM,KAAK,GAAG,aAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;EACA,uBAAA,CAAA,8BAAA,CAA+B;IAAE,IAAF;IAAQ,GAAG;EAAX,CAA/B;EACA,OAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALmE,CAAvD;AAOb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport type { ToolbarRadioProps } from './ToolbarRadio.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRadio_unstable, renderRadio_unstable } from '@fluentui/react-radio';\nimport { useToolbarRadioStyles_unstable } from './useToolbarRadioStyles';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * ToolbarRadio component is a Radio to be used inside Toolbar\n */\nexport const ToolbarRadio: ForwardRefComponent<ToolbarRadioProps> = React.forwardRef((props, ref) => {\n const size = useToolbarContext_unstable(ctx => ctx.size);\n const state = useRadio_unstable(props, ref);\n useToolbarRadioStyles_unstable({ size, ...state });\n return renderRadio_unstable(state);\n}) as ForwardRefComponent<ToolbarRadioProps>;\n\nToolbarRadio.displayName = 'ToolbarRadio';\n"],"sourceRoot":"../src/"}
|
|
@@ -17,17 +17,25 @@ const ToolbarContext_1 = /*#__PURE__*/require("../Toolbar/ToolbarContext");
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
const useToolbarToggleButton_unstable = (props, ref) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const handleToggleButton = ToolbarContext_1.useToolbarContext_unstable(ctx => ctx.handleToggleButton);
|
|
21
|
+
const checked = ToolbarContext_1.useToolbarContext_unstable(ctx => {
|
|
22
|
+
var _a;
|
|
23
|
+
|
|
24
|
+
return !!((_a = ctx.checkedValues[props.name]) === null || _a === void 0 ? void 0 : _a.includes(props.value));
|
|
25
|
+
});
|
|
26
|
+
const size = ToolbarContext_1.useToolbarContext_unstable(ctx => ctx.size);
|
|
24
27
|
const {
|
|
25
28
|
onClick: onClickOriginal
|
|
26
29
|
} = props;
|
|
27
|
-
const
|
|
30
|
+
const toggleButtonState = react_button_1.useToggleButton_unstable({
|
|
28
31
|
size,
|
|
32
|
+
checked,
|
|
29
33
|
...props
|
|
30
34
|
}, ref);
|
|
35
|
+
const state = { ...toggleButtonState,
|
|
36
|
+
name: props.name,
|
|
37
|
+
value: props.value
|
|
38
|
+
};
|
|
31
39
|
|
|
32
40
|
const handleOnClick = e => {
|
|
33
41
|
if (state.disabled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarToggleButton/useToolbarToggleButton.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;AAKG;;;AACI,MAAM,+BAA+B,GAAG,CAC7C,KAD6C,EAE7C,GAF6C,KAGjB;EAC5B,MAAM;
|
|
1
|
+
{"version":3,"sources":["components/ToolbarToggleButton/useToolbarToggleButton.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;AAKG;;;AACI,MAAM,+BAA+B,GAAG,CAC7C,KAD6C,EAE7C,GAF6C,KAGjB;EAC5B,MAAM,kBAAkB,GAAG,gBAAA,CAAA,0BAAA,CAA2B,GAAG,IAAI,GAAG,CAAC,kBAAtC,CAA3B;EACA,MAAM,OAAO,GAAG,gBAAA,CAAA,0BAAA,CAA2B,GAAG,IAAG;IAAA,IAAA,EAAA;;IAAC,OAAA,CAAC,EAAC,CAAA,EAAA,GAAA,GAAG,CAAC,aAAJ,CAAkB,KAAK,CAAC,IAAxB,CAAA,MAA6B,IAA7B,IAA6B,EAAA,KAAA,KAAA,CAA7B,GAA6B,KAAA,CAA7B,GAA6B,EAAA,CAAE,QAAF,CAAW,KAAK,CAAC,KAAjB,CAA9B,CAAD;EAAsD,CAAxF,CAAhB;EACA,MAAM,IAAI,GAAG,gBAAA,CAAA,0BAAA,CAA2B,GAAG,IAAI,GAAG,CAAC,IAAtC,CAAb;EAEA,MAAM;IAAE,OAAO,EAAE;EAAX,IAA+B,KAArC;EACA,MAAM,iBAAiB,GAAG,cAAA,CAAA,wBAAA,CAAyB;IAAE,IAAF;IAAQ,OAAR;IAAiB,GAAG;EAApB,CAAzB,EAAsD,GAAtD,CAA1B;EACA,MAAM,KAAK,GAA6B,EACtC,GAAG,iBADmC;IAEtC,IAAI,EAAE,KAAK,CAAC,IAF0B;IAGtC,KAAK,EAAE,KAAK,CAAC;EAHyB,CAAxC;;EAMA,MAAM,aAAa,GACjB,CADoB,IAElB;IACF,IAAI,KAAK,CAAC,QAAV,EAAoB;MAClB,CAAC,CAAC,cAAF;MACA,CAAC,CAAC,eAAF;MACA;IACD;;IAED,kBAAkB,KAAA,IAAlB,IAAA,kBAAkB,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAA,kBAAkB,CAAG,CAAH,EAAM,KAAK,CAAC,IAAZ,EAAkB,KAAK,CAAC,KAAxB,EAA+B,KAAK,CAAC,OAArC,CAAlB;IACA,eAAe,KAAA,IAAf,IAAA,eAAe,KAAA,KAAA,CAAf,GAAe,KAAA,CAAf,GAAA,eAAe,CAAG,CAAH,CAAf;EACD,CAXD;;EAaA,KAAK,CAAC,IAAN,CAAW,OAAX,GAAqB,aAArB;EACA,OAAO,KAAP;AACD,CA/BM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import * as React from 'react';\nimport { useToggleButton_unstable } from '@fluentui/react-button';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\nimport { ToolbarToggleButtonProps, ToolbarToggleButtonState } from './ToolbarToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToolbarToggleButton_unstable = (\n props: ToolbarToggleButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToolbarToggleButtonState => {\n const handleToggleButton = useToolbarContext_unstable(ctx => ctx.handleToggleButton);\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({ size, checked, ...props }, ref);\n const state: ToolbarToggleButtonState = {\n ...toggleButtonState,\n name: props.name,\n value: props.value,\n };\n\n const handleOnClick = (\n e: React.MouseEvent<HTMLButtonElement, MouseEvent> & React.MouseEvent<HTMLAnchorElement, MouseEvent>,\n ) => {\n if (state.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n handleToggleButton?.(e, state.name, state.value, state.checked);\n onClickOriginal?.(e);\n };\n\n state.root.onClick = handleOnClick;\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-toolbar",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.9",
|
|
4
4
|
"description": "React components for building web experiences",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -29,17 +29,18 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
|
31
31
|
"@fluentui/react-conformance": "*",
|
|
32
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.15",
|
|
33
33
|
"@fluentui/scripts": "^1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-button": "^9.1.
|
|
37
|
-
"@fluentui/react-divider": "^9.1.
|
|
36
|
+
"@fluentui/react-button": "^9.1.4",
|
|
37
|
+
"@fluentui/react-divider": "^9.1.1",
|
|
38
38
|
"@fluentui/react-theme": "^9.1.0",
|
|
39
|
-
"@fluentui/react-utilities": "^9.1.
|
|
40
|
-
"@fluentui/react-
|
|
41
|
-
"@fluentui/react-
|
|
42
|
-
"@
|
|
39
|
+
"@fluentui/react-utilities": "^9.1.1",
|
|
40
|
+
"@fluentui/react-context-selector": "^9.0.4",
|
|
41
|
+
"@fluentui/react-radio": "^9.0.8",
|
|
42
|
+
"@fluentui/react-tabster": "^9.1.3",
|
|
43
|
+
"@griffel/react": "^1.4.0",
|
|
43
44
|
"tslib": "^2.1.0"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|