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.
- 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 +17 -17
- package/esm/components/form/form.component.js +5 -19
- package/esm/components/form/form.style.d.ts +0 -1
- package/esm/components/form/form.style.js +8 -21
- 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 +17 -17
- package/lib/components/form/form.component.js +4 -18
- package/lib/components/form/form.style.d.ts +0 -1
- package/lib/components/form/form.style.js +9 -22
- 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
|
@@ -35,7 +35,7 @@ const StyledLabelContainer = exports.StyledLabelContainer = _styledComponents.de
|
|
|
35
35
|
margin-bottom: 16px;
|
|
36
36
|
`;
|
|
37
37
|
const StyledLabel = exports.StyledLabel = _styledComponents.default.p`
|
|
38
|
-
font-weight:
|
|
38
|
+
font-weight: 500;
|
|
39
39
|
font-size: 12px;
|
|
40
40
|
letter-spacing: 1;
|
|
41
41
|
margin: 0;
|
|
@@ -36,7 +36,7 @@ const StyledLegend = exports.StyledLegend = _styledComponents.default.legend`
|
|
|
36
36
|
align-items: center;
|
|
37
37
|
margin-bottom: 32px;
|
|
38
38
|
font-size: 20px;
|
|
39
|
-
font-weight: var(--
|
|
39
|
+
font-weight: var(--fontWeights500);
|
|
40
40
|
color: var(--colorsUtilityYin090);
|
|
41
41
|
line-height: 24px;
|
|
42
42
|
margin-right: 4px;
|
|
@@ -48,7 +48,7 @@ const StyledLegend = exports.StyledLegend = _styledComponents.default.legend`
|
|
|
48
48
|
content: "*";
|
|
49
49
|
line-height: 24px;
|
|
50
50
|
color: var(--colorsSemanticNegative500);
|
|
51
|
-
font-weight: var(--
|
|
51
|
+
font-weight: var(--fontWeights500);
|
|
52
52
|
margin-left: var(--spacing100);
|
|
53
53
|
position: relative;
|
|
54
54
|
top: 1px;
|
package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.js
CHANGED
|
@@ -80,7 +80,7 @@ const StyledFileUploadStatus = exports.StyledFileUploadStatus = _styledComponent
|
|
|
80
80
|
border: var(--${borderWidthToken}) solid var(--${colorToken});
|
|
81
81
|
${hasError && `&& ${_typography.default} {
|
|
82
82
|
color: var(--${colorToken});
|
|
83
|
-
font-weight:
|
|
83
|
+
font-weight: 400;
|
|
84
84
|
}`}
|
|
85
85
|
`;
|
|
86
86
|
}}
|
|
@@ -6,18 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.StyledMessagePrefix = exports.StyledInternalSummary = exports.StyledFormSummary = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _icon = _interopRequireDefault(require("../../icon/icon.style"));
|
|
9
|
-
var _button = _interopRequireDefault(require("../../button/button.style"));
|
|
10
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
12
|
const StyledFormSummary = exports.StyledFormSummary = _styledComponents.default.div`
|
|
14
13
|
display: inline-flex;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
15
|
align-items: center;
|
|
16
|
-
|
|
17
|
-
font-
|
|
18
|
-
|
|
19
|
-
padding: 8px;
|
|
20
|
-
white-space: nowrap;
|
|
16
|
+
justify-content: end;
|
|
17
|
+
font-size: var(--fontSizes100);
|
|
18
|
+
font-weight: 500;
|
|
21
19
|
|
|
22
20
|
${({
|
|
23
21
|
fullWidth
|
|
@@ -29,27 +27,30 @@ const StyledFormSummary = exports.StyledFormSummary = _styledComponents.default.
|
|
|
29
27
|
`}
|
|
30
28
|
|
|
31
29
|
${({
|
|
32
|
-
showSummary
|
|
30
|
+
showSummary,
|
|
31
|
+
fullWidth
|
|
33
32
|
}) => showSummary && (0, _styledComponents.css)`
|
|
34
33
|
background-color: var(--colorsUtilityMajor025);
|
|
34
|
+
border: solid var(--borderWidth100) var(--colorsActionMinor250);
|
|
35
|
+
border-radius: var(--borderRadius100);
|
|
36
|
+
margin: calc(-1 * var(--sizing100)) 0;
|
|
37
|
+
padding: var(--sizing100);
|
|
38
|
+
gap: var(--sizing125);
|
|
39
|
+
|
|
40
|
+
${fullWidth && (0, _styledComponents.css)`
|
|
41
|
+
margin: 0 calc(-1 * var(--sizing100));
|
|
42
|
+
`}
|
|
35
43
|
`}
|
|
36
|
-
${_button.default} {
|
|
37
|
-
margin-right: 0;
|
|
38
|
-
}
|
|
39
44
|
`;
|
|
40
45
|
const StyledMessagePrefix = exports.StyledMessagePrefix = _styledComponents.default.div`
|
|
41
46
|
&:first-of-type {
|
|
42
|
-
margin-left:
|
|
47
|
+
margin-left: var(--sizing100);
|
|
43
48
|
}
|
|
44
|
-
margin-right: 4px;
|
|
45
49
|
`;
|
|
46
50
|
const StyledInternalSummary = exports.StyledInternalSummary = _styledComponents.default.div`
|
|
47
51
|
display: flex;
|
|
48
52
|
align-items: center;
|
|
49
|
-
|
|
50
|
-
&:last-of-type {
|
|
51
|
-
margin-right: 16px;
|
|
52
|
-
}
|
|
53
|
+
gap: var(--sizing100);
|
|
53
54
|
${({
|
|
54
55
|
type
|
|
55
56
|
}) => type === "warning" && (0, _styledComponents.css)`
|
|
@@ -62,7 +63,6 @@ const StyledInternalSummary = exports.StyledInternalSummary = _styledComponents.
|
|
|
62
63
|
`}
|
|
63
64
|
|
|
64
65
|
${_icon.default} {
|
|
65
|
-
margin-right: 4px;
|
|
66
66
|
${({
|
|
67
67
|
type
|
|
68
68
|
}) => type === "warning" && (0, _styledComponents.css)`
|
|
@@ -63,40 +63,26 @@ const Form = ({
|
|
|
63
63
|
tabIndex: -1
|
|
64
64
|
}, /*#__PURE__*/_react.default.createElement(_formSpacingProvider.default, {
|
|
65
65
|
marginBottom: _form2.formSpacing[fieldSpacing]
|
|
66
|
-
}, children)),
|
|
66
|
+
}, children)), renderFooter && /*#__PURE__*/_react.default.createElement(_form.StyledFormFooter, _extends({
|
|
67
67
|
"data-element": "form-footer",
|
|
68
68
|
"data-role": "form-footer",
|
|
69
69
|
className: classNames,
|
|
70
70
|
ref: formFooterRef,
|
|
71
71
|
stickyFooter: stickyFooter,
|
|
72
72
|
buttonAlignment: buttonAlignment,
|
|
73
|
+
fullWidthButtons: fullWidthButtons,
|
|
73
74
|
isInModal: isInModal
|
|
74
75
|
}, footerPadding), leftSideButtons && /*#__PURE__*/_react.default.createElement(_form.StyledLeftButtons, {
|
|
75
76
|
"data-role": "form-left-buttons",
|
|
76
77
|
buttonAlignment: buttonAlignment
|
|
77
78
|
}, leftSideButtons), /*#__PURE__*/_react.default.createElement(_formSummary.default, {
|
|
79
|
+
fullWidth: fullWidthButtons,
|
|
78
80
|
errorCount: errorCount,
|
|
79
81
|
warningCount: warningCount
|
|
80
82
|
}, saveButton), rightSideButtons && /*#__PURE__*/_react.default.createElement(_form.StyledRightButtons, {
|
|
81
83
|
"data-role": "form-right-buttons",
|
|
82
84
|
buttonAlignment: buttonAlignment
|
|
83
|
-
}, rightSideButtons))
|
|
84
|
-
"data-element": "form-footer",
|
|
85
|
-
"data-role": "form-footer",
|
|
86
|
-
className: classNames,
|
|
87
|
-
ref: formFooterRef,
|
|
88
|
-
stickyFooter: stickyFooter,
|
|
89
|
-
buttonAlignment: buttonAlignment,
|
|
90
|
-
fullWidthButtons: fullWidthButtons
|
|
91
|
-
}, footerPadding), leftSideButtons && /*#__PURE__*/_react.default.createElement(_form.StyledLeftButtons, {
|
|
92
|
-
fullWidthButtons: fullWidthButtons
|
|
93
|
-
}, leftSideButtons), rightSideButtons && /*#__PURE__*/_react.default.createElement(_form.StyledRightButtons, {
|
|
94
|
-
fullWidthButtons: fullWidthButtons
|
|
95
|
-
}, rightSideButtons), /*#__PURE__*/_react.default.createElement(_form.StyledFullWidthButtons, null, /*#__PURE__*/_react.default.createElement(_formSummary.default, {
|
|
96
|
-
fullWidth: fullWidthButtons,
|
|
97
|
-
errorCount: errorCount,
|
|
98
|
-
warningCount: warningCount
|
|
99
|
-
}, saveButton))));
|
|
85
|
+
}, rightSideButtons)));
|
|
100
86
|
};
|
|
101
87
|
exports.Form = Form;
|
|
102
88
|
Form.displayName = "Form";
|
|
@@ -16,6 +16,5 @@ interface StyledFormProps extends StyledFormContentProps {
|
|
|
16
16
|
}
|
|
17
17
|
export declare const StyledForm: import("styled-components").StyledComponent<"form", any, StyledFormProps, never>;
|
|
18
18
|
export declare const StyledRightButtons: import("styled-components").StyledComponent<"div", any, ButtonProps, never>;
|
|
19
|
-
export declare const StyledFullWidthButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
20
19
|
export declare const StyledLeftButtons: import("styled-components").StyledComponent<"div", any, ButtonProps, never>;
|
|
21
20
|
export {};
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledRightButtons = exports.StyledLeftButtons = exports.
|
|
6
|
+
exports.StyledRightButtons = exports.StyledLeftButtons = exports.StyledFormFooter = exports.StyledFormContent = exports.StyledForm = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _styledSystem = require("styled-system");
|
|
9
9
|
var _formField = _interopRequireDefault(require("../../__internal__/form-field/form-field.style"));
|
|
10
|
-
var _button = _interopRequireDefault(require("../button/button.style"));
|
|
11
10
|
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
12
11
|
var _search = _interopRequireDefault(require("../search/search.style"));
|
|
13
12
|
var _textarea = _interopRequireDefault(require("../textarea/textarea.style"));
|
|
@@ -29,6 +28,8 @@ const StyledFormContent = exports.StyledFormContent = _styledComponents.default.
|
|
|
29
28
|
const StyledFormFooter = exports.StyledFormFooter = _styledComponents.default.div`
|
|
30
29
|
align-items: center;
|
|
31
30
|
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
gap: var(--sizing200);
|
|
32
33
|
|
|
33
34
|
${({
|
|
34
35
|
buttonAlignment
|
|
@@ -106,34 +107,20 @@ const StyledForm = exports.StyledForm = _styledComponents.default.form`
|
|
|
106
107
|
`;
|
|
107
108
|
const StyledRightButtons = exports.StyledRightButtons = _styledComponents.default.div`
|
|
108
109
|
display: flex;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}) => fullWidthButtons ? `margin-left: 0px;` : `margin-left: 16px;`}
|
|
110
|
+
gap: var(--sizing200);
|
|
111
|
+
|
|
112
112
|
${({
|
|
113
113
|
buttonAlignment
|
|
114
|
-
}) => buttonAlignment === "left" && "flex-grow: 1"}
|
|
115
|
-
|
|
116
|
-
${_button.default}:last-child {
|
|
117
|
-
margin-right: 0;
|
|
118
|
-
}
|
|
119
|
-
`;
|
|
120
|
-
const StyledFullWidthButtons = exports.StyledFullWidthButtons = _styledComponents.default.div`
|
|
121
|
-
width: 100%;
|
|
122
|
-
display: flex;
|
|
114
|
+
}) => buttonAlignment === "left" && "flex-grow: 1;"}
|
|
123
115
|
`;
|
|
124
116
|
const StyledLeftButtons = exports.StyledLeftButtons = _styledComponents.default.div`
|
|
125
117
|
display: flex;
|
|
126
118
|
justify-content: flex-end;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}) => fullWidthButtons ? `margin-right: 0px;` : `margin-right: 16px;`}
|
|
119
|
+
gap: var(--sizing200);
|
|
120
|
+
|
|
130
121
|
${({
|
|
131
122
|
buttonAlignment
|
|
132
|
-
}) => buttonAlignment === "right" && "flex-grow: 1"}
|
|
133
|
-
|
|
134
|
-
${_button.default}:last-child {
|
|
135
|
-
margin-right: 0;
|
|
136
|
-
}
|
|
123
|
+
}) => buttonAlignment === "right" && "flex-grow: 1;"}
|
|
137
124
|
`;
|
|
138
125
|
StyledForm.defaultProps = {
|
|
139
126
|
theme: _base.default
|
|
@@ -74,7 +74,7 @@ const StyledPreviewWrapper = exports.StyledPreviewWrapper = _styledComponents.de
|
|
|
74
74
|
const StyledTitle = exports.StyledTitle = _styledComponents.default.div`
|
|
75
75
|
white-space: nowrap;
|
|
76
76
|
text-overflow: ellipsis;
|
|
77
|
-
font-weight:
|
|
77
|
+
font-weight: 500;
|
|
78
78
|
font-size: 14px;
|
|
79
79
|
line-height: 21px;
|
|
80
80
|
`;
|
|
@@ -30,7 +30,7 @@ const LoaderSpinner = ({
|
|
|
30
30
|
const renderSpinnerLabel = /*#__PURE__*/_react.default.createElement(_loaderSpinner.StyledLabel, {
|
|
31
31
|
"data-role": "visible-label",
|
|
32
32
|
variant: "span",
|
|
33
|
-
fontWeight: "
|
|
33
|
+
fontWeight: "400",
|
|
34
34
|
size: size,
|
|
35
35
|
color: isLabelDark ? "var(--colorsUtilityYin090);" : "var(--colorsActionMajorYang100);",
|
|
36
36
|
fontSize: size === "extra-large" ? "var(--sizing200)" : "var(--sizing175)",
|
|
@@ -23,7 +23,7 @@ const LoaderStar = ({
|
|
|
23
23
|
const label = /*#__PURE__*/_react.default.createElement(_loaderStar.StyledLabel, {
|
|
24
24
|
"data-role": "visible-label",
|
|
25
25
|
variant: "span",
|
|
26
|
-
fontWeight: "
|
|
26
|
+
fontWeight: "400"
|
|
27
27
|
}, loaderStarLabel || locale.loaderStar.loading());
|
|
28
28
|
return /*#__PURE__*/_react.default.createElement(_loaderStar.StyledLoaderStarWrapper, _extends({
|
|
29
29
|
role: "status"
|
|
@@ -108,7 +108,7 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
|
|
|
108
108
|
display: flex;
|
|
109
109
|
align-items: center;
|
|
110
110
|
font-size: 14px;
|
|
111
|
-
font-weight:
|
|
111
|
+
font-weight: 500;
|
|
112
112
|
min-height: 40px;
|
|
113
113
|
position: relative;
|
|
114
114
|
box-shadow: none;
|
|
@@ -259,7 +259,7 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
|
|
|
259
259
|
${_link.StyledLink} a,
|
|
260
260
|
${_link.StyledLink} button,
|
|
261
261
|
${_link.StyledLink} [data-component="icon"] {
|
|
262
|
-
font-weight:
|
|
262
|
+
font-weight: 500;
|
|
263
263
|
text-decoration: none;
|
|
264
264
|
${!hasInput && `color: ${_menu.default[menuType].color};`}
|
|
265
265
|
}
|
|
@@ -50,7 +50,7 @@ const StyledInlineControl = exports.StyledInlineControl = _styledComponents.defa
|
|
|
50
50
|
min-width: fit-content;
|
|
51
51
|
`;
|
|
52
52
|
const StyledTitle = exports.StyledTitle = _styledComponents.default.header`
|
|
53
|
-
font-weight:
|
|
53
|
+
font-weight: 700;
|
|
54
54
|
font-size: 16px;
|
|
55
55
|
line-height: 21px;
|
|
56
56
|
padding-bottom: 16px;
|
|
@@ -58,7 +58,7 @@ const StyledTitle = exports.StyledTitle = _styledComponents.default.header`
|
|
|
58
58
|
const StyledFooterContent = exports.StyledFooterContent = _styledComponents.default.div`
|
|
59
59
|
line-height: 21px;
|
|
60
60
|
align-items: baseline;
|
|
61
|
-
font-weight:
|
|
61
|
+
font-weight: 500;
|
|
62
62
|
|
|
63
63
|
${({
|
|
64
64
|
hasName
|
|
@@ -349,7 +349,7 @@ const StyledSubtitle = exports.StyledSubtitle = _styledComponents.default.h5`
|
|
|
349
349
|
const StyledTitle = exports.StyledTitle = _styledComponents.default.h4`
|
|
350
350
|
display: inline;
|
|
351
351
|
font-size: 18px;
|
|
352
|
-
font-weight:
|
|
352
|
+
font-weight: 500;
|
|
353
353
|
`;
|
|
354
354
|
StyledPod.defaultProps = {
|
|
355
355
|
theme: _themes.baseTheme
|
|
@@ -106,15 +106,12 @@ const PopoverContainer = ({
|
|
|
106
106
|
const reduceMotion = !(0, _useMediaQuery.default)("screen and (prefers-reduced-motion: no-preference)");
|
|
107
107
|
const popoverMiddleware = usePopoverMiddleware(shouldCoverButton);
|
|
108
108
|
const closePopover = (0, _react.useCallback)(ev => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (isOpen && openButtonRef.current) {
|
|
116
|
-
openButtonRef.current.focus();
|
|
117
|
-
}
|
|
109
|
+
/* istanbul ignore else */
|
|
110
|
+
if (!isControlled) setIsOpenInternal(false);
|
|
111
|
+
onClose?.(ev);
|
|
112
|
+
|
|
113
|
+
/* istanbul ignore else */
|
|
114
|
+
if (isOpen) openButtonRef.current?.focus();
|
|
118
115
|
}, [isControlled, isOpen, onClose]);
|
|
119
116
|
const handleEscKey = (0, _react.useCallback)(ev => {
|
|
120
117
|
const eventIsFromSelectInput = _events.default.composedPath(ev).find(element => {
|
|
@@ -131,12 +128,11 @@ const PopoverContainer = ({
|
|
|
131
128
|
};
|
|
132
129
|
}, [handleEscKey]);
|
|
133
130
|
const handleOpenButtonClick = e => {
|
|
131
|
+
/* istanbul ignore else */
|
|
134
132
|
if (!isControlled) setIsOpenInternal(!isOpen);
|
|
135
133
|
|
|
136
134
|
// We want the open button to close the popover if it is already open
|
|
137
|
-
if (!isOpen)
|
|
138
|
-
if (onOpen) onOpen(e);
|
|
139
|
-
} else if (onClose) onClose(e);
|
|
135
|
+
if (!isOpen) onOpen?.(e);else onClose?.(e);
|
|
140
136
|
};
|
|
141
137
|
const handleCloseButtonClick = e => {
|
|
142
138
|
closePopover(e);
|
|
@@ -163,14 +159,13 @@ const PopoverContainer = ({
|
|
|
163
159
|
};
|
|
164
160
|
const handleClickAway = e => {
|
|
165
161
|
if (!isControlled) setIsOpenInternal(false);
|
|
166
|
-
if (
|
|
162
|
+
if (isOpen) onClose?.(e);
|
|
167
163
|
};
|
|
168
164
|
const handleClick = (0, _useClickAwayListener.default)(handleClickAway, "mousedown");
|
|
169
165
|
const [isAnimationComplete, setIsAnimationComplete] = (0, _react.useState)(false);
|
|
170
|
-
const popover =
|
|
166
|
+
const popover = () => /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerContentStyle, _extends({
|
|
171
167
|
"data-element": "popover-container-content",
|
|
172
168
|
role: "dialog",
|
|
173
|
-
animationState: state,
|
|
174
169
|
"aria-labelledby": popoverContainerId,
|
|
175
170
|
"aria-label": containerAriaLabel,
|
|
176
171
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -182,37 +177,35 @@ const PopoverContainer = ({
|
|
|
182
177
|
id: popoverContainerId,
|
|
183
178
|
"data-element": "popover-container-title"
|
|
184
179
|
}, title), renderCloseComponent(renderCloseComponentProps)), children);
|
|
185
|
-
const childrenToRender =
|
|
180
|
+
const childrenToRender = () => shouldCoverButton ? /*#__PURE__*/_react.default.createElement(_modal.default.Provider, {
|
|
186
181
|
value: {
|
|
187
182
|
isAnimationComplete
|
|
188
183
|
}
|
|
189
184
|
}, /*#__PURE__*/_react.default.createElement(_focusTrap.default, {
|
|
190
185
|
wrapperRef: popoverContentNodeRef,
|
|
191
186
|
isOpen: isOpen
|
|
192
|
-
}, popover(
|
|
187
|
+
}, popover())) : popover();
|
|
193
188
|
return /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerWrapperStyle, {
|
|
194
189
|
"data-component": "popover-container",
|
|
195
190
|
onMouseDown: handleClick
|
|
196
191
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
197
192
|
ref: popoverReference
|
|
198
|
-
}, renderOpenComponent(renderOpenComponentProps)), /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.
|
|
199
|
-
|
|
193
|
+
}, renderOpenComponent(renderOpenComponentProps)), /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
194
|
+
nodeRef: popoverContentNodeRef,
|
|
200
195
|
timeout: {
|
|
201
|
-
exit: 300
|
|
196
|
+
exit: disableAnimation ? 0 : 300
|
|
202
197
|
},
|
|
203
|
-
|
|
204
|
-
mountOnEnter: true,
|
|
198
|
+
in: isOpen,
|
|
205
199
|
unmountOnExit: true,
|
|
206
|
-
nodeRef: popoverContentNodeRef,
|
|
207
200
|
onEntered: shouldCoverButton ? /* istanbul ignore next */() => setIsAnimationComplete(true) : undefined,
|
|
208
201
|
onExiting: shouldCoverButton ? /* istanbul ignore next */() => setIsAnimationComplete(false) : undefined
|
|
209
|
-
},
|
|
202
|
+
}, /*#__PURE__*/_react.default.createElement(_popover.default, {
|
|
210
203
|
reference: popoverReference,
|
|
211
204
|
placement: position === "right" ? "bottom-start" : "bottom-end",
|
|
212
205
|
popoverStrategy: disableAnimation || reduceMotion ? "fixed" : "absolute",
|
|
213
206
|
middleware: popoverMiddleware,
|
|
214
207
|
childRefOverride: popoverContentNodeRef
|
|
215
|
-
}, childrenToRender(
|
|
208
|
+
}, childrenToRender())));
|
|
216
209
|
};
|
|
217
210
|
exports.PopoverContainer = PopoverContainer;
|
|
218
211
|
var _default = exports.default = PopoverContainer;
|
|
@@ -4,39 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PopoverContainerWrapperStyle = exports.PopoverContainerTitleStyle = exports.PopoverContainerOpenIcon = exports.PopoverContainerHeaderStyle = exports.PopoverContainerContentStyle = exports.PopoverContainerCloseIcon = void 0;
|
|
7
|
-
var _styledComponents =
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _styledSystem = require("styled-system");
|
|
9
9
|
var _themes = require("../../style/themes");
|
|
10
10
|
var _iconButton = _interopRequireDefault(require("../icon-button"));
|
|
11
11
|
var _icon = _interopRequireDefault(require("../icon/icon.style"));
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
disableAnimation
|
|
16
|
-
}) {
|
|
17
|
-
if (disableAnimation) return "opacity: 1;";
|
|
18
|
-
switch (animationState) {
|
|
19
|
-
case "entering":
|
|
20
|
-
return `
|
|
21
|
-
opacity: 0;
|
|
22
|
-
transform: translateY(-8px);
|
|
23
|
-
`;
|
|
24
|
-
case "entered":
|
|
25
|
-
return `
|
|
26
|
-
opacity: 1;
|
|
27
|
-
transform: translateY(0);
|
|
28
|
-
transition: all 0.3s cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
29
|
-
`;
|
|
30
|
-
case "exiting":
|
|
31
|
-
return `
|
|
32
|
-
opacity: 0;
|
|
33
|
-
transform: translateY(-8px);
|
|
34
|
-
transition: all 0.3s cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
35
|
-
`;
|
|
36
|
-
default:
|
|
37
|
-
return "opacity: 0;";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
40
15
|
const PopoverContainerWrapperStyle = exports.PopoverContainerWrapperStyle = _styledComponents.default.div`
|
|
41
16
|
position: relative;
|
|
42
17
|
display: inline-block;
|
|
@@ -60,7 +35,38 @@ const PopoverContainerContentStyle = exports.PopoverContainerContentStyle = _sty
|
|
|
60
35
|
theme
|
|
61
36
|
}) => theme.zIndex.popover};
|
|
62
37
|
|
|
63
|
-
${
|
|
38
|
+
${({
|
|
39
|
+
disableAnimation
|
|
40
|
+
}) => disableAnimation ? (0, _styledComponents.css)`
|
|
41
|
+
opacity: 1;
|
|
42
|
+
transform: none;
|
|
43
|
+
` : (0, _styledComponents.css)`
|
|
44
|
+
&.enter {
|
|
45
|
+
opacity: 0;
|
|
46
|
+
transform: translateY(-8px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.enter-done {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
transform: translateY(0);
|
|
52
|
+
transition-property: opacity, transform;
|
|
53
|
+
transition-duration: 0.3s;
|
|
54
|
+
transition-timing-function: cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.exit {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transform: translateY(-8px);
|
|
60
|
+
transition-property: opacity, transform;
|
|
61
|
+
transition-duration: 0.3s;
|
|
62
|
+
transition-timing-function: cubic-bezier(0.25, 0.25, 0, 1.5);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.exit-done {
|
|
66
|
+
opacity: 0;
|
|
67
|
+
transform: translateY(0);
|
|
68
|
+
}
|
|
69
|
+
`}
|
|
64
70
|
|
|
65
71
|
:focus {
|
|
66
72
|
outline: none;
|
|
@@ -82,7 +88,7 @@ const PopoverContainerCloseIcon = exports.PopoverContainerCloseIcon = (0, _style
|
|
|
82
88
|
`;
|
|
83
89
|
const PopoverContainerTitleStyle = exports.PopoverContainerTitleStyle = _styledComponents.default.div`
|
|
84
90
|
font-size: 16px;
|
|
85
|
-
font-weight:
|
|
91
|
+
font-weight: 500;
|
|
86
92
|
`;
|
|
87
93
|
PopoverContainerContentStyle.defaultProps = {
|
|
88
94
|
theme: _themes.baseTheme
|
|
@@ -12,7 +12,7 @@ var _portrait = require("./portrait.config");
|
|
|
12
12
|
var _profile = _interopRequireDefault(require("../profile/profile.config"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
const StyledPortraitInitials = exports.StyledPortraitInitials = _styledComponents.default.div`
|
|
15
|
-
font-weight:
|
|
15
|
+
font-weight: 500;
|
|
16
16
|
font-size: ${({
|
|
17
17
|
size
|
|
18
18
|
}) => _profile.default[size].initialSize};
|
|
@@ -13,7 +13,7 @@ var _link = _interopRequireDefault(require("../link"));
|
|
|
13
13
|
var _portrait2 = require("../portrait/portrait.style");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
const ProfileNameStyle = exports.ProfileNameStyle = _styledComponents.default.span`
|
|
16
|
-
font-weight:
|
|
16
|
+
font-weight: 500;
|
|
17
17
|
font-size: ${({
|
|
18
18
|
size = "M"
|
|
19
19
|
}) => _profile.default[size].nameSize};
|
|
@@ -80,7 +80,7 @@ const fontSizes = {
|
|
|
80
80
|
};
|
|
81
81
|
const StyledValue = exports.StyledValue = _styledComponents.default.span`
|
|
82
82
|
display: inline-block;
|
|
83
|
-
font-weight:
|
|
83
|
+
font-weight: 500;
|
|
84
84
|
`;
|
|
85
85
|
const StyledDescription = exports.StyledDescription = _styledComponents.default.span`
|
|
86
86
|
color: var(--colorsUtilityYin055);
|
|
@@ -35,7 +35,7 @@ const StyledSearch = _styledComponents.default.div`
|
|
|
35
35
|
background-color: transparent;
|
|
36
36
|
display: inline-flex;
|
|
37
37
|
font-size: var(--fontSize100);
|
|
38
|
-
font-weight:
|
|
38
|
+
font-weight: 500;
|
|
39
39
|
|
|
40
40
|
${!showSearchButton && (0, _styledComponents.css)`
|
|
41
41
|
border-bottom: var(--spacing025) solid ${variantColor};
|
|
@@ -116,7 +116,7 @@ const StyledSearch = _styledComponents.default.div`
|
|
|
116
116
|
|
|
117
117
|
flex: 1;
|
|
118
118
|
font-size: var(--fontSize100);
|
|
119
|
-
font-weight:
|
|
119
|
+
font-weight: 500;
|
|
120
120
|
padding-bottom: var(--spacing025);
|
|
121
121
|
padding-top: 1px;
|
|
122
122
|
cursor: pointer;
|
|
@@ -71,7 +71,7 @@ const StyledSelectListTableHeader = exports.StyledSelectListTableHeader = _style
|
|
|
71
71
|
padding: var(--spacing200);
|
|
72
72
|
background-color: white;
|
|
73
73
|
text-align: left;
|
|
74
|
-
font-weight:
|
|
74
|
+
font-weight: 500;
|
|
75
75
|
font-size: 12px;
|
|
76
76
|
text-transform: uppercase;
|
|
77
77
|
color: var(--colorsUtilityYin055);
|
|
@@ -28,7 +28,7 @@ const StyledSelectText = exports.StyledSelectText = _styledComponents.default.sp
|
|
|
28
28
|
padding-left: ${_inputSizes.default[size].horizontalPadding};
|
|
29
29
|
|
|
30
30
|
${transparent && (0, _styledComponents.css)`
|
|
31
|
-
font-weight:
|
|
31
|
+
font-weight: 500;
|
|
32
32
|
text-align: right;
|
|
33
33
|
flex-direction: row-reverse;
|
|
34
34
|
`}
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const MatchingText = _styledComponents.default.span`
|
|
10
|
-
font-weight:
|
|
10
|
+
font-weight: 500;
|
|
11
11
|
text-decoration: underline;
|
|
12
12
|
`;
|
|
13
13
|
var _default = exports.default = MatchingText;
|