@fluentui-copilot/react-send-button 0.0.0-nightly-20250703-0404-3a2097a9.1 → 0.0.0-nightly-20250708-1433-52f2b6b1.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 (27) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  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/index.js +0 -1
  8. package/lib/components/SendButton/renderSendButton.js +38 -30
  9. package/lib/components/SendButton/useSendButton.js +95 -97
  10. package/lib/components/SendButton/useSendButtonStyles.styles.raw.js +193 -0
  11. package/lib/components/SendButton/useSendButtonStyles.styles.raw.js.map +1 -0
  12. package/lib/index.js +0 -1
  13. package/lib-commonjs/SendButton.js +0 -1
  14. package/lib-commonjs/components/SendButton/SendButton.js +1 -1
  15. package/lib-commonjs/components/SendButton/SendButton.js.map +1 -1
  16. package/lib-commonjs/components/SendButton/SendButton.types.js +0 -1
  17. package/lib-commonjs/components/SendButton/buttonMotion.js +1 -1
  18. package/lib-commonjs/components/SendButton/buttonMotion.js.map +1 -1
  19. package/lib-commonjs/components/SendButton/index.js +0 -1
  20. package/lib-commonjs/components/SendButton/renderSendButton.js +1 -1
  21. package/lib-commonjs/components/SendButton/renderSendButton.js.map +1 -1
  22. package/lib-commonjs/components/SendButton/useSendButton.js +1 -1
  23. package/lib-commonjs/components/SendButton/useSendButton.js.map +1 -1
  24. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js +209 -0
  25. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.raw.js.map +1 -0
  26. package/lib-commonjs/index.js +0 -1
  27. package/package.json +4 -4
@@ -13,101 +13,99 @@ const SendIcon = bundleIcon(SendFilled, SendRegular);
13
13
  *
14
14
  * @param props - props from this instance of SendButton
15
15
  * @param ref - reference to root HTMLElement of SendButton
16
- */
17
- export const useSendButton_unstable = (props, ref) => {
18
- /** Used to apply/remove styles when button is animating */const [isSendMotionRunning, setIsSendMotionRunning] = React.useState(false);
19
- const [isStopMotionRunning, setIsStopMotionRunning] = React.useState(false);
20
- const isButtonMotionRunning = isSendMotionRunning || isStopMotionRunning;
21
- const designVersion = useDesignVersion(props.designVersion);
22
- const mode = useCopilotMode(props.mode);
23
- const [visible, setVisible] = React.useState(false);
24
- const mountRef = React.useCallback(elem => {
25
- if (elem) {
26
- setVisible(true);
27
- } else {
28
- setVisible(false);
29
- }
30
- }, []);
31
- const finalRef = useMergedRefs(ref, mountRef);
32
- const buttonState = useButton_unstable({
33
- shape: designVersion === 'next' ? 'circular' : undefined,
34
- ...props,
35
- appearance: 'transparent',
36
- 'aria-disabled': props.disabled ? true : undefined,
37
- type: 'submit'
38
- }, finalRef);
39
- const icon = (() => {
40
- if (designVersion === 'next') {
41
- return mode === 'canvas' ? /*#__PURE__*/React.createElement(ArrowRight24Filled, null) : /*#__PURE__*/React.createElement(ArrowRight20Filled, null);
42
- } else {
43
- if (props.isSendIconFilled || isButtonMotionRunning) {
44
- return /*#__PURE__*/React.createElement(SendFilled, null);
45
- } else {
46
- return /*#__PURE__*/React.createElement(SendIcon, null);
47
- }
48
- }
49
- })();
50
- var _props_isDictationActive;
51
- const state = {
52
- ...buttonState,
53
- components: {
54
- root: 'button',
55
- sendIcon: 'span',
56
- stopIcon: 'span',
57
- stopBackground: 'div',
58
- sendButtonMotion: SendButtonMotion,
59
- stopButtonMotion: StopButtonMotion,
60
- stopBackgroundMotion: CircleButtonMotion
61
- },
62
- root: buttonState.root,
63
- sendIcon: slot.always(props.sendIcon, {
64
- elementType: 'span',
65
- defaultProps: {
66
- children: icon
67
- }
68
- }),
69
- stopIcon: slot.optional(props.stopIcon, {
70
- elementType: 'span',
71
- defaultProps: {
72
- children: designVersion === 'next' ? mode === 'canvas' ? /*#__PURE__*/React.createElement(Stop20Filled, null) : /*#__PURE__*/React.createElement(Stop16Filled, null) : /*#__PURE__*/React.createElement(Stop16Filled, null)
73
- },
74
- renderByDefault: true
75
- }),
76
- stopBackground: slot.always(props.stopBackground, {
77
- elementType: 'div'
78
- }),
79
- sendButtonMotion: presenceMotionSlot(props.sendButtonMotion, {
80
- elementType: SendButtonMotion,
81
- defaultProps: {
82
- visible: !props.isSending,
83
- unmountOnExit: true,
84
- onMotionFinish: () => setIsSendMotionRunning(false),
85
- onMotionStart: () => setIsSendMotionRunning(true)
86
- }
87
- }),
88
- stopButtonMotion: presenceMotionSlot(props.stopButtonMotion, {
89
- elementType: StopButtonMotion,
90
- defaultProps: {
91
- visible: props.isSending,
92
- unmountOnExit: true,
93
- onMotionFinish: () => setIsStopMotionRunning(false),
94
- onMotionStart: () => setIsStopMotionRunning(true)
95
- }
96
- }),
97
- stopBackgroundMotion: presenceMotionSlot(props.stopBackgroundMotion, {
98
- elementType: CircleButtonMotion,
99
- defaultProps: {
100
- visible: designVersion === 'next' ? visible : props.isSending,
101
- unmountOnExit: true
102
- }
103
- }),
104
- isButtonMotionRunning,
105
- isDictationActive: (_props_isDictationActive = props.isDictationActive) !== null && _props_isDictationActive !== void 0 ? _props_isDictationActive : false,
106
- isSendIconFilled: props.isSendIconFilled,
107
- isSending: props.isSending,
108
- designVersion,
109
- mode
110
- };
111
- return state;
16
+ */ export const useSendButton_unstable = (props, ref)=>{
17
+ /** Used to apply/remove styles when button is animating */ const [isSendMotionRunning, setIsSendMotionRunning] = React.useState(false);
18
+ const [isStopMotionRunning, setIsStopMotionRunning] = React.useState(false);
19
+ const isButtonMotionRunning = isSendMotionRunning || isStopMotionRunning;
20
+ const designVersion = useDesignVersion(props.designVersion);
21
+ const mode = useCopilotMode(props.mode);
22
+ const [visible, setVisible] = React.useState(false);
23
+ const mountRef = React.useCallback((elem)=>{
24
+ if (elem) {
25
+ setVisible(true);
26
+ } else {
27
+ setVisible(false);
28
+ }
29
+ }, []);
30
+ const finalRef = useMergedRefs(ref, mountRef);
31
+ const buttonState = useButton_unstable({
32
+ shape: designVersion === 'next' ? 'circular' : undefined,
33
+ ...props,
34
+ appearance: 'transparent',
35
+ 'aria-disabled': props.disabled ? true : undefined,
36
+ type: 'submit'
37
+ }, finalRef);
38
+ const icon = (()=>{
39
+ if (designVersion === 'next') {
40
+ return mode === 'canvas' ? /*#__PURE__*/ React.createElement(ArrowRight24Filled, null) : /*#__PURE__*/ React.createElement(ArrowRight20Filled, null);
41
+ } else {
42
+ if (props.isSendIconFilled || isButtonMotionRunning) {
43
+ return /*#__PURE__*/ React.createElement(SendFilled, null);
44
+ } else {
45
+ return /*#__PURE__*/ React.createElement(SendIcon, null);
46
+ }
47
+ }
48
+ })();
49
+ var _props_isDictationActive;
50
+ const state = {
51
+ ...buttonState,
52
+ components: {
53
+ root: 'button',
54
+ sendIcon: 'span',
55
+ stopIcon: 'span',
56
+ stopBackground: 'div',
57
+ sendButtonMotion: SendButtonMotion,
58
+ stopButtonMotion: StopButtonMotion,
59
+ stopBackgroundMotion: CircleButtonMotion
60
+ },
61
+ root: buttonState.root,
62
+ sendIcon: slot.always(props.sendIcon, {
63
+ elementType: 'span',
64
+ defaultProps: {
65
+ children: icon
66
+ }
67
+ }),
68
+ stopIcon: slot.optional(props.stopIcon, {
69
+ elementType: 'span',
70
+ defaultProps: {
71
+ children: designVersion === 'next' ? mode === 'canvas' ? /*#__PURE__*/ React.createElement(Stop20Filled, null) : /*#__PURE__*/ React.createElement(Stop16Filled, null) : /*#__PURE__*/ React.createElement(Stop16Filled, null)
72
+ },
73
+ renderByDefault: true
74
+ }),
75
+ stopBackground: slot.always(props.stopBackground, {
76
+ elementType: 'div'
77
+ }),
78
+ sendButtonMotion: presenceMotionSlot(props.sendButtonMotion, {
79
+ elementType: SendButtonMotion,
80
+ defaultProps: {
81
+ visible: !props.isSending,
82
+ unmountOnExit: true,
83
+ onMotionFinish: ()=>setIsSendMotionRunning(false),
84
+ onMotionStart: ()=>setIsSendMotionRunning(true)
85
+ }
86
+ }),
87
+ stopButtonMotion: presenceMotionSlot(props.stopButtonMotion, {
88
+ elementType: StopButtonMotion,
89
+ defaultProps: {
90
+ visible: props.isSending,
91
+ unmountOnExit: true,
92
+ onMotionFinish: ()=>setIsStopMotionRunning(false),
93
+ onMotionStart: ()=>setIsStopMotionRunning(true)
94
+ }
95
+ }),
96
+ stopBackgroundMotion: presenceMotionSlot(props.stopBackgroundMotion, {
97
+ elementType: CircleButtonMotion,
98
+ defaultProps: {
99
+ visible: designVersion === 'next' ? visible : props.isSending,
100
+ unmountOnExit: true
101
+ }
102
+ }),
103
+ isButtonMotionRunning,
104
+ isDictationActive: (_props_isDictationActive = props.isDictationActive) !== null && _props_isDictationActive !== void 0 ? _props_isDictationActive : false,
105
+ isSendIconFilled: props.isSendIconFilled,
106
+ isSending: props.isSending,
107
+ designVersion,
108
+ mode
109
+ };
110
+ return state;
112
111
  };
113
- //# sourceMappingURL=useSendButton.js.map
@@ -0,0 +1,193 @@
1
+ import { makeStyles, mergeClasses, useButtonStyles_unstable, createCustomFocusIndicatorStyle } 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
+ },
58
+ dictationActive: {
59
+ color: tokens.colorNeutralForeground2
60
+ },
61
+ sendIconFilled: {
62
+ color: tokens.colorNeutralForegroundOnBrand
63
+ },
64
+ stopIconFilled: {
65
+ color: tokens.colorBrandForeground2
66
+ },
67
+ stopBackground: {
68
+ gridArea: 'button',
69
+ height: '100%',
70
+ width: '100%',
71
+ borderRadius: tokens.borderRadiusCircular,
72
+ backgroundColor: tokens.colorBrandBackground
73
+ },
74
+ stopBackgroundSending: {
75
+ backgroundColor: tokens.colorBrandBackground2
76
+ },
77
+ stopBackgroundDictationActive: {
78
+ backgroundColor: tokens.colorTransparentBackground
79
+ },
80
+ disabled: {
81
+ color: tokens.colorNeutralForegroundDisabled
82
+ },
83
+ stopBackgroundDisabled: {
84
+ backgroundColor: tokens.colorNeutralBackgroundDisabled
85
+ }
86
+ });
87
+ const useRootNextStyles = makeStyles({
88
+ root: {
89
+ display: 'grid',
90
+ gridTemplateAreas: `"button"`,
91
+ gridTemplateRows: '1fr',
92
+ gridTemplateColumns: '1fr',
93
+ justifyItems: 'center',
94
+ alignItems: 'center',
95
+ padding: tokens.spacingVerticalNone,
96
+ border: 'none',
97
+ position: 'relative',
98
+ ...createCustomFocusIndicatorStyle({
99
+ outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,
100
+ boxShadow: `0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}`
101
+ })
102
+ },
103
+ canvas: {
104
+ minWidth: '40px',
105
+ height: '40px'
106
+ },
107
+ sidecar: {
108
+ minWidth: '32px',
109
+ height: '32px'
110
+ },
111
+ notSending: {
112
+ ':hover': {
113
+ [`& .${sendButtonClassNames.stopBackground}`]: {
114
+ backgroundColor: tokens.colorBrandBackgroundHover
115
+ },
116
+ [`& .${sendButtonClassNames.sendIcon},.${sendButtonClassNames.stopIcon}`]: {
117
+ color: tokens.colorNeutralForegroundOnBrand
118
+ }
119
+ },
120
+ ':active': {
121
+ [`& .${sendButtonClassNames.stopBackground}`]: {
122
+ backgroundColor: tokens.colorBrandBackgroundPressed
123
+ }
124
+ }
125
+ },
126
+ notSendingDictationActive: {
127
+ ':hover': {
128
+ [`& .${sendButtonClassNames.stopBackground}`]: {
129
+ backgroundColor: tokens.colorSubtleBackgroundHover
130
+ },
131
+ [`& .${sendButtonClassNames.sendIcon}`]: {
132
+ color: tokens.colorNeutralForeground2Hover
133
+ }
134
+ },
135
+ ':active': {
136
+ [`& .${sendButtonClassNames.stopBackground}`]: {
137
+ backgroundColor: tokens.colorSubtleBackgroundPressed
138
+ },
139
+ [`& .${sendButtonClassNames.sendIcon}`]: {
140
+ color: tokens.colorNeutralForeground2Pressed
141
+ }
142
+ }
143
+ },
144
+ sending: {
145
+ ':hover': {
146
+ [`& .${sendButtonClassNames.stopBackground}`]: {
147
+ backgroundColor: tokens.colorBrandBackground2Hover
148
+ },
149
+ [`& .${sendButtonClassNames.stopIcon}`]: {
150
+ color: tokens.colorBrandForeground2Hover
151
+ }
152
+ },
153
+ ':active': {
154
+ [`& .${sendButtonClassNames.stopBackground}`]: {
155
+ backgroundColor: tokens.colorBrandBackground2Pressed
156
+ },
157
+ [`& .${sendButtonClassNames.stopIcon}`]: {
158
+ color: tokens.colorBrandForeground2Pressed
159
+ }
160
+ }
161
+ }
162
+ });
163
+ /**
164
+ * Apply styling to the SendButton slots based on the state
165
+ */ export const useSendButtonStyles_unstable = (state)=>{
166
+ 'use no memo';
167
+ const { isDictationActive, isSendIconFilled, isSending, disabled, designVersion, mode } = state;
168
+ const styles = useStyles();
169
+ const nextStyles = useNextStyles();
170
+ const rootNextStyles = useRootNextStyles();
171
+ const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;
172
+ const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;
173
+ 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);
174
+ if (state.sendIcon) {
175
+ state.sendIcon.className = mergeClasses(sendButtonClassNames.sendIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, !disabled && designVersion === 'next' && !isSending && isDictationActive && nextStyles.dictationActive, disabled && designVersion === 'next' && nextStyles.disabled, state.sendIcon.className);
176
+ }
177
+ if (state.stopIcon) {
178
+ state.stopIcon.className = mergeClasses(sendButtonClassNames.stopIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, stopIconFilledStyle, state.stopIcon.className);
179
+ }
180
+ if (state.stopBackground) {
181
+ 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);
182
+ }
183
+ // Add style hooks from button
184
+ useButtonStyles_unstable({
185
+ ...state,
186
+ components: {
187
+ ...state.components,
188
+ icon: 'span'
189
+ },
190
+ iconOnly: false
191
+ });
192
+ return state;
193
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSendButtonStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n mergeClasses,\n useButtonStyles_unstable,\n createCustomFocusIndicatorStyle,\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\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: 'none',\n position: 'relative',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n boxShadow: `0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}`,\n }),\n },\n\n canvas: {\n minWidth: '40px',\n height: '40px',\n },\n\n sidecar: {\n minWidth: '32px',\n height: '32px',\n },\n\n notSending: {\n ':hover': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackgroundHover,\n },\n\n [`& .${sendButtonClassNames.sendIcon},.${sendButtonClassNames.stopIcon}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\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\n [`& .${sendButtonClassNames.sendIcon}`]: {\n color: tokens.colorNeutralForeground2Hover,\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 [`& .${sendButtonClassNames.stopIcon}`]: {\n color: tokens.colorBrandForeground2Hover,\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 !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","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","dictationActive","colorNeutralForeground2","sendIconFilled","stopIconFilled","colorBrandForeground2","colorBrandBackground","stopBackgroundSending","stopBackgroundDictationActive","colorTransparentBackground","stopBackgroundDisabled","colorNeutralBackgroundDisabled","useRootNextStyles","gridTemplateAreas","gridTemplateRows","gridTemplateColumns","justifyItems","spacingVerticalNone","border","outline","strokeWidthThick","colorTransparentStroke","boxShadow","colorStrokeFocus2","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,QAC1B,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,YAAYb,WAAW;IAC3BM,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,UAAUnB,OAAOoB,eAAe;QAChCP,QAAQ;QACRF,OAAO;IACT;IAEAU,UA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,EAAE"}
package/lib/index.js CHANGED
@@ -1,2 +1 @@
1
1
  export { SendButton, renderSendButton_unstable, sendButtonClassNames, useSendButtonStyles_unstable, useSendButton_unstable } from './SendButton';
2
- //# sourceMappingURL=index.js.map
@@ -26,4 +26,3 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _SendButton = require("./components/SendButton");
29
- //# sourceMappingURL=SendButton.js.map
@@ -18,4 +18,4 @@ const SendButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
18
18
  (0, _useSendButtonStylesstyles.useSendButtonStyles_unstable)(state);
19
19
  return (0, _renderSendButton.renderSendButton_unstable)(state);
20
20
  });
21
- SendButton.displayName = 'SendButton'; //# sourceMappingURL=SendButton.js.map
21
+ SendButton.displayName = 'SendButton';
@@ -1 +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","state","useSendButton_unstable","useSendButtonStyles_unstable","renderSendButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;+BACgB;kCACG;2CACG;AAKtC,MAAMA,aAAAA,WAAAA,GAAAA,OAAmDC,UAAMC,CAAU,CAACC,OAACA;UAChFC,QAAMA,IAAAA,qCAAQC,EAAAA,OAAuBF;+DAErCG,EAAAA;WACAC,IAAAA,2CAAOA,EAAAA;AACT;AAEAP,WAAWQ,WAAW,GAAG"}
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"}
@@ -4,4 +4,3 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- //# sourceMappingURL=SendButton.types.js.map
@@ -230,4 +230,4 @@ const circleMotion = ()=>{
230
230
  };
231
231
  const SendButtonMotion = (0, _reactcomponents.createPresenceComponent)(sendMotion);
232
232
  const StopButtonMotion = (0, _reactcomponents.createPresenceComponent)(stopMotion);
233
- const CircleButtonMotion = (0, _reactcomponents.createPresenceComponent)(circleMotion); //# sourceMappingURL=buttonMotion.js.map
233
+ const CircleButtonMotion = (0, _reactcomponents.createPresenceComponent)(circleMotion);
@@ -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: ReturnType<typeof createPresenceComponent<{}>> = createPresenceComponent(sendMotion);\nexport const StopButtonMotion: ReturnType<typeof createPresenceComponent<{}>> = createPresenceComponent(stopMotion);\nexport const CircleButtonMotion: ReturnType<typeof createPresenceComponent<{}>> = createPresenceComponent(circleMotion);\n"],"names":["CircleButtonMotion","duration","delay","motionTokens","scaleSend","startScaleStop","scaleStop","startScaleCircle","scaleCircle","motionSpeedMultiplier","sendMotion","enterKeyframes","keyframes","durationNormal","transform","durationSlow","curveDecelerateMid","durationFast","exitKeyframes","stopMotion","durationSlower","curveDecelerateMax","durationUltraFast","durationFaster","curveDecelerateMin","opacity","easing","enter","circleMotion","createPresenceComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA8FIA,kBAAA;eAAAA;;IAFEC,gBAAU;eAAVA;;IACAC,gBAAOC;eAAPD;;;iCA5FgD;AAEtD,MAAME,YAAY;AAClB,MAAMC,iBAAiB;AACvB,MAAMC,YAAY;AAClB,MAAMC,mBAAmB;AACzB,MAAMC,cAAc;AAEpB,MAAMC,wBAAwB;AAE9B,MAAMC,aAA+B;UACnCC,iBAAMA;QAAAA;uBACJ;gBAAA;+BACEC,CAAAA,QAAW,CAAA;;;;;;uBAA2B;gBAAA;+BACtCX,CAAAA,QAAU,CAAA;;;+BAEZ,CAAA,MAAA,EAAAG,UAAA,CAAA,CAAA;;;mDACc,CAAAS,cAAA,GAAAJ;iDAAEK,CAAAA,kBAAqB;gDAAC,CAAAC,YAAA,GAAAN;;;;;+BAAsC,CAAA,MAAA,EAAAL,UAAA,CAAA,CAAA;;;+BAC1EH;;;sBAEAC,6BAAOC,CAAAA,YAAaY,GAAAA;oBACtBZ,6BAAA,CAAAa,kBAAA;mBACA,AAAAb,CAAAA,6BAAA,CAAAY,YAAA,GAAAZ,6BAAA,CAAAU,cAAA,IAAAJ;;;0BACc;QAAA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AQC,CAAAA,cAAamB,GAAAA;oBACvBnB,6BAAA,CAAAqB,kBAAA;mBACD,AAAArB,CAAAA,6BAAA,CAAAY,YAAA,GAAAZ,6BAAA,CAAAoB,cAAA,IAAAd;;KAED;UACEkB,gBAAOhB;QAAAA;uBACDO;gBAAAA;oBACRJ,WAAA,CAAA,QAAA,CAAA;gBACF;gBAAA;oBAEMc,WAAAA,CAAAA,MAAiC,EAAApB,YAAA,CAAA,CAAA;gBACrC;aAAA;sBACEL,6BAAA,CAAAc,YAAA,GAAAR;oBACEG,6BAAW,CAAAS,kBAAA;;;;;+BAAc,CAAA,MAAA,EAAAb,YAAA,CAAA,CAAA;;;+BACzBP;;;sBAEFE,6BAAA,CAAAoB,cAAA,GAAAd;oBACEG,6BAAW,CAAAY,kBAAA;gDAAC,CAAAP,YAAA,GAAAR;;;;;;;;MACZR,mBAAU4B,IAAAA,wCAAA,EAAAnB;MACVR,mBAAoBqB,IAAAA,wCAAiBd,EAAAA;MACvCT,qBAAA6B,IAAAA,wCAAA,EAAAD,uDACA"}
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":["CircleButtonMotion","SendButtonMotion","StopButtonMotion","scaleSend","startScaleStop","scaleStop","startScaleCircle","scaleCircle","motionSpeedMultiplier","sendMotion","enterKeyframes","keyframes","transform","duration","motionTokens","durationNormal","easing","curveDecelerateMax","delay","durationSlow","curveDecelerateMid","exitKeyframes","durationFast","enter","exit","stopMotion","opacity","durationSlower","durationUltraFast","durationFaster","curveDecelerateMin","circleMotion","createPresenceComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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YAAY,GAAGd;QACrC;KACD;IAED,OAAO;QACLe,OAAOb;QACPc,MAAMH;IACR;AACF;AACO,MAAMpB,mBAAmE+B,IAAAA,wCAAAA,EAAwBvB;AACjG,MAAMP,mBAAmE8B,IAAAA,wCAAAA,EAAwBP;AACjG,MAAMzB,qBAAqEgC,IAAAA,wCAAAA,EAAwBD"}
@@ -29,4 +29,3 @@ const _SendButton = require("./SendButton");
29
29
  const _renderSendButton = require("./renderSendButton");
30
30
  const _useSendButton = require("./useSendButton");
31
31
  const _useSendButtonStylesstyles = require("./useSendButtonStyles.styles");
32
- //# sourceMappingURL=index.js.map
@@ -51,4 +51,4 @@ function renderSendButtonNext(state) {
51
51
  })
52
52
  ]
53
53
  });
54
- } //# sourceMappingURL=renderSendButton.js.map
54
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["renderSendButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SendButtonState, SendButtonSlots } from './SendButton.types';\n\n/**\n * Render the final JSX of SendButton\n */\nexport const renderSendButton_unstable = (state: SendButtonState) => {\n if (state.designVersion === 'next') {\n return renderSendButtonNext(state);\n }\n\n return renderSendButtonCurrent(state);\n};\n\nfunction renderSendButtonCurrent(state: SendButtonState) {\n assertSlots<SendButtonSlots>(state);\n\n return (\n <state.root>\n {state.stopIcon && (\n <>\n <state.stopBackgroundMotion>\n <state.stopBackground />\n </state.stopBackgroundMotion>\n <state.stopButtonMotion>\n <state.stopIcon />\n </state.stopButtonMotion>\n </>\n )}\n <state.sendButtonMotion>\n <state.sendIcon />\n </state.sendButtonMotion>\n </state.root>\n );\n}\n\nfunction renderSendButtonNext(state: SendButtonState) {\n assertSlots<SendButtonSlots>(state);\n\n return (\n <state.root>\n <state.stopBackgroundMotion>\n <state.stopBackground />\n </state.stopBackgroundMotion>\n {state.stopIcon && (\n <state.stopButtonMotion>\n <state.stopIcon />\n </state.stopButtonMotion>\n )}\n <state.sendButtonMotion>\n <state.sendIcon />\n </state.sendButtonMotion>\n </state.root>\n );\n}\n"],"names":["state","designVersion","renderSendButtonNext","renderSendButtonCurrent","assertSlots","stopIcon","_jsxs","_Fragment","stopBackgroundMotion","stopButtonMotion","children","_jsx","stopBackground"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUMA;;;eAAAA;;;4BATN;iCAE4B;AAO1B,MAAIA,4BAAgCA,CAAAA;cAClCC,aAAOC,KAAAA,QAAqBF;QAC9B,OAAAE,qBAAAF;;IAGA,OAAAG,wBAAAH;AAEF;SACEI,wBAA6BJ,KAAAA;oCAE7B,EAAAA;;kBAEKA;YAAAA,MAAMK,QAAQ,IAAA,WACb,GAAAC,IAAAA,gBAAA,EAAAC,oBAAA,EAAA;;;mEACE,EAAAP,MAACA,cAAMQ,EAAAA,CAAAA;;6DACLC,gBAAA,EAAA;;;;;qEAGA,EAAA;;;;;;8BAKJT,KAAA;;;;;gBAIRU,UAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAX,MAAAY,cAAA,EAAA,CAAA;YAEA;YAAAZ,MAASE,QAAAA,IAAAA,WAA2C,GAAAS,IAAAA,eAAA,EAAAX,MAAAS,gBAAA,EAAA;gBAClDL,UAA6BJ,WAAAA,GAAAA,IAAAA,eAAAA,EAAAA,MAAAA,QAAAA,EAAAA,CAAAA;YAE7B;YAAA,WAAA,GAAAW,IAAAA,eACE,EAAAX,MAACA,gBAAU,EAAA;;;;;8CAKP"}
1
+ {"version":3,"sources":["renderSendButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SendButtonState, SendButtonSlots } from './SendButton.types';\n\n/**\n * Render the final JSX of SendButton\n */\nexport const renderSendButton_unstable = (state: SendButtonState) => {\n if (state.designVersion === 'next') {\n return renderSendButtonNext(state);\n }\n\n return renderSendButtonCurrent(state);\n};\n\nfunction renderSendButtonCurrent(state: SendButtonState) {\n assertSlots<SendButtonSlots>(state);\n\n return (\n <state.root>\n {state.stopIcon && (\n <>\n <state.stopBackgroundMotion>\n <state.stopBackground />\n </state.stopBackgroundMotion>\n <state.stopButtonMotion>\n <state.stopIcon />\n </state.stopButtonMotion>\n </>\n )}\n <state.sendButtonMotion>\n <state.sendIcon />\n </state.sendButtonMotion>\n </state.root>\n );\n}\n\nfunction renderSendButtonNext(state: SendButtonState) {\n assertSlots<SendButtonSlots>(state);\n\n return (\n <state.root>\n <state.stopBackgroundMotion>\n <state.stopBackground />\n </state.stopBackgroundMotion>\n {state.stopIcon && (\n <state.stopButtonMotion>\n <state.stopIcon />\n </state.stopButtonMotion>\n )}\n <state.sendButtonMotion>\n <state.sendIcon />\n </state.sendButtonMotion>\n </state.root>\n );\n}\n"],"names":["renderSendButton_unstable","state","designVersion","renderSendButtonNext","renderSendButtonCurrent","assertSlots","_jsxs","root","stopIcon","_Fragment","_jsx","stopBackgroundMotion","stopBackground","stopButtonMotion","sendButtonMotion","sendIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE4B;AAMrB,MAAMA,4BAA4B,CAACC;IACxC,IAAIA,MAAMC,aAAa,KAAK,QAAQ;QAClC,OAAOC,qBAAqBF;IAC9B;IAEA,OAAOG,wBAAwBH;AACjC;AAEA,SAASG,wBAAwBH,KAAsB;IACrDI,IAAAA,4BAAAA,EAA6BJ;IAE7B,OAAA,WAAA,GACEK,IAAAA,gBAAA,EAACL,MAAMM,IAAI,EAAA;;YACRN,MAAMO,QAAQ,IAAA,WAAA,GACbF,IAAAA,gBAAA,EAAAG,oBAAA,EAAA;;kCACEC,IAAAA,eAAA,EAACT,MAAMU,oBAAoB,EAAA;kCACzB,WAAA,GAAAD,IAAAA,eAAA,EAACT,MAAMW,cAAc,EAAA,CAAA;;kCAEvBF,IAAAA,eAAA,EAACT,MAAMY,gBAAgB,EAAA;kCACrB,WAAA,GAAAH,IAAAA,eAAA,EAACT,MAAMO,QAAQ,EAAA,CAAA;;;;0BAIrBE,IAAAA,eAAA,EAACT,MAAMa,gBAAgB,EAAA;0BACrB,WAAA,GAAAJ,IAAAA,eAAA,EAACT,MAAMc,QAAQ,EAAA,CAAA;;;;AAIvB;AAEA,SAASZ,qBAAqBF,KAAsB;IAClDI,IAAAA,4BAAAA,EAA6BJ;IAE7B,OAAA,WAAA,GACEK,IAAAA,gBAAA,EAACL,MAAMM,IAAI,EAAA;;0BACTG,IAAAA,eAAA,EAACT,MAAMU,oBAAoB,EAAA;0BACzB,WAAA,GAAAD,IAAAA,eAAA,EAACT,MAAMW,cAAc,EAAA,CAAA;;YAEtBX,MAAMO,QAAQ,IAAA,WAAA,GACbE,IAAAA,eAAA,EAACT,MAAMY,gBAAgB,EAAA;0BACrB,WAAA,GAAAH,IAAAA,eAAA,EAACT,MAAMO,QAAQ,EAAA,CAAA;;0BAGnBE,IAAAA,eAAA,EAACT,MAAMa,gBAAgB,EAAA;0BACrB,WAAA,GAAAJ,IAAAA,eAAA,EAACT,MAAMc,QAAQ,EAAA,CAAA;;;;AAIvB"}
@@ -111,4 +111,4 @@ const useSendButton_unstable = (props, ref)=>{
111
111
  mode
112
112
  };
113
113
  return state;
114
- }; //# sourceMappingURL=useSendButton.js.map
114
+ };