carbon-react 144.3.0 → 144.4.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__/utils/helpers/events/composedPath.js +1 -6
- package/esm/__internal__/utils/helpers/events/events.js +1 -1
- package/esm/components/action-popover/action-popover.style.js +8 -8
- package/esm/components/breadcrumbs/crumb/crumb.style.js +2 -2
- package/esm/components/button-toggle/button-toggle.style.js +19 -19
- package/esm/components/card/card.config.d.ts +2 -2
- package/esm/components/date/__internal__/date-picker/day-picker.style.js +6 -2
- package/esm/components/dialog/dialog.component.d.ts +1 -1
- package/esm/components/dialog/dialog.config.d.ts +1 -1
- package/esm/components/dialog/dialog.style.js +2 -2
- package/esm/components/drawer/drawer.style.js +16 -16
- package/esm/components/flat-table/flat-table.style.js +9 -9
- package/esm/components/form/form.config.d.ts +1 -1
- package/esm/components/hr/hr.component.d.ts +1 -0
- package/esm/components/loader-spinner/loader-spinner.config.d.ts +2 -2
- package/esm/components/loader-spinner/loader-spinner.style.js +5 -5
- package/esm/components/loader-star/internal/star.component.d.ts +1 -0
- package/esm/components/loader-star/loader-star.component.d.ts +1 -0
- package/esm/components/menu/menu-segment-title/menu-segment-title.component.d.ts +1 -1
- package/esm/components/note/note.component.d.ts +1 -1
- package/esm/components/note/note.component.js +10 -2
- package/esm/components/note/note.style.d.ts +2 -2
- package/esm/components/note/note.style.js +7 -4
- package/esm/components/numeral-date/numeral-date.component.d.ts +1 -1
- package/esm/components/pager/pager.style.js +2 -2
- package/esm/components/pod/pod.config.d.ts +3 -3
- package/esm/components/pod/pod.style.js +34 -34
- package/esm/components/progress-tracker/progress-tracker.style.js +2 -2
- package/esm/components/select/__internal__/list-action-button/list-action-button.style.js +3 -1
- package/esm/components/switch/switch.style.js +8 -8
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +2 -1
- package/esm/components/textbox/textbox.style.js +8 -8
- package/esm/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +1 -0
- package/esm/components/tile/tile.component.d.ts +1 -1
- package/esm/components/typography/typography.component.d.ts +1 -1
- package/esm/components/typography/typography.style.js +1 -1
- package/esm/components/vertical-divider/vertical-divider.component.d.ts +1 -0
- package/esm/global.d.ts +1 -1
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +1 -0
- package/esm/style/utils/box-gap.d.ts +1 -1
- package/lib/__internal__/utils/helpers/events/composedPath.js +1 -6
- package/lib/__internal__/utils/helpers/events/events.js +1 -1
- package/lib/components/action-popover/action-popover.style.js +8 -8
- package/lib/components/breadcrumbs/crumb/crumb.style.js +2 -2
- package/lib/components/button-toggle/button-toggle.style.js +19 -19
- package/lib/components/card/card.config.d.ts +2 -2
- package/lib/components/date/__internal__/date-picker/day-picker.style.js +6 -2
- package/lib/components/dialog/dialog.component.d.ts +1 -1
- package/lib/components/dialog/dialog.config.d.ts +1 -1
- package/lib/components/dialog/dialog.style.js +2 -2
- package/lib/components/drawer/drawer.style.js +16 -16
- package/lib/components/flat-table/flat-table.style.js +9 -9
- package/lib/components/form/form.config.d.ts +1 -1
- package/lib/components/hr/hr.component.d.ts +1 -0
- package/lib/components/loader-spinner/loader-spinner.config.d.ts +2 -2
- package/lib/components/loader-spinner/loader-spinner.style.js +5 -5
- package/lib/components/loader-star/internal/star.component.d.ts +1 -0
- package/lib/components/loader-star/loader-star.component.d.ts +1 -0
- package/lib/components/menu/menu-segment-title/menu-segment-title.component.d.ts +1 -1
- package/lib/components/note/note.component.d.ts +1 -1
- package/lib/components/note/note.component.js +9 -1
- package/lib/components/note/note.style.d.ts +2 -2
- package/lib/components/note/note.style.js +7 -4
- package/lib/components/numeral-date/numeral-date.component.d.ts +1 -1
- package/lib/components/pager/pager.style.js +2 -2
- package/lib/components/pod/pod.config.d.ts +3 -3
- package/lib/components/pod/pod.style.js +34 -34
- package/lib/components/progress-tracker/progress-tracker.style.js +2 -2
- package/lib/components/select/__internal__/list-action-button/list-action-button.style.js +3 -1
- package/lib/components/switch/switch.style.js +8 -8
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +2 -1
- package/lib/components/textbox/textbox.style.js +8 -8
- package/lib/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +1 -0
- package/lib/components/tile/tile.component.d.ts +1 -1
- package/lib/components/typography/typography.component.d.ts +1 -1
- package/lib/components/typography/typography.style.js +1 -1
- package/lib/components/vertical-divider/vertical-divider.component.d.ts +1 -0
- package/lib/global.d.ts +1 -1
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +1 -0
- package/lib/style/utils/box-gap.d.ts +1 -1
- package/package.json +3 -10
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
// https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
|
|
6
6
|
export default ev => {
|
|
7
|
-
// When testing with enzyme, we want to trigger a listener on an element but pretend
|
|
8
|
-
// that it bubbled from the enzymeTestingTarget
|
|
9
|
-
// e.g. document.dispatchEvent(new MouseClick('click', {
|
|
10
|
-
// detail: {enzymeTestingTarget: document.body}
|
|
11
|
-
// }))
|
|
12
7
|
// In this example composedPath would show that the event started at document.body
|
|
13
8
|
// but it would trigger the eventListener on document
|
|
14
|
-
let element = ev.
|
|
9
|
+
let element = ev.target || null;
|
|
15
10
|
if (!element || !element.parentElement) {
|
|
16
11
|
return [];
|
|
17
12
|
}
|
|
@@ -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.
|
|
111
|
+
return ev.composedPath?.() || composedPath(ev);
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
export default Events;
|
|
@@ -88,18 +88,18 @@ const StyledMenuItem = styled.button`
|
|
|
88
88
|
childHasSubmenu,
|
|
89
89
|
hasSubmenu
|
|
90
90
|
}) => css`
|
|
91
|
-
|
|
91
|
+
justify-content: ${horizontalAlignment === "left" ? "flex-start" : "flex-end"};
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
${horizontalAlignment === "left" && submenuPosition === "right" && css`
|
|
94
|
+
justify-content: space-between;
|
|
95
|
+
`}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`}
|
|
97
|
+
${horizontalAlignment === "right" && submenuPosition === "left" && css`
|
|
98
|
+
${childHasSubmenu && hasSubmenu && css`
|
|
99
|
+
justify-content: space-between;
|
|
101
100
|
`}
|
|
102
101
|
`}
|
|
102
|
+
`}
|
|
103
103
|
|
|
104
104
|
text-decoration: none;
|
|
105
105
|
background-color: var(--colorsActionMajorYang100);
|
|
@@ -30,8 +30,8 @@ export const Divider = styled.span`
|
|
|
30
30
|
${({
|
|
31
31
|
isDarkBackground
|
|
32
32
|
}) => css`
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
color: ${isDarkBackground ? "var(--colorsUtilityYang100)" : "var(--colorsUtilityYin055)"};
|
|
34
|
+
`}
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
export default {
|
|
@@ -162,32 +162,32 @@ const StyledButtonToggleWrapper = styled.div`
|
|
|
162
162
|
${({
|
|
163
163
|
grouped
|
|
164
164
|
}) => css`
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
165
|
+
${!grouped && css`
|
|
166
|
+
&&&& {
|
|
167
|
+
${StyledButtonToggle} {
|
|
168
|
+
border-radius: var(--borderRadius050);
|
|
170
169
|
}
|
|
171
|
-
|
|
170
|
+
}
|
|
171
|
+
`}
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
173
|
+
${grouped && css`
|
|
174
|
+
&&&& {
|
|
175
|
+
:first-of-type {
|
|
176
|
+
${StyledButtonToggle} {
|
|
177
|
+
border-top-left-radius: var(--borderRadius050);
|
|
178
|
+
border-bottom-left-radius: var(--borderRadius050);
|
|
180
179
|
}
|
|
180
|
+
}
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
182
|
+
:last-of-type {
|
|
183
|
+
${StyledButtonToggle} {
|
|
184
|
+
border-top-right-radius: var(--borderRadius050);
|
|
185
|
+
border-bottom-right-radius: var(--borderRadius050);
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
|
-
|
|
188
|
+
}
|
|
190
189
|
`}
|
|
190
|
+
`}
|
|
191
191
|
|
|
192
192
|
${({
|
|
193
193
|
grouped
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const CARD_SPACING: readonly ["small", "medium", "large"];
|
|
2
2
|
export declare const CARD_ALIGNS: readonly ["left", "center", "right"];
|
|
3
|
-
export declare type CardAlign = typeof CARD_ALIGNS[number];
|
|
4
|
-
export declare type CardSpacing = typeof CARD_SPACING[number];
|
|
3
|
+
export declare type CardAlign = (typeof CARD_ALIGNS)[number];
|
|
4
|
+
export declare type CardSpacing = (typeof CARD_SPACING)[number];
|
|
@@ -312,13 +312,17 @@ const StyledDayPicker = styled.div`
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(
|
|
315
|
+
.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(
|
|
316
|
+
.DayPicker-Day--outside
|
|
317
|
+
) {
|
|
316
318
|
background-color: var(--colorsActionMajor500);
|
|
317
319
|
color: var(--colorsUtilityYang100);
|
|
318
320
|
border-radius: var(--borderRadius400);
|
|
319
321
|
}
|
|
320
322
|
|
|
321
|
-
.DayPicker-Day--selected.DayPicker-Day--disabled:not(
|
|
323
|
+
.DayPicker-Day--selected.DayPicker-Day--disabled:not(
|
|
324
|
+
.DayPicker-Day--outside
|
|
325
|
+
) {
|
|
322
326
|
background-color: var(--colorsActionMajor500);
|
|
323
327
|
color: var(--colorsUtilityYang100);
|
|
324
328
|
}
|
|
@@ -4,7 +4,7 @@ import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
|
4
4
|
import { DialogSizes } from "./dialog.config";
|
|
5
5
|
import { CustomRefObject } from "../../__internal__/focus-trap";
|
|
6
6
|
declare const PADDING_VALUES: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8];
|
|
7
|
-
declare type PaddingValues = typeof PADDING_VALUES[number];
|
|
7
|
+
declare type PaddingValues = (typeof PADDING_VALUES)[number];
|
|
8
8
|
export interface ContentPaddingInterface {
|
|
9
9
|
p?: PaddingValues;
|
|
10
10
|
py?: PaddingValues;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const DIALOG_SIZES: readonly ["auto", "extra-small", "small", "medium-small", "medium", "medium-large", "large", "extra-large", "maximise"];
|
|
2
|
-
export declare type DialogSizes = typeof DIALOG_SIZES[number];
|
|
2
|
+
export declare type DialogSizes = (typeof DIALOG_SIZES)[number];
|
|
@@ -31,26 +31,26 @@ const StyledDrawerSidebar = styled(Box)`
|
|
|
31
31
|
hasControls,
|
|
32
32
|
isExpanded
|
|
33
33
|
}) => css`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
${!isExpanded && css`
|
|
35
|
+
display: none;
|
|
36
|
+
opacity: 0;
|
|
37
|
+
`}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
${isExpanded && css`
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
flex: 1 1 0%;
|
|
43
|
+
`}
|
|
44
44
|
|
|
45
45
|
${hasControls && css`
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
`}
|
|
46
|
+
${StyledTabs} {
|
|
47
|
+
margin-top: 48px;
|
|
48
|
+
${!isExpanded && css`
|
|
49
|
+
display: none;
|
|
50
|
+
`}
|
|
51
|
+
}
|
|
53
52
|
`}
|
|
53
|
+
`}
|
|
54
54
|
|
|
55
55
|
&::-webkit-scrollbar {
|
|
56
56
|
width: 12px;
|
|
@@ -128,20 +128,20 @@ const StyledFlatTableWrapper = styled(StyledBox)`
|
|
|
128
128
|
theme,
|
|
129
129
|
isFocused
|
|
130
130
|
}) => css`
|
|
131
|
-
|
|
131
|
+
box-sizing: border-box;
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
/* istanbul ignore next */
|
|
134
|
+
${theme.focusRedesignOptOut && isFocused && /* istanbul ignore next */
|
|
135
135
|
css`
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
${oldFocusStyling}
|
|
137
|
+
`}
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
${!theme.focusRedesignOptOut && isFocused && css`
|
|
140
|
+
${addFocusStyling()}
|
|
141
|
+
`}
|
|
142
142
|
|
|
143
143
|
${isInSidebar ? "min-width: fit-content;" : ""}
|
|
144
|
-
|
|
144
|
+
`}
|
|
145
145
|
|
|
146
146
|
${({
|
|
147
147
|
colorTheme
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const FORM_BUTTON_ALIGNMENTS: readonly ["left", "right"];
|
|
2
|
-
export declare type FormButtonAlignment = typeof FORM_BUTTON_ALIGNMENTS[number];
|
|
2
|
+
export declare type FormButtonAlignment = (typeof FORM_BUTTON_ALIGNMENTS)[number];
|
|
3
3
|
export declare const formSpacing: {
|
|
4
4
|
0: string;
|
|
5
5
|
1: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const LOADER_SPINNER_VARIANTS: readonly ["action", "neutral", "inverse", "gradient-grey", "gradient-white"];
|
|
2
|
-
declare type LoaderSpinnerVariants = typeof LOADER_SPINNER_VARIANTS[number];
|
|
2
|
+
declare type LoaderSpinnerVariants = (typeof LOADER_SPINNER_VARIANTS)[number];
|
|
3
3
|
declare const LOADER_SPINNER_SIZES: readonly ["extra-small", "small", "medium", "large", "extra-large"];
|
|
4
|
-
declare type LoaderSpinnerSizes = typeof LOADER_SPINNER_SIZES[number];
|
|
4
|
+
declare type LoaderSpinnerSizes = (typeof LOADER_SPINNER_SIZES)[number];
|
|
5
5
|
declare type LoaderSpinnerSizeParams = Record<LoaderSpinnerSizes, {
|
|
6
6
|
wrapperDimensions: number;
|
|
7
7
|
strokeWidth: number;
|
|
@@ -27,11 +27,11 @@ export const StyledLabel = styled(Typography)`
|
|
|
27
27
|
${({
|
|
28
28
|
size
|
|
29
29
|
}) => css`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
text-align: center;
|
|
33
|
+
${size === "extra-small" ? "margin-left: var(--spacing100)" : `margin-top: ${LOADER_SPINNER_SIZE_PARAMS[size].labelMarginTop}px`};
|
|
34
|
+
`}
|
|
35
35
|
`;
|
|
36
36
|
export const StyledSpinnerCircleSvg = styled.svg`
|
|
37
37
|
${({
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { VariantType } from "../menu-item";
|
|
3
3
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
4
4
|
declare const AS_VALUES: readonly ["h2", "h3", "h4", "h5", "h6"];
|
|
5
|
-
declare type AllowedAsValues = typeof AS_VALUES[number];
|
|
5
|
+
declare type AllowedAsValues = (typeof AS_VALUES)[number];
|
|
6
6
|
export interface MenuTitleProps extends TagProps {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
text: string;
|
|
@@ -20,7 +20,7 @@ export interface NoteProps extends MarginProps {
|
|
|
20
20
|
timeStamp: string;
|
|
21
21
|
};
|
|
22
22
|
/** Adds a Title to the Note */
|
|
23
|
-
title?:
|
|
23
|
+
title?: React.ReactNode;
|
|
24
24
|
/** Set a percentage-based width for the whole Note component, relative to its parent. */
|
|
25
25
|
width?: number;
|
|
26
26
|
}
|
|
@@ -3,12 +3,13 @@ import React from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Editor } from "draft-js";
|
|
5
5
|
import invariant from "invariant";
|
|
6
|
-
import { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl,
|
|
6
|
+
import { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl, StyledTitleWrapper, StyledFooter, StyledFooterContent } from "./note.style";
|
|
7
7
|
import StatusIcon from "./__internal__/status-icon";
|
|
8
8
|
import { ActionPopover } from "../action-popover";
|
|
9
9
|
import { getDecoratedValue } from "../text-editor/__internal__/utils";
|
|
10
10
|
import EditorContext from "../text-editor/__internal__/editor.context";
|
|
11
11
|
import LinkPreview from "../link-preview";
|
|
12
|
+
import Typography from "../typography";
|
|
12
13
|
function hasExpectedDisplayName(child, displayName) {
|
|
13
14
|
return child.type.displayName === displayName;
|
|
14
15
|
}
|
|
@@ -50,7 +51,14 @@ export const Note = ({
|
|
|
50
51
|
width: width
|
|
51
52
|
}, rest, {
|
|
52
53
|
"data-component": "note"
|
|
53
|
-
}), /*#__PURE__*/React.createElement(StyledNoteMain, null, /*#__PURE__*/React.createElement(StyledNoteContent, null, title &&
|
|
54
|
+
}), /*#__PURE__*/React.createElement(StyledNoteMain, null, /*#__PURE__*/React.createElement(StyledNoteContent, null, title && (typeof title === "string" ? /*#__PURE__*/React.createElement(Typography, {
|
|
55
|
+
"data-role": "note-title",
|
|
56
|
+
fontWeight: "700",
|
|
57
|
+
fontSize: "16px",
|
|
58
|
+
lineHeight: "21px",
|
|
59
|
+
paddingBottom: "16px",
|
|
60
|
+
variant: "h2"
|
|
61
|
+
}, title) : /*#__PURE__*/React.createElement(StyledTitleWrapper, null, title)), /*#__PURE__*/React.createElement(Editor, {
|
|
54
62
|
readOnly: true,
|
|
55
63
|
editorState: getDecoratedValue(noteContent),
|
|
56
64
|
onChange: /* istanbul ignore next */() => {}
|
|
@@ -3,7 +3,7 @@ declare const StyledNoteContent: import("styled-components").StyledComponent<"di
|
|
|
3
3
|
}, never>;
|
|
4
4
|
declare const StyledNoteMain: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
declare const StyledInlineControl: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
-
declare const
|
|
6
|
+
declare const StyledTitleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
declare const StyledFooterContent: import("styled-components").StyledComponent<"div", any, {
|
|
8
8
|
hasName: boolean;
|
|
9
9
|
}, never>;
|
|
@@ -11,4 +11,4 @@ declare const StyledFooter: import("styled-components").StyledComponent<"div", a
|
|
|
11
11
|
declare const StyledNote: import("styled-components").StyledComponent<"div", any, {
|
|
12
12
|
width: number;
|
|
13
13
|
}, never>;
|
|
14
|
-
export { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl,
|
|
14
|
+
export { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl, StyledTitleWrapper, StyledFooter, StyledFooterContent, };
|
|
@@ -2,6 +2,7 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import { margin } from "styled-system";
|
|
3
3
|
import baseTheme from "../../style/themes/base";
|
|
4
4
|
import { StyledLinkPreview } from "../link-preview/link-preview.style";
|
|
5
|
+
import { VARIANT_TYPES } from "../typography/typography.component";
|
|
5
6
|
const StyledNoteContent = styled.div`
|
|
6
7
|
position: relative;
|
|
7
8
|
width: 100%;
|
|
@@ -11,13 +12,11 @@ const StyledNoteContent = styled.div`
|
|
|
11
12
|
}) => css`
|
|
12
13
|
div.DraftEditor-root {
|
|
13
14
|
min-height: inherit;
|
|
14
|
-
height: 100%;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
div.DraftEditor-editorContainer,
|
|
18
18
|
div.public-DraftEditor-content {
|
|
19
19
|
min-height: inherit;
|
|
20
|
-
height: 100%;
|
|
21
20
|
background-color: var(--colorsUtilityYang100);
|
|
22
21
|
line-height: 21px;
|
|
23
22
|
}
|
|
@@ -40,11 +39,15 @@ const StyledInlineControl = styled.div`
|
|
|
40
39
|
display: inline-block;
|
|
41
40
|
min-width: fit-content;
|
|
42
41
|
`;
|
|
43
|
-
const
|
|
42
|
+
const StyledTitleWrapper = styled.div`
|
|
43
|
+
${VARIANT_TYPES.map(variant => `
|
|
44
|
+
${variant}{
|
|
44
45
|
font-weight: 700;
|
|
45
46
|
font-size: 16px;
|
|
46
47
|
line-height: 21px;
|
|
47
48
|
padding-bottom: 16px;
|
|
49
|
+
}
|
|
50
|
+
`)}
|
|
48
51
|
`;
|
|
49
52
|
const StyledFooterContent = styled.div`
|
|
50
53
|
line-height: 21px;
|
|
@@ -128,4 +131,4 @@ const StyledNote = styled.div`
|
|
|
128
131
|
StyledNote.defaultProps = {
|
|
129
132
|
theme: baseTheme
|
|
130
133
|
};
|
|
131
|
-
export { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl,
|
|
134
|
+
export { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl, StyledTitleWrapper, StyledFooter, StyledFooterContent };
|
|
@@ -93,6 +93,6 @@ export interface NumeralDateProps<DateType extends NumeralDateObject = FullDate>
|
|
|
93
93
|
/** Flag to configure component as optional. */
|
|
94
94
|
isOptional?: boolean;
|
|
95
95
|
}
|
|
96
|
-
export declare type ValidDateFormat = typeof ALLOWED_DATE_FORMATS[number];
|
|
96
|
+
export declare type ValidDateFormat = (typeof ALLOWED_DATE_FORMATS)[number];
|
|
97
97
|
export declare const NumeralDate: <DateType extends NumeralDateObject = FullDate>({ dateFormat, defaultValue, disabled, error, warning, "data-component": dataComponent, "data-element": dataElement, "data-role": dataRole, info, id, name, onBlur, onChange, value, validationOnLabel, label, labelInline, labelWidth, labelAlign, labelHelp, labelSpacing, fieldHelp, adaptiveLabelBreakpoint, required, isOptional, readOnly, size, enableInternalError, enableInternalWarning, tooltipPosition, helpAriaLabel, dayRef, monthRef, yearRef, ...rest }: NumeralDateProps<DateType>) => React.JSX.Element;
|
|
98
98
|
export default NumeralDate;
|
|
@@ -27,8 +27,8 @@ const StyledPagerContainer = styled.div`
|
|
|
27
27
|
${({
|
|
28
28
|
variant
|
|
29
29
|
}) => css`
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
background-color: ${variant === "alternate" ? "var(--colorsUtilityMajor040)" : "var(--colorsUtilityMajor010)"};
|
|
31
|
+
`}
|
|
32
32
|
`;
|
|
33
33
|
const StyledPagerSizeOptions = styled.div`
|
|
34
34
|
display: flex;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const POD_SIZES: readonly ["extra-small", "small", "medium", "large", "extra-large"];
|
|
2
2
|
export declare const POD_ALIGNMENTS: readonly ["left", "center", "right"];
|
|
3
3
|
export declare const POD_VARIANTS: readonly ["primary", "secondary", "tertiary", "tile", "transparent"];
|
|
4
|
-
export declare type PodSize = typeof POD_SIZES[number];
|
|
5
|
-
export declare type PodAlignment = typeof POD_ALIGNMENTS[number];
|
|
6
|
-
export declare type PodVariant = typeof POD_VARIANTS[number];
|
|
4
|
+
export declare type PodSize = (typeof POD_SIZES)[number];
|
|
5
|
+
export declare type PodAlignment = (typeof POD_ALIGNMENTS)[number];
|
|
6
|
+
export declare type PodVariant = (typeof POD_VARIANTS)[number];
|
|
@@ -39,52 +39,52 @@ const StyledBlock = styled.div`
|
|
|
39
39
|
isHovered,
|
|
40
40
|
isFocused
|
|
41
41
|
}) => css`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
border-radius: var(--borderRadius100);
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
background-color: ${blockBackgrounds[variant]};
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
${variant === "tile" && "box-shadow: 0 2px 3px 0 rgba(2, 18, 36, 0.2)"};
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
${noBorder ? "border: none" : `border: 1px solid var(--colorsUtilityMajor100)`};
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
${hasButtons && !(fullWidth || internalEditButton) && "width: auto;"};
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
${contentTriggersEdit && "cursor: pointer"};
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
${(isHovered || isFocused) && css`
|
|
59
|
+
background-color: var(--colorsUtilityMajor075);
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
${internalEditButton && variant === "tile" && "background-color: var(--colorsUtilityMajorTransparent);"}
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`}
|
|
63
|
+
${contentTriggersEdit && css`
|
|
64
|
+
background-color: var(--colorsActionMajor600);
|
|
65
|
+
* {
|
|
66
|
+
color: var(--colorsUtilityYang100);
|
|
67
|
+
}
|
|
69
68
|
`}
|
|
69
|
+
`}
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
${(!internalEditButton || contentTriggersEdit) && (isFocused ? css`
|
|
72
|
+
outline: 3px solid var(--colorsSemanticFocus500);
|
|
73
|
+
border: none;
|
|
74
|
+
padding: ${noBorder ? 0 : 1}px;
|
|
75
|
+
` : css`
|
|
76
|
+
outline: none;
|
|
77
|
+
`)}
|
|
78
78
|
|
|
79
79
|
${softDelete && css`
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
border: none;
|
|
81
|
+
background-color: var(--colorsActionDisabled500);
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
& > * {
|
|
84
|
+
color: var(--colorsUtilityYin065);
|
|
85
|
+
}
|
|
86
|
+
`};
|
|
87
|
+
`}
|
|
88
88
|
`;
|
|
89
89
|
const contentPaddings = {
|
|
90
90
|
"extra-small": "8px",
|
|
@@ -4,7 +4,9 @@ const StyledListActionButtonWrapper = styled.div`
|
|
|
4
4
|
padding-top: var(--spacing100);
|
|
5
5
|
padding-bottom: var(--spacing100);
|
|
6
6
|
border-top: 1px solid var(--colorsUtilityDisabled600);
|
|
7
|
-
box-shadow:
|
|
7
|
+
box-shadow:
|
|
8
|
+
0 0px 0 0 rgba(0, 0, 0, 0),
|
|
9
|
+
0 -8px 8px 0 rgba(0, 0, 0, 0.03);
|
|
8
10
|
width: 100%;
|
|
9
11
|
position: sticky;
|
|
10
12
|
bottom: 0;
|
|
@@ -16,14 +16,14 @@ export const ErrorBorder = styled.span`
|
|
|
16
16
|
${({
|
|
17
17
|
warning
|
|
18
18
|
}) => css`
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
position: absolute;
|
|
20
|
+
z-index: 6;
|
|
21
|
+
width: 2px;
|
|
22
|
+
background-color: ${warning ? "var(--colorsSemanticCaution500)" : "var(--colorsSemanticNegative500)"};
|
|
23
|
+
left: -12px;
|
|
24
|
+
bottom: -4px;
|
|
25
|
+
top: 2px;
|
|
26
|
+
`}
|
|
27
27
|
`;
|
|
28
28
|
export const StyledHintText = styled.div`
|
|
29
29
|
margin-top: 8px;
|
package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js
CHANGED
|
@@ -20,7 +20,8 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef(({
|
|
|
20
20
|
onKeyDown: onKeyDown,
|
|
21
21
|
onMouseDown: onMouseDown,
|
|
22
22
|
isActive: activated,
|
|
23
|
-
"aria-label": ariaLabel
|
|
23
|
+
"aria-label": ariaLabel,
|
|
24
|
+
"aria-pressed": activated
|
|
24
25
|
}, !tabbable && {
|
|
25
26
|
tabIndex: -1
|
|
26
27
|
}, {
|
|
@@ -4,14 +4,14 @@ const ErrorBorder = styled.span`
|
|
|
4
4
|
warning,
|
|
5
5
|
inline
|
|
6
6
|
}) => css`
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
position: absolute;
|
|
8
|
+
z-index: 6;
|
|
9
|
+
width: 2px;
|
|
10
|
+
background-color: ${warning ? "var(--colorsSemanticCaution500)" : "var(--colorsSemanticNegative500)"};
|
|
11
|
+
left: -12px;
|
|
12
|
+
bottom: ${inline ? "10px" : "0px"};
|
|
13
|
+
top: 0px;
|
|
14
|
+
`}
|
|
15
15
|
`;
|
|
16
16
|
const StyledHintText = styled.div`
|
|
17
17
|
::after {
|
|
@@ -4,7 +4,7 @@ import { SpaceProps, WidthProps } from "styled-system";
|
|
|
4
4
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
5
|
import { TILE_HIGHLIGHT_VARIANTS } from "./tile.config";
|
|
6
6
|
declare type DesignTokensType = keyof typeof DesignTokens;
|
|
7
|
-
declare type HighlightVariantType = typeof TILE_HIGHLIGHT_VARIANTS[number];
|
|
7
|
+
declare type HighlightVariantType = (typeof TILE_HIGHLIGHT_VARIANTS)[number];
|
|
8
8
|
export interface TileProps extends SpaceProps, WidthProps, TagProps {
|
|
9
9
|
/** Sets the theme of the tile */
|
|
10
10
|
variant?: "tile" | "transparent" | "active" | "grey";
|