@zendeskgarden/react-tooltips 9.0.0-next.9 → 9.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/dist/esm/elements/Paragraph.js +1 -1
- package/dist/esm/elements/Title.js +1 -1
- package/dist/esm/styled/StyledParagraph.js +2 -5
- package/dist/esm/styled/StyledTitle.js +2 -5
- package/dist/esm/styled/StyledTooltip.js +63 -29
- package/dist/esm/styled/StyledTooltipWrapper.js +0 -4
- package/dist/index.cjs.js +66 -41
- package/dist/typings/elements/Tooltip.d.ts +1 -24
- package/dist/typings/elements/utils.d.ts +1 -1
- package/dist/typings/styled/StyledTooltipWrapper.d.ts +1 -1
- package/package.json +7 -7
|
@@ -13,6 +13,6 @@ import '../styled/StyledTooltipWrapper.js';
|
|
|
13
13
|
const Paragraph = forwardRef((props, ref) => React.createElement(StyledParagraph, Object.assign({
|
|
14
14
|
ref: ref
|
|
15
15
|
}, props)));
|
|
16
|
-
Paragraph.displayName = 'Paragraph';
|
|
16
|
+
Paragraph.displayName = 'Tooltip.Paragraph';
|
|
17
17
|
|
|
18
18
|
export { Paragraph };
|
|
@@ -5,18 +5,15 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { retrieveComponentStyles
|
|
8
|
+
import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
10
|
const COMPONENT_ID = 'tooltip.paragraph';
|
|
11
11
|
const StyledParagraph = styled.p.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.1.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledParagraph",
|
|
16
16
|
componentId: "sc-wuqkfc-0"
|
|
17
17
|
})(["margin:0;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
-
StyledParagraph.defaultProps = {
|
|
19
|
-
theme: DEFAULT_THEME
|
|
20
|
-
};
|
|
21
18
|
|
|
22
19
|
export { StyledParagraph };
|
|
@@ -5,18 +5,15 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { retrieveComponentStyles
|
|
8
|
+
import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
10
|
const COMPONENT_ID = 'tooltip.title';
|
|
11
11
|
const StyledTitle = styled.strong.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.1.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledTitle",
|
|
16
16
|
componentId: "sc-vnjcvz-0"
|
|
17
17
|
})(["display:none;margin:0;font-weight:", ";", ";"], props => props.theme.fontWeights.semibold, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
-
StyledTitle.defaultProps = {
|
|
19
|
-
theme: DEFAULT_THEME
|
|
20
|
-
};
|
|
21
18
|
|
|
22
19
|
export { StyledTitle };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
|
-
import { retrieveComponentStyles,
|
|
8
|
+
import { retrieveComponentStyles, getLineHeight, arrowStyles, getArrowPosition, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { StyledParagraph } from './StyledParagraph.js';
|
|
10
10
|
import { StyledTitle } from './StyledTitle.js';
|
|
11
11
|
|
|
@@ -14,7 +14,6 @@ const sizeStyles = _ref => {
|
|
|
14
14
|
let {
|
|
15
15
|
theme,
|
|
16
16
|
size,
|
|
17
|
-
type,
|
|
18
17
|
placement,
|
|
19
18
|
hasArrow
|
|
20
19
|
} = _ref;
|
|
@@ -55,25 +54,28 @@ const sizeStyles = _ref => {
|
|
|
55
54
|
titleDisplay = 'block';
|
|
56
55
|
}
|
|
57
56
|
let arrowSize;
|
|
58
|
-
let
|
|
57
|
+
let arrowShift;
|
|
59
58
|
if (hasArrow) {
|
|
60
|
-
if (size === 'small'
|
|
59
|
+
if (size === 'small') {
|
|
61
60
|
arrowSize = margin;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
margin = `${theme.space.base * 2}px`;
|
|
67
|
-
arrowSize = margin;
|
|
68
|
-
} else if (size === 'extra-large') {
|
|
69
|
-
margin = `${theme.space.base * 3}px`;
|
|
70
|
-
arrowSize = `${theme.space.base * 2.5}px`;
|
|
61
|
+
if (['left-start', 'left-end', 'right-start', 'right-end'].includes(placement)) {
|
|
62
|
+
arrowShift = `-${theme.borderRadii.md}px`;
|
|
63
|
+
} else {
|
|
64
|
+
arrowShift = '0';
|
|
71
65
|
}
|
|
66
|
+
} else if (size === 'medium') {
|
|
67
|
+
arrowSize = margin;
|
|
68
|
+
} else if (size === 'large') {
|
|
69
|
+
margin = `${theme.space.base * 2}px`;
|
|
70
|
+
arrowSize = margin;
|
|
71
|
+
} else if (size === 'extra-large') {
|
|
72
|
+
margin = `${theme.space.base * 3}px`;
|
|
73
|
+
arrowSize = `${theme.space.base * 2.5}px`;
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
return css(["margin:", ";border-radius:", ";padding:", ";max-width:", ";line-height:", ";word-wrap:", ";white-space:", ";font-size:", ";overflow-wrap:", ";", ";", "{margin-top:", ";}", "{display:", ";}"], margin, borderRadius, padding, maxWidth, lineHeight, wordWrap, whiteSpace, fontSize, overflowWrap, hasArrow && arrowStyles(getArrowPosition(theme, placement), {
|
|
75
77
|
size: arrowSize,
|
|
76
|
-
|
|
78
|
+
shift: arrowShift
|
|
77
79
|
}), StyledParagraph, paragraphMarginTop, StyledTitle, titleDisplay);
|
|
78
80
|
};
|
|
79
81
|
const colorStyles = _ref2 => {
|
|
@@ -81,29 +83,61 @@ const colorStyles = _ref2 => {
|
|
|
81
83
|
theme,
|
|
82
84
|
type
|
|
83
85
|
} = _ref2;
|
|
84
|
-
let
|
|
85
|
-
let boxShadow
|
|
86
|
-
let backgroundColor
|
|
87
|
-
let color
|
|
86
|
+
let borderColor;
|
|
87
|
+
let boxShadow;
|
|
88
|
+
let backgroundColor;
|
|
89
|
+
let color;
|
|
88
90
|
let titleColor;
|
|
89
91
|
if (type === 'light') {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
backgroundColor = getColor({
|
|
93
|
+
theme,
|
|
94
|
+
variable: 'background.raised'
|
|
95
|
+
});
|
|
96
|
+
borderColor = getColor({
|
|
97
|
+
theme,
|
|
98
|
+
variable: 'border.default'
|
|
99
|
+
});
|
|
100
|
+
boxShadow = theme.shadows.lg(`${theme.space.base * (theme.colors.base === 'dark' ? 4 : 5)}px`, `${theme.space.base * (theme.colors.base === 'dark' ? 6 : 7)}px`, getColor({
|
|
101
|
+
variable: 'shadow.medium',
|
|
102
|
+
theme
|
|
103
|
+
}));
|
|
104
|
+
color = getColor({
|
|
105
|
+
theme,
|
|
106
|
+
variable: 'foreground.subtle'
|
|
107
|
+
});
|
|
108
|
+
titleColor = getColor({
|
|
109
|
+
theme,
|
|
110
|
+
variable: 'foreground.default'
|
|
111
|
+
});
|
|
112
|
+
} else {
|
|
113
|
+
backgroundColor = getColor({
|
|
114
|
+
theme,
|
|
115
|
+
hue: 'neutralHue',
|
|
116
|
+
light: {
|
|
117
|
+
shade: 900
|
|
118
|
+
},
|
|
119
|
+
dark: {
|
|
120
|
+
shade: 700
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
borderColor = backgroundColor;
|
|
124
|
+
boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, getColor({
|
|
125
|
+
variable: 'shadow.small',
|
|
126
|
+
theme
|
|
127
|
+
}));
|
|
128
|
+
color = getColor({
|
|
129
|
+
theme,
|
|
130
|
+
hue: 'white'
|
|
131
|
+
});
|
|
95
132
|
}
|
|
96
|
-
return css(["border:", ";box-shadow:", ";background-color:", ";color:", ";", "{color:", ";}"],
|
|
133
|
+
return css(["border-color:", ";box-shadow:", ";background-color:", ";color:", ";", "{color:", ";}"], borderColor, boxShadow, backgroundColor, color, StyledTitle, titleColor);
|
|
97
134
|
};
|
|
98
135
|
const StyledTooltip = styled.div.attrs({
|
|
99
136
|
'data-garden-id': COMPONENT_ID,
|
|
100
|
-
'data-garden-version': '9.
|
|
137
|
+
'data-garden-version': '9.1.0'
|
|
101
138
|
}).withConfig({
|
|
102
139
|
displayName: "StyledTooltip",
|
|
103
140
|
componentId: "sc-gzzjq4-0"
|
|
104
|
-
})(["display:inline-block;box-sizing:border-box;direction:", ";text-align:", ";font-weight:", ";", ";&[aria-hidden='true']{display:none;}", ";", ";"], props => props.theme.rtl && 'rtl', props => props.theme.rtl ? 'right' : 'left', props => props.theme.fontWeights.regular,
|
|
105
|
-
StyledTooltip.defaultProps = {
|
|
106
|
-
theme: DEFAULT_THEME
|
|
107
|
-
};
|
|
141
|
+
})(["display:inline-block;border:", ";box-sizing:border-box;direction:", ";text-align:", ";font-weight:", ";", ";&[aria-hidden='true']{display:none;}", ";", ";"], props => props.theme.borders.sm, props => props.theme.rtl && 'rtl', props => props.theme.rtl ? 'right' : 'left', props => props.theme.fontWeights.regular, sizeStyles, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
108
142
|
|
|
109
143
|
export { StyledTooltip };
|
|
@@ -5,14 +5,10 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
8
|
|
|
10
9
|
const StyledTooltipWrapper = styled.div.withConfig({
|
|
11
10
|
displayName: "StyledTooltipWrapper",
|
|
12
11
|
componentId: "sc-1b7q9q6-0"
|
|
13
12
|
})(["position:absolute;top:0;left:0;transition:opacity 10ms;opacity:1;z-index:", ";&[aria-hidden='true']{visibility:hidden;opacity:0;}"], props => props.zIndex);
|
|
14
|
-
StyledTooltipWrapper.defaultProps = {
|
|
15
|
-
theme: DEFAULT_THEME
|
|
16
|
-
};
|
|
17
13
|
|
|
18
14
|
export { StyledTooltipWrapper };
|
package/dist/index.cjs.js
CHANGED
|
@@ -25,33 +25,26 @@ var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
|
25
25
|
const COMPONENT_ID$2 = 'tooltip.paragraph';
|
|
26
26
|
const StyledParagraph = styled__default.default.p.attrs({
|
|
27
27
|
'data-garden-id': COMPONENT_ID$2,
|
|
28
|
-
'data-garden-version': '9.
|
|
28
|
+
'data-garden-version': '9.1.0'
|
|
29
29
|
}).withConfig({
|
|
30
30
|
displayName: "StyledParagraph",
|
|
31
31
|
componentId: "sc-wuqkfc-0"
|
|
32
32
|
})(["margin:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
33
|
-
StyledParagraph.defaultProps = {
|
|
34
|
-
theme: reactTheming.DEFAULT_THEME
|
|
35
|
-
};
|
|
36
33
|
|
|
37
34
|
const COMPONENT_ID$1 = 'tooltip.title';
|
|
38
35
|
const StyledTitle = styled__default.default.strong.attrs({
|
|
39
36
|
'data-garden-id': COMPONENT_ID$1,
|
|
40
|
-
'data-garden-version': '9.
|
|
37
|
+
'data-garden-version': '9.1.0'
|
|
41
38
|
}).withConfig({
|
|
42
39
|
displayName: "StyledTitle",
|
|
43
40
|
componentId: "sc-vnjcvz-0"
|
|
44
41
|
})(["display:none;margin:0;font-weight:", ";", ";"], props => props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
45
|
-
StyledTitle.defaultProps = {
|
|
46
|
-
theme: reactTheming.DEFAULT_THEME
|
|
47
|
-
};
|
|
48
42
|
|
|
49
43
|
const COMPONENT_ID = 'tooltip.tooltip';
|
|
50
44
|
const sizeStyles = _ref => {
|
|
51
45
|
let {
|
|
52
46
|
theme,
|
|
53
47
|
size,
|
|
54
|
-
type,
|
|
55
48
|
placement,
|
|
56
49
|
hasArrow
|
|
57
50
|
} = _ref;
|
|
@@ -92,25 +85,28 @@ const sizeStyles = _ref => {
|
|
|
92
85
|
titleDisplay = 'block';
|
|
93
86
|
}
|
|
94
87
|
let arrowSize;
|
|
95
|
-
let
|
|
88
|
+
let arrowShift;
|
|
96
89
|
if (hasArrow) {
|
|
97
|
-
if (size === 'small'
|
|
90
|
+
if (size === 'small') {
|
|
98
91
|
arrowSize = margin;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
margin = `${theme.space.base * 2}px`;
|
|
104
|
-
arrowSize = margin;
|
|
105
|
-
} else if (size === 'extra-large') {
|
|
106
|
-
margin = `${theme.space.base * 3}px`;
|
|
107
|
-
arrowSize = `${theme.space.base * 2.5}px`;
|
|
92
|
+
if (['left-start', 'left-end', 'right-start', 'right-end'].includes(placement)) {
|
|
93
|
+
arrowShift = `-${theme.borderRadii.md}px`;
|
|
94
|
+
} else {
|
|
95
|
+
arrowShift = '0';
|
|
108
96
|
}
|
|
97
|
+
} else if (size === 'medium') {
|
|
98
|
+
arrowSize = margin;
|
|
99
|
+
} else if (size === 'large') {
|
|
100
|
+
margin = `${theme.space.base * 2}px`;
|
|
101
|
+
arrowSize = margin;
|
|
102
|
+
} else if (size === 'extra-large') {
|
|
103
|
+
margin = `${theme.space.base * 3}px`;
|
|
104
|
+
arrowSize = `${theme.space.base * 2.5}px`;
|
|
109
105
|
}
|
|
110
106
|
}
|
|
111
107
|
return styled.css(["margin:", ";border-radius:", ";padding:", ";max-width:", ";line-height:", ";word-wrap:", ";white-space:", ";font-size:", ";overflow-wrap:", ";", ";", "{margin-top:", ";}", "{display:", ";}"], margin, borderRadius, padding, maxWidth, lineHeight, wordWrap, whiteSpace, fontSize, overflowWrap, hasArrow && reactTheming.arrowStyles(reactTheming.getArrowPosition(theme, placement), {
|
|
112
108
|
size: arrowSize,
|
|
113
|
-
|
|
109
|
+
shift: arrowShift
|
|
114
110
|
}), StyledParagraph, paragraphMarginTop, StyledTitle, titleDisplay);
|
|
115
111
|
};
|
|
116
112
|
const colorStyles = _ref2 => {
|
|
@@ -118,48 +114,77 @@ const colorStyles = _ref2 => {
|
|
|
118
114
|
theme,
|
|
119
115
|
type
|
|
120
116
|
} = _ref2;
|
|
121
|
-
let
|
|
122
|
-
let boxShadow
|
|
123
|
-
let backgroundColor
|
|
124
|
-
let color
|
|
117
|
+
let borderColor;
|
|
118
|
+
let boxShadow;
|
|
119
|
+
let backgroundColor;
|
|
120
|
+
let color;
|
|
125
121
|
let titleColor;
|
|
126
122
|
if (type === 'light') {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
123
|
+
backgroundColor = reactTheming.getColor({
|
|
124
|
+
theme,
|
|
125
|
+
variable: 'background.raised'
|
|
126
|
+
});
|
|
127
|
+
borderColor = reactTheming.getColor({
|
|
128
|
+
theme,
|
|
129
|
+
variable: 'border.default'
|
|
130
|
+
});
|
|
131
|
+
boxShadow = theme.shadows.lg(`${theme.space.base * (theme.colors.base === 'dark' ? 4 : 5)}px`, `${theme.space.base * (theme.colors.base === 'dark' ? 6 : 7)}px`, reactTheming.getColor({
|
|
132
|
+
variable: 'shadow.medium',
|
|
133
|
+
theme
|
|
134
|
+
}));
|
|
135
|
+
color = reactTheming.getColor({
|
|
136
|
+
theme,
|
|
137
|
+
variable: 'foreground.subtle'
|
|
138
|
+
});
|
|
139
|
+
titleColor = reactTheming.getColor({
|
|
140
|
+
theme,
|
|
141
|
+
variable: 'foreground.default'
|
|
142
|
+
});
|
|
143
|
+
} else {
|
|
144
|
+
backgroundColor = reactTheming.getColor({
|
|
145
|
+
theme,
|
|
146
|
+
hue: 'neutralHue',
|
|
147
|
+
light: {
|
|
148
|
+
shade: 900
|
|
149
|
+
},
|
|
150
|
+
dark: {
|
|
151
|
+
shade: 700
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
borderColor = backgroundColor;
|
|
155
|
+
boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, reactTheming.getColor({
|
|
156
|
+
variable: 'shadow.small',
|
|
157
|
+
theme
|
|
158
|
+
}));
|
|
159
|
+
color = reactTheming.getColor({
|
|
160
|
+
theme,
|
|
161
|
+
hue: 'white'
|
|
162
|
+
});
|
|
132
163
|
}
|
|
133
|
-
return styled.css(["border:", ";box-shadow:", ";background-color:", ";color:", ";", "{color:", ";}"],
|
|
164
|
+
return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";color:", ";", "{color:", ";}"], borderColor, boxShadow, backgroundColor, color, StyledTitle, titleColor);
|
|
134
165
|
};
|
|
135
166
|
const StyledTooltip = styled__default.default.div.attrs({
|
|
136
167
|
'data-garden-id': COMPONENT_ID,
|
|
137
|
-
'data-garden-version': '9.
|
|
168
|
+
'data-garden-version': '9.1.0'
|
|
138
169
|
}).withConfig({
|
|
139
170
|
displayName: "StyledTooltip",
|
|
140
171
|
componentId: "sc-gzzjq4-0"
|
|
141
|
-
})(["display:inline-block;box-sizing:border-box;direction:", ";text-align:", ";font-weight:", ";", ";&[aria-hidden='true']{display:none;}", ";", ";"], props => props.theme.rtl && 'rtl', props => props.theme.rtl ? 'right' : 'left', props => props.theme.fontWeights.regular,
|
|
142
|
-
StyledTooltip.defaultProps = {
|
|
143
|
-
theme: reactTheming.DEFAULT_THEME
|
|
144
|
-
};
|
|
172
|
+
})(["display:inline-block;border:", ";box-sizing:border-box;direction:", ";text-align:", ";font-weight:", ";", ";&[aria-hidden='true']{display:none;}", ";", ";"], props => props.theme.borders.sm, props => props.theme.rtl && 'rtl', props => props.theme.rtl ? 'right' : 'left', props => props.theme.fontWeights.regular, sizeStyles, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
145
173
|
|
|
146
174
|
const StyledTooltipWrapper = styled__default.default.div.withConfig({
|
|
147
175
|
displayName: "StyledTooltipWrapper",
|
|
148
176
|
componentId: "sc-1b7q9q6-0"
|
|
149
177
|
})(["position:absolute;top:0;left:0;transition:opacity 10ms;opacity:1;z-index:", ";&[aria-hidden='true']{visibility:hidden;opacity:0;}"], props => props.zIndex);
|
|
150
|
-
StyledTooltipWrapper.defaultProps = {
|
|
151
|
-
theme: reactTheming.DEFAULT_THEME
|
|
152
|
-
};
|
|
153
178
|
|
|
154
179
|
const Paragraph = React.forwardRef((props, ref) => React__default.default.createElement(StyledParagraph, Object.assign({
|
|
155
180
|
ref: ref
|
|
156
181
|
}, props)));
|
|
157
|
-
Paragraph.displayName = 'Paragraph';
|
|
182
|
+
Paragraph.displayName = 'Tooltip.Paragraph';
|
|
158
183
|
|
|
159
184
|
const Title = React.forwardRef((props, ref) => React__default.default.createElement(StyledTitle, Object.assign({
|
|
160
185
|
ref: ref
|
|
161
186
|
}, props)));
|
|
162
|
-
Title.displayName = 'Title';
|
|
187
|
+
Title.displayName = 'Tooltip.Title';
|
|
163
188
|
|
|
164
189
|
const PLACEMENT = ['auto', ...reactTheming.PLACEMENT];
|
|
165
190
|
const SIZE = ['small', 'medium', 'large', 'extra-large'];
|
|
@@ -37,30 +37,7 @@ export declare const TooltipComponent: {
|
|
|
37
37
|
/**
|
|
38
38
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
39
39
|
*/
|
|
40
|
-
export declare const Tooltip: {
|
|
41
|
-
({ id, delayMS, isInitialVisible, content, refKey, placement: _placement, children, hasArrow, size, type, appendToNode, zIndex, isVisible: externalIsVisible, onFocus, onBlur, ...props }: ITooltipProps): React.JSX.Element;
|
|
42
|
-
displayName: string;
|
|
43
|
-
propTypes: {
|
|
44
|
-
appendToNode: PropTypes.Requireable<any>;
|
|
45
|
-
hasArrow: PropTypes.Requireable<boolean>;
|
|
46
|
-
delayMS: PropTypes.Requireable<number>;
|
|
47
|
-
id: PropTypes.Requireable<string>;
|
|
48
|
-
content: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
49
|
-
placement: PropTypes.Requireable<"top" | "auto" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "end" | "end-top" | "end-bottom" | "start" | "start-top" | "start-bottom">;
|
|
50
|
-
size: PropTypes.Requireable<"small" | "medium" | "large" | "extra-large">;
|
|
51
|
-
type: PropTypes.Requireable<"light" | "dark">;
|
|
52
|
-
zIndex: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
53
|
-
isInitialVisible: PropTypes.Requireable<boolean>;
|
|
54
|
-
refKey: PropTypes.Requireable<string>;
|
|
55
|
-
};
|
|
56
|
-
defaultProps: {
|
|
57
|
-
hasArrow: boolean;
|
|
58
|
-
type: string;
|
|
59
|
-
placement: string;
|
|
60
|
-
delayMS: number;
|
|
61
|
-
refKey: string;
|
|
62
|
-
};
|
|
63
|
-
} & {
|
|
40
|
+
export declare const Tooltip: typeof TooltipComponent & {
|
|
64
41
|
Paragraph: typeof Paragraph;
|
|
65
42
|
Title: typeof Title;
|
|
66
43
|
};
|
|
@@ -13,4 +13,4 @@ import { ITooltipProps } from '../types';
|
|
|
13
13
|
*
|
|
14
14
|
* @returns A tooltip size.
|
|
15
15
|
*/
|
|
16
|
-
export declare const toSize: (size: ITooltipProps[
|
|
16
|
+
export declare const toSize: (size: ITooltipProps["size"], type: ITooltipProps["type"]) => "small" | "medium" | "large" | "extra-large";
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
export declare const StyledTooltipWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
-
zIndex?:
|
|
8
|
+
zIndex?: number | string;
|
|
9
9
|
}, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-tooltips",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Collection of components and render prop containers relating to Tooltips in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@floating-ui/react-dom": "^2.0.0",
|
|
25
|
-
"@zendeskgarden/container-tooltip": "^1.0.
|
|
25
|
+
"@zendeskgarden/container-tooltip": "^1.0.16",
|
|
26
26
|
"@zendeskgarden/container-utilities": "^2.0.0",
|
|
27
|
-
"polished": "^4.
|
|
27
|
+
"polished": "^4.3.1",
|
|
28
28
|
"prop-types": "^15.5.7",
|
|
29
29
|
"react-merge-refs": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@zendeskgarden/react-theming": ">=9.0.0-next",
|
|
33
|
-
"react": "
|
|
34
|
-
"react-dom": "
|
|
33
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
34
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
35
35
|
"styled-components": "^5.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@zendeskgarden/react-theming": "^9.
|
|
38
|
+
"@zendeskgarden/react-theming": "^9.1.0"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [
|
|
41
41
|
"components",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"zendeskgarden:src": "src/index.ts",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "a2842d18615ad057d75988fde4df5a0c79d2714e"
|
|
51
51
|
}
|