@ssa-ui-kit/core 1.1.5 → 1.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssa-ui-kit/core",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "private": false,
@@ -42,7 +42,6 @@ const PieChartComponent = ({
42
42
  return (
43
43
  <WithWidgetCard
44
44
  features={features}
45
- width={`calc(${width} + ${internalOffset}px)`}
46
45
  cardProps={{
47
46
  headerContent: <PieChartHeader features={features} />,
48
47
  ...cardProps,
@@ -50,7 +49,7 @@ const PieChartComponent = ({
50
49
  <PieChartBase
51
50
  as={as}
52
51
  className={className}
53
- width={`calc(${width} + ${internalOffset}px)`}
52
+ width={width}
54
53
  isFullscreenMode={isFullscreenMode}>
55
54
  <div className="pie-chart-wrapper">
56
55
  <ResponsivePie
@@ -12,7 +12,6 @@ export const WidgetCard = ({
12
12
  headerClassName,
13
13
  headerContent,
14
14
  link,
15
- width,
16
15
  children,
17
16
  onClick,
18
17
  }: WidgetCardProps) => {
@@ -22,8 +21,7 @@ export const WidgetCard = ({
22
21
  <WidgetCardBase
23
22
  className={className}
24
23
  onClick={link ? undefined : onClick}
25
- isFullscreenMode={isFullscreenMode}
26
- width={width}>
24
+ isFullscreenMode={isFullscreenMode}>
27
25
  <Header title={title} className={headerClassName}>
28
26
  {headerContent}
29
27
  </Header>
@@ -3,18 +3,18 @@ import Card from '@components/Card';
3
3
 
4
4
  export const WidgetCardBase = styled(Card)<{
5
5
  isFullscreenMode?: boolean;
6
- width?: string;
7
6
  }>`
8
7
  border-radius: 20px;
9
8
  padding: 5px 10px;
10
- width: ${({ isFullscreenMode, width }) =>
11
- isFullscreenMode ? '100%' : width};
9
+ width: 100%;
12
10
  height: 100%;
13
11
  position: ${({ isFullscreenMode }) =>
14
12
  isFullscreenMode ? 'absolute' : 'static'};
15
13
  top: ${({ isFullscreenMode }) => isFullscreenMode && 0};
16
14
  left: ${({ isFullscreenMode }) => isFullscreenMode && 0};
17
15
 
16
+ z-index: 1;
17
+
18
18
  ${({ theme }) => theme.mediaQueries.md} {
19
19
  padding: 10px;
20
20
  }
@@ -5,14 +5,11 @@ export const WithWidgetCard = ({
5
5
  children,
6
6
  features = [],
7
7
  cardProps = {},
8
- width,
9
8
  }: {
10
9
  children: React.ReactNode;
11
- } & Pick<PieChartProps, 'features' | 'cardProps' | 'width'>) =>
10
+ } & Pick<PieChartProps, 'features' | 'cardProps'>) =>
12
11
  features && features.includes('header') ? (
13
- <WidgetCard {...cardProps} width={width}>
14
- {children}
15
- </WidgetCard>
12
+ <WidgetCard {...cardProps}>{children}</WidgetCard>
16
13
  ) : (
17
14
  children
18
15
  );
@@ -9,6 +9,5 @@ export type WidgetCardProps = {
9
9
  headerContent?: React.ReactNode;
10
10
  link?: To;
11
11
  children?: React.ReactNode;
12
- width?: string;
13
12
  onClick?: () => void;
14
13
  };