@openlettermarketing/olc-react-sdk 2.1.6 → 2.1.8
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.
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/types/version.d.ts +1 -1
- package/package.json +7 -6
- package/.eslintignore +0 -1
- package/.eslintrc.cjs +0 -18
- package/.eslintrc.yml +0 -47
- package/.github/workflows/publish-beta.yml +0 -154
- package/.github/workflows/publish-production.yml +0 -143
- package/.prettierignore +0 -3
- package/.prettierrc.yml +0 -5
- package/CHANGELOG.md +0 -4
- package/babel.config.json +0 -10
- package/examples/.eslintrc.yml +0 -4
- package/index.html +0 -18
- package/public/vite.svg +0 -1
- package/src/App.tsx +0 -209
- package/src/assets/Fonts/Lexi-Regular.ttf +0 -0
- package/src/assets/images/create-template/prebuilt.svg +0 -13
- package/src/assets/images/create-template/scratch.svg +0 -4
- package/src/assets/images/input/cancel.tsx +0 -20
- package/src/assets/images/input/search.tsx +0 -20
- package/src/assets/images/input/select-cancel.tsx +0 -17
- package/src/assets/images/modal-icons/add.tsx +0 -36
- package/src/assets/images/modal-icons/cancel-file.tsx +0 -12
- package/src/assets/images/modal-icons/cancel-input.tsx +0 -13
- package/src/assets/images/modal-icons/cancel.tsx +0 -35
- package/src/assets/images/modal-icons/close-new.svg +0 -3
- package/src/assets/images/modal-icons/confirm-close-icon.tsx +0 -14
- package/src/assets/images/modal-icons/confirm-new.tsx +0 -22
- package/src/assets/images/modal-icons/confirm.svg +0 -12
- package/src/assets/images/modal-icons/cross.tsx +0 -23
- package/src/assets/images/modal-icons/del.tsx +0 -19
- package/src/assets/images/modal-icons/design-icon.tsx +0 -22
- package/src/assets/images/modal-icons/doc.tsx +0 -43
- package/src/assets/images/modal-icons/docx.tsx +0 -43
- package/src/assets/images/modal-icons/envelope-icon.tsx +0 -26
- package/src/assets/images/modal-icons/info.tsx +0 -19
- package/src/assets/images/modal-icons/jpeg.tsx +0 -43
- package/src/assets/images/modal-icons/jpg.tsx +0 -43
- package/src/assets/images/modal-icons/modal-cros.svg +0 -4
- package/src/assets/images/modal-icons/modal-cross.tsx +0 -37
- package/src/assets/images/modal-icons/new-cancel.tsx +0 -11
- package/src/assets/images/modal-icons/order-download.tsx +0 -42
- package/src/assets/images/modal-icons/pdf.tsx +0 -51
- package/src/assets/images/modal-icons/png.tsx +0 -43
- package/src/assets/images/modal-icons/save.tsx +0 -23
- package/src/assets/images/modal-icons/template-copy.tsx +0 -25
- package/src/assets/images/modal-icons/tool-cancel.tsx +0 -25
- package/src/assets/images/products/bi-new.svg +0 -23
- package/src/assets/images/products/left-arrow.svg +0 -17
- package/src/assets/images/products/personal-new.tsx +0 -31
- package/src/assets/images/products/postcard-new.tsx +0 -27
- package/src/assets/images/products/professional-new.tsx +0 -24
- package/src/assets/images/products/real-new.tsx +0 -30
- package/src/assets/images/products/right-arrow.svg +0 -17
- package/src/assets/images/products/snap-new.svg +0 -31
- package/src/assets/images/templates/actions.svg +0 -3
- package/src/assets/images/templates/address-block-icon.tsx +0 -62
- package/src/assets/images/templates/archive.svg +0 -3
- package/src/assets/images/templates/arrow-down.tsx +0 -27
- package/src/assets/images/templates/back-arrow.tsx +0 -19
- package/src/assets/images/templates/bi-fold-self-mailers.tsx +0 -28
- package/src/assets/images/templates/check.svg +0 -3
- package/src/assets/images/templates/code.svg +0 -10
- package/src/assets/images/templates/content-copy-icon.tsx +0 -24
- package/src/assets/images/templates/custom-add-on-icon.tsx +0 -18
- package/src/assets/images/templates/custom-qr-section-icon.tsx +0 -9
- package/src/assets/images/templates/custom-template.tsx +0 -23
- package/src/assets/images/templates/designer.tsx +0 -43
- package/src/assets/images/templates/dot.tsx +0 -22
- package/src/assets/images/templates/download-v2.svg +0 -4
- package/src/assets/images/templates/download.svg +0 -4
- package/src/assets/images/templates/dummy-template.tsx +0 -76
- package/src/assets/images/templates/dynamic-field.tsx +0 -119
- package/src/assets/images/templates/edit-pencil-icon.tsx +0 -21
- package/src/assets/images/templates/edit.svg +0 -3
- package/src/assets/images/templates/epo-icon.tsx +0 -16
- package/src/assets/images/templates/field.tsx +0 -29
- package/src/assets/images/templates/gsv-icon.tsx +0 -31
- package/src/assets/images/templates/info-icon.tsx +0 -37
- package/src/assets/images/templates/left-arrow.svg +0 -17
- package/src/assets/images/templates/pencil.svg +0 -3
- package/src/assets/images/templates/personal-letter.tsx +0 -53
- package/src/assets/images/templates/postcard.tsx +0 -32
- package/src/assets/images/templates/professional-letter.tsx +0 -53
- package/src/assets/images/templates/qr-code.tsx +0 -13
- package/src/assets/images/templates/real-penned-letters.tsx +0 -57
- package/src/assets/images/templates/right-arrow.svg +0 -17
- package/src/assets/images/templates/size-image-lg.tsx +0 -20
- package/src/assets/images/templates/size-image-mid.tsx +0 -20
- package/src/assets/images/templates/size-image-xl.tsx +0 -20
- package/src/assets/images/templates/size-image.tsx +0 -20
- package/src/assets/images/templates/snap-pack.tsx +0 -67
- package/src/assets/images/templates/template-default-design.tsx +0 -21
- package/src/assets/images/templates/trash-upload.svg +0 -3
- package/src/assets/images/templates/trash.svg +0 -3
- package/src/assets/images/templates/tri-fold-self-mailers.tsx +0 -93
- package/src/assets/images/templates/upload-image.svg +0 -10
- package/src/assets/images/templates/x.svg +0 -3
- package/src/assets/images/thumbnails/one.svg +0 -9
- package/src/assets/images/tooltip/tool-arrow.tsx +0 -25
- package/src/components/CreateTemplate/V2/index.tsx +0 -527
- package/src/components/CreateTemplate/V2/styles.scss +0 -372
- package/src/components/CreateTemplate/index.tsx +0 -508
- package/src/components/CreateTemplate/styles.scss +0 -404
- package/src/components/GenericUIBlocks/Button/index.tsx +0 -54
- package/src/components/GenericUIBlocks/Button/styles.scss +0 -43
- package/src/components/GenericUIBlocks/CircularProgress/index.tsx +0 -18
- package/src/components/GenericUIBlocks/CircularProgress/styles.scss +0 -93
- package/src/components/GenericUIBlocks/CustomTooltip/index.tsx +0 -88
- package/src/components/GenericUIBlocks/CustomTooltip/styles.scss +0 -19
- package/src/components/GenericUIBlocks/Dialog/V2/index.tsx +0 -227
- package/src/components/GenericUIBlocks/Dialog/V2/styles.scss +0 -289
- package/src/components/GenericUIBlocks/Dialog/index.tsx +0 -185
- package/src/components/GenericUIBlocks/Dialog/styles.scss +0 -227
- package/src/components/GenericUIBlocks/Divider/index.tsx +0 -12
- package/src/components/GenericUIBlocks/Divider/styles.scss +0 -7
- package/src/components/GenericUIBlocks/GeneralSelect/index.tsx +0 -114
- package/src/components/GenericUIBlocks/GeneralSelect/styles.scss +0 -406
- package/src/components/GenericUIBlocks/GeneralTooltip/index.tsx +0 -25
- package/src/components/GenericUIBlocks/GeneralTooltip/styles.scss +0 -20
- package/src/components/GenericUIBlocks/GenericSnackbar/Toast/index.tsx +0 -91
- package/src/components/GenericUIBlocks/GenericSnackbar/Toast/styles.scss +0 -92
- package/src/components/GenericUIBlocks/Grid/index.tsx +0 -82
- package/src/components/GenericUIBlocks/Input/index.tsx +0 -269
- package/src/components/GenericUIBlocks/Input/styles.scss +0 -332
- package/src/components/GenericUIBlocks/Tabs/index.tsx +0 -71
- package/src/components/GenericUIBlocks/Tabs/styles.scss +0 -42
- package/src/components/GenericUIBlocks/Typography/index.tsx +0 -18
- package/src/components/GenericUIBlocks/Typography/styles.scss +0 -27
- package/src/components/SidePanel/CustomAddOns/index.tsx +0 -342
- package/src/components/SidePanel/CustomAddOns/styles.scss +0 -86
- package/src/components/SidePanel/CustomBlockColors/index.tsx +0 -211
- package/src/components/SidePanel/CustomBlockColors/styles.scss +0 -80
- package/src/components/SidePanel/CustomFields/customFieldSection.tsx +0 -547
- package/src/components/SidePanel/CustomFields/styles.scss +0 -64
- package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/index.tsx +0 -172
- package/src/components/SidePanel/CustomQRCode/V2/QRCodeModal/styles.scss +0 -46
- package/src/components/SidePanel/CustomQRCode/index.tsx +0 -1070
- package/src/components/SidePanel/CustomQRCode/styles.scss +0 -149
- package/src/components/SidePanel/CustomUploads/V2/index.tsx +0 -542
- package/src/components/SidePanel/CustomUploads/V2/styles.scss +0 -267
- package/src/components/SidePanel/CustomUploads/index.tsx +0 -301
- package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/index.tsx +0 -424
- package/src/components/SidePanel/Templates/ModalGallery/HireDesigner/styles.scss +0 -180
- package/src/components/SidePanel/Templates/ModalGallery/V2/index.tsx +0 -235
- package/src/components/SidePanel/Templates/ModalGallery/V2/styles.scss +0 -244
- package/src/components/SidePanel/Templates/ModalGallery/index.tsx +0 -231
- package/src/components/SidePanel/Templates/SideBarGallery/index.tsx +0 -233
- package/src/components/SidePanel/Templates/SideBarGallery/styles.scss +0 -152
- package/src/components/SidePanel/Templates/TemplatesCard/V2/index.tsx +0 -149
- package/src/components/SidePanel/Templates/TemplatesCard/V2/styles.scss +0 -156
- package/src/components/SidePanel/Templates/TemplatesCard/index.tsx +0 -160
- package/src/components/SidePanel/Templates/TemplatesCard/styles.scss +0 -98
- package/src/components/SidePanel/Templates/customTemplateSection.tsx +0 -793
- package/src/components/SidePanel/Templates/styles.scss +0 -244
- package/src/components/SidePanel/index.tsx +0 -160
- package/src/components/TemplateBuilder/index.tsx +0 -585
- package/src/components/TemplateBuilder/styles.scss +0 -100
- package/src/components/TemplateTypes/index.tsx +0 -96
- package/src/components/TemplateTypes/styles.scss +0 -91
- package/src/components/TopNavigation/ConfirmNavigateDialog/index.tsx +0 -81
- package/src/components/TopNavigation/ConfirmNavigateDialog/styles.scss +0 -123
- package/src/components/TopNavigation/DuplicateTemplateModal.tsx +0 -103
- package/src/components/TopNavigation/EditTemplateNameModel/index.tsx +0 -71
- package/src/components/TopNavigation/EditTemplateNameModel/styles.scss +0 -88
- package/src/components/TopNavigation/SaveTemplateModel/index.tsx +0 -201
- package/src/components/TopNavigation/SaveTemplateModel/styles.scss +0 -128
- package/src/components/TopNavigation/index.tsx +0 -938
- package/src/components/TopNavigation/styles.scss +0 -303
- package/src/importMeta.d.ts +0 -31
- package/src/index.scss +0 -131
- package/src/index.tsx +0 -238
- package/src/libs/test.ts +0 -7
- package/src/redux/actions/action-types.ts +0 -52
- package/src/redux/actions/customQRCodeActions.ts +0 -54
- package/src/redux/actions/snackbarActions.ts +0 -16
- package/src/redux/actions/templateActions.ts +0 -236
- package/src/redux/reducers/customFieldReducer.ts +0 -99
- package/src/redux/reducers/customQRCodeReducer.ts +0 -58
- package/src/redux/reducers/index.ts +0 -15
- package/src/redux/reducers/snackbarReducer.ts +0 -40
- package/src/redux/reducers/templateReducer.ts +0 -485
- package/src/redux/store.ts +0 -18
- package/src/styles/colors.scss +0 -61
- package/src/test/mocks.js +0 -89
- package/src/test/setupJest.js +0 -1
- package/src/utils/api.ts +0 -36
- package/src/utils/constants.ts +0 -182
- package/src/utils/customStyles.ts +0 -45
- package/src/utils/fetchWrapper.ts +0 -73
- package/src/utils/fonts.json +0 -1597
- package/src/utils/helper.ts +0 -205
- package/src/utils/local-storage.ts +0 -15
- package/src/utils/message.ts +0 -162
- package/src/utils/products.ts +0 -186
- package/src/utils/template-builder.ts +0 -328
- package/src/utils/templateIdentifierArea/biFold.ts +0 -107
- package/src/utils/templateIdentifierArea/index.ts +0 -35
- package/src/utils/templateIdentifierArea/personal.ts +0 -107
- package/src/utils/templateIdentifierArea/postCards.ts +0 -163
- package/src/utils/templateIdentifierArea/professional.ts +0 -125
- package/src/utils/templateIdentifierArea/snapPack.ts +0 -107
- package/src/utils/templateIdentifierArea/triFold.ts +0 -107
- package/src/utils/templateRestrictedArea/biFold.ts +0 -329
- package/src/utils/templateRestrictedArea/nonWindowProfessional.ts +0 -90
- package/src/utils/templateRestrictedArea/personal.ts +0 -90
- package/src/utils/templateRestrictedArea/postCard.ts +0 -334
- package/src/utils/templateRestrictedArea/postCardJumbo.tsx +0 -408
- package/src/utils/templateRestrictedArea/professional.ts +0 -318
- package/src/utils/templateRestrictedArea/realPenned.ts +0 -233
- package/src/utils/templateRestrictedArea/snapPack.ts +0 -1009
- package/src/utils/templateRestrictedArea/triFold.ts +0 -330
- package/src/utils/templateSafetyBorders/biFold.ts +0 -91
- package/src/utils/templateSafetyBorders/index.ts +0 -43
- package/src/utils/templateSafetyBorders/personal.ts +0 -41
- package/src/utils/templateSafetyBorders/postCards.ts +0 -259
- package/src/utils/templateSafetyBorders/professional.ts +0 -78
- package/src/utils/templateSafetyBorders/snapPack.ts +0 -165
- package/src/utils/templateSafetyBorders/triFold.ts +0 -114
- package/src/utils/templateSafetyBorders/types.d.ts +0 -68
- package/src/utils/types.ts +0 -12
- package/src/v2Theme.scss +0 -142
- package/tsconfig.json +0 -29
- package/tsconfig.node.json +0 -12
- package/update-version.js +0 -23
- package/version.js +0 -1
- package/vite.config.ts +0 -8
- package/webpack.config.js +0 -80
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import React, {ChangeEvent, FC, useState} from 'react';
|
|
2
|
-
|
|
3
|
-
// components
|
|
4
|
-
import Typography from '../Typography';
|
|
5
|
-
import CustomTooltip from '../CustomTooltip';
|
|
6
|
-
import Button from '../Button';
|
|
7
|
-
|
|
8
|
-
// icon
|
|
9
|
-
import Search from '../../../assets/images/input/search';
|
|
10
|
-
import Cancel from '../../../assets/images/input/cancel';
|
|
11
|
-
import VideoInfo from '../../../assets/images/modal-icons/info';
|
|
12
|
-
import ToolCancel from '../../../assets/images/modal-icons/tool-cancel';
|
|
13
|
-
import CancelInput from '../../../assets/images/modal-icons/cancel-input';
|
|
14
|
-
|
|
15
|
-
// styles
|
|
16
|
-
import './styles.scss';
|
|
17
|
-
|
|
18
|
-
const errorStyles = {
|
|
19
|
-
color: 'var(--error-color)',
|
|
20
|
-
fontWeight: '400',
|
|
21
|
-
fontSize: '14px',
|
|
22
|
-
margin: "0"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
interface InputProps {
|
|
26
|
-
variant?: keyof JSX.IntrinsicElements;
|
|
27
|
-
type: any;
|
|
28
|
-
value: string,
|
|
29
|
-
onChange: (
|
|
30
|
-
e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement | any>
|
|
31
|
-
) => void;
|
|
32
|
-
placeholder?: string;
|
|
33
|
-
label?: string;
|
|
34
|
-
error?: string;
|
|
35
|
-
inputIcon?: boolean;
|
|
36
|
-
searchApplied?: boolean;
|
|
37
|
-
onClick?: () => void;
|
|
38
|
-
removeSearchInput?: () => void;
|
|
39
|
-
onKeyDown?: () => void;
|
|
40
|
-
builderInput?: boolean;
|
|
41
|
-
gellerySearch?: boolean;
|
|
42
|
-
videoTooltip?: boolean;
|
|
43
|
-
handleFileRemove?: () => void;
|
|
44
|
-
qrField?: boolean;
|
|
45
|
-
onlyNumber?: boolean;
|
|
46
|
-
currentTheme?: string | null | undefined;
|
|
47
|
-
required?: boolean;
|
|
48
|
-
isClearable?: boolean;
|
|
49
|
-
className?: string;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const Input: FC<InputProps> = ({
|
|
53
|
-
variant = 'input',
|
|
54
|
-
type,
|
|
55
|
-
value,
|
|
56
|
-
onChange,
|
|
57
|
-
placeholder,
|
|
58
|
-
label,
|
|
59
|
-
error,
|
|
60
|
-
inputIcon = false,
|
|
61
|
-
onClick,
|
|
62
|
-
searchApplied,
|
|
63
|
-
removeSearchInput,
|
|
64
|
-
onKeyDown,
|
|
65
|
-
builderInput,
|
|
66
|
-
gellerySearch = false,
|
|
67
|
-
videoTooltip = false,
|
|
68
|
-
handleFileRemove,
|
|
69
|
-
qrField = false,
|
|
70
|
-
onlyNumber = false,
|
|
71
|
-
currentTheme = '',
|
|
72
|
-
required = false,
|
|
73
|
-
isClearable = false,
|
|
74
|
-
className = ''
|
|
75
|
-
}) => {
|
|
76
|
-
const InputVariant = variant || 'input';
|
|
77
|
-
|
|
78
|
-
const [showTooltip, setShowTooltip] = useState<boolean>(false);
|
|
79
|
-
|
|
80
|
-
const loomButtonStyles = {
|
|
81
|
-
backgroundColor: 'var(--primary-color)',
|
|
82
|
-
fontSize: '12px',
|
|
83
|
-
padding: '10px 20px',
|
|
84
|
-
borderRadius: '4px',
|
|
85
|
-
maxHeight: '25px',
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const URLTooltip = (
|
|
89
|
-
<div className="videoUrlTooltip">
|
|
90
|
-
<p>
|
|
91
|
-
You can use Loom to create this video. Create your free Loom account
|
|
92
|
-
now.
|
|
93
|
-
</p>
|
|
94
|
-
<Button
|
|
95
|
-
style={loomButtonStyles}
|
|
96
|
-
onClick={(e) => {
|
|
97
|
-
e.stopPropagation();
|
|
98
|
-
window.open('https://www.loom.com/','_blank');
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
Open Loom
|
|
102
|
-
</Button>
|
|
103
|
-
<ToolCancel onClick={()=>setShowTooltip(false)}/>
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
const handleClose = () => {
|
|
108
|
-
setShowTooltip(false);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
return (
|
|
112
|
-
<>
|
|
113
|
-
{currentTheme === 'v2' ? (
|
|
114
|
-
<div className={`input-layout ${currentTheme === 'v2' && 'new-theme-input-layout'} ${className} ${gellerySearch && 'gallery-input-layout'} ${qrField && 'qr-input-layout'}`}>
|
|
115
|
-
<label className="basic-label" style={{
|
|
116
|
-
marginBottom: label === 'Template Name' ? '4px' : '0',
|
|
117
|
-
}}>
|
|
118
|
-
{label ? <>{label} {required && <span className="required-asterisk">*</span>}</> : ''}
|
|
119
|
-
{videoTooltip && (
|
|
120
|
-
<>
|
|
121
|
-
<span className="urlTooltip"
|
|
122
|
-
onMouseOver={()=>setShowTooltip(true)}
|
|
123
|
-
>
|
|
124
|
-
<VideoInfo />
|
|
125
|
-
</span>
|
|
126
|
-
<CustomTooltip
|
|
127
|
-
children={URLTooltip}
|
|
128
|
-
open={showTooltip}
|
|
129
|
-
handleClose={handleClose}
|
|
130
|
-
place="top"
|
|
131
|
-
/>
|
|
132
|
-
</>
|
|
133
|
-
)}
|
|
134
|
-
</label>
|
|
135
|
-
<div
|
|
136
|
-
className={`input-with-icon ${searchApplied && 'focused'} ${error ? 'errorBorder' : ''} ${gellerySearch && 'galleryInput'} ${qrField && 'qrInputDiv'}`}
|
|
137
|
-
style={{
|
|
138
|
-
paddingRight: isClearable ? '20px' : '16px'
|
|
139
|
-
}}
|
|
140
|
-
>
|
|
141
|
-
{type === 'file' ? (
|
|
142
|
-
<input
|
|
143
|
-
type="file"
|
|
144
|
-
onChange={(e) => onChange(e)}
|
|
145
|
-
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
|
146
|
-
multiple
|
|
147
|
-
className={`basic-input ${builderInput && 'builder-input'}`}
|
|
148
|
-
/>
|
|
149
|
-
) : (
|
|
150
|
-
<InputVariant
|
|
151
|
-
type={type}
|
|
152
|
-
value={value}
|
|
153
|
-
onChange={onChange}
|
|
154
|
-
placeholder={placeholder}
|
|
155
|
-
className={`basic-input ${builderInput && 'builder-input'}`}
|
|
156
|
-
onKeyDown={onlyNumber ? (event) => {
|
|
157
|
-
if (event.key === 'e' || event.key === 'E' || event.key === '-' || event.key === '+') {
|
|
158
|
-
event.preventDefault();
|
|
159
|
-
}
|
|
160
|
-
} : onKeyDown}
|
|
161
|
-
style={{
|
|
162
|
-
fontSize: label === 'Template Name' ? '16px' : 'inherit',
|
|
163
|
-
color: label === 'Template Name' ? '#000000' : 'inherit',
|
|
164
|
-
}}
|
|
165
|
-
/>
|
|
166
|
-
)}
|
|
167
|
-
{inputIcon && (
|
|
168
|
-
<>
|
|
169
|
-
{searchApplied && value?.length > 0 ? (
|
|
170
|
-
<div className="cancel-input-button" onClick={removeSearchInput}>
|
|
171
|
-
<Cancel fill="var(--border-color)" />
|
|
172
|
-
</div>
|
|
173
|
-
) : null}
|
|
174
|
-
<div
|
|
175
|
-
className="search-input-button"
|
|
176
|
-
onClick={value?.length > 0 ? onClick : () => {}}
|
|
177
|
-
>
|
|
178
|
-
<Search fill="var(--primary-color)" />
|
|
179
|
-
</div>
|
|
180
|
-
</>
|
|
181
|
-
)}
|
|
182
|
-
{(isClearable && value?.length > 0) && (
|
|
183
|
-
<div className="clear-search-input" onClick={removeSearchInput}>
|
|
184
|
-
<CancelInput />
|
|
185
|
-
</div>
|
|
186
|
-
)}
|
|
187
|
-
</div>
|
|
188
|
-
{error && (
|
|
189
|
-
<Typography variant="p" style={errorStyles}>
|
|
190
|
-
<sup>*</sup>
|
|
191
|
-
{error}
|
|
192
|
-
</Typography>
|
|
193
|
-
)}
|
|
194
|
-
</div>
|
|
195
|
-
) : (
|
|
196
|
-
<div className={`input-layout ${gellerySearch && 'gallery-input-layout'} ${qrField && 'qr-input-layout'}`}>
|
|
197
|
-
<label className="basic-label">
|
|
198
|
-
{label ? label : ''}
|
|
199
|
-
{videoTooltip && (
|
|
200
|
-
<>
|
|
201
|
-
<span className="urlTooltip"
|
|
202
|
-
onMouseOver={()=>setShowTooltip(true)}
|
|
203
|
-
>
|
|
204
|
-
<VideoInfo />
|
|
205
|
-
</span>
|
|
206
|
-
<CustomTooltip
|
|
207
|
-
children={URLTooltip}
|
|
208
|
-
open={showTooltip}
|
|
209
|
-
handleClose={handleClose}
|
|
210
|
-
place="top"
|
|
211
|
-
/>
|
|
212
|
-
</>
|
|
213
|
-
)}
|
|
214
|
-
</label>
|
|
215
|
-
<div
|
|
216
|
-
className={`input-with-icon ${searchApplied && 'focused'} ${error ? 'errorBorder' : ''} ${gellerySearch && 'galleryInput'} ${qrField && 'qrInputDiv'}`}
|
|
217
|
-
>
|
|
218
|
-
{type === 'file' ? (
|
|
219
|
-
<input
|
|
220
|
-
type="file"
|
|
221
|
-
onChange={(e) => onChange(e)}
|
|
222
|
-
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
|
223
|
-
multiple
|
|
224
|
-
className={`basic-input ${builderInput && 'builder-input'}`}
|
|
225
|
-
/>
|
|
226
|
-
) : (
|
|
227
|
-
<InputVariant
|
|
228
|
-
type={type}
|
|
229
|
-
value={value}
|
|
230
|
-
onChange={onChange}
|
|
231
|
-
placeholder={placeholder}
|
|
232
|
-
className={`basic-input ${builderInput && 'builder-input'}`}
|
|
233
|
-
onKeyDown={onlyNumber ? (event) => {
|
|
234
|
-
if (event.key === 'e' || event.key === 'E' || event.key === '-' || event.key === '+') {
|
|
235
|
-
event.preventDefault();
|
|
236
|
-
}
|
|
237
|
-
} : onKeyDown}
|
|
238
|
-
/>
|
|
239
|
-
)}
|
|
240
|
-
{inputIcon && (
|
|
241
|
-
<>
|
|
242
|
-
{searchApplied && value?.length > 0 ? (
|
|
243
|
-
<div className="cancel-input-button" onClick={removeSearchInput}>
|
|
244
|
-
<Cancel fill="var(--border-color)" />
|
|
245
|
-
</div>
|
|
246
|
-
) : null}
|
|
247
|
-
<div
|
|
248
|
-
className="search-input-button"
|
|
249
|
-
onClick={value?.length > 0 ? onClick : () => {}}
|
|
250
|
-
>
|
|
251
|
-
<Search fill="var(--primary-color)" />
|
|
252
|
-
</div>
|
|
253
|
-
</>
|
|
254
|
-
)}
|
|
255
|
-
</div>
|
|
256
|
-
{error && (
|
|
257
|
-
<Typography variant="p" style={errorStyles}>
|
|
258
|
-
<sup>*</sup>
|
|
259
|
-
{error}
|
|
260
|
-
</Typography>
|
|
261
|
-
)}
|
|
262
|
-
</div>
|
|
263
|
-
)
|
|
264
|
-
}
|
|
265
|
-
</>
|
|
266
|
-
);
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export default Input;
|
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
.input-layout {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: flex-start;
|
|
5
|
-
justify-content: flex-start;
|
|
6
|
-
width: 100%;
|
|
7
|
-
gap: 10px;
|
|
8
|
-
position: relative;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.basic-label {
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
font-weight: 400;
|
|
14
|
-
color: var(--text-color);
|
|
15
|
-
}
|
|
16
|
-
.urlTooltip {
|
|
17
|
-
position: absolute;
|
|
18
|
-
left: 80px;
|
|
19
|
-
top: 1px;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
.input-with-icon {
|
|
25
|
-
display: flex;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
align-items: center;
|
|
28
|
-
border: 0.5px solid var(--border-color);
|
|
29
|
-
border-radius: 7px;
|
|
30
|
-
height: 100%;
|
|
31
|
-
min-height: 55px;
|
|
32
|
-
width: 100%;
|
|
33
|
-
background: #fff;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.basic-input {
|
|
37
|
-
width: 100%;
|
|
38
|
-
padding: 5px 20px;
|
|
39
|
-
background: transparent;
|
|
40
|
-
font-size: 14px;
|
|
41
|
-
font-family: var(--font-family) !important;
|
|
42
|
-
font-weight: 400;
|
|
43
|
-
line-height: 24px;
|
|
44
|
-
color: var(--text-color);
|
|
45
|
-
border: none;
|
|
46
|
-
border-radius: 7px;
|
|
47
|
-
&:focus {
|
|
48
|
-
outline: none;
|
|
49
|
-
}
|
|
50
|
-
&::placeholder {
|
|
51
|
-
opacity: 50%;
|
|
52
|
-
color: var(--text-color);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
.builder-input {
|
|
56
|
-
color: #000;
|
|
57
|
-
&::placeholder {
|
|
58
|
-
color: #000;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.search-input-button {
|
|
64
|
-
position: relative;
|
|
65
|
-
display: flex;
|
|
66
|
-
justify-content: center;
|
|
67
|
-
align-items: center;
|
|
68
|
-
&::before {
|
|
69
|
-
content: '';
|
|
70
|
-
position: absolute;
|
|
71
|
-
background-color: #303030;
|
|
72
|
-
height: 100%;
|
|
73
|
-
width: 1px;
|
|
74
|
-
top: 0;
|
|
75
|
-
right: 40px;
|
|
76
|
-
}
|
|
77
|
-
svg {
|
|
78
|
-
margin-right: 10px;
|
|
79
|
-
cursor: pointer;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
.cancel-input-button {
|
|
85
|
-
display: flex;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
align-items: center;
|
|
88
|
-
svg {
|
|
89
|
-
width: 15px !important;
|
|
90
|
-
margin-right: 10px;
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
&.errorBorder {
|
|
97
|
-
border: 1.5px solid var(--error-color);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
.focused {
|
|
103
|
-
background-color: var(--secondary-color);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
.galleryInput {
|
|
108
|
-
min-height: 40px !important;
|
|
109
|
-
border-radius: 3px !important;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
.file-upload-wrapper {
|
|
114
|
-
display: flex;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
align-items: center;
|
|
117
|
-
border: 0.5px solid var(--border-color);
|
|
118
|
-
border-radius: 8px;
|
|
119
|
-
padding: 20px;
|
|
120
|
-
background-color: #fff;
|
|
121
|
-
width: 100%;
|
|
122
|
-
height: 135px;
|
|
123
|
-
position: relative;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.file-input {
|
|
127
|
-
position: absolute;
|
|
128
|
-
width: 100%;
|
|
129
|
-
height: 100%;
|
|
130
|
-
opacity: 0;
|
|
131
|
-
cursor: pointer;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
.upload-area {
|
|
136
|
-
text-align: center;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
.upload-icon {
|
|
140
|
-
font-size: 32px;
|
|
141
|
-
color: #ff6347; /* Customize color */
|
|
142
|
-
margin-bottom: 10px;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
.upload-text {
|
|
147
|
-
color: #ff6347; /* Customize color */
|
|
148
|
-
font-weight: 400;
|
|
149
|
-
text-decoration: underline;
|
|
150
|
-
cursor: pointer;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
.upload-info {
|
|
155
|
-
margin-top: 10px;
|
|
156
|
-
color: #545454;
|
|
157
|
-
font-size: 12px;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.uploaded-files {
|
|
164
|
-
width: 100%;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
h3 {
|
|
169
|
-
font-size: 14px;
|
|
170
|
-
font-weight: 400;
|
|
171
|
-
color: var(--text-color);
|
|
172
|
-
margin-bottom: 10px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
.file-item {
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
border: 1px solid #ddd;
|
|
180
|
-
border-radius: 8px;
|
|
181
|
-
padding: 10px;
|
|
182
|
-
margin-bottom: 10px;
|
|
183
|
-
background-color: #fff;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.file-icon {
|
|
187
|
-
display: flex;
|
|
188
|
-
align-items: center;
|
|
189
|
-
justify-content: center;
|
|
190
|
-
padding: 5px;
|
|
191
|
-
border-radius: 4px;
|
|
192
|
-
margin-right: 10px;
|
|
193
|
-
width: 50px;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
.file-details {
|
|
198
|
-
flex-grow: 1;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
.file-name {
|
|
202
|
-
font-size: 14px !important;
|
|
203
|
-
margin: 0;
|
|
204
|
-
font-weight: 500;
|
|
205
|
-
color: #303030 !important;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
.file-size {
|
|
210
|
-
font-size: 12px !important;
|
|
211
|
-
color: #b3b3b3 !important;
|
|
212
|
-
font-weight: 300 !important;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
.file-remove {
|
|
218
|
-
display: flex;
|
|
219
|
-
align-items: center;
|
|
220
|
-
cursor: pointer;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
.videoUrlTooltip {
|
|
227
|
-
display: flex;
|
|
228
|
-
justify-content: flex-start;
|
|
229
|
-
align-items: flex-end;
|
|
230
|
-
flex-direction: column;
|
|
231
|
-
width: 100%;
|
|
232
|
-
max-width: 330px;
|
|
233
|
-
p {
|
|
234
|
-
text-align: left;
|
|
235
|
-
font-size: 12px !important;
|
|
236
|
-
font-weight: 400 !important;
|
|
237
|
-
color: #000 !important;
|
|
238
|
-
}
|
|
239
|
-
svg{
|
|
240
|
-
position: absolute;
|
|
241
|
-
width: 14px;
|
|
242
|
-
height: 14px;
|
|
243
|
-
top: 2px;
|
|
244
|
-
right: 3px;
|
|
245
|
-
cursor: pointer;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
.gallery-input-layout {
|
|
251
|
-
min-width: 320px !important;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.qr-input-layout{
|
|
255
|
-
.qrInputDiv{
|
|
256
|
-
min-height: 35px !important;
|
|
257
|
-
border-radius: 3px !important;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// new theme input layout
|
|
262
|
-
.new-theme-input-layout{
|
|
263
|
-
gap: 8px;
|
|
264
|
-
.basic-label {
|
|
265
|
-
font-size: 16px;
|
|
266
|
-
font-weight: 500;
|
|
267
|
-
line-height: 20px;
|
|
268
|
-
color: #111827;
|
|
269
|
-
position: relative;
|
|
270
|
-
|
|
271
|
-
.required-asterisk{
|
|
272
|
-
color: #E10606;
|
|
273
|
-
position: absolute;
|
|
274
|
-
top: -1px;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
.input-with-icon{
|
|
278
|
-
min-height: 44px !important;
|
|
279
|
-
border-radius: 4px !important;
|
|
280
|
-
border: 1px solid #E5E7EB;
|
|
281
|
-
position: relative;
|
|
282
|
-
|
|
283
|
-
.basic-input{
|
|
284
|
-
padding: 5px 16px;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.clear-search-input{
|
|
288
|
-
position: absolute;
|
|
289
|
-
right: 16px;
|
|
290
|
-
top: 50%;
|
|
291
|
-
transform: translateY(-50%);
|
|
292
|
-
cursor: pointer;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.NewDesignSearch{
|
|
298
|
-
margin-top: 32px;
|
|
299
|
-
max-width: 300px;
|
|
300
|
-
|
|
301
|
-
.basic-label{
|
|
302
|
-
font-size: 16px;
|
|
303
|
-
font-weight: 400;
|
|
304
|
-
color: var(--input-label-color);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.input-with-icon{
|
|
308
|
-
min-height: 42px;
|
|
309
|
-
border: 0.5px solid #B0B0B0;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.searchInput-v2{
|
|
314
|
-
width: auto !important;
|
|
315
|
-
min-height: 42px !important;
|
|
316
|
-
flex-direction: row !important;
|
|
317
|
-
min-width: 258px !important;
|
|
318
|
-
|
|
319
|
-
.input-with-icon{
|
|
320
|
-
padding-right: 0 !important;
|
|
321
|
-
border-radius: 7px !important;
|
|
322
|
-
|
|
323
|
-
.basic-input{
|
|
324
|
-
padding: 5px 16px;
|
|
325
|
-
|
|
326
|
-
&::placeholder{
|
|
327
|
-
color: #00000099 !important;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
2
|
-
import './styles.scss';
|
|
3
|
-
|
|
4
|
-
const Tabs = ({ value, onChange, tabs, className, tabClassName, indicatorClassName }: any) => {
|
|
5
|
-
const [indicatorStyle, setIndicatorStyle] = useState({});
|
|
6
|
-
const tabRefs = useRef<Array<HTMLDivElement | null>>([]);
|
|
7
|
-
|
|
8
|
-
const calculateIndicatorPosition = () => {
|
|
9
|
-
const activeIndex = tabs.findIndex((tab: any) => tab.id === value.id);
|
|
10
|
-
|
|
11
|
-
if (tabRefs.current[activeIndex]) {
|
|
12
|
-
const tabWidth = tabRefs.current[activeIndex]?.offsetWidth || 0;
|
|
13
|
-
const tabLeft = tabRefs.current[activeIndex]?.offsetLeft || 0;
|
|
14
|
-
|
|
15
|
-
let indicatorLeft;
|
|
16
|
-
if (window.innerWidth < 768) {
|
|
17
|
-
const indicatorWidth = tabWidth * 0.5;
|
|
18
|
-
indicatorLeft = tabLeft + (tabWidth - indicatorWidth) / 2;
|
|
19
|
-
setIndicatorStyle({
|
|
20
|
-
width: `${indicatorWidth}px`,
|
|
21
|
-
left: `${indicatorLeft}px`,
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
const indicatorWidth = 50;
|
|
25
|
-
indicatorLeft = tabLeft + tabWidth / 2 - indicatorWidth / 2;
|
|
26
|
-
setIndicatorStyle({
|
|
27
|
-
width: `${indicatorWidth}px`,
|
|
28
|
-
left: `${indicatorLeft}px`,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
useLayoutEffect(() => {
|
|
35
|
-
calculateIndicatorPosition();
|
|
36
|
-
window.addEventListener('resize', calculateIndicatorPosition);
|
|
37
|
-
|
|
38
|
-
return () => {
|
|
39
|
-
window.removeEventListener('resize', calculateIndicatorPosition);
|
|
40
|
-
};
|
|
41
|
-
}, [value, tabs.length]);
|
|
42
|
-
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
if (tabs.length > 0 && !value.id) {
|
|
45
|
-
onChange(tabs[0]);
|
|
46
|
-
}
|
|
47
|
-
}, [tabs, value, onChange]);
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<div className={`tabsWrapper ${className}`}>
|
|
51
|
-
<div className="tabsContainer">
|
|
52
|
-
{tabs.map((tab:any, index:any) => (
|
|
53
|
-
<div
|
|
54
|
-
key={index}
|
|
55
|
-
ref={(el) => (tabRefs.current[index] = el)}
|
|
56
|
-
className={`tab ${tabClassName} ${value.id === tab.id ? 'activeTab' : ''}`}
|
|
57
|
-
onClick={() => onChange(tab)}
|
|
58
|
-
>
|
|
59
|
-
{tab.label}
|
|
60
|
-
</div>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
<div
|
|
64
|
-
className={`tabsIndicator ${indicatorClassName}`}
|
|
65
|
-
style={indicatorStyle}
|
|
66
|
-
/>
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export default Tabs;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
.tabsWrapper {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
align-items: center;
|
|
6
|
-
width: 100%;
|
|
7
|
-
transition: left 0.3s ease-in-out;
|
|
8
|
-
|
|
9
|
-
.tabsContainer {
|
|
10
|
-
display: flex;
|
|
11
|
-
gap: 55px;
|
|
12
|
-
width: 100%;
|
|
13
|
-
|
|
14
|
-
.tab {
|
|
15
|
-
padding: 10px 0;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
text-align: center;
|
|
18
|
-
font-size: 18px;
|
|
19
|
-
flex: 1;
|
|
20
|
-
width: 100%;
|
|
21
|
-
min-width: fit-content;
|
|
22
|
-
transition: left 0.3s ease-in-out;
|
|
23
|
-
|
|
24
|
-
@media (width <= 768px){
|
|
25
|
-
font-size: 15px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.activeTab {
|
|
29
|
-
font-weight: bold;
|
|
30
|
-
color: var(--primary-color);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.tabsIndicator {
|
|
36
|
-
position: absolute;
|
|
37
|
-
bottom: 3px;
|
|
38
|
-
height: 1.5px;
|
|
39
|
-
background-color: var(--primary-color);
|
|
40
|
-
transition: left 0.3s ease-in-out;
|
|
41
|
-
}
|
|
42
|
-
}
|