funuicss 3.7.10 → 3.7.11
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/css/fun.css +65 -47
- package/package.json +1 -1
- package/ui/card/Card.d.ts +22 -2
- package/ui/card/Card.js +51 -162
- package/ui/video/Video.d.ts +2 -1
- package/ui/video/Video.js +117 -72
- package/ui/vista/Vista.d.ts +6 -0
- package/ui/vista/Vista.js +3 -8
package/css/fun.css
CHANGED
|
@@ -821,31 +821,6 @@ h6, .h6 {
|
|
|
821
821
|
}
|
|
822
822
|
|
|
823
823
|
|
|
824
|
-
/* For WebKit browsers (Chrome, Edge, Brave, Safari) */
|
|
825
|
-
::-webkit-scrollbar {
|
|
826
|
-
width: 10px;
|
|
827
|
-
height: 10px;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
::-webkit-scrollbar-track {
|
|
831
|
-
border-radius: 10px;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
::-webkit-scrollbar-thumb {
|
|
835
|
-
background-color: var(--borderColor, #999); /* Darker thumb */
|
|
836
|
-
border-radius: 10px;
|
|
837
|
-
border: 2px solid transparent;
|
|
838
|
-
background-clip: content-box;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
::-webkit-scrollbar-thumb:hover {
|
|
842
|
-
background-color: var(--dark500, #666); /* Hover effect */
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
/* Optional: Hide scrollbar buttons (arrows) */
|
|
846
|
-
::-webkit-scrollbar-button {
|
|
847
|
-
display: none;
|
|
848
|
-
}
|
|
849
824
|
|
|
850
825
|
|
|
851
826
|
|
|
@@ -986,12 +961,6 @@ link:hover {
|
|
|
986
961
|
line-height: 1 !important;
|
|
987
962
|
height: var(--inputButtonHeight);
|
|
988
963
|
}
|
|
989
|
-
.button.primary{outline:1px solid var(--primary);}
|
|
990
|
-
.button.primary:active{outline:1px solid var(--primary300);}
|
|
991
|
-
.button.secondary{outline:1px solid var(--secondary);}
|
|
992
|
-
.button.secondary:active{outline:1px solid var(--secondary300);}
|
|
993
|
-
.button.accent{outline:1px solid var(--accent);}
|
|
994
|
-
.button.accent:active{outline:1px solid var(--accent300);}
|
|
995
964
|
|
|
996
965
|
|
|
997
966
|
/* Ripple effect */
|
|
@@ -1103,9 +1072,10 @@ link:hover {
|
|
|
1103
1072
|
filter: var(--hoverable);
|
|
1104
1073
|
}
|
|
1105
1074
|
.button.smallBtn {
|
|
1106
|
-
padding: 0.
|
|
1075
|
+
padding: 0.5rem 0.6rem !important;
|
|
1107
1076
|
font-size: var(--smallerFont) ;
|
|
1108
1077
|
height: fit-content !important;
|
|
1078
|
+
border-radius: calc(var(--radius) / 1.5);
|
|
1109
1079
|
}
|
|
1110
1080
|
.smallBtn.roundBtn{
|
|
1111
1081
|
padding: 0.3rem 0.8rem !important;
|
|
@@ -1473,12 +1443,12 @@ border-radius: var(--borderRadius);
|
|
|
1473
1443
|
/* Beautiful Progress Bar */
|
|
1474
1444
|
.progress-container {
|
|
1475
1445
|
width: 100%;
|
|
1476
|
-
padding: 0 0.5rem;
|
|
1477
1446
|
}
|
|
1478
1447
|
|
|
1479
1448
|
.progress-wrapper {
|
|
1480
1449
|
position: relative;
|
|
1481
1450
|
width: 100%;
|
|
1451
|
+
|
|
1482
1452
|
}
|
|
1483
1453
|
|
|
1484
1454
|
.video-progress {
|
|
@@ -1486,7 +1456,7 @@ border-radius: var(--borderRadius);
|
|
|
1486
1456
|
appearance: none;
|
|
1487
1457
|
width: 100%;
|
|
1488
1458
|
padding: 0 !important;
|
|
1489
|
-
height:
|
|
1459
|
+
height: 8px !important;
|
|
1490
1460
|
border-radius: 10px;
|
|
1491
1461
|
background: linear-gradient(
|
|
1492
1462
|
to right,
|
|
@@ -1499,12 +1469,11 @@ border-radius: var(--borderRadius);
|
|
|
1499
1469
|
cursor: pointer;
|
|
1500
1470
|
transition: all 0.3s ease;
|
|
1501
1471
|
position: relative;
|
|
1502
|
-
}
|
|
1503
1472
|
|
|
1504
|
-
.video-progress:hover {
|
|
1505
|
-
height: 8px;
|
|
1506
1473
|
}
|
|
1507
1474
|
|
|
1475
|
+
|
|
1476
|
+
|
|
1508
1477
|
.video-progress::-webkit-slider-thumb {
|
|
1509
1478
|
-webkit-appearance: none;
|
|
1510
1479
|
appearance: none;
|
|
@@ -1615,22 +1584,28 @@ border-radius: var(--borderRadius);
|
|
|
1615
1584
|
transform: scale(1.1);
|
|
1616
1585
|
}
|
|
1617
1586
|
|
|
1618
|
-
|
|
1619
|
-
.video_time {
|
|
1620
|
-
background-color: var(--raiseThemes);
|
|
1621
|
-
backdrop-filter: var(--raiseBackdrop);
|
|
1622
|
-
border-radius: 1rem;
|
|
1623
|
-
padding: 0.5rem 1rem;
|
|
1624
|
-
line-height: 1;
|
|
1625
|
-
font-size: 0.875rem;
|
|
1626
|
-
font-weight: 500;
|
|
1627
|
-
}
|
|
1587
|
+
|
|
1628
1588
|
|
|
1629
1589
|
/* Control buttons hover effects */
|
|
1630
1590
|
.video_container .circle {
|
|
1631
1591
|
transition: all 0.2s ease;
|
|
1632
1592
|
}
|
|
1633
1593
|
|
|
1594
|
+
.videoProgressContainer,
|
|
1595
|
+
.videoRightContainer,
|
|
1596
|
+
.videoLeftContainer{
|
|
1597
|
+
background-color: var(--dark);
|
|
1598
|
+
height: 30px !important;
|
|
1599
|
+
display: flex;
|
|
1600
|
+
align-items: center !important;
|
|
1601
|
+
align-content: center !important;
|
|
1602
|
+
justify-content: center !important;
|
|
1603
|
+
line-height: 0rem;
|
|
1604
|
+
color: var(--white) !important;
|
|
1605
|
+
border-radius: 0.5rem;
|
|
1606
|
+
padding: 0 0.5rem;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1634
1609
|
.video_container .circle:hover {
|
|
1635
1610
|
background-color: var(--primary) !important;
|
|
1636
1611
|
color: var(--white) !important;
|
|
@@ -1657,6 +1632,7 @@ border-radius: var(--borderRadius);
|
|
|
1657
1632
|
}
|
|
1658
1633
|
}
|
|
1659
1634
|
|
|
1635
|
+
|
|
1660
1636
|
/* Fullscreen adjustments */
|
|
1661
1637
|
.video_container:fullscreen {
|
|
1662
1638
|
width: 100vw;
|
|
@@ -10732,3 +10708,45 @@ z-index: 10;
|
|
|
10732
10708
|
@keyframes ping {
|
|
10733
10709
|
75%, 100% { transform: scale(2); opacity: 0; }
|
|
10734
10710
|
}
|
|
10711
|
+
|
|
10712
|
+
|
|
10713
|
+
|
|
10714
|
+
/* Make all scrollbars thin */
|
|
10715
|
+
* {
|
|
10716
|
+
scrollbar-width: thin;
|
|
10717
|
+
scrollbar-color: var(--borderColor,#aaa) transparent;
|
|
10718
|
+
}
|
|
10719
|
+
|
|
10720
|
+
/* Chrome / Safari / Edge */
|
|
10721
|
+
::-webkit-scrollbar {
|
|
10722
|
+
width: 6px !important;
|
|
10723
|
+
}
|
|
10724
|
+
|
|
10725
|
+
::-webkit-scrollbar-thumb {
|
|
10726
|
+
background-color: var(--borderColor,#aaa) !important;
|
|
10727
|
+
border-radius: 20px !important;
|
|
10728
|
+
border: 2px solid transparent !important;
|
|
10729
|
+
background-clip: content-box !important;
|
|
10730
|
+
|
|
10731
|
+
/* <<— Force thumb to always appear shorter visually */
|
|
10732
|
+
min-height: 40px !important;
|
|
10733
|
+
}
|
|
10734
|
+
|
|
10735
|
+
::-webkit-scrollbar-thumb:hover {
|
|
10736
|
+
background-color: var(--dark500,#666) !important;
|
|
10737
|
+
}
|
|
10738
|
+
|
|
10739
|
+
::-webkit-scrollbar-track {
|
|
10740
|
+
background: transparent !important;
|
|
10741
|
+
}
|
|
10742
|
+
|
|
10743
|
+
::-webkit-scrollbar-button {
|
|
10744
|
+
display: none !important;
|
|
10745
|
+
}
|
|
10746
|
+
|
|
10747
|
+
/* Make content scroll more so thumb shrinks */
|
|
10748
|
+
*::-webkit-scrollbar-thumb {
|
|
10749
|
+
min-height: 40px !important;
|
|
10750
|
+
}
|
|
10751
|
+
|
|
10752
|
+
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.7.
|
|
2
|
+
"version": "3.7.11",
|
|
3
3
|
"name": "funuicss",
|
|
4
4
|
"description": "React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting both seamless functionality and aesthetic appeal—all achieved with minimal lines of code. Unleash the power of simplicity and style in your projects!",
|
|
5
5
|
"main": "index.js",
|
package/ui/card/Card.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ interface CardProps {
|
|
|
32
32
|
gradient?: string;
|
|
33
33
|
opacity?: number;
|
|
34
34
|
border?: string;
|
|
35
|
-
hoverEffect?: 'none' | 'lift' | 'glow';
|
|
36
35
|
heading?: ReactNode;
|
|
37
36
|
headingSize?: string;
|
|
38
37
|
headingWeight?: number;
|
|
@@ -67,6 +66,27 @@ interface CardProps {
|
|
|
67
66
|
ctaPrimaryText?: string;
|
|
68
67
|
ctaSecondaryText?: string;
|
|
69
68
|
ctaAccentText?: string;
|
|
69
|
+
ctaPrimaryRounded?: boolean;
|
|
70
|
+
ctaPrimaryFlat?: boolean;
|
|
71
|
+
ctaPrimaryPrefix?: string;
|
|
72
|
+
ctaPrimarySuffix?: string;
|
|
73
|
+
primaryIconSize?: number;
|
|
74
|
+
primaryButtonFuncss?: string;
|
|
75
|
+
primaryButtonSmall?: boolean;
|
|
76
|
+
ctaSecondaryRounded?: boolean;
|
|
77
|
+
ctaSecondaryFlat?: boolean;
|
|
78
|
+
ctaSecondaryPrefix?: string;
|
|
79
|
+
ctaSecondarySuffix?: string;
|
|
80
|
+
secondaryIconSize?: number;
|
|
81
|
+
secondaryButtonFuncss?: string;
|
|
82
|
+
secondaryButtonSmall?: boolean;
|
|
83
|
+
ctaAccentRounded?: boolean;
|
|
84
|
+
ctaAccentFlat?: boolean;
|
|
85
|
+
ctaAccentPrefix?: string;
|
|
86
|
+
ctaAccentSuffix?: string;
|
|
87
|
+
accentIconSize?: number;
|
|
88
|
+
accentButtonFuncss?: string;
|
|
89
|
+
accentButtonSmall?: boolean;
|
|
70
90
|
ctaGap?: number;
|
|
71
91
|
ctaFlexJustify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
|
|
72
92
|
ctaClass?: string;
|
|
@@ -78,5 +98,5 @@ interface CardProps {
|
|
|
78
98
|
footerClass?: string;
|
|
79
99
|
variant?: string;
|
|
80
100
|
}
|
|
81
|
-
export default function Card(
|
|
101
|
+
export default function Card(localProps: CardProps): React.JSX.Element;
|
|
82
102
|
export {};
|
package/ui/card/Card.js
CHANGED
|
@@ -11,17 +11,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
return __assign.apply(this, arguments);
|
|
13
13
|
};
|
|
14
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
-
t[p] = s[p];
|
|
18
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
-
t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
16
|
};
|
|
@@ -37,113 +26,13 @@ var Button_1 = __importDefault(require("../button/Button"));
|
|
|
37
26
|
var Flex_1 = __importDefault(require("../flex/Flex"));
|
|
38
27
|
var Text_1 = __importDefault(require("../text/Text"));
|
|
39
28
|
var View_1 = __importDefault(require("../view/View"));
|
|
40
|
-
function Card(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
pattern = _b === void 0 ? 'none' : _b, _c = _a.patternOpacity, patternOpacity = _c === void 0 ? 0.1 : _c, gradient = _a.gradient, _d = _a.opacity, opacity = _d === void 0 ? 1 : _d, border = _a.border, _e = _a.hoverEffect, hoverEffect = _e === void 0 ? 'none' : _e,
|
|
48
|
-
// Enhanced Content Props
|
|
49
|
-
heading = _a.heading, _f = _a.headingSize, headingSize = _f === void 0 ? 'xl' : _f, _g = _a.headingWeight, headingWeight = _g === void 0 ? 700 : _g, headingColor = _a.headingColor, headingClass = _a.headingClass, headingLineHeight = _a.headingLineHeight, subheading = _a.subheading, _h = _a.subheadingSize, subheadingSize = _h === void 0 ? 'base' : _h, _j = _a.subheadingWeight, subheadingWeight = _j === void 0 ? 400 : _j, _k = _a.subheadingColor, subheadingColor = _k === void 0 ? 'light' : _k, subheadingClass = _a.subheadingClass, subheadingLineHeight = _a.subheadingLineHeight, content = _a.content, _l = _a.contentSize, contentSize = _l === void 0 ? 'base' : _l, _m = _a.contentWeight, contentWeight = _m === void 0 ? 400 : _m, contentColor = _a.contentColor, contentClass = _a.contentClass, contentLineHeight = _a.contentLineHeight,
|
|
50
|
-
// Image Props
|
|
51
|
-
imageUrl = _a.imageUrl, _o = _a.imageAlt, imageAlt = _o === void 0 ? '' : _o, _p = _a.imageClass, imageClass = _p === void 0 ? '' : _p, _q = _a.imageSize, imageSize = _q === void 0 ? '100%' : _q,
|
|
52
|
-
// Enhanced Footer/CTA Props
|
|
53
|
-
_r = _a.showPrimaryCTA,
|
|
54
|
-
// Enhanced Footer/CTA Props
|
|
55
|
-
showPrimaryCTA = _r === void 0 ? false : _r, _s = _a.showSecondaryCTA, showSecondaryCTA = _s === void 0 ? false : _s, _t = _a.showAccentCTA, showAccentCTA = _t === void 0 ? false : _t, _u = _a.primaryButtonOutlined, primaryButtonOutlined = _u === void 0 ? false : _u, _v = _a.secondaryButtonOutlined, secondaryButtonOutlined = _v === void 0 ? false : _v, _w = _a.accentButtonOutlined, accentButtonOutlined = _w === void 0 ? false : _w, _x = _a.ctaPrimaryUrl, ctaPrimaryUrl = _x === void 0 ? '' : _x, _y = _a.ctaSecondaryUrl, ctaSecondaryUrl = _y === void 0 ? '' : _y, _z = _a.ctaAccentUrl, ctaAccentUrl = _z === void 0 ? '' : _z, _0 = _a.ctaPrimaryText, ctaPrimaryText = _0 === void 0 ? 'Primary Action' : _0, _1 = _a.ctaSecondaryText, ctaSecondaryText = _1 === void 0 ? 'Secondary Action' : _1, _2 = _a.ctaAccentText, ctaAccentText = _2 === void 0 ? 'Accent Action' : _2, _3 = _a.ctaGap, ctaGap = _3 === void 0 ? 1 : _3, _4 = _a.ctaFlexJustify, ctaFlexJustify = _4 === void 0 ? 'center' : _4, _5 = _a.ctaClass, ctaClass = _5 === void 0 ? '' : _5,
|
|
56
|
-
// Section Styling Props
|
|
57
|
-
headerStyle = _a.headerStyle, headerClass = _a.headerClass, bodyStyle = _a.bodyStyle, bodyClass = _a.bodyClass, footerStyle = _a.footerStyle, footerClass = _a.footerClass,
|
|
58
|
-
// Configuration
|
|
59
|
-
variant = _a.variant, rest = __rest(_a, ["color", "bg", "width", "height", "minHeight", "minWidth", "margin", "padding", "funcss", "children", "roundEdge", "maxHeight", "maxWidth", "horizontal", "id", "header", "body", "footer", "noGap", "fab", "image", "shadowless", "flat", "responsiveMedium", "xl", "responsiveSmall", "style", "pattern", "patternOpacity", "gradient", "opacity", "border", "hoverEffect", "heading", "headingSize", "headingWeight", "headingColor", "headingClass", "headingLineHeight", "subheading", "subheadingSize", "subheadingWeight", "subheadingColor", "subheadingClass", "subheadingLineHeight", "content", "contentSize", "contentWeight", "contentColor", "contentClass", "contentLineHeight", "imageUrl", "imageAlt", "imageClass", "imageSize", "showPrimaryCTA", "showSecondaryCTA", "showAccentCTA", "primaryButtonOutlined", "secondaryButtonOutlined", "accentButtonOutlined", "ctaPrimaryUrl", "ctaSecondaryUrl", "ctaAccentUrl", "ctaPrimaryText", "ctaSecondaryText", "ctaAccentText", "ctaGap", "ctaFlexJustify", "ctaClass", "headerStyle", "headerClass", "bodyStyle", "bodyClass", "footerStyle", "footerClass", "variant"]);
|
|
60
|
-
// Use the component config hook
|
|
61
|
-
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Card', variant).mergeWithLocal;
|
|
62
|
-
// Merge config with local props
|
|
63
|
-
var mergedProps = mergeWithLocal({
|
|
64
|
-
// Original props
|
|
65
|
-
color: color,
|
|
66
|
-
bg: bg,
|
|
67
|
-
width: width,
|
|
68
|
-
height: height,
|
|
69
|
-
minHeight: minHeight,
|
|
70
|
-
minWidth: minWidth,
|
|
71
|
-
margin: margin,
|
|
72
|
-
padding: padding,
|
|
73
|
-
funcss: funcss,
|
|
74
|
-
children: children,
|
|
75
|
-
roundEdge: roundEdge,
|
|
76
|
-
maxHeight: maxHeight,
|
|
77
|
-
maxWidth: maxWidth,
|
|
78
|
-
horizontal: horizontal,
|
|
79
|
-
id: id,
|
|
80
|
-
header: header,
|
|
81
|
-
body: body,
|
|
82
|
-
footer: footer,
|
|
83
|
-
noGap: noGap,
|
|
84
|
-
fab: fab,
|
|
85
|
-
image: image,
|
|
86
|
-
shadowless: shadowless,
|
|
87
|
-
flat: flat,
|
|
88
|
-
responsiveMedium: responsiveMedium,
|
|
89
|
-
xl: xl,
|
|
90
|
-
responsiveSmall: responsiveSmall,
|
|
91
|
-
style: style,
|
|
92
|
-
// Pattern props
|
|
93
|
-
pattern: pattern,
|
|
94
|
-
patternOpacity: patternOpacity,
|
|
95
|
-
gradient: gradient,
|
|
96
|
-
opacity: opacity,
|
|
97
|
-
border: border,
|
|
98
|
-
hoverEffect: hoverEffect,
|
|
99
|
-
// Enhanced content props
|
|
100
|
-
heading: heading,
|
|
101
|
-
headingSize: headingSize,
|
|
102
|
-
headingWeight: headingWeight,
|
|
103
|
-
headingColor: headingColor,
|
|
104
|
-
headingClass: headingClass,
|
|
105
|
-
headingLineHeight: headingLineHeight,
|
|
106
|
-
subheading: subheading,
|
|
107
|
-
subheadingSize: subheadingSize,
|
|
108
|
-
subheadingWeight: subheadingWeight,
|
|
109
|
-
subheadingColor: subheadingColor,
|
|
110
|
-
subheadingClass: subheadingClass,
|
|
111
|
-
subheadingLineHeight: subheadingLineHeight,
|
|
112
|
-
content: content,
|
|
113
|
-
contentSize: contentSize,
|
|
114
|
-
contentWeight: contentWeight,
|
|
115
|
-
contentColor: contentColor,
|
|
116
|
-
contentClass: contentClass,
|
|
117
|
-
contentLineHeight: contentLineHeight,
|
|
118
|
-
// Image props
|
|
119
|
-
imageUrl: imageUrl,
|
|
120
|
-
imageAlt: imageAlt,
|
|
121
|
-
imageClass: imageClass,
|
|
122
|
-
imageSize: imageSize,
|
|
123
|
-
// CTA props
|
|
124
|
-
showPrimaryCTA: showPrimaryCTA,
|
|
125
|
-
showSecondaryCTA: showSecondaryCTA,
|
|
126
|
-
showAccentCTA: showAccentCTA,
|
|
127
|
-
primaryButtonOutlined: primaryButtonOutlined,
|
|
128
|
-
secondaryButtonOutlined: secondaryButtonOutlined,
|
|
129
|
-
accentButtonOutlined: accentButtonOutlined,
|
|
130
|
-
ctaPrimaryUrl: ctaPrimaryUrl,
|
|
131
|
-
ctaSecondaryUrl: ctaSecondaryUrl,
|
|
132
|
-
ctaAccentUrl: ctaAccentUrl,
|
|
133
|
-
ctaPrimaryText: ctaPrimaryText,
|
|
134
|
-
ctaSecondaryText: ctaSecondaryText,
|
|
135
|
-
ctaAccentText: ctaAccentText,
|
|
136
|
-
ctaGap: ctaGap,
|
|
137
|
-
ctaFlexJustify: ctaFlexJustify,
|
|
138
|
-
ctaClass: ctaClass,
|
|
139
|
-
// Section styling props
|
|
140
|
-
headerStyle: headerStyle,
|
|
141
|
-
headerClass: headerClass,
|
|
142
|
-
bodyStyle: bodyStyle,
|
|
143
|
-
bodyClass: bodyClass,
|
|
144
|
-
footerStyle: footerStyle,
|
|
145
|
-
footerClass: footerClass,
|
|
146
|
-
}).props;
|
|
29
|
+
function Card(localProps) {
|
|
30
|
+
// Use the component config hook with the variant from localProps
|
|
31
|
+
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Card', localProps.variant).mergeWithLocal;
|
|
32
|
+
// Merge config with local props - local props override config
|
|
33
|
+
var mergedProps = mergeWithLocal(localProps).props;
|
|
34
|
+
// Use mergedProps directly - they already have the correct merge logic applied
|
|
35
|
+
var final = mergedProps;
|
|
147
36
|
var themeVariant = (0, theme_1.useVariant)().variant;
|
|
148
37
|
// Handle content - if string, use dangerouslySetInnerHTML, otherwise render as is
|
|
149
38
|
var renderContent = function (content) {
|
|
@@ -152,74 +41,74 @@ function Card(_a) {
|
|
|
152
41
|
}
|
|
153
42
|
return content;
|
|
154
43
|
};
|
|
44
|
+
// CTA Buttons Component
|
|
45
|
+
var CTAButtons = function () {
|
|
46
|
+
var hasCTAs = final.showPrimaryCTA || final.showSecondaryCTA || final.showAccentCTA;
|
|
47
|
+
if (!hasCTAs)
|
|
48
|
+
return null;
|
|
49
|
+
return (react_1.default.createElement(Flex_1.default, { gap: final.ctaGap, justify: final.ctaFlexJustify, className: "mt-4 ".concat(final.ctaClass), wrap: "wrap", width: '100%' },
|
|
50
|
+
final.showPrimaryCTA && (react_1.default.createElement(Button_1.default, { bg: "primary", outlined: final.primaryButtonOutlined, onClick: function () { return final.ctaPrimaryUrl && (window.location.href = final.ctaPrimaryUrl); }, rounded: final.ctaPrimaryRounded, flat: final.ctaPrimaryFlat, stringPrefix: final.ctaPrimaryPrefix, stringSuffix: final.ctaPrimarySuffix, iconSize: final.primaryIconSize, funcss: final.primaryButtonFuncss, small: final.primaryButtonSmall }, final.ctaPrimaryText)),
|
|
51
|
+
final.showSecondaryCTA && (react_1.default.createElement(Button_1.default, { bg: "secondary", outlined: final.secondaryButtonOutlined, onClick: function () { return final.ctaSecondaryUrl && (window.location.href = final.ctaSecondaryUrl); }, rounded: final.ctaSecondaryRounded, flat: final.ctaSecondaryFlat, stringPrefix: final.ctaSecondaryPrefix, stringSuffix: final.ctaSecondarySuffix, iconSize: final.secondaryIconSize, funcss: final.secondaryButtonFuncss, small: final.secondaryButtonSmall }, final.ctaSecondaryText)),
|
|
52
|
+
final.showAccentCTA && (react_1.default.createElement(Button_1.default, { bg: "accent", outlined: final.accentButtonOutlined, onClick: function () { return final.ctaAccentUrl && (window.location.href = final.ctaAccentUrl); }, rounded: final.ctaAccentRounded, flat: final.ctaAccentFlat, stringPrefix: final.ctaAccentPrefix, stringSuffix: final.ctaAccentSuffix, iconSize: final.accentIconSize, funcss: final.accentButtonFuncss, small: final.accentButtonSmall }, final.ctaAccentText))));
|
|
53
|
+
};
|
|
155
54
|
// Enhanced Text Content with flexible styling
|
|
156
55
|
var EnhancedTextContent = (react_1.default.createElement("div", { className: "card-enhanced-content" },
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
56
|
+
final.heading && (react_1.default.createElement(Text_1.default, { block: true, size: final.headingSize, weight: final.headingWeight, color: final.headingColor, funcss: final.headingClass, lineHeight: final.headingLineHeight }, renderContent(final.heading))),
|
|
57
|
+
final.subheading && (react_1.default.createElement(Text_1.default, { block: true, size: final.subheadingSize, weight: final.subheadingWeight, color: final.subheadingColor, funcss: "mt-1 ".concat(final.subheadingClass), lineHeight: final.subheadingLineHeight }, renderContent(final.subheading))),
|
|
58
|
+
final.content && (react_1.default.createElement(Text_1.default, { block: true, size: final.contentSize, weight: final.contentWeight, color: final.contentColor, funcss: "mt-3 ".concat(final.contentClass), lineHeight: final.contentLineHeight, article: true }, renderContent(final.content)))));
|
|
160
59
|
// Image Content - uses imageUrl if no image component provided
|
|
161
|
-
var ImageContent = (
|
|
162
|
-
width:
|
|
60
|
+
var ImageContent = (final.image || final.imageUrl) && (react_1.default.createElement("div", { className: "card-image-content" }, final.image ? (final.image) : (final.imageUrl && (react_1.default.createElement("img", { src: final.imageUrl, alt: final.imageAlt, className: final.imageClass, style: {
|
|
61
|
+
width: final.imageSize,
|
|
163
62
|
height: 'auto',
|
|
164
63
|
objectFit: 'cover',
|
|
165
64
|
borderRadius: 'inherit'
|
|
166
65
|
} })))));
|
|
167
|
-
// CTA Buttons Component
|
|
168
|
-
var CTAButtons = function () {
|
|
169
|
-
var hasCTAs = mergedProps.showPrimaryCTA || mergedProps.showSecondaryCTA || mergedProps.showAccentCTA;
|
|
170
|
-
if (!hasCTAs)
|
|
171
|
-
return null;
|
|
172
|
-
return (react_1.default.createElement(Flex_1.default, { gap: mergedProps.ctaGap, justify: mergedProps.ctaFlexJustify, className: "mt-4 ".concat(mergedProps.ctaClass), wrap: "wrap", width: '100%' },
|
|
173
|
-
mergedProps.showPrimaryCTA && (react_1.default.createElement(Button_1.default, { bg: "primary", outlined: mergedProps.primaryButtonOutlined, onClick: function () { return mergedProps.ctaPrimaryUrl && (window.location.href = mergedProps.ctaPrimaryUrl); } }, mergedProps.ctaPrimaryText)),
|
|
174
|
-
mergedProps.showSecondaryCTA && (react_1.default.createElement(Button_1.default, { bg: "secondary", outlined: mergedProps.secondaryButtonOutlined, onClick: function () { return mergedProps.ctaSecondaryUrl && (window.location.href = mergedProps.ctaSecondaryUrl); } }, mergedProps.ctaSecondaryText)),
|
|
175
|
-
mergedProps.showAccentCTA && (react_1.default.createElement(Button_1.default, { bg: "accent", outlined: mergedProps.accentButtonOutlined, onClick: function () { return mergedProps.ctaAccentUrl && (window.location.href = mergedProps.ctaAccentUrl); } }, mergedProps.ctaAccentText))));
|
|
176
|
-
};
|
|
177
66
|
// Determine if we should use enhanced content
|
|
178
|
-
var hasEnhancedContent =
|
|
179
|
-
var hasEnhancedFooter =
|
|
180
|
-
var hasImageContent =
|
|
181
|
-
return (react_1.default.createElement("div",
|
|
182
|
-
|
|
67
|
+
var hasEnhancedContent = final.heading || final.subheading || final.content;
|
|
68
|
+
var hasEnhancedFooter = final.showPrimaryCTA || final.showSecondaryCTA || final.showAccentCTA;
|
|
69
|
+
var hasImageContent = final.image || final.imageUrl;
|
|
70
|
+
return (react_1.default.createElement("div", { id: final.id || '', className: "\n card \n card_flex\n ".concat(!final.image && !final.imageUrl ? "p" : "", "\n ").concat(final.noGap ? 'no-gap' : '', " \n ").concat(final.xl ? 'xl' : '', " \n text-").concat(final.color || '', " \n ").concat(final.bg || '', " \n ").concat(final.funcss || '', " \n ").concat(final.roundEdge ? 'round-edge' : '', " \n ").concat(final.shadowless ? 'shadowless' : '', " \n ").concat(final.flat ? 'flat' : '', " \n ").concat(final.horizontal ? 'horizontalCard' : '', "\n ").concat(final.responsiveMedium ? 'responsiveMedium' : '', "\n ").concat(final.responsiveSmall ? 'responsiveSmall' : '', "\n ").concat(final.pattern !== 'none' ? "pattern-".concat(final.pattern) : '', "\n "), style: __assign({ width: "".concat(final.width || ''), height: "".concat(final.height || ''), minHeight: "".concat(final.minHeight || ''), minWidth: "".concat(final.minWidth || ''), maxHeight: final.maxHeight || '', maxWidth: final.maxWidth || '', margin: "".concat(final.margin || ''), padding: "".concat(final.padding || ''), background: final.gradient, opacity: final.opacity, position: 'relative', overflow: 'hidden' }, final.style) },
|
|
71
|
+
final.pattern !== 'none' && (react_1.default.createElement("div", { className: "card-pattern-overlay", style: {
|
|
183
72
|
position: 'absolute',
|
|
184
73
|
top: 0,
|
|
185
74
|
left: 0,
|
|
186
75
|
right: 0,
|
|
187
76
|
bottom: 0,
|
|
188
77
|
pointerEvents: 'none',
|
|
189
|
-
opacity:
|
|
78
|
+
opacity: final.patternOpacity,
|
|
190
79
|
mixBlendMode: 'multiply',
|
|
191
|
-
backgroundImage:
|
|
80
|
+
backgroundImage: final.pattern === 'grid' ?
|
|
192
81
|
"linear-gradient(to right, rgba(var(--borderRgb), 1) 1px, transparent 1px),\n linear-gradient(to bottom, rgba(var(--borderRgb), 1) 1px, transparent 1px)" :
|
|
193
|
-
|
|
82
|
+
final.pattern === 'dots' ?
|
|
194
83
|
"radial-gradient(rgba(var(--borderRgb), 1) 1px, transparent 1px)" :
|
|
195
|
-
|
|
84
|
+
final.pattern === 'diagonal' ?
|
|
196
85
|
"repeating-linear-gradient(45deg, rgba(var(--borderRgb), 1), rgba(var(--borderRgb), 1) 1px, transparent 1px, transparent 10px)" :
|
|
197
|
-
|
|
86
|
+
final.pattern === 'checkerboard' ?
|
|
198
87
|
"linear-gradient(45deg, rgba(var(--borderRgb), 1) 25%, transparent 25%), \n linear-gradient(-45deg, rgba(var(--borderRgb), 1) 25%, transparent 25%), \n linear-gradient(45deg, transparent 75%, rgba(var(--borderRgb), 1) 75%), \n linear-gradient(-45deg, transparent 75%, rgba(var(--borderRgb), 1) 75%)" :
|
|
199
|
-
|
|
88
|
+
final.pattern === 'horizontal' ?
|
|
200
89
|
"linear-gradient(to bottom, rgba(var(--borderRgb), 1) 1px, transparent 1px)" :
|
|
201
|
-
|
|
90
|
+
final.pattern === 'vertical' ?
|
|
202
91
|
"linear-gradient(to right, rgba(var(--borderRgb), 1) 1px, transparent 1px)" : 'none',
|
|
203
|
-
backgroundSize:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
92
|
+
backgroundSize: final.pattern === 'grid' ? '20px 20px' :
|
|
93
|
+
final.pattern === 'dots' ? '10px 10px' :
|
|
94
|
+
final.pattern === 'diagonal' ? '20px 20px' :
|
|
95
|
+
final.pattern === 'checkerboard' ? '20px 20px' :
|
|
96
|
+
final.pattern === 'horizontal' ? '100% 10px' :
|
|
97
|
+
final.pattern === 'vertical' ? '10px 100%' : 'auto'
|
|
209
98
|
} })),
|
|
210
|
-
hasImageContent ? (ImageContent) : (
|
|
211
|
-
|
|
99
|
+
hasImageContent ? (ImageContent) : (final.image ? react_1.default.createElement("div", { className: "".concat(final.fab ? 'relative' : '') },
|
|
100
|
+
final.image,
|
|
212
101
|
" ",
|
|
213
|
-
|
|
102
|
+
final.fab ? final.fab : '') : ''),
|
|
214
103
|
react_1.default.createElement(View_1.default, { funcss: hasImageContent ? 'p' : '' },
|
|
215
|
-
hasEnhancedContent ? (react_1.default.createElement(CardHeader_1.default, { style:
|
|
216
|
-
|
|
104
|
+
hasEnhancedContent ? (react_1.default.createElement(CardHeader_1.default, { style: final.headerStyle, className: final.headerClass }, EnhancedTextContent)) : (final.header && !final.horizontal ? (react_1.default.createElement(CardHeader_1.default, { style: final.headerStyle, className: final.headerClass }, renderContent(final.header))) : ''),
|
|
105
|
+
final.body ?
|
|
217
106
|
react_1.default.createElement("div", null,
|
|
218
|
-
|
|
219
|
-
react_1.default.createElement(CardBody_1.default, { style:
|
|
220
|
-
|
|
107
|
+
final.horizontal && !hasEnhancedContent ? (react_1.default.createElement(CardHeader_1.default, { style: final.headerStyle, className: final.headerClass }, renderContent(final.header))) : '',
|
|
108
|
+
react_1.default.createElement(CardBody_1.default, { style: final.bodyStyle, className: final.bodyClass }, hasEnhancedContent ? EnhancedTextContent : renderContent(final.body)),
|
|
109
|
+
final.horizontal && !hasEnhancedFooter ? (react_1.default.createElement(CardFooter_1.default, { style: final.footerStyle, className: final.footerClass }, renderContent(final.footer))) : '')
|
|
221
110
|
: '',
|
|
222
|
-
|
|
223
|
-
hasEnhancedFooter ? (react_1.default.createElement(CardFooter_1.default, { style:
|
|
224
|
-
react_1.default.createElement(CTAButtons, null))) : (
|
|
111
|
+
final.children && (react_1.default.createElement(CardBody_1.default, { style: final.bodyStyle, className: final.bodyClass }, renderContent(final.children))),
|
|
112
|
+
hasEnhancedFooter ? (react_1.default.createElement(CardFooter_1.default, { style: final.footerStyle, className: final.footerClass },
|
|
113
|
+
react_1.default.createElement(CTAButtons, null))) : (final.footer && !final.horizontal ? (react_1.default.createElement(CardFooter_1.default, { style: final.footerStyle, className: final.footerClass }, renderContent(final.footer))) : ''))));
|
|
225
114
|
}
|
package/ui/video/Video.d.ts
CHANGED
|
@@ -43,7 +43,8 @@ interface VideoProps {
|
|
|
43
43
|
rewindCss?: string;
|
|
44
44
|
forwardCss?: string;
|
|
45
45
|
buttonCss?: string;
|
|
46
|
+
volumeStyle?: 'slider' | 'compact' | 'hover';
|
|
46
47
|
variant?: string;
|
|
47
48
|
}
|
|
48
|
-
export default function Video({ src, poster, onDuration, onEnded, isPause, spacebarPlay, className, autoPlay, showControls, showPlayPause, showProgress, showVolume, showTime, showFullscreen, showDownload, showSeekButtons, playIcon, pauseIcon, fullscreenIcon, downloadIcon, volumeIcon, muteIcon, rewindIcon, forwardIcon, hideControlsDelay, loop, muted, seekAmount, funcss, containerCss, videoCss, controlsCss, progressCss, progressBarCss, timeCss, playCss, pauseCss, volumeCss, fullscreenCss, downloadCss, rewindCss, forwardCss, buttonCss, variant, ...rest }: VideoProps): React.JSX.Element;
|
|
49
|
+
export default function Video({ src, poster, onDuration, onEnded, isPause, spacebarPlay, className, autoPlay, showControls, showPlayPause, showProgress, showVolume, showTime, showFullscreen, showDownload, showSeekButtons, playIcon, pauseIcon, fullscreenIcon, downloadIcon, volumeIcon, muteIcon, rewindIcon, forwardIcon, hideControlsDelay, loop, muted, seekAmount, funcss, containerCss, videoCss, controlsCss, progressCss, progressBarCss, timeCss, playCss, pauseCss, volumeCss, fullscreenCss, downloadCss, rewindCss, forwardCss, buttonCss, volumeStyle, variant, ...rest }: VideoProps): React.JSX.Element;
|
|
49
50
|
export {};
|
package/ui/video/Video.js
CHANGED
|
@@ -102,7 +102,6 @@ var tfi_1 = require("react-icons/tfi");
|
|
|
102
102
|
var Text_1 = __importDefault(require("../text/Text"));
|
|
103
103
|
var RowFlex_1 = __importDefault(require("../specials/RowFlex"));
|
|
104
104
|
var ToolTip_1 = __importDefault(require("../tooltip/ToolTip"));
|
|
105
|
-
var Circle_1 = __importDefault(require("../specials/Circle"));
|
|
106
105
|
var Tip_1 = __importDefault(require("../tooltip/Tip"));
|
|
107
106
|
var videoFunctions_1 = require("./videoFunctions");
|
|
108
107
|
var videoShortcuts_1 = require("./videoShortcuts");
|
|
@@ -110,7 +109,6 @@ var getDynamicIcon_1 = require("../../utils/getDynamicIcon");
|
|
|
110
109
|
// Configuration hook
|
|
111
110
|
var useComponentConfiguration = function (componentName, variant) {
|
|
112
111
|
if (variant === void 0) { variant = ''; }
|
|
113
|
-
// In a real implementation, this would come from a theme context or configuration file
|
|
114
112
|
var getComponentConfig = function () {
|
|
115
113
|
var baseConfig = {
|
|
116
114
|
Video: {
|
|
@@ -121,8 +119,8 @@ var useComponentConfiguration = function (componentName, variant) {
|
|
|
121
119
|
showVolume: true,
|
|
122
120
|
showTime: true,
|
|
123
121
|
showFullscreen: true,
|
|
124
|
-
showDownload:
|
|
125
|
-
showSeekButtons:
|
|
122
|
+
showDownload: false,
|
|
123
|
+
showSeekButtons: false,
|
|
126
124
|
spacebarPlay: true,
|
|
127
125
|
autoPlay: false,
|
|
128
126
|
loop: false,
|
|
@@ -144,18 +142,20 @@ var useComponentConfiguration = function (componentName, variant) {
|
|
|
144
142
|
rewindCss: '',
|
|
145
143
|
forwardCss: '',
|
|
146
144
|
buttonCss: '',
|
|
145
|
+
volumeStyle: 'slider', // 'slider' | 'compact' | 'hover'
|
|
147
146
|
},
|
|
148
147
|
minimal: {
|
|
149
148
|
showControls: true,
|
|
150
149
|
showPlayPause: true,
|
|
151
150
|
showProgress: true,
|
|
152
151
|
showVolume: false,
|
|
153
|
-
showTime:
|
|
154
|
-
showFullscreen:
|
|
152
|
+
showTime: true,
|
|
153
|
+
showFullscreen: true,
|
|
155
154
|
showDownload: false,
|
|
156
155
|
showSeekButtons: false,
|
|
157
156
|
controlsCss: 'minimal-controls',
|
|
158
157
|
buttonCss: 'minimal-btn',
|
|
158
|
+
volumeStyle: 'hover',
|
|
159
159
|
},
|
|
160
160
|
embedded: {
|
|
161
161
|
showControls: false,
|
|
@@ -175,6 +175,7 @@ var useComponentConfiguration = function (componentName, variant) {
|
|
|
175
175
|
showSeekButtons: true,
|
|
176
176
|
controlsCss: 'full-featured-controls',
|
|
177
177
|
buttonCss: 'featured-btn',
|
|
178
|
+
volumeStyle: 'slider',
|
|
178
179
|
},
|
|
179
180
|
theater: {
|
|
180
181
|
showControls: true,
|
|
@@ -182,6 +183,21 @@ var useComponentConfiguration = function (componentName, variant) {
|
|
|
182
183
|
videoCss: 'theater-video',
|
|
183
184
|
controlsCss: 'theater-controls',
|
|
184
185
|
fullscreenCss: 'theater-fullscreen',
|
|
186
|
+
volumeStyle: 'slider',
|
|
187
|
+
},
|
|
188
|
+
youtube: {
|
|
189
|
+
showControls: true,
|
|
190
|
+
showPlayPause: true,
|
|
191
|
+
showProgress: true,
|
|
192
|
+
showVolume: true,
|
|
193
|
+
showTime: true,
|
|
194
|
+
showFullscreen: true,
|
|
195
|
+
showDownload: false,
|
|
196
|
+
showSeekButtons: false,
|
|
197
|
+
controlsCss: 'youtube-controls',
|
|
198
|
+
buttonCss: 'youtube-btn',
|
|
199
|
+
volumeStyle: 'hover',
|
|
200
|
+
hideControlsDelay: 2000,
|
|
185
201
|
}
|
|
186
202
|
}
|
|
187
203
|
};
|
|
@@ -191,7 +207,6 @@ var useComponentConfiguration = function (componentName, variant) {
|
|
|
191
207
|
var config = getComponentConfig();
|
|
192
208
|
var variantConfig = variant && config[variant] ? config[variant] : {};
|
|
193
209
|
var defaultConfig = config.default || {};
|
|
194
|
-
// Merge: default config < variant config < local props (local props have highest priority)
|
|
195
210
|
var mergedProps = __assign(__assign(__assign({}, defaultConfig), variantConfig), localProps);
|
|
196
211
|
return {
|
|
197
212
|
props: mergedProps,
|
|
@@ -206,11 +221,11 @@ var useComponentConfiguration = function (componentName, variant) {
|
|
|
206
221
|
};
|
|
207
222
|
function Video(_a) {
|
|
208
223
|
var _this = this;
|
|
209
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
|
|
210
|
-
var src = _a.src, poster = _a.poster, onDuration = _a.onDuration, onEnded = _a.onEnded, isPause = _a.isPause, spacebarPlay = _a.spacebarPlay,
|
|
224
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
225
|
+
var src = _a.src, poster = _a.poster, onDuration = _a.onDuration, onEnded = _a.onEnded, isPause = _a.isPause, spacebarPlay = _a.spacebarPlay, _8 = _a.className, className = _8 === void 0 ? '' : _8, autoPlay = _a.autoPlay, showControls = _a.showControls, showPlayPause = _a.showPlayPause, showProgress = _a.showProgress, showVolume = _a.showVolume, showTime = _a.showTime, showFullscreen = _a.showFullscreen, showDownload = _a.showDownload, showSeekButtons = _a.showSeekButtons, playIcon = _a.playIcon, pauseIcon = _a.pauseIcon, fullscreenIcon = _a.fullscreenIcon, downloadIcon = _a.downloadIcon, volumeIcon = _a.volumeIcon, muteIcon = _a.muteIcon, rewindIcon = _a.rewindIcon, forwardIcon = _a.forwardIcon, hideControlsDelay = _a.hideControlsDelay, loop = _a.loop, muted = _a.muted, seekAmount = _a.seekAmount, _9 = _a.funcss, funcss = _9 === void 0 ? '' : _9, _10 = _a.containerCss, containerCss = _10 === void 0 ? '' : _10, _11 = _a.videoCss, videoCss = _11 === void 0 ? '' : _11, _12 = _a.controlsCss, controlsCss = _12 === void 0 ? '' : _12, _13 = _a.progressCss, progressCss = _13 === void 0 ? '' : _13, _14 = _a.progressBarCss, progressBarCss = _14 === void 0 ? '' : _14, _15 = _a.timeCss, timeCss = _15 === void 0 ? '' : _15, _16 = _a.playCss, playCss = _16 === void 0 ? '' : _16, _17 = _a.pauseCss, pauseCss = _17 === void 0 ? '' : _17, _18 = _a.volumeCss, volumeCss = _18 === void 0 ? '' : _18, _19 = _a.fullscreenCss, fullscreenCss = _19 === void 0 ? '' : _19, _20 = _a.downloadCss, downloadCss = _20 === void 0 ? '' : _20, _21 = _a.rewindCss, rewindCss = _21 === void 0 ? '' : _21, _22 = _a.forwardCss, forwardCss = _22 === void 0 ? '' : _22, _23 = _a.buttonCss, buttonCss = _23 === void 0 ? '' : _23, _24 = _a.volumeStyle, volumeStyle = _24 === void 0 ? 'slider' : _24, _25 = _a.variant, variant = _25 === void 0 ? '' : _25, rest = __rest(_a, ["src", "poster", "onDuration", "onEnded", "isPause", "spacebarPlay", "className", "autoPlay", "showControls", "showPlayPause", "showProgress", "showVolume", "showTime", "showFullscreen", "showDownload", "showSeekButtons", "playIcon", "pauseIcon", "fullscreenIcon", "downloadIcon", "volumeIcon", "muteIcon", "rewindIcon", "forwardIcon", "hideControlsDelay", "loop", "muted", "seekAmount", "funcss", "containerCss", "videoCss", "controlsCss", "progressCss", "progressBarCss", "timeCss", "playCss", "pauseCss", "volumeCss", "fullscreenCss", "downloadCss", "rewindCss", "forwardCss", "buttonCss", "volumeStyle", "variant"]);
|
|
211
226
|
var mergeWithLocal = useComponentConfiguration('Video', variant).mergeWithLocal;
|
|
212
227
|
// Create local props object - these will override config props
|
|
213
|
-
var localProps = __assign({ src: src, poster: poster, onDuration: onDuration, onEnded: onEnded, isPause: isPause, spacebarPlay: spacebarPlay, className: className, autoPlay: autoPlay, showControls: showControls, showPlayPause: showPlayPause, showProgress: showProgress, showVolume: showVolume, showTime: showTime, showFullscreen: showFullscreen, showDownload: showDownload, showSeekButtons: showSeekButtons, playIcon: playIcon, pauseIcon: pauseIcon, fullscreenIcon: fullscreenIcon, downloadIcon: downloadIcon, volumeIcon: volumeIcon, muteIcon: muteIcon, rewindIcon: rewindIcon, forwardIcon: forwardIcon, hideControlsDelay: hideControlsDelay, loop: loop, muted: muted, seekAmount: seekAmount, funcss: funcss, containerCss: containerCss, videoCss: videoCss, controlsCss: controlsCss, progressCss: progressCss, progressBarCss: progressBarCss, timeCss: timeCss, playCss: playCss, pauseCss: pauseCss, volumeCss: volumeCss, fullscreenCss: fullscreenCss, downloadCss: downloadCss, rewindCss: rewindCss, forwardCss: forwardCss, buttonCss: buttonCss }, rest);
|
|
228
|
+
var localProps = __assign({ src: src, poster: poster, onDuration: onDuration, onEnded: onEnded, isPause: isPause, spacebarPlay: spacebarPlay, className: className, autoPlay: autoPlay, showControls: showControls, showPlayPause: showPlayPause, showProgress: showProgress, showVolume: showVolume, showTime: showTime, showFullscreen: showFullscreen, showDownload: showDownload, showSeekButtons: showSeekButtons, playIcon: playIcon, pauseIcon: pauseIcon, fullscreenIcon: fullscreenIcon, downloadIcon: downloadIcon, volumeIcon: volumeIcon, muteIcon: muteIcon, rewindIcon: rewindIcon, forwardIcon: forwardIcon, hideControlsDelay: hideControlsDelay, loop: loop, muted: muted, seekAmount: seekAmount, funcss: funcss, containerCss: containerCss, videoCss: videoCss, controlsCss: controlsCss, progressCss: progressCss, progressBarCss: progressBarCss, timeCss: timeCss, playCss: playCss, pauseCss: pauseCss, volumeCss: volumeCss, fullscreenCss: fullscreenCss, downloadCss: downloadCss, rewindCss: rewindCss, forwardCss: forwardCss, buttonCss: buttonCss, volumeStyle: volumeStyle }, rest);
|
|
214
229
|
// Merge with config - LOCAL PROPS OVERRIDE CONFIG
|
|
215
230
|
var mergedProps = mergeWithLocal(localProps).props;
|
|
216
231
|
// Extract final values - local props take precedence
|
|
@@ -229,8 +244,8 @@ function Video(_a) {
|
|
|
229
244
|
showVolume: (_h = mergedProps.showVolume) !== null && _h !== void 0 ? _h : true,
|
|
230
245
|
showTime: (_j = mergedProps.showTime) !== null && _j !== void 0 ? _j : true,
|
|
231
246
|
showFullscreen: (_k = mergedProps.showFullscreen) !== null && _k !== void 0 ? _k : true,
|
|
232
|
-
showDownload: (_l = mergedProps.showDownload) !== null && _l !== void 0 ? _l :
|
|
233
|
-
showSeekButtons: (_m = mergedProps.showSeekButtons) !== null && _m !== void 0 ? _m :
|
|
247
|
+
showDownload: (_l = mergedProps.showDownload) !== null && _l !== void 0 ? _l : false,
|
|
248
|
+
showSeekButtons: (_m = mergedProps.showSeekButtons) !== null && _m !== void 0 ? _m : false,
|
|
234
249
|
playIcon: mergedProps.playIcon,
|
|
235
250
|
pauseIcon: mergedProps.pauseIcon,
|
|
236
251
|
fullscreenIcon: mergedProps.fullscreenIcon,
|
|
@@ -258,29 +273,31 @@ function Video(_a) {
|
|
|
258
273
|
rewindCss: (_4 = mergedProps.rewindCss) !== null && _4 !== void 0 ? _4 : '',
|
|
259
274
|
forwardCss: (_5 = mergedProps.forwardCss) !== null && _5 !== void 0 ? _5 : '',
|
|
260
275
|
buttonCss: (_6 = mergedProps.buttonCss) !== null && _6 !== void 0 ? _6 : '',
|
|
276
|
+
volumeStyle: (_7 = mergedProps.volumeStyle) !== null && _7 !== void 0 ? _7 : 'slider',
|
|
261
277
|
};
|
|
262
278
|
var videoRef = (0, react_1.useRef)(null);
|
|
263
279
|
var containerRef = (0, react_1.useRef)(null);
|
|
264
280
|
var animationFrameRef = (0, react_1.useRef)(null);
|
|
265
|
-
var
|
|
266
|
-
var
|
|
267
|
-
var
|
|
268
|
-
var
|
|
269
|
-
var
|
|
270
|
-
var
|
|
271
|
-
var
|
|
272
|
-
var
|
|
273
|
-
var
|
|
274
|
-
var
|
|
281
|
+
var _26 = (0, react_1.useState)(false), isPlaying = _26[0], setIsPlaying = _26[1];
|
|
282
|
+
var _27 = (0, react_1.useState)(0), currentTime = _27[0], setCurrentTime = _27[1];
|
|
283
|
+
var _28 = (0, react_1.useState)(0), duration = _28[0], setDuration = _28[1];
|
|
284
|
+
var _29 = (0, react_1.useState)(final.muted ? 0 : 1), volume = _29[0], setVolume = _29[1];
|
|
285
|
+
var _30 = (0, react_1.useState)(final.muted), isMuted = _30[0], setIsMuted = _30[1];
|
|
286
|
+
var _31 = (0, react_1.useState)(false), isFullScreen = _31[0], setIsFullScreen = _31[1];
|
|
287
|
+
var _32 = (0, react_1.useState)(false), showControlsState = _32[0], setShowControlsState = _32[1];
|
|
288
|
+
var _33 = (0, react_1.useState)(false), hasStarted = _33[0], setHasStarted = _33[1];
|
|
289
|
+
var _34 = (0, react_1.useState)(false), isHoveringProgress = _34[0], setIsHoveringProgress = _34[1];
|
|
290
|
+
var _35 = (0, react_1.useState)(false), isHoveringVolume = _35[0], setIsHoveringVolume = _35[1];
|
|
291
|
+
var _36 = (0, react_1.useState)(false), showVolumeSlider = _36[0], setShowVolumeSlider = _36[1];
|
|
275
292
|
// Dynamic icon states
|
|
276
|
-
var
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
var
|
|
280
|
-
var
|
|
281
|
-
var
|
|
282
|
-
var
|
|
283
|
-
var
|
|
293
|
+
var _37 = (0, react_1.useState)(null), dynamicPlayIcon = _37[0], setDynamicPlayIcon = _37[1];
|
|
294
|
+
var _38 = (0, react_1.useState)(null), dynamicPauseIcon = _38[0], setDynamicPauseIcon = _38[1];
|
|
295
|
+
var _39 = (0, react_1.useState)(null), dynamicFullscreenIcon = _39[0], setDynamicFullscreenIcon = _39[1];
|
|
296
|
+
var _40 = (0, react_1.useState)(null), dynamicDownloadIcon = _40[0], setDynamicDownloadIcon = _40[1];
|
|
297
|
+
var _41 = (0, react_1.useState)(null), dynamicVolumeIcon = _41[0], setDynamicVolumeIcon = _41[1];
|
|
298
|
+
var _42 = (0, react_1.useState)(null), dynamicMuteIcon = _42[0], setDynamicMuteIcon = _42[1];
|
|
299
|
+
var _43 = (0, react_1.useState)(null), dynamicRewindIcon = _43[0], setDynamicRewindIcon = _43[1];
|
|
300
|
+
var _44 = (0, react_1.useState)(null), dynamicForwardIcon = _44[0], setDynamicForwardIcon = _44[1];
|
|
284
301
|
// Helper function to load dynamic icons
|
|
285
302
|
var loadDynamicIcon = function (iconProp, setter, defaultIcon) { return __awaiter(_this, void 0, void 0, function () {
|
|
286
303
|
var iconNode;
|
|
@@ -298,27 +315,26 @@ function Video(_a) {
|
|
|
298
315
|
setter(iconNode || defaultIcon);
|
|
299
316
|
return [3 /*break*/, 3];
|
|
300
317
|
case 2:
|
|
301
|
-
// It's already a ReactNode - use it directly
|
|
302
318
|
setter(iconProp);
|
|
303
319
|
_a.label = 3;
|
|
304
320
|
case 3: return [2 /*return*/];
|
|
305
321
|
}
|
|
306
322
|
});
|
|
307
323
|
}); };
|
|
308
|
-
// Load all dynamic icons
|
|
324
|
+
// Load all dynamic icons
|
|
309
325
|
(0, react_1.useEffect)(function () {
|
|
310
326
|
var loadIcons = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
311
327
|
return __generator(this, function (_a) {
|
|
312
328
|
switch (_a.label) {
|
|
313
329
|
case 0: return [4 /*yield*/, Promise.all([
|
|
314
|
-
loadDynamicIcon(final.playIcon, setDynamicPlayIcon, react_1.default.createElement(pi_1.PiPlay, { size:
|
|
315
|
-
loadDynamicIcon(final.pauseIcon, setDynamicPauseIcon, react_1.default.createElement(pi_1.PiPause, { size:
|
|
316
|
-
loadDynamicIcon(final.fullscreenIcon, setDynamicFullscreenIcon, react_1.default.createElement(pi_1.PiCornersOut, { size:
|
|
317
|
-
loadDynamicIcon(final.downloadIcon, setDynamicDownloadIcon, react_1.default.createElement(tfi_1.TfiDownload, { size:
|
|
318
|
-
loadDynamicIcon(final.volumeIcon, setDynamicVolumeIcon, react_1.default.createElement(pi_1.PiSpeakerHigh, { size:
|
|
319
|
-
loadDynamicIcon(final.muteIcon, setDynamicMuteIcon, react_1.default.createElement(pi_1.PiSpeakerSlash, { size:
|
|
320
|
-
loadDynamicIcon(final.rewindIcon, setDynamicRewindIcon, react_1.default.createElement(tfi_1.TfiControlBackward, { size:
|
|
321
|
-
loadDynamicIcon(final.forwardIcon, setDynamicForwardIcon, react_1.default.createElement(tfi_1.TfiControlForward, { size:
|
|
330
|
+
loadDynamicIcon(final.playIcon, setDynamicPlayIcon, react_1.default.createElement(pi_1.PiPlay, { size: 20 })),
|
|
331
|
+
loadDynamicIcon(final.pauseIcon, setDynamicPauseIcon, react_1.default.createElement(pi_1.PiPause, { size: 20 })),
|
|
332
|
+
loadDynamicIcon(final.fullscreenIcon, setDynamicFullscreenIcon, react_1.default.createElement(pi_1.PiCornersOut, { size: 18 })),
|
|
333
|
+
loadDynamicIcon(final.downloadIcon, setDynamicDownloadIcon, react_1.default.createElement(tfi_1.TfiDownload, { size: 16 })),
|
|
334
|
+
loadDynamicIcon(final.volumeIcon, setDynamicVolumeIcon, react_1.default.createElement(pi_1.PiSpeakerHigh, { size: 18 })),
|
|
335
|
+
loadDynamicIcon(final.muteIcon, setDynamicMuteIcon, react_1.default.createElement(pi_1.PiSpeakerSlash, { size: 18 })),
|
|
336
|
+
loadDynamicIcon(final.rewindIcon, setDynamicRewindIcon, react_1.default.createElement(tfi_1.TfiControlBackward, { size: 16 })),
|
|
337
|
+
loadDynamicIcon(final.forwardIcon, setDynamicForwardIcon, react_1.default.createElement(tfi_1.TfiControlForward, { size: 16 })),
|
|
322
338
|
])];
|
|
323
339
|
case 1:
|
|
324
340
|
_a.sent();
|
|
@@ -331,12 +347,11 @@ function Video(_a) {
|
|
|
331
347
|
final.playIcon, final.pauseIcon, final.fullscreenIcon, final.downloadIcon,
|
|
332
348
|
final.volumeIcon, final.muteIcon, final.rewindIcon, final.forwardIcon
|
|
333
349
|
]);
|
|
334
|
-
// Helper function to render icon
|
|
350
|
+
// Helper function to render icon
|
|
335
351
|
var renderIcon = function (icon, defaultSize) {
|
|
336
352
|
if (defaultSize === void 0) { defaultSize = 16; }
|
|
337
353
|
if (!icon)
|
|
338
354
|
return null;
|
|
339
|
-
// If it's a React element, clone it with the size prop
|
|
340
355
|
if (react_1.default.isValidElement(icon)) {
|
|
341
356
|
return react_1.default.cloneElement(icon, {
|
|
342
357
|
size: icon.props.size || defaultSize
|
|
@@ -375,19 +390,15 @@ function Video(_a) {
|
|
|
375
390
|
var rect = container.getBoundingClientRect();
|
|
376
391
|
var clickX = e.clientX - rect.left;
|
|
377
392
|
var width = rect.width;
|
|
378
|
-
// Divide video into three areas
|
|
379
393
|
var leftArea = width * 0.3;
|
|
380
394
|
var rightArea = width * 0.7;
|
|
381
395
|
if (clickX < leftArea) {
|
|
382
|
-
// Left area - rewind
|
|
383
396
|
handleSeek(-final.seekAmount);
|
|
384
397
|
}
|
|
385
398
|
else if (clickX > rightArea) {
|
|
386
|
-
// Right area - forward
|
|
387
399
|
handleSeek(final.seekAmount);
|
|
388
400
|
}
|
|
389
401
|
else {
|
|
390
|
-
// Middle area - play/pause
|
|
391
402
|
handlePlayPauseToggle();
|
|
392
403
|
}
|
|
393
404
|
};
|
|
@@ -473,7 +484,7 @@ function Video(_a) {
|
|
|
473
484
|
var handleVideoEnd = function () {
|
|
474
485
|
var _a;
|
|
475
486
|
setIsPlaying(false);
|
|
476
|
-
(_a = final.onEnded) === null || _a === void 0 ? void 0 : _a.call(final);
|
|
487
|
+
(_a = final.onEnded) === null || _a === void 0 ? void 0 : _a.call(final);
|
|
477
488
|
if (final.loop && videoRef.current) {
|
|
478
489
|
videoRef.current.currentTime = 0;
|
|
479
490
|
playVideo();
|
|
@@ -511,10 +522,14 @@ function Video(_a) {
|
|
|
511
522
|
var show = function () {
|
|
512
523
|
setShowControlsState(true);
|
|
513
524
|
clearTimeout(timer);
|
|
514
|
-
timer = setTimeout(function () {
|
|
525
|
+
timer = setTimeout(function () {
|
|
526
|
+
setShowControlsState(false);
|
|
527
|
+
setShowVolumeSlider(false);
|
|
528
|
+
}, final.hideControlsDelay);
|
|
515
529
|
};
|
|
516
530
|
var hide = function () {
|
|
517
531
|
setShowControlsState(false);
|
|
532
|
+
setShowVolumeSlider(false);
|
|
518
533
|
};
|
|
519
534
|
var container = containerRef.current;
|
|
520
535
|
if (container && final.showControls) {
|
|
@@ -543,50 +558,80 @@ function Video(_a) {
|
|
|
543
558
|
cancelAnimationFrame(animationFrameRef.current);
|
|
544
559
|
};
|
|
545
560
|
}, [isPlaying, updateCurrentTime]);
|
|
546
|
-
//
|
|
547
|
-
var
|
|
561
|
+
// Get volume icon based on volume level
|
|
562
|
+
var getVolumeIcon = function () {
|
|
563
|
+
if (isMuted || volume === 0) {
|
|
564
|
+
return renderIcon(dynamicMuteIcon, 18);
|
|
565
|
+
}
|
|
566
|
+
else if (volume < 0.5) {
|
|
567
|
+
return react_1.default.createElement(pi_1.PiSpeakerNone, { size: 18 });
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
return renderIcon(dynamicVolumeIcon, 18);
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
// Simple Progress Bar Component (YouTube style)
|
|
574
|
+
var ProgressBar = function () { return (react_1.default.createElement("div", { className: "progress-container" },
|
|
548
575
|
react_1.default.createElement("div", { className: "progress-wrapper" },
|
|
549
576
|
react_1.default.createElement("input", { type: "range", min: 0, max: duration, value: currentTime, onChange: handleProgressChange, className: "video-progress ".concat(final.progressCss), style: {
|
|
550
577
|
'--progress-percent': "".concat((currentTime / duration) * 100, "%"),
|
|
551
578
|
}, onMouseEnter: function () { return setIsHoveringProgress(true); }, onMouseLeave: function () { return setIsHoveringProgress(false); } })))); };
|
|
552
|
-
//
|
|
553
|
-
var VolumeControl = function () {
|
|
554
|
-
|
|
555
|
-
react_1.default.createElement(
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
579
|
+
// Volume Control Component with different styles
|
|
580
|
+
var VolumeControl = function () {
|
|
581
|
+
if (final.volumeStyle === 'hover') {
|
|
582
|
+
return (react_1.default.createElement("div", { className: "volume-control-wrapper relative" },
|
|
583
|
+
react_1.default.createElement(ToolTip_1.default, null,
|
|
584
|
+
react_1.default.createElement("div", { onClick: handleToggleMute, onMouseEnter: function () { return setShowVolumeSlider(true); }, className: "volume-toggle ".concat(final.buttonCss, " ").concat(final.volumeCss, " pointer") }, getVolumeIcon()),
|
|
585
|
+
react_1.default.createElement(Tip_1.default, { tip: "top", content: isMuted ? "Unmute" : "Mute" })),
|
|
586
|
+
showVolumeSlider && (react_1.default.createElement("div", { className: "volume-slider-wrapper absolute bottom-full left-0 mb-2 p-2 bg-black bg-opacity-80 rounded-lg backdrop-blur-sm", onMouseEnter: function () { return setShowVolumeSlider(true); }, onMouseLeave: function () { return setShowVolumeSlider(false); } },
|
|
587
|
+
react_1.default.createElement("input", { type: "range", min: 0, max: 1, step: 0.01, value: volume, onChange: handleVolumeChange, className: "volume-slider vertical", style: {
|
|
588
|
+
'--volume-percent': "".concat(volume * 100, "%"),
|
|
589
|
+
} })))));
|
|
590
|
+
}
|
|
591
|
+
if (final.volumeStyle === 'compact') {
|
|
592
|
+
return (react_1.default.createElement("div", { className: "volume-control-wrapper" },
|
|
593
|
+
react_1.default.createElement(ToolTip_1.default, null,
|
|
594
|
+
react_1.default.createElement("div", { onClick: handleToggleMute, className: "volume-toggle ".concat(final.buttonCss, " ").concat(final.volumeCss, " pointer") }, getVolumeIcon()),
|
|
595
|
+
react_1.default.createElement(Tip_1.default, { tip: "top", content: isMuted ? "Unmute" : "Mute" }))));
|
|
596
|
+
}
|
|
597
|
+
// Default slider style
|
|
598
|
+
return (react_1.default.createElement("div", { className: "volume-control-wrapper" },
|
|
599
|
+
react_1.default.createElement(ToolTip_1.default, null,
|
|
600
|
+
react_1.default.createElement("div", { onClick: handleToggleMute, className: "volume-toggle ".concat(final.buttonCss, " ").concat(final.volumeCss, " pointer") }, getVolumeIcon()),
|
|
601
|
+
react_1.default.createElement(Tip_1.default, { tip: "top", content: isMuted ? "Unmute" : "Mute" })),
|
|
602
|
+
react_1.default.createElement("div", { className: "volume-slider-wrapper" },
|
|
603
|
+
react_1.default.createElement("input", { type: "range", min: 0, max: 1, step: 0.01, value: volume, onChange: handleVolumeChange, className: "volume-slider", style: {
|
|
604
|
+
'--volume-percent': "".concat(volume * 100, "%"),
|
|
605
|
+
} }))));
|
|
606
|
+
};
|
|
563
607
|
return (react_1.default.createElement("div", { ref: containerRef, className: "video_container fit ".concat(final.funcss, " ").concat(final.containerCss, " ").concat(final.className), onClick: handleVideoClick },
|
|
564
608
|
final.poster && !hasStarted && !isPlaying && (react_1.default.createElement("div", { style: { backgroundImage: "url(".concat(final.poster, ")") }, className: "video_poster" })),
|
|
565
609
|
react_1.default.createElement("video", { ref: videoRef, preload: "auto", src: final.src, className: "video_player fit min-w-200 ".concat(final.videoCss), onLoadedMetadata: handleLoadedMetadata, playsInline: true, controls: false, loop: final.loop, muted: final.muted }),
|
|
566
610
|
final.showControls && (react_1.default.createElement("div", { className: "video_controls ".concat(final.controlsCss, " ").concat(showControlsState ? 'show_controls' : 'hide_controls') },
|
|
567
|
-
final.showProgress && react_1.default.createElement(ProgressBar, null),
|
|
568
611
|
react_1.default.createElement(RowFlex_1.default, { gap: 1, justify: "space-between", alignItems: "center", className: "controls-row" },
|
|
569
|
-
react_1.default.createElement(RowFlex_1.default, { gap: 0.5, alignItems: "center" },
|
|
612
|
+
react_1.default.createElement(RowFlex_1.default, { gap: 0.5, alignItems: "center", funcss: 'videoLeftContainer' },
|
|
570
613
|
final.showPlayPause && (react_1.default.createElement(ToolTip_1.default, null,
|
|
571
|
-
react_1.default.createElement(
|
|
572
|
-
? renderIcon(dynamicPauseIcon,
|
|
573
|
-
: renderIcon(dynamicPlayIcon,
|
|
614
|
+
react_1.default.createElement("div", { onClick: handlePlayPauseToggle, className: "".concat(final.buttonCss, " ").concat(isPlaying ? final.pauseCss : final.playCss, " pointer") }, isPlaying
|
|
615
|
+
? renderIcon(dynamicPauseIcon, 20)
|
|
616
|
+
: renderIcon(dynamicPlayIcon, 20)),
|
|
574
617
|
react_1.default.createElement(Tip_1.default, { tip: "top", content: isPlaying ? "Pause" : "Play" }))),
|
|
575
618
|
final.showSeekButtons && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
576
619
|
react_1.default.createElement(ToolTip_1.default, null,
|
|
577
|
-
react_1.default.createElement(
|
|
620
|
+
react_1.default.createElement("div", { onClick: handleRewind, className: "".concat(final.buttonCss, " ").concat(final.rewindCss, " pointer") }, renderIcon(dynamicRewindIcon, 16)),
|
|
578
621
|
react_1.default.createElement(Tip_1.default, { tip: "top", content: "".concat(final.seekAmount, "s Back") })),
|
|
579
622
|
react_1.default.createElement(ToolTip_1.default, null,
|
|
580
|
-
react_1.default.createElement(
|
|
623
|
+
react_1.default.createElement("div", { onClick: handleForward, className: "".concat(final.buttonCss, " ").concat(final.forwardCss, " pointer") }, renderIcon(dynamicForwardIcon, 16)),
|
|
581
624
|
react_1.default.createElement(Tip_1.default, { tip: "top", content: "".concat(final.seekAmount, "s Forward") })))),
|
|
582
625
|
final.showVolume && react_1.default.createElement(VolumeControl, null),
|
|
583
626
|
final.showTime && (react_1.default.createElement("div", { className: "video_time ".concat(final.timeCss) },
|
|
584
|
-
react_1.default.createElement(Text_1.default, { text: "".concat((0, videoFunctions_1.formatTime)(currentTime), " / ").concat((0, videoFunctions_1.formatTime)(duration)),
|
|
585
|
-
react_1.default.createElement(
|
|
627
|
+
react_1.default.createElement(Text_1.default, { text: "".concat((0, videoFunctions_1.formatTime)(currentTime), " / ").concat((0, videoFunctions_1.formatTime)(duration)), size: "xs" })))),
|
|
628
|
+
react_1.default.createElement("div", { className: "col w-full " },
|
|
629
|
+
react_1.default.createElement("div", { className: 'videoProgressContainer' }, final.showProgress && react_1.default.createElement(ProgressBar, null))),
|
|
630
|
+
react_1.default.createElement(RowFlex_1.default, { gap: 0.3, funcss: 'videoRightContainer' },
|
|
586
631
|
final.showFullscreen && (react_1.default.createElement(ToolTip_1.default, null,
|
|
587
|
-
react_1.default.createElement(
|
|
632
|
+
react_1.default.createElement("div", { onClick: handleToggleFullScreen, className: "".concat(final.buttonCss, " ").concat(final.fullscreenCss, " pointer") }, renderIcon(dynamicFullscreenIcon, 18)),
|
|
588
633
|
react_1.default.createElement(Tip_1.default, { tip: "top", content: "Fullscreen" }))),
|
|
589
634
|
final.showDownload && (react_1.default.createElement(ToolTip_1.default, null,
|
|
590
|
-
react_1.default.createElement(
|
|
635
|
+
react_1.default.createElement("div", { onClick: function () { return window.open(final.src, '_blank'); }, className: "".concat(final.buttonCss, " ").concat(final.downloadCss, " pointer") }, renderIcon(dynamicDownloadIcon, 16)),
|
|
591
636
|
react_1.default.createElement(Tip_1.default, { tip: "top", content: "Download" })))))))));
|
|
592
637
|
}
|
package/ui/vista/Vista.d.ts
CHANGED
|
@@ -66,16 +66,22 @@ type VistaProps = {
|
|
|
66
66
|
ctaPrimaryPrefix?: string;
|
|
67
67
|
ctaPrimarySuffix?: string;
|
|
68
68
|
primaryIconSize?: number;
|
|
69
|
+
primaryButtonFuncss?: string;
|
|
70
|
+
primaryButtonSmall?: boolean;
|
|
69
71
|
ctaSecondaryRounded?: boolean;
|
|
70
72
|
ctaSecondaryFlat?: boolean;
|
|
71
73
|
ctaSecondaryPrefix?: string;
|
|
72
74
|
ctaSecondarySuffix?: string;
|
|
73
75
|
secondaryIconSize?: number;
|
|
76
|
+
secondaryButtonFuncss?: string;
|
|
77
|
+
secondaryButtonSmall?: boolean;
|
|
74
78
|
ctaAccentRounded?: boolean;
|
|
75
79
|
ctaAccentFlat?: boolean;
|
|
76
80
|
ctaAccentPrefix?: string;
|
|
77
81
|
ctaAccentSuffix?: string;
|
|
78
82
|
accentIconSize?: number;
|
|
83
|
+
accentButtonFuncss?: string;
|
|
84
|
+
accentButtonSmall?: boolean;
|
|
79
85
|
ctaGap?: number;
|
|
80
86
|
ctaFlexJustify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
|
|
81
87
|
};
|
package/ui/vista/Vista.js
CHANGED
|
@@ -30,11 +30,6 @@ var Vista = function (localProps) {
|
|
|
30
30
|
var mergedProps = mergeWithLocal(localProps).props;
|
|
31
31
|
// Use mergedProps directly - they already have the correct merge logic applied
|
|
32
32
|
var final = mergedProps;
|
|
33
|
-
// Debug: Log what props are actually coming through
|
|
34
|
-
react_1.default.useEffect(function () {
|
|
35
|
-
console.log('Vista merged props:', mergedProps);
|
|
36
|
-
console.log('Vista config available:', Object.keys(mergedProps).length > 0);
|
|
37
|
-
}, [mergedProps]);
|
|
38
33
|
var layoutClass = [
|
|
39
34
|
final.layout,
|
|
40
35
|
final.reverse ? 'reverse' : '',
|
|
@@ -48,9 +43,9 @@ var Vista = function (localProps) {
|
|
|
48
43
|
if (!hasCTAs)
|
|
49
44
|
return null;
|
|
50
45
|
return (react_1.default.createElement(Flex_1.default, { gap: final.ctaGap, justify: final.ctaFlexJustify, className: "mt-6 ".concat(final.ctaClass), wrap: "wrap", width: '100%' },
|
|
51
|
-
final.showPrimaryCTA && (react_1.default.createElement(Button_1.default, { bg: "primary", outlined: final.primaryButtonOutlined, onClick: function () { return final.ctaPrimaryUrl && (window.location.href = final.ctaPrimaryUrl); }, rounded: final.ctaPrimaryRounded, flat: final.ctaPrimaryFlat, stringPrefix: final.ctaPrimaryPrefix, stringSuffix: final.ctaPrimarySuffix, iconSize: final.primaryIconSize }, final.ctaPrimaryText)),
|
|
52
|
-
final.showSecondaryCTA && (react_1.default.createElement(Button_1.default, { bg: "secondary", outlined: final.secondaryButtonOutlined, onClick: function () { return final.ctaSecondaryUrl && (window.location.href = final.ctaSecondaryUrl); }, rounded: final.ctaSecondaryRounded, flat: final.ctaSecondaryFlat, stringPrefix: final.ctaSecondaryPrefix, stringSuffix: final.ctaSecondarySuffix, iconSize: final.secondaryIconSize }, final.ctaSecondaryText)),
|
|
53
|
-
final.showAccentCTA && (react_1.default.createElement(Button_1.default, { bg: "accent", outlined: final.accentButtonOutlined, onClick: function () { return final.ctaAccentUrl && (window.location.href = final.ctaAccentUrl); }, rounded: final.ctaAccentRounded, flat: final.ctaAccentFlat, stringPrefix: final.ctaAccentPrefix, stringSuffix: final.ctaAccentSuffix, iconSize: final.accentIconSize }, final.ctaAccentText))));
|
|
46
|
+
final.showPrimaryCTA && (react_1.default.createElement(Button_1.default, { bg: "primary", outlined: final.primaryButtonOutlined, onClick: function () { return final.ctaPrimaryUrl && (window.location.href = final.ctaPrimaryUrl); }, rounded: final.ctaPrimaryRounded, flat: final.ctaPrimaryFlat, stringPrefix: final.ctaPrimaryPrefix, stringSuffix: final.ctaPrimarySuffix, iconSize: final.primaryIconSize, funcss: final.primaryButtonFuncss, small: final.primaryButtonSmall }, final.ctaPrimaryText)),
|
|
47
|
+
final.showSecondaryCTA && (react_1.default.createElement(Button_1.default, { bg: "secondary", outlined: final.secondaryButtonOutlined, onClick: function () { return final.ctaSecondaryUrl && (window.location.href = final.ctaSecondaryUrl); }, rounded: final.ctaSecondaryRounded, flat: final.ctaSecondaryFlat, stringPrefix: final.ctaSecondaryPrefix, stringSuffix: final.ctaSecondarySuffix, iconSize: final.secondaryIconSize, funcss: final.secondaryButtonFuncss, small: final.secondaryButtonSmall }, final.ctaSecondaryText)),
|
|
48
|
+
final.showAccentCTA && (react_1.default.createElement(Button_1.default, { bg: "accent", outlined: final.accentButtonOutlined, onClick: function () { return final.ctaAccentUrl && (window.location.href = final.ctaAccentUrl); }, rounded: final.ctaAccentRounded, flat: final.ctaAccentFlat, stringPrefix: final.ctaAccentPrefix, stringSuffix: final.ctaAccentSuffix, iconSize: final.accentIconSize, funcss: final.accentButtonFuncss, small: final.accentButtonSmall }, final.ctaAccentText))));
|
|
54
49
|
};
|
|
55
50
|
// Enhanced Text Content with flexible styling
|
|
56
51
|
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(final.layout === 'centered' ? "text-center" : "", " ").concat(final.textWrapperClass) },
|