@cleartrip/ct-design-tooltip 4.0.0 → 5.1.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/README.md +97 -0
- package/dist/Tooltip.d.ts +2 -5
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.native.d.ts +11 -0
- package/dist/Tooltip.native.d.ts.map +1 -0
- package/dist/TooltipArrow.d.ts +10 -0
- package/dist/TooltipArrow.d.ts.map +1 -0
- package/dist/TooltipContainer.d.ts +14 -0
- package/dist/TooltipContainer.d.ts.map +1 -0
- package/dist/constants.d.ts +19 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/ct-design-tooltip.browser.cjs.js +1 -1
- package/dist/ct-design-tooltip.browser.cjs.js.map +1 -1
- package/dist/ct-design-tooltip.browser.esm.js +1 -1
- package/dist/ct-design-tooltip.browser.esm.js.map +1 -1
- package/dist/ct-design-tooltip.cjs.js +377 -116
- package/dist/ct-design-tooltip.cjs.js.map +1 -1
- package/dist/ct-design-tooltip.esm.js +377 -112
- package/dist/ct-design-tooltip.esm.js.map +1 -1
- package/dist/ct-design-tooltip.umd.js +2020 -149
- package/dist/ct-design-tooltip.umd.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/style.d.ts +112 -13
- package/dist/style.d.ts.map +1 -1
- package/dist/type.d.ts +42 -19
- package/dist/type.d.ts.map +1 -1
- package/dist/webStyle.d.ts +170 -0
- package/dist/webStyle.d.ts.map +1 -0
- package/package.json +24 -16
- package/src/Tooltip.native.tsx +230 -0
- package/src/Tooltip.tsx +137 -0
- package/src/TooltipArrow.tsx +39 -0
- package/src/TooltipContainer.tsx +46 -0
- package/src/constants.ts +20 -0
- package/src/index.ts +3 -0
- package/src/style.ts +370 -0
- package/src/type.ts +111 -0
- package/src/webStyle.ts +354 -0
- package/dist/StyledTooltip/StyledTooltip.d.ts +0 -4
- package/dist/StyledTooltip/StyledTooltip.d.ts.map +0 -1
- package/dist/StyledTooltip/index.d.ts +0 -2
- package/dist/StyledTooltip/index.d.ts.map +0 -1
- package/dist/StyledTooltip/style.d.ts +0 -6
- package/dist/StyledTooltip/style.d.ts.map +0 -1
- package/dist/StyledTooltip/type.d.ts +0 -6
- package/dist/StyledTooltip/type.d.ts.map +0 -1
- package/dist/TooltipArrow/StyledTooltipArrow/StyledTooltipArrow.d.ts +0 -4
- package/dist/TooltipArrow/StyledTooltipArrow/StyledTooltipArrow.d.ts.map +0 -1
- package/dist/TooltipArrow/StyledTooltipArrow/index.d.ts +0 -2
- package/dist/TooltipArrow/StyledTooltipArrow/index.d.ts.map +0 -1
- package/dist/TooltipArrow/StyledTooltipArrow/style.d.ts +0 -7
- package/dist/TooltipArrow/StyledTooltipArrow/style.d.ts.map +0 -1
- package/dist/TooltipArrow/StyledTooltipArrow/type.d.ts +0 -8
- package/dist/TooltipArrow/StyledTooltipArrow/type.d.ts.map +0 -1
- package/dist/TooltipArrow/TooltipArrow.d.ts +0 -5
- package/dist/TooltipArrow/TooltipArrow.d.ts.map +0 -1
- package/dist/TooltipArrow/index.d.ts +0 -2
- package/dist/TooltipArrow/index.d.ts.map +0 -1
- package/dist/TooltipArrow/style.d.ts +0 -30
- package/dist/TooltipArrow/style.d.ts.map +0 -1
- package/dist/TooltipArrow/type.d.ts +0 -7
- package/dist/TooltipArrow/type.d.ts.map +0 -1
package/src/webStyle.ts
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { overlayBorderRadius, positions } from './constants';
|
|
2
|
+
import { Theme } from '@cleartrip/ct-design-theme';
|
|
3
|
+
|
|
4
|
+
export const getTooltipBorderSize = (borderSize: `${overlayBorderRadius}`, theme: Theme) => {
|
|
5
|
+
switch (borderSize) {
|
|
6
|
+
case overlayBorderRadius.XS: {
|
|
7
|
+
return {
|
|
8
|
+
borderRadius: theme.border.radius[4],
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
case overlayBorderRadius.SM: {
|
|
12
|
+
return {
|
|
13
|
+
borderRadius: theme.border.radius[6],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
case overlayBorderRadius.MD: {
|
|
17
|
+
return {
|
|
18
|
+
borderRadius: theme.border.radius[8],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
case overlayBorderRadius.LG: {
|
|
22
|
+
return {
|
|
23
|
+
borderRadius: theme.border.radius[16],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
case overlayBorderRadius.XL: {
|
|
27
|
+
return {
|
|
28
|
+
borderRadius: theme.border.radius[32],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
default: {
|
|
32
|
+
return {
|
|
33
|
+
borderRadius: theme.border.radius[8],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const getTooltipAutoPositionStyle = ({
|
|
40
|
+
labelRef,
|
|
41
|
+
tooltipRef,
|
|
42
|
+
anchorRef,
|
|
43
|
+
}: {
|
|
44
|
+
labelRef: React.RefObject<HTMLDivElement | null>;
|
|
45
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
46
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
47
|
+
}) => {
|
|
48
|
+
const anchorElement = anchorRef?.current || document.body;
|
|
49
|
+
|
|
50
|
+
if (tooltipRef?.current && labelRef?.current && anchorElement) {
|
|
51
|
+
const anchorElementStyleData = anchorElement.getBoundingClientRect();
|
|
52
|
+
const tooltipElementStyleData = tooltipRef.current.getBoundingClientRect();
|
|
53
|
+
|
|
54
|
+
const { right: anchorRight, bottom: anchorBottom } = anchorElementStyleData;
|
|
55
|
+
const { right: tooltipRight, bottom: tooltipBottom } = tooltipElementStyleData;
|
|
56
|
+
|
|
57
|
+
const tooltipHeight = tooltipRef.current.offsetHeight;
|
|
58
|
+
const tooltipWidth = tooltipRef.current.offsetWidth;
|
|
59
|
+
|
|
60
|
+
const labelHeight = labelRef.current.offsetHeight;
|
|
61
|
+
const labelWidth = labelRef.current.offsetWidth;
|
|
62
|
+
|
|
63
|
+
if (tooltipRight > anchorRight && tooltipBottom > anchorBottom) {
|
|
64
|
+
/* BOTTOM-RIGHT */
|
|
65
|
+
return {
|
|
66
|
+
left: tooltipWidth - labelWidth < 0 ? tooltipWidth - labelWidth : -(tooltipWidth - labelWidth),
|
|
67
|
+
top: -(tooltipHeight + 10),
|
|
68
|
+
};
|
|
69
|
+
} else if (tooltipBottom > anchorBottom) {
|
|
70
|
+
/* BOTTOM - CENTER */
|
|
71
|
+
return {
|
|
72
|
+
top: -(tooltipHeight + 10),
|
|
73
|
+
};
|
|
74
|
+
} else if (tooltipRight > anchorRight) {
|
|
75
|
+
/* RIGHT - CENTER */
|
|
76
|
+
return {
|
|
77
|
+
left: tooltipWidth - labelWidth < 0 ? tooltipWidth - labelWidth : -(tooltipWidth - labelWidth),
|
|
78
|
+
top: labelHeight + 10,
|
|
79
|
+
};
|
|
80
|
+
} else {
|
|
81
|
+
return {
|
|
82
|
+
top: labelHeight + 10,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const getTooltipBottomPosition = ({
|
|
91
|
+
labelRef,
|
|
92
|
+
tooltipRef,
|
|
93
|
+
anchorRef,
|
|
94
|
+
}: {
|
|
95
|
+
labelRef: React.RefObject<HTMLDivElement | null>;
|
|
96
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
97
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
98
|
+
}) => {
|
|
99
|
+
const anchorElement = anchorRef?.current || document.body;
|
|
100
|
+
if (labelRef?.current && tooltipRef?.current) {
|
|
101
|
+
const { right: anchorRight, left: anchorLeft } = anchorElement.getBoundingClientRect();
|
|
102
|
+
const { right: labelRight, left: labelLeft } = labelRef.current.getBoundingClientRect();
|
|
103
|
+
const tooltipWidth = tooltipRef.current.offsetWidth;
|
|
104
|
+
|
|
105
|
+
const labelHeight = labelRef.current.offsetHeight;
|
|
106
|
+
const labelWidth = labelRef.current.offsetWidth;
|
|
107
|
+
|
|
108
|
+
let leftPosition =
|
|
109
|
+
tooltipWidth - labelWidth < 0 ? (tooltipWidth - labelWidth) / 2 : -(tooltipWidth - labelWidth) / 2;
|
|
110
|
+
|
|
111
|
+
if (tooltipWidth > labelWidth && anchorRight - labelRight < (tooltipWidth - labelWidth) / 2) {
|
|
112
|
+
leftPosition -= (tooltipWidth - labelWidth) / 2 - (anchorRight - labelRight) + 4;
|
|
113
|
+
} else if (tooltipWidth > labelWidth && labelLeft - anchorLeft < (tooltipWidth - labelWidth) / 2) {
|
|
114
|
+
leftPosition += (tooltipWidth - labelWidth) / 2 - (labelLeft - anchorLeft) + 4;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
top: labelHeight + 10,
|
|
119
|
+
left: leftPosition,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
return {};
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export const getTooltipTopPosition = ({
|
|
126
|
+
labelRef,
|
|
127
|
+
tooltipRef,
|
|
128
|
+
anchorRef,
|
|
129
|
+
}: {
|
|
130
|
+
labelRef: React.RefObject<HTMLDivElement | null>;
|
|
131
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
132
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
133
|
+
}) => {
|
|
134
|
+
const anchorElement = anchorRef?.current || document.body;
|
|
135
|
+
if (labelRef?.current && tooltipRef?.current) {
|
|
136
|
+
const { right: anchorRight, left: anchorLeft } = anchorElement.getBoundingClientRect();
|
|
137
|
+
const { right: labelRight, left: labelLeft } = labelRef.current.getBoundingClientRect();
|
|
138
|
+
const tooltipWidth = tooltipRef.current.offsetWidth;
|
|
139
|
+
const tooltipHeight = tooltipRef.current.offsetHeight;
|
|
140
|
+
|
|
141
|
+
const labelWidth = labelRef.current.offsetWidth;
|
|
142
|
+
|
|
143
|
+
let leftPosition =
|
|
144
|
+
tooltipWidth - labelWidth < 0 ? (tooltipWidth - labelWidth) / 2 : -(tooltipWidth - labelWidth) / 2;
|
|
145
|
+
|
|
146
|
+
if (tooltipWidth > labelWidth && anchorRight - labelRight < (tooltipWidth - labelWidth) / 2) {
|
|
147
|
+
leftPosition -= (tooltipWidth - labelWidth) / 2 - (anchorRight - labelRight) + 4;
|
|
148
|
+
} else if (tooltipWidth > labelWidth && labelLeft - anchorLeft < (tooltipWidth - labelWidth) / 2) {
|
|
149
|
+
leftPosition += (tooltipWidth - labelWidth) / 2 - (labelLeft - anchorLeft) + 4;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
top: -(tooltipHeight + 10),
|
|
154
|
+
left: leftPosition,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
return {};
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const getTooltipPosition = ({
|
|
161
|
+
position,
|
|
162
|
+
labelRef,
|
|
163
|
+
tooltipRef,
|
|
164
|
+
anchorRef,
|
|
165
|
+
}: {
|
|
166
|
+
position: `${positions}`;
|
|
167
|
+
labelRef: React.RefObject<HTMLDivElement | null>;
|
|
168
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
169
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
170
|
+
theme: Theme;
|
|
171
|
+
}) => {
|
|
172
|
+
if (labelRef?.current && tooltipRef?.current) {
|
|
173
|
+
const tooltipHeight = tooltipRef.current.offsetHeight;
|
|
174
|
+
const tooltipWidth = tooltipRef.current.offsetWidth;
|
|
175
|
+
|
|
176
|
+
const labelHeight = labelRef.current.offsetHeight;
|
|
177
|
+
const labelWidth = labelRef.current.offsetWidth;
|
|
178
|
+
|
|
179
|
+
switch (position) {
|
|
180
|
+
case positions.LEFT: {
|
|
181
|
+
return {
|
|
182
|
+
left: -(tooltipWidth + 10),
|
|
183
|
+
top: -(tooltipHeight / 2 - labelHeight / 2),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
case positions.RIGHT: {
|
|
187
|
+
return {
|
|
188
|
+
left: labelWidth + 10,
|
|
189
|
+
top: -(tooltipHeight / 2 - labelHeight / 2),
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
case positions.TOP: {
|
|
193
|
+
return getTooltipTopPosition({
|
|
194
|
+
labelRef,
|
|
195
|
+
tooltipRef,
|
|
196
|
+
anchorRef,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
case positions.BOTTOM: {
|
|
200
|
+
return getTooltipBottomPosition({
|
|
201
|
+
labelRef,
|
|
202
|
+
tooltipRef,
|
|
203
|
+
anchorRef,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
case positions.AUTO: {
|
|
207
|
+
return getTooltipAutoPositionStyle({
|
|
208
|
+
labelRef,
|
|
209
|
+
tooltipRef,
|
|
210
|
+
anchorRef,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
default: {
|
|
214
|
+
return {
|
|
215
|
+
left: labelWidth,
|
|
216
|
+
top: -(tooltipHeight / 2 - labelHeight / 2),
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export const getTooltipAutoArrowStyles = ({
|
|
224
|
+
labelRef,
|
|
225
|
+
tooltipRef,
|
|
226
|
+
anchorRef,
|
|
227
|
+
}: {
|
|
228
|
+
labelRef: React.RefObject<HTMLDivElement | null>;
|
|
229
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
230
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
231
|
+
}) => {
|
|
232
|
+
const anchorElement = anchorRef?.current || document.body;
|
|
233
|
+
if (tooltipRef?.current && labelRef?.current && anchorElement) {
|
|
234
|
+
const anchorElementStyleData = anchorElement.getBoundingClientRect();
|
|
235
|
+
const tooltipElementStyleData = tooltipRef.current.getBoundingClientRect();
|
|
236
|
+
|
|
237
|
+
const { right: anchorRight, bottom: anchorBottom } = anchorElementStyleData;
|
|
238
|
+
const { right: tooltipRight, bottom: tooltipBottom } = tooltipElementStyleData;
|
|
239
|
+
|
|
240
|
+
const labelHeight = labelRef.current.offsetHeight;
|
|
241
|
+
const labelWidth = labelRef.current.offsetWidth;
|
|
242
|
+
|
|
243
|
+
if (tooltipRight > anchorRight && tooltipBottom > anchorBottom) {
|
|
244
|
+
/* BOTTOM-RIGHT */
|
|
245
|
+
return {
|
|
246
|
+
top: -11,
|
|
247
|
+
left: labelWidth / 2,
|
|
248
|
+
};
|
|
249
|
+
} else if (tooltipBottom > anchorBottom) {
|
|
250
|
+
/* BOTTOM - CENTER */
|
|
251
|
+
return {
|
|
252
|
+
top: -11,
|
|
253
|
+
left: labelWidth / 2,
|
|
254
|
+
};
|
|
255
|
+
} else if (tooltipRight > anchorRight) {
|
|
256
|
+
/* RIGHT - CENTER */
|
|
257
|
+
return {
|
|
258
|
+
rotate: '180deg',
|
|
259
|
+
left: labelWidth / 2,
|
|
260
|
+
top: labelHeight + 5,
|
|
261
|
+
};
|
|
262
|
+
} else {
|
|
263
|
+
return {
|
|
264
|
+
rotate: '180deg',
|
|
265
|
+
left: labelWidth / 2,
|
|
266
|
+
top: labelHeight + 5,
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
return {};
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
export const getTooltipArrowStyles = ({
|
|
275
|
+
position,
|
|
276
|
+
labelRef,
|
|
277
|
+
tooltipRef,
|
|
278
|
+
anchorRef,
|
|
279
|
+
}: {
|
|
280
|
+
position: `${positions}`;
|
|
281
|
+
labelRef: React.RefObject<HTMLDivElement | null>;
|
|
282
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
283
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
284
|
+
theme: Theme;
|
|
285
|
+
}) => {
|
|
286
|
+
if (labelRef?.current && tooltipRef?.current) {
|
|
287
|
+
const labelWidth = labelRef.current.offsetWidth;
|
|
288
|
+
const labelHeight = labelRef.current.offsetHeight;
|
|
289
|
+
|
|
290
|
+
switch (position) {
|
|
291
|
+
case positions.TOP: {
|
|
292
|
+
return {
|
|
293
|
+
top: -11,
|
|
294
|
+
left: labelWidth / 2,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
case positions.BOTTOM: {
|
|
298
|
+
return {
|
|
299
|
+
rotate: '180deg',
|
|
300
|
+
top: labelHeight + 5,
|
|
301
|
+
left: labelWidth / 2,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
case positions.LEFT: {
|
|
305
|
+
return {
|
|
306
|
+
rotate: '-90deg',
|
|
307
|
+
top: 0,
|
|
308
|
+
left: -16,
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
case positions.RIGHT: {
|
|
312
|
+
return {
|
|
313
|
+
rotate: '90deg',
|
|
314
|
+
top: 0,
|
|
315
|
+
left: labelWidth - 1,
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
case positions.AUTO: {
|
|
319
|
+
return getTooltipAutoArrowStyles({ labelRef, tooltipRef, anchorRef });
|
|
320
|
+
}
|
|
321
|
+
default: {
|
|
322
|
+
return {
|
|
323
|
+
rotate: '90deg',
|
|
324
|
+
top: 0,
|
|
325
|
+
left: labelWidth,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return {};
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
export const getTooltipStyles = ({
|
|
335
|
+
borderSize,
|
|
336
|
+
position,
|
|
337
|
+
labelRef,
|
|
338
|
+
tooltipRef,
|
|
339
|
+
anchorRef,
|
|
340
|
+
theme,
|
|
341
|
+
}: {
|
|
342
|
+
borderSize: `${overlayBorderRadius}`;
|
|
343
|
+
position: `${positions}`;
|
|
344
|
+
labelRef: React.RefObject<HTMLDivElement | null>;
|
|
345
|
+
tooltipRef: React.RefObject<HTMLDivElement | null>;
|
|
346
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
347
|
+
theme: Theme;
|
|
348
|
+
}) => {
|
|
349
|
+
const tooltipPosition = getTooltipPosition({ position, labelRef, tooltipRef, anchorRef, theme }) || {};
|
|
350
|
+
return {
|
|
351
|
+
...tooltipPosition,
|
|
352
|
+
...getTooltipBorderSize(borderSize, theme),
|
|
353
|
+
};
|
|
354
|
+
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { StyledTooltipProps } from './type';
|
|
2
|
-
declare const StyledTooltip: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTooltipProps, never>;
|
|
3
|
-
export default StyledTooltip;
|
|
4
|
-
//# sourceMappingURL=StyledTooltip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StyledTooltip.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/StyledTooltip/StyledTooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE5C,QAAA,MAAM,aAAa,yHAOlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/StyledTooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { StyledTooltipProps } from './type';
|
|
2
|
-
import { Theme } from '@cleartrip/ct-design-theme';
|
|
3
|
-
export declare const getStyledTooltipStyles: ({ backgroundColor, width, theme, borderRadius, }: StyledTooltipProps & {
|
|
4
|
-
theme: Theme;
|
|
5
|
-
}) => import("styled-components").FlattenSimpleInterpolation;
|
|
6
|
-
//# sourceMappingURL=style.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/StyledTooltip/style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,eAAO,MAAM,sBAAsB;WAKF,KAAK;4DAarC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/StyledTooltip/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { StyledTooltipArrowProps } from './type';
|
|
2
|
-
declare const StyledTooltipArrow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTooltipArrowProps, never>;
|
|
3
|
-
export default StyledTooltipArrow;
|
|
4
|
-
//# sourceMappingURL=StyledTooltipArrow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StyledTooltipArrow.d.ts","sourceRoot":"","sources":["../../../packages/components/Tooltip/src/TooltipArrow/StyledTooltipArrow/StyledTooltipArrow.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEjD,QAAA,MAAM,kBAAkB,8HAOvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Tooltip/src/TooltipArrow/StyledTooltipArrow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
import { StyledTooltipArrowProps } from './type';
|
|
3
|
-
import { Theme } from '@cleartrip/ct-design-theme';
|
|
4
|
-
export declare const getStyledTooltipArrowStyles: ({ theme, transform, marginLeft, marginRight, }: StyledTooltipArrowProps & {
|
|
5
|
-
theme: Theme;
|
|
6
|
-
}) => CSSObject;
|
|
7
|
-
//# sourceMappingURL=style.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../packages/components/Tooltip/src/TooltipArrow/StyledTooltipArrow/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,eAAO,MAAM,2BAA2B;WAKF,KAAK;MAAK,SAQ/C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../packages/components/Tooltip/src/TooltipArrow/StyledTooltipArrow/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,aAAa,CAAC;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipArrow.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/TooltipArrow/TooltipArrow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAG3C,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAS7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/TooltipArrow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ArrowDirectionType } from '../type';
|
|
2
|
-
export declare const arrowStyle: (arrowPosition: ArrowDirectionType) => {
|
|
3
|
-
transform: string;
|
|
4
|
-
marginRight?: undefined;
|
|
5
|
-
marginLeft?: undefined;
|
|
6
|
-
} | {
|
|
7
|
-
marginRight: string;
|
|
8
|
-
transform: string;
|
|
9
|
-
marginLeft?: undefined;
|
|
10
|
-
} | {
|
|
11
|
-
marginLeft: string;
|
|
12
|
-
transform: string;
|
|
13
|
-
marginRight?: undefined;
|
|
14
|
-
};
|
|
15
|
-
export declare const getTooltipArrowStyles: ({ arrowPosition }: {
|
|
16
|
-
arrowPosition: ArrowDirectionType;
|
|
17
|
-
}) => {
|
|
18
|
-
transform: string;
|
|
19
|
-
marginRight?: undefined;
|
|
20
|
-
marginLeft?: undefined;
|
|
21
|
-
} | {
|
|
22
|
-
marginRight: string;
|
|
23
|
-
transform: string;
|
|
24
|
-
marginLeft?: undefined;
|
|
25
|
-
} | {
|
|
26
|
-
marginLeft: string;
|
|
27
|
-
transform: string;
|
|
28
|
-
marginRight?: undefined;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=style.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/TooltipArrow/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7D,eAAO,MAAM,UAAU,kBAAmB,kBAAkB;;;;;;;;;;;;CA8B3D,CAAC;AAEF,eAAO,MAAM,qBAAqB;mBAAwC,kBAAkB;;;;;;;;;;;;;CAI3F,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ArrowDirectionType } from '../type';
|
|
2
|
-
import { TooltipArrowStyleConfigProps } from '@cleartrip/ct-design-types';
|
|
3
|
-
export interface TooltipArrowProps {
|
|
4
|
-
arrowPosition: ArrowDirectionType;
|
|
5
|
-
styleConfig?: TooltipArrowStyleConfigProps;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../packages/components/Tooltip/src/TooltipArrow/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAE1E,MAAM,WAAW,iBAAiB;IACjC,aAAa,EAAE,kBAAkB,CAAC;IAClC,WAAW,CAAC,EAAE,4BAA4B,CAAA;CAC1C"}
|