@wix/editor-react-components 1.2566.0 → 1.2568.0

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.
@@ -3373,13 +3373,18 @@ const styles = {
3373
3373
  const PlayButton = ({
3374
3374
  isPlaying,
3375
3375
  hasError,
3376
- onTogglePlay
3376
+ onTogglePlay,
3377
+ controlsClassName
3377
3378
  }) => {
3378
3379
  const PlaybackIcon = isPlaying ? PauseFilled_default : PlayFilled_default;
3379
3380
  return /* @__PURE__ */ jsx(
3380
3381
  $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
3381
3382
  {
3382
- className: clsx(selectors.playButton, selectors.controls),
3383
+ className: clsx(
3384
+ selectors.playButton,
3385
+ selectors.controls,
3386
+ controlsClassName
3387
+ ),
3383
3388
  onPress: onTogglePlay,
3384
3389
  isDisabled: hasError,
3385
3390
  "aria-label": isPlaying ? ARIA_LABELS.pauseButton : ARIA_LABELS.playButton,
@@ -3405,9 +3410,10 @@ const ProgressSlider = ({
3405
3410
  duration,
3406
3411
  hasError,
3407
3412
  onSeek,
3408
- elementProps
3413
+ progressBarClassName,
3414
+ timeDisplayClassName,
3415
+ controlsClassName
3409
3416
  }) => {
3410
- var _a, _b;
3411
3417
  const timeText = `${formatTime(currentTime)} / ${formatTime(duration)}`;
3412
3418
  return /* @__PURE__ */ jsxs(Fragment, { children: [
3413
3419
  /* @__PURE__ */ jsx(
@@ -3417,7 +3423,8 @@ const ProgressSlider = ({
3417
3423
  selectors.progressBar,
3418
3424
  selectors.controls,
3419
3425
  styles.progressBar,
3420
- (_a = elementProps == null ? void 0 : elementProps.progressBar) == null ? void 0 : _a.className
3426
+ controlsClassName,
3427
+ progressBarClassName
3421
3428
  ),
3422
3429
  minValue: 0,
3423
3430
  maxValue: duration || 1,
@@ -3452,7 +3459,8 @@ const ProgressSlider = ({
3452
3459
  selectors.timeDisplay,
3453
3460
  selectors.controls,
3454
3461
  styles.timeDisplay,
3455
- (_b = elementProps == null ? void 0 : elementProps.timeDisplay) == null ? void 0 : _b.className
3462
+ controlsClassName,
3463
+ timeDisplayClassName
3456
3464
  ),
3457
3465
  children: timeText
3458
3466
  }
@@ -3511,7 +3519,8 @@ const VolumeControls = ({
3511
3519
  isMuted,
3512
3520
  onToggleMute,
3513
3521
  onVolumeChange,
3514
- className
3522
+ className,
3523
+ controlsClassName
3515
3524
  }) => /* @__PURE__ */ jsxs(
3516
3525
  $a049562f99e7db0e$export$eb2fcfdbd7ba97d4,
3517
3526
  {
@@ -3519,6 +3528,7 @@ const VolumeControls = ({
3519
3528
  selectors.volumeControls,
3520
3529
  selectors.controls,
3521
3530
  styles.volumeControls,
3531
+ controlsClassName,
3522
3532
  className
3523
3533
  ),
3524
3534
  "aria-label": ARIA_LABELS.volumeControls,
@@ -3558,7 +3568,7 @@ const VolumeControls = ({
3558
3568
  }
3559
3569
  );
3560
3570
  const AudioPlayer = (props) => {
3561
- var _a, _b, _c, _d, _e, _f;
3571
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3562
3572
  const {
3563
3573
  id,
3564
3574
  className,
@@ -3576,11 +3586,12 @@ const AudioPlayer = (props) => {
3576
3586
  onMouseOut,
3577
3587
  elementProps
3578
3588
  } = props;
3589
+ const controlsClassName = (_a = elementProps == null ? void 0 : elementProps.controls) == null ? void 0 : _a.className;
3579
3590
  const audioUrl = audio == null ? void 0 : audio.url;
3580
3591
  const title = audio == null ? void 0 : audio.title;
3581
3592
  const artist = audio == null ? void 0 : audio.artist;
3582
3593
  const environment = useService(EnvironmentDefinition);
3583
- const isSSR = ((_a = environment == null ? void 0 : environment.isSSR) == null ? void 0 : _a.call(environment)) ?? false;
3594
+ const isSSR = ((_b = environment == null ? void 0 : environment.isSSR) == null ? void 0 : _b.call(environment)) ?? false;
3584
3595
  const fallbackInstanceId = useRef(
3585
3596
  `audio-player-${Math.random().toString(36).slice(2)}`
3586
3597
  );
@@ -3627,7 +3638,7 @@ const AudioPlayer = (props) => {
3627
3638
  className: clsx(
3628
3639
  selectors.coverMedia,
3629
3640
  styles.coverMediaWrapper,
3630
- (_b = elementProps == null ? void 0 : elementProps.coverArt) == null ? void 0 : _b.className
3641
+ (_c = elementProps == null ? void 0 : elementProps.coverArt) == null ? void 0 : _c.className
3631
3642
  ),
3632
3643
  image: coverImage,
3633
3644
  displayMode
@@ -3639,7 +3650,7 @@ const AudioPlayer = (props) => {
3639
3650
  {
3640
3651
  className: clsx(
3641
3652
  selectors.title,
3642
- (_c = elementProps == null ? void 0 : elementProps.audioTitle) == null ? void 0 : _c.className
3653
+ (_d = elementProps == null ? void 0 : elementProps.audioTitle) == null ? void 0 : _d.className
3643
3654
  ),
3644
3655
  children: title
3645
3656
  }
@@ -3660,51 +3671,46 @@ const AudioPlayer = (props) => {
3660
3671
  className: clsx(
3661
3672
  selectors.artistName,
3662
3673
  styles.artistName,
3663
- (_d = elementProps == null ? void 0 : elementProps.artistName) == null ? void 0 : _d.className
3674
+ (_e = elementProps == null ? void 0 : elementProps.artistName) == null ? void 0 : _e.className
3664
3675
  ),
3665
3676
  children: artist
3666
3677
  }
3667
3678
  )
3668
3679
  ] }),
3669
- /* @__PURE__ */ jsxs(
3670
- "div",
3671
- {
3672
- className: clsx(
3673
- styles.controls,
3674
- (_e = elementProps == null ? void 0 : elementProps.controls) == null ? void 0 : _e.className
3675
- ),
3676
- children: [
3677
- /* @__PURE__ */ jsx(
3678
- PlayButton,
3679
- {
3680
- isPlaying,
3681
- hasError,
3682
- onTogglePlay: togglePlay
3683
- }
3684
- ),
3685
- /* @__PURE__ */ jsx(
3686
- ProgressSlider,
3687
- {
3688
- currentTime,
3689
- duration,
3690
- hasError,
3691
- onSeek: seekTo,
3692
- elementProps
3693
- }
3694
- ),
3695
- /* @__PURE__ */ jsx(
3696
- VolumeControls,
3697
- {
3698
- currentVolume,
3699
- isMuted,
3700
- onToggleMute: toggleMute,
3701
- onVolumeChange: setVolume,
3702
- className: (_f = elementProps == null ? void 0 : elementProps.volumeControls) == null ? void 0 : _f.className
3703
- }
3704
- )
3705
- ]
3706
- }
3707
- )
3680
+ /* @__PURE__ */ jsxs("div", { className: styles.controls, children: [
3681
+ /* @__PURE__ */ jsx(
3682
+ PlayButton,
3683
+ {
3684
+ isPlaying,
3685
+ hasError,
3686
+ onTogglePlay: togglePlay,
3687
+ controlsClassName
3688
+ }
3689
+ ),
3690
+ /* @__PURE__ */ jsx(
3691
+ ProgressSlider,
3692
+ {
3693
+ currentTime,
3694
+ duration,
3695
+ hasError,
3696
+ onSeek: seekTo,
3697
+ progressBarClassName: (_f = elementProps == null ? void 0 : elementProps.progressBar) == null ? void 0 : _f.className,
3698
+ timeDisplayClassName: (_g = elementProps == null ? void 0 : elementProps.timeDisplay) == null ? void 0 : _g.className,
3699
+ controlsClassName
3700
+ }
3701
+ ),
3702
+ /* @__PURE__ */ jsx(
3703
+ VolumeControls,
3704
+ {
3705
+ currentVolume,
3706
+ isMuted,
3707
+ onToggleMute: toggleMute,
3708
+ onVolumeChange: setVolume,
3709
+ className: (_h = elementProps == null ? void 0 : elementProps.volumeControls) == null ? void 0 : _h.className,
3710
+ controlsClassName
3711
+ }
3712
+ )
3713
+ ] })
3708
3714
  ]
3709
3715
  }
3710
3716
  );
@@ -54,13 +54,16 @@ export interface PlayButtonProps {
54
54
  isPlaying: boolean;
55
55
  hasError: boolean;
56
56
  onTogglePlay: () => void;
57
+ controlsClassName?: string;
57
58
  }
58
59
  export interface ProgressSliderProps {
59
60
  currentTime: number;
60
61
  duration: number;
61
62
  hasError: boolean;
62
63
  onSeek: (value: number) => void;
63
- elementProps?: AudioPlayerElementProps;
64
+ progressBarClassName?: string;
65
+ timeDisplayClassName?: string;
66
+ controlsClassName?: string;
64
67
  }
65
68
  export interface VolumeControlsProps {
66
69
  currentVolume: number;
@@ -68,4 +71,5 @@ export interface VolumeControlsProps {
68
71
  onToggleMute: () => void;
69
72
  onVolumeChange: (value: number) => void;
70
73
  className?: string;
74
+ controlsClassName?: string;
71
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2566.0",
3
+ "version": "1.2568.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -79,12 +79,12 @@
79
79
  "@vis.gl/react-google-maps": "^1.5.2",
80
80
  "@wix/ambassador-devcenter-v1-component-type-data": "^1.0.530",
81
81
  "@wix/design-system-illustrations": "^2.28.5",
82
- "@wix/sdk": "^1.21.15",
82
+ "@wix/sdk": "^1.21.16",
83
83
  "@wix/services-manager-react": "^0.1.27",
84
84
  "@wix/site-service-business-logger": "^1.0.0",
85
85
  "@wix/site-service-configuration": "^1.0.1",
86
86
  "@wix/site-service-rendering-context": "^1.0.1",
87
- "@wix/site-ui": "1.241.0",
87
+ "@wix/site-ui": "1.243.0",
88
88
  "@wix/video": "^1.106.0",
89
89
  "@wix/viewer-service-consent-policy": "^1.0.101",
90
90
  "@wix/web-bi-logger": "^2.1.29",
@@ -199,5 +199,5 @@
199
199
  "registry": "https://registry.npmjs.org/",
200
200
  "access": "public"
201
201
  },
202
- "falconPackageHash": "08d4a7da72d04f1cf1b97e2a75458ed6bc7175785107bd5bfe898da7"
202
+ "falconPackageHash": "3ef9f41f962b58205d7919ef2e11aa1afed1be12ea1471d7e5bd4c60"
203
203
  }