carbon-react 119.6.2 → 119.6.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/esm/__internal__/sticky-footer/sticky-footer.component.js +2 -2
- package/esm/__internal__/utils/helpers/events/events.js +1 -1
- package/esm/__spec_helper__/test-utils.js +1 -0
- package/esm/components/badge/badge.style.js +1 -1
- package/esm/components/form/form.style.js +14 -21
- package/esm/components/menu/__internal__/submenu/submenu.component.js +11 -8
- package/esm/components/menu/menu-item/menu-item.style.js +1 -1
- package/esm/components/pill/pill.style.js +17 -21
- package/esm/components/portrait/portrait.config.js +1 -1
- package/esm/components/simple-color-picker/simple-color/simple-color.style.js +3 -3
- package/esm/components/tooltip/tooltip.component.js +3 -1
- package/esm/style/themes/medium/index.js +1 -0
- package/esm/style/themes/small/index.js +1 -0
- package/lib/__internal__/sticky-footer/sticky-footer.component.js +1 -1
- package/lib/__internal__/utils/helpers/events/events.js +1 -1
- package/lib/__spec_helper__/test-utils.js +1 -0
- package/lib/components/badge/badge.style.js +1 -1
- package/lib/components/form/form.style.js +14 -21
- package/lib/components/menu/__internal__/submenu/submenu.component.js +11 -8
- package/lib/components/menu/menu-item/menu-item.style.js +1 -1
- package/lib/components/pill/pill.style.js +17 -21
- package/lib/components/portrait/portrait.config.js +1 -1
- package/lib/components/simple-color-picker/simple-color/simple-color.style.js +3 -3
- package/lib/components/tooltip/tooltip.component.js +3 -1
- package/lib/style/themes/medium/index.js +1 -0
- package/lib/style/themes/small/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useEffect, useRef, useState, useCallback } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import throttle from "lodash/throttle";
|
|
5
5
|
import StyledStickyFooter from "./sticky-footer.style";
|
|
@@ -26,7 +26,7 @@ const StickyFooter = _ref => {
|
|
|
26
26
|
fullyScrolled = content.scrollHeight - content.scrollTop - stickyOffset <= content.clientHeight;
|
|
27
27
|
}
|
|
28
28
|
setIsSticky(!fullyScrolled);
|
|
29
|
-
}, SCROLL_THROTTLE), []);
|
|
29
|
+
}, SCROLL_THROTTLE), [containerRef]);
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
const content = containerRef.current;
|
|
32
32
|
content?.addEventListener("scroll", checkFooterPosition, false);
|
|
@@ -108,7 +108,7 @@ const Events = {
|
|
|
108
108
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
|
|
109
109
|
*/
|
|
110
110
|
composedPath: ev => {
|
|
111
|
-
return ev.detail
|
|
111
|
+
return ev.detail?.enzymeTestingTarget && composedPath(ev) || ev.composedPath && ev.composedPath() || composedPath(ev);
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
export default Events;
|
|
@@ -82,29 +82,22 @@ export const StyledForm = styled.form`
|
|
|
82
82
|
height: ${height};
|
|
83
83
|
`;
|
|
84
84
|
}}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
let {
|
|
88
|
-
fieldSpacing
|
|
89
|
-
} = _ref5;
|
|
90
|
-
return css`
|
|
91
|
-
${StyledTextarea}
|
|
85
|
+
|
|
86
|
+
${StyledTextarea}
|
|
92
87
|
${StyledFormField} {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
`;
|
|
96
|
-
}}
|
|
88
|
+
margin-bottom: 4px;
|
|
89
|
+
}
|
|
97
90
|
|
|
98
91
|
${StyledSearch} ${StyledFormField} {
|
|
99
92
|
margin-bottom: 0px;
|
|
100
93
|
}
|
|
101
94
|
|
|
102
|
-
${
|
|
95
|
+
${_ref5 => {
|
|
103
96
|
let {
|
|
104
97
|
stickyFooter,
|
|
105
98
|
isInModal,
|
|
106
99
|
isInSidebar
|
|
107
|
-
} =
|
|
100
|
+
} = _ref5;
|
|
108
101
|
return stickyFooter && css`
|
|
109
102
|
display: flex;
|
|
110
103
|
flex-direction: column;
|
|
@@ -122,16 +115,16 @@ export const StyledForm = styled.form`
|
|
|
122
115
|
`;
|
|
123
116
|
export const StyledRightButtons = styled.div`
|
|
124
117
|
display: flex;
|
|
125
|
-
${
|
|
118
|
+
${_ref6 => {
|
|
126
119
|
let {
|
|
127
120
|
fullWidthButtons
|
|
128
|
-
} =
|
|
121
|
+
} = _ref6;
|
|
129
122
|
return fullWidthButtons ? `margin-left: 0px;` : `margin-left: 16px;`;
|
|
130
123
|
}}
|
|
131
|
-
${
|
|
124
|
+
${_ref7 => {
|
|
132
125
|
let {
|
|
133
126
|
buttonAlignment
|
|
134
|
-
} =
|
|
127
|
+
} = _ref7;
|
|
135
128
|
return buttonAlignment === "left" && "flex-grow: 1";
|
|
136
129
|
}};
|
|
137
130
|
|
|
@@ -146,16 +139,16 @@ export const StyledFullWidthButtons = styled.div`
|
|
|
146
139
|
export const StyledLeftButtons = styled.div`
|
|
147
140
|
display: flex;
|
|
148
141
|
justify-content: flex-end;
|
|
149
|
-
${
|
|
142
|
+
${_ref8 => {
|
|
150
143
|
let {
|
|
151
144
|
fullWidthButtons
|
|
152
|
-
} =
|
|
145
|
+
} = _ref8;
|
|
153
146
|
return fullWidthButtons ? `margin-right: 0px;` : `margin-right: 16px;`;
|
|
154
147
|
}}
|
|
155
|
-
${
|
|
148
|
+
${_ref9 => {
|
|
156
149
|
let {
|
|
157
150
|
buttonAlignment
|
|
158
|
-
} =
|
|
151
|
+
} = _ref9;
|
|
159
152
|
return buttonAlignment === "right" && "flex-grow: 1";
|
|
160
153
|
}};
|
|
161
154
|
|
|
@@ -176,14 +176,17 @@ const Submenu = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
176
176
|
} else {
|
|
177
177
|
setCharacterString("");
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
const eventIsFromInput = Events.composedPath(event).find(p => p.getAttribute("data-element") === "input" || p.getAttribute("data-element") === "input-icon-toggle");
|
|
180
|
+
if (!eventIsFromInput) {
|
|
181
|
+
if (Events.isEnterKey(event)) {
|
|
182
|
+
/* timeout enforces that the "closeSubmenu" method will be run after
|
|
183
|
+
the browser navigates to the specified href of the menu-item. */
|
|
184
|
+
setTimeout(() => closeSubmenu(), 0);
|
|
185
|
+
}
|
|
186
|
+
if (href && Events.isEnterKey(event)) {
|
|
187
|
+
closeSubmenu();
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
187
190
|
}
|
|
188
191
|
if (nextIndex !== index) {
|
|
189
192
|
setSubmenuFocusId(submenuItemIds[nextIndex]);
|
|
@@ -57,9 +57,9 @@ const StyledPill = styled.span`
|
|
|
57
57
|
console.error(e);
|
|
58
58
|
}
|
|
59
59
|
return css`
|
|
60
|
-
font-size:
|
|
60
|
+
font-size: 12px;
|
|
61
61
|
letter-spacing: 0.7px;
|
|
62
|
-
font-weight:
|
|
62
|
+
font-weight: 700;
|
|
63
63
|
position: relative;
|
|
64
64
|
display: inline-flex;
|
|
65
65
|
text-align: center;
|
|
@@ -90,7 +90,7 @@ const StyledPill = styled.span`
|
|
|
90
90
|
${size === "S" && css`
|
|
91
91
|
min-height: 16px;
|
|
92
92
|
line-height: 16px;
|
|
93
|
-
font-size:
|
|
93
|
+
font-size: 12px;
|
|
94
94
|
|
|
95
95
|
${theme.roundedCornersOptOut && css`
|
|
96
96
|
border-radius: 12px;
|
|
@@ -104,7 +104,7 @@ const StyledPill = styled.span`
|
|
|
104
104
|
${size === "M" && css`
|
|
105
105
|
min-height: 20px;
|
|
106
106
|
line-height: 20px;
|
|
107
|
-
font-size:
|
|
107
|
+
font-size: 14px;
|
|
108
108
|
|
|
109
109
|
${theme.roundedCornersOptOut && css`
|
|
110
110
|
border-radius: 12px;
|
|
@@ -130,8 +130,8 @@ const StyledPill = styled.span`
|
|
|
130
130
|
`}
|
|
131
131
|
|
|
132
132
|
${size === "XL" && css`
|
|
133
|
-
min-height:
|
|
134
|
-
line-height:
|
|
133
|
+
min-height: 28px;
|
|
134
|
+
line-height: 28px;
|
|
135
135
|
font-size: 16px;
|
|
136
136
|
|
|
137
137
|
${theme.roundedCornersOptOut && css`
|
|
@@ -189,8 +189,6 @@ const StyledPill = styled.span`
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
${StyledIcon} {
|
|
192
|
-
font-size: 12px;
|
|
193
|
-
padding: 0 4px;
|
|
194
192
|
height: unset;
|
|
195
193
|
width: unset;
|
|
196
194
|
color: ${contentColor};
|
|
@@ -209,52 +207,50 @@ const StyledPill = styled.span`
|
|
|
209
207
|
}
|
|
210
208
|
|
|
211
209
|
${size === "S" && css`
|
|
212
|
-
padding: 0
|
|
210
|
+
padding: 0 22px 0 8px;
|
|
213
211
|
|
|
214
212
|
button {
|
|
215
213
|
padding: 0;
|
|
216
|
-
line-height:
|
|
217
|
-
|
|
214
|
+
line-height: 16px;
|
|
215
|
+
top: -2px;
|
|
216
|
+
${addStyleToPillIcon("16px")}
|
|
218
217
|
}
|
|
219
218
|
`}
|
|
220
219
|
|
|
221
220
|
${size === "M" && css`
|
|
222
|
-
padding: 0
|
|
221
|
+
padding: 0 28px 0 8px;
|
|
223
222
|
|
|
224
223
|
button {
|
|
225
224
|
width: 24px;
|
|
226
225
|
padding: 0;
|
|
227
226
|
line-height: 15px;
|
|
228
|
-
${addStyleToPillIcon("10px")}
|
|
229
227
|
}
|
|
230
228
|
`}
|
|
231
229
|
|
|
232
230
|
${size === "L" && css`
|
|
233
|
-
padding: 0
|
|
231
|
+
padding: 0 32px 0 8px;
|
|
234
232
|
|
|
235
233
|
button {
|
|
236
234
|
width: 28px;
|
|
237
235
|
padding: 0;
|
|
238
236
|
line-height: 16px;
|
|
239
|
-
${addStyleToPillIcon("12px")}
|
|
240
237
|
}
|
|
241
238
|
`}
|
|
242
239
|
|
|
243
240
|
${size === "XL" && css`
|
|
244
|
-
padding: 0
|
|
241
|
+
padding: 0 36px 0 12px;
|
|
245
242
|
|
|
246
243
|
button {
|
|
247
244
|
width: 32px;
|
|
248
245
|
padding: 0;
|
|
249
246
|
line-height: 18px;
|
|
250
|
-
${addStyleToPillIcon("13px")}
|
|
251
247
|
}
|
|
252
248
|
`}
|
|
253
249
|
`}
|
|
254
250
|
|
|
255
251
|
${!isDeletable && css`
|
|
256
252
|
${size === "S" && css`
|
|
257
|
-
padding: 0
|
|
253
|
+
padding: 0 8px;
|
|
258
254
|
|
|
259
255
|
button {
|
|
260
256
|
padding: 0;
|
|
@@ -262,7 +258,7 @@ const StyledPill = styled.span`
|
|
|
262
258
|
`}
|
|
263
259
|
|
|
264
260
|
${size === "M" && css`
|
|
265
|
-
padding: 0
|
|
261
|
+
padding: 0 8px;
|
|
266
262
|
|
|
267
263
|
button {
|
|
268
264
|
width: 24px;
|
|
@@ -271,7 +267,7 @@ const StyledPill = styled.span`
|
|
|
271
267
|
`}
|
|
272
268
|
|
|
273
269
|
${size === "L" && css`
|
|
274
|
-
padding: 0
|
|
270
|
+
padding: 0 8px;
|
|
275
271
|
|
|
276
272
|
button {
|
|
277
273
|
width: 28px;
|
|
@@ -280,7 +276,7 @@ const StyledPill = styled.span`
|
|
|
280
276
|
`}
|
|
281
277
|
|
|
282
278
|
${size === "XL" && css`
|
|
283
|
-
padding: 0
|
|
279
|
+
padding: 0 12px;
|
|
284
280
|
|
|
285
281
|
button {
|
|
286
282
|
width: 32px;
|
|
@@ -76,13 +76,13 @@ const getIconColor = color => {
|
|
|
76
76
|
return "var(--colorsUtilityYin090)";
|
|
77
77
|
};
|
|
78
78
|
export const StyledTickIcon = styled(Icon)`
|
|
79
|
-
height:
|
|
80
|
-
width:
|
|
79
|
+
height: 20px;
|
|
80
|
+
width: 20px;
|
|
81
81
|
pointer-events: none;
|
|
82
82
|
display: block;
|
|
83
83
|
|
|
84
84
|
&::before {
|
|
85
|
-
font-size:
|
|
85
|
+
font-size: 20px;
|
|
86
86
|
color: ${_ref3 => {
|
|
87
87
|
let {
|
|
88
88
|
color
|
|
@@ -141,7 +141,9 @@ const Tooltip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
141
141
|
const handleTargetRef = useCallback(node => {
|
|
142
142
|
reference(target || node);
|
|
143
143
|
targetInternalRef.current = node;
|
|
144
|
-
preserveRef(
|
|
144
|
+
preserveRef(
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
|
+
children.ref, node);
|
|
145
147
|
}, [reference, children, target]);
|
|
146
148
|
const handleFloatingRef = useCallback(node => {
|
|
147
149
|
floating(node);
|
|
@@ -35,7 +35,7 @@ const StickyFooter = _ref => {
|
|
|
35
35
|
fullyScrolled = content.scrollHeight - content.scrollTop - stickyOffset <= content.clientHeight;
|
|
36
36
|
}
|
|
37
37
|
setIsSticky(!fullyScrolled);
|
|
38
|
-
}, SCROLL_THROTTLE), []);
|
|
38
|
+
}, SCROLL_THROTTLE), [containerRef]);
|
|
39
39
|
(0, _react.useEffect)(() => {
|
|
40
40
|
const content = containerRef.current;
|
|
41
41
|
content?.addEventListener("scroll", checkFooterPosition, false);
|
|
@@ -114,7 +114,7 @@ const Events = {
|
|
|
114
114
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
|
|
115
115
|
*/
|
|
116
116
|
composedPath: ev => {
|
|
117
|
-
return ev.detail
|
|
117
|
+
return ev.detail?.enzymeTestingTarget && (0, _composedPath.default)(ev) || ev.composedPath && ev.composedPath() || (0, _composedPath.default)(ev);
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
120
|
var _default = Events;
|
|
@@ -93,29 +93,22 @@ const StyledForm = _styledComponents.default.form`
|
|
|
93
93
|
height: ${height};
|
|
94
94
|
`;
|
|
95
95
|
}}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
let {
|
|
99
|
-
fieldSpacing
|
|
100
|
-
} = _ref5;
|
|
101
|
-
return (0, _styledComponents.css)`
|
|
102
|
-
${_textarea.default}
|
|
96
|
+
|
|
97
|
+
${_textarea.default}
|
|
103
98
|
${_formField.default} {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
`;
|
|
107
|
-
}}
|
|
99
|
+
margin-bottom: 4px;
|
|
100
|
+
}
|
|
108
101
|
|
|
109
102
|
${_search.default} ${_formField.default} {
|
|
110
103
|
margin-bottom: 0px;
|
|
111
104
|
}
|
|
112
105
|
|
|
113
|
-
${
|
|
106
|
+
${_ref5 => {
|
|
114
107
|
let {
|
|
115
108
|
stickyFooter,
|
|
116
109
|
isInModal,
|
|
117
110
|
isInSidebar
|
|
118
|
-
} =
|
|
111
|
+
} = _ref5;
|
|
119
112
|
return stickyFooter && (0, _styledComponents.css)`
|
|
120
113
|
display: flex;
|
|
121
114
|
flex-direction: column;
|
|
@@ -134,16 +127,16 @@ const StyledForm = _styledComponents.default.form`
|
|
|
134
127
|
exports.StyledForm = StyledForm;
|
|
135
128
|
const StyledRightButtons = _styledComponents.default.div`
|
|
136
129
|
display: flex;
|
|
137
|
-
${
|
|
130
|
+
${_ref6 => {
|
|
138
131
|
let {
|
|
139
132
|
fullWidthButtons
|
|
140
|
-
} =
|
|
133
|
+
} = _ref6;
|
|
141
134
|
return fullWidthButtons ? `margin-left: 0px;` : `margin-left: 16px;`;
|
|
142
135
|
}}
|
|
143
|
-
${
|
|
136
|
+
${_ref7 => {
|
|
144
137
|
let {
|
|
145
138
|
buttonAlignment
|
|
146
|
-
} =
|
|
139
|
+
} = _ref7;
|
|
147
140
|
return buttonAlignment === "left" && "flex-grow: 1";
|
|
148
141
|
}};
|
|
149
142
|
|
|
@@ -160,16 +153,16 @@ exports.StyledFullWidthButtons = StyledFullWidthButtons;
|
|
|
160
153
|
const StyledLeftButtons = _styledComponents.default.div`
|
|
161
154
|
display: flex;
|
|
162
155
|
justify-content: flex-end;
|
|
163
|
-
${
|
|
156
|
+
${_ref8 => {
|
|
164
157
|
let {
|
|
165
158
|
fullWidthButtons
|
|
166
|
-
} =
|
|
159
|
+
} = _ref8;
|
|
167
160
|
return fullWidthButtons ? `margin-right: 0px;` : `margin-right: 16px;`;
|
|
168
161
|
}}
|
|
169
|
-
${
|
|
162
|
+
${_ref9 => {
|
|
170
163
|
let {
|
|
171
164
|
buttonAlignment
|
|
172
|
-
} =
|
|
165
|
+
} = _ref9;
|
|
173
166
|
return buttonAlignment === "right" && "flex-grow: 1";
|
|
174
167
|
}};
|
|
175
168
|
|
|
@@ -185,14 +185,17 @@ const Submenu = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
185
185
|
} else {
|
|
186
186
|
setCharacterString("");
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
const eventIsFromInput = _events.default.composedPath(event).find(p => p.getAttribute("data-element") === "input" || p.getAttribute("data-element") === "input-icon-toggle");
|
|
189
|
+
if (!eventIsFromInput) {
|
|
190
|
+
if (_events.default.isEnterKey(event)) {
|
|
191
|
+
/* timeout enforces that the "closeSubmenu" method will be run after
|
|
192
|
+
the browser navigates to the specified href of the menu-item. */
|
|
193
|
+
setTimeout(() => closeSubmenu(), 0);
|
|
194
|
+
}
|
|
195
|
+
if (href && _events.default.isEnterKey(event)) {
|
|
196
|
+
closeSubmenu();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
196
199
|
}
|
|
197
200
|
if (nextIndex !== index) {
|
|
198
201
|
setSubmenuFocusId(submenuItemIds[nextIndex]);
|
|
@@ -66,9 +66,9 @@ const StyledPill = _styledComponents.default.span`
|
|
|
66
66
|
console.error(e);
|
|
67
67
|
}
|
|
68
68
|
return (0, _styledComponents.css)`
|
|
69
|
-
font-size:
|
|
69
|
+
font-size: 12px;
|
|
70
70
|
letter-spacing: 0.7px;
|
|
71
|
-
font-weight:
|
|
71
|
+
font-weight: 700;
|
|
72
72
|
position: relative;
|
|
73
73
|
display: inline-flex;
|
|
74
74
|
text-align: center;
|
|
@@ -99,7 +99,7 @@ const StyledPill = _styledComponents.default.span`
|
|
|
99
99
|
${size === "S" && (0, _styledComponents.css)`
|
|
100
100
|
min-height: 16px;
|
|
101
101
|
line-height: 16px;
|
|
102
|
-
font-size:
|
|
102
|
+
font-size: 12px;
|
|
103
103
|
|
|
104
104
|
${theme.roundedCornersOptOut && (0, _styledComponents.css)`
|
|
105
105
|
border-radius: 12px;
|
|
@@ -113,7 +113,7 @@ const StyledPill = _styledComponents.default.span`
|
|
|
113
113
|
${size === "M" && (0, _styledComponents.css)`
|
|
114
114
|
min-height: 20px;
|
|
115
115
|
line-height: 20px;
|
|
116
|
-
font-size:
|
|
116
|
+
font-size: 14px;
|
|
117
117
|
|
|
118
118
|
${theme.roundedCornersOptOut && (0, _styledComponents.css)`
|
|
119
119
|
border-radius: 12px;
|
|
@@ -139,8 +139,8 @@ const StyledPill = _styledComponents.default.span`
|
|
|
139
139
|
`}
|
|
140
140
|
|
|
141
141
|
${size === "XL" && (0, _styledComponents.css)`
|
|
142
|
-
min-height:
|
|
143
|
-
line-height:
|
|
142
|
+
min-height: 28px;
|
|
143
|
+
line-height: 28px;
|
|
144
144
|
font-size: 16px;
|
|
145
145
|
|
|
146
146
|
${theme.roundedCornersOptOut && (0, _styledComponents.css)`
|
|
@@ -198,8 +198,6 @@ const StyledPill = _styledComponents.default.span`
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
${_icon.default} {
|
|
201
|
-
font-size: 12px;
|
|
202
|
-
padding: 0 4px;
|
|
203
201
|
height: unset;
|
|
204
202
|
width: unset;
|
|
205
203
|
color: ${contentColor};
|
|
@@ -218,52 +216,50 @@ const StyledPill = _styledComponents.default.span`
|
|
|
218
216
|
}
|
|
219
217
|
|
|
220
218
|
${size === "S" && (0, _styledComponents.css)`
|
|
221
|
-
padding: 0
|
|
219
|
+
padding: 0 22px 0 8px;
|
|
222
220
|
|
|
223
221
|
button {
|
|
224
222
|
padding: 0;
|
|
225
|
-
line-height:
|
|
226
|
-
|
|
223
|
+
line-height: 16px;
|
|
224
|
+
top: -2px;
|
|
225
|
+
${addStyleToPillIcon("16px")}
|
|
227
226
|
}
|
|
228
227
|
`}
|
|
229
228
|
|
|
230
229
|
${size === "M" && (0, _styledComponents.css)`
|
|
231
|
-
padding: 0
|
|
230
|
+
padding: 0 28px 0 8px;
|
|
232
231
|
|
|
233
232
|
button {
|
|
234
233
|
width: 24px;
|
|
235
234
|
padding: 0;
|
|
236
235
|
line-height: 15px;
|
|
237
|
-
${addStyleToPillIcon("10px")}
|
|
238
236
|
}
|
|
239
237
|
`}
|
|
240
238
|
|
|
241
239
|
${size === "L" && (0, _styledComponents.css)`
|
|
242
|
-
padding: 0
|
|
240
|
+
padding: 0 32px 0 8px;
|
|
243
241
|
|
|
244
242
|
button {
|
|
245
243
|
width: 28px;
|
|
246
244
|
padding: 0;
|
|
247
245
|
line-height: 16px;
|
|
248
|
-
${addStyleToPillIcon("12px")}
|
|
249
246
|
}
|
|
250
247
|
`}
|
|
251
248
|
|
|
252
249
|
${size === "XL" && (0, _styledComponents.css)`
|
|
253
|
-
padding: 0
|
|
250
|
+
padding: 0 36px 0 12px;
|
|
254
251
|
|
|
255
252
|
button {
|
|
256
253
|
width: 32px;
|
|
257
254
|
padding: 0;
|
|
258
255
|
line-height: 18px;
|
|
259
|
-
${addStyleToPillIcon("13px")}
|
|
260
256
|
}
|
|
261
257
|
`}
|
|
262
258
|
`}
|
|
263
259
|
|
|
264
260
|
${!isDeletable && (0, _styledComponents.css)`
|
|
265
261
|
${size === "S" && (0, _styledComponents.css)`
|
|
266
|
-
padding: 0
|
|
262
|
+
padding: 0 8px;
|
|
267
263
|
|
|
268
264
|
button {
|
|
269
265
|
padding: 0;
|
|
@@ -271,7 +267,7 @@ const StyledPill = _styledComponents.default.span`
|
|
|
271
267
|
`}
|
|
272
268
|
|
|
273
269
|
${size === "M" && (0, _styledComponents.css)`
|
|
274
|
-
padding: 0
|
|
270
|
+
padding: 0 8px;
|
|
275
271
|
|
|
276
272
|
button {
|
|
277
273
|
width: 24px;
|
|
@@ -280,7 +276,7 @@ const StyledPill = _styledComponents.default.span`
|
|
|
280
276
|
`}
|
|
281
277
|
|
|
282
278
|
${size === "L" && (0, _styledComponents.css)`
|
|
283
|
-
padding: 0
|
|
279
|
+
padding: 0 8px;
|
|
284
280
|
|
|
285
281
|
button {
|
|
286
282
|
width: 28px;
|
|
@@ -289,7 +285,7 @@ const StyledPill = _styledComponents.default.span`
|
|
|
289
285
|
`}
|
|
290
286
|
|
|
291
287
|
${size === "XL" && (0, _styledComponents.css)`
|
|
292
|
-
padding: 0
|
|
288
|
+
padding: 0 12px;
|
|
293
289
|
|
|
294
290
|
button {
|
|
295
291
|
width: 32px;
|
|
@@ -88,13 +88,13 @@ const getIconColor = color => {
|
|
|
88
88
|
return "var(--colorsUtilityYin090)";
|
|
89
89
|
};
|
|
90
90
|
const StyledTickIcon = (0, _styledComponents.default)(_icon.default)`
|
|
91
|
-
height:
|
|
92
|
-
width:
|
|
91
|
+
height: 20px;
|
|
92
|
+
width: 20px;
|
|
93
93
|
pointer-events: none;
|
|
94
94
|
display: block;
|
|
95
95
|
|
|
96
96
|
&::before {
|
|
97
|
-
font-size:
|
|
97
|
+
font-size: 20px;
|
|
98
98
|
color: ${_ref3 => {
|
|
99
99
|
let {
|
|
100
100
|
color
|
|
@@ -150,7 +150,9 @@ const Tooltip = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
150
150
|
const handleTargetRef = (0, _react.useCallback)(node => {
|
|
151
151
|
reference(target || node);
|
|
152
152
|
targetInternalRef.current = node;
|
|
153
|
-
preserveRef(
|
|
153
|
+
preserveRef(
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
155
|
+
children.ref, node);
|
|
154
156
|
}, [reference, children, target]);
|
|
155
157
|
const handleFloatingRef = (0, _react.useCallback)(node => {
|
|
156
158
|
floating(node);
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _ = require("..");
|
|
8
|
+
/* eslint-disable no-console */
|
|
8
9
|
var _default = (() => {
|
|
9
10
|
console.warn(`"Medium Theme" has been renamed to "Aegean".
|
|
10
11
|
All references to that theme should be updated to:
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _ = require("..");
|
|
8
|
+
/* eslint-disable no-console */
|
|
8
9
|
var _default = (() => {
|
|
9
10
|
console.warn(`"Small Theme" has been renamed to "Mint".
|
|
10
11
|
All references to that theme should be updated to:
|