@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.cjs +32 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -62379,25 +62379,35 @@ var ButtonsContainer = ({ className, children }) => {
|
|
|
62379
62379
|
className
|
|
62380
62380
|
}, previousButtonElement, nextButtonElement, submitButtonElement);
|
|
62381
62381
|
};
|
|
62382
|
-
var PreviousButton = ({ className }) => {
|
|
62382
|
+
var PreviousButton = ({ className, onHoverStart, onHoverEnd, children }) => {
|
|
62383
62383
|
const { showPreviousButton, onPreviousClick, previousText } = useFieldPropsV2();
|
|
62384
62384
|
if (!showPreviousButton) {
|
|
62385
62385
|
return null;
|
|
62386
62386
|
}
|
|
62387
|
+
const labelElement = findChildOfType(children, PreviousButton.Label);
|
|
62388
|
+
const iconElement = findChildOfType(children, PreviousButton.Icon);
|
|
62387
62389
|
return /* @__PURE__ */ React173__default.default.createElement(reactAriaComponents.Button, {
|
|
62388
62390
|
className,
|
|
62389
|
-
|
|
62390
|
-
|
|
62391
|
+
"aria-label": previousText,
|
|
62392
|
+
onPress: onPreviousClick,
|
|
62393
|
+
onHoverStart,
|
|
62394
|
+
onHoverEnd
|
|
62395
|
+
}, iconElement, labelElement ?? /* @__PURE__ */ React173__default.default.createElement(PreviousLabel, null));
|
|
62391
62396
|
};
|
|
62392
|
-
var NextButton = ({ className }) => {
|
|
62397
|
+
var NextButton = ({ className, onHoverStart, onHoverEnd, children }) => {
|
|
62393
62398
|
const { showNextButton, onNextClick, nextText } = useFieldPropsV2();
|
|
62394
62399
|
if (!showNextButton) {
|
|
62395
62400
|
return null;
|
|
62396
62401
|
}
|
|
62402
|
+
const labelElement = findChildOfType(children, NextButton.Label);
|
|
62403
|
+
const iconElement = findChildOfType(children, NextButton.Icon);
|
|
62397
62404
|
return /* @__PURE__ */ React173__default.default.createElement(reactAriaComponents.Button, {
|
|
62398
62405
|
className,
|
|
62399
|
-
|
|
62400
|
-
|
|
62406
|
+
"aria-label": nextText,
|
|
62407
|
+
onPress: onNextClick,
|
|
62408
|
+
onHoverStart,
|
|
62409
|
+
onHoverEnd
|
|
62410
|
+
}, labelElement ?? /* @__PURE__ */ React173__default.default.createElement(NextLabel, null), iconElement);
|
|
62401
62411
|
};
|
|
62402
62412
|
var SubmitButtonComponent = ({ className, onHoverStart, onHoverEnd, children }) => {
|
|
62403
62413
|
const { showSubmitButton, onSubmitClick, submitText, isDisabled, isInProgress, isSubmitting } = useFieldPropsV2();
|
|
@@ -62425,6 +62435,18 @@ var Label2 = ({ className }) => {
|
|
|
62425
62435
|
className
|
|
62426
62436
|
}, submitText);
|
|
62427
62437
|
};
|
|
62438
|
+
var PreviousLabel = ({ className }) => {
|
|
62439
|
+
const { previousText } = useFieldPropsV2();
|
|
62440
|
+
return /* @__PURE__ */ React173__default.default.createElement("span", {
|
|
62441
|
+
className
|
|
62442
|
+
}, previousText);
|
|
62443
|
+
};
|
|
62444
|
+
var NextLabel = ({ className }) => {
|
|
62445
|
+
const { nextText } = useFieldPropsV2();
|
|
62446
|
+
return /* @__PURE__ */ React173__default.default.createElement("span", {
|
|
62447
|
+
className
|
|
62448
|
+
}, nextText);
|
|
62449
|
+
};
|
|
62428
62450
|
var Icon = ({ children }) => /* @__PURE__ */ React173__default.default.createElement(React173__default.default.Fragment, null, children);
|
|
62429
62451
|
var Loader2 = ({ className }) => {
|
|
62430
62452
|
return /* @__PURE__ */ React173__default.default.createElement("span", {
|
|
@@ -62434,6 +62456,10 @@ var Loader2 = ({ className }) => {
|
|
|
62434
62456
|
SubmitButtonComponent.Label = Label2;
|
|
62435
62457
|
SubmitButtonComponent.Icon = Icon;
|
|
62436
62458
|
SubmitButtonComponent.Loader = Loader2;
|
|
62459
|
+
PreviousButton.Label = PreviousLabel;
|
|
62460
|
+
PreviousButton.Icon = Icon;
|
|
62461
|
+
NextButton.Label = NextLabel;
|
|
62462
|
+
NextButton.Icon = Icon;
|
|
62437
62463
|
ButtonsContainer.PreviousButton = PreviousButton;
|
|
62438
62464
|
ButtonsContainer.NextButton = NextButton;
|
|
62439
62465
|
ButtonsContainer.SubmitButton = SubmitButtonComponent;
|