omui-lib 1.0.28 → 1.0.30

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,143 @@
1
+ // src/components/ScatterChartCard/ScatterChartCard.jsx
2
+ import React from "react";
3
+ var ScatterChartCard = ({
4
+ title = "Ad Spend vs Revenue",
5
+ data = [
6
+ { x: 10, y: 20 },
7
+ { x: 20, y: 35 },
8
+ { x: 30, y: 28 },
9
+ { x: 40, y: 50 },
10
+ { x: 50, y: 65 },
11
+ { x: 60, y: 58 },
12
+ { x: 70, y: 80 },
13
+ { x: 80, y: 75 }
14
+ ],
15
+ xLabel = "Ad Spend",
16
+ yLabel = "Revenue",
17
+ color = "#6366f1"
18
+ }) => {
19
+ const width = 450;
20
+ const height = 250;
21
+ const padding = {
22
+ top: 20,
23
+ right: 20,
24
+ bottom: 40,
25
+ left: 45
26
+ };
27
+ const chartWidth = width - padding.left - padding.right;
28
+ const chartHeight = height - padding.top - padding.bottom;
29
+ const maxX = Math.max(...data.map((item) => item.x));
30
+ const maxY = Math.max(...data.map((item) => item.y));
31
+ const getX = (value) => padding.left + value / maxX * chartWidth;
32
+ const getY = (value) => height - padding.bottom - value / maxY * chartHeight;
33
+ return /* @__PURE__ */ React.createElement(
34
+ "div",
35
+ {
36
+ style: {
37
+ width: "500px",
38
+ padding: "24px",
39
+ borderRadius: "20px",
40
+ background: "rgba(255,255,255,0.08)",
41
+ border: "1px solid rgba(255,255,255,0.12)",
42
+ backdropFilter: "blur(12px)",
43
+ WebkitBackdropFilter: "blur(12px)",
44
+ color: "#fff",
45
+ boxShadow: "0 10px 30px rgba(0,0,0,0.2)"
46
+ }
47
+ },
48
+ /* @__PURE__ */ React.createElement(
49
+ "h3",
50
+ {
51
+ style: {
52
+ margin: "0 0 20px",
53
+ fontSize: "18px",
54
+ fontWeight: "600"
55
+ }
56
+ },
57
+ title
58
+ ),
59
+ /* @__PURE__ */ React.createElement(
60
+ "svg",
61
+ {
62
+ width: "100%",
63
+ viewBox: `0 0 ${width} ${height}`,
64
+ style: {
65
+ overflow: "visible"
66
+ }
67
+ },
68
+ [0, 25, 50, 75, 100].map((value) => {
69
+ const y = getY(value / 100 * maxY);
70
+ return /* @__PURE__ */ React.createElement(
71
+ "line",
72
+ {
73
+ key: value,
74
+ x1: padding.left,
75
+ y1: y,
76
+ x2: width - padding.right,
77
+ y2: y,
78
+ stroke: "rgba(255,255,255,0.1)",
79
+ strokeWidth: "1"
80
+ }
81
+ );
82
+ }),
83
+ /* @__PURE__ */ React.createElement(
84
+ "line",
85
+ {
86
+ x1: padding.left,
87
+ y1: height - padding.bottom,
88
+ x2: width - padding.right,
89
+ y2: height - padding.bottom,
90
+ stroke: "rgba(255,255,255,0.3)"
91
+ }
92
+ ),
93
+ /* @__PURE__ */ React.createElement(
94
+ "line",
95
+ {
96
+ x1: padding.left,
97
+ y1: padding.top,
98
+ x2: padding.left,
99
+ y2: height - padding.bottom,
100
+ stroke: "rgba(255,255,255,0.3)"
101
+ }
102
+ ),
103
+ data.map((item, index) => /* @__PURE__ */ React.createElement(
104
+ "circle",
105
+ {
106
+ key: index,
107
+ cx: getX(item.x),
108
+ cy: getY(item.y),
109
+ r: "6",
110
+ fill: color,
111
+ opacity: "0.85"
112
+ }
113
+ )),
114
+ /* @__PURE__ */ React.createElement(
115
+ "text",
116
+ {
117
+ x: width / 2,
118
+ y: height - 5,
119
+ textAnchor: "middle",
120
+ fill: "rgba(255,255,255,0.5)",
121
+ fontSize: "11"
122
+ },
123
+ xLabel
124
+ ),
125
+ /* @__PURE__ */ React.createElement(
126
+ "text",
127
+ {
128
+ x: "12",
129
+ y: height / 2,
130
+ textAnchor: "middle",
131
+ fill: "rgba(255,255,255,0.5)",
132
+ fontSize: "11",
133
+ transform: `rotate(-90 12 ${height / 2})`
134
+ },
135
+ yLabel
136
+ )
137
+ )
138
+ );
139
+ };
140
+
141
+ export {
142
+ ScatterChartCard
143
+ };
@@ -0,0 +1,176 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/ScatterChartCard/ScatterChartCard.jsx
30
+ var ScatterChartCard_exports = {};
31
+ __export(ScatterChartCard_exports, {
32
+ ScatterChartCard: () => ScatterChartCard
33
+ });
34
+ module.exports = __toCommonJS(ScatterChartCard_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var ScatterChartCard = ({
37
+ title = "Ad Spend vs Revenue",
38
+ data = [
39
+ { x: 10, y: 20 },
40
+ { x: 20, y: 35 },
41
+ { x: 30, y: 28 },
42
+ { x: 40, y: 50 },
43
+ { x: 50, y: 65 },
44
+ { x: 60, y: 58 },
45
+ { x: 70, y: 80 },
46
+ { x: 80, y: 75 }
47
+ ],
48
+ xLabel = "Ad Spend",
49
+ yLabel = "Revenue",
50
+ color = "#6366f1"
51
+ }) => {
52
+ const width = 450;
53
+ const height = 250;
54
+ const padding = {
55
+ top: 20,
56
+ right: 20,
57
+ bottom: 40,
58
+ left: 45
59
+ };
60
+ const chartWidth = width - padding.left - padding.right;
61
+ const chartHeight = height - padding.top - padding.bottom;
62
+ const maxX = Math.max(...data.map((item) => item.x));
63
+ const maxY = Math.max(...data.map((item) => item.y));
64
+ const getX = (value) => padding.left + value / maxX * chartWidth;
65
+ const getY = (value) => height - padding.bottom - value / maxY * chartHeight;
66
+ return /* @__PURE__ */ import_react.default.createElement(
67
+ "div",
68
+ {
69
+ style: {
70
+ width: "500px",
71
+ padding: "24px",
72
+ borderRadius: "20px",
73
+ background: "rgba(255,255,255,0.08)",
74
+ border: "1px solid rgba(255,255,255,0.12)",
75
+ backdropFilter: "blur(12px)",
76
+ WebkitBackdropFilter: "blur(12px)",
77
+ color: "#fff",
78
+ boxShadow: "0 10px 30px rgba(0,0,0,0.2)"
79
+ }
80
+ },
81
+ /* @__PURE__ */ import_react.default.createElement(
82
+ "h3",
83
+ {
84
+ style: {
85
+ margin: "0 0 20px",
86
+ fontSize: "18px",
87
+ fontWeight: "600"
88
+ }
89
+ },
90
+ title
91
+ ),
92
+ /* @__PURE__ */ import_react.default.createElement(
93
+ "svg",
94
+ {
95
+ width: "100%",
96
+ viewBox: `0 0 ${width} ${height}`,
97
+ style: {
98
+ overflow: "visible"
99
+ }
100
+ },
101
+ [0, 25, 50, 75, 100].map((value) => {
102
+ const y = getY(value / 100 * maxY);
103
+ return /* @__PURE__ */ import_react.default.createElement(
104
+ "line",
105
+ {
106
+ key: value,
107
+ x1: padding.left,
108
+ y1: y,
109
+ x2: width - padding.right,
110
+ y2: y,
111
+ stroke: "rgba(255,255,255,0.1)",
112
+ strokeWidth: "1"
113
+ }
114
+ );
115
+ }),
116
+ /* @__PURE__ */ import_react.default.createElement(
117
+ "line",
118
+ {
119
+ x1: padding.left,
120
+ y1: height - padding.bottom,
121
+ x2: width - padding.right,
122
+ y2: height - padding.bottom,
123
+ stroke: "rgba(255,255,255,0.3)"
124
+ }
125
+ ),
126
+ /* @__PURE__ */ import_react.default.createElement(
127
+ "line",
128
+ {
129
+ x1: padding.left,
130
+ y1: padding.top,
131
+ x2: padding.left,
132
+ y2: height - padding.bottom,
133
+ stroke: "rgba(255,255,255,0.3)"
134
+ }
135
+ ),
136
+ data.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
137
+ "circle",
138
+ {
139
+ key: index,
140
+ cx: getX(item.x),
141
+ cy: getY(item.y),
142
+ r: "6",
143
+ fill: color,
144
+ opacity: "0.85"
145
+ }
146
+ )),
147
+ /* @__PURE__ */ import_react.default.createElement(
148
+ "text",
149
+ {
150
+ x: width / 2,
151
+ y: height - 5,
152
+ textAnchor: "middle",
153
+ fill: "rgba(255,255,255,0.5)",
154
+ fontSize: "11"
155
+ },
156
+ xLabel
157
+ ),
158
+ /* @__PURE__ */ import_react.default.createElement(
159
+ "text",
160
+ {
161
+ x: "12",
162
+ y: height / 2,
163
+ textAnchor: "middle",
164
+ fill: "rgba(255,255,255,0.5)",
165
+ fontSize: "11",
166
+ transform: `rotate(-90 12 ${height / 2})`
167
+ },
168
+ yLabel
169
+ )
170
+ )
171
+ );
172
+ };
173
+ // Annotate the CommonJS export names for ESM import in node:
174
+ 0 && (module.exports = {
175
+ ScatterChartCard
176
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ ScatterChartCard
3
+ } from "../../chunk-EIMNJRM2.mjs";
4
+ export {
5
+ ScatterChartCard
6
+ };
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ __export(index_exports, {
45
45
  PricingCard: () => PricingCard,
46
46
  ProductCard: () => ProductCard,
47
47
  ProfileCard: () => ProfileCard,
48
+ ScatterChartCard: () => ScatterChartCard,
48
49
  SliderCard: () => SliderCard,
49
50
  StatsCard: () => StatsCard,
50
51
  SwipeCard: () => SwipeCard,
@@ -2379,6 +2380,146 @@ var CircularProgressCard = ({
2379
2380
  )
2380
2381
  );
2381
2382
  };
2383
+
2384
+ // src/components/ScatterChartCard/ScatterChartCard.jsx
2385
+ var import_react23 = __toESM(require("react"));
2386
+ var ScatterChartCard = ({
2387
+ title = "Ad Spend vs Revenue",
2388
+ data = [
2389
+ { x: 10, y: 20 },
2390
+ { x: 20, y: 35 },
2391
+ { x: 30, y: 28 },
2392
+ { x: 40, y: 50 },
2393
+ { x: 50, y: 65 },
2394
+ { x: 60, y: 58 },
2395
+ { x: 70, y: 80 },
2396
+ { x: 80, y: 75 }
2397
+ ],
2398
+ xLabel = "Ad Spend",
2399
+ yLabel = "Revenue",
2400
+ color = "#6366f1"
2401
+ }) => {
2402
+ const width = 450;
2403
+ const height = 250;
2404
+ const padding = {
2405
+ top: 20,
2406
+ right: 20,
2407
+ bottom: 40,
2408
+ left: 45
2409
+ };
2410
+ const chartWidth = width - padding.left - padding.right;
2411
+ const chartHeight = height - padding.top - padding.bottom;
2412
+ const maxX = Math.max(...data.map((item) => item.x));
2413
+ const maxY = Math.max(...data.map((item) => item.y));
2414
+ const getX = (value) => padding.left + value / maxX * chartWidth;
2415
+ const getY = (value) => height - padding.bottom - value / maxY * chartHeight;
2416
+ return /* @__PURE__ */ import_react23.default.createElement(
2417
+ "div",
2418
+ {
2419
+ style: {
2420
+ width: "500px",
2421
+ padding: "24px",
2422
+ borderRadius: "20px",
2423
+ background: "rgba(255,255,255,0.08)",
2424
+ border: "1px solid rgba(255,255,255,0.12)",
2425
+ backdropFilter: "blur(12px)",
2426
+ WebkitBackdropFilter: "blur(12px)",
2427
+ color: "#fff",
2428
+ boxShadow: "0 10px 30px rgba(0,0,0,0.2)"
2429
+ }
2430
+ },
2431
+ /* @__PURE__ */ import_react23.default.createElement(
2432
+ "h3",
2433
+ {
2434
+ style: {
2435
+ margin: "0 0 20px",
2436
+ fontSize: "18px",
2437
+ fontWeight: "600"
2438
+ }
2439
+ },
2440
+ title
2441
+ ),
2442
+ /* @__PURE__ */ import_react23.default.createElement(
2443
+ "svg",
2444
+ {
2445
+ width: "100%",
2446
+ viewBox: `0 0 ${width} ${height}`,
2447
+ style: {
2448
+ overflow: "visible"
2449
+ }
2450
+ },
2451
+ [0, 25, 50, 75, 100].map((value) => {
2452
+ const y = getY(value / 100 * maxY);
2453
+ return /* @__PURE__ */ import_react23.default.createElement(
2454
+ "line",
2455
+ {
2456
+ key: value,
2457
+ x1: padding.left,
2458
+ y1: y,
2459
+ x2: width - padding.right,
2460
+ y2: y,
2461
+ stroke: "rgba(255,255,255,0.1)",
2462
+ strokeWidth: "1"
2463
+ }
2464
+ );
2465
+ }),
2466
+ /* @__PURE__ */ import_react23.default.createElement(
2467
+ "line",
2468
+ {
2469
+ x1: padding.left,
2470
+ y1: height - padding.bottom,
2471
+ x2: width - padding.right,
2472
+ y2: height - padding.bottom,
2473
+ stroke: "rgba(255,255,255,0.3)"
2474
+ }
2475
+ ),
2476
+ /* @__PURE__ */ import_react23.default.createElement(
2477
+ "line",
2478
+ {
2479
+ x1: padding.left,
2480
+ y1: padding.top,
2481
+ x2: padding.left,
2482
+ y2: height - padding.bottom,
2483
+ stroke: "rgba(255,255,255,0.3)"
2484
+ }
2485
+ ),
2486
+ data.map((item, index) => /* @__PURE__ */ import_react23.default.createElement(
2487
+ "circle",
2488
+ {
2489
+ key: index,
2490
+ cx: getX(item.x),
2491
+ cy: getY(item.y),
2492
+ r: "6",
2493
+ fill: color,
2494
+ opacity: "0.85"
2495
+ }
2496
+ )),
2497
+ /* @__PURE__ */ import_react23.default.createElement(
2498
+ "text",
2499
+ {
2500
+ x: width / 2,
2501
+ y: height - 5,
2502
+ textAnchor: "middle",
2503
+ fill: "rgba(255,255,255,0.5)",
2504
+ fontSize: "11"
2505
+ },
2506
+ xLabel
2507
+ ),
2508
+ /* @__PURE__ */ import_react23.default.createElement(
2509
+ "text",
2510
+ {
2511
+ x: "12",
2512
+ y: height / 2,
2513
+ textAnchor: "middle",
2514
+ fill: "rgba(255,255,255,0.5)",
2515
+ fontSize: "11",
2516
+ transform: `rotate(-90 12 ${height / 2})`
2517
+ },
2518
+ yLabel
2519
+ )
2520
+ )
2521
+ );
2522
+ };
2382
2523
  // Annotate the CommonJS export names for ESM import in node:
2383
2524
  0 && (module.exports = {
2384
2525
  AnimatedProgressBar,
@@ -2397,6 +2538,7 @@ var CircularProgressCard = ({
2397
2538
  PricingCard,
2398
2539
  ProductCard,
2399
2540
  ProfileCard,
2541
+ ScatterChartCard,
2400
2542
  SliderCard,
2401
2543
  StatsCard,
2402
2544
  SwipeCard,
package/dist/index.mjs CHANGED
@@ -1,24 +1,27 @@
1
1
  import {
2
- StatsCard
3
- } from "./chunk-472PLVGR.mjs";
2
+ ScatterChartCard
3
+ } from "./chunk-EIMNJRM2.mjs";
4
4
  import {
5
- PricingCard
6
- } from "./chunk-FGTNFYFJ.mjs";
5
+ ProfileCard
6
+ } from "./chunk-WFKB25KN.mjs";
7
7
  import {
8
8
  SliderCard
9
9
  } from "./chunk-NJSJATQ6.mjs";
10
+ import {
11
+ StatsCard
12
+ } from "./chunk-472PLVGR.mjs";
10
13
  import {
11
14
  SwipeCard
12
15
  } from "./chunk-XD6E2QQI.mjs";
13
16
  import {
14
- ThumbnailCard
15
- } from "./chunk-57QJO5RD.mjs";
17
+ TeamMemberCard
18
+ } from "./chunk-J7V2DYUU.mjs";
16
19
  import {
17
20
  TestimonialCard
18
21
  } from "./chunk-M2MU6Y4N.mjs";
19
22
  import {
20
- TeamMemberCard
21
- } from "./chunk-J7V2DYUU.mjs";
23
+ ThumbnailCard
24
+ } from "./chunk-57QJO5RD.mjs";
22
25
  import {
23
26
  FeatureCard
24
27
  } from "./chunk-FQO2D4M6.mjs";
@@ -38,8 +41,8 @@ import {
38
41
  NotificationCard
39
42
  } from "./chunk-QOVSRTLJ.mjs";
40
43
  import {
41
- ProfileCard
42
- } from "./chunk-WFKB25KN.mjs";
44
+ PricingCard
45
+ } from "./chunk-FGTNFYFJ.mjs";
43
46
  import {
44
47
  ProductCard
45
48
  } from "./chunk-TVYAQSOM.mjs";
@@ -81,6 +84,7 @@ export {
81
84
  PricingCard,
82
85
  ProductCard,
83
86
  ProfileCard,
87
+ ScatterChartCard,
84
88
  SliderCard,
85
89
  StatsCard,
86
90
  SwipeCard,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omui-lib",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "omUI react component library",
5
5
  "license": "ISC",
6
6
  "author": "Om Mohanty",