virtual-ui-lib 1.0.1 → 1.0.2

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/index.js CHANGED
@@ -29,9 +29,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/index.js
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
+ Alert: () => Alert,
33
+ Avatar: () => Avatar,
34
+ Badge: () => Badge,
32
35
  Button: () => Button,
33
36
  Card: () => Card,
34
- Input: () => Input
37
+ Input: () => Input,
38
+ Modal: () => Modal,
39
+ Spinner: () => Spinner
35
40
  });
36
41
  module.exports = __toCommonJS(index_exports);
37
42
 
@@ -161,9 +166,159 @@ var Input = ({
161
166
  }
162
167
  );
163
168
  };
169
+
170
+ // src/components/Badge/Badge.jsx
171
+ var import_react4 = __toESM(require("react"));
172
+ var Badge = ({
173
+ text = "Badge",
174
+ bg = "#111",
175
+ color = "white",
176
+ radius = "12px",
177
+ padding = "4px 10px",
178
+ size = "12px"
179
+ }) => {
180
+ return /* @__PURE__ */ import_react4.default.createElement(
181
+ "span",
182
+ {
183
+ style: {
184
+ background: bg,
185
+ color,
186
+ padding,
187
+ borderRadius: radius,
188
+ fontSize: size,
189
+ display: "inline-block"
190
+ }
191
+ },
192
+ text
193
+ );
194
+ };
195
+
196
+ // src/components/Alert/Alert.jsx
197
+ var import_react5 = __toESM(require("react"));
198
+ var Alert = ({
199
+ text = "Alert message",
200
+ bg = "#facc15",
201
+ color = "#111",
202
+ radius = "6px",
203
+ padding = "10px",
204
+ width = "auto"
205
+ }) => {
206
+ return /* @__PURE__ */ import_react5.default.createElement(
207
+ "div",
208
+ {
209
+ style: {
210
+ background: bg,
211
+ color,
212
+ padding,
213
+ borderRadius: radius,
214
+ width
215
+ }
216
+ },
217
+ text
218
+ );
219
+ };
220
+
221
+ // src/components/Avatar/Avatar.jsx
222
+ var import_react6 = __toESM(require("react"));
223
+ var Avatar = ({
224
+ src = "\u{1F464}",
225
+ size = "40px",
226
+ radius = "50%"
227
+ }) => {
228
+ return /* @__PURE__ */ import_react6.default.createElement(
229
+ "img",
230
+ {
231
+ src,
232
+ alt: "avatar",
233
+ style: {
234
+ width: size,
235
+ height: size,
236
+ borderRadius: radius,
237
+ objectFit: "cover"
238
+ }
239
+ }
240
+ );
241
+ };
242
+
243
+ // src/components/Spinner/Spinner.jsx
244
+ var import_react7 = __toESM(require("react"));
245
+ var Spinner = ({
246
+ size = "30px",
247
+ color = "#2563eb",
248
+ border = "3px"
249
+ }) => {
250
+ return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement("style", null, `
251
+ @keyframes vui-spin {
252
+ to {
253
+ transform: rotate(360deg);
254
+ }
255
+ }
256
+ `), /* @__PURE__ */ import_react7.default.createElement(
257
+ "div",
258
+ {
259
+ style: {
260
+ width: size,
261
+ height: size,
262
+ border: `${border} solid #eee`,
263
+ borderTop: `${border} solid ${color}`,
264
+ borderRadius: "50%",
265
+ animation: "vui-spin 1s linear infinite"
266
+ }
267
+ }
268
+ ));
269
+ };
270
+
271
+ // src/components/Modal/Modal.jsx
272
+ var import_react8 = __toESM(require("react"));
273
+ var Modal = ({
274
+ open = false,
275
+ title = "Modal Title",
276
+ children,
277
+ width = "300px",
278
+ bg = "white",
279
+ radius = "8px",
280
+ onClose
281
+ }) => {
282
+ if (!open) return null;
283
+ return /* @__PURE__ */ import_react8.default.createElement(
284
+ "div",
285
+ {
286
+ style: {
287
+ position: "fixed",
288
+ top: 0,
289
+ left: 0,
290
+ width: "100%",
291
+ height: "100%",
292
+ background: "rgba(0,0,0,0.3)",
293
+ display: "flex",
294
+ alignItems: "center",
295
+ justifyContent: "center"
296
+ }
297
+ },
298
+ /* @__PURE__ */ import_react8.default.createElement(
299
+ "div",
300
+ {
301
+ style: {
302
+ width,
303
+ background: bg,
304
+ borderRadius: radius,
305
+ padding: "20px"
306
+ }
307
+ },
308
+ /* @__PURE__ */ import_react8.default.createElement("h3", null, title),
309
+ children,
310
+ /* @__PURE__ */ import_react8.default.createElement("button", { onClick: onClose }, "Close")
311
+ )
312
+ );
313
+ };
164
314
  // Annotate the CommonJS export names for ESM import in node:
165
315
  0 && (module.exports = {
316
+ Alert,
317
+ Avatar,
318
+ Badge,
166
319
  Button,
167
320
  Card,
168
- Input
321
+ Input,
322
+ Modal,
323
+ Spinner
169
324
  });
package/dist/index.mjs CHANGED
@@ -124,8 +124,158 @@ var Input = ({
124
124
  }
125
125
  );
126
126
  };
127
+
128
+ // src/components/Badge/Badge.jsx
129
+ import React4 from "react";
130
+ var Badge = ({
131
+ text = "Badge",
132
+ bg = "#111",
133
+ color = "white",
134
+ radius = "12px",
135
+ padding = "4px 10px",
136
+ size = "12px"
137
+ }) => {
138
+ return /* @__PURE__ */ React4.createElement(
139
+ "span",
140
+ {
141
+ style: {
142
+ background: bg,
143
+ color,
144
+ padding,
145
+ borderRadius: radius,
146
+ fontSize: size,
147
+ display: "inline-block"
148
+ }
149
+ },
150
+ text
151
+ );
152
+ };
153
+
154
+ // src/components/Alert/Alert.jsx
155
+ import React5 from "react";
156
+ var Alert = ({
157
+ text = "Alert message",
158
+ bg = "#facc15",
159
+ color = "#111",
160
+ radius = "6px",
161
+ padding = "10px",
162
+ width = "auto"
163
+ }) => {
164
+ return /* @__PURE__ */ React5.createElement(
165
+ "div",
166
+ {
167
+ style: {
168
+ background: bg,
169
+ color,
170
+ padding,
171
+ borderRadius: radius,
172
+ width
173
+ }
174
+ },
175
+ text
176
+ );
177
+ };
178
+
179
+ // src/components/Avatar/Avatar.jsx
180
+ import React6 from "react";
181
+ var Avatar = ({
182
+ src = "\u{1F464}",
183
+ size = "40px",
184
+ radius = "50%"
185
+ }) => {
186
+ return /* @__PURE__ */ React6.createElement(
187
+ "img",
188
+ {
189
+ src,
190
+ alt: "avatar",
191
+ style: {
192
+ width: size,
193
+ height: size,
194
+ borderRadius: radius,
195
+ objectFit: "cover"
196
+ }
197
+ }
198
+ );
199
+ };
200
+
201
+ // src/components/Spinner/Spinner.jsx
202
+ import React7 from "react";
203
+ var Spinner = ({
204
+ size = "30px",
205
+ color = "#2563eb",
206
+ border = "3px"
207
+ }) => {
208
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("style", null, `
209
+ @keyframes vui-spin {
210
+ to {
211
+ transform: rotate(360deg);
212
+ }
213
+ }
214
+ `), /* @__PURE__ */ React7.createElement(
215
+ "div",
216
+ {
217
+ style: {
218
+ width: size,
219
+ height: size,
220
+ border: `${border} solid #eee`,
221
+ borderTop: `${border} solid ${color}`,
222
+ borderRadius: "50%",
223
+ animation: "vui-spin 1s linear infinite"
224
+ }
225
+ }
226
+ ));
227
+ };
228
+
229
+ // src/components/Modal/Modal.jsx
230
+ import React8 from "react";
231
+ var Modal = ({
232
+ open = false,
233
+ title = "Modal Title",
234
+ children,
235
+ width = "300px",
236
+ bg = "white",
237
+ radius = "8px",
238
+ onClose
239
+ }) => {
240
+ if (!open) return null;
241
+ return /* @__PURE__ */ React8.createElement(
242
+ "div",
243
+ {
244
+ style: {
245
+ position: "fixed",
246
+ top: 0,
247
+ left: 0,
248
+ width: "100%",
249
+ height: "100%",
250
+ background: "rgba(0,0,0,0.3)",
251
+ display: "flex",
252
+ alignItems: "center",
253
+ justifyContent: "center"
254
+ }
255
+ },
256
+ /* @__PURE__ */ React8.createElement(
257
+ "div",
258
+ {
259
+ style: {
260
+ width,
261
+ background: bg,
262
+ borderRadius: radius,
263
+ padding: "20px"
264
+ }
265
+ },
266
+ /* @__PURE__ */ React8.createElement("h3", null, title),
267
+ children,
268
+ /* @__PURE__ */ React8.createElement("button", { onClick: onClose }, "Close")
269
+ )
270
+ );
271
+ };
127
272
  export {
273
+ Alert,
274
+ Avatar,
275
+ Badge,
128
276
  Button,
129
277
  Card,
130
- Input
278
+ Input,
279
+ Modal,
280
+ Spinner
131
281
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-lib",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "author": "Ankush",
6
6
  "license": "ISC",