| 1 |
// function to generate Background control's attributes |
| 2 |
export const generateBackgroundAttributes = (controlName, defaults = {}) => { |
| 3 |
const { |
| 4 |
isBgDefaultGradient, |
| 5 |
defaultFillColor, |
| 6 |
defaultBgGradient = "linear-gradient(45deg,#00000000,#00000000)", |
| 7 |
defaultHovBgGradient, |
| 8 |
noOverlay = false, |
| 9 |
noMainBgi = false, |
| 10 |
noOverlayBgi = false, |
| 11 |
noTransition = false, |
| 12 |
forButton = false, |
| 13 |
} = defaults; |
| 14 |
|
| 15 |
const bgColorAttr = defaultFillColor |
| 16 |
? { |
| 17 |
[`${controlName}backgroundColor`]: { |
| 18 |
type: "string", |
| 19 |
default: defaultFillColor, |
| 20 |
}, |
| 21 |
} |
| 22 |
: { |
| 23 |
[`${controlName}backgroundColor`]: { |
| 24 |
type: "string", |
| 25 |
}, |
| 26 |
}; |
| 27 |
|
| 28 |
const transitionAttr = noTransition |
| 29 |
? {} |
| 30 |
: { |
| 31 |
[`${controlName}bg_transition`]: { |
| 32 |
type: "number", |
| 33 |
default: 0.5, |
| 34 |
}, |
| 35 |
}; |
| 36 |
|
| 37 |
const ovlTransitionAttr = noTransition |
| 38 |
? {} |
| 39 |
: { |
| 40 |
[`${controlName}ovl_bg_transition`]: { |
| 41 |
type: "number", |
| 42 |
default: 0.5, |
| 43 |
}, |
| 44 |
[`${controlName}ovl_filtersTransition`]: { |
| 45 |
type: "number", |
| 46 |
default: 0.5, |
| 47 |
}, |
| 48 |
[`${controlName}ovl_opacityTransition`]: { |
| 49 |
type: "number", |
| 50 |
default: 0.5, |
| 51 |
}, |
| 52 |
}; |
| 53 |
|
| 54 |
const hovBgGradientAttr = defaultHovBgGradient |
| 55 |
? { |
| 56 |
[`hov_${controlName}gradientColor`]: { |
| 57 |
type: "string", |
| 58 |
default: defaultHovBgGradient, |
| 59 |
}, |
| 60 |
} |
| 61 |
: { |
| 62 |
[`hov_${controlName}gradientColor`]: { |
| 63 |
type: "string", |
| 64 |
}, |
| 65 |
}; |
| 66 |
|
| 67 |
const mainWithoutBgiAttrs = { |
| 68 |
[`${controlName}bg_hoverType`]: { |
| 69 |
type: "string", |
| 70 |
default: "normal", |
| 71 |
}, |
| 72 |
...transitionAttr, |
| 73 |
|
| 74 |
// attributes for main background (not overlay) -> hover type 'normal' start ⬇ |
| 75 |
[`${controlName}backgroundType`]: { |
| 76 |
type: "string", |
| 77 |
default: isBgDefaultGradient === true ? "gradient" : "classic", |
| 78 |
}, |
| 79 |
...bgColorAttr, |
| 80 |
[`${controlName}gradientColor`]: { |
| 81 |
type: "string", |
| 82 |
default: defaultBgGradient, |
| 83 |
}, |
| 84 |
// attributes for main background (not overlay) -> hover type 'normal' end |
| 85 |
|
| 86 |
// attributes for main background (not overlay) -> hover type 'hover' start ⬇ |
| 87 |
[`hov_${controlName}backgroundType`]: { |
| 88 |
type: "string", |
| 89 |
default: "classic", |
| 90 |
}, |
| 91 |
[`hov_${controlName}backgroundColor`]: { |
| 92 |
type: "string", |
| 93 |
}, |
| 94 |
...hovBgGradientAttr, |
| 95 |
// attributes for main background (not overlay) -> hover type 'hover' end |
| 96 |
}; |
| 97 |
|
| 98 |
const mainBgiAttrs = { |
| 99 |
// attributes for main background (not overlay) -> hover type 'normal' start ⬇ |
| 100 |
// desktop attributes start ⬇ |
| 101 |
[`${controlName}bgImageURL`]: { |
| 102 |
type: "string", |
| 103 |
}, |
| 104 |
[`${controlName}bgImageID`]: { |
| 105 |
type: "string", |
| 106 |
}, |
| 107 |
[`${controlName}bgImgAttachment`]: { |
| 108 |
type: "string", |
| 109 |
}, |
| 110 |
|
| 111 |
[`${controlName}backgroundSize`]: { |
| 112 |
type: "string", |
| 113 |
}, |
| 114 |
[`${controlName}bgImgCustomSize`]: { |
| 115 |
type: "number", |
| 116 |
default: 100, |
| 117 |
}, |
| 118 |
[`${controlName}bgImgCustomSizeUnit`]: { |
| 119 |
type: "string", |
| 120 |
default: "%", |
| 121 |
}, |
| 122 |
[`${controlName}bgImgPos`]: { |
| 123 |
type: "string", |
| 124 |
}, |
| 125 |
[`${controlName}bgImgcustomPosX`]: { |
| 126 |
type: "number", |
| 127 |
default: 0, |
| 128 |
}, |
| 129 |
[`${controlName}bgImgcustomPosXUnit`]: { |
| 130 |
type: "string", |
| 131 |
default: "px", |
| 132 |
}, |
| 133 |
[`${controlName}bgImgcustomPosY`]: { |
| 134 |
type: "number", |
| 135 |
default: 0, |
| 136 |
}, |
| 137 |
[`${controlName}bgImgcustomPosYUnit`]: { |
| 138 |
type: "string", |
| 139 |
default: "px", |
| 140 |
}, |
| 141 |
[`${controlName}bgImgRepeat`]: { |
| 142 |
type: "string", |
| 143 |
}, |
| 144 |
// desktop attributes end |
| 145 |
|
| 146 |
// Tab attributes start ⬇ |
| 147 |
[`TAB${controlName}backgroundSize`]: { |
| 148 |
type: "string", |
| 149 |
}, |
| 150 |
[`TAB${controlName}bgImgCustomSize`]: { |
| 151 |
type: "number", |
| 152 |
default: 100, |
| 153 |
}, |
| 154 |
[`TAB${controlName}bgImgCustomSizeUnit`]: { |
| 155 |
type: "string", |
| 156 |
default: "%", |
| 157 |
}, |
| 158 |
[`TAB${controlName}bgImgPos`]: { |
| 159 |
type: "string", |
| 160 |
}, |
| 161 |
[`TAB${controlName}bgImgcustomPosX`]: { |
| 162 |
type: "number", |
| 163 |
default: 0, |
| 164 |
}, |
| 165 |
[`TAB${controlName}bgImgcustomPosXUnit`]: { |
| 166 |
type: "string", |
| 167 |
default: "px", |
| 168 |
}, |
| 169 |
[`TAB${controlName}bgImgcustomPosY`]: { |
| 170 |
type: "number", |
| 171 |
default: 0, |
| 172 |
}, |
| 173 |
[`TAB${controlName}bgImgcustomPosYUnit`]: { |
| 174 |
type: "string", |
| 175 |
default: "px", |
| 176 |
}, |
| 177 |
[`TAB${controlName}bgImgRepeat`]: { |
| 178 |
type: "string", |
| 179 |
}, |
| 180 |
// Tab attributes end |
| 181 |
|
| 182 |
// Mobile attributes start ⬇ |
| 183 |
[`MOB${controlName}backgroundSize`]: { |
| 184 |
type: "string", |
| 185 |
}, |
| 186 |
[`MOB${controlName}bgImgCustomSize`]: { |
| 187 |
type: "number", |
| 188 |
default: 100, |
| 189 |
}, |
| 190 |
[`MOB${controlName}bgImgCustomSizeUnit`]: { |
| 191 |
type: "string", |
| 192 |
default: "%", |
| 193 |
}, |
| 194 |
[`MOB${controlName}bgImgPos`]: { |
| 195 |
type: "string", |
| 196 |
}, |
| 197 |
[`MOB${controlName}bgImgcustomPosX`]: { |
| 198 |
type: "number", |
| 199 |
default: 0, |
| 200 |
}, |
| 201 |
[`MOB${controlName}bgImgcustomPosXUnit`]: { |
| 202 |
type: "string", |
| 203 |
default: "px", |
| 204 |
}, |
| 205 |
[`MOB${controlName}bgImgcustomPosY`]: { |
| 206 |
type: "number", |
| 207 |
default: 0, |
| 208 |
}, |
| 209 |
[`MOB${controlName}bgImgcustomPosYUnit`]: { |
| 210 |
type: "string", |
| 211 |
default: "px", |
| 212 |
}, |
| 213 |
[`MOB${controlName}bgImgRepeat`]: { |
| 214 |
type: "string", |
| 215 |
}, |
| 216 |
// Mobile attributes end |
| 217 |
// attributes for main background (not overlay) -> hover type 'normal' end |
| 218 |
|
| 219 |
// attributes for main background (not overlay) -> hover type 'hover' start ⬇ |
| 220 |
// desktop attributes start |
| 221 |
[`hov_${controlName}bgImageURL`]: { |
| 222 |
type: "string", |
| 223 |
}, |
| 224 |
[`hov_${controlName}bgImageID`]: { |
| 225 |
type: "string", |
| 226 |
}, |
| 227 |
[`hov_${controlName}bgImgAttachment`]: { |
| 228 |
type: "string", |
| 229 |
}, |
| 230 |
[`hov_${controlName}backgroundSize`]: { |
| 231 |
type: "string", |
| 232 |
}, |
| 233 |
[`hov_${controlName}bgImgCustomSize`]: { |
| 234 |
type: "number", |
| 235 |
default: 100, |
| 236 |
}, |
| 237 |
[`hov_${controlName}bgImgCustomSizeUnit`]: { |
| 238 |
type: "string", |
| 239 |
default: "%", |
| 240 |
}, |
| 241 |
[`hov_${controlName}bgImgPos`]: { |
| 242 |
type: "string", |
| 243 |
}, |
| 244 |
[`hov_${controlName}bgImgcustomPosX`]: { |
| 245 |
type: "number", |
| 246 |
default: 0, |
| 247 |
}, |
| 248 |
[`hov_${controlName}bgImgcustomPosXUnit`]: { |
| 249 |
type: "string", |
| 250 |
default: "px", |
| 251 |
}, |
| 252 |
[`hov_${controlName}bgImgcustomPosY`]: { |
| 253 |
type: "number", |
| 254 |
default: 0, |
| 255 |
}, |
| 256 |
[`hov_${controlName}bgImgcustomPosYUnit`]: { |
| 257 |
type: "string", |
| 258 |
default: "px", |
| 259 |
}, |
| 260 |
[`hov_${controlName}bgImgRepeat`]: { |
| 261 |
type: "string", |
| 262 |
}, |
| 263 |
// desktop attributes end |
| 264 |
|
| 265 |
// Tab attributes start |
| 266 |
[`hov_TAB${controlName}backgroundSize`]: { |
| 267 |
type: "string", |
| 268 |
}, |
| 269 |
[`hov_TAB${controlName}bgImgCustomSize`]: { |
| 270 |
type: "number", |
| 271 |
}, |
| 272 |
[`hov_TAB${controlName}bgImgCustomSizeUnit`]: { |
| 273 |
type: "string", |
| 274 |
default: "%", |
| 275 |
}, |
| 276 |
[`hov_TAB${controlName}bgImgPos`]: { |
| 277 |
type: "string", |
| 278 |
}, |
| 279 |
[`hov_TAB${controlName}bgImgcustomPosX`]: { |
| 280 |
type: "number", |
| 281 |
}, |
| 282 |
[`hov_TAB${controlName}bgImgcustomPosXUnit`]: { |
| 283 |
type: "string", |
| 284 |
default: "px", |
| 285 |
}, |
| 286 |
[`hov_TAB${controlName}bgImgcustomPosY`]: { |
| 287 |
type: "number", |
| 288 |
}, |
| 289 |
[`hov_TAB${controlName}bgImgcustomPosYUnit`]: { |
| 290 |
type: "string", |
| 291 |
default: "px", |
| 292 |
}, |
| 293 |
[`hov_TAB${controlName}bgImgRepeat`]: { |
| 294 |
type: "string", |
| 295 |
}, |
| 296 |
// Tab attributes end |
| 297 |
|
| 298 |
// Mobile attributes start |
| 299 |
[`hov_MOB${controlName}backgroundSize`]: { |
| 300 |
type: "string", |
| 301 |
}, |
| 302 |
[`hov_MOB${controlName}bgImgCustomSize`]: { |
| 303 |
type: "number", |
| 304 |
}, |
| 305 |
[`hov_MOB${controlName}bgImgCustomSizeUnit`]: { |
| 306 |
type: "string", |
| 307 |
default: "%", |
| 308 |
}, |
| 309 |
[`hov_MOB${controlName}bgImgPos`]: { |
| 310 |
type: "string", |
| 311 |
}, |
| 312 |
[`hov_MOB${controlName}bgImgcustomPosX`]: { |
| 313 |
type: "number", |
| 314 |
}, |
| 315 |
[`hov_MOB${controlName}bgImgcustomPosXUnit`]: { |
| 316 |
type: "string", |
| 317 |
default: "px", |
| 318 |
}, |
| 319 |
[`hov_MOB${controlName}bgImgcustomPosY`]: { |
| 320 |
type: "number", |
| 321 |
}, |
| 322 |
[`hov_MOB${controlName}bgImgcustomPosYUnit`]: { |
| 323 |
type: "string", |
| 324 |
default: "px", |
| 325 |
}, |
| 326 |
[`hov_MOB${controlName}bgImgRepeat`]: { |
| 327 |
type: "string", |
| 328 |
}, |
| 329 |
// Mobile attributes end |
| 330 |
// attributes for main background (not overlay) -> hover type 'hover' start ⬇ |
| 331 |
}; |
| 332 |
|
| 333 |
const ovlWithoutBgiAttrs = { |
| 334 |
// attributes for background overlay -> hover type 'normal' start ⬇ |
| 335 |
[`${controlName}isBgOverlay`]: { |
| 336 |
type: "boolean", |
| 337 |
default: false, |
| 338 |
}, |
| 339 |
...ovlTransitionAttr, |
| 340 |
|
| 341 |
[`${controlName}ovl_hoverType`]: { |
| 342 |
type: "string", |
| 343 |
default: "normal", |
| 344 |
}, |
| 345 |
|
| 346 |
[`${controlName}overlayType`]: { |
| 347 |
type: "string", |
| 348 |
default: "classic", |
| 349 |
}, |
| 350 |
[`${controlName}overlayColor`]: { |
| 351 |
type: "string", |
| 352 |
}, |
| 353 |
[`${controlName}overlayGradient`]: { |
| 354 |
type: "string", |
| 355 |
default: "linear-gradient(45deg,#000000cc,#00000099)", |
| 356 |
}, |
| 357 |
|
| 358 |
[`${controlName}ovl_opacity`]: { |
| 359 |
type: "number", |
| 360 |
default: 0.5, |
| 361 |
}, |
| 362 |
[`${controlName}ovl_blendMode`]: { |
| 363 |
type: "string", |
| 364 |
}, |
| 365 |
[`${controlName}ovl_allowFilters`]: { |
| 366 |
type: "boolean", |
| 367 |
default: false, |
| 368 |
}, |
| 369 |
[`${controlName}ovl_fltrBrightness`]: { |
| 370 |
type: "number", |
| 371 |
default: 100, |
| 372 |
}, |
| 373 |
[`${controlName}ovl_fltrContrast`]: { |
| 374 |
type: "number", |
| 375 |
default: 100, |
| 376 |
}, |
| 377 |
[`${controlName}ovl_fltrSaturation`]: { |
| 378 |
type: "number", |
| 379 |
default: 100, |
| 380 |
}, |
| 381 |
[`${controlName}ovl_fltrBlur`]: { |
| 382 |
type: "number", |
| 383 |
default: 0, |
| 384 |
}, |
| 385 |
[`${controlName}ovl_fltrHue`]: { |
| 386 |
type: "number", |
| 387 |
default: 0, |
| 388 |
}, |
| 389 |
// attributes for background overlay -> hover type 'normal' end |
| 390 |
|
| 391 |
// attributes for background overlay -> hover type 'hover' start ⬇ |
| 392 |
[`hov_${controlName}overlayType`]: { |
| 393 |
type: "string", |
| 394 |
default: "classic", |
| 395 |
}, |
| 396 |
[`hov_${controlName}overlayColor`]: { |
| 397 |
type: "string", |
| 398 |
}, |
| 399 |
[`hov_${controlName}overlayGradient`]: { |
| 400 |
type: "string", |
| 401 |
}, |
| 402 |
[`hov_${controlName}ovl_bgImageURL`]: { |
| 403 |
type: "string", |
| 404 |
}, |
| 405 |
[`hov_${controlName}ovl_bgImageID`]: { |
| 406 |
type: "string", |
| 407 |
}, |
| 408 |
[`hov_${controlName}ovl_bgImgAttachment`]: { |
| 409 |
type: "string", |
| 410 |
}, |
| 411 |
[`hov_${controlName}ovl_opacity`]: { |
| 412 |
type: "number", |
| 413 |
}, |
| 414 |
[`hov_${controlName}ovl_blendMode`]: { |
| 415 |
type: "string", |
| 416 |
}, |
| 417 |
[`hov_${controlName}ovl_allowFilters`]: { |
| 418 |
type: "boolean", |
| 419 |
default: false, |
| 420 |
}, |
| 421 |
[`hov_${controlName}ovl_fltrBrightness`]: { |
| 422 |
type: "number", |
| 423 |
}, |
| 424 |
[`hov_${controlName}ovl_fltrContrast`]: { |
| 425 |
type: "number", |
| 426 |
}, |
| 427 |
[`hov_${controlName}ovl_fltrSaturation`]: { |
| 428 |
type: "number", |
| 429 |
}, |
| 430 |
[`hov_${controlName}ovl_fltrBlur`]: { |
| 431 |
type: "number", |
| 432 |
}, |
| 433 |
[`hov_${controlName}ovl_fltrHue`]: { |
| 434 |
type: "number", |
| 435 |
}, |
| 436 |
// attributes for background overlay -> hover type 'hover' end |
| 437 |
}; |
| 438 |
|
| 439 |
const ovlBgiAttrs = { |
| 440 |
// attributes for background overlay -> hover type 'normal' start ⬇ |
| 441 |
// desktop attributes start ⬇ |
| 442 |
[`${controlName}ovl_bgImageURL`]: { |
| 443 |
type: "string", |
| 444 |
}, |
| 445 |
[`${controlName}ovl_bgImageID`]: { |
| 446 |
type: "string", |
| 447 |
}, |
| 448 |
[`${controlName}ovl_bgImgAttachment`]: { |
| 449 |
type: "string", |
| 450 |
}, |
| 451 |
[`${controlName}ovl_backgroundSize`]: { |
| 452 |
type: "string", |
| 453 |
}, |
| 454 |
[`${controlName}ovl_bgImgCustomSize`]: { |
| 455 |
type: "number", |
| 456 |
default: 100, |
| 457 |
}, |
| 458 |
[`${controlName}ovl_bgImgCustomSizeUnit`]: { |
| 459 |
type: "string", |
| 460 |
default: "%", |
| 461 |
}, |
| 462 |
[`${controlName}ovl_bgImgPos`]: { |
| 463 |
type: "string", |
| 464 |
}, |
| 465 |
[`${controlName}ovl_bgImgcustomPosX`]: { |
| 466 |
type: "number", |
| 467 |
default: 0, |
| 468 |
}, |
| 469 |
[`${controlName}ovl_bgImgcustomPosXUnit`]: { |
| 470 |
type: "string", |
| 471 |
default: "px", |
| 472 |
}, |
| 473 |
[`${controlName}ovl_bgImgcustomPosY`]: { |
| 474 |
type: "number", |
| 475 |
default: 0, |
| 476 |
}, |
| 477 |
[`${controlName}ovl_bgImgcustomPosYUnit`]: { |
| 478 |
type: "string", |
| 479 |
default: "px", |
| 480 |
}, |
| 481 |
[`${controlName}ovl_bgImgRepeat`]: { |
| 482 |
type: "string", |
| 483 |
}, |
| 484 |
// desktop attributes end |
| 485 |
|
| 486 |
// Tab attributes start ⬇ |
| 487 |
[`TAB${controlName}ovl_backgroundSize`]: { |
| 488 |
type: "string", |
| 489 |
}, |
| 490 |
[`TAB${controlName}ovl_bgImgCustomSize`]: { |
| 491 |
type: "number", |
| 492 |
default: 100, |
| 493 |
}, |
| 494 |
[`TAB${controlName}ovl_bgImgCustomSizeUnit`]: { |
| 495 |
type: "string", |
| 496 |
default: "%", |
| 497 |
}, |
| 498 |
[`TAB${controlName}ovl_bgImgPos`]: { |
| 499 |
type: "string", |
| 500 |
}, |
| 501 |
[`TAB${controlName}ovl_bgImgcustomPosX`]: { |
| 502 |
type: "number", |
| 503 |
default: 0, |
| 504 |
}, |
| 505 |
[`TAB${controlName}ovl_bgImgcustomPosXUnit`]: { |
| 506 |
type: "string", |
| 507 |
default: "px", |
| 508 |
}, |
| 509 |
[`TAB${controlName}ovl_bgImgcustomPosY`]: { |
| 510 |
type: "number", |
| 511 |
default: 0, |
| 512 |
}, |
| 513 |
[`TAB${controlName}ovl_bgImgcustomPosYUnit`]: { |
| 514 |
type: "string", |
| 515 |
default: "px", |
| 516 |
}, |
| 517 |
[`TAB${controlName}ovl_bgImgRepeat`]: { |
| 518 |
type: "string", |
| 519 |
}, |
| 520 |
// Tab attributes end |
| 521 |
|
| 522 |
// Mob attributes start ⬇ |
| 523 |
[`MOB${controlName}ovl_backgroundSize`]: { |
| 524 |
type: "string", |
| 525 |
}, |
| 526 |
[`MOB${controlName}ovl_bgImgCustomSize`]: { |
| 527 |
type: "number", |
| 528 |
default: 100, |
| 529 |
}, |
| 530 |
[`MOB${controlName}ovl_bgImgCustomSizeUnit`]: { |
| 531 |
type: "string", |
| 532 |
default: "%", |
| 533 |
}, |
| 534 |
[`MOB${controlName}ovl_bgImgPos`]: { |
| 535 |
type: "string", |
| 536 |
}, |
| 537 |
[`MOB${controlName}ovl_bgImgcustomPosX`]: { |
| 538 |
type: "number", |
| 539 |
default: 0, |
| 540 |
}, |
| 541 |
[`MOB${controlName}ovl_bgImgcustomPosXUnit`]: { |
| 542 |
type: "string", |
| 543 |
default: "px", |
| 544 |
}, |
| 545 |
[`MOB${controlName}ovl_bgImgcustomPosY`]: { |
| 546 |
type: "number", |
| 547 |
default: 0, |
| 548 |
}, |
| 549 |
[`MOB${controlName}ovl_bgImgcustomPosYUnit`]: { |
| 550 |
type: "string", |
| 551 |
default: "px", |
| 552 |
}, |
| 553 |
[`MOB${controlName}ovl_bgImgRepeat`]: { |
| 554 |
type: "string", |
| 555 |
}, |
| 556 |
// Mob attributes end |
| 557 |
// attributes for background overlay -> hover type 'normal' end |
| 558 |
|
| 559 |
// attributes for background overlay -> hover type 'hover' start ⬇ |
| 560 |
// desktop attributes start ⬇ |
| 561 |
[`hov_${controlName}ovl_backgroundSize`]: { |
| 562 |
type: "string", |
| 563 |
}, |
| 564 |
[`hov_${controlName}ovl_bgImgCustomSize`]: { |
| 565 |
type: "number", |
| 566 |
default: 100, |
| 567 |
}, |
| 568 |
[`hov_${controlName}ovl_bgImgCustomSizeUnit`]: { |
| 569 |
type: "string", |
| 570 |
default: "%", |
| 571 |
}, |
| 572 |
[`hov_${controlName}ovl_bgImgPos`]: { |
| 573 |
type: "string", |
| 574 |
}, |
| 575 |
[`hov_${controlName}ovl_bgImgcustomPosX`]: { |
| 576 |
type: "number", |
| 577 |
default: 0, |
| 578 |
}, |
| 579 |
[`hov_${controlName}ovl_bgImgcustomPosXUnit`]: { |
| 580 |
type: "string", |
| 581 |
default: "px", |
| 582 |
}, |
| 583 |
[`hov_${controlName}ovl_bgImgcustomPosY`]: { |
| 584 |
type: "number", |
| 585 |
default: 0, |
| 586 |
}, |
| 587 |
[`hov_${controlName}ovl_bgImgcustomPosYUnit`]: { |
| 588 |
type: "string", |
| 589 |
default: "px", |
| 590 |
}, |
| 591 |
[`hov_${controlName}ovl_bgImgRepeat`]: { |
| 592 |
type: "string", |
| 593 |
}, |
| 594 |
// desktop attributes end |
| 595 |
|
| 596 |
// Tab attributes start ⬇ |
| 597 |
[`hov_TAB${controlName}ovl_backgroundSize`]: { |
| 598 |
type: "string", |
| 599 |
}, |
| 600 |
[`hov_TAB${controlName}ovl_bgImgCustomSize`]: { |
| 601 |
type: "number", |
| 602 |
}, |
| 603 |
[`hov_TAB${controlName}ovl_bgImgCustomSizeUnit`]: { |
| 604 |
type: "string", |
| 605 |
default: "%", |
| 606 |
}, |
| 607 |
[`hov_TAB${controlName}ovl_bgImgPos`]: { |
| 608 |
type: "string", |
| 609 |
}, |
| 610 |
[`hov_TAB${controlName}ovl_bgImgcustomPosX`]: { |
| 611 |
type: "number", |
| 612 |
}, |
| 613 |
[`hov_TAB${controlName}ovl_bgImgcustomPosXUnit`]: { |
| 614 |
type: "string", |
| 615 |
default: "px", |
| 616 |
}, |
| 617 |
[`hov_TAB${controlName}ovl_bgImgcustomPosY`]: { |
| 618 |
type: "number", |
| 619 |
}, |
| 620 |
[`hov_TAB${controlName}ovl_bgImgcustomPosYUnit`]: { |
| 621 |
type: "string", |
| 622 |
default: "px", |
| 623 |
}, |
| 624 |
[`hov_TAB${controlName}ovl_bgImgRepeat`]: { |
| 625 |
type: "string", |
| 626 |
}, |
| 627 |
// Tab attributes end |
| 628 |
|
| 629 |
// Mob attributes start ⬇ |
| 630 |
[`hov_MOB${controlName}ovl_backgroundSize`]: { |
| 631 |
type: "string", |
| 632 |
}, |
| 633 |
[`hov_MOB${controlName}ovl_bgImgCustomSize`]: { |
| 634 |
type: "number", |
| 635 |
}, |
| 636 |
[`hov_MOB${controlName}ovl_bgImgCustomSizeUnit`]: { |
| 637 |
type: "string", |
| 638 |
default: "%", |
| 639 |
}, |
| 640 |
[`hov_MOB${controlName}ovl_bgImgPos`]: { |
| 641 |
type: "string", |
| 642 |
}, |
| 643 |
[`hov_MOB${controlName}ovl_bgImgcustomPosX`]: { |
| 644 |
type: "number", |
| 645 |
}, |
| 646 |
[`hov_MOB${controlName}ovl_bgImgcustomPosXUnit`]: { |
| 647 |
type: "string", |
| 648 |
default: "px", |
| 649 |
}, |
| 650 |
[`hov_MOB${controlName}ovl_bgImgcustomPosY`]: { |
| 651 |
type: "number", |
| 652 |
}, |
| 653 |
[`hov_MOB${controlName}ovl_bgImgcustomPosYUnit`]: { |
| 654 |
type: "string", |
| 655 |
default: "px", |
| 656 |
}, |
| 657 |
[`hov_MOB${controlName}ovl_bgImgRepeat`]: { |
| 658 |
type: "string", |
| 659 |
}, |
| 660 |
// Mob attributes end |
| 661 |
// attributes for background overlay -> hover type 'hover' end |
| 662 |
}; |
| 663 |
|
| 664 |
let result = {}; |
| 665 |
|
| 666 |
if (forButton === true) { |
| 667 |
result = { |
| 668 |
...mainWithoutBgiAttrs, |
| 669 |
}; |
| 670 |
} else { |
| 671 |
result = |
| 672 |
noOverlay === true |
| 673 |
? noMainBgi === true |
| 674 |
? { |
| 675 |
...mainWithoutBgiAttrs, |
| 676 |
} |
| 677 |
: { |
| 678 |
...mainWithoutBgiAttrs, |
| 679 |
...mainBgiAttrs, |
| 680 |
} |
| 681 |
: noOverlayBgi === true && noMainBgi === true |
| 682 |
? { |
| 683 |
...mainWithoutBgiAttrs, |
| 684 |
...ovlWithoutBgiAttrs, |
| 685 |
} |
| 686 |
: noOverlayBgi === true && noMainBgi === false |
| 687 |
? { |
| 688 |
...mainWithoutBgiAttrs, |
| 689 |
...mainBgiAttrs, |
| 690 |
...ovlWithoutBgiAttrs, |
| 691 |
} |
| 692 |
: noOverlayBgi === false && noMainBgi === true |
| 693 |
? { |
| 694 |
...mainWithoutBgiAttrs, |
| 695 |
...ovlWithoutBgiAttrs, |
| 696 |
...ovlBgiAttrs, |
| 697 |
} |
| 698 |
: { |
| 699 |
...mainWithoutBgiAttrs, |
| 700 |
...mainBgiAttrs, |
| 701 |
...ovlWithoutBgiAttrs, |
| 702 |
...ovlBgiAttrs, |
| 703 |
}; |
| 704 |
} |
| 705 |
|
| 706 |
return result; |
| 707 |
}; |
| 708 |
|
| 709 |
// function to generate Background control styles based on the unique controlName(prefix) |
| 710 |
export const generateBackgroundControlStyles = ({ |
| 711 |
controlName, |
| 712 |
attributes, |
| 713 |
noOverlay = false, |
| 714 |
noMainBgi = false, |
| 715 |
noOverlayBgi = false, |
| 716 |
noTransition = false, |
| 717 |
forButton = false, |
| 718 |
}) => { |
| 719 |
let BGnoOverlay = noOverlay; |
| 720 |
let BGnoMainBgi = noMainBgi; |
| 721 |
let BGnoOverlayBgi = noOverlayBgi; |
| 722 |
|
| 723 |
if (forButton === true) { |
| 724 |
BGnoOverlay = true; |
| 725 |
BGnoMainBgi = true; |
| 726 |
BGnoOverlayBgi = true; |
| 727 |
} |
| 728 |
|
| 729 |
const { |
| 730 |
// background attributes starts ⬇ |
| 731 |
// [`${controlName}bg_hoverType`]: bg_hoverType, |
| 732 |
[`${controlName}bg_transition`]: bg_transition, |
| 733 |
|
| 734 |
// attributes for bg_hoverType normal start ⬇ |
| 735 |
[`${controlName}backgroundType`]: backgroundType, |
| 736 |
[`${controlName}backgroundColor`]: backgroundColor, |
| 737 |
[`${controlName}gradientColor`]: gradientColor, |
| 738 |
[`${controlName}bgImageURL`]: bgImageURL, |
| 739 |
// [`${controlName}bgImageID`]: bgImageID, |
| 740 |
[`${controlName}backgroundSize`]: backgroundSize, |
| 741 |
[`${controlName}bgImgCustomSize`]: bgImgCustomSize, |
| 742 |
[`${controlName}bgImgCustomSizeUnit`]: bgImgCustomSizeUnit, |
| 743 |
[`${controlName}bgImgPos`]: bgImgPos, |
| 744 |
[`${controlName}bgImgcustomPosX`]: bgImgcustomPosX, |
| 745 |
[`${controlName}bgImgcustomPosXUnit`]: bgImgcustomPosXUnit, |
| 746 |
[`${controlName}bgImgcustomPosY`]: bgImgcustomPosY, |
| 747 |
[`${controlName}bgImgcustomPosYUnit`]: bgImgcustomPosYUnit, |
| 748 |
[`${controlName}bgImgAttachment`]: bgImgAttachment, |
| 749 |
[`${controlName}bgImgRepeat`]: bgImgRepeat, |
| 750 |
|
| 751 |
[`TAB${controlName}backgroundSize`]: TABbackgroundSize, |
| 752 |
[`TAB${controlName}bgImgCustomSize`]: TABbgImgCustomSize, |
| 753 |
[`TAB${controlName}bgImgCustomSizeUnit`]: TABbgImgCustomSizeUnit, |
| 754 |
[`TAB${controlName}bgImgPos`]: TABbgImgPos, |
| 755 |
[`TAB${controlName}bgImgcustomPosX`]: TABbgImgcustomPosX, |
| 756 |
[`TAB${controlName}bgImgcustomPosXUnit`]: TABbgImgcustomPosXUnit, |
| 757 |
[`TAB${controlName}bgImgcustomPosY`]: TABbgImgcustomPosY, |
| 758 |
[`TAB${controlName}bgImgcustomPosYUnit`]: TABbgImgcustomPosYUnit, |
| 759 |
[`TAB${controlName}bgImgRepeat`]: TABbgImgRepeat, |
| 760 |
|
| 761 |
[`MOB${controlName}backgroundSize`]: MOBbackgroundSize, |
| 762 |
[`MOB${controlName}bgImgCustomSize`]: MOBbgImgCustomSize, |
| 763 |
[`MOB${controlName}bgImgCustomSizeUnit`]: MOBbgImgCustomSizeUnit, |
| 764 |
[`MOB${controlName}bgImgPos`]: MOBbgImgPos, |
| 765 |
[`MOB${controlName}bgImgcustomPosX`]: MOBbgImgcustomPosX, |
| 766 |
[`MOB${controlName}bgImgcustomPosXUnit`]: MOBbgImgcustomPosXUnit, |
| 767 |
[`MOB${controlName}bgImgcustomPosY`]: MOBbgImgcustomPosY, |
| 768 |
[`MOB${controlName}bgImgcustomPosYUnit`]: MOBbgImgcustomPosYUnit, |
| 769 |
[`MOB${controlName}bgImgRepeat`]: MOBbgImgRepeat, |
| 770 |
// attributes for bg_hoverType normal end |
| 771 |
|
| 772 |
// attributes for bg_hoverType hover start ⬇ |
| 773 |
[`hov_${controlName}backgroundType`]: hov_backgroundType, |
| 774 |
[`hov_${controlName}backgroundColor`]: hov_backgroundColor, |
| 775 |
[`hov_${controlName}gradientColor`]: hov_gradientColor, |
| 776 |
[`hov_${controlName}bgImageURL`]: hov_bgImageURL, |
| 777 |
// [`hov_${controlName}bgImageID`]: hov_bgImageID, |
| 778 |
[`hov_${controlName}bgImgAttachment`]: hov_bgImgAttachment, |
| 779 |
|
| 780 |
[`hov_${controlName}backgroundSize`]: hov_backgroundSize, |
| 781 |
[`hov_${controlName}bgImgCustomSize`]: hov_bgImgCustomSize, |
| 782 |
[`hov_${controlName}bgImgCustomSizeUnit`]: hov_bgImgCustomSizeUnit, |
| 783 |
[`hov_${controlName}bgImgPos`]: hov_bgImgPos, |
| 784 |
[`hov_${controlName}bgImgcustomPosX`]: hov_bgImgcustomPosX, |
| 785 |
[`hov_${controlName}bgImgcustomPosXUnit`]: hov_bgImgcustomPosXUnit, |
| 786 |
[`hov_${controlName}bgImgcustomPosY`]: hov_bgImgcustomPosY, |
| 787 |
[`hov_${controlName}bgImgcustomPosYUnit`]: hov_bgImgcustomPosYUnit, |
| 788 |
[`hov_${controlName}bgImgRepeat`]: hov_bgImgRepeat, |
| 789 |
|
| 790 |
[`hov_TAB${controlName}backgroundSize`]: hov_TABbackgroundSize, |
| 791 |
[`hov_TAB${controlName}bgImgCustomSize`]: hov_TABbgImgCustomSize, |
| 792 |
[`hov_TAB${controlName}bgImgCustomSizeUnit`]: hov_TABbgImgCustomSizeUnit, |
| 793 |
[`hov_TAB${controlName}bgImgPos`]: hov_TABbgImgPos, |
| 794 |
[`hov_TAB${controlName}bgImgcustomPosX`]: hov_TABbgImgcustomPosX, |
| 795 |
[`hov_TAB${controlName}bgImgcustomPosXUnit`]: hov_TABbgImgcustomPosXUnit, |
| 796 |
[`hov_TAB${controlName}bgImgcustomPosY`]: hov_TABbgImgcustomPosY, |
| 797 |
[`hov_TAB${controlName}bgImgcustomPosYUnit`]: hov_TABbgImgcustomPosYUnit, |
| 798 |
[`hov_TAB${controlName}bgImgRepeat`]: hov_TABbgImgRepeat, |
| 799 |
|
| 800 |
[`hov_MOB${controlName}backgroundSize`]: hov_MOBbackgroundSize, |
| 801 |
[`hov_MOB${controlName}bgImgCustomSize`]: hov_MOBbgImgCustomSize, |
| 802 |
[`hov_MOB${controlName}bgImgCustomSizeUnit`]: hov_MOBbgImgCustomSizeUnit, |
| 803 |
[`hov_MOB${controlName}bgImgPos`]: hov_MOBbgImgPos, |
| 804 |
[`hov_MOB${controlName}bgImgcustomPosX`]: hov_MOBbgImgcustomPosX, |
| 805 |
[`hov_MOB${controlName}bgImgcustomPosXUnit`]: hov_MOBbgImgcustomPosXUnit, |
| 806 |
[`hov_MOB${controlName}bgImgcustomPosY`]: hov_MOBbgImgcustomPosY, |
| 807 |
[`hov_MOB${controlName}bgImgcustomPosYUnit`]: hov_MOBbgImgcustomPosYUnit, |
| 808 |
[`hov_MOB${controlName}bgImgRepeat`]: hov_MOBbgImgRepeat, |
| 809 |
// attributes for bg_hoverType hover end |
| 810 |
// background attributes end |
| 811 |
|
| 812 |
// background overlay attributes start |
| 813 |
[`${controlName}isBgOverlay`]: isBgOverlay, |
| 814 |
// [`${controlName}ovl_hoverType`]: ovl_hoverType, |
| 815 |
[`${controlName}ovl_bg_transition`]: ovl_bg_transition, |
| 816 |
[`${controlName}ovl_filtersTransition`]: ovl_filtersTransition, |
| 817 |
[`${controlName}ovl_opacityTransition`]: ovl_opacityTransition, |
| 818 |
|
| 819 |
// attributes for ovl_hoverType normal start ⬇ |
| 820 |
[`${controlName}overlayType`]: overlayType, |
| 821 |
[`${controlName}overlayColor`]: overlayColor, |
| 822 |
[`${controlName}overlayGradient`]: overlayGradient, |
| 823 |
[`${controlName}ovl_bgImageURL`]: ovl_bgImageURL, |
| 824 |
// [`${controlName}ovl_bgImageID`]: ovl_bgImageID, |
| 825 |
[`${controlName}ovl_bgImgAttachment`]: ovl_bgImgAttachment, |
| 826 |
|
| 827 |
[`${controlName}ovl_opacity`]: ovl_opacity, |
| 828 |
[`${controlName}ovl_blendMode`]: ovl_blendMode, |
| 829 |
|
| 830 |
[`${controlName}ovl_allowFilters`]: ovl_allowFilters, |
| 831 |
[`${controlName}ovl_fltrBrightness`]: ovl_fltrBrightness, |
| 832 |
[`${controlName}ovl_fltrContrast`]: ovl_fltrContrast, |
| 833 |
[`${controlName}ovl_fltrSaturation`]: ovl_fltrSaturation, |
| 834 |
[`${controlName}ovl_fltrBlur`]: ovl_fltrBlur, |
| 835 |
[`${controlName}ovl_fltrHue`]: ovl_fltrHue, |
| 836 |
|
| 837 |
[`${controlName}ovl_backgroundSize`]: ovl_backgroundSize, |
| 838 |
[`${controlName}ovl_bgImgCustomSize`]: ovl_bgImgCustomSize, |
| 839 |
[`${controlName}ovl_bgImgCustomSizeUnit`]: ovl_bgImgCustomSizeUnit, |
| 840 |
[`${controlName}ovl_bgImgPos`]: ovl_bgImgPos, |
| 841 |
[`${controlName}ovl_bgImgcustomPosX`]: ovl_bgImgcustomPosX, |
| 842 |
[`${controlName}ovl_bgImgcustomPosXUnit`]: ovl_bgImgcustomPosXUnit, |
| 843 |
[`${controlName}ovl_bgImgcustomPosY`]: ovl_bgImgcustomPosY, |
| 844 |
[`${controlName}ovl_bgImgcustomPosYUnit`]: ovl_bgImgcustomPosYUnit, |
| 845 |
[`${controlName}ovl_bgImgRepeat`]: ovl_bgImgRepeat, |
| 846 |
|
| 847 |
[`TAB${controlName}ovl_backgroundSize`]: TABovl_backgroundSize, |
| 848 |
[`TAB${controlName}ovl_bgImgCustomSize`]: TABovl_bgImgCustomSize, |
| 849 |
[`TAB${controlName}ovl_bgImgCustomSizeUnit`]: TABovl_bgImgCustomSizeUnit, |
| 850 |
[`TAB${controlName}ovl_bgImgPos`]: TABovl_bgImgPos, |
| 851 |
[`TAB${controlName}ovl_bgImgcustomPosX`]: TABovl_bgImgcustomPosX, |
| 852 |
[`TAB${controlName}ovl_bgImgcustomPosXUnit`]: TABovl_bgImgcustomPosXUnit, |
| 853 |
[`TAB${controlName}ovl_bgImgcustomPosY`]: TABovl_bgImgcustomPosY, |
| 854 |
[`TAB${controlName}ovl_bgImgcustomPosYUnit`]: TABovl_bgImgcustomPosYUnit, |
| 855 |
[`TAB${controlName}ovl_bgImgRepeat`]: TABovl_bgImgRepeat, |
| 856 |
|
| 857 |
[`MOB${controlName}ovl_backgroundSize`]: MOBovl_backgroundSize, |
| 858 |
[`MOB${controlName}ovl_bgImgCustomSize`]: MOBovl_bgImgCustomSize, |
| 859 |
[`MOB${controlName}ovl_bgImgCustomSizeUnit`]: MOBovl_bgImgCustomSizeUnit, |
| 860 |
[`MOB${controlName}ovl_bgImgPos`]: MOBovl_bgImgPos, |
| 861 |
[`MOB${controlName}ovl_bgImgcustomPosX`]: MOBovl_bgImgcustomPosX, |
| 862 |
[`MOB${controlName}ovl_bgImgcustomPosXUnit`]: MOBovl_bgImgcustomPosXUnit, |
| 863 |
[`MOB${controlName}ovl_bgImgcustomPosY`]: MOBovl_bgImgcustomPosY, |
| 864 |
[`MOB${controlName}ovl_bgImgcustomPosYUnit`]: MOBovl_bgImgcustomPosYUnit, |
| 865 |
[`MOB${controlName}ovl_bgImgRepeat`]: MOBovl_bgImgRepeat, |
| 866 |
// attributes for ovl_hoverType normal end |
| 867 |
|
| 868 |
// attributes for ovl_hoverType hover start ⬇ |
| 869 |
[`hov_${controlName}overlayType`]: hov_overlayType, |
| 870 |
[`hov_${controlName}overlayColor`]: hov_overlayColor, |
| 871 |
[`hov_${controlName}overlayGradient`]: hov_overlayGradient, |
| 872 |
[`hov_${controlName}ovl_bgImageURL`]: hov_ovl_bgImageURL, |
| 873 |
// [`hov_${controlName}ovl_bgImageID`]: hov_ovl_bgImageID, |
| 874 |
[`hov_${controlName}ovl_bgImgAttachment`]: hov_ovl_bgImgAttachment, |
| 875 |
|
| 876 |
[`hov_${controlName}ovl_opacity`]: hov_ovl_opacity, |
| 877 |
[`hov_${controlName}ovl_blendMode`]: hov_ovl_blendMode, |
| 878 |
|
| 879 |
[`hov_${controlName}ovl_allowFilters`]: hov_ovl_allowFilters, |
| 880 |
[`hov_${controlName}ovl_fltrBrightness`]: hov_ovl_fltrBrightness, |
| 881 |
[`hov_${controlName}ovl_fltrContrast`]: hov_ovl_fltrContrast, |
| 882 |
[`hov_${controlName}ovl_fltrSaturation`]: hov_ovl_fltrSaturation, |
| 883 |
[`hov_${controlName}ovl_fltrBlur`]: hov_ovl_fltrBlur, |
| 884 |
[`hov_${controlName}ovl_fltrHue`]: hov_ovl_fltrHue, |
| 885 |
|
| 886 |
[`hov_${controlName}ovl_backgroundSize`]: hov_ovl_backgroundSize, |
| 887 |
[`hov_${controlName}ovl_bgImgCustomSize`]: hov_ovl_bgImgCustomSize, |
| 888 |
[`hov_${controlName}ovl_bgImgCustomSizeUnit`]: hov_ovl_bgImgCustomSizeUnit, |
| 889 |
[`hov_${controlName}ovl_bgImgPos`]: hov_ovl_bgImgPos, |
| 890 |
[`hov_${controlName}ovl_bgImgcustomPosX`]: hov_ovl_bgImgcustomPosX, |
| 891 |
[`hov_${controlName}ovl_bgImgcustomPosXUnit`]: hov_ovl_bgImgcustomPosXUnit, |
| 892 |
[`hov_${controlName}ovl_bgImgcustomPosY`]: hov_ovl_bgImgcustomPosY, |
| 893 |
[`hov_${controlName}ovl_bgImgcustomPosYUnit`]: hov_ovl_bgImgcustomPosYUnit, |
| 894 |
[`hov_${controlName}ovl_bgImgRepeat`]: hov_ovl_bgImgRepeat, |
| 895 |
|
| 896 |
[`hov_TAB${controlName}ovl_backgroundSize`]: hov_TABovl_backgroundSize, |
| 897 |
[`hov_TAB${controlName}ovl_bgImgCustomSize`]: hov_TABovl_bgImgCustomSize, |
| 898 |
[`hov_TAB${controlName}ovl_bgImgCustomSizeUnit`]: |
| 899 |
hov_TABovl_bgImgCustomSizeUnit, |
| 900 |
[`hov_TAB${controlName}ovl_bgImgPos`]: hov_TABovl_bgImgPos, |
| 901 |
[`hov_TAB${controlName}ovl_bgImgcustomPosX`]: hov_TABovl_bgImgcustomPosX, |
| 902 |
[`hov_TAB${controlName}ovl_bgImgcustomPosXUnit`]: |
| 903 |
hov_TABovl_bgImgcustomPosXUnit, |
| 904 |
[`hov_TAB${controlName}ovl_bgImgcustomPosY`]: hov_TABovl_bgImgcustomPosY, |
| 905 |
[`hov_TAB${controlName}ovl_bgImgcustomPosYUnit`]: |
| 906 |
hov_TABovl_bgImgcustomPosYUnit, |
| 907 |
[`hov_TAB${controlName}ovl_bgImgRepeat`]: hov_TABovl_bgImgRepeat, |
| 908 |
|
| 909 |
[`hov_MOB${controlName}ovl_backgroundSize`]: hov_MOBovl_backgroundSize, |
| 910 |
[`hov_MOB${controlName}ovl_bgImgCustomSize`]: hov_MOBovl_bgImgCustomSize, |
| 911 |
[`hov_MOB${controlName}ovl_bgImgCustomSizeUnit`]: |
| 912 |
hov_MOBovl_bgImgCustomSizeUnit, |
| 913 |
[`hov_MOB${controlName}ovl_bgImgPos`]: hov_MOBovl_bgImgPos, |
| 914 |
[`hov_MOB${controlName}ovl_bgImgcustomPosX`]: hov_MOBovl_bgImgcustomPosX, |
| 915 |
[`hov_MOB${controlName}ovl_bgImgcustomPosXUnit`]: |
| 916 |
hov_MOBovl_bgImgcustomPosXUnit, |
| 917 |
[`hov_MOB${controlName}ovl_bgImgcustomPosY`]: hov_MOBovl_bgImgcustomPosY, |
| 918 |
[`hov_MOB${controlName}ovl_bgImgcustomPosYUnit`]: |
| 919 |
hov_MOBovl_bgImgcustomPosYUnit, |
| 920 |
[`hov_MOB${controlName}ovl_bgImgRepeat`]: hov_MOBovl_bgImgRepeat, |
| 921 |
// attributes for ovl_hoverType hover end ⬇ |
| 922 |
|
| 923 |
// background overlay attributes end |
| 924 |
} = attributes; |
| 925 |
|
| 926 |
const backgroundStylesDesktop = ` |
| 927 |
${ |
| 928 |
(BGnoMainBgi === false && backgroundType === "classic" && bgImageURL) || |
| 929 |
(backgroundType === "gradient" && gradientColor) |
| 930 |
? ` |
| 931 |
background-image: ${ |
| 932 |
backgroundType === "classic" |
| 933 |
? `url("${bgImageURL}")` |
| 934 |
: backgroundType === "gradient" |
| 935 |
? gradientColor |
| 936 |
: "none" |
| 937 |
}; |
| 938 |
` |
| 939 |
: " " |
| 940 |
} |
| 941 |
|
| 942 |
${ |
| 943 |
BGnoMainBgi === false && backgroundType === "classic" && bgImageURL |
| 944 |
? ` |
| 945 |
${ |
| 946 |
backgroundSize && backgroundSize !== "custom" |
| 947 |
? `background-size: ${backgroundSize};` |
| 948 |
: backgroundSize === "custom" |
| 949 |
? `background-size: ${bgImgCustomSize}${bgImgCustomSizeUnit} auto;` |
| 950 |
: " " |
| 951 |
} |
| 952 |
|
| 953 |
${ |
| 954 |
bgImgPos && bgImgPos !== "custom" |
| 955 |
? `background-position: ${bgImgPos};` |
| 956 |
: bgImgPos === "custom" |
| 957 |
? `background-position: ${bgImgcustomPosX}${bgImgcustomPosXUnit} ${bgImgcustomPosY}${bgImgcustomPosYUnit};` |
| 958 |
: " " |
| 959 |
} |
| 960 |
|
| 961 |
${bgImgAttachment ? `background-attachment: ${bgImgAttachment};` : " "} |
| 962 |
|
| 963 |
${bgImgRepeat ? `background-repeat: ${bgImgRepeat};` : " "} |
| 964 |
|
| 965 |
|
| 966 |
` |
| 967 |
: " " |
| 968 |
} |
| 969 |
|
| 970 |
${ |
| 971 |
isBgOverlay |
| 972 |
? ` |
| 973 |
z-index: 2; |
| 974 |
position: relative; |
| 975 |
` |
| 976 |
: " " |
| 977 |
} |
| 978 |
|
| 979 |
${backgroundColor ? `background-color: ${backgroundColor};` : " "} |
| 980 |
|
| 981 |
${ |
| 982 |
forButton === true |
| 983 |
? ` |
| 984 |
position: relative; |
| 985 |
overflow: hidden; |
| 986 |
z-index:1; |
| 987 |
|
| 988 |
` |
| 989 |
: "" |
| 990 |
} |
| 991 |
`; |
| 992 |
|
| 993 |
const hoverBackgroundStylesDesktop = ` |
| 994 |
|
| 995 |
${ |
| 996 |
forButton === true |
| 997 |
? ` |
| 998 |
content: " "; |
| 999 |
position: absolute; |
| 1000 |
left: 0; |
| 1001 |
top: 0; |
| 1002 |
right: 0; |
| 1003 |
bottom: 0; |
| 1004 |
z-index: -1; |
| 1005 |
opacity: 0; |
| 1006 |
transition: all ${bg_transition || 0}s; |
| 1007 |
|
| 1008 |
` |
| 1009 |
: "" |
| 1010 |
} |
| 1011 |
|
| 1012 |
${ |
| 1013 |
(BGnoMainBgi === false && |
| 1014 |
hov_backgroundType === "classic" && |
| 1015 |
hov_bgImageURL) || |
| 1016 |
(hov_backgroundType === "gradient" && hov_gradientColor) |
| 1017 |
? ` |
| 1018 |
background-image: ${ |
| 1019 |
hov_backgroundType === "classic" |
| 1020 |
? `url("${hov_bgImageURL}")` |
| 1021 |
: hov_backgroundType === "gradient" |
| 1022 |
? hov_gradientColor |
| 1023 |
: "none" |
| 1024 |
}; |
| 1025 |
` |
| 1026 |
: " " |
| 1027 |
} |
| 1028 |
|
| 1029 |
${ |
| 1030 |
BGnoMainBgi === false && |
| 1031 |
hov_backgroundType === "classic" && |
| 1032 |
hov_bgImageURL |
| 1033 |
? ` |
| 1034 |
${ |
| 1035 |
hov_backgroundSize && hov_backgroundSize !== "custom" |
| 1036 |
? `background-size: ${hov_backgroundSize};` |
| 1037 |
: hov_backgroundSize === "custom" |
| 1038 |
? `background-size: ${hov_bgImgCustomSize}${hov_bgImgCustomSizeUnit} auto;` |
| 1039 |
: " " |
| 1040 |
} |
| 1041 |
|
| 1042 |
${ |
| 1043 |
hov_bgImgPos && hov_bgImgPos !== "custom" |
| 1044 |
? `background-position: ${hov_bgImgPos};` |
| 1045 |
: hov_bgImgPos === "custom" |
| 1046 |
? `background-position: ${hov_bgImgcustomPosX}${hov_bgImgcustomPosXUnit} ${hov_bgImgcustomPosY}${hov_bgImgcustomPosYUnit};` |
| 1047 |
: " " |
| 1048 |
} |
| 1049 |
|
| 1050 |
${ |
| 1051 |
hov_bgImgAttachment |
| 1052 |
? `background-attachment: ${hov_bgImgAttachment};` |
| 1053 |
: " " |
| 1054 |
} |
| 1055 |
|
| 1056 |
${hov_bgImgRepeat ? `background-repeat: ${hov_bgImgRepeat};` : " "} |
| 1057 |
|
| 1058 |
` |
| 1059 |
: " " |
| 1060 |
} |
| 1061 |
|
| 1062 |
${hov_backgroundColor ? `background-color: ${hov_backgroundColor};` : " "} |
| 1063 |
|
| 1064 |
`; |
| 1065 |
|
| 1066 |
const backgroundStylesTab = ` |
| 1067 |
${ |
| 1068 |
BGnoMainBgi === false && backgroundType === "classic" && bgImageURL |
| 1069 |
? ` |
| 1070 |
${ |
| 1071 |
TABbackgroundSize && TABbackgroundSize !== "custom" |
| 1072 |
? `background-size: ${TABbackgroundSize};` |
| 1073 |
: TABbackgroundSize === "custom" |
| 1074 |
? `background-size: ${TABbgImgCustomSize}${TABbgImgCustomSizeUnit} auto;` |
| 1075 |
: " " |
| 1076 |
} |
| 1077 |
|
| 1078 |
${ |
| 1079 |
TABbgImgPos && TABbgImgPos !== "custom" |
| 1080 |
? `background-position: ${TABbgImgPos};` |
| 1081 |
: TABbgImgPos === "custom" |
| 1082 |
? `background-position: ${TABbgImgcustomPosX}${TABbgImgcustomPosXUnit} ${TABbgImgcustomPosY}${TABbgImgcustomPosYUnit};` |
| 1083 |
: " " |
| 1084 |
} |
| 1085 |
|
| 1086 |
${TABbgImgRepeat ? `background-repeat: ${TABbgImgRepeat};` : " "} |
| 1087 |
background-attachment: scroll; |
| 1088 |
` |
| 1089 |
: " " |
| 1090 |
} |
| 1091 |
|
| 1092 |
`; |
| 1093 |
|
| 1094 |
const hoverBackgroundStylesTab = ` |
| 1095 |
${ |
| 1096 |
BGnoMainBgi === false && |
| 1097 |
hov_backgroundType === "classic" && |
| 1098 |
hov_bgImageURL |
| 1099 |
? ` |
| 1100 |
${ |
| 1101 |
hov_TABbackgroundSize && hov_TABbackgroundSize !== "custom" |
| 1102 |
? `background-size: ${hov_TABbackgroundSize};` |
| 1103 |
: hov_TABbackgroundSize === "custom" |
| 1104 |
? `background-size: ${hov_TABbgImgCustomSize}${hov_TABbgImgCustomSizeUnit} auto;` |
| 1105 |
: " " |
| 1106 |
} |
| 1107 |
|
| 1108 |
${ |
| 1109 |
hov_TABbgImgPos && hov_TABbgImgPos !== "custom" |
| 1110 |
? `background-position: ${hov_TABbgImgPos};` |
| 1111 |
: hov_TABbgImgPos === "custom" |
| 1112 |
? `background-position: ${hov_TABbgImgcustomPosX}${hov_TABbgImgcustomPosXUnit} ${hov_TABbgImgcustomPosY}${hov_TABbgImgcustomPosYUnit};` |
| 1113 |
: " " |
| 1114 |
} |
| 1115 |
|
| 1116 |
${ |
| 1117 |
hov_TABbgImgRepeat ? `background-repeat: ${hov_TABbgImgRepeat};` : " " |
| 1118 |
} |
| 1119 |
background-attachment: scroll; |
| 1120 |
` |
| 1121 |
: " " |
| 1122 |
} |
| 1123 |
|
| 1124 |
`; |
| 1125 |
|
| 1126 |
const backgroundStylesMobile = ` |
| 1127 |
${ |
| 1128 |
BGnoMainBgi === false && backgroundType === "classic" && bgImageURL |
| 1129 |
? ` |
| 1130 |
${ |
| 1131 |
MOBbackgroundSize && MOBbackgroundSize !== "custom" |
| 1132 |
? `background-size: ${MOBbackgroundSize};` |
| 1133 |
: MOBbackgroundSize === "custom" |
| 1134 |
? `background-size: ${MOBbgImgCustomSize}${MOBbgImgCustomSizeUnit} auto;` |
| 1135 |
: " " |
| 1136 |
} |
| 1137 |
|
| 1138 |
${ |
| 1139 |
MOBbgImgPos && MOBbgImgPos !== "custom" |
| 1140 |
? `background-position: ${MOBbgImgPos};` |
| 1141 |
: MOBbgImgPos === "custom" |
| 1142 |
? `background-position: ${MOBbgImgcustomPosX}${MOBbgImgcustomPosXUnit} ${MOBbgImgcustomPosY}${MOBbgImgcustomPosYUnit};` |
| 1143 |
: " " |
| 1144 |
} |
| 1145 |
|
| 1146 |
${MOBbgImgRepeat ? `background-repeat: ${MOBbgImgRepeat};` : " "} |
| 1147 |
|
| 1148 |
` |
| 1149 |
: " " |
| 1150 |
} |
| 1151 |
|
| 1152 |
`; |
| 1153 |
|
| 1154 |
const hoverBackgroundStylesMobile = ` |
| 1155 |
${ |
| 1156 |
BGnoMainBgi === false && |
| 1157 |
hov_backgroundType === "classic" && |
| 1158 |
hov_bgImageURL |
| 1159 |
? ` |
| 1160 |
${ |
| 1161 |
hov_MOBbackgroundSize && hov_MOBbackgroundSize !== "custom" |
| 1162 |
? `background-size: ${hov_MOBbackgroundSize};` |
| 1163 |
: hov_MOBbackgroundSize === "custom" |
| 1164 |
? `background-size: ${hov_MOBbgImgCustomSize}${hov_MOBbgImgCustomSizeUnit} auto;` |
| 1165 |
: " " |
| 1166 |
} |
| 1167 |
|
| 1168 |
${ |
| 1169 |
hov_MOBbgImgPos && hov_MOBbgImgPos !== "custom" |
| 1170 |
? `background-position: ${hov_MOBbgImgPos};` |
| 1171 |
: hov_MOBbgImgPos === "custom" |
| 1172 |
? `background-position: ${hov_MOBbgImgcustomPosX}${hov_MOBbgImgcustomPosXUnit} ${hov_MOBbgImgcustomPosY}${hov_MOBbgImgcustomPosYUnit};` |
| 1173 |
: " " |
| 1174 |
} |
| 1175 |
|
| 1176 |
${ |
| 1177 |
hov_MOBbgImgRepeat ? `background-repeat: ${hov_MOBbgImgRepeat};` : " " |
| 1178 |
} |
| 1179 |
|
| 1180 |
` |
| 1181 |
: " " |
| 1182 |
} |
| 1183 |
|
| 1184 |
`; |
| 1185 |
|
| 1186 |
const overlayStylesDesktop = ` |
| 1187 |
|
| 1188 |
${ |
| 1189 |
BGnoOverlay === false && isBgOverlay |
| 1190 |
? ` |
| 1191 |
content: ""; |
| 1192 |
position: absolute; |
| 1193 |
top: 0; |
| 1194 |
bottom: 0; |
| 1195 |
right: 0; |
| 1196 |
left: 0; |
| 1197 |
z-index: 0; |
| 1198 |
${ |
| 1199 |
(BGnoOverlayBgi === false && |
| 1200 |
overlayType === "classic" && |
| 1201 |
ovl_bgImageURL) || |
| 1202 |
(overlayType === "gradient" && overlayGradient) |
| 1203 |
? ` |
| 1204 |
background-image: ${ |
| 1205 |
overlayType === "classic" |
| 1206 |
? `url("${ovl_bgImageURL}")` |
| 1207 |
: overlayType === "gradient" |
| 1208 |
? overlayGradient |
| 1209 |
: "none" |
| 1210 |
}; |
| 1211 |
` |
| 1212 |
: " " |
| 1213 |
} |
| 1214 |
|
| 1215 |
${overlayColor ? `background-color: ${overlayColor};` : " "} |
| 1216 |
${ |
| 1217 |
ovl_opacity || ovl_opacity === 0 |
| 1218 |
? `opacity: ${ovl_opacity};` |
| 1219 |
: " " |
| 1220 |
} |
| 1221 |
${ovl_blendMode ? `mix-blend-mode: ${ovl_blendMode};` : " "} |
| 1222 |
${ |
| 1223 |
ovl_allowFilters |
| 1224 |
? `filter: brightness( ${ovl_fltrBrightness}% ) contrast( ${ovl_fltrContrast}% ) saturate( ${ovl_fltrSaturation}% ) blur( ${ovl_fltrBlur}px ) hue-rotate( |
| 1225 |
${ovl_fltrHue}deg );` |
| 1226 |
: " " |
| 1227 |
} |
| 1228 |
|
| 1229 |
${ |
| 1230 |
BGnoOverlayBgi === false && |
| 1231 |
overlayType === "classic" && |
| 1232 |
ovl_bgImageURL |
| 1233 |
? ` |
| 1234 |
${ |
| 1235 |
ovl_backgroundSize && ovl_backgroundSize !== "custom" |
| 1236 |
? `background-size: ${ovl_backgroundSize};` |
| 1237 |
: ovl_backgroundSize === "custom" |
| 1238 |
? `background-size: ${ovl_bgImgCustomSize}${ovl_bgImgCustomSizeUnit} auto;` |
| 1239 |
: " " |
| 1240 |
} |
| 1241 |
|
| 1242 |
${ |
| 1243 |
ovl_bgImgPos && ovl_bgImgPos !== "custom" |
| 1244 |
? `background-position: ${ovl_bgImgPos};` |
| 1245 |
: ovl_bgImgPos === "custom" |
| 1246 |
? `background-position: ${ovl_bgImgcustomPosX}${ovl_bgImgcustomPosXUnit} ${ovl_bgImgcustomPosY}${ovl_bgImgcustomPosYUnit};` |
| 1247 |
: " " |
| 1248 |
} |
| 1249 |
|
| 1250 |
${ |
| 1251 |
ovl_bgImgAttachment |
| 1252 |
? `background-attachment: ${ovl_bgImgAttachment};` |
| 1253 |
: " " |
| 1254 |
} |
| 1255 |
|
| 1256 |
${ovl_bgImgRepeat ? `background-repeat: ${ovl_bgImgRepeat};` : " "} |
| 1257 |
|
| 1258 |
` |
| 1259 |
: " " |
| 1260 |
} |
| 1261 |
|
| 1262 |
` |
| 1263 |
: " " |
| 1264 |
} |
| 1265 |
|
| 1266 |
|
| 1267 |
`; |
| 1268 |
|
| 1269 |
const hoverOverlayStylesDesktop = ` |
| 1270 |
|
| 1271 |
${ |
| 1272 |
BGnoOverlay === false && isBgOverlay |
| 1273 |
? ` |
| 1274 |
${ |
| 1275 |
(BGnoOverlayBgi === false && |
| 1276 |
hov_overlayType === "classic" && |
| 1277 |
hov_ovl_bgImageURL) || |
| 1278 |
(hov_overlayType === "gradient" && hov_overlayGradient) |
| 1279 |
? ` |
| 1280 |
background-image: ${ |
| 1281 |
hov_overlayType === "classic" |
| 1282 |
? `url("${hov_ovl_bgImageURL}")` |
| 1283 |
: hov_overlayType === "gradient" |
| 1284 |
? hov_overlayGradient |
| 1285 |
: "none" |
| 1286 |
}; |
| 1287 |
` |
| 1288 |
: " " |
| 1289 |
} |
| 1290 |
|
| 1291 |
${hov_overlayColor ? `background-color: ${hov_overlayColor};` : " "} |
| 1292 |
${ |
| 1293 |
hov_ovl_opacity || hov_ovl_opacity === 0 |
| 1294 |
? `opacity: ${hov_ovl_opacity};` |
| 1295 |
: " " |
| 1296 |
} |
| 1297 |
${hov_ovl_blendMode ? `mix-blend-mode: ${hov_ovl_blendMode};` : " "} |
| 1298 |
${ |
| 1299 |
hov_ovl_allowFilters |
| 1300 |
? `filter: brightness( ${hov_ovl_fltrBrightness}% ) contrast( ${hov_ovl_fltrContrast}% ) saturate( ${hov_ovl_fltrSaturation}% ) blur( ${hov_ovl_fltrBlur}px ) hue-rotate( |
| 1301 |
${hov_ovl_fltrHue}deg );` |
| 1302 |
: " " |
| 1303 |
} |
| 1304 |
|
| 1305 |
${ |
| 1306 |
BGnoOverlayBgi === false && |
| 1307 |
hov_overlayType === "classic" && |
| 1308 |
hov_ovl_bgImageURL |
| 1309 |
? ` |
| 1310 |
${ |
| 1311 |
hov_ovl_backgroundSize && hov_ovl_backgroundSize !== "custom" |
| 1312 |
? `background-size: ${hov_ovl_backgroundSize};` |
| 1313 |
: hov_ovl_backgroundSize === "custom" |
| 1314 |
? `background-size: ${hov_ovl_bgImgCustomSize}${hov_ovl_bgImgCustomSizeUnit} auto;` |
| 1315 |
: " " |
| 1316 |
} |
| 1317 |
|
| 1318 |
${ |
| 1319 |
hov_ovl_bgImgPos && hov_ovl_bgImgPos !== "custom" |
| 1320 |
? `background-position: ${hov_ovl_bgImgPos};` |
| 1321 |
: hov_ovl_bgImgPos === "custom" |
| 1322 |
? `background-position: ${hov_ovl_bgImgcustomPosX}${hov_ovl_bgImgcustomPosXUnit} ${hov_ovl_bgImgcustomPosY}${hov_ovl_bgImgcustomPosYUnit};` |
| 1323 |
: " " |
| 1324 |
} |
| 1325 |
|
| 1326 |
${ |
| 1327 |
hov_ovl_bgImgAttachment |
| 1328 |
? `background-attachment: ${hov_ovl_bgImgAttachment};` |
| 1329 |
: " " |
| 1330 |
} |
| 1331 |
|
| 1332 |
${ |
| 1333 |
hov_ovl_bgImgRepeat |
| 1334 |
? `background-repeat: ${hov_ovl_bgImgRepeat};` |
| 1335 |
: " " |
| 1336 |
} |
| 1337 |
|
| 1338 |
` |
| 1339 |
: " " |
| 1340 |
} |
| 1341 |
|
| 1342 |
` |
| 1343 |
: " " |
| 1344 |
} |
| 1345 |
|
| 1346 |
|
| 1347 |
`; |
| 1348 |
|
| 1349 |
const overlayStylesTab = ` |
| 1350 |
${ |
| 1351 |
BGnoOverlay === false && |
| 1352 |
BGnoOverlayBgi === false && |
| 1353 |
isBgOverlay && |
| 1354 |
overlayType === "classic" && |
| 1355 |
ovl_bgImageURL |
| 1356 |
? ` |
| 1357 |
${ |
| 1358 |
TABovl_backgroundSize && TABovl_backgroundSize !== "custom" |
| 1359 |
? `background-size: ${TABovl_backgroundSize};` |
| 1360 |
: TABovl_backgroundSize === "custom" |
| 1361 |
? `background-size: ${TABovl_bgImgCustomSize}${TABovl_bgImgCustomSizeUnit} auto;` |
| 1362 |
: " " |
| 1363 |
} |
| 1364 |
|
| 1365 |
${ |
| 1366 |
TABovl_bgImgPos && TABovl_bgImgPos !== "custom" |
| 1367 |
? `background-position: ${TABovl_bgImgPos};` |
| 1368 |
: TABovl_bgImgPos === "custom" |
| 1369 |
? `background-position: ${TABovl_bgImgcustomPosX}${TABovl_bgImgcustomPosXUnit} ${TABovl_bgImgcustomPosY}${TABovl_bgImgcustomPosYUnit};` |
| 1370 |
: " " |
| 1371 |
} |
| 1372 |
|
| 1373 |
${ |
| 1374 |
TABovl_bgImgRepeat |
| 1375 |
? `background-repeat: ${TABovl_bgImgRepeat};` |
| 1376 |
: " " |
| 1377 |
} |
| 1378 |
background-attachment: scroll; |
| 1379 |
` |
| 1380 |
: " " |
| 1381 |
} |
| 1382 |
|
| 1383 |
`; |
| 1384 |
|
| 1385 |
const hoverOverlayStylesTab = ` |
| 1386 |
${ |
| 1387 |
BGnoOverlay === false && |
| 1388 |
BGnoOverlayBgi === false && |
| 1389 |
isBgOverlay && |
| 1390 |
hov_overlayType === "classic" && |
| 1391 |
hov_ovl_bgImageURL |
| 1392 |
? ` |
| 1393 |
${ |
| 1394 |
hov_TABovl_backgroundSize && hov_TABovl_backgroundSize !== "custom" |
| 1395 |
? `background-size: ${hov_TABovl_backgroundSize};` |
| 1396 |
: hov_TABovl_backgroundSize === "custom" |
| 1397 |
? `background-size: ${hov_TABovl_bgImgCustomSize}${hov_TABovl_bgImgCustomSizeUnit} auto;` |
| 1398 |
: " " |
| 1399 |
} |
| 1400 |
|
| 1401 |
${ |
| 1402 |
hov_TABovl_bgImgPos && hov_TABovl_bgImgPos !== "custom" |
| 1403 |
? `background-position: ${hov_TABovl_bgImgPos};` |
| 1404 |
: hov_TABovl_bgImgPos === "custom" |
| 1405 |
? `background-position: ${hov_TABovl_bgImgcustomPosX}${hov_TABovl_bgImgcustomPosXUnit} ${hov_TABovl_bgImgcustomPosY}${hov_TABovl_bgImgcustomPosYUnit};` |
| 1406 |
: " " |
| 1407 |
} |
| 1408 |
|
| 1409 |
${ |
| 1410 |
hov_TABovl_bgImgRepeat |
| 1411 |
? `background-repeat: ${hov_TABovl_bgImgRepeat};` |
| 1412 |
: " " |
| 1413 |
} |
| 1414 |
background-attachment: scroll; |
| 1415 |
` |
| 1416 |
: " " |
| 1417 |
} |
| 1418 |
|
| 1419 |
`; |
| 1420 |
|
| 1421 |
const overlayStylesMobile = ` |
| 1422 |
${ |
| 1423 |
BGnoOverlay === false && |
| 1424 |
BGnoOverlayBgi === false && |
| 1425 |
isBgOverlay && |
| 1426 |
overlayType === "classic" && |
| 1427 |
ovl_bgImageURL |
| 1428 |
? ` |
| 1429 |
${ |
| 1430 |
MOBovl_backgroundSize && MOBovl_backgroundSize !== "custom" |
| 1431 |
? `background-size: ${MOBovl_backgroundSize};` |
| 1432 |
: MOBovl_backgroundSize === "custom" |
| 1433 |
? `background-size: ${MOBovl_bgImgCustomSize}${MOBovl_bgImgCustomSizeUnit} auto;` |
| 1434 |
: " " |
| 1435 |
} |
| 1436 |
|
| 1437 |
${ |
| 1438 |
MOBovl_bgImgPos && MOBovl_bgImgPos !== "custom" |
| 1439 |
? `background-position: ${MOBovl_bgImgPos};` |
| 1440 |
: MOBovl_bgImgPos === "custom" |
| 1441 |
? `background-position: ${MOBovl_bgImgcustomPosX}${MOBovl_bgImgcustomPosXUnit} ${MOBovl_bgImgcustomPosY}${MOBovl_bgImgcustomPosYUnit};` |
| 1442 |
: " " |
| 1443 |
} |
| 1444 |
|
| 1445 |
${ |
| 1446 |
MOBovl_bgImgRepeat ? `background-repeat: ${MOBovl_bgImgRepeat};` : " " |
| 1447 |
} |
| 1448 |
` |
| 1449 |
: " " |
| 1450 |
} |
| 1451 |
|
| 1452 |
`; |
| 1453 |
|
| 1454 |
const hoverOverlayStylesMobile = ` |
| 1455 |
${ |
| 1456 |
BGnoOverlay === false && |
| 1457 |
BGnoOverlayBgi === false && |
| 1458 |
isBgOverlay && |
| 1459 |
hov_overlayType === "classic" && |
| 1460 |
hov_ovl_bgImageURL |
| 1461 |
? ` |
| 1462 |
${ |
| 1463 |
hov_MOBovl_backgroundSize && hov_MOBovl_backgroundSize !== "custom" |
| 1464 |
? `background-size: ${hov_MOBovl_backgroundSize};` |
| 1465 |
: hov_MOBovl_backgroundSize === "custom" |
| 1466 |
? `background-size: ${hov_MOBovl_bgImgCustomSize}${hov_MOBovl_bgImgCustomSizeUnit} auto;` |
| 1467 |
: " " |
| 1468 |
} |
| 1469 |
|
| 1470 |
${ |
| 1471 |
hov_MOBovl_bgImgPos && hov_MOBovl_bgImgPos !== "custom" |
| 1472 |
? `background-position: ${hov_MOBovl_bgImgPos};` |
| 1473 |
: hov_MOBovl_bgImgPos === "custom" |
| 1474 |
? `background-position: ${hov_MOBovl_bgImgcustomPosX}${hov_MOBovl_bgImgcustomPosXUnit} ${hov_MOBovl_bgImgcustomPosY}${hov_MOBovl_bgImgcustomPosYUnit};` |
| 1475 |
: " " |
| 1476 |
} |
| 1477 |
|
| 1478 |
${ |
| 1479 |
hov_MOBovl_bgImgRepeat |
| 1480 |
? `background-repeat: ${hov_MOBovl_bgImgRepeat};` |
| 1481 |
: " " |
| 1482 |
} |
| 1483 |
` |
| 1484 |
: " " |
| 1485 |
} |
| 1486 |
|
| 1487 |
`; |
| 1488 |
|
| 1489 |
const bgTransitionStyle = noTransition |
| 1490 |
? " " |
| 1491 |
: `background ${bg_transition || 0}s`; |
| 1492 |
|
| 1493 |
const ovlTransitionStyle = noTransition |
| 1494 |
? " " |
| 1495 |
: `background ${ovl_bg_transition || 0}s, opacity ${ |
| 1496 |
ovl_opacityTransition || 0 |
| 1497 |
}s, filter ${ovl_filtersTransition || 0}s`; |
| 1498 |
|
| 1499 |
return { |
| 1500 |
backgroundStylesDesktop, |
| 1501 |
hoverBackgroundStylesDesktop, |
| 1502 |
backgroundStylesTab, |
| 1503 |
hoverBackgroundStylesTab, |
| 1504 |
backgroundStylesMobile, |
| 1505 |
hoverBackgroundStylesMobile, |
| 1506 |
overlayStylesDesktop, |
| 1507 |
hoverOverlayStylesDesktop, |
| 1508 |
overlayStylesTab, |
| 1509 |
hoverOverlayStylesTab, |
| 1510 |
overlayStylesMobile, |
| 1511 |
hoverOverlayStylesMobile, |
| 1512 |
bgTransitionStyle, |
| 1513 |
ovlTransitionStyle, |
| 1514 |
}; |
| 1515 |
}; |
| 1516 |
|