react-core-ts 1.0.25 → 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,80 +0,0 @@
1
- import React from 'react';
2
-
3
- import { DropSideIcon } from './Icons';
4
-
5
- const TreeNode: React.FC<any> = ({
6
- node,
7
- isMultiple,
8
- singleSelect,
9
- idx,
10
- desc,
11
- toggleExpand,
12
- updateNode,
13
- children,
14
- descId,
15
- }) => {
16
- // Toggle the expanded state when clicking on the node
17
- const handleToggle = (node?: any) => {
18
- console.log(node, 'node');
19
- toggleExpand(node[descId]);
20
- };
21
-
22
- const handleCheckbox = (e: any, dataItem: any) => {
23
- const { checked } = e.target;
24
- updateNode(dataItem[descId], checked);
25
- };
26
- return (
27
- <div>
28
- <li className="flex flex-col">
29
- <div
30
- style={{ display: 'flex' }}
31
- className={`items-start gap-4 flex-row ${
32
- node?.children?.length > 0 ? '' : 'ml-5'
33
- }`}
34
- >
35
- {/* Show an icon based on the expanded/collapsed state */}
36
-
37
- {node?.children && node?.children?.length > 0 && (
38
- <span
39
- onClick={() => handleToggle(node)}
40
- className={`mt-1 cursor-pointer ${
41
- node.expanded ? ' rotate-90' : ''
42
- }`}
43
- >
44
- <DropSideIcon />
45
- </span>
46
- )}
47
- {(isMultiple || singleSelect) && (
48
- <div className="qbs-autocomplete-checkbox">
49
- <input
50
- onChange={(e) => handleCheckbox(e, node)} // Pass correct node to the handler
51
- type="checkbox"
52
- checked={node.checked}
53
- id={`qbs-checkbox-${idx.toString()}`}
54
- />
55
- <label htmlFor={`qbs-checkbox-${idx.toString()}`}>
56
- <svg
57
- width="8"
58
- height="6"
59
- viewBox="0 0 8 6"
60
- fill="none"
61
- xmlns="http://www.w3.org/2000/svg"
62
- >
63
- <path
64
- d="M0 3.21739L2.89883 6L8 1.06994L6.89494 0L2.89883 3.86768L1.09728 2.14745L0 3.21739Z"
65
- fill="white"
66
- />
67
- </svg>
68
- </label>
69
- </div>
70
- )}
71
- <span className=" leading-[18px]">{node[desc]}</span>
72
- </div>
73
- </li>
74
-
75
- {children}
76
- </div>
77
- );
78
- };
79
-
80
- 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";