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