@muraldevkit/ui-toolkit 2.60.0 → 2.62.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/form/{text-input/hooks → hooks}/useActiveColor.d.ts +1 -1
- package/dist/components/form/{text-input/MrlEditableTextInput → hooks}/useIsEditable.d.ts +1 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.d.ts +43 -0
- package/dist/components/form/textarea/MrlEditableTextarea/MrlEditableTextareaRightButton.d.ts +25 -0
- package/dist/components/form/textarea/MrlEditableTextarea/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/panel/MrlPanel/MrlPanel.d.ts +39 -0
- package/dist/components/panel/MrlPanel/index.d.ts +1 -0
- package/dist/components/panel/MrlPanelFooter/MrlPanelFooter.d.ts +22 -0
- package/dist/components/panel/MrlPanelFooter/index.d.ts +1 -0
- package/dist/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.d.ts +18 -0
- package/dist/components/panel/MrlPanelStickyHeader/index.d.ts +1 -0
- package/dist/components/panel/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlEditableTextarea/global.scss +15 -0
- package/dist/styles/MrlEditableTextarea/module.scss +53 -0
- package/dist/styles/MrlPanel/module.scss +38 -0
- package/dist/styles/MrlPanelFooter/module.scss +12 -0
- package/dist/styles/MrlPanelStickyHeader/module.scss +5 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export * from './text-input/MrlTextInput';
|
|
|
5
5
|
export * from './text-input/MrlEditableTextInput';
|
|
6
6
|
export * from './label/MrlLabel';
|
|
7
7
|
export * from './textarea/MrlTextarea';
|
|
8
|
+
export * from './textarea/MrlEditableTextarea';
|
|
8
9
|
export * from './fieldset/MrlFieldset';
|
|
9
10
|
export * from './checkbox/MrlCheckbox';
|
|
10
11
|
export * from './checkbox/MrlCheckboxStandalone';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import './MrlEditableTextarea.global.scss';
|
|
3
|
+
import { InputStates, MrlFormInputError } from '../../..';
|
|
4
|
+
interface MrlEditableTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
5
|
+
/** The value of the textarea used to make it a controlled input */
|
|
6
|
+
value: string;
|
|
7
|
+
/**
|
|
8
|
+
* Value of the label text assigned to the input.
|
|
9
|
+
* This is used to describe to the user what field they will be editing when interacting with the edit buton.
|
|
10
|
+
*/
|
|
11
|
+
inputLabelText: string;
|
|
12
|
+
/**
|
|
13
|
+
* The maximum number of characters that the user can enter.
|
|
14
|
+
* If undefined or set to "0", removes the character counter from the textarea
|
|
15
|
+
*/
|
|
16
|
+
maxLength?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Id of the text input.
|
|
19
|
+
*/
|
|
20
|
+
inputId: string;
|
|
21
|
+
/**
|
|
22
|
+
* Text placeholder for the text input.
|
|
23
|
+
*/
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Changes the state of the input based on user permissions or actions.
|
|
27
|
+
*/
|
|
28
|
+
state?: InputStates;
|
|
29
|
+
/** Additional class to add to the textarea */
|
|
30
|
+
className?: string;
|
|
31
|
+
'data-qa': string;
|
|
32
|
+
error?: MrlFormInputError;
|
|
33
|
+
isEditable?: boolean;
|
|
34
|
+
setIsEditable?: (isEditableUpdate: boolean) => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Allows the user to input plain text in a multi-line format
|
|
38
|
+
*
|
|
39
|
+
* @param {MrlEditableTextareaProps} props - the component props
|
|
40
|
+
* @returns a textarea element
|
|
41
|
+
*/
|
|
42
|
+
export declare const MrlEditableTextarea: React.ForwardRefExoticComponent<MrlEditableTextareaProps & React.RefAttributes<HTMLButtonElement>>;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DSIconType } from '../../..';
|
|
3
|
+
export interface MrlEditableTextareaRightButtonProps {
|
|
4
|
+
/** the action that should be executed when interacting with the icon */
|
|
5
|
+
action: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
6
|
+
/** the icon that will be rendered */
|
|
7
|
+
icon: DSIconType;
|
|
8
|
+
/** data-qa attribute for the icon */
|
|
9
|
+
dataQa?: string;
|
|
10
|
+
/** describes the purpouse of the icon button */
|
|
11
|
+
label: string;
|
|
12
|
+
/** determines if the icon has active color or not */
|
|
13
|
+
hasActiveColor: boolean;
|
|
14
|
+
setHasActiveColor: (hasActiveColor: boolean) => void;
|
|
15
|
+
/** the text input value used to calculate the active style */
|
|
16
|
+
value?: string;
|
|
17
|
+
ref?: HTMLButtonElement;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renders the right icon in the text input
|
|
21
|
+
*
|
|
22
|
+
* @param {MrlEditableTextareaRightButtonProps} props - the component props
|
|
23
|
+
* @returns a button element with an icon
|
|
24
|
+
*/
|
|
25
|
+
export declare const MrlEditableTextareaRightButton: React.ForwardRefExoticComponent<Pick<MrlEditableTextareaRightButtonProps, "label" | "value" | "dataQa" | "icon" | "hasActiveColor" | "setHasActiveColor" | "action"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlEditableTextarea';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the MrlPanel component.
|
|
4
|
+
*/
|
|
5
|
+
interface MrlPanelProps extends ComponentPropsWithRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* A string value used for data-qa attribute.
|
|
8
|
+
*/
|
|
9
|
+
['data-qa']?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Callback function that is called when the panel is closed.
|
|
12
|
+
*/
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* The custom header element to be rendered in the panel.
|
|
16
|
+
* When a custom header is used developers need to provide th aria-label and aria-describedby.
|
|
17
|
+
*/
|
|
18
|
+
header?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* The title of the panel.
|
|
21
|
+
*/
|
|
22
|
+
title?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The description of the panel.
|
|
25
|
+
*/
|
|
26
|
+
description?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Specifies whether to disable autofocus on the panel.
|
|
29
|
+
*/
|
|
30
|
+
disableAutofocus?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* MrlPanel component.
|
|
34
|
+
*
|
|
35
|
+
* @param props The MrlPanel component properties.
|
|
36
|
+
* @returns The MrlPanel component.
|
|
37
|
+
*/
|
|
38
|
+
export declare const MrlPanel: (props: MrlPanelProps) => JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlPanel } from './MrlPanel';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the MrlPanelFooter component.
|
|
4
|
+
*/
|
|
5
|
+
interface MrlPanelFooterProps extends ComponentPropsWithRef<'footer'> {
|
|
6
|
+
/**
|
|
7
|
+
* The children of the MrlPanelFooter component.
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies whether to show the divider.
|
|
12
|
+
*/
|
|
13
|
+
hasDivider?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* MrlPanelFooter component.
|
|
17
|
+
*
|
|
18
|
+
* @param props The MrlPanelFooter component properties.
|
|
19
|
+
* @returns The MrlPanelFooter component.
|
|
20
|
+
*/
|
|
21
|
+
export declare const MrlPanelFooter: ({ children, hasDivider, className, ...rest }: MrlPanelFooterProps) => JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlPanelFooter } from './MrlPanelFooter';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the MrlPanelStickyHeader component.
|
|
4
|
+
*/
|
|
5
|
+
interface MrlPanelStickyHeaderProps extends ComponentPropsWithRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* The children of the MrlPanelStickyHeader component.
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* MrlPanelStickyHeader component.
|
|
13
|
+
*
|
|
14
|
+
* @param props The MrlPanelStickyHeader component properties.
|
|
15
|
+
* @returns The MrlPanel component.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MrlPanelStickyHeader: ({ children, className, ...rest }: MrlPanelStickyHeaderProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlPanelStickyHeader } from './MrlPanelStickyHeader';
|