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