@apexcura/ui-components 0.0.14-Beta218 → 0.0.14-Beta219
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 +3 -1
- package/dist/index.mjs +20 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -384,6 +384,7 @@ var MultipleSelectElement = (props) => {
|
|
|
384
384
|
// src/Components/Button.tsx
|
|
385
385
|
var import_react11 = __toESM(require("react"));
|
|
386
386
|
var ButtonElement = (props) => {
|
|
387
|
+
const [fillColor, setFillColor] = (0, import_react11.useState)("");
|
|
387
388
|
const tailwindColorMap = {
|
|
388
389
|
"text-white": "#ffffff",
|
|
389
390
|
"text-gray-500": "#6b7280"
|
|
@@ -392,7 +393,8 @@ var ButtonElement = (props) => {
|
|
|
392
393
|
return tailwindColorMap[className] || "inherit";
|
|
393
394
|
};
|
|
394
395
|
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
|
|
395
|
-
|
|
396
|
+
setFillColor(getColorFromClass(textColorClass));
|
|
397
|
+
console.log(fillColor);
|
|
396
398
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
397
399
|
"button",
|
|
398
400
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -316,8 +316,9 @@ var MultipleSelectElement = (props) => {
|
|
|
316
316
|
};
|
|
317
317
|
|
|
318
318
|
// src/Components/Button.tsx
|
|
319
|
-
import React11 from "react";
|
|
319
|
+
import React11, { useState as useState4 } from "react";
|
|
320
320
|
var ButtonElement = (props) => {
|
|
321
|
+
const [fillColor, setFillColor] = useState4("");
|
|
321
322
|
const tailwindColorMap = {
|
|
322
323
|
"text-white": "#ffffff",
|
|
323
324
|
"text-gray-500": "#6b7280"
|
|
@@ -326,7 +327,8 @@ var ButtonElement = (props) => {
|
|
|
326
327
|
return tailwindColorMap[className] || "inherit";
|
|
327
328
|
};
|
|
328
329
|
const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
|
|
329
|
-
|
|
330
|
+
setFillColor(getColorFromClass(textColorClass));
|
|
331
|
+
console.log(fillColor);
|
|
330
332
|
return /* @__PURE__ */ React11.createElement(
|
|
331
333
|
"button",
|
|
332
334
|
{
|
|
@@ -352,12 +354,12 @@ var ButtonElement = (props) => {
|
|
|
352
354
|
};
|
|
353
355
|
|
|
354
356
|
// src/Components/AddMoreTable.tsx
|
|
355
|
-
import React12, { useEffect, useState as
|
|
357
|
+
import React12, { useEffect, useState as useState5 } from "react";
|
|
356
358
|
import { Table, Button } from "antd";
|
|
357
359
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
358
360
|
var AddMoreTable = (props) => {
|
|
359
361
|
const { thead, tbody } = props;
|
|
360
|
-
const [rows, setRows] =
|
|
362
|
+
const [rows, setRows] = useState5(tbody || []);
|
|
361
363
|
const onHandleRows = () => {
|
|
362
364
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
363
365
|
let newRow = {
|
|
@@ -566,7 +568,7 @@ var Navbar = (props) => {
|
|
|
566
568
|
};
|
|
567
569
|
|
|
568
570
|
// src/Components/TableElement.tsx
|
|
569
|
-
import React20, { useState as
|
|
571
|
+
import React20, { useState as useState6, useEffect as useEffect2 } from "react";
|
|
570
572
|
import { Table as Table2 } from "antd";
|
|
571
573
|
|
|
572
574
|
// src/Components/Model.tsx
|
|
@@ -668,9 +670,9 @@ var ModelElement = (props) => {
|
|
|
668
670
|
import { EyeOutlined } from "@ant-design/icons";
|
|
669
671
|
var TableElement = (props) => {
|
|
670
672
|
const { thead, tbody } = props;
|
|
671
|
-
const [selectedRecord, setSelectedRecord] =
|
|
672
|
-
const [model, setModel] =
|
|
673
|
-
const [dataSource, setDataSource] =
|
|
673
|
+
const [selectedRecord, setSelectedRecord] = useState6({});
|
|
674
|
+
const [model, setModel] = useState6(false);
|
|
675
|
+
const [dataSource, setDataSource] = useState6([]);
|
|
674
676
|
console.log(props.value);
|
|
675
677
|
const defaultVal = props.value;
|
|
676
678
|
useEffect2(() => {
|
|
@@ -811,14 +813,14 @@ var TableElement = (props) => {
|
|
|
811
813
|
};
|
|
812
814
|
|
|
813
815
|
// src/Components/DatePicker.tsx
|
|
814
|
-
import React21, { useState as
|
|
816
|
+
import React21, { useState as useState7 } from "react";
|
|
815
817
|
import { DatePicker } from "antd";
|
|
816
818
|
import dayjs from "dayjs";
|
|
817
819
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
818
820
|
import moment2 from "moment";
|
|
819
821
|
dayjs.extend(customParseFormat);
|
|
820
822
|
var DatePickerElement = (props) => {
|
|
821
|
-
const [dateState, setDateState] =
|
|
823
|
+
const [dateState, setDateState] = useState7("");
|
|
822
824
|
const handleChange = (date, dateString) => {
|
|
823
825
|
if (date) {
|
|
824
826
|
const formattedDate = dateString;
|
|
@@ -903,10 +905,10 @@ var SingleCheckbox = (props) => {
|
|
|
903
905
|
};
|
|
904
906
|
|
|
905
907
|
// src/Components/DropDownGroup.tsx
|
|
906
|
-
import React25, { useState as
|
|
908
|
+
import React25, { useState as useState8 } from "react";
|
|
907
909
|
import { Select as Select4 } from "antd";
|
|
908
910
|
var DropDownGroup = (props) => {
|
|
909
|
-
const [selectedValue, setSelectedValue] =
|
|
911
|
+
const [selectedValue, setSelectedValue] = useState8({
|
|
910
912
|
firstValue: {},
|
|
911
913
|
secondValue: {},
|
|
912
914
|
temp: ""
|
|
@@ -958,12 +960,12 @@ var DropDownGroup = (props) => {
|
|
|
958
960
|
};
|
|
959
961
|
|
|
960
962
|
// src/Components/FilesUpload.tsx
|
|
961
|
-
import React26, { useState as
|
|
963
|
+
import React26, { useState as useState9 } from "react";
|
|
962
964
|
import { Upload } from "antd";
|
|
963
965
|
import { InboxOutlined } from "@ant-design/icons";
|
|
964
966
|
var FileUpload = (props) => {
|
|
965
967
|
const { Dragger } = Upload;
|
|
966
|
-
const [files, setFiles] =
|
|
968
|
+
const [files, setFiles] = useState9([]);
|
|
967
969
|
const handleChange = ({ fileList }) => {
|
|
968
970
|
setFiles(fileList);
|
|
969
971
|
if (props.onChange) {
|
|
@@ -1017,9 +1019,9 @@ var onChange = (checked) => {
|
|
|
1017
1019
|
var SwitchElement = () => /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
|
|
1018
1020
|
|
|
1019
1021
|
// src/Components/Upload.tsx
|
|
1020
|
-
import React29, { useState as
|
|
1022
|
+
import React29, { useState as useState10 } from "react";
|
|
1021
1023
|
var Upload2 = (props) => {
|
|
1022
|
-
const [file, setFile] =
|
|
1024
|
+
const [file, setFile] = useState10();
|
|
1023
1025
|
const handleFileChange = (e) => {
|
|
1024
1026
|
setFile(e.target.files[0]);
|
|
1025
1027
|
if (props.onChange) {
|
|
@@ -1045,11 +1047,11 @@ var Upload2 = (props) => {
|
|
|
1045
1047
|
};
|
|
1046
1048
|
|
|
1047
1049
|
// src/Components/OtpElement.tsx
|
|
1048
|
-
import React30, { useState as
|
|
1050
|
+
import React30, { useState as useState11, useRef, useEffect as useEffect3 } from "react";
|
|
1049
1051
|
import { Input as Input3 } from "antd";
|
|
1050
1052
|
var OtpElement = (props) => {
|
|
1051
1053
|
const length = props.length;
|
|
1052
|
-
const [otp, setOtp] =
|
|
1054
|
+
const [otp, setOtp] = useState11(Array(length).fill(""));
|
|
1053
1055
|
const inputRefs = useRef([]);
|
|
1054
1056
|
const handleChange = (e, index) => {
|
|
1055
1057
|
const value = e.target.value;
|