@yamada-ui/card 0.2.6 → 0.2.8
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/card.js +69 -31
- package/dist/card.mjs +1 -1
- package/dist/chunk-ALDWLRDK.mjs +107 -0
- package/dist/index.js +69 -31
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-JG6OERSN.mjs +0 -69
package/dist/card.js
CHANGED
|
@@ -50,38 +50,76 @@ var Card = (0, import_core.forwardRef)((props, ref) => {
|
|
|
50
50
|
wordWrap: "break-word",
|
|
51
51
|
...styles.container
|
|
52
52
|
};
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.header, { ref, className: (0, import_utils.cx)("ui-card-header", className), __css: css, ...rest });
|
|
64
|
-
});
|
|
65
|
-
var CardBody = (0, import_core.forwardRef)(({ className, ...rest }, ref) => {
|
|
66
|
-
const styles = useCard();
|
|
67
|
-
const css = {
|
|
68
|
-
display: "flex",
|
|
69
|
-
flexDirection: "column",
|
|
70
|
-
alignItems: "flex-start",
|
|
71
|
-
...styles.body
|
|
72
|
-
};
|
|
73
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.main, { ref, className: (0, import_utils.cx)("ui-card-body", className), __css: css, ...rest });
|
|
74
|
-
});
|
|
75
|
-
var CardFooter = (0, import_core.forwardRef)(({ className, ...rest }, ref) => {
|
|
76
|
-
const styles = useCard();
|
|
77
|
-
const css = {
|
|
78
|
-
display: "flex",
|
|
79
|
-
justifyContent: "flex-start",
|
|
80
|
-
alignItems: "center",
|
|
81
|
-
...styles.footer
|
|
82
|
-
};
|
|
83
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.footer, { ref, className: (0, import_utils.cx)("ui-card-footer", className), __css: css, ...rest });
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
import_core.ui.article,
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
className: (0, import_utils.cx)("ui-card", className),
|
|
58
|
+
__css: css,
|
|
59
|
+
...rest
|
|
60
|
+
}
|
|
61
|
+
) });
|
|
84
62
|
});
|
|
63
|
+
var CardHeader = (0, import_core.forwardRef)(
|
|
64
|
+
({ className, ...rest }, ref) => {
|
|
65
|
+
const styles = useCard();
|
|
66
|
+
const css = {
|
|
67
|
+
display: "flex",
|
|
68
|
+
justifyContent: "flex-start",
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
...styles.header
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
import_core.ui.header,
|
|
74
|
+
{
|
|
75
|
+
ref,
|
|
76
|
+
className: (0, import_utils.cx)("ui-card-header", className),
|
|
77
|
+
__css: css,
|
|
78
|
+
...rest
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
var CardBody = (0, import_core.forwardRef)(
|
|
84
|
+
({ className, ...rest }, ref) => {
|
|
85
|
+
const styles = useCard();
|
|
86
|
+
const css = {
|
|
87
|
+
display: "flex",
|
|
88
|
+
flexDirection: "column",
|
|
89
|
+
alignItems: "flex-start",
|
|
90
|
+
...styles.body
|
|
91
|
+
};
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
import_core.ui.main,
|
|
94
|
+
{
|
|
95
|
+
ref,
|
|
96
|
+
className: (0, import_utils.cx)("ui-card-body", className),
|
|
97
|
+
__css: css,
|
|
98
|
+
...rest
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
var CardFooter = (0, import_core.forwardRef)(
|
|
104
|
+
({ className, ...rest }, ref) => {
|
|
105
|
+
const styles = useCard();
|
|
106
|
+
const css = {
|
|
107
|
+
display: "flex",
|
|
108
|
+
justifyContent: "flex-start",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
...styles.footer
|
|
111
|
+
};
|
|
112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
|
+
import_core.ui.footer,
|
|
114
|
+
{
|
|
115
|
+
ref,
|
|
116
|
+
className: (0, import_utils.cx)("ui-card-footer", className),
|
|
117
|
+
__css: css,
|
|
118
|
+
...rest
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
);
|
|
85
123
|
// Annotate the CommonJS export names for ESM import in node:
|
|
86
124
|
0 && (module.exports = {
|
|
87
125
|
Card,
|
package/dist/card.mjs
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// src/card.tsx
|
|
2
|
+
import {
|
|
3
|
+
ui,
|
|
4
|
+
forwardRef,
|
|
5
|
+
omitThemeProps,
|
|
6
|
+
useMultiComponentStyle
|
|
7
|
+
} from "@yamada-ui/core";
|
|
8
|
+
import { createContext, cx } from "@yamada-ui/utils";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var [CardProvider, useCard] = createContext({
|
|
11
|
+
name: `CardContext`,
|
|
12
|
+
errorMessage: `useCard returned is 'undefined'. Seems you forgot to wrap the components in "<Card />" `
|
|
13
|
+
});
|
|
14
|
+
var Card = forwardRef((props, ref) => {
|
|
15
|
+
const [styles, mergedProps] = useMultiComponentStyle("Card", props);
|
|
16
|
+
const {
|
|
17
|
+
className,
|
|
18
|
+
direction: flexDirection = "column",
|
|
19
|
+
justify: justifyContent,
|
|
20
|
+
align: alignItems,
|
|
21
|
+
...rest
|
|
22
|
+
} = omitThemeProps(mergedProps);
|
|
23
|
+
const css = {
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexDirection,
|
|
26
|
+
justifyContent,
|
|
27
|
+
alignItems,
|
|
28
|
+
wordWrap: "break-word",
|
|
29
|
+
...styles.container
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ jsx(CardProvider, { value: styles, children: /* @__PURE__ */ jsx(
|
|
32
|
+
ui.article,
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
className: cx("ui-card", className),
|
|
36
|
+
__css: css,
|
|
37
|
+
...rest
|
|
38
|
+
}
|
|
39
|
+
) });
|
|
40
|
+
});
|
|
41
|
+
var CardHeader = forwardRef(
|
|
42
|
+
({ className, ...rest }, ref) => {
|
|
43
|
+
const styles = useCard();
|
|
44
|
+
const css = {
|
|
45
|
+
display: "flex",
|
|
46
|
+
justifyContent: "flex-start",
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
...styles.header
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ jsx(
|
|
51
|
+
ui.header,
|
|
52
|
+
{
|
|
53
|
+
ref,
|
|
54
|
+
className: cx("ui-card-header", className),
|
|
55
|
+
__css: css,
|
|
56
|
+
...rest
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
var CardBody = forwardRef(
|
|
62
|
+
({ className, ...rest }, ref) => {
|
|
63
|
+
const styles = useCard();
|
|
64
|
+
const css = {
|
|
65
|
+
display: "flex",
|
|
66
|
+
flexDirection: "column",
|
|
67
|
+
alignItems: "flex-start",
|
|
68
|
+
...styles.body
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ jsx(
|
|
71
|
+
ui.main,
|
|
72
|
+
{
|
|
73
|
+
ref,
|
|
74
|
+
className: cx("ui-card-body", className),
|
|
75
|
+
__css: css,
|
|
76
|
+
...rest
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
var CardFooter = forwardRef(
|
|
82
|
+
({ className, ...rest }, ref) => {
|
|
83
|
+
const styles = useCard();
|
|
84
|
+
const css = {
|
|
85
|
+
display: "flex",
|
|
86
|
+
justifyContent: "flex-start",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
...styles.footer
|
|
89
|
+
};
|
|
90
|
+
return /* @__PURE__ */ jsx(
|
|
91
|
+
ui.footer,
|
|
92
|
+
{
|
|
93
|
+
ref,
|
|
94
|
+
className: cx("ui-card-footer", className),
|
|
95
|
+
__css: css,
|
|
96
|
+
...rest
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
Card,
|
|
104
|
+
CardHeader,
|
|
105
|
+
CardBody,
|
|
106
|
+
CardFooter
|
|
107
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -52,38 +52,76 @@ var Card = (0, import_core.forwardRef)((props, ref) => {
|
|
|
52
52
|
wordWrap: "break-word",
|
|
53
53
|
...styles.container
|
|
54
54
|
};
|
|
55
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.header, { ref, className: (0, import_utils.cx)("ui-card-header", className), __css: css, ...rest });
|
|
66
|
-
});
|
|
67
|
-
var CardBody = (0, import_core.forwardRef)(({ className, ...rest }, ref) => {
|
|
68
|
-
const styles = useCard();
|
|
69
|
-
const css = {
|
|
70
|
-
display: "flex",
|
|
71
|
-
flexDirection: "column",
|
|
72
|
-
alignItems: "flex-start",
|
|
73
|
-
...styles.body
|
|
74
|
-
};
|
|
75
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.main, { ref, className: (0, import_utils.cx)("ui-card-body", className), __css: css, ...rest });
|
|
76
|
-
});
|
|
77
|
-
var CardFooter = (0, import_core.forwardRef)(({ className, ...rest }, ref) => {
|
|
78
|
-
const styles = useCard();
|
|
79
|
-
const css = {
|
|
80
|
-
display: "flex",
|
|
81
|
-
justifyContent: "flex-start",
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
...styles.footer
|
|
84
|
-
};
|
|
85
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.footer, { ref, className: (0, import_utils.cx)("ui-card-footer", className), __css: css, ...rest });
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
+
import_core.ui.article,
|
|
57
|
+
{
|
|
58
|
+
ref,
|
|
59
|
+
className: (0, import_utils.cx)("ui-card", className),
|
|
60
|
+
__css: css,
|
|
61
|
+
...rest
|
|
62
|
+
}
|
|
63
|
+
) });
|
|
86
64
|
});
|
|
65
|
+
var CardHeader = (0, import_core.forwardRef)(
|
|
66
|
+
({ className, ...rest }, ref) => {
|
|
67
|
+
const styles = useCard();
|
|
68
|
+
const css = {
|
|
69
|
+
display: "flex",
|
|
70
|
+
justifyContent: "flex-start",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
...styles.header
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
+
import_core.ui.header,
|
|
76
|
+
{
|
|
77
|
+
ref,
|
|
78
|
+
className: (0, import_utils.cx)("ui-card-header", className),
|
|
79
|
+
__css: css,
|
|
80
|
+
...rest
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
var CardBody = (0, import_core.forwardRef)(
|
|
86
|
+
({ className, ...rest }, ref) => {
|
|
87
|
+
const styles = useCard();
|
|
88
|
+
const css = {
|
|
89
|
+
display: "flex",
|
|
90
|
+
flexDirection: "column",
|
|
91
|
+
alignItems: "flex-start",
|
|
92
|
+
...styles.body
|
|
93
|
+
};
|
|
94
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
import_core.ui.main,
|
|
96
|
+
{
|
|
97
|
+
ref,
|
|
98
|
+
className: (0, import_utils.cx)("ui-card-body", className),
|
|
99
|
+
__css: css,
|
|
100
|
+
...rest
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
var CardFooter = (0, import_core.forwardRef)(
|
|
106
|
+
({ className, ...rest }, ref) => {
|
|
107
|
+
const styles = useCard();
|
|
108
|
+
const css = {
|
|
109
|
+
display: "flex",
|
|
110
|
+
justifyContent: "flex-start",
|
|
111
|
+
alignItems: "center",
|
|
112
|
+
...styles.footer
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
+
import_core.ui.footer,
|
|
116
|
+
{
|
|
117
|
+
ref,
|
|
118
|
+
className: (0, import_utils.cx)("ui-card-footer", className),
|
|
119
|
+
__css: css,
|
|
120
|
+
...rest
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
);
|
|
87
125
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
126
|
0 && (module.exports = {
|
|
89
127
|
Card,
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/card",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Yamada UI card component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yamada-ui/core": "0.5.
|
|
39
|
-
"@yamada-ui/utils": "0.1.
|
|
38
|
+
"@yamada-ui/core": "0.5.3",
|
|
39
|
+
"@yamada-ui/utils": "0.1.4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"react": "^18.0.0",
|
package/dist/chunk-JG6OERSN.mjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// src/card.tsx
|
|
2
|
-
import {
|
|
3
|
-
ui,
|
|
4
|
-
forwardRef,
|
|
5
|
-
omitThemeProps,
|
|
6
|
-
useMultiComponentStyle
|
|
7
|
-
} from "@yamada-ui/core";
|
|
8
|
-
import { createContext, cx } from "@yamada-ui/utils";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var [CardProvider, useCard] = createContext({
|
|
11
|
-
name: `CardContext`,
|
|
12
|
-
errorMessage: `useCard returned is 'undefined'. Seems you forgot to wrap the components in "<Card />" `
|
|
13
|
-
});
|
|
14
|
-
var Card = forwardRef((props, ref) => {
|
|
15
|
-
const [styles, mergedProps] = useMultiComponentStyle("Card", props);
|
|
16
|
-
const {
|
|
17
|
-
className,
|
|
18
|
-
direction: flexDirection = "column",
|
|
19
|
-
justify: justifyContent,
|
|
20
|
-
align: alignItems,
|
|
21
|
-
...rest
|
|
22
|
-
} = omitThemeProps(mergedProps);
|
|
23
|
-
const css = {
|
|
24
|
-
display: "flex",
|
|
25
|
-
flexDirection,
|
|
26
|
-
justifyContent,
|
|
27
|
-
alignItems,
|
|
28
|
-
wordWrap: "break-word",
|
|
29
|
-
...styles.container
|
|
30
|
-
};
|
|
31
|
-
return /* @__PURE__ */ jsx(CardProvider, { value: styles, children: /* @__PURE__ */ jsx(ui.article, { ref, className: cx("ui-card", className), __css: css, ...rest }) });
|
|
32
|
-
});
|
|
33
|
-
var CardHeader = forwardRef(({ className, ...rest }, ref) => {
|
|
34
|
-
const styles = useCard();
|
|
35
|
-
const css = {
|
|
36
|
-
display: "flex",
|
|
37
|
-
justifyContent: "flex-start",
|
|
38
|
-
alignItems: "center",
|
|
39
|
-
...styles.header
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ jsx(ui.header, { ref, className: cx("ui-card-header", className), __css: css, ...rest });
|
|
42
|
-
});
|
|
43
|
-
var CardBody = forwardRef(({ className, ...rest }, ref) => {
|
|
44
|
-
const styles = useCard();
|
|
45
|
-
const css = {
|
|
46
|
-
display: "flex",
|
|
47
|
-
flexDirection: "column",
|
|
48
|
-
alignItems: "flex-start",
|
|
49
|
-
...styles.body
|
|
50
|
-
};
|
|
51
|
-
return /* @__PURE__ */ jsx(ui.main, { ref, className: cx("ui-card-body", className), __css: css, ...rest });
|
|
52
|
-
});
|
|
53
|
-
var CardFooter = forwardRef(({ className, ...rest }, ref) => {
|
|
54
|
-
const styles = useCard();
|
|
55
|
-
const css = {
|
|
56
|
-
display: "flex",
|
|
57
|
-
justifyContent: "flex-start",
|
|
58
|
-
alignItems: "center",
|
|
59
|
-
...styles.footer
|
|
60
|
-
};
|
|
61
|
-
return /* @__PURE__ */ jsx(ui.footer, { ref, className: cx("ui-card-footer", className), __css: css, ...rest });
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export {
|
|
65
|
-
Card,
|
|
66
|
-
CardHeader,
|
|
67
|
-
CardBody,
|
|
68
|
-
CardFooter
|
|
69
|
-
};
|