@wix/form-public 0.494.0 → 0.496.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
@@ -51620,7 +51620,7 @@ var RichTextLabel = ({ className, requiredClassName, theme, children, ...interna
51620
51620
  htmlAttributesPlugin
51621
51621
  }));
51622
51622
  };
51623
- var CheckboxInput = ({ className, ...internal }) => {
51623
+ var SelectionIndicator = ({ className, ...internal }) => {
51624
51624
  const state = internal;
51625
51625
  return /* @__PURE__ */ React172__default.default.createElement("div", {
51626
51626
  "aria-hidden": "true",
@@ -51675,7 +51675,7 @@ var CheckboxContainer = ({ children, className }) => {
51675
51675
  }), labelElement)));
51676
51676
  };
51677
51677
  CheckboxContainer.RichTextLabel = RichTextLabel;
51678
- CheckboxContainer.Input = CheckboxInput;
51678
+ CheckboxContainer.Input = SelectionIndicator;
51679
51679
  Checkbox.Checkbox = CheckboxContainer;
51680
51680
  Checkbox.Description = Description;
51681
51681
  Checkbox.Error = Error2;
@@ -51877,7 +51877,7 @@ var Checkbox2 = ({ children, className, ...internal }) => {
51877
51877
  }))));
51878
51878
  };
51879
51879
  Checkbox2.Label = OptionLabel;
51880
- Checkbox2.Input = CheckboxInput;
51880
+ Checkbox2.Input = SelectionIndicator;
51881
51881
  var Option = ({ children, ...internal }) => {
51882
51882
  const { value, label, isFirst = false, isOther = false, fieldId } = internal;
51883
51883
  const props2 = useFieldPropsV2();
@@ -55403,7 +55403,7 @@ var Guest = ({ className, ...internal }) => {
55403
55403
  };
55404
55404
  GuestCount.Decrement = GuestCountDecrement;
55405
55405
  GuestCount.Increment = GuestCountIncrement;
55406
- GuestToggle.Input = CheckboxInput;
55406
+ GuestToggle.Input = SelectionIndicator;
55407
55407
  GuestToggle.Label = GuestToggleLabel;
55408
55408
  Guests.Guest = Guest;
55409
55409
 
@@ -55491,9 +55491,12 @@ var Option4 = ({ children, className, ...internal }) => {
55491
55491
  }, /* @__PURE__ */ React172__default.default.createElement(reactAriaComponents.RadioButton, {
55492
55492
  ref: radioRef,
55493
55493
  className: radioClassName
55494
- }, controlElement, applyInternalProps(labelElement, {
55494
+ }, ({ isSelected, isHovered }) => /* @__PURE__ */ React172__default.default.createElement(React172__default.default.Fragment, null, applyInternalProps(controlElement, {
55495
+ isSelected,
55496
+ isHovered
55497
+ }), applyInternalProps(labelElement, {
55495
55498
  label
55496
- }))), isOther && isThisOptionSelected && otherInputElement);
55499
+ })))), isOther && isThisOptionSelected && otherInputElement);
55497
55500
  };
55498
55501
  var OptionLabel2 = ({ className, ...internal }) => {
55499
55502
  const { label } = internal;
@@ -55504,12 +55507,6 @@ var OptionLabel2 = ({ className, ...internal }) => {
55504
55507
  var OptionInput = (_props) => {
55505
55508
  return null;
55506
55509
  };
55507
- var OptionControl = ({ className }) => {
55508
- return /* @__PURE__ */ React172__default.default.createElement("div", {
55509
- "aria-hidden": "true",
55510
- className
55511
- });
55512
- };
55513
55510
  var OptionOtherInput = ({ className }) => {
55514
55511
  const { value: fieldValue, onChange, addOtherLabel, addOtherPlaceholder, otherInputCharacterLimit, disabled, readOnly, options } = useFieldPropsV2();
55515
55512
  const { t } = useTranslation2();
@@ -55553,7 +55550,7 @@ var OptionOtherInput = ({ className }) => {
55553
55550
  };
55554
55551
  Option4.Label = OptionLabel2;
55555
55552
  Option4.Input = OptionInput;
55556
- Option4.Control = OptionControl;
55553
+ Option4.Control = SelectionIndicator;
55557
55554
  Option4.OtherInput = OptionOtherInput;
55558
55555
  RadioGroup.Label = Label;
55559
55556
  RadioGroup.Options = Options4;
@@ -59655,7 +59652,7 @@ var OptionQuantity = ({ className, ...internal }) => {
59655
59652
  ProductOption.Image = OptionImage2;
59656
59653
  ProductOption.Label = OptionLabel4;
59657
59654
  ProductOption.Price = OptionPrice;
59658
- ProductOption.Input = CheckboxInput;
59655
+ ProductOption.Input = SelectionIndicator;
59659
59656
  ProductOption.Quantity = OptionQuantity;
59660
59657
  Options11.Option = ProductOption;
59661
59658
  ProductList.Label = Label;
@@ -59733,20 +59730,21 @@ var visuallyHiddenStyle = {
59733
59730
  };
59734
59731
  var Rating = ({ className, children, ...internal }) => {
59735
59732
  const { value, isSelected, onHoverChange, label } = internal;
59736
- const resolvedClassName = typeof className === "function" ? className({
59737
- isSelected
59738
- }) : className;
59739
59733
  return /* @__PURE__ */ React172__default.default.createElement(reactAriaComponents.RadioField, {
59740
59734
  value
59741
59735
  }, /* @__PURE__ */ React172__default.default.createElement(reactAriaComponents.RadioButton, {
59742
- className: resolvedClassName,
59736
+ className: ({ isHovered }) => typeof className === "function" ? className({
59737
+ isSelected,
59738
+ isHovered
59739
+ }) : className ?? "",
59743
59740
  "data-active": isSelected || void 0,
59744
59741
  onHoverChange
59745
- }, typeof children === "function" ? children({
59746
- isSelected
59742
+ }, ({ isHovered }) => /* @__PURE__ */ React172__default.default.createElement(React172__default.default.Fragment, null, typeof children === "function" ? children({
59743
+ isSelected,
59744
+ isHovered
59747
59745
  }) : children, label ? /* @__PURE__ */ React172__default.default.createElement("span", {
59748
59746
  style: visuallyHiddenStyle
59749
- }, label) : null));
59747
+ }, label) : null)));
59750
59748
  };
59751
59749
  Ratings.Rating = Rating;
59752
59750
  RatingInput.Label = Label;