smartsell-ui-kit 0.0.2 → 0.0.4
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/chunk-BI3QBKFG.js +634 -0
- package/dist/chunk-BI3QBKFG.js.map +1 -0
- package/dist/index.cjs +514 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -32
- package/dist/index.d.ts +6 -32
- package/dist/index.js +45 -210
- package/dist/index.js.map +1 -1
- package/dist/modal-BDeh1TYW.d.cts +81 -0
- package/dist/modal-BDeh1TYW.d.ts +81 -0
- package/dist/modal.cjs +660 -0
- package/dist/modal.cjs.map +1 -0
- package/dist/modal.d.cts +4 -0
- package/dist/modal.d.ts +4 -0
- package/dist/modal.js +7 -0
- package/dist/modal.js.map +1 -0
- package/package.json +13 -4
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
import { SalesTheme, SmartSellSDK } from 'smartsell-sales-sdk';
|
|
4
|
+
|
|
5
|
+
interface UiKitThemeTokens {
|
|
6
|
+
theme: SalesTheme;
|
|
7
|
+
borderSoft: string;
|
|
8
|
+
borderStrong: string;
|
|
9
|
+
surfaceMuted: string;
|
|
10
|
+
surfaceRaised: string;
|
|
11
|
+
overlay: string;
|
|
12
|
+
focusRing: string;
|
|
13
|
+
mutedText: string;
|
|
14
|
+
}
|
|
15
|
+
declare function useUiKitTheme(sdk: SmartSellSDK): UiKitThemeTokens;
|
|
16
|
+
|
|
17
|
+
type LegacyButtonType = 'text' | 'outlined' | 'contained' | 'link';
|
|
18
|
+
type ModalThemeColors = {
|
|
19
|
+
background: string;
|
|
20
|
+
surface: string;
|
|
21
|
+
onSurface: string;
|
|
22
|
+
onBackground: string;
|
|
23
|
+
primary: string;
|
|
24
|
+
onPrimary: string;
|
|
25
|
+
secondary: string;
|
|
26
|
+
onSecondary: string;
|
|
27
|
+
negative: string;
|
|
28
|
+
warning: string;
|
|
29
|
+
};
|
|
30
|
+
interface ModalTheme {
|
|
31
|
+
colors?: Partial<ModalThemeColors>;
|
|
32
|
+
}
|
|
33
|
+
type ModalThemeSource = ModalTheme | UiKitThemeTokens;
|
|
34
|
+
interface LegacyModalAction {
|
|
35
|
+
name: string;
|
|
36
|
+
onClick: () => void;
|
|
37
|
+
type?: LegacyButtonType;
|
|
38
|
+
style?: CSSProperties;
|
|
39
|
+
disable?: boolean;
|
|
40
|
+
}
|
|
41
|
+
interface BaseModalProps {
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
theme?: ModalThemeSource;
|
|
44
|
+
}
|
|
45
|
+
interface StandardModalProps extends BaseModalProps {
|
|
46
|
+
isOpen: boolean;
|
|
47
|
+
onClose: () => void;
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
footer?: ReactNode;
|
|
50
|
+
title?: ReactNode;
|
|
51
|
+
description?: ReactNode;
|
|
52
|
+
headerContent?: ReactNode;
|
|
53
|
+
maxWidth?: number | string;
|
|
54
|
+
closeOnBackdrop?: boolean;
|
|
55
|
+
closeOnEscape?: boolean;
|
|
56
|
+
hideCloseButton?: boolean;
|
|
57
|
+
hideExpandButton?: boolean;
|
|
58
|
+
maximized?: boolean;
|
|
59
|
+
contentStyle?: CSSProperties;
|
|
60
|
+
}
|
|
61
|
+
interface LegacyModalProps extends BaseModalProps {
|
|
62
|
+
title: ReactNode;
|
|
63
|
+
showModal: boolean;
|
|
64
|
+
closeModal: () => void;
|
|
65
|
+
action?: () => void;
|
|
66
|
+
actionNameBtn?: string | undefined;
|
|
67
|
+
hideActionButton?: boolean;
|
|
68
|
+
cancelButton?: () => void;
|
|
69
|
+
disableActionBtn?: boolean;
|
|
70
|
+
isLoading?: boolean;
|
|
71
|
+
onlyCloseButton?: boolean;
|
|
72
|
+
hideCloseIcon?: boolean;
|
|
73
|
+
style?: CSSProperties;
|
|
74
|
+
bodyStyle?: CSSProperties;
|
|
75
|
+
additionalActions?: LegacyModalAction[];
|
|
76
|
+
maximized?: boolean;
|
|
77
|
+
}
|
|
78
|
+
type ModalProps = StandardModalProps | LegacyModalProps;
|
|
79
|
+
declare function Modal(props: ModalProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
export { type LegacyModalAction as L, Modal as M, type StandardModalProps as S, type UiKitThemeTokens as U, type LegacyModalProps as a, type ModalProps as b, type ModalTheme as c, type ModalThemeSource as d, useUiKitTheme as u };
|