@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
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
6
|
import { MynahIcons, MynahIconsType } from '../icon';
|
|
7
7
|
export interface CheckboxProps {
|
|
8
|
-
type?: 'checkbox' | 'switch';
|
|
9
8
|
classNames?: string[];
|
|
10
9
|
attributes?: Record<string, string>;
|
|
11
10
|
title?: HTMLElement | ExtendedHTMLElement | string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
+
import { MynahIcons, MynahIconsType } from '../icon';
|
|
7
|
+
export interface SwitchProps {
|
|
8
|
+
classNames?: string[];
|
|
9
|
+
attributes?: Record<string, string>;
|
|
10
|
+
title?: HTMLElement | ExtendedHTMLElement | string;
|
|
11
|
+
label?: string;
|
|
12
|
+
description?: ExtendedHTMLElement;
|
|
13
|
+
value?: 'true' | 'false';
|
|
14
|
+
optional?: boolean;
|
|
15
|
+
icon?: MynahIcons | MynahIconsType;
|
|
16
|
+
onChange?: (value: 'true' | 'false') => void;
|
|
17
|
+
testId?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare abstract class SwitchAbstract {
|
|
20
|
+
render: ExtendedHTMLElement;
|
|
21
|
+
setValue: (value: 'true' | 'false') => void;
|
|
22
|
+
getValue: () => 'true' | 'false';
|
|
23
|
+
setEnabled: (enabled: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare class SwitchInternal extends SwitchAbstract {
|
|
26
|
+
private readonly checkboxWrapper;
|
|
27
|
+
private readonly checkboxItem;
|
|
28
|
+
render: ExtendedHTMLElement;
|
|
29
|
+
constructor(props: SwitchProps);
|
|
30
|
+
setValue: (value: 'true' | 'false') => void;
|
|
31
|
+
getValue: () => 'true' | 'false';
|
|
32
|
+
setEnabled: (enabled: boolean) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare class Switch extends SwitchAbstract {
|
|
35
|
+
render: ExtendedHTMLElement;
|
|
36
|
+
constructor(props: SwitchProps);
|
|
37
|
+
setValue: (value: 'true' | 'false') => void;
|
|
38
|
+
getValue: () => 'true' | 'false';
|
|
39
|
+
setEnabled: (enabled: boolean) => void;
|
|
40
|
+
}
|