botframework-webchat-fluent-theme 4.18.1-main.20250114.4df27b8 → 4.18.1-main.20250127.e44c342

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botframework-webchat-fluent-theme",
3
- "version": "4.18.1-main.20250114.4df27b8",
3
+ "version": "4.18.1-main.20250127.e44c342",
4
4
  "description": "Fluent theme for Bot Framework Web Chat",
5
5
  "main": "./dist/botframework-webchat-fluent-theme.js",
6
6
  "types": "./dist/botframework-webchat-fluent-theme.d.ts",
@@ -68,15 +68,15 @@
68
68
  "@types/math-random": "^1.0.2",
69
69
  "@types/node": "^20.12.11",
70
70
  "@types/react": "^16.14.60",
71
- "botframework-webchat-base": "4.18.1-main.20250114.4df27b8",
72
- "botframework-webchat-styles": "4.18.1-main.20250114.4df27b8",
71
+ "botframework-webchat-base": "4.18.1-main.20250127.e44c342",
72
+ "botframework-webchat-styles": "4.18.1-main.20250127.e44c342",
73
73
  "tsup": "^8.0.2",
74
74
  "typescript": "^5.4.5"
75
75
  },
76
76
  "dependencies": {
77
- "botframework-webchat-api": "4.18.1-main.20250114.4df27b8",
78
- "botframework-webchat-component": "4.18.1-main.20250114.4df27b8",
79
- "botframework-webchat-core": "4.18.1-main.20250114.4df27b8",
77
+ "botframework-webchat-api": "4.18.1-main.20250127.e44c342",
78
+ "botframework-webchat-component": "4.18.1-main.20250127.e44c342",
79
+ "botframework-webchat-core": "4.18.1-main.20250127.e44c342",
80
80
  "classnames": "2.5.1",
81
81
  "inject-meta-tag": "0.0.1",
82
82
  "math-random": "2.0.1",
@@ -16,8 +16,7 @@
16
16
  }
17
17
 
18
18
  :global(.webchat-fluent) .sendbox__attachment-drop-zone-icon {
19
- height: 36px;
19
+ font-size: 36px;
20
20
  /* Set "pointer-events: none" to ignore dragging over the icon. Otherwise, when dragging over the icon; it would disable the "--droppable" modifier.*/
21
21
  pointer-events: none;
22
- width: 36px;
23
22
  }
@@ -67,14 +67,22 @@ const DropZone = (props: { readonly onFilesAdded: (files: File[]) => void }) =>
67
67
  setDropZoneState(false);
68
68
  };
69
69
 
70
- document.addEventListener('dragenter', handleDragEnter, false);
71
- document.addEventListener('dragleave', handleDragLeave, false);
72
- document.addEventListener('dragend', handleDragEnd, false);
70
+ const handleDocumentDrop = (event: DragEvent) => {
71
+ if (!dropZoneRef.current?.contains(event.target as Node)) {
72
+ handleDragEnd();
73
+ }
74
+ };
75
+
76
+ document.addEventListener('dragenter', handleDragEnter);
77
+ document.addEventListener('dragleave', handleDragLeave);
78
+ document.addEventListener('dragend', handleDragEnd);
79
+ document.addEventListener('drop', handleDocumentDrop);
73
80
 
74
81
  return () => {
75
82
  document.removeEventListener('dragenter', handleDragEnter);
76
83
  document.removeEventListener('dragleave', handleDragLeave);
77
84
  document.removeEventListener('dragend', handleDragEnd);
85
+ document.removeEventListener('drop', handleDocumentDrop);
78
86
  };
79
87
  }, [setDropZoneState]);
80
88
 
@@ -103,9 +103,9 @@
103
103
  }
104
104
 
105
105
  :global(.webchat-fluent) .pre-chat-message-activity__card-action-image {
106
+ color: var(--webchat-colorNeutralForeground4);
107
+ font-size: 20px;
106
108
  grid-area: image;
107
- height: 20px;
108
- width: 20px;
109
109
  }
110
110
 
111
111
  :global(.webchat-fluent) .pre-chat-message-activity__card-action-subtitle {
@@ -21,7 +21,7 @@
21
21
  justify-content: center;
22
22
  padding: 3px;
23
23
 
24
- > svg {
24
+ > :global(.webchat__monochrome-image-masker) {
25
25
  font-size: 20px;
26
26
  pointer-events: none;
27
27
  }
@@ -591,7 +591,9 @@
591
591
 
592
592
  /* Monochrome image masker */
593
593
  :global(.webchat-fluent).theme :global(.webchat__monochrome-image-masker) {
594
- background-color: var(--webchat-colorNeutralForeground4);
594
+ background-color: currentColor;
595
+ height: 1em;
596
+ width: 1em;
595
597
  }
596
598
 
597
599
  /* Feedback button */
@@ -1,21 +1,13 @@
1
+ import { Components } from 'botframework-webchat-component';
2
+ import cx from 'classnames';
1
3
  import React, { memo } from 'react';
2
4
 
3
- function AddDocumentIcon(props: Readonly<{ readonly className?: string }>) {
4
- return (
5
- <svg
6
- aria-hidden="true"
7
- className={props.className}
8
- height="1em"
9
- viewBox="0 0 20 20"
10
- width="1em"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path
14
- d="M6 2a2 2 0 0 0-2 2v5.2c.32-.08.66-.15 1-.18V4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1h-3.6c-.18.36-.4.7-.66 1H14a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6Zm8.8 5h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7ZM10 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 0 0-1 0V14H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V15h1.5a.5.5 0 0 0 0-1H6v-1.5Z"
15
- fill="currentColor"
16
- />
17
- </svg>
18
- );
5
+ const { MonochromeImageMasker } = Components;
6
+
7
+ const addDocumentIcon = `data:image/svg+xml;utf8,${encodeURIComponent('<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6 2a2 2 0 0 0-2 2v5.2c.32-.08.66-.15 1-.18V4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1h-3.6c-.18.36-.4.7-.66 1H14a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6Zm8.8 5h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7ZM10 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 0 0-1 0V14H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V15h1.5a.5.5 0 0 0 0-1H6v-1.5Z"/></svg>')}`;
8
+
9
+ function AddDocumentIcon(props: Readonly<{ className?: string }>) {
10
+ return <MonochromeImageMasker className={cx('icon__add-document', props.className)} src={addDocumentIcon} />;
19
11
  }
20
12
 
21
13
  export default memo(AddDocumentIcon);
@@ -1,21 +1,13 @@
1
+ import { Components } from 'botframework-webchat-component';
2
+ import cx from 'classnames';
1
3
  import React, { memo } from 'react';
2
4
 
3
- function AttachmentIcon(props: Readonly<{ readonly className?: string }>) {
4
- return (
5
- <svg
6
- aria-hidden="true"
7
- className={props.className}
8
- height="1em"
9
- viewBox="0 0 20 20"
10
- width="1em"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path
14
- d="m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z"
15
- fill="currentColor"
16
- />
17
- </svg>
18
- );
5
+ const { MonochromeImageMasker } = Components;
6
+
7
+ const attachmentIcon = `data:image/svg+xml;utf8,${encodeURIComponent('<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z"/></svg>')}`;
8
+
9
+ function AttachmentIcon(props: Readonly<{ className?: string }>) {
10
+ return <MonochromeImageMasker className={cx('icon__attachment', props.className)} src={attachmentIcon} />;
19
11
  }
20
12
 
21
13
  export default memo(AttachmentIcon);
@@ -1,21 +1,13 @@
1
+ import { Components } from 'botframework-webchat-component';
2
+ import cx from 'classnames';
1
3
  import React, { memo } from 'react';
2
4
 
5
+ const { MonochromeImageMasker } = Components;
6
+
7
+ const infoSmallIcon = `data:image/svg+xml;utf8,${encodeURIComponent('<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 7.5a.5.5 0 1 0-1 0v3a.5.5 0 0 0 1 0v-3Zm.25-2a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM2 8a6 6 0 1 1 12 0A6 6 0 0 1 2 8Z"/></svg>')}`;
8
+
3
9
  function InfoSmallIcon(props: Readonly<{ readonly className?: string }>) {
4
- return (
5
- <svg
6
- aria-hidden="true"
7
- className={props.className}
8
- height="1em"
9
- viewBox="0 0 16 16"
10
- width="1em"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path
14
- d="M8.5 7.5a.5.5 0 1 0-1 0v3a.5.5 0 0 0 1 0v-3Zm.25-2a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM2 8a6 6 0 1 1 12 0A6 6 0 0 1 2 8Z"
15
- fill="currentColor"
16
- />
17
- </svg>
18
- );
10
+ return <MonochromeImageMasker className={cx('icon__info--small', props.className)} src={infoSmallIcon} />;
19
11
  }
20
12
 
21
13
  export default memo(InfoSmallIcon);
@@ -1,21 +1,13 @@
1
+ import { Components } from 'botframework-webchat-component';
2
+ import cx from 'classnames';
1
3
  import React, { memo } from 'react';
2
4
 
5
+ const { MonochromeImageMasker } = Components;
6
+
7
+ const sendIcon = `data:image/svg+xml;utf8,${encodeURIComponent('<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"/></svg>')}`;
8
+
3
9
  function SendIcon(props: Readonly<{ readonly className?: string }>) {
4
- return (
5
- <svg
6
- aria-hidden="true"
7
- className={props.className}
8
- height="1em"
9
- viewBox="0 0 20 20"
10
- width="1em"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path
14
- d="M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"
15
- fill="currentColor"
16
- />
17
- </svg>
18
- );
10
+ return <MonochromeImageMasker className={cx('icon__send', props.className)} src={sendIcon} />;
19
11
  }
20
12
 
21
13
  export default memo(SendIcon);
@@ -1,21 +1,13 @@
1
+ import { Components } from 'botframework-webchat-component';
2
+ import cx from 'classnames';
1
3
  import React, { memo } from 'react';
2
4
 
5
+ const { MonochromeImageMasker } = Components;
6
+
7
+ const telephoneKeypadIcon = `data:image/svg+xml;utf8,${encodeURIComponent('<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm0 4a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM7.25 12a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 16a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM15.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"/></svg>')}`;
8
+
3
9
  function TelephoneKeypadIcon(props: Readonly<{ readonly className?: string }>) {
4
- return (
5
- <svg
6
- aria-hidden="true"
7
- className={props.className}
8
- height="1em"
9
- viewBox="0 0 20 20"
10
- width="1em"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path
14
- d="M6 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm0 4a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM7.25 12a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 16a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM15.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"
15
- fill="currentColor"
16
- />
17
- </svg>
18
- );
10
+ return <MonochromeImageMasker className={cx('icon__telephone-keypad', props.className)} src={telephoneKeypadIcon} />;
19
11
  }
20
12
 
21
13
  export default memo(TelephoneKeypadIcon);