@fluentui/react-dialog 9.7.0 → 9.7.3
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 +210 -9
- package/CHANGELOG.md +55 -2
- package/dist/index.d.ts +1 -1
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/useDialog.js +1 -2
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js +12 -19
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.styles.js +7 -25
- package/lib/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.styles.js +3 -27
- package/lib/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +2 -2
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js +23 -94
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitleStyles.styles.js +12 -83
- package/lib/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js +5 -6
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js +4 -2
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +1 -2
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js +12 -31
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js +8 -42
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js +5 -58
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +2 -2
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js +40 -273
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js +27 -211
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +5 -6
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js +4 -2
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/package.json +11 -11
|
@@ -26,227 +26,43 @@ const dialogTitleClassNames = {
|
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Styles for the root slot
|
|
29
|
-
*/ const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Bw0ie65: "fz1yyy6",
|
|
35
|
-
Bahqtrf: "fk6fouc",
|
|
36
|
-
Be2twd7: "f1pp30po",
|
|
37
|
-
Bhrd7zp: "fl43uef",
|
|
38
|
-
Bg96gwp: "f106mvju",
|
|
39
|
-
B6of3ja: "f1hu3pq6",
|
|
40
|
-
t21cq0: [
|
|
41
|
-
"f11qmguv",
|
|
42
|
-
"f1tyq0we"
|
|
43
|
-
],
|
|
44
|
-
jrapky: "f19f4twv",
|
|
45
|
-
Frg6f3: [
|
|
46
|
-
"f1tyq0we",
|
|
47
|
-
"f11qmguv"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
29
|
+
*/ const useRootResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("rztv7rx", "rt0yqbx", [
|
|
30
|
+
".rztv7rx{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase500);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase500);margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;grid-row-start:1;grid-row-end:1;grid-column-start:1;grid-column-end:3;}",
|
|
31
|
+
".rt0yqbx{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase500);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase500);margin-top:0;margin-left:0;margin-bottom:0;margin-right:0;grid-row-start:1;grid-row-end:1;grid-column-start:1;grid-column-end:3;}"
|
|
32
|
+
]);
|
|
33
|
+
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
50
34
|
rootWithoutAction: {
|
|
51
35
|
Bw0ie65: "fsyjsko"
|
|
52
|
-
},
|
|
53
|
-
action: {
|
|
54
|
-
Ijaq50: "f16hsg94",
|
|
55
|
-
nk6f5a: "f1amvztq",
|
|
56
|
-
Br312pm: "fis13di",
|
|
57
|
-
Bdqf98w: "f1a7i8kp",
|
|
58
|
-
qb2dma: "f9h729m"
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
d: [
|
|
62
|
-
".f16hsg94{grid-row-start:1;}",
|
|
63
|
-
".f1amvztq{grid-row-end:1;}",
|
|
64
|
-
".fwpfdsa{grid-column-start:1;}",
|
|
65
|
-
".fz1yyy6{grid-column-end:3;}",
|
|
66
|
-
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
67
|
-
".f1pp30po{font-size:var(--fontSizeBase500);}",
|
|
68
|
-
".fl43uef{font-weight:var(--fontWeightSemibold);}",
|
|
69
|
-
".f106mvju{line-height:var(--lineHeightBase500);}",
|
|
70
|
-
".f1hu3pq6{margin-top:0;}",
|
|
71
|
-
".f11qmguv{margin-right:0;}",
|
|
72
|
-
".f1tyq0we{margin-left:0;}",
|
|
73
|
-
".f19f4twv{margin-bottom:0;}",
|
|
74
|
-
".fsyjsko{grid-column-end:4;}",
|
|
75
|
-
".fis13di{grid-column-start:3;}",
|
|
76
|
-
".f1a7i8kp{justify-self:end;}",
|
|
77
|
-
".f9h729m{align-self:start;}"
|
|
78
|
-
]
|
|
79
|
-
});
|
|
80
|
-
const useDialogTitleInternalStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
81
|
-
button: {
|
|
82
|
-
qhf8xq: "f10pi13n",
|
|
83
|
-
B7ck84d: "f1e4lqlz",
|
|
84
|
-
De3pzq: "f1u2r49w",
|
|
85
|
-
sj55zd: "f1ym3bx4",
|
|
86
|
-
Bahqtrf: "f1mo0ibp",
|
|
87
|
-
Be2twd7: "fjoy568",
|
|
88
|
-
Bceei9c: "f1k6fduh",
|
|
89
|
-
Bg96gwp: "fez10in",
|
|
90
|
-
B68tc82: "f1mtd64y",
|
|
91
|
-
Bmxbyg5: "f1y7q3j9",
|
|
92
|
-
z8tnut: "f1g0x7ka",
|
|
93
|
-
z189sj: [
|
|
94
|
-
"fhxju0i",
|
|
95
|
-
"f1cnd47f"
|
|
96
|
-
],
|
|
97
|
-
Byoj8tv: "f1qch9an",
|
|
98
|
-
uwmqm3: [
|
|
99
|
-
"f1cnd47f",
|
|
100
|
-
"fhxju0i"
|
|
101
|
-
],
|
|
102
|
-
icvyot: "f1ern45e",
|
|
103
|
-
vrafjx: [
|
|
104
|
-
"f1n71otn",
|
|
105
|
-
"f1deefiw"
|
|
106
|
-
],
|
|
107
|
-
oivjwe: "f1h8hb77",
|
|
108
|
-
wvpqe5: [
|
|
109
|
-
"f1deefiw",
|
|
110
|
-
"f1n71otn"
|
|
111
|
-
],
|
|
112
|
-
Bv0vk6g: "f37px4s",
|
|
113
|
-
fsow6f: "fgusgyc",
|
|
114
|
-
Brovlpu: "ftqa4ok",
|
|
115
|
-
B486eqv: "f2hkw1w",
|
|
116
|
-
B8q5s1w: "f8hki3x",
|
|
117
|
-
Bci5o5g: [
|
|
118
|
-
"f1d2448m",
|
|
119
|
-
"ffh67wi"
|
|
120
|
-
],
|
|
121
|
-
n8qw10: "f1bjia2o",
|
|
122
|
-
Bdrgwmp: [
|
|
123
|
-
"ffh67wi",
|
|
124
|
-
"f1d2448m"
|
|
125
|
-
],
|
|
126
|
-
Bm4h7ae: "f15bsgw9",
|
|
127
|
-
B7ys5i9: "f14e48fq",
|
|
128
|
-
Busjfv9: "f18yb2kv",
|
|
129
|
-
Bhk32uz: "fd6o370",
|
|
130
|
-
Bf4ptjt: "fh1cnn4",
|
|
131
|
-
kclons: [
|
|
132
|
-
"fy7oxxb",
|
|
133
|
-
"f184ne2d"
|
|
134
|
-
],
|
|
135
|
-
Bhdgwq3: "fpukqih",
|
|
136
|
-
Blkhhs4: [
|
|
137
|
-
"f184ne2d",
|
|
138
|
-
"fy7oxxb"
|
|
139
|
-
],
|
|
140
|
-
Bqtpl0w: "frrh606",
|
|
141
|
-
clg4pj: [
|
|
142
|
-
"f1v5zibi",
|
|
143
|
-
"fo2hd23"
|
|
144
|
-
],
|
|
145
|
-
hgwjuy: "ful5kiu",
|
|
146
|
-
Bonggc9: [
|
|
147
|
-
"fo2hd23",
|
|
148
|
-
"f1v5zibi"
|
|
149
|
-
],
|
|
150
|
-
B1tsrr9: [
|
|
151
|
-
"f1jqcqds",
|
|
152
|
-
"ftffrms"
|
|
153
|
-
],
|
|
154
|
-
Dah5zi: [
|
|
155
|
-
"ftffrms",
|
|
156
|
-
"f1jqcqds"
|
|
157
|
-
],
|
|
158
|
-
Bkh64rk: [
|
|
159
|
-
"f2e7qr6",
|
|
160
|
-
"fsr1zz6"
|
|
161
|
-
],
|
|
162
|
-
qqdqy8: [
|
|
163
|
-
"fsr1zz6",
|
|
164
|
-
"f2e7qr6"
|
|
165
|
-
],
|
|
166
|
-
B6dhp37: "f1dvezut",
|
|
167
|
-
i03rao: [
|
|
168
|
-
"fd0oaoj",
|
|
169
|
-
"f1cwg4i8"
|
|
170
|
-
],
|
|
171
|
-
Boxcth7: "fjvm52t",
|
|
172
|
-
Bsom6fd: [
|
|
173
|
-
"f1cwg4i8",
|
|
174
|
-
"fd0oaoj"
|
|
175
|
-
],
|
|
176
|
-
J0r882: "f57olzd",
|
|
177
|
-
Bule8hv: [
|
|
178
|
-
"f4stah7",
|
|
179
|
-
"fs1por5"
|
|
180
|
-
],
|
|
181
|
-
Bjwuhne: "f480a47",
|
|
182
|
-
Ghsupd: [
|
|
183
|
-
"fs1por5",
|
|
184
|
-
"f4stah7"
|
|
185
|
-
]
|
|
186
36
|
}
|
|
187
37
|
}, {
|
|
188
38
|
d: [
|
|
189
|
-
".
|
|
190
|
-
".f1e4lqlz{box-sizing:content-box;}",
|
|
191
|
-
".f1u2r49w{background-color:inherit;}",
|
|
192
|
-
".f1ym3bx4{color:inherit;}",
|
|
193
|
-
".f1mo0ibp{font-family:inherit;}",
|
|
194
|
-
".fjoy568{font-size:inherit;}",
|
|
195
|
-
".f1k6fduh{cursor:pointer;}",
|
|
196
|
-
".fez10in{line-height:0;}",
|
|
197
|
-
".f1mtd64y{overflow-x:visible;}",
|
|
198
|
-
".f1y7q3j9{overflow-y:visible;}",
|
|
199
|
-
".f1g0x7ka{padding-top:0;}",
|
|
200
|
-
".fhxju0i{padding-right:0;}",
|
|
201
|
-
".f1cnd47f{padding-left:0;}",
|
|
202
|
-
".f1qch9an{padding-bottom:0;}",
|
|
203
|
-
".f1ern45e{border-top-style:none;}",
|
|
204
|
-
".f1n71otn{border-right-style:none;}",
|
|
205
|
-
".f1deefiw{border-left-style:none;}",
|
|
206
|
-
".f1h8hb77{border-bottom-style:none;}",
|
|
207
|
-
".f37px4s{-webkit-appearance:button;}",
|
|
208
|
-
".fgusgyc{text-align:unset;}",
|
|
209
|
-
".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",
|
|
210
|
-
".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",
|
|
211
|
-
".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",
|
|
212
|
-
".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",
|
|
213
|
-
".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}",
|
|
214
|
-
".f14e48fq[data-fui-focus-visible]::after{position:absolute;}",
|
|
215
|
-
".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}",
|
|
216
|
-
".fd6o370[data-fui-focus-visible]::after{z-index:1;}",
|
|
217
|
-
".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}",
|
|
218
|
-
".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}",
|
|
219
|
-
".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}",
|
|
220
|
-
".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}",
|
|
221
|
-
".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}",
|
|
222
|
-
".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}",
|
|
223
|
-
".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}",
|
|
224
|
-
".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}",
|
|
225
|
-
".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
|
226
|
-
".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
|
227
|
-
".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}",
|
|
228
|
-
".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}",
|
|
229
|
-
".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}",
|
|
230
|
-
".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}",
|
|
231
|
-
".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}",
|
|
232
|
-
".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}",
|
|
233
|
-
".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}",
|
|
234
|
-
".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}",
|
|
235
|
-
".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}",
|
|
236
|
-
".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}"
|
|
237
|
-
],
|
|
238
|
-
f: [
|
|
239
|
-
".ftqa4ok:focus{outline-style:none;}"
|
|
240
|
-
],
|
|
241
|
-
i: [
|
|
242
|
-
".f2hkw1w:focus-visible{outline-style:none;}"
|
|
39
|
+
".fsyjsko{grid-column-end:4;}"
|
|
243
40
|
]
|
|
244
41
|
});
|
|
42
|
+
/**
|
|
43
|
+
* Styles for the action slot
|
|
44
|
+
*/ const useActionResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r13kcrze", null, [
|
|
45
|
+
".r13kcrze{grid-row-start:1;grid-row-end:1;grid-column-start:3;justify-self:end;align-self:start;}"
|
|
46
|
+
]);
|
|
47
|
+
const useDialogTitleInternalStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r1rmtaxz", "rk1fn6x", [
|
|
48
|
+
".r1rmtaxz{overflow-x:visible;overflow-y:visible;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}",
|
|
49
|
+
".r1rmtaxz:focus{outline-style:none;}",
|
|
50
|
+
".r1rmtaxz:focus-visible{outline-style:none;}",
|
|
51
|
+
".r1rmtaxz[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
|
|
52
|
+
".r1rmtaxz[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}",
|
|
53
|
+
".rk1fn6x{overflow-x:visible;overflow-y:visible;padding-top:0;padding-left:0;padding-bottom:0;padding-right:0;border-top-style:none;border-left-style:none;border-bottom-style:none;border-right-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}",
|
|
54
|
+
".rk1fn6x:focus{outline-style:none;}",
|
|
55
|
+
".rk1fn6x:focus-visible{outline-style:none;}",
|
|
56
|
+
".rk1fn6x[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
|
|
57
|
+
".rk1fn6x[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}"
|
|
58
|
+
]);
|
|
245
59
|
const useDialogTitleStyles_unstable = (state)=>{
|
|
60
|
+
const rootResetStyles = useRootResetStyles();
|
|
61
|
+
const actionResetStyles = useActionResetStyles();
|
|
246
62
|
const styles = useStyles();
|
|
247
|
-
state.root.className = (0, _react.mergeClasses)(dialogTitleClassNames.root,
|
|
63
|
+
state.root.className = (0, _react.mergeClasses)(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);
|
|
248
64
|
if (state.action) {
|
|
249
|
-
state.action.className = (0, _react.mergeClasses)(dialogTitleClassNames.action,
|
|
65
|
+
state.action.className = (0, _react.mergeClasses)(dialogTitleClassNames.action, actionResetStyles, state.action.className);
|
|
250
66
|
}
|
|
251
67
|
return state;
|
|
252
68
|
}; //# sourceMappingURL=useDialogTitleStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDialogTitleStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nexport const dialogTitleClassNames = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Ijaq50: \"f16hsg94\",\n nk6f5a: \"f1amvztq\",\n Br312pm: \"fwpfdsa\",\n Bw0ie65: \"fz1yyy6\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"f1pp30po\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"f106mvju\",\n B6of3ja: \"f1hu3pq6\",\n t21cq0: [\"f11qmguv\", \"f1tyq0we\"],\n jrapky: \"f19f4twv\",\n Frg6f3: [\"f1tyq0we\", \"f11qmguv\"]\n },\n rootWithoutAction: {\n Bw0ie65: \"fsyjsko\"\n },\n action: {\n Ijaq50: \"f16hsg94\",\n nk6f5a: \"f1amvztq\",\n Br312pm: \"fis13di\",\n Bdqf98w: \"f1a7i8kp\",\n qb2dma: \"f9h729m\"\n }\n}, {\n d: [\".f16hsg94{grid-row-start:1;}\", \".f1amvztq{grid-row-end:1;}\", \".fwpfdsa{grid-column-start:1;}\", \".fz1yyy6{grid-column-end:3;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".f1pp30po{font-size:var(--fontSizeBase500);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".f106mvju{line-height:var(--lineHeightBase500);}\", \".f1hu3pq6{margin-top:0;}\", \".f11qmguv{margin-right:0;}\", \".f1tyq0we{margin-left:0;}\", \".f19f4twv{margin-bottom:0;}\", \".fsyjsko{grid-column-end:4;}\", \".fis13di{grid-column-start:3;}\", \".f1a7i8kp{justify-self:end;}\", \".f9h729m{align-self:start;}\"]\n});\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = /*#__PURE__*/__styles({\n button: {\n qhf8xq: \"f10pi13n\",\n B7ck84d: \"f1e4lqlz\",\n De3pzq: \"f1u2r49w\",\n sj55zd: \"f1ym3bx4\",\n Bahqtrf: \"f1mo0ibp\",\n Be2twd7: \"fjoy568\",\n Bceei9c: \"f1k6fduh\",\n Bg96gwp: \"fez10in\",\n B68tc82: \"f1mtd64y\",\n Bmxbyg5: \"f1y7q3j9\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"fhxju0i\", \"f1cnd47f\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1cnd47f\", \"fhxju0i\"],\n icvyot: \"f1ern45e\",\n vrafjx: [\"f1n71otn\", \"f1deefiw\"],\n oivjwe: \"f1h8hb77\",\n wvpqe5: [\"f1deefiw\", \"f1n71otn\"],\n Bv0vk6g: \"f37px4s\",\n fsow6f: \"fgusgyc\",\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n B8q5s1w: \"f8hki3x\",\n Bci5o5g: [\"f1d2448m\", \"ffh67wi\"],\n n8qw10: \"f1bjia2o\",\n Bdrgwmp: [\"ffh67wi\", \"f1d2448m\"],\n Bm4h7ae: \"f15bsgw9\",\n B7ys5i9: \"f14e48fq\",\n Busjfv9: \"f18yb2kv\",\n Bhk32uz: \"fd6o370\",\n Bf4ptjt: \"fh1cnn4\",\n kclons: [\"fy7oxxb\", \"f184ne2d\"],\n Bhdgwq3: \"fpukqih\",\n Blkhhs4: [\"f184ne2d\", \"fy7oxxb\"],\n Bqtpl0w: \"frrh606\",\n clg4pj: [\"f1v5zibi\", \"fo2hd23\"],\n hgwjuy: \"ful5kiu\",\n Bonggc9: [\"fo2hd23\", \"f1v5zibi\"],\n B1tsrr9: [\"f1jqcqds\", \"ftffrms\"],\n Dah5zi: [\"ftffrms\", \"f1jqcqds\"],\n Bkh64rk: [\"f2e7qr6\", \"fsr1zz6\"],\n qqdqy8: [\"fsr1zz6\", \"f2e7qr6\"],\n B6dhp37: \"f1dvezut\",\n i03rao: [\"fd0oaoj\", \"f1cwg4i8\"],\n Boxcth7: \"fjvm52t\",\n Bsom6fd: [\"f1cwg4i8\", \"fd0oaoj\"],\n J0r882: \"f57olzd\",\n Bule8hv: [\"f4stah7\", \"fs1por5\"],\n Bjwuhne: \"f480a47\",\n Ghsupd: [\"fs1por5\", \"f4stah7\"]\n }\n}, {\n d: [\".f10pi13n{position:relative;}\", \".f1e4lqlz{box-sizing:content-box;}\", \".f1u2r49w{background-color:inherit;}\", \".f1ym3bx4{color:inherit;}\", \".f1mo0ibp{font-family:inherit;}\", \".fjoy568{font-size:inherit;}\", \".f1k6fduh{cursor:pointer;}\", \".fez10in{line-height:0;}\", \".f1mtd64y{overflow-x:visible;}\", \".f1y7q3j9{overflow-y:visible;}\", \".f1g0x7ka{padding-top:0;}\", \".fhxju0i{padding-right:0;}\", \".f1cnd47f{padding-left:0;}\", \".f1qch9an{padding-bottom:0;}\", \".f1ern45e{border-top-style:none;}\", \".f1n71otn{border-right-style:none;}\", \".f1deefiw{border-left-style:none;}\", \".f1h8hb77{border-bottom-style:none;}\", \".f37px4s{-webkit-appearance:button;}\", \".fgusgyc{text-align:unset;}\", \".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}\", \".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}\", \".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}\", \".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}\", \".f15bsgw9[data-fui-focus-visible]::after{content:\\\"\\\";}\", \".f14e48fq[data-fui-focus-visible]::after{position:absolute;}\", \".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}\", \".fd6o370[data-fui-focus-visible]::after{z-index:1;}\", \".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}\", \".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}\", \".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}\", \".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}\", \".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}\", \".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}\", \".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}\", \".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}\", \".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}\", \".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}\", \".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}\", \".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}\", \".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}\", \".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}\"],\n f: [\".ftqa4ok:focus{outline-style:none;}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"]\n});\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogTitleClassNames.root, styles.root, !state.action && styles.rootWithoutAction, state.root.className);\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n//# sourceMappingURL=useDialogTitleStyles.styles.js.map"],"names":["dialogTitleClassNames","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","root","action","useStyles","__styles","Ijaq50","nk6f5a","Br312pm","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","B6of3ja","t21cq0","jrapky","Frg6f3","rootWithoutAction","Bdqf98w","qb2dma","d","button","qhf8xq","B7ck84d","De3pzq","sj55zd","Bceei9c","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","icvyot","vrafjx","oivjwe","wvpqe5","Bv0vk6g","fsow6f","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bule8hv","Bjwuhne","Ghsupd","f","i","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,qBAAqB;eAArBA;;IAuCAC,4BAA4B;eAA5BA;;IA6DAC,6BAA6B;eAA7BA;;;uBAvGsC;AAG5C,MAAMF,wBAAwB;IACnCG,MAAM;IACNC,QAAQ;AACV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C3G;IACA,OAAOF;AACT,GACA,uDAAuD"}
|
|
1
|
+
{"version":3,"sources":["useDialogTitleStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nexport const dialogTitleClassNames = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action'\n};\n/**\n * Styles for the root slot\n */\nconst useRootResetStyles = /*#__PURE__*/__resetStyles(\"rztv7rx\", \"rt0yqbx\", [\".rztv7rx{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase500);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase500);margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;grid-row-start:1;grid-row-end:1;grid-column-start:1;grid-column-end:3;}\", \".rt0yqbx{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase500);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase500);margin-top:0;margin-left:0;margin-bottom:0;margin-right:0;grid-row-start:1;grid-row-end:1;grid-column-start:1;grid-column-end:3;}\"]);\nconst useStyles = /*#__PURE__*/__styles({\n rootWithoutAction: {\n Bw0ie65: \"fsyjsko\"\n }\n}, {\n d: [\".fsyjsko{grid-column-end:4;}\"]\n});\n/**\n * Styles for the action slot\n */\nconst useActionResetStyles = /*#__PURE__*/__resetStyles(\"r13kcrze\", null, [\".r13kcrze{grid-row-start:1;grid-row-end:1;grid-column-start:3;justify-self:end;align-self:start;}\"]);\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = /*#__PURE__*/__resetStyles(\"r1rmtaxz\", \"rk1fn6x\", [\".r1rmtaxz{overflow-x:visible;overflow-y:visible;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}\", \".r1rmtaxz:focus{outline-style:none;}\", \".r1rmtaxz:focus-visible{outline-style:none;}\", \".r1rmtaxz[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r1rmtaxz[data-fui-focus-visible]::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}\", \".rk1fn6x{overflow-x:visible;overflow-y:visible;padding-top:0;padding-left:0;padding-bottom:0;padding-right:0;border-top-style:none;border-left-style:none;border-bottom-style:none;border-right-style:none;position:relative;box-sizing:content-box;background-color:inherit;color:inherit;font-family:inherit;font-size:inherit;cursor:pointer;line-height:0;-webkit-appearance:button;text-align:unset;}\", \".rk1fn6x:focus{outline-style:none;}\", \".rk1fn6x:focus-visible{outline-style:none;}\", \".rk1fn6x[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".rk1fn6x[data-fui-focus-visible]::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}\"]);\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = state => {\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n state.root.className = mergeClasses(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n return state;\n};\n//# sourceMappingURL=useDialogTitleStyles.styles.js.map"],"names":["dialogTitleClassNames","useDialogTitleInternalStyles","useDialogTitleStyles_unstable","root","action","useRootResetStyles","__resetStyles","useStyles","__styles","rootWithoutAction","Bw0ie65","d","useActionResetStyles","state","rootResetStyles","actionResetStyles","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,qBAAqB;eAArBA;;IAuBAC,4BAA4B;eAA5BA;;IAIAC,6BAA6B;eAA7BA;;;uBA9BqD;AAG3D,MAAMF,wBAAwB;IACnCG,MAAM;IACNC,QAAQ;AACV;AACA;;CAEC,GACD,MAAMC,qBAAqB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,WAAW;IAAC;IAA4R;CAA2R;AACpoB,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCC,mBAAmB;QACjBC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;KAA+B;AACrC;AACA;;CAEC,GACD,MAAMC,uBAAuB,WAAW,GAAEN,IAAAA,oBAAa,EAAC,YAAY,MAAM;IAAC;CAAoG;AAKxK,MAAML,+BAA+B,WAAW,GAAEK,IAAAA,oBAAa,EAAC,YAAY,WAAW;IAAC;IAA+Y;IAAwC;IAAgD;IAAiK;IAAmvB;IAA8Y;IAAuC;IAA+C;IAAgK;CAAivB;AAIx0F,MAAMJ,gCAAgCW,CAAAA;IAC3C,MAAMC,kBAAkBT;IACxB,MAAMU,oBAAoBH;IAC1B,MAAMI,SAAST;IACfM,MAAMV,IAAI,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,sBAAsBG,IAAI,EAAEW,iBAAiB,CAACD,MAAMT,MAAM,IAAIY,OAAOP,iBAAiB,EAAEI,MAAMV,IAAI,CAACc,SAAS;IAChJ,IAAIJ,MAAMT,MAAM,EAAE;QAChBS,MAAMT,MAAM,CAACa,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,sBAAsBI,MAAM,EAAEW,mBAAmBF,MAAMT,MAAM,CAACa,SAAS;IAC/G;IACA,OAAOJ;AACT,GACA,uDAAuD"}
|
|
@@ -15,15 +15,14 @@ const _contexts = require("../../contexts");
|
|
|
15
15
|
const _reactaria = require("@fluentui/react-aria");
|
|
16
16
|
const _reacttabster = require("@fluentui/react-tabster");
|
|
17
17
|
const useDialogTrigger_unstable = (props)=>{
|
|
18
|
-
var _child, _child1, _child2, _child3;
|
|
19
18
|
const isInsideSurfaceDialog = (0, _contexts.useDialogSurfaceContext_unstable)();
|
|
20
19
|
const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;
|
|
21
20
|
const child = (0, _reactutilities.getTriggerChild)(children);
|
|
22
21
|
const requestOpenChange = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.requestOpenChange);
|
|
23
22
|
const { triggerAttributes } = (0, _reacttabster.useModalAttributes)();
|
|
24
23
|
const handleClick = (0, _reactutilities.useEventCallback)((event)=>{
|
|
25
|
-
var _child_props_onClick,
|
|
26
|
-
|
|
24
|
+
var _child_props_onClick, _child_props;
|
|
25
|
+
child === null || child === void 0 ? void 0 : (_child_props_onClick = (_child_props = child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);
|
|
27
26
|
if (!event.isDefaultPrevented()) {
|
|
28
27
|
requestOpenChange({
|
|
29
28
|
event,
|
|
@@ -33,12 +32,12 @@ const useDialogTrigger_unstable = (props)=>{
|
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
const triggerChildProps = {
|
|
36
|
-
...
|
|
37
|
-
ref:
|
|
35
|
+
...child === null || child === void 0 ? void 0 : child.props,
|
|
36
|
+
ref: child === null || child === void 0 ? void 0 : child.ref,
|
|
38
37
|
onClick: handleClick,
|
|
39
38
|
...triggerAttributes
|
|
40
39
|
};
|
|
41
|
-
const ariaButtonTriggerChildProps = (0, _reactaria.useARIAButtonProps)((
|
|
40
|
+
const ariaButtonTriggerChildProps = (0, _reactaria.useARIAButtonProps)((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {
|
|
42
41
|
...triggerChildProps,
|
|
43
42
|
type: 'button'
|
|
44
43
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDialogTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */ export const useDialogTrigger_unstable = (props)=>{\n
|
|
1
|
+
{"version":3,"sources":["useDialogTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */ export const useDialogTrigger_unstable = (props)=>{\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;\n const child = getTriggerChild(children);\n const requestOpenChange = useDialogContext_unstable((ctx)=>ctx.requestOpenChange);\n const { triggerAttributes } = useModalAttributes();\n const handleClick = useEventCallback((event)=>{\n var _child_props_onClick, _child_props;\n child === null || child === void 0 ? void 0 : (_child_props_onClick = (_child_props = child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open'\n });\n }\n });\n const triggerChildProps = {\n ...child === null || child === void 0 ? void 0 : child.props,\n ref: child === null || child === void 0 ? void 0 : child.ref,\n onClick: handleClick,\n ...triggerAttributes\n };\n const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {\n ...triggerChildProps,\n type: 'button'\n });\n return {\n children: applyTriggerPropsToChildren(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)\n };\n};\n"],"names":["useDialogTrigger_unstable","props","isInsideSurfaceDialog","useDialogSurfaceContext_unstable","children","disableButtonEnhancement","action","child","getTriggerChild","requestOpenChange","useDialogContext_unstable","ctx","triggerAttributes","useModalAttributes","handleClick","useEventCallback","event","_child_props_onClick","_child_props","onClick","call","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps","useARIAButtonProps","applyTriggerPropsToChildren"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACwD;0BACH;2BACzC;8BACA;AAMxB,MAAMA,4BAA4B,CAACC;IAC1C,MAAMC,wBAAwBC,IAAAA,0CAAgC;IAC9D,MAAM,EAAEC,QAAQ,E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}
|
|
@@ -23,5 +23,7 @@ const _react = require("react");
|
|
|
23
23
|
const defaultContextValue = false;
|
|
24
24
|
const DialogSurfaceContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
|
|
25
25
|
const DialogSurfaceProvider = DialogSurfaceContext.Provider;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const useDialogSurfaceContext_unstable = ()=>{
|
|
27
|
+
var _useContext;
|
|
28
|
+
return (_useContext = (0, _react.useContext)(DialogSurfaceContext)) !== null && _useContext !== void 0 ? _useContext : defaultContextValue;
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["dialogSurfaceContext.js"],"sourcesContent":["import { createContext, useContext } from 'react';\nconst defaultContextValue = false;\nexport const DialogSurfaceContext = createContext(undefined);\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\
|
|
1
|
+
{"version":3,"sources":["dialogSurfaceContext.js"],"sourcesContent":["import { createContext, useContext } from 'react';\nconst defaultContextValue = false;\nexport const DialogSurfaceContext = createContext(undefined);\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\nexport const useDialogSurfaceContext_unstable = ()=>{\n var _useContext;\n return (_useContext = useContext(DialogSurfaceContext)) !== null && _useContext !== void 0 ? _useContext : defaultContextValue;\n};\n"],"names":["DialogSurfaceContext","DialogSurfaceProvider","useDialogSurfaceContext_unstable","defaultContextValue","createContext","undefined","Provider","_useContext","useContext"],"mappings":";;;;;;;;;;;IAEaA,oBAAoB;eAApBA;;IACAC,qBAAqB;eAArBA;;IACAC,gCAAgC;eAAhCA;;;uBAJ6B;AAC1C,MAAMC,sBAAsB;AACrB,MAAMH,qCAAuBI,IAAAA,oBAAa,EAACC;AAC3C,MAAMJ,wBAAwBD,qBAAqBM,QAAQ;AAC3D,MAAMJ,mCAAmC;IAC5C,IAAIK;IACJ,OAAO,AAACA,CAAAA,cAAcC,IAAAA,iBAAU,EAACR,qBAAoB,MAAO,QAAQO,gBAAgB,KAAK,IAAIA,cAAcJ;AAC/G"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.3",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"@fluentui/scripts-tasks": "*"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@fluentui/react-utilities": "^9.13.
|
|
40
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
41
|
-
"@fluentui/keyboard-keys": "^9.0.
|
|
42
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
43
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
44
|
-
"@fluentui/react-aria": "^9.3.
|
|
45
|
-
"@fluentui/react-icons": "^2.0.
|
|
46
|
-
"@fluentui/react-tabster": "^9.
|
|
47
|
-
"@fluentui/react-theme": "^9.1.
|
|
48
|
-
"@fluentui/react-portal": "^9.3.
|
|
39
|
+
"@fluentui/react-utilities": "^9.13.5",
|
|
40
|
+
"@fluentui/react-jsx-runtime": "^9.0.12",
|
|
41
|
+
"@fluentui/keyboard-keys": "^9.0.6",
|
|
42
|
+
"@fluentui/react-context-selector": "^9.1.36",
|
|
43
|
+
"@fluentui/react-shared-contexts": "^9.9.1",
|
|
44
|
+
"@fluentui/react-aria": "^9.3.38",
|
|
45
|
+
"@fluentui/react-icons": "^2.0.217",
|
|
46
|
+
"@fluentui/react-tabster": "^9.13.1",
|
|
47
|
+
"@fluentui/react-theme": "^9.1.14",
|
|
48
|
+
"@fluentui/react-portal": "^9.3.18",
|
|
49
49
|
"@griffel/react": "^1.5.14",
|
|
50
50
|
"@swc/helpers": "^0.5.1"
|
|
51
51
|
},
|