virtual-ui-lib 1.0.42 → 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 +44 -0
- package/dist/index.mjs +43 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
OtpInput: () => OtpInput,
|
|
35
35
|
SmartButton: () => SmartButton,
|
|
36
36
|
StatCard: () => StatCard,
|
|
37
|
+
TextArea: () => TextArea,
|
|
37
38
|
ToastNotification: () => ToastNotification
|
|
38
39
|
});
|
|
39
40
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -347,6 +348,48 @@ var CustomInputField = ({
|
|
|
347
348
|
}
|
|
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));
|
|
349
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
|
+
};
|
|
350
393
|
// Annotate the CommonJS export names for ESM import in node:
|
|
351
394
|
0 && (module.exports = {
|
|
352
395
|
CodeBlock,
|
|
@@ -354,5 +397,6 @@ var CustomInputField = ({
|
|
|
354
397
|
OtpInput,
|
|
355
398
|
SmartButton,
|
|
356
399
|
StatCard,
|
|
400
|
+
TextArea,
|
|
357
401
|
ToastNotification
|
|
358
402
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -307,11 +307,54 @@ var CustomInputField = ({
|
|
|
307
307
|
}
|
|
308
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
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
|
+
};
|
|
310
352
|
export {
|
|
311
353
|
CodeBlock,
|
|
312
354
|
CustomInputField,
|
|
313
355
|
OtpInput,
|
|
314
356
|
SmartButton,
|
|
315
357
|
StatCard,
|
|
358
|
+
TextArea,
|
|
316
359
|
ToastNotification
|
|
317
360
|
};
|