labellife-design-tool 2.3.6 → 2.3.7

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