@wix/form-public 0.531.0 → 0.533.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.
package/dist/index.js CHANGED
@@ -62369,25 +62369,35 @@ var ButtonsContainer = ({ className, children }) => {
62369
62369
  className
62370
62370
  }, previousButtonElement, nextButtonElement, submitButtonElement);
62371
62371
  };
62372
- var PreviousButton = ({ className }) => {
62372
+ var PreviousButton = ({ className, onHoverStart, onHoverEnd, children }) => {
62373
62373
  const { showPreviousButton, onPreviousClick, previousText } = useFieldPropsV2();
62374
62374
  if (!showPreviousButton) {
62375
62375
  return null;
62376
62376
  }
62377
+ const labelElement = findChildOfType(children, PreviousButton.Label);
62378
+ const iconElement = findChildOfType(children, PreviousButton.Icon);
62377
62379
  return /* @__PURE__ */ React173.createElement(Button, {
62378
62380
  className,
62379
- onPress: onPreviousClick
62380
- }, previousText);
62381
+ "aria-label": previousText,
62382
+ onPress: onPreviousClick,
62383
+ onHoverStart,
62384
+ onHoverEnd
62385
+ }, iconElement, labelElement ?? /* @__PURE__ */ React173.createElement(PreviousLabel, null));
62381
62386
  };
62382
- var NextButton = ({ className }) => {
62387
+ var NextButton = ({ className, onHoverStart, onHoverEnd, children }) => {
62383
62388
  const { showNextButton, onNextClick, nextText } = useFieldPropsV2();
62384
62389
  if (!showNextButton) {
62385
62390
  return null;
62386
62391
  }
62392
+ const labelElement = findChildOfType(children, NextButton.Label);
62393
+ const iconElement = findChildOfType(children, NextButton.Icon);
62387
62394
  return /* @__PURE__ */ React173.createElement(Button, {
62388
62395
  className,
62389
- onPress: onNextClick
62390
- }, nextText);
62396
+ "aria-label": nextText,
62397
+ onPress: onNextClick,
62398
+ onHoverStart,
62399
+ onHoverEnd
62400
+ }, labelElement ?? /* @__PURE__ */ React173.createElement(NextLabel, null), iconElement);
62391
62401
  };
62392
62402
  var SubmitButtonComponent = ({ className, onHoverStart, onHoverEnd, children }) => {
62393
62403
  const { showSubmitButton, onSubmitClick, submitText, isDisabled, isInProgress, isSubmitting } = useFieldPropsV2();
@@ -62415,6 +62425,18 @@ var Label2 = ({ className }) => {
62415
62425
  className
62416
62426
  }, submitText);
62417
62427
  };
62428
+ var PreviousLabel = ({ className }) => {
62429
+ const { previousText } = useFieldPropsV2();
62430
+ return /* @__PURE__ */ React173.createElement("span", {
62431
+ className
62432
+ }, previousText);
62433
+ };
62434
+ var NextLabel = ({ className }) => {
62435
+ const { nextText } = useFieldPropsV2();
62436
+ return /* @__PURE__ */ React173.createElement("span", {
62437
+ className
62438
+ }, nextText);
62439
+ };
62418
62440
  var Icon = ({ children }) => /* @__PURE__ */ React173.createElement(React173.Fragment, null, children);
62419
62441
  var Loader2 = ({ className }) => {
62420
62442
  return /* @__PURE__ */ React173.createElement("span", {
@@ -62424,6 +62446,10 @@ var Loader2 = ({ className }) => {
62424
62446
  SubmitButtonComponent.Label = Label2;
62425
62447
  SubmitButtonComponent.Icon = Icon;
62426
62448
  SubmitButtonComponent.Loader = Loader2;
62449
+ PreviousButton.Label = PreviousLabel;
62450
+ PreviousButton.Icon = Icon;
62451
+ NextButton.Label = NextLabel;
62452
+ NextButton.Icon = Icon;
62427
62453
  ButtonsContainer.PreviousButton = PreviousButton;
62428
62454
  ButtonsContainer.NextButton = NextButton;
62429
62455
  ButtonsContainer.SubmitButton = SubmitButtonComponent;