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/cjs/index.js +25 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +25 -15
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -6
package/dist/cjs/index.js
CHANGED
|
@@ -5343,6 +5343,11 @@ styles.styled(material.Typography)(({ selected }) => ({
|
|
|
5343
5343
|
const HealthQuestionGroup = ({ description, bullets, question, questionNumber, value, onChange, error, labels = { yes: 'Yes', no: 'No' }, sx, OptionButtonComponent, followUp, }) => {
|
|
5344
5344
|
const yesLabel = labels.yes || 'Yes';
|
|
5345
5345
|
const noLabel = labels.no || 'No';
|
|
5346
|
+
const bulletSplitIndex = Math.ceil((bullets?.length || 0) / 2);
|
|
5347
|
+
const bulletColumns = [
|
|
5348
|
+
bullets?.slice(0, bulletSplitIndex) || [],
|
|
5349
|
+
bullets?.slice(bulletSplitIndex) || [],
|
|
5350
|
+
];
|
|
5346
5351
|
return (jsxRuntime.jsxs(QuestionContainer, { sx: sx, children: [description && (jsxRuntime.jsx(material.Typography, { sx: {
|
|
5347
5352
|
fontSize: '14px',
|
|
5348
5353
|
fontWeight: 400,
|
|
@@ -5350,21 +5355,26 @@ const HealthQuestionGroup = ({ description, bullets, question, questionNumber, v
|
|
|
5350
5355
|
lineHeight: '20px',
|
|
5351
5356
|
wordSpacing: '0px',
|
|
5352
5357
|
fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
|
|
5353
|
-
}, children: description })), jsxRuntime.jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), Boolean(bullets?.length) && (jsxRuntime.jsx(
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
}, children:
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5358
|
+
}, children: description })), jsxRuntime.jsxs(QuestionText, { children: [questionNumber && `${questionNumber}. `, question] }), Boolean(bullets?.length) && (jsxRuntime.jsx(material.Box, { sx: {
|
|
5359
|
+
display: 'flex',
|
|
5360
|
+
flexDirection: { xs: 'column', md: 'row' },
|
|
5361
|
+
// gap: '16px',
|
|
5362
|
+
width: '100%',
|
|
5363
|
+
}, children: bulletColumns.map((columnBullets, columnIndex) => (jsxRuntime.jsx(material.Box, { sx: { flex: '1 0 0', minWidth: 0 }, children: jsxRuntime.jsx("ul", { style: {
|
|
5364
|
+
margin: '0',
|
|
5365
|
+
paddingInlineStart: '20px',
|
|
5366
|
+
listStyleType: 'disc',
|
|
5367
|
+
listStylePosition: 'outside',
|
|
5368
|
+
}, children: columnBullets.map((bullet, bulletIndex) => (jsxRuntime.jsx("li", { style: {
|
|
5369
|
+
marginBottom: '2px',
|
|
5370
|
+
}, children: jsxRuntime.jsx(material.Typography, { component: "span", sx: {
|
|
5371
|
+
fontSize: '14px',
|
|
5372
|
+
fontWeight: 400,
|
|
5373
|
+
color: '#13131B',
|
|
5374
|
+
lineHeight: '20px',
|
|
5375
|
+
wordSpacing: '0px',
|
|
5376
|
+
fontFamily: '"MetLifeCircular", "Montserrat", sans-serif',
|
|
5377
|
+
}, children: bullet }) }, `${bullet}-${bulletIndex}`))) }) }, `column-${columnIndex}`))) })), jsxRuntime.jsx(OptionsContainer, { children: OptionButtonComponent ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(OptionButtonComponent, { variant: "filledLightBorder", selected: value === 'yes', onClick: () => onChange('yes'), fullWidth: true, children: yesLabel }), jsxRuntime.jsx(OptionButtonComponent, { variant: "filledLightBorder", selected: value === 'no', onClick: () => onChange('no'), fullWidth: true, children: noLabel })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(OptionButton, { value: "yes", label: yesLabel, selected: value === 'yes', onClick: () => onChange('yes'), variant: "form", size: "large" }), jsxRuntime.jsx(OptionButton, { value: "no", label: noLabel, selected: value === 'no', onClick: () => onChange('no'), variant: "form", size: "large" })] })) }), followUp && value === 'yes' && (jsxRuntime.jsx(HealthConditionChecklist, { title: followUp.title, options: followUp.options, selected: followUp.selected, onToggle: followUp.onToggle, error: followUp.error })), error && (jsxRuntime.jsx(material.Typography, { sx: {
|
|
5368
5378
|
color: 'error.main',
|
|
5369
5379
|
fontSize: '12px',
|
|
5370
5380
|
mt: 0.5,
|