carbon-react 142.12.0 → 142.13.1

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.
Files changed (117) hide show
  1. package/esm/__internal__/character-count/character-count.style.js +1 -1
  2. package/esm/__internal__/fieldset/fieldset.style.js +2 -2
  3. package/esm/__internal__/label/label.style.js +2 -2
  4. package/esm/__internal__/validation-message/validation-message.style.js +1 -1
  5. package/esm/components/accordion/accordion.style.js +2 -2
  6. package/esm/components/action-popover/action-popover.style.js +1 -1
  7. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
  8. package/esm/components/badge/badge.style.js +1 -1
  9. package/esm/components/button/button.style.js +1 -1
  10. package/esm/components/button-toggle/button-toggle.style.js +1 -1
  11. package/esm/components/card/card-footer/card-footer.style.js +1 -1
  12. package/esm/components/content/content.style.js +1 -1
  13. package/esm/components/date/__internal__/date-picker/day-picker.style.js +1 -1
  14. package/esm/components/definition-list/dd/dd.component.js +1 -0
  15. package/esm/components/definition-list/definition-list.style.js +1 -1
  16. package/esm/components/definition-list/dl.component.js +1 -0
  17. package/esm/components/definition-list/dt/dt.component.js +1 -0
  18. package/esm/components/duelling-picklist/duelling-picklist.style.js +1 -1
  19. package/esm/components/fieldset/fieldset.style.js +2 -2
  20. package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
  21. package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
  22. package/esm/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
  23. package/esm/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
  24. package/esm/components/form/__internal__/form-summary.style.js +17 -17
  25. package/esm/components/form/form.component.js +5 -19
  26. package/esm/components/form/form.style.d.ts +0 -1
  27. package/esm/components/form/form.style.js +8 -21
  28. package/esm/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
  29. package/esm/components/link-preview/link-preview.style.js +1 -1
  30. package/esm/components/loader-spinner/loader-spinner.component.js +1 -1
  31. package/esm/components/loader-star/loader-star.component.js +1 -1
  32. package/esm/components/menu/menu-item/menu-item.style.js +2 -2
  33. package/esm/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
  34. package/esm/components/note/note.style.js +2 -2
  35. package/esm/components/pill/pill.style.js +1 -1
  36. package/esm/components/pod/pod.style.js +1 -1
  37. package/esm/components/popover-container/popover-container.component.js +19 -26
  38. package/esm/components/popover-container/popover-container.style.js +34 -30
  39. package/esm/components/portrait/portrait.style.js +1 -1
  40. package/esm/components/profile/profile.style.js +1 -1
  41. package/esm/components/progress-tracker/progress-tracker.style.js +1 -1
  42. package/esm/components/search/search.style.js +2 -2
  43. package/esm/components/select/__internal__/select-list/select-list.style.js +1 -1
  44. package/esm/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
  45. package/esm/components/select/__internal__/utils/matching-text.style.js +1 -1
  46. package/esm/components/select/option-row/option-row.style.js +1 -1
  47. package/esm/components/step-flow/step-flow-title/step-flow-title.component.js +1 -1
  48. package/esm/components/step-flow/step-flow.component.js +1 -1
  49. package/esm/components/switch/__internal__/switch-slider.style.js +1 -1
  50. package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +1 -1
  51. package/esm/components/text-editor/__internal__/editor-link/editor-link.style.js +1 -1
  52. package/esm/components/textbox/__internal__/prefix.style.js +1 -1
  53. package/esm/components/tile-select/tile-select.style.js +2 -2
  54. package/esm/components/time/time.style.js +1 -1
  55. package/esm/components/typography/typography.style.js +2 -2
  56. package/esm/components/vertical-menu/vertical-menu.style.js +2 -2
  57. package/esm/style/fonts.css +2 -2
  58. package/esm/style/global-style.js +6 -6
  59. package/lib/__internal__/character-count/character-count.style.js +1 -1
  60. package/lib/__internal__/fieldset/fieldset.style.js +2 -2
  61. package/lib/__internal__/label/label.style.js +2 -2
  62. package/lib/__internal__/validation-message/validation-message.style.js +1 -1
  63. package/lib/components/accordion/accordion.style.js +2 -2
  64. package/lib/components/action-popover/action-popover.style.js +1 -1
  65. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
  66. package/lib/components/badge/badge.style.js +1 -1
  67. package/lib/components/button/button.style.js +1 -1
  68. package/lib/components/button-toggle/button-toggle.style.js +1 -1
  69. package/lib/components/card/card-footer/card-footer.style.js +1 -1
  70. package/lib/components/content/content.style.js +1 -1
  71. package/lib/components/date/__internal__/date-picker/day-picker.style.js +1 -1
  72. package/lib/components/definition-list/dd/dd.component.js +1 -0
  73. package/lib/components/definition-list/definition-list.style.js +1 -1
  74. package/lib/components/definition-list/dl.component.js +1 -0
  75. package/lib/components/definition-list/dt/dt.component.js +1 -0
  76. package/lib/components/duelling-picklist/duelling-picklist.style.js +1 -1
  77. package/lib/components/fieldset/fieldset.style.js +2 -2
  78. package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
  79. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
  80. package/lib/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
  81. package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
  82. package/lib/components/form/__internal__/form-summary.style.js +17 -17
  83. package/lib/components/form/form.component.js +4 -18
  84. package/lib/components/form/form.style.d.ts +0 -1
  85. package/lib/components/form/form.style.js +9 -22
  86. package/lib/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
  87. package/lib/components/link-preview/link-preview.style.js +1 -1
  88. package/lib/components/loader-spinner/loader-spinner.component.js +1 -1
  89. package/lib/components/loader-star/loader-star.component.js +1 -1
  90. package/lib/components/menu/menu-item/menu-item.style.js +2 -2
  91. package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
  92. package/lib/components/note/note.style.js +2 -2
  93. package/lib/components/pill/pill.style.js +1 -1
  94. package/lib/components/pod/pod.style.js +1 -1
  95. package/lib/components/popover-container/popover-container.component.js +18 -25
  96. package/lib/components/popover-container/popover-container.style.js +36 -30
  97. package/lib/components/portrait/portrait.style.js +1 -1
  98. package/lib/components/profile/profile.style.js +1 -1
  99. package/lib/components/progress-tracker/progress-tracker.style.js +1 -1
  100. package/lib/components/search/search.style.js +2 -2
  101. package/lib/components/select/__internal__/select-list/select-list.style.js +1 -1
  102. package/lib/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
  103. package/lib/components/select/__internal__/utils/matching-text.style.js +1 -1
  104. package/lib/components/select/option-row/option-row.style.js +1 -1
  105. package/lib/components/step-flow/step-flow-title/step-flow-title.component.js +1 -1
  106. package/lib/components/step-flow/step-flow.component.js +1 -1
  107. package/lib/components/switch/__internal__/switch-slider.style.js +1 -1
  108. package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +1 -1
  109. package/lib/components/text-editor/__internal__/editor-link/editor-link.style.js +1 -1
  110. package/lib/components/textbox/__internal__/prefix.style.js +1 -1
  111. package/lib/components/tile-select/tile-select.style.js +2 -2
  112. package/lib/components/time/time.style.js +1 -1
  113. package/lib/components/typography/typography.style.js +2 -2
  114. package/lib/components/vertical-menu/vertical-menu.style.js +2 -2
  115. package/lib/style/fonts.css +2 -2
  116. package/lib/style/global-style.js +6 -6
  117. package/package.json +1 -1
@@ -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 { Transition } from "react-transition-group";
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
- if (!isControlled) {
99
- setIsOpenInternal(false);
100
- }
101
- if (onClose) {
102
- onClose(ev);
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 (onClose && isOpen) onClose(e);
151
+ if (isOpen) onClose?.(e);
156
152
  };
157
153
  const handleClick = useClickAwayListener(handleClickAway, "mousedown");
158
154
  const [isAnimationComplete, setIsAnimationComplete] = useState(false);
159
- const popover = state => /*#__PURE__*/React.createElement(PopoverContainerContentStyle, _extends({
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 = state => shouldCoverButton ? /*#__PURE__*/React.createElement(ModalContext.Provider, {
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(state))) : popover(state);
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(Transition, {
188
- in: isOpen,
182
+ }, renderOpenComponent(renderOpenComponentProps)), /*#__PURE__*/React.createElement(CSSTransition, {
183
+ nodeRef: popoverContentNodeRef,
189
184
  timeout: {
190
- exit: 300
185
+ exit: disableAnimation ? 0 : 300
191
186
  },
192
- appear: true,
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
- }, state => isOpen && /*#__PURE__*/React.createElement(Popover, {
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(state))));
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
- ${animationToRender}
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: bold;
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: bold;
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: bold;
9
+ font-weight: 500;
10
10
  font-size: ${({
11
11
  size = "M"
12
12
  }) => profileConfigSizes[size].nameSize};
@@ -71,7 +71,7 @@ const fontSizes = {
71
71
  };
72
72
  const StyledValue = styled.span`
73
73
  display: inline-block;
74
- font-weight: bold;
74
+ font-weight: 500;
75
75
  `;
76
76
  const StyledDescription = styled.span`
77
77
  color: var(--colorsUtilityYin055);
@@ -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: 700;
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: 700;
110
+ font-weight: 500;
111
111
  padding-bottom: var(--spacing025);
112
112
  padding-top: 1px;
113
113
  cursor: pointer;
@@ -63,7 +63,7 @@ const StyledSelectListTableHeader = styled.thead`
63
63
  padding: var(--spacing200);
64
64
  background-color: white;
65
65
  text-align: left;
66
- font-weight: 900;
66
+ font-weight: 500;
67
67
  font-size: 12px;
68
68
  text-transform: uppercase;
69
69
  color: var(--colorsUtilityYin055);
@@ -19,7 +19,7 @@ const StyledSelectText = styled.span`
19
19
  padding-left: ${sizes[size].horizontalPadding};
20
20
 
21
21
  ${transparent && css`
22
- font-weight: 900;
22
+ font-weight: 500;
23
23
  text-align: right;
24
24
  flex-direction: row-reverse;
25
25
  `}
@@ -1,6 +1,6 @@
1
1
  import styled from "styled-components";
2
2
  const MatchingText = styled.span`
3
- font-weight: 700;
3
+ font-weight: 500;
4
4
  text-decoration: underline;
5
5
  `;
6
6
  export default MatchingText;
@@ -25,7 +25,7 @@ const StyledOptionRow = styled.tr`
25
25
  padding: 12px 16px;
26
26
 
27
27
  &:first-child {
28
- font-weight: 700;
28
+ font-weight: 500;
29
29
  }
30
30
  }
31
31
 
@@ -26,7 +26,7 @@ export const StepFlowTitle = ({
26
26
  variant: titleVariant || titleVariantContext || "h1",
27
27
  "data-element": "title-text"
28
28
  }, /*#__PURE__*/React.createElement(Typography, {
29
- fontWeight: "900",
29
+ fontWeight: "700",
30
30
  fontSize: "var(--fontSizes600)",
31
31
  lineHeight: "var(--sizing375)",
32
32
  variant: "span",
@@ -90,7 +90,7 @@ const StepFlow = /*#__PURE__*/forwardRef(({
90
90
  "aria-hidden": "true"
91
91
  }, locale.stepFlow.stepLabel(validatedCurrentStep, totalSteps));
92
92
  return /*#__PURE__*/React.createElement(StyledStepFlow, _extends({}, rest, tagComponent("step-flow", rest)), /*#__PURE__*/React.createElement(StyledStepContent, null, category ? /*#__PURE__*/React.createElement(StyledStepContentText, null, /*#__PURE__*/React.createElement(Typography, {
93
- fontWeight: "500",
93
+ fontWeight: "400",
94
94
  fontSize: "var(--fontSizes100)",
95
95
  lineHeight: "var(--sizing250)",
96
96
  variant: "span",
@@ -14,7 +14,7 @@ const StyledSwitchSlider = styled.div`
14
14
  }) => css`
15
15
  display: flex;
16
16
  font-size: 12px;
17
- font-weight: bold;
17
+ font-weight: 500;
18
18
  height: 28px;
19
19
  left: 0;
20
20
  letter-spacing: 1px;
@@ -227,7 +227,7 @@ const tabTitleStyles = css`
227
227
  display: inline-block;
228
228
  border-top-left-radius: var(--borderRadius100);
229
229
  border-top-right-radius: var(--borderRadius100);
230
- font-weight: bold;
230
+ font-weight: 500;
231
231
  position: relative;
232
232
  border: none;
233
233
  cursor: pointer;
@@ -5,7 +5,7 @@ const StyledEditorLink = styled(Link)`
5
5
 
6
6
  a {
7
7
  max-width: 100% span span span {
8
- font-weight: 700;
8
+ font-weight: 500;
9
9
  font-style: normal;
10
10
  }
11
11
  }
@@ -2,7 +2,7 @@ import styled from "styled-components";
2
2
  import InputSizes from "../../../__internal__/input/input-sizes.style";
3
3
  const StyledPrefix = styled.span`
4
4
  align-self: center;
5
- font-weight: 900;
5
+ font-weight: 700;
6
6
  margin-left: ${({
7
7
  size
8
8
  }) => InputSizes[size].horizontalPadding}; // margin must match the original component padding
@@ -8,7 +8,7 @@ import { baseTheme } from "../../style/themes";
8
8
  import addFocusStyling from "../../style/utils/add-focus-styling";
9
9
  const StyledTitle = styled.h3`
10
10
  font-size: 16px;
11
- font-weight: 900;
11
+ font-weight: 700;
12
12
  margin: 0;
13
13
  margin-right: 16px;
14
14
  margin-bottom: 8px;
@@ -16,7 +16,7 @@ const StyledTitle = styled.h3`
16
16
  `;
17
17
  const StyledSubtitle = styled.h4`
18
18
  font-size: 14px;
19
- font-weight: 700;
19
+ font-weight: 500;
20
20
  margin: 0;
21
21
  margin-right: 16px;
22
22
  margin-bottom: 8px;
@@ -2,7 +2,7 @@ import styled from "styled-components";
2
2
  import Label from "../../__internal__/label";
3
3
  export const StyledLabel = styled(Label)`
4
4
  label {
5
- font-weight: var(--fontWeights500);
5
+ font-weight: var(--fontWeights400);
6
6
  }
7
7
  `;
8
8
  export const StyledHintText = styled.div`
@@ -88,7 +88,7 @@ const getWeight = variant => {
88
88
  case "h1":
89
89
  case "segment-header":
90
90
  case "segment-header-small":
91
- return "900";
91
+ return "700";
92
92
  case "h2":
93
93
  case "h3":
94
94
  case "segment-subheader":
@@ -96,7 +96,7 @@ const getWeight = variant => {
96
96
  case "b":
97
97
  case "em":
98
98
  case "strong":
99
- return "700";
99
+ return "500";
100
100
  case "h4":
101
101
  case "h5":
102
102
  case "p":
@@ -22,7 +22,7 @@ export const StyledVerticalMenuItem = styled.div`
22
22
  display: flex;
23
23
  border: none;
24
24
  align-items: center;
25
- font-weight: 600;
25
+ font-weight: 500;
26
26
  font-size: 14px;
27
27
  cursor: pointer;
28
28
  color: var(--colorsComponentsLeftnavWinterStandardContent);
@@ -73,7 +73,7 @@ StyledVerticalMenuItem.defaultProps = {
73
73
  theme: baseTheme
74
74
  };
75
75
  export const StyledTitle = styled.h3`
76
- font-weight: 600;
76
+ font-weight: 500;
77
77
  font-size: 14px;
78
78
  line-height: 21px;
79
79
  margin: 0;
@@ -19,7 +19,7 @@
19
19
  @font-face {
20
20
  font-family: "Sage UI";
21
21
  font-style: normal;
22
- font-weight: 700;
22
+ font-weight: 500;
23
23
  src: url("~@sage/design-tokens/assets/fonts/sageui-medium.woff2") format("woff2"),
24
24
  url("~@sage/design-tokens/assets/fonts/sageui-medium.woff") format("woff"),
25
25
  url("~@sage/design-tokens/assets/fonts/sageui-medium.ttf") format("truetype"),
@@ -29,7 +29,7 @@
29
29
  @font-face {
30
30
  font-family: "Sage UI";
31
31
  font-style: normal;
32
- font-weight: 900;
32
+ font-weight: 700;
33
33
  src: url("~@sage/design-tokens/assets/fonts/sageui-bold.woff2") format("woff2"),
34
34
  url("~@sage/design-tokens/assets/fonts/sageui-bold.woff") format("woff"),
35
35
  url("~@sage/design-tokens/assets/fonts/sageui-bold.ttf") format("truetype"),
@@ -15,12 +15,12 @@ const GlobalStyle = createGlobalStyle`
15
15
  font-family: inherit;
16
16
  }
17
17
 
18
- h1, .h1 { font-size: 24px; font-weight: 900; line-height: 32px; }
19
- h2, .h2 { font-size: 22px; font-weight: 700; margin-bottom: 26px; }
20
- h3, .h3 { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
21
- h4, .h4 { font-size: 18px; font-weight: 700; margin-bottom: 22px; }
22
- h5, .h5 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
23
- h6, .h6 { font-size: 14px; font-weight: 700; margin-bottom: 18px; }
18
+ h1, .h1 { font-size: 24px; font-weight: 700; line-height: 32px; }
19
+ h2, .h2 { font-size: 22px; font-weight: 500; margin-bottom: 26px; }
20
+ h3, .h3 { font-size: 20px; font-weight: 500; margin-bottom: 24px; }
21
+ h4, .h4 { font-size: 18px; font-weight: 500; margin-bottom: 22px; }
22
+ h5, .h5 { font-size: 16px; font-weight: 500; margin-bottom: 20px; }
23
+ h6, .h6 { font-size: 14px; font-weight: 500; margin-bottom: 18px; }
24
24
 
25
25
  [data-element=${TAB_GUARD_TOP}], [data-element=${TAB_GUARD_BOTTOM}] {
26
26
  position: fixed;
@@ -23,7 +23,7 @@ const StyledCharacterCount = exports.StyledCharacterCount = _styledComponents.de
23
23
  ${({
24
24
  isOverLimit
25
25
  }) => isOverLimit && (0, _styledComponents.css)`
26
- font-weight: var(--fontWeights700);
26
+ font-weight: var(--fontWeights500);
27
27
  `}
28
28
  `;
29
29
  const VisuallyHiddenCharacterCount = exports.VisuallyHiddenCharacterCount = _styledComponents.default.div`
@@ -35,7 +35,7 @@ const StyledLegendContent = exports.StyledLegendContent = _styledComponents.defa
35
35
  content: "*";
36
36
  line-height: 24px;
37
37
  color: var(--colorsSemanticNegative500);
38
- font-weight: var(--fontWeights700);
38
+ font-weight: var(--fontWeights500);
39
39
  margin-left: var(--spacing050);
40
40
  position: relative;
41
41
  top: 1px;
@@ -67,7 +67,7 @@ const StyledLegend = exports.StyledLegend = _styledComponents.default.legend`
67
67
  align-items: center;
68
68
  margin-bottom: var(--spacing100);
69
69
  padding: 0;
70
- font-weight: var(--fontWeights700);
70
+ font-weight: var(--fontWeights500);
71
71
  color: var(--colorsUtilityYin090);
72
72
  ${({
73
73
  inline,
@@ -10,7 +10,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
10
10
  const StyledLabel = _styledComponents.default.label`
11
11
  color: var(--colorsUtilityYin090);
12
12
  display: block;
13
- font-weight: var(--fontWeights700);
13
+ font-weight: var(--fontWeights500);
14
14
 
15
15
  ${({
16
16
  isRequired
@@ -18,7 +18,7 @@ const StyledLabel = _styledComponents.default.label`
18
18
  ::after {
19
19
  content: "*";
20
20
  color: var(--colorsSemanticNegative500);
21
- font-weight: var(--fontWeights700);
21
+ font-weight: var(--fontWeights500);
22
22
  margin-left: var(--spacing050);
23
23
  }
24
24
  `}
@@ -12,7 +12,7 @@ const StyledValidationMessage = _styledComponents.default.p`
12
12
  isWarning
13
13
  }) => (0, _styledComponents.css)`
14
14
  color: ${isWarning ? "var(--colorsSemanticCaution600)" : "var(--colorsSemanticNegative500)"};
15
- font-weight: ${isWarning ? "normal" : "bold"};
15
+ font-weight: ${isWarning ? "normal" : "500"};
16
16
  margin-top: 0px;
17
17
  margin-bottom: 8px;
18
18
  `}
@@ -62,7 +62,7 @@ const StyledAccordionTitle = exports.StyledAccordionTitle = _styledComponents.de
62
62
  size,
63
63
  variant
64
64
  }) => size === "small" || variant === "subtle" ? "var(--fontSizes200)" : "var(--fontSizes400)"};
65
- font-weight: 700;
65
+ font-weight: 500;
66
66
  line-height: 1;
67
67
  user-select: none;
68
68
  margin: 0;
@@ -170,7 +170,7 @@ const StyledAccordionTitleContainer = exports.StyledAccordionTitleContainer = _s
170
170
 
171
171
  ${buttonHeading && (0, _styledComponents.css)`
172
172
  box-sizing: border-box;
173
- font-weight: 600;
173
+ font-weight: 500;
174
174
  text-decoration: none;
175
175
  font-size: var(--fontSizes100);
176
176
  min-height: var(--spacing500);
@@ -125,7 +125,7 @@ const StyledMenuItem = exports.StyledMenuItem = _styledComponents.default.button
125
125
  width: 100%;
126
126
  color: var(--colorsUtilityYin090);
127
127
  font-size: 14px;
128
- font-weight: 700;
128
+ font-weight: 500;
129
129
 
130
130
  &:focus {
131
131
  ${({
@@ -22,7 +22,7 @@ const StyledNavigationItem = _styledComponents.default.li`
22
22
  color: var(--colorsUtilityYin090);
23
23
  background-color: transparent;
24
24
  border-left: var(--sizing050) solid var(--colorsActionMinor100);
25
- font-weight: 700;
25
+ font-weight: 500;
26
26
  padding: 12px 24px;
27
27
  border-top-right-radius: var(--borderRadius100);
28
28
  border-bottom-right-radius: var(--borderRadius100);
@@ -28,7 +28,7 @@ const StyledBadgeWrapper = exports.StyledBadgeWrapper = _styledComponents.defaul
28
28
  display: inline-block;
29
29
  `;
30
30
  const StyledCounter = exports.StyledCounter = _styledComponents.default.div`
31
- font-weight: 700;
31
+ font-weight: 500;
32
32
  font-size: 12px;
33
33
  margin-top: -1px;
34
34
  `;
@@ -79,7 +79,7 @@ const StyledButton = _styledComponents.default.button`
79
79
  outline-offset: 0;
80
80
  border: 2px solid transparent;
81
81
  box-sizing: border-box;
82
- font-weight: 600;
82
+ font-weight: 500;
83
83
  text-decoration: none;
84
84
  border-radius: var(--borderRadius400);
85
85
 
@@ -55,7 +55,7 @@ const StyledButtonToggle = exports.StyledButtonToggle = _styledComponents.defaul
55
55
  box-sizing: border-box;
56
56
  max-width: 100%;
57
57
 
58
- font-weight: 700;
58
+ font-weight: 500;
59
59
  background-color: transparent;
60
60
  cursor: pointer;
61
61
  text-align: center;
@@ -33,7 +33,7 @@ const StyledCardFooter = _styledComponents.default.div`
33
33
  border-top-width: 1px;
34
34
  border-top-style: solid;
35
35
  font-size: 14px;
36
- font-weight: 700;
36
+ font-weight: 500;
37
37
  margin: ${marginSizes[spacing]};
38
38
  display: flex;
39
39
  ${roundness === "default" && (0, _styledComponents.css)`
@@ -40,7 +40,7 @@ const StyledContentTitle = exports.StyledContentTitle = _styledComponents.defaul
40
40
  }) => {
41
41
  return (0, _styledComponents.css)`
42
42
  display: ${inline ? "inline-block" : "block"};
43
- font-weight: bold;
43
+ font-weight: 500;
44
44
  width: ${titleWidth && `calc(${titleWidth}% - 30px)`};
45
45
  text-align: ${!inline && align};
46
46
 
@@ -272,7 +272,7 @@ const StyledDayPicker = _styledComponents.default.div`
272
272
  border: none;
273
273
  //font-family: var(--fontFamiliesDefault); font assets to be updated part of FE-4975
274
274
  //font: var(--typographyDatePickerCalendarDateM); font assets to be updated part of FE-4975
275
- font-weight: var(--fontWeights700);
275
+ font-weight: var(--fontWeights500);
276
276
  font-size: var(--fontSizes100);
277
277
  line-height: var(--lineHeights500);
278
278
  border-radius: var(--borderRadius400);
@@ -25,6 +25,7 @@ const Dd = ({
25
25
  } = (0, _react.useContext)(_dl.default);
26
26
  return /*#__PURE__*/_react.default.createElement(_definitionList.StyledDd, _extends({
27
27
  "data-element": "dd",
28
+ "data-role": "dd",
28
29
  asSingleColumn: asSingleColumn,
29
30
  ddTextAlign: ddTextAlign,
30
31
  mb: mb || 2
@@ -38,7 +38,7 @@ StyledDl.defaultProps = {
38
38
  const StyledDt = exports.StyledDt = _styledComponents.default.dt`
39
39
  ${_styledSystem.space}
40
40
  font-size: var(--fontSizes100);
41
- font-weight: 700;
41
+ font-weight: 500;
42
42
  color: var(--colorsUtilityYin090);
43
43
  ${({
44
44
  asSingleColumn
@@ -21,6 +21,7 @@ const Dl = ({
21
21
  return /*#__PURE__*/_react.default.createElement(_definitionList.StyledDl, _extends({
22
22
  w: w,
23
23
  "data-component": "dl",
24
+ "data-role": "dl",
24
25
  asSingleColumn: asSingleColumn
25
26
  }, rest), /*#__PURE__*/_react.default.createElement(_dl.default.Provider, {
26
27
  value: {
@@ -26,6 +26,7 @@ const Dt = ({
26
26
  } = rest;
27
27
  return /*#__PURE__*/_react.default.createElement(_definitionList.StyledDt, _extends({
28
28
  "data-element": "dt",
29
+ "data-role": "dt",
29
30
  mb: mb || asSingleColumn ? undefined : 2,
30
31
  pr: pr || asSingleColumn ? undefined : 3,
31
32
  dtTextAlign: dtTextAlign,