@akad/design-system 1.1.8 → 1.1.9
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/css/core.css +1 -1
- package/package.json +1 -1
- package/react/react-lib.js +540 -532
- package/react/react-lib.umd.cjs +5 -5
- package/react/src/components/atoms/Card/Card.config.d.ts +14 -0
- package/react/src/components/atoms/Card/Card.d.ts +2 -1
- package/react/src/components/atoms/Card/Card.stories.d.ts +15 -0
- package/scss/core/components/atoms/card.scss +24 -1
|
@@ -37,6 +37,14 @@ export declare enum CardColor {
|
|
|
37
37
|
InfoLight = "info-light",
|
|
38
38
|
InfoLighter = "info-lighter"
|
|
39
39
|
}
|
|
40
|
+
export declare enum CardSize {
|
|
41
|
+
None = "none",
|
|
42
|
+
Quark = "quark",
|
|
43
|
+
Nano = "nano",
|
|
44
|
+
XXXS = "xxxs",
|
|
45
|
+
XXS = "xxs",
|
|
46
|
+
XS = "xs"
|
|
47
|
+
}
|
|
40
48
|
export declare enum CardElevation {
|
|
41
49
|
Elevation = 0,
|
|
42
50
|
Elevation1 = 1,
|
|
@@ -67,6 +75,11 @@ export interface CardTestIdProps {
|
|
|
67
75
|
type: StringConstructor;
|
|
68
76
|
default: string;
|
|
69
77
|
}
|
|
78
|
+
export interface CardSizeProps {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: CardSize;
|
|
81
|
+
options: CardSize[];
|
|
82
|
+
}
|
|
70
83
|
export interface CardConfig {
|
|
71
84
|
name: string;
|
|
72
85
|
class: string;
|
|
@@ -76,6 +89,7 @@ export interface CardConfig {
|
|
|
76
89
|
elevation: CardElevationProps;
|
|
77
90
|
id: CardIdProps;
|
|
78
91
|
testId: CardTestIdProps;
|
|
92
|
+
size: CardSizeProps;
|
|
79
93
|
};
|
|
80
94
|
}
|
|
81
95
|
declare const cardConfig: CardConfig;
|
|
@@ -8,9 +8,10 @@ export interface DsCardProps {
|
|
|
8
8
|
elevation?: number;
|
|
9
9
|
backgroundColor?: string;
|
|
10
10
|
borderColor?: string;
|
|
11
|
+
size?: string;
|
|
11
12
|
}
|
|
12
13
|
declare const DsCard: {
|
|
13
|
-
({ id, testId, children, className, elevation, backgroundColor, borderColor, }: DsCardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
({ id, testId, children, className, elevation, backgroundColor, borderColor, size, }: DsCardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
propTypes: {
|
|
15
16
|
id: PropTypes.Requireable<string>;
|
|
16
17
|
testId: PropTypes.Requireable<string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react';
|
|
2
|
+
import { CardSize } from './Card.config';
|
|
2
3
|
import { DsCardProps } from '.';
|
|
3
4
|
|
|
4
5
|
declare const ComponentProps: Meta;
|
|
@@ -21,3 +22,17 @@ export declare const WithBackground: {
|
|
|
21
22
|
backgroundColor: string;
|
|
22
23
|
};
|
|
23
24
|
};
|
|
25
|
+
export declare const WithSize: {
|
|
26
|
+
render: import('storybook/internal/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, DsCardProps>;
|
|
27
|
+
args: {
|
|
28
|
+
size: CardSize;
|
|
29
|
+
elevation: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const WithoutPadding: {
|
|
33
|
+
render: import('storybook/internal/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, DsCardProps>;
|
|
34
|
+
args: {
|
|
35
|
+
size: CardSize;
|
|
36
|
+
elevation: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -13,9 +13,32 @@
|
|
|
13
13
|
font-family: var(--font__family--base);
|
|
14
14
|
font-size: $font__size--xs;
|
|
15
15
|
gap: $spacing--nano;
|
|
16
|
-
padding: $spacing--xxxs;
|
|
17
16
|
position: relative;
|
|
18
17
|
|
|
18
|
+
&--none {
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&--quark {
|
|
23
|
+
padding: $spacing--quark;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&--nano {
|
|
27
|
+
padding: $spacing--nano;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--xxxs {
|
|
31
|
+
padding: $spacing--xxxs;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&--xxs {
|
|
35
|
+
padding: $spacing--xxs;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--xs {
|
|
39
|
+
padding: $spacing--xs;
|
|
40
|
+
}
|
|
41
|
+
|
|
19
42
|
// NO utility classes here
|
|
20
43
|
// Use global utilities instead:
|
|
21
44
|
// - Background: .bg-color__primary, .bg-color__secondary, etc.
|