@fluentui-copilot/react-send-button 0.0.0-nightly-20251010-0406-7df7c6d1.1 → 0.0.0-nightly-20251013-0406-7c7739c8.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.
- package/CHANGELOG.json +3 -3
- package/CHANGELOG.md +4 -4
- package/dist/index.d.ts +70 -0
- package/lib/SendButton.js +1 -0
- package/lib/SendButton.js.map +1 -0
- package/lib/components/SendButton/SendButton.js +11 -0
- package/lib/components/SendButton/SendButton.js.map +1 -0
- package/lib/components/SendButton/SendButton.types.js +3 -0
- package/lib/components/SendButton/SendButton.types.js.map +1 -0
- package/lib/components/SendButton/buttonMotion.js +212 -0
- package/lib/components/SendButton/buttonMotion.js.map +1 -0
- package/lib/components/SendButton/index.js +4 -0
- package/lib/components/SendButton/index.js.map +1 -0
- package/lib/components/SendButton/renderSendButton.js +46 -0
- package/lib/components/SendButton/renderSendButton.js.map +1 -0
- package/lib/components/SendButton/useSendButton.js +111 -0
- package/lib/components/SendButton/useSendButton.js.map +1 -0
- package/lib/components/SendButton/useSendButtonStyles.styles.js +270 -0
- package/lib/components/SendButton/useSendButtonStyles.styles.js.map +1 -0
- package/lib/components/SendButton/useSendButtonStyles.styles.raw.js +224 -0
- package/lib/components/SendButton/useSendButtonStyles.styles.raw.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib-commonjs/SendButton.js +28 -0
- package/lib-commonjs/SendButton.js.map +1 -0
- package/lib-commonjs/components/SendButton/SendButton.js +21 -0
- package/lib-commonjs/components/SendButton/SendButton.js.map +1 -0
- package/lib-commonjs/components/SendButton/SendButton.types.js +6 -0
- package/lib-commonjs/components/SendButton/SendButton.types.js.map +1 -0
- package/lib-commonjs/components/SendButton/buttonMotion.js +233 -0
- package/lib-commonjs/components/SendButton/buttonMotion.js.map +1 -0
- package/lib-commonjs/components/SendButton/index.js +31 -0
- package/lib-commonjs/components/SendButton/index.js.map +1 -0
- package/lib-commonjs/components/SendButton/renderSendButton.js +54 -0
- package/lib-commonjs/components/SendButton/renderSendButton.js.map +1 -0
- package/lib-commonjs/components/SendButton/useSendButton.js +114 -0
- package/lib-commonjs/components/SendButton/useSendButton.js.map +1 -0
- package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.js +412 -0
- package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js +240 -0
- package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/index.js +28 -0
- package/lib-commonjs/index.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { __styles, mergeClasses, useButtonStyles_unstable, createCustomFocusIndicatorStyle, shorthands } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const sendButtonClassNames = {
|
|
4
|
+
root: 'fai-SendButton',
|
|
5
|
+
sendIcon: 'fai-SendButton__sendIcon',
|
|
6
|
+
stopIcon: 'fai-SendButton__stopIcon',
|
|
7
|
+
stopBackground: 'fai-SendButton__stopBackground',
|
|
8
|
+
sendButtonMotion: 'fai-SendButton__sendButtonMotion',
|
|
9
|
+
stopButtonMotion: 'fai-SendButton__stopButtonMotion',
|
|
10
|
+
stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion'
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Styles for the root slot
|
|
14
|
+
*/
|
|
15
|
+
const useStyles = __styles({
|
|
16
|
+
root: {
|
|
17
|
+
mc9l5x: "f22iagw",
|
|
18
|
+
a9b677: "f1szoe96",
|
|
19
|
+
Bf4jedk: "fwbmr0d",
|
|
20
|
+
Bqenvij: "f1d2rq10",
|
|
21
|
+
Bt984gj: "f122n59",
|
|
22
|
+
Byoj8tv: 0,
|
|
23
|
+
uwmqm3: 0,
|
|
24
|
+
z189sj: 0,
|
|
25
|
+
z8tnut: 0,
|
|
26
|
+
B0ocmuz: "f1mk8lai"
|
|
27
|
+
},
|
|
28
|
+
baseIconButton: {
|
|
29
|
+
qhf8xq: "f1euv43f",
|
|
30
|
+
Bt984gj: "f122n59",
|
|
31
|
+
mc9l5x: "ftuwxu6",
|
|
32
|
+
Brf1p80: "f4d9j23",
|
|
33
|
+
Be2twd7: "f1pp30po",
|
|
34
|
+
Bqenvij: "fjamq6b",
|
|
35
|
+
a9b677: "f64fuq3"
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
sj55zd: "f1s2aq7o"
|
|
39
|
+
},
|
|
40
|
+
iconFilled: {
|
|
41
|
+
sj55zd: "f1oyzx04",
|
|
42
|
+
Bi91k9c: "f1m1wcaq"
|
|
43
|
+
},
|
|
44
|
+
stopBackground: {
|
|
45
|
+
qhf8xq: "f1euv43f",
|
|
46
|
+
a9b677: "f2q8o33",
|
|
47
|
+
Bqenvij: "fwk23hs",
|
|
48
|
+
Beyfa6y: 0,
|
|
49
|
+
Bbmb7ep: 0,
|
|
50
|
+
Btl43ni: 0,
|
|
51
|
+
B7oj6ja: 0,
|
|
52
|
+
Dimara: "f44lkw9",
|
|
53
|
+
De3pzq: "f16xkysk"
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
d: [".f22iagw{display:flex;}", ".f1szoe96{width:32px;}", ".fwbmr0d{min-width:32px;}", ".f1d2rq10{height:32px;}", ".f122n59{align-items:center;}", [".f1mk8lai{padding:0;}", {
|
|
57
|
+
p: -1
|
|
58
|
+
}], ".f1euv43f{position:absolute;}", ".ftuwxu6{display:inline-flex;}", ".f4d9j23{justify-content:center;}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1oyzx04{color:var(--colorCompoundBrandBackground);}", ".f2q8o33{width:inherit;}", ".fwk23hs{height:inherit;}", [".f44lkw9{border-radius:var(--borderRadiusCircular);}", {
|
|
59
|
+
p: -1
|
|
60
|
+
}], ".f16xkysk{background-color:var(--colorBrandBackground2);}"],
|
|
61
|
+
h: [".f1m1wcaq:hover{color:var(--colorCompoundBrandBackgroundHover);}"]
|
|
62
|
+
});
|
|
63
|
+
const useNextStyles = __styles({
|
|
64
|
+
baseIconButton: {
|
|
65
|
+
mc9l5x: "ftuwxu6",
|
|
66
|
+
Brf1p80: "f4d9j23",
|
|
67
|
+
Bw0ie65: 0,
|
|
68
|
+
Br312pm: 0,
|
|
69
|
+
nk6f5a: 0,
|
|
70
|
+
Ijaq50: 0,
|
|
71
|
+
Bq1tomu: "fwzfryc",
|
|
72
|
+
qhf8xq: "f1tmlkn4",
|
|
73
|
+
Bj3rh1h: "f19g0ac",
|
|
74
|
+
sj55zd: "f1phragk",
|
|
75
|
+
B7iucu3: "fqc85l4"
|
|
76
|
+
},
|
|
77
|
+
baseIconButtonSidecar: {
|
|
78
|
+
a9b677: "fjw5fx7",
|
|
79
|
+
Bqenvij: "fd461yt"
|
|
80
|
+
},
|
|
81
|
+
dictationActive: {
|
|
82
|
+
sj55zd: "fkfq4zb"
|
|
83
|
+
},
|
|
84
|
+
sendIconFilled: {
|
|
85
|
+
sj55zd: "f1phragk"
|
|
86
|
+
},
|
|
87
|
+
stopIconFilled: {
|
|
88
|
+
sj55zd: "faj9fo0"
|
|
89
|
+
},
|
|
90
|
+
stopBackground: {
|
|
91
|
+
Bw0ie65: 0,
|
|
92
|
+
Br312pm: 0,
|
|
93
|
+
nk6f5a: 0,
|
|
94
|
+
Ijaq50: 0,
|
|
95
|
+
Bq1tomu: "fwzfryc",
|
|
96
|
+
Bqenvij: "f1l02sjl",
|
|
97
|
+
a9b677: "fly5x3f",
|
|
98
|
+
Beyfa6y: 0,
|
|
99
|
+
Bbmb7ep: 0,
|
|
100
|
+
Btl43ni: 0,
|
|
101
|
+
B7oj6ja: 0,
|
|
102
|
+
Dimara: "f44lkw9",
|
|
103
|
+
De3pzq: "ffp7eso"
|
|
104
|
+
},
|
|
105
|
+
stopBackgroundSending: {
|
|
106
|
+
De3pzq: "f16xkysk"
|
|
107
|
+
},
|
|
108
|
+
stopBackgroundDictationActive: {
|
|
109
|
+
De3pzq: "f1c21dwh"
|
|
110
|
+
},
|
|
111
|
+
disabled: {
|
|
112
|
+
sj55zd: "f1s2aq7o"
|
|
113
|
+
},
|
|
114
|
+
stopBackgroundDisabled: {
|
|
115
|
+
De3pzq: "f1bg9a2p"
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
d: [".ftuwxu6{display:inline-flex;}", ".f4d9j23{justify-content:center;}", [".fwzfryc{grid-area:button;}", {
|
|
119
|
+
p: -1
|
|
120
|
+
}], ".f1tmlkn4{position:initial;}", ".f19g0ac{z-index:1;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".faj9fo0{color:var(--colorBrandForeground2);}", [".fwzfryc{grid-area:button;}", {
|
|
121
|
+
p: -1
|
|
122
|
+
}], ".f1l02sjl{height:100%;}", ".fly5x3f{width:100%;}", [".f44lkw9{border-radius:var(--borderRadiusCircular);}", {
|
|
123
|
+
p: -1
|
|
124
|
+
}], ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}"],
|
|
125
|
+
m: [["@media (forced-colors: active){.fqc85l4{color:HighlightText;}}", {
|
|
126
|
+
m: "(forced-colors: active)"
|
|
127
|
+
}]]
|
|
128
|
+
});
|
|
129
|
+
const useRootNextStyles = __styles({
|
|
130
|
+
root: {
|
|
131
|
+
mc9l5x: "f13qh94s",
|
|
132
|
+
zoa1oz: "f9o42qa",
|
|
133
|
+
wkccdc: "f1u7ey36",
|
|
134
|
+
Budl1dq: "f1c2z91y",
|
|
135
|
+
B7hvi0a: "f1oiokrs",
|
|
136
|
+
Bt984gj: "f122n59",
|
|
137
|
+
Byoj8tv: 0,
|
|
138
|
+
uwmqm3: 0,
|
|
139
|
+
z189sj: 0,
|
|
140
|
+
z8tnut: 0,
|
|
141
|
+
B0ocmuz: "fv5o1b5",
|
|
142
|
+
Bgfg5da: 0,
|
|
143
|
+
B9xav0g: 0,
|
|
144
|
+
oivjwe: 0,
|
|
145
|
+
Bn0qgzm: 0,
|
|
146
|
+
B4g9neb: 0,
|
|
147
|
+
zhjwy3: 0,
|
|
148
|
+
wvpqe5: 0,
|
|
149
|
+
ibv6hh: 0,
|
|
150
|
+
u1mtju: 0,
|
|
151
|
+
h3c5rm: 0,
|
|
152
|
+
vrafjx: 0,
|
|
153
|
+
Bekrc4i: 0,
|
|
154
|
+
i8vvqc: 0,
|
|
155
|
+
g2u3we: 0,
|
|
156
|
+
icvyot: 0,
|
|
157
|
+
B4j52fo: 0,
|
|
158
|
+
irswps: "f88035w",
|
|
159
|
+
qhf8xq: "f10pi13n",
|
|
160
|
+
Bfpq7zp: 0,
|
|
161
|
+
g9k6zt: 0,
|
|
162
|
+
Bn4voq9: 0,
|
|
163
|
+
giviqs: "f1m9av4t",
|
|
164
|
+
j6ew2k: "f1nlh5rk",
|
|
165
|
+
Bcq6wej: "fjq791v",
|
|
166
|
+
Jcjdmf: ["fkq2p2y", "f1sehlss"],
|
|
167
|
+
sc4o1m: "f11odvng",
|
|
168
|
+
Bosien3: ["f1sehlss", "fkq2p2y"],
|
|
169
|
+
B0a1hpu: "f12mm4ns"
|
|
170
|
+
},
|
|
171
|
+
canvas: {
|
|
172
|
+
Bf4jedk: "fwbmr0d",
|
|
173
|
+
Bqenvij: "f1d2rq10"
|
|
174
|
+
},
|
|
175
|
+
sidecar: {
|
|
176
|
+
Bf4jedk: "f107v6xj",
|
|
177
|
+
Bqenvij: "fxldao9"
|
|
178
|
+
},
|
|
179
|
+
notSending: {
|
|
180
|
+
Bmdhgnd: "fiaw31n",
|
|
181
|
+
Buhwtog: "fmv7hed",
|
|
182
|
+
Bsyoesm: "f10g5jnj",
|
|
183
|
+
B5xjowy: "f1hzts53",
|
|
184
|
+
f30giq: "f3l45fr"
|
|
185
|
+
},
|
|
186
|
+
notSendingDictationActive: {
|
|
187
|
+
Bmdhgnd: "fkhxdak",
|
|
188
|
+
Buhwtog: "fmv7hed",
|
|
189
|
+
jhc297: "f1dxmfzy",
|
|
190
|
+
B885nwu: "f175mo2",
|
|
191
|
+
f30giq: "f1zsivl",
|
|
192
|
+
Ba808g4: "f50srwi"
|
|
193
|
+
},
|
|
194
|
+
sending: {
|
|
195
|
+
Bmdhgnd: "f1hzdlu9",
|
|
196
|
+
Buhwtog: "fmv7hed",
|
|
197
|
+
uj1ttc: "fe9pnmy",
|
|
198
|
+
E4wjbi: "f18cpvo8",
|
|
199
|
+
f30giq: "f876z59",
|
|
200
|
+
Bssu2nw: "fqsoy9w"
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
d: [".f13qh94s{display:grid;}", ".f9o42qa{grid-template-areas:\"button\";}", ".f1u7ey36{grid-template-rows:1fr;}", ".f1c2z91y{grid-template-columns:1fr;}", ".f1oiokrs{justify-items:center;}", ".f122n59{align-items:center;}", [".fv5o1b5{padding:var(--spacingVerticalNone);}", {
|
|
204
|
+
p: -1
|
|
205
|
+
}], [".f88035w{border:var(--strokeWidthThin) solid var(--colorTransparentStroke);}", {
|
|
206
|
+
p: -2
|
|
207
|
+
}], ".f10pi13n{position:relative;}", [".f1m9av4t[data-fui-focus-visible]{outline:var(--strokeWidthThin) solid var(--colorTransparentStroke) inset;}", {
|
|
208
|
+
p: -1
|
|
209
|
+
}], ".f1nlh5rk[data-fui-focus-visible]{box-shadow:0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2);}", ".fwbmr0d{min-width:32px;}", ".f1d2rq10{height:32px;}", ".f107v6xj{min-width:28px;}", ".fxldao9{height:28px;}"],
|
|
210
|
+
m: [["@media (forced-colors: active){.fjq791v{border-top-color:Highlight;}}", {
|
|
211
|
+
m: "(forced-colors: active)"
|
|
212
|
+
}], ["@media (forced-colors: active){.f1sehlss{border-left-color:Highlight;}.fkq2p2y{border-right-color:Highlight;}}", {
|
|
213
|
+
m: "(forced-colors: active)"
|
|
214
|
+
}], ["@media (forced-colors: active){.f11odvng{border-bottom-color:Highlight;}}", {
|
|
215
|
+
m: "(forced-colors: active)"
|
|
216
|
+
}], ["@media (forced-colors: active){.f12mm4ns .fai-SendButton__stopBackground{background-color:Highlight;}}", {
|
|
217
|
+
m: "(forced-colors: active)"
|
|
218
|
+
}], ["@media (forced-colors: active){.fmv7hed:hover .fai-SendButton__stopBackground{background-color:HighlightText;}}", {
|
|
219
|
+
m: "(forced-colors: active)"
|
|
220
|
+
}], ["@media (forced-colors: active){.f1hzts53:hover .fai-SendButton__sendIcon,.f1hzts53:hover .fai-SendButton__stopIcon{color:Highlight;}}", {
|
|
221
|
+
m: "(forced-colors: active)"
|
|
222
|
+
}], ["@media (forced-colors: active){.f175mo2:hover .fai-SendButton__sendIcon{color:Highlight;}}", {
|
|
223
|
+
m: "(forced-colors: active)"
|
|
224
|
+
}], ["@media (forced-colors: active){.f18cpvo8:hover .fai-SendButton__stopIcon{color:Highlight;}}", {
|
|
225
|
+
m: "(forced-colors: active)"
|
|
226
|
+
}]],
|
|
227
|
+
h: [".fiaw31n:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundHover);}", ".f10g5jnj:hover .fai-SendButton__sendIcon,.f10g5jnj:hover .fai-SendButton__stopIcon{color:var(--colorNeutralForegroundOnBrand);}", ".fkhxdak:hover .fai-SendButton__stopBackground{background-color:var(--colorSubtleBackgroundHover);}", ".f1dxmfzy:hover .fai-SendButton__sendIcon{color:var(--colorNeutralForeground2Hover);}", ".f1hzdlu9:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Hover);}", ".fe9pnmy:hover .fai-SendButton__stopIcon{color:var(--colorBrandForeground2Hover);}"],
|
|
228
|
+
a: [".f3l45fr:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundPressed);}", ".f1zsivl:active .fai-SendButton__stopBackground{background-color:var(--colorSubtleBackgroundPressed);}", ".f50srwi:active .fai-SendButton__sendIcon{color:var(--colorNeutralForeground2Pressed);}", ".f876z59:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Pressed);}", ".fqsoy9w:active .fai-SendButton__stopIcon{color:var(--colorBrandForeground2Pressed);}"]
|
|
229
|
+
});
|
|
230
|
+
/**
|
|
231
|
+
* Apply styling to the SendButton slots based on the state
|
|
232
|
+
*/
|
|
233
|
+
export const useSendButtonStyles_unstable = state => {
|
|
234
|
+
'use no memo';
|
|
235
|
+
|
|
236
|
+
const {
|
|
237
|
+
isDictationActive,
|
|
238
|
+
isSendIconFilled,
|
|
239
|
+
isSending,
|
|
240
|
+
disabled,
|
|
241
|
+
designVersion,
|
|
242
|
+
mode
|
|
243
|
+
} = state;
|
|
244
|
+
const styles = useStyles();
|
|
245
|
+
const nextStyles = useNextStyles();
|
|
246
|
+
const rootNextStyles = useRootNextStyles();
|
|
247
|
+
const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;
|
|
248
|
+
const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;
|
|
249
|
+
state.root.className = 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);
|
|
250
|
+
if (state.sendIcon) {
|
|
251
|
+
state.sendIcon.className = 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);
|
|
252
|
+
}
|
|
253
|
+
if (state.stopIcon) {
|
|
254
|
+
state.stopIcon.className = mergeClasses(sendButtonClassNames.stopIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, stopIconFilledStyle, state.stopIcon.className);
|
|
255
|
+
}
|
|
256
|
+
if (state.stopBackground) {
|
|
257
|
+
state.stopBackground.className = 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);
|
|
258
|
+
}
|
|
259
|
+
// Add style hooks from button
|
|
260
|
+
useButtonStyles_unstable({
|
|
261
|
+
...state,
|
|
262
|
+
components: {
|
|
263
|
+
...state.components,
|
|
264
|
+
icon: 'span'
|
|
265
|
+
},
|
|
266
|
+
iconOnly: false
|
|
267
|
+
});
|
|
268
|
+
return state;
|
|
269
|
+
};
|
|
270
|
+
//# sourceMappingURL=useSendButtonStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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: '32px',\n height: '32px',\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":["makeStyles","mergeClasses","useButtonStyles_unstable","createCustomFocusIndicatorStyle","shorthands","tokens","sendButtonClassNames","root","sendIcon","stopIcon","stopBackground","sendButtonMotion","stopButtonMotion","stopBackgroundMotion","useStyles","display","width","minWidth","height","alignItems","padding","baseIconButton","position","justifyContent","fontSize","fontSizeBase500","disabled","color","colorNeutralForegroundDisabled","iconFilled","colorCompoundBrandBackground","colorCompoundBrandBackgroundHover","borderRadius","borderRadiusCircular","backgroundColor","colorBrandBackground2","useNextStyles","gridArea","zIndex","colorNeutralForegroundOnBrand","baseIconButtonSidecar","dictationActive","colorNeutralForeground2","sendIconFilled","stopIconFilled","colorBrandForeground2","colorBrandBackground","stopBackgroundSending","stopBackgroundDictationActive","colorTransparentBackground","stopBackgroundDisabled","colorNeutralBackgroundDisabled","useRootNextStyles","gridTemplateAreas","gridTemplateRows","gridTemplateColumns","justifyItems","spacingVerticalNone","border","strokeWidthThin","colorTransparentStroke","outline","boxShadow","colorStrokeFocus2","borderColor","canvas","sidecar","notSending","colorBrandBackgroundHover","colorBrandBackgroundPressed","notSendingDictationActive","colorSubtleBackgroundHover","colorNeutralForeground2Hover","colorSubtleBackgroundPressed","colorNeutralForeground2Pressed","sending","colorBrandBackground2Hover","colorBrandForeground2Hover","colorBrandBackground2Pressed","colorBrandForeground2Pressed","useSendButtonStyles_unstable","state","isDictationActive","isSendIconFilled","isSending","designVersion","mode","styles","nextStyles","rootNextStyles","sendIconFilledStyle","stopIconFilledStyle","className","isButtonMotionRunning","components","icon","iconOnly"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,UAAU,EACVC,YAAY,EACZC,wBAAwB,EACxBC,+BAA+B,EAC/BC,UAAU,QACL,6BAA6B;AACpC,SAASC,MAAM,QAAQ,2BAA2B;AAKlD,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,UAAU;IACVC,UAAU;IACVC,gBAAgB;IAChBC,kBAAkB;IAClBC,kBAAkB;IAClBC,sBAAsB;AACxB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYd,WAAW;IAC3BO,MAAM;QACJQ,SAAS;QACTC,OAAO;QACPC,UAAU;QACVC,QAAQ;QACRC,YAAY;QACZC,SAAS;IACX;IAEAC,gBAAgB;QACdC,UAAU;QACVH,YAAY;QACZJ,SAAS;QACTQ,gBAAgB;QAChBC,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AAG3F,aACzBK,qBAAqBG,QAAQ,EAC7B4E,kBAAkB,SAASG,WAAWnE,cAAc,GAAGkE,OAAOlE,cAAc,EAC5EsE,qBACAV,MAAMxE,QAAQ,CAACmF,SAAS;IAE5B;IAEA,IAAIX,MAAMvE,cAAc,EAAE;QACxBuE,MAAMvE,cAAc,CAACkF,SAAS,GAAG3F,aAC/BK,qBAAqBI,cAAc,EACnC2E,kBAAkB,SAASG,WAAW9E,cAAc,GAAG6E,OAAO7E,cAAc,EAC5E2E,kBAAkB,UAAUD,aAAaI,WAAWzC,qBAAqB,EACzEsC,kBAAkB,UAAU,CAACD,aAAaF,qBAAqBM,WAAWxC,6BAA6B,EACvGqC,kBAAkB,UAAU3D,YAAY8D,WAAWtC,sBAAsB,EACzE+B,MAAMvE,cAAc,CAACkF,SAAS;IAElC;IAEA,8BAA8B;IAC9B1F,yBAAyB;QAAE,GAAG+E,KAAK;QAAEa,YAAY;YAAE,GAAGb,MAAMa,UAAU;YAAEC,MAAM;QAAO;QAAGC,UAAU;IAAM;IAExG,OAAOf;AACT,EAAE"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses, useButtonStyles_unstable, createCustomFocusIndicatorStyle, shorthands } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const sendButtonClassNames = {
|
|
4
|
+
root: 'fai-SendButton',
|
|
5
|
+
sendIcon: 'fai-SendButton__sendIcon',
|
|
6
|
+
stopIcon: 'fai-SendButton__stopIcon',
|
|
7
|
+
stopBackground: 'fai-SendButton__stopBackground',
|
|
8
|
+
sendButtonMotion: 'fai-SendButton__sendButtonMotion',
|
|
9
|
+
stopButtonMotion: 'fai-SendButton__stopButtonMotion',
|
|
10
|
+
stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion'
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Styles for the root slot
|
|
14
|
+
*/ const useStyles = makeStyles({
|
|
15
|
+
root: {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
width: '32px',
|
|
18
|
+
minWidth: '32px',
|
|
19
|
+
height: '32px',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
padding: '0'
|
|
22
|
+
},
|
|
23
|
+
baseIconButton: {
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
display: 'inline-flex',
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
fontSize: tokens.fontSizeBase500,
|
|
29
|
+
height: '20px',
|
|
30
|
+
width: '20px'
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
color: tokens.colorNeutralForegroundDisabled
|
|
34
|
+
},
|
|
35
|
+
iconFilled: {
|
|
36
|
+
color: tokens.colorCompoundBrandBackground,
|
|
37
|
+
':hover': {
|
|
38
|
+
color: tokens.colorCompoundBrandBackgroundHover
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
stopBackground: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
width: 'inherit',
|
|
44
|
+
height: 'inherit',
|
|
45
|
+
borderRadius: tokens.borderRadiusCircular,
|
|
46
|
+
/** To-do: Change to backgroundColor: var(--Brand-Background-Tint-Rest, #EBEFFF);*/ backgroundColor: tokens.colorBrandBackground2
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const useNextStyles = makeStyles({
|
|
50
|
+
baseIconButton: {
|
|
51
|
+
display: 'inline-flex',
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
gridArea: 'button',
|
|
54
|
+
position: 'initial',
|
|
55
|
+
zIndex: 1,
|
|
56
|
+
color: tokens.colorNeutralForegroundOnBrand,
|
|
57
|
+
'@media (forced-colors: active)': {
|
|
58
|
+
color: 'HighlightText'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
baseIconButtonSidecar: {
|
|
62
|
+
width: '16px',
|
|
63
|
+
height: '16px'
|
|
64
|
+
},
|
|
65
|
+
dictationActive: {
|
|
66
|
+
color: tokens.colorNeutralForeground2
|
|
67
|
+
},
|
|
68
|
+
sendIconFilled: {
|
|
69
|
+
color: tokens.colorNeutralForegroundOnBrand
|
|
70
|
+
},
|
|
71
|
+
stopIconFilled: {
|
|
72
|
+
color: tokens.colorBrandForeground2
|
|
73
|
+
},
|
|
74
|
+
stopBackground: {
|
|
75
|
+
gridArea: 'button',
|
|
76
|
+
height: '100%',
|
|
77
|
+
width: '100%',
|
|
78
|
+
borderRadius: tokens.borderRadiusCircular,
|
|
79
|
+
backgroundColor: tokens.colorBrandBackground
|
|
80
|
+
},
|
|
81
|
+
stopBackgroundSending: {
|
|
82
|
+
backgroundColor: tokens.colorBrandBackground2
|
|
83
|
+
},
|
|
84
|
+
stopBackgroundDictationActive: {
|
|
85
|
+
backgroundColor: tokens.colorTransparentBackground
|
|
86
|
+
},
|
|
87
|
+
disabled: {
|
|
88
|
+
color: tokens.colorNeutralForegroundDisabled
|
|
89
|
+
},
|
|
90
|
+
stopBackgroundDisabled: {
|
|
91
|
+
backgroundColor: tokens.colorNeutralBackgroundDisabled
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
const useRootNextStyles = makeStyles({
|
|
95
|
+
root: {
|
|
96
|
+
display: 'grid',
|
|
97
|
+
gridTemplateAreas: `"button"`,
|
|
98
|
+
gridTemplateRows: '1fr',
|
|
99
|
+
gridTemplateColumns: '1fr',
|
|
100
|
+
justifyItems: 'center',
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
padding: tokens.spacingVerticalNone,
|
|
103
|
+
border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
|
|
104
|
+
position: 'relative',
|
|
105
|
+
...createCustomFocusIndicatorStyle({
|
|
106
|
+
outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke} inset`,
|
|
107
|
+
boxShadow: `0 0 0 ${tokens.strokeWidthThin} ${tokens.colorStrokeFocus2}`
|
|
108
|
+
}),
|
|
109
|
+
'@media (forced-colors: active)': {
|
|
110
|
+
...shorthands.borderColor('Highlight'),
|
|
111
|
+
[`& .${sendButtonClassNames.stopBackground}`]: {
|
|
112
|
+
backgroundColor: 'Highlight'
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
canvas: {
|
|
117
|
+
minWidth: '32px',
|
|
118
|
+
height: '32px'
|
|
119
|
+
},
|
|
120
|
+
sidecar: {
|
|
121
|
+
minWidth: '28px',
|
|
122
|
+
height: '28px'
|
|
123
|
+
},
|
|
124
|
+
notSending: {
|
|
125
|
+
':hover': {
|
|
126
|
+
[`& .${sendButtonClassNames.stopBackground}`]: {
|
|
127
|
+
backgroundColor: tokens.colorBrandBackgroundHover,
|
|
128
|
+
'@media (forced-colors: active)': {
|
|
129
|
+
backgroundColor: 'HighlightText'
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
[`& .${sendButtonClassNames.sendIcon}, & .${sendButtonClassNames.stopIcon}`]: {
|
|
133
|
+
color: tokens.colorNeutralForegroundOnBrand,
|
|
134
|
+
'@media (forced-colors: active)': {
|
|
135
|
+
color: 'Highlight'
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
':active': {
|
|
140
|
+
[`& .${sendButtonClassNames.stopBackground}`]: {
|
|
141
|
+
backgroundColor: tokens.colorBrandBackgroundPressed
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
notSendingDictationActive: {
|
|
146
|
+
':hover': {
|
|
147
|
+
[`& .${sendButtonClassNames.stopBackground}`]: {
|
|
148
|
+
backgroundColor: tokens.colorSubtleBackgroundHover,
|
|
149
|
+
'@media (forced-colors: active)': {
|
|
150
|
+
backgroundColor: 'HighlightText'
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
[`& .${sendButtonClassNames.sendIcon}`]: {
|
|
154
|
+
color: tokens.colorNeutralForeground2Hover,
|
|
155
|
+
'@media (forced-colors: active)': {
|
|
156
|
+
color: 'Highlight'
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
':active': {
|
|
161
|
+
[`& .${sendButtonClassNames.stopBackground}`]: {
|
|
162
|
+
backgroundColor: tokens.colorSubtleBackgroundPressed
|
|
163
|
+
},
|
|
164
|
+
[`& .${sendButtonClassNames.sendIcon}`]: {
|
|
165
|
+
color: tokens.colorNeutralForeground2Pressed
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
sending: {
|
|
170
|
+
':hover': {
|
|
171
|
+
[`& .${sendButtonClassNames.stopBackground}`]: {
|
|
172
|
+
backgroundColor: tokens.colorBrandBackground2Hover,
|
|
173
|
+
'@media (forced-colors: active)': {
|
|
174
|
+
backgroundColor: 'HighlightText'
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
[`& .${sendButtonClassNames.stopIcon}`]: {
|
|
178
|
+
color: tokens.colorBrandForeground2Hover,
|
|
179
|
+
'@media (forced-colors: active)': {
|
|
180
|
+
color: 'Highlight'
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
':active': {
|
|
185
|
+
[`& .${sendButtonClassNames.stopBackground}`]: {
|
|
186
|
+
backgroundColor: tokens.colorBrandBackground2Pressed
|
|
187
|
+
},
|
|
188
|
+
[`& .${sendButtonClassNames.stopIcon}`]: {
|
|
189
|
+
color: tokens.colorBrandForeground2Pressed
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
/**
|
|
195
|
+
* Apply styling to the SendButton slots based on the state
|
|
196
|
+
*/ export const useSendButtonStyles_unstable = (state)=>{
|
|
197
|
+
'use no memo';
|
|
198
|
+
const { isDictationActive, isSendIconFilled, isSending, disabled, designVersion, mode } = state;
|
|
199
|
+
const styles = useStyles();
|
|
200
|
+
const nextStyles = useNextStyles();
|
|
201
|
+
const rootNextStyles = useRootNextStyles();
|
|
202
|
+
const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;
|
|
203
|
+
const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;
|
|
204
|
+
state.root.className = 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);
|
|
205
|
+
if (state.sendIcon) {
|
|
206
|
+
state.sendIcon.className = 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);
|
|
207
|
+
}
|
|
208
|
+
if (state.stopIcon) {
|
|
209
|
+
state.stopIcon.className = mergeClasses(sendButtonClassNames.stopIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, stopIconFilledStyle, state.stopIcon.className);
|
|
210
|
+
}
|
|
211
|
+
if (state.stopBackground) {
|
|
212
|
+
state.stopBackground.className = 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);
|
|
213
|
+
}
|
|
214
|
+
// Add style hooks from button
|
|
215
|
+
useButtonStyles_unstable({
|
|
216
|
+
...state,
|
|
217
|
+
components: {
|
|
218
|
+
...state.components,
|
|
219
|
+
icon: 'span'
|
|
220
|
+
},
|
|
221
|
+
iconOnly: false
|
|
222
|
+
});
|
|
223
|
+
return state;
|
|
224
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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: '32px',\n height: '32px',\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":["makeStyles","mergeClasses","useButtonStyles_unstable","createCustomFocusIndicatorStyle","shorthands","tokens","sendButtonClassNames","root","sendIcon","stopIcon","stopBackground","sendButtonMotion","stopButtonMotion","stopBackgroundMotion","useStyles","display","width","minWidth","height","alignItems","padding","baseIconButton","position","justifyContent","fontSize","fontSizeBase500","disabled","color","colorNeutralForegroundDisabled","iconFilled","colorCompoundBrandBackground","colorCompoundBrandBackgroundHover","borderRadius","borderRadiusCircular","backgroundColor","colorBrandBackground2","useNextStyles","gridArea","zIndex","colorNeutralForegroundOnBrand","baseIconButtonSidecar","dictationActive","colorNeutralForeground2","sendIconFilled","stopIconFilled","colorBrandForeground2","colorBrandBackground","stopBackgroundSending","stopBackgroundDictationActive","colorTransparentBackground","stopBackgroundDisabled","colorNeutralBackgroundDisabled","useRootNextStyles","gridTemplateAreas","gridTemplateRows","gridTemplateColumns","justifyItems","spacingVerticalNone","border","strokeWidthThin","colorTransparentStroke","outline","boxShadow","colorStrokeFocus2","borderColor","canvas","sidecar","notSending","colorBrandBackgroundHover","colorBrandBackgroundPressed","notSendingDictationActive","colorSubtleBackgroundHover","colorNeutralForeground2Hover","colorSubtleBackgroundPressed","colorNeutralForeground2Pressed","sending","colorBrandBackground2Hover","colorBrandForeground2Hover","colorBrandBackground2Pressed","colorBrandForeground2Pressed","useSendButtonStyles_unstable","state","isDictationActive","isSendIconFilled","isSending","designVersion","mode","styles","nextStyles","rootNextStyles","sendIconFilledStyle","stopIconFilledStyle","className","isButtonMotionRunning","components","icon","iconOnly"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,UAAU,EACVC,YAAY,EACZC,wBAAwB,EACxBC,+B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AAMzE,QAAQ,CAACoF,SAAS,GAAG3F,aACzBK,qBAAqBE,QAAQ,EAC7B6E,kBAAkB,SAASG,WAAWnE,cAAc,GAAGkE,OAAOlE,cAAc,EAC5EgE,kBAAkB,UAAUC,SAAS,aAAaE,WAAWhD,qBAAqB,EAClF,CAACd,YAAY2D,kBAAkB,UAAU,CAACD,aAAaF,qBAAqBM,WAAW/C,eAAe,EACtGf,YAAY2D,kBAAkB,UAAUG,WAAW9D,QAAQ,EAC3DuD,MAAMzE,QAAQ,CAACoF,SAAS;IAE5B;IAEA,IAAIX,MAAMxE,QAAQ,EAAE;QAClBwE,MAAMxE,QAAQ,CAACmF,SAAS,GAAG3F,aACzBK,qBAAqBG,QAAQ,EAC7B4E,kBAAkB,SAASG,WAAWnE,cAAc,GAAGkE,OAAOlE,cAAc,EAC5EsE,qBACAV,MAAMxE,QAAQ,CAACmF,SAAS;IAE5B;IAEA,IAAIX,MAAMvE,cAAc,EAAE;QACxBuE,MAAMvE,cAAc,CAACkF,SAAS,GAAG3F,aAC/BK,qBAAqBI,cAAc,EACnC2E,kBAAkB,SAASG,WAAW9E,cAAc,GAAG6E,OAAO7E,cAAc,EAC5E2E,kBAAkB,UAAUD,aAAaI,WAAWzC,qBAAqB,EACzEsC,kBAAkB,UAAU,CAACD,aAAaF,qBAAqBM,WAAWxC,6BAA6B,EACvGqC,kBAAkB,UAAU3D,YAAY8D,WAAWtC,sBAAsB,EACzE+B,MAAMvE,cAAc,CAACkF,SAAS;IAElC;IAEA,8BAA8B;IAC9B1F,yBAAyB;QAAE,GAAG+E,KAAK;QAAEa,YAAY;YAAE,GAAGb,MAAMa,UAAU;YAAEC,MAAM;QAAO;QAAGC,UAAU;IAAM;IAExG,OAAOf;AACT,EAAE"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SendButton, renderSendButton_unstable, sendButtonClassNames, useSendButtonStyles_unstable, useSendButton_unstable } from './SendButton';
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { SendButtonProps, SendButtonSlots, SendButtonState } from './SendButton';\nexport {\n SendButton,\n renderSendButton_unstable,\n sendButtonClassNames,\n useSendButtonStyles_unstable,\n useSendButton_unstable,\n} from './SendButton';\n"],"names":["SendButton","renderSendButton_unstable","sendButtonClassNames","useSendButtonStyles_unstable","useSendButton_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,UAAU,EACVC,yBAAyB,EACzBC,oBAAoB,EACpBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
SendButton: function() {
|
|
13
|
+
return _SendButton.SendButton;
|
|
14
|
+
},
|
|
15
|
+
renderSendButton_unstable: function() {
|
|
16
|
+
return _SendButton.renderSendButton_unstable;
|
|
17
|
+
},
|
|
18
|
+
sendButtonClassNames: function() {
|
|
19
|
+
return _SendButton.sendButtonClassNames;
|
|
20
|
+
},
|
|
21
|
+
useSendButtonStyles_unstable: function() {
|
|
22
|
+
return _SendButton.useSendButtonStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useSendButton_unstable: function() {
|
|
25
|
+
return _SendButton.useSendButton_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _SendButton = require("./components/SendButton");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["SendButton.ts"],"sourcesContent":["export {\n SendButton,\n renderSendButton_unstable,\n useSendButton_unstable,\n sendButtonClassNames,\n useSendButtonStyles_unstable,\n} from './components/SendButton';\nexport type { SendButtonProps, SendButtonSlots, SendButtonState } from './components/SendButton';\n"],"names":["SendButton","renderSendButton_unstable","sendButtonClassNames","useSendButtonStyles_unstable","useSendButton_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,UAAU;eAAVA,sBAAU;;IACVC,yBAAyB;eAAzBA,qCAAyB;;IAEzBC,oBAAoB;eAApBA,gCAAoB;;IACpBC,4BAA4B;eAA5BA,wCAA4B;;IAF5BC,sBAAsB;eAAtBA,kCAAsB;;;4BAGjB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "SendButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return SendButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useSendButton = require("./useSendButton");
|
|
14
|
+
const _renderSendButton = require("./renderSendButton");
|
|
15
|
+
const _useSendButtonStylesstyles = require("./useSendButtonStyles.styles");
|
|
16
|
+
const SendButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
+
const state = (0, _useSendButton.useSendButton_unstable)(props, ref);
|
|
18
|
+
(0, _useSendButtonStylesstyles.useSendButtonStyles_unstable)(state);
|
|
19
|
+
return (0, _renderSendButton.renderSendButton_unstable)(state);
|
|
20
|
+
});
|
|
21
|
+
SendButton.displayName = 'SendButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["SendButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSendButton_unstable } from './useSendButton';\nimport { renderSendButton_unstable } from './renderSendButton';\nimport { useSendButtonStyles_unstable } from './useSendButtonStyles.styles';\nimport type { SendButtonProps } from './SendButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// SendButton component - TODO: add more docs\nexport const SendButton: ForwardRefComponent<SendButtonProps> = React.forwardRef((props, ref) => {\n const state = useSendButton_unstable(props, ref);\n\n useSendButtonStyles_unstable(state);\n return renderSendButton_unstable(state);\n});\n\nSendButton.displayName = 'SendButton';\n"],"names":["SendButton","React","forwardRef","props","ref","state","useSendButton_unstable","useSendButtonStyles_unstable","renderSendButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;+BACgB;kCACG;2CACG;AAKtC,MAAMA,aAAAA,WAAAA,GAAmDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQC,IAAAA,qCAAAA,EAAuBH,OAAOC;IAE5CG,IAAAA,uDAAAA,EAA6BF;IAC7B,OAAOG,IAAAA,2CAAAA,EAA0BH;AACnC;AAEAL,WAAWS,WAAW,GAAG"}
|