@idea-fragments/react-components-zendesk 0.1.73 → 0.1.75
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/chats.js +8 -8
- package/dist/chats.js.map +1 -1
- package/dist/forms.js +6 -6
- package/dist/forms.js.map +1 -1
- package/dist/media.js +2 -2
- package/dist/media.js.map +1 -1
- package/dist/modals.js +2 -2
- package/dist/modals.js.map +1 -1
- package/dist/tables.js +17 -17
- package/dist/tables.js.map +1 -1
- package/dist/types/accordions.d.ts +15 -0
- package/dist/types/alert.d.ts +28 -0
- package/dist/types/chats.d.ts +38 -0
- package/dist/types/forms.d.ts +369 -0
- package/dist/types/hooks.d.ts +198 -0
- package/dist/types/icon.d.ts +18 -0
- package/dist/types/layouts.d.ts +336 -0
- package/dist/types/loaders.d.ts +47 -0
- package/dist/types/media.d.ts +142 -0
- package/dist/types/modals.d.ts +149 -0
- package/dist/types/navigation.d.ts +97 -0
- package/dist/types/notifications.d.ts +73 -0
- package/dist/types/styles.d.ts +313 -0
- package/dist/types/tables.d.ts +178 -0
- package/dist/types/tags.d.ts +261 -0
- package/dist/types/text.d.ts +152 -0
- package/dist/types/tooltips.d.ts +67 -0
- package/dist/types/types.d.ts +168 -0
- package/package.json +5 -10
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode, MouseEventHandler } from 'react';
|
|
4
|
+
import * as styled_components from 'styled-components';
|
|
5
|
+
import { FlattenSimpleInterpolation, ThemedStyledProps } from 'styled-components';
|
|
6
|
+
import { ValueOf } from 'utils/types';
|
|
7
|
+
import { Nullable } from 'global';
|
|
8
|
+
|
|
9
|
+
type ColorProps = {
|
|
10
|
+
accent?: boolean;
|
|
11
|
+
color?: string;
|
|
12
|
+
danger?: boolean;
|
|
13
|
+
neutral?: boolean;
|
|
14
|
+
primary?: boolean;
|
|
15
|
+
secondary?: boolean;
|
|
16
|
+
success?: boolean;
|
|
17
|
+
warning?: boolean;
|
|
18
|
+
};
|
|
19
|
+
type ContainerProps = {
|
|
20
|
+
_css?: CSS;
|
|
21
|
+
color?: string;
|
|
22
|
+
compact?: boolean;
|
|
23
|
+
fluid?: boolean;
|
|
24
|
+
className?: any;
|
|
25
|
+
};
|
|
26
|
+
type CSS<T = any> = FlattenSimpleInterpolation | string | T;
|
|
27
|
+
|
|
28
|
+
declare const FONT_TAGS: {
|
|
29
|
+
readonly DIV: "div";
|
|
30
|
+
readonly LABEL: "label";
|
|
31
|
+
readonly H1: "h1";
|
|
32
|
+
readonly H2: "h2";
|
|
33
|
+
readonly H3: "h3";
|
|
34
|
+
readonly H4: "h4";
|
|
35
|
+
readonly H5: "h5";
|
|
36
|
+
readonly H6: "h6";
|
|
37
|
+
readonly P: "p";
|
|
38
|
+
readonly SPAN: "span";
|
|
39
|
+
};
|
|
40
|
+
declare const FONT_SIZES: {
|
|
41
|
+
readonly XXS: ".8rem";
|
|
42
|
+
readonly XS: ".9rem";
|
|
43
|
+
readonly SM: "1rem";
|
|
44
|
+
readonly MD: "1.3rem";
|
|
45
|
+
readonly LG: "1.7rem";
|
|
46
|
+
readonly XL: "2.3rem";
|
|
47
|
+
readonly XXL: "3.3rem";
|
|
48
|
+
readonly XXXL: "4rem";
|
|
49
|
+
readonly XXXXL: "5rem";
|
|
50
|
+
readonly XXXXXL: "6rem";
|
|
51
|
+
};
|
|
52
|
+
declare const FONT_WEIGHTS: {
|
|
53
|
+
readonly THIN: "100";
|
|
54
|
+
readonly LIGHT: "300";
|
|
55
|
+
readonly REGULAR: "400";
|
|
56
|
+
readonly MEDIUM: "500";
|
|
57
|
+
readonly BOLD: "700";
|
|
58
|
+
readonly BLACK: "800";
|
|
59
|
+
};
|
|
60
|
+
type FontSize = ValueOf<typeof FONT_SIZES>;
|
|
61
|
+
type FontWeight = ValueOf<typeof FONT_WEIGHTS>;
|
|
62
|
+
type FontTag = ValueOf<typeof FONT_TAGS>;
|
|
63
|
+
type TextAlignment = "center" | "left" | "right";
|
|
64
|
+
type CommonTextProps = {
|
|
65
|
+
align?: TextAlignment;
|
|
66
|
+
as?: FontTag;
|
|
67
|
+
hasSubText?: boolean;
|
|
68
|
+
size?: FontSize;
|
|
69
|
+
weight?: FontWeight;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type FullSpectrumColors = {
|
|
73
|
+
100: string;
|
|
74
|
+
200: string;
|
|
75
|
+
300: string;
|
|
76
|
+
400: string;
|
|
77
|
+
500: string;
|
|
78
|
+
600: string;
|
|
79
|
+
700: string;
|
|
80
|
+
800: string;
|
|
81
|
+
};
|
|
82
|
+
type PartialSpectrumColors = {
|
|
83
|
+
400: string;
|
|
84
|
+
M400: string;
|
|
85
|
+
600: string;
|
|
86
|
+
M600: string;
|
|
87
|
+
};
|
|
88
|
+
type ContainerStyles = {
|
|
89
|
+
background?: string;
|
|
90
|
+
borderRadius?: string;
|
|
91
|
+
height?: string;
|
|
92
|
+
margin?: string;
|
|
93
|
+
padding?: string;
|
|
94
|
+
shadow?: string;
|
|
95
|
+
zIndex?: number;
|
|
96
|
+
};
|
|
97
|
+
type Styles = {
|
|
98
|
+
appBar: Required<Pick<ContainerStyles, "background" | "height" | "shadow" | "zIndex">> & {
|
|
99
|
+
screenPosition: "top" | "bottom";
|
|
100
|
+
};
|
|
101
|
+
border: {
|
|
102
|
+
color: string;
|
|
103
|
+
};
|
|
104
|
+
buttons: {
|
|
105
|
+
textTransform: Nullable<string>;
|
|
106
|
+
};
|
|
107
|
+
chat: {
|
|
108
|
+
message: {
|
|
109
|
+
currentUser: {
|
|
110
|
+
icon: {
|
|
111
|
+
background: string;
|
|
112
|
+
};
|
|
113
|
+
text: {
|
|
114
|
+
background: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
other: {
|
|
118
|
+
icon: {
|
|
119
|
+
background: string;
|
|
120
|
+
};
|
|
121
|
+
text: {
|
|
122
|
+
background: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
colorAccent: string;
|
|
128
|
+
colorDanger: string;
|
|
129
|
+
colorPrimary: string;
|
|
130
|
+
colorPrimaryDark: string;
|
|
131
|
+
colorSuccess: string;
|
|
132
|
+
colorTertiary: string;
|
|
133
|
+
colorWarning: string;
|
|
134
|
+
colors: {
|
|
135
|
+
black: string;
|
|
136
|
+
white: string;
|
|
137
|
+
product: {};
|
|
138
|
+
grey: FullSpectrumColors;
|
|
139
|
+
blue: FullSpectrumColors;
|
|
140
|
+
red: FullSpectrumColors;
|
|
141
|
+
yellow: FullSpectrumColors;
|
|
142
|
+
green: FullSpectrumColors;
|
|
143
|
+
kale: FullSpectrumColors;
|
|
144
|
+
fuschia: PartialSpectrumColors;
|
|
145
|
+
pink: PartialSpectrumColors;
|
|
146
|
+
crimson: PartialSpectrumColors;
|
|
147
|
+
orange: PartialSpectrumColors;
|
|
148
|
+
lemon: PartialSpectrumColors;
|
|
149
|
+
lime: PartialSpectrumColors;
|
|
150
|
+
mint: PartialSpectrumColors;
|
|
151
|
+
teal: PartialSpectrumColors;
|
|
152
|
+
azure: PartialSpectrumColors;
|
|
153
|
+
royal: PartialSpectrumColors;
|
|
154
|
+
purple: PartialSpectrumColors;
|
|
155
|
+
};
|
|
156
|
+
container: {
|
|
157
|
+
horizontalPadding: string;
|
|
158
|
+
};
|
|
159
|
+
drawer: {
|
|
160
|
+
width: string;
|
|
161
|
+
};
|
|
162
|
+
font: {
|
|
163
|
+
size: string;
|
|
164
|
+
};
|
|
165
|
+
footer: {
|
|
166
|
+
background: string;
|
|
167
|
+
};
|
|
168
|
+
infoPanel: {
|
|
169
|
+
background: string;
|
|
170
|
+
};
|
|
171
|
+
modal: {
|
|
172
|
+
backdrop: {
|
|
173
|
+
background: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
nav: {
|
|
177
|
+
linkColor: string;
|
|
178
|
+
};
|
|
179
|
+
notifications: {
|
|
180
|
+
zIndex: number;
|
|
181
|
+
};
|
|
182
|
+
overlayBackground: string;
|
|
183
|
+
pageBackground: string;
|
|
184
|
+
scrollbar: {
|
|
185
|
+
thumbColor: string;
|
|
186
|
+
trackColor: string;
|
|
187
|
+
};
|
|
188
|
+
scrollbarColor: string;
|
|
189
|
+
section: ContainerStyles & {
|
|
190
|
+
body: {
|
|
191
|
+
padding: string;
|
|
192
|
+
};
|
|
193
|
+
header: {
|
|
194
|
+
padding: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
sidebar: {
|
|
198
|
+
actionButton: {
|
|
199
|
+
borderRadius: string;
|
|
200
|
+
color: string;
|
|
201
|
+
};
|
|
202
|
+
background: string;
|
|
203
|
+
boxShadow: string;
|
|
204
|
+
padding: string;
|
|
205
|
+
width: string;
|
|
206
|
+
zIndex: number;
|
|
207
|
+
};
|
|
208
|
+
table: {
|
|
209
|
+
borderColor: string;
|
|
210
|
+
borderSize: string;
|
|
211
|
+
filterButtonIcon: Nullable<string>;
|
|
212
|
+
};
|
|
213
|
+
textColorDark: string;
|
|
214
|
+
textColorLight: string;
|
|
215
|
+
textColorOverPrimaryBg: string;
|
|
216
|
+
textColorPrimary: string;
|
|
217
|
+
textColorSecondary: string;
|
|
218
|
+
tooltip: {
|
|
219
|
+
darkBackground: string;
|
|
220
|
+
};
|
|
221
|
+
getTextColorForBackground: (p: StyledProps<{
|
|
222
|
+
color: string;
|
|
223
|
+
}>) => string;
|
|
224
|
+
};
|
|
225
|
+
type Theme = {
|
|
226
|
+
isDark: boolean;
|
|
227
|
+
styles: Styles;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
type StyledProps<Props = {}> = ThemedStyledProps<Props, Theme>;
|
|
231
|
+
|
|
232
|
+
type Props = {
|
|
233
|
+
danger?: boolean;
|
|
234
|
+
fluid?: boolean;
|
|
235
|
+
primary?: boolean;
|
|
236
|
+
success?: boolean;
|
|
237
|
+
};
|
|
238
|
+
type ChipProps = Props & StyledProps;
|
|
239
|
+
declare const Chip: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
240
|
+
children: react.ReactNode;
|
|
241
|
+
} & {
|
|
242
|
+
as: "p";
|
|
243
|
+
} & {
|
|
244
|
+
as: string;
|
|
245
|
+
background: string;
|
|
246
|
+
color: string;
|
|
247
|
+
} & Props, "background" | "color" | "as">;
|
|
248
|
+
|
|
249
|
+
declare const Close: styled_components.StyledComponent<react.ForwardRefExoticComponent<react.ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>, styled_components.DefaultTheme, {}, never>;
|
|
250
|
+
type TagProps = {
|
|
251
|
+
children: ReactNode;
|
|
252
|
+
className?: string;
|
|
253
|
+
color?: string;
|
|
254
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
255
|
+
onClose?: () => void;
|
|
256
|
+
size?: "small" | "large";
|
|
257
|
+
success?: boolean;
|
|
258
|
+
};
|
|
259
|
+
declare let Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLDivElement>>;
|
|
260
|
+
|
|
261
|
+
export { Chip, ChipProps, Close, Tag, TagProps };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import * as styled_components from 'styled-components';
|
|
5
|
+
import { FlattenSimpleInterpolation } from 'styled-components';
|
|
6
|
+
import { ValueOf } from 'utils/types';
|
|
7
|
+
|
|
8
|
+
type ColorProps = {
|
|
9
|
+
accent?: boolean;
|
|
10
|
+
color?: string;
|
|
11
|
+
danger?: boolean;
|
|
12
|
+
neutral?: boolean;
|
|
13
|
+
primary?: boolean;
|
|
14
|
+
secondary?: boolean;
|
|
15
|
+
success?: boolean;
|
|
16
|
+
warning?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type ContainerProps = {
|
|
19
|
+
_css?: CSS;
|
|
20
|
+
color?: string;
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
fluid?: boolean;
|
|
23
|
+
className?: any;
|
|
24
|
+
};
|
|
25
|
+
type CSS<T = any> = FlattenSimpleInterpolation | string | T;
|
|
26
|
+
|
|
27
|
+
declare const FONT_TAGS: {
|
|
28
|
+
readonly DIV: "div";
|
|
29
|
+
readonly LABEL: "label";
|
|
30
|
+
readonly H1: "h1";
|
|
31
|
+
readonly H2: "h2";
|
|
32
|
+
readonly H3: "h3";
|
|
33
|
+
readonly H4: "h4";
|
|
34
|
+
readonly H5: "h5";
|
|
35
|
+
readonly H6: "h6";
|
|
36
|
+
readonly P: "p";
|
|
37
|
+
readonly SPAN: "span";
|
|
38
|
+
};
|
|
39
|
+
declare const FONT_SIZES: {
|
|
40
|
+
readonly XXS: ".8rem";
|
|
41
|
+
readonly XS: ".9rem";
|
|
42
|
+
readonly SM: "1rem";
|
|
43
|
+
readonly MD: "1.3rem";
|
|
44
|
+
readonly LG: "1.7rem";
|
|
45
|
+
readonly XL: "2.3rem";
|
|
46
|
+
readonly XXL: "3.3rem";
|
|
47
|
+
readonly XXXL: "4rem";
|
|
48
|
+
readonly XXXXL: "5rem";
|
|
49
|
+
readonly XXXXXL: "6rem";
|
|
50
|
+
};
|
|
51
|
+
declare const FONT_WEIGHTS: {
|
|
52
|
+
readonly THIN: "100";
|
|
53
|
+
readonly LIGHT: "300";
|
|
54
|
+
readonly REGULAR: "400";
|
|
55
|
+
readonly MEDIUM: "500";
|
|
56
|
+
readonly BOLD: "700";
|
|
57
|
+
readonly BLACK: "800";
|
|
58
|
+
};
|
|
59
|
+
type FontSize = ValueOf<typeof FONT_SIZES>;
|
|
60
|
+
type FontWeight = ValueOf<typeof FONT_WEIGHTS>;
|
|
61
|
+
type FontTag = ValueOf<typeof FONT_TAGS>;
|
|
62
|
+
type TextAlignment = "center" | "left" | "right";
|
|
63
|
+
type CommonTextProps = {
|
|
64
|
+
align?: TextAlignment;
|
|
65
|
+
as?: FontTag;
|
|
66
|
+
hasSubText?: boolean;
|
|
67
|
+
size?: FontSize;
|
|
68
|
+
weight?: FontWeight;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
declare const H1: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
72
|
+
children: react.ReactNode;
|
|
73
|
+
} & {
|
|
74
|
+
as: "h1";
|
|
75
|
+
}, "as">;
|
|
76
|
+
declare const H2: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
77
|
+
children: react.ReactNode;
|
|
78
|
+
} & {
|
|
79
|
+
as: "h2";
|
|
80
|
+
}, "as">;
|
|
81
|
+
declare const H3: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
82
|
+
children: react.ReactNode;
|
|
83
|
+
} & {
|
|
84
|
+
as: "h3";
|
|
85
|
+
}, "as">;
|
|
86
|
+
declare const H4: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
87
|
+
children: react.ReactNode;
|
|
88
|
+
} & {
|
|
89
|
+
as: "h4";
|
|
90
|
+
}, "as">;
|
|
91
|
+
declare const H5: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
92
|
+
children: react.ReactNode;
|
|
93
|
+
} & {
|
|
94
|
+
as: "h5";
|
|
95
|
+
}, "as">;
|
|
96
|
+
declare const H6: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
97
|
+
children: react.ReactNode;
|
|
98
|
+
} & {
|
|
99
|
+
as: "h6";
|
|
100
|
+
}, "as">;
|
|
101
|
+
|
|
102
|
+
declare const Label: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
103
|
+
children: react.ReactNode;
|
|
104
|
+
} & {
|
|
105
|
+
as: "label";
|
|
106
|
+
}, "as">;
|
|
107
|
+
|
|
108
|
+
declare const Paragraph: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
109
|
+
children: react.ReactNode;
|
|
110
|
+
} & {
|
|
111
|
+
as: "p";
|
|
112
|
+
}, "as">;
|
|
113
|
+
declare const XXS: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
114
|
+
children: react.ReactNode;
|
|
115
|
+
} & {
|
|
116
|
+
as: "p";
|
|
117
|
+
}, "as">;
|
|
118
|
+
declare const XS: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
119
|
+
children: react.ReactNode;
|
|
120
|
+
} & {
|
|
121
|
+
as: "p";
|
|
122
|
+
}, "as">;
|
|
123
|
+
declare const MD: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
124
|
+
children: react.ReactNode;
|
|
125
|
+
} & {
|
|
126
|
+
as: "p";
|
|
127
|
+
}, "as">;
|
|
128
|
+
declare const LG: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
129
|
+
children: react.ReactNode;
|
|
130
|
+
} & {
|
|
131
|
+
as: "p";
|
|
132
|
+
}, "as">;
|
|
133
|
+
declare const XL: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
134
|
+
children: react.ReactNode;
|
|
135
|
+
} & {
|
|
136
|
+
as: "p";
|
|
137
|
+
}, "as">;
|
|
138
|
+
|
|
139
|
+
type TextProps = CommonTextProps & ContainerProps & ColorProps & {
|
|
140
|
+
children: ReactNode;
|
|
141
|
+
};
|
|
142
|
+
declare const Text: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
143
|
+
children: ReactNode;
|
|
144
|
+
}, never>;
|
|
145
|
+
|
|
146
|
+
declare const Hint: styled_components.StyledComponent<"div", styled_components.DefaultTheme, CommonTextProps & ContainerProps & ColorProps & {
|
|
147
|
+
children: react.ReactNode;
|
|
148
|
+
} & {
|
|
149
|
+
as: "p";
|
|
150
|
+
}, "as">;
|
|
151
|
+
|
|
152
|
+
export { H1, H2, H3, H4, H5, H6, Hint, LG, Label, MD, Paragraph, Text, TextProps, XL, XS, XXS };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as styled_components from 'styled-components';
|
|
2
|
+
import * as prop_types from 'prop-types';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { PropsWithChildren, ReactNode, ComponentType, SVGAttributes, FC } from 'react';
|
|
5
|
+
import * as _zendeskgarden_react_tooltips from '@zendeskgarden/react-tooltips';
|
|
6
|
+
|
|
7
|
+
type Placement = "start" | "end" | "auto" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "end-top" | "end-bottom" | "start-top" | "start-bottom";
|
|
8
|
+
type TooltipProps = PropsWithChildren<{
|
|
9
|
+
arrow?: boolean;
|
|
10
|
+
maxWidth?: string;
|
|
11
|
+
placement?: Placement;
|
|
12
|
+
content: ReactNode;
|
|
13
|
+
type?: "light";
|
|
14
|
+
}>;
|
|
15
|
+
declare const Tooltip: styled_components.StyledComponent<{
|
|
16
|
+
({ id, delayMS, isInitialVisible, content, refKey, placement, eventsEnabled, popperModifiers, children, hasArrow, size, type, appendToNode, zIndex, isVisible: externalIsVisible, ...otherProps }: _zendeskgarden_react_tooltips.ITooltipProps): react.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
propTypes: {
|
|
19
|
+
appendToNode: prop_types.Requireable<any>;
|
|
20
|
+
hasArrow: prop_types.Requireable<boolean>;
|
|
21
|
+
delayMS: prop_types.Requireable<number>;
|
|
22
|
+
eventsEnabled: prop_types.Requireable<boolean>;
|
|
23
|
+
id: prop_types.Requireable<string>;
|
|
24
|
+
content: prop_types.Validator<NonNullable<prop_types.ReactNodeLike>>;
|
|
25
|
+
placement: prop_types.Requireable<"top" | "bottom" | "end" | "start" | "auto" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "end-top" | "end-bottom" | "start-top" | "start-bottom">;
|
|
26
|
+
popperModifiers: prop_types.Requireable<any>;
|
|
27
|
+
size: prop_types.Requireable<"small" | "large" | "medium" | "extra-large">;
|
|
28
|
+
type: prop_types.Requireable<"light" | "dark">;
|
|
29
|
+
zIndex: prop_types.Requireable<NonNullable<string | number | null | undefined>>;
|
|
30
|
+
isInitialVisible: prop_types.Requireable<boolean>;
|
|
31
|
+
refKey: prop_types.Requireable<string>;
|
|
32
|
+
};
|
|
33
|
+
defaultProps: {
|
|
34
|
+
hasArrow: boolean;
|
|
35
|
+
eventsEnabled: boolean;
|
|
36
|
+
type: string;
|
|
37
|
+
placement: string;
|
|
38
|
+
delayMS: number;
|
|
39
|
+
refKey: string;
|
|
40
|
+
};
|
|
41
|
+
}, styled_components.DefaultTheme, {
|
|
42
|
+
arrow?: boolean | undefined;
|
|
43
|
+
maxWidth?: string | undefined;
|
|
44
|
+
placement?: Placement | undefined;
|
|
45
|
+
content: ReactNode;
|
|
46
|
+
type?: "light" | undefined;
|
|
47
|
+
} & {
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
}, never>;
|
|
50
|
+
|
|
51
|
+
type SVGComponent = ComponentType<SVGAttributes<any>>;
|
|
52
|
+
type Props$1 = {
|
|
53
|
+
color?: string;
|
|
54
|
+
size?: number | string;
|
|
55
|
+
svg: string | Array<string> | SVGComponent;
|
|
56
|
+
title?: string;
|
|
57
|
+
onClick?: () => void;
|
|
58
|
+
};
|
|
59
|
+
type IconProps = Props$1;
|
|
60
|
+
|
|
61
|
+
type Props = Omit<TooltipProps, "content"> & {
|
|
62
|
+
icon: string;
|
|
63
|
+
iconProps?: IconProps;
|
|
64
|
+
};
|
|
65
|
+
declare let IconTooltip: FC<PropsWithChildren<Props>>;
|
|
66
|
+
|
|
67
|
+
export { IconTooltip, Tooltip, TooltipProps };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { ThemedStyledProps } from 'styled-components';
|
|
2
|
+
import { Nullable } from 'global';
|
|
3
|
+
|
|
4
|
+
type StyledComponentProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type FullSpectrumColors = {
|
|
9
|
+
100: string;
|
|
10
|
+
200: string;
|
|
11
|
+
300: string;
|
|
12
|
+
400: string;
|
|
13
|
+
500: string;
|
|
14
|
+
600: string;
|
|
15
|
+
700: string;
|
|
16
|
+
800: string;
|
|
17
|
+
};
|
|
18
|
+
type PartialSpectrumColors = {
|
|
19
|
+
400: string;
|
|
20
|
+
M400: string;
|
|
21
|
+
600: string;
|
|
22
|
+
M600: string;
|
|
23
|
+
};
|
|
24
|
+
type ContainerStyles = {
|
|
25
|
+
background?: string;
|
|
26
|
+
borderRadius?: string;
|
|
27
|
+
height?: string;
|
|
28
|
+
margin?: string;
|
|
29
|
+
padding?: string;
|
|
30
|
+
shadow?: string;
|
|
31
|
+
zIndex?: number;
|
|
32
|
+
};
|
|
33
|
+
type Styles = {
|
|
34
|
+
appBar: Required<Pick<ContainerStyles, "background" | "height" | "shadow" | "zIndex">> & {
|
|
35
|
+
screenPosition: "top" | "bottom";
|
|
36
|
+
};
|
|
37
|
+
border: {
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
buttons: {
|
|
41
|
+
textTransform: Nullable<string>;
|
|
42
|
+
};
|
|
43
|
+
chat: {
|
|
44
|
+
message: {
|
|
45
|
+
currentUser: {
|
|
46
|
+
icon: {
|
|
47
|
+
background: string;
|
|
48
|
+
};
|
|
49
|
+
text: {
|
|
50
|
+
background: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
other: {
|
|
54
|
+
icon: {
|
|
55
|
+
background: string;
|
|
56
|
+
};
|
|
57
|
+
text: {
|
|
58
|
+
background: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
colorAccent: string;
|
|
64
|
+
colorDanger: string;
|
|
65
|
+
colorPrimary: string;
|
|
66
|
+
colorPrimaryDark: string;
|
|
67
|
+
colorSuccess: string;
|
|
68
|
+
colorTertiary: string;
|
|
69
|
+
colorWarning: string;
|
|
70
|
+
colors: {
|
|
71
|
+
black: string;
|
|
72
|
+
white: string;
|
|
73
|
+
product: {};
|
|
74
|
+
grey: FullSpectrumColors;
|
|
75
|
+
blue: FullSpectrumColors;
|
|
76
|
+
red: FullSpectrumColors;
|
|
77
|
+
yellow: FullSpectrumColors;
|
|
78
|
+
green: FullSpectrumColors;
|
|
79
|
+
kale: FullSpectrumColors;
|
|
80
|
+
fuschia: PartialSpectrumColors;
|
|
81
|
+
pink: PartialSpectrumColors;
|
|
82
|
+
crimson: PartialSpectrumColors;
|
|
83
|
+
orange: PartialSpectrumColors;
|
|
84
|
+
lemon: PartialSpectrumColors;
|
|
85
|
+
lime: PartialSpectrumColors;
|
|
86
|
+
mint: PartialSpectrumColors;
|
|
87
|
+
teal: PartialSpectrumColors;
|
|
88
|
+
azure: PartialSpectrumColors;
|
|
89
|
+
royal: PartialSpectrumColors;
|
|
90
|
+
purple: PartialSpectrumColors;
|
|
91
|
+
};
|
|
92
|
+
container: {
|
|
93
|
+
horizontalPadding: string;
|
|
94
|
+
};
|
|
95
|
+
drawer: {
|
|
96
|
+
width: string;
|
|
97
|
+
};
|
|
98
|
+
font: {
|
|
99
|
+
size: string;
|
|
100
|
+
};
|
|
101
|
+
footer: {
|
|
102
|
+
background: string;
|
|
103
|
+
};
|
|
104
|
+
infoPanel: {
|
|
105
|
+
background: string;
|
|
106
|
+
};
|
|
107
|
+
modal: {
|
|
108
|
+
backdrop: {
|
|
109
|
+
background: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
nav: {
|
|
113
|
+
linkColor: string;
|
|
114
|
+
};
|
|
115
|
+
notifications: {
|
|
116
|
+
zIndex: number;
|
|
117
|
+
};
|
|
118
|
+
overlayBackground: string;
|
|
119
|
+
pageBackground: string;
|
|
120
|
+
scrollbar: {
|
|
121
|
+
thumbColor: string;
|
|
122
|
+
trackColor: string;
|
|
123
|
+
};
|
|
124
|
+
scrollbarColor: string;
|
|
125
|
+
section: ContainerStyles & {
|
|
126
|
+
body: {
|
|
127
|
+
padding: string;
|
|
128
|
+
};
|
|
129
|
+
header: {
|
|
130
|
+
padding: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
sidebar: {
|
|
134
|
+
actionButton: {
|
|
135
|
+
borderRadius: string;
|
|
136
|
+
color: string;
|
|
137
|
+
};
|
|
138
|
+
background: string;
|
|
139
|
+
boxShadow: string;
|
|
140
|
+
padding: string;
|
|
141
|
+
width: string;
|
|
142
|
+
zIndex: number;
|
|
143
|
+
};
|
|
144
|
+
table: {
|
|
145
|
+
borderColor: string;
|
|
146
|
+
borderSize: string;
|
|
147
|
+
filterButtonIcon: Nullable<string>;
|
|
148
|
+
};
|
|
149
|
+
textColorDark: string;
|
|
150
|
+
textColorLight: string;
|
|
151
|
+
textColorOverPrimaryBg: string;
|
|
152
|
+
textColorPrimary: string;
|
|
153
|
+
textColorSecondary: string;
|
|
154
|
+
tooltip: {
|
|
155
|
+
darkBackground: string;
|
|
156
|
+
};
|
|
157
|
+
getTextColorForBackground: (p: StyledProps<{
|
|
158
|
+
color: string;
|
|
159
|
+
}>) => string;
|
|
160
|
+
};
|
|
161
|
+
type Theme = {
|
|
162
|
+
isDark: boolean;
|
|
163
|
+
styles: Styles;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
type StyledProps<Props = {}> = ThemedStyledProps<Props, Theme>;
|
|
167
|
+
|
|
168
|
+
export { StyledComponentProps, StyledProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idea-fragments/react-components-zendesk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.75",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*.js",
|
|
@@ -8,13 +8,9 @@
|
|
|
8
8
|
"dist/types"
|
|
9
9
|
],
|
|
10
10
|
"exports": {
|
|
11
|
-
"./*":
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
">=4.2": {
|
|
15
|
-
"*": [
|
|
16
|
-
"dist/types/*.d.ts"
|
|
17
|
-
]
|
|
11
|
+
"./*": {
|
|
12
|
+
"types": "./dist/types/*.d.ts",
|
|
13
|
+
"default": "./dist/*.js"
|
|
18
14
|
}
|
|
19
15
|
},
|
|
20
16
|
"dependencies": {
|
|
@@ -118,8 +114,7 @@
|
|
|
118
114
|
"eject": "react-scripts eject",
|
|
119
115
|
"format": "./git_hooks/pre_commit/prettier.sh",
|
|
120
116
|
"lint": "eslint",
|
|
121
|
-
"rollup": "
|
|
122
|
-
"rollup-windows": "rollup --config --max-old-space-size=8192",
|
|
117
|
+
"rollup": "npm run cleanup && node scripts/rollup-prompt.js",
|
|
123
118
|
"start": "react-scripts start",
|
|
124
119
|
"storybook": "storybook dev -p 6006",
|
|
125
120
|
"test": "react-scripts test"
|