@customviews-js/customviews 1.1.4 → 1.1.6
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/README.md +362 -362
- package/dist/custom-views.core.cjs.js +1576 -992
- package/dist/custom-views.core.cjs.js.map +1 -1
- package/dist/custom-views.core.esm.js +1576 -992
- package/dist/custom-views.core.esm.js.map +1 -1
- package/dist/custom-views.esm.js +1576 -992
- package/dist/custom-views.esm.js.map +1 -1
- package/dist/custom-views.js +1576 -992
- package/dist/custom-views.js.map +1 -1
- package/dist/custom-views.min.js +2 -2
- package/dist/custom-views.min.js.map +1 -1
- package/dist/types/core/core.d.ts +1 -1
- package/dist/types/core/core.d.ts.map +1 -1
- package/dist/types/core/tab-manager.d.ts +32 -7
- package/dist/types/core/tab-manager.d.ts.map +1 -1
- package/dist/types/core/widget.d.ts.map +1 -1
- package/dist/types/styles/tab-styles.d.ts +1 -1
- package/dist/types/styles/tab-styles.d.ts.map +1 -1
- package/dist/types/styles/widget-styles.d.ts +1 -1
- package/dist/types/styles/widget-styles.d.ts.map +1 -1
- package/dist/types/utils/icons.d.ts +21 -0
- package/dist/types/utils/icons.d.ts.map +1 -0
- package/package.json +61 -61
package/dist/custom-views.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @customviews-js/customviews v1.1.
|
|
2
|
+
* @customviews-js/customviews v1.1.6
|
|
3
3
|
* (c) 2025 Chan Ger Teck
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -374,10 +374,17 @@
|
|
|
374
374
|
const TAB_SELECTOR = 'cv-tab';
|
|
375
375
|
const NAV_AUTO_SELECTOR = 'cv-tabgroup[nav="auto"], cv-tabgroup:not([nav])';
|
|
376
376
|
const NAV_CONTAINER_CLASS = 'cv-tabs-nav';
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
*/
|
|
377
|
+
const NAV_HIDE_ROOT_CLASS = 'cv-hide-tab-navs';
|
|
378
|
+
const NAV_HIDDEN_CLASS = 'cv-tabs-nav-hidden';
|
|
380
379
|
class TabManager {
|
|
380
|
+
/**
|
|
381
|
+
* Split a tab ID into multiple IDs if it contains spaces or |
|
|
382
|
+
*/
|
|
383
|
+
static splitTabIds(tabId) {
|
|
384
|
+
const splitIds = tabId.split(/[\s|]+/).filter(id => id.trim() !== '');
|
|
385
|
+
const trimmedIds = splitIds.map(id => id.trim());
|
|
386
|
+
return trimmedIds;
|
|
387
|
+
}
|
|
381
388
|
/**
|
|
382
389
|
* Apply tab selections to all tab groups in the DOM
|
|
383
390
|
*/
|
|
@@ -389,22 +396,26 @@
|
|
|
389
396
|
if (!groupId)
|
|
390
397
|
return;
|
|
391
398
|
// Determine the active tab for this group
|
|
392
|
-
const activeTabId = this.
|
|
399
|
+
const activeTabId = this.resolveActiveTabForGroup(groupId, tabs, cfgGroups, groupEl);
|
|
393
400
|
// Apply visibility to direct child cv-tab elements only (not nested ones)
|
|
394
401
|
const tabElements = Array.from(groupEl.children).filter((child) => child.tagName.toLowerCase() === TAB_SELECTOR);
|
|
395
402
|
tabElements.forEach((tabEl) => {
|
|
396
403
|
const tabId = tabEl.getAttribute('id');
|
|
397
404
|
if (!tabId)
|
|
398
405
|
return;
|
|
399
|
-
|
|
406
|
+
// Split IDs and check if any match the active tab
|
|
407
|
+
const splitIds = this.splitTabIds(tabId);
|
|
408
|
+
const isActive = splitIds.includes(activeTabId || '');
|
|
400
409
|
this.applyTabVisibility(tabEl, isActive);
|
|
401
410
|
});
|
|
402
411
|
});
|
|
403
412
|
}
|
|
404
413
|
/**
|
|
405
414
|
* Resolve the active tab for a group based on state, config, and DOM
|
|
415
|
+
*
|
|
416
|
+
* Pass in the current tabs state, config groups, and the group element
|
|
406
417
|
*/
|
|
407
|
-
static
|
|
418
|
+
static resolveActiveTabForGroup(groupId, tabs, cfgGroups, groupEl) {
|
|
408
419
|
// 1. Check state
|
|
409
420
|
if (tabs[groupId]) {
|
|
410
421
|
return tabs[groupId];
|
|
@@ -426,7 +437,8 @@
|
|
|
426
437
|
// 3. Fallback to first direct cv-tab child in DOM
|
|
427
438
|
const firstTab = Array.from(groupEl.children).find((child) => child.tagName.toLowerCase() === TAB_SELECTOR);
|
|
428
439
|
if (firstTab) {
|
|
429
|
-
|
|
440
|
+
const splitIds = this.splitTabIds(firstTab.getAttribute('id') || '');
|
|
441
|
+
return splitIds[0] || null;
|
|
430
442
|
}
|
|
431
443
|
return null;
|
|
432
444
|
}
|
|
@@ -446,7 +458,7 @@
|
|
|
446
458
|
/**
|
|
447
459
|
* Build navigation for tab groups with nav="auto" (one-time setup)
|
|
448
460
|
*/
|
|
449
|
-
static buildNavs(rootEl, cfgGroups, onTabClick) {
|
|
461
|
+
static buildNavs(rootEl, cfgGroups, onTabClick, onTabDoubleClick) {
|
|
450
462
|
// Find all cv-tabgroup elements with nav="auto" or no nav attribute
|
|
451
463
|
const tabGroups = rootEl.querySelectorAll(NAV_AUTO_SELECTOR);
|
|
452
464
|
// Check if any tab headers contain Font Awesome shortcodes
|
|
@@ -457,11 +469,14 @@
|
|
|
457
469
|
if (!groupId)
|
|
458
470
|
return;
|
|
459
471
|
const tabElements = Array.from(groupEl.children).filter((child) => child.tagName.toLowerCase() === 'cv-tab');
|
|
472
|
+
// Check for Font Awesome shortcodes in tab headers
|
|
460
473
|
tabElements.forEach((tabEl) => {
|
|
461
|
-
const
|
|
462
|
-
if (!
|
|
474
|
+
const rawTabId = tabEl.getAttribute('id');
|
|
475
|
+
if (!rawTabId)
|
|
463
476
|
return;
|
|
464
|
-
const
|
|
477
|
+
const splitIds = this.splitTabIds(rawTabId);
|
|
478
|
+
const tabId = splitIds[0] || rawTabId;
|
|
479
|
+
const header = tabEl.getAttribute('header') || this.getTabLabel(tabId, groupId, cfgGroups) || tabId || '';
|
|
465
480
|
if (/:fa-[\w-]+:/.test(header)) {
|
|
466
481
|
hasFontAwesomeShortcodes = true;
|
|
467
482
|
}
|
|
@@ -487,25 +502,49 @@
|
|
|
487
502
|
navContainer = document.createElement('ul');
|
|
488
503
|
navContainer.className = `${NAV_CONTAINER_CLASS} nav-tabs`;
|
|
489
504
|
navContainer.setAttribute('role', 'tablist');
|
|
505
|
+
// Respect viewer preference on the root to show/hide navs
|
|
506
|
+
const showNavs = !rootEl.classList.contains(NAV_HIDE_ROOT_CLASS);
|
|
507
|
+
if (!showNavs) {
|
|
508
|
+
navContainer.classList.add(NAV_HIDDEN_CLASS);
|
|
509
|
+
navContainer.setAttribute('aria-hidden', 'true');
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
navContainer.setAttribute('aria-hidden', 'false');
|
|
513
|
+
}
|
|
490
514
|
groupEl.insertBefore(navContainer, groupEl.firstChild);
|
|
491
515
|
// Build nav items
|
|
492
516
|
tabElements.forEach((tabEl) => {
|
|
493
|
-
const
|
|
494
|
-
if (!
|
|
517
|
+
const rawTabId = tabEl.getAttribute('id');
|
|
518
|
+
if (!rawTabId)
|
|
495
519
|
return;
|
|
496
|
-
const
|
|
520
|
+
const splitIds = this.splitTabIds(rawTabId);
|
|
521
|
+
// If multiple IDs, use the first as primary
|
|
522
|
+
const tabId = splitIds[0] || rawTabId;
|
|
523
|
+
// Get header for this tab (single header, not multiple)
|
|
524
|
+
const headerAttr = tabEl.getAttribute('header') || '';
|
|
525
|
+
let header = '';
|
|
526
|
+
if (headerAttr) {
|
|
527
|
+
// Single header provided on the element
|
|
528
|
+
header = headerAttr;
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
// Use config label or id as fallback
|
|
532
|
+
header = this.getTabLabel(tabId, groupId, cfgGroups) || tabId || '';
|
|
533
|
+
}
|
|
534
|
+
// Create a single nav link for this tab element
|
|
497
535
|
const listItem = document.createElement('li');
|
|
498
536
|
listItem.className = 'nav-item';
|
|
499
537
|
const navLink = document.createElement('a');
|
|
500
538
|
navLink.className = 'nav-link';
|
|
501
|
-
// Replace icon shortcodes in header
|
|
502
539
|
navLink.innerHTML = replaceIconShortcodes(header);
|
|
503
540
|
navLink.href = '#';
|
|
504
541
|
navLink.setAttribute('data-tab-id', tabId);
|
|
542
|
+
navLink.setAttribute('data-raw-tab-id', rawTabId);
|
|
505
543
|
navLink.setAttribute('data-group-id', groupId);
|
|
506
544
|
navLink.setAttribute('role', 'tab');
|
|
507
|
-
// Check if
|
|
508
|
-
const
|
|
545
|
+
// Check if any of the split IDs is active
|
|
546
|
+
const activeTabId = this.resolveActiveTabForGroup(groupId, {}, cfgGroups, groupEl); // Pass empty tabs for initial state
|
|
547
|
+
const isActive = splitIds.includes(activeTabId || '');
|
|
509
548
|
if (isActive) {
|
|
510
549
|
navLink.classList.add('active');
|
|
511
550
|
navLink.setAttribute('aria-selected', 'true');
|
|
@@ -513,13 +552,24 @@
|
|
|
513
552
|
else {
|
|
514
553
|
navLink.setAttribute('aria-selected', 'false');
|
|
515
554
|
}
|
|
516
|
-
// Add click handler
|
|
555
|
+
// Add click handler for local tab switch (if split id, switches to default first ID)
|
|
517
556
|
if (onTabClick) {
|
|
518
557
|
navLink.addEventListener('click', (e) => {
|
|
519
558
|
e.preventDefault();
|
|
520
|
-
|
|
559
|
+
// console.log("Single-click detected");
|
|
560
|
+
onTabClick(groupId, tabId, groupEl);
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
// Add double-click handler for sync
|
|
564
|
+
if (onTabDoubleClick) {
|
|
565
|
+
navLink.addEventListener('dblclick', (e) => {
|
|
566
|
+
e.preventDefault();
|
|
567
|
+
// console.log("Double-click detected");
|
|
568
|
+
onTabDoubleClick(groupId, tabId, groupEl);
|
|
521
569
|
});
|
|
522
570
|
}
|
|
571
|
+
// Add tooltip for UX feedback (use native title attribute)
|
|
572
|
+
navLink.setAttribute('title', 'Double click to change switch tabs across all groups');
|
|
523
573
|
listItem.appendChild(navLink);
|
|
524
574
|
navContainer.appendChild(listItem);
|
|
525
575
|
});
|
|
@@ -529,6 +579,44 @@
|
|
|
529
579
|
groupEl.appendChild(bottomBorder);
|
|
530
580
|
});
|
|
531
581
|
}
|
|
582
|
+
/**
|
|
583
|
+
* Toggle nav visibility for all tab groups (viewer-controlled)
|
|
584
|
+
*/
|
|
585
|
+
static setNavsVisibility(rootEl, visible) {
|
|
586
|
+
if (visible) {
|
|
587
|
+
rootEl.classList.remove(NAV_HIDE_ROOT_CLASS);
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
rootEl.classList.add(NAV_HIDE_ROOT_CLASS);
|
|
591
|
+
}
|
|
592
|
+
const navContainers = rootEl.querySelectorAll(`.${NAV_CONTAINER_CLASS}`);
|
|
593
|
+
navContainers.forEach((nav) => {
|
|
594
|
+
if (visible) {
|
|
595
|
+
nav.classList.remove(NAV_HIDDEN_CLASS);
|
|
596
|
+
nav.setAttribute('aria-hidden', 'false');
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
599
|
+
nav.classList.add(NAV_HIDDEN_CLASS);
|
|
600
|
+
nav.setAttribute('aria-hidden', 'true');
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
// Also hide/show the bottom border of tab groups
|
|
604
|
+
const bottomBorders = rootEl.querySelectorAll('.cv-tabgroup-bottom-border');
|
|
605
|
+
bottomBorders.forEach((border) => {
|
|
606
|
+
if (visible) {
|
|
607
|
+
border.classList.remove('cv-hidden');
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
border.classList.add('cv-hidden');
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Read current nav visibility (viewer preference)
|
|
616
|
+
*/
|
|
617
|
+
static areNavsVisible(rootEl) {
|
|
618
|
+
return !rootEl.classList.contains(NAV_HIDE_ROOT_CLASS);
|
|
619
|
+
}
|
|
532
620
|
/**
|
|
533
621
|
* Get tab label from config
|
|
534
622
|
*/
|
|
@@ -542,23 +630,25 @@
|
|
|
542
630
|
return tabCfg?.label || null;
|
|
543
631
|
}
|
|
544
632
|
/**
|
|
545
|
-
* Update active state in navs
|
|
633
|
+
* Update active state in navs for a specific tabgroup element only
|
|
546
634
|
*/
|
|
547
|
-
static updateNavActiveState(
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
635
|
+
static updateNavActiveState(groupEl, activeTabId) {
|
|
636
|
+
const navLinks = groupEl.querySelectorAll('.nav-link');
|
|
637
|
+
navLinks.forEach((link) => {
|
|
638
|
+
const rawTabId = link.getAttribute('data-raw-tab-id');
|
|
639
|
+
if (!rawTabId)
|
|
640
|
+
return;
|
|
641
|
+
// Check if activeTabId is in the split IDs of this link
|
|
642
|
+
const splitIds = this.splitTabIds(rawTabId);
|
|
643
|
+
const isActive = splitIds.includes(activeTabId);
|
|
644
|
+
if (isActive) {
|
|
645
|
+
link.classList.add('active');
|
|
646
|
+
link.setAttribute('aria-selected', 'true');
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
link.classList.remove('active');
|
|
650
|
+
link.setAttribute('aria-selected', 'false');
|
|
651
|
+
}
|
|
562
652
|
});
|
|
563
653
|
}
|
|
564
654
|
/**
|
|
@@ -571,14 +661,19 @@
|
|
|
571
661
|
if (!groupId)
|
|
572
662
|
return;
|
|
573
663
|
// Determine the active tab for this group
|
|
574
|
-
const activeTabId = this.
|
|
664
|
+
const activeTabId = this.resolveActiveTabForGroup(groupId, tabs, cfgGroups, groupEl);
|
|
575
665
|
if (!activeTabId)
|
|
576
666
|
return;
|
|
577
667
|
// Update nav links for this group
|
|
578
668
|
const navLinks = groupEl.querySelectorAll('.nav-link');
|
|
579
669
|
navLinks.forEach((link) => {
|
|
580
|
-
const
|
|
581
|
-
if (
|
|
670
|
+
const rawTabId = link.getAttribute('data-raw-tab-id');
|
|
671
|
+
if (!rawTabId)
|
|
672
|
+
return;
|
|
673
|
+
// Check if activeTabId is in the split IDs of this link
|
|
674
|
+
const splitIds = this.splitTabIds(rawTabId);
|
|
675
|
+
const isActive = splitIds.includes(activeTabId);
|
|
676
|
+
if (isActive) {
|
|
582
677
|
link.classList.add('active');
|
|
583
678
|
link.setAttribute('aria-selected', 'true');
|
|
584
679
|
}
|
|
@@ -589,6 +684,47 @@
|
|
|
589
684
|
});
|
|
590
685
|
});
|
|
591
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* Apply tab selection to a specific tabgroup element only (not globally).
|
|
689
|
+
* Used for single-click behavior to update only the clicked tabgroup.
|
|
690
|
+
*/
|
|
691
|
+
static applyTabLocalOnly(groupEl, activeTabId) {
|
|
692
|
+
const tabElements = Array.from(groupEl.children).filter((child) => child.tagName.toLowerCase() === TAB_SELECTOR);
|
|
693
|
+
tabElements.forEach((tabEl) => {
|
|
694
|
+
const tabId = tabEl.getAttribute('id');
|
|
695
|
+
if (!tabId)
|
|
696
|
+
return;
|
|
697
|
+
const splitIds = this.splitTabIds(tabId);
|
|
698
|
+
const isActive = splitIds.includes(activeTabId);
|
|
699
|
+
this.applyTabVisibility(tabEl, isActive);
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Check if a tabgroup element contains a specific tab ID (respects split IDs).
|
|
704
|
+
* Accepts groupEl to avoid repeated DOM queries.
|
|
705
|
+
*/
|
|
706
|
+
static groupHasTab(groupEl, tabId) {
|
|
707
|
+
const tabElements = Array.from(groupEl.children).filter((child) => child.tagName.toLowerCase() === TAB_SELECTOR);
|
|
708
|
+
return tabElements.some((tabEl) => {
|
|
709
|
+
const idAttr = tabEl.getAttribute('id') || '';
|
|
710
|
+
const splitIds = this.splitTabIds(idAttr);
|
|
711
|
+
return splitIds.includes(tabId);
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Returns array of group elements to be synced (excluding source).
|
|
716
|
+
*/
|
|
717
|
+
static getTabgroupsWithId(rootEl, sourceGroupId, tabId) {
|
|
718
|
+
const syncedGroupEls = [];
|
|
719
|
+
const allGroupEls = Array.from(rootEl.querySelectorAll(`${TABGROUP_SELECTOR}[id="${sourceGroupId}"]`));
|
|
720
|
+
allGroupEls.forEach((targetGroupEl) => {
|
|
721
|
+
// Only sync if target group actually contains this tab
|
|
722
|
+
if (this.groupHasTab(targetGroupEl, tabId)) {
|
|
723
|
+
syncedGroupEls.push(targetGroupEl);
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
return syncedGroupEls;
|
|
727
|
+
}
|
|
592
728
|
}
|
|
593
729
|
|
|
594
730
|
class AssetsManager {
|
|
@@ -704,154 +840,166 @@
|
|
|
704
840
|
/**
|
|
705
841
|
* Styles for toggle visibility and animations
|
|
706
842
|
*/
|
|
707
|
-
const TOGGLE_STYLES = `
|
|
708
|
-
/* Core toggle visibility transitions */
|
|
709
|
-
[data-cv-toggle], [data-customviews-toggle], cv-toggle {
|
|
710
|
-
transition: opacity 150ms ease,
|
|
711
|
-
transform 150ms ease,
|
|
712
|
-
max-height 200ms ease,
|
|
713
|
-
margin 150ms ease;
|
|
714
|
-
will-change: opacity, transform, max-height, margin;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
.cv-visible {
|
|
718
|
-
opacity: 1 !important;
|
|
719
|
-
transform: translateY(0) !important;
|
|
720
|
-
max-height: var(--cv-max-height, 9999px) !important;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
.cv-hidden {
|
|
724
|
-
opacity: 0 !important;
|
|
725
|
-
transform: translateY(-4px) !important;
|
|
726
|
-
pointer-events: none !important;
|
|
727
|
-
padding-top: 0 !important;
|
|
728
|
-
padding-bottom: 0 !important;
|
|
729
|
-
border-top-width: 0 !important;
|
|
730
|
-
border-bottom-width: 0 !important;
|
|
731
|
-
max-height: 0 !important;
|
|
732
|
-
margin-top: 0 !important;
|
|
733
|
-
margin-bottom: 0 !important;
|
|
734
|
-
overflow: hidden !important;
|
|
735
|
-
}
|
|
843
|
+
const TOGGLE_STYLES = `
|
|
844
|
+
/* Core toggle visibility transitions */
|
|
845
|
+
[data-cv-toggle], [data-customviews-toggle], cv-toggle {
|
|
846
|
+
transition: opacity 150ms ease,
|
|
847
|
+
transform 150ms ease,
|
|
848
|
+
max-height 200ms ease,
|
|
849
|
+
margin 150ms ease;
|
|
850
|
+
will-change: opacity, transform, max-height, margin;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.cv-visible {
|
|
854
|
+
opacity: 1 !important;
|
|
855
|
+
transform: translateY(0) !important;
|
|
856
|
+
max-height: var(--cv-max-height, 9999px) !important;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.cv-hidden {
|
|
860
|
+
opacity: 0 !important;
|
|
861
|
+
transform: translateY(-4px) !important;
|
|
862
|
+
pointer-events: none !important;
|
|
863
|
+
padding-top: 0 !important;
|
|
864
|
+
padding-bottom: 0 !important;
|
|
865
|
+
border-top-width: 0 !important;
|
|
866
|
+
border-bottom-width: 0 !important;
|
|
867
|
+
max-height: 0 !important;
|
|
868
|
+
margin-top: 0 !important;
|
|
869
|
+
margin-bottom: 0 !important;
|
|
870
|
+
overflow: hidden !important;
|
|
871
|
+
}
|
|
736
872
|
`;
|
|
737
873
|
|
|
738
874
|
/**
|
|
739
875
|
* Styles for tab groups and tab navigation
|
|
740
876
|
*/
|
|
741
|
-
const TAB_STYLES = `
|
|
742
|
-
/* Tab navigation styles - Bootstrap-style tabs matching MarkBind */
|
|
743
|
-
.cv-tabs-nav {
|
|
744
|
-
display: flex;
|
|
745
|
-
flex-wrap: wrap;
|
|
746
|
-
padding-left: 0;
|
|
747
|
-
margin-top: 0.5rem;
|
|
748
|
-
margin-bottom: 1rem;
|
|
749
|
-
list-style: none;
|
|
750
|
-
border-bottom: 1px solid #dee2e6;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
.cv-tabs-nav .nav-item {
|
|
754
|
-
margin-bottom: -1px;
|
|
755
|
-
list-style: none;
|
|
756
|
-
display: inline-block;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
.cv-tabs-nav .nav-link {
|
|
760
|
-
display: block;
|
|
761
|
-
padding: 0.5rem 1rem;
|
|
762
|
-
color: #495057;
|
|
763
|
-
text-decoration: none;
|
|
764
|
-
background-color: transparent;
|
|
765
|
-
border: 1px solid transparent;
|
|
766
|
-
border-top-left-radius: 0.25rem;
|
|
767
|
-
border-top-right-radius: 0.25rem;
|
|
768
|
-
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
|
769
|
-
cursor: pointer;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
.cv-tabs-nav .nav-link:hover,
|
|
773
|
-
.cv-tabs-nav .nav-link:focus {
|
|
774
|
-
border-color: #e9ecef #e9ecef #dee2e6;
|
|
775
|
-
isolation: isolate;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
.cv-tabs-nav .nav-link.active {
|
|
779
|
-
color: #495057;
|
|
780
|
-
background-color: #fff;
|
|
781
|
-
border-color: #dee2e6 #dee2e6 #fff;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
.cv-tabs-nav .nav-link:focus {
|
|
785
|
-
outline: 0;
|
|
786
|
-
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
/* Legacy button-based nav (deprecated, kept for compatibility) */
|
|
790
|
-
.cv-tabs-nav-item {
|
|
791
|
-
background: none;
|
|
792
|
-
border: none;
|
|
793
|
-
border-bottom: 2px solid transparent;
|
|
794
|
-
padding: 0.5rem 1rem;
|
|
795
|
-
cursor: pointer;
|
|
796
|
-
font-size: 1rem;
|
|
797
|
-
color: #6c757d;
|
|
798
|
-
transition: color 150ms ease, border-color 150ms ease;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
.cv-tabs-nav-item:hover {
|
|
802
|
-
color: #495057;
|
|
803
|
-
border-bottom-color: #dee2e6;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
.cv-tabs-nav-item.active {
|
|
807
|
-
color: #007bff;
|
|
808
|
-
border-bottom-color: #007bff;
|
|
809
|
-
font-weight: 500;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
.cv-tabs-nav-item:focus {
|
|
813
|
-
outline: 2px solid #007bff;
|
|
814
|
-
outline-offset: 2px;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
/* Tab panel base styles */
|
|
818
|
-
cv-tab {
|
|
819
|
-
display: block;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
/* Override visibility for tab panels - use display instead of collapse animation */
|
|
823
|
-
cv-tab.cv-hidden {
|
|
824
|
-
display: none !important;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
cv-tab.cv-visible {
|
|
828
|
-
display: block !important;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
cv-tabgroup {
|
|
832
|
-
display: block;
|
|
833
|
-
margin-bottom: 1.5rem;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
/* Bottom border line for tab groups */
|
|
837
|
-
.cv-tabgroup-bottom-border {
|
|
838
|
-
border-bottom: 1px solid #dee2e6;
|
|
839
|
-
margin-top: 1rem;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
/* Tab content wrapper */
|
|
843
|
-
.cv-tab-content {
|
|
844
|
-
padding: 1rem 0;
|
|
845
|
-
}
|
|
877
|
+
const TAB_STYLES = `
|
|
878
|
+
/* Tab navigation styles - Bootstrap-style tabs matching MarkBind */
|
|
879
|
+
.cv-tabs-nav {
|
|
880
|
+
display: flex;
|
|
881
|
+
flex-wrap: wrap;
|
|
882
|
+
padding-left: 0;
|
|
883
|
+
margin-top: 0.5rem;
|
|
884
|
+
margin-bottom: 1rem;
|
|
885
|
+
list-style: none;
|
|
886
|
+
border-bottom: 1px solid #dee2e6;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.cv-tabs-nav .nav-item {
|
|
890
|
+
margin-bottom: -1px;
|
|
891
|
+
list-style: none;
|
|
892
|
+
display: inline-block;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.cv-tabs-nav .nav-link {
|
|
896
|
+
display: block;
|
|
897
|
+
padding: 0.5rem 1rem;
|
|
898
|
+
color: #495057;
|
|
899
|
+
text-decoration: none;
|
|
900
|
+
background-color: transparent;
|
|
901
|
+
border: 1px solid transparent;
|
|
902
|
+
border-top-left-radius: 0.25rem;
|
|
903
|
+
border-top-right-radius: 0.25rem;
|
|
904
|
+
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
|
905
|
+
cursor: pointer;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.cv-tabs-nav .nav-link:hover,
|
|
909
|
+
.cv-tabs-nav .nav-link:focus {
|
|
910
|
+
border-color: #e9ecef #e9ecef #dee2e6;
|
|
911
|
+
isolation: isolate;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
.cv-tabs-nav .nav-link.active {
|
|
915
|
+
color: #495057;
|
|
916
|
+
background-color: #fff;
|
|
917
|
+
border-color: #dee2e6 #dee2e6 #fff;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.cv-tabs-nav .nav-link:focus {
|
|
921
|
+
outline: 0;
|
|
922
|
+
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
/* Legacy button-based nav (deprecated, kept for compatibility) */
|
|
926
|
+
.cv-tabs-nav-item {
|
|
927
|
+
background: none;
|
|
928
|
+
border: none;
|
|
929
|
+
border-bottom: 2px solid transparent;
|
|
930
|
+
padding: 0.5rem 1rem;
|
|
931
|
+
cursor: pointer;
|
|
932
|
+
font-size: 1rem;
|
|
933
|
+
color: #6c757d;
|
|
934
|
+
transition: color 150ms ease, border-color 150ms ease;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.cv-tabs-nav-item:hover {
|
|
938
|
+
color: #495057;
|
|
939
|
+
border-bottom-color: #dee2e6;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.cv-tabs-nav-item.active {
|
|
943
|
+
color: #007bff;
|
|
944
|
+
border-bottom-color: #007bff;
|
|
945
|
+
font-weight: 500;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.cv-tabs-nav-item:focus {
|
|
949
|
+
outline: 2px solid #007bff;
|
|
950
|
+
outline-offset: 2px;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/* Tab panel base styles */
|
|
954
|
+
cv-tab {
|
|
955
|
+
display: block;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
/* Override visibility for tab panels - use display instead of collapse animation */
|
|
959
|
+
cv-tab.cv-hidden {
|
|
960
|
+
display: none !important;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
cv-tab.cv-visible {
|
|
964
|
+
display: block !important;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
cv-tabgroup {
|
|
968
|
+
display: block;
|
|
969
|
+
margin-bottom: 1.5rem;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
/* Bottom border line for tab groups */
|
|
973
|
+
.cv-tabgroup-bottom-border {
|
|
974
|
+
border-bottom: 1px solid #dee2e6;
|
|
975
|
+
margin-top: 1rem;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/* Tab content wrapper */
|
|
979
|
+
.cv-tab-content {
|
|
980
|
+
padding: 1rem 0;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/* Viewer-controlled nav visibility: hide nav containers when requested */
|
|
984
|
+
.cv-tabs-nav-hidden {
|
|
985
|
+
display: none !important;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
/* Print-friendly: hide tab navigation when printing to reduce clutter */
|
|
989
|
+
@media print {
|
|
990
|
+
.cv-tabs-nav {
|
|
991
|
+
display: none !important;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
846
994
|
`;
|
|
847
995
|
|
|
848
996
|
/**
|
|
849
997
|
* Combined core styles for toggles and tabs
|
|
850
998
|
*/
|
|
851
|
-
const CORE_STYLES = `
|
|
852
|
-
${TOGGLE_STYLES}
|
|
853
|
-
|
|
854
|
-
${TAB_STYLES}
|
|
999
|
+
const CORE_STYLES = `
|
|
1000
|
+
${TOGGLE_STYLES}
|
|
1001
|
+
|
|
1002
|
+
${TAB_STYLES}
|
|
855
1003
|
`;
|
|
856
1004
|
/**
|
|
857
1005
|
* Add styles for hiding and showing toggles animations and transitions to the document head
|
|
@@ -910,33 +1058,51 @@ ${TAB_STYLES}
|
|
|
910
1058
|
/**
|
|
911
1059
|
* Set active tab for a group and apply state
|
|
912
1060
|
*/
|
|
913
|
-
setActiveTab(groupId, tabId) {
|
|
914
|
-
//
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
const event = new CustomEvent('customviews:tab-change', {
|
|
928
|
-
detail: { groupId, tabId },
|
|
929
|
-
bubbles: true
|
|
930
|
-
});
|
|
931
|
-
document.dispatchEvent(event);
|
|
1061
|
+
setActiveTab(groupId, tabId, groupEl) {
|
|
1062
|
+
// If groupEl is provided, apply tab selection locally to just that element
|
|
1063
|
+
// Single-click: only updates DOM visually, no persistence
|
|
1064
|
+
if (groupEl) {
|
|
1065
|
+
TabManager.applyTabLocalOnly(groupEl, tabId);
|
|
1066
|
+
// Update nav active state for this group element only
|
|
1067
|
+
TabManager.updateNavActiveState(groupEl, tabId);
|
|
1068
|
+
// Emit custom event for local tab change
|
|
1069
|
+
const event = new CustomEvent('customviews:tab-change', {
|
|
1070
|
+
detail: { groupId, tabId, synced: false },
|
|
1071
|
+
bubbles: true
|
|
1072
|
+
});
|
|
1073
|
+
document.dispatchEvent(event);
|
|
1074
|
+
}
|
|
932
1075
|
}
|
|
933
1076
|
// Inject styles, setup listeners and call rendering logic
|
|
934
1077
|
async init() {
|
|
935
1078
|
injectCoreStyles();
|
|
936
|
-
// Build navigation once (with click handlers)
|
|
937
|
-
TabManager.buildNavs(this.rootEl, this.config.tabGroups,
|
|
938
|
-
|
|
1079
|
+
// Build navigation once (with click and double-click handlers)
|
|
1080
|
+
TabManager.buildNavs(this.rootEl, this.config.tabGroups,
|
|
1081
|
+
// Single click: update clicked group only (local, no persistence)
|
|
1082
|
+
(groupId, tabId, groupEl) => {
|
|
1083
|
+
this.setActiveTab(groupId, tabId, groupEl);
|
|
1084
|
+
},
|
|
1085
|
+
// Double click: sync across all tabgroups with same id (with persistence)
|
|
1086
|
+
(groupId, tabId, _groupEl) => {
|
|
1087
|
+
const currentTabs = this.getCurrentActiveTabs();
|
|
1088
|
+
currentTabs[groupId] = tabId;
|
|
1089
|
+
const currentToggles = this.getCurrentActiveToggles();
|
|
1090
|
+
const newState = {
|
|
1091
|
+
toggles: currentToggles,
|
|
1092
|
+
tabs: currentTabs
|
|
1093
|
+
};
|
|
1094
|
+
// applyState() will handle all visual updates via renderState()
|
|
1095
|
+
this.applyState(newState);
|
|
939
1096
|
});
|
|
1097
|
+
// Apply stored nav visibility preference on page load
|
|
1098
|
+
try {
|
|
1099
|
+
const navPref = localStorage.getItem('cv-tab-navs-visible');
|
|
1100
|
+
if (navPref !== null) {
|
|
1101
|
+
const visible = navPref === 'true';
|
|
1102
|
+
TabManager.setNavsVisibility(this.rootEl, visible);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
catch (e) { /* ignore */ }
|
|
940
1106
|
// For session history, clicks on back/forward button
|
|
941
1107
|
window.addEventListener("popstate", () => {
|
|
942
1108
|
this.loadAndCallApplyState();
|
|
@@ -1227,696 +1393,993 @@ ${TAB_STYLES}
|
|
|
1227
1393
|
* Note: Styles are kept as a TypeScript string for compatibility with the build system.
|
|
1228
1394
|
* This approach ensures the styles are properly bundled and don't require separate CSS file handling.
|
|
1229
1395
|
*/
|
|
1230
|
-
const WIDGET_STYLES = `
|
|
1231
|
-
/* Rounded rectangle widget icon styles */
|
|
1232
|
-
.cv-widget-icon {
|
|
1233
|
-
position: fixed;
|
|
1234
|
-
/* Slightly transparent by default so the widget is subtle at the page edge */
|
|
1235
|
-
background: rgba(255, 255, 255, 0.92);
|
|
1236
|
-
color: rgba(0, 0, 0, 0.9);
|
|
1237
|
-
opacity: 0.6;
|
|
1238
|
-
display: flex;
|
|
1239
|
-
align-items: center;
|
|
1240
|
-
justify-content: center;
|
|
1241
|
-
font-size: 18px;
|
|
1242
|
-
font-weight: bold;
|
|
1243
|
-
cursor: pointer;
|
|
1244
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1245
|
-
z-index: 9998;
|
|
1246
|
-
transition: all 0.3s ease;
|
|
1247
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
.cv-widget-icon:hover {
|
|
1251
|
-
/* Become fully opaque on hover to improve readability */
|
|
1252
|
-
background: rgba(255, 255, 255, 1);
|
|
1253
|
-
color: rgba(0, 0, 0, 1);
|
|
1254
|
-
opacity: 1;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
/* Top-right: rounded end on left, sticks out leftward on hover */
|
|
1258
|
-
.cv-widget-top-right {
|
|
1259
|
-
top: 20px;
|
|
1260
|
-
right: 0;
|
|
1261
|
-
border-radius: 18px 0 0 18px;
|
|
1262
|
-
padding-left: 8px;
|
|
1263
|
-
justify-content: flex-start;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
/* Top-left: rounded end on right, sticks out rightward on hover */
|
|
1267
|
-
.cv-widget-top-left {
|
|
1268
|
-
top: 20px;
|
|
1269
|
-
left: 0;
|
|
1270
|
-
border-radius: 0 18px 18px 0;
|
|
1271
|
-
padding-right: 8px;
|
|
1272
|
-
justify-content: flex-end;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
/* Bottom-right: rounded end on left, sticks out leftward on hover */
|
|
1276
|
-
.cv-widget-bottom-right {
|
|
1277
|
-
bottom: 20px;
|
|
1278
|
-
right: 0;
|
|
1279
|
-
border-radius: 18px 0 0 18px;
|
|
1280
|
-
padding-left: 8px;
|
|
1281
|
-
justify-content: flex-start;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
/* Bottom-left: rounded end on right, sticks out rightward on hover */
|
|
1285
|
-
.cv-widget-bottom-left {
|
|
1286
|
-
bottom: 20px;
|
|
1287
|
-
left: 0;
|
|
1288
|
-
border-radius: 0 18px 18px 0;
|
|
1289
|
-
padding-right: 8px;
|
|
1290
|
-
justify-content: flex-end;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
/* Middle-left: rounded end on right, sticks out rightward on hover */
|
|
1294
|
-
.cv-widget-middle-left {
|
|
1295
|
-
top: 50%;
|
|
1296
|
-
left: 0;
|
|
1297
|
-
transform: translateY(-50%);
|
|
1298
|
-
border-radius: 0 18px 18px 0;
|
|
1299
|
-
padding-right: 8px;
|
|
1300
|
-
justify-content: flex-end;
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
/* Middle-right: rounded end on left, sticks out leftward on hover */
|
|
1304
|
-
.cv-widget-middle-right {
|
|
1305
|
-
top: 50%;
|
|
1306
|
-
right: 0;
|
|
1307
|
-
transform: translateY(-50%);
|
|
1308
|
-
border-radius: 18px 0 0 18px;
|
|
1309
|
-
padding-left: 8px;
|
|
1310
|
-
justify-content: flex-start;
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
.cv-widget-top-right,
|
|
1314
|
-
.cv-widget-middle-right,
|
|
1315
|
-
.cv-widget-bottom-right,
|
|
1316
|
-
.cv-widget-top-left,
|
|
1317
|
-
.cv-widget-middle-left,
|
|
1318
|
-
.cv-widget-bottom-left {
|
|
1319
|
-
height: 36px;
|
|
1320
|
-
width: 36px;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
.cv-widget-middle-right:hover,
|
|
1324
|
-
.cv-widget-top-right:hover,
|
|
1325
|
-
.cv-widget-bottom-right:hover,
|
|
1326
|
-
.cv-widget-top-left:hover,
|
|
1327
|
-
.cv-widget-middle-left:hover,
|
|
1328
|
-
.cv-widget-bottom-left:hover {
|
|
1329
|
-
width: 55px;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
/* Modal content styles */
|
|
1333
|
-
.cv-widget-section {
|
|
1334
|
-
margin-bottom: 16px;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
.cv-widget-section:last-child {
|
|
1338
|
-
margin-bottom: 0;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
.cv-widget-section label {
|
|
1342
|
-
display: block;
|
|
1343
|
-
margin-bottom: 4px;
|
|
1344
|
-
font-weight: 500;
|
|
1345
|
-
color: #555;
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
.cv-widget-profile-select,
|
|
1349
|
-
.cv-widget-state-select {
|
|
1350
|
-
width: 100%;
|
|
1351
|
-
padding: 8px 12px;
|
|
1352
|
-
border: 1px solid #ddd;
|
|
1353
|
-
border-radius: 4px;
|
|
1354
|
-
background: white;
|
|
1355
|
-
font-size: 14px;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
.cv-widget-profile-select:focus,
|
|
1359
|
-
.cv-widget-state-select:focus {
|
|
1360
|
-
outline: none;
|
|
1361
|
-
border-color: #007bff;
|
|
1362
|
-
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
.cv-widget-profile-select:disabled,
|
|
1366
|
-
.cv-widget-state-select:disabled {
|
|
1367
|
-
background: #f8f9fa;
|
|
1368
|
-
color: #6c757d;
|
|
1369
|
-
cursor: not-allowed;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
.cv-widget-current {
|
|
1373
|
-
margin: 16px 0;
|
|
1374
|
-
padding: 12px;
|
|
1375
|
-
background: #f8f9fa;
|
|
1376
|
-
border-radius: 4px;
|
|
1377
|
-
border-left: 4px solid #007bff;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
.cv-widget-current label {
|
|
1381
|
-
font-size: 12px;
|
|
1382
|
-
text-transform: uppercase;
|
|
1383
|
-
letter-spacing: 0.5px;
|
|
1384
|
-
color: #666;
|
|
1385
|
-
margin-bottom: 4px;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
.cv-widget-current-view {
|
|
1389
|
-
font-weight: 500;
|
|
1390
|
-
color: #333;
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
.cv-widget-reset {
|
|
1394
|
-
width: 100%;
|
|
1395
|
-
padding: 8px 16px;
|
|
1396
|
-
background: #dc3545;
|
|
1397
|
-
color: white;
|
|
1398
|
-
border: none;
|
|
1399
|
-
border-radius: 4px;
|
|
1400
|
-
cursor: pointer;
|
|
1401
|
-
font-size: 14px;
|
|
1402
|
-
font-weight: 500;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
.cv-widget-reset:hover {
|
|
1406
|
-
background: #c82333;
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
.cv-widget-reset:active {
|
|
1410
|
-
background: #bd2130;
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
/* Responsive design for mobile */
|
|
1414
|
-
@media (max-width: 768px) {
|
|
1415
|
-
.cv-widget-top-right,
|
|
1416
|
-
.cv-widget-top-left {
|
|
1417
|
-
top: 10px;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
.cv-widget-bottom-right,
|
|
1421
|
-
.cv-widget-bottom-left {
|
|
1422
|
-
bottom: 10px;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
/* All widgets stay flush with screen edges */
|
|
1426
|
-
.cv-widget-top-right,
|
|
1427
|
-
.cv-widget-bottom-right,
|
|
1428
|
-
.cv-widget-middle-right {
|
|
1429
|
-
right: 0;
|
|
1430
|
-
}
|
|
1431
|
-
|
|
1432
|
-
.cv-widget-top-left,
|
|
1433
|
-
.cv-widget-bottom-left,
|
|
1434
|
-
.cv-widget-middle-left {
|
|
1435
|
-
left: 0;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
/* Slightly smaller on mobile */
|
|
1439
|
-
.cv-widget-icon {
|
|
1440
|
-
width: 60px;
|
|
1441
|
-
height: 32px;
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
.cv-widget-icon:hover {
|
|
1445
|
-
width: 75px;
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
/* Modal styles */
|
|
1450
|
-
.cv-widget-modal-overlay {
|
|
1451
|
-
position: fixed;
|
|
1452
|
-
top: 0;
|
|
1453
|
-
left: 0;
|
|
1454
|
-
right: 0;
|
|
1455
|
-
bottom: 0;
|
|
1456
|
-
background: rgba(0, 0, 0, 0.5);
|
|
1457
|
-
display: flex;
|
|
1458
|
-
align-items: center;
|
|
1459
|
-
justify-content: center;
|
|
1460
|
-
z-index: 10002;
|
|
1461
|
-
animation: fadeIn 0.2s ease;
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
@keyframes fadeIn {
|
|
1465
|
-
from { opacity: 0; }
|
|
1466
|
-
to { opacity: 1; }
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
.cv-widget-modal {
|
|
1470
|
-
background: white;
|
|
1471
|
-
border-radius:
|
|
1472
|
-
box-shadow: 0
|
|
1473
|
-
max-width:
|
|
1474
|
-
width: 90vw;
|
|
1475
|
-
max-height: 80vh;
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
align-items: center;
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
border
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
.
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
font-size:
|
|
1565
|
-
|
|
1566
|
-
margin
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
.cv-widget-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
background: #
|
|
1594
|
-
color:
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
.cv-
|
|
1603
|
-
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
.cv-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
color:
|
|
1611
|
-
border
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
.cv-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
.cv-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
.cv-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
.cv-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
padding:
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
font-
|
|
1778
|
-
font-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
.cv-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
.cv-widget-theme-dark .cv-
|
|
1836
|
-
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
.
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
.cv-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1396
|
+
const WIDGET_STYLES = `
|
|
1397
|
+
/* Rounded rectangle widget icon styles */
|
|
1398
|
+
.cv-widget-icon {
|
|
1399
|
+
position: fixed;
|
|
1400
|
+
/* Slightly transparent by default so the widget is subtle at the page edge */
|
|
1401
|
+
background: rgba(255, 255, 255, 0.92);
|
|
1402
|
+
color: rgba(0, 0, 0, 0.9);
|
|
1403
|
+
opacity: 0.6;
|
|
1404
|
+
display: flex;
|
|
1405
|
+
align-items: center;
|
|
1406
|
+
justify-content: center;
|
|
1407
|
+
font-size: 18px;
|
|
1408
|
+
font-weight: bold;
|
|
1409
|
+
cursor: pointer;
|
|
1410
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1411
|
+
z-index: 9998;
|
|
1412
|
+
transition: all 0.3s ease;
|
|
1413
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.cv-widget-icon:hover {
|
|
1417
|
+
/* Become fully opaque on hover to improve readability */
|
|
1418
|
+
background: rgba(255, 255, 255, 1);
|
|
1419
|
+
color: rgba(0, 0, 0, 1);
|
|
1420
|
+
opacity: 1;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/* Top-right: rounded end on left, sticks out leftward on hover */
|
|
1424
|
+
.cv-widget-top-right {
|
|
1425
|
+
top: 20px;
|
|
1426
|
+
right: 0;
|
|
1427
|
+
border-radius: 18px 0 0 18px;
|
|
1428
|
+
padding-left: 8px;
|
|
1429
|
+
justify-content: flex-start;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
/* Top-left: rounded end on right, sticks out rightward on hover */
|
|
1433
|
+
.cv-widget-top-left {
|
|
1434
|
+
top: 20px;
|
|
1435
|
+
left: 0;
|
|
1436
|
+
border-radius: 0 18px 18px 0;
|
|
1437
|
+
padding-right: 8px;
|
|
1438
|
+
justify-content: flex-end;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/* Bottom-right: rounded end on left, sticks out leftward on hover */
|
|
1442
|
+
.cv-widget-bottom-right {
|
|
1443
|
+
bottom: 20px;
|
|
1444
|
+
right: 0;
|
|
1445
|
+
border-radius: 18px 0 0 18px;
|
|
1446
|
+
padding-left: 8px;
|
|
1447
|
+
justify-content: flex-start;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/* Bottom-left: rounded end on right, sticks out rightward on hover */
|
|
1451
|
+
.cv-widget-bottom-left {
|
|
1452
|
+
bottom: 20px;
|
|
1453
|
+
left: 0;
|
|
1454
|
+
border-radius: 0 18px 18px 0;
|
|
1455
|
+
padding-right: 8px;
|
|
1456
|
+
justify-content: flex-end;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
/* Middle-left: rounded end on right, sticks out rightward on hover */
|
|
1460
|
+
.cv-widget-middle-left {
|
|
1461
|
+
top: 50%;
|
|
1462
|
+
left: 0;
|
|
1463
|
+
transform: translateY(-50%);
|
|
1464
|
+
border-radius: 0 18px 18px 0;
|
|
1465
|
+
padding-right: 8px;
|
|
1466
|
+
justify-content: flex-end;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/* Middle-right: rounded end on left, sticks out leftward on hover */
|
|
1470
|
+
.cv-widget-middle-right {
|
|
1471
|
+
top: 50%;
|
|
1472
|
+
right: 0;
|
|
1473
|
+
transform: translateY(-50%);
|
|
1474
|
+
border-radius: 18px 0 0 18px;
|
|
1475
|
+
padding-left: 8px;
|
|
1476
|
+
justify-content: flex-start;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
.cv-widget-top-right,
|
|
1480
|
+
.cv-widget-middle-right,
|
|
1481
|
+
.cv-widget-bottom-right,
|
|
1482
|
+
.cv-widget-top-left,
|
|
1483
|
+
.cv-widget-middle-left,
|
|
1484
|
+
.cv-widget-bottom-left {
|
|
1485
|
+
height: 36px;
|
|
1486
|
+
width: 36px;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.cv-widget-middle-right:hover,
|
|
1490
|
+
.cv-widget-top-right:hover,
|
|
1491
|
+
.cv-widget-bottom-right:hover,
|
|
1492
|
+
.cv-widget-top-left:hover,
|
|
1493
|
+
.cv-widget-middle-left:hover,
|
|
1494
|
+
.cv-widget-bottom-left:hover {
|
|
1495
|
+
width: 55px;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
/* Modal content styles */
|
|
1499
|
+
.cv-widget-section {
|
|
1500
|
+
margin-bottom: 16px;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
.cv-widget-section:last-child {
|
|
1504
|
+
margin-bottom: 0;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
.cv-widget-section label {
|
|
1508
|
+
display: block;
|
|
1509
|
+
margin-bottom: 4px;
|
|
1510
|
+
font-weight: 500;
|
|
1511
|
+
color: #555;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
.cv-widget-profile-select,
|
|
1515
|
+
.cv-widget-state-select {
|
|
1516
|
+
width: 100%;
|
|
1517
|
+
padding: 8px 12px;
|
|
1518
|
+
border: 1px solid #ddd;
|
|
1519
|
+
border-radius: 4px;
|
|
1520
|
+
background: white;
|
|
1521
|
+
font-size: 14px;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
.cv-widget-profile-select:focus,
|
|
1525
|
+
.cv-widget-state-select:focus {
|
|
1526
|
+
outline: none;
|
|
1527
|
+
border-color: #007bff;
|
|
1528
|
+
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
.cv-widget-profile-select:disabled,
|
|
1532
|
+
.cv-widget-state-select:disabled {
|
|
1533
|
+
background: #f8f9fa;
|
|
1534
|
+
color: #6c757d;
|
|
1535
|
+
cursor: not-allowed;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
.cv-widget-current {
|
|
1539
|
+
margin: 16px 0;
|
|
1540
|
+
padding: 12px;
|
|
1541
|
+
background: #f8f9fa;
|
|
1542
|
+
border-radius: 4px;
|
|
1543
|
+
border-left: 4px solid #007bff;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
.cv-widget-current label {
|
|
1547
|
+
font-size: 12px;
|
|
1548
|
+
text-transform: uppercase;
|
|
1549
|
+
letter-spacing: 0.5px;
|
|
1550
|
+
color: #666;
|
|
1551
|
+
margin-bottom: 4px;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
.cv-widget-current-view {
|
|
1555
|
+
font-weight: 500;
|
|
1556
|
+
color: #333;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
.cv-widget-reset {
|
|
1560
|
+
width: 100%;
|
|
1561
|
+
padding: 8px 16px;
|
|
1562
|
+
background: #dc3545;
|
|
1563
|
+
color: white;
|
|
1564
|
+
border: none;
|
|
1565
|
+
border-radius: 4px;
|
|
1566
|
+
cursor: pointer;
|
|
1567
|
+
font-size: 14px;
|
|
1568
|
+
font-weight: 500;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
.cv-widget-reset:hover {
|
|
1572
|
+
background: #c82333;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
.cv-widget-reset:active {
|
|
1576
|
+
background: #bd2130;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
/* Responsive design for mobile */
|
|
1580
|
+
@media (max-width: 768px) {
|
|
1581
|
+
.cv-widget-top-right,
|
|
1582
|
+
.cv-widget-top-left {
|
|
1583
|
+
top: 10px;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
.cv-widget-bottom-right,
|
|
1587
|
+
.cv-widget-bottom-left {
|
|
1588
|
+
bottom: 10px;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
/* All widgets stay flush with screen edges */
|
|
1592
|
+
.cv-widget-top-right,
|
|
1593
|
+
.cv-widget-bottom-right,
|
|
1594
|
+
.cv-widget-middle-right {
|
|
1595
|
+
right: 0;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.cv-widget-top-left,
|
|
1599
|
+
.cv-widget-bottom-left,
|
|
1600
|
+
.cv-widget-middle-left {
|
|
1601
|
+
left: 0;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
/* Slightly smaller on mobile */
|
|
1605
|
+
.cv-widget-icon {
|
|
1606
|
+
width: 60px;
|
|
1607
|
+
height: 32px;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
.cv-widget-icon:hover {
|
|
1611
|
+
width: 75px;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/* Modal styles */
|
|
1616
|
+
.cv-widget-modal-overlay {
|
|
1617
|
+
position: fixed;
|
|
1618
|
+
top: 0;
|
|
1619
|
+
left: 0;
|
|
1620
|
+
right: 0;
|
|
1621
|
+
bottom: 0;
|
|
1622
|
+
background: rgba(0, 0, 0, 0.5);
|
|
1623
|
+
display: flex;
|
|
1624
|
+
align-items: center;
|
|
1625
|
+
justify-content: center;
|
|
1626
|
+
z-index: 10002;
|
|
1627
|
+
animation: fadeIn 0.2s ease;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
@keyframes fadeIn {
|
|
1631
|
+
from { opacity: 0; }
|
|
1632
|
+
to { opacity: 1; }
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
.cv-widget-modal {
|
|
1636
|
+
background: white;
|
|
1637
|
+
border-radius: 0.75rem;
|
|
1638
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
1639
|
+
max-width: 32rem;
|
|
1640
|
+
width: 90vw;
|
|
1641
|
+
max-height: 80vh;
|
|
1642
|
+
animation: slideIn 0.2s ease;
|
|
1643
|
+
display: flex;
|
|
1644
|
+
flex-direction: column;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
@keyframes slideIn {
|
|
1648
|
+
from {
|
|
1649
|
+
opacity: 0;
|
|
1650
|
+
transform: scale(0.9) translateY(-20px);
|
|
1651
|
+
}
|
|
1652
|
+
to {
|
|
1653
|
+
opacity: 1;
|
|
1654
|
+
transform: scale(1) translateY(0);
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
.cv-modal-header {
|
|
1659
|
+
display: flex;
|
|
1660
|
+
align-items: center;
|
|
1661
|
+
justify-content: space-between;
|
|
1662
|
+
padding: 0.5rem 1rem;
|
|
1663
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
.cv-modal-header-content {
|
|
1667
|
+
display: flex;
|
|
1668
|
+
align-items: center;
|
|
1669
|
+
gap: 0.75rem;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
.cv-modal-icon {
|
|
1673
|
+
position: relative;
|
|
1674
|
+
width: 1rem;
|
|
1675
|
+
height: 1rem;
|
|
1676
|
+
display: flex;
|
|
1677
|
+
align-items: center;
|
|
1678
|
+
justify-content: center;
|
|
1679
|
+
border-radius: 9999px;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
.cv-modal-icon-svg {
|
|
1683
|
+
width: 100%;
|
|
1684
|
+
height: 100%;
|
|
1685
|
+
opacity: 1;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
.cv-modal-title {
|
|
1689
|
+
font-size: 1.125rem;
|
|
1690
|
+
font-weight: bold;
|
|
1691
|
+
color: rgba(0, 0, 0, 0.9);
|
|
1692
|
+
margin: 0;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
.cv-modal-close {
|
|
1696
|
+
width: 2rem;
|
|
1697
|
+
height: 2rem;
|
|
1698
|
+
display: flex;
|
|
1699
|
+
align-items: center;
|
|
1700
|
+
justify-content: center;
|
|
1701
|
+
border-radius: 9999px;
|
|
1702
|
+
background: transparent;
|
|
1703
|
+
border: none;
|
|
1704
|
+
color: rgba(0, 0, 0, 0.6);
|
|
1705
|
+
cursor: pointer;
|
|
1706
|
+
transition: all 0.2s ease;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
.cv-modal-close:hover {
|
|
1710
|
+
background: rgba(62, 132, 244, 0.1);
|
|
1711
|
+
color: #3e84f4;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.cv-modal-close-icon {
|
|
1715
|
+
width: 1.25rem;
|
|
1716
|
+
height: 1.25rem;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
.cv-modal-main {
|
|
1720
|
+
padding: 1rem;
|
|
1721
|
+
flex: 1;
|
|
1722
|
+
display: flex;
|
|
1723
|
+
flex-direction: column;
|
|
1724
|
+
gap: 1rem;
|
|
1725
|
+
overflow-y: auto;
|
|
1726
|
+
max-height: calc(80vh - 8rem);
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
.cv-modal-description {
|
|
1730
|
+
font-size: 0.875rem;
|
|
1731
|
+
color: rgba(0, 0, 0, 0.8);
|
|
1732
|
+
margin: 0;
|
|
1733
|
+
line-height: 1.4;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
.cv-content-section,
|
|
1737
|
+
.cv-tab-groups-section {
|
|
1738
|
+
display: flex;
|
|
1739
|
+
flex-direction: column;
|
|
1740
|
+
gap: 0.75rem;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
.cv-section-heading {
|
|
1744
|
+
font-size: 1rem;
|
|
1745
|
+
font-weight: bold;
|
|
1746
|
+
color: rgba(0, 0, 0, 0.9);
|
|
1747
|
+
margin: 0;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
.cv-widget-modal-actions {
|
|
1751
|
+
margin-top: 20px;
|
|
1752
|
+
padding-top: 16px;
|
|
1753
|
+
border-top: 1px solid #e9ecef;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.cv-widget-restore {
|
|
1757
|
+
width: 100%;
|
|
1758
|
+
padding: 10px 16px;
|
|
1759
|
+
background: #28a745;
|
|
1760
|
+
color: white;
|
|
1761
|
+
border: none;
|
|
1762
|
+
border-radius: 4px;
|
|
1763
|
+
cursor: pointer;
|
|
1764
|
+
font-size: 14px;
|
|
1765
|
+
font-weight: 500;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
.cv-widget-restore:hover {
|
|
1769
|
+
background: #218838;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
.cv-widget-create-state {
|
|
1773
|
+
width: 100%;
|
|
1774
|
+
padding: 10px 16px;
|
|
1775
|
+
background: #007bff;
|
|
1776
|
+
color: white;
|
|
1777
|
+
border: none;
|
|
1778
|
+
border-radius: 4px;
|
|
1779
|
+
cursor: pointer;
|
|
1780
|
+
font-size: 14px;
|
|
1781
|
+
font-weight: 500;
|
|
1782
|
+
margin-bottom: 10px;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.cv-widget-create-state:hover {
|
|
1786
|
+
background: #0056b3;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
.cv-widget-theme-dark .cv-widget-modal {
|
|
1790
|
+
background: #101722;
|
|
1791
|
+
color: #e2e8f0;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
.cv-widget-theme-dark .cv-modal-header {
|
|
1795
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
.cv-widget-theme-dark .cv-modal-title {
|
|
1799
|
+
color: #e2e8f0;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
.cv-widget-theme-dark .cv-modal-close {
|
|
1803
|
+
color: rgba(255, 255, 255, 0.6);
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
.cv-widget-theme-dark .cv-modal-close:hover {
|
|
1807
|
+
background: rgba(62, 132, 244, 0.2);
|
|
1808
|
+
color: #3e84f4;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
.cv-widget-theme-dark .cv-modal-description {
|
|
1812
|
+
color: rgba(255, 255, 255, 0.8);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
.cv-widget-theme-dark .cv-section-heading {
|
|
1816
|
+
color: #e2e8f0;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
.cv-widget-theme-dark .cv-toggles-container
|
|
1820
|
+
.cv-widget-theme-dark .cv-tabgroups-container {
|
|
1821
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
.cv-widget-theme-dark .cv-toggle-card,
|
|
1825
|
+
.cv-widget-theme-dark .cv-tabgroup-card {
|
|
1826
|
+
background: #101722;
|
|
1827
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
.cv-widget-theme-dark .cv-toggle-title,
|
|
1831
|
+
.cv-widget-theme-dark .cv-tabgroup-title {
|
|
1832
|
+
color: #e2e8f0;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.cv-widget-theme-dark .cv-toggle-description,
|
|
1836
|
+
.cv-widget-theme-dark .cv-tabgroup-description {
|
|
1837
|
+
color: rgba(255, 255, 255, 0.6);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.cv-widget-theme-dark .cv-toggle-slider {
|
|
1841
|
+
background: rgba(255, 255, 255, 0.2);
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
.cv-widget-theme-dark .cv-tab-group-description {
|
|
1845
|
+
color: rgba(255, 255, 255, 0.8);
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
.cv-widget-theme-dark .cv-tabgroup-select {
|
|
1849
|
+
background: #101722;
|
|
1850
|
+
border-color: rgba(255, 255, 255, 0.2);
|
|
1851
|
+
color: #e2e8f0;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
.cv-widget-theme-dark .cv-modal-footer {
|
|
1855
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
1856
|
+
background: #101722;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
.cv-widget-theme-dark .cv-reset-btn {
|
|
1860
|
+
color: #e2e8f0;
|
|
1861
|
+
background: rgba(255, 255, 255, 0.1);
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
.cv-widget-theme-dark .cv-reset-btn:hover {
|
|
1865
|
+
background: rgba(255, 255, 255, 0.2);
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
/* Custom state creator styles */
|
|
1869
|
+
.cv-custom-state-modal {
|
|
1870
|
+
max-width: 500px;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
.cv-custom-state-form .cv-section-header {
|
|
1874
|
+
font-size: 16px;
|
|
1875
|
+
font-weight: 600;
|
|
1876
|
+
color: #333;
|
|
1877
|
+
border-bottom: 1px solid #e9ecef;
|
|
1878
|
+
padding-bottom: 5px;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
.cv-custom-state-form p {
|
|
1882
|
+
font-size: 15px;
|
|
1883
|
+
line-height: 1.6;
|
|
1884
|
+
color: #555;
|
|
1885
|
+
margin-bottom: 24px;
|
|
1886
|
+
text-align: justify;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
.cv-custom-state-section {
|
|
1890
|
+
margin-bottom: 16px;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
.cv-custom-state-section label {
|
|
1894
|
+
display: block;
|
|
1895
|
+
margin-bottom: 4px;
|
|
1896
|
+
font-weight: 500;
|
|
1897
|
+
color: #555;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
.cv-custom-state-input {
|
|
1901
|
+
width: 100%;
|
|
1902
|
+
padding: 8px 12px;
|
|
1903
|
+
border: 1px solid #ddd;
|
|
1904
|
+
border-radius: 4px;
|
|
1905
|
+
background: white;
|
|
1906
|
+
font-size: 14px;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
.cv-custom-state-input:focus {
|
|
1910
|
+
outline: none;
|
|
1911
|
+
border-color: #007bff;
|
|
1912
|
+
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
/* Toggles Container */
|
|
1916
|
+
.cv-toggles-container {
|
|
1917
|
+
display: flex;
|
|
1918
|
+
flex-direction: column;
|
|
1919
|
+
gap: 0.5rem;
|
|
1920
|
+
border-radius: 0.5rem;
|
|
1921
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
1922
|
+
overflow: hidden;
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
.cv-toggle-card,
|
|
1926
|
+
.cv-tabgroup-card {
|
|
1927
|
+
background: white;
|
|
1928
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
.cv-toggle-card:last-child {
|
|
1932
|
+
border-bottom: none;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.cv-toggle-content {
|
|
1936
|
+
display: flex;
|
|
1937
|
+
align-items: center;
|
|
1938
|
+
justify-content: space-between;
|
|
1939
|
+
padding: 0.75rem;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
.cv-toggle-title {
|
|
1943
|
+
font-weight: 500;
|
|
1944
|
+
font-size: 0.875rem;
|
|
1945
|
+
color: rgba(0, 0, 0, 0.9);
|
|
1946
|
+
margin: 0 0 0.125rem 0;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
.cv-toggle-description {
|
|
1950
|
+
font-size: 0.75rem;
|
|
1951
|
+
color: rgba(0, 0, 0, 0.6);
|
|
1952
|
+
margin: 0;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
.cv-toggle-label{
|
|
1956
|
+
position: relative;
|
|
1957
|
+
display: inline-block;
|
|
1958
|
+
width: 2.75rem;
|
|
1959
|
+
height: 1.5rem;
|
|
1960
|
+
cursor: pointer;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
.cv-toggle-input {
|
|
1964
|
+
opacity: 0;
|
|
1965
|
+
width: 0;
|
|
1966
|
+
height: 0;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
.cv-toggle-slider {
|
|
1970
|
+
position: absolute;
|
|
1971
|
+
top: 0;
|
|
1972
|
+
left: 0;
|
|
1973
|
+
right: 0;
|
|
1974
|
+
bottom: 0;
|
|
1975
|
+
background: rgba(0, 0, 0, 0.2);
|
|
1976
|
+
border-radius: 9999px;
|
|
1977
|
+
transition: background-color 0.2s ease;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
.cv-toggle-slider:before {
|
|
1981
|
+
position: absolute;
|
|
1982
|
+
content: "";
|
|
1983
|
+
height: 1rem;
|
|
1984
|
+
width: 1rem;
|
|
1985
|
+
left: 0.25rem;
|
|
1986
|
+
bottom: 0.25rem;
|
|
1987
|
+
background: white;
|
|
1988
|
+
border-radius: 50%;
|
|
1989
|
+
transition: transform 0.2s ease;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
.cv-toggle-input:checked + .cv-toggle-slider {
|
|
1993
|
+
background: #3e84f4;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
.cv-toggle-input:checked + .cv-toggle-slider:before {
|
|
1997
|
+
transform: translateX(1.25rem);
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
/* Dark theme toggle switch styles */
|
|
2001
|
+
.cv-widget-theme-dark .cv-toggle-switch {
|
|
2002
|
+
background: #4a5568;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
.cv-widget-theme-dark .cv-toggle-switch:hover {
|
|
2006
|
+
background: #5a6578;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
.cv-widget-theme-dark .cv-toggle-switch.cv-toggle-active {
|
|
2010
|
+
background: #63b3ed;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
.cv-widget-theme-dark .cv-toggle-switch.cv-toggle-active:hover {
|
|
2014
|
+
background: #4299e1;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
/* Tab Groups Container */
|
|
2018
|
+
.cv-tab-groups-list {
|
|
2019
|
+
display: flex;
|
|
2020
|
+
flex-direction: column;
|
|
2021
|
+
gap: 1px;
|
|
2022
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
2023
|
+
border-radius: 0.5rem;
|
|
2024
|
+
overflow: hidden;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
/* Tab Group Card - Header (Navigation Headers toggle) */
|
|
2028
|
+
.cv-tabgroup-card.cv-tabgroup-header {
|
|
2029
|
+
display: flex;
|
|
2030
|
+
align-items: center;
|
|
2031
|
+
justify-content: space-between;
|
|
2032
|
+
padding: 0.75rem;
|
|
2033
|
+
border-bottom: 0px;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
.cv-tabgroup-card.cv-tabgroup-header .cv-tabgroup-row {
|
|
2037
|
+
display: flex;
|
|
2038
|
+
align-items: center;
|
|
2039
|
+
justify-content: space-between;
|
|
2040
|
+
width: 100%;
|
|
2041
|
+
gap: 1rem;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
/* Tab Group Card - Items */
|
|
2045
|
+
.cv-tabgroup-card.cv-tabgroup-item {
|
|
2046
|
+
display: flex;
|
|
2047
|
+
flex-direction: column;
|
|
2048
|
+
gap: 0.5rem;
|
|
2049
|
+
padding: 0.75rem;
|
|
2050
|
+
background: white;
|
|
2051
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
.cv-tabgroup-card.cv-tabgroup-item:last-child {
|
|
2055
|
+
border-bottom: none;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
/* Tab Group Info */
|
|
2059
|
+
.cv-tabgroup-info {
|
|
2060
|
+
flex: 1;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
.cv-tabgroup-title {
|
|
2064
|
+
font-weight: 500;
|
|
2065
|
+
font-size: 0.875rem;
|
|
2066
|
+
color: rgba(0, 0, 0, 0.9);
|
|
2067
|
+
margin: 0 0 0.25rem 0;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
.cv-tabgroup-description {
|
|
2071
|
+
font-size: 0.75rem;
|
|
2072
|
+
color: rgba(0, 0, 0, 0.6);
|
|
2073
|
+
margin: 0;
|
|
2074
|
+
line-height: 1.3;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
/* Tab Group Label (for select dropdowns) */
|
|
2078
|
+
.cv-tabgroup-label {
|
|
2079
|
+
font-size: 0.875rem;
|
|
2080
|
+
color: rgba(0, 0, 0, 0.8);
|
|
2081
|
+
margin: 0;
|
|
2082
|
+
line-height: 1.4;
|
|
2083
|
+
font-weight: 500;
|
|
2084
|
+
display: block;
|
|
2085
|
+
cursor: pointer;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
/* Tab Group Select */
|
|
2089
|
+
.cv-tabgroup-select {
|
|
2090
|
+
width: 100%;
|
|
2091
|
+
border-radius: 0.5rem;
|
|
2092
|
+
background: white;
|
|
2093
|
+
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
2094
|
+
color: rgba(0, 0, 0, 0.9);
|
|
2095
|
+
padding: 0.5rem 0.75rem;
|
|
2096
|
+
font-size: 0.875rem;
|
|
2097
|
+
cursor: pointer;
|
|
2098
|
+
transition: all 0.15s ease;
|
|
2099
|
+
font-family: inherit;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
.cv-tabgroup-select:hover {
|
|
2103
|
+
border-color: rgba(0, 0, 0, 0.25);
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
.cv-tabgroup-select:focus {
|
|
2107
|
+
outline: none;
|
|
2108
|
+
border-color: #3e84f4;
|
|
2109
|
+
box-shadow: 0 0 0 2px rgba(62, 132, 244, 0.2);
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
/* Modern Toggle Switch */
|
|
2113
|
+
.cv-toggle-switch {
|
|
2114
|
+
position: relative;
|
|
2115
|
+
display: inline-flex;
|
|
2116
|
+
align-items: center;
|
|
2117
|
+
width: 44px;
|
|
2118
|
+
height: 24px;
|
|
2119
|
+
background: rgba(0, 0, 0, 0.1);
|
|
2120
|
+
border-radius: 9999px;
|
|
2121
|
+
padding: 2px;
|
|
2122
|
+
box-sizing: border-box;
|
|
2123
|
+
cursor: pointer;
|
|
2124
|
+
transition: background-color 0.2s ease;
|
|
2125
|
+
border: none;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
.cv-toggle-switch input {
|
|
2129
|
+
display: none;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
.cv-toggle-switch .cv-switch-bg {
|
|
2133
|
+
position: absolute;
|
|
2134
|
+
inset: 0;
|
|
2135
|
+
border-radius: 9999px;
|
|
2136
|
+
background: rgba(0, 0, 0, 0.1);
|
|
2137
|
+
transition: background-color 0.2s ease;
|
|
2138
|
+
pointer-events: none;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
.cv-toggle-switch .cv-switch-knob {
|
|
2142
|
+
position: relative;
|
|
2143
|
+
width: 20px;
|
|
2144
|
+
height: 20px;
|
|
2145
|
+
background: white;
|
|
2146
|
+
border-radius: 50%;
|
|
2147
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
|
|
2148
|
+
transition: transform 0.2s ease;
|
|
2149
|
+
z-index: 1;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.cv-toggle-switch input:checked + .cv-switch-bg {
|
|
2153
|
+
background: #3e84f4;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
.cv-toggle-switch input:checked ~ .cv-switch-knob {
|
|
2157
|
+
transform: translateX(20px);
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
/* Dark Theme - Tab Groups */
|
|
2161
|
+
.cv-widget-theme-dark .cv-tabgroup-card.cv-tabgroup-header {
|
|
2162
|
+
background: #101722;
|
|
2163
|
+
border-bottom-color: rgba(255, 255, 255, 0.1);
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
.cv-widget-theme-dark .cv-tabgroup-card.cv-tabgroup-item {
|
|
2167
|
+
background: #101722;
|
|
2168
|
+
border-bottom-color: rgba(255, 255, 255, 0.05);
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
.cv-widget-theme-dark .cv-tabgroup-title {
|
|
2172
|
+
color: #e2e8f0;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
.cv-widget-theme-dark .cv-tabgroup-description {
|
|
2176
|
+
color: rgba(255, 255, 255, 0.6);
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
.cv-widget-theme-dark .cv-tabgroup-label {
|
|
2180
|
+
color: rgba(255, 255, 255, 0.8);
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
.cv-widget-theme-dark .cv-tab-groups-list {
|
|
2184
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
.cv-widget-theme-dark .cv-tabgroup-select {
|
|
2188
|
+
background: #101722;
|
|
2189
|
+
border-color: rgba(255, 255, 255, 0.15);
|
|
2190
|
+
color: #e2e8f0;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
.cv-widget-theme-dark .cv-tabgroup-select:hover {
|
|
2194
|
+
border-color: rgba(255, 255, 255, 0.25);
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
.cv-widget-theme-dark .cv-tabgroup-select:focus {
|
|
2198
|
+
border-color: #60a5fa;
|
|
2199
|
+
box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
/* Dark Theme - Toggle Switch */
|
|
2203
|
+
.cv-widget-theme-dark .cv-toggle-switch .cv-switch-bg {
|
|
2204
|
+
background: rgba(255, 255, 255, 0.1);
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
.cv-widget-theme-dark .cv-toggle-switch .cv-switch-knob {
|
|
2208
|
+
background: #e2e8f0;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
.cv-widget-theme-dark .cv-toggle-switch input:checked + .cv-switch-bg {
|
|
2212
|
+
background: #63b3ed;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
.cv-modal-footer {
|
|
2216
|
+
display: flex;
|
|
2217
|
+
justify-content: space-between;
|
|
2218
|
+
align-items: center;
|
|
2219
|
+
padding: 0.75rem;
|
|
2220
|
+
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
.cv-reset-btn,
|
|
2224
|
+
.cv-share-btn {
|
|
2225
|
+
display: flex;
|
|
2226
|
+
align-items: center;
|
|
2227
|
+
gap: 0.5rem;
|
|
2228
|
+
padding: 0.375rem 0.75rem;
|
|
2229
|
+
border-radius: 0.5rem;
|
|
2230
|
+
font-weight: 600;
|
|
2231
|
+
font-size: 0.875rem;
|
|
2232
|
+
cursor: pointer;
|
|
2233
|
+
transition: all 0.2s ease;
|
|
2234
|
+
border: none;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
.cv-reset-btn {
|
|
2238
|
+
color: rgba(0, 0, 0, 0.9);
|
|
2239
|
+
background: rgba(0, 0, 0, 0.1);
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
.cv-reset-btn:hover {
|
|
2243
|
+
background: rgba(0, 0, 0, 0.2);
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
.cv-share-btn {
|
|
2247
|
+
color: white;
|
|
2248
|
+
background: #3e84f4;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
.cv-share-btn:hover {
|
|
2252
|
+
background: rgba(62, 132, 244, 0.9);
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
.cv-btn-icon {
|
|
2256
|
+
width: 1rem;
|
|
2257
|
+
height: 1rem;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
/* Dark theme custom state styles */
|
|
2261
|
+
/* Welcome modal styles */
|
|
2262
|
+
.cv-welcome-modal {
|
|
2263
|
+
max-width: 32rem;
|
|
2264
|
+
width: 90vw;
|
|
2265
|
+
background: white;
|
|
2266
|
+
border-radius: 0.75rem;
|
|
2267
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
2268
|
+
animation: slideIn 0.2s ease;
|
|
2269
|
+
display: flex;
|
|
2270
|
+
flex-direction: column;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
.cv-modal-main {
|
|
2274
|
+
padding: 1rem;
|
|
2275
|
+
flex: 1;
|
|
2276
|
+
display: flex;
|
|
2277
|
+
flex-direction: column;
|
|
2278
|
+
gap: 1rem;
|
|
2279
|
+
overflow-y: auto;
|
|
2280
|
+
max-height: calc(80vh - 8rem);
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
.cv-welcome-message {
|
|
2284
|
+
font-size: 0.875rem;
|
|
2285
|
+
color: rgba(0, 0, 0, 0.8);
|
|
2286
|
+
margin: 0;
|
|
2287
|
+
line-height: 1.4;
|
|
2288
|
+
text-align: center;
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
.cv-welcome-message a {
|
|
2292
|
+
color: #3e84f4;
|
|
2293
|
+
text-align: justify;
|
|
2294
|
+
text-decoration: none;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
.cv-welcome-message a:hover {
|
|
2298
|
+
text-decoration: underline;
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
.cv-welcome-widget-preview {
|
|
2302
|
+
display: flex;
|
|
2303
|
+
align-items: center;
|
|
2304
|
+
justify-content: center;
|
|
2305
|
+
gap: 1rem;
|
|
2306
|
+
padding: 1rem;
|
|
2307
|
+
background: #f8f9fa;
|
|
2308
|
+
border-radius: 0.5rem;
|
|
2309
|
+
margin: 1rem 0;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
.cv-welcome-widget-icon {
|
|
2313
|
+
width: 2rem;
|
|
2314
|
+
height: 2rem;
|
|
2315
|
+
background: rgba(62, 132, 244, 0.1);
|
|
2316
|
+
border-radius: 9999px;
|
|
2317
|
+
display: flex;
|
|
2318
|
+
align-items: center;
|
|
2319
|
+
justify-content: center;
|
|
2320
|
+
animation: cv-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
2321
|
+
color: #3e84f4;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
.cv-welcome-widget-label {
|
|
2325
|
+
font-size: 0.875rem;
|
|
2326
|
+
font-weight: 500;
|
|
2327
|
+
color: rgba(0, 0, 0, 0.8);
|
|
2328
|
+
margin: 0;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
.cv-welcome-got-it {
|
|
2332
|
+
width: 100%;
|
|
2333
|
+
background: #3e84f4;
|
|
2334
|
+
color: white;
|
|
2335
|
+
font-weight: 600;
|
|
2336
|
+
padding: 0.75rem 1rem;
|
|
2337
|
+
border-radius: 0.5rem;
|
|
2338
|
+
border: none;
|
|
2339
|
+
cursor: pointer;
|
|
2340
|
+
font-size: 0.875rem;
|
|
2341
|
+
transition: background-color 0.2s ease;
|
|
2342
|
+
outline: none;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
.cv-welcome-got-it:hover {
|
|
2346
|
+
background: rgba(62, 132, 244, 0.9);
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
.cv-welcome-got-it:focus {
|
|
2350
|
+
box-shadow: 0 0 0 2px rgba(62, 132, 244, 0.5);
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
/* Animations */
|
|
2354
|
+
@keyframes cv-pulse {
|
|
2355
|
+
0%, 100% {
|
|
2356
|
+
opacity: 1;
|
|
2357
|
+
}
|
|
2358
|
+
50% {
|
|
2359
|
+
opacity: 0.5;
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
/* Dark theme welcome modal styles */
|
|
2364
|
+
.cv-widget-theme-dark .cv-welcome-modal {
|
|
2365
|
+
background: #101722;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
.cv-widget-theme-dark .cv-welcome-message {
|
|
2369
|
+
color: rgba(255, 255, 255, 0.8);
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
.cv-widget-theme-dark .cv-welcome-message a {
|
|
2373
|
+
color: #60a5fa;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
.cv-widget-theme-dark .cv-welcome-widget-preview {
|
|
2377
|
+
background: rgba(255, 255, 255, 0.1);
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
.cv-widget-theme-dark .cv-welcome-widget-label {
|
|
2381
|
+
color: #e2e8f0;
|
|
2382
|
+
}
|
|
1920
2383
|
`;
|
|
1921
2384
|
/**
|
|
1922
2385
|
* Inject widget styles into the document head
|
|
@@ -1931,6 +2394,45 @@ ${TAB_STYLES}
|
|
|
1931
2394
|
document.head.appendChild(style);
|
|
1932
2395
|
}
|
|
1933
2396
|
|
|
2397
|
+
/**
|
|
2398
|
+
* Icon utilities for CustomViews widget
|
|
2399
|
+
* Centralized SVG icons for better maintainability and reusability
|
|
2400
|
+
*/
|
|
2401
|
+
/**
|
|
2402
|
+
* Settings gear icon for modal header
|
|
2403
|
+
*/
|
|
2404
|
+
function getGearIcon() {
|
|
2405
|
+
return `<svg class="cv-modal-icon-svg" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2406
|
+
<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M12 8.00002C9.79085 8.00002 7.99999 9.79088 7.99999 12C7.99999 14.2092 9.79085 16 12 16C14.2091 16 16 14.2092 16 12C16 9.79088 14.2091 8.00002 12 8.00002ZM9.99999 12C9.99999 10.8955 10.8954 10 12 10C13.1046 10 14 10.8955 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 9.99999 13.1046 9.99999 12Z" fill="#0F1729"/>
|
|
2407
|
+
<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M10.7673 1.01709C10.9925 0.999829 11.2454 0.99993 11.4516 1.00001L12.5484 1.00001C12.7546 0.99993 13.0075 0.999829 13.2327 1.01709C13.4989 1.03749 13.8678 1.08936 14.2634 1.26937C14.7635 1.49689 15.1915 1.85736 15.5007 2.31147C15.7454 2.67075 15.8592 3.0255 15.9246 3.2843C15.9799 3.50334 16.0228 3.75249 16.0577 3.9557L16.1993 4.77635L16.2021 4.77788C16.2369 4.79712 16.2715 4.81659 16.306 4.8363L16.3086 4.83774L17.2455 4.49865C17.4356 4.42978 17.6693 4.34509 17.8835 4.28543C18.1371 4.2148 18.4954 4.13889 18.9216 4.17026C19.4614 4.20998 19.9803 4.39497 20.4235 4.70563C20.7734 4.95095 21.0029 5.23636 21.1546 5.4515C21.2829 5.63326 21.4103 5.84671 21.514 6.02029L22.0158 6.86003C22.1256 7.04345 22.2594 7.26713 22.3627 7.47527C22.4843 7.7203 22.6328 8.07474 22.6777 8.52067C22.7341 9.08222 22.6311 9.64831 22.3803 10.1539C22.1811 10.5554 21.9171 10.8347 21.7169 11.0212C21.5469 11.1795 21.3428 11.3417 21.1755 11.4746L20.5 12L21.1755 12.5254C21.3428 12.6584 21.5469 12.8205 21.7169 12.9789C21.9171 13.1653 22.1811 13.4446 22.3802 13.8461C22.631 14.3517 22.7341 14.9178 22.6776 15.4794C22.6328 15.9253 22.4842 16.2797 22.3626 16.5248C22.2593 16.7329 22.1255 16.9566 22.0158 17.14L21.5138 17.9799C21.4102 18.1535 21.2828 18.3668 21.1546 18.5485C21.0028 18.7637 20.7734 19.0491 20.4234 19.2944C19.9803 19.6051 19.4613 19.7901 18.9216 19.8298C18.4954 19.8612 18.1371 19.7852 17.8835 19.7146C17.6692 19.6549 17.4355 19.5703 17.2454 19.5014L16.3085 19.1623L16.306 19.1638C16.2715 19.1835 16.2369 19.2029 16.2021 19.2222L16.1993 19.2237L16.0577 20.0443C16.0228 20.2475 15.9799 20.4967 15.9246 20.7157C15.8592 20.9745 15.7454 21.3293 15.5007 21.6886C15.1915 22.1427 14.7635 22.5032 14.2634 22.7307C13.8678 22.9107 13.4989 22.9626 13.2327 22.983C13.0074 23.0002 12.7546 23.0001 12.5484 23H11.4516C11.2454 23.0001 10.9925 23.0002 10.7673 22.983C10.5011 22.9626 10.1322 22.9107 9.73655 22.7307C9.23648 22.5032 8.80849 22.1427 8.49926 21.6886C8.25461 21.3293 8.14077 20.9745 8.07542 20.7157C8.02011 20.4967 7.97723 20.2475 7.94225 20.0443L7.80068 19.2237L7.79791 19.2222C7.7631 19.2029 7.72845 19.1835 7.69396 19.1637L7.69142 19.1623L6.75458 19.5014C6.5645 19.5702 6.33078 19.6549 6.11651 19.7146C5.86288 19.7852 5.50463 19.8611 5.07841 19.8298C4.53866 19.7901 4.01971 19.6051 3.57654 19.2944C3.2266 19.0491 2.99714 18.7637 2.84539 18.5485C2.71718 18.3668 2.58974 18.1534 2.4861 17.9798L1.98418 17.14C1.87447 16.9566 1.74067 16.7329 1.63737 16.5248C1.51575 16.2797 1.36719 15.9253 1.32235 15.4794C1.26588 14.9178 1.36897 14.3517 1.61976 13.8461C1.81892 13.4446 2.08289 13.1653 2.28308 12.9789C2.45312 12.8205 2.65717 12.6584 2.82449 12.5254L3.47844 12.0054V11.9947L2.82445 11.4746C2.65712 11.3417 2.45308 11.1795 2.28304 11.0212C2.08285 10.8347 1.81888 10.5554 1.61972 10.1539C1.36893 9.64832 1.26584 9.08224 1.3223 8.52069C1.36714 8.07476 1.51571 7.72032 1.63732 7.47528C1.74062 7.26715 1.87443 7.04347 1.98414 6.86005L2.48605 6.02026C2.58969 5.84669 2.71714 5.63326 2.84534 5.45151C2.9971 5.23637 3.22655 4.95096 3.5765 4.70565C4.01966 4.39498 4.53862 4.20999 5.07837 4.17027C5.50458 4.1389 5.86284 4.21481 6.11646 4.28544C6.33072 4.34511 6.56444 4.4298 6.75451 4.49867L7.69141 4.83775L7.69394 4.8363C7.72844 4.8166 7.7631 4.79712 7.79791 4.77788L7.80068 4.77635L7.94225 3.95571C7.97723 3.7525 8.02011 3.50334 8.07542 3.2843C8.14077 3.0255 8.25461 2.67075 8.49926 2.31147C8.80849 1.85736 9.23648 1.49689 9.73655 1.26937C10.1322 1.08936 10.5011 1.03749 10.7673 1.01709ZM14.0938 4.3363C14.011 3.85634 13.9696 3.61637 13.8476 3.43717C13.7445 3.2858 13.6019 3.16564 13.4352 3.0898C13.2378 3.00002 12.9943 3.00002 12.5073 3.00002H11.4927C11.0057 3.00002 10.7621 3.00002 10.5648 3.0898C10.3981 3.16564 10.2555 3.2858 10.1524 3.43717C10.0304 3.61637 9.98895 3.85634 9.90615 4.3363L9.75012 5.24064C9.69445 5.56333 9.66662 5.72467 9.60765 5.84869C9.54975 5.97047 9.50241 6.03703 9.40636 6.13166C9.30853 6.22804 9.12753 6.3281 8.76554 6.52822C8.73884 6.54298 8.71227 6.55791 8.68582 6.57302C8.33956 6.77078 8.16643 6.86966 8.03785 6.90314C7.91158 6.93602 7.83293 6.94279 7.70289 6.93196C7.57049 6.92094 7.42216 6.86726 7.12551 6.7599L6.11194 6.39308C5.66271 6.2305 5.43809 6.14921 5.22515 6.16488C5.04524 6.17811 4.87225 6.23978 4.72453 6.34333C4.5497 6.46589 4.42715 6.67094 4.18206 7.08103L3.72269 7.84965C3.46394 8.2826 3.33456 8.49907 3.31227 8.72078C3.29345 8.90796 3.32781 9.09665 3.41141 9.26519C3.51042 9.4648 3.7078 9.62177 4.10256 9.9357L4.82745 10.5122C5.07927 10.7124 5.20518 10.8126 5.28411 10.9199C5.36944 11.036 5.40583 11.1114 5.44354 11.2504C5.47844 11.379 5.47844 11.586 5.47844 12C5.47844 12.414 5.47844 12.621 5.44354 12.7497C5.40582 12.8887 5.36944 12.9641 5.28413 13.0801C5.20518 13.1875 5.07927 13.2876 4.82743 13.4879L4.10261 14.0643C3.70785 14.3783 3.51047 14.5352 3.41145 14.7349C3.32785 14.9034 3.29349 15.0921 3.31231 15.2793C3.33461 15.501 3.46398 15.7174 3.72273 16.1504L4.1821 16.919C4.4272 17.3291 4.54974 17.5342 4.72457 17.6567C4.8723 17.7603 5.04528 17.8219 5.2252 17.8352C5.43813 17.8508 5.66275 17.7695 6.11199 17.607L7.12553 17.2402C7.42216 17.1328 7.5705 17.0791 7.7029 17.0681C7.83294 17.0573 7.91159 17.064 8.03786 17.0969C8.16644 17.1304 8.33956 17.2293 8.68582 17.427C8.71228 17.4421 8.73885 17.4571 8.76554 17.4718C9.12753 17.6719 9.30853 17.772 9.40635 17.8684C9.50241 17.963 9.54975 18.0296 9.60765 18.1514C9.66662 18.2754 9.69445 18.4367 9.75012 18.7594L9.90615 19.6637C9.98895 20.1437 10.0304 20.3837 10.1524 20.5629C10.2555 20.7142 10.3981 20.8344 10.5648 20.9102C10.7621 21 11.0057 21 11.4927 21H12.5073C12.9943 21 13.2378 21 13.4352 20.9102C13.6019 20.8344 13.7445 20.7142 13.8476 20.5629C13.9696 20.3837 14.011 20.1437 14.0938 19.6637L14.2499 18.7594C14.3055 18.4367 14.3334 18.2754 14.3923 18.1514C14.4502 18.0296 14.4976 17.963 14.5936 17.8684C14.6915 17.772 14.8725 17.6719 15.2344 17.4718C15.2611 17.4571 15.2877 17.4421 15.3141 17.427C15.6604 17.2293 15.8335 17.1304 15.9621 17.0969C16.0884 17.064 16.167 17.0573 16.2971 17.0681C16.4295 17.0791 16.5778 17.1328 16.8744 17.2402L17.888 17.607C18.3372 17.7696 18.5619 17.8509 18.7748 17.8352C18.9547 17.8219 19.1277 17.7603 19.2754 17.6567C19.4502 17.5342 19.5728 17.3291 19.8179 16.919L20.2773 16.1504C20.536 15.7175 20.6654 15.501 20.6877 15.2793C20.7065 15.0921 20.6721 14.9034 20.5885 14.7349C20.4895 14.5353 20.2921 14.3783 19.8974 14.0643L19.1726 13.4879C18.9207 13.2876 18.7948 13.1875 18.7159 13.0801C18.6306 12.9641 18.5942 12.8887 18.5564 12.7497C18.5215 12.6211 18.5215 12.414 18.5215 12C18.5215 11.586 18.5215 11.379 18.5564 11.2504C18.5942 11.1114 18.6306 11.036 18.7159 10.9199C18.7948 10.8126 18.9207 10.7124 19.1725 10.5122L19.8974 9.9357C20.2922 9.62176 20.4896 9.46479 20.5886 9.26517C20.6722 9.09664 20.7065 8.90795 20.6877 8.72076C20.6654 8.49906 20.5361 8.28259 20.2773 7.84964L19.8179 7.08102C19.5728 6.67093 19.4503 6.46588 19.2755 6.34332C19.1277 6.23977 18.9548 6.1781 18.7748 6.16486C18.5619 6.14919 18.3373 6.23048 17.888 6.39307L16.8745 6.75989C16.5778 6.86725 16.4295 6.92093 16.2971 6.93195C16.167 6.94278 16.0884 6.93601 15.9621 6.90313C15.8335 6.86965 15.6604 6.77077 15.3142 6.57302C15.2877 6.55791 15.2611 6.54298 15.2345 6.52822C14.8725 6.3281 14.6915 6.22804 14.5936 6.13166C14.4976 6.03703 14.4502 5.97047 14.3923 5.84869C14.3334 5.72467 14.3055 5.56332 14.2499 5.24064L14.0938 4.3363Z" fill="#0F1729"/>
|
|
2408
|
+
</svg>`;
|
|
2409
|
+
}
|
|
2410
|
+
/**
|
|
2411
|
+
* Close/X icon for modal close button
|
|
2412
|
+
*/
|
|
2413
|
+
function getCloseIcon() {
|
|
2414
|
+
return `<svg class="cv-modal-close-icon" fill="currentColor" height="20px" viewBox="0 0 256 256" width="20px" xmlns="http://www.w3.org/2000/svg">
|
|
2415
|
+
<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
|
|
2416
|
+
</svg>`;
|
|
2417
|
+
}
|
|
2418
|
+
/**
|
|
2419
|
+
* Reset/refresh icon for reset button
|
|
2420
|
+
*/
|
|
2421
|
+
function getResetIcon() {
|
|
2422
|
+
return `<svg class="cv-btn-icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2423
|
+
<path d="M22.719 12A10.719 10.719 0 0 1 1.28 12h.838a9.916 9.916 0 1 0 1.373-5H8v1H2V2h1v4.2A10.71 10.71 0 0 1 22.719 12z"/><path fill="none" d="M0 0h24v24H0z"/>
|
|
2424
|
+
</svg>`;
|
|
2425
|
+
}
|
|
2426
|
+
/**
|
|
2427
|
+
* Share icon for share button
|
|
2428
|
+
*/
|
|
2429
|
+
function getShareIcon() {
|
|
2430
|
+
return `<svg class="cv-btn-icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2431
|
+
<path xmlns="http://www.w3.org/2000/svg" d="M6 11C6 8.17157 6 6.75736 6.87868 5.87868C7.75736 5 9.17157 5 12 5H15C17.8284 5 19.2426 5 20.1213 5.87868C21 6.75736 21 8.17157 21 11V16C21 18.8284 21 20.2426 20.1213 21.1213C19.2426 22 17.8284 22 15 22H12C9.17157 22 7.75736 22 6.87868 21.1213C6 20.2426 6 18.8284 6 16V11Z" stroke="#1C274C" stroke-width="1.5"/>
|
|
2432
|
+
<path xmlns="http://www.w3.org/2000/svg" opacity="0.5" d="M6 19C4.34315 19 3 17.6569 3 16V10C3 6.22876 3 4.34315 4.17157 3.17157C5.34315 2 7.22876 2 11 2H15C16.6569 2 18 3.34315 18 5" stroke="#1C274C" stroke-width="1.5"/>
|
|
2433
|
+
</svg>`;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
1934
2436
|
class CustomViewsWidget {
|
|
1935
2437
|
core;
|
|
1936
2438
|
container;
|
|
@@ -1949,7 +2451,7 @@ ${TAB_STYLES}
|
|
|
1949
2451
|
theme: options.theme || 'light',
|
|
1950
2452
|
showReset: options.showReset ?? true,
|
|
1951
2453
|
title: options.title || 'Customize View',
|
|
1952
|
-
description: options.description || '
|
|
2454
|
+
description: options.description || '',
|
|
1953
2455
|
showWelcome: options.showWelcome ?? false,
|
|
1954
2456
|
welcomeTitle: options.welcomeTitle || 'Site Customization',
|
|
1955
2457
|
welcomeMessage: options.welcomeMessage || 'This site is powered by Custom Views. Use the widget on the side (⚙) to customize your experience. Your preferences will be saved and can be shared via URL.<br><br>Learn more at <a href="https://github.com/customviews-js/customviews" target="_blank">customviews GitHub</a>.',
|
|
@@ -2031,21 +2533,24 @@ ${TAB_STYLES}
|
|
|
2031
2533
|
this.modal = document.createElement('div');
|
|
2032
2534
|
this.modal.className = 'cv-widget-modal-overlay';
|
|
2033
2535
|
this.applyThemeToModal();
|
|
2034
|
-
const
|
|
2035
|
-
|
|
2036
|
-
<div class="cv-
|
|
2037
|
-
<
|
|
2038
|
-
<
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
${
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2536
|
+
const toggleControlsHtml = toggles.map(toggle => `
|
|
2537
|
+
<div class="cv-toggle-card">
|
|
2538
|
+
<div class="cv-toggle-content">
|
|
2539
|
+
<div>
|
|
2540
|
+
<p class="cv-toggle-title">${this.formatToggleName(toggle)}</p>
|
|
2541
|
+
</div>
|
|
2542
|
+
<label class="cv-toggle-label">
|
|
2543
|
+
<input class="cv-toggle-input" type="checkbox" data-toggle="${toggle}"/>
|
|
2544
|
+
<span class="cv-toggle-slider"></span>
|
|
2545
|
+
</label>
|
|
2546
|
+
</div>
|
|
2547
|
+
</div>
|
|
2548
|
+
`).join('');
|
|
2549
|
+
// Todo: Re-add description if needed (Line 168, add label field to toggles if needed change structure)
|
|
2550
|
+
// <p class="cv-toggle-description">Show or hide the ${this.formatToggleName(toggle).toLowerCase()} area </p>
|
|
2046
2551
|
// Get tab groups
|
|
2047
2552
|
const tabGroups = this.core.getTabGroups();
|
|
2048
|
-
let
|
|
2553
|
+
let tabGroupControlsHTML = '';
|
|
2049
2554
|
// Check if any tab group or tab labels contain Font Awesome shortcodes
|
|
2050
2555
|
let hasFontAwesomeShortcodes = false;
|
|
2051
2556
|
if (this.options.showTabGroups && tabGroups && tabGroups.length > 0) {
|
|
@@ -2069,48 +2574,82 @@ ${TAB_STYLES}
|
|
|
2069
2574
|
ensureFontAwesomeInjected();
|
|
2070
2575
|
}
|
|
2071
2576
|
if (this.options.showTabGroups && tabGroups && tabGroups.length > 0) {
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2577
|
+
tabGroupControlsHTML = `
|
|
2578
|
+
<div class="cv-tabgroup-card cv-tabgroup-header">
|
|
2579
|
+
<div class="cv-tabgroup-row">
|
|
2580
|
+
<div class="cv-tabgroup-info">
|
|
2581
|
+
<p class="cv-tabgroup-title">Navigation Headers</p>
|
|
2582
|
+
<p class="cv-tabgroup-description">Show or hide navigation headers</p>
|
|
2583
|
+
</div>
|
|
2584
|
+
<label class="cv-toggle-switch cv-nav-toggle">
|
|
2585
|
+
<input class="cv-nav-pref-input" type="checkbox" aria-label="Show or hide navigation headers" />
|
|
2586
|
+
<span class="cv-switch-bg"></span>
|
|
2587
|
+
<span class="cv-switch-knob"></span>
|
|
2588
|
+
</label>
|
|
2589
|
+
</div>
|
|
2590
|
+
</div>
|
|
2591
|
+
<div class="cv-tab-groups-list">
|
|
2592
|
+
${tabGroups.map(group => `
|
|
2593
|
+
<div class="cv-tabgroup-card cv-tabgroup-item">
|
|
2594
|
+
<label class="cv-tabgroup-label" for="tab-group-${group.id}">
|
|
2595
|
+
${replaceIconShortcodes(group.label || group.id)}
|
|
2596
|
+
</label>
|
|
2597
|
+
<select id="tab-group-${group.id}" class="cv-tabgroup-select" data-group-id="${group.id}">
|
|
2598
|
+
${group.tabs.map(tab => `<option value="${tab.id}">${replaceIconShortcodes(tab.label || tab.id)}</option>`).join('')}
|
|
2599
|
+
</select>
|
|
2600
|
+
</div>
|
|
2601
|
+
`).join('')}
|
|
2602
|
+
</div>
|
|
2088
2603
|
`;
|
|
2089
2604
|
}
|
|
2090
|
-
this.modal.innerHTML = `
|
|
2091
|
-
<div class="cv-widget-modal cv-custom-state-modal">
|
|
2092
|
-
<
|
|
2093
|
-
<
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2605
|
+
this.modal.innerHTML = `
|
|
2606
|
+
<div class="cv-widget-modal cv-custom-state-modal">
|
|
2607
|
+
<header class="cv-modal-header">
|
|
2608
|
+
<div class="cv-modal-header-content">
|
|
2609
|
+
<div class="cv-modal-icon">
|
|
2610
|
+
${getGearIcon()}
|
|
2611
|
+
</div>
|
|
2612
|
+
<div class="cv-modal-title">${this.options.title}</div>
|
|
2613
|
+
</div>
|
|
2614
|
+
<button class="cv-modal-close" aria-label="Close modal">
|
|
2615
|
+
${getCloseIcon()}
|
|
2616
|
+
</button>
|
|
2617
|
+
</header>
|
|
2618
|
+
<main class="cv-modal-main">
|
|
2619
|
+
${this.options.description ? `<p class="cv-modal-description">${this.options.description}</p>` : ''}
|
|
2620
|
+
|
|
2621
|
+
${toggles.length ? `
|
|
2622
|
+
<div class="cv-content-section">
|
|
2623
|
+
<div class="cv-section-heading">Toggles</div>
|
|
2624
|
+
<div class="cv-toggles-container">
|
|
2625
|
+
${toggleControlsHtml}
|
|
2626
|
+
</div>
|
|
2627
|
+
</div>
|
|
2628
|
+
` : ''}
|
|
2629
|
+
|
|
2630
|
+
${this.options.showTabGroups && tabGroups && tabGroups.length > 0 ? `
|
|
2631
|
+
<div class="cv-content-section">
|
|
2632
|
+
<div class="cv-section-heading">Tab Groups</div>
|
|
2633
|
+
<div class="cv-tabgroups-container">
|
|
2634
|
+
${tabGroupControlsHTML}
|
|
2635
|
+
</div>
|
|
2636
|
+
</div>
|
|
2637
|
+
` : ''}
|
|
2638
|
+
</main>
|
|
2639
|
+
|
|
2640
|
+
<footer class="cv-modal-footer">
|
|
2641
|
+
${this.options.showReset ? `
|
|
2642
|
+
<button class="cv-reset-btn">
|
|
2643
|
+
${getResetIcon()}
|
|
2644
|
+
<span>Reset to Default</span>
|
|
2645
|
+
</button>
|
|
2646
|
+
` : ''}
|
|
2647
|
+
<button class="cv-share-btn">
|
|
2648
|
+
${getShareIcon()}
|
|
2649
|
+
<span>Copy Shareable URL</span>
|
|
2650
|
+
</button>
|
|
2651
|
+
</footer>
|
|
2652
|
+
</div>
|
|
2114
2653
|
`;
|
|
2115
2654
|
document.body.appendChild(this.modal);
|
|
2116
2655
|
this.attachStateModalEventListeners();
|
|
@@ -2124,21 +2663,21 @@ ${TAB_STYLES}
|
|
|
2124
2663
|
if (!this.modal)
|
|
2125
2664
|
return;
|
|
2126
2665
|
// Close button
|
|
2127
|
-
const closeBtn = this.modal.querySelector('.cv-
|
|
2666
|
+
const closeBtn = this.modal.querySelector('.cv-modal-close');
|
|
2128
2667
|
if (closeBtn) {
|
|
2129
2668
|
closeBtn.addEventListener('click', () => {
|
|
2130
2669
|
this.closeModal();
|
|
2131
2670
|
});
|
|
2132
2671
|
}
|
|
2133
2672
|
// Copy URL button
|
|
2134
|
-
const copyUrlBtn = this.modal.querySelector('.cv-
|
|
2673
|
+
const copyUrlBtn = this.modal.querySelector('.cv-share-btn');
|
|
2135
2674
|
if (copyUrlBtn) {
|
|
2136
2675
|
copyUrlBtn.addEventListener('click', () => {
|
|
2137
2676
|
this.copyShareableURL();
|
|
2138
2677
|
});
|
|
2139
2678
|
}
|
|
2140
2679
|
// Reset to default button
|
|
2141
|
-
const resetBtn = this.modal.querySelector('.cv-
|
|
2680
|
+
const resetBtn = this.modal.querySelector('.cv-reset-btn');
|
|
2142
2681
|
if (resetBtn) {
|
|
2143
2682
|
resetBtn.addEventListener('click', () => {
|
|
2144
2683
|
this.core.resetToDefault();
|
|
@@ -2146,25 +2685,55 @@ ${TAB_STYLES}
|
|
|
2146
2685
|
});
|
|
2147
2686
|
}
|
|
2148
2687
|
// Listen to toggle switches
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
toggleSwitch.classList.toggle('cv-toggle-active');
|
|
2688
|
+
const toggleInputs = this.modal.querySelectorAll('.cv-toggle-input');
|
|
2689
|
+
toggleInputs.forEach(toggleInput => {
|
|
2690
|
+
toggleInput.addEventListener('change', () => {
|
|
2153
2691
|
const state = this.getCurrentCustomStateFromModal();
|
|
2154
2692
|
this.core.applyState(state);
|
|
2155
2693
|
});
|
|
2156
2694
|
});
|
|
2157
2695
|
// Listen to tab group selects
|
|
2158
|
-
const tabGroupSelects = this.modal.querySelectorAll('.cv-
|
|
2696
|
+
const tabGroupSelects = this.modal.querySelectorAll('.cv-tabgroup-select');
|
|
2159
2697
|
tabGroupSelects.forEach(select => {
|
|
2160
2698
|
select.addEventListener('change', () => {
|
|
2161
2699
|
const groupId = select.dataset.groupId;
|
|
2162
2700
|
const tabId = select.value;
|
|
2163
2701
|
if (groupId && tabId) {
|
|
2164
|
-
this
|
|
2702
|
+
// Get current state and update the tab for this group, then apply globally
|
|
2703
|
+
// This triggers sync behavior and persistence
|
|
2704
|
+
const currentTabs = this.core.getCurrentActiveTabs();
|
|
2705
|
+
currentTabs[groupId] = tabId;
|
|
2706
|
+
// Apply state globally for persistence and sync
|
|
2707
|
+
const currentToggles = this.core.getCurrentActiveToggles();
|
|
2708
|
+
const newState = {
|
|
2709
|
+
toggles: currentToggles,
|
|
2710
|
+
tabs: currentTabs
|
|
2711
|
+
};
|
|
2712
|
+
this.core.applyState(newState);
|
|
2165
2713
|
}
|
|
2166
2714
|
});
|
|
2167
2715
|
});
|
|
2716
|
+
// Listener for show/hide tab navs
|
|
2717
|
+
const tabNavToggle = this.modal.querySelector('.cv-nav-pref-input');
|
|
2718
|
+
if (tabNavToggle) {
|
|
2719
|
+
tabNavToggle.addEventListener('change', () => {
|
|
2720
|
+
const visible = tabNavToggle.checked;
|
|
2721
|
+
// Persist preference
|
|
2722
|
+
try {
|
|
2723
|
+
localStorage.setItem('cv-tab-navs-visible', visible ? 'true' : 'false');
|
|
2724
|
+
}
|
|
2725
|
+
catch (e) { /* ignore */ }
|
|
2726
|
+
// Apply to DOM using TabManager via core
|
|
2727
|
+
try {
|
|
2728
|
+
const rootEl = document.body;
|
|
2729
|
+
TabManager.setNavsVisibility(rootEl, visible);
|
|
2730
|
+
}
|
|
2731
|
+
catch (e) {
|
|
2732
|
+
// ignore errors
|
|
2733
|
+
console.error('Failed to set tab nav visibility:', e);
|
|
2734
|
+
}
|
|
2735
|
+
});
|
|
2736
|
+
}
|
|
2168
2737
|
// Overlay click to close
|
|
2169
2738
|
this.modal.addEventListener('click', (e) => {
|
|
2170
2739
|
if (e.target === this.modal) {
|
|
@@ -2202,15 +2771,15 @@ ${TAB_STYLES}
|
|
|
2202
2771
|
}
|
|
2203
2772
|
// Collect toggle values
|
|
2204
2773
|
const toggles = [];
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2207
|
-
const toggle =
|
|
2208
|
-
if (toggle &&
|
|
2774
|
+
const toggleInputs = this.modal.querySelectorAll('.cv-toggle-input');
|
|
2775
|
+
toggleInputs.forEach(toggleInput => {
|
|
2776
|
+
const toggle = toggleInput.dataset.toggle;
|
|
2777
|
+
if (toggle && toggleInput.checked) {
|
|
2209
2778
|
toggles.push(toggle);
|
|
2210
2779
|
}
|
|
2211
2780
|
});
|
|
2212
2781
|
// Collect tab selections
|
|
2213
|
-
const tabGroupSelects = this.modal.querySelectorAll('.cv-
|
|
2782
|
+
const tabGroupSelects = this.modal.querySelectorAll('.cv-tabgroup-select');
|
|
2214
2783
|
const tabs = {};
|
|
2215
2784
|
tabGroupSelects.forEach(select => {
|
|
2216
2785
|
const groupId = select.dataset.groupId;
|
|
@@ -2242,27 +2811,45 @@ ${TAB_STYLES}
|
|
|
2242
2811
|
return;
|
|
2243
2812
|
// Get currently active toggles (from custom state or default configuration)
|
|
2244
2813
|
const activeToggles = this.core.getCurrentActiveToggles();
|
|
2245
|
-
// First,
|
|
2246
|
-
const
|
|
2247
|
-
|
|
2248
|
-
|
|
2814
|
+
// First, uncheck all toggle inputs
|
|
2815
|
+
const allToggleInputs = this.modal.querySelectorAll('.cv-toggle-input');
|
|
2816
|
+
allToggleInputs.forEach(toggleInput => {
|
|
2817
|
+
toggleInput.checked = false;
|
|
2249
2818
|
});
|
|
2250
|
-
// Then
|
|
2819
|
+
// Then check the ones that should be active
|
|
2251
2820
|
activeToggles.forEach(toggle => {
|
|
2252
|
-
const
|
|
2253
|
-
if (
|
|
2254
|
-
|
|
2821
|
+
const toggleInput = this.modal?.querySelector(`[data-toggle="${toggle}"]`);
|
|
2822
|
+
if (toggleInput) {
|
|
2823
|
+
toggleInput.checked = true;
|
|
2255
2824
|
}
|
|
2256
2825
|
});
|
|
2257
2826
|
// Load tab group selections
|
|
2258
2827
|
const activeTabs = this.core.getCurrentActiveTabs();
|
|
2259
|
-
const tabGroupSelects = this.modal.querySelectorAll('.cv-
|
|
2828
|
+
const tabGroupSelects = this.modal.querySelectorAll('.cv-tabgroup-select');
|
|
2260
2829
|
tabGroupSelects.forEach(select => {
|
|
2261
2830
|
const groupId = select.dataset.groupId;
|
|
2262
2831
|
if (groupId && activeTabs[groupId]) {
|
|
2263
2832
|
select.value = activeTabs[groupId];
|
|
2264
2833
|
}
|
|
2265
2834
|
});
|
|
2835
|
+
// Load tab nav visibility preference
|
|
2836
|
+
const navPref = (() => {
|
|
2837
|
+
try {
|
|
2838
|
+
const raw = localStorage.getItem('cv-tab-navs-visible');
|
|
2839
|
+
if (raw === null)
|
|
2840
|
+
return TabManager.areNavsVisible(document.body);
|
|
2841
|
+
return raw === 'true';
|
|
2842
|
+
}
|
|
2843
|
+
catch (e) {
|
|
2844
|
+
return TabManager.areNavsVisible(document.body);
|
|
2845
|
+
}
|
|
2846
|
+
})();
|
|
2847
|
+
const tabNavToggle = this.modal.querySelector('.cv-nav-pref-input');
|
|
2848
|
+
if (tabNavToggle) {
|
|
2849
|
+
tabNavToggle.checked = navPref;
|
|
2850
|
+
// Ensure UI matches actual visibility
|
|
2851
|
+
TabManager.setNavsVisibility(document.body, navPref);
|
|
2852
|
+
}
|
|
2266
2853
|
}
|
|
2267
2854
|
/**
|
|
2268
2855
|
* Format toggle name for display
|
|
@@ -2296,25 +2883,29 @@ ${TAB_STYLES}
|
|
|
2296
2883
|
this.modal = document.createElement('div');
|
|
2297
2884
|
this.modal.className = 'cv-widget-modal-overlay cv-welcome-modal-overlay';
|
|
2298
2885
|
this.applyThemeToModal();
|
|
2299
|
-
this.modal.innerHTML = `
|
|
2300
|
-
<div class="cv-widget-modal cv-welcome-modal">
|
|
2301
|
-
<
|
|
2302
|
-
<
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2886
|
+
this.modal.innerHTML = `
|
|
2887
|
+
<div class="cv-widget-modal cv-welcome-modal">
|
|
2888
|
+
<header class="cv-modal-header">
|
|
2889
|
+
<div class="cv-modal-header-content">
|
|
2890
|
+
<div class="cv-modal-icon">
|
|
2891
|
+
${getGearIcon()}
|
|
2892
|
+
</div>
|
|
2893
|
+
<h1 class="cv-modal-title">${this.options.welcomeTitle}</h1>
|
|
2894
|
+
</div>
|
|
2895
|
+
</header>
|
|
2896
|
+
<div class="cv-modal-main">
|
|
2897
|
+
<p class="cv-welcome-message">${this.options.welcomeMessage}</p>
|
|
2898
|
+
|
|
2899
|
+
<div class="cv-welcome-widget-preview">
|
|
2900
|
+
<div class="cv-welcome-widget-icon">
|
|
2901
|
+
${getGearIcon()}
|
|
2902
|
+
</div>
|
|
2903
|
+
<p class="cv-welcome-widget-label">Look for this widget</p>
|
|
2904
|
+
</div>
|
|
2905
|
+
|
|
2906
|
+
<button class="cv-welcome-got-it">Got it!</button>
|
|
2907
|
+
</div>
|
|
2908
|
+
</div>
|
|
2318
2909
|
`;
|
|
2319
2910
|
document.body.appendChild(this.modal);
|
|
2320
2911
|
this.attachWelcomeModalEventListeners();
|
|
@@ -2325,13 +2916,6 @@ ${TAB_STYLES}
|
|
|
2325
2916
|
attachWelcomeModalEventListeners() {
|
|
2326
2917
|
if (!this.modal)
|
|
2327
2918
|
return;
|
|
2328
|
-
// Close button
|
|
2329
|
-
const closeBtn = this.modal.querySelector('.cv-widget-modal-close');
|
|
2330
|
-
if (closeBtn) {
|
|
2331
|
-
closeBtn.addEventListener('click', () => {
|
|
2332
|
-
this.closeModal();
|
|
2333
|
-
});
|
|
2334
|
-
}
|
|
2335
2919
|
// Got it button
|
|
2336
2920
|
const gotItBtn = this.modal.querySelector('.cv-welcome-got-it');
|
|
2337
2921
|
if (gotItBtn) {
|