@heycater/qualification-funnel 1.3.8 → 1.3.10

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/index.esm.js CHANGED
@@ -5117,7 +5117,7 @@ const numberOfVegetariansQuestion = createQuestion({
5117
5117
  content: {
5118
5118
  titleEn: "Vegetarians",
5119
5119
  titleDe: "Vegetarier",
5120
- image: getAssetUrl(`${DIETARY_PATH}/vegetarian.svg`)
5120
+ image: `${DIETARY_PATH}/vegetarian.svg`
5121
5121
  }
5122
5122
  });
5123
5123
  const numberOfVegansQuestion = createQuestion({
@@ -5126,7 +5126,7 @@ const numberOfVegansQuestion = createQuestion({
5126
5126
  content: {
5127
5127
  titleEn: "Vegans",
5128
5128
  titleDe: "Veganer",
5129
- image: getAssetUrl(`${DIETARY_PATH}/vegan.svg`)
5129
+ image: `${DIETARY_PATH}/vegan.svg`
5130
5130
  }
5131
5131
  });
5132
5132
  const numberOfCarnivoresQuestion = createQuestion({
@@ -5135,7 +5135,7 @@ const numberOfCarnivoresQuestion = createQuestion({
5135
5135
  content: {
5136
5136
  titleEn: "Carnivore",
5137
5137
  titleDe: "Fleischesser",
5138
- image: getAssetUrl(`${DIETARY_PATH}/meat.svg`)
5138
+ image: `${DIETARY_PATH}/meat.svg`
5139
5139
  }
5140
5140
  });
5141
5141
  function _typeof$1(o) {
@@ -9520,7 +9520,7 @@ const EmbeddedQuestionLayout = ({
9520
9520
  " "
9521
9521
  ] })
9522
9522
  ] }),
9523
- /* @__PURE__ */ jsx(Box, { my: "auto", children: content }),
9523
+ /* @__PURE__ */ jsx(Box, { my: isFullscreen ? "auto" : 2, children: content }),
9524
9524
  !isFullscreen && /* @__PURE__ */ jsx(Box, { mt: 2, children: /* @__PURE__ */ jsx(EmbeddedQuestionControls, { onBackground: "light", mode: "embedded" }) })
9525
9525
  ]
9526
9526
  }
@@ -9763,10 +9763,10 @@ const StepperIconButton$1 = styled(IconButton$2)`
9763
9763
  }
9764
9764
  `;
9765
9765
  const IconButtonRight$1 = styled(StepperIconButton$1)`
9766
- margin-left: ${(props) => props.theme.spacing(1)}px;
9766
+ margin-left: ${(props) => props.theme.spacing(2)}px;
9767
9767
  `;
9768
9768
  const IconButtonLeft$1 = styled(StepperIconButton$1)`
9769
- margin-right: ${(props) => props.theme.spacing(1)}px;
9769
+ margin-right: ${(props) => props.theme.spacing(2)}px;
9770
9770
  `;
9771
9771
  function PeopleCountStepper() {
9772
9772
  const { actions, state, answerOf, errorsOf } = useQualification();
@@ -10187,7 +10187,7 @@ const BudgetRangeTiles = ({
10187
10187
  onSelect(item.value);
10188
10188
  },
10189
10189
  children: [
10190
- /* @__PURE__ */ jsx(IconWrapper$4, { children: /* @__PURE__ */ jsx(BudgetText, { children: item.display }) }),
10190
+ /* @__PURE__ */ jsx(IconWrapper$5, { children: /* @__PURE__ */ jsx(BudgetText, { children: item.display }) }),
10191
10191
  /* @__PURE__ */ jsx(TileTypography, { children: label })
10192
10192
  ]
10193
10193
  },
@@ -10198,7 +10198,7 @@ const BudgetRangeTiles = ({
10198
10198
  const BudgetTile = styled(Tile)`
10199
10199
  text-align: center;
10200
10200
  `;
10201
- const IconWrapper$4 = styled(Box)`
10201
+ const IconWrapper$5 = styled(Box)`
10202
10202
  min-width: 50px;
10203
10203
  display: grid;
10204
10204
  place-content: center;
@@ -10487,7 +10487,7 @@ function DatePickerEmbedded() {
10487
10487
  mode: "single"
10488
10488
  }
10489
10489
  ) }),
10490
- minDateMessage && /* @__PURE__ */ jsx(Box, { textAlign: "center", children: /* @__PURE__ */ jsxs(TypographyCaption, { children: [
10490
+ minDateMessage && /* @__PURE__ */ jsx(Box, { textAlign: "center", mt: 2, children: /* @__PURE__ */ jsxs(TypographyCaption, { children: [
10491
10491
  "*",
10492
10492
  minDateMessage
10493
10493
  ] }) })
@@ -10723,7 +10723,7 @@ const DeliveryFrequencyTiles = ({
10723
10723
  onSelect(item.value);
10724
10724
  },
10725
10725
  children: [
10726
- /* @__PURE__ */ jsx(IconWrapper$3, { opacity: isNotSure ? 0.4 : 1, children: isNotSure ? /* @__PURE__ */ jsx(QuestionMark, { height: "1em" }) : /* @__PURE__ */ jsx(FrequencyText, { children: getTextForFrequency(item.value) }) }),
10726
+ /* @__PURE__ */ jsx(IconWrapper$4, { opacity: isNotSure ? 0.4 : 1, children: isNotSure ? /* @__PURE__ */ jsx(QuestionMark, { height: "1em" }) : /* @__PURE__ */ jsx(FrequencyText, { children: getTextForFrequency(item.value) }) }),
10727
10727
  /* @__PURE__ */ jsx(TileTypography, { children: label })
10728
10728
  ]
10729
10729
  },
@@ -10746,7 +10746,7 @@ function getTextForFrequency(frequency) {
10746
10746
  const FrequencyTile = styled(Tile)`
10747
10747
  text-align: center;
10748
10748
  `;
10749
- const IconWrapper$3 = styled(Box)`
10749
+ const IconWrapper$4 = styled(Box)`
10750
10750
  min-width: 50px;
10751
10751
  display: grid;
10752
10752
  place-content: center;
@@ -10762,7 +10762,6 @@ const FrequencyText = styled.span`
10762
10762
  font-weight: 400;
10763
10763
  color: ${({ theme }) => theme.palette.primary.main};
10764
10764
  `;
10765
- const ICON_SIZE_IN_PX = 36;
10766
10765
  SCHEMA_STEPS.dietary_restrictions;
10767
10766
  const DietaryStepper = ({ question, autoFocus }) => {
10768
10767
  const { localizedAttributeName } = useLocalizedFieldName();
@@ -10771,7 +10770,7 @@ const DietaryStepper = ({ question, autoFocus }) => {
10771
10770
  () => {
10772
10771
  var _a2, _b;
10773
10772
  return {
10774
- image: (_a2 = question == null ? void 0 : question.content) == null ? void 0 : _a2.image,
10773
+ image: ((_a2 = question == null ? void 0 : question.content) == null ? void 0 : _a2.image) ? getAssetUrl(question.content.image) : void 0,
10775
10774
  label: (_b = question.content) == null ? void 0 : _b[localizedAttributeName("title")]
10776
10775
  };
10777
10776
  },
@@ -10792,13 +10791,13 @@ const DietaryStepper = ({ question, autoFocus }) => {
10792
10791
  alignItems: "center",
10793
10792
  justifyContent: { xs: "center", sm: "start" },
10794
10793
  children: [
10795
- (localizedOptions == null ? void 0 : localizedOptions.image) && /* @__PURE__ */ jsx(
10794
+ (localizedOptions == null ? void 0 : localizedOptions.image) && /* @__PURE__ */ jsx(IconWrapper$3, { children: /* @__PURE__ */ jsx(
10796
10795
  StyledImg$1,
10797
10796
  {
10798
10797
  alt: "",
10799
10798
  src: localizedOptions == null ? void 0 : localizedOptions.image
10800
10799
  }
10801
- ),
10800
+ ) }),
10802
10801
  /* @__PURE__ */ jsx(Typography, { variant: "body1", pl: 1, children: localizedOptions.label })
10803
10802
  ]
10804
10803
  }
@@ -10815,11 +10814,18 @@ const DietaryStepper = ({ question, autoFocus }) => {
10815
10814
  ) })
10816
10815
  ] }) });
10817
10816
  };
10817
+ const IconWrapper$3 = styled.div`
10818
+ width: 40px;
10819
+ height: 40px;
10820
+ display: flex;
10821
+ align-items: center;
10822
+ justify-content: center;
10823
+ flex-shrink: 0;
10824
+ `;
10818
10825
  const StyledImg$1 = styled.img`
10819
- width: ${ICON_SIZE_IN_PX}px;
10820
- height: ${ICON_SIZE_IN_PX}px;
10826
+ width: 100%;
10827
+ height: 100%;
10821
10828
  object-fit: contain;
10822
- flex-shrink: 0;
10823
10829
  `;
10824
10830
  const GridWrapper$1 = styled.div`
10825
10831
  display: grid;
@@ -11198,12 +11204,12 @@ const SubtitleText = styled(Typography)`
11198
11204
  const ICON_BASE_PATH = "/artifacts/icons/catering_category";
11199
11205
  const getIconUrl = (name) => getAssetUrl(`${ICON_BASE_PATH}/${name}.svg`);
11200
11206
  const DEFAULT_IMAGE_SIZE = {
11201
- SM: 54,
11202
- MD: 84
11207
+ SM: 40,
11208
+ MD: 60
11203
11209
  };
11204
11210
  const IMAGE_WRAPPER_SIZE = {
11205
- SM: 70,
11206
- MD: 124
11211
+ SM: 50,
11212
+ MD: 80
11207
11213
  };
11208
11214
  const CateringCategoryTiles = ({
11209
11215
  onSelect,
@@ -11512,7 +11518,7 @@ const EmbeddedQuestion = ({
11512
11518
  subtitle: t2(
11513
11519
  "qualification:embeddedFunnel.dietaryRestrictions.subtitle"
11514
11520
  ),
11515
- content: /* @__PURE__ */ jsx(Container, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { pt: 2, mb: -2, pl: 2, pr: 2, pb: 2, children: /* @__PURE__ */ jsx(DietaryDistribution, {}) }) }) }),
11521
+ content: /* @__PURE__ */ jsx(Container, { size: MAX_WIDTH_OF_WHITE_WRAPPER, children: /* @__PURE__ */ jsx(WhiteWrapper, { children: /* @__PURE__ */ jsx(Box, { py: 3, px: 2, children: /* @__PURE__ */ jsx(DietaryDistribution, {}) }) }) }),
11516
11522
  side: selectedMenu && /* @__PURE__ */ jsx(SelectedMenuCard, { ...selectedMenu })
11517
11523
  }
11518
11524
  );