@fluentui/react-infobutton 9.0.0-beta.60 → 9.0.0-beta.64
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 +205 -1
- package/CHANGELOG.md +62 -2
- package/lib/components/InfoLabel/useInfoLabel.js +4 -6
- package/lib/components/InfoLabel/useInfoLabel.js.map +1 -1
- package/lib-commonjs/components/InfoLabel/useInfoLabel.js +4 -6
- package/lib-commonjs/components/InfoLabel/useInfoLabel.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,211 @@
|
|
|
2
2
|
"name": "@fluentui/react-infobutton",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 26 Sep 2023 17:44:11 GMT",
|
|
6
|
+
"tag": "@fluentui/react-infobutton_v9.0.0-beta.64",
|
|
7
|
+
"version": "9.0.0-beta.64",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "yuanboxue@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-infobutton",
|
|
13
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
|
|
14
|
+
"comment": "chore: trigger manual version bump after broken release"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-infobutton",
|
|
19
|
+
"comment": "Bump @fluentui/react-label to v9.1.39",
|
|
20
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-infobutton",
|
|
25
|
+
"comment": "Bump @fluentui/react-popover to v9.8.9",
|
|
26
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-infobutton",
|
|
31
|
+
"comment": "Bump @fluentui/react-portal to v9.3.18",
|
|
32
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-infobutton",
|
|
37
|
+
"comment": "Bump @fluentui/react-tabster to v9.13.1",
|
|
38
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-infobutton",
|
|
43
|
+
"comment": "Bump @fluentui/react-theme to v9.1.14",
|
|
44
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-infobutton",
|
|
49
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.5",
|
|
50
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui/react-infobutton",
|
|
55
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
|
|
56
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"date": "Tue, 26 Sep 2023 15:31:58 GMT",
|
|
63
|
+
"tag": "@fluentui/react-infobutton_v9.0.0-beta.63",
|
|
64
|
+
"version": "9.0.0-beta.63",
|
|
65
|
+
"comments": {
|
|
66
|
+
"prerelease": [
|
|
67
|
+
{
|
|
68
|
+
"author": "martinhochel@microsoft.com",
|
|
69
|
+
"package": "@fluentui/react-infobutton",
|
|
70
|
+
"commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
|
|
71
|
+
"comment": "fix: bump swc core to mitigate transpilation memory leaks"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "ololubek@microsoft.com",
|
|
75
|
+
"package": "@fluentui/react-infobutton",
|
|
76
|
+
"commit": "a31e7394d9f169bc5aa55430a22cdc65425a1b49",
|
|
77
|
+
"comment": "chore: Update react-icons version to pick up IconDirectionContextProvider updated export"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@fluentui/react-infobutton",
|
|
82
|
+
"comment": "Bump @fluentui/react-label to v9.1.38",
|
|
83
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@fluentui/react-infobutton",
|
|
88
|
+
"comment": "Bump @fluentui/react-popover to v9.8.8",
|
|
89
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"author": "beachball",
|
|
93
|
+
"package": "@fluentui/react-infobutton",
|
|
94
|
+
"comment": "Bump @fluentui/react-portal to v9.3.17",
|
|
95
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"author": "beachball",
|
|
99
|
+
"package": "@fluentui/react-infobutton",
|
|
100
|
+
"comment": "Bump @fluentui/react-tabster to v9.13.0",
|
|
101
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"author": "beachball",
|
|
105
|
+
"package": "@fluentui/react-infobutton",
|
|
106
|
+
"comment": "Bump @fluentui/react-theme to v9.1.13",
|
|
107
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"author": "beachball",
|
|
111
|
+
"package": "@fluentui/react-infobutton",
|
|
112
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.4",
|
|
113
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"author": "beachball",
|
|
117
|
+
"package": "@fluentui/react-infobutton",
|
|
118
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
|
|
119
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"date": "Wed, 20 Sep 2023 17:47:37 GMT",
|
|
126
|
+
"tag": "@fluentui/react-infobutton_v9.0.0-beta.62",
|
|
127
|
+
"version": "9.0.0-beta.62",
|
|
128
|
+
"comments": {
|
|
129
|
+
"prerelease": [
|
|
130
|
+
{
|
|
131
|
+
"author": "martinhochel@microsoft.com",
|
|
132
|
+
"package": "@fluentui/react-infobutton",
|
|
133
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0",
|
|
134
|
+
"comment": "chore: trigger manual version bump after broken release"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"author": "beachball",
|
|
138
|
+
"package": "@fluentui/react-infobutton",
|
|
139
|
+
"comment": "Bump @fluentui/react-label to v9.1.37",
|
|
140
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"author": "beachball",
|
|
144
|
+
"package": "@fluentui/react-infobutton",
|
|
145
|
+
"comment": "Bump @fluentui/react-popover to v9.8.7",
|
|
146
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"author": "beachball",
|
|
150
|
+
"package": "@fluentui/react-infobutton",
|
|
151
|
+
"comment": "Bump @fluentui/react-portal to v9.3.16",
|
|
152
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"author": "beachball",
|
|
156
|
+
"package": "@fluentui/react-infobutton",
|
|
157
|
+
"comment": "Bump @fluentui/react-tabster to v9.12.11",
|
|
158
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"author": "beachball",
|
|
162
|
+
"package": "@fluentui/react-infobutton",
|
|
163
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.10",
|
|
164
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"date": "Wed, 20 Sep 2023 14:59:53 GMT",
|
|
171
|
+
"tag": "@fluentui/react-infobutton_v9.0.0-beta.61",
|
|
172
|
+
"version": "9.0.0-beta.61",
|
|
173
|
+
"comments": {
|
|
174
|
+
"prerelease": [
|
|
175
|
+
{
|
|
176
|
+
"author": "beachball",
|
|
177
|
+
"package": "@fluentui/react-infobutton",
|
|
178
|
+
"comment": "Bump @fluentui/react-label to v9.1.36",
|
|
179
|
+
"commit": "c60d4e7169457535c8d23701f6b951d1fff478ab"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"author": "beachball",
|
|
183
|
+
"package": "@fluentui/react-infobutton",
|
|
184
|
+
"comment": "Bump @fluentui/react-popover to v9.8.6",
|
|
185
|
+
"commit": "c60d4e7169457535c8d23701f6b951d1fff478ab"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"author": "beachball",
|
|
189
|
+
"package": "@fluentui/react-infobutton",
|
|
190
|
+
"comment": "Bump @fluentui/react-portal to v9.3.15",
|
|
191
|
+
"commit": "c60d4e7169457535c8d23701f6b951d1fff478ab"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"author": "beachball",
|
|
195
|
+
"package": "@fluentui/react-infobutton",
|
|
196
|
+
"comment": "Bump @fluentui/react-tabster to v9.12.10",
|
|
197
|
+
"commit": "c60d4e7169457535c8d23701f6b951d1fff478ab"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"author": "beachball",
|
|
201
|
+
"package": "@fluentui/react-infobutton",
|
|
202
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.9",
|
|
203
|
+
"commit": "c60d4e7169457535c8d23701f6b951d1fff478ab"
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"date": "Thu, 14 Sep 2023 16:44:47 GMT",
|
|
6
210
|
"tag": "@fluentui/react-infobutton_v9.0.0-beta.60",
|
|
7
211
|
"version": "9.0.0-beta.60",
|
|
8
212
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,72 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-infobutton
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 26 Sep 2023 17:44:11 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-beta.64](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.64)
|
|
8
|
+
|
|
9
|
+
Tue, 26 Sep 2023 17:44:11 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.63..@fluentui/react-infobutton_v9.0.0-beta.64)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-label to v9.1.39 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
16
|
+
- Bump @fluentui/react-popover to v9.8.9 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
17
|
+
- Bump @fluentui/react-portal to v9.3.18 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
18
|
+
- Bump @fluentui/react-tabster to v9.13.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
19
|
+
- Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
20
|
+
- Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
21
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
22
|
+
|
|
23
|
+
## [9.0.0-beta.63](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.63)
|
|
24
|
+
|
|
25
|
+
Tue, 26 Sep 2023 15:31:58 GMT
|
|
26
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.62..@fluentui/react-infobutton_v9.0.0-beta.63)
|
|
27
|
+
|
|
28
|
+
### Changes
|
|
29
|
+
|
|
30
|
+
- fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
|
|
31
|
+
- chore: Update react-icons version to pick up IconDirectionContextProvider updated export ([PR #29151](https://github.com/microsoft/fluentui/pull/29151) by ololubek@microsoft.com)
|
|
32
|
+
- Bump @fluentui/react-label to v9.1.38 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
33
|
+
- Bump @fluentui/react-popover to v9.8.8 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
34
|
+
- Bump @fluentui/react-portal to v9.3.17 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
35
|
+
- Bump @fluentui/react-tabster to v9.13.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
36
|
+
- Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
37
|
+
- Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
38
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
39
|
+
|
|
40
|
+
## [9.0.0-beta.62](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.62)
|
|
41
|
+
|
|
42
|
+
Wed, 20 Sep 2023 17:47:37 GMT
|
|
43
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.61..@fluentui/react-infobutton_v9.0.0-beta.62)
|
|
44
|
+
|
|
45
|
+
### Changes
|
|
46
|
+
|
|
47
|
+
- chore: trigger manual version bump after broken release ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by martinhochel@microsoft.com)
|
|
48
|
+
- Bump @fluentui/react-label to v9.1.37 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
49
|
+
- Bump @fluentui/react-popover to v9.8.7 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
50
|
+
- Bump @fluentui/react-portal to v9.3.16 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
51
|
+
- Bump @fluentui/react-tabster to v9.12.11 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
52
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.10 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
53
|
+
|
|
54
|
+
## [9.0.0-beta.61](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.61)
|
|
55
|
+
|
|
56
|
+
Wed, 20 Sep 2023 14:59:53 GMT
|
|
57
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.60..@fluentui/react-infobutton_v9.0.0-beta.61)
|
|
58
|
+
|
|
59
|
+
### Changes
|
|
60
|
+
|
|
61
|
+
- Bump @fluentui/react-label to v9.1.36 ([PR #29193](https://github.com/microsoft/fluentui/pull/29193) by beachball)
|
|
62
|
+
- Bump @fluentui/react-popover to v9.8.6 ([PR #29193](https://github.com/microsoft/fluentui/pull/29193) by beachball)
|
|
63
|
+
- Bump @fluentui/react-portal to v9.3.15 ([PR #29193](https://github.com/microsoft/fluentui/pull/29193) by beachball)
|
|
64
|
+
- Bump @fluentui/react-tabster to v9.12.10 ([PR #29193](https://github.com/microsoft/fluentui/pull/29193) by beachball)
|
|
65
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.9 ([PR #29193](https://github.com/microsoft/fluentui/pull/29193) by beachball)
|
|
66
|
+
|
|
7
67
|
## [9.0.0-beta.60](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.60)
|
|
8
68
|
|
|
9
|
-
Thu, 14 Sep 2023 16:
|
|
69
|
+
Thu, 14 Sep 2023 16:44:47 GMT
|
|
10
70
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.59..@fluentui/react-infobutton_v9.0.0-beta.60)
|
|
11
71
|
|
|
12
72
|
### Changes
|
|
@@ -11,7 +11,6 @@ import { InfoButton } from '../InfoButton/InfoButton';
|
|
|
11
11
|
* @param props - props from this instance of InfoLabel
|
|
12
12
|
* @param ref - reference to label element of InfoLabel
|
|
13
13
|
*/ export const useInfoLabel_unstable = (props, ref)=>{
|
|
14
|
-
var _infoButton;
|
|
15
14
|
const { root: rootShorthand, label: labelShorthand, infoButton: infoButtonShorthand, info, size, className, style, ...labelProps } = props;
|
|
16
15
|
const baseId = useId('infolabel-');
|
|
17
16
|
const [open, setOpen] = React.useState(false);
|
|
@@ -40,24 +39,23 @@ import { InfoButton } from '../InfoButton/InfoButton';
|
|
|
40
39
|
},
|
|
41
40
|
elementType: InfoButton
|
|
42
41
|
});
|
|
43
|
-
const infoButtonPopover = slot.always(
|
|
42
|
+
const infoButtonPopover = slot.always(infoButton === null || infoButton === void 0 ? void 0 : infoButton.popover, {
|
|
44
43
|
elementType: 'div'
|
|
45
44
|
});
|
|
46
45
|
infoButtonPopover.onOpenChange = useEventCallback(mergeCallbacks(infoButtonPopover.onOpenChange, (e, data)=>{
|
|
47
46
|
setOpen(data.open);
|
|
48
47
|
}));
|
|
49
48
|
if (infoButton) {
|
|
50
|
-
var
|
|
51
|
-
var _infoButton2, _arialabelledby;
|
|
49
|
+
var _infoButton, _arialabelledby;
|
|
52
50
|
infoButton.popover = infoButtonPopover;
|
|
53
|
-
infoButton.info = slot.optional(
|
|
51
|
+
infoButton.info = slot.optional(infoButton === null || infoButton === void 0 ? void 0 : infoButton.info, {
|
|
54
52
|
defaultProps: {
|
|
55
53
|
id: baseId + '__info'
|
|
56
54
|
},
|
|
57
55
|
elementType: 'div'
|
|
58
56
|
});
|
|
59
57
|
var _;
|
|
60
|
-
(_ = (
|
|
58
|
+
(_ = (_infoButton = infoButton)[_arialabelledby = 'aria-labelledby']) !== null && _ !== void 0 ? _ : _infoButton[_arialabelledby] = `${label.id} ${infoButton.id}`;
|
|
61
59
|
if (open) {
|
|
62
60
|
var _infoButton_info;
|
|
63
61
|
var _root, _ariaowns;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useInfoLabel.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { Label } from '@fluentui/react-label';\nimport { mergeCallbacks, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { InfoButton } from '../InfoButton/InfoButton';\nimport type { InfoLabelProps, InfoLabelState } from './InfoLabel.types';\n\n/**\n * Create the state required to render InfoLabel.\n *\n * The returned state can be modified with hooks such as useInfoLabelStyles_unstable,\n * before being passed to renderInfoLabel_unstable.\n *\n * @param props - props from this instance of InfoLabel\n * @param ref - reference to label element of InfoLabel\n */\nexport const useInfoLabel_unstable = (props: InfoLabelProps, ref: React.Ref<HTMLLabelElement>): InfoLabelState => {\n const {\n root: rootShorthand,\n label: labelShorthand,\n infoButton: infoButtonShorthand,\n info,\n size,\n className,\n style,\n ...labelProps\n } = props;\n const baseId = useId('infolabel-');\n const [open, setOpen] = React.useState(false);\n\n const root = slot.always(rootShorthand, {\n defaultProps: {\n className,\n style,\n },\n elementType: 'span',\n });\n\n const label = slot.always(labelShorthand, {\n defaultProps: {\n id: baseId + '__label',\n ref,\n size,\n ...labelProps,\n },\n elementType: Label,\n });\n\n const infoButton = slot.optional(infoButtonShorthand, {\n renderByDefault: !!info,\n defaultProps: {\n id: baseId + '__infoButton',\n size,\n info,\n },\n elementType: InfoButton,\n });\n\n const infoButtonPopover = slot.always(infoButton?.popover, {\n elementType: 'div',\n });\n infoButtonPopover.onOpenChange = useEventCallback(\n mergeCallbacks(infoButtonPopover.onOpenChange, (e, data) => {\n setOpen(data.open);\n }),\n );\n\n if (infoButton) {\n infoButton.popover = infoButtonPopover;\n infoButton.info = slot.optional(infoButton?.info, {\n defaultProps: {\n id: baseId + '__info',\n },\n elementType: 'div',\n });\n\n infoButton['aria-labelledby'] ??= `${label.id} ${infoButton.id}`;\n\n if (open) {\n root['aria-owns'] ??= infoButton.info?.id;\n }\n }\n\n return {\n size,\n components: {\n root: 'span',\n label: Label,\n infoButton: InfoButton,\n },\n root,\n label,\n infoButton,\n };\n};\n"],"names":["React","Label","mergeCallbacks","useEventCallback","useId","slot","InfoButton","useInfoLabel_unstable","props","ref","
|
|
1
|
+
{"version":3,"sources":["useInfoLabel.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { Label } from '@fluentui/react-label';\nimport { mergeCallbacks, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { InfoButton } from '../InfoButton/InfoButton';\nimport type { InfoLabelProps, InfoLabelState } from './InfoLabel.types';\n\n/**\n * Create the state required to render InfoLabel.\n *\n * The returned state can be modified with hooks such as useInfoLabelStyles_unstable,\n * before being passed to renderInfoLabel_unstable.\n *\n * @param props - props from this instance of InfoLabel\n * @param ref - reference to label element of InfoLabel\n */\nexport const useInfoLabel_unstable = (props: InfoLabelProps, ref: React.Ref<HTMLLabelElement>): InfoLabelState => {\n const {\n root: rootShorthand,\n label: labelShorthand,\n infoButton: infoButtonShorthand,\n info,\n size,\n className,\n style,\n ...labelProps\n } = props;\n const baseId = useId('infolabel-');\n const [open, setOpen] = React.useState(false);\n\n const root = slot.always(rootShorthand, {\n defaultProps: {\n className,\n style,\n },\n elementType: 'span',\n });\n\n const label = slot.always(labelShorthand, {\n defaultProps: {\n id: baseId + '__label',\n ref,\n size,\n ...labelProps,\n },\n elementType: Label,\n });\n\n const infoButton = slot.optional(infoButtonShorthand, {\n renderByDefault: !!info,\n defaultProps: {\n id: baseId + '__infoButton',\n size,\n info,\n },\n elementType: InfoButton,\n });\n\n const infoButtonPopover = slot.always(infoButton?.popover, {\n elementType: 'div',\n });\n infoButtonPopover.onOpenChange = useEventCallback(\n mergeCallbacks(infoButtonPopover.onOpenChange, (e, data) => {\n setOpen(data.open);\n }),\n );\n\n if (infoButton) {\n infoButton.popover = infoButtonPopover;\n infoButton.info = slot.optional(infoButton?.info, {\n defaultProps: {\n id: baseId + '__info',\n },\n elementType: 'div',\n });\n\n infoButton['aria-labelledby'] ??= `${label.id} ${infoButton.id}`;\n\n if (open) {\n root['aria-owns'] ??= infoButton.info?.id;\n }\n }\n\n return {\n size,\n components: {\n root: 'span',\n label: Label,\n infoButton: InfoButton,\n },\n root,\n label,\n infoButton,\n };\n};\n"],"names":["React","Label","mergeCallbacks","useEventCallback","useId","slot","InfoButton","useInfoLabel_unstable","props","ref","root","rootShorthand","label","labelShorthand","infoButton","infoButtonShorthand","info","size","className","style","labelProps","baseId","open","setOpen","useState","always","defaultProps","elementType","id","optional","renderByDefault","infoButtonPopover","popover","onOpenChange","e","data","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,cAAc,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,UAAU,QAAQ,2BAA2B;AAGtD;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EACJC,MAAMC,aAAa,EACnBC,OAAOC,cAAc,EACrBC,YAAYC,mBAAmB,EAC/BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,KAAK,EACL,GAAGC,YACJ,GAAGZ;IACJ,MAAMa,SAASjB,MAAM;IACrB,MAAM,CAACkB,MAAMC,QAAQ,GAAGvB,MAAMwB,QAAQ,CAAC;IAEvC,MAAMd,OAAOL,KAAKoB,MAAM,CAACd,eAAe;QACtCe,cAAc;YACZR;YACAC;QACF;QACAQ,aAAa;IACf;IAEA,MAAMf,QAAQP,KAAKoB,MAAM,CAACZ,gBAAgB;QACxCa,cAAc;YACZE,IAAIP,SAAS;YACbZ;YACAQ;YACA,GAAGG,UAAU;QACf;QACAO,aAAa1B;IACf;IAEA,MAAMa,aAAaT,KAAKwB,QAAQ,CAACd,qBAAqB;QACpDe,iBAAiB,CAAC,CAACd;QACnBU,cAAc;YACZE,IAAIP,SAAS;YACbJ;YACAD;QACF;QACAW,aAAarB;IACf;IAEA,MAAMyB,oBAAoB1B,KAAKoB,MAAM,CAACX,uBAAAA,iCAAAA,WAAYkB,OAAO,EAAE;QACzDL,aAAa;IACf;IACAI,kBAAkBE,YAAY,GAAG9B,iBAC/BD,eAAe6B,kBAAkBE,YAAY,EAAE,CAACC,GAAGC;QACjDZ,QAAQY,KAAKb,IAAI;IACnB;IAGF,IAAIR,YAAY;YASdA,aAAW;QARXA,WAAWkB,OAAO,GAAGD;QACrBjB,WAAWE,IAAI,GAAGX,KAAKwB,QAAQ,CAACf,uBAAAA,iCAAAA,WAAYE,IAAI,EAAE;YAChDU,cAAc;gBACZE,IAAIP,SAAS;YACf;YACAM,aAAa;QACf;;QAEAb,MAAAA,cAAAA,WAAU,CAAC,kBAAA,kBAAkB,iCAA7BA,WAAU,CAAC,gBAAkB,GAAK,CAAC,EAAEF,MAAMgB,EAAE,CAAC,CAAC,EAAEd,WAAWc,EAAE,CAAC,CAAC;QAEhE,IAAIN,MAAM;gBACcR;gBAAtBJ,OAAK;;YAALA,OAAAA,QAAAA,KAAI,CAAC,YAAA,YAAY,mCAAjBA,KAAI,CAAC,UAAY,IAAKI,mBAAAA,WAAWE,IAAI,cAAfF,uCAAAA,iBAAiBc,EAAE;QAC3C;IACF;IAEA,OAAO;QACLX;QACAmB,YAAY;YACV1B,MAAM;YACNE,OAAOX;YACPa,YAAYR;QACd;QACAI;QACAE;QACAE;IACF;AACF,EAAE"}
|
|
@@ -14,7 +14,6 @@ const _reactlabel = require("@fluentui/react-label");
|
|
|
14
14
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
15
15
|
const _InfoButton = require("../InfoButton/InfoButton");
|
|
16
16
|
const useInfoLabel_unstable = (props, ref)=>{
|
|
17
|
-
var _infoButton;
|
|
18
17
|
const { root: rootShorthand, label: labelShorthand, infoButton: infoButtonShorthand, info, size, className, style, ...labelProps } = props;
|
|
19
18
|
const baseId = (0, _reactutilities.useId)('infolabel-');
|
|
20
19
|
const [open, setOpen] = _react.useState(false);
|
|
@@ -43,24 +42,23 @@ const useInfoLabel_unstable = (props, ref)=>{
|
|
|
43
42
|
},
|
|
44
43
|
elementType: _InfoButton.InfoButton
|
|
45
44
|
});
|
|
46
|
-
const infoButtonPopover = _reactutilities.slot.always(
|
|
45
|
+
const infoButtonPopover = _reactutilities.slot.always(infoButton === null || infoButton === void 0 ? void 0 : infoButton.popover, {
|
|
47
46
|
elementType: 'div'
|
|
48
47
|
});
|
|
49
48
|
infoButtonPopover.onOpenChange = (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(infoButtonPopover.onOpenChange, (e, data)=>{
|
|
50
49
|
setOpen(data.open);
|
|
51
50
|
}));
|
|
52
51
|
if (infoButton) {
|
|
53
|
-
var
|
|
54
|
-
var _infoButton2, _arialabelledby;
|
|
52
|
+
var _infoButton, _arialabelledby;
|
|
55
53
|
infoButton.popover = infoButtonPopover;
|
|
56
|
-
infoButton.info = _reactutilities.slot.optional(
|
|
54
|
+
infoButton.info = _reactutilities.slot.optional(infoButton === null || infoButton === void 0 ? void 0 : infoButton.info, {
|
|
57
55
|
defaultProps: {
|
|
58
56
|
id: baseId + '__info'
|
|
59
57
|
},
|
|
60
58
|
elementType: 'div'
|
|
61
59
|
});
|
|
62
60
|
var _;
|
|
63
|
-
(_ = (
|
|
61
|
+
(_ = (_infoButton = infoButton)[_arialabelledby = 'aria-labelledby']) !== null && _ !== void 0 ? _ : _infoButton[_arialabelledby] = `${label.id} ${infoButton.id}`;
|
|
64
62
|
if (open) {
|
|
65
63
|
var _infoButton_info;
|
|
66
64
|
var _root, _ariaowns;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useInfoLabel.js"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport { mergeCallbacks, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { InfoButton } from '../InfoButton/InfoButton';\n/**\n * Create the state required to render InfoLabel.\n *\n * The returned state can be modified with hooks such as useInfoLabelStyles_unstable,\n * before being passed to renderInfoLabel_unstable.\n *\n * @param props - props from this instance of InfoLabel\n * @param ref - reference to label element of InfoLabel\n */ export const useInfoLabel_unstable = (props, ref)=>{\n
|
|
1
|
+
{"version":3,"sources":["useInfoLabel.js"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport { mergeCallbacks, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { InfoButton } from '../InfoButton/InfoButton';\n/**\n * Create the state required to render InfoLabel.\n *\n * The returned state can be modified with hooks such as useInfoLabelStyles_unstable,\n * before being passed to renderInfoLabel_unstable.\n *\n * @param props - props from this instance of InfoLabel\n * @param ref - reference to label element of InfoLabel\n */ export const useInfoLabel_unstable = (props, ref)=>{\n const { root: rootShorthand, label: labelShorthand, infoButton: infoButtonShorthand, info, size, className, style, ...labelProps } = props;\n const baseId = useId('infolabel-');\n const [open, setOpen] = React.useState(false);\n const root = slot.always(rootShorthand, {\n defaultProps: {\n className,\n style\n },\n elementType: 'span'\n });\n const label = slot.always(labelShorthand, {\n defaultProps: {\n id: baseId + '__label',\n ref,\n size,\n ...labelProps\n },\n elementType: Label\n });\n const infoButton = slot.optional(infoButtonShorthand, {\n renderByDefault: !!info,\n defaultProps: {\n id: baseId + '__infoButton',\n size,\n info\n },\n elementType: InfoButton\n });\n const infoButtonPopover = slot.always(infoButton === null || infoButton === void 0 ? void 0 : infoButton.popover, {\n elementType: 'div'\n });\n infoButtonPopover.onOpenChange = useEventCallback(mergeCallbacks(infoButtonPopover.onOpenChange, (e, data)=>{\n setOpen(data.open);\n }));\n if (infoButton) {\n var _infoButton, _arialabelledby;\n infoButton.popover = infoButtonPopover;\n infoButton.info = slot.optional(infoButton === null || infoButton === void 0 ? void 0 : infoButton.info, {\n defaultProps: {\n id: baseId + '__info'\n },\n elementType: 'div'\n });\n var _;\n (_ = (_infoButton = infoButton)[_arialabelledby = 'aria-labelledby']) !== null && _ !== void 0 ? _ : _infoButton[_arialabelledby] = `${label.id} ${infoButton.id}`;\n if (open) {\n var _infoButton_info;\n var _root, _ariaowns;\n var _1;\n (_1 = (_root = root)[_ariaowns = 'aria-owns']) !== null && _1 !== void 0 ? _1 : _root[_ariaowns] = (_infoButton_info = infoButton.info) === null || _infoButton_info === void 0 ? void 0 : _infoButton_info.id;\n }\n }\n return {\n size,\n components: {\n root: 'span',\n label: Label,\n infoButton: InfoButton\n },\n root,\n label,\n infoButton\n };\n};\n"],"names":["useInfoLabel_unstable","props","ref","root","rootShorthand","label","labelShorthand","infoButton","infoButtonShorthand","info","size","className","style","labelProps","baseId","useId","open","setOpen","React","useState","slot","always","defaultProps","elementType","id","Label","optional","renderByDefault","InfoButton","infoButtonPopover","popover","onOpenChange","useEventCallback","mergeCallbacks","e","data","_infoButton","_arialabelledby","_","_infoButton_info","_root","_ariaowns","_1","components"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;4BACD;gCACwC;4BACnC;AAShB,MAAMA,wBAAwB,CAACC,OAAOC;IAC7C,MAAM,EAAEC,MAAMC,aAAa,EAAEC,OAAOC,cAAc,EAAEC,YAAYC,mBAAmB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGC,YAAY,GAAGZ;IACrI,MAAMa,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAM,CAACC,MAAMC,QAAQ,GAAGC,OAAMC,QAAQ,CAAC;IACvC,MAAMhB,OAAOiB,oBAAI,CAACC,MAAM,CAACjB,eAAe;QACpCkB,cAAc;YACVX;YACAC;QACJ;QACAW,aAAa;IACjB;IACA,MAAMlB,QAAQe,oBAAI,CAACC,MAAM,CAACf,gBAAgB;QACtCgB,cAAc;YACVE,IAAIV,SAAS;YACbZ;YACAQ;YACA,GAAGG,UAAU;QACjB;QACAU,aAAaE,iBAAK;IACtB;IACA,MAAMlB,aAAaa,oBAAI,CAACM,QAAQ,CAAClB,qBAAqB;QAClDmB,iBAAiB,CAAC,CAAClB;QACnBa,cAAc;YACVE,IAAIV,SAAS;YACbJ;YACAD;QACJ;QACAc,aAAaK,sBAAU;IAC3B;IACA,MAAMC,oBAAoBT,oBAAI,CAACC,MAAM,CAACd,eAAe,QAAQA,eAAe,KAAK,IAAI,KAAK,IAAIA,WAAWuB,OAAO,EAAE;QAC9GP,aAAa;IACjB;IACAM,kBAAkBE,YAAY,GAAGC,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACJ,kBAAkBE,YAAY,EAAE,CAACG,GAAGC;QACjGlB,QAAQkB,KAAKnB,IAAI;IACrB;IACA,IAAIT,YAAY;QACZ,IAAI6B,aAAaC;QACjB9B,WAAWuB,OAAO,GAAGD;QACrBtB,WAAWE,IAAI,GAAGW,oBAAI,CAACM,QAAQ,CAACnB,eAAe,QAAQA,eAAe,KAAK,IAAI,KAAK,IAAIA,WAAWE,IAAI,EAAE;YACrGa,cAAc;gBACVE,IAAIV,SAAS;YACjB;YACAS,aAAa;QACjB;QACA,IAAIe;QACHA,CAAAA,IAAI,AAACF,CAAAA,cAAc7B,UAAS,CAAE,CAAC8B,kBAAkB,kBAAkB,AAAD,MAAO,QAAQC,MAAM,KAAK,IAAIA,IAAIF,WAAW,CAACC,gBAAgB,GAAG,CAAC,EAAEhC,MAAMmB,EAAE,CAAC,CAAC,EAAEjB,WAAWiB,EAAE,CAAC,CAAC;QAClK,IAAIR,MAAM;YACN,IAAIuB;YACJ,IAAIC,OAAOC;YACX,IAAIC;YACHA,CAAAA,KAAK,AAACF,CAAAA,QAAQrC,IAAG,CAAE,CAACsC,YAAY,YAAY,AAAD,MAAO,QAAQC,OAAO,KAAK,IAAIA,KAAKF,KAAK,CAACC,UAAU,GAAG,AAACF,CAAAA,mBAAmBhC,WAAWE,IAAI,AAAD,MAAO,QAAQ8B,qBAAqB,KAAK,IAAI,KAAK,IAAIA,iBAAiBf,EAAE;QAClN;IACJ;IACA,OAAO;QACHd;QACAiC,YAAY;YACRxC,MAAM;YACNE,OAAOoB,iBAAK;YACZlB,YAAYqB,sBAAU;QAC1B;QACAzB;QACAE;QACAE;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-infobutton",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.64",
|
|
4
4
|
"description": "React components for building web experiences",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"@fluentui/scripts-tasks": "*"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@fluentui/react-icons": "^2.0.
|
|
39
|
-
"@fluentui/react-label": "^9.1.
|
|
40
|
-
"@fluentui/react-popover": "^9.8.
|
|
41
|
-
"@fluentui/react-portal": "^9.3.
|
|
42
|
-
"@fluentui/react-tabster": "^9.
|
|
43
|
-
"@fluentui/react-theme": "^9.1.
|
|
44
|
-
"@fluentui/react-utilities": "^9.13.
|
|
45
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
38
|
+
"@fluentui/react-icons": "^2.0.217",
|
|
39
|
+
"@fluentui/react-label": "^9.1.39",
|
|
40
|
+
"@fluentui/react-popover": "^9.8.9",
|
|
41
|
+
"@fluentui/react-portal": "^9.3.18",
|
|
42
|
+
"@fluentui/react-tabster": "^9.13.1",
|
|
43
|
+
"@fluentui/react-theme": "^9.1.14",
|
|
44
|
+
"@fluentui/react-utilities": "^9.13.5",
|
|
45
|
+
"@fluentui/react-jsx-runtime": "^9.0.12",
|
|
46
46
|
"@griffel/react": "^1.5.14",
|
|
47
47
|
"@swc/helpers": "^0.5.1"
|
|
48
48
|
},
|