@wix/form-public 0.484.0 → 0.485.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 CHANGED
@@ -54958,11 +54958,23 @@ var Control3 = ({ children, className, ...internal }) => {
54958
54958
  className,
54959
54959
  "data-invalid": hasError
54960
54960
  }, optionsElement ? applyInternalProps(optionsElement, {
54961
- productsById,
54962
- addOther,
54963
- customAmountProductId,
54964
- t
54965
- }) : null, otherInputElement && addOther ? applyInternalProps(otherInputElement, {
54961
+ productsById
54962
+ }) : null, addOther && customAmountProductId && /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.RadioField, {
54963
+ value: customAmountProductId,
54964
+ style: {
54965
+ position: "absolute",
54966
+ width: "1px",
54967
+ height: "1px",
54968
+ padding: "0",
54969
+ margin: "-1px",
54970
+ overflow: "hidden",
54971
+ clip: "rect(0, 0, 0, 0)",
54972
+ whiteSpace: "nowrap",
54973
+ border: "0"
54974
+ }
54975
+ }, /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.RadioButton, {
54976
+ "aria-label": t("donation.other-option.label", "Custom amount")
54977
+ }, t("donation.other-option.label", "Custom amount"))), otherInputElement && addOther ? applyInternalProps(otherInputElement, {
54966
54978
  customAmount,
54967
54979
  onCustomAmountInputChange,
54968
54980
  currency,
@@ -54973,7 +54985,7 @@ var Control3 = ({ children, className, ...internal }) => {
54973
54985
  }) : null);
54974
54986
  };
54975
54987
  var Options2 = ({ children, className, ...internal }) => {
54976
- const { productsById, addOther, customAmountProductId, t } = internal;
54988
+ const { productsById } = internal;
54977
54989
  const { options, numberOfColumns } = useFieldPropsV2();
54978
54990
  const { isMobile: isMobile2 } = useConfig();
54979
54991
  const optionElement = findChildOfType(children, Options2.Option);
@@ -54989,22 +55001,7 @@ var Options2 = ({ children, className, ...internal }) => {
54989
55001
  value: option2.value,
54990
55002
  price: price || "0"
54991
55003
  });
54992
- }), addOther && customAmountProductId && /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.RadioField, {
54993
- value: customAmountProductId,
54994
- style: {
54995
- position: "absolute",
54996
- width: "1px",
54997
- height: "1px",
54998
- padding: "0",
54999
- margin: "-1px",
55000
- overflow: "hidden",
55001
- clip: "rect(0, 0, 0, 0)",
55002
- whiteSpace: "nowrap",
55003
- border: "0"
55004
- }
55005
- }, /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.RadioButton, {
55006
- "aria-label": t("donation.other-option.label", "Custom amount")
55007
- }, t("donation.other-option.label", "Custom amount"))));
55004
+ }));
55008
55005
  };
55009
55006
  var Option2 = ({ children, className, ...internal }) => {
55010
55007
  const { value, price } = internal;
@@ -55072,23 +55069,24 @@ var OtherInput2 = ({ children, className, ...internal }) => {
55072
55069
  }, [
55073
55070
  onFocusCustomInput
55074
55071
  ]);
55075
- const hasValue = customAmount && customAmount.trim() !== "";
55076
55072
  return /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.TextField, {
55077
55073
  "aria-labelledby": `${labelId} ${prefixId}`,
55078
55074
  value: customAmount,
55079
55075
  onChange: handleChange,
55080
55076
  onFocus: handleFocus,
55081
55077
  isDisabled: disabled,
55082
- isInvalid: hasError,
55078
+ isInvalid: hasError
55079
+ }, /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.Group, {
55083
55080
  className,
55084
- "data-selected": hasValue ? "true" : void 0
55081
+ isDisabled: disabled,
55082
+ isInvalid: hasError
55085
55083
  }, customAmount && currency && currencyElement ? applyInternalProps(currencyElement, {
55086
55084
  currency,
55087
55085
  t
55088
55086
  }) : null, valueElement ? applyInternalProps(valueElement, {
55089
55087
  placeholder,
55090
55088
  customAmountProductId
55091
- }) : null);
55089
+ }) : null));
55092
55090
  };
55093
55091
  var OtherInputCurrency = ({ className, ...internal }) => {
55094
55092
  const { currency, t } = internal;