pixel-react 1.1.1 → 1.1.3
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/Charts/DashboardDonutChart/DashboardDonutChart.d.ts +5 -0
- package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
- package/lib/components/Charts/DashboardDonutChart/index.d.ts +1 -0
- package/lib/components/Charts/DashboardDonutChart/types.d.ts +21 -0
- package/lib/components/Charts/PieChart/PieChart.d.ts +5 -0
- package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
- package/lib/components/Charts/PieChart/index.d.ts +1 -0
- package/lib/components/Charts/PieChart/types.d.ts +27 -0
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -1
- package/lib/components/NLPInput/NlpInput.d.ts +4 -0
- package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
- package/lib/components/NLPInput/components/NlpDropDown/NlpDropDownType.d.ts +19 -0
- package/lib/components/NLPInput/components/NlpDropDown/NlpDropdown.d.ts +4 -0
- package/lib/components/NLPInput/index.d.ts +1 -0
- package/lib/components/NLPInput/type.d.ts +70 -0
- package/lib/components/Paper/Paper.d.ts +4 -0
- package/lib/components/Paper/Paper.stories.d.ts +11 -0
- package/lib/components/Paper/index.d.ts +1 -0
- package/lib/components/Paper/types.d.ts +15 -0
- package/lib/components/Table/Table.d.ts +1 -1
- package/lib/components/VariableInput/VariableInput.d.ts +4 -0
- package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
- package/lib/components/VariableInput/index.d.ts +1 -0
- package/lib/components/VariableInput/types.d.ts +53 -0
- package/lib/index.css +404 -0
- package/lib/index.d.ts +187 -18
- package/lib/index.esm.css +404 -0
- package/lib/index.esm.js +7040 -762
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +7052 -761
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/ffID/ffID.stories.d.ts +1 -1
- package/lib/utils/ffID/ffid.d.ts +1 -2
- package/lib/utils/findAndInsert/findAndInsert.d.ts +7 -0
- package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
- package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -0
- package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
- package/package.json +2 -1
- package/rollup.config.mjs +8 -2
- package/src/StyleGuide/ColorPalette/ColorPalette.tsx +2 -4
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +95 -20
- package/src/assets/Themes/BaseTheme.scss +4 -3
- package/src/assets/Themes/DarkTheme.scss +11 -8
- package/src/assets/icons/wswb_delete_icon.svg +4 -0
- package/src/assets/icons/wswb_plus_icon.svg +5 -0
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +1 -1
- package/src/components/Button/index.ts +1 -1
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.scss +145 -0
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +52 -0
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +335 -0
- package/src/components/Charts/DashboardDonutChart/index.ts +1 -0
- package/src/components/Charts/DashboardDonutChart/types.ts +33 -0
- package/src/components/Charts/PieChart/PieChart.scss +39 -0
- package/src/components/Charts/PieChart/PieChart.stories.tsx +46 -0
- package/src/components/Charts/PieChart/PieChart.tsx +193 -0
- package/src/components/Charts/PieChart/index.ts +1 -0
- package/src/components/Charts/PieChart/types.ts +28 -0
- package/src/components/Icon/iconList.ts +6 -0
- package/src/components/Modal/modal.scss +1 -1
- package/src/components/MultiSelect/MultiSelect.stories.tsx +2 -3
- package/src/components/MultiSelect/MultiSelect.tsx +35 -23
- package/src/components/MultiSelect/MultiSelectTypes.ts +1 -1
- package/src/components/NLPInput/NLPInput.scss +246 -0
- package/src/components/NLPInput/NlpInput.stories.tsx +136 -0
- package/src/components/NLPInput/NlpInput.tsx +374 -0
- package/src/components/NLPInput/components/NlpDropDown/NlpDropDownType.ts +60 -0
- package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.scss +83 -0
- package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.tsx +180 -0
- package/src/components/NLPInput/index.ts +1 -0
- package/src/components/NLPInput/type.tsx +124 -0
- package/src/components/Paper/Paper.scss +13 -0
- package/src/components/Paper/Paper.stories.tsx +77 -0
- package/src/components/Paper/Paper.tsx +14 -0
- package/src/components/Paper/index.ts +1 -0
- package/src/components/Paper/types.ts +19 -0
- package/src/components/Select/components/Dropdown/Dropdown.tsx +1 -1
- package/src/components/Table/Table.scss +5 -0
- package/src/components/Table/Table.stories.tsx +12 -0
- package/src/components/Table/Table.tsx +25 -14
- package/src/components/TextArea/Textarea.scss +1 -1
- package/src/components/VariableInput/VariableInput.scss +128 -0
- package/src/components/VariableInput/VariableInput.stories.tsx +32 -0
- package/src/components/VariableInput/VariableInput.tsx +352 -0
- package/src/components/VariableInput/index.ts +1 -0
- package/src/components/VariableInput/types.ts +56 -0
- package/src/index.ts +32 -2
- package/src/utils/ffID/ffID.stories.tsx +1 -1
- package/src/utils/ffID/ffid.ts +1 -3
- package/src/utils/getEncryptedData/getEncryptedData.stories.tsx +55 -0
- package/src/utils/getEncryptedData/getEncryptedData.ts +8 -0
- package/lib/components/AddButton/AddButton.d.ts +0 -5
- package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
- package/lib/components/AddButton/index.d.ts +0 -1
- package/lib/components/AddButton/types.d.ts +0 -4
- /package/src/utils/{find → findAndInsert}/findAndInsert.stories.tsx +0 -0
- /package/src/utils/{find → findAndInsert}/findAndInsert.ts +0 -0
@@ -0,0 +1,124 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
|
3
|
+
export interface SelectProps {
|
4
|
+
/*
|
5
|
+
* Label for the NLP NLP select dropdown
|
6
|
+
*/
|
7
|
+
label?: string;
|
8
|
+
|
9
|
+
/*
|
10
|
+
* If true, the NLP select dropdown will have a label
|
11
|
+
*/
|
12
|
+
showLabel?: boolean;
|
13
|
+
|
14
|
+
/*
|
15
|
+
* Options for the NLP select dropdown
|
16
|
+
*/
|
17
|
+
optionsList: any[];
|
18
|
+
|
19
|
+
/*
|
20
|
+
* Selected option for the NLP select dropdown
|
21
|
+
*/
|
22
|
+
selectedOption?: Option;
|
23
|
+
|
24
|
+
/*
|
25
|
+
* onChange callback function for handling selected option changes
|
26
|
+
*/
|
27
|
+
onChange: (option: Option) => void;
|
28
|
+
|
29
|
+
/*
|
30
|
+
* If error is true, this message will be displayed
|
31
|
+
*/
|
32
|
+
errorMsg?: string;
|
33
|
+
|
34
|
+
/*
|
35
|
+
* provide the className for the NLP select dropdown
|
36
|
+
*/
|
37
|
+
className?: string;
|
38
|
+
|
39
|
+
/*
|
40
|
+
* Providing the z-index for dropdown and select
|
41
|
+
*/
|
42
|
+
optionZIndex?: number;
|
43
|
+
|
44
|
+
/*
|
45
|
+
* Provide disable prop for the disabling the select component
|
46
|
+
*/
|
47
|
+
disabled?: boolean;
|
48
|
+
|
49
|
+
/*
|
50
|
+
* Provide disable prop for the providing border radius at right side
|
51
|
+
*/
|
52
|
+
borderRadius?: boolean;
|
53
|
+
|
54
|
+
/*
|
55
|
+
* Provide boolean value to show border or not
|
56
|
+
*/
|
57
|
+
showBorder?: boolean;
|
58
|
+
|
59
|
+
/*
|
60
|
+
* Provide the boolean value if the select component is required or not
|
61
|
+
*/
|
62
|
+
required?: boolean;
|
63
|
+
}
|
64
|
+
|
65
|
+
export interface DrowdownPosition {
|
66
|
+
positionX: number;
|
67
|
+
positionY: number;
|
68
|
+
width: number;
|
69
|
+
fromBottom: number;
|
70
|
+
}
|
71
|
+
|
72
|
+
export interface SelectState {
|
73
|
+
isInputFocused: boolean;
|
74
|
+
iconColor: string;
|
75
|
+
isIconClick: boolean;
|
76
|
+
showOptions: boolean;
|
77
|
+
options: any[];
|
78
|
+
option: string;
|
79
|
+
dropdownPosition: DrowdownPosition;
|
80
|
+
}
|
81
|
+
|
82
|
+
export type SelectAction =
|
83
|
+
| { type: 'FOCUS_INPUT' }
|
84
|
+
| {
|
85
|
+
type: 'BLUR_INPUT';
|
86
|
+
payload: {
|
87
|
+
optionsList: Option[];
|
88
|
+
option: Option['projectId'];
|
89
|
+
};
|
90
|
+
}
|
91
|
+
| { type: 'MOUSE_ENTER' }
|
92
|
+
| { type: 'MOUSE_LEAVE' }
|
93
|
+
| {
|
94
|
+
type: 'UPDATE_DROPDOWN_POSITION';
|
95
|
+
payload: {
|
96
|
+
positionX: number;
|
97
|
+
positionY: number;
|
98
|
+
width: number;
|
99
|
+
fromBottom: number;
|
100
|
+
};
|
101
|
+
}
|
102
|
+
| {
|
103
|
+
type: 'UPDATE_OPTION';
|
104
|
+
payload: string;
|
105
|
+
}
|
106
|
+
| {
|
107
|
+
type: 'UPDATE_OPTION_LIST';
|
108
|
+
payload: any[];
|
109
|
+
}
|
110
|
+
| {
|
111
|
+
type: 'SHOW_ERROR';
|
112
|
+
payload: {
|
113
|
+
optionsList: any[];
|
114
|
+
option: Option['projectId'];
|
115
|
+
};
|
116
|
+
};
|
117
|
+
|
118
|
+
export interface Option {
|
119
|
+
displayName: string | ReactNode;
|
120
|
+
projectId: string;
|
121
|
+
nlpType: string;
|
122
|
+
platform:string;
|
123
|
+
disabled?: boolean;
|
124
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Rounded corners
|
2
|
+
.ff_rounded_lg {
|
3
|
+
border-radius: 8px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.ff_paper_basic_style {
|
7
|
+
padding: 20px;
|
8
|
+
background-color: var(--ff-paper-dark-background-color);
|
9
|
+
}
|
10
|
+
.ff_paper_default_style {
|
11
|
+
padding: 20px;
|
12
|
+
background-color: var(--ff-paper-background-color);
|
13
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import Paper from './Paper';
|
3
|
+
import { Children } from 'react';
|
4
|
+
import Typography from '../Typography';
|
5
|
+
import './Paper.scss';
|
6
|
+
|
7
|
+
const meta: Meta<typeof Paper> = {
|
8
|
+
title: 'Components/Paper',
|
9
|
+
component: Paper,
|
10
|
+
parameters: {
|
11
|
+
layout: 'centered',
|
12
|
+
},
|
13
|
+
tags: ['autodocs'],
|
14
|
+
};
|
15
|
+
|
16
|
+
type Story = StoryObj<typeof Paper>;
|
17
|
+
|
18
|
+
const defaultArgs = {
|
19
|
+
Children,
|
20
|
+
className: '',
|
21
|
+
rounded: false,
|
22
|
+
};
|
23
|
+
|
24
|
+
export const Default: Story = {
|
25
|
+
args: {
|
26
|
+
...defaultArgs,
|
27
|
+
children: <p>This is a simple Paper component with default styles.</p>,
|
28
|
+
className: 'ff_paper_default_style',
|
29
|
+
},
|
30
|
+
};
|
31
|
+
|
32
|
+
export const PrimaryPaper: Story = {
|
33
|
+
render: () => {
|
34
|
+
return (
|
35
|
+
<Paper className="ff_paper_default_style">
|
36
|
+
<Typography>
|
37
|
+
This Paper component has custom background color and padding.
|
38
|
+
</Typography>
|
39
|
+
</Paper>
|
40
|
+
);
|
41
|
+
},
|
42
|
+
};
|
43
|
+
|
44
|
+
export const PaperWithLowShadow: Story = {
|
45
|
+
render: () => {
|
46
|
+
return (
|
47
|
+
<Paper className="ff_paper_default_style">
|
48
|
+
<Typography>This Paper component has a shadow depth of 6.</Typography>
|
49
|
+
</Paper>
|
50
|
+
);
|
51
|
+
},
|
52
|
+
};
|
53
|
+
|
54
|
+
export const PaperWithHighShadow: Story = {
|
55
|
+
render: () => {
|
56
|
+
return (
|
57
|
+
<Paper className="ff_paper_basic_style" rounded>
|
58
|
+
<Typography>
|
59
|
+
This Paper component combines custom styles, shadow depth of 10, and
|
60
|
+
rounded corners.
|
61
|
+
</Typography>
|
62
|
+
</Paper>
|
63
|
+
);
|
64
|
+
},
|
65
|
+
};
|
66
|
+
|
67
|
+
export const PaperWithRounded: Story = {
|
68
|
+
render: () => {
|
69
|
+
return (
|
70
|
+
<Paper rounded className="ff_paper_default_style">
|
71
|
+
<Typography>This Paper component has Rounded Corners.</Typography>
|
72
|
+
</Paper>
|
73
|
+
);
|
74
|
+
},
|
75
|
+
};
|
76
|
+
|
77
|
+
export default meta;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import classNames from 'classnames';
|
2
|
+
import './Paper.scss';
|
3
|
+
import { PaperProps } from './types';
|
4
|
+
|
5
|
+
const Paper = ({ children, className = '', rounded = false }: PaperProps) => {
|
6
|
+
const dynamicClassName = classNames(
|
7
|
+
{ ['ff_rounded_lg']: rounded },
|
8
|
+
className
|
9
|
+
);
|
10
|
+
|
11
|
+
return <div className={dynamicClassName}>{children}</div>;
|
12
|
+
};
|
13
|
+
|
14
|
+
export default Paper;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {default} from './Paper'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export interface PaperProps {
|
2
|
+
/**
|
3
|
+
* The content of the component.
|
4
|
+
*/
|
5
|
+
children?: React.ReactNode;
|
6
|
+
/**
|
7
|
+
* Override or extend the styles applied to the component.
|
8
|
+
*/
|
9
|
+
className?: string;
|
10
|
+
/**
|
11
|
+
* If `true`, rounded corners are Enabled.
|
12
|
+
* @default false
|
13
|
+
*/
|
14
|
+
rounded?: boolean;
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
@@ -4,7 +4,7 @@ import useClickOutside from '../../../../hooks/useClickOutside';
|
|
4
4
|
import { checkEmpty } from '../../../../utils/checkEmpty/checkEmpty';
|
5
5
|
import './Dropdown.scss';
|
6
6
|
import Typography from '../../../Typography';
|
7
|
-
import ffid from '../../../../utils/ffID/ffid';
|
7
|
+
import { ffid } from '../../../../utils/ffID/ffid';
|
8
8
|
import { ThemeContext } from '../../../ThemeProvider/ThemeProvider';
|
9
9
|
import classNames from 'classnames';
|
10
10
|
|
@@ -26,6 +26,7 @@ const sampleData = [
|
|
26
26
|
type: 'Web',
|
27
27
|
status: 'Open',
|
28
28
|
checked: false,
|
29
|
+
disabled:true
|
29
30
|
},
|
30
31
|
},
|
31
32
|
{
|
@@ -36,6 +37,7 @@ const sampleData = [
|
|
36
37
|
type: 'Mobile',
|
37
38
|
status: 'Close',
|
38
39
|
checked: true,
|
40
|
+
disabled:true
|
39
41
|
},
|
40
42
|
},
|
41
43
|
{
|
@@ -46,6 +48,7 @@ const sampleData = [
|
|
46
48
|
type: 'Web',
|
47
49
|
status: 'Close',
|
48
50
|
checked: true,
|
51
|
+
disabled:true
|
49
52
|
},
|
50
53
|
},
|
51
54
|
{
|
@@ -56,6 +59,7 @@ const sampleData = [
|
|
56
59
|
type: 'Web & Mobile',
|
57
60
|
status: 'Open',
|
58
61
|
checked: false,
|
62
|
+
disabled:false
|
59
63
|
},
|
60
64
|
},
|
61
65
|
{
|
@@ -66,6 +70,7 @@ const sampleData = [
|
|
66
70
|
type: 'Web',
|
67
71
|
status: 'Open',
|
68
72
|
checked: false,
|
73
|
+
disabled:true
|
69
74
|
},
|
70
75
|
},
|
71
76
|
{
|
@@ -76,6 +81,7 @@ const sampleData = [
|
|
76
81
|
type: 'Mobile',
|
77
82
|
status: 'Close',
|
78
83
|
checked: true,
|
84
|
+
disabled:true
|
79
85
|
},
|
80
86
|
},
|
81
87
|
{
|
@@ -86,6 +92,7 @@ const sampleData = [
|
|
86
92
|
type: 'Web',
|
87
93
|
status: 'Close',
|
88
94
|
checked: true,
|
95
|
+
disabled:true
|
89
96
|
},
|
90
97
|
},
|
91
98
|
{
|
@@ -96,6 +103,7 @@ const sampleData = [
|
|
96
103
|
type: 'Web & Mobile',
|
97
104
|
status: 'Open',
|
98
105
|
checked: false,
|
106
|
+
disabled:false
|
99
107
|
},
|
100
108
|
},
|
101
109
|
{
|
@@ -106,6 +114,7 @@ const sampleData = [
|
|
106
114
|
type: 'Web',
|
107
115
|
status: 'Open',
|
108
116
|
checked: false,
|
117
|
+
disabled:false
|
109
118
|
},
|
110
119
|
},
|
111
120
|
{
|
@@ -116,6 +125,7 @@ const sampleData = [
|
|
116
125
|
type: 'Mobile',
|
117
126
|
status: 'Close',
|
118
127
|
checked: true,
|
128
|
+
disabled:false
|
119
129
|
},
|
120
130
|
},
|
121
131
|
{
|
@@ -126,6 +136,7 @@ const sampleData = [
|
|
126
136
|
type: 'Web',
|
127
137
|
status: 'Close',
|
128
138
|
checked: true,
|
139
|
+
disabled:false
|
129
140
|
},
|
130
141
|
},
|
131
142
|
{
|
@@ -136,6 +147,7 @@ const sampleData = [
|
|
136
147
|
type: 'Web & Mobile',
|
137
148
|
status: 'Open',
|
138
149
|
checked: false,
|
150
|
+
disabled:false
|
139
151
|
},
|
140
152
|
},
|
141
153
|
];
|
@@ -2,8 +2,10 @@ import './Table.scss';
|
|
2
2
|
// import Checkbox from '../Checkbox';
|
3
3
|
import { isFunction } from '../../assets/utils/functionUtils';
|
4
4
|
import classNames from 'classnames';
|
5
|
-
import { ColumnsProps, DataProps, TableProps } from './Types';
|
5
|
+
import { ColumnsProps, DataProps, TableProps ,SelectedItemProps} from './Types';
|
6
6
|
import { prepareData } from '../../utils/TableCell/TableCell';
|
7
|
+
import Checkbox from '../Checkbox';
|
8
|
+
import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
|
7
9
|
|
8
10
|
// import NoData from '../NoData/NoData';
|
9
11
|
|
@@ -11,13 +13,13 @@ const Table = ({
|
|
11
13
|
data = [],
|
12
14
|
columns = [],
|
13
15
|
headerType,
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
withCheckbox,
|
17
|
+
onSelect,
|
18
|
+
allSelected,
|
19
|
+
partialSelected = false,
|
18
20
|
withFixedHeader = true,
|
19
21
|
borderWithRadius = false,
|
20
|
-
|
22
|
+
headerCheckboxDisabled = false,
|
21
23
|
// noDataContent,
|
22
24
|
// noDataImage,
|
23
25
|
// noDataImageSize,
|
@@ -30,7 +32,13 @@ const Table = ({
|
|
30
32
|
onClick(accessor, row);
|
31
33
|
}
|
32
34
|
};
|
33
|
-
|
35
|
+
const onSelectClick = (e: object, item: SelectedItemProps) => {
|
36
|
+
if (onSelect) {
|
37
|
+
onSelect(e, item);
|
38
|
+
}
|
39
|
+
};
|
40
|
+
if (checkEmpty(data)) return null;
|
41
|
+
|
34
42
|
return (
|
35
43
|
<div
|
36
44
|
style={{ height: height }}
|
@@ -45,16 +53,16 @@ const Table = ({
|
|
45
53
|
'ff-fixed-header': withFixedHeader,
|
46
54
|
})}
|
47
55
|
>
|
48
|
-
<tr>
|
56
|
+
<tr >
|
49
57
|
{/* columns.map((column, index) */}
|
50
|
-
{columns.map((column) => (
|
58
|
+
{columns.map((column, index) => (
|
51
59
|
<th
|
52
60
|
className={headerType && `${headerType}-bg`}
|
53
61
|
key={column.header}
|
54
62
|
style={{ width: column?.width }}
|
55
63
|
>
|
56
64
|
<div>
|
57
|
-
|
65
|
+
{index === 0 && withCheckbox && (
|
58
66
|
<span className="ff-table-checkbox">
|
59
67
|
<Checkbox
|
60
68
|
onChange={(e) => {
|
@@ -67,7 +75,7 @@ const Table = ({
|
|
67
75
|
disabled={headerCheckboxDisabled}
|
68
76
|
/>
|
69
77
|
</span>
|
70
|
-
)}
|
78
|
+
)}
|
71
79
|
|
72
80
|
{column.header}
|
73
81
|
</div>
|
@@ -78,7 +86,10 @@ const Table = ({
|
|
78
86
|
<tbody>
|
79
87
|
{data.length > 0 &&
|
80
88
|
data.map((row: any, index: number) => (
|
81
|
-
<tr key={row.id || index}
|
89
|
+
<tr key={row.id || index} className={classNames(className,{
|
90
|
+
'disabled-row': row.disabled
|
91
|
+
})}
|
92
|
+
>
|
82
93
|
{columns.map((column, i) => {
|
83
94
|
return (
|
84
95
|
<td
|
@@ -89,7 +100,7 @@ const Table = ({
|
|
89
100
|
})}
|
90
101
|
>
|
91
102
|
<div>
|
92
|
-
{
|
103
|
+
{i === 0 && withCheckbox && (
|
93
104
|
<span className="ff-table-checkbox">
|
94
105
|
<Checkbox
|
95
106
|
onChange={(e) => {
|
@@ -99,7 +110,7 @@ const Table = ({
|
|
99
110
|
disabled={!!row.disabled}
|
100
111
|
/>
|
101
112
|
</span>
|
102
|
-
)}
|
113
|
+
)}
|
103
114
|
{prepareData(row, column)}
|
104
115
|
</div>
|
105
116
|
</td>
|
@@ -0,0 +1,128 @@
|
|
1
|
+
.ff_variable_input_container {
|
2
|
+
.ff_label_container {
|
3
|
+
display: flex;
|
4
|
+
align-items: center;
|
5
|
+
margin-bottom: 4px;
|
6
|
+
|
7
|
+
&.ff_danger_label {
|
8
|
+
.ff_input_label {
|
9
|
+
color: var(--error);
|
10
|
+
}
|
11
|
+
|
12
|
+
.ff_required_asterisk {
|
13
|
+
color: var(--error);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.ff_required_asterisk {
|
19
|
+
color: var(--input-error-text-color);
|
20
|
+
font-size: 1.1em;
|
21
|
+
margin-right: 4px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.ff_input_label {
|
25
|
+
font-size: 14px;
|
26
|
+
font-weight: 500;
|
27
|
+
color: var(--text-color);
|
28
|
+
|
29
|
+
&.ff_no_hover {
|
30
|
+
color: var(--toggle-disable-icon-color);
|
31
|
+
}
|
32
|
+
|
33
|
+
&.ff_disabled_label {
|
34
|
+
color: var(--toggle-disable-icon-color);
|
35
|
+
cursor: not-allowed;
|
36
|
+
}
|
37
|
+
|
38
|
+
&.ff_danger_label {
|
39
|
+
color: var(--error);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
.ff_content_editable {
|
44
|
+
min-width: 8rem;
|
45
|
+
border: 1px solid var(--input-default-border-color);
|
46
|
+
padding: 8px;
|
47
|
+
min-height: 30px;
|
48
|
+
border-radius: 4px;
|
49
|
+
font-family: Arial, sans-serif;
|
50
|
+
font-size: 14px;
|
51
|
+
line-height: 20px;
|
52
|
+
transition: border-color 0.2s ease;
|
53
|
+
position: relative;
|
54
|
+
text-align: left;
|
55
|
+
display: flex;
|
56
|
+
align-items: center;
|
57
|
+
overflow: auto;
|
58
|
+
|
59
|
+
.ff_var_red {
|
60
|
+
color: var(--status-rejected-text-color);
|
61
|
+
}
|
62
|
+
|
63
|
+
.ff_var_def_color {
|
64
|
+
color: var(--text-color);
|
65
|
+
}
|
66
|
+
|
67
|
+
.ff_var_green {
|
68
|
+
color: var(--status-success-text-color);
|
69
|
+
}
|
70
|
+
|
71
|
+
&::after {
|
72
|
+
content: '*';
|
73
|
+
color: var(--input-error-text-color);
|
74
|
+
font-size: 1.2em;
|
75
|
+
position: absolute;
|
76
|
+
top: 2px;
|
77
|
+
right: 2px;
|
78
|
+
display: none;
|
79
|
+
}
|
80
|
+
|
81
|
+
&.ff_required::after {
|
82
|
+
display: inline;
|
83
|
+
}
|
84
|
+
|
85
|
+
&.ff_required_empty:focus-within,
|
86
|
+
&.ff_required_empty:focus {
|
87
|
+
border-color: var(--input-error-text-color);
|
88
|
+
}
|
89
|
+
|
90
|
+
&:empty::before {
|
91
|
+
content: attr(data-placeholder);
|
92
|
+
color: var(--ff-search-filed-placeholder-text);
|
93
|
+
position: absolute;
|
94
|
+
user-select: none;
|
95
|
+
pointer-events: none;
|
96
|
+
font-size: medium;
|
97
|
+
}
|
98
|
+
|
99
|
+
&.ff_disabled {
|
100
|
+
pointer-events: none;
|
101
|
+
opacity: 0.5;
|
102
|
+
background-color: var(--input-default-border-color);
|
103
|
+
}
|
104
|
+
|
105
|
+
&.ff_invalid_input {
|
106
|
+
border: 1px solid var(--input-error-text-color);
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
.ff_suggestions {
|
111
|
+
border: 1px solid var(--input-default-border-color);
|
112
|
+
margin-top: 4px;
|
113
|
+
padding: 4px;
|
114
|
+
border-radius: 4px;
|
115
|
+
list-style-type: none;
|
116
|
+
background-color: var(--ff-select-background-color);
|
117
|
+
max-height: 150px;
|
118
|
+
overflow-y: auto;
|
119
|
+
}
|
120
|
+
|
121
|
+
.ff_suggestion_item {
|
122
|
+
padding: 4px;
|
123
|
+
cursor: pointer;
|
124
|
+
&:hover {
|
125
|
+
background-color: var(--ff-select-background-color);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import VariableInput from './VariableInput';
|
3
|
+
|
4
|
+
const meta: Meta<typeof VariableInput> = {
|
5
|
+
title: 'Components/VariableInput',
|
6
|
+
component: VariableInput,
|
7
|
+
parameters: {
|
8
|
+
layout: 'centered',
|
9
|
+
},
|
10
|
+
tags: ['autodocs'],
|
11
|
+
};
|
12
|
+
|
13
|
+
type Story = StoryObj<typeof VariableInput>;
|
14
|
+
|
15
|
+
const defaultArgs = {
|
16
|
+
name: 'input',
|
17
|
+
label: '',
|
18
|
+
disabled: false,
|
19
|
+
placeholder: 'Enter URL',
|
20
|
+
value: '',
|
21
|
+
type: 'url',
|
22
|
+
list:['name','urlName','passwork','emailId','default','errorVar']
|
23
|
+
};
|
24
|
+
|
25
|
+
export const Default: Story = {
|
26
|
+
args: {
|
27
|
+
...defaultArgs,
|
28
|
+
label: 'Enter URL',
|
29
|
+
type: 'url',
|
30
|
+
},
|
31
|
+
};
|
32
|
+
export default meta;
|