@fluentui-copilot/react-send-button 0.0.0-nightly-20251002-0405-17b34fb7.1 → 0.0.0-nightly-20251010-0406-7df7c6d1.1

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.
Files changed (44) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/package.json +8 -8
  4. package/dist/index.d.ts +0 -70
  5. package/lib/SendButton.js +0 -1
  6. package/lib/SendButton.js.map +0 -1
  7. package/lib/components/SendButton/SendButton.js +0 -11
  8. package/lib/components/SendButton/SendButton.js.map +0 -1
  9. package/lib/components/SendButton/SendButton.types.js +0 -3
  10. package/lib/components/SendButton/SendButton.types.js.map +0 -1
  11. package/lib/components/SendButton/buttonMotion.js +0 -212
  12. package/lib/components/SendButton/buttonMotion.js.map +0 -1
  13. package/lib/components/SendButton/index.js +0 -4
  14. package/lib/components/SendButton/index.js.map +0 -1
  15. package/lib/components/SendButton/renderSendButton.js +0 -46
  16. package/lib/components/SendButton/renderSendButton.js.map +0 -1
  17. package/lib/components/SendButton/useSendButton.js +0 -111
  18. package/lib/components/SendButton/useSendButton.js.map +0 -1
  19. package/lib/components/SendButton/useSendButtonStyles.styles.js +0 -270
  20. package/lib/components/SendButton/useSendButtonStyles.styles.js.map +0 -1
  21. package/lib/components/SendButton/useSendButtonStyles.styles.raw.js +0 -224
  22. package/lib/components/SendButton/useSendButtonStyles.styles.raw.js.map +0 -1
  23. package/lib/index.js +0 -1
  24. package/lib/index.js.map +0 -1
  25. package/lib-commonjs/SendButton.js +0 -28
  26. package/lib-commonjs/SendButton.js.map +0 -1
  27. package/lib-commonjs/components/SendButton/SendButton.js +0 -21
  28. package/lib-commonjs/components/SendButton/SendButton.js.map +0 -1
  29. package/lib-commonjs/components/SendButton/SendButton.types.js +0 -6
  30. package/lib-commonjs/components/SendButton/SendButton.types.js.map +0 -1
  31. package/lib-commonjs/components/SendButton/buttonMotion.js +0 -233
  32. package/lib-commonjs/components/SendButton/buttonMotion.js.map +0 -1
  33. package/lib-commonjs/components/SendButton/index.js +0 -31
  34. package/lib-commonjs/components/SendButton/index.js.map +0 -1
  35. package/lib-commonjs/components/SendButton/renderSendButton.js +0 -54
  36. package/lib-commonjs/components/SendButton/renderSendButton.js.map +0 -1
  37. package/lib-commonjs/components/SendButton/useSendButton.js +0 -114
  38. package/lib-commonjs/components/SendButton/useSendButton.js.map +0 -1
  39. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.js +0 -412
  40. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.js.map +0 -1
  41. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js +0 -240
  42. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js.map +0 -1
  43. package/lib-commonjs/index.js +0 -28
  44. package/lib-commonjs/index.js.map +0 -1
@@ -1,412 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- sendButtonClassNames: function() {
13
- return sendButtonClassNames;
14
- },
15
- useSendButtonStyles_unstable: function() {
16
- return useSendButtonStyles_unstable;
17
- }
18
- });
19
- const _reactcomponents = require("@fluentui/react-components");
20
- const sendButtonClassNames = {
21
- root: 'fai-SendButton',
22
- sendIcon: 'fai-SendButton__sendIcon',
23
- stopIcon: 'fai-SendButton__stopIcon',
24
- stopBackground: 'fai-SendButton__stopBackground',
25
- sendButtonMotion: 'fai-SendButton__sendButtonMotion',
26
- stopButtonMotion: 'fai-SendButton__stopButtonMotion',
27
- stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion'
28
- };
29
- /**
30
- * Styles for the root slot
31
- */ const useStyles = (0, _reactcomponents.__styles)({
32
- root: {
33
- mc9l5x: "f22iagw",
34
- a9b677: "f1szoe96",
35
- Bf4jedk: "fwbmr0d",
36
- Bqenvij: "f1d2rq10",
37
- Bt984gj: "f122n59",
38
- Byoj8tv: 0,
39
- uwmqm3: 0,
40
- z189sj: 0,
41
- z8tnut: 0,
42
- B0ocmuz: "f1mk8lai"
43
- },
44
- baseIconButton: {
45
- qhf8xq: "f1euv43f",
46
- Bt984gj: "f122n59",
47
- mc9l5x: "ftuwxu6",
48
- Brf1p80: "f4d9j23",
49
- Be2twd7: "f1pp30po",
50
- Bqenvij: "fjamq6b",
51
- a9b677: "f64fuq3"
52
- },
53
- disabled: {
54
- sj55zd: "f1s2aq7o"
55
- },
56
- iconFilled: {
57
- sj55zd: "f1oyzx04",
58
- Bi91k9c: "f1m1wcaq"
59
- },
60
- stopBackground: {
61
- qhf8xq: "f1euv43f",
62
- a9b677: "f2q8o33",
63
- Bqenvij: "fwk23hs",
64
- Beyfa6y: 0,
65
- Bbmb7ep: 0,
66
- Btl43ni: 0,
67
- B7oj6ja: 0,
68
- Dimara: "f44lkw9",
69
- De3pzq: "f16xkysk"
70
- }
71
- }, {
72
- d: [
73
- ".f22iagw{display:flex;}",
74
- ".f1szoe96{width:32px;}",
75
- ".fwbmr0d{min-width:32px;}",
76
- ".f1d2rq10{height:32px;}",
77
- ".f122n59{align-items:center;}",
78
- [
79
- ".f1mk8lai{padding:0;}",
80
- {
81
- p: -1
82
- }
83
- ],
84
- ".f1euv43f{position:absolute;}",
85
- ".ftuwxu6{display:inline-flex;}",
86
- ".f4d9j23{justify-content:center;}",
87
- ".f1pp30po{font-size:var(--fontSizeBase500);}",
88
- ".fjamq6b{height:20px;}",
89
- ".f64fuq3{width:20px;}",
90
- ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
91
- ".f1oyzx04{color:var(--colorCompoundBrandBackground);}",
92
- ".f2q8o33{width:inherit;}",
93
- ".fwk23hs{height:inherit;}",
94
- [
95
- ".f44lkw9{border-radius:var(--borderRadiusCircular);}",
96
- {
97
- p: -1
98
- }
99
- ],
100
- ".f16xkysk{background-color:var(--colorBrandBackground2);}"
101
- ],
102
- h: [
103
- ".f1m1wcaq:hover{color:var(--colorCompoundBrandBackgroundHover);}"
104
- ]
105
- });
106
- const useNextStyles = (0, _reactcomponents.__styles)({
107
- baseIconButton: {
108
- mc9l5x: "ftuwxu6",
109
- Brf1p80: "f4d9j23",
110
- Bw0ie65: 0,
111
- Br312pm: 0,
112
- nk6f5a: 0,
113
- Ijaq50: 0,
114
- Bq1tomu: "fwzfryc",
115
- qhf8xq: "f1tmlkn4",
116
- Bj3rh1h: "f19g0ac",
117
- sj55zd: "f1phragk",
118
- B7iucu3: "fqc85l4"
119
- },
120
- baseIconButtonSidecar: {
121
- a9b677: "fjw5fx7",
122
- Bqenvij: "fd461yt"
123
- },
124
- dictationActive: {
125
- sj55zd: "fkfq4zb"
126
- },
127
- sendIconFilled: {
128
- sj55zd: "f1phragk"
129
- },
130
- stopIconFilled: {
131
- sj55zd: "faj9fo0"
132
- },
133
- stopBackground: {
134
- Bw0ie65: 0,
135
- Br312pm: 0,
136
- nk6f5a: 0,
137
- Ijaq50: 0,
138
- Bq1tomu: "fwzfryc",
139
- Bqenvij: "f1l02sjl",
140
- a9b677: "fly5x3f",
141
- Beyfa6y: 0,
142
- Bbmb7ep: 0,
143
- Btl43ni: 0,
144
- B7oj6ja: 0,
145
- Dimara: "f44lkw9",
146
- De3pzq: "ffp7eso"
147
- },
148
- stopBackgroundSending: {
149
- De3pzq: "f16xkysk"
150
- },
151
- stopBackgroundDictationActive: {
152
- De3pzq: "f1c21dwh"
153
- },
154
- disabled: {
155
- sj55zd: "f1s2aq7o"
156
- },
157
- stopBackgroundDisabled: {
158
- De3pzq: "f1bg9a2p"
159
- }
160
- }, {
161
- d: [
162
- ".ftuwxu6{display:inline-flex;}",
163
- ".f4d9j23{justify-content:center;}",
164
- [
165
- ".fwzfryc{grid-area:button;}",
166
- {
167
- p: -1
168
- }
169
- ],
170
- ".f1tmlkn4{position:initial;}",
171
- ".f19g0ac{z-index:1;}",
172
- ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",
173
- ".fjw5fx7{width:16px;}",
174
- ".fd461yt{height:16px;}",
175
- ".fkfq4zb{color:var(--colorNeutralForeground2);}",
176
- ".faj9fo0{color:var(--colorBrandForeground2);}",
177
- [
178
- ".fwzfryc{grid-area:button;}",
179
- {
180
- p: -1
181
- }
182
- ],
183
- ".f1l02sjl{height:100%;}",
184
- ".fly5x3f{width:100%;}",
185
- [
186
- ".f44lkw9{border-radius:var(--borderRadiusCircular);}",
187
- {
188
- p: -1
189
- }
190
- ],
191
- ".ffp7eso{background-color:var(--colorBrandBackground);}",
192
- ".f16xkysk{background-color:var(--colorBrandBackground2);}",
193
- ".f1c21dwh{background-color:var(--colorTransparentBackground);}",
194
- ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
195
- ".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}"
196
- ],
197
- m: [
198
- [
199
- "@media (forced-colors: active){.fqc85l4{color:HighlightText;}}",
200
- {
201
- m: "(forced-colors: active)"
202
- }
203
- ]
204
- ]
205
- });
206
- const useRootNextStyles = (0, _reactcomponents.__styles)({
207
- root: {
208
- mc9l5x: "f13qh94s",
209
- zoa1oz: "f9o42qa",
210
- wkccdc: "f1u7ey36",
211
- Budl1dq: "f1c2z91y",
212
- B7hvi0a: "f1oiokrs",
213
- Bt984gj: "f122n59",
214
- Byoj8tv: 0,
215
- uwmqm3: 0,
216
- z189sj: 0,
217
- z8tnut: 0,
218
- B0ocmuz: "fv5o1b5",
219
- Bgfg5da: 0,
220
- B9xav0g: 0,
221
- oivjwe: 0,
222
- Bn0qgzm: 0,
223
- B4g9neb: 0,
224
- zhjwy3: 0,
225
- wvpqe5: 0,
226
- ibv6hh: 0,
227
- u1mtju: 0,
228
- h3c5rm: 0,
229
- vrafjx: 0,
230
- Bekrc4i: 0,
231
- i8vvqc: 0,
232
- g2u3we: 0,
233
- icvyot: 0,
234
- B4j52fo: 0,
235
- irswps: "f88035w",
236
- qhf8xq: "f10pi13n",
237
- Bfpq7zp: 0,
238
- g9k6zt: 0,
239
- Bn4voq9: 0,
240
- giviqs: "f1m9av4t",
241
- j6ew2k: "f1nlh5rk",
242
- Bcq6wej: "fjq791v",
243
- Jcjdmf: [
244
- "fkq2p2y",
245
- "f1sehlss"
246
- ],
247
- sc4o1m: "f11odvng",
248
- Bosien3: [
249
- "f1sehlss",
250
- "fkq2p2y"
251
- ],
252
- B0a1hpu: "f12mm4ns"
253
- },
254
- canvas: {
255
- Bf4jedk: "f12clzc2",
256
- Bqenvij: "fbhnoac"
257
- },
258
- sidecar: {
259
- Bf4jedk: "f107v6xj",
260
- Bqenvij: "fxldao9"
261
- },
262
- notSending: {
263
- Bmdhgnd: "fiaw31n",
264
- Buhwtog: "fmv7hed",
265
- Bsyoesm: "f10g5jnj",
266
- B5xjowy: "f1hzts53",
267
- f30giq: "f3l45fr"
268
- },
269
- notSendingDictationActive: {
270
- Bmdhgnd: "fkhxdak",
271
- Buhwtog: "fmv7hed",
272
- jhc297: "f1dxmfzy",
273
- B885nwu: "f175mo2",
274
- f30giq: "f1zsivl",
275
- Ba808g4: "f50srwi"
276
- },
277
- sending: {
278
- Bmdhgnd: "f1hzdlu9",
279
- Buhwtog: "fmv7hed",
280
- uj1ttc: "fe9pnmy",
281
- E4wjbi: "f18cpvo8",
282
- f30giq: "f876z59",
283
- Bssu2nw: "fqsoy9w"
284
- }
285
- }, {
286
- d: [
287
- ".f13qh94s{display:grid;}",
288
- ".f9o42qa{grid-template-areas:\"button\";}",
289
- ".f1u7ey36{grid-template-rows:1fr;}",
290
- ".f1c2z91y{grid-template-columns:1fr;}",
291
- ".f1oiokrs{justify-items:center;}",
292
- ".f122n59{align-items:center;}",
293
- [
294
- ".fv5o1b5{padding:var(--spacingVerticalNone);}",
295
- {
296
- p: -1
297
- }
298
- ],
299
- [
300
- ".f88035w{border:var(--strokeWidthThin) solid var(--colorTransparentStroke);}",
301
- {
302
- p: -2
303
- }
304
- ],
305
- ".f10pi13n{position:relative;}",
306
- [
307
- ".f1m9av4t[data-fui-focus-visible]{outline:var(--strokeWidthThin) solid var(--colorTransparentStroke) inset;}",
308
- {
309
- p: -1
310
- }
311
- ],
312
- ".f1nlh5rk[data-fui-focus-visible]{box-shadow:0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2);}",
313
- ".f12clzc2{min-width:40px;}",
314
- ".fbhnoac{height:40px;}",
315
- ".f107v6xj{min-width:28px;}",
316
- ".fxldao9{height:28px;}"
317
- ],
318
- m: [
319
- [
320
- "@media (forced-colors: active){.fjq791v{border-top-color:Highlight;}}",
321
- {
322
- m: "(forced-colors: active)"
323
- }
324
- ],
325
- [
326
- "@media (forced-colors: active){.f1sehlss{border-left-color:Highlight;}.fkq2p2y{border-right-color:Highlight;}}",
327
- {
328
- m: "(forced-colors: active)"
329
- }
330
- ],
331
- [
332
- "@media (forced-colors: active){.f11odvng{border-bottom-color:Highlight;}}",
333
- {
334
- m: "(forced-colors: active)"
335
- }
336
- ],
337
- [
338
- "@media (forced-colors: active){.f12mm4ns .fai-SendButton__stopBackground{background-color:Highlight;}}",
339
- {
340
- m: "(forced-colors: active)"
341
- }
342
- ],
343
- [
344
- "@media (forced-colors: active){.fmv7hed:hover .fai-SendButton__stopBackground{background-color:HighlightText;}}",
345
- {
346
- m: "(forced-colors: active)"
347
- }
348
- ],
349
- [
350
- "@media (forced-colors: active){.f1hzts53:hover .fai-SendButton__sendIcon,.f1hzts53:hover .fai-SendButton__stopIcon{color:Highlight;}}",
351
- {
352
- m: "(forced-colors: active)"
353
- }
354
- ],
355
- [
356
- "@media (forced-colors: active){.f175mo2:hover .fai-SendButton__sendIcon{color:Highlight;}}",
357
- {
358
- m: "(forced-colors: active)"
359
- }
360
- ],
361
- [
362
- "@media (forced-colors: active){.f18cpvo8:hover .fai-SendButton__stopIcon{color:Highlight;}}",
363
- {
364
- m: "(forced-colors: active)"
365
- }
366
- ]
367
- ],
368
- h: [
369
- ".fiaw31n:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundHover);}",
370
- ".f10g5jnj:hover .fai-SendButton__sendIcon,.f10g5jnj:hover .fai-SendButton__stopIcon{color:var(--colorNeutralForegroundOnBrand);}",
371
- ".fkhxdak:hover .fai-SendButton__stopBackground{background-color:var(--colorSubtleBackgroundHover);}",
372
- ".f1dxmfzy:hover .fai-SendButton__sendIcon{color:var(--colorNeutralForeground2Hover);}",
373
- ".f1hzdlu9:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Hover);}",
374
- ".fe9pnmy:hover .fai-SendButton__stopIcon{color:var(--colorBrandForeground2Hover);}"
375
- ],
376
- a: [
377
- ".f3l45fr:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundPressed);}",
378
- ".f1zsivl:active .fai-SendButton__stopBackground{background-color:var(--colorSubtleBackgroundPressed);}",
379
- ".f50srwi:active .fai-SendButton__sendIcon{color:var(--colorNeutralForeground2Pressed);}",
380
- ".f876z59:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Pressed);}",
381
- ".fqsoy9w:active .fai-SendButton__stopIcon{color:var(--colorBrandForeground2Pressed);}"
382
- ]
383
- });
384
- const useSendButtonStyles_unstable = (state)=>{
385
- 'use no memo';
386
- const { isDictationActive, isSendIconFilled, isSending, disabled, designVersion, mode } = state;
387
- const styles = useStyles();
388
- const nextStyles = useNextStyles();
389
- const rootNextStyles = useRootNextStyles();
390
- const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;
391
- const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;
392
- state.root.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.root, designVersion === 'next' ? rootNextStyles.root : styles.root, isSendIconFilled && sendIconFilledStyle, (state.isButtonMotionRunning || isSending) && sendIconFilledStyle, designVersion === 'next' && rootNextStyles[mode], designVersion === 'next' && rootNextStyles.root, !disabled && designVersion === 'next' && !isSending && (isDictationActive ? rootNextStyles.notSendingDictationActive : rootNextStyles.notSending), !disabled && designVersion === 'next' && isSending && rootNextStyles.sending, disabled && styles.disabled, state.root.className);
393
- if (state.sendIcon) {
394
- state.sendIcon.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.sendIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, designVersion === 'next' && mode === 'sidecar' && nextStyles.baseIconButtonSidecar, !disabled && designVersion === 'next' && !isSending && isDictationActive && nextStyles.dictationActive, disabled && designVersion === 'next' && nextStyles.disabled, state.sendIcon.className);
395
- }
396
- if (state.stopIcon) {
397
- state.stopIcon.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.stopIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, stopIconFilledStyle, state.stopIcon.className);
398
- }
399
- if (state.stopBackground) {
400
- state.stopBackground.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.stopBackground, designVersion === 'next' ? nextStyles.stopBackground : styles.stopBackground, designVersion === 'next' && isSending && nextStyles.stopBackgroundSending, designVersion === 'next' && !isSending && isDictationActive && nextStyles.stopBackgroundDictationActive, designVersion === 'next' && disabled && nextStyles.stopBackgroundDisabled, state.stopBackground.className);
401
- }
402
- // Add style hooks from button
403
- (0, _reactcomponents.useButtonStyles_unstable)({
404
- ...state,
405
- components: {
406
- ...state.components,
407
- icon: 'span'
408
- },
409
- iconOnly: false
410
- });
411
- return state;
412
- }; //# sourceMappingURL=useSendButtonStyles.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useSendButtonStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n mergeClasses,\n useButtonStyles_unstable,\n createCustomFocusIndicatorStyle,\n shorthands,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nimport type { SendButtonSlots, SendButtonState } from './SendButton.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const sendButtonClassNames: SlotClassNames<SendButtonSlots> = {\n root: 'fai-SendButton',\n sendIcon: 'fai-SendButton__sendIcon',\n stopIcon: 'fai-SendButton__stopIcon',\n stopBackground: 'fai-SendButton__stopBackground',\n sendButtonMotion: 'fai-SendButton__sendButtonMotion',\n stopButtonMotion: 'fai-SendButton__stopButtonMotion',\n stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n width: '32px',\n minWidth: '32px',\n height: '32px',\n alignItems: 'center',\n padding: '0',\n },\n\n baseIconButton: {\n position: 'absolute',\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n fontSize: tokens.fontSizeBase500, // 20px\n height: '20px',\n width: '20px',\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n iconFilled: {\n color: tokens.colorCompoundBrandBackground,\n ':hover': {\n color: tokens.colorCompoundBrandBackgroundHover,\n },\n },\n\n stopBackground: {\n position: 'absolute',\n width: 'inherit',\n height: 'inherit',\n borderRadius: tokens.borderRadiusCircular,\n /** To-do: Change to backgroundColor: var(--Brand-Background-Tint-Rest, #EBEFFF);*/\n backgroundColor: tokens.colorBrandBackground2,\n },\n});\n\nconst useNextStyles = makeStyles({\n baseIconButton: {\n display: 'inline-flex',\n justifyContent: 'center',\n gridArea: 'button',\n position: 'initial',\n zIndex: 1,\n color: tokens.colorNeutralForegroundOnBrand,\n\n '@media (forced-colors: active)': {\n color: 'HighlightText',\n },\n },\n\n baseIconButtonSidecar: {\n width: '16px',\n height: '16px',\n },\n\n dictationActive: {\n color: tokens.colorNeutralForeground2,\n },\n\n sendIconFilled: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n stopIconFilled: {\n color: tokens.colorBrandForeground2,\n },\n\n stopBackground: {\n gridArea: 'button',\n height: '100%',\n width: '100%',\n borderRadius: tokens.borderRadiusCircular,\n backgroundColor: tokens.colorBrandBackground,\n },\n\n stopBackgroundSending: {\n backgroundColor: tokens.colorBrandBackground2,\n },\n\n stopBackgroundDictationActive: {\n backgroundColor: tokens.colorTransparentBackground,\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n stopBackgroundDisabled: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n },\n});\n\nconst useRootNextStyles = makeStyles({\n root: {\n display: 'grid',\n gridTemplateAreas: `\"button\"`,\n gridTemplateRows: '1fr',\n gridTemplateColumns: '1fr',\n justifyItems: 'center',\n alignItems: 'center',\n padding: tokens.spacingVerticalNone,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n position: 'relative',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke} inset`,\n boxShadow: `0 0 0 ${tokens.strokeWidthThin} ${tokens.colorStrokeFocus2}`,\n }),\n\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('Highlight'),\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: 'Highlight',\n },\n },\n },\n\n canvas: {\n minWidth: '40px',\n height: '40px',\n },\n\n sidecar: {\n minWidth: '28px',\n height: '28px',\n },\n\n notSending: {\n ':hover': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackgroundHover,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'HighlightText',\n },\n },\n\n [`& .${sendButtonClassNames.sendIcon}, & .${sendButtonClassNames.stopIcon}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n\n '@media (forced-colors: active)': {\n color: 'Highlight',\n },\n },\n },\n ':active': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n },\n },\n },\n notSendingDictationActive: {\n ':hover': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'HighlightText',\n },\n },\n\n [`& .${sendButtonClassNames.sendIcon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n\n '@media (forced-colors: active)': {\n color: 'Highlight',\n },\n },\n },\n ':active': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n [`& .${sendButtonClassNames.sendIcon}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n sending: {\n ':hover': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackground2Hover,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'HighlightText',\n },\n },\n [`& .${sendButtonClassNames.stopIcon}`]: {\n color: tokens.colorBrandForeground2Hover,\n\n '@media (forced-colors: active)': {\n color: 'Highlight',\n },\n },\n },\n ':active': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n [`& .${sendButtonClassNames.stopIcon}`]: {\n color: tokens.colorBrandForeground2Pressed,\n },\n },\n },\n});\n\n/**\n * Apply styling to the SendButton slots based on the state\n */\nexport const useSendButtonStyles_unstable = (state: SendButtonState): SendButtonState => {\n 'use no memo';\n const { isDictationActive, isSendIconFilled, isSending, disabled, designVersion, mode } = state;\n\n const styles = useStyles();\n const nextStyles = useNextStyles();\n const rootNextStyles = useRootNextStyles();\n\n const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;\n const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;\n\n state.root.className = mergeClasses(\n sendButtonClassNames.root,\n designVersion === 'next' ? rootNextStyles.root : styles.root,\n isSendIconFilled && sendIconFilledStyle,\n (state.isButtonMotionRunning || isSending) && sendIconFilledStyle,\n designVersion === 'next' && rootNextStyles[mode],\n designVersion === 'next' && rootNextStyles.root,\n !disabled &&\n designVersion === 'next' &&\n !isSending &&\n (isDictationActive ? rootNextStyles.notSendingDictationActive : rootNextStyles.notSending),\n !disabled && designVersion === 'next' && isSending && rootNextStyles.sending,\n disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.sendIcon) {\n state.sendIcon.className = mergeClasses(\n sendButtonClassNames.sendIcon,\n designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton,\n designVersion === 'next' && mode === 'sidecar' && nextStyles.baseIconButtonSidecar,\n !disabled && designVersion === 'next' && !isSending && isDictationActive && nextStyles.dictationActive,\n disabled && designVersion === 'next' && nextStyles.disabled,\n state.sendIcon.className,\n );\n }\n\n if (state.stopIcon) {\n state.stopIcon.className = mergeClasses(\n sendButtonClassNames.stopIcon,\n designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton,\n stopIconFilledStyle,\n state.stopIcon.className,\n );\n }\n\n if (state.stopBackground) {\n state.stopBackground.className = mergeClasses(\n sendButtonClassNames.stopBackground,\n designVersion === 'next' ? nextStyles.stopBackground : styles.stopBackground,\n designVersion === 'next' && isSending && nextStyles.stopBackgroundSending,\n designVersion === 'next' && !isSending && isDictationActive && nextStyles.stopBackgroundDictationActive,\n designVersion === 'next' && disabled && nextStyles.stopBackgroundDisabled,\n state.stopBackground.className,\n );\n }\n\n // Add style hooks from button\n useButtonStyles_unstable({ ...state, components: { ...state.components, icon: 'span' }, iconOnly: false });\n\n return state;\n};\n"],"names":["sendButtonClassNames","root","sendIcon","stopIcon","stopBackground","sendButtonMotion","stopButtonMotion","stopBackgroundMotion","__styles","display","width","minWidth","height","alignItems","padding","Byoj8tv","baseIconButton","position","tokens","mc9l5x","disabled","color","Bqenvij","iconFilled","borderRadius","Beyfa6y","Bbmb7ep","useNextStyles","justifyContent","gridArea","colorNeutralForegroundOnBrand","baseIconButtonSidecar","dictationActive","Bw0ie65","sendIconFilled","Ijaq50","stopIconFilled","Bj3rh1h","backgroundColor","stopBackgroundSending","stopBackgroundDictationActive","stopBackgroundDisabled","Br312pm","nk6f5a","useRootNextStyles","gridTemplateAreas","gridTemplateRows","gridTemplateColumns","justifyItems","border","createCustomFocusIndicatorStyle","outline","De3pzq","p","sidecar","notSending","oivjwe","notSendingDictationActive","Bosien3","sending","Ba808g4","Buhwtog","uj1ttc","E4wjbi","isDictationActive","f30giq","styles","Bssu2nw","nextStyles","designVersion","state","stopIconFilledStyle","className","m","useButtonStyles_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,oBAAAA;eAAAA;;;;;;iCAPD;AAOL,MAAMA,uBAAwD;UACnEC;cACAC;cACAC;oBACAC;sBACAC;sBACAC;0BACAC;AACF;AAEA;;CAEC,SAECN,YAAMO,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACAC;iBACAC;iBACAC;iBACAC;QACFC,SAAA;QAEAC,QAAAA;gBACEC;gBACAJ;iBACAJ;;oBAEUS;gBACVN;iBACAF;QACFS,QAAA;QAEAC,SAAAA;iBACEC;QACFC,SAAA;QAEAC,QAAAA;;cAEE;gBACEF;;gBAEJ;QAEAjB,QAAAA;iBACEa;;oBAEQ;gBACRO;gBACA;QAEFF,SAAA;QACFG,SAAA;QAEAC,SAAMC;QACJX,SAAAA;iBACEP;gBACAmB;gBACAC;;;;;QAGcC;QAA6B;QAAA;QAAA;QAAA;YAAA;YAAA;oBAE3C;;;;QACS;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;oBACT;;SACF;QAAA;KAAA;OAEAC;QAAAA;KAAuB;;sBAEbvB,IAAAA,yBAAA,EAAA;oBACV;QAEAwB,QAAAA;iBACEX;QACFY,SAAA;QAEAC,SAAAA;gBACEb;QACFc,QAAA;QAEAC,SAAAA;gBACEf;QACFgB,SAAA;QAEAjC,QAAAA;iBACEyB;;2BAEO;gBACPL;iBACAc;;qBAGFC;gBACED;;oBAGFE;gBACEF;;oBAEQ;gBACRjB;;oBAEFoB;iBACEH;QACFI,SAAA;QACFC,QAAA;QAEAR,QAAMS;QACJ3C,SAAM;iBACJQ;gBACAoC;iBACAC;iBACAC;iBACAC;iBACAnC;gBACAC;gBACAmC;;2BAEGC;gBACDC;;mCAEA;gBAEF;;cAEE;;;4BAGF;QACFC,QAAA;;;;;QAIU;QAAA;YAAA;YAAA;gBACVC,GAAA,CAAA;;SAEAC;QAAAA;QAAS;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;oBACP3C;;;;QACQ;QAAA;YAAA;YAAA;gBACV0C,GAAA,CAAA;;SAEAE;QAAAA;QAAY;QAAA;QAAA;QAAA;KAAA;;;;YACA;;;;;;0BAKJjB,IAAAA,yBAAAA,EAAAA;;gBAEJ;gBAEA;;;;;iBAMA;gBACF;gBACA;gBACE;;iBAEA;iBACF;QACFkB,QAAA;QACAC,SAAAA;iBACE;gBACE;;;;;gBAMA;iBAEC;;;;;gBAMD;gBACF;iBACA;gBACE;;gBAEA;gBACA;;gBAEA;YAAA;YAAA;SAAA;gBACF;QACFC,SAAA;YAAA;YAAA;SAAA;QAEAC,SAAS;;;;;;;iBAQL;iBACC;;;;;iBAMD;iBACF;gBACA;;+BAEIrB;iBACF;iBACC;;iBAED;gBACF;QACFsB,SAAA;IACF;IAEAD,SAAA;;QAGAE,SAAO;QACLC,QAAA;QACAC,QAAQC;QAERC,QAAMC;QACNC,SAAMC;;;OAIN;QAAA;QAA4BC;QAAsCjC;QAAkC;QAAA;QAAA;QAAA;YAAA;YAAA;gBAEpGkC,GAAAA,CAAAA;;SAgBA;QAAA;YAAA;YAAoB;oBAClBA;;SAQF;QAAA;QAAA;YAAA;YAAA;gBAEAjB,GAAA,CAAIiB;;;;QAG2BF;QAA4BF;QACvDK;QACeC;KAAS;OAE5B;QAAA;YAAA;YAAA;gBAEAC,GAAA;;;;;YAG+BL;gBAM/BK,GAAA;;SAEA;QAAA;YAAA;YAA8B;gBAC9BC,GAAAA;;;;;YAAmC;;;;;;YAAmC;;;;;;YAAe;;;SAAmB;QAAA;YAAA;YAAA;gBAExGD,GAAA;YACA;SAAA;QAAA;YAAA;YAAA"}
@@ -1,240 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- sendButtonClassNames: function() {
13
- return sendButtonClassNames;
14
- },
15
- useSendButtonStyles_unstable: function() {
16
- return useSendButtonStyles_unstable;
17
- }
18
- });
19
- const _reactcomponents = require("@fluentui/react-components");
20
- const _tokens = require("@fluentui-copilot/tokens");
21
- const sendButtonClassNames = {
22
- root: 'fai-SendButton',
23
- sendIcon: 'fai-SendButton__sendIcon',
24
- stopIcon: 'fai-SendButton__stopIcon',
25
- stopBackground: 'fai-SendButton__stopBackground',
26
- sendButtonMotion: 'fai-SendButton__sendButtonMotion',
27
- stopButtonMotion: 'fai-SendButton__stopButtonMotion',
28
- stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion'
29
- };
30
- /**
31
- * Styles for the root slot
32
- */ const useStyles = (0, _reactcomponents.makeStyles)({
33
- root: {
34
- display: 'flex',
35
- width: '32px',
36
- minWidth: '32px',
37
- height: '32px',
38
- alignItems: 'center',
39
- padding: '0'
40
- },
41
- baseIconButton: {
42
- position: 'absolute',
43
- alignItems: 'center',
44
- display: 'inline-flex',
45
- justifyContent: 'center',
46
- fontSize: _tokens.tokens.fontSizeBase500,
47
- height: '20px',
48
- width: '20px'
49
- },
50
- disabled: {
51
- color: _tokens.tokens.colorNeutralForegroundDisabled
52
- },
53
- iconFilled: {
54
- color: _tokens.tokens.colorCompoundBrandBackground,
55
- ':hover': {
56
- color: _tokens.tokens.colorCompoundBrandBackgroundHover
57
- }
58
- },
59
- stopBackground: {
60
- position: 'absolute',
61
- width: 'inherit',
62
- height: 'inherit',
63
- borderRadius: _tokens.tokens.borderRadiusCircular,
64
- /** To-do: Change to backgroundColor: var(--Brand-Background-Tint-Rest, #EBEFFF);*/ backgroundColor: _tokens.tokens.colorBrandBackground2
65
- }
66
- });
67
- const useNextStyles = (0, _reactcomponents.makeStyles)({
68
- baseIconButton: {
69
- display: 'inline-flex',
70
- justifyContent: 'center',
71
- gridArea: 'button',
72
- position: 'initial',
73
- zIndex: 1,
74
- color: _tokens.tokens.colorNeutralForegroundOnBrand,
75
- '@media (forced-colors: active)': {
76
- color: 'HighlightText'
77
- }
78
- },
79
- baseIconButtonSidecar: {
80
- width: '16px',
81
- height: '16px'
82
- },
83
- dictationActive: {
84
- color: _tokens.tokens.colorNeutralForeground2
85
- },
86
- sendIconFilled: {
87
- color: _tokens.tokens.colorNeutralForegroundOnBrand
88
- },
89
- stopIconFilled: {
90
- color: _tokens.tokens.colorBrandForeground2
91
- },
92
- stopBackground: {
93
- gridArea: 'button',
94
- height: '100%',
95
- width: '100%',
96
- borderRadius: _tokens.tokens.borderRadiusCircular,
97
- backgroundColor: _tokens.tokens.colorBrandBackground
98
- },
99
- stopBackgroundSending: {
100
- backgroundColor: _tokens.tokens.colorBrandBackground2
101
- },
102
- stopBackgroundDictationActive: {
103
- backgroundColor: _tokens.tokens.colorTransparentBackground
104
- },
105
- disabled: {
106
- color: _tokens.tokens.colorNeutralForegroundDisabled
107
- },
108
- stopBackgroundDisabled: {
109
- backgroundColor: _tokens.tokens.colorNeutralBackgroundDisabled
110
- }
111
- });
112
- const useRootNextStyles = (0, _reactcomponents.makeStyles)({
113
- root: {
114
- display: 'grid',
115
- gridTemplateAreas: `"button"`,
116
- gridTemplateRows: '1fr',
117
- gridTemplateColumns: '1fr',
118
- justifyItems: 'center',
119
- alignItems: 'center',
120
- padding: _tokens.tokens.spacingVerticalNone,
121
- border: `${_tokens.tokens.strokeWidthThin} solid ${_tokens.tokens.colorTransparentStroke}`,
122
- position: 'relative',
123
- ...(0, _reactcomponents.createCustomFocusIndicatorStyle)({
124
- outline: `${_tokens.tokens.strokeWidthThin} solid ${_tokens.tokens.colorTransparentStroke} inset`,
125
- boxShadow: `0 0 0 ${_tokens.tokens.strokeWidthThin} ${_tokens.tokens.colorStrokeFocus2}`
126
- }),
127
- '@media (forced-colors: active)': {
128
- ..._reactcomponents.shorthands.borderColor('Highlight'),
129
- [`& .${sendButtonClassNames.stopBackground}`]: {
130
- backgroundColor: 'Highlight'
131
- }
132
- }
133
- },
134
- canvas: {
135
- minWidth: '40px',
136
- height: '40px'
137
- },
138
- sidecar: {
139
- minWidth: '28px',
140
- height: '28px'
141
- },
142
- notSending: {
143
- ':hover': {
144
- [`& .${sendButtonClassNames.stopBackground}`]: {
145
- backgroundColor: _tokens.tokens.colorBrandBackgroundHover,
146
- '@media (forced-colors: active)': {
147
- backgroundColor: 'HighlightText'
148
- }
149
- },
150
- [`& .${sendButtonClassNames.sendIcon}, & .${sendButtonClassNames.stopIcon}`]: {
151
- color: _tokens.tokens.colorNeutralForegroundOnBrand,
152
- '@media (forced-colors: active)': {
153
- color: 'Highlight'
154
- }
155
- }
156
- },
157
- ':active': {
158
- [`& .${sendButtonClassNames.stopBackground}`]: {
159
- backgroundColor: _tokens.tokens.colorBrandBackgroundPressed
160
- }
161
- }
162
- },
163
- notSendingDictationActive: {
164
- ':hover': {
165
- [`& .${sendButtonClassNames.stopBackground}`]: {
166
- backgroundColor: _tokens.tokens.colorSubtleBackgroundHover,
167
- '@media (forced-colors: active)': {
168
- backgroundColor: 'HighlightText'
169
- }
170
- },
171
- [`& .${sendButtonClassNames.sendIcon}`]: {
172
- color: _tokens.tokens.colorNeutralForeground2Hover,
173
- '@media (forced-colors: active)': {
174
- color: 'Highlight'
175
- }
176
- }
177
- },
178
- ':active': {
179
- [`& .${sendButtonClassNames.stopBackground}`]: {
180
- backgroundColor: _tokens.tokens.colorSubtleBackgroundPressed
181
- },
182
- [`& .${sendButtonClassNames.sendIcon}`]: {
183
- color: _tokens.tokens.colorNeutralForeground2Pressed
184
- }
185
- }
186
- },
187
- sending: {
188
- ':hover': {
189
- [`& .${sendButtonClassNames.stopBackground}`]: {
190
- backgroundColor: _tokens.tokens.colorBrandBackground2Hover,
191
- '@media (forced-colors: active)': {
192
- backgroundColor: 'HighlightText'
193
- }
194
- },
195
- [`& .${sendButtonClassNames.stopIcon}`]: {
196
- color: _tokens.tokens.colorBrandForeground2Hover,
197
- '@media (forced-colors: active)': {
198
- color: 'Highlight'
199
- }
200
- }
201
- },
202
- ':active': {
203
- [`& .${sendButtonClassNames.stopBackground}`]: {
204
- backgroundColor: _tokens.tokens.colorBrandBackground2Pressed
205
- },
206
- [`& .${sendButtonClassNames.stopIcon}`]: {
207
- color: _tokens.tokens.colorBrandForeground2Pressed
208
- }
209
- }
210
- }
211
- });
212
- const useSendButtonStyles_unstable = (state)=>{
213
- 'use no memo';
214
- const { isDictationActive, isSendIconFilled, isSending, disabled, designVersion, mode } = state;
215
- const styles = useStyles();
216
- const nextStyles = useNextStyles();
217
- const rootNextStyles = useRootNextStyles();
218
- const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;
219
- const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;
220
- state.root.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.root, designVersion === 'next' ? rootNextStyles.root : styles.root, isSendIconFilled && sendIconFilledStyle, (state.isButtonMotionRunning || isSending) && sendIconFilledStyle, designVersion === 'next' && rootNextStyles[mode], designVersion === 'next' && rootNextStyles.root, !disabled && designVersion === 'next' && !isSending && (isDictationActive ? rootNextStyles.notSendingDictationActive : rootNextStyles.notSending), !disabled && designVersion === 'next' && isSending && rootNextStyles.sending, disabled && styles.disabled, state.root.className);
221
- if (state.sendIcon) {
222
- state.sendIcon.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.sendIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, designVersion === 'next' && mode === 'sidecar' && nextStyles.baseIconButtonSidecar, !disabled && designVersion === 'next' && !isSending && isDictationActive && nextStyles.dictationActive, disabled && designVersion === 'next' && nextStyles.disabled, state.sendIcon.className);
223
- }
224
- if (state.stopIcon) {
225
- state.stopIcon.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.stopIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, stopIconFilledStyle, state.stopIcon.className);
226
- }
227
- if (state.stopBackground) {
228
- state.stopBackground.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.stopBackground, designVersion === 'next' ? nextStyles.stopBackground : styles.stopBackground, designVersion === 'next' && isSending && nextStyles.stopBackgroundSending, designVersion === 'next' && !isSending && isDictationActive && nextStyles.stopBackgroundDictationActive, designVersion === 'next' && disabled && nextStyles.stopBackgroundDisabled, state.stopBackground.className);
229
- }
230
- // Add style hooks from button
231
- (0, _reactcomponents.useButtonStyles_unstable)({
232
- ...state,
233
- components: {
234
- ...state.components,
235
- icon: 'span'
236
- },
237
- iconOnly: false
238
- });
239
- return state;
240
- };