botframework-webchat 4.15.8-main.20230331.0e770c8 → 4.15.8-main.20230412.960a5a5

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.
@@ -27,15 +27,20 @@ function walkAllItems(node, fn) {
27
27
  }
28
28
  }
29
29
 
30
- const AdaptiveCardChoiceSetInput = ({ input: { choices, defaultValue } }) => {
30
+ const AdaptiveCardChoiceSetInput = ({ input: { choices, defaultValue, label } }) => {
31
31
  const labelId = useUniqueId('webchat__id');
32
32
  const defaultChoice = choices.find(({ value }) => defaultValue === value || (!defaultValue && !value));
33
33
 
34
34
  return (
35
35
  <div>
36
- <select aria-labelledby={defaultChoice ? labelId : undefined} defaultValue={defaultValue} tabIndex={-1}>
36
+ <select
37
+ aria-label={label}
38
+ aria-labelledby={!label && defaultChoice ? labelId : undefined}
39
+ defaultValue={defaultValue}
40
+ tabIndex={-1}
41
+ >
37
42
  {choices.map(choice => (
38
- <option id={choice === defaultChoice ? labelId : undefined} key={choice.value} value={choice.value}>
43
+ <option id={!label && choice === defaultChoice ? labelId : undefined} key={choice.value} value={choice.value}>
39
44
  {choice.title}
40
45
  </option>
41
46
  ))}
@@ -53,6 +58,7 @@ AdaptiveCardChoiceSetInput.propTypes = {
53
58
  })
54
59
  ),
55
60
  defaultValue: PropTypes.any,
61
+ label: PropTypes.string,
56
62
  value: PropTypes.any
57
63
  }).isRequired
58
64
  };
@@ -117,13 +123,15 @@ const AdaptiveCardAttachment = ({ content }) => {
117
123
  input instanceof ChoiceSetInput ? (
118
124
  <AdaptiveCardChoiceSetInput input={input} key={index} />
119
125
  ) : input instanceof DateInput ? (
120
- <div key={index}>
126
+ <label key={index}>
127
+ {input.title}
121
128
  <input placeholder={input.placeholder} tabIndex={-1} type="date" />
122
- </div>
129
+ </label>
123
130
  ) : input instanceof NumberInput ? (
124
- <div key={index}>
131
+ <label key={index}>
132
+ {input.title}
125
133
  <input placeholder={input.placeholder} tabIndex={-1} type="number" />
126
- </div>
134
+ </label>
127
135
  ) : input instanceof OpenUrlAction || input instanceof ShowCardAction || input instanceof SubmitAction ? (
128
136
  <div key={index}>
129
137
  <button tabIndex={-1} type="button">
@@ -131,18 +139,20 @@ const AdaptiveCardAttachment = ({ content }) => {
131
139
  </button>
132
140
  </div>
133
141
  ) : input instanceof TextInput ? (
134
- <div key={index}>
142
+ <label key={index}>
143
+ {input.title}
135
144
  <input placeholder={input.placeholder} tabIndex={-1} type="text" />
136
- </div>
145
+ </label>
137
146
  ) : input instanceof TimeInput ? (
138
- <div key={index}>
147
+ <label key={index}>
148
+ {input.title}
139
149
  <input placeholder={input.placeholder} tabIndex={-1} type="time" />
140
- </div>
150
+ </label>
141
151
  ) : input instanceof ToggleInput ? (
142
- <div key={index}>
152
+ <label key={index}>
143
153
  {input.title}
144
154
  <input defaultChecked={input.value === input.valueOn} tabIndex={-1} type="checkbox" />
145
- </div>
155
+ </label>
146
156
  ) : (
147
157
  false
148
158
  )
@@ -57,8 +57,8 @@ export default function ({
57
57
 
58
58
  '& .ac-pushButton, & input, & select, & textarea': {
59
59
  '&[aria-disabled="true"]': {
60
- backgroundColor: '#EBEBE4',
61
- borderColor: '#A9A9A9',
60
+ backgroundColor: 'rgba(239, 239, 239, 0.3)',
61
+ borderColor: 'rgba(118, 118, 118, 0.3)',
62
62
  borderStyle: 'solid',
63
63
  borderWidth: 1,
64
64
  color: '#545454'
@@ -66,8 +66,8 @@ export default function ({
66
66
  },
67
67
 
68
68
  '& .ac-pushButton[aria-disabled="true"]': {
69
- backgroundColor: '#F0F0F0',
70
- color: '#6D6D6D'
69
+ backgroundColor: '#EEE',
70
+ color: '#4F4F4F'
71
71
  },
72
72
 
73
73
  '& .ac-pushButton[aria-pressed="true"]': {
@@ -2,7 +2,7 @@ import AdaptiveCardsStyleOptions from './AdaptiveCardsStyleOptions';
2
2
 
3
3
  const ADAPTIVE_CARDS_DEFAULT_STYLE_OPTIONS: Required<AdaptiveCardsStyleOptions> = {
4
4
  adaptiveCardsParserMaxVersion: undefined,
5
- cardEmphasisBackgroundColor: '#F0F0F0',
5
+ cardEmphasisBackgroundColor: '#F9F9F9',
6
6
  cardPushButtonBackgroundColor: '#0063B1',
7
7
  cardPushButtonTextColor: 'White',
8
8
  richCardWrapTitle: false