@aws/mynah-ui 4.32.1 → 4.33.0
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/dist/components/chat-item/chat-item-card.d.ts +1 -0
- package/dist/components/form-items/checkbox.d.ts +0 -1
- package/dist/components/form-items/switch.d.ts +40 -0
- package/dist/helper/test-ids.d.ts +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +3 -0
- package/docs/DATAMODEL.md +4 -1
- package/docs/img/data-model/chatItems/options.png +0 -0
- package/package.json +1 -1
- package/ui-tests/dist/main.js +1 -1
- package/ui-tests/dist/main.js.map +1 -1
package/dist/static.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { CheckboxAbstract, CheckboxProps } from './components/form-items/checkbox';
|
|
6
|
+
import { SwitchAbstract, SwitchProps } from './components/form-items/switch';
|
|
6
7
|
import { CustomIcon, MynahIcons, MynahIconsType } from './components/icon';
|
|
7
8
|
import { ChatItemBodyRenderer } from './helper/dom';
|
|
8
9
|
import { SelectAbstract, SelectProps, RadioGroupAbstract, RadioGroupProps, ButtonAbstract, ButtonProps, TextInputProps, TextInputAbstract, TextAreaProps, TextAreaAbstract, ToggleOption } from './main';
|
|
@@ -304,6 +305,7 @@ export interface ChatItemContent {
|
|
|
304
305
|
iconForegroundStatus?: Status;
|
|
305
306
|
status?: {
|
|
306
307
|
status?: Status;
|
|
308
|
+
position?: 'left' | 'right';
|
|
307
309
|
description?: string;
|
|
308
310
|
icon?: MynahIcons | MynahIconsType;
|
|
309
311
|
text?: string;
|
|
@@ -609,6 +611,7 @@ export interface ComponentOverrides {
|
|
|
609
611
|
Button?: new (props: ButtonProps) => ExtractMethods<ButtonAbstract>;
|
|
610
612
|
RadioGroup?: new (props: RadioGroupProps) => ExtractMethods<RadioGroupAbstract>;
|
|
611
613
|
Checkbox?: new (props: CheckboxProps) => ExtractMethods<CheckboxAbstract>;
|
|
614
|
+
Switch?: new (props: SwitchProps) => ExtractMethods<SwitchAbstract>;
|
|
612
615
|
Select?: new (props: SelectProps) => ExtractMethods<SelectAbstract>;
|
|
613
616
|
TextInput?: new (props: TextInputProps) => ExtractMethods<TextInputAbstract>;
|
|
614
617
|
TextArea?: new (props: TextAreaProps) => ExtractMethods<TextAreaAbstract>;
|
package/docs/DATAMODEL.md
CHANGED
|
@@ -1387,6 +1387,7 @@ mynahUI.addChatItem(tabId, {
|
|
|
1387
1387
|
header: {
|
|
1388
1388
|
// icon: MynahIcons.CODE_BLOCK;
|
|
1389
1389
|
// status: {
|
|
1390
|
+
// position: 'right',
|
|
1390
1391
|
// status: 'success',
|
|
1391
1392
|
// icon: MynahIcons.OK,
|
|
1392
1393
|
// text: 'Accepted',
|
|
@@ -1410,7 +1411,7 @@ mynahUI.addChatItem(tabId, {
|
|
|
1410
1411
|
<img src="./img/data-model/chatItems/header.png" alt="header" style="max-width:600px; width:100%;border: 1px solid #e0e0e0;">
|
|
1411
1412
|
</p>
|
|
1412
1413
|
|
|
1413
|
-
You can also provide an icon specifically for the header, as well as a separate status section on right.
|
|
1414
|
+
You can also provide an icon specifically for the header, as well as a separate status section on right or left of the whole header defined by its `position` value with a tooltip too.
|
|
1414
1415
|
|
|
1415
1416
|
Here's another example for that:
|
|
1416
1417
|
|
|
@@ -1423,7 +1424,9 @@ mynahUI.addChatItem(tabId, {
|
|
|
1423
1424
|
header: {
|
|
1424
1425
|
icon: MynahIcons.CODE_BLOCK,
|
|
1425
1426
|
status: {
|
|
1427
|
+
position: 'right',
|
|
1426
1428
|
icon: MynahIcons.PROGRESS,
|
|
1429
|
+
description: 'Hello!',
|
|
1427
1430
|
text: 'Working',
|
|
1428
1431
|
status: 'warning'
|
|
1429
1432
|
},
|
|
Binary file
|
package/package.json
CHANGED