pixel-react 1.1.4 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/AddResourceButton/type.d.ts +1 -1
  3. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.d.ts +2 -1
  4. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +1 -0
  5. package/lib/components/AllProjectsDropdown/types.d.ts +10 -0
  6. package/lib/components/Button/Button.stories.d.ts +1 -0
  7. package/lib/components/Button/types.d.ts +1 -1
  8. package/lib/components/Drawer/Drawer.stories.d.ts +3 -0
  9. package/lib/components/Drawer/Types.d.ts +25 -1
  10. package/lib/components/Icon/Icon.d.ts +1 -1
  11. package/lib/components/MachineInputField/MachineInputField.d.ts +4 -0
  12. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
  13. package/lib/components/MachineInputField/index.d.ts +1 -0
  14. package/lib/components/MachineInputField/types.d.ts +11 -0
  15. package/lib/components/MenuOption/MenuOption.d.ts +1 -1
  16. package/lib/components/MenuOption/MenuOption.stories.d.ts +1 -0
  17. package/lib/components/MenuOption/types.d.ts +7 -0
  18. package/lib/components/Modal/types.d.ts +1 -0
  19. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.d.ts +4 -0
  20. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
  21. package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.d.ts +4 -0
  22. package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/types.d.ts +3 -0
  23. package/lib/components/SequentialConnectingBranch/components/Branches/Branches.d.ts +4 -0
  24. package/lib/components/SequentialConnectingBranch/components/Branches/types.d.ts +16 -0
  25. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.d.ts +4 -0
  26. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/types.d.ts +9 -0
  27. package/lib/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.d.ts +4 -0
  28. package/lib/components/SequentialConnectingBranch/components/DatasetListModal/types.d.ts +3 -0
  29. package/lib/components/SequentialConnectingBranch/index.d.ts +1 -0
  30. package/lib/components/SequentialConnectingBranch/types.d.ts +32 -0
  31. package/lib/components/TableTree/TableTree.d.ts +4 -2
  32. package/lib/components/Tabs/types.d.ts +1 -0
  33. package/lib/index.d.ts +103 -9
  34. package/lib/index.esm.js +890 -572
  35. package/lib/index.esm.js.map +1 -1
  36. package/lib/index.js +891 -571
  37. package/lib/index.js.map +1 -1
  38. package/lib/tsconfig.tsbuildinfo +1 -1
  39. package/package.json +1 -1
  40. package/rollup.config.mjs +5 -1
  41. package/src/assets/Themes/BaseTheme.scss +18 -2
  42. package/src/assets/Themes/DarkTheme.scss +11 -3
  43. package/src/assets/icons/add_locator.svg +5 -0
  44. package/src/assets/icons/android.svg +9 -0
  45. package/src/assets/icons/browser_stack.svg +9 -0
  46. package/src/assets/icons/chrome.svg +12 -0
  47. package/src/assets/icons/dataset_list.svg +3 -0
  48. package/src/assets/icons/drag_icon.svg +5 -0
  49. package/src/assets/icons/label_plus.svg +3 -0
  50. package/src/assets/icons/mac.svg +9 -0
  51. package/src/assets/icons/manual_locator.svg +8 -0
  52. package/src/assets/icons/windows.svg +6 -0
  53. package/src/assets/styles/_colors.scss +4 -4
  54. package/src/components/AddResourceButton/type.ts +1 -1
  55. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +2 -2
  56. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +99 -1
  57. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +30 -56
  58. package/src/components/AllProjectsDropdown/types.ts +10 -0
  59. package/src/components/Button/Button.scss +4 -0
  60. package/src/components/Button/Button.stories.tsx +7 -0
  61. package/src/components/Button/types.ts +2 -2
  62. package/src/components/Drawer/Drawer.scss +22 -11
  63. package/src/components/Drawer/Drawer.stories.tsx +41 -0
  64. package/src/components/Drawer/Drawer.tsx +67 -40
  65. package/src/components/Drawer/Types.ts +25 -1
  66. package/src/components/GridLayout/GridLayout.scss +0 -2
  67. package/src/components/GridLayout/GridLayout.tsx +15 -8
  68. package/src/components/Icon/Icon.tsx +39 -33
  69. package/src/components/Icon/iconList.ts +25 -6
  70. package/src/components/InputWithDropdown/InputWithDropdown.scss +1 -1
  71. package/src/components/InputWithDropdown/InputWithDropdown.tsx +2 -1
  72. package/src/components/MachineInputField/MachineInputField.scss +44 -0
  73. package/src/components/MachineInputField/MachineInputField.stories.tsx +32 -0
  74. package/src/components/MachineInputField/MachineInputField.tsx +71 -0
  75. package/src/components/MachineInputField/index.ts +1 -0
  76. package/src/components/MachineInputField/types.ts +12 -0
  77. package/src/components/MenuOption/MenuOption.scss +14 -0
  78. package/src/components/MenuOption/MenuOption.stories.tsx +21 -0
  79. package/src/components/MenuOption/MenuOption.tsx +5 -3
  80. package/src/components/MenuOption/types.ts +9 -0
  81. package/src/components/MiniModal/MiniModal.tsx +1 -1
  82. package/src/components/Modal/Modal.tsx +2 -0
  83. package/src/components/Modal/modal.scss +2 -2
  84. package/src/components/Modal/types.ts +1 -0
  85. package/src/components/Select/Select.tsx +2 -2
  86. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.scss +117 -0
  87. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.tsx +62 -0
  88. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.tsx +210 -0
  89. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.scss +51 -0
  90. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.tsx +107 -0
  91. package/src/components/SequentialConnectingBranch/components/AddBrowserModal/types.ts +5 -0
  92. package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +184 -0
  93. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +203 -0
  94. package/src/components/SequentialConnectingBranch/components/Branches/types.ts +18 -0
  95. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.scss +3 -0
  96. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.tsx +66 -0
  97. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/types.ts +10 -0
  98. package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.scss +31 -0
  99. package/src/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.tsx +85 -0
  100. package/src/components/SequentialConnectingBranch/components/DatasetListModal/types.ts +4 -0
  101. package/src/components/SequentialConnectingBranch/index.ts +1 -0
  102. package/src/components/SequentialConnectingBranch/types.ts +42 -0
  103. package/src/components/TableTree/TableTree.stories.tsx +8 -1
  104. package/src/components/TableTree/TableTree.tsx +25 -3
  105. package/src/components/Tabs/Tabs.stories.tsx +24 -25
  106. package/src/components/Tabs/Tabs.tsx +3 -10
  107. package/src/components/Tabs/types.ts +7 -1
  108. package/src/index.ts +5 -6
  109. package/lib/components/AddButton/AddButton.d.ts +0 -5
  110. package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
  111. package/lib/components/AddButton/index.d.ts +0 -1
  112. package/lib/components/AddButton/types.d.ts +0 -4
  113. package/lib/utils/find/findAndInsert.d.ts +0 -7
  114. package/lib/utils/find/findAndInsert.stories.d.ts +0 -7
@@ -0,0 +1,62 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import SequentialConnectingBranch from './SequentialConnectingBranch';
3
+ import {ffid} from '../../utils/ffID/ffid';
4
+
5
+ const meta: Meta<typeof SequentialConnectingBranch> = {
6
+ title: 'Components/SequentialConnectingBranch',
7
+ component: SequentialConnectingBranch,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ tags: ['autodocs'],
12
+ };
13
+
14
+ type Story = StoryObj<typeof SequentialConnectingBranch>;
15
+
16
+ export const Primary: Story = {
17
+ args: {
18
+ machineInstances: [
19
+ {
20
+ id: ffid(),
21
+ runCount: 1,
22
+ clientId: 'flinko-client-win-98ddb98f-2349-43ce-869e-c2d5350741a4',
23
+ executionEnv: 'Local',
24
+ browserName: 'Google Chrome',
25
+ browserVersion: '111.0.5563.112',
26
+ systemUrl: '',
27
+ machineInfo: {
28
+ osName: 'Windows 11 Pro',
29
+ osVersion: '10.0.22621',
30
+ hostName: 'TYSS-Kumuda',
31
+ },
32
+ deviceInfo: [],
33
+ headless: false,
34
+ peVariableSetId: 'UUID',
35
+ globalVariableSetId: 'UUID',
36
+ testDataSetId: 'UUID',
37
+ },
38
+ ],
39
+ machineInstance: {
40
+ id: ffid(),
41
+ runCount: 1,
42
+ clientId: 'flinko-client-win-98ddb98f-2349-43ce-869e-c2d5350741a4',
43
+ executionEnv: 'Local',
44
+ browserName: 'Google Chrome',
45
+ browserVersion: '111.0.5563.112',
46
+ systemUrl: '',
47
+ machineInfo: {
48
+ osName: 'Windows 11 Pro',
49
+ osVersion: '10.0.22621',
50
+ hostName: 'TYSS-Kumuda',
51
+ },
52
+ deviceInfo: [],
53
+ headless: false,
54
+ peVariableSetId: 'UUID',
55
+ globalVariableSetId: 'UUID',
56
+ testDataSetId: 'UUID',
57
+ },
58
+ selectedMachine: 'test',
59
+ },
60
+ };
61
+
62
+ export default meta;
@@ -0,0 +1,210 @@
1
+ import classNames from 'classnames';
2
+ import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
3
+ import Button from '../Button';
4
+ import Icon from '../Icon';
5
+ import Select from '../Select';
6
+ import Typography from '../Typography';
7
+ import './SequentialConnectingBranch.scss';
8
+ import { useEffect, useRef, useState } from 'react';
9
+ import ConnectingBranches from './components/ConnectingBranches/ConnectingBranches';
10
+ import DatasetListModal from './components/DatasetListModal/DatasetListModal';
11
+ import AddBrowserModal from './components/AddBrowserModal/AddBrowserModal';
12
+ import { ExecutionContext, SequentialConnectingBranchProps } from './types';
13
+ import { Option } from '../Select/types';
14
+ import { ffid } from '../../utils/ffID/ffid';
15
+
16
+ const SequentialConnectingBranch = ({
17
+ machineInstances = [],
18
+ machineColumnWidth = 180,
19
+ machineColumnCount = 1,
20
+ machineInstance,
21
+ selectedMachine = '',
22
+ machineOptionsList = [],
23
+ onMachineSelectionChange = () => {},
24
+ }: SequentialConnectingBranchProps) => {
25
+ const dataListRef = useRef<HTMLButtonElement>(null);
26
+ const selectButtonRef = useRef<HTMLButtonElement>(null);
27
+ const defaultMachineColumnCount = Math.max(machineColumnCount, 1);
28
+ const defaultMachineColumnWidth = Math.max(machineColumnWidth, 180);
29
+
30
+ const isBrowserDetails = checkEmpty(machineInstances);
31
+ const [datasetListModal, setDatasetListModal] = useState(
32
+ !!selectedMachine && isBrowserDetails
33
+ );
34
+ const [addBrowserModal, setAddBrowserModal] = useState(false);
35
+ const [machineBranchInstances, setMachineBranchInstances] = useState<
36
+ ExecutionContext[] | {}[]
37
+ >(machineInstances);
38
+
39
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
40
+ const onHandleSelect = (option: Option) => {
41
+ setDatasetListModal(true);
42
+ onMachineSelectionChange(option);
43
+ };
44
+
45
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
46
+ const onUpdateDatasetList = () => {
47
+ setDatasetListModal(false);
48
+ setAddBrowserModal(true);
49
+ };
50
+
51
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
52
+ const onUpdateAddBrowser = () => {
53
+ setAddBrowserModal(false);
54
+ setDatasetListModal(false);
55
+ };
56
+
57
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
58
+ const onAddBrowser = () => {
59
+ const newMachineInstance = { ...machineInstance, id: ffid() };
60
+ console.log(newMachineInstance);
61
+ setMachineBranchInstances((prevInstances) => [
62
+ ...prevInstances.slice(0, -1),
63
+ newMachineInstance,
64
+ {},
65
+ ]);
66
+ };
67
+
68
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
69
+ const onDeleteBrowser = (id: string, runCount: number) => {
70
+ const machineInstance = machineBranchInstances.filter((instance) => {
71
+ if ('id' in instance && 'runCount' in instance) {
72
+ return instance.id !== id || instance.runCount !== runCount;
73
+ }
74
+ return true;
75
+ });
76
+ setMachineBranchInstances(machineInstance);
77
+ };
78
+
79
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
80
+ const onAddRunBrowser = (id: string) => {
81
+ const index = machineBranchInstances.findLastIndex(
82
+ (instance) => 'id' in instance && instance.id === id
83
+ );
84
+
85
+ if (index !== -1) {
86
+ const existingMachineInstance = machineBranchInstances[index];
87
+
88
+ if (existingMachineInstance && 'runCount' in existingMachineInstance) {
89
+ const newRunInstance = {
90
+ ...existingMachineInstance,
91
+ runCount: (existingMachineInstance.runCount ?? 0) + 1,
92
+ };
93
+
94
+ setMachineBranchInstances((prevInstances) => [
95
+ ...prevInstances.slice(0, index + 1),
96
+ newRunInstance,
97
+ ...prevInstances.slice(index + 1),
98
+ ]);
99
+ }
100
+ }
101
+ };
102
+
103
+ useEffect(() => {
104
+ setMachineBranchInstances([...machineBranchInstances, {}]);
105
+ }, []);
106
+
107
+ return (
108
+ <div className="ff-sequential-connecting-branch-wrapper">
109
+ <div className="ff-connecting-select-branch-wrapper">
110
+ <div className="ff-select-branch-wrapper">
111
+ <Select
112
+ onChange={onHandleSelect}
113
+ optionsList={machineOptionsList}
114
+ required={true}
115
+ label="Choose Machine"
116
+ showLabel={true}
117
+ className="ff-sequential-select-branch"
118
+ />
119
+ {/* {isBrowserDetails && !!selectedMachine && ( */}
120
+ {!!selectedMachine && (
121
+ <div
122
+ className={classNames({
123
+ 'ff-select-branch-arrow': isBrowserDetails,
124
+ 'ff-select-branch-arrow-down': !isBrowserDetails,
125
+ })}
126
+ >
127
+ <div className="ff-select-branch-point"></div>
128
+ <div className="ff-select-branch-arrow">
129
+ <div className="ff-branch-arrow-wrapper">
130
+ {isBrowserDetails && <div className="ff-branch-arrow"></div>}
131
+ </div>
132
+ {addBrowserModal && (
133
+ <>
134
+ <Button
135
+ variant="tertiary"
136
+ label="Browser / Device"
137
+ size="small"
138
+ className="branch-button"
139
+ ref={selectButtonRef}
140
+ onClick={onAddBrowser}
141
+ />
142
+
143
+ <AddBrowserModal
144
+ ref={selectButtonRef}
145
+ onUpdateAddBrowser={onUpdateAddBrowser}
146
+ />
147
+ </>
148
+ )}
149
+ </div>
150
+ </div>
151
+ )}
152
+ </div>
153
+ <div className="ff-select-scope-datalist">
154
+ <div className="ff-scope-wrapper">
155
+ <Icon name="windows" />
156
+ <Typography
157
+ as="span"
158
+ fontSize={12}
159
+ color="var(--ff-connecting-branch-scope-color)"
160
+ className="ff-scope-text"
161
+ >
162
+ Private
163
+ </Typography>
164
+ </div>
165
+
166
+ <div className="ff-datalist-wrapper">
167
+ <Icon
168
+ name="datalist_icon"
169
+ className="ff-dataset-icon"
170
+ ref={dataListRef}
171
+ />
172
+ {datasetListModal && (
173
+ <DatasetListModal
174
+ ref={dataListRef}
175
+ onUpdateDatasetList={onUpdateDatasetList}
176
+ />
177
+ )}
178
+ <Typography
179
+ as="span"
180
+ fontSize={12}
181
+ color="var(--ff-connecting-branch-color)"
182
+ className="ff-datalist-text"
183
+ >
184
+ Dataset List
185
+ </Typography>
186
+ <Icon
187
+ name="delete"
188
+ className="ff-run-delete-icon"
189
+ color="var(--ff-connecting-branch-delete-color)"
190
+ />
191
+ </div>
192
+ </div>
193
+ </div>
194
+ <div className="ff-sequential-branches-wrapper">
195
+ {!isBrowserDetails && (
196
+ <ConnectingBranches
197
+ machineBranchInstances={machineBranchInstances}
198
+ machineColumnCount={defaultMachineColumnCount}
199
+ machineColumnWidth={defaultMachineColumnWidth}
200
+ onAddBrowser={onAddBrowser}
201
+ onDeleteBrowser={onDeleteBrowser}
202
+ onAddRunBrowser={onAddRunBrowser}
203
+ />
204
+ )}
205
+ </div>
206
+ </div>
207
+ );
208
+ };
209
+
210
+ export default SequentialConnectingBranch;
@@ -0,0 +1,51 @@
1
+ .ff-connecting-datalist-modal-header-wrapper,
2
+ .ff-connecting-modal-child-wrapper {
3
+ width: 534px;
4
+ padding: 0 4px;
5
+ }
6
+
7
+ .ff-connecting-datalist-modal-header-wrapper {
8
+ border-bottom: 1px solid var(--ff-connecting-branch-modal-border);
9
+ margin-bottom: 4px;
10
+ }
11
+
12
+ .ff-connecting-modal-child-wrapper {
13
+ .ff-branch-select-input-wrapper {
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 8px;
17
+
18
+ .ff-select-browser {
19
+ width: 263px;
20
+ }
21
+
22
+ .ff-branch-input-wrapper {
23
+ display: flex;
24
+ align-items: flex-end;
25
+ height: 38px;
26
+
27
+ .ff-input-browser {
28
+ width: 245px;
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ .ff-connecting-modal-footer-wrapper {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: space-between;
38
+ padding: 0 8px;
39
+ margin-top: 8px;
40
+ border-top: 1px solid var(--ff-connecting-branch-modal-border);
41
+
42
+ .ff-branch-toggle-wrapper,
43
+ .ff-datalist-button-wrapper {
44
+ display: flex;
45
+ gap: 8px;
46
+ }
47
+
48
+ .ff-branch-toggle-wrapper {
49
+ gap: 4px;
50
+ }
51
+ }
@@ -0,0 +1,107 @@
1
+ import { forwardRef, RefObject } from 'react';
2
+ import MiniModal from '../../../MiniModal';
3
+ import Typography from '../../../Typography';
4
+ import './AddBrowserModal.scss';
5
+ import Select from '../../../Select';
6
+ import Button from '../../../Button';
7
+ import Toggle from '../../../Toggle';
8
+ import Input from '../../../Input/Input';
9
+ import { AddBrowserModalProps } from './types';
10
+
11
+ const AddBrowserModal = forwardRef<HTMLButtonElement, AddBrowserModalProps>(
12
+ (props, ref) => {
13
+ // TODO: WILL BE REMOVE IN THE FUTURE
14
+ const selectOptions = [
15
+ { label: 'Execution Environment', inputName: 'number of runs' },
16
+ { label: 'Browser', inputName: 'Browser Version' },
17
+ { label: 'Android Device', inputName: 'os version' },
18
+ { label: 'IOS Device', inputName: 'os version-1' },
19
+ ];
20
+
21
+ const renderSelectOptions = () => (
22
+ <div>
23
+ {selectOptions.map(({ label, inputName }, index) => (
24
+ <div className="ff-branch-select-input-wrapper" key={index}>
25
+ <Select
26
+ optionsList={[]}
27
+ onChange={() => {}}
28
+ label={label}
29
+ className="ff-select-browser"
30
+ />
31
+ <div className="ff-branch-input-wrapper">
32
+ <Input
33
+ value="0"
34
+ label="Number of Runs"
35
+ type="number"
36
+ onChange={() => {}}
37
+ name={inputName}
38
+ className="ff-input-browser"
39
+ />
40
+ </div>
41
+ </div>
42
+ ))}
43
+ </div>
44
+ );
45
+
46
+ const renderFooterContent = () => (
47
+ <div className="ff-connecting-modal-footer-wrapper">
48
+ <div className="ff-branch-toggle-wrapper">
49
+ <Typography as="span" lineHeight="32px">
50
+ Run in Headless Mode
51
+ </Typography>
52
+ <Toggle />
53
+ </div>
54
+ <div className="ff-datalist-button-wrapper">
55
+ <Button label="Cancel" variant="tertiary" />
56
+ <Button label="Update" variant="primary" />
57
+ </div>
58
+ </div>
59
+ );
60
+
61
+ return (
62
+ <div>
63
+ <MiniModal
64
+ anchorRef={ref as RefObject<HTMLButtonElement>}
65
+ headerProps={
66
+ <div className="ff-connecting-datalist-modal-header-wrapper">
67
+ <Typography
68
+ as="span"
69
+ color="var(--ff-connecting-branch-modal-header)"
70
+ fontWeight="semi-bold"
71
+ fontSize={12}
72
+ lineHeight="38px"
73
+ >
74
+ Add Browser / Device
75
+ </Typography>
76
+ </div>
77
+ }
78
+ childContent={
79
+ <div className="ff-connecting-modal-child-wrapper">
80
+ {renderSelectOptions()}
81
+ </div>
82
+ }
83
+ footerContent={renderFooterContent()}
84
+ cancelButtonProps={{
85
+ text: 'Cancel',
86
+
87
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
88
+ onClick: props.onUpdateAddBrowser,
89
+ }}
90
+ proceedButtonProps={{
91
+ text: 'Proceed',
92
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
93
+ onClick: props.onUpdateAddBrowser,
94
+ }}
95
+ modalPosition="right"
96
+ isPopOver
97
+ leftTopArrow
98
+ extraRightSpace={{ leftTopArrow: 45 }}
99
+ extraLeftSpace={{ rightAlignModal: 115 }}
100
+ {...props}
101
+ />
102
+ </div>
103
+ );
104
+ }
105
+ );
106
+
107
+ export default AddBrowserModal;
@@ -0,0 +1,5 @@
1
+ export interface AddBrowserModalProps {
2
+
3
+ // TODO: DEMO PURPOSE AND WILL BE REMOVED IN THE FUTURE
4
+ onUpdateAddBrowser: () => void;
5
+ }
@@ -0,0 +1,184 @@
1
+ @mixin arrow-style(
2
+ $size: 7px,
3
+ $color: var(--ff-connecting-branch-color),
4
+ $z-index: 2
5
+ ) {
6
+ position: absolute;
7
+ height: $size;
8
+ width: $size;
9
+ background-color: $color;
10
+ z-index: $z-index;
11
+ }
12
+
13
+ @mixin container-style(
14
+ $width: 100%,
15
+ $height: 25%,
16
+ $color: var(--ff-connecting-branch-color)
17
+ ) {
18
+ width: $width;
19
+ height: $height;
20
+ border: 1px solid $color;
21
+ border-top: none;
22
+ }
23
+
24
+ @mixin branch-point(
25
+ $size: 5px,
26
+ $color: var(--ff-connecting-branch-color),
27
+ $position: right,
28
+ $offset: -4px
29
+ ) {
30
+ position: absolute;
31
+ height: $size;
32
+ width: $size;
33
+ background-color: $color;
34
+ border-radius: 50%;
35
+ z-index: 2;
36
+ #{$position}: $offset;
37
+ top: calc(50% - 1px);
38
+ }
39
+
40
+ @mixin branch-arrow(
41
+ $clip: polygon(0 0, 0% 100%, 100% 50%),
42
+ $horizontal-pos: right,
43
+ $offset: -1px
44
+ ) {
45
+ position: absolute;
46
+ height: 7px;
47
+ width: 7px;
48
+ background-color: var(--ff-connecting-branch-color);
49
+ clip-path: $clip;
50
+ top: calc(25% - 4px);
51
+ #{$horizontal-pos}: $offset;
52
+ z-index: 2;
53
+ }
54
+
55
+ @mixin datalist-style($reverse: false) {
56
+ display: flex;
57
+ padding-top: 4px;
58
+ height: 24px;
59
+ justify-content: flex-end;
60
+ width: 100%;
61
+ align-items: center;
62
+ flex-direction: if($reverse, row-reverse, row);
63
+
64
+ .ff-connecting-icon {
65
+ margin-right: 4px;
66
+ cursor: pointer;
67
+ }
68
+
69
+ .ff-connecting-text {
70
+ margin-right: 8px;
71
+ }
72
+
73
+ .ff-connecting-delete-icon {
74
+ cursor: pointer;
75
+ }
76
+ }
77
+
78
+ @mixin end-arrow-styles($direction: right) {
79
+ width: 100%;
80
+ height: 100%;
81
+ margin-top: 17px;
82
+ border-top: 1px solid var(--ff-connecting-branch-color);
83
+ border-#{$direction}: 1px solid var(--ff-connecting-branch-color);
84
+ }
85
+
86
+ .ff-connecting-branch-grid,
87
+ .ff-connecting-branch-grid-reverse {
88
+ box-sizing: border-box;
89
+ display: grid;
90
+ grid-template-columns: 24px 180px 40px 180px 24px;
91
+ height: 66px;
92
+ margin-bottom: 16px;
93
+ position: relative;
94
+
95
+ .ff-connecting-branch-start-wrapper {
96
+ position: relative;
97
+
98
+ .ff-connecting-branch-arrow {
99
+ @include arrow-style();
100
+ clip-path: polygon(0 0, 0% 100%, 100% 50%);
101
+ top: calc(25% - 3px);
102
+ right: -2px;
103
+ }
104
+
105
+ .ff-connecting-branch-arrow-reverse {
106
+ @include arrow-style();
107
+ left: -2px;
108
+ top: calc(25% - 3px);
109
+ clip-path: polygon(0 50%, 100% 100%, 100% 0);
110
+ }
111
+
112
+ .ff-connecting-branch-container {
113
+ @include container-style();
114
+ border-right: none;
115
+ border-bottom-left-radius: 8px;
116
+ }
117
+
118
+ .ff-connecting-branch-container-reverse {
119
+ @include container-style();
120
+ border-left: none;
121
+ border-bottom-right-radius: 8px;
122
+ }
123
+ }
124
+
125
+ .ff-connecting-branch-datalist {
126
+ @include datalist-style();
127
+ }
128
+
129
+ .ff-connecting-branch-datalist-reverse {
130
+ @include datalist-style(true);
131
+ }
132
+
133
+ .ff-connecting-branch-input-point-wrapper {
134
+ position: relative;
135
+
136
+ .ff-connecting-branch-point {
137
+ @include branch-point();
138
+ }
139
+
140
+ .ff-connecting-branch-point-reverse {
141
+ @include branch-point($position: left, $offset: -4px);
142
+ }
143
+ }
144
+
145
+ .ff-connecting-branch-middle-arrow {
146
+ height: 0px;
147
+ width: 100%;
148
+ margin-top: calc(50% - 3px);
149
+ position: relative;
150
+
151
+ .ff-connecting-branch-arrow {
152
+ @include branch-arrow();
153
+ }
154
+
155
+ .ff-connecting-branch-arrow-reverse {
156
+ @include branch-arrow(
157
+ $clip: polygon(0 50%, 100% 100%, 100% 0),
158
+ $horizontal-pos: left,
159
+ $offset: -1px
160
+ );
161
+ }
162
+ }
163
+
164
+ .ff-connecting-branch-end-arrow {
165
+ @include end-arrow-styles(right);
166
+ border-top-right-radius: 8px;
167
+ }
168
+
169
+ .ff-connecting-branch-end-arrow-reverse {
170
+ @include end-arrow-styles(left);
171
+ border-top-left-radius: 8px;
172
+ }
173
+
174
+ .ff-connecting-branch-browser-button {
175
+ height: 32px;
176
+ display: flex;
177
+ align-items: center;
178
+ }
179
+ }
180
+
181
+ .ff-connecting-branch-grid-reverse {
182
+ direction: rtl;
183
+ margin-left: 1px;
184
+ }