@ssa-ui-kit/core 1.1.3 → 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.3",
3
+ "version": "1.1.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "private": false,
@@ -217,11 +217,10 @@ export const FullscreenAndTitle: StoryObj<typeof PieChart> = () => {
217
217
  `}
218
218
  labelListStyles={css`
219
219
  li {
220
- height: ${isFullscreenMode ? 'auto' : '34px'};
220
+ height: 34px;
221
221
  }
222
222
  h6 {
223
223
  color: ${theme.colors.greyDarker};
224
- line-height: 34px;
225
224
  font-size: 14px;
226
225
  &:nth-of-type(1) {
227
226
  font-weight: 500;
@@ -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
@@ -68,8 +68,9 @@ export const PieChartLegend = ({
68
68
  css={{
69
69
  alignSelf: 'start',
70
70
  marginRight: 5,
71
- height: 'auto',
72
- lineHeight: '34px',
71
+ height: '100%',
72
+ lineHeight: '14px',
73
+ fontSize: 14,
73
74
  alignContent: 'center',
74
75
  }}>
75
76
  {typeof renderLabel === 'function'
@@ -7,7 +7,7 @@ export const Content = styled(CardContent)<{ isFullscreenMode?: boolean }>`
7
7
  display: flex;
8
8
  justify-content: space-between;
9
9
  gap: 5px;
10
- height: ${({ isFullscreenMode }) => (isFullscreenMode ? '100%' : 'auto')};
10
+ height: 100%;
11
11
 
12
12
  ${({ theme }) => theme.mediaQueries.md} {
13
13
  max-width: initial;
@@ -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
  };