@wix/form-public 0.495.0 → 0.497.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 +18 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +5 -4
- package/dist/index.css.map +1 -1
- package/dist/index.js +18 -20
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -51610,7 +51610,7 @@ var RichTextLabel = ({ className, requiredClassName, theme, children, ...interna
|
|
|
51610
51610
|
htmlAttributesPlugin
|
|
51611
51611
|
}));
|
|
51612
51612
|
};
|
|
51613
|
-
var
|
|
51613
|
+
var SelectionIndicator = ({ className, ...internal }) => {
|
|
51614
51614
|
const state = internal;
|
|
51615
51615
|
return /* @__PURE__ */ React172.createElement("div", {
|
|
51616
51616
|
"aria-hidden": "true",
|
|
@@ -51665,7 +51665,7 @@ var CheckboxContainer = ({ children, className }) => {
|
|
|
51665
51665
|
}), labelElement)));
|
|
51666
51666
|
};
|
|
51667
51667
|
CheckboxContainer.RichTextLabel = RichTextLabel;
|
|
51668
|
-
CheckboxContainer.Input =
|
|
51668
|
+
CheckboxContainer.Input = SelectionIndicator;
|
|
51669
51669
|
Checkbox.Checkbox = CheckboxContainer;
|
|
51670
51670
|
Checkbox.Description = Description;
|
|
51671
51671
|
Checkbox.Error = Error2;
|
|
@@ -51867,7 +51867,7 @@ var Checkbox2 = ({ children, className, ...internal }) => {
|
|
|
51867
51867
|
}))));
|
|
51868
51868
|
};
|
|
51869
51869
|
Checkbox2.Label = OptionLabel;
|
|
51870
|
-
Checkbox2.Input =
|
|
51870
|
+
Checkbox2.Input = SelectionIndicator;
|
|
51871
51871
|
var Option = ({ children, ...internal }) => {
|
|
51872
51872
|
const { value, label, isFirst = false, isOther = false, fieldId } = internal;
|
|
51873
51873
|
const props2 = useFieldPropsV2();
|
|
@@ -55393,7 +55393,7 @@ var Guest = ({ className, ...internal }) => {
|
|
|
55393
55393
|
};
|
|
55394
55394
|
GuestCount.Decrement = GuestCountDecrement;
|
|
55395
55395
|
GuestCount.Increment = GuestCountIncrement;
|
|
55396
|
-
GuestToggle.Input =
|
|
55396
|
+
GuestToggle.Input = SelectionIndicator;
|
|
55397
55397
|
GuestToggle.Label = GuestToggleLabel;
|
|
55398
55398
|
Guests.Guest = Guest;
|
|
55399
55399
|
|
|
@@ -55481,9 +55481,12 @@ var Option4 = ({ children, className, ...internal }) => {
|
|
|
55481
55481
|
}, /* @__PURE__ */ React172.createElement(RadioButton, {
|
|
55482
55482
|
ref: radioRef,
|
|
55483
55483
|
className: radioClassName
|
|
55484
|
-
},
|
|
55484
|
+
}, ({ isSelected, isHovered }) => /* @__PURE__ */ React172.createElement(React172.Fragment, null, applyInternalProps(controlElement, {
|
|
55485
|
+
isSelected,
|
|
55486
|
+
isHovered
|
|
55487
|
+
}), applyInternalProps(labelElement, {
|
|
55485
55488
|
label
|
|
55486
|
-
}))), isOther && isThisOptionSelected && otherInputElement);
|
|
55489
|
+
})))), isOther && isThisOptionSelected && otherInputElement);
|
|
55487
55490
|
};
|
|
55488
55491
|
var OptionLabel2 = ({ className, ...internal }) => {
|
|
55489
55492
|
const { label } = internal;
|
|
@@ -55494,12 +55497,6 @@ var OptionLabel2 = ({ className, ...internal }) => {
|
|
|
55494
55497
|
var OptionInput = (_props) => {
|
|
55495
55498
|
return null;
|
|
55496
55499
|
};
|
|
55497
|
-
var OptionControl = ({ className }) => {
|
|
55498
|
-
return /* @__PURE__ */ React172.createElement("div", {
|
|
55499
|
-
"aria-hidden": "true",
|
|
55500
|
-
className
|
|
55501
|
-
});
|
|
55502
|
-
};
|
|
55503
55500
|
var OptionOtherInput = ({ className }) => {
|
|
55504
55501
|
const { value: fieldValue, onChange, addOtherLabel, addOtherPlaceholder, otherInputCharacterLimit, disabled, readOnly, options } = useFieldPropsV2();
|
|
55505
55502
|
const { t } = useTranslation2();
|
|
@@ -55543,7 +55540,7 @@ var OptionOtherInput = ({ className }) => {
|
|
|
55543
55540
|
};
|
|
55544
55541
|
Option4.Label = OptionLabel2;
|
|
55545
55542
|
Option4.Input = OptionInput;
|
|
55546
|
-
Option4.Control =
|
|
55543
|
+
Option4.Control = SelectionIndicator;
|
|
55547
55544
|
Option4.OtherInput = OptionOtherInput;
|
|
55548
55545
|
RadioGroup.Label = Label;
|
|
55549
55546
|
RadioGroup.Options = Options4;
|
|
@@ -56120,12 +56117,13 @@ var OptionImage = ({ className, ...internal }) => {
|
|
|
56120
56117
|
const { option: option2 } = internal;
|
|
56121
56118
|
const { choiceImageResize, choiceImageAlignment } = useFieldPropsV2();
|
|
56122
56119
|
const image = option2.media?.image;
|
|
56123
|
-
|
|
56124
|
-
|
|
56125
|
-
|
|
56126
|
-
|
|
56127
|
-
|
|
56128
|
-
|
|
56120
|
+
const imageURL = image && getImageURL(image, image.width, image.height);
|
|
56121
|
+
if (!image || !imageURL) {
|
|
56122
|
+
return /* @__PURE__ */ React172.createElement("div", {
|
|
56123
|
+
className,
|
|
56124
|
+
"data-placeholder": true,
|
|
56125
|
+
"data-hook": "image-choice-option-image"
|
|
56126
|
+
});
|
|
56129
56127
|
}
|
|
56130
56128
|
const imageAlt = option2.media?.altText || option2.altText || image.altText || "";
|
|
56131
56129
|
return /* @__PURE__ */ React172.createElement("img", {
|
|
@@ -59645,7 +59643,7 @@ var OptionQuantity = ({ className, ...internal }) => {
|
|
|
59645
59643
|
ProductOption.Image = OptionImage2;
|
|
59646
59644
|
ProductOption.Label = OptionLabel4;
|
|
59647
59645
|
ProductOption.Price = OptionPrice;
|
|
59648
|
-
ProductOption.Input =
|
|
59646
|
+
ProductOption.Input = SelectionIndicator;
|
|
59649
59647
|
ProductOption.Quantity = OptionQuantity;
|
|
59650
59648
|
Options11.Option = ProductOption;
|
|
59651
59649
|
ProductList.Label = Label;
|