react-core-ts 1.0.24 → 1.0.26

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.
@@ -1,63 +0,0 @@
1
- import React from 'react';
2
- import { Close, DropArrow } from '../utilities/icons';
3
-
4
- type ValueProps = {
5
- inputValue: string;
6
- searchValue: string;
7
- dropOpen: boolean;
8
- handleDropOpen: (e: any) => void;
9
- handleDropClose: (e: any) => void;
10
- disabled: boolean;
11
- readOnly: boolean;
12
- expandable: boolean;
13
- handleClear: () => void;
14
- };
15
- const InputActions: React.FC<ValueProps> = ({
16
- inputValue,
17
- searchValue,
18
- dropOpen,
19
- handleDropOpen,
20
- handleDropClose,
21
- disabled,
22
- readOnly,
23
- expandable,
24
- handleClear,
25
- }) => {
26
- return (
27
- <div className="qbs-autocomplete-close-icon">
28
- {(inputValue || searchValue) && !disabled && !readOnly && !expandable && (
29
- <button
30
- onClick={handleClear}
31
- className="icon-button"
32
- aria-label="clear"
33
- >
34
- <Close />
35
- </button>
36
- )}
37
- {dropOpen ? (
38
- <button
39
- type="button"
40
- onClick={(e) => handleDropClose(e)}
41
- className="icon-button"
42
- aria-label="toggle"
43
- name="toggle"
44
- >
45
- <DropArrow className={`icon-button-rotate`} />
46
- </button>
47
- ) : (
48
- <button
49
- disabled={disabled || readOnly}
50
- type="button"
51
- className="icon-button"
52
- onClick={(e) => handleDropOpen(e)}
53
- aria-label="toggle"
54
- name="toggle"
55
- >
56
- <DropArrow />
57
- </button>
58
- )}
59
- </div>
60
- );
61
- };
62
-
63
- export default InputActions;
@@ -1,79 +0,0 @@
1
- import React from "react";
2
- import { DropSideIcon } from "./Icons";
3
-
4
- const TreeNode: React.FC<any> = ({
5
- node,
6
- isMultiple,
7
- singleSelect,
8
- idx,
9
- desc,
10
- toggleExpand,
11
- updateNode,
12
- children,
13
- descId,
14
- }) => {
15
- // Toggle the expanded state when clicking on the node
16
- const handleToggle = (node?: any) => {
17
- console.log(node, "node");
18
- toggleExpand(node[descId]);
19
- };
20
-
21
- const handleCheckbox = (e: any, dataItem: any) => {
22
- const { checked } = e.target;
23
- updateNode(dataItem[descId], checked);
24
- };
25
- return (
26
- <div>
27
- <li className="flex flex-col">
28
- <div
29
- style={{ display: "flex" }}
30
- className={`items-start gap-4 flex-row ${
31
- node?.children?.length > 0 ? "" : "ml-5"
32
- }`}
33
- >
34
- {/* Show an icon based on the expanded/collapsed state */}
35
-
36
- {node?.children && node?.children?.length > 0 && (
37
- <span
38
- onClick={() => handleToggle(node)}
39
- className={`mt-1 cursor-pointer ${
40
- node.expanded ? " rotate-90" : ""
41
- }`}
42
- >
43
- <DropSideIcon />
44
- </span>
45
- )}
46
- {(isMultiple || singleSelect) && (
47
- <div className="qbs-autocomplete-checkbox">
48
- <input
49
- onChange={(e) => handleCheckbox(e, node)} // Pass correct node to the handler
50
- type="checkbox"
51
- checked={node.checked}
52
- id={`qbs-checkbox-${idx.toString()}`}
53
- />
54
- <label htmlFor={`qbs-checkbox-${idx.toString()}`}>
55
- <svg
56
- width="8"
57
- height="6"
58
- viewBox="0 0 8 6"
59
- fill="none"
60
- xmlns="http://www.w3.org/2000/svg"
61
- >
62
- <path
63
- d="M0 3.21739L2.89883 6L8 1.06994L6.89494 0L2.89883 3.86768L1.09728 2.14745L0 3.21739Z"
64
- fill="white"
65
- />
66
- </svg>
67
- </label>
68
- </div>
69
- )}
70
- <span className=" leading-[18px]">{node[desc]}</span>
71
- </div>
72
- </li>
73
-
74
- {children}
75
- </div>
76
- );
77
- };
78
-
79
- export default TreeNode;
package/src/index.html DELETED
@@ -1 +0,0 @@
1
- <div>sdfdsf</div>
package/src/index.tsx DELETED
@@ -1,12 +0,0 @@
1
- import "./styles/global.css";
2
-
3
- export {
4
- default as AutoComplete,
5
- default as CustomAutoComplete,
6
- } from "./AutoComplete";
7
- export { default as AutoCompleteWithTreeStructure } from "./AutoCompleteWithTreeStructure";
8
- export type { AutoSuggestionInputProps } from "./commontypes";
9
- export { default as ExpandableAutoComplete } from "./ExpandableAutoComplete";
10
- export { deepEqual } from "./utilities/deepEqual";
11
- export { default as ExpandableToolTip } from "./utilities/expandableTootltip";
12
- export { default as ToolTip } from "./utilities/tooltip";