@popsure/dirty-swan 0.41.7 → 0.41.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/dist/cjs/index.js +8 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/card/index.d.ts +1 -0
- package/dist/esm/components/card/index.js +7 -6
- package/dist/esm/components/card/index.js.map +1 -1
- package/dist/esm/components/dateSelector/index.js +1 -1
- package/dist/esm/components/dateSelector/index.stories.js +1 -1
- package/dist/esm/components/dateSelector/index.test.js +1 -1
- package/dist/esm/components/icon/IconWrapper/IconWrapper.js +1 -0
- package/dist/esm/components/icon/IconWrapper/IconWrapper.js.map +1 -1
- package/dist/esm/components/icon/icons.stories.js +1 -1
- package/dist/esm/components/icon/index.stories.js +1 -1
- package/dist/esm/components/toast/index.js +1 -1
- package/dist/esm/components/toast/index.stories.js +1 -1
- package/dist/esm/components/toast/index.test.js +1 -1
- package/dist/esm/{index-45edc7d0.js → index-2c193605.js} +1 -1
- package/dist/esm/{index-45edc7d0.js.map → index-2c193605.js.map} +1 -1
- package/dist/esm/{index-83ae7f18.js → index-e506c4ca.js} +1 -1
- package/dist/esm/{index-83ae7f18.js.map → index-e506c4ca.js.map} +1 -1
- package/dist/esm/{index-02a5537e.js → index-f0e3bc9a.js} +1 -1
- package/dist/esm/{index-02a5537e.js.map → index-f0e3bc9a.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/lib/components/card/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/components/card/index.tsx +28 -24
- package/src/lib/components/card/style.module.scss +2 -1
- package/src/lib/components/icon/IconWrapper/IconWrapper.tsx +1 -0
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DateSelector } from './index-
|
|
1
|
+
export { D as DateSelector } from './index-f0e3bc9a.js';
|
|
2
2
|
export { SignaturePad } from './components/signaturePad/index.js';
|
|
3
3
|
export { AutocompleteAddress } from './components/autocompleteAddress/index.js';
|
|
4
4
|
export { Input } from './components/input/index.js';
|
|
@@ -27,7 +27,7 @@ export { Link } from './components/link/index.js';
|
|
|
27
27
|
export { i as illustrations, a as images } from './index-1693701e.js';
|
|
28
28
|
export { Spinner } from './components/spinner/index.js';
|
|
29
29
|
export { Toggle } from './components/input/toggle/index.js';
|
|
30
|
-
export { a as Toaster, t as toast } from './index-
|
|
30
|
+
export { a as Toaster, t as toast } from './index-2c193605.js';
|
|
31
31
|
export { default as Svg1Icon } from './components/icon/icons/1.js';
|
|
32
32
|
export { default as Svg2Icon } from './components/icon/icons/2.js';
|
|
33
33
|
export { default as Svg3Icon } from './components/icon/icons/3.js';
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import styles from './style.module.scss';
|
|
|
7
7
|
export interface CardProps {
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
classNames?: {
|
|
10
|
+
buttonWrapper?: string;
|
|
10
11
|
wrapper?: string;
|
|
11
12
|
label?: string;
|
|
12
13
|
title?: string;
|
|
@@ -25,9 +26,9 @@ export interface CardProps {
|
|
|
25
26
|
label?: ReactNode;
|
|
26
27
|
onClick?: () => void;
|
|
27
28
|
actionIcon?: ReactNode;
|
|
28
|
-
}
|
|
29
|
+
}
|
|
29
30
|
|
|
30
|
-
const CardContent = ({
|
|
31
|
+
const CardContent = ({
|
|
31
32
|
children,
|
|
32
33
|
classNames,
|
|
33
34
|
density = 'balanced',
|
|
@@ -43,19 +44,19 @@ const CardContent = ({
|
|
|
43
44
|
}: CardProps) => (
|
|
44
45
|
<section
|
|
45
46
|
className={classNamesUtil(
|
|
46
|
-
'd-flex fd-column jc-center br8 bg-white w100 ta-left',
|
|
47
|
+
'd-flex fd-column jc-center br8 bg-white w100 ta-left',
|
|
47
48
|
{ 'bs-sm': dropShadow },
|
|
48
49
|
{
|
|
49
50
|
compact: 'p16',
|
|
50
51
|
balanced: 'p24',
|
|
51
|
-
spacious: 'p32'
|
|
52
|
+
spacious: 'p32',
|
|
52
53
|
}[density],
|
|
53
|
-
classNames?.wrapper
|
|
54
|
+
classNames?.wrapper
|
|
54
55
|
)}
|
|
55
56
|
>
|
|
56
|
-
<div className=
|
|
57
|
+
<div className="d-flex w100">
|
|
57
58
|
{icon && (
|
|
58
|
-
<div
|
|
59
|
+
<div
|
|
59
60
|
className={classNamesUtil(
|
|
60
61
|
`d-flex ai-center tc-primary-500`,
|
|
61
62
|
styles.icon,
|
|
@@ -67,23 +68,24 @@ const CardContent = ({
|
|
|
67
68
|
</div>
|
|
68
69
|
)}
|
|
69
70
|
|
|
70
|
-
<div className=
|
|
71
|
-
<div className=
|
|
71
|
+
<div className="d-flex jc-between w100">
|
|
72
|
+
<div className="d-flex jc-center gap8 fd-column tc-grey-900 w100">
|
|
72
73
|
{label && (
|
|
73
|
-
<h3
|
|
74
|
-
className={classNamesUtil('p-p--small', classNames?.label)}
|
|
75
|
-
>
|
|
74
|
+
<h3 className={classNamesUtil('p-p--small', classNames?.label)}>
|
|
76
75
|
{label}
|
|
77
76
|
</h3>
|
|
78
77
|
)}
|
|
79
78
|
|
|
80
79
|
{title && (
|
|
81
80
|
<h2
|
|
82
|
-
className={classNamesUtil(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
className={classNamesUtil(
|
|
82
|
+
classNames?.title,
|
|
83
|
+
{
|
|
84
|
+
large: 'p-h3',
|
|
85
|
+
medium: 'p-h4',
|
|
86
|
+
small: 'p-p',
|
|
87
|
+
}[titleVariant]
|
|
88
|
+
)}
|
|
87
89
|
>
|
|
88
90
|
{title}
|
|
89
91
|
</h2>
|
|
@@ -117,9 +119,7 @@ const CardContent = ({
|
|
|
117
119
|
</div>
|
|
118
120
|
</div>
|
|
119
121
|
|
|
120
|
-
{children &&
|
|
121
|
-
<div className={classNames?.children}>{children}</div>
|
|
122
|
-
)}
|
|
122
|
+
{children && <div className={classNames?.children}>{children}</div>}
|
|
123
123
|
</section>
|
|
124
124
|
);
|
|
125
125
|
|
|
@@ -129,16 +129,20 @@ const Card = (props: CardProps) => {
|
|
|
129
129
|
if (onClick) {
|
|
130
130
|
return (
|
|
131
131
|
<button
|
|
132
|
-
className={classNamesUtil(
|
|
133
|
-
|
|
132
|
+
className={classNamesUtil(
|
|
133
|
+
'c-pointer d-flex w100 br8',
|
|
134
|
+
styles.button,
|
|
135
|
+
props.classNames?.buttonWrapper
|
|
136
|
+
)}
|
|
137
|
+
onClick={onClick}
|
|
134
138
|
type="button"
|
|
135
139
|
>
|
|
136
140
|
<CardContent {...props} />
|
|
137
141
|
</button>
|
|
138
|
-
)
|
|
142
|
+
);
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
return <CardContent {...props} />;
|
|
142
|
-
}
|
|
146
|
+
};
|
|
143
147
|
|
|
144
148
|
export { Card };
|