carbon-react 102.20.0 → 102.22.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.
@@ -1,2 +1,11 @@
1
+ import { PaddingProps, FlexboxProps } from "styled-system";
2
+ import { StickyPosition, NavigationType } from "./navigation-bar.component";
3
+ declare const StyledNavigationBar: import("styled-components").StyledComponent<"nav", any, PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
4
+ /** Color scheme of navigation component */
5
+ navigationType?: NavigationType | undefined;
6
+ /** Defines the position of sticky navigation bar */
7
+ stickyPosition?: StickyPosition | undefined;
8
+ /** Defines the offset of sticky navigation bar */
9
+ stickyOffset?: string | undefined;
10
+ }, never>;
1
11
  export default StyledNavigationBar;
2
- declare const StyledNavigationBar: import("styled-components").StyledComponent<"nav", any, {}, never>;
@@ -22,28 +22,28 @@ const StyledSplitButtonChildrenContainer = _styledComponents.default.div`
22
22
  theme,
23
23
  align
24
24
  }) => (0, _styledComponents.css)`
25
- background-color: ${theme.colors.secondary};
25
+ background-color: var(--colorsActionMajorYang100);
26
26
  min-width: ${({
27
27
  minWidth
28
28
  }) => minWidth}px;
29
29
  white-space: nowrap;
30
30
  z-index: ${theme.zIndex.popover};
31
+ box-shadow: var(--boxShadow100);
31
32
 
32
33
  ${_button.default} {
33
- background-color: ${theme.colors.secondary};
34
- border: 1px solid ${theme.colors.secondary};
35
- color: ${theme.colors.white};
34
+ background-color: var(--colorsActionMajorYang100);
35
+ border: 1px solid var(--colorsActionMajorTransparent);
36
+ color: var(--colorsActionMajor500);
36
37
  display: block;
37
38
  margin-left: 0;
38
- margin-top: 3px;
39
- margin-bottom: 3px;
40
39
  min-width: 100%;
41
40
  text-align: ${align};
42
41
  z-index: ${theme.zIndex.overlay};
43
42
 
44
43
  &:focus,
45
44
  &:hover {
46
- background-color: ${theme.colors.tertiary};
45
+ color: var(--colorsActionMajorYang100);
46
+ background-color: var(--colorsActionMajor600);
47
47
  }
48
48
 
49
49
  & + & {
@@ -27,23 +27,32 @@ const StyledSplitButtonToggle = (0, _styledComponents.default)(_button.default)`
27
27
  buttonType,
28
28
  disabled,
29
29
  displayed,
30
- size,
31
- theme
30
+ size
32
31
  }) => (0, _styledComponents.css)`
33
32
  ${!disabled && displayed ? (0, _styledComponents.css)`
34
- background-color: ${theme.colors.secondary};
35
- border-color: ${theme.colors.secondary};
33
+ background-color: var(--colorsActionMajor500);
34
+ border-color: var(--colorsActionMajor500);
36
35
 
37
36
  &,
38
37
  ${_icon.default} {
39
- color: ${theme.colors.white};
38
+ color: var(--colorsActionMajorYang100);
40
39
  }
41
40
 
42
41
  &:focus {
43
- border-left-color: ${theme.colors.secondary};
42
+ border-left-color: var(--colorsSemanticFocus500);
44
43
  }
45
44
  ` : ""}
46
- ${!disabled && buttonType === "primary" && `border-left-color: ${theme.colors.secondary};`}
45
+ ${!disabled && buttonType === "primary" && `position: relative;
46
+ &::before {
47
+ content: '';
48
+ width: 2px;
49
+ height: 100%;
50
+ background: var(--colorsActionMajorYang100);
51
+ position: absolute;
52
+ left: -2px;
53
+ z-index: 2;
54
+ }
55
+ `}
47
56
  ${buttonType === "secondary" && "border-left-width: 0;"}
48
57
  padding: 0 ${horizontalPaddingSizes[size]}px;
49
58
 
@@ -25,9 +25,7 @@ const StyledSplitButton = _styledComponents.default.div`
25
25
  margin: 0;
26
26
 
27
27
  &:focus {
28
- border: 3px solid ${({
29
- theme
30
- }) => theme.colors.focus};
28
+ border: 3px solid var(--colorsSemanticFocus500);
31
29
  outline: none;
32
30
  margin: -1px;
33
31
  }
@@ -1 +1 @@
1
- export default function useIsAboveBreakpoint(breakpoint: number): boolean;
1
+ export default function useIsAboveBreakpoint(breakpoint?: number): boolean;
@@ -263,11 +263,16 @@ export interface ThemeObject {
263
263
  background: string;
264
264
  borderBottom: string;
265
265
  };
266
-
267
266
  dark: {
268
267
  background: string;
269
268
  borderBottom: string;
270
269
  };
270
+ black: {
271
+ background: string;
272
+ };
273
+ white: {
274
+ borderBottom: string;
275
+ };
271
276
  };
272
277
 
273
278
  numeralDate: {
@@ -483,6 +483,12 @@ declare var _default: {
483
483
  background: string;
484
484
  borderBottom: string;
485
485
  };
486
+ black: {
487
+ background: string;
488
+ };
489
+ white: {
490
+ borderBottom: string;
491
+ };
486
492
  };
487
493
  numeralDate: {
488
494
  passive: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "102.20.0",
3
+ "version": "102.22.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {
@@ -90,7 +90,6 @@
90
90
  "@types/react": "16.9.31",
91
91
  "@types/react-dom": "16.0.11",
92
92
  "@types/styled-components": "^5.1.9",
93
- "@types/styled-system": "^5.1.11",
94
93
  "@types/uuid": "^8.3.3",
95
94
  "@typescript-eslint/eslint-plugin": "^5.4.0",
96
95
  "@typescript-eslint/parser": "^5.4.0",
@@ -159,6 +158,7 @@
159
158
  "@sage/design-tokens": "^1.87.1",
160
159
  "@styled-system/prop-types": "^5.1.5",
161
160
  "@tippyjs/react": "^4.2.5",
161
+ "@types/styled-system": "^5.1.11",
162
162
  "classnames": "~2.2.6",
163
163
  "crypto-js": "~3.3.0",
164
164
  "dotenv": "^10.0.0",
@@ -1,12 +0,0 @@
1
- import { SpaceProps } from "styled-system";
2
-
3
- export interface HrProps extends SpaceProps {
4
- /** Breakpoint for adaptive left and right margins (below the breakpoint they go to 0).
5
- * Enables the adaptive behaviour when set
6
- */
7
- adaptiveMxBreakpoint?: number;
8
- }
9
-
10
- declare function Hr(props: HrProps): JSX.Element;
11
-
12
- export default Hr;
@@ -1,15 +0,0 @@
1
- import * as React from "react";
2
- import { SpaceProps } from "styled-system";
3
-
4
- export interface NavigationBarProps extends SpaceProps {
5
- children?: React.ReactNode;
6
- ariaLabel?: string;
7
- navigationType?: "light" | "dark" | "white" | "black";
8
- isLoading?: boolean;
9
- stickyPosition?: "top" | "bottom";
10
- stickyOffset?: string;
11
- }
12
-
13
- declare function NavigationBar(props: NavigationBarProps): JSX.Element;
14
-
15
- export default NavigationBar;