@aws/mynah-ui 3.5.0 → 4.0.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.
@@ -3,10 +3,12 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- import { ChatItem, ChatItemButton } from '../../static';
6
+ import { ChatItemButton } from '../../static';
7
+ import { ChatItemFormItemsWrapper } from './chat-item-form-items';
7
8
  export interface ChatItemButtonsWrapperProps {
8
9
  tabId: string;
9
- chatItem: ChatItem;
10
+ buttons: ChatItemButton[];
11
+ formItems: ChatItemFormItemsWrapper | null;
10
12
  onActionClick: (action: ChatItemButton) => void;
11
13
  }
12
14
  export declare class ChatItemButtonsWrapper {
@@ -14,5 +16,6 @@ export declare class ChatItemButtonsWrapper {
14
16
  private readonly actions;
15
17
  render: ExtendedHTMLElement;
16
18
  constructor(props: ChatItemButtonsWrapperProps);
19
+ private readonly handleValidationChange;
17
20
  private readonly disableAll;
18
21
  }
@@ -13,6 +13,7 @@ export declare class ChatItemFollowUpOption {
13
13
  render: ExtendedHTMLElement;
14
14
  private followupTooltip;
15
15
  private followupTooltipTimeout;
16
+ private disabled;
16
17
  constructor(props: ChatItemFollowUpOptionProps);
17
18
  private readonly showCroppedFollowupText;
18
19
  readonly hideCroppedFollowupText: () => void;
@@ -11,8 +11,13 @@ export interface ChatItemFormItemsWrapperProps {
11
11
  export declare class ChatItemFormItemsWrapper {
12
12
  private readonly props;
13
13
  private readonly options;
14
+ private readonly validationItems;
15
+ private isValid;
16
+ onValidationChange?: (isValid: boolean) => void;
14
17
  render: ExtendedHTMLElement;
15
18
  constructor(props: ChatItemFormItemsWrapperProps);
19
+ private readonly getValidationHandler;
20
+ isFormValid: () => boolean;
16
21
  disableAll: () => void;
17
22
  getAllValues: () => Record<string, string>;
18
23
  }
@@ -0,0 +1,12 @@
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
+ export interface ChatPromptInputStickyCardProps {
7
+ tabId: string;
8
+ }
9
+ export declare class ChatPromptInputStickyCard {
10
+ render: ExtendedHTMLElement;
11
+ constructor(props: ChatPromptInputStickyCardProps);
12
+ }
@@ -15,6 +15,7 @@ export declare class ChatWrapper {
15
15
  private readonly promptInputElement;
16
16
  private readonly promptInput;
17
17
  private readonly promptInfo;
18
+ private readonly promptStickyCard;
18
19
  private lastChatItemCard;
19
20
  render: ExtendedHTMLElement;
20
21
  constructor(props: ChatWrapperProps);
@@ -0,0 +1,28 @@
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
+ interface SelectOption {
7
+ value: string;
8
+ label: string;
9
+ }
10
+ export interface RadioGroupProps {
11
+ classNames?: string[];
12
+ attributes?: Record<string, string>;
13
+ label?: HTMLElement | ExtendedHTMLElement | string;
14
+ value?: string;
15
+ optional?: boolean;
16
+ options?: SelectOption[];
17
+ onChange?: (value: string) => void;
18
+ }
19
+ export declare class RadioGroup {
20
+ private readonly radioGroupElement;
21
+ private readonly groupName;
22
+ render: ExtendedHTMLElement;
23
+ constructor(props: RadioGroupProps);
24
+ setValue: (value: string) => void;
25
+ getValue: () => string;
26
+ setEnabled: (enabled: boolean) => void;
27
+ }
28
+ export {};
@@ -2,8 +2,8 @@
2
2
  * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { ExtendedHTMLElement } from '../helper/dom';
6
- import { MynahIcons } from './icon';
5
+ import { ExtendedHTMLElement } from '../../helper/dom';
6
+ import { MynahIcons } from '../icon';
7
7
  interface SelectOption {
8
8
  value: string;
9
9
  label: string;
@@ -13,6 +13,8 @@ export interface SelectProps {
13
13
  attributes?: Record<string, string>;
14
14
  icon?: MynahIcons;
15
15
  label?: HTMLElement | ExtendedHTMLElement | string;
16
+ value?: string;
17
+ optional?: boolean;
16
18
  options?: SelectOption[];
17
19
  onChange?: (value: string) => void;
18
20
  }
@@ -0,0 +1,22 @@
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
+ export type StarValues = 1 | 2 | 3 | 4 | 5;
7
+ export interface StarsProps {
8
+ classNames?: string[];
9
+ attributes?: Record<string, string>;
10
+ label?: HTMLElement | ExtendedHTMLElement | string;
11
+ value?: string;
12
+ onChange?: (value: string) => void;
13
+ initStar?: StarValues;
14
+ }
15
+ export declare class Stars {
16
+ private readonly starsContainer;
17
+ render: ExtendedHTMLElement;
18
+ constructor(props: StarsProps);
19
+ setValue: (star: StarValues) => void;
20
+ getValue: () => string;
21
+ setEnabled: (enabled: boolean) => void;
22
+ }
@@ -2,11 +2,12 @@
2
2
  * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { ExtendedHTMLElement } from '../helper/dom';
5
+ import { ExtendedHTMLElement } from '../../helper/dom';
6
6
  export interface TextAreaProps {
7
7
  classNames?: string[];
8
8
  attributes?: Record<string, string>;
9
9
  label?: HTMLElement | ExtendedHTMLElement | string;
10
+ placeholder?: string;
10
11
  value?: string;
11
12
  onChange?: (value: string) => void;
12
13
  }
@@ -0,0 +1,22 @@
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
+ export interface TextInputProps {
7
+ classNames?: string[];
8
+ attributes?: Record<string, string>;
9
+ label?: HTMLElement | ExtendedHTMLElement | string;
10
+ placeholder?: string;
11
+ numeric?: boolean;
12
+ value?: string;
13
+ onChange?: (value: string) => void;
14
+ }
15
+ export declare class TextInput {
16
+ private readonly inputElement;
17
+ render: ExtendedHTMLElement;
18
+ constructor(props: TextInputProps);
19
+ setValue: (value: string) => void;
20
+ getValue: () => string;
21
+ setEnabled: (enabled: boolean) => void;
22
+ }
@@ -44,7 +44,8 @@ export declare enum MynahIcons {
44
44
  COPY = "copy",
45
45
  CURSOR_INSERT = "cursor-insert",
46
46
  TEXT_SELECT = "text-select",
47
- REVERT = "revert"
47
+ REVERT = "revert",
48
+ ASTERISK = "asterisk"
48
49
  }
49
50
  export interface IconProps {
50
51
  icon: MynahIcons;