labellife-design-tool 2.3.6 → 2.3.8

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.
@@ -1893,7 +1893,7 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
1893
1893
  case 'radio':
1894
1894
  {
1895
1895
  var otherSelected = value === '__custom__';
1896
- return /*#__PURE__*/jsxs(Box, {
1896
+ return /*#__PURE__*/jsx(Box, {
1897
1897
  sx: {
1898
1898
  mt: 1,
1899
1899
  flex: 1,
@@ -1914,7 +1914,7 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
1914
1914
  background: '#aaa'
1915
1915
  }
1916
1916
  },
1917
- children: [/*#__PURE__*/jsxs(RadioGroup, {
1917
+ children: /*#__PURE__*/jsxs(RadioGroup, {
1918
1918
  value: value,
1919
1919
  onChange: function onChange(e) {
1920
1920
  return setValue(e.target.value);
@@ -1922,7 +1922,73 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
1922
1922
  sx: {
1923
1923
  gap: 1
1924
1924
  },
1925
- children: [options.map(function (opt) {
1925
+ children: [/*#__PURE__*/jsxs(Box, {
1926
+ sx: {
1927
+ display: 'flex',
1928
+ flexDirection: 'column'
1929
+ },
1930
+ children: [/*#__PURE__*/jsx(FormControlLabel, {
1931
+ value: "__custom__",
1932
+ control: /*#__PURE__*/jsx(Radio, {
1933
+ sx: {
1934
+ color: '#d0d5dd',
1935
+ '&.Mui-checked': {
1936
+ color: accentColor
1937
+ }
1938
+ }
1939
+ }),
1940
+ label: /*#__PURE__*/jsx(Typography, {
1941
+ sx: {
1942
+ fontSize: 18
1943
+ },
1944
+ children: t('inputFieldsDialog.other', 'Other')
1945
+ }),
1946
+ sx: {
1947
+ m: 0,
1948
+ border: '1px solid',
1949
+ borderColor: otherSelected ? accentColor : '#d0d5dd',
1950
+ borderRadius: otherSelected ? '8px 8px 0 0' : '8px',
1951
+ borderBottom: otherSelected ? 'none' : undefined,
1952
+ px: 2,
1953
+ py: 0.75,
1954
+ transition: 'border-color 0.15s ease, border-radius 0.15s ease',
1955
+ backgroundColor: otherSelected ? 'rgba(13,131,205,0.04)' : 'transparent',
1956
+ '&:hover': {
1957
+ borderColor: accentColor,
1958
+ backgroundColor: 'rgba(13,131,205,0.03)'
1959
+ }
1960
+ }
1961
+ }), otherSelected && /*#__PURE__*/jsx(TextField, {
1962
+ autoFocus: true,
1963
+ fullWidth: true,
1964
+ value: customRadioValue,
1965
+ onChange: function onChange(e) {
1966
+ return setCustomRadioValue(e.target.value);
1967
+ },
1968
+ onKeyDown: function onKeyDown(e) {
1969
+ if (e.key === 'Enter' && customRadioValue.trim()) handleSubmit();
1970
+ },
1971
+ placeholder: t('inputFieldsDialog.otherPlaceholder', 'Type your answer…'),
1972
+ sx: {
1973
+ '& .MuiOutlinedInput-root': {
1974
+ borderRadius: '0 0 8px 8px',
1975
+ fontSize: 18,
1976
+ '& fieldset': {
1977
+ borderColor: accentColor,
1978
+ borderTopColor: 'transparent'
1979
+ },
1980
+ '&:hover fieldset': {
1981
+ borderColor: accentColor,
1982
+ borderTopColor: 'transparent'
1983
+ },
1984
+ '&.Mui-focused fieldset': {
1985
+ borderColor: accentColor,
1986
+ borderTopColor: 'transparent'
1987
+ }
1988
+ }
1989
+ }
1990
+ })]
1991
+ }), options.map(function (opt) {
1926
1992
  return /*#__PURE__*/jsx(FormControlLabel, {
1927
1993
  value: opt,
1928
1994
  control: /*#__PURE__*/jsx(Radio, {
@@ -1954,68 +2020,8 @@ var SingleFieldDialog = function SingleFieldDialog(_ref) {
1954
2020
  }
1955
2021
  }
1956
2022
  }, opt);
1957
- }), /*#__PURE__*/jsx(FormControlLabel, {
1958
- value: "__custom__",
1959
- control: /*#__PURE__*/jsx(Radio, {
1960
- sx: {
1961
- color: '#d0d5dd',
1962
- '&.Mui-checked': {
1963
- color: accentColor
1964
- }
1965
- }
1966
- }),
1967
- label: /*#__PURE__*/jsx(Typography, {
1968
- sx: {
1969
- fontSize: 18
1970
- },
1971
- children: t('inputFieldsDialog.other', 'Other')
1972
- }),
1973
- sx: {
1974
- m: 0,
1975
- border: '1px solid',
1976
- borderColor: otherSelected ? accentColor : '#d0d5dd',
1977
- borderRadius: otherSelected ? '8px 8px 0 0' : '8px',
1978
- borderBottom: otherSelected ? 'none' : undefined,
1979
- px: 2,
1980
- py: 0.75,
1981
- transition: 'border-color 0.15s ease, border-radius 0.15s ease',
1982
- backgroundColor: otherSelected ? 'rgba(13,131,205,0.04)' : 'transparent',
1983
- '&:hover': {
1984
- borderColor: accentColor,
1985
- backgroundColor: 'rgba(13,131,205,0.03)'
1986
- }
1987
- }
1988
2023
  })]
1989
- }), otherSelected && /*#__PURE__*/jsx(TextField, {
1990
- autoFocus: true,
1991
- fullWidth: true,
1992
- value: customRadioValue,
1993
- onChange: function onChange(e) {
1994
- return setCustomRadioValue(e.target.value);
1995
- },
1996
- onKeyDown: function onKeyDown(e) {
1997
- if (e.key === 'Enter' && customRadioValue.trim()) handleSubmit();
1998
- },
1999
- placeholder: t('inputFieldsDialog.otherPlaceholder', 'Type your answer…'),
2000
- sx: {
2001
- '& .MuiOutlinedInput-root': {
2002
- borderRadius: '0 0 8px 8px',
2003
- fontSize: 18,
2004
- '& fieldset': {
2005
- borderColor: accentColor,
2006
- borderTopColor: 'transparent'
2007
- },
2008
- '&:hover fieldset': {
2009
- borderColor: accentColor,
2010
- borderTopColor: 'transparent'
2011
- },
2012
- '&.Mui-focused fieldset': {
2013
- borderColor: accentColor,
2014
- borderTopColor: 'transparent'
2015
- }
2016
- }
2017
- }
2018
- })]
2024
+ })
2019
2025
  });
2020
2026
  }
2021
2027
  case 'list':