igloo-d2c-components 1.1.9 → 1.1.11-non-prod

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
@@ -5308,6 +5308,11 @@ styled(Typography)(({ selected }) => ({
5308
5308
  const HealthQuestionGroup = ({ description, bullets, question, questionNumber, value, onChange, error, labels = { yes: 'Yes', no: 'No' }, sx, OptionButtonComponent, followUp, }) => {
5309
5309
  const yesLabel = labels.yes || 'Yes';
5310
5310
  const noLabel = labels.no || 'No';
5311
+ const bulletSplitIndex = Math.ceil((bullets?.length || 0) / 2);
5312
+ const bulletColumns = [
5313
+ bullets?.slice(0, bulletSplitIndex) || [],
5314
+ bullets?.slice(bulletSplitIndex) || [],
5315
+ ];
5311
5316
  return (jsxs(QuestionContainer, { sx: sx, children: [description && (jsx(Typography, { sx: {
5312
5317
  fontSize: '14px',
5313
5318
  fontWeight: 400,
@@ -5315,21 +5320,26 @@ const HealthQuestionGroup = ({ description, bullets, question, questionNumber, v
5315
5320
  lineHeight: '20px',
5316
5321
  wordSpacing: '0px',
5317
5322
  fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
5318
- }, children: description })), jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), Boolean(bullets?.length) && (jsx("ul", { style: {
5319
- margin: '0',
5320
- paddingInlineStart: '20px',
5321
- listStyleType: 'disc',
5322
- listStylePosition: 'outside',
5323
- }, children: bullets?.map((bullet) => (jsx("li", { style: {
5324
- marginBottom: '2px',
5325
- }, children: jsx(Typography, { component: "span", sx: {
5326
- fontSize: '14px',
5327
- fontWeight: 400,
5328
- color: '#13131B',
5329
- lineHeight: '20px',
5330
- wordSpacing: '0px',
5331
- fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
5332
- }, children: bullet }) }, bullet))) })), jsx(OptionsContainer, { children: OptionButtonComponent ? (jsxs(Fragment, { children: [jsx(OptionButtonComponent, { variant: "filledLightBorder", selected: value === 'yes', onClick: () => onChange('yes'), fullWidth: true, children: yesLabel }), jsx(OptionButtonComponent, { variant: "filledLightBorder", selected: value === 'no', onClick: () => onChange('no'), fullWidth: true, children: noLabel })] })) : (jsxs(Fragment, { children: [jsx(OptionButton, { value: "yes", label: yesLabel, selected: value === 'yes', onClick: () => onChange('yes'), variant: "form", size: "large" }), jsx(OptionButton, { value: "no", label: noLabel, selected: value === 'no', onClick: () => onChange('no'), variant: "form", size: "large" })] })) }), followUp && value === 'yes' && (jsx(HealthConditionChecklist, { title: followUp.title, options: followUp.options, selected: followUp.selected, onToggle: followUp.onToggle, error: followUp.error })), error && (jsx(Typography, { sx: {
5323
+ }, children: description })), jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), Boolean(bullets?.length) && (jsx(Box, { sx: {
5324
+ display: 'flex',
5325
+ flexDirection: { xs: 'column', md: 'row' },
5326
+ // gap: '16px',
5327
+ width: '100%',
5328
+ }, children: bulletColumns.map((columnBullets, columnIndex) => (jsx(Box, { sx: { flex: '1 0 0', minWidth: 0 }, children: jsx("ul", { style: {
5329
+ margin: '0',
5330
+ paddingInlineStart: '20px',
5331
+ listStyleType: 'disc',
5332
+ listStylePosition: 'outside',
5333
+ }, children: columnBullets.map((bullet, bulletIndex) => (jsx("li", { style: {
5334
+ marginBottom: '2px',
5335
+ }, children: jsx(Typography, { component: "span", sx: {
5336
+ fontSize: '14px',
5337
+ fontWeight: 400,
5338
+ color: '#13131B',
5339
+ lineHeight: '20px',
5340
+ wordSpacing: '0px',
5341
+ fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
5342
+ }, children: bullet }) }, `${bullet}-${bulletIndex}`))) }) }, `column-${columnIndex}`))) })), jsx(OptionsContainer, { children: OptionButtonComponent ? (jsxs(Fragment, { children: [jsx(OptionButtonComponent, { variant: "filledLightBorder", selected: value === 'yes', onClick: () => onChange('yes'), fullWidth: true, children: yesLabel }), jsx(OptionButtonComponent, { variant: "filledLightBorder", selected: value === 'no', onClick: () => onChange('no'), fullWidth: true, children: noLabel })] })) : (jsxs(Fragment, { children: [jsx(OptionButton, { value: "yes", label: yesLabel, selected: value === 'yes', onClick: () => onChange('yes'), variant: "form", size: "large" }), jsx(OptionButton, { value: "no", label: noLabel, selected: value === 'no', onClick: () => onChange('no'), variant: "form", size: "large" })] })) }), followUp && value === 'yes' && (jsx(HealthConditionChecklist, { title: followUp.title, options: followUp.options, selected: followUp.selected, onToggle: followUp.onToggle, error: followUp.error })), error && (jsx(Typography, { sx: {
5333
5343
  color: 'error.main',
5334
5344
  fontSize: '12px',
5335
5345
  mt: 0.5,