funuicss 3.7.9 → 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/ui/video/Video.js CHANGED
@@ -1,5 +1,16 @@
1
1
  "use strict";
2
2
  'use client';
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
3
14
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
15
  if (k2 === undefined) k2 = k;
5
16
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -69,6 +80,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
80
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
81
  }
71
82
  };
83
+ var __rest = (this && this.__rest) || function (s, e) {
84
+ var t = {};
85
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
86
+ t[p] = s[p];
87
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
88
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
89
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
90
+ t[p[i]] = s[p[i]];
91
+ }
92
+ return t;
93
+ };
72
94
  var __importDefault = (this && this.__importDefault) || function (mod) {
73
95
  return (mod && mod.__esModule) ? mod : { "default": mod };
74
96
  };
@@ -80,36 +102,202 @@ var tfi_1 = require("react-icons/tfi");
80
102
  var Text_1 = __importDefault(require("../text/Text"));
81
103
  var RowFlex_1 = __importDefault(require("../specials/RowFlex"));
82
104
  var ToolTip_1 = __importDefault(require("../tooltip/ToolTip"));
83
- var Circle_1 = __importDefault(require("../specials/Circle"));
84
105
  var Tip_1 = __importDefault(require("../tooltip/Tip"));
85
106
  var videoFunctions_1 = require("./videoFunctions");
86
107
  var videoShortcuts_1 = require("./videoShortcuts");
87
108
  var getDynamicIcon_1 = require("../../utils/getDynamicIcon");
109
+ // Configuration hook
110
+ var useComponentConfiguration = function (componentName, variant) {
111
+ if (variant === void 0) { variant = ''; }
112
+ var getComponentConfig = function () {
113
+ var baseConfig = {
114
+ Video: {
115
+ default: {
116
+ showControls: true,
117
+ showPlayPause: true,
118
+ showProgress: true,
119
+ showVolume: true,
120
+ showTime: true,
121
+ showFullscreen: true,
122
+ showDownload: false,
123
+ showSeekButtons: false,
124
+ spacebarPlay: true,
125
+ autoPlay: false,
126
+ loop: false,
127
+ muted: false,
128
+ seekAmount: 10,
129
+ hideControlsDelay: 3000,
130
+ funcss: '',
131
+ containerCss: '',
132
+ videoCss: '',
133
+ controlsCss: '',
134
+ progressCss: '',
135
+ progressBarCss: '',
136
+ timeCss: '',
137
+ playCss: '',
138
+ pauseCss: '',
139
+ volumeCss: '',
140
+ fullscreenCss: '',
141
+ downloadCss: '',
142
+ rewindCss: '',
143
+ forwardCss: '',
144
+ buttonCss: '',
145
+ volumeStyle: 'slider', // 'slider' | 'compact' | 'hover'
146
+ },
147
+ minimal: {
148
+ showControls: true,
149
+ showPlayPause: true,
150
+ showProgress: true,
151
+ showVolume: false,
152
+ showTime: true,
153
+ showFullscreen: true,
154
+ showDownload: false,
155
+ showSeekButtons: false,
156
+ controlsCss: 'minimal-controls',
157
+ buttonCss: 'minimal-btn',
158
+ volumeStyle: 'hover',
159
+ },
160
+ embedded: {
161
+ showControls: false,
162
+ autoPlay: true,
163
+ muted: true,
164
+ loop: true,
165
+ containerCss: 'embedded-video',
166
+ },
167
+ fullFeatured: {
168
+ showControls: true,
169
+ showPlayPause: true,
170
+ showProgress: true,
171
+ showVolume: true,
172
+ showTime: true,
173
+ showFullscreen: true,
174
+ showDownload: true,
175
+ showSeekButtons: true,
176
+ controlsCss: 'full-featured-controls',
177
+ buttonCss: 'featured-btn',
178
+ volumeStyle: 'slider',
179
+ },
180
+ theater: {
181
+ showControls: true,
182
+ containerCss: 'theater-mode',
183
+ videoCss: 'theater-video',
184
+ controlsCss: 'theater-controls',
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,
201
+ }
202
+ }
203
+ };
204
+ return baseConfig[componentName] || {};
205
+ };
206
+ var mergeWithLocal = function (localProps) {
207
+ var config = getComponentConfig();
208
+ var variantConfig = variant && config[variant] ? config[variant] : {};
209
+ var defaultConfig = config.default || {};
210
+ var mergedProps = __assign(__assign(__assign({}, defaultConfig), variantConfig), localProps);
211
+ return {
212
+ props: mergedProps,
213
+ variantConfig: variantConfig,
214
+ defaultConfig: defaultConfig,
215
+ };
216
+ };
217
+ return {
218
+ mergeWithLocal: mergeWithLocal,
219
+ getComponentConfig: getComponentConfig,
220
+ };
221
+ };
88
222
  function Video(_a) {
89
223
  var _this = this;
90
- var src = _a.src, poster = _a.poster, onDuration = _a.onDuration, onEnded = _a.onEnded, isPause = _a.isPause, _b = _a.spacebarPlay, spacebarPlay = _b === void 0 ? true : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.autoPlay, autoPlay = _d === void 0 ? false : _d, _e = _a.showControls, showControls = _e === void 0 ? true : _e, _f = _a.showPlayPause, showPlayPause = _f === void 0 ? true : _f, _g = _a.showProgress, showProgress = _g === void 0 ? true : _g, _h = _a.showVolume, showVolume = _h === void 0 ? true : _h, _j = _a.showTime, showTime = _j === void 0 ? true : _j, _k = _a.showFullscreen, showFullscreen = _k === void 0 ? true : _k, _l = _a.showDownload, showDownload = _l === void 0 ? true : _l, _m = _a.showSeekButtons, showSeekButtons = _m === void 0 ? true : _m, playIcon = _a.playIcon, pauseIcon = _a.pauseIcon, fullscreenIcon = _a.fullscreenIcon, downloadIcon = _a.downloadIcon, volumeIcon = _a.volumeIcon, muteIcon = _a.muteIcon, rewindIcon = _a.rewindIcon, forwardIcon = _a.forwardIcon, _o = _a.hideControlsDelay, hideControlsDelay = _o === void 0 ? 3000 : _o, _p = _a.loop, loop = _p === void 0 ? false : _p, _q = _a.muted, muted = _q === void 0 ? false : _q, _r = _a.seekAmount, seekAmount = _r === void 0 ? 10 : _r, _s = _a.funcss, funcss = _s === void 0 ? '' : _s, _t = _a.containerCss, containerCss = _t === void 0 ? '' : _t, _u = _a.videoCss, videoCss = _u === void 0 ? '' : _u, _v = _a.controlsCss, controlsCss = _v === void 0 ? '' : _v, _w = _a.progressCss, progressCss = _w === void 0 ? '' : _w, _x = _a.progressBarCss, progressBarCss = _x === void 0 ? '' : _x, _y = _a.timeCss, timeCss = _y === void 0 ? '' : _y, _z = _a.playCss, playCss = _z === void 0 ? '' : _z, _0 = _a.pauseCss, pauseCss = _0 === void 0 ? '' : _0, _1 = _a.volumeCss, volumeCss = _1 === void 0 ? '' : _1, _2 = _a.fullscreenCss, fullscreenCss = _2 === void 0 ? '' : _2, _3 = _a.downloadCss, downloadCss = _3 === void 0 ? '' : _3, _4 = _a.rewindCss, rewindCss = _4 === void 0 ? '' : _4, _5 = _a.forwardCss, forwardCss = _5 === void 0 ? '' : _5, _6 = _a.buttonCss, buttonCss = _6 === void 0 ? '' : _6;
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"]);
226
+ var mergeWithLocal = useComponentConfiguration('Video', variant).mergeWithLocal;
227
+ // Create local props object - these will override config props
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);
229
+ // Merge with config - LOCAL PROPS OVERRIDE CONFIG
230
+ var mergedProps = mergeWithLocal(localProps).props;
231
+ // Extract final values - local props take precedence
232
+ var final = {
233
+ src: mergedProps.src,
234
+ poster: mergedProps.poster,
235
+ onDuration: mergedProps.onDuration,
236
+ onEnded: mergedProps.onEnded,
237
+ isPause: mergedProps.isPause,
238
+ spacebarPlay: (_b = mergedProps.spacebarPlay) !== null && _b !== void 0 ? _b : true,
239
+ className: (_c = mergedProps.className) !== null && _c !== void 0 ? _c : '',
240
+ autoPlay: (_d = mergedProps.autoPlay) !== null && _d !== void 0 ? _d : false,
241
+ showControls: (_e = mergedProps.showControls) !== null && _e !== void 0 ? _e : true,
242
+ showPlayPause: (_f = mergedProps.showPlayPause) !== null && _f !== void 0 ? _f : true,
243
+ showProgress: (_g = mergedProps.showProgress) !== null && _g !== void 0 ? _g : true,
244
+ showVolume: (_h = mergedProps.showVolume) !== null && _h !== void 0 ? _h : true,
245
+ showTime: (_j = mergedProps.showTime) !== null && _j !== void 0 ? _j : true,
246
+ showFullscreen: (_k = mergedProps.showFullscreen) !== null && _k !== void 0 ? _k : true,
247
+ showDownload: (_l = mergedProps.showDownload) !== null && _l !== void 0 ? _l : false,
248
+ showSeekButtons: (_m = mergedProps.showSeekButtons) !== null && _m !== void 0 ? _m : false,
249
+ playIcon: mergedProps.playIcon,
250
+ pauseIcon: mergedProps.pauseIcon,
251
+ fullscreenIcon: mergedProps.fullscreenIcon,
252
+ downloadIcon: mergedProps.downloadIcon,
253
+ volumeIcon: mergedProps.volumeIcon,
254
+ muteIcon: mergedProps.muteIcon,
255
+ rewindIcon: mergedProps.rewindIcon,
256
+ forwardIcon: mergedProps.forwardIcon,
257
+ hideControlsDelay: (_o = mergedProps.hideControlsDelay) !== null && _o !== void 0 ? _o : 3000,
258
+ loop: (_p = mergedProps.loop) !== null && _p !== void 0 ? _p : false,
259
+ muted: (_q = mergedProps.muted) !== null && _q !== void 0 ? _q : false,
260
+ seekAmount: (_r = mergedProps.seekAmount) !== null && _r !== void 0 ? _r : 10,
261
+ funcss: (_s = mergedProps.funcss) !== null && _s !== void 0 ? _s : '',
262
+ containerCss: (_t = mergedProps.containerCss) !== null && _t !== void 0 ? _t : '',
263
+ videoCss: (_u = mergedProps.videoCss) !== null && _u !== void 0 ? _u : '',
264
+ controlsCss: (_v = mergedProps.controlsCss) !== null && _v !== void 0 ? _v : '',
265
+ progressCss: (_w = mergedProps.progressCss) !== null && _w !== void 0 ? _w : '',
266
+ progressBarCss: (_x = mergedProps.progressBarCss) !== null && _x !== void 0 ? _x : '',
267
+ timeCss: (_y = mergedProps.timeCss) !== null && _y !== void 0 ? _y : '',
268
+ playCss: (_z = mergedProps.playCss) !== null && _z !== void 0 ? _z : '',
269
+ pauseCss: (_0 = mergedProps.pauseCss) !== null && _0 !== void 0 ? _0 : '',
270
+ volumeCss: (_1 = mergedProps.volumeCss) !== null && _1 !== void 0 ? _1 : '',
271
+ fullscreenCss: (_2 = mergedProps.fullscreenCss) !== null && _2 !== void 0 ? _2 : '',
272
+ downloadCss: (_3 = mergedProps.downloadCss) !== null && _3 !== void 0 ? _3 : '',
273
+ rewindCss: (_4 = mergedProps.rewindCss) !== null && _4 !== void 0 ? _4 : '',
274
+ forwardCss: (_5 = mergedProps.forwardCss) !== null && _5 !== void 0 ? _5 : '',
275
+ buttonCss: (_6 = mergedProps.buttonCss) !== null && _6 !== void 0 ? _6 : '',
276
+ volumeStyle: (_7 = mergedProps.volumeStyle) !== null && _7 !== void 0 ? _7 : 'slider',
277
+ };
91
278
  var videoRef = (0, react_1.useRef)(null);
92
279
  var containerRef = (0, react_1.useRef)(null);
93
280
  var animationFrameRef = (0, react_1.useRef)(null);
94
- var _7 = (0, react_1.useState)(false), isPlaying = _7[0], setIsPlaying = _7[1];
95
- var _8 = (0, react_1.useState)(0), currentTime = _8[0], setCurrentTime = _8[1];
96
- var _9 = (0, react_1.useState)(0), duration = _9[0], setDuration = _9[1];
97
- var _10 = (0, react_1.useState)(muted ? 0 : 1), volume = _10[0], setVolume = _10[1];
98
- var _11 = (0, react_1.useState)(muted), isMuted = _11[0], setIsMuted = _11[1];
99
- var _12 = (0, react_1.useState)(false), isFullScreen = _12[0], setIsFullScreen = _12[1];
100
- var _13 = (0, react_1.useState)(false), showControlsState = _13[0], setShowControlsState = _13[1];
101
- var _14 = (0, react_1.useState)(false), hasStarted = _14[0], setHasStarted = _14[1];
102
- var _15 = (0, react_1.useState)(false), isHoveringProgress = _15[0], setIsHoveringProgress = _15[1];
103
- var _16 = (0, react_1.useState)(false), isHoveringVolume = _16[0], setIsHoveringVolume = _16[1];
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];
104
292
  // Dynamic icon states
105
- var _17 = (0, react_1.useState)(null), dynamicPlayIcon = _17[0], setDynamicPlayIcon = _17[1];
106
- var _18 = (0, react_1.useState)(null), dynamicPauseIcon = _18[0], setDynamicPauseIcon = _18[1];
107
- var _19 = (0, react_1.useState)(null), dynamicFullscreenIcon = _19[0], setDynamicFullscreenIcon = _19[1];
108
- var _20 = (0, react_1.useState)(null), dynamicDownloadIcon = _20[0], setDynamicDownloadIcon = _20[1];
109
- var _21 = (0, react_1.useState)(null), dynamicVolumeIcon = _21[0], setDynamicVolumeIcon = _21[1];
110
- var _22 = (0, react_1.useState)(null), dynamicMuteIcon = _22[0], setDynamicMuteIcon = _22[1];
111
- var _23 = (0, react_1.useState)(null), dynamicRewindIcon = _23[0], setDynamicRewindIcon = _23[1];
112
- var _24 = (0, react_1.useState)(null), dynamicForwardIcon = _24[0], setDynamicForwardIcon = _24[1];
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];
113
301
  // Helper function to load dynamic icons
114
302
  var loadDynamicIcon = function (iconProp, setter, defaultIcon) { return __awaiter(_this, void 0, void 0, function () {
115
303
  var iconNode;
@@ -127,27 +315,26 @@ function Video(_a) {
127
315
  setter(iconNode || defaultIcon);
128
316
  return [3 /*break*/, 3];
129
317
  case 2:
130
- // It's already a ReactNode - use it directly
131
318
  setter(iconProp);
132
319
  _a.label = 3;
133
320
  case 3: return [2 /*return*/];
134
321
  }
135
322
  });
136
323
  }); };
137
- // Load all dynamic icons on component mount and when icon props change
324
+ // Load all dynamic icons
138
325
  (0, react_1.useEffect)(function () {
139
326
  var loadIcons = function () { return __awaiter(_this, void 0, void 0, function () {
140
327
  return __generator(this, function (_a) {
141
328
  switch (_a.label) {
142
329
  case 0: return [4 /*yield*/, Promise.all([
143
- loadDynamicIcon(playIcon, setDynamicPlayIcon, react_1.default.createElement(pi_1.PiPlay, { size: 16 })),
144
- loadDynamicIcon(pauseIcon, setDynamicPauseIcon, react_1.default.createElement(pi_1.PiPause, { size: 16 })),
145
- loadDynamicIcon(fullscreenIcon, setDynamicFullscreenIcon, react_1.default.createElement(pi_1.PiCornersOut, { size: 16 })),
146
- loadDynamicIcon(downloadIcon, setDynamicDownloadIcon, react_1.default.createElement(tfi_1.TfiDownload, { size: 14 })),
147
- loadDynamicIcon(volumeIcon, setDynamicVolumeIcon, react_1.default.createElement(pi_1.PiSpeakerHigh, { size: 16 })),
148
- loadDynamicIcon(muteIcon, setDynamicMuteIcon, react_1.default.createElement(pi_1.PiSpeakerSlash, { size: 16 })),
149
- loadDynamicIcon(rewindIcon, setDynamicRewindIcon, react_1.default.createElement(tfi_1.TfiControlBackward, { size: 14 })),
150
- loadDynamicIcon(forwardIcon, setDynamicForwardIcon, react_1.default.createElement(tfi_1.TfiControlForward, { size: 14 })),
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 })),
151
338
  ])];
152
339
  case 1:
153
340
  _a.sent();
@@ -157,15 +344,14 @@ function Video(_a) {
157
344
  }); };
158
345
  loadIcons();
159
346
  }, [
160
- playIcon, pauseIcon, fullscreenIcon, downloadIcon,
161
- volumeIcon, muteIcon, rewindIcon, forwardIcon
347
+ final.playIcon, final.pauseIcon, final.fullscreenIcon, final.downloadIcon,
348
+ final.volumeIcon, final.muteIcon, final.rewindIcon, final.forwardIcon
162
349
  ]);
163
- // Helper function to render icon with proper size
350
+ // Helper function to render icon
164
351
  var renderIcon = function (icon, defaultSize) {
165
352
  if (defaultSize === void 0) { defaultSize = 16; }
166
353
  if (!icon)
167
354
  return null;
168
- // If it's a React element, clone it with the size prop
169
355
  if (react_1.default.isValidElement(icon)) {
170
356
  return react_1.default.cloneElement(icon, {
171
357
  size: icon.props.size || defaultSize
@@ -204,19 +390,15 @@ function Video(_a) {
204
390
  var rect = container.getBoundingClientRect();
205
391
  var clickX = e.clientX - rect.left;
206
392
  var width = rect.width;
207
- // Divide video into three areas
208
393
  var leftArea = width * 0.3;
209
394
  var rightArea = width * 0.7;
210
395
  if (clickX < leftArea) {
211
- // Left area - rewind
212
- handleSeek(-seekAmount);
396
+ handleSeek(-final.seekAmount);
213
397
  }
214
398
  else if (clickX > rightArea) {
215
- // Right area - forward
216
- handleSeek(seekAmount);
399
+ handleSeek(final.seekAmount);
217
400
  }
218
401
  else {
219
- // Middle area - play/pause
220
402
  handlePlayPauseToggle();
221
403
  }
222
404
  };
@@ -227,8 +409,8 @@ function Video(_a) {
227
409
  video.currentTime = Math.max(0, Math.min(video.currentTime + seconds, duration));
228
410
  }
229
411
  };
230
- var handleRewind = function () { return handleSeek(-seekAmount); };
231
- var handleForward = function () { return handleSeek(seekAmount); };
412
+ var handleRewind = function () { return handleSeek(-final.seekAmount); };
413
+ var handleForward = function () { return handleSeek(final.seekAmount); };
232
414
  // Fullscreen functionality
233
415
  var handleToggleFullScreen = function () {
234
416
  var _a, _b;
@@ -285,11 +467,12 @@ function Video(_a) {
285
467
  }, []);
286
468
  // Event handlers
287
469
  var handleLoadedMetadata = function () {
470
+ var _a;
288
471
  var video = videoRef.current;
289
472
  if (video) {
290
473
  setDuration(video.duration || 0);
291
- onDuration === null || onDuration === void 0 ? void 0 : onDuration(video.duration);
292
- if (autoPlay) {
474
+ (_a = final.onDuration) === null || _a === void 0 ? void 0 : _a.call(final, video.duration);
475
+ if (final.autoPlay) {
293
476
  video.muted = true;
294
477
  video.play().then(function () {
295
478
  setIsPlaying(true);
@@ -299,9 +482,10 @@ function Video(_a) {
299
482
  }
300
483
  };
301
484
  var handleVideoEnd = function () {
485
+ var _a;
302
486
  setIsPlaying(false);
303
- onEnded === null || onEnded === void 0 ? void 0 : onEnded(); // Call the onEnded callback
304
- if (loop && videoRef.current) {
487
+ (_a = final.onEnded) === null || _a === void 0 ? void 0 : _a.call(final);
488
+ if (final.loop && videoRef.current) {
305
489
  videoRef.current.currentTime = 0;
306
490
  playVideo();
307
491
  }
@@ -309,22 +493,22 @@ function Video(_a) {
309
493
  // Effects
310
494
  (0, react_1.useEffect)(function () {
311
495
  var handleKey = function (e) {
312
- return (0, videoShortcuts_1.handleKeyDown)(e, isPlaying, playVideo, pauseVideo, spacebarPlay);
496
+ return (0, videoShortcuts_1.handleKeyDown)(e, isPlaying, playVideo, pauseVideo, final.spacebarPlay);
313
497
  };
314
498
  document.addEventListener('keydown', handleKey);
315
499
  return function () { return document.removeEventListener('keydown', handleKey); };
316
- }, [isPlaying, spacebarPlay]);
500
+ }, [isPlaying, final.spacebarPlay]);
317
501
  (0, react_1.useEffect)(function () {
318
502
  var video = videoRef.current;
319
503
  if (!video)
320
504
  return;
321
505
  video.addEventListener('ended', handleVideoEnd);
322
506
  return function () { return video.removeEventListener('ended', handleVideoEnd); };
323
- }, [loop, onEnded]);
507
+ }, [final.loop, final.onEnded]);
324
508
  (0, react_1.useEffect)(function () {
325
- if (isPause)
509
+ if (final.isPause)
326
510
  pauseVideo();
327
- }, [isPause]);
511
+ }, [final.isPause]);
328
512
  (0, react_1.useEffect)(function () {
329
513
  var handleFullscreenChange = function () {
330
514
  setIsFullScreen(!!document.fullscreenElement);
@@ -338,13 +522,17 @@ function Video(_a) {
338
522
  var show = function () {
339
523
  setShowControlsState(true);
340
524
  clearTimeout(timer);
341
- timer = setTimeout(function () { return setShowControlsState(false); }, hideControlsDelay);
525
+ timer = setTimeout(function () {
526
+ setShowControlsState(false);
527
+ setShowVolumeSlider(false);
528
+ }, final.hideControlsDelay);
342
529
  };
343
530
  var hide = function () {
344
531
  setShowControlsState(false);
532
+ setShowVolumeSlider(false);
345
533
  };
346
534
  var container = containerRef.current;
347
- if (container && showControls) {
535
+ if (container && final.showControls) {
348
536
  container.addEventListener('mouseenter', show);
349
537
  container.addEventListener('mouseleave', hide);
350
538
  container.addEventListener('mousemove', show);
@@ -357,7 +545,7 @@ function Video(_a) {
357
545
  }
358
546
  clearTimeout(timer);
359
547
  };
360
- }, [showControls, hideControlsDelay]);
548
+ }, [final.showControls, final.hideControlsDelay]);
361
549
  (0, react_1.useEffect)(function () {
362
550
  if (isPlaying) {
363
551
  animationFrameRef.current = requestAnimationFrame(updateCurrentTime);
@@ -370,50 +558,80 @@ function Video(_a) {
370
558
  cancelAnimationFrame(animationFrameRef.current);
371
559
  };
372
560
  }, [isPlaying, updateCurrentTime]);
373
- // Beautiful Progress Bar Component
374
- var ProgressBar = function () { return (react_1.default.createElement("div", { className: "progress-container mb-4" },
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" },
375
575
  react_1.default.createElement("div", { className: "progress-wrapper" },
376
- react_1.default.createElement("input", { type: "range", min: 0, max: duration, value: currentTime, onChange: handleProgressChange, className: "video-progress ".concat(progressCss), style: {
576
+ react_1.default.createElement("input", { type: "range", min: 0, max: duration, value: currentTime, onChange: handleProgressChange, className: "video-progress ".concat(final.progressCss), style: {
377
577
  '--progress-percent': "".concat((currentTime / duration) * 100, "%"),
378
578
  }, onMouseEnter: function () { return setIsHoveringProgress(true); }, onMouseLeave: function () { return setIsHoveringProgress(false); } })))); };
379
- // Beautiful Volume Control Component
380
- var VolumeControl = function () { return (react_1.default.createElement("div", { className: "volume-control-wrapper" },
381
- react_1.default.createElement(ToolTip_1.default, null,
382
- react_1.default.createElement(Circle_1.default, { bordered: true, size: 2.5, onClick: handleToggleMute, className: "volume-toggle ".concat(buttonCss, " ").concat(volumeCss) }, isMuted || volume === 0
383
- ? renderIcon(dynamicMuteIcon, 16)
384
- : renderIcon(dynamicVolumeIcon, 16)),
385
- react_1.default.createElement(Tip_1.default, { tip: "top", content: isMuted ? "Unmute" : "Mute" })),
386
- react_1.default.createElement("div", { className: "volume-slider-wrapper", onMouseEnter: function () { return setIsHoveringVolume(true); }, onMouseLeave: function () { return setIsHoveringVolume(false); } },
387
- react_1.default.createElement("input", { type: "range", min: 0, max: 1, step: 0.01, value: volume, onChange: handleVolumeChange, className: "volume-slider", style: {
388
- '--volume-percent': "".concat(volume * 100, "%"),
389
- } })))); };
390
- return (react_1.default.createElement("div", { ref: containerRef, className: "video_container fit ".concat(funcss, " ").concat(containerCss, " ").concat(className), onClick: handleVideoClick },
391
- poster && !hasStarted && !isPlaying && (react_1.default.createElement("div", { style: { backgroundImage: "url(".concat(poster, ")") }, className: "video_poster" })),
392
- react_1.default.createElement("video", { ref: videoRef, preload: "auto", src: src, className: "video_player fit min-w-200 ".concat(videoCss), onLoadedMetadata: handleLoadedMetadata, playsInline: true, controls: false, loop: loop, muted: muted }),
393
- showControls && (react_1.default.createElement("div", { className: "video_controls ".concat(controlsCss, " ").concat(showControlsState ? 'show_controls' : 'hide_controls') },
394
- showProgress && react_1.default.createElement(ProgressBar, null),
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
+ };
607
+ return (react_1.default.createElement("div", { ref: containerRef, className: "video_container fit ".concat(final.funcss, " ").concat(final.containerCss, " ").concat(final.className), onClick: handleVideoClick },
608
+ final.poster && !hasStarted && !isPlaying && (react_1.default.createElement("div", { style: { backgroundImage: "url(".concat(final.poster, ")") }, className: "video_poster" })),
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 }),
610
+ final.showControls && (react_1.default.createElement("div", { className: "video_controls ".concat(final.controlsCss, " ").concat(showControlsState ? 'show_controls' : 'hide_controls') },
395
611
  react_1.default.createElement(RowFlex_1.default, { gap: 1, justify: "space-between", alignItems: "center", className: "controls-row" },
396
- react_1.default.createElement(RowFlex_1.default, { gap: 0.5, alignItems: "center" },
397
- showPlayPause && (react_1.default.createElement(ToolTip_1.default, null,
398
- react_1.default.createElement(Circle_1.default, { bordered: true, size: 2.5, onClick: handlePlayPauseToggle, className: "".concat(buttonCss, " ").concat(isPlaying ? pauseCss : playCss) }, isPlaying
399
- ? renderIcon(dynamicPauseIcon, 16)
400
- : renderIcon(dynamicPlayIcon, 16)),
612
+ react_1.default.createElement(RowFlex_1.default, { gap: 0.5, alignItems: "center", funcss: 'videoLeftContainer' },
613
+ final.showPlayPause && (react_1.default.createElement(ToolTip_1.default, null,
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)),
401
617
  react_1.default.createElement(Tip_1.default, { tip: "top", content: isPlaying ? "Pause" : "Play" }))),
402
- showSeekButtons && (react_1.default.createElement(react_1.default.Fragment, null,
618
+ final.showSeekButtons && (react_1.default.createElement(react_1.default.Fragment, null,
403
619
  react_1.default.createElement(ToolTip_1.default, null,
404
- react_1.default.createElement(Circle_1.default, { bordered: true, size: 2.5, onClick: handleRewind, className: "".concat(buttonCss, " ").concat(rewindCss) }, renderIcon(dynamicRewindIcon, 14)),
405
- react_1.default.createElement(Tip_1.default, { tip: "top", content: "".concat(seekAmount, "s Back") })),
620
+ react_1.default.createElement("div", { onClick: handleRewind, className: "".concat(final.buttonCss, " ").concat(final.rewindCss, " pointer") }, renderIcon(dynamicRewindIcon, 16)),
621
+ react_1.default.createElement(Tip_1.default, { tip: "top", content: "".concat(final.seekAmount, "s Back") })),
406
622
  react_1.default.createElement(ToolTip_1.default, null,
407
- react_1.default.createElement(Circle_1.default, { bordered: true, size: 2.5, onClick: handleForward, className: "".concat(buttonCss, " ").concat(forwardCss) }, renderIcon(dynamicForwardIcon, 14)),
408
- react_1.default.createElement(Tip_1.default, { tip: "top", content: "".concat(seekAmount, "s Forward") })))),
409
- showVolume && react_1.default.createElement(VolumeControl, null),
410
- showTime && (react_1.default.createElement("div", { className: "video_time ".concat(timeCss) },
411
- react_1.default.createElement(Text_1.default, { text: "".concat((0, videoFunctions_1.formatTime)(currentTime), " / ").concat((0, videoFunctions_1.formatTime)(duration)), funcss: 'm-0', size: "sm" })))),
412
- react_1.default.createElement(RowFlex_1.default, { gap: 0.3 },
413
- showFullscreen && (react_1.default.createElement(ToolTip_1.default, null,
414
- react_1.default.createElement(Circle_1.default, { bordered: true, size: 2.5, onClick: handleToggleFullScreen, className: "".concat(buttonCss, " ").concat(fullscreenCss) }, renderIcon(dynamicFullscreenIcon, 16)),
623
+ react_1.default.createElement("div", { onClick: handleForward, className: "".concat(final.buttonCss, " ").concat(final.forwardCss, " pointer") }, renderIcon(dynamicForwardIcon, 16)),
624
+ react_1.default.createElement(Tip_1.default, { tip: "top", content: "".concat(final.seekAmount, "s Forward") })))),
625
+ final.showVolume && react_1.default.createElement(VolumeControl, null),
626
+ final.showTime && (react_1.default.createElement("div", { className: "video_time ".concat(final.timeCss) },
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' },
631
+ final.showFullscreen && (react_1.default.createElement(ToolTip_1.default, null,
632
+ react_1.default.createElement("div", { onClick: handleToggleFullScreen, className: "".concat(final.buttonCss, " ").concat(final.fullscreenCss, " pointer") }, renderIcon(dynamicFullscreenIcon, 18)),
415
633
  react_1.default.createElement(Tip_1.default, { tip: "top", content: "Fullscreen" }))),
416
- showDownload && (react_1.default.createElement(ToolTip_1.default, null,
417
- react_1.default.createElement(Circle_1.default, { bordered: true, size: 2.5, onClick: function () { return window.open(src, '_blank'); }, className: "".concat(buttonCss, " ").concat(downloadCss) }, renderIcon(dynamicDownloadIcon, 14)),
634
+ final.showDownload && (react_1.default.createElement(ToolTip_1.default, null,
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)),
418
636
  react_1.default.createElement(Tip_1.default, { tip: "top", content: "Download" })))))))));
419
637
  }
@@ -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) },