labellife-design-tool 2.3.1 → 2.3.4

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/esm/index.js CHANGED
@@ -7134,46 +7134,50 @@ var InputFieldsPanelContent = observer(function (_ref3) {
7134
7134
  _useState22 = _slicedToArray(_useState21, 2),
7135
7135
  radioOptions = _useState22[0],
7136
7136
  setRadioOptions = _useState22[1];
7137
- var _useState23 = useState(''),
7137
+ var _useState23 = useState(false),
7138
7138
  _useState24 = _slicedToArray(_useState23, 2),
7139
- listPrompt = _useState24[0],
7140
- setListPrompt = _useState24[1];
7141
- var _useState25 = useState(0),
7139
+ radioAllowCustom = _useState24[0],
7140
+ setRadioAllowCustom = _useState24[1];
7141
+ var _useState25 = useState(''),
7142
7142
  _useState26 = _slicedToArray(_useState25, 2),
7143
- listMinSelections = _useState26[0],
7144
- setListMinSelections = _useState26[1];
7145
- var _useState27 = useState(2),
7143
+ listPrompt = _useState26[0],
7144
+ setListPrompt = _useState26[1];
7145
+ var _useState27 = useState(0),
7146
7146
  _useState28 = _slicedToArray(_useState27, 2),
7147
- listMaxSelections = _useState28[0],
7148
- setListMaxSelections = _useState28[1];
7149
- var _useState29 = useState(['Option 1', 'Option 2']),
7147
+ listMinSelections = _useState28[0],
7148
+ setListMinSelections = _useState28[1];
7149
+ var _useState29 = useState(2),
7150
7150
  _useState30 = _slicedToArray(_useState29, 2),
7151
- listOptions = _useState30[0],
7152
- setListOptions = _useState30[1];
7153
- var _useState31 = useState(false),
7151
+ listMaxSelections = _useState30[0],
7152
+ setListMaxSelections = _useState30[1];
7153
+ var _useState31 = useState(['Option 1', 'Option 2']),
7154
7154
  _useState32 = _slicedToArray(_useState31, 2),
7155
- textRemoveIfSkipped = _useState32[0],
7156
- setTextRemoveIfSkipped = _useState32[1];
7155
+ listOptions = _useState32[0],
7156
+ setListOptions = _useState32[1];
7157
7157
  var _useState33 = useState(false),
7158
7158
  _useState34 = _slicedToArray(_useState33, 2),
7159
- dateRemoveIfSkipped = _useState34[0],
7160
- setDateRemoveIfSkipped = _useState34[1];
7159
+ textRemoveIfSkipped = _useState34[0],
7160
+ setTextRemoveIfSkipped = _useState34[1];
7161
7161
  var _useState35 = useState(false),
7162
7162
  _useState36 = _slicedToArray(_useState35, 2),
7163
- integerRemoveIfSkipped = _useState36[0],
7164
- setIntegerRemoveIfSkipped = _useState36[1];
7163
+ dateRemoveIfSkipped = _useState36[0],
7164
+ setDateRemoveIfSkipped = _useState36[1];
7165
7165
  var _useState37 = useState(false),
7166
7166
  _useState38 = _slicedToArray(_useState37, 2),
7167
- imageRemoveIfSkipped = _useState38[0],
7168
- setImageRemoveIfSkipped = _useState38[1];
7167
+ integerRemoveIfSkipped = _useState38[0],
7168
+ setIntegerRemoveIfSkipped = _useState38[1];
7169
7169
  var _useState39 = useState(false),
7170
7170
  _useState40 = _slicedToArray(_useState39, 2),
7171
- radioRemoveIfSkipped = _useState40[0],
7172
- setRadioRemoveIfSkipped = _useState40[1];
7171
+ imageRemoveIfSkipped = _useState40[0],
7172
+ setImageRemoveIfSkipped = _useState40[1];
7173
7173
  var _useState41 = useState(false),
7174
7174
  _useState42 = _slicedToArray(_useState41, 2),
7175
- listRemoveIfSkipped = _useState42[0],
7176
- setListRemoveIfSkipped = _useState42[1];
7175
+ radioRemoveIfSkipped = _useState42[0],
7176
+ setRadioRemoveIfSkipped = _useState42[1];
7177
+ var _useState43 = useState(false),
7178
+ _useState44 = _slicedToArray(_useState43, 2),
7179
+ listRemoveIfSkipped = _useState44[0],
7180
+ setListRemoveIfSkipped = _useState44[1];
7177
7181
  var addInputElement = function addInputElement(inputType) {
7178
7182
  var extra = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7179
7183
  var page = store.activePage;
@@ -7245,7 +7249,7 @@ var InputFieldsPanelContent = observer(function (_ref3) {
7245
7249
  fontFamily: 'Roboto',
7246
7250
  align: 'center',
7247
7251
  fill: '#333333',
7248
- custom: _objectSpread2(_objectSpread2(_objectSpread2({
7252
+ custom: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
7249
7253
  inputField: true,
7250
7254
  inputType: inputType,
7251
7255
  placeholder: placeholder,
@@ -7256,6 +7260,8 @@ var InputFieldsPanelContent = observer(function (_ref3) {
7256
7260
  dateFormat: extra.dateFormat || 'MM-DD-YYYY'
7257
7261
  } : {}), ['radio', 'list'].includes(inputType) ? {
7258
7262
  options: (extra.options || []).filter(Boolean)
7263
+ } : {}), inputType === 'radio' ? {
7264
+ allowCustomValue: extra.allowCustomValue || false
7259
7265
  } : {}), inputType === 'list' ? {
7260
7266
  minSelections: extra.minSelections || 0,
7261
7267
  maxSelections: extra.maxSelections || 0
@@ -7583,7 +7589,8 @@ var InputFieldsPanelContent = observer(function (_ref3) {
7583
7589
  promptText: radioPrompt,
7584
7590
  required: radioRequired,
7585
7591
  options: radioOptions,
7586
- removeIfSkipped: radioRemoveIfSkipped
7592
+ removeIfSkipped: radioRemoveIfSkipped,
7593
+ allowCustomValue: radioAllowCustom
7587
7594
  });
7588
7595
  }
7589
7596
  }), /*#__PURE__*/jsx(TextField, {
@@ -7635,6 +7642,23 @@ var InputFieldsPanelContent = observer(function (_ref3) {
7635
7642
  sx: {
7636
7643
  ml: 5.5
7637
7644
  }
7645
+ }), /*#__PURE__*/jsx(FormControlLabel, {
7646
+ control: /*#__PURE__*/jsx(Checkbox, {
7647
+ size: "small",
7648
+ checked: radioAllowCustom,
7649
+ onChange: function onChange(e) {
7650
+ return setRadioAllowCustom(e.target.checked);
7651
+ }
7652
+ }),
7653
+ label: /*#__PURE__*/jsx(Typography, {
7654
+ sx: {
7655
+ fontSize: 12
7656
+ },
7657
+ children: t('sidePanel.inputFields.allowCustomValue', 'Allow "Other" (custom input)')
7658
+ }),
7659
+ sx: {
7660
+ ml: 5.5
7661
+ }
7638
7662
  }), /*#__PURE__*/jsx(OptionsEditor, {
7639
7663
  options: radioOptions,
7640
7664
  onChange: setRadioOptions
@@ -7772,34 +7796,38 @@ var InputFieldsPanelContent = observer(function (_ref3) {
7772
7796
  var MarkAsVariableForm = observer(function (_ref4) {
7773
7797
  var _selectedElement$cust;
7774
7798
  var store = _ref4.store;
7775
- var _useState43 = useState(''),
7776
- _useState44 = _slicedToArray(_useState43, 2),
7777
- markLabel = _useState44[0],
7778
- setMarkLabel = _useState44[1];
7779
- var _useState45 = useState(false),
7799
+ var _useState45 = useState(''),
7780
7800
  _useState46 = _slicedToArray(_useState45, 2),
7781
- markRequired = _useState46[0],
7782
- setMarkRequired = _useState46[1];
7783
- var _useState47 = useState('text'),
7801
+ markLabel = _useState46[0],
7802
+ setMarkLabel = _useState46[1];
7803
+ var _useState47 = useState(false),
7784
7804
  _useState48 = _slicedToArray(_useState47, 2),
7785
- markInputType = _useState48[0],
7786
- setMarkInputType = _useState48[1];
7787
- var _useState49 = useState(['Option 1', 'Option 2']),
7805
+ markRequired = _useState48[0],
7806
+ setMarkRequired = _useState48[1];
7807
+ var _useState49 = useState('text'),
7788
7808
  _useState50 = _slicedToArray(_useState49, 2),
7789
- markOptions = _useState50[0],
7790
- setMarkOptions = _useState50[1];
7791
- var _useState51 = useState(0),
7809
+ markInputType = _useState50[0],
7810
+ setMarkInputType = _useState50[1];
7811
+ var _useState51 = useState(['Option 1', 'Option 2']),
7792
7812
  _useState52 = _slicedToArray(_useState51, 2),
7793
- markMinSelections = _useState52[0],
7794
- setMarkMinSelections = _useState52[1];
7795
- var _useState53 = useState(2),
7813
+ markOptions = _useState52[0],
7814
+ setMarkOptions = _useState52[1];
7815
+ var _useState53 = useState(0),
7796
7816
  _useState54 = _slicedToArray(_useState53, 2),
7797
- markMaxSelections = _useState54[0],
7798
- setMarkMaxSelections = _useState54[1];
7799
- var _useState55 = useState(false),
7817
+ markMinSelections = _useState54[0],
7818
+ setMarkMinSelections = _useState54[1];
7819
+ var _useState55 = useState(2),
7800
7820
  _useState56 = _slicedToArray(_useState55, 2),
7801
- markRemoveIfSkipped = _useState56[0],
7802
- setMarkRemoveIfSkipped = _useState56[1];
7821
+ markMaxSelections = _useState56[0],
7822
+ setMarkMaxSelections = _useState56[1];
7823
+ var _useState57 = useState(false),
7824
+ _useState58 = _slicedToArray(_useState57, 2),
7825
+ markRemoveIfSkipped = _useState58[0],
7826
+ setMarkRemoveIfSkipped = _useState58[1];
7827
+ var _useState59 = useState(false),
7828
+ _useState60 = _slicedToArray(_useState59, 2),
7829
+ markAllowCustom = _useState60[0],
7830
+ setMarkAllowCustom = _useState60[1];
7803
7831
  var selectedIds = store.selectedElementsIds || [];
7804
7832
  var selectedElement = selectedIds.length === 1 ? store.getElementById(selectedIds[0]) : null;
7805
7833
  var isImageElement = (selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.type) === 'image';
@@ -7808,7 +7836,7 @@ var MarkAsVariableForm = observer(function (_ref4) {
7808
7836
  var isAlreadyVariable = !!(selectedElement !== null && selectedElement !== void 0 && (_selectedElement$cust = selectedElement.custom) !== null && _selectedElement$cust !== void 0 && _selectedElement$cust.inputField);
7809
7837
  useEffect(function () {
7810
7838
  if (selectedElement && isSupportedElement) {
7811
- var _selectedElement$cust2, _selectedElement$cust3, _selectedElement$cust4, _selectedElement$cust5, _selectedElement$cust6, _selectedElement$cust7, _selectedElement$cust8;
7839
+ var _selectedElement$cust2, _selectedElement$cust3, _selectedElement$cust4, _selectedElement$cust5, _selectedElement$cust6, _selectedElement$cust7, _selectedElement$cust8, _selectedElement$cust9;
7812
7840
  setMarkLabel(((_selectedElement$cust2 = selectedElement.custom) === null || _selectedElement$cust2 === void 0 ? void 0 : _selectedElement$cust2.promptText) || '');
7813
7841
  setMarkRequired(!!((_selectedElement$cust3 = selectedElement.custom) !== null && _selectedElement$cust3 !== void 0 && _selectedElement$cust3.required));
7814
7842
  setMarkInputType(isImageElement ? 'image' : ((_selectedElement$cust4 = selectedElement.custom) === null || _selectedElement$cust4 === void 0 ? void 0 : _selectedElement$cust4.inputType) || 'text');
@@ -7816,6 +7844,7 @@ var MarkAsVariableForm = observer(function (_ref4) {
7816
7844
  setMarkMinSelections(((_selectedElement$cust6 = selectedElement.custom) === null || _selectedElement$cust6 === void 0 ? void 0 : _selectedElement$cust6.minSelections) || 0);
7817
7845
  setMarkMaxSelections(((_selectedElement$cust7 = selectedElement.custom) === null || _selectedElement$cust7 === void 0 ? void 0 : _selectedElement$cust7.maxSelections) || 2);
7818
7846
  setMarkRemoveIfSkipped(!!((_selectedElement$cust8 = selectedElement.custom) !== null && _selectedElement$cust8 !== void 0 && _selectedElement$cust8.removeIfSkipped));
7847
+ setMarkAllowCustom(!!((_selectedElement$cust9 = selectedElement.custom) !== null && _selectedElement$cust9 !== void 0 && _selectedElement$cust9.allowCustomValue));
7819
7848
  } else {
7820
7849
  setMarkLabel('');
7821
7850
  setMarkRequired(false);
@@ -7824,13 +7853,14 @@ var MarkAsVariableForm = observer(function (_ref4) {
7824
7853
  setMarkMinSelections(0);
7825
7854
  setMarkMaxSelections(2);
7826
7855
  setMarkRemoveIfSkipped(false);
7856
+ setMarkAllowCustom(false);
7827
7857
  }
7828
7858
  }, [selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.id]);
7829
7859
  var handleMark = function handleMark() {
7830
7860
  if (!selectedElement || !markLabel.trim()) return;
7831
7861
  var effectiveType = isImageElement ? 'image' : markInputType;
7832
7862
  selectedElement.set({
7833
- custom: _objectSpread2(_objectSpread2(_objectSpread2({}, selectedElement.custom), {}, {
7863
+ custom: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, selectedElement.custom), {}, {
7834
7864
  inputField: true,
7835
7865
  promptText: markLabel.trim(),
7836
7866
  inputType: effectiveType,
@@ -7838,6 +7868,8 @@ var MarkAsVariableForm = observer(function (_ref4) {
7838
7868
  removeIfSkipped: !markRequired && markRemoveIfSkipped
7839
7869
  }, ['radio', 'list'].includes(effectiveType) ? {
7840
7870
  options: markOptions.filter(Boolean)
7871
+ } : {}), effectiveType === 'radio' ? {
7872
+ allowCustomValue: markAllowCustom
7841
7873
  } : {}), effectiveType === 'list' ? {
7842
7874
  minSelections: markMinSelections,
7843
7875
  maxSelections: markMaxSelections
@@ -8008,6 +8040,20 @@ var MarkAsVariableForm = observer(function (_ref4) {
8008
8040
  options: markOptions,
8009
8041
  onChange: setMarkOptions
8010
8042
  })]
8043
+ }), isTextElement && markInputType === 'radio' && /*#__PURE__*/jsx(FormControlLabel, {
8044
+ control: /*#__PURE__*/jsx(Checkbox, {
8045
+ size: "small",
8046
+ checked: markAllowCustom,
8047
+ onChange: function onChange(e) {
8048
+ return setMarkAllowCustom(e.target.checked);
8049
+ }
8050
+ }),
8051
+ label: /*#__PURE__*/jsx(Typography, {
8052
+ sx: {
8053
+ fontSize: 12
8054
+ },
8055
+ children: t('sidePanel.inputFields.allowCustomValue', 'Allow "Other" (custom input)')
8056
+ })
8011
8057
  }), isTextElement && markInputType === 'list' && /*#__PURE__*/jsxs(Fragment, {
8012
8058
  children: [/*#__PURE__*/jsxs(Box, {
8013
8059
  sx: {
@@ -11094,6 +11140,10 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
11094
11140
  _useState6 = _slicedToArray(_useState5, 2),
11095
11141
  selectedItems = _useState6[0],
11096
11142
  setSelectedItems = _useState6[1];
11143
+ var _useState7 = useState(''),
11144
+ _useState8 = _slicedToArray(_useState7, 2),
11145
+ customRadioValue = _useState8[0],
11146
+ setCustomRadioValue = _useState8[1];
11097
11147
  var config = getInputFieldsConfig();
11098
11148
  var custom = field.custom || {};
11099
11149
  var inputType = custom.inputType || 'text';
@@ -11103,7 +11153,7 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
11103
11153
  var options = custom.options || [];
11104
11154
  var minSelections = custom.minSelections || 0;
11105
11155
  var maxSelections = custom.maxSelections || options.length;
11106
- var isSubmitDisabled = inputType === 'list' ? selectedItems.length < minSelections : isRequired && !value;
11156
+ var isSubmitDisabled = inputType === 'list' ? selectedItems.length < minSelections : isRequired && (!value || value === '__custom__' && !customRadioValue.trim());
11107
11157
  var logoUrl = config.logoUrl || null;
11108
11158
  var headerText = config.headerText || null;
11109
11159
  var accentColor = config.accentColor || '#0d83cd';
@@ -11112,6 +11162,7 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
11112
11162
  setValue('');
11113
11163
  setImagePreview(null);
11114
11164
  setSelectedItems([]);
11165
+ setCustomRadioValue('');
11115
11166
  }, [field.id]);
11116
11167
  var handleImageSelect = function handleImageSelect(e) {
11117
11168
  var _e$target$files;
@@ -11133,6 +11184,8 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
11133
11184
  onSubmit(field.id, formatted);
11134
11185
  } else if (inputType === 'list') {
11135
11186
  onSubmit(field.id, selectedItems.join(', '));
11187
+ } else if (inputType === 'radio' && value === '__custom__') {
11188
+ onSubmit(field.id, customRadioValue.trim());
11136
11189
  } else {
11137
11190
  onSubmit(field.id, value);
11138
11191
  }
@@ -11279,59 +11332,165 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
11279
11332
  })]
11280
11333
  });
11281
11334
  case 'radio':
11282
- return /*#__PURE__*/jsx(RadioGroup, {
11283
- value: value,
11284
- onChange: function onChange(e) {
11285
- return setValue(e.target.value);
11286
- },
11287
- sx: {
11288
- mt: 1,
11289
- gap: 1
11290
- },
11291
- children: options.map(function (opt) {
11292
- return /*#__PURE__*/jsx(FormControlLabel, {
11293
- value: opt,
11294
- control: /*#__PURE__*/jsx(Radio, {
11335
+ {
11336
+ var allowCustomValue = custom.allowCustomValue || false;
11337
+ var otherSelected = value === '__custom__';
11338
+ return /*#__PURE__*/jsxs(Box, {
11339
+ sx: {
11340
+ mt: 1,
11341
+ flex: 1,
11342
+ minHeight: 0,
11343
+ overflowY: 'auto',
11344
+ pr: 0.5,
11345
+ '&::-webkit-scrollbar': {
11346
+ width: 6
11347
+ },
11348
+ '&::-webkit-scrollbar-track': {
11349
+ background: 'transparent'
11350
+ },
11351
+ '&::-webkit-scrollbar-thumb': {
11352
+ background: '#d0d5dd',
11353
+ borderRadius: 3
11354
+ },
11355
+ '&::-webkit-scrollbar-thumb:hover': {
11356
+ background: '#aaa'
11357
+ }
11358
+ },
11359
+ children: [/*#__PURE__*/jsxs(RadioGroup, {
11360
+ value: value,
11361
+ onChange: function onChange(e) {
11362
+ return setValue(e.target.value);
11363
+ },
11364
+ sx: {
11365
+ gap: 1
11366
+ },
11367
+ children: [options.map(function (opt) {
11368
+ return /*#__PURE__*/jsx(FormControlLabel, {
11369
+ value: opt,
11370
+ control: /*#__PURE__*/jsx(Radio, {
11371
+ sx: {
11372
+ color: '#d0d5dd',
11373
+ '&.Mui-checked': {
11374
+ color: accentColor
11375
+ }
11376
+ }
11377
+ }),
11378
+ label: /*#__PURE__*/jsx(Typography, {
11379
+ sx: {
11380
+ fontSize: 18
11381
+ },
11382
+ children: opt
11383
+ }),
11384
+ sx: {
11385
+ m: 0,
11386
+ border: '1px solid',
11387
+ borderColor: value === opt ? accentColor : '#d0d5dd',
11388
+ borderRadius: '8px',
11389
+ px: 2,
11390
+ py: 0.75,
11391
+ transition: 'all 0.15s ease',
11392
+ backgroundColor: value === opt ? 'rgba(13,131,205,0.04)' : 'transparent',
11393
+ '&:hover': {
11394
+ borderColor: accentColor,
11395
+ backgroundColor: 'rgba(13,131,205,0.03)'
11396
+ }
11397
+ }
11398
+ }, opt);
11399
+ }), allowCustomValue && /*#__PURE__*/jsx(FormControlLabel, {
11400
+ value: "__custom__",
11401
+ control: /*#__PURE__*/jsx(Radio, {
11402
+ sx: {
11403
+ color: '#d0d5dd',
11404
+ '&.Mui-checked': {
11405
+ color: accentColor
11406
+ }
11407
+ }
11408
+ }),
11409
+ label: /*#__PURE__*/jsx(Typography, {
11410
+ sx: {
11411
+ fontSize: 18
11412
+ },
11413
+ children: t('inputFieldsDialog.other', 'Other')
11414
+ }),
11295
11415
  sx: {
11296
- color: '#d0d5dd',
11297
- '&.Mui-checked': {
11298
- color: accentColor
11416
+ m: 0,
11417
+ border: '1px solid',
11418
+ borderColor: otherSelected ? accentColor : '#d0d5dd',
11419
+ borderRadius: otherSelected ? '8px 8px 0 0' : '8px',
11420
+ borderBottom: otherSelected ? 'none' : undefined,
11421
+ px: 2,
11422
+ py: 0.75,
11423
+ transition: 'border-color 0.15s ease, border-radius 0.15s ease',
11424
+ backgroundColor: otherSelected ? 'rgba(13,131,205,0.04)' : 'transparent',
11425
+ '&:hover': {
11426
+ borderColor: accentColor,
11427
+ backgroundColor: 'rgba(13,131,205,0.03)'
11299
11428
  }
11300
11429
  }
11301
- }),
11302
- label: /*#__PURE__*/jsx(Typography, {
11303
- sx: {
11304
- fontSize: 18
11305
- },
11306
- children: opt
11307
- }),
11430
+ })]
11431
+ }), allowCustomValue && otherSelected && /*#__PURE__*/jsx(TextField, {
11432
+ autoFocus: true,
11433
+ fullWidth: true,
11434
+ value: customRadioValue,
11435
+ onChange: function onChange(e) {
11436
+ return setCustomRadioValue(e.target.value);
11437
+ },
11438
+ onKeyDown: function onKeyDown(e) {
11439
+ if (e.key === 'Enter' && customRadioValue.trim()) handleSubmit();
11440
+ },
11441
+ placeholder: t('inputFieldsDialog.otherPlaceholder', 'Type your answer…'),
11308
11442
  sx: {
11309
- m: 0,
11310
- border: '1px solid',
11311
- borderColor: value === opt ? accentColor : '#d0d5dd',
11312
- borderRadius: '8px',
11313
- px: 2,
11314
- py: 0.75,
11315
- transition: 'all 0.15s ease',
11316
- backgroundColor: value === opt ? 'rgba(13,131,205,0.04)' : 'transparent',
11317
- '&:hover': {
11318
- borderColor: accentColor,
11319
- backgroundColor: 'rgba(13,131,205,0.03)'
11443
+ '& .MuiOutlinedInput-root': {
11444
+ borderRadius: '0 0 8px 8px',
11445
+ fontSize: 18,
11446
+ '& fieldset': {
11447
+ borderColor: accentColor,
11448
+ borderTopColor: 'transparent'
11449
+ },
11450
+ '&:hover fieldset': {
11451
+ borderColor: accentColor,
11452
+ borderTopColor: 'transparent'
11453
+ },
11454
+ '&.Mui-focused fieldset': {
11455
+ borderColor: accentColor,
11456
+ borderTopColor: 'transparent'
11457
+ }
11320
11458
  }
11321
11459
  }
11322
- }, opt);
11323
- })
11324
- });
11460
+ })]
11461
+ });
11462
+ }
11325
11463
  case 'list':
11326
11464
  {
11327
11465
  var isAtMax = maxSelections > 0 && selectedItems.length >= maxSelections;
11328
11466
  return /*#__PURE__*/jsxs(Box, {
11329
11467
  sx: {
11330
- mt: 1
11468
+ mt: 1,
11469
+ flex: 1,
11470
+ minHeight: 0,
11471
+ display: 'flex',
11472
+ flexDirection: 'column'
11331
11473
  },
11332
11474
  children: [/*#__PURE__*/jsx(FormGroup, {
11333
11475
  sx: {
11334
- gap: 1
11476
+ gap: 1,
11477
+ flex: 1,
11478
+ minHeight: 0,
11479
+ overflowY: 'auto',
11480
+ pr: 0.5,
11481
+ '&::-webkit-scrollbar': {
11482
+ width: 6
11483
+ },
11484
+ '&::-webkit-scrollbar-track': {
11485
+ background: 'transparent'
11486
+ },
11487
+ '&::-webkit-scrollbar-thumb': {
11488
+ background: '#d0d5dd',
11489
+ borderRadius: 3
11490
+ },
11491
+ '&::-webkit-scrollbar-thumb:hover': {
11492
+ background: '#aaa'
11493
+ }
11335
11494
  },
11336
11495
  children: options.map(function (opt) {
11337
11496
  var checked = selectedItems.includes(opt);
@@ -11469,18 +11628,23 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
11469
11628
  sx: {
11470
11629
  flex: 1,
11471
11630
  display: 'flex',
11472
- alignItems: 'center',
11473
- justifyContent: 'center',
11631
+ flexDirection: 'column',
11632
+ overflow: 'hidden',
11474
11633
  p: {
11475
11634
  xs: 3,
11476
11635
  sm: 5
11477
- },
11478
- overflowY: 'auto'
11636
+ }
11479
11637
  },
11480
11638
  children: /*#__PURE__*/jsxs(Box, {
11481
11639
  sx: {
11482
11640
  width: '100%',
11483
- maxWidth: 750
11641
+ maxWidth: 750,
11642
+ mx: 'auto',
11643
+ display: 'flex',
11644
+ flexDirection: 'column',
11645
+ flex: 1,
11646
+ minHeight: 0,
11647
+ justifyContent: 'center'
11484
11648
  },
11485
11649
  children: [/*#__PURE__*/jsx(Typography, {
11486
11650
  sx: {
@@ -11509,7 +11673,8 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
11509
11673
  display: 'flex',
11510
11674
  alignItems: 'center',
11511
11675
  gap: 2,
11512
- mt: 4.5
11676
+ mt: 4.5,
11677
+ flexShrink: 0
11513
11678
  },
11514
11679
  children: [canGoBack && /*#__PURE__*/jsx(Button, {
11515
11680
  variant: "outlined",
@@ -11586,10 +11751,10 @@ var InputFieldsDialog = observer(function (_ref2) {
11586
11751
  backTrigger = _ref2$backTrigger === void 0 ? 0 : _ref2$backTrigger;
11587
11752
  // displayIndex counts how many fields have been answered (for step indicator only).
11588
11753
  // Navigation always uses fields[0] — the first remaining pending field.
11589
- var _useState7 = useState(0),
11590
- _useState8 = _slicedToArray(_useState7, 2),
11591
- displayIndex = _useState8[0],
11592
- setDisplayIndex = _useState8[1];
11754
+ var _useState9 = useState(0),
11755
+ _useState0 = _slicedToArray(_useState9, 2),
11756
+ displayIndex = _useState0[0],
11757
+ setDisplayIndex = _useState0[1];
11593
11758
  var initialTotalRef = useRef(0);
11594
11759
  var completedHistoryRef = useRef([]);
11595
11760
  var removedDueToSkipRef = useRef([]);