@apexcura/ui-components 0.0.14-Beta217 → 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.css CHANGED
@@ -391,6 +391,14 @@ video {
391
391
  --tw-text-opacity: 1;
392
392
  color: rgb(0 0 0 / var(--tw-text-opacity));
393
393
  }
394
+ .text-gray-500 {
395
+ --tw-text-opacity: 1;
396
+ color: rgb(107 114 128 / var(--tw-text-opacity));
397
+ }
398
+ .text-white {
399
+ --tw-text-opacity: 1;
400
+ color: rgb(255 255 255 / var(--tw-text-opacity));
401
+ }
394
402
  .shadow-\[0px_0px_1px_1px_\#919191\] {
395
403
  --tw-shadow: 0px 0px 1px 1px #919191;
396
404
  --tw-shadow-colored: 0px 0px 1px 1px var(--tw-shadow-color);
package/dist/index.js CHANGED
@@ -384,8 +384,17 @@ 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)("");
388
+ const tailwindColorMap = {
389
+ "text-white": "#ffffff",
390
+ "text-gray-500": "#6b7280"
391
+ };
392
+ const getColorFromClass = (className) => {
393
+ return tailwindColorMap[className] || "inherit";
394
+ };
387
395
  const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
388
- console.log(textColorClass);
396
+ setFillColor(getColorFromClass(textColorClass));
397
+ console.log(fillColor);
389
398
  return /* @__PURE__ */ import_react11.default.createElement(
390
399
  "button",
391
400
  {
@@ -403,7 +412,7 @@ var ButtonElement = (props) => {
403
412
  dangerouslySetInnerHTML: { __html: props.icon || "" }
404
413
  }
405
414
  ), /* @__PURE__ */ import_react11.default.createElement("style", null, `.${props.iconsClassName} path {
406
- fill: ${textColorClass};
415
+ fill: ${fillColor};
407
416
  }`, `.${props.iconsClassName}:hover path {
408
417
  filter: brightness(0) invert(1);
409
418
  }`)), props.label)
package/dist/index.mjs CHANGED
@@ -316,10 +316,19 @@ 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("");
322
+ const tailwindColorMap = {
323
+ "text-white": "#ffffff",
324
+ "text-gray-500": "#6b7280"
325
+ };
326
+ const getColorFromClass = (className) => {
327
+ return tailwindColorMap[className] || "inherit";
328
+ };
321
329
  const textColorClass = props.className?.match(/text-[\w-]+/g)?.[0];
322
- console.log(textColorClass);
330
+ setFillColor(getColorFromClass(textColorClass));
331
+ console.log(fillColor);
323
332
  return /* @__PURE__ */ React11.createElement(
324
333
  "button",
325
334
  {
@@ -337,7 +346,7 @@ var ButtonElement = (props) => {
337
346
  dangerouslySetInnerHTML: { __html: props.icon || "" }
338
347
  }
339
348
  ), /* @__PURE__ */ React11.createElement("style", null, `.${props.iconsClassName} path {
340
- fill: ${textColorClass};
349
+ fill: ${fillColor};
341
350
  }`, `.${props.iconsClassName}:hover path {
342
351
  filter: brightness(0) invert(1);
343
352
  }`)), props.label)
@@ -345,12 +354,12 @@ var ButtonElement = (props) => {
345
354
  };
346
355
 
347
356
  // src/Components/AddMoreTable.tsx
348
- import React12, { useEffect, useState as useState4 } from "react";
357
+ import React12, { useEffect, useState as useState5 } from "react";
349
358
  import { Table, Button } from "antd";
350
359
  import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
351
360
  var AddMoreTable = (props) => {
352
361
  const { thead, tbody } = props;
353
- const [rows, setRows] = useState4(tbody || []);
362
+ const [rows, setRows] = useState5(tbody || []);
354
363
  const onHandleRows = () => {
355
364
  const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
356
365
  let newRow = {
@@ -559,7 +568,7 @@ var Navbar = (props) => {
559
568
  };
560
569
 
561
570
  // src/Components/TableElement.tsx
562
- import React20, { useState as useState5, useEffect as useEffect2 } from "react";
571
+ import React20, { useState as useState6, useEffect as useEffect2 } from "react";
563
572
  import { Table as Table2 } from "antd";
564
573
 
565
574
  // src/Components/Model.tsx
@@ -661,9 +670,9 @@ var ModelElement = (props) => {
661
670
  import { EyeOutlined } from "@ant-design/icons";
662
671
  var TableElement = (props) => {
663
672
  const { thead, tbody } = props;
664
- const [selectedRecord, setSelectedRecord] = useState5({});
665
- const [model, setModel] = useState5(false);
666
- const [dataSource, setDataSource] = useState5([]);
673
+ const [selectedRecord, setSelectedRecord] = useState6({});
674
+ const [model, setModel] = useState6(false);
675
+ const [dataSource, setDataSource] = useState6([]);
667
676
  console.log(props.value);
668
677
  const defaultVal = props.value;
669
678
  useEffect2(() => {
@@ -804,14 +813,14 @@ var TableElement = (props) => {
804
813
  };
805
814
 
806
815
  // src/Components/DatePicker.tsx
807
- import React21, { useState as useState6 } from "react";
816
+ import React21, { useState as useState7 } from "react";
808
817
  import { DatePicker } from "antd";
809
818
  import dayjs from "dayjs";
810
819
  import customParseFormat from "dayjs/plugin/customParseFormat.js";
811
820
  import moment2 from "moment";
812
821
  dayjs.extend(customParseFormat);
813
822
  var DatePickerElement = (props) => {
814
- const [dateState, setDateState] = useState6("");
823
+ const [dateState, setDateState] = useState7("");
815
824
  const handleChange = (date, dateString) => {
816
825
  if (date) {
817
826
  const formattedDate = dateString;
@@ -896,10 +905,10 @@ var SingleCheckbox = (props) => {
896
905
  };
897
906
 
898
907
  // src/Components/DropDownGroup.tsx
899
- import React25, { useState as useState7 } from "react";
908
+ import React25, { useState as useState8 } from "react";
900
909
  import { Select as Select4 } from "antd";
901
910
  var DropDownGroup = (props) => {
902
- const [selectedValue, setSelectedValue] = useState7({
911
+ const [selectedValue, setSelectedValue] = useState8({
903
912
  firstValue: {},
904
913
  secondValue: {},
905
914
  temp: ""
@@ -951,12 +960,12 @@ var DropDownGroup = (props) => {
951
960
  };
952
961
 
953
962
  // src/Components/FilesUpload.tsx
954
- import React26, { useState as useState8 } from "react";
963
+ import React26, { useState as useState9 } from "react";
955
964
  import { Upload } from "antd";
956
965
  import { InboxOutlined } from "@ant-design/icons";
957
966
  var FileUpload = (props) => {
958
967
  const { Dragger } = Upload;
959
- const [files, setFiles] = useState8([]);
968
+ const [files, setFiles] = useState9([]);
960
969
  const handleChange = ({ fileList }) => {
961
970
  setFiles(fileList);
962
971
  if (props.onChange) {
@@ -1010,9 +1019,9 @@ var onChange = (checked) => {
1010
1019
  var SwitchElement = () => /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
1011
1020
 
1012
1021
  // src/Components/Upload.tsx
1013
- import React29, { useState as useState9 } from "react";
1022
+ import React29, { useState as useState10 } from "react";
1014
1023
  var Upload2 = (props) => {
1015
- const [file, setFile] = useState9();
1024
+ const [file, setFile] = useState10();
1016
1025
  const handleFileChange = (e) => {
1017
1026
  setFile(e.target.files[0]);
1018
1027
  if (props.onChange) {
@@ -1038,11 +1047,11 @@ var Upload2 = (props) => {
1038
1047
  };
1039
1048
 
1040
1049
  // src/Components/OtpElement.tsx
1041
- import React30, { useState as useState10, useRef, useEffect as useEffect3 } from "react";
1050
+ import React30, { useState as useState11, useRef, useEffect as useEffect3 } from "react";
1042
1051
  import { Input as Input3 } from "antd";
1043
1052
  var OtpElement = (props) => {
1044
1053
  const length = props.length;
1045
- const [otp, setOtp] = useState10(Array(length).fill(""));
1054
+ const [otp, setOtp] = useState11(Array(length).fill(""));
1046
1055
  const inputRefs = useRef([]);
1047
1056
  const handleChange = (e, index) => {
1048
1057
  const value = e.target.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta217",
3
+ "version": "0.0.14-Beta219",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",