@fluentui/react-tree 9.0.0-beta.21 → 9.0.0-beta.23
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 +141 -1
- package/CHANGELOG.md +36 -2
- package/dist/index.d.ts +9 -3
- package/lib/components/Tree/useTreeStyles.styles.js +1 -1
- package/lib/components/TreeItem/index.js +1 -0
- package/lib/components/TreeItem/index.js.map +1 -1
- package/lib/components/TreeItemLayout/TreeItemLayout.types.js.map +1 -1
- package/lib/components/TreeItemLayout/renderTreeItemLayout.js +1 -1
- package/lib/components/TreeItemLayout/renderTreeItemLayout.js.map +1 -1
- package/lib/components/TreeItemLayout/useTreeItemLayout.js +5 -1
- package/lib/components/TreeItemLayout/useTreeItemLayout.js.map +1 -1
- package/lib/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js +63 -24
- package/lib/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js.map +1 -1
- package/lib/components/TreeItemPersonaLayout/TreeItemPersonaLayout.types.js.map +1 -1
- package/lib/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js +1 -1
- package/lib/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js.map +1 -1
- package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js +3 -3
- package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js.map +1 -1
- package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js +17 -17
- package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Tree/useTreeStyles.styles.js +4 -4
- package/lib-commonjs/components/Tree/useTreeStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TreeItem/index.js +1 -0
- package/lib-commonjs/components/TreeItem/index.js.map +1 -1
- package/lib-commonjs/components/TreeItemLayout/renderTreeItemLayout.js +1 -1
- package/lib-commonjs/components/TreeItemLayout/renderTreeItemLayout.js.map +1 -1
- package/lib-commonjs/components/TreeItemLayout/useTreeItemLayout.js +5 -1
- package/lib-commonjs/components/TreeItemLayout/useTreeItemLayout.js.map +1 -1
- package/lib-commonjs/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js +108 -41
- package/lib-commonjs/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js +1 -1
- package/lib-commonjs/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js.map +1 -1
- package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js +3 -3
- package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js.map +1 -1
- package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js +38 -38
- package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,147 @@
|
|
|
2
2
|
"name": "@fluentui/react-tree",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 03 Jul 2023 11:54:01 GMT",
|
|
6
|
+
"tag": "@fluentui/react-tree_v9.0.0-beta.23",
|
|
7
|
+
"version": "9.0.0-beta.23",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui/react-tree",
|
|
13
|
+
"comment": "Bump @fluentui/react-aria to v9.3.26",
|
|
14
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-tree",
|
|
19
|
+
"comment": "Bump @fluentui/react-avatar to v9.5.10",
|
|
20
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-tree",
|
|
25
|
+
"comment": "Bump @fluentui/react-button to v9.3.21",
|
|
26
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-tree",
|
|
31
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.26",
|
|
32
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-tree",
|
|
37
|
+
"comment": "Bump @fluentui/react-portal to v9.3.0",
|
|
38
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-tree",
|
|
43
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.6.0",
|
|
44
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-tree",
|
|
49
|
+
"comment": "Bump @fluentui/react-tabster to v9.9.2",
|
|
50
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui/react-tree",
|
|
55
|
+
"comment": "Bump @fluentui/react-utilities to v9.10.1",
|
|
56
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@fluentui/react-tree",
|
|
61
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.10",
|
|
62
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"date": "Wed, 28 Jun 2023 11:12:35 GMT",
|
|
69
|
+
"tag": "@fluentui/react-tree_v9.0.0-beta.22",
|
|
70
|
+
"version": "9.0.0-beta.22",
|
|
71
|
+
"comments": {
|
|
72
|
+
"none": [
|
|
73
|
+
{
|
|
74
|
+
"author": "martinhochel@microsoft.com",
|
|
75
|
+
"package": "@fluentui/react-tree",
|
|
76
|
+
"commit": "fbe878e9c9785588197481f172c42c2c0a230292",
|
|
77
|
+
"comment": "fix: update .npmignore to unify v8 packages and exclude project.json"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "petrduda@microsoft.com",
|
|
81
|
+
"package": "@fluentui/react-tree",
|
|
82
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7",
|
|
83
|
+
"comment": "bugfix: aligns TreeItem leaf and branch nodes"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"prerelease": [
|
|
87
|
+
{
|
|
88
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
89
|
+
"package": "@fluentui/react-tree",
|
|
90
|
+
"commit": "55b25f7aabb9db09beb11c61ee334c04c89ada74",
|
|
91
|
+
"comment": "chore: export useTreeItemContextValues_unstable"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"author": "beachball",
|
|
95
|
+
"package": "@fluentui/react-tree",
|
|
96
|
+
"comment": "Bump @fluentui/react-aria to v9.3.25",
|
|
97
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"author": "beachball",
|
|
101
|
+
"package": "@fluentui/react-tree",
|
|
102
|
+
"comment": "Bump @fluentui/react-avatar to v9.5.9",
|
|
103
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"author": "beachball",
|
|
107
|
+
"package": "@fluentui/react-tree",
|
|
108
|
+
"comment": "Bump @fluentui/react-button to v9.3.20",
|
|
109
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"author": "beachball",
|
|
113
|
+
"package": "@fluentui/react-tree",
|
|
114
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.25",
|
|
115
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"author": "beachball",
|
|
119
|
+
"package": "@fluentui/react-tree",
|
|
120
|
+
"comment": "Bump @fluentui/react-portal to v9.2.16",
|
|
121
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"author": "beachball",
|
|
125
|
+
"package": "@fluentui/react-tree",
|
|
126
|
+
"comment": "Bump @fluentui/react-tabster to v9.9.1",
|
|
127
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"author": "beachball",
|
|
131
|
+
"package": "@fluentui/react-tree",
|
|
132
|
+
"comment": "Bump @fluentui/react-utilities to v9.10.0",
|
|
133
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"author": "beachball",
|
|
137
|
+
"package": "@fluentui/react-tree",
|
|
138
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.9",
|
|
139
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"date": "Tue, 27 Jun 2023 11:21:23 GMT",
|
|
6
146
|
"tag": "@fluentui/react-tree_v9.0.0-beta.21",
|
|
7
147
|
"version": "9.0.0-beta.21",
|
|
8
148
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-tree
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 03 Jul 2023 11:54:01 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-beta.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-tree_v9.0.0-beta.23)
|
|
8
|
+
|
|
9
|
+
Mon, 03 Jul 2023 11:54:01 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tree_v9.0.0-beta.22..@fluentui/react-tree_v9.0.0-beta.23)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-aria to v9.3.26 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
15
|
+
- Bump @fluentui/react-avatar to v9.5.10 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
16
|
+
- Bump @fluentui/react-button to v9.3.21 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
17
|
+
- Bump @fluentui/react-context-selector to v9.1.26 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
18
|
+
- Bump @fluentui/react-portal to v9.3.0 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v9.6.0 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v9.9.2 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
21
|
+
- Bump @fluentui/react-utilities to v9.10.1 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
22
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.10 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
23
|
+
|
|
24
|
+
## [9.0.0-beta.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-tree_v9.0.0-beta.22)
|
|
25
|
+
|
|
26
|
+
Wed, 28 Jun 2023 11:12:35 GMT
|
|
27
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tree_v9.0.0-beta.21..@fluentui/react-tree_v9.0.0-beta.22)
|
|
28
|
+
|
|
29
|
+
### Changes
|
|
30
|
+
|
|
31
|
+
- chore: export useTreeItemContextValues_unstable ([PR #28344](https://github.com/microsoft/fluentui/pull/28344) by bernardo.sunderhus@gmail.com)
|
|
32
|
+
- Bump @fluentui/react-aria to v9.3.25 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
33
|
+
- Bump @fluentui/react-avatar to v9.5.9 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
34
|
+
- Bump @fluentui/react-button to v9.3.20 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
35
|
+
- Bump @fluentui/react-context-selector to v9.1.25 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
36
|
+
- Bump @fluentui/react-portal to v9.2.16 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
37
|
+
- Bump @fluentui/react-tabster to v9.9.1 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
38
|
+
- Bump @fluentui/react-utilities to v9.10.0 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
39
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.9 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
40
|
+
|
|
7
41
|
## [9.0.0-beta.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-tree_v9.0.0-beta.21)
|
|
8
42
|
|
|
9
|
-
Tue, 27 Jun 2023 11:
|
|
43
|
+
Tue, 27 Jun 2023 11:21:23 GMT
|
|
10
44
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tree_v9.0.0-beta.20..@fluentui/react-tree_v9.0.0-beta.21)
|
|
11
45
|
|
|
12
46
|
### Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -278,6 +278,10 @@ export declare type TreeItemLayoutProps = ComponentProps<Partial<TreeItemLayoutS
|
|
|
278
278
|
|
|
279
279
|
export declare type TreeItemLayoutSlots = {
|
|
280
280
|
root: Slot<'div'>;
|
|
281
|
+
/**
|
|
282
|
+
* Content. Children of the root slot are automatically rendered here
|
|
283
|
+
*/
|
|
284
|
+
content: NonNullable<Slot<'div'>>;
|
|
281
285
|
/**
|
|
282
286
|
* Icon slot that renders right before main content
|
|
283
287
|
*/
|
|
@@ -338,11 +342,11 @@ export declare type TreeItemPersonaLayoutSlots = Pick<TreeItemLayoutSlots, 'acti
|
|
|
338
342
|
*/
|
|
339
343
|
media: NonNullable<Slot<'div'>>;
|
|
340
344
|
/**
|
|
341
|
-
*
|
|
345
|
+
* Content. Children of the root slot are automatically rendered here
|
|
342
346
|
*/
|
|
343
|
-
|
|
347
|
+
content: NonNullable<Slot<'div'>>;
|
|
344
348
|
/**
|
|
345
|
-
* Secondary text that describes or complements the
|
|
349
|
+
* Secondary text that describes or complements the content
|
|
346
350
|
*/
|
|
347
351
|
description?: Slot<'div'>;
|
|
348
352
|
};
|
|
@@ -547,6 +551,8 @@ export declare function useTreeItem_unstable(props: TreeItemProps, ref: React_2.
|
|
|
547
551
|
|
|
548
552
|
export declare const useTreeItemContext_unstable: <T>(selector: ContextSelector<TreeItemContextValue, T>) => T;
|
|
549
553
|
|
|
554
|
+
export declare function useTreeItemContextValues_unstable(state: Pick<TreeItemState, keyof TreeItemContextValue>): TreeItemContextValues;
|
|
555
|
+
|
|
550
556
|
/**
|
|
551
557
|
* Create the state required to render TreeItemLayout.
|
|
552
558
|
*
|
|
@@ -19,7 +19,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
19
19
|
Bw0ie65: "f10ort2y"
|
|
20
20
|
}
|
|
21
21
|
}, {
|
|
22
|
-
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1j0q4x9{row-gap:var(--spacingVerticalXXS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".f1s4axba{-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;}", ".f1na4k6z{grid-row-start:subtree;}", ".fwt6ga{grid-column-start:subtree;}", ".fi45nfw{grid-row-end:subtree;}", ".f10ort2y{grid-column-end:subtree;}"]
|
|
22
|
+
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1j0q4x9{row-gap:var(--spacingVerticalXXS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".f1s4axba{-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;}", ".f1na4k6z{-ms-grid-row:subtree;grid-row-start:subtree;}", ".fwt6ga{-ms-grid-column:subtree;grid-column-start:subtree;}", ".fi45nfw{-ms-grid-row-span:subtree;grid-row-end:subtree;}", ".f10ort2y{-ms-grid-column-span:subtree;grid-column-end:subtree;}"]
|
|
23
23
|
});
|
|
24
24
|
export const useTreeStyles_unstable = state => {
|
|
25
25
|
const styles = useStyles();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TreeItem';\nexport * from './TreeItem.types';\nexport * from './renderTreeItem';\nexport * from './useTreeItem';\nexport * from './useTreeItemStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,6BAA6B"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TreeItem';\nexport * from './TreeItem.types';\nexport * from './renderTreeItem';\nexport * from './useTreeItem';\nexport * from './useTreeItemStyles.styles';\nexport * from './useTreeItemContextValues';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TreeItemLayout.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { ButtonContextValue } from '@fluentui/react-button';\n\nexport type TreeItemLayoutSlots = {\n root: Slot<'div'>;\n /**\n * Icon slot that renders right before main content\n */\n iconBefore?: Slot<'div'>;\n /**\n * Icon slot that renders right after main content\n */\n iconAfter?: Slot<'div'>;\n /**\n * Expand icon slot,\n * by default renders a chevron icon to indicate opening and closing\n */\n expandIcon?: Slot<'div'>;\n aside?: Slot<'div'>;\n /**\n * actionable elements are normally buttons, menus, or other focusable elements.\n * Those elements are only visibly available if the given tree item is currently active.\n */\n actions?: Slot<\n ExtractSlotProps<\n Slot<'div'> & {\n /**\n * Forces visibility of the aside/action content\n */\n visible?: boolean;\n }\n >\n >;\n};\n\n/**\n * TreeItemLayout Props\n */\nexport type TreeItemLayoutProps = ComponentProps<Partial<TreeItemLayoutSlots>>;\n\n/**\n * State used in rendering TreeItemLayout\n */\nexport type TreeItemLayoutState = ComponentState<TreeItemLayoutSlots> & {\n buttonContextValue: ButtonContextValue;\n};\n"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["TreeItemLayout.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { ButtonContextValue } from '@fluentui/react-button';\n\nexport type TreeItemLayoutSlots = {\n root: Slot<'div'>;\n /**\n * Content. Children of the root slot are automatically rendered here\n */\n content: NonNullable<Slot<'div'>>;\n /**\n * Icon slot that renders right before main content\n */\n iconBefore?: Slot<'div'>;\n /**\n * Icon slot that renders right after main content\n */\n iconAfter?: Slot<'div'>;\n /**\n * Expand icon slot,\n * by default renders a chevron icon to indicate opening and closing\n */\n expandIcon?: Slot<'div'>;\n aside?: Slot<'div'>;\n /**\n * actionable elements are normally buttons, menus, or other focusable elements.\n * Those elements are only visibly available if the given tree item is currently active.\n */\n actions?: Slot<\n ExtractSlotProps<\n Slot<'div'> & {\n /**\n * Forces visibility of the aside/action content\n */\n visible?: boolean;\n }\n >\n >;\n};\n\n/**\n * TreeItemLayout Props\n */\nexport type TreeItemLayoutProps = ComponentProps<Partial<TreeItemLayoutSlots>>;\n\n/**\n * State used in rendering TreeItemLayout\n */\nexport type TreeItemLayoutState = ComponentState<TreeItemLayoutSlots> & {\n buttonContextValue: ButtonContextValue;\n};\n"],"names":[],"mappings":"AAAA,WAiDE"}
|
|
@@ -5,7 +5,7 @@ import { ButtonContextProvider } from '@fluentui/react-button';
|
|
|
5
5
|
* Render the final JSX of TreeItemLayout
|
|
6
6
|
*/ export const renderTreeItemLayout_unstable = (state)=>{
|
|
7
7
|
const { slots , slotProps } = getSlotsNext(state);
|
|
8
|
-
return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.expandIcon && /*#__PURE__*/ createElement(slots.expandIcon, slotProps.expandIcon), slots.iconBefore && /*#__PURE__*/ createElement(slots.iconBefore, slotProps.iconBefore), slotProps.root.children, slots.iconAfter && /*#__PURE__*/ createElement(slots.iconAfter, slotProps.iconAfter), /*#__PURE__*/ createElement(ButtonContextProvider, {
|
|
8
|
+
return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.expandIcon && /*#__PURE__*/ createElement(slots.expandIcon, slotProps.expandIcon), slots.iconBefore && /*#__PURE__*/ createElement(slots.iconBefore, slotProps.iconBefore), /*#__PURE__*/ createElement(slots.content, slotProps.content, slotProps.root.children), slots.iconAfter && /*#__PURE__*/ createElement(slots.iconAfter, slotProps.iconAfter), /*#__PURE__*/ createElement(ButtonContextProvider, {
|
|
9
9
|
value: state.buttonContextValue
|
|
10
10
|
}, slots.actions && /*#__PURE__*/ createElement(slots.actions, slotProps.actions), slots.aside && /*#__PURE__*/ createElement(slots.aside, slotProps.aside)));
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderTreeItemLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { TreeItemLayoutState, TreeItemLayoutSlots } from './TreeItemLayout.types';\nimport { ButtonContextProvider } from '@fluentui/react-button';\n\n/**\n * Render the final JSX of TreeItemLayout\n */\nexport const renderTreeItemLayout_unstable = (state: TreeItemLayoutState) => {\n const { slots, slotProps } = getSlotsNext<TreeItemLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.expandIcon && <slots.expandIcon {...slotProps.expandIcon} />}\n {slots.iconBefore && <slots.iconBefore {...slotProps.iconBefore} />}\n {slotProps.root.children}
|
|
1
|
+
{"version":3,"sources":["renderTreeItemLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { TreeItemLayoutState, TreeItemLayoutSlots } from './TreeItemLayout.types';\nimport { ButtonContextProvider } from '@fluentui/react-button';\n\n/**\n * Render the final JSX of TreeItemLayout\n */\nexport const renderTreeItemLayout_unstable = (state: TreeItemLayoutState) => {\n const { slots, slotProps } = getSlotsNext<TreeItemLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.expandIcon && <slots.expandIcon {...slotProps.expandIcon} />}\n {slots.iconBefore && <slots.iconBefore {...slotProps.iconBefore} />}\n <slots.content {...slotProps.content}>{slotProps.root.children}</slots.content>\n {slots.iconAfter && <slots.iconAfter {...slotProps.iconAfter} />}\n <ButtonContextProvider value={state.buttonContextValue}>\n {slots.actions && <slots.actions {...slotProps.actions} />}\n {slots.aside && <slots.aside {...slotProps.aside} />}\n </ButtonContextProvider>\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","ButtonContextProvider","renderTreeItemLayout_unstable","state","slots","slotProps","root","expandIcon","iconBefore","content","children","iconAfter","value","buttonContextValue","actions","aside"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,qBAAqB,QAAQ,yBAAyB;AAE/D;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC,QAA+B;IAC3E,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGL,aAAkCG;IAE/D,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BF,MAAMG,UAAU,kBAAI,AAf3B,cAe4BH,MAAMG,UAAU,EAAKF,UAAUE,UAAU,GAC9DH,MAAMI,UAAU,kBAAI,AAhB3B,cAgB4BJ,MAAMI,UAAU,EAAKH,UAAUG,UAAU,iBAC/D,AAjBN,cAiBOJ,MAAMK,OAAO,EAAKJ,UAAUI,OAAO,EAAGJ,UAAUC,IAAI,CAACI,QAAQ,GAC7DN,MAAMO,SAAS,kBAAI,AAlB1B,cAkB2BP,MAAMO,SAAS,EAAKN,UAAUM,SAAS,iBAC5D,AAnBN,cAmBOV;QAAsBW,OAAOT,MAAMU,kBAAkB;OACnDT,MAAMU,OAAO,kBAAI,AApB1B,cAoB2BV,MAAMU,OAAO,EAAKT,UAAUS,OAAO,GACrDV,MAAMW,KAAK,kBAAI,AArBxB,cAqByBX,MAAMW,KAAK,EAAKV,UAAUU,KAAK;AAIxD,EAAE"}
|
|
@@ -11,7 +11,7 @@ import { TreeItemChevron } from '../TreeItemChevron';
|
|
|
11
11
|
* @param props - props from this instance of TreeItemLayout
|
|
12
12
|
* @param ref - reference to root HTMLElement of TreeItemLayout
|
|
13
13
|
*/ export const useTreeItemLayout_unstable = (props, ref)=>{
|
|
14
|
-
const { iconAfter , iconBefore , expandIcon , as ='span' , aside , actions } = props;
|
|
14
|
+
const { content , iconAfter , iconBefore , expandIcon , as ='span' , aside , actions } = props;
|
|
15
15
|
const layoutRef = useTreeItemContext_unstable((ctx)=>ctx.layoutRef);
|
|
16
16
|
const expandIconRef = useTreeItemContext_unstable((ctx)=>ctx.expandIconRef);
|
|
17
17
|
const isActionsVisibleContext = useTreeItemContext_unstable((ctx)=>ctx.isActionsVisible);
|
|
@@ -25,6 +25,7 @@ import { TreeItemChevron } from '../TreeItemChevron';
|
|
|
25
25
|
root: 'div',
|
|
26
26
|
expandIcon: 'div',
|
|
27
27
|
iconBefore: 'div',
|
|
28
|
+
content: 'div',
|
|
28
29
|
iconAfter: 'div',
|
|
29
30
|
actions: 'div',
|
|
30
31
|
aside: 'div'
|
|
@@ -41,6 +42,9 @@ import { TreeItemChevron } from '../TreeItemChevron';
|
|
|
41
42
|
'aria-hidden': true
|
|
42
43
|
}
|
|
43
44
|
}),
|
|
45
|
+
content: resolveShorthand(content, {
|
|
46
|
+
required: true
|
|
47
|
+
}),
|
|
44
48
|
iconAfter: resolveShorthand(iconAfter, {
|
|
45
49
|
defaultProps: {
|
|
46
50
|
'aria-hidden': true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTreeItemLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ExtractSlotProps,\n getNativeElementProps,\n isResolvedShorthand,\n resolveShorthand,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport type { TreeItemLayoutProps, TreeItemLayoutSlots, TreeItemLayoutState } from './TreeItemLayout.types';\nimport { useTreeItemContext_unstable } from '../../contexts/treeItemContext';\nimport { TreeItemChevron } from '../TreeItemChevron';\n\n/**\n * Create the state required to render TreeItemLayout.\n *\n * The returned state can be modified with hooks such as useTreeItemLayoutStyles_unstable,\n * before being passed to renderTreeItemLayout_unstable.\n *\n * @param props - props from this instance of TreeItemLayout\n * @param ref - reference to root HTMLElement of TreeItemLayout\n */\nexport const useTreeItemLayout_unstable = (\n props: TreeItemLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TreeItemLayoutState => {\n const { iconAfter, iconBefore, expandIcon, as = 'span', aside, actions } = props;\n\n const layoutRef = useTreeItemContext_unstable(ctx => ctx.layoutRef);\n const expandIconRef = useTreeItemContext_unstable(ctx => ctx.expandIconRef);\n const isActionsVisibleContext = useTreeItemContext_unstable(ctx => ctx.isActionsVisible);\n const isAsideVisible = useTreeItemContext_unstable(ctx => ctx.isAsideVisible);\n const isActionsVisible = (isResolvedShorthand(actions) ? actions.visible : undefined) ?? isActionsVisibleContext;\n const isBranch = useTreeItemContext_unstable(ctx => ctx.itemType === 'branch');\n const actionsRef = useMergedRefs(\n isResolvedShorthand(actions) ? actions.ref : undefined,\n useTreeItemContext_unstable(ctx => ctx.actionsRef),\n );\n\n return {\n components: {\n root: 'div',\n expandIcon: 'div',\n iconBefore: 'div',\n iconAfter: 'div',\n actions: 'div',\n aside: 'div',\n },\n buttonContextValue: { size: 'small' },\n root: getNativeElementProps(as, { ...props, ref: useMergedRefs(ref, layoutRef) }),\n iconBefore: resolveShorthand(iconBefore, { defaultProps: { 'aria-hidden': true } }),\n iconAfter: resolveShorthand(iconAfter, { defaultProps: { 'aria-hidden': true } }),\n aside: isAsideVisible ? resolveShorthand(aside) : undefined,\n actions: isActionsVisible\n ? resolveShorthand<ExtractSlotProps<TreeItemLayoutSlots['actions']>>(\n // visible props should not be propagated to the DOM\n isResolvedShorthand(actions) ? { ...actions, visible: undefined } : actions,\n {\n defaultProps: { ref: actionsRef },\n },\n )\n : undefined,\n expandIcon: resolveShorthand(expandIcon, {\n required: isBranch,\n defaultProps: {\n children: <TreeItemChevron />,\n 'aria-hidden': true,\n ref: useMergedRefs(isResolvedShorthand(expandIcon) ? expandIcon.ref : undefined, expandIconRef),\n },\n }),\n };\n};\n"],"names":["React","getNativeElementProps","isResolvedShorthand","resolveShorthand","useMergedRefs","useTreeItemContext_unstable","TreeItemChevron","useTreeItemLayout_unstable","props","ref","iconAfter","iconBefore","expandIcon","as","aside","actions","layoutRef","ctx","expandIconRef","isActionsVisibleContext","isActionsVisible","isAsideVisible","visible","undefined","isBranch","itemType","actionsRef","components","root","buttonContextValue","size","defaultProps","required","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAEEC,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBC,aAAa,QACR,4BAA4B;AAEnC,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,eAAe,QAAQ,qBAAqB;AAErD;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC,MACwB;IACxB,MAAM,EAAEC,UAAS,EAAEC,WAAU,EAAEC,WAAU,EAAEC,IAAK,OAAM,EAAEC,MAAK,EAAEC,QAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["useTreeItemLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ExtractSlotProps,\n getNativeElementProps,\n isResolvedShorthand,\n resolveShorthand,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport type { TreeItemLayoutProps, TreeItemLayoutSlots, TreeItemLayoutState } from './TreeItemLayout.types';\nimport { useTreeItemContext_unstable } from '../../contexts/treeItemContext';\nimport { TreeItemChevron } from '../TreeItemChevron';\n\n/**\n * Create the state required to render TreeItemLayout.\n *\n * The returned state can be modified with hooks such as useTreeItemLayoutStyles_unstable,\n * before being passed to renderTreeItemLayout_unstable.\n *\n * @param props - props from this instance of TreeItemLayout\n * @param ref - reference to root HTMLElement of TreeItemLayout\n */\nexport const useTreeItemLayout_unstable = (\n props: TreeItemLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TreeItemLayoutState => {\n const { content, iconAfter, iconBefore, expandIcon, as = 'span', aside, actions } = props;\n\n const layoutRef = useTreeItemContext_unstable(ctx => ctx.layoutRef);\n const expandIconRef = useTreeItemContext_unstable(ctx => ctx.expandIconRef);\n const isActionsVisibleContext = useTreeItemContext_unstable(ctx => ctx.isActionsVisible);\n const isAsideVisible = useTreeItemContext_unstable(ctx => ctx.isAsideVisible);\n const isActionsVisible = (isResolvedShorthand(actions) ? actions.visible : undefined) ?? isActionsVisibleContext;\n const isBranch = useTreeItemContext_unstable(ctx => ctx.itemType === 'branch');\n const actionsRef = useMergedRefs(\n isResolvedShorthand(actions) ? actions.ref : undefined,\n useTreeItemContext_unstable(ctx => ctx.actionsRef),\n );\n\n return {\n components: {\n root: 'div',\n expandIcon: 'div',\n iconBefore: 'div',\n content: 'div',\n iconAfter: 'div',\n actions: 'div',\n aside: 'div',\n },\n buttonContextValue: { size: 'small' },\n root: getNativeElementProps(as, { ...props, ref: useMergedRefs(ref, layoutRef) }),\n iconBefore: resolveShorthand(iconBefore, { defaultProps: { 'aria-hidden': true } }),\n content: resolveShorthand(content, { required: true }),\n iconAfter: resolveShorthand(iconAfter, { defaultProps: { 'aria-hidden': true } }),\n aside: isAsideVisible ? resolveShorthand(aside) : undefined,\n actions: isActionsVisible\n ? resolveShorthand<ExtractSlotProps<TreeItemLayoutSlots['actions']>>(\n // visible props should not be propagated to the DOM\n isResolvedShorthand(actions) ? { ...actions, visible: undefined } : actions,\n {\n defaultProps: { ref: actionsRef },\n },\n )\n : undefined,\n expandIcon: resolveShorthand(expandIcon, {\n required: isBranch,\n defaultProps: {\n children: <TreeItemChevron />,\n 'aria-hidden': true,\n ref: useMergedRefs(isResolvedShorthand(expandIcon) ? expandIcon.ref : undefined, expandIconRef),\n },\n }),\n };\n};\n"],"names":["React","getNativeElementProps","isResolvedShorthand","resolveShorthand","useMergedRefs","useTreeItemContext_unstable","TreeItemChevron","useTreeItemLayout_unstable","props","ref","content","iconAfter","iconBefore","expandIcon","as","aside","actions","layoutRef","ctx","expandIconRef","isActionsVisibleContext","isActionsVisible","isAsideVisible","visible","undefined","isBranch","itemType","actionsRef","components","root","buttonContextValue","size","defaultProps","required","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAEEC,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBC,aAAa,QACR,4BAA4B;AAEnC,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,eAAe,QAAQ,qBAAqB;AAErD;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC,MACwB;IACxB,MAAM,EAAEC,QAAO,EAAEC,UAAS,EAAEC,WAAU,EAAEC,WAAU,EAAEC,IAAK,OAAM,EAAEC,MAAK,EAAEC,QAAO,EAAE,GAAGR;IAEpF,MAAMS,YAAYZ,4BAA4Ba,CAAAA,MAAOA,IAAID,SAAS;IAClE,MAAME,gBAAgBd,4BAA4Ba,CAAAA,MAAOA,IAAIC,aAAa;IAC1E,MAAMC,0BAA0Bf,4BAA4Ba,CAAAA,MAAOA,IAAIG,gBAAgB;IACvF,MAAMC,iBAAiBjB,4BAA4Ba,CAAAA,MAAOA,IAAII,cAAc;QAClDpB;IAA1B,MAAMmB,mBAAmB,CAACnB,OAAAA,oBAAoBc,WAAWA,QAAQO,OAAO,GAAGC,SAAS,cAA1DtB,kBAAAA,OAA+DkB,uBAAuB;IAChH,MAAMK,WAAWpB,4BAA4Ba,CAAAA,MAAOA,IAAIQ,QAAQ,KAAK;IACrE,MAAMC,aAAavB,cACjBF,oBAAoBc,WAAWA,QAAQP,GAAG,GAAGe,SAAS,EACtDnB,4BAA4Ba,CAAAA,MAAOA,IAAIS,UAAU;IAGnD,OAAO;QACLC,YAAY;YACVC,MAAM;YACNhB,YAAY;YACZD,YAAY;YACZF,SAAS;YACTC,WAAW;YACXK,SAAS;YACTD,OAAO;QACT;QACAe,oBAAoB;YAAEC,MAAM;QAAQ;QACpCF,MAAM5B,sBAAsBa,IAAI;YAAE,GAAGN,KAAK;YAAEC,KAAKL,cAAcK,KAAKQ;QAAW;QAC/EL,YAAYT,iBAAiBS,YAAY;YAAEoB,cAAc;gBAAE,eAAe,IAAI;YAAC;QAAE;QACjFtB,SAASP,iBAAiBO,SAAS;YAAEuB,UAAU,IAAI;QAAC;QACpDtB,WAAWR,iBAAiBQ,WAAW;YAAEqB,cAAc;gBAAE,eAAe,IAAI;YAAC;QAAE;QAC/EjB,OAAOO,iBAAiBnB,iBAAiBY,SAASS,SAAS;QAC3DR,SAASK,mBACLlB,iBACE,oDAAoD;QACpDD,oBAAoBc,WAAW;YAAE,GAAGA,OAAO;YAAEO,SAASC;QAAU,IAAIR,OAAO,EAC3E;YACEgB,cAAc;gBAAEvB,KAAKkB;YAAW;QAClC,KAEFH,SAAS;QACbX,YAAYV,iBAAiBU,YAAY;YACvCoB,UAAUR;YACVO,cAAc;gBACZE,wBAAU,oBAAC5B;gBACX,eAAe,IAAI;gBACnBG,KAAKL,cAAcF,oBAAoBW,cAAcA,WAAWJ,GAAG,GAAGe,SAAS,EAAEL;YACnF;QACF;IACF;AACF,EAAE"}
|
|
@@ -6,6 +6,7 @@ import { useTreeItemContext_unstable } from '../../contexts/treeItemContext';
|
|
|
6
6
|
export const treeItemLayoutClassNames = {
|
|
7
7
|
root: 'fui-TreeItemLayout',
|
|
8
8
|
iconBefore: 'fui-TreeItemLayout__iconBefore',
|
|
9
|
+
content: 'fui-TreeItemLayout__content',
|
|
9
10
|
iconAfter: 'fui-TreeItemLayout__iconAfter',
|
|
10
11
|
expandIcon: 'fui-TreeItemLayout__expandIcon',
|
|
11
12
|
aside: 'fui-TreeItemLayout__aside',
|
|
@@ -42,14 +43,12 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
|
42
43
|
uwmqm3: ["fo100m9", "f6yw3pu"]
|
|
43
44
|
},
|
|
44
45
|
medium: {
|
|
45
|
-
i8kkvl: "f1rjii52",
|
|
46
46
|
Bahqtrf: "fk6fouc",
|
|
47
47
|
Be2twd7: "fkhj508",
|
|
48
48
|
Bhrd7zp: "figsok6",
|
|
49
49
|
Bg96gwp: "f1i3iumi"
|
|
50
50
|
},
|
|
51
51
|
small: {
|
|
52
|
-
i8kkvl: "f1ufnopg",
|
|
53
52
|
sshi5w: "f1pha7fy",
|
|
54
53
|
Bahqtrf: "fk6fouc",
|
|
55
54
|
Be2twd7: "fy9rknc",
|
|
@@ -67,26 +66,10 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
|
67
66
|
ecr2s2: "fophhak"
|
|
68
67
|
}
|
|
69
68
|
}, {
|
|
70
|
-
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1nxs5xn{min-height:32px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f15ws6j{grid-row-start:layout;}", ".f135tdbu{grid-column-start:layout;}", ".f2e2169{grid-row-end:layout;}", ".f4rqp6x{grid-column-end:layout;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1k1erfc{padding-left:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}", ".faevyjx{padding-right:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}", ".fo100m9{padding-left:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}", ".f6yw3pu{padding-right:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}", ".
|
|
69
|
+
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1nxs5xn{min-height:32px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f15ws6j{-ms-grid-row:layout;grid-row-start:layout;}", ".f135tdbu{-ms-grid-column:layout;grid-column-start:layout;}", ".f2e2169{-ms-grid-row-span:layout;grid-row-end:layout;}", ".f4rqp6x{-ms-grid-column-span:layout;grid-column-end:layout;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1k1erfc{padding-left:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}", ".faevyjx{padding-right:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}", ".fo100m9{padding-left:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}", ".f6yw3pu{padding-right:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1pha7fy{min-height:24px;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}"],
|
|
71
70
|
a: [".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1ih54s9:active .fui-TreeItemLayout__expandIcon{color:var(--colorNeutralForeground3Pressed);}", ".fkam630:active{background-color:var(--colorSubtleBackgroundLightAlphaPressed);}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}"],
|
|
72
71
|
h: [".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f1jk1nfw:hover .fui-TreeItemLayout__expandIcon{color:var(--colorNeutralForeground3Hover);}", ".f146ro5n:hover{background-color:var(--colorSubtleBackgroundLightAlphaHover);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}"]
|
|
73
72
|
});
|
|
74
|
-
/**
|
|
75
|
-
* Styles for the before/after icon slot
|
|
76
|
-
*/
|
|
77
|
-
const useIconStyles = /*#__PURE__*/__styles({
|
|
78
|
-
base: {
|
|
79
|
-
mc9l5x: "f22iagw",
|
|
80
|
-
Bt984gj: "f122n59",
|
|
81
|
-
sj55zd: "fkfq4zb",
|
|
82
|
-
Bg96gwp: "f106mvju",
|
|
83
|
-
Be2twd7: "f1pp30po"
|
|
84
|
-
},
|
|
85
|
-
iconBefore: {},
|
|
86
|
-
iconAfter: {}
|
|
87
|
-
}, {
|
|
88
|
-
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".f1pp30po{font-size:var(--fontSizeBase500);}"]
|
|
89
|
-
});
|
|
90
73
|
/**
|
|
91
74
|
* Styles for the action icon slot
|
|
92
75
|
*/
|
|
@@ -106,7 +89,7 @@ const useActionsStyles = /*#__PURE__*/__styles({
|
|
|
106
89
|
uwmqm3: ["f1f5gg8d", "f1vdfbxk"]
|
|
107
90
|
}
|
|
108
91
|
}, {
|
|
109
|
-
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f10pi13n{position:relative;}", ".f19g0ac{z-index:1;}", ".fobksn0{grid-row-start:aside;}", ".fmy5l6f{grid-column-start:aside;}", ".fzqypwc{grid-row-end:aside;}", ".f1tmftl3{grid-column-end:aside;}", ".f1g0x7ka{padding-top:0;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1qch9an{padding-bottom:0;}"]
|
|
92
|
+
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f10pi13n{position:relative;}", ".f19g0ac{z-index:1;}", ".fobksn0{-ms-grid-row:aside;grid-row-start:aside;}", ".fmy5l6f{-ms-grid-column:aside;grid-column-start:aside;}", ".fzqypwc{-ms-grid-row-span:aside;grid-row-end:aside;}", ".f1tmftl3{-ms-grid-column-span:aside;grid-column-end:aside;}", ".f1g0x7ka{padding-top:0;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1qch9an{padding-bottom:0;}"]
|
|
110
93
|
});
|
|
111
94
|
/**
|
|
112
95
|
* Styles for the action icon slot
|
|
@@ -129,7 +112,7 @@ const useAsideStyles = /*#__PURE__*/__styles({
|
|
|
129
112
|
Belr9w4: "f14sijuj"
|
|
130
113
|
}
|
|
131
114
|
}, {
|
|
132
|
-
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f11zp4z2{z-index:0;}", ".fobksn0{grid-row-start:aside;}", ".fmy5l6f{grid-column-start:aside;}", ".fzqypwc{grid-row-end:aside;}", ".f1tmftl3{grid-column-end:aside;}", ".f1g0x7ka{padding-top:0;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".f1qch9an{padding-bottom:0;}", ".f1ufnopg{-webkit-column-gap:var(--spacingHorizontalXS);column-gap:var(--spacingHorizontalXS);}", ".f14sijuj{row-gap:var(--spacingHorizontalXS);}"]
|
|
115
|
+
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f11zp4z2{z-index:0;}", ".fobksn0{-ms-grid-row:aside;grid-row-start:aside;}", ".fmy5l6f{-ms-grid-column:aside;grid-column-start:aside;}", ".fzqypwc{-ms-grid-row-span:aside;grid-row-end:aside;}", ".f1tmftl3{-ms-grid-column-span:aside;grid-column-end:aside;}", ".f1g0x7ka{padding-top:0;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".f1qch9an{padding-bottom:0;}", ".f1ufnopg{-webkit-column-gap:var(--spacingHorizontalXS);column-gap:var(--spacingHorizontalXS);}", ".f14sijuj{row-gap:var(--spacingHorizontalXS);}"]
|
|
133
116
|
});
|
|
134
117
|
/**
|
|
135
118
|
* Styles for the expand icon slot
|
|
@@ -153,29 +136,85 @@ const useExpandIconStyles = /*#__PURE__*/__styles({
|
|
|
153
136
|
}, {
|
|
154
137
|
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f17fgpbq{min-width:24px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f1jhi6b8{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f1rmlqtg{-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}"]
|
|
155
138
|
});
|
|
139
|
+
/**
|
|
140
|
+
* Styles for the content slot
|
|
141
|
+
*/
|
|
142
|
+
const useContentStyles = /*#__PURE__*/__styles({
|
|
143
|
+
base: {
|
|
144
|
+
z8tnut: "f1g0x7ka",
|
|
145
|
+
z189sj: ["ffczdla", "fgiv446"],
|
|
146
|
+
Byoj8tv: "f1qch9an",
|
|
147
|
+
uwmqm3: ["fgiv446", "ffczdla"]
|
|
148
|
+
}
|
|
149
|
+
}, {
|
|
150
|
+
d: [".f1g0x7ka{padding-top:0;}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".f1qch9an{padding-bottom:0;}"]
|
|
151
|
+
});
|
|
152
|
+
/**
|
|
153
|
+
* Styles for the before/after icon slot
|
|
154
|
+
*/
|
|
155
|
+
const useIconStyles = /*#__PURE__*/__styles({
|
|
156
|
+
base: {
|
|
157
|
+
mc9l5x: "f22iagw",
|
|
158
|
+
Bt984gj: "f122n59",
|
|
159
|
+
sj55zd: "fkfq4zb",
|
|
160
|
+
Bg96gwp: "f106mvju",
|
|
161
|
+
Be2twd7: "f1pp30po"
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".f1pp30po{font-size:var(--fontSizeBase500);}"]
|
|
165
|
+
});
|
|
166
|
+
const useIconBeforeStyles = /*#__PURE__*/__styles({
|
|
167
|
+
medium: {
|
|
168
|
+
z189sj: ["f7x41pl", "fruq291"]
|
|
169
|
+
},
|
|
170
|
+
small: {
|
|
171
|
+
z189sj: ["ffczdla", "fgiv446"]
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
d: [".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}"]
|
|
175
|
+
});
|
|
176
|
+
const useIconAfterStyles = /*#__PURE__*/__styles({
|
|
177
|
+
medium: {
|
|
178
|
+
uwmqm3: ["fruq291", "f7x41pl"]
|
|
179
|
+
},
|
|
180
|
+
small: {
|
|
181
|
+
uwmqm3: ["fgiv446", "ffczdla"]
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
d: [".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}"]
|
|
185
|
+
});
|
|
156
186
|
/**
|
|
157
187
|
* Apply styling to the TreeItemLayout slots based on the state
|
|
158
188
|
*/
|
|
159
189
|
export const useTreeItemLayoutStyles_unstable = state => {
|
|
160
190
|
const {
|
|
191
|
+
content,
|
|
161
192
|
iconAfter,
|
|
162
193
|
iconBefore,
|
|
194
|
+
expandIcon,
|
|
163
195
|
root
|
|
164
196
|
} = state;
|
|
165
197
|
const rootStyles = useRootStyles();
|
|
166
|
-
const iconStyles = useIconStyles();
|
|
167
198
|
const actionsStyles = useActionsStyles();
|
|
168
199
|
const asideStyles = useAsideStyles();
|
|
200
|
+
const contentStyles = useContentStyles();
|
|
169
201
|
const expandIconStyles = useExpandIconStyles();
|
|
202
|
+
const iconStyles = useIconStyles();
|
|
203
|
+
const iconBeforeStyles = useIconBeforeStyles();
|
|
204
|
+
const iconAfterStyles = useIconAfterStyles();
|
|
170
205
|
const size = useTreeContext_unstable(ctx => ctx.size);
|
|
171
206
|
const appearance = useTreeContext_unstable(ctx => ctx.appearance);
|
|
172
207
|
const itemType = useTreeItemContext_unstable(ctx => ctx.itemType);
|
|
173
208
|
root.className = mergeClasses(treeItemLayoutClassNames.root, rootStyles.base, rootStyles[appearance], rootStyles[size], rootStyles[itemType], root.className);
|
|
209
|
+
content.className = mergeClasses(treeItemLayoutClassNames.content, contentStyles.base, content.className);
|
|
210
|
+
if (expandIcon) {
|
|
211
|
+
expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, expandIcon.className);
|
|
212
|
+
}
|
|
174
213
|
if (iconBefore) {
|
|
175
|
-
iconBefore.className = mergeClasses(treeItemLayoutClassNames.iconBefore, iconStyles.base,
|
|
214
|
+
iconBefore.className = mergeClasses(treeItemLayoutClassNames.iconBefore, iconStyles.base, iconBeforeStyles[size], iconBefore.className);
|
|
176
215
|
}
|
|
177
216
|
if (iconAfter) {
|
|
178
|
-
iconAfter.className = mergeClasses(treeItemLayoutClassNames.iconAfter, iconStyles.base,
|
|
217
|
+
iconAfter.className = mergeClasses(treeItemLayoutClassNames.iconAfter, iconStyles.base, iconAfterStyles[size], iconAfter.className);
|
|
179
218
|
}
|
|
180
219
|
if (state.actions) {
|
|
181
220
|
state.actions.className = mergeClasses(treeItemLayoutClassNames.actions, actionsStyles.base, state.actions.className);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","useTreeContext_unstable","treeItemLevelToken","useTreeItemContext_unstable","treeItemLayoutClassNames","root","iconBefore","iconAfter","expandIcon","aside","actions","useRootStyles","base","mc9l5x","Bt984gj","sshi5w","B7ck84d","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","lj723h","ecr2s2","qya0sb","Bi91k9c","Jwef8y","Becwuud","leaf","uwmqm3","branch","medium","i8kkvl","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","small","subtle","transparent","De3pzq","d","a","h","useIconStyles","sj55zd","useActionsStyles","Frg6f3","qhf8xq","Bj3rh1h","z8tnut","z189sj","Byoj8tv","useAsideStyles","Belr9w4","useExpandIconStyles","Brf1p80","Bf4jedk","Bh6795r","Bnnss6s","xawz","useTreeItemLayoutStyles_unstable","state","rootStyles","iconStyles","actionsStyles","asideStyles","expandIconStyles","size","ctx","appearance","itemType","className"],"sources":["useTreeItemLayoutStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useTreeContext_unstable } from '../../contexts/treeContext';\nimport { treeItemLevelToken } from '../../utils/tokens';\nimport { useTreeItemContext_unstable } from '../../contexts/treeItemContext';\nexport const treeItemLayoutClassNames = {\n root: 'fui-TreeItemLayout',\n iconBefore: 'fui-TreeItemLayout__iconBefore',\n iconAfter: 'fui-TreeItemLayout__iconAfter',\n expandIcon: 'fui-TreeItemLayout__expandIcon',\n aside: 'fui-TreeItemLayout__aside',\n actions: 'fui-TreeItemLayout__actions'\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.gridArea('layout'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ':active': {\n color: tokens.colorNeutralForeground2Pressed,\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n // TODO: stop using treeItemLayoutClassNames.expandIcon for styling\n [`& .${treeItemLayoutClassNames.expandIcon}`]: {\n color: tokens.colorNeutralForeground3Pressed\n }\n },\n ':hover': {\n color: tokens.colorNeutralForeground2Hover,\n backgroundColor: tokens.colorSubtleBackgroundHover,\n // TODO: stop using treeItemLayoutClassNames.expandIcon for styling\n [`& .${treeItemLayoutClassNames.expandIcon}`]: {\n color: tokens.colorNeutralForeground3Hover\n }\n }\n },\n leaf: {\n paddingLeft: `calc(var(${treeItemLevelToken}, 1) * ${tokens.spacingHorizontalXXL})`\n },\n branch: {\n paddingLeft: `calc((var(${treeItemLevelToken}, 1) - 1) * ${tokens.spacingHorizontalXXL})`\n },\n medium: {\n columnGap: tokens.spacingHorizontalSNudge,\n ...typographyStyles.body1\n },\n small: {\n columnGap: tokens.spacingHorizontalXS,\n minHeight: '24px',\n ...typographyStyles.caption1\n },\n // Appearance variations\n subtle: {},\n 'subtle-alpha': {\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundLightAlphaHover\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundLightAlphaPressed\n }\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed\n }\n }\n});\n/**\n * Styles for the before/after icon slot\n */ const useIconStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n color: tokens.colorNeutralForeground2,\n lineHeight: tokens.lineHeightBase500,\n fontSize: tokens.fontSizeBase500\n },\n iconBefore: {},\n iconAfter: {}\n});\n/**\n * Styles for the action icon slot\n */ const useActionsStyles = makeStyles({\n base: {\n display: 'flex',\n marginLeft: 'auto',\n position: 'relative',\n zIndex: 1,\n ...shorthands.gridArea('aside'),\n ...shorthands.padding(0, tokens.spacingHorizontalS)\n }\n});\n/**\n * Styles for the action icon slot\n */ const useAsideStyles = makeStyles({\n base: {\n display: 'flex',\n marginLeft: 'auto',\n alignItems: 'center',\n zIndex: 0,\n ...shorthands.gridArea('aside'),\n ...shorthands.padding(0, tokens.spacingHorizontalM),\n ...shorthands.gap(tokens.spacingHorizontalXS)\n }\n});\n/**\n * Styles for the expand icon slot\n */ const useExpandIconStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minWidth: '24px',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3,\n ...shorthands.flex(0, 0, 'auto'),\n ...shorthands.padding(tokens.spacingVerticalXS, 0)\n }\n});\n/**\n * Apply styling to the TreeItemLayout slots based on the state\n */ export const useTreeItemLayoutStyles_unstable = (state)=>{\n const { iconAfter , iconBefore , root } = state;\n const rootStyles = useRootStyles();\n const iconStyles = useIconStyles();\n const actionsStyles = useActionsStyles();\n const asideStyles = useAsideStyles();\n const expandIconStyles = useExpandIconStyles();\n const size = useTreeContext_unstable((ctx)=>ctx.size);\n const appearance = useTreeContext_unstable((ctx)=>ctx.appearance);\n const itemType = useTreeItemContext_unstable((ctx)=>ctx.itemType);\n root.className = mergeClasses(treeItemLayoutClassNames.root, rootStyles.base, rootStyles[appearance], rootStyles[size], rootStyles[itemType], root.className);\n if (iconBefore) {\n iconBefore.className = mergeClasses(treeItemLayoutClassNames.iconBefore, iconStyles.base, iconStyles.iconBefore, iconBefore.className);\n }\n if (iconAfter) {\n iconAfter.className = mergeClasses(treeItemLayoutClassNames.iconAfter, iconStyles.base, iconStyles.iconAfter, iconAfter.className);\n }\n if (state.actions) {\n state.actions.className = mergeClasses(treeItemLayoutClassNames.actions, actionsStyles.base, state.actions.className);\n }\n if (state.aside) {\n state.aside.className = mergeClasses(treeItemLayoutClassNames.aside, asideStyles.base, state.aside.className);\n }\n if (state.expandIcon) {\n state.expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, state.expandIcon.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ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AI,EAAEqD,KAAK,CAACxD,KAAK,CAACkE,SAAS,CAAC;EACjH;EACA,IAAIV,KAAK,CAACzD,UAAU,EAAE;IAClByD,KAAK,CAACzD,UAAU,CAACmE,SAAS,GAAG9E,YAAY,CAACO,wBAAwB,CAACI,UAAU,EAAE8D,gBAAgB,CAAC1D,IAAI,EAAEqD,KAAK,CAACzD,UAAU,CAACmE,SAAS,CAAC;EACrI;EACA,OAAOV,KAAK;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","useTreeContext_unstable","treeItemLevelToken","useTreeItemContext_unstable","treeItemLayoutClassNames","root","iconBefore","content","iconAfter","expandIcon","aside","actions","useRootStyles","base","mc9l5x","Bt984gj","sshi5w","B7ck84d","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","lj723h","ecr2s2","qya0sb","Bi91k9c","Jwef8y","Becwuud","leaf","uwmqm3","branch","medium","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","small","subtle","transparent","De3pzq","d","a","h","useActionsStyles","Frg6f3","qhf8xq","Bj3rh1h","z8tnut","z189sj","Byoj8tv","useAsideStyles","i8kkvl","Belr9w4","useExpandIconStyles","Brf1p80","Bf4jedk","sj55zd","Bh6795r","Bnnss6s","xawz","useContentStyles","useIconStyles","useIconBeforeStyles","useIconAfterStyles","useTreeItemLayoutStyles_unstable","state","rootStyles","actionsStyles","asideStyles","contentStyles","expandIconStyles","iconStyles","iconBeforeStyles","iconAfterStyles","size","ctx","appearance","itemType","className"],"sources":["useTreeItemLayoutStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useTreeContext_unstable } from '../../contexts/treeContext';\nimport { treeItemLevelToken } from '../../utils/tokens';\nimport { useTreeItemContext_unstable } from '../../contexts/treeItemContext';\nexport const treeItemLayoutClassNames = {\n root: 'fui-TreeItemLayout',\n iconBefore: 'fui-TreeItemLayout__iconBefore',\n content: 'fui-TreeItemLayout__content',\n iconAfter: 'fui-TreeItemLayout__iconAfter',\n expandIcon: 'fui-TreeItemLayout__expandIcon',\n aside: 'fui-TreeItemLayout__aside',\n actions: 'fui-TreeItemLayout__actions'\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.gridArea('layout'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ':active': {\n color: tokens.colorNeutralForeground2Pressed,\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n // TODO: stop using treeItemLayoutClassNames.expandIcon for styling\n [`& .${treeItemLayoutClassNames.expandIcon}`]: {\n color: tokens.colorNeutralForeground3Pressed\n }\n },\n ':hover': {\n color: tokens.colorNeutralForeground2Hover,\n backgroundColor: tokens.colorSubtleBackgroundHover,\n // TODO: stop using treeItemLayoutClassNames.expandIcon for styling\n [`& .${treeItemLayoutClassNames.expandIcon}`]: {\n color: tokens.colorNeutralForeground3Hover\n }\n }\n },\n leaf: {\n paddingLeft: `calc(var(${treeItemLevelToken}, 1) * ${tokens.spacingHorizontalXXL})`\n },\n branch: {\n paddingLeft: `calc((var(${treeItemLevelToken}, 1) - 1) * ${tokens.spacingHorizontalXXL})`\n },\n medium: {\n ...typographyStyles.body1\n },\n small: {\n minHeight: '24px',\n ...typographyStyles.caption1\n },\n // Appearance variations\n subtle: {},\n 'subtle-alpha': {\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundLightAlphaHover\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundLightAlphaPressed\n }\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed\n }\n }\n});\n/**\n * Styles for the action icon slot\n */ const useActionsStyles = makeStyles({\n base: {\n display: 'flex',\n marginLeft: 'auto',\n position: 'relative',\n zIndex: 1,\n ...shorthands.gridArea('aside'),\n ...shorthands.padding(0, tokens.spacingHorizontalS)\n }\n});\n/**\n * Styles for the action icon slot\n */ const useAsideStyles = makeStyles({\n base: {\n display: 'flex',\n marginLeft: 'auto',\n alignItems: 'center',\n zIndex: 0,\n ...shorthands.gridArea('aside'),\n ...shorthands.padding(0, tokens.spacingHorizontalM),\n ...shorthands.gap(tokens.spacingHorizontalXS)\n }\n});\n/**\n * Styles for the expand icon slot\n */ const useExpandIconStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minWidth: '24px',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3,\n ...shorthands.flex(0, 0, 'auto'),\n ...shorthands.padding(tokens.spacingVerticalXS, 0)\n }\n});\n/**\n * Styles for the content slot\n */ const useContentStyles = makeStyles({\n base: {\n ...shorthands.padding(0, tokens.spacingHorizontalXXS)\n }\n});\n/**\n * Styles for the before/after icon slot\n */ const useIconStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n color: tokens.colorNeutralForeground2,\n lineHeight: tokens.lineHeightBase500,\n fontSize: tokens.fontSizeBase500\n }\n});\nconst useIconBeforeStyles = makeStyles({\n medium: {\n paddingRight: tokens.spacingHorizontalXS\n },\n small: {\n paddingRight: tokens.spacingHorizontalXXS\n }\n});\nconst useIconAfterStyles = makeStyles({\n medium: {\n paddingLeft: tokens.spacingHorizontalXS\n },\n small: {\n paddingLeft: tokens.spacingHorizontalXXS\n }\n});\n/**\n * Apply styling to the TreeItemLayout slots based on the state\n */ export const useTreeItemLayoutStyles_unstable = (state)=>{\n const { content , iconAfter , iconBefore , expandIcon , root } = state;\n const rootStyles = useRootStyles();\n const actionsStyles = useActionsStyles();\n const asideStyles = useAsideStyles();\n const contentStyles = useContentStyles();\n const expandIconStyles = useExpandIconStyles();\n const iconStyles = useIconStyles();\n const iconBeforeStyles = useIconBeforeStyles();\n const iconAfterStyles = useIconAfterStyles();\n const size = useTreeContext_unstable((ctx)=>ctx.size);\n const appearance = useTreeContext_unstable((ctx)=>ctx.appearance);\n const itemType = useTreeItemContext_unstable((ctx)=>ctx.itemType);\n root.className = mergeClasses(treeItemLayoutClassNames.root, rootStyles.base, rootStyles[appearance], rootStyles[size], rootStyles[itemType], root.className);\n content.className = mergeClasses(treeItemLayoutClassNames.content, contentStyles.base, content.className);\n if (expandIcon) {\n expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, expandIcon.className);\n }\n if (iconBefore) {\n iconBefore.className = mergeClasses(treeItemLayoutClassNames.iconBefore, iconStyles.base, iconBeforeStyles[size], iconBefore.className);\n }\n if (iconAfter) {\n iconAfter.className = mergeClasses(treeItemLayoutClassNames.iconAfter, iconStyles.base, iconAfterStyles[size], iconAfter.className);\n }\n if (state.actions) {\n state.actions.className = mergeClasses(treeItemLayoutClassNames.actions, actionsStyles.base, state.actions.className);\n }\n if (state.aside) {\n state.aside.className = mergeClasses(treeItemLayoutClassNames.aside, asideStyles.base, state.aside.className);\n }\n if (state.expandIcon) {\n state.expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, state.expandIcon.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,uBAAuB,QAAQ,4BAA4B;AACpE,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE,oBAAoB;EAC1BC,UAAU,EAAE,gCAAgC;EAC5CC,OAAO,EAAE,6BAA6B;EACtCC,SAAS,EAAE,+BAA+B;EAC1CC,UAAU,EAAE,gCAAgC;EAC5CC,KAAK,EAAE,2BA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B,CAACE,IAAI,CAAC,EAAExE,UAAU,CAAC4E,SAAS,CAAC;EAC3I;EACA,IAAI1E,SAAS,EAAE;IACXA,SAAS,CAAC0E,SAAS,GAAGrF,YAAY,CAACO,wBAAwB,CAACI,SAAS,EAAEmE,UAAU,CAAC9D,IAAI,EAAEgE,eAAe,CAACC,IAAI,CAAC,EAAEtE,SAAS,CAAC0E,SAAS,CAAC;EACvI;EACA,IAAIb,KAAK,CAAC1D,OAAO,EAAE;IACf0D,KAAK,CAAC1D,OAAO,CAACuE,SAAS,GAAGrF,YAAY,CAACO,wBAAwB,CAACO,OAAO,EAAE4D,aAAa,CAAC1D,IAAI,EAAEwD,KAAK,CAAC1D,OAAO,CAACuE,SAAS,CAAC;EACzH;EACA,IAAIb,KAAK,CAAC3D,KAAK,EAAE;IACb2D,KAAK,CAAC3D,KAAK,CAACwE,SAAS,GAAGrF,YAAY,CAACO,wBAAwB,CAACM,KAAK,EAAE8D,WAAW,CAAC3D,IAAI,EAAEwD,KAAK,CAAC3D,KAAK,CAACwE,SAAS,CAAC;EACjH;EACA,IAAIb,KAAK,CAAC5D,UAAU,EAAE;IAClB4D,KAAK,CAAC5D,UAAU,CAACyE,SAAS,GAAGrF,YAAY,CAACO,wBAAwB,CAACK,UAAU,EAAEiE,gBAAgB,CAAC7D,IAAI,EAAEwD,KAAK,CAAC5D,UAAU,CAACyE,SAAS,CAAC;EACrI;EACA,OAAOb,KAAK;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TreeItemPersonaLayout.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { AvatarContextValue, AvatarSize } from '@fluentui/react-avatar';\nimport { ButtonContextValue } from '@fluentui/react-button';\nimport { TreeItemLayoutSlots } from '../TreeItemLayout/TreeItemLayout.types';\n\nexport type TreeItemPersonaLayoutContextValues = {\n avatar: AvatarContextValue;\n};\n\nexport type TreeItemPersonaLayoutSlots = Pick<TreeItemLayoutSlots, 'actions' | 'aside' | 'expandIcon'> & {\n root: NonNullable<Slot<'div'>>;\n /**\n * Avatar to display.\n */\n media: NonNullable<Slot<'div'>>;\n /**\n *
|
|
1
|
+
{"version":3,"sources":["TreeItemPersonaLayout.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { AvatarContextValue, AvatarSize } from '@fluentui/react-avatar';\nimport { ButtonContextValue } from '@fluentui/react-button';\nimport { TreeItemLayoutSlots } from '../TreeItemLayout/TreeItemLayout.types';\n\nexport type TreeItemPersonaLayoutContextValues = {\n avatar: AvatarContextValue;\n};\n\nexport type TreeItemPersonaLayoutSlots = Pick<TreeItemLayoutSlots, 'actions' | 'aside' | 'expandIcon'> & {\n root: NonNullable<Slot<'div'>>;\n /**\n * Avatar to display.\n */\n media: NonNullable<Slot<'div'>>;\n /**\n * Content. Children of the root slot are automatically rendered here\n */\n content: NonNullable<Slot<'div'>>;\n /**\n * Secondary text that describes or complements the content\n */\n description?: Slot<'div'>;\n};\n\n/**\n * TreeItemPersonaLayout Props\n */\nexport type TreeItemPersonaLayoutProps = ComponentProps<Partial<TreeItemPersonaLayoutSlots>>;\n\n/**\n * State used in rendering TreeItemPersonaLayout\n */\nexport type TreeItemPersonaLayoutState = ComponentState<TreeItemPersonaLayoutSlots> & {\n avatarSize: AvatarSize;\n buttonContextValue: ButtonContextValue;\n};\n"],"names":[],"mappings":"AAAA,WAoCE"}
|
|
@@ -8,7 +8,7 @@ import { ButtonContextProvider } from '@fluentui/react-button';
|
|
|
8
8
|
const { slots , slotProps } = getSlotsNext(state);
|
|
9
9
|
return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.expandIcon && /*#__PURE__*/ createElement(slots.expandIcon, slotProps.expandIcon), /*#__PURE__*/ createElement(AvatarContextProvider, {
|
|
10
10
|
value: contextValues.avatar
|
|
11
|
-
}, /*#__PURE__*/ createElement(slots.media, slotProps.media)), /*#__PURE__*/ createElement(slots.
|
|
11
|
+
}, /*#__PURE__*/ createElement(slots.media, slotProps.media)), /*#__PURE__*/ createElement(slots.content, slotProps.content), slots.description && /*#__PURE__*/ createElement(slots.description, slotProps.description), /*#__PURE__*/ createElement(ButtonContextProvider, {
|
|
12
12
|
value: state.buttonContextValue
|
|
13
13
|
}, slots.actions && /*#__PURE__*/ createElement(slots.actions, slotProps.actions), slots.aside && /*#__PURE__*/ createElement(slots.aside, slotProps.aside)));
|
|
14
14
|
};
|