@starasia/card 1.0.2 → 1.0.3
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.es.js +10 -7
- package/dist/card.umd.js +7 -4
- package/package.json +6 -6
package/dist/card.es.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
2
|
+
const d = `:root {
|
|
3
3
|
/* radius */
|
|
4
4
|
--starasia-ui-card-border-radius: var(--starasia-ui-radii-md, 6px);
|
|
5
5
|
|
|
6
|
+
/* white */
|
|
7
|
+
--starasia-ui-card-color-white: var(--starasia-ui-color-gray-50, rgba(255, 254, 255, 1));
|
|
8
|
+
|
|
6
9
|
/* background color */
|
|
7
10
|
--starasia-ui-card-background-color: var(
|
|
8
11
|
--starasia-ui-color-gray-50,
|
|
9
|
-
|
|
12
|
+
rgba(249, 250, 251, 1)
|
|
10
13
|
);
|
|
11
14
|
|
|
12
15
|
/* border color */
|
|
13
|
-
--starasia-ui-card-border-color: var(--starasia-ui-color-gray-300,
|
|
16
|
+
--starasia-ui-card-border-color: var(--starasia-ui-color-gray-300, rgba(209, 213, 219, 1));
|
|
14
17
|
|
|
15
18
|
/* box shadow */
|
|
16
19
|
--starasia-ui-card-box-shadow: var(
|
|
@@ -40,13 +43,13 @@ const n = `:root {
|
|
|
40
43
|
.starasia-card-footer {
|
|
41
44
|
padding: var(--starasia-ui-spacing-lg, 16px);
|
|
42
45
|
}
|
|
43
|
-
`,
|
|
44
|
-
if (!document.getElementById(
|
|
46
|
+
`, n = "starasia-card-styles", t = (r) => {
|
|
47
|
+
if (!document.getElementById(n)) {
|
|
45
48
|
const a = document.createElement("style");
|
|
46
|
-
a.id =
|
|
49
|
+
a.id = n, a.textContent = r, document.head.appendChild(a);
|
|
47
50
|
}
|
|
48
51
|
};
|
|
49
|
-
t(
|
|
52
|
+
t(d);
|
|
50
53
|
const i = ({ children: r, style: a }) => /* @__PURE__ */ s("div", { className: "starasia-card", style: { ...a }, children: r }), e = ({ children: r, style: a }) => /* @__PURE__ */ s("div", { className: "starasia-card-header", style: { ...a }, children: r }), c = ({ children: r, style: a }) => /* @__PURE__ */ s("div", { className: "starasia-card-body", style: { ...a }, children: r }), l = ({ children: r, style: a }) => /* @__PURE__ */ s("div", { className: "starasia-card-footer", style: { ...a }, children: r });
|
|
51
54
|
export {
|
|
52
55
|
i as Card,
|
package/dist/card.umd.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
(function(r,
|
|
1
|
+
(function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.Card={},r.jsxRuntime))})(this,function(r,n){"use strict";const t=`:root {
|
|
2
2
|
/* radius */
|
|
3
3
|
--starasia-ui-card-border-radius: var(--starasia-ui-radii-md, 6px);
|
|
4
4
|
|
|
5
|
+
/* white */
|
|
6
|
+
--starasia-ui-card-color-white: var(--starasia-ui-color-gray-50, rgba(255, 254, 255, 1));
|
|
7
|
+
|
|
5
8
|
/* background color */
|
|
6
9
|
--starasia-ui-card-background-color: var(
|
|
7
10
|
--starasia-ui-color-gray-50,
|
|
8
|
-
|
|
11
|
+
rgba(249, 250, 251, 1)
|
|
9
12
|
);
|
|
10
13
|
|
|
11
14
|
/* border color */
|
|
12
|
-
--starasia-ui-card-border-color: var(--starasia-ui-color-gray-300,
|
|
15
|
+
--starasia-ui-card-border-color: var(--starasia-ui-color-gray-300, rgba(209, 213, 219, 1));
|
|
13
16
|
|
|
14
17
|
/* box shadow */
|
|
15
18
|
--starasia-ui-card-box-shadow: var(
|
|
@@ -39,4 +42,4 @@
|
|
|
39
42
|
.starasia-card-footer {
|
|
40
43
|
padding: var(--starasia-ui-spacing-lg, 16px);
|
|
41
44
|
}
|
|
42
|
-
`,
|
|
45
|
+
`,d="starasia-card-styles";(s=>{if(!document.getElementById(d)){const a=document.createElement("style");a.id=d,a.textContent=s,document.head.appendChild(a)}})(t);const e=({children:s,style:a})=>n.jsx("div",{className:"starasia-card",style:{...a},children:s}),i=({children:s,style:a})=>n.jsx("div",{className:"starasia-card-header",style:{...a},children:s}),o=({children:s,style:a})=>n.jsx("div",{className:"starasia-card-body",style:{...a},children:s}),c=({children:s,style:a})=>n.jsx("div",{className:"starasia-card-footer",style:{...a},children:s});r.Card=e,r.CardBody=o,r.CardFooter=c,r.CardHeader=i,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starasia/card",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Card component for starasia UI",
|
|
5
5
|
"author": "Prawito Hudoro",
|
|
6
6
|
"main": "dist/card.umd.js",
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"dist/*.map",
|
|
13
13
|
"dist/*.css"
|
|
14
14
|
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"dev": "vite --config vite.config.ts --port 3000",
|
|
17
|
+
"build": "vite build --config vite.config.ts"
|
|
18
|
+
},
|
|
15
19
|
"keywords": [],
|
|
16
20
|
"license": "ISC",
|
|
17
21
|
"type": "module",
|
|
@@ -33,9 +37,5 @@
|
|
|
33
37
|
"react-dom": "^18.2.0",
|
|
34
38
|
"@types/react": "^18.2.55",
|
|
35
39
|
"@types/react-dom": "^18.2.19"
|
|
36
|
-
},
|
|
37
|
-
"scripts": {
|
|
38
|
-
"dev": "vite --config vite.config.ts --port 3000",
|
|
39
|
-
"build": "vite build --config vite.config.ts"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|