@seeqdev/qomponents 0.0.45 → 0.0.47
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/Button/Button.types.d.ts +2 -1
- package/dist/Modal/Modal.d.ts +5 -0
- package/dist/Modal/Modal.stories.d.ts +10 -0
- package/dist/Modal/Modal.test.d.ts +1 -0
- package/dist/Modal/Modal.types.d.ts +44 -0
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Tabs/Tabs.types.d.ts +5 -3
- package/dist/TextField/TextField.types.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +425 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +424 -14
- package/dist/index.js.map +1 -1
- package/dist/styles.css +287 -5
- package/package.json +2 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TooltipProps } from '../Tooltip/Tooltip.types';
|
|
2
2
|
import { IconType } from '../Icon/Icon.types';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
export declare const buttonTypes: readonly ["button", "reset", "submit", "link"];
|
|
4
5
|
export declare const buttonSizes: readonly ["sm", "lg"];
|
|
5
6
|
export declare const buttonVariants: readonly ["outline", "theme", "theme-light", "warning", "danger", "no-border"];
|
|
@@ -8,7 +9,7 @@ export type ButtonSize = typeof buttonSizes[number];
|
|
|
8
9
|
export type ButtonVariant = typeof buttonVariants[number];
|
|
9
10
|
export interface ButtonProps {
|
|
10
11
|
/** function to call when clicking the button (takes no parameters) */
|
|
11
|
-
onClick?: () =>
|
|
12
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
12
13
|
/** label translation key on the button (i.e. SUBMIT) */
|
|
13
14
|
label?: string | JSX.Element | React.ReactNode;
|
|
14
15
|
variant?: ButtonVariant;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AllModalsVariants: React.FunctionComponent;
|
|
7
|
+
export declare const ModalsWithDisabledSubmit: React.FunctionComponent;
|
|
8
|
+
export declare const ModalsWithEditableTitle: React.FunctionComponent;
|
|
9
|
+
export declare const ModalsWithIcon: React.FunctionComponent;
|
|
10
|
+
export declare const ModalsWithCustomButton: React.FunctionComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FormControlElement } from '../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonVariant } from '../Button/Button.types';
|
|
4
|
+
export type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
|
|
5
|
+
export type TitleIconPosition = 'left' | 'right';
|
|
6
|
+
export interface ModalProps {
|
|
7
|
+
title: string;
|
|
8
|
+
titleSuffixLabel?: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
titleIcon?: string | React.ReactElement;
|
|
11
|
+
titleIconPosition?: TitleIconPosition;
|
|
12
|
+
children: React.ReactElement;
|
|
13
|
+
modalFooter?: React.ReactElement;
|
|
14
|
+
open: boolean;
|
|
15
|
+
/** function to call when clicking the close button (takes no parameters) */
|
|
16
|
+
onClose?: () => any;
|
|
17
|
+
customButton?: boolean;
|
|
18
|
+
customButtonLabel?: string;
|
|
19
|
+
onClickCustomButton?: () => any;
|
|
20
|
+
submitButtonLabel?: string;
|
|
21
|
+
cancelButtonLabel?: string;
|
|
22
|
+
disableSubmitButton?: boolean;
|
|
23
|
+
stopPropagationSubmitButton?: boolean;
|
|
24
|
+
onSubmit?: (event: React.MouseEvent) => any;
|
|
25
|
+
isTitleEditable?: boolean;
|
|
26
|
+
onTitleChanged?: React.ChangeEventHandler<FormControlElement>;
|
|
27
|
+
inputExtraClassNames?: string;
|
|
28
|
+
hideCloseIcon?: boolean;
|
|
29
|
+
size?: ModalSize;
|
|
30
|
+
hideFooterButtons?: boolean;
|
|
31
|
+
hideSubmitButton?: boolean;
|
|
32
|
+
hideCancelButton?: boolean;
|
|
33
|
+
testId?: string;
|
|
34
|
+
dialogClassName?: string;
|
|
35
|
+
titlePlaceholder?: string;
|
|
36
|
+
titleRequired?: boolean;
|
|
37
|
+
titleError?: string;
|
|
38
|
+
submitButtonTooltip?: string;
|
|
39
|
+
cancelButtonTooltip?: string;
|
|
40
|
+
disableCustomButton?: boolean;
|
|
41
|
+
customHeader?: React.ReactElement;
|
|
42
|
+
middleFooterSection?: React.ReactElement;
|
|
43
|
+
customButtonVariant?: ButtonVariant;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Modal';
|
|
@@ -3,6 +3,10 @@ export interface TabsProps {
|
|
|
3
3
|
defaultActiveTab?: string;
|
|
4
4
|
activeTab?: string;
|
|
5
5
|
transition?: boolean;
|
|
6
|
+
onTabSelect?: (tabId: string) => void;
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
stretchTabs?: boolean;
|
|
6
10
|
tabs: {
|
|
7
11
|
label: string;
|
|
8
12
|
id: string;
|
|
@@ -11,8 +15,6 @@ export interface TabsProps {
|
|
|
11
15
|
testId?: string;
|
|
12
16
|
tabExtraClassNames?: string;
|
|
13
17
|
disabled?: boolean;
|
|
18
|
+
tabContentExtraClassNames?: string;
|
|
14
19
|
}[];
|
|
15
|
-
onTabSelect?: (tabId: string) => void;
|
|
16
|
-
id?: string;
|
|
17
|
-
testId?: string;
|
|
18
20
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import TextArea from './TextArea';
|
|
|
6
6
|
import { QTip, Tooltip } from './Tooltip';
|
|
7
7
|
import Icon from './Icon';
|
|
8
8
|
import Select from './Select';
|
|
9
|
+
import Modal from './Modal';
|
|
9
10
|
import Tabs from './Tabs';
|
|
10
11
|
export { Tabs };
|
|
11
12
|
export { Button };
|
|
@@ -17,3 +18,4 @@ export { Checkbox };
|
|
|
17
18
|
export { Icon };
|
|
18
19
|
export { Select };
|
|
19
20
|
export { QTip };
|
|
21
|
+
export { Modal };
|