@wix/form-public 0.474.0 → 0.475.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 +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -56643,10 +56643,20 @@ var injectRequiredIndicator = (label, placement, indicatorNode) => {
|
|
|
56643
56643
|
}
|
|
56644
56644
|
return result2;
|
|
56645
56645
|
};
|
|
56646
|
+
var stopLinkEventPropagation = (event) => {
|
|
56647
|
+
if (event.target instanceof Element && event.target.closest("a")) {
|
|
56648
|
+
event.stopPropagation();
|
|
56649
|
+
}
|
|
56650
|
+
};
|
|
56651
|
+
var LINK_EVENT_HANDLERS = {
|
|
56652
|
+
onPointerDown: stopLinkEventPropagation,
|
|
56653
|
+
onMouseDown: stopLinkEventPropagation,
|
|
56654
|
+
onClick: stopLinkEventPropagation
|
|
56655
|
+
};
|
|
56646
56656
|
var RichTextLabel = ({ className, requiredClassName, theme, children, ...internal }) => {
|
|
56647
56657
|
const { requiredIndicatorHidden = false } = internal;
|
|
56648
56658
|
const fieldProps = useFieldPropsV2();
|
|
56649
|
-
const { label, required = false, requiredIndicatorType = RequiredIndicator$1.ASTERISK, requiredIndicatorPlacement = RequiredIndicatorPlacement$1.AFTER_FIELD_TITLE } = fieldProps;
|
|
56659
|
+
const { label, required = false, disabled = false, requiredIndicatorType = RequiredIndicator$1.ASTERISK, requiredIndicatorPlacement = RequiredIndicatorPlacement$1.AFTER_FIELD_TITLE } = fieldProps;
|
|
56650
56660
|
const { t } = useTranslation2();
|
|
56651
56661
|
const { language } = useConfig();
|
|
56652
56662
|
const labelWithIndicator = useMemo(() => {
|
|
@@ -56665,7 +56675,8 @@ var RichTextLabel = ({ className, requiredClassName, theme, children, ...interna
|
|
|
56665
56675
|
requiredClassName
|
|
56666
56676
|
]);
|
|
56667
56677
|
return /* @__PURE__ */ React171.createElement("div", {
|
|
56668
|
-
className
|
|
56678
|
+
className,
|
|
56679
|
+
...disabled ? {} : LINK_EVENT_HANDLERS
|
|
56669
56680
|
}, children({
|
|
56670
56681
|
content: labelWithIndicator,
|
|
56671
56682
|
locale: language,
|