pixel-react 1.4.7 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- package/.yarn/install-state.gz +0 -0
- package/lib/components/Form/Forms.d.ts +3 -1
- package/lib/components/Input/Input.d.ts +1 -1
- package/lib/components/Input/types.d.ts +4 -0
- package/lib/components/TableTree/TableTree.d.ts +2 -1
- package/lib/index.d.ts +10 -3
- package/lib/index.esm.js +121 -83
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +121 -83
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/Themes/BaseTheme.scss +3 -0
- package/src/assets/Themes/DarkTheme.scss +1 -0
- package/src/assets/fonts/Poppins-Bold.woff2 +0 -0
- package/src/assets/fonts/Poppins-Medium.woff2 +0 -0
- package/src/assets/fonts/Poppins-Regular.woff2 +0 -0
- package/src/assets/fonts/Poppins-SemiBold.woff2 +0 -0
- package/src/assets/icons/Header_preset.svg +13 -0
- package/src/assets/icons/add_file.svg +16 -4
- package/src/assets/icons/eye_open_icon.svg +2 -9
- package/src/assets/icons/replace_icon.svg +6 -0
- package/src/assets/styles/_fonts.scss +7 -4
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +6 -1
- package/src/components/AppHeader/AppHeader.scss +6 -1
- package/src/components/AppHeader/AppHeader.stories.tsx +0 -4
- package/src/components/AppHeader/AppHeader.tsx +1 -0
- package/src/components/AttachmentButton/AttachmentButton.tsx +10 -5
- package/src/components/Form/Form.stories.tsx +4 -8
- package/src/components/Form/Forms.tsx +11 -4
- package/src/components/Icon/iconList.ts +7 -1
- package/src/components/Input/Input.scss +5 -0
- package/src/components/Input/Input.stories.tsx +44 -0
- package/src/components/Input/Input.tsx +24 -19
- package/src/components/Input/types.ts +4 -0
- package/src/components/MenuOption/MenuOption.tsx +5 -5
- package/src/components/Modal/Modal.stories.tsx +1 -1
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Modal/modal.scss +7 -7
- package/src/components/TableTree/TableTree.scss +22 -7
- package/src/components/TableTree/TableTree.stories.tsx +41 -0
- package/src/components/TableTree/TableTree.tsx +55 -18
- package/src/components/Typography/Typography.scss +4 -4
package/package.json
CHANGED
@@ -116,6 +116,7 @@ $base-theme: (
|
|
116
116
|
menu-option-icon-clicked: #71347b,
|
117
117
|
delete-text-color: #c50303,
|
118
118
|
confirm-tick-icon-color: #5ca700,
|
119
|
+
warning-modal-border-color:#E79B0866,
|
119
120
|
brand-color-border:
|
120
121
|
linear-gradient(
|
121
122
|
94.23deg,
|
@@ -249,6 +250,8 @@ $base-theme: (
|
|
249
250
|
icon-hover-color: #f7ecf8,
|
250
251
|
ff-search-icon-hover-color: #f7ecf8,
|
251
252
|
ff-search-filed-bg-color: #ffffff,
|
253
|
+
|
254
|
+
ff-filter-toggle-button-bg-primary:linear-gradient(90deg, #71347b 0%, #9c1ebb 100%),
|
252
255
|
);
|
253
256
|
|
254
257
|
:root {
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M97.5 22.4999H82.5C79.7422 22.4917 77.5083 20.2579 77.5001 17.5V2.5L97.5 22.4999Z" fill="#4A1353"/>
|
3
|
+
<path d="M97.5 22.4999V112.5C97.4918 115.258 95.258 117.492 92.5001 117.5H12.4999C9.74203 117.492 7.5082 115.258 7.5 112.5V7.49992C7.5082 4.74203 9.74203 2.5082 12.4999 2.5H77.4998V17.5C77.5083 20.2579 79.7421 22.4917 82.5 22.4999H97.5Z" fill="white"/>
|
4
|
+
<path d="M82.5 100C99.0685 100 112.5 86.5685 112.5 70C112.5 53.4315 99.0685 40 82.5 40C65.9315 40 52.5 53.4315 52.5 70C52.5 86.5685 65.9315 100 82.5 100Z" fill="#FDFAFF"/>
|
5
|
+
<path d="M95.0717 58.5713H74.5002C72.6067 58.5713 71.0717 60.1063 71.0717 61.9999V82.5713C71.0717 84.4648 72.6067 85.9999 74.5002 85.9999H95.0717C96.9652 85.9999 98.5002 84.4648 98.5002 82.5713V61.9999C98.5002 60.1063 96.9652 58.5713 95.0717 58.5713Z" fill="#9D34AE"/>
|
6
|
+
<path d="M90.5001 54H69.9287C68.0351 54 66.5001 55.535 66.5001 57.4286V78C66.5001 79.8935 68.0351 81.4286 69.9287 81.4286H90.5001C92.3937 81.4286 93.9287 79.8935 93.9287 78V57.4286C93.9287 55.535 92.3937 54 90.5001 54Z" fill="#71347B"/>
|
7
|
+
<path d="M87.0717 66.5715H81.3575V60.8572C81.3575 60.5541 81.237 60.2634 81.0227 60.0491C80.8084 59.8348 80.5177 59.7144 80.2146 59.7144C79.9115 59.7144 79.6208 59.8348 79.4065 60.0491C79.1922 60.2634 79.0717 60.5541 79.0717 60.8572V66.5715H73.3575C73.0544 66.5715 72.7637 66.6919 72.5493 66.9062C72.335 67.1206 72.2146 67.4113 72.2146 67.7144C72.2146 68.0175 72.335 68.3082 72.5493 68.5225C72.7637 68.7368 73.0544 68.8572 73.3575 68.8572H79.0717V74.5715C79.0717 74.8746 79.1922 75.1653 79.4065 75.3796C79.6208 75.5939 79.9115 75.7144 80.2146 75.7144C80.5177 75.7144 80.8084 75.5939 81.0227 75.3796C81.237 75.1653 81.3575 74.8746 81.3575 74.5715V68.8572H87.0717C87.3748 68.8572 87.6655 68.7368 87.8799 68.5225C88.0942 68.3082 88.2146 68.0175 88.2146 67.7144C88.2146 67.4113 88.0942 67.1206 87.8799 66.9062C87.6655 66.6919 87.3748 66.5715 87.0717 66.5715Z" fill="#F5F5F5"/>
|
8
|
+
<path d="M19.9999 15H45V19.9999H19.9999V15Z" fill="#71347B"/>
|
9
|
+
<path d="M19.9999 25H24.9998V29.9999H19.9999V25Z" fill="#71347B"/>
|
10
|
+
<path d="M30 25H34.9999V29.9999H30V25Z" fill="#71347B"/>
|
11
|
+
<path d="M94.9999 112.5C94.9999 113.881 93.8805 115 92.4998 115H12.4999C11.1192 115 9.9998 113.881 9.9998 112.5V7.5C9.9998 6.1193 11.1192 4.99992 12.4999 4.99992H75V17.4998C75 21.642 78.3578 24.9998 82.5 24.9998H87.4999V19.9999H82.5C81.1192 19.9999 79.9999 18.8805 79.9999 17.4998V8.535L94.9999 23.535V32.5001H99.9998V22.5C99.9996 21.837 99.7361 21.2013 99.2674 20.7326L79.2675 0.732422C78.7987 0.263438 78.1628 0 77.5 0H12.4999C8.35777 0 4.99988 3.35789 4.99988 7.5V112.5C4.99988 116.642 8.35777 120 12.4999 120H92.4998C96.6419 120 99.9998 116.642 99.9998 112.5V107.5H94.9999V112.5Z" fill="#71347B"/>
|
12
|
+
<path d="M82.5 37.5C64.5508 37.5 49.9999 52.0507 49.9999 70.0001C49.9999 87.9495 64.5508 102.5 82.5 102.5C100.449 102.5 115 87.9492 115 69.9998C114.979 52.0594 100.441 37.5206 82.5 37.5ZM82.5 97.5C67.3122 97.5 55 85.1878 55 70.0001C55 54.8123 67.3122 42.4999 82.5 42.4999C97.6877 42.4999 110 54.8121 110 69.9998C109.982 85.1803 97.6804 97.4822 82.5 97.5Z" fill="#71347B"/>
|
13
|
+
</svg>
|
@@ -1,5 +1,17 @@
|
|
1
|
-
<svg width="
|
2
|
-
<
|
3
|
-
|
4
|
-
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<g clip-path="url(#clip0_2947_13105)">
|
3
|
+
<path
|
4
|
+
d="M12 20C11.3995 20 10.9129 19.5134 10.9129 18.9129V5.08707C10.9129 4.48657 11.3995 4 12 4C12.6005 4 13.0871 4.48657 13.0871 5.08707V18.9129C13.0871 19.5134 12.6005 20 12 20Z"
|
5
|
+
fill="currentColor" />
|
6
|
+
<path
|
7
|
+
d="M18.9129 13.0871H5.08707C4.48657 13.0871 4 12.6005 4 12C4 11.3995 4.48657 10.9129 5.08707 10.9129H18.9129C19.5134 10.9129 20 11.3995 20 12C20 12.6005 19.5134 13.0871 18.9129 13.0871Z"
|
8
|
+
fill="currentColor" />
|
9
|
+
</g>
|
10
|
+
<defs>
|
11
|
+
<clipPath id="clip0_2947_13105">
|
12
|
+
<path
|
13
|
+
d="M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z"
|
14
|
+
fill="white" />
|
15
|
+
</clipPath>
|
16
|
+
</defs>
|
5
17
|
</svg>
|
@@ -1,10 +1,3 @@
|
|
1
|
-
<svg width="
|
2
|
-
<
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.8985 12.297C17.5046 14.8002 14.861 16.3552 12.0009 16.3552C9.13896 16.3552 6.49546 14.8002 5.10149 12.297C4.99413 12.1026 4.99413 11.8972 5.10149 11.703C6.49546 9.19978 9.13896 7.64494 12.0009 7.64494C14.861 7.64494 17.5045 9.19978 18.8985 11.703C19.0078 11.8972 19.0078 12.1026 18.8985 12.297ZM19.789 11.2067C18.2154 8.38043 15.2313 6.62494 12.0009 6.62494C8.76871 6.62494 5.78457 8.38043 4.21104 11.2067C3.92965 11.7109 3.92965 12.2891 4.21104 12.7929C5.78457 15.6192 8.76871 17.375 12.0009 17.375C15.2313 17.375 18.2154 15.6192 19.789 12.7929C20.0703 12.2891 20.0703 11.7109 19.789 11.2067ZM12.0009 14.0923C13.1542 14.0923 14.0928 13.1538 14.0928 11.9999C14.0928 10.8461 13.1542 9.9075 12.0009 9.9075C10.8458 9.9075 9.9072 10.8461 9.9072 11.9999C9.9072 13.1538 10.8458 14.0923 12.0009 14.0923ZM12.0009 8.88749C10.283 8.88749 8.8872 10.2839 8.8872 11.9999C8.8872 13.7164 10.283 15.1122 12.0009 15.1122C13.717 15.1122 15.1128 13.7164 15.1128 11.9999C15.1128 10.2839 13.717 8.88749 12.0009 8.88749Z" fill="currentColor"/>
|
4
|
-
</g>
|
5
|
-
<defs>
|
6
|
-
<clipPath id="clip0_2947_11191">
|
7
|
-
<path d="M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z" fill="white"/>
|
8
|
-
</clipPath>
|
9
|
-
</defs>
|
1
|
+
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8985 6.29701C13.5046 8.80023 10.861 10.3552 8.00093 10.3552C5.13896 10.3552 2.49546 8.80023 1.10149 6.29701C0.994127 6.10264 0.994127 5.89717 1.10149 5.70297C2.49546 3.19978 5.13896 1.64494 8.00093 1.64494C10.861 1.64494 13.5045 3.19978 14.8985 5.70297C15.0078 5.89717 15.0078 6.10264 14.8985 6.29701ZM15.789 5.20666C14.2154 2.38043 11.2313 0.624939 8.00093 0.624939C4.76871 0.624939 1.78457 2.38043 0.211039 5.20666C-0.0703464 5.71093 -0.0703464 6.28905 0.211039 6.79295C1.78457 9.61918 4.76871 11.375 8.00093 11.375C11.2313 11.375 14.2154 9.61918 15.789 6.79295C16.0703 6.28909 16.0703 5.71093 15.789 5.20666ZM8.00093 8.09231C9.15424 8.09231 10.0928 7.15375 10.0928 5.99991C10.0928 4.84606 9.15424 3.9075 8.00093 3.9075C6.84576 3.9075 5.9072 4.84606 5.9072 5.99991C5.9072 7.15375 6.8458 8.09231 8.00093 8.09231ZM8.00093 2.88749C6.28299 2.88749 4.8872 4.28386 4.8872 5.99994C4.8872 7.71639 6.28303 9.11218 8.00093 9.11218C9.71701 9.11218 11.1128 7.71636 11.1128 5.99994C11.1128 4.28386 9.71701 2.88749 8.00093 2.88749Z" fill="currentColor"/>
|
10
3
|
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M10.2278 16C10.027 16 9.84105 15.8884 9.74435 15.7172C9.64765 15.5386 9.64765 15.3302 9.75179 15.1516L10.5328 13.8492C10.689 13.5812 11.0386 13.4994 11.299 13.6557C11.5667 13.8119 11.6486 14.1543 11.4924 14.4222L11.2915 14.7571C13.3445 14.2734 14.8842 12.4277 14.8842 10.2247C14.8842 9.91955 15.1371 9.6665 15.4421 9.6665C15.7471 9.6665 16 9.91955 16 10.2247C15.9925 13.4101 13.404 16 10.2278 16Z" fill="currentColor"/>
|
3
|
+
<path d="M0.557875 6.32608C0.252903 6.32608 0 6.07304 0 5.7679C0 2.58997 2.58854 0 5.76471 0C5.96554 0 6.1515 0.111637 6.2482 0.282813C6.3449 0.461432 6.3449 0.669821 6.24076 0.848439L5.45973 2.15087C5.30353 2.41135 4.96137 2.50066 4.69359 2.33693C4.43325 2.18064 4.34399 1.83829 4.50763 1.57036L4.70846 1.23545C2.64805 1.71921 1.11575 3.56493 1.11575 5.7679C1.11575 6.07304 0.862846 6.32608 0.557875 6.32608Z" fill="currentColor"/>
|
4
|
+
<path d="M10.079 8.46888V10.657C10.079 12.4804 9.35004 13.2097 7.52765 13.2097H5.34078C3.51839 13.2097 2.78943 12.4804 2.78943 10.657V8.46888C2.78943 6.64548 3.51839 5.91614 5.34078 5.91614H7.52765C9.35004 5.91614 10.079 6.64548 10.079 8.46888Z" fill="currentColor"/>
|
5
|
+
<path d="M10.6524 2.79102H8.46551C6.67287 2.79102 5.94395 3.50549 5.92163 5.26191H7.52828C9.71515 5.26191 10.7268 6.28152 10.7268 8.46216V10.0697C12.4896 10.0474 13.1963 9.31804 13.1963 7.52441V5.34378C13.2037 3.52038 12.4748 2.79102 10.6524 2.79102Z" fill="currentColor"/>
|
6
|
+
</svg>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
font-weight: 400;
|
9
9
|
src:
|
10
10
|
local('Poppins-Regular'),
|
11
|
-
url(../../assets/fonts/Poppins-Regular.
|
11
|
+
url(../../assets/fonts/Poppins-Regular.woff2) format('woff2');
|
12
12
|
}
|
13
13
|
|
14
14
|
@font-face {
|
@@ -16,7 +16,7 @@
|
|
16
16
|
font-weight: 500;
|
17
17
|
src:
|
18
18
|
local('Poppins-Medium'),
|
19
|
-
url(../../assets/fonts/Poppins-Medium.
|
19
|
+
url(../../assets/fonts/Poppins-Medium.woff2) format('woff2');
|
20
20
|
}
|
21
21
|
|
22
22
|
@font-face {
|
@@ -24,7 +24,7 @@
|
|
24
24
|
font-weight: 600;
|
25
25
|
src:
|
26
26
|
local('Poppins-SemiBold'),
|
27
|
-
url(../../assets/fonts/Poppins-SemiBold.
|
27
|
+
url(../../assets/fonts/Poppins-SemiBold.woff2) format('woff2');
|
28
28
|
}
|
29
29
|
|
30
30
|
@font-face {
|
@@ -32,7 +32,7 @@
|
|
32
32
|
font-weight: 700;
|
33
33
|
src:
|
34
34
|
local('Poppins-Bold'),
|
35
|
-
url(../../assets/fonts/Poppins-Bold.
|
35
|
+
url(../../assets/fonts/Poppins-Bold.woff2) format('woff2');
|
36
36
|
}
|
37
37
|
|
38
38
|
.fontXs {
|
@@ -70,3 +70,6 @@
|
|
70
70
|
.font-size-80 {
|
71
71
|
@include fontPoppins(80px);
|
72
72
|
}
|
73
|
+
|
74
|
+
|
75
|
+
//NOTE: Please Don't use these classes use Typography component TODO: Need to remove this file
|
@@ -18,7 +18,12 @@
|
|
18
18
|
border-radius: 20px;
|
19
19
|
.ff-all-project-container {
|
20
20
|
border-radius: 20px;
|
21
|
-
|
21
|
+
box-shadow: 0px 4px 4px 0px #00000040 inset;
|
22
|
+
background: linear-gradient(
|
23
|
+
90deg,
|
24
|
+
var(--brand-color) 0%,
|
25
|
+
var(--button-background-gradient-color) 100%
|
26
|
+
);
|
22
27
|
}
|
23
28
|
}
|
24
29
|
&:not(.ff-all-project-dropdown--selected):hover {
|
@@ -51,7 +51,12 @@
|
|
51
51
|
background-color: var(--primary-icon-color);
|
52
52
|
border-radius: 20px;
|
53
53
|
.ff-app-header-nav-bar-item-label {
|
54
|
-
|
54
|
+
box-shadow: 0px 4px 4px 0px #00000040 inset;
|
55
|
+
background: linear-gradient(
|
56
|
+
90deg,
|
57
|
+
var(--brand-color) 0%,
|
58
|
+
var(--button-background-gradient-color) 100%
|
59
|
+
);
|
55
60
|
border-radius: 20px;
|
56
61
|
padding: 4px 8px;
|
57
62
|
}
|
@@ -44,12 +44,10 @@ const headerMenuItems = [
|
|
44
44
|
{
|
45
45
|
label: 'Elements',
|
46
46
|
path: 'Elements',
|
47
|
-
quickMenuItems: [],
|
48
47
|
},
|
49
48
|
{
|
50
49
|
label: 'Program Elements',
|
51
50
|
path: 'Program Elements',
|
52
|
-
quickMenuItems: [],
|
53
51
|
},
|
54
52
|
{
|
55
53
|
label: 'Step Groups',
|
@@ -74,7 +72,6 @@ const headerMenuItems = [
|
|
74
72
|
{
|
75
73
|
label: 'Test Data',
|
76
74
|
path: 'Test Data',
|
77
|
-
subMenuItems: [],
|
78
75
|
},
|
79
76
|
{
|
80
77
|
label: 'Test Dev',
|
@@ -109,7 +106,6 @@ const headerMenuItems = [
|
|
109
106
|
{
|
110
107
|
label: 'Executions',
|
111
108
|
path: 'Executions',
|
112
|
-
quickMenuItems: [],
|
113
109
|
},
|
114
110
|
],
|
115
111
|
},
|
@@ -5,6 +5,7 @@ import Toaster from '../Toast';
|
|
5
5
|
import Icon from '../Icon';
|
6
6
|
import { AttachmentUploaderProps } from './types';
|
7
7
|
import './AttachmentButton.scss';
|
8
|
+
import Tooltip from '../Tooltip';
|
8
9
|
|
9
10
|
const AttachmentButton: React.FC<AttachmentUploaderProps> = ({
|
10
11
|
label,
|
@@ -81,7 +82,7 @@ const AttachmentButton: React.FC<AttachmentUploaderProps> = ({
|
|
81
82
|
multiple
|
82
83
|
accept="*"
|
83
84
|
/>
|
84
|
-
{fileError && (
|
85
|
+
{/* {fileError && ( */}
|
85
86
|
<Toaster
|
86
87
|
isOpen={!!fileError}
|
87
88
|
variant="info"
|
@@ -89,24 +90,28 @@ const AttachmentButton: React.FC<AttachmentUploaderProps> = ({
|
|
89
90
|
toastMessage={fileError}
|
90
91
|
zIndex={10000000}
|
91
92
|
/>
|
92
|
-
)}
|
93
|
+
{/* )} */}
|
93
94
|
{showSelectedFiles &&
|
94
95
|
selectedFiles.map((file, index) => (
|
95
96
|
<div key={file.name} className="ff-attachment-files">
|
96
97
|
<Typography color="var(--brand-color)">{file.name}</Typography>
|
98
|
+
<Tooltip title="delete">
|
97
99
|
<Icon
|
98
100
|
name="delete"
|
101
|
+
hoverEffect={true}
|
99
102
|
color="var(--ff-delete-button-attachment)"
|
100
103
|
onClick={() => handleDeleteFile(index)}
|
101
104
|
/>
|
105
|
+
</Tooltip>
|
102
106
|
{index === selectedFiles.length - 1 &&
|
103
107
|
selectedFiles.length < maxFiles && (
|
108
|
+
<Tooltip title="add attachment">
|
104
109
|
<Icon
|
105
|
-
|
106
|
-
|
107
|
-
width={24}
|
110
|
+
name="add_file"
|
111
|
+
hoverEffect={true}
|
108
112
|
onClick={handleAttachmentClick}
|
109
113
|
/>
|
114
|
+
</Tooltip>
|
110
115
|
)}
|
111
116
|
</div>
|
112
117
|
))}
|
@@ -95,7 +95,7 @@ export const WithDefaultValues: Story = {
|
|
95
95
|
<div>
|
96
96
|
<Input
|
97
97
|
type="text"
|
98
|
-
label=
|
98
|
+
label="Username"
|
99
99
|
disabled={false}
|
100
100
|
{...register('username', {
|
101
101
|
required: {
|
@@ -354,10 +354,10 @@ export const WithSubmissionOutside: Story = {
|
|
354
354
|
formRef.current.clearErrors();
|
355
355
|
};
|
356
356
|
|
357
|
-
const handleReset = () => {
|
357
|
+
const handleReset = () => {
|
358
358
|
formRef.current.reset();
|
359
359
|
formRef.current.clearErrors();
|
360
|
-
}
|
360
|
+
};
|
361
361
|
|
362
362
|
const footerContent = (
|
363
363
|
<>
|
@@ -382,11 +382,7 @@ export const WithSubmissionOutside: Story = {
|
|
382
382
|
onClick={() => setIsDrawerOpen(false)}
|
383
383
|
label="Cancel"
|
384
384
|
/>
|
385
|
-
<Button
|
386
|
-
variant="secondary"
|
387
|
-
onClick={handleReset}
|
388
|
-
label="Reset"
|
389
|
-
/>
|
385
|
+
<Button variant="secondary" onClick={handleReset} label="Reset" />
|
390
386
|
<Button
|
391
387
|
variant="secondary"
|
392
388
|
onClick={handleCreateAndContinue}
|
@@ -4,7 +4,11 @@ import Form from './Form';
|
|
4
4
|
interface FormProps<T extends Form.FieldValues> extends Form.UseFormProps<T> {
|
5
5
|
id?: string;
|
6
6
|
onSubmit: Form.SubmitHandler<T>;
|
7
|
-
children: (
|
7
|
+
children: (
|
8
|
+
methods: ReturnType<typeof Form.useForm<T>> & {
|
9
|
+
Form: typeof Form;
|
10
|
+
}
|
11
|
+
) => React.ReactNode;
|
8
12
|
}
|
9
13
|
|
10
14
|
const Forms = <T extends Form.FieldValues>(
|
@@ -14,15 +18,18 @@ const Forms = <T extends Form.FieldValues>(
|
|
14
18
|
const methods = Form.useForm<T>(rest);
|
15
19
|
|
16
20
|
const { handleSubmit } = methods;
|
17
|
-
|
21
|
+
const extendedMethods = {
|
22
|
+
...methods,
|
23
|
+
Form,
|
24
|
+
};
|
18
25
|
useImperativeHandle(ref, () => ({
|
19
26
|
submit: handleSubmit(onSubmit),
|
20
|
-
...
|
27
|
+
...extendedMethods,
|
21
28
|
}));
|
22
29
|
|
23
30
|
return (
|
24
31
|
<form id={id} onSubmit={handleSubmit(onSubmit)}>
|
25
|
-
{children(
|
32
|
+
{children(extendedMethods)}
|
26
33
|
</form>
|
27
34
|
);
|
28
35
|
};
|
@@ -30,6 +30,7 @@ import FireflinkIcon from '../../assets/Icons/fireflink_icon.svg?react';
|
|
30
30
|
import Tick from '../../assets/Icons/tick_icon.svg?react';
|
31
31
|
import Search from '../../assets/icons/search.svg?react';
|
32
32
|
import Filter from '../../assets/icons/filter.svg?react';
|
33
|
+
|
33
34
|
import RightArrow from '../../assets/icons/right_arrow_icon.svg?react';
|
34
35
|
import LeftArrow from '../../assets/icons/left_arrow_icon.svg?react';
|
35
36
|
import ClockIcon from '../../assets/icons/clock_icon.svg?react';
|
@@ -204,9 +205,12 @@ import QuickRunSettingIcon from '../../assets/icons/quick_run_setting_icon.svg?r
|
|
204
205
|
import RunManualTestcaseIcon from '../../assets/icons/run_manual_testcase_icon.svg?react';
|
205
206
|
import RunAutomationScriptsIcon from '../../assets/icons/run_automation_scripts_icon.svg?react';
|
206
207
|
import EyeOpenIcon from '../../assets/icons/eye_open_icon.svg?react';
|
208
|
+
import ReplaceIcon from '../../assets/icons/replace_icon.svg?react';
|
209
|
+
import HeaderPreset from '../../assets/icons/Header_preset.svg?react';
|
210
|
+
|
207
211
|
|
208
|
-
Components['delete_info'] = DeleteInfoIcon;
|
209
212
|
Components['success'] = ToastSuccessIcon;
|
213
|
+
Components['delete_info'] = DeleteInfoIcon;
|
210
214
|
Components['warning'] = WarningIcon;
|
211
215
|
Components['toast_info'] = ToastInfoIcon;
|
212
216
|
Components['error'] = ToastErrorIcon;
|
@@ -405,5 +409,7 @@ Components['quick_run_setting'] = QuickRunSettingIcon;
|
|
405
409
|
Components['run_manual_testcase'] = RunManualTestcaseIcon;
|
406
410
|
Components['run_automation_scripts'] = RunAutomationScriptsIcon;
|
407
411
|
Components['eye_open_icon'] = EyeOpenIcon;
|
412
|
+
Components['replace_icon']=ReplaceIcon;
|
413
|
+
Components['header_preset'] = HeaderPreset;
|
408
414
|
|
409
415
|
export default Components;
|
@@ -51,6 +51,50 @@ export const DisabledWithValue: Story = {
|
|
51
51
|
},
|
52
52
|
};
|
53
53
|
|
54
|
+
export const WithoutLabel: Story = {
|
55
|
+
render: () => {
|
56
|
+
const [value, setValue] = useState('');
|
57
|
+
const [error, setError] = useState<boolean>(false);
|
58
|
+
const [helperText, setHelperText] = useState<string>();
|
59
|
+
|
60
|
+
const onChangeHandler = (event: ChangeEvent<HTMLInputElement>) => {
|
61
|
+
const value = event.target.value;
|
62
|
+
if (event.target) {
|
63
|
+
if (value.length <= 0) {
|
64
|
+
setError(true);
|
65
|
+
setHelperText(`${event?.target?.name} is required`);
|
66
|
+
} else if (value.length >= 10) {
|
67
|
+
setError(true);
|
68
|
+
setHelperText(`Name should be within 10 characters`);
|
69
|
+
} else {
|
70
|
+
setError(false);
|
71
|
+
setHelperText('');
|
72
|
+
}
|
73
|
+
}
|
74
|
+
setValue(value);
|
75
|
+
};
|
76
|
+
return (
|
77
|
+
<>
|
78
|
+
<Input
|
79
|
+
{...defaultArgs}
|
80
|
+
type="text"
|
81
|
+
onChange={onChangeHandler}
|
82
|
+
disabled={false}
|
83
|
+
value={value}
|
84
|
+
name="Name"
|
85
|
+
label="Name"
|
86
|
+
placeholder="Enter name here"
|
87
|
+
variant="primary"
|
88
|
+
required={true}
|
89
|
+
error={error}
|
90
|
+
helperText={helperText}
|
91
|
+
isLabelRequired={false}
|
92
|
+
/>
|
93
|
+
</>
|
94
|
+
);
|
95
|
+
},
|
96
|
+
};
|
97
|
+
|
54
98
|
export const Controlled: Story = {
|
55
99
|
render: () => {
|
56
100
|
const [value, setValue] = useState('');
|
@@ -24,6 +24,7 @@ const Input = ({
|
|
24
24
|
maxValue = Infinity,
|
25
25
|
transparentBackground = false,
|
26
26
|
size = 'small',
|
27
|
+
isLabelRequired = true,
|
27
28
|
...props
|
28
29
|
}: InputProps) => {
|
29
30
|
const isValueFilled = !checkEmpty(value);
|
@@ -34,26 +35,29 @@ const Input = ({
|
|
34
35
|
'ff-input-container--disabled': !!disabled,
|
35
36
|
})}
|
36
37
|
>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
{required && <span className="required-asterisk">*</span>}
|
47
|
-
<span
|
48
|
-
className={classNames(`ff-input-label ff-input-label--${variant}`, {
|
49
|
-
'ff-input-label--no-hover': !!value,
|
50
|
-
'ff-input-label--disabled': !!disabled,
|
51
|
-
'ff-input-label--danger': !!error,
|
52
|
-
})}
|
38
|
+
{isLabelRequired && (
|
39
|
+
<label
|
40
|
+
htmlFor={name}
|
41
|
+
className={classNames(
|
42
|
+
`ff-input-label-container ff-input-label-container--${size}`,
|
43
|
+
{
|
44
|
+
'ff-input-label-container--danger': !!error,
|
45
|
+
}
|
46
|
+
)}
|
53
47
|
>
|
54
|
-
{
|
55
|
-
|
56
|
-
|
48
|
+
{required && <span className="required-asterisk">*</span>}
|
49
|
+
<span
|
50
|
+
className={classNames(`ff-input-label ff-input-label--${variant}`, {
|
51
|
+
'ff-input-label--no-hover': !!value,
|
52
|
+
'ff-input-label--disabled': !!disabled,
|
53
|
+
'ff-input-label--danger': !!error,
|
54
|
+
})}
|
55
|
+
>
|
56
|
+
{label}
|
57
|
+
</span>
|
58
|
+
</label>
|
59
|
+
)}
|
60
|
+
|
57
61
|
<input
|
58
62
|
name={name}
|
59
63
|
value={value}
|
@@ -68,6 +72,7 @@ const Input = ({
|
|
68
72
|
'ff-input--disabled': !!disabled,
|
69
73
|
'ff-input--danger': !!error,
|
70
74
|
'ff-input--no-border': !!noBorder,
|
75
|
+
'ff-input--placeholder': !isLabelRequired,
|
71
76
|
},
|
72
77
|
`${className}`
|
73
78
|
)}
|
@@ -68,21 +68,21 @@ const OptionCard = ({
|
|
68
68
|
case 'top':
|
69
69
|
return {
|
70
70
|
top: menuPosition.top - optionsHeight - 7,
|
71
|
-
left: menuPosition.
|
71
|
+
left: menuPosition.left - 4,
|
72
72
|
};
|
73
73
|
case 'down':
|
74
74
|
return {
|
75
|
-
top: menuPosition.
|
76
|
-
left: menuPosition.
|
75
|
+
top: menuPosition.top + 18,
|
76
|
+
left: menuPosition.left - 4,
|
77
77
|
};
|
78
78
|
case 'left':
|
79
79
|
return {
|
80
|
-
top: menuPosition.top,
|
80
|
+
top: menuPosition.top - 4,
|
81
81
|
left: menuPosition.left - optionsWidth - 7,
|
82
82
|
};
|
83
83
|
case 'right':
|
84
84
|
return {
|
85
|
-
top: menuPosition.top,
|
85
|
+
top: menuPosition.top - 4,
|
86
86
|
left: menuPosition.left + 20,
|
87
87
|
};
|
88
88
|
default:
|
@@ -12,7 +12,7 @@
|
|
12
12
|
}
|
13
13
|
|
14
14
|
.ff-modal-container {
|
15
|
-
border-radius:
|
15
|
+
border-radius: 8px;
|
16
16
|
overflow: hidden;
|
17
17
|
}
|
18
18
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
background: var(--ff-mini-modal-border);
|
21
21
|
position: relative;
|
22
22
|
max-width: 100%;
|
23
|
-
padding:
|
23
|
+
padding: 16px;
|
24
24
|
|
25
25
|
.ff-modal-header {
|
26
26
|
height: 32px;
|
@@ -29,12 +29,12 @@
|
|
29
29
|
}
|
30
30
|
|
31
31
|
.modal-bottom-border {
|
32
|
-
border-bottom-left-radius:
|
33
|
-
border-bottom-right-radius:
|
32
|
+
border-bottom-left-radius: 8px;
|
33
|
+
border-bottom-right-radius: 8px;
|
34
34
|
}
|
35
35
|
.modal-top-border {
|
36
|
-
border-top-left-radius:
|
37
|
-
border-top-right-radius:
|
36
|
+
border-top-left-radius: 8px;
|
37
|
+
border-top-right-radius: 8px;
|
38
38
|
}
|
39
39
|
|
40
40
|
.ff-modal-footer {
|
@@ -47,5 +47,5 @@
|
|
47
47
|
justify-content: end;
|
48
48
|
align-items: center;
|
49
49
|
gap: 8px;
|
50
|
-
padding: 4px
|
50
|
+
padding: 4px 16px;
|
51
51
|
}
|