@wix/form-public 0.557.0 → 0.558.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
@@ -52579,7 +52579,7 @@ var LINK_EVENT_HANDLERS = {
52579
52579
  onClick: stopLinkEventPropagation
52580
52580
  };
52581
52581
  var RichTextLabel = ({ className, requiredClassName, theme, children, ...internal }) => {
52582
- const { requiredIndicatorHidden = false } = internal;
52582
+ const { requiredIndicatorHidden = false, leadingElement } = internal;
52583
52583
  const fieldProps = useFieldPropsV2();
52584
52584
  const { label, required = false, disabled = false, requiredIndicatorType = types$1.RequiredIndicator.ASTERISK, requiredIndicatorPlacement = types$1.RequiredIndicatorPlacement.AFTER_FIELD_TITLE } = fieldProps;
52585
52585
  const { t } = useTranslation2();
@@ -52602,7 +52602,7 @@ var RichTextLabel = ({ className, requiredClassName, theme, children, ...interna
52602
52602
  return /* @__PURE__ */ React172__default.default.createElement("div", {
52603
52603
  className,
52604
52604
  ...disabled ? {} : LINK_EVENT_HANDLERS
52605
- }, children({
52605
+ }, leadingElement, children({
52606
52606
  content: labelWithIndicator,
52607
52607
  locale: language,
52608
52608
  htmlAttributesPlugin
@@ -52660,11 +52660,16 @@ var CheckboxContainer = ({ children, className }) => {
52660
52660
  }, /* @__PURE__ */ React172__default.default.createElement(reactAriaComponents.CheckboxButton, {
52661
52661
  ref,
52662
52662
  className
52663
- }, ({ isSelected, isHovered, isFocused }) => /* @__PURE__ */ React172__default.default.createElement(React172__default.default.Fragment, null, applyInternalProps(inputElement, {
52664
- isSelected,
52665
- isHovered,
52666
- isFocused
52667
- }), labelElement)));
52663
+ }, ({ isSelected, isHovered, isFocused }) => {
52664
+ const input = applyInternalProps(inputElement, {
52665
+ isSelected,
52666
+ isHovered,
52667
+ isFocused
52668
+ });
52669
+ return labelElement ? applyInternalProps(labelElement, {
52670
+ leadingElement: input
52671
+ }) : input;
52672
+ }));
52668
52673
  };
52669
52674
  CheckboxContainer.RichTextLabel = RichTextLabel;
52670
52675
  CheckboxContainer.Input = SelectionIndicator;