@fluentui-copilot/react-send-button 0.1.1 → 0.1.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.
Files changed (28) hide show
  1. package/CHANGELOG.json +36 -0
  2. package/CHANGELOG.md +20 -1
  3. package/lib/SendButton.js +0 -1
  4. package/lib/components/SendButton/SendButton.js +4 -5
  5. package/lib/components/SendButton/SendButton.types.js +1 -2
  6. package/lib/components/SendButton/buttonMotion.js +199 -138
  7. package/lib/components/SendButton/buttonMotion.js.map +1 -1
  8. package/lib/components/SendButton/index.js +0 -1
  9. package/lib/components/SendButton/renderSendButton.js +38 -30
  10. package/lib/components/SendButton/useSendButton.js +95 -97
  11. package/lib/components/SendButton/useSendButtonStyles.styles.raw.js +193 -0
  12. package/lib/components/SendButton/useSendButtonStyles.styles.raw.js.map +1 -0
  13. package/lib/index.js +0 -1
  14. package/lib-commonjs/SendButton.js +0 -1
  15. package/lib-commonjs/components/SendButton/SendButton.js +1 -1
  16. package/lib-commonjs/components/SendButton/SendButton.js.map +1 -1
  17. package/lib-commonjs/components/SendButton/SendButton.types.js +0 -1
  18. package/lib-commonjs/components/SendButton/buttonMotion.js +1 -1
  19. package/lib-commonjs/components/SendButton/buttonMotion.js.map +1 -1
  20. package/lib-commonjs/components/SendButton/index.js +0 -1
  21. package/lib-commonjs/components/SendButton/renderSendButton.js +1 -1
  22. package/lib-commonjs/components/SendButton/renderSendButton.js.map +1 -1
  23. package/lib-commonjs/components/SendButton/useSendButton.js +1 -1
  24. package/lib-commonjs/components/SendButton/useSendButton.js.map +1 -1
  25. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js +209 -0
  26. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js.map +1 -0
  27. package/lib-commonjs/index.js +0 -1
  28. package/package.json +9 -9
package/CHANGELOG.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-send-button",
3
3
  "entries": [
4
+ {
5
+ "date": "Thu, 17 Jul 2025 17:47:34 GMT",
6
+ "tag": "@fluentui-copilot/react-send-button_v0.1.3",
7
+ "version": "0.1.3",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "hochelmartin@gmail.com",
12
+ "package": "@fluentui-copilot/react-send-button",
13
+ "commit": "fef5160c07333e8d9996952a305b34e357604919",
14
+ "comment": "feat: enable griffel raw styles"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 01 Jul 2025 14:45:29 GMT",
21
+ "tag": "@fluentui-copilot/react-send-button_v0.1.2",
22
+ "version": "0.1.2",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "jiangemma@microsoft.com",
27
+ "package": "@fluentui-copilot/react-send-button",
28
+ "commit": "93c39ced303a2ffdb20764a1d1a1595a12b4ae27",
29
+ "comment": "chore: Bump v9 to 9.66.0 dependency deduplication followup"
30
+ },
31
+ {
32
+ "author": "jiangemma@microsoft.com",
33
+ "package": "@fluentui-copilot/react-send-button",
34
+ "commit": "c9607d83ec7c4f592e563a391e0e7fa87af24929",
35
+ "comment": "Bump v9 to ^9.66.0"
36
+ }
37
+ ]
38
+ }
39
+ },
4
40
  {
5
41
  "date": "Mon, 19 May 2025 18:04:28 GMT",
6
42
  "tag": "@fluentui-copilot/react-send-button_v0.0.4",
package/CHANGELOG.md CHANGED
@@ -1,9 +1,28 @@
1
1
  # Change Log - @fluentui-copilot/react-send-button
2
2
 
3
- This log was last generated on Sat, 03 May 2025 01:27:45 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 17 Jul 2025 17:47:34 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.1.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-send-button_v0.1.3)
8
+
9
+ Thu, 17 Jul 2025 17:47:34 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-send-button_v0.1.2..@fluentui-copilot/react-send-button_v0.1.3)
11
+
12
+ ### Patches
13
+
14
+ - feat: enable griffel raw styles ([PR #3227](https://github.com/microsoft/fluentai/pull/3227) by hochelmartin@gmail.com)
15
+
16
+ ## [0.1.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-send-button_v0.1.2)
17
+
18
+ Tue, 01 Jul 2025 14:45:29 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-send-button_v0.0.4..@fluentui-copilot/react-send-button_v0.1.2)
20
+
21
+ ### Patches
22
+
23
+ - chore: Bump v9 to 9.66.0 dependency deduplication followup ([PR #3176](https://github.com/microsoft/fluentai/pull/3176) by jiangemma@microsoft.com)
24
+ - Bump v9 to ^9.66.0 ([PR #3169](https://github.com/microsoft/fluentai/pull/3169) by jiangemma@microsoft.com)
25
+
7
26
  ## [0.0.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-send-button_v0.0.4)
8
27
 
9
28
  Sat, 03 May 2025 01:27:45 GMT
package/lib/SendButton.js CHANGED
@@ -1,2 +1 @@
1
1
  export { SendButton, renderSendButton_unstable, useSendButton_unstable, sendButtonClassNames, useSendButtonStyles_unstable } from './components/SendButton';
2
- //# sourceMappingURL=SendButton.js.map
@@ -3,10 +3,9 @@ import { useSendButton_unstable } from './useSendButton';
3
3
  import { renderSendButton_unstable } from './renderSendButton';
4
4
  import { useSendButtonStyles_unstable } from './useSendButtonStyles.styles';
5
5
  // SendButton component - TODO: add more docs
6
- export const SendButton = /*#__PURE__*/React.forwardRef((props, ref) => {
7
- const state = useSendButton_unstable(props, ref);
8
- useSendButtonStyles_unstable(state);
9
- return renderSendButton_unstable(state);
6
+ export const SendButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
7
+ const state = useSendButton_unstable(props, ref);
8
+ useSendButtonStyles_unstable(state);
9
+ return renderSendButton_unstable(state);
10
10
  });
11
11
  SendButton.displayName = 'SendButton';
12
- //# sourceMappingURL=SendButton.js.map
@@ -1,4 +1,3 @@
1
1
  /**
2
2
  * State used in rendering SendButton
3
- */export {};
4
- //# sourceMappingURL=SendButton.types.js.map
3
+ */ export { };
@@ -5,147 +5,208 @@ const scaleStop = 1.2;
5
5
  const startScaleCircle = 0.1;
6
6
  const scaleCircle = 1.1;
7
7
  const motionSpeedMultiplier = 1;
8
- const sendMotion = () => {
9
- const enterKeyframes = [{
10
- keyframes: [{
11
- transform: `scale(0)`
12
- }],
13
- duration: 0
14
- }, {
15
- keyframes: [{
16
- transform: `scale(0)`
17
- }, {
18
- transform: `scale(${scaleSend})`
19
- }],
20
- duration: motionTokens.durationNormal * motionSpeedMultiplier,
21
- easing: motionTokens.curveDecelerateMax,
22
- delay: motionTokens.durationSlow * motionSpeedMultiplier
23
- }, {
24
- keyframes: [{
25
- transform: `scale(${scaleSend})`
26
- }, {
27
- transform: 'scale(1)'
28
- }],
29
- duration: motionTokens.durationSlow * motionSpeedMultiplier,
30
- easing: motionTokens.curveDecelerateMid,
31
- delay: (motionTokens.durationSlow + motionTokens.durationNormal) * motionSpeedMultiplier
32
- }];
33
- const exitKeyframes = [{
34
- keyframes: [{
35
- transform: `scale(1)`
36
- }, {
37
- transform: `scale(0)`
38
- }],
39
- duration: motionTokens.durationFast * motionSpeedMultiplier,
40
- easing: motionTokens.curveDecelerateMid
41
- }];
42
- return {
43
- enter: enterKeyframes,
44
- exit: exitKeyframes
45
- };
8
+ const sendMotion = ()=>{
9
+ const enterKeyframes = [
10
+ {
11
+ keyframes: [
12
+ {
13
+ transform: `scale(0)`
14
+ }
15
+ ],
16
+ duration: 0
17
+ },
18
+ {
19
+ keyframes: [
20
+ {
21
+ transform: `scale(0)`
22
+ },
23
+ {
24
+ transform: `scale(${scaleSend})`
25
+ }
26
+ ],
27
+ duration: motionTokens.durationNormal * motionSpeedMultiplier,
28
+ easing: motionTokens.curveDecelerateMax,
29
+ delay: motionTokens.durationSlow * motionSpeedMultiplier
30
+ },
31
+ {
32
+ keyframes: [
33
+ {
34
+ transform: `scale(${scaleSend})`
35
+ },
36
+ {
37
+ transform: 'scale(1)'
38
+ }
39
+ ],
40
+ duration: motionTokens.durationSlow * motionSpeedMultiplier,
41
+ easing: motionTokens.curveDecelerateMid,
42
+ delay: (motionTokens.durationSlow + motionTokens.durationNormal) * motionSpeedMultiplier
43
+ }
44
+ ];
45
+ const exitKeyframes = [
46
+ {
47
+ keyframes: [
48
+ {
49
+ transform: `scale(1)`
50
+ },
51
+ {
52
+ transform: `scale(0)`
53
+ }
54
+ ],
55
+ duration: motionTokens.durationFast * motionSpeedMultiplier,
56
+ easing: motionTokens.curveDecelerateMid
57
+ }
58
+ ];
59
+ return {
60
+ enter: enterKeyframes,
61
+ exit: exitKeyframes
62
+ };
46
63
  };
47
- const stopMotion = () => {
48
- const enterKeyframes = [{
49
- keyframes: [{
50
- opacity: 0
51
- }],
52
- duration: 0
53
- }, {
54
- keyframes: [{
55
- opacity: 1
56
- }],
57
- duration: 0,
58
- delay: 30 * motionSpeedMultiplier
59
- }, {
60
- keyframes: [{
61
- transform: `scale(${startScaleStop})`
62
- }, {
63
- transform: `scale(1)`
64
- }],
65
- duration: motionTokens.durationSlower * motionSpeedMultiplier,
66
- easing: motionTokens.curveDecelerateMid
67
- }];
68
- const exitKeyframes = [{
69
- keyframes: [{
70
- transform: `scale(1)`
71
- }, {
72
- transform: `scale(${scaleStop})`
73
- }],
74
- duration: motionTokens.durationFast * motionSpeedMultiplier,
75
- easing: motionTokens.curveDecelerateMax,
76
- delay: motionTokens.durationUltraFast * motionSpeedMultiplier
77
- }, {
78
- keyframes: [{
79
- transform: `scale(${scaleStop})`
80
- }, {
81
- transform: 'scale(0)'
82
- }],
83
- duration: motionTokens.durationFaster,
84
- easing: motionTokens.curveDecelerateMin,
85
- delay: (motionTokens.durationUltraFast + motionTokens.durationFast) * motionSpeedMultiplier
86
- }];
87
- return {
88
- enter: enterKeyframes,
89
- exit: exitKeyframes
90
- };
64
+ const stopMotion = ()=>{
65
+ const enterKeyframes = [
66
+ {
67
+ keyframes: [
68
+ {
69
+ opacity: 0
70
+ }
71
+ ],
72
+ duration: 0
73
+ },
74
+ {
75
+ keyframes: [
76
+ {
77
+ opacity: 1
78
+ }
79
+ ],
80
+ duration: 0,
81
+ delay: 30 * motionSpeedMultiplier
82
+ },
83
+ {
84
+ keyframes: [
85
+ {
86
+ transform: `scale(${startScaleStop})`
87
+ },
88
+ {
89
+ transform: `scale(1)`
90
+ }
91
+ ],
92
+ duration: motionTokens.durationSlower * motionSpeedMultiplier,
93
+ easing: motionTokens.curveDecelerateMid
94
+ }
95
+ ];
96
+ const exitKeyframes = [
97
+ {
98
+ keyframes: [
99
+ {
100
+ transform: `scale(1)`
101
+ },
102
+ {
103
+ transform: `scale(${scaleStop})`
104
+ }
105
+ ],
106
+ duration: motionTokens.durationFast * motionSpeedMultiplier,
107
+ easing: motionTokens.curveDecelerateMax,
108
+ delay: motionTokens.durationUltraFast * motionSpeedMultiplier
109
+ },
110
+ {
111
+ keyframes: [
112
+ {
113
+ transform: `scale(${scaleStop})`
114
+ },
115
+ {
116
+ transform: 'scale(0)'
117
+ }
118
+ ],
119
+ duration: motionTokens.durationFaster,
120
+ easing: motionTokens.curveDecelerateMin,
121
+ delay: (motionTokens.durationUltraFast + motionTokens.durationFast) * motionSpeedMultiplier
122
+ }
123
+ ];
124
+ return {
125
+ enter: enterKeyframes,
126
+ exit: exitKeyframes
127
+ };
91
128
  };
92
- const circleMotion = () => {
93
- const enterKeyframes = [{
94
- keyframes: [{
95
- opacity: 0
96
- }],
97
- duration: 0
98
- }, {
99
- keyframes: [{
100
- opacity: 0
101
- }, {
102
- opacity: 1
103
- }],
104
- duration: 0,
105
- delay: motionTokens.durationFaster * motionSpeedMultiplier
106
- }, {
107
- keyframes: [{
108
- transform: `scale(${startScaleCircle})`
109
- }, {
110
- transform: `scale(${scaleCircle})`
111
- }],
112
- duration: motionTokens.durationSlow * motionSpeedMultiplier,
113
- easing: motionTokens.curveDecelerateMax,
114
- delay: motionTokens.durationFaster * motionSpeedMultiplier
115
- }, {
116
- keyframes: [{
117
- transform: `scale(${scaleCircle})`
118
- }, {
119
- transform: `scale(1)`
120
- }],
121
- duration: motionTokens.durationNormal * motionSpeedMultiplier,
122
- easing: motionTokens.curveDecelerateMin,
123
- delay: (motionTokens.durationSlow + motionTokens.durationFaster) * motionSpeedMultiplier
124
- }];
125
- const exitKeyframes = [{
126
- keyframes: [{
127
- transform: `scale(1)`
128
- }, {
129
- transform: `scale(${scaleCircle})`
130
- }],
131
- duration: motionTokens.durationFast * motionSpeedMultiplier,
132
- easing: motionTokens.curveDecelerateMax
133
- }, {
134
- keyframes: [{
135
- transform: `scale(${scaleCircle})`
136
- }, {
137
- transform: 'scale(0)'
138
- }],
139
- duration: motionTokens.durationFaster * motionSpeedMultiplier,
140
- easing: motionTokens.curveDecelerateMin,
141
- delay: motionTokens.durationFast * motionSpeedMultiplier
142
- }];
143
- return {
144
- enter: enterKeyframes,
145
- exit: exitKeyframes
146
- };
129
+ const circleMotion = ()=>{
130
+ const enterKeyframes = [
131
+ {
132
+ keyframes: [
133
+ {
134
+ opacity: 0
135
+ }
136
+ ],
137
+ duration: 0
138
+ },
139
+ {
140
+ keyframes: [
141
+ {
142
+ opacity: 0
143
+ },
144
+ {
145
+ opacity: 1
146
+ }
147
+ ],
148
+ duration: 0,
149
+ delay: motionTokens.durationFaster * motionSpeedMultiplier
150
+ },
151
+ {
152
+ keyframes: [
153
+ {
154
+ transform: `scale(${startScaleCircle})`
155
+ },
156
+ {
157
+ transform: `scale(${scaleCircle})`
158
+ }
159
+ ],
160
+ duration: motionTokens.durationSlow * motionSpeedMultiplier,
161
+ easing: motionTokens.curveDecelerateMax,
162
+ delay: motionTokens.durationFaster * motionSpeedMultiplier
163
+ },
164
+ {
165
+ keyframes: [
166
+ {
167
+ transform: `scale(${scaleCircle})`
168
+ },
169
+ {
170
+ transform: `scale(1)`
171
+ }
172
+ ],
173
+ duration: motionTokens.durationNormal * motionSpeedMultiplier,
174
+ easing: motionTokens.curveDecelerateMin,
175
+ delay: (motionTokens.durationSlow + motionTokens.durationFaster) * motionSpeedMultiplier
176
+ }
177
+ ];
178
+ const exitKeyframes = [
179
+ {
180
+ keyframes: [
181
+ {
182
+ transform: `scale(1)`
183
+ },
184
+ {
185
+ transform: `scale(${scaleCircle})`
186
+ }
187
+ ],
188
+ duration: motionTokens.durationFast * motionSpeedMultiplier,
189
+ easing: motionTokens.curveDecelerateMax
190
+ },
191
+ {
192
+ keyframes: [
193
+ {
194
+ transform: `scale(${scaleCircle})`
195
+ },
196
+ {
197
+ transform: 'scale(0)'
198
+ }
199
+ ],
200
+ duration: motionTokens.durationFaster * motionSpeedMultiplier,
201
+ easing: motionTokens.curveDecelerateMin,
202
+ delay: motionTokens.durationFast * motionSpeedMultiplier
203
+ }
204
+ ];
205
+ return {
206
+ enter: enterKeyframes,
207
+ exit: exitKeyframes
208
+ };
147
209
  };
148
210
  export const SendButtonMotion = createPresenceComponent(sendMotion);
149
211
  export const StopButtonMotion = createPresenceComponent(stopMotion);
150
212
  export const CircleButtonMotion = createPresenceComponent(circleMotion);
151
- //# sourceMappingURL=buttonMotion.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["buttonMotion.ts"],"sourcesContent":["import type { PresenceMotionFn } from '@fluentui/react-components';\nimport { createPresenceComponent, motionTokens } from '@fluentui/react-components';\n\nconst scaleSend = 1.2;\nconst startScaleStop = 0.5;\nconst scaleStop = 1.2;\nconst startScaleCircle = 0.1;\nconst scaleCircle = 1.1;\n\nconst motionSpeedMultiplier = 1;\n\nconst sendMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ transform: `scale(0)` }],\n duration: 0,\n },\n {\n keyframes: [{ transform: `scale(0)` }, { transform: `scale(${scaleSend})` }],\n duration: motionTokens.durationNormal * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationSlow * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleSend})` }, { transform: 'scale(1)' }],\n duration: motionTokens.durationSlow * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n delay: (motionTokens.durationSlow + motionTokens.durationNormal) * motionSpeedMultiplier,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(0)` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nconst stopMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }],\n duration: 0,\n },\n {\n keyframes: [{ opacity: 1 }],\n duration: 0,\n delay: 30 * motionSpeedMultiplier, // non-standard motion duration\n },\n {\n keyframes: [{ transform: `scale(${startScaleStop})` }, { transform: `scale(1)` }],\n duration: motionTokens.durationSlower * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(${scaleStop})` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationUltraFast * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleStop})` }, { transform: 'scale(0)' }],\n duration: motionTokens.durationFaster,\n easing: motionTokens.curveDecelerateMin,\n delay: (motionTokens.durationUltraFast + motionTokens.durationFast) * motionSpeedMultiplier,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nconst circleMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }],\n duration: 0,\n },\n {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n duration: 0,\n delay: motionTokens.durationFaster * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${startScaleCircle})` }, { transform: `scale(${scaleCircle})` }],\n duration: motionTokens.durationSlow * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationFaster * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleCircle})` }, { transform: `scale(1)` }],\n duration: motionTokens.durationNormal * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMin,\n delay: (motionTokens.durationSlow + motionTokens.durationFaster) * motionSpeedMultiplier,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(${scaleCircle})` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n },\n {\n keyframes: [{ transform: `scale(${scaleCircle})` }, { transform: 'scale(0)' }],\n duration: motionTokens.durationFaster * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMin,\n delay: motionTokens.durationFast * motionSpeedMultiplier,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\nexport const SendButtonMotion = createPresenceComponent(sendMotion);\nexport const StopButtonMotion = createPresenceComponent(stopMotion);\nexport const CircleButtonMotion = createPresenceComponent(circleMotion);\n"],"names":["createPresenceComponent","motionTokens","scaleSend","startScaleStop","scaleStop","startScaleCircle","scaleCircle","motionSpeedMultiplier","sendMotion","enterKeyframes","keyframes","transform","duration","durationNormal","easing","curveDecelerateMax","delay","durationSlow","curveDecelerateMid","exitKeyframes","durationFast","enter","exit","stopMotion","opacity","durationSlower","durationUltraFast","durationFaster","curveDecelerateMin","circleMotion","SendButtonMotion","StopButtonMotion","CircleButtonMotion"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,uBA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Y,CAAC,CAAC;gBAAC;aAAE;YAChGM,UAAUX,aAAagB,YAAY,GAAGV;YACtCO,QAAQb,aAAac,kBAAkB;YACvCC,OAAOf,aAAa0B,cAAc,GAAGpB;QACvC;QACA;YACEG,WAAW;gBAAC;oBAAEC,WAAW,CAAC,MAAM,EAAEL,YAAY,CAAC,CAAC;gBAAC;gBAAG;oBAAEK,WAAW,CAAC,QAAQ,CAAC;gBAAC;aAAE;YAC9EC,UAAUX,aAAaY,cAAc,GAAGN;YACxCO,QAAQb,aAAa2B,kBAAkB;YACvCZ,OAAO,AAACf,CAAAA,aAAagB,YAAY,GAAGhB,aAAa0B,cAAc,AAAD,IAAKpB;QACrE;KACD;IAED,MAAMY,gBAAgB;QACpB;YACET,WAAW;gBAAC;oBAAEC,WAAW,CAAC,QAAQ,CAAC;gBAAC;gBAAG;oBAAEA,WAAW,CAAC,MAAM,EAAEL,YAAY,CAAC,CAAC;gBAAC;aAAE;YAC9EM,UAAUX,aAAamB,YAAY,GAAGb;YACtCO,QAAQb,aAAac,kBAAkB;QACzC;QACA;YACEL,WAAW;gBAAC;oBAAEC,WAAW,CAAC,MAAM,EAAEL,YAAY,CAAC,CAAC;gBAAC;gBAAG;oBAAEK,WAAW;gBAAW;aAAE;YAC9EC,UAAUX,aAAa0B,cAAc,GAAGpB;YACxCO,QAAQb,aAAa2B,kBAAkB;YACvCZ,OAAOf,aAAamB,YAAY,GAAGb;QACrC;KACD;IAED,OAAO;QACLc,OAAOZ;QACPa,MAAMH;IACR;AACF;AACA,OAAO,MAAMW,mBAAmB9B,wBAAwBQ,YAAY;AACpE,OAAO,MAAMuB,mBAAmB/B,wBAAwBuB,YAAY;AACpE,OAAO,MAAMS,qBAAqBhC,wBAAwB6B,cAAc"}
1
+ {"version":3,"sources":["buttonMotion.ts"],"sourcesContent":["import type { PresenceMotionFn } from '@fluentui/react-components';\nimport { createPresenceComponent, motionTokens } from '@fluentui/react-components';\n\nconst scaleSend = 1.2;\nconst startScaleStop = 0.5;\nconst scaleStop = 1.2;\nconst startScaleCircle = 0.1;\nconst scaleCircle = 1.1;\n\nconst motionSpeedMultiplier = 1;\n\nconst sendMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ transform: `scale(0)` }],\n duration: 0,\n },\n {\n keyframes: [{ transform: `scale(0)` }, { transform: `scale(${scaleSend})` }],\n duration: motionTokens.durationNormal * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationSlow * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleSend})` }, { transform: 'scale(1)' }],\n duration: motionTokens.durationSlow * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n delay: (motionTokens.durationSlow + motionTokens.durationNormal) * motionSpeedMultiplier,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(0)` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nconst stopMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }],\n duration: 0,\n },\n {\n keyframes: [{ opacity: 1 }],\n duration: 0,\n delay: 30 * motionSpeedMultiplier, // non-standard motion duration\n },\n {\n keyframes: [{ transform: `scale(${startScaleStop})` }, { transform: `scale(1)` }],\n duration: motionTokens.durationSlower * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(${scaleStop})` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationUltraFast * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleStop})` }, { transform: 'scale(0)' }],\n duration: motionTokens.durationFaster,\n easing: motionTokens.curveDecelerateMin,\n delay: (motionTokens.durationUltraFast + motionTokens.durationFast) * motionSpeedMultiplier,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nconst circleMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }],\n duration: 0,\n },\n {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n duration: 0,\n delay: motionTokens.durationFaster * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${startScaleCircle})` }, { transform: `scale(${scaleCircle})` }],\n duration: motionTokens.durationSlow * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationFaster * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleCircle})` }, { transform: `scale(1)` }],\n duration: motionTokens.durationNormal * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMin,\n delay: (motionTokens.durationSlow + motionTokens.durationFaster) * motionSpeedMultiplier,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(${scaleCircle})` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n },\n {\n keyframes: [{ transform: `scale(${scaleCircle})` }, { transform: 'scale(0)' }],\n duration: motionTokens.durationFaster * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMin,\n delay: motionTokens.durationFast * motionSpeedMultiplier,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\nexport const SendButtonMotion: ReturnType<typeof createPresenceComponent<{}>> = createPresenceComponent(sendMotion);\nexport const StopButtonMotion: ReturnType<typeof createPresenceComponent<{}>> = createPresenceComponent(stopMotion);\nexport const CircleButtonMotion: ReturnType<typeof createPresenceComponent<{}>> = createPresenceComponent(circleMotion);\n"],"names":["createPresenceComponent","motionTokens","scaleSend","startScaleStop","scaleStop","startScaleCircle","scaleCircle","motionSpeedMultiplier","sendMotion","enterKeyframes","keyframes","transform","duration","durationNormal","easing","curveDecelerateMax","delay","durationSlow","curveDecelerateMid","exitKeyframes","durationFast","enter","exit","stopMotion","opacity","durationSlower","durationUltraFast","durationFaster","curveDecelerateMin","circleMotion","SendButtonMotion","StopButtonMotion","CircleButtonMotion"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,uBAAuB,EAAEC,YAAY,QAAQ,6BAA6B;AAEnF,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AACvB,MAAMC,YAAY;AAClB,MAAMC,mBAAmB;AACzB,MAAMC,cAAc;AAEpB,MAAMC,wBAAwB;AAE9B,MAAMC,aAA+B;IACnC,MAAMC,iBAAiB;QACrB;YACEC,WAAW;gBAAC;oBAAEC,WAAW,CAAC,QAAQ,CAAC;gBAAC;aAAE;YACtCC,UAAU;QACZ;QACA;YACEF,WAAW;gBAAC;oBAAEC,WAAW,CAAC,QAAQ,CAAC;gBAAC;gBAAG;oBAAEA,WAAW,CAAC,MAAM,EAAET,UAAU,CAAC,CAAC;gBAAC;aAAE;YAC5EU,UAAUX,aAAaY,cAAc,GAAGN;YACxCO,QAAQb,aAAac,kBAAkB;YACvCC,OAAOf,aAAagB,YAAY,GAAGV;QACrC;QACA;YACEG,WAAW;gBAAC;oBAAEC,WAAW,CAAC,MAAM,EAAET,UAAU,CAAC,CAAC;gBAAC;gBAAG;oBAAES,WAAW;gBAAW;aAAE;YAC5EC,UAAUX,aAAagB,YAAY,GAAGV;YACtCO,QAAQb,aAAaiB,kBAAkB;YACvCF,OAAO,AAACf,CAAAA,aAAagB,YAAY,GAAGhB,aAAaY,cAAc,AAAD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AAUX,aAAa0B,cAAc,GAAGpB;YACxCO,QAAQb,aAAa2B,kBAAkB;YACvCZ,OAAOf,aAAamB,YAAY,GAAGb;QACrC;KACD;IAED,OAAO;QACLc,OAAOZ;QACPa,MAAMH;IACR;AACF;AACA,OAAO,MAAMW,mBAAmE9B,wBAAwBQ,YAAY;AACpH,OAAO,MAAMuB,mBAAmE/B,wBAAwBuB,YAAY;AACpH,OAAO,MAAMS,qBAAqEhC,wBAAwB6B,cAAc"}
@@ -2,4 +2,3 @@ export { SendButton } from './SendButton';
2
2
  export { renderSendButton_unstable } from './renderSendButton';
3
3
  export { useSendButton_unstable } from './useSendButton';
4
4
  export { sendButtonClassNames, useSendButtonStyles_unstable } from './useSendButtonStyles.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1,38 +1,46 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
3
  /**
4
4
  * Render the final JSX of SendButton
5
- */
6
- export const renderSendButton_unstable = state => {
7
- if (state.designVersion === 'next') {
8
- return renderSendButtonNext(state);
9
- }
10
- return renderSendButtonCurrent(state);
5
+ */ export const renderSendButton_unstable = (state)=>{
6
+ if (state.designVersion === 'next') {
7
+ return renderSendButtonNext(state);
8
+ }
9
+ return renderSendButtonCurrent(state);
11
10
  };
12
11
  function renderSendButtonCurrent(state) {
13
- assertSlots(state);
14
- return /*#__PURE__*/_jsxs(state.root, {
15
- children: [state.stopIcon && /*#__PURE__*/_jsxs(_Fragment, {
16
- children: [/*#__PURE__*/_jsx(state.stopBackgroundMotion, {
17
- children: /*#__PURE__*/_jsx(state.stopBackground, {})
18
- }), /*#__PURE__*/_jsx(state.stopButtonMotion, {
19
- children: /*#__PURE__*/_jsx(state.stopIcon, {})
20
- })]
21
- }), /*#__PURE__*/_jsx(state.sendButtonMotion, {
22
- children: /*#__PURE__*/_jsx(state.sendIcon, {})
23
- })]
24
- });
12
+ assertSlots(state);
13
+ return /*#__PURE__*/ _jsxs(state.root, {
14
+ children: [
15
+ state.stopIcon && /*#__PURE__*/ _jsxs(_Fragment, {
16
+ children: [
17
+ /*#__PURE__*/ _jsx(state.stopBackgroundMotion, {
18
+ children: /*#__PURE__*/ _jsx(state.stopBackground, {})
19
+ }),
20
+ /*#__PURE__*/ _jsx(state.stopButtonMotion, {
21
+ children: /*#__PURE__*/ _jsx(state.stopIcon, {})
22
+ })
23
+ ]
24
+ }),
25
+ /*#__PURE__*/ _jsx(state.sendButtonMotion, {
26
+ children: /*#__PURE__*/ _jsx(state.sendIcon, {})
27
+ })
28
+ ]
29
+ });
25
30
  }
26
31
  function renderSendButtonNext(state) {
27
- assertSlots(state);
28
- return /*#__PURE__*/_jsxs(state.root, {
29
- children: [/*#__PURE__*/_jsx(state.stopBackgroundMotion, {
30
- children: /*#__PURE__*/_jsx(state.stopBackground, {})
31
- }), state.stopIcon && /*#__PURE__*/_jsx(state.stopButtonMotion, {
32
- children: /*#__PURE__*/_jsx(state.stopIcon, {})
33
- }), /*#__PURE__*/_jsx(state.sendButtonMotion, {
34
- children: /*#__PURE__*/_jsx(state.sendIcon, {})
35
- })]
36
- });
32
+ assertSlots(state);
33
+ return /*#__PURE__*/ _jsxs(state.root, {
34
+ children: [
35
+ /*#__PURE__*/ _jsx(state.stopBackgroundMotion, {
36
+ children: /*#__PURE__*/ _jsx(state.stopBackground, {})
37
+ }),
38
+ state.stopIcon && /*#__PURE__*/ _jsx(state.stopButtonMotion, {
39
+ children: /*#__PURE__*/ _jsx(state.stopIcon, {})
40
+ }),
41
+ /*#__PURE__*/ _jsx(state.sendButtonMotion, {
42
+ children: /*#__PURE__*/ _jsx(state.sendIcon, {})
43
+ })
44
+ ]
45
+ });
37
46
  }
38
- //# sourceMappingURL=renderSendButton.js.map