carbon-react 142.11.8 → 142.13.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/esm/__internal__/character-count/character-count.style.js +1 -1
- package/esm/__internal__/fieldset/fieldset.style.js +2 -2
- package/esm/__internal__/label/label.style.js +2 -2
- package/esm/__internal__/validation-message/validation-message.style.js +1 -1
- package/esm/components/accordion/accordion.style.js +2 -2
- package/esm/components/action-popover/action-popover.style.js +1 -1
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
- package/esm/components/badge/badge.style.js +1 -1
- package/esm/components/button/button.style.js +1 -1
- package/esm/components/button-toggle/button-toggle.style.js +1 -1
- package/esm/components/card/card-footer/card-footer.style.js +1 -1
- package/esm/components/content/content.style.js +1 -1
- package/esm/components/date/__internal__/date-picker/day-picker.style.js +1 -1
- package/esm/components/definition-list/dd/dd.component.js +1 -0
- package/esm/components/definition-list/definition-list.style.js +1 -1
- package/esm/components/definition-list/dl.component.js +1 -0
- package/esm/components/definition-list/dt/dt.component.js +1 -0
- package/esm/components/duelling-picklist/duelling-picklist.style.js +1 -1
- package/esm/components/fieldset/fieldset.style.js +2 -2
- package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
- package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
- package/esm/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
- package/esm/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
- package/esm/components/form/__internal__/form-summary.style.js +1 -1
- package/esm/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
- package/esm/components/link-preview/link-preview.style.js +1 -1
- package/esm/components/loader-spinner/loader-spinner.component.js +1 -1
- package/esm/components/loader-star/loader-star.component.js +1 -1
- package/esm/components/menu/menu-item/menu-item.style.js +2 -2
- package/esm/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
- package/esm/components/note/note.style.js +2 -2
- package/esm/components/pill/pill.style.js +1 -1
- package/esm/components/pod/pod.style.js +1 -1
- package/esm/components/popover-container/popover-container.component.js +19 -26
- package/esm/components/popover-container/popover-container.style.js +34 -30
- package/esm/components/portrait/portrait.style.js +1 -1
- package/esm/components/profile/profile.style.js +1 -1
- package/esm/components/progress-tracker/progress-tracker.style.js +1 -1
- package/esm/components/search/search.style.js +2 -2
- package/esm/components/select/__internal__/select-list/select-list.style.js +1 -1
- package/esm/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
- package/esm/components/select/__internal__/utils/matching-text.style.js +1 -1
- package/esm/components/select/option-row/option-row.style.js +1 -1
- package/esm/components/step-flow/step-flow-title/step-flow-title.component.js +1 -1
- package/esm/components/step-flow/step-flow.component.js +1 -1
- package/esm/components/switch/__internal__/switch-slider.style.js +1 -1
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +1 -1
- package/esm/components/text-editor/__internal__/editor-link/editor-link.style.js +1 -1
- package/esm/components/textbox/__internal__/prefix.style.js +1 -1
- package/esm/components/tile-select/tile-select.style.js +2 -2
- package/esm/components/time/time.style.js +1 -1
- package/esm/components/typography/typography.style.js +2 -2
- package/esm/components/vertical-menu/vertical-menu.style.js +2 -2
- package/esm/style/fonts.css +2 -2
- package/esm/style/global-style.js +6 -6
- package/lib/__internal__/character-count/character-count.style.js +1 -1
- package/lib/__internal__/fieldset/fieldset.style.js +2 -2
- package/lib/__internal__/label/label.style.js +2 -2
- package/lib/__internal__/validation-message/validation-message.style.js +1 -1
- package/lib/components/accordion/accordion.style.js +2 -2
- package/lib/components/action-popover/action-popover.style.js +1 -1
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
- package/lib/components/badge/badge.style.js +1 -1
- package/lib/components/button/button.style.js +1 -1
- package/lib/components/button-toggle/button-toggle.style.js +1 -1
- package/lib/components/card/card-footer/card-footer.style.js +1 -1
- package/lib/components/content/content.style.js +1 -1
- package/lib/components/date/__internal__/date-picker/day-picker.style.js +1 -1
- package/lib/components/definition-list/dd/dd.component.js +1 -0
- package/lib/components/definition-list/definition-list.style.js +1 -1
- package/lib/components/definition-list/dl.component.js +1 -0
- package/lib/components/definition-list/dt/dt.component.js +1 -0
- package/lib/components/duelling-picklist/duelling-picklist.style.js +1 -1
- package/lib/components/fieldset/fieldset.style.js +2 -2
- package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
- package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
- package/lib/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
- package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
- package/lib/components/form/__internal__/form-summary.style.js +1 -1
- package/lib/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
- package/lib/components/link-preview/link-preview.style.js +1 -1
- package/lib/components/loader-spinner/loader-spinner.component.js +1 -1
- package/lib/components/loader-star/loader-star.component.js +1 -1
- package/lib/components/menu/menu-item/menu-item.style.js +2 -2
- package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
- package/lib/components/note/note.style.js +2 -2
- package/lib/components/pill/pill.style.js +1 -1
- package/lib/components/pod/pod.style.js +1 -1
- package/lib/components/popover-container/popover-container.component.js +18 -25
- package/lib/components/popover-container/popover-container.style.js +36 -30
- package/lib/components/portrait/portrait.style.js +1 -1
- package/lib/components/profile/profile.style.js +1 -1
- package/lib/components/progress-tracker/progress-tracker.style.js +1 -1
- package/lib/components/search/search.style.js +2 -2
- package/lib/components/select/__internal__/select-list/select-list.style.js +1 -1
- package/lib/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
- package/lib/components/select/__internal__/utils/matching-text.style.js +1 -1
- package/lib/components/select/option-row/option-row.style.js +1 -1
- package/lib/components/step-flow/step-flow-title/step-flow-title.component.js +1 -1
- package/lib/components/step-flow/step-flow.component.js +1 -1
- package/lib/components/switch/__internal__/switch-slider.style.js +1 -1
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +1 -1
- package/lib/components/text-editor/__internal__/editor-link/editor-link.style.js +1 -1
- package/lib/components/textbox/__internal__/prefix.style.js +1 -1
- package/lib/components/tile-select/tile-select.style.js +2 -2
- package/lib/components/time/time.style.js +1 -1
- package/lib/components/typography/typography.style.js +2 -2
- package/lib/components/vertical-menu/vertical-menu.style.js +2 -2
- package/lib/style/fonts.css +2 -2
- package/lib/style/global-style.js +6 -6
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ const StyledLegendContent = styled.span`
|
|
|
26
26
|
content: "*";
|
|
27
27
|
line-height: 24px;
|
|
28
28
|
color: var(--colorsSemanticNegative500);
|
|
29
|
-
font-weight: var(--
|
|
29
|
+
font-weight: var(--fontWeights500);
|
|
30
30
|
margin-left: var(--spacing050);
|
|
31
31
|
position: relative;
|
|
32
32
|
top: 1px;
|
|
@@ -58,7 +58,7 @@ const StyledLegend = styled.legend`
|
|
|
58
58
|
align-items: center;
|
|
59
59
|
margin-bottom: var(--spacing100);
|
|
60
60
|
padding: 0;
|
|
61
|
-
font-weight: var(--
|
|
61
|
+
font-weight: var(--fontWeights500);
|
|
62
62
|
color: var(--colorsUtilityYin090);
|
|
63
63
|
${({
|
|
64
64
|
inline,
|
|
@@ -2,7 +2,7 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
const StyledLabel = styled.label`
|
|
3
3
|
color: var(--colorsUtilityYin090);
|
|
4
4
|
display: block;
|
|
5
|
-
font-weight: var(--
|
|
5
|
+
font-weight: var(--fontWeights500);
|
|
6
6
|
|
|
7
7
|
${({
|
|
8
8
|
isRequired
|
|
@@ -10,7 +10,7 @@ const StyledLabel = styled.label`
|
|
|
10
10
|
::after {
|
|
11
11
|
content: "*";
|
|
12
12
|
color: var(--colorsSemanticNegative500);
|
|
13
|
-
font-weight: var(--
|
|
13
|
+
font-weight: var(--fontWeights500);
|
|
14
14
|
margin-left: var(--spacing050);
|
|
15
15
|
}
|
|
16
16
|
`}
|
|
@@ -4,7 +4,7 @@ const StyledValidationMessage = styled.p`
|
|
|
4
4
|
isWarning
|
|
5
5
|
}) => css`
|
|
6
6
|
color: ${isWarning ? "var(--colorsSemanticCaution600)" : "var(--colorsSemanticNegative500)"};
|
|
7
|
-
font-weight: ${isWarning ? "normal" : "
|
|
7
|
+
font-weight: ${isWarning ? "normal" : "500"};
|
|
8
8
|
margin-top: 0px;
|
|
9
9
|
margin-bottom: 8px;
|
|
10
10
|
`}
|
|
@@ -53,7 +53,7 @@ const StyledAccordionTitle = styled.h3`
|
|
|
53
53
|
size,
|
|
54
54
|
variant
|
|
55
55
|
}) => size === "small" || variant === "subtle" ? "var(--fontSizes200)" : "var(--fontSizes400)"};
|
|
56
|
-
font-weight:
|
|
56
|
+
font-weight: 500;
|
|
57
57
|
line-height: 1;
|
|
58
58
|
user-select: none;
|
|
59
59
|
margin: 0;
|
|
@@ -161,7 +161,7 @@ const StyledAccordionTitleContainer = styled.div`
|
|
|
161
161
|
|
|
162
162
|
${buttonHeading && css`
|
|
163
163
|
box-sizing: border-box;
|
|
164
|
-
font-weight:
|
|
164
|
+
font-weight: 500;
|
|
165
165
|
text-decoration: none;
|
|
166
166
|
font-size: var(--fontSizes100);
|
|
167
167
|
min-height: var(--spacing500);
|
package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js
CHANGED
|
@@ -13,7 +13,7 @@ const StyledNavigationItem = styled.li`
|
|
|
13
13
|
color: var(--colorsUtilityYin090);
|
|
14
14
|
background-color: transparent;
|
|
15
15
|
border-left: var(--sizing050) solid var(--colorsActionMinor100);
|
|
16
|
-
font-weight:
|
|
16
|
+
font-weight: 500;
|
|
17
17
|
padding: 12px 24px;
|
|
18
18
|
border-top-right-radius: var(--borderRadius100);
|
|
19
19
|
border-bottom-right-radius: var(--borderRadius100);
|
|
@@ -263,7 +263,7 @@ const StyledDayPicker = styled.div`
|
|
|
263
263
|
border: none;
|
|
264
264
|
//font-family: var(--fontFamiliesDefault); font assets to be updated part of FE-4975
|
|
265
265
|
//font: var(--typographyDatePickerCalendarDateM); font assets to be updated part of FE-4975
|
|
266
|
-
font-weight: var(--
|
|
266
|
+
font-weight: var(--fontWeights500);
|
|
267
267
|
font-size: var(--fontSizes100);
|
|
268
268
|
line-height: var(--lineHeights500);
|
|
269
269
|
border-radius: var(--borderRadius400);
|
|
@@ -27,7 +27,7 @@ const StyledLegend = styled.legend`
|
|
|
27
27
|
align-items: center;
|
|
28
28
|
margin-bottom: 32px;
|
|
29
29
|
font-size: 20px;
|
|
30
|
-
font-weight: var(--
|
|
30
|
+
font-weight: var(--fontWeights500);
|
|
31
31
|
color: var(--colorsUtilityYin090);
|
|
32
32
|
line-height: 24px;
|
|
33
33
|
margin-right: 4px;
|
|
@@ -39,7 +39,7 @@ const StyledLegend = styled.legend`
|
|
|
39
39
|
content: "*";
|
|
40
40
|
line-height: 24px;
|
|
41
41
|
color: var(--colorsSemanticNegative500);
|
|
42
|
-
font-weight: var(--
|
|
42
|
+
font-weight: var(--fontWeights500);
|
|
43
43
|
margin-left: var(--spacing100);
|
|
44
44
|
position: relative;
|
|
45
45
|
top: 1px;
|
|
@@ -23,7 +23,7 @@ export const LoaderSpinner = ({
|
|
|
23
23
|
const renderSpinnerLabel = /*#__PURE__*/React.createElement(StyledLabel, {
|
|
24
24
|
"data-role": "visible-label",
|
|
25
25
|
variant: "span",
|
|
26
|
-
fontWeight: "
|
|
26
|
+
fontWeight: "400",
|
|
27
27
|
size: size,
|
|
28
28
|
color: isLabelDark ? "var(--colorsUtilityYin090);" : "var(--colorsActionMajorYang100);",
|
|
29
29
|
fontSize: size === "extra-large" ? "var(--sizing200)" : "var(--sizing175)",
|
|
@@ -16,7 +16,7 @@ const LoaderStar = ({
|
|
|
16
16
|
const label = /*#__PURE__*/React.createElement(StyledLabel, {
|
|
17
17
|
"data-role": "visible-label",
|
|
18
18
|
variant: "span",
|
|
19
|
-
fontWeight: "
|
|
19
|
+
fontWeight: "400"
|
|
20
20
|
}, loaderStarLabel || locale.loaderStar.loading());
|
|
21
21
|
return /*#__PURE__*/React.createElement(StyledLoaderStarWrapper, _extends({
|
|
22
22
|
role: "status"
|
|
@@ -99,7 +99,7 @@ const StyledMenuItemWrapper = styled.a.attrs({
|
|
|
99
99
|
display: flex;
|
|
100
100
|
align-items: center;
|
|
101
101
|
font-size: 14px;
|
|
102
|
-
font-weight:
|
|
102
|
+
font-weight: 500;
|
|
103
103
|
min-height: 40px;
|
|
104
104
|
position: relative;
|
|
105
105
|
box-shadow: none;
|
|
@@ -250,7 +250,7 @@ const StyledMenuItemWrapper = styled.a.attrs({
|
|
|
250
250
|
${StyledLink} a,
|
|
251
251
|
${StyledLink} button,
|
|
252
252
|
${StyledLink} [data-component="icon"] {
|
|
253
|
-
font-weight:
|
|
253
|
+
font-weight: 500;
|
|
254
254
|
text-decoration: none;
|
|
255
255
|
${!hasInput && `color: ${menuConfigVariants[menuType].color};`}
|
|
256
256
|
}
|
|
@@ -41,7 +41,7 @@ const StyledInlineControl = styled.div`
|
|
|
41
41
|
min-width: fit-content;
|
|
42
42
|
`;
|
|
43
43
|
const StyledTitle = styled.header`
|
|
44
|
-
font-weight:
|
|
44
|
+
font-weight: 700;
|
|
45
45
|
font-size: 16px;
|
|
46
46
|
line-height: 21px;
|
|
47
47
|
padding-bottom: 16px;
|
|
@@ -49,7 +49,7 @@ const StyledTitle = styled.header`
|
|
|
49
49
|
const StyledFooterContent = styled.div`
|
|
50
50
|
line-height: 21px;
|
|
51
51
|
align-items: baseline;
|
|
52
|
-
font-weight:
|
|
52
|
+
font-weight: 500;
|
|
53
53
|
|
|
54
54
|
${({
|
|
55
55
|
hasName
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState, useMemo } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import {
|
|
4
|
+
import { CSSTransition } from "react-transition-group";
|
|
5
5
|
import { flip, offset } from "@floating-ui/dom";
|
|
6
6
|
import useMediaQuery from "../../hooks/useMediaQuery";
|
|
7
7
|
import { PopoverContainerWrapperStyle, PopoverContainerHeaderStyle, PopoverContainerContentStyle, PopoverContainerCloseIcon, PopoverContainerTitleStyle, PopoverContainerOpenIcon } from "./popover-container.style";
|
|
@@ -95,15 +95,12 @@ export const PopoverContainer = ({
|
|
|
95
95
|
const reduceMotion = !useMediaQuery("screen and (prefers-reduced-motion: no-preference)");
|
|
96
96
|
const popoverMiddleware = usePopoverMiddleware(shouldCoverButton);
|
|
97
97
|
const closePopover = useCallback(ev => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (isOpen && openButtonRef.current) {
|
|
105
|
-
openButtonRef.current.focus();
|
|
106
|
-
}
|
|
98
|
+
/* istanbul ignore else */
|
|
99
|
+
if (!isControlled) setIsOpenInternal(false);
|
|
100
|
+
onClose?.(ev);
|
|
101
|
+
|
|
102
|
+
/* istanbul ignore else */
|
|
103
|
+
if (isOpen) openButtonRef.current?.focus();
|
|
107
104
|
}, [isControlled, isOpen, onClose]);
|
|
108
105
|
const handleEscKey = useCallback(ev => {
|
|
109
106
|
const eventIsFromSelectInput = Events.composedPath(ev).find(element => {
|
|
@@ -120,12 +117,11 @@ export const PopoverContainer = ({
|
|
|
120
117
|
};
|
|
121
118
|
}, [handleEscKey]);
|
|
122
119
|
const handleOpenButtonClick = e => {
|
|
120
|
+
/* istanbul ignore else */
|
|
123
121
|
if (!isControlled) setIsOpenInternal(!isOpen);
|
|
124
122
|
|
|
125
123
|
// We want the open button to close the popover if it is already open
|
|
126
|
-
if (!isOpen)
|
|
127
|
-
if (onOpen) onOpen(e);
|
|
128
|
-
} else if (onClose) onClose(e);
|
|
124
|
+
if (!isOpen) onOpen?.(e);else onClose?.(e);
|
|
129
125
|
};
|
|
130
126
|
const handleCloseButtonClick = e => {
|
|
131
127
|
closePopover(e);
|
|
@@ -152,14 +148,13 @@ export const PopoverContainer = ({
|
|
|
152
148
|
};
|
|
153
149
|
const handleClickAway = e => {
|
|
154
150
|
if (!isControlled) setIsOpenInternal(false);
|
|
155
|
-
if (
|
|
151
|
+
if (isOpen) onClose?.(e);
|
|
156
152
|
};
|
|
157
153
|
const handleClick = useClickAwayListener(handleClickAway, "mousedown");
|
|
158
154
|
const [isAnimationComplete, setIsAnimationComplete] = useState(false);
|
|
159
|
-
const popover =
|
|
155
|
+
const popover = () => /*#__PURE__*/React.createElement(PopoverContainerContentStyle, _extends({
|
|
160
156
|
"data-element": "popover-container-content",
|
|
161
157
|
role: "dialog",
|
|
162
|
-
animationState: state,
|
|
163
158
|
"aria-labelledby": popoverContainerId,
|
|
164
159
|
"aria-label": containerAriaLabel,
|
|
165
160
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -171,36 +166,34 @@ export const PopoverContainer = ({
|
|
|
171
166
|
id: popoverContainerId,
|
|
172
167
|
"data-element": "popover-container-title"
|
|
173
168
|
}, title), renderCloseComponent(renderCloseComponentProps)), children);
|
|
174
|
-
const childrenToRender =
|
|
169
|
+
const childrenToRender = () => shouldCoverButton ? /*#__PURE__*/React.createElement(ModalContext.Provider, {
|
|
175
170
|
value: {
|
|
176
171
|
isAnimationComplete
|
|
177
172
|
}
|
|
178
173
|
}, /*#__PURE__*/React.createElement(FocusTrap, {
|
|
179
174
|
wrapperRef: popoverContentNodeRef,
|
|
180
175
|
isOpen: isOpen
|
|
181
|
-
}, popover(
|
|
176
|
+
}, popover())) : popover();
|
|
182
177
|
return /*#__PURE__*/React.createElement(PopoverContainerWrapperStyle, {
|
|
183
178
|
"data-component": "popover-container",
|
|
184
179
|
onMouseDown: handleClick
|
|
185
180
|
}, /*#__PURE__*/React.createElement("div", {
|
|
186
181
|
ref: popoverReference
|
|
187
|
-
}, renderOpenComponent(renderOpenComponentProps)), /*#__PURE__*/React.createElement(
|
|
188
|
-
|
|
182
|
+
}, renderOpenComponent(renderOpenComponentProps)), /*#__PURE__*/React.createElement(CSSTransition, {
|
|
183
|
+
nodeRef: popoverContentNodeRef,
|
|
189
184
|
timeout: {
|
|
190
|
-
exit: 300
|
|
185
|
+
exit: disableAnimation ? 0 : 300
|
|
191
186
|
},
|
|
192
|
-
|
|
193
|
-
mountOnEnter: true,
|
|
187
|
+
in: isOpen,
|
|
194
188
|
unmountOnExit: true,
|
|
195
|
-
nodeRef: popoverContentNodeRef,
|
|
196
189
|
onEntered: shouldCoverButton ? /* istanbul ignore next */() => setIsAnimationComplete(true) : undefined,
|
|
197
190
|
onExiting: shouldCoverButton ? /* istanbul ignore next */() => setIsAnimationComplete(false) : undefined
|
|
198
|
-
},
|
|
191
|
+
}, /*#__PURE__*/React.createElement(Popover, {
|
|
199
192
|
reference: popoverReference,
|
|
200
193
|
placement: position === "right" ? "bottom-start" : "bottom-end",
|
|
201
194
|
popoverStrategy: disableAnimation || reduceMotion ? "fixed" : "absolute",
|
|
202
195
|
middleware: popoverMiddleware,
|
|
203
196
|
childRefOverride: popoverContentNodeRef
|
|
204
|
-
}, childrenToRender(
|
|
197
|
+
}, childrenToRender())));
|
|
205
198
|
};
|
|
206
199
|
export default PopoverContainer;
|
|
@@ -1,35 +1,8 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
import { padding } from "styled-system";
|
|
3
3
|
import { baseTheme } from "../../style/themes";
|
|
4
4
|
import IconButton from "../icon-button";
|
|
5
5
|
import StyledIcon from "../icon/icon.style";
|
|
6
|
-
function animationToRender({
|
|
7
|
-
animationState,
|
|
8
|
-
disableAnimation
|
|
9
|
-
}) {
|
|
10
|
-
if (disableAnimation) return "opacity: 1;";
|
|
11
|
-
switch (animationState) {
|
|
12
|
-
case "entering":
|
|
13
|
-
return `
|
|
14
|
-
opacity: 0;
|
|
15
|
-
transform: translateY(-8px);
|
|
16
|
-
`;
|
|
17
|
-
case "entered":
|
|
18
|
-
return `
|
|
19
|
-
opacity: 1;
|
|
20
|
-
transform: translateY(0);
|
|
21
|
-
transition: all 0.3s cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
22
|
-
`;
|
|
23
|
-
case "exiting":
|
|
24
|
-
return `
|
|
25
|
-
opacity: 0;
|
|
26
|
-
transform: translateY(-8px);
|
|
27
|
-
transition: all 0.3s cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
28
|
-
`;
|
|
29
|
-
default:
|
|
30
|
-
return "opacity: 0;";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
6
|
const PopoverContainerWrapperStyle = styled.div`
|
|
34
7
|
position: relative;
|
|
35
8
|
display: inline-block;
|
|
@@ -53,7 +26,38 @@ const PopoverContainerContentStyle = styled.div`
|
|
|
53
26
|
theme
|
|
54
27
|
}) => theme.zIndex.popover};
|
|
55
28
|
|
|
56
|
-
${
|
|
29
|
+
${({
|
|
30
|
+
disableAnimation
|
|
31
|
+
}) => disableAnimation ? css`
|
|
32
|
+
opacity: 1;
|
|
33
|
+
transform: none;
|
|
34
|
+
` : css`
|
|
35
|
+
&.enter {
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transform: translateY(-8px);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.enter-done {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
transform: translateY(0);
|
|
43
|
+
transition-property: opacity, transform;
|
|
44
|
+
transition-duration: 0.3s;
|
|
45
|
+
transition-timing-function: cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.exit {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
transform: translateY(-8px);
|
|
51
|
+
transition-property: opacity, transform;
|
|
52
|
+
transition-duration: 0.3s;
|
|
53
|
+
transition-timing-function: cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.exit-done {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
transform: translateY(0);
|
|
59
|
+
}
|
|
60
|
+
`}
|
|
57
61
|
|
|
58
62
|
:focus {
|
|
59
63
|
outline: none;
|
|
@@ -75,7 +79,7 @@ const PopoverContainerCloseIcon = styled(IconButton)`
|
|
|
75
79
|
`;
|
|
76
80
|
const PopoverContainerTitleStyle = styled.div`
|
|
77
81
|
font-size: 16px;
|
|
78
|
-
font-weight:
|
|
82
|
+
font-weight: 500;
|
|
79
83
|
`;
|
|
80
84
|
PopoverContainerContentStyle.defaultProps = {
|
|
81
85
|
theme: baseTheme
|
|
@@ -5,7 +5,7 @@ import Icon from "../icon";
|
|
|
5
5
|
import { PORTRAIT_SIZE_PARAMS } from "./portrait.config";
|
|
6
6
|
import profileConfigSizes from "../profile/profile.config";
|
|
7
7
|
export const StyledPortraitInitials = styled.div`
|
|
8
|
-
font-weight:
|
|
8
|
+
font-weight: 500;
|
|
9
9
|
font-size: ${({
|
|
10
10
|
size
|
|
11
11
|
}) => profileConfigSizes[size].initialSize};
|
|
@@ -6,7 +6,7 @@ import profileConfigSizes from "./profile.config";
|
|
|
6
6
|
import Link from "../link";
|
|
7
7
|
import { StyledPortraitContainer } from "../portrait/portrait.style";
|
|
8
8
|
const ProfileNameStyle = styled.span`
|
|
9
|
-
font-weight:
|
|
9
|
+
font-weight: 500;
|
|
10
10
|
font-size: ${({
|
|
11
11
|
size = "M"
|
|
12
12
|
}) => profileConfigSizes[size].nameSize};
|
|
@@ -26,7 +26,7 @@ const StyledSearch = styled.div`
|
|
|
26
26
|
background-color: transparent;
|
|
27
27
|
display: inline-flex;
|
|
28
28
|
font-size: var(--fontSize100);
|
|
29
|
-
font-weight:
|
|
29
|
+
font-weight: 500;
|
|
30
30
|
|
|
31
31
|
${!showSearchButton && css`
|
|
32
32
|
border-bottom: var(--spacing025) solid ${variantColor};
|
|
@@ -107,7 +107,7 @@ const StyledSearch = styled.div`
|
|
|
107
107
|
|
|
108
108
|
flex: 1;
|
|
109
109
|
font-size: var(--fontSize100);
|
|
110
|
-
font-weight:
|
|
110
|
+
font-weight: 500;
|
|
111
111
|
padding-bottom: var(--spacing025);
|
|
112
112
|
padding-top: 1px;
|
|
113
113
|
cursor: pointer;
|