@aristobyte-ui/card 1.0.112 → 2.1.0

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.
@@ -0,0 +1,61 @@
1
+ .card {
2
+ align-self: stretch;
3
+ align-items: flex-start;
4
+ border-radius: 10px;
5
+ border: 1px solid #314158; //@TODO: @COLOR
6
+ background-color: rgba(29, 41, 61, 0.3); //@TODO: @COLOR
7
+ display: flex;
8
+ flex-direction: column;
9
+ padding: 17px 17px 30px;
10
+ transition: all 150ms ease-out;
11
+ width: calc(100% - 2 * 17px);
12
+
13
+ &__icon {
14
+ align-items: center;
15
+ display: flex;
16
+ justify-content: center;
17
+ }
18
+
19
+ &__title {
20
+ align-items: center;
21
+ color: #e2e8f0; //@TODO: @COLOR
22
+ display: flex;
23
+ font-size: 20px;
24
+ font-style: normal;
25
+ font-weight: 500;
26
+ line-height: 20px;
27
+ gap: 12px;
28
+
29
+ b {
30
+ border: solid rgba(69, 85, 108, 0.5); // @TODO: @COLOR
31
+ background-color: rgba(49, 65, 88, 0.4); // @TODO: @COLOR
32
+ border-radius: 10px;
33
+ color: $white;
34
+ padding: 3px 6px;
35
+ }
36
+ }
37
+
38
+ &__description {
39
+ color: #90a1b9; //@TODO: @COLOR
40
+ font-size: 16px;
41
+ font-style: normal;
42
+ font-weight: 400;
43
+ line-height: 22px;
44
+ margin: 14px 0 0;
45
+
46
+ b {
47
+ border: solid rgba(69, 85, 108, 0.5); // @TODO: @COLOR
48
+ background-color: rgba(49, 65, 88, 0.4); // @TODO: @COLOR
49
+ border-radius: 10px;
50
+ color: $white;
51
+ padding: 3px 6px;
52
+ }
53
+ }
54
+
55
+ &__content {
56
+ display: flex;
57
+ flex-direction: column;
58
+ margin: 24px 0 0;
59
+ width: 100%;
60
+ }
61
+ }
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import { Label } from "@aristobyte-ui/label";
3
+ export var Card = function (_a) {
4
+ var title = _a.title, description = _a.description, label = _a.label, icon = _a.icon, children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
5
+ return (React.createElement("div", { className: "card ".concat(className), style: style },
6
+ (title || icon || label) && (React.createElement("h3", { className: "card__title" },
7
+ icon && (React.createElement("div", { className: "card__icon" }, icon.component({
8
+ size: icon.size || 8,
9
+ color: icon.color,
10
+ colors: icon.colors,
11
+ }))),
12
+ title && React.createElement("span", { dangerouslySetInnerHTML: { __html: title } }),
13
+ label && (React.createElement(Label, { text: label.text, backgroundColor: label.backgroundColor, borderColor: label.borderColor, color: label.color })))),
14
+ description && (React.createElement("p", { className: "card__description", dangerouslySetInnerHTML: { __html: description } })),
15
+ children && React.createElement("div", { className: "card__content" }, children)));
16
+ };
@@ -0,0 +1 @@
1
+ export * from "./Card";
@@ -0,0 +1,61 @@
1
+ .card {
2
+ align-self: stretch;
3
+ align-items: flex-start;
4
+ border-radius: 10px;
5
+ border: 1px solid #314158; //@TODO: @COLOR
6
+ background-color: rgba(29, 41, 61, 0.3); //@TODO: @COLOR
7
+ display: flex;
8
+ flex-direction: column;
9
+ padding: 17px 17px 30px;
10
+ transition: all 150ms ease-out;
11
+ width: calc(100% - 2 * 17px);
12
+
13
+ &__icon {
14
+ align-items: center;
15
+ display: flex;
16
+ justify-content: center;
17
+ }
18
+
19
+ &__title {
20
+ align-items: center;
21
+ color: #e2e8f0; //@TODO: @COLOR
22
+ display: flex;
23
+ font-size: 20px;
24
+ font-style: normal;
25
+ font-weight: 500;
26
+ line-height: 20px;
27
+ gap: 12px;
28
+
29
+ b {
30
+ border: solid rgba(69, 85, 108, 0.5); // @TODO: @COLOR
31
+ background-color: rgba(49, 65, 88, 0.4); // @TODO: @COLOR
32
+ border-radius: 10px;
33
+ color: $white;
34
+ padding: 3px 6px;
35
+ }
36
+ }
37
+
38
+ &__description {
39
+ color: #90a1b9; //@TODO: @COLOR
40
+ font-size: 16px;
41
+ font-style: normal;
42
+ font-weight: 400;
43
+ line-height: 22px;
44
+ margin: 14px 0 0;
45
+
46
+ b {
47
+ border: solid rgba(69, 85, 108, 0.5); // @TODO: @COLOR
48
+ background-color: rgba(49, 65, 88, 0.4); // @TODO: @COLOR
49
+ border-radius: 10px;
50
+ color: $white;
51
+ padding: 3px 6px;
52
+ }
53
+ }
54
+
55
+ &__content {
56
+ display: flex;
57
+ flex-direction: column;
58
+ margin: 24px 0 0;
59
+ width: 100%;
60
+ }
61
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Card = void 0;
37
+ var React = __importStar(require("react"));
38
+ var label_1 = require("@aristobyte-ui/label");
39
+ var Card = function (_a) {
40
+ var title = _a.title, description = _a.description, label = _a.label, icon = _a.icon, children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
41
+ return (React.createElement("div", { className: "card ".concat(className), style: style },
42
+ (title || icon || label) && (React.createElement("h3", { className: "card__title" },
43
+ icon && (React.createElement("div", { className: "card__icon" }, icon.component({
44
+ size: icon.size || 8,
45
+ color: icon.color,
46
+ colors: icon.colors,
47
+ }))),
48
+ title && React.createElement("span", { dangerouslySetInnerHTML: { __html: title } }),
49
+ label && (React.createElement(label_1.Label, { text: label.text, backgroundColor: label.backgroundColor, borderColor: label.borderColor, color: label.color })))),
50
+ description && (React.createElement("p", { className: "card__description", dangerouslySetInnerHTML: { __html: description } })),
51
+ children && React.createElement("div", { className: "card__content" }, children)));
52
+ };
53
+ exports.Card = Card;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Card"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aristobyte-ui/card",
3
3
  "description": "AristoByteUI Card component: a versatile container for displaying content and UI elements.",
4
- "version": "1.0.112",
4
+ "version": "2.1.0",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "author": "AristoByte <info@aristobyte.com>",
@@ -39,38 +39,14 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "main": "dist/index.js",
43
- "module": "dist/index.mjs",
44
- "types": "dist/index.d.ts",
45
- "exports": {
46
- ".": {
47
- "import": "./dist/index.mjs",
48
- "require": "./dist/index.js"
49
- }
50
- },
51
- "scripts": {
52
- "build": "tsup",
53
- "lint": "eslint . --max-warnings 0",
54
- "generate:component": "turbo gen react-component",
55
- "check-types": "tsc --noEmit"
56
- },
42
+ "main": "dist/lib/main/index.js",
43
+ "module": "dist/es/main/index.js",
57
44
  "peerDependencies": {
58
45
  "react": "^19.1.0",
59
46
  "react-dom": "^19.1.0"
60
47
  },
61
48
  "dependencies": {
62
- "@aristobyte-ui/label": "^1.0.112",
63
- "@aristobyte-ui/utils": "^1.0.112"
64
- },
65
- "devDependencies": {
66
- "@aristobyte-ui/eslint-config": "^1.0.112",
67
- "@aristobyte-ui/typescript-config": "^1.0.112",
68
- "@turbo/gen": "^2.5.0",
69
- "@types/node": "^24.3.0",
70
- "@types/react": "19.1.0",
71
- "@types/react-dom": "19.1.1",
72
- "eslint": "^9.27.0",
73
- "tsup": "^8.5.0",
74
- "typescript": "^5.8.3"
49
+ "@aristobyte-ui/label": "^2.1.0",
50
+ "@aristobyte-ui/utils": "^2.1.0"
75
51
  }
76
52
  }
package/dist/index.d.mts DELETED
@@ -1,25 +0,0 @@
1
- import * as React from 'react';
2
- import { IconPropsType } from '@aristobyte-ui/utils';
3
-
4
- interface ICard {
5
- title?: string;
6
- description?: string;
7
- label?: {
8
- text: string;
9
- backgroundColor?: string;
10
- borderColor?: string;
11
- color?: string;
12
- };
13
- icon?: {
14
- component: (props: IconPropsType) => React.JSX.Element | React.ReactNode | React.ReactElement;
15
- size?: number;
16
- color?: string;
17
- colors?: string[];
18
- };
19
- children?: React.ReactNode | React.ReactElement | string;
20
- className?: string;
21
- style?: React.CSSProperties;
22
- }
23
- declare const Card: React.FC<ICard>;
24
-
25
- export { Card, type ICard };
package/dist/index.d.ts DELETED
@@ -1,25 +0,0 @@
1
- import * as React from 'react';
2
- import { IconPropsType } from '@aristobyte-ui/utils';
3
-
4
- interface ICard {
5
- title?: string;
6
- description?: string;
7
- label?: {
8
- text: string;
9
- backgroundColor?: string;
10
- borderColor?: string;
11
- color?: string;
12
- };
13
- icon?: {
14
- component: (props: IconPropsType) => React.JSX.Element | React.ReactNode | React.ReactElement;
15
- size?: number;
16
- color?: string;
17
- colors?: string[];
18
- };
19
- children?: React.ReactNode | React.ReactElement | string;
20
- className?: string;
21
- style?: React.CSSProperties;
22
- }
23
- declare const Card: React.FC<ICard>;
24
-
25
- export { Card, type ICard };
package/dist/index.js DELETED
@@ -1,70 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- Card: () => Card
25
- });
26
- module.exports = __toCommonJS(index_exports);
27
-
28
- // components/Card/index.tsx
29
- var import_label = require("@aristobyte-ui/label");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var Card = ({
32
- title,
33
- description,
34
- label,
35
- icon,
36
- children,
37
- className = "",
38
- style = {}
39
- }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `card ${className}`, style, children: [
40
- (title || icon || label) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h3", { className: "card__title", children: [
41
- icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "card__icon", children: icon.component({
42
- size: icon.size || 8,
43
- color: icon.color,
44
- colors: icon.colors
45
- }) }),
46
- title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { dangerouslySetInnerHTML: { __html: title } }),
47
- label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
- import_label.Label,
49
- {
50
- text: label.text,
51
- backgroundColor: label.backgroundColor,
52
- borderColor: label.borderColor,
53
- color: label.color
54
- }
55
- )
56
- ] }),
57
- description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
58
- "p",
59
- {
60
- className: "card__description",
61
- dangerouslySetInnerHTML: { __html: description }
62
- }
63
- ),
64
- children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "card__content", children })
65
- ] });
66
- // Annotate the CommonJS export names for ESM import in node:
67
- 0 && (module.exports = {
68
- Card
69
- });
70
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../index.ts","../components/Card/index.tsx"],"sourcesContent":["export * from \"./components\";\n","import * as React from \"react\";\nimport { type IconPropsType } from \"@aristobyte-ui/utils\";\nimport { Label } from \"@aristobyte-ui/label\";\n\nexport interface ICard {\n title?: string;\n description?: string;\n label?: {\n text: string;\n backgroundColor?: string;\n borderColor?: string;\n color?: string;\n };\n icon?: {\n component: (\n props: IconPropsType\n ) => React.JSX.Element | React.ReactNode | React.ReactElement;\n size?: number;\n color?: string;\n colors?: string[];\n };\n children?: React.ReactNode | React.ReactElement | string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport const Card: React.FC<ICard> = ({\n title,\n description,\n label,\n icon,\n children,\n className = \"\",\n style = {},\n}) => (\n <div className={`card ${className}`} style={style}>\n {(title || icon || label) && (\n <h3 className=\"card__title\">\n {icon && (\n <div className=\"card__icon\">\n {icon.component({\n size: icon.size || 8,\n color: icon.color,\n colors: icon.colors,\n })}\n </div>\n )}\n {title && <span dangerouslySetInnerHTML={{ __html: title }} />}\n {label && (\n <Label\n text={label.text}\n backgroundColor={label.backgroundColor}\n borderColor={label.borderColor}\n color={label.color}\n />\n )}\n </h3>\n )}\n {description && (\n <p\n className=\"card__description\"\n dangerouslySetInnerHTML={{ __html: description }}\n />\n )}\n {children && <div className=\"card__content\">{children}</div>}\n </div>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAsB;AAmChB;AAXC,IAAM,OAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AACX,MACE,6CAAC,SAAI,WAAW,QAAQ,SAAS,IAAI,OACjC;AAAA,YAAS,QAAQ,UACjB,6CAAC,QAAG,WAAU,eACX;AAAA,YACC,4CAAC,SAAI,WAAU,cACZ,eAAK,UAAU;AAAA,MACd,MAAM,KAAK,QAAQ;AAAA,MACnB,OAAO,KAAK;AAAA,MACZ,QAAQ,KAAK;AAAA,IACf,CAAC,GACH;AAAA,IAED,SAAS,4CAAC,UAAK,yBAAyB,EAAE,QAAQ,MAAM,GAAG;AAAA,IAC3D,SACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,MAAM;AAAA,QACZ,iBAAiB,MAAM;AAAA,QACvB,aAAa,MAAM;AAAA,QACnB,OAAO,MAAM;AAAA;AAAA,IACf;AAAA,KAEJ;AAAA,EAED,eACC;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,yBAAyB,EAAE,QAAQ,YAAY;AAAA;AAAA,EACjD;AAAA,EAED,YAAY,4CAAC,SAAI,WAAU,iBAAiB,UAAS;AAAA,GACxD;","names":[]}
package/dist/index.mjs DELETED
@@ -1,44 +0,0 @@
1
- "use client";
2
-
3
- // components/Card/index.tsx
4
- import { Label } from "@aristobyte-ui/label";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- var Card = ({
7
- title,
8
- description,
9
- label,
10
- icon,
11
- children,
12
- className = "",
13
- style = {}
14
- }) => /* @__PURE__ */ jsxs("div", { className: `card ${className}`, style, children: [
15
- (title || icon || label) && /* @__PURE__ */ jsxs("h3", { className: "card__title", children: [
16
- icon && /* @__PURE__ */ jsx("div", { className: "card__icon", children: icon.component({
17
- size: icon.size || 8,
18
- color: icon.color,
19
- colors: icon.colors
20
- }) }),
21
- title && /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: title } }),
22
- label && /* @__PURE__ */ jsx(
23
- Label,
24
- {
25
- text: label.text,
26
- backgroundColor: label.backgroundColor,
27
- borderColor: label.borderColor,
28
- color: label.color
29
- }
30
- )
31
- ] }),
32
- description && /* @__PURE__ */ jsx(
33
- "p",
34
- {
35
- className: "card__description",
36
- dangerouslySetInnerHTML: { __html: description }
37
- }
38
- ),
39
- children && /* @__PURE__ */ jsx("div", { className: "card__content", children })
40
- ] });
41
- export {
42
- Card
43
- };
44
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../components/Card/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { type IconPropsType } from \"@aristobyte-ui/utils\";\nimport { Label } from \"@aristobyte-ui/label\";\n\nexport interface ICard {\n title?: string;\n description?: string;\n label?: {\n text: string;\n backgroundColor?: string;\n borderColor?: string;\n color?: string;\n };\n icon?: {\n component: (\n props: IconPropsType\n ) => React.JSX.Element | React.ReactNode | React.ReactElement;\n size?: number;\n color?: string;\n colors?: string[];\n };\n children?: React.ReactNode | React.ReactElement | string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport const Card: React.FC<ICard> = ({\n title,\n description,\n label,\n icon,\n children,\n className = \"\",\n style = {},\n}) => (\n <div className={`card ${className}`} style={style}>\n {(title || icon || label) && (\n <h3 className=\"card__title\">\n {icon && (\n <div className=\"card__icon\">\n {icon.component({\n size: icon.size || 8,\n color: icon.color,\n colors: icon.colors,\n })}\n </div>\n )}\n {title && <span dangerouslySetInnerHTML={{ __html: title }} />}\n {label && (\n <Label\n text={label.text}\n backgroundColor={label.backgroundColor}\n borderColor={label.borderColor}\n color={label.color}\n />\n )}\n </h3>\n )}\n {description && (\n <p\n className=\"card__description\"\n dangerouslySetInnerHTML={{ __html: description }}\n />\n )}\n {children && <div className=\"card__content\">{children}</div>}\n </div>\n);\n"],"mappings":";;;AAEA,SAAS,aAAa;AAmChB,SAEI,KAFJ;AAXC,IAAM,OAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AACX,MACE,qBAAC,SAAI,WAAW,QAAQ,SAAS,IAAI,OACjC;AAAA,YAAS,QAAQ,UACjB,qBAAC,QAAG,WAAU,eACX;AAAA,YACC,oBAAC,SAAI,WAAU,cACZ,eAAK,UAAU;AAAA,MACd,MAAM,KAAK,QAAQ;AAAA,MACnB,OAAO,KAAK;AAAA,MACZ,QAAQ,KAAK;AAAA,IACf,CAAC,GACH;AAAA,IAED,SAAS,oBAAC,UAAK,yBAAyB,EAAE,QAAQ,MAAM,GAAG;AAAA,IAC3D,SACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,MAAM;AAAA,QACZ,iBAAiB,MAAM;AAAA,QACvB,aAAa,MAAM;AAAA,QACnB,OAAO,MAAM;AAAA;AAAA,IACf;AAAA,KAEJ;AAAA,EAED,eACC;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,yBAAyB,EAAE,QAAQ,YAAY;AAAA;AAAA,EACjD;AAAA,EAED,YAAY,oBAAC,SAAI,WAAU,iBAAiB,UAAS;AAAA,GACxD;","names":[]}