carbon-react 118.1.1 → 118.2.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__/input/input-presentation.style.js +1 -0
- package/esm/__internal__/input/input.style.js +1 -0
- package/esm/components/action-popover/action-popover.style.js +3 -0
- package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -0
- package/esm/components/advanced-color-picker/advanced-color-picker.style.js +1 -0
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +6 -2
- package/esm/components/badge/badge.style.js +1 -1
- package/esm/components/batch-selection/batch-selection.style.js +6 -0
- package/esm/components/box/box.component.d.ts +3 -0
- package/esm/components/box/box.component.js +4 -0
- package/esm/components/button/button.style.js +10 -9
- package/esm/components/button-bar/button-bar.style.js +19 -0
- package/esm/components/button-minor/button-minor.style.js +42 -40
- package/esm/components/button-toggle/button-toggle.component.js +2 -1
- package/esm/components/button-toggle/button-toggle.style.d.ts +1 -0
- package/esm/components/button-toggle/button-toggle.style.js +31 -13
- package/esm/components/button-toggle-group/button-toggle-group.style.js +21 -3
- package/esm/components/card/__internal__/card-context/index.d.ts +7 -0
- package/esm/components/card/__internal__/card-context/index.js +2 -0
- package/esm/components/card/card-footer/card-footer.component.js +9 -2
- package/esm/components/card/card-footer/card-footer.style.d.ts +2 -1
- package/esm/components/card/card-footer/card-footer.style.js +10 -1
- package/esm/components/card/card.component.d.ts +3 -2
- package/esm/components/card/card.component.js +10 -1
- package/esm/components/card/card.style.d.ts +2 -1
- package/esm/components/card/card.style.js +3 -1
- package/esm/components/carousel/carousel.component.js +1 -1
- package/esm/components/carousel/carousel.style.js +4 -2
- package/esm/components/carousel/slide/slide.style.js +2 -0
- package/esm/components/checkbox/checkbox.style.js +2 -0
- package/esm/components/date/__internal__/date-picker/day-picker.style.js +4 -0
- package/esm/components/date/__internal__/navbar/button.style.js +2 -0
- package/esm/components/dialog/dialog.style.js +5 -0
- package/esm/components/dismissible-box/dismissible-box.component.d.ts +1 -1
- package/esm/components/dismissible-box/dismissible-box.component.js +4 -1
- package/esm/components/drawer/drawer.style.js +1 -0
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.js +20 -0
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +7 -0
- package/esm/components/flat-table/flat-table.component.js +56 -2
- package/esm/components/flat-table/flat-table.style.js +101 -1
- package/esm/components/flat-table/sort/sort.style.js +1 -0
- package/esm/components/icon-button/icon-button.style.js +1 -0
- package/esm/components/inline-inputs/inline-inputs.style.js +18 -0
- package/esm/components/link/link.style.js +1 -0
- package/esm/components/link-preview/__internal__/placeholder.component.d.ts +3 -1
- package/esm/components/link-preview/__internal__/placeholder.component.js +4 -1
- package/esm/components/link-preview/link-preview.style.js +1 -0
- package/esm/components/loader/loader-square.style.js +5 -0
- package/esm/components/loader-bar/loader-bar.style.js +1 -0
- package/esm/components/menu/__internal__/submenu/submenu.style.js +13 -0
- package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +18 -0
- package/esm/components/menu/menu-item/menu-item.component.js +1 -1
- package/esm/components/menu/menu-item/menu-item.style.js +13 -11
- package/esm/components/menu/menu.style.js +13 -6
- package/esm/components/menu/scrollable-block/scrollable-block.style.js +15 -0
- package/esm/components/message/message.style.js +2 -0
- package/esm/components/multi-action-button/multi-action-button.style.js +4 -0
- package/esm/components/note/note.style.js +1 -0
- package/esm/components/numeral-date/numeral-date.component.js +2 -0
- package/esm/components/numeral-date/numeral-date.style.d.ts +1 -0
- package/esm/components/numeral-date/numeral-date.style.js +12 -0
- package/esm/components/pager/pager.style.js +2 -0
- package/esm/components/pill/pill.style.js +5 -15
- package/esm/components/pod/pod.style.js +6 -0
- package/esm/components/popover-container/popover-container.style.js +1 -0
- package/esm/components/portrait/portrait-gravatar.component.js +1 -1
- package/esm/components/portrait/portrait-initials.component.js +1 -1
- package/esm/components/portrait/portrait.component.js +1 -1
- package/esm/components/portrait/portrait.style.js +1 -3
- package/esm/components/profile/profile.component.js +1 -1
- package/esm/components/progress-tracker/progress-tracker.style.js +2 -2
- package/esm/components/radio-button/radio-button.style.js +1 -1
- package/esm/components/search/search-button.style.js +5 -0
- package/esm/components/search/search.style.js +7 -0
- package/esm/components/select/select-list/select-list-container.style.js +1 -0
- package/esm/components/split-button/split-button-children.style.d.ts +1 -0
- package/esm/components/split-button/split-button-children.style.js +28 -0
- package/esm/components/split-button/split-button-toggle.style.js +6 -1
- package/esm/components/split-button/split-button.style.js +5 -2
- package/esm/components/switch/__internal__/switch-slider.style.js +1 -2
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +22 -2
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +5 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +3 -0
- package/esm/components/text-editor/text-editor.style.js +3 -0
- package/esm/components/tile/tile.component.d.ts +3 -1
- package/esm/components/tile/tile.component.js +3 -1
- package/esm/components/tile/tile.style.d.ts +1 -1
- package/esm/components/tile/tile.style.js +4 -1
- package/esm/components/tile-select/tile-select.style.d.ts +1 -0
- package/esm/components/tile-select/tile-select.style.js +8 -0
- package/esm/components/tooltip/tooltip.style.js +1 -0
- package/esm/components/vertical-menu/vertical-menu.style.js +1 -0
- package/lib/__internal__/input/input-presentation.style.js +1 -0
- package/lib/__internal__/input/input.style.js +1 -0
- package/lib/components/action-popover/action-popover.style.js +3 -0
- package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -0
- package/lib/components/advanced-color-picker/advanced-color-picker.style.js +1 -0
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +6 -2
- package/lib/components/badge/badge.style.js +1 -1
- package/lib/components/batch-selection/batch-selection.style.js +6 -0
- package/lib/components/box/box.component.d.ts +3 -0
- package/lib/components/box/box.component.js +4 -0
- package/lib/components/button/button.style.js +10 -9
- package/lib/components/button-bar/button-bar.style.js +19 -0
- package/lib/components/button-minor/button-minor.style.js +42 -40
- package/lib/components/button-toggle/button-toggle.component.js +2 -1
- package/lib/components/button-toggle/button-toggle.style.d.ts +1 -0
- package/lib/components/button-toggle/button-toggle.style.js +31 -13
- package/lib/components/button-toggle-group/button-toggle-group.style.js +21 -3
- package/lib/components/card/__internal__/card-context/index.d.ts +7 -0
- package/lib/components/card/__internal__/card-context/index.js +14 -0
- package/lib/components/card/__internal__/card-context/package.json +6 -0
- package/lib/components/card/card-footer/card-footer.component.js +14 -2
- package/lib/components/card/card-footer/card-footer.style.d.ts +2 -1
- package/lib/components/card/card-footer/card-footer.style.js +10 -1
- package/lib/components/card/card.component.d.ts +3 -2
- package/lib/components/card/card.component.js +11 -1
- package/lib/components/card/card.style.d.ts +2 -1
- package/lib/components/card/card.style.js +3 -1
- package/lib/components/carousel/carousel.component.js +1 -1
- package/lib/components/carousel/carousel.style.js +4 -2
- package/lib/components/carousel/slide/slide.style.js +2 -0
- package/lib/components/checkbox/checkbox.style.js +2 -0
- package/lib/components/date/__internal__/date-picker/day-picker.style.js +4 -0
- package/lib/components/date/__internal__/navbar/button.style.js +2 -0
- package/lib/components/dialog/dialog.style.js +5 -0
- package/lib/components/dismissible-box/dismissible-box.component.d.ts +1 -1
- package/lib/components/dismissible-box/dismissible-box.component.js +4 -1
- package/lib/components/drawer/drawer.style.js +1 -0
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +20 -0
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +7 -0
- package/lib/components/flat-table/flat-table.component.js +60 -2
- package/lib/components/flat-table/flat-table.style.js +102 -1
- package/lib/components/flat-table/sort/sort.style.js +1 -0
- package/lib/components/icon-button/icon-button.style.js +1 -0
- package/lib/components/inline-inputs/inline-inputs.style.js +18 -0
- package/lib/components/link/link.style.js +1 -0
- package/lib/components/link-preview/__internal__/placeholder.component.d.ts +3 -1
- package/lib/components/link-preview/__internal__/placeholder.component.js +6 -1
- package/lib/components/link-preview/link-preview.style.js +1 -0
- package/lib/components/loader/loader-square.style.js +5 -0
- package/lib/components/loader-bar/loader-bar.style.js +1 -0
- package/lib/components/menu/__internal__/submenu/submenu.style.js +13 -0
- package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +18 -0
- package/lib/components/menu/menu-item/menu-item.component.js +1 -1
- package/lib/components/menu/menu-item/menu-item.style.js +13 -11
- package/lib/components/menu/menu.style.js +13 -6
- package/lib/components/menu/scrollable-block/scrollable-block.style.js +18 -0
- package/lib/components/message/message.style.js +2 -0
- package/lib/components/multi-action-button/multi-action-button.style.js +5 -0
- package/lib/components/note/note.style.js +1 -0
- package/lib/components/numeral-date/numeral-date.component.js +2 -0
- package/lib/components/numeral-date/numeral-date.style.d.ts +1 -0
- package/lib/components/numeral-date/numeral-date.style.js +12 -0
- package/lib/components/pager/pager.style.js +2 -0
- package/lib/components/pill/pill.style.js +5 -15
- package/lib/components/pod/pod.style.js +6 -0
- package/lib/components/popover-container/popover-container.style.js +1 -0
- package/lib/components/portrait/portrait-gravatar.component.js +1 -1
- package/lib/components/portrait/portrait-initials.component.js +1 -1
- package/lib/components/portrait/portrait.component.js +1 -1
- package/lib/components/portrait/portrait.style.js +1 -3
- package/lib/components/profile/profile.component.js +1 -1
- package/lib/components/progress-tracker/progress-tracker.style.js +2 -2
- package/lib/components/radio-button/radio-button.style.js +1 -1
- package/lib/components/search/search-button.style.js +5 -0
- package/lib/components/search/search.style.js +7 -0
- package/lib/components/select/select-list/select-list-container.style.js +1 -0
- package/lib/components/split-button/split-button-children.style.d.ts +1 -0
- package/lib/components/split-button/split-button-children.style.js +30 -1
- package/lib/components/split-button/split-button-toggle.style.js +6 -1
- package/lib/components/split-button/split-button.style.js +5 -2
- package/lib/components/switch/__internal__/switch-slider.style.js +1 -2
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +22 -2
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +5 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +3 -0
- package/lib/components/text-editor/text-editor.style.js +3 -0
- package/lib/components/tile/tile.component.d.ts +3 -1
- package/lib/components/tile/tile.component.js +3 -1
- package/lib/components/tile/tile.style.d.ts +1 -1
- package/lib/components/tile/tile.style.js +4 -1
- package/lib/components/tile-select/tile-select.style.d.ts +1 -0
- package/lib/components/tile-select/tile-select.style.js +8 -0
- package/lib/components/tooltip/tooltip.style.js +1 -0
- package/lib/components/vertical-menu/vertical-menu.style.js +1 -0
- package/package.json +1 -1
|
@@ -33,6 +33,24 @@ const MenuFullscreen = ({
|
|
|
33
33
|
if (Events.isEscKey(ev)) {
|
|
34
34
|
onClose(ev);
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
if (Events.isTabKey(ev) && !Events.isShiftKey(ev)) {
|
|
38
|
+
var _menuWrapperRef$curre;
|
|
39
|
+
|
|
40
|
+
const search = (_menuWrapperRef$curre = menuWrapperRef.current) === null || _menuWrapperRef$curre === void 0 ? void 0 : _menuWrapperRef$curre.querySelector('[data-component="search"');
|
|
41
|
+
const searchInput = search === null || search === void 0 ? void 0 : search.querySelector("input");
|
|
42
|
+
const searchButton = search === null || search === void 0 ? void 0 : search.querySelector("button"); // if there is no value in the search input the button disappears when the input blurs
|
|
43
|
+
// this means we need to programatically set focus to the next menu item
|
|
44
|
+
|
|
45
|
+
if (searchButton && searchInput && !searchInput.value && searchInput === document.activeElement) {
|
|
46
|
+
var _menuWrapperRef$curre2, _elements;
|
|
47
|
+
|
|
48
|
+
ev.preventDefault();
|
|
49
|
+
const elements = Array.from((_menuWrapperRef$curre2 = menuWrapperRef.current) === null || _menuWrapperRef$curre2 === void 0 ? void 0 : _menuWrapperRef$curre2.querySelectorAll("a, input, button"));
|
|
50
|
+
const index = elements.indexOf(searchInput);
|
|
51
|
+
(_elements = elements[index + 2]) === null || _elements === void 0 ? void 0 : _elements.focus();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
36
54
|
};
|
|
37
55
|
|
|
38
56
|
return /*#__PURE__*/React.createElement("li", {
|
|
@@ -111,7 +111,7 @@ const MenuItem = ({
|
|
|
111
111
|
(_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focus();
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
const shouldFocusIcon = ((_inputIcon$current2 = inputIcon.current) === null || _inputIcon$current2 === void 0 ? void 0 : _inputIcon$current2.getAttribute("tabindex")) === "0" && document.activeElement === inputRef.current && ((_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value); // let natural tab order move focus if input icon is tabbable
|
|
114
|
+
const shouldFocusIcon = ((_inputIcon$current2 = inputIcon.current) === null || _inputIcon$current2 === void 0 ? void 0 : _inputIcon$current2.getAttribute("tabindex")) === "0" && document.activeElement === inputRef.current && ((_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value); // let natural tab order move focus if input icon is tabbable or input with button exists
|
|
115
115
|
|
|
116
116
|
if (Events.isTabKey(event) && (!Events.isShiftKey(event) && shouldFocusIcon || Events.isShiftKey(event) && document.activeElement === inputIcon.current)) {
|
|
117
117
|
return;
|
|
@@ -300,18 +300,20 @@ const StyledMenuItemWrapper = styled.a.attrs({
|
|
|
300
300
|
position: relative;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
303
|
+
&& {
|
|
304
|
+
a:focus,
|
|
305
|
+
a:hover,
|
|
306
|
+
button:focus,
|
|
307
|
+
button:hover {
|
|
308
|
+
background-color: var(--colorsComponentsMenuAutumnStandard600);
|
|
309
|
+
color: var(--colorsComponentsMenuYang100);
|
|
309
310
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
${!hasInput && `
|
|
312
|
+
[data-component="icon"] {
|
|
313
|
+
color: var(--colorsComponentsMenuYang100);
|
|
314
|
+
}
|
|
315
|
+
`}
|
|
316
|
+
}
|
|
315
317
|
}
|
|
316
318
|
}
|
|
317
319
|
`}
|
|
@@ -20,12 +20,16 @@ const StyledMenuWrapper = styled.ul`
|
|
|
20
20
|
display: inline-block;
|
|
21
21
|
vertical-align: bottom;
|
|
22
22
|
background-color: ${menuConfigVariants[menuType].background};
|
|
23
|
-
|
|
24
23
|
${menuType === "dark" && css`
|
|
25
|
-
|
|
24
|
+
display: inline-block;
|
|
25
|
+
vertical-align: bottom;
|
|
26
|
+
background-color: ${menuConfigVariants[menuType].background};
|
|
27
|
+
|
|
28
|
+
${menuType === "dark" && css`
|
|
29
|
+
color: ${menuConfigVariants[menuType].color};
|
|
30
|
+
`}
|
|
26
31
|
`}
|
|
27
32
|
`}
|
|
28
|
-
|
|
29
33
|
${StyledDivider} {
|
|
30
34
|
position: relative;
|
|
31
35
|
top: -1px;
|
|
@@ -35,7 +39,11 @@ const StyledMenuWrapper = styled.ul`
|
|
|
35
39
|
const StyledMenuItem = styled.li`
|
|
36
40
|
${layout}
|
|
37
41
|
${flexbox}
|
|
38
|
-
|
|
42
|
+
|
|
43
|
+
${StyledLink} a:focus, ${StyledLink} button:focus {
|
|
44
|
+
border-radius: var(--borderRadius000);
|
|
45
|
+
}
|
|
46
|
+
|
|
39
47
|
${({
|
|
40
48
|
inSubmenu
|
|
41
49
|
}) => css`
|
|
@@ -43,8 +51,7 @@ const StyledMenuItem = styled.li`
|
|
|
43
51
|
display: list-item;
|
|
44
52
|
`}
|
|
45
53
|
`}
|
|
46
|
-
|
|
47
|
-
${({
|
|
54
|
+
${({
|
|
48
55
|
inFullscreenView
|
|
49
56
|
}) => inFullscreenView && css`
|
|
50
57
|
padding-top: 16px;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import StyledMenuItemWrapper from "../menu-item/menu-item.style";
|
|
3
3
|
import menuConfigVariants from "../menu.config";
|
|
4
|
+
import Box from "../../box/box.component";
|
|
5
|
+
import { StyledMenuItem } from "../menu.style";
|
|
6
|
+
import { StyledLink } from "../../link/link.style";
|
|
4
7
|
const StyledScrollableBlock = styled.li`
|
|
5
8
|
${({
|
|
6
9
|
menuType,
|
|
@@ -9,6 +12,18 @@ const StyledScrollableBlock = styled.li`
|
|
|
9
12
|
&& ${StyledMenuItemWrapper} {
|
|
10
13
|
background-color: ${variant === "default" ? menuConfigVariants[menuType].submenuItemBackground : menuConfigVariants[menuType].alternate};
|
|
11
14
|
}
|
|
15
|
+
|
|
16
|
+
${Box} {
|
|
17
|
+
border-radius: var(--borderRadius000);
|
|
18
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
19
|
+
|
|
20
|
+
${StyledMenuItem}:last-child ${StyledLink},
|
|
21
|
+
${StyledMenuItem}:last-child a,
|
|
22
|
+
${StyledMenuItem}:last-child button {
|
|
23
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
24
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
12
27
|
`}
|
|
13
28
|
`;
|
|
14
29
|
export default StyledScrollableBlock;
|
|
@@ -4,6 +4,7 @@ import StyledButton from "../button/button.style";
|
|
|
4
4
|
import baseTheme from "../../style/themes/base";
|
|
5
5
|
import StyledIcon from "../icon/icon.style";
|
|
6
6
|
import computeWidth from "../../style/utils/width";
|
|
7
|
+
import { borderRadiusStyling } from "../split-button/split-button-children.style";
|
|
7
8
|
const StyledMultiActionButton = styled.div`
|
|
8
9
|
${margin}
|
|
9
10
|
|
|
@@ -71,12 +72,15 @@ const StyledButtonChildrenContainer = styled.div`
|
|
|
71
72
|
white-space: nowrap;
|
|
72
73
|
z-index: ${theme.zIndex.popover};
|
|
73
74
|
box-shadow: var(--boxShadow100);
|
|
75
|
+
border-radius: var(--borderRadius100);
|
|
74
76
|
|
|
75
77
|
${StyledIcon} {
|
|
76
78
|
margin-left: 0;
|
|
77
79
|
left: 8px;
|
|
78
80
|
}
|
|
79
81
|
|
|
82
|
+
${borderRadiusStyling}
|
|
83
|
+
|
|
80
84
|
${StyledButton} {
|
|
81
85
|
border: 1px solid var(--colorsActionMajorTransparent);
|
|
82
86
|
display: flex;
|
|
@@ -110,6 +110,7 @@ const StyledNote = styled.div`
|
|
|
110
110
|
}) => css`
|
|
111
111
|
background-color: var(--colorsUtilityYang100);
|
|
112
112
|
border: 1px solid var(--colorsUtilityMajor100);
|
|
113
|
+
border-radius: var(--borderRadius100);
|
|
113
114
|
display: flex;
|
|
114
115
|
flex-direction: column;
|
|
115
116
|
padding: 24px;
|
|
@@ -194,6 +194,7 @@ const NumeralDate = ({
|
|
|
194
194
|
onKeyPress: onKeyPress,
|
|
195
195
|
"data-component": "numeral-date"
|
|
196
196
|
}, dateFormat.map((datePart, index) => {
|
|
197
|
+
const isStart = index === 0;
|
|
197
198
|
const isEnd = index === dateFormat.length - 1;
|
|
198
199
|
const isMiddle = index === 1;
|
|
199
200
|
const validation = error || warning || info;
|
|
@@ -228,6 +229,7 @@ const NumeralDate = ({
|
|
|
228
229
|
}, /*#__PURE__*/React.createElement(StyledDateField, {
|
|
229
230
|
key: datePart,
|
|
230
231
|
isYearInput: datePart.length === 4,
|
|
232
|
+
isStart: isStart,
|
|
231
233
|
isMiddle: isMiddle,
|
|
232
234
|
isEnd: isEnd,
|
|
233
235
|
hasValidationIcon: hasValidationIcon
|
|
@@ -18,6 +18,7 @@ export const StyledNumeralDate = styled.div`
|
|
|
18
18
|
`;
|
|
19
19
|
export const StyledDateField = styled.div`
|
|
20
20
|
${({
|
|
21
|
+
isStart,
|
|
21
22
|
isYearInput,
|
|
22
23
|
isEnd,
|
|
23
24
|
hasValidationIcon,
|
|
@@ -29,6 +30,17 @@ export const StyledDateField = styled.div`
|
|
|
29
30
|
position: relative;
|
|
30
31
|
width: ${yearInputOrError ? "78px;" : "58px;"};
|
|
31
32
|
text-align: center;
|
|
33
|
+
border-radius: var(--borderRadius000);
|
|
34
|
+
|
|
35
|
+
${isStart && css`
|
|
36
|
+
border-top-left-radius: var(--borderRadius050);
|
|
37
|
+
border-bottom-left-radius: var(--borderRadius050);
|
|
38
|
+
`}
|
|
39
|
+
|
|
40
|
+
${isEnd && css`
|
|
41
|
+
border-top-right-radius: var(--borderRadius050);
|
|
42
|
+
border-bottom-right-radius: var(--borderRadius050);
|
|
43
|
+
`}
|
|
32
44
|
|
|
33
45
|
${(isMiddle || isEnd) && css`
|
|
34
46
|
margin-left: -1px;
|
|
@@ -30,6 +30,8 @@ const StyledPagerContainer = styled.div`
|
|
|
30
30
|
}) => css`
|
|
31
31
|
border-width: 1px 1px 1px 1px;
|
|
32
32
|
border-style: none solid solid solid;
|
|
33
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
34
|
+
border-bottom-right-radius: var(--borderRadius100);
|
|
33
35
|
border-color: var(--colorsUtilityMajor100);
|
|
34
36
|
background-color: ${variant === "alternate" ? "var(--colorsUtilityMajor040)" : "var(--colorsUtilityMajor010)"};
|
|
35
37
|
`}
|
|
@@ -60,7 +60,6 @@ const StyledPill = styled.span`
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
return css`
|
|
63
|
-
border-radius: 12px;
|
|
64
63
|
font-size: 10px;
|
|
65
64
|
letter-spacing: 0.7px;
|
|
66
65
|
font-weight: 600;
|
|
@@ -70,6 +69,7 @@ const StyledPill = styled.span`
|
|
|
70
69
|
align-items: center;
|
|
71
70
|
justify-content: center;
|
|
72
71
|
border: 2px solid ${pillColor};
|
|
72
|
+
border-radius: var(--borderRadius025);
|
|
73
73
|
height: auto;
|
|
74
74
|
${!wrapText && css`
|
|
75
75
|
white-space: nowrap;
|
|
@@ -115,7 +115,7 @@ const StyledPill = styled.span`
|
|
|
115
115
|
${isDeletable && css`
|
|
116
116
|
button {
|
|
117
117
|
-webkit-appearance: none;
|
|
118
|
-
border-radius:
|
|
118
|
+
border-radius: var(--borderRadius000);
|
|
119
119
|
border: none;
|
|
120
120
|
bottom: 0;
|
|
121
121
|
font-size: 100%;
|
|
@@ -130,6 +130,9 @@ const StyledPill = styled.span`
|
|
|
130
130
|
outline: none;
|
|
131
131
|
box-shadow: 0 0 0 3px var(--colorsSemanticFocus500);
|
|
132
132
|
background-color: ${buttonFocusColor};
|
|
133
|
+
border-radius: var(--borderRadius000) var(--borderRadius025)
|
|
134
|
+
var(--borderRadius025) var(--borderRadius000);
|
|
135
|
+
|
|
133
136
|
& {
|
|
134
137
|
color: ${contentColor};
|
|
135
138
|
}
|
|
@@ -175,7 +178,6 @@ const StyledPill = styled.span`
|
|
|
175
178
|
|
|
176
179
|
button {
|
|
177
180
|
padding: 0;
|
|
178
|
-
border-radius: 0 8px 8px 0;
|
|
179
181
|
line-height: 14px;
|
|
180
182
|
|
|
181
183
|
${addStyleToPillIcon("7px")}
|
|
@@ -184,12 +186,10 @@ const StyledPill = styled.span`
|
|
|
184
186
|
|
|
185
187
|
${size === "M" && css`
|
|
186
188
|
padding: 0 32px 0 11px;
|
|
187
|
-
border-radius: 12px;
|
|
188
189
|
|
|
189
190
|
button {
|
|
190
191
|
width: 24px;
|
|
191
192
|
padding: 0;
|
|
192
|
-
border-radius: 0 10px 10px 0;
|
|
193
193
|
line-height: 15px;
|
|
194
194
|
|
|
195
195
|
${addStyleToPillIcon("10px")}
|
|
@@ -198,12 +198,10 @@ const StyledPill = styled.span`
|
|
|
198
198
|
|
|
199
199
|
${size === "L" && css`
|
|
200
200
|
padding: 0 36px 0 15px;
|
|
201
|
-
border-radius: 13px;
|
|
202
201
|
|
|
203
202
|
button {
|
|
204
203
|
width: 28px;
|
|
205
204
|
padding: 0;
|
|
206
|
-
border-radius: 0 11px 11px 0;
|
|
207
205
|
line-height: 16px;
|
|
208
206
|
|
|
209
207
|
${addStyleToPillIcon("12px")}
|
|
@@ -212,12 +210,10 @@ const StyledPill = styled.span`
|
|
|
212
210
|
|
|
213
211
|
${size === "XL" && css`
|
|
214
212
|
padding: 0 41px 0 19px;
|
|
215
|
-
border-radius: 15px;
|
|
216
213
|
|
|
217
214
|
button {
|
|
218
215
|
width: 32px;
|
|
219
216
|
padding: 0;
|
|
220
|
-
border-radius: 0 12px 12px 0;
|
|
221
217
|
line-height: 18px;
|
|
222
218
|
|
|
223
219
|
${addStyleToPillIcon("13px")}
|
|
@@ -236,34 +232,28 @@ const StyledPill = styled.span`
|
|
|
236
232
|
|
|
237
233
|
${size === "M" && css`
|
|
238
234
|
padding: 0 11px;
|
|
239
|
-
border-radius: 12px;
|
|
240
235
|
|
|
241
236
|
button {
|
|
242
237
|
width: 24px;
|
|
243
238
|
padding: 0;
|
|
244
|
-
border-radius: 0 8px 8px 0;
|
|
245
239
|
}
|
|
246
240
|
`}
|
|
247
241
|
|
|
248
242
|
${size === "L" && css`
|
|
249
243
|
padding: 0 15px;
|
|
250
|
-
border-radius: 13px;
|
|
251
244
|
|
|
252
245
|
button {
|
|
253
246
|
width: 28px;
|
|
254
247
|
padding: 0;
|
|
255
|
-
border-radius: 0 10px 10px 0;
|
|
256
248
|
}
|
|
257
249
|
`}
|
|
258
250
|
|
|
259
251
|
${size === "XL" && css`
|
|
260
252
|
padding: 0 19px;
|
|
261
|
-
border-radius: 15px;
|
|
262
253
|
|
|
263
254
|
button {
|
|
264
255
|
width: 32px;
|
|
265
256
|
padding: 0;
|
|
266
|
-
border-radius: 0 12px 12px 0;
|
|
267
257
|
}
|
|
268
258
|
`}
|
|
269
259
|
`}
|
|
@@ -40,6 +40,7 @@ const StyledBlock = styled.div`
|
|
|
40
40
|
isFocused
|
|
41
41
|
}) => css`
|
|
42
42
|
box-sizing: border-box;
|
|
43
|
+
border-radius: var(--borderRadius100);
|
|
43
44
|
display: flex;
|
|
44
45
|
flex-direction: column;
|
|
45
46
|
background-color: ${blockBackgrounds[variant]};
|
|
@@ -113,6 +114,8 @@ const StyledFooter = styled.div`
|
|
|
113
114
|
softDelete
|
|
114
115
|
}) => css`
|
|
115
116
|
background-color: var(--colorsUtilityMajor025);
|
|
117
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
118
|
+
border-bottom-right-radius: var(--borderRadius100);
|
|
116
119
|
box-shadow: inset 0px 1px 1px 0 rgba(0, 0, 0, 0.1);
|
|
117
120
|
color: var(--colorsUtilityYin090);
|
|
118
121
|
padding: ${footerPaddings[size]};
|
|
@@ -171,6 +174,7 @@ const StyledEditAction = styled.a`
|
|
|
171
174
|
display: flex;
|
|
172
175
|
align-items: center;
|
|
173
176
|
justify-content: center;
|
|
177
|
+
border-radius: var(--borderRadius100);
|
|
174
178
|
|
|
175
179
|
${StyledIcon} {
|
|
176
180
|
top: -2px;
|
|
@@ -227,6 +231,7 @@ const StyledDeleteButton = styled(IconButton)`
|
|
|
227
231
|
box-sizing: border-box;
|
|
228
232
|
height: ${`${actionButtonSizes[size]}px`};
|
|
229
233
|
width: ${`${actionButtonSizes[size]}px`};
|
|
234
|
+
border-radius: var(--borderRadius100);
|
|
230
235
|
|
|
231
236
|
${StyledIcon} {
|
|
232
237
|
top: -2px;
|
|
@@ -274,6 +279,7 @@ const StyledUndoButton = styled(IconButton)`
|
|
|
274
279
|
box-sizing: border-box;
|
|
275
280
|
height: ${`${actionButtonSizes[size]}px`};
|
|
276
281
|
width: ${`${actionButtonSizes[size]}px`};
|
|
282
|
+
border-radius: var(--borderRadius100);
|
|
277
283
|
|
|
278
284
|
${StyledIcon} {
|
|
279
285
|
top: -2px;
|
|
@@ -29,7 +29,7 @@ function stylingForShape({
|
|
|
29
29
|
}) {
|
|
30
30
|
let cssString = "overflow: hidden;";
|
|
31
31
|
if (shape === "square") cssString += "border-radius: 0px;";
|
|
32
|
-
if (shape === "circle") cssString += "border-radius:
|
|
32
|
+
if (shape === "circle") cssString += "border-radius: var(--borderRadiusCircle);";
|
|
33
33
|
return css`
|
|
34
34
|
${cssString}
|
|
35
35
|
`;
|
|
@@ -51,7 +51,6 @@ function stylingForIcon({
|
|
|
51
51
|
return css`
|
|
52
52
|
background-color: ${backgroundColor};
|
|
53
53
|
color: ${color};
|
|
54
|
-
|
|
55
54
|
::before {
|
|
56
55
|
font-size: ${params === null || params === void 0 ? void 0 : params.iconDimensions}px;
|
|
57
56
|
}
|
|
@@ -71,7 +70,6 @@ export const StyledPortraitInitials = styled.div`
|
|
|
71
70
|
${stylingForSize}
|
|
72
71
|
${stylingForShape}
|
|
73
72
|
outline: 1px solid var(--colorsUtilityMajor200);
|
|
74
|
-
|
|
75
73
|
/* Styling for safari. This ensures that there is no outline on the component but that a border is still present
|
|
76
74
|
to achieve the same styling as Chrome and Firefox */
|
|
77
75
|
@media not all and (min-resolution: 0.001dpcm) {
|
|
@@ -57,7 +57,7 @@ const StyledProgressBar = styled.span`
|
|
|
57
57
|
progress,
|
|
58
58
|
error
|
|
59
59
|
})};
|
|
60
|
-
border-radius:
|
|
60
|
+
border-radius: var(--borderRadius400);
|
|
61
61
|
overflow-x: hidden;
|
|
62
62
|
height: ${getHeight(size)};
|
|
63
63
|
width: 100%;
|
|
@@ -104,7 +104,7 @@ const InnerBar = styled.span`
|
|
|
104
104
|
progress,
|
|
105
105
|
error
|
|
106
106
|
})};
|
|
107
|
-
border-radius:
|
|
107
|
+
border-radius: var(--borderRadius400);
|
|
108
108
|
width: calc(${length} * ${progress && progress / 100});
|
|
109
109
|
min-width: 2px;
|
|
110
110
|
height: ${getHeight(size)};
|
|
@@ -15,6 +15,11 @@ const StyledSearchButton = styled.div`
|
|
|
15
15
|
& ${StyledButton} {
|
|
16
16
|
background-color: var(--colorsActionMajor500);
|
|
17
17
|
border-color: var(--colorsActionMajorTransparent);
|
|
18
|
+
border-bottom-left-radius: var(--borderRadius000);
|
|
19
|
+
border-top-left-radius: var(--borderRadius000);
|
|
20
|
+
border-bottom-right-radius: var(--borderRadius050);
|
|
21
|
+
border-top-right-radius: var(--borderRadius050);
|
|
22
|
+
|
|
18
23
|
:hover {
|
|
19
24
|
background: var(--colorsActionMajor600);
|
|
20
25
|
border-color: var(--colorsActionMajorTransparent);
|
|
@@ -52,6 +52,7 @@ const StyledSearch = styled.div`
|
|
|
52
52
|
}
|
|
53
53
|
`}
|
|
54
54
|
|
|
55
|
+
|
|
55
56
|
${StyledInput} {
|
|
56
57
|
::-moz-placeholder {
|
|
57
58
|
color: var(--colorsUtilityYin055);
|
|
@@ -78,6 +79,12 @@ const StyledSearch = styled.div`
|
|
|
78
79
|
|
|
79
80
|
${StyledInputPresentation} {
|
|
80
81
|
background-color: ${searchHasValue || isFocused ? "var(--colorsUtilityYang100)" : "transparent"};
|
|
82
|
+
|
|
83
|
+
${showSearchButton && css`
|
|
84
|
+
border-top-right-radius: var(--borderRadius000);
|
|
85
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
86
|
+
`}
|
|
87
|
+
|
|
81
88
|
flex: 1;
|
|
82
89
|
font-size: 14px;
|
|
83
90
|
font-weight: 700;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ThemeObject } from "../../style/themes/base";
|
|
2
|
+
export declare const borderRadiusStyling = "\n > {\n &:first-child:last-child {\n border-radius: var(--borderRadius100);\n }\n\n &:first-child:not(:last-child) {\n border-top-left-radius: var(--borderRadius100);\n border-top-right-radius: var(--borderRadius100);\n border-bottom-right-radius: var(--borderRadius000);\n border-bottom-left-radius: var(--borderRadius000);\n }\n\n &:not(:first-child):not(:last-child) {\n border-radius: var(--borderRadius000);\n }\n\n &:last-child:not(:first-child) {\n border-top-right-radius: var(--borderRadius000);\n border-top-left-radius: var(--borderRadius000);\n border-bottom-left-radius: var(--borderRadius100);\n border-bottom-right-radius: var(--borderRadius100);\n }\n }\n";
|
|
2
3
|
declare type StyledSplitButtonChildrenContainerProps = {
|
|
3
4
|
theme: ThemeObject;
|
|
4
5
|
align: "left" | "right";
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import BaseTheme from "../../style/themes/base";
|
|
3
3
|
import StyledButton from "../button/button.style";
|
|
4
|
+
export const borderRadiusStyling = `
|
|
5
|
+
> {
|
|
6
|
+
&:first-child:last-child {
|
|
7
|
+
border-radius: var(--borderRadius100);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:first-child:not(:last-child) {
|
|
11
|
+
border-top-left-radius: var(--borderRadius100);
|
|
12
|
+
border-top-right-radius: var(--borderRadius100);
|
|
13
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
14
|
+
border-bottom-left-radius: var(--borderRadius000);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:not(:first-child):not(:last-child) {
|
|
18
|
+
border-radius: var(--borderRadius000);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:last-child:not(:first-child) {
|
|
22
|
+
border-top-right-radius: var(--borderRadius000);
|
|
23
|
+
border-top-left-radius: var(--borderRadius000);
|
|
24
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
25
|
+
border-bottom-right-radius: var(--borderRadius100);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
4
29
|
const StyledSplitButtonChildrenContainer = styled.div`
|
|
30
|
+
border-radius: var(--borderRadius100);
|
|
5
31
|
${({
|
|
6
32
|
theme,
|
|
7
33
|
align,
|
|
@@ -13,6 +39,8 @@ const StyledSplitButtonChildrenContainer = styled.div`
|
|
|
13
39
|
z-index: ${theme.zIndex.popover};
|
|
14
40
|
box-shadow: var(--boxShadow100);
|
|
15
41
|
|
|
42
|
+
${borderRadiusStyling}
|
|
43
|
+
|
|
16
44
|
${StyledButton} {
|
|
17
45
|
border: 1px solid var(--colorsActionMajorTransparent);
|
|
18
46
|
display: block;
|
|
@@ -13,6 +13,9 @@ const StyledSplitButtonToggle = styled(StyledButton)`
|
|
|
13
13
|
displayed,
|
|
14
14
|
size
|
|
15
15
|
}) => css`
|
|
16
|
+
border-top-left-radius: var(--borderRadius000);
|
|
17
|
+
border-bottom-left-radius: var(--borderRadius000);
|
|
18
|
+
|
|
16
19
|
${!disabled && displayed ? css`
|
|
17
20
|
background-color: var(--colorsActionMajor500);
|
|
18
21
|
border-color: var(--colorsActionMajor500);
|
|
@@ -26,7 +29,8 @@ const StyledSplitButtonToggle = styled(StyledButton)`
|
|
|
26
29
|
border-left-color: var(--colorsSemanticFocus500);
|
|
27
30
|
}
|
|
28
31
|
` : ""}
|
|
29
|
-
${!disabled && buttonType === "primary" && `
|
|
32
|
+
${!disabled && buttonType === "primary" && `
|
|
33
|
+
position: relative;
|
|
30
34
|
&::before {
|
|
31
35
|
content: '';
|
|
32
36
|
width: 2px;
|
|
@@ -37,6 +41,7 @@ const StyledSplitButtonToggle = styled(StyledButton)`
|
|
|
37
41
|
z-index: 2;
|
|
38
42
|
}
|
|
39
43
|
`}
|
|
44
|
+
|
|
40
45
|
${buttonType === "secondary" && "border-left-width: 0;"}
|
|
41
46
|
padding: 0 ${horizontalPaddingSizes[size]}px;
|
|
42
47
|
|
|
@@ -4,13 +4,16 @@ import StyledButton from "../button/button.style";
|
|
|
4
4
|
import baseTheme from "../../style/themes/base";
|
|
5
5
|
const StyledSplitButton = styled.div`
|
|
6
6
|
${margin}
|
|
7
|
-
|
|
8
7
|
display: inline-block;
|
|
9
8
|
position: relative;
|
|
10
9
|
|
|
10
|
+
${StyledButton}:first-of-type {
|
|
11
|
+
border-top-right-radius: var(--borderRadius000);
|
|
12
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
& > ${StyledButton} {
|
|
12
16
|
margin: 0;
|
|
13
|
-
|
|
14
17
|
&:focus {
|
|
15
18
|
border: 3px solid var(--colorsSemanticFocus500);
|
|
16
19
|
outline: none;
|
|
@@ -22,7 +22,7 @@ const StyledSwitchSlider = styled.span`
|
|
|
22
22
|
width: 64px;
|
|
23
23
|
min-width: fit-content;
|
|
24
24
|
z-index: 2;
|
|
25
|
-
border-radius:
|
|
25
|
+
border-radius: var(--borderRadius400);
|
|
26
26
|
border-style: solid;
|
|
27
27
|
border-color: var(--colorsActionMinor400);
|
|
28
28
|
border-width: var(--borderWidth200);
|
|
@@ -76,7 +76,6 @@ const StyledSwitchSlider = styled.span`
|
|
|
76
76
|
`}
|
|
77
77
|
|
|
78
78
|
${size === "large" && css`
|
|
79
|
-
border-radius: 30px;
|
|
80
79
|
&::before {
|
|
81
80
|
height: 32px;
|
|
82
81
|
width: 32px;
|