virtual-ui-lib 1.0.41 → 1.0.43

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
@@ -30,9 +30,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  CodeBlock: () => CodeBlock,
33
+ CustomInputField: () => CustomInputField,
33
34
  OtpInput: () => OtpInput,
34
35
  SmartButton: () => SmartButton,
35
36
  StatCard: () => StatCard,
37
+ TextArea: () => TextArea,
36
38
  ToastNotification: () => ToastNotification
37
39
  });
38
40
  module.exports = __toCommonJS(index_exports);
@@ -307,11 +309,94 @@ var SmartButton = ({
307
309
  isLoading ? /* @__PURE__ */ import_react5.default.createElement("span", null, "Loading...") : /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, icon && /* @__PURE__ */ import_react5.default.createElement("span", { style: { marginRight: "8px" } }, icon), buttonText)
308
310
  );
309
311
  };
312
+
313
+ // src/components/CustomInputField/CustomInputField.jsx
314
+ var import_react6 = __toESM(require("react"));
315
+ var CustomInputField = ({
316
+ label = "Label",
317
+ placeholder = "Enter text...",
318
+ errorMessage = "",
319
+ helperText = "",
320
+ value = "",
321
+ bg = "#1e293b",
322
+ textColor = "#f1f5f9",
323
+ accent = "#7c3aed",
324
+ padding = "10px",
325
+ radius = "8px",
326
+ onChange = () => {
327
+ }
328
+ }) => {
329
+ const [isFocused, setIsFocused] = (0, import_react6.useState)(false);
330
+ return /* @__PURE__ */ import_react6.default.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ import_react6.default.createElement("label", { style: { color: textColor, marginBottom: "4px", display: "block" } }, label), /* @__PURE__ */ import_react6.default.createElement(
331
+ "input",
332
+ {
333
+ type: "text",
334
+ value,
335
+ placeholder,
336
+ onFocus: () => setIsFocused(true),
337
+ onBlur: () => setIsFocused(false),
338
+ onChange: (e) => onChange(e.target.value),
339
+ style: {
340
+ background: bg,
341
+ color: textColor,
342
+ padding,
343
+ borderRadius: radius,
344
+ border: isFocused ? `2px solid ${accent}` : "2px solid transparent",
345
+ transition: "border-color 0.3s ease",
346
+ width: "100%"
347
+ }
348
+ }
349
+ ), errorMessage && /* @__PURE__ */ import_react6.default.createElement("p", { style: { color: "red", margin: "4px 0 0 0" } }, errorMessage), helperText && /* @__PURE__ */ import_react6.default.createElement("p", { style: { color: textColor, margin: "4px 0 0 0" } }, helperText));
350
+ };
351
+
352
+ // src/components/TextArea/TextArea.jsx
353
+ var import_react7 = __toESM(require("react"));
354
+ var TextArea = ({
355
+ label = "Label",
356
+ placeholder = "Type here...",
357
+ value = "",
358
+ bg = "#1e293b",
359
+ textColor = "#f1f5f9",
360
+ accent = "#2563eb",
361
+ radius = "8px",
362
+ padding = "12px",
363
+ maxLength = 250,
364
+ onChange = () => {
365
+ }
366
+ }) => {
367
+ const [currentValue, setCurrentValue] = (0, import_react7.useState)(value);
368
+ const handleChange = (e) => {
369
+ setCurrentValue(e.target.value);
370
+ onChange(e.target.value);
371
+ };
372
+ return /* @__PURE__ */ import_react7.default.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ import_react7.default.createElement("label", { style: { color: textColor, marginBottom: "8px", display: "block" } }, label), /* @__PURE__ */ import_react7.default.createElement(
373
+ "textarea",
374
+ {
375
+ value: currentValue,
376
+ placeholder,
377
+ maxLength,
378
+ onChange: handleChange,
379
+ style: {
380
+ background: bg,
381
+ color: textColor,
382
+ padding,
383
+ borderRadius: radius,
384
+ border: `1px solid ${accent}`,
385
+ width: "100%",
386
+ minHeight: "100px",
387
+ resize: "none",
388
+ transition: "border-color 0.3s"
389
+ }
390
+ }
391
+ ), /* @__PURE__ */ import_react7.default.createElement("div", { style: { color: textColor, marginTop: "8px" } }, currentValue.length, "/", maxLength));
392
+ };
310
393
  // Annotate the CommonJS export names for ESM import in node:
311
394
  0 && (module.exports = {
312
395
  CodeBlock,
396
+ CustomInputField,
313
397
  OtpInput,
314
398
  SmartButton,
315
399
  StatCard,
400
+ TextArea,
316
401
  ToastNotification
317
402
  });
package/dist/index.mjs CHANGED
@@ -268,10 +268,93 @@ var SmartButton = ({
268
268
  isLoading ? /* @__PURE__ */ React5.createElement("span", null, "Loading...") : /* @__PURE__ */ React5.createElement(React5.Fragment, null, icon && /* @__PURE__ */ React5.createElement("span", { style: { marginRight: "8px" } }, icon), buttonText)
269
269
  );
270
270
  };
271
+
272
+ // src/components/CustomInputField/CustomInputField.jsx
273
+ import React6, { useState as useState5 } from "react";
274
+ var CustomInputField = ({
275
+ label = "Label",
276
+ placeholder = "Enter text...",
277
+ errorMessage = "",
278
+ helperText = "",
279
+ value = "",
280
+ bg = "#1e293b",
281
+ textColor = "#f1f5f9",
282
+ accent = "#7c3aed",
283
+ padding = "10px",
284
+ radius = "8px",
285
+ onChange = () => {
286
+ }
287
+ }) => {
288
+ const [isFocused, setIsFocused] = useState5(false);
289
+ return /* @__PURE__ */ React6.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ React6.createElement("label", { style: { color: textColor, marginBottom: "4px", display: "block" } }, label), /* @__PURE__ */ React6.createElement(
290
+ "input",
291
+ {
292
+ type: "text",
293
+ value,
294
+ placeholder,
295
+ onFocus: () => setIsFocused(true),
296
+ onBlur: () => setIsFocused(false),
297
+ onChange: (e) => onChange(e.target.value),
298
+ style: {
299
+ background: bg,
300
+ color: textColor,
301
+ padding,
302
+ borderRadius: radius,
303
+ border: isFocused ? `2px solid ${accent}` : "2px solid transparent",
304
+ transition: "border-color 0.3s ease",
305
+ width: "100%"
306
+ }
307
+ }
308
+ ), errorMessage && /* @__PURE__ */ React6.createElement("p", { style: { color: "red", margin: "4px 0 0 0" } }, errorMessage), helperText && /* @__PURE__ */ React6.createElement("p", { style: { color: textColor, margin: "4px 0 0 0" } }, helperText));
309
+ };
310
+
311
+ // src/components/TextArea/TextArea.jsx
312
+ import React7, { useState as useState6 } from "react";
313
+ var TextArea = ({
314
+ label = "Label",
315
+ placeholder = "Type here...",
316
+ value = "",
317
+ bg = "#1e293b",
318
+ textColor = "#f1f5f9",
319
+ accent = "#2563eb",
320
+ radius = "8px",
321
+ padding = "12px",
322
+ maxLength = 250,
323
+ onChange = () => {
324
+ }
325
+ }) => {
326
+ const [currentValue, setCurrentValue] = useState6(value);
327
+ const handleChange = (e) => {
328
+ setCurrentValue(e.target.value);
329
+ onChange(e.target.value);
330
+ };
331
+ return /* @__PURE__ */ React7.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ React7.createElement("label", { style: { color: textColor, marginBottom: "8px", display: "block" } }, label), /* @__PURE__ */ React7.createElement(
332
+ "textarea",
333
+ {
334
+ value: currentValue,
335
+ placeholder,
336
+ maxLength,
337
+ onChange: handleChange,
338
+ style: {
339
+ background: bg,
340
+ color: textColor,
341
+ padding,
342
+ borderRadius: radius,
343
+ border: `1px solid ${accent}`,
344
+ width: "100%",
345
+ minHeight: "100px",
346
+ resize: "none",
347
+ transition: "border-color 0.3s"
348
+ }
349
+ }
350
+ ), /* @__PURE__ */ React7.createElement("div", { style: { color: textColor, marginTop: "8px" } }, currentValue.length, "/", maxLength));
351
+ };
271
352
  export {
272
353
  CodeBlock,
354
+ CustomInputField,
273
355
  OtpInput,
274
356
  SmartButton,
275
357
  StatCard,
358
+ TextArea,
276
359
  ToastNotification
277
360
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-lib",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "author": "Ankush",
6
6
  "license": "ISC",