@bigbinary/neeto-form-frontend 4.4.62 → 4.4.64

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.
@@ -18,7 +18,7 @@ import { I18nextProvider, useTranslation } from 'react-i18next';
18
18
  import { d as usePublicForm, g as useCreateSubmission, h as useUpdateSubmission, f as useSubmission, Q as QUERY_KEYS } from './useFormApi-BZtUzxW_.js';
19
19
  import { g as getComponentDisplayName } from './index-DsDXFqPW.js';
20
20
  import { jsx, jsxs } from 'react/jsx-runtime';
21
- import { d as clientI18nInstance, e as getWithExpiry, f as clearEmailVerificationDetails, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, r as renderButtonsInOrder, m as mergeRefs, c as generateInitValues, h as generateFormResponse, i as clearLocalStorageValues } from './utils-BsydubqS.js';
21
+ import { d as clientI18nInstance, e as getWithExpiry, f as clearEmailVerificationDetails, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, r as renderButtonsInOrder, m as mergeRefs, c as generateInitValues, h as generateFormResponse, i as clearLocalStorageValues } from './utils-DIJEwwvP.js';
22
22
  import { i as isBlank, C as CALLOUT_POSITIONS, b as CALLOUT_STYLES, L as LAST_ELEMENTS_THRESHOLD, Q as QUESTION_KIND, p as parseServerError } from './yup-BRPSFuNj.js';
23
23
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
24
24
  import { withT } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
@@ -10,7 +10,7 @@ import PageLoader from '@bigbinary/neeto-molecules/v2/PageLoader';
10
10
  import { mergeLeft, map, filter, pluck, isEmpty } from 'ramda';
11
11
  import { useTranslation } from 'react-i18next';
12
12
  import { d as usePublicForm } from './useFormApi-BZtUzxW_.js';
13
- import { b as buildDateQueryParameters, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, m as mergeRefs, c as generateInitValues } from './utils-BsydubqS.js';
13
+ import { b as buildDateQueryParameters, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, m as mergeRefs, c as generateInitValues } from './utils-DIJEwwvP.js';
14
14
  import { parsePhoneNumber } from 'libphonenumber-js';
15
15
  import { Q as QUESTION_KIND, a as QUESTIONS_WITHOUT_FIELD_CODE } from './yup-BRPSFuNj.js';
16
16
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
package/dist/v2/index.js CHANGED
@@ -50,7 +50,7 @@ import '@babel/runtime/regenerator';
50
50
  import '@bigbinary/neeto-molecules/v2/HelpPopover';
51
51
  import '@bigbinary/neeto-hotkeys';
52
52
  import '@bigbinary/neeto-molecules/v2/PageLoader';
53
- import './utils-BsydubqS.js';
53
+ import './utils-DIJEwwvP.js';
54
54
  import 'libphonenumber-js';
55
55
  import '@bigbinary/neeto-editor-frontend/v2/EditorContent';
56
56
  import '@bigbinary/neeto-molecules/v2/PhoneNumber';
@@ -1550,7 +1550,6 @@ var ResendVerificationCode = function ResendVerificationCode(_ref) {
1550
1550
  button: /*#__PURE__*/jsx(Button, {
1551
1551
  "data-testid": "otp-resend-button",
1552
1552
  disabled: isResendDisabled,
1553
- size: "sm",
1554
1553
  variant: "link",
1555
1554
  onClick: handleResendClick
1556
1555
  })
@@ -2183,7 +2182,15 @@ var Choices$1 = function Choices(_ref) {
2183
2182
  handleChoiceValueChange("");
2184
2183
  };
2185
2184
  var handleChoiceCardClick = function handleChoiceCardClick(event, option, index, isChecked) {
2186
- var clickedOutsideControl = !event.target.closest("[data-slot='field']");
2185
+ // Radix re-dispatches an untrusted, bubbling click from its hidden input
2186
+ // whenever a radio/checkbox's checked state changes. Treating that as a
2187
+ // card click toggles the value again, which fires another one — an
2188
+ // infinite update loop. Only react to real user clicks.
2189
+ if (!event.nativeEvent.isTrusted) return;
2190
+
2191
+ // atoms RadioGroup.Item has no `field` wrapper (Checkbox does), so match
2192
+ // the radio button and its label explicitly.
2193
+ var clickedOutsideControl = !event.target.closest("[data-slot='field'], [role='radio'], label");
2187
2194
  if (!disabled && clickedOutsideControl) {
2188
2195
  if (isCheckBox) {
2189
2196
  onChange({
@@ -2268,11 +2275,6 @@ var Choices$1 = function Choices(_ref) {
2268
2275
  id: option.id,
2269
2276
  label: option.label,
2270
2277
  value: option.id,
2271
- labelProps: {
2272
- className: classnames({
2273
- "cursor-not-allowed": disabled
2274
- })
2275
- },
2276
2278
  onKeyDown: function onKeyDown(event) {
2277
2279
  return handleChoiceKeyDown(event, option.id);
2278
2280
  }
@@ -2976,4 +2978,4 @@ var getVisibleOptions = function getVisibleOptions(options) {
2976
2978
  };
2977
2979
 
2978
2980
  export { FormikWrap as F, buildAutoCompleteAttribute as a, buildDateQueryParameters as b, generateInitValues as c, clientI18nInstance$1 as d, getWithExpiry as e, clearEmailVerificationDetails as f, getFieldComponent as g, generateFormResponse as h, clearLocalStorageValues as i, mergeRefs as m, renderButtonsInOrder as r };
2979
- //# sourceMappingURL=utils-BsydubqS.js.map
2981
+ //# sourceMappingURL=utils-DIJEwwvP.js.map