datastake-daf 0.6.243 → 0.6.245

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.
@@ -0,0 +1,93 @@
1
+ import CustomIcon from "../../../Icon/CustomIcon.jsx";
2
+ import { theme } from "antd";
3
+ import { useState } from "react";
4
+ import Widget from "../../../Dashboard/Widget/index.jsx";
5
+ const { useToken } = theme;
6
+ export default function Smart() {
7
+ const { token } = useToken();
8
+ const [isOpen, setIsOpen] = useState(false);
9
+ return (
10
+ <div
11
+ style={{
12
+ border: "1px solid #E5E7EB",
13
+ width: "100%",
14
+ borderRadius: "4px",
15
+ boxShadow:
16
+ "0px 1px 2px 0px #00000008, 0px 1px 6px -1px #00000005, 0px 2px 4px 0px #00000005",
17
+ }}
18
+ >
19
+ <div
20
+ style={{
21
+ display: "flex",
22
+ alignItems: "center",
23
+ gap: "8px",
24
+ padding: "8px",
25
+ }}
26
+ onClick={() => setIsOpen(!isOpen)}
27
+ >
28
+ <CustomIcon name="Lightning" size={16} color={token.colorPrimary7} />
29
+ <span style={{ marginRight: "auto" }}>Smart Help</span>
30
+ <div>
31
+ <CustomIcon
32
+ name="ChevronRight"
33
+ size={12}
34
+ color={token.colorPrimary7}
35
+ style={{
36
+ transform: isOpen ? "rotate(90deg)" : "rotate(0deg)",
37
+ transition: "transform 0.3s ease-in-out",
38
+ }}
39
+ />
40
+ </div>
41
+ </div>
42
+ {isOpen && (
43
+ <div
44
+ style={{
45
+ padding: "8px",
46
+ display: "flex",
47
+ flexDirection: "column",
48
+ gap: "12px",
49
+ }}
50
+ >
51
+ <span
52
+ style={{
53
+ paddingLeft: "4px",
54
+ color: "#6C737F",
55
+ fontFamily: "SF UI Display",
56
+ fontWeight: "500",
57
+ fontStyle: "Medium",
58
+ fontSize: "14px",
59
+ leadingTrim: "NONE",
60
+ lineHeight: "20px",
61
+ letterSpacing: "0%",
62
+ }}
63
+ >
64
+ The information available here has been identified as matching the
65
+ requirements of this question.
66
+ </span>
67
+ <SmartWidget label="Operational Activities" icon="AimOutlined" link="Link" />
68
+ <SmartWidget label="Monitoring Activities" icon="Eye" link="Link" />
69
+ <SmartWidget label="Project Locations" icon="DashboardLocations" link="Link" />
70
+ <SmartWidget label="Documents & Media" icon="DashboardDocuments" link="Link" />
71
+ </div>
72
+ )}
73
+ </div>
74
+ );
75
+ }
76
+
77
+ function SmartWidget({ label, icon, link }) {
78
+ const { token } = useToken();
79
+ return (
80
+ <Widget noTitle className={"no-p-body p-xs"}>
81
+ <div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
82
+ <CustomIcon name={icon} size={16} color={"#384250"} />
83
+ <span style={{ marginRight: "auto" }}>{label}</span>
84
+ <CustomIcon
85
+ name={link}
86
+ size={16}
87
+ color={token.baseGray50}
88
+ style={{ cursor: "not-allowed" }}
89
+ />
90
+ </div>
91
+ </Widget>
92
+ );
93
+ }