cja-phoenix 0.6.0 → 0.6.2

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.
Files changed (283) hide show
  1. package/dist/cja-phoenix.es.js +3816 -4306
  2. package/dist/style.css +1 -0
  3. package/dist/types/components/composite/CheckoutCrossSell.vue.d.ts +29 -0
  4. package/dist/types/components/composite/CheckoutLayout.vue.d.ts +23 -0
  5. package/dist/types/components/composite/CheckoutMilestones.vue.d.ts +16 -0
  6. package/dist/types/components/composite/CjaFooter.vue.d.ts +34 -0
  7. package/dist/types/components/composite/CjaMenuBar.vue.d.ts +52 -0
  8. package/dist/types/components/composite/FunnelLayout.vue.d.ts +35 -0
  9. package/dist/types/components/composite/FunnelSubmit.vue.d.ts +26 -0
  10. package/dist/types/components/composite/FunnelSummary.vue.d.ts +77 -0
  11. package/dist/types/components/composite/FunnelTitle.vue.d.ts +19 -0
  12. package/dist/types/components/composite/InfoShowcase.vue.d.ts +25 -0
  13. package/dist/types/components/composite/JourneyMacroSteps.vue.d.ts +16 -0
  14. package/dist/types/components/composite/ResultsSidebar.vue.d.ts +9 -0
  15. package/dist/types/components/forms/CheckboxInput.vue.d.ts +41 -0
  16. package/dist/types/components/forms/CurrencyInput.vue.d.ts +65 -0
  17. package/dist/types/components/forms/FileInput.vue.d.ts +89 -0
  18. package/dist/types/components/forms/NumberInput.vue.d.ts +58 -0
  19. package/dist/types/components/forms/PhoneInput.vue.d.ts +69 -0
  20. package/dist/types/components/forms/RadioInput.vue.d.ts +43 -0
  21. package/dist/types/components/forms/RadioInputList.vue.d.ts +65 -0
  22. package/dist/types/components/forms/SelectInput.vue.d.ts +80 -0
  23. package/dist/types/components/forms/SelectionTiles.vue.d.ts +51 -0
  24. package/dist/types/components/forms/TextInput.vue.d.ts +76 -0
  25. package/dist/types/components/forms/TileCheckboxInput.vue.d.ts +23 -0
  26. package/dist/types/components/forms/ToggleInput.vue.d.ts +51 -0
  27. package/dist/types/components/forms/structure/InputContainer.vue.d.ts +22 -0
  28. package/dist/types/components/forms/structure/InputError.vue.d.ts +15 -0
  29. package/dist/types/components/forms/structure/InputTitle.vue.d.ts +21 -0
  30. package/dist/types/components/structural/CjaButton.vue.d.ts +59 -0
  31. package/dist/types/components/structural/CollapseContainer.vue.d.ts +51 -0
  32. package/dist/{components → types/components}/structural/ContentTabs.vue.d.ts +17 -20
  33. package/dist/types/components/structural/FixedContainer.vue.d.ts +68 -0
  34. package/dist/types/components/structural/GridContainer.vue.d.ts +36 -0
  35. package/dist/types/components/structural/GridItem.vue.d.ts +26 -0
  36. package/dist/types/components/structural/InfoMessage.vue.d.ts +30 -0
  37. package/dist/types/components/structural/LoadingSpinner.vue.d.ts +17 -0
  38. package/dist/types/components/structural/Modal.vue.d.ts +65 -0
  39. package/dist/types/components/structural/Scaffold.vue.d.ts +9 -0
  40. package/dist/types/index.d.ts +16 -7
  41. package/dist/types/stories/CjaButton.story.vue.d.ts +2 -0
  42. package/dist/types/stories/ContentTabs.story.vue.d.ts +2 -0
  43. package/dist/types/stories/Modal.story.vue.d.ts +2 -0
  44. package/dist/types/stories/RadioInputList.story.vue.d.ts +2 -0
  45. package/dist/types/{Router.d.ts → types/Router.d.ts} +1 -0
  46. package/dist/types/types/index.d.ts +7 -0
  47. package/dist/{utils → types/utils}/formValidations.d.ts +3 -0
  48. package/package.json +21 -30
  49. package/src/assets/backdrop.scss +10 -0
  50. package/src/assets/breakpoints.scss +12 -0
  51. package/src/assets/fonts.scss +1 -0
  52. package/src/assets/forms.scss +97 -0
  53. package/src/assets/grid.scss +14 -0
  54. package/src/assets/iconia/Read Me.txt +7 -0
  55. package/src/assets/iconia/demo-files/demo.css +155 -0
  56. package/src/assets/iconia/demo-files/demo.js +30 -0
  57. package/src/assets/iconia/demo.html +7055 -0
  58. package/src/assets/iconia/fonts/CGG-icomoon.eot +0 -0
  59. package/src/assets/iconia/fonts/CGG-icomoon.svg +513 -0
  60. package/src/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
  61. package/src/assets/iconia/fonts/CGG-icomoon.woff +0 -0
  62. package/src/assets/iconia/selection.json +1 -0
  63. package/src/assets/iconia/style.css +1547 -0
  64. package/src/assets/iconia/style.scss +2556 -0
  65. package/src/assets/iconia/variables.scss +507 -0
  66. package/src/assets/main.scss +30 -0
  67. package/src/assets/radioOld.scss +52 -0
  68. package/src/assets/shadows.scss +3 -0
  69. package/src/assets/tippy.scss +45 -0
  70. package/src/assets/vars/development.scss +4 -0
  71. package/src/assets/vars/production.scss +4 -0
  72. package/src/components/composite/CheckoutCrossSell.vue +478 -0
  73. package/src/components/composite/CheckoutLayout.vue +59 -0
  74. package/src/components/composite/CheckoutMilestones.vue +161 -0
  75. package/src/components/composite/CjaFooter.vue +223 -0
  76. package/src/components/composite/CjaMenuBar.vue +543 -0
  77. package/src/components/composite/FunnelLayout.vue +197 -0
  78. package/src/components/composite/FunnelSubmit.vue +53 -0
  79. package/src/components/composite/FunnelSummary.vue +198 -0
  80. package/src/components/composite/FunnelTitle.vue +59 -0
  81. package/src/components/composite/InfoShowcase.vue +87 -0
  82. package/src/components/composite/JourneyMacroSteps.vue +104 -0
  83. package/src/components/composite/ProductDetails.vue +149 -0
  84. package/src/components/composite/ResultsLayout.vue +156 -0
  85. package/src/components/composite/ResultsSidebar.vue +74 -0
  86. package/src/components/forms/CheckboxInput.vue +103 -0
  87. package/src/components/forms/CurrencyInput.vue +126 -0
  88. package/src/components/forms/FileInput.vue +250 -0
  89. package/src/components/forms/NumberInput.vue +165 -0
  90. package/src/components/forms/PhoneInput.vue +122 -0
  91. package/src/components/forms/RadioInput.vue +98 -0
  92. package/src/components/forms/RadioInputList.vue +156 -0
  93. package/src/components/forms/SelectInput.vue +392 -0
  94. package/src/components/forms/SelectionTiles.vue +196 -0
  95. package/src/components/forms/TextInput.vue +144 -0
  96. package/src/components/forms/TileCheckboxInput.vue +96 -0
  97. package/src/components/forms/ToggleInput.vue +88 -0
  98. package/src/components/forms/structure/InputContainer.vue +28 -0
  99. package/src/components/forms/structure/InputError.vue +26 -0
  100. package/src/components/forms/structure/InputTitle.vue +52 -0
  101. package/src/components/index.ts +73 -0
  102. package/src/components/structural/CjaButton.vue +332 -0
  103. package/src/components/structural/CollapseContainer.vue +141 -0
  104. package/src/components/structural/ContentTabs.vue +105 -0
  105. package/src/components/structural/FixedContainer.vue +107 -0
  106. package/src/components/structural/GridContainer.vue +70 -0
  107. package/src/components/structural/GridItem.vue +47 -0
  108. package/src/components/structural/InfoMessage.vue +105 -0
  109. package/src/components/structural/LoadingSpinner.vue +39 -0
  110. package/src/components/structural/Modal.vue +209 -0
  111. package/src/components/structural/Scaffold.vue +3 -0
  112. package/src/constants/MyConstants.ts +1 -0
  113. package/src/constants/index.ts +5 -0
  114. package/src/env.d.ts +11 -0
  115. package/src/index.ts +31 -0
  116. package/src/stories/CjaButton.story.vue +192 -0
  117. package/src/stories/ContentTabs.story.vue +59 -0
  118. package/src/stories/Modal.story.vue +127 -0
  119. package/src/stories/RadioInputList.story.vue +61 -0
  120. package/src/types/CheckoutMilestone.ts +5 -0
  121. package/src/types/Footer.ts +17 -0
  122. package/src/types/Menu.ts +19 -0
  123. package/src/types/RadioOption.ts +7 -0
  124. package/src/types/Router.ts +19 -0
  125. package/src/types/SelectOption.ts +6 -0
  126. package/src/types/StoreDataValue.ts +12 -0
  127. package/src/types/Storyblok.ts +10 -0
  128. package/src/types/TileOption.ts +8 -0
  129. package/src/types/index.ts +19 -0
  130. package/src/utils/cjaRouter.ts +74 -0
  131. package/src/utils/cjaStore.ts +43 -0
  132. package/src/utils/findScrollAncestor.ts +16 -0
  133. package/src/utils/formValidations.ts +192 -0
  134. package/src/utils/generateRoutes.ts +36 -0
  135. package/src/utils/getFromUrl.ts +25 -0
  136. package/src/utils/getMessages.ts +23 -0
  137. package/src/utils/gtm.ts +158 -0
  138. package/src/utils/index.ts +31 -0
  139. package/src/utils/jsonReviver.ts +20 -0
  140. package/src/utils/storyblokLink.ts +4 -0
  141. package/src/utils/updateForm.ts +40 -0
  142. package/src/utils/uploadFile.ts +25 -0
  143. package/src/utils/useGlobalProperties.ts +11 -0
  144. package/src/utils/useViewportDetector.ts +35 -0
  145. package/dist/cja-phoenix.cjs.js +0 -44
  146. package/dist/cja-phoenix.d.ts +0 -3
  147. package/dist/cja-phoenix.umd.js +0 -45
  148. package/dist/components/composite/CheckoutCrossSell.vue.d.ts +0 -36
  149. package/dist/components/composite/CheckoutLayout.vue.d.ts +0 -20
  150. package/dist/components/composite/CheckoutMilestones.vue.d.ts +0 -13
  151. package/dist/components/composite/CjaFooter.vue.d.ts +0 -29
  152. package/dist/components/composite/CjaMenuBar.vue.d.ts +0 -53
  153. package/dist/components/composite/FunnelLayout.vue.d.ts +0 -38
  154. package/dist/components/composite/FunnelSubmit.vue.d.ts +0 -25
  155. package/dist/components/composite/FunnelSummary.vue.d.ts +0 -76
  156. package/dist/components/composite/FunnelTitle.vue.d.ts +0 -24
  157. package/dist/components/composite/InfoShowcase.vue.d.ts +0 -28
  158. package/dist/components/composite/JourneyMacroSteps.vue.d.ts +0 -13
  159. package/dist/components/forms/CheckboxInput.vue.d.ts +0 -38
  160. package/dist/components/forms/CurrencyInput.vue.d.ts +0 -92
  161. package/dist/components/forms/FileInput.vue.d.ts +0 -118
  162. package/dist/components/forms/NumberInput.vue.d.ts +0 -73
  163. package/dist/components/forms/PhoneInput.vue.d.ts +0 -104
  164. package/dist/components/forms/RadioInputList.vue.d.ts +0 -96
  165. package/dist/components/forms/SelectInput.vue.d.ts +0 -121
  166. package/dist/components/forms/SelectionTiles.vue.d.ts +0 -64
  167. package/dist/components/forms/TextInput.vue.d.ts +0 -127
  168. package/dist/components/forms/TileCheckboxInput.vue.d.ts +0 -34
  169. package/dist/components/forms/ToggleInput.vue.d.ts +0 -70
  170. package/dist/components/forms/structure/InputContainer.vue.d.ts +0 -17
  171. package/dist/components/forms/structure/InputError.vue.d.ts +0 -12
  172. package/dist/components/forms/structure/InputTitle.vue.d.ts +0 -30
  173. package/dist/components/structural/CjaButton.vue.d.ts +0 -66
  174. package/dist/components/structural/CollapseContainer.vue.d.ts +0 -40
  175. package/dist/components/structural/FixedContainer.vue.d.ts +0 -69
  176. package/dist/components/structural/GridContainer.vue.d.ts +0 -21
  177. package/dist/components/structural/GridItem.vue.d.ts +0 -29
  178. package/dist/components/structural/InfoMessage.vue.d.ts +0 -39
  179. package/dist/components/structural/LoadingSpinner.vue.d.ts +0 -16
  180. package/dist/components/structural/Modal.vue.d.ts +0 -50
  181. package/dist/components/structural/Scaffold.vue.d.ts +0 -3
  182. package/dist/components/structural/Scaffold.vue.d.ts.map +0 -1
  183. package/dist/index.d.ts +0 -14
  184. package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts +0 -5
  185. package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts.map +0 -1
  186. package/dist/src/components/composite/CheckoutLayout.vue.d.ts +0 -5
  187. package/dist/src/components/composite/CheckoutLayout.vue.d.ts.map +0 -1
  188. package/dist/src/components/composite/CheckoutMilestones.vue.d.ts +0 -5
  189. package/dist/src/components/composite/CheckoutMilestones.vue.d.ts.map +0 -1
  190. package/dist/src/components/composite/CjaFooter.vue.d.ts +0 -5
  191. package/dist/src/components/composite/CjaFooter.vue.d.ts.map +0 -1
  192. package/dist/src/components/composite/CjaMenuBar.vue.d.ts +0 -5
  193. package/dist/src/components/composite/CjaMenuBar.vue.d.ts.map +0 -1
  194. package/dist/src/components/composite/FunnelLayout.vue.d.ts +0 -5
  195. package/dist/src/components/composite/FunnelLayout.vue.d.ts.map +0 -1
  196. package/dist/src/components/composite/FunnelSubmit.vue.d.ts +0 -5
  197. package/dist/src/components/composite/FunnelSubmit.vue.d.ts.map +0 -1
  198. package/dist/src/components/composite/FunnelSummary.vue.d.ts +0 -5
  199. package/dist/src/components/composite/FunnelSummary.vue.d.ts.map +0 -1
  200. package/dist/src/components/composite/FunnelTitle.vue.d.ts +0 -5
  201. package/dist/src/components/composite/FunnelTitle.vue.d.ts.map +0 -1
  202. package/dist/src/components/composite/InfoShowcase.vue.d.ts +0 -5
  203. package/dist/src/components/composite/InfoShowcase.vue.d.ts.map +0 -1
  204. package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts +0 -5
  205. package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts.map +0 -1
  206. package/dist/src/components/composite/ProductDetails.vue.d.ts +0 -5
  207. package/dist/src/components/composite/ProductDetails.vue.d.ts.map +0 -1
  208. package/dist/src/components/composite/ResultsLayout.vue.d.ts +0 -5
  209. package/dist/src/components/composite/ResultsLayout.vue.d.ts.map +0 -1
  210. package/dist/src/components/forms/CheckboxInput.vue.d.ts +0 -5
  211. package/dist/src/components/forms/CheckboxInput.vue.d.ts.map +0 -1
  212. package/dist/src/components/forms/CurrencyInput.vue.d.ts +0 -5
  213. package/dist/src/components/forms/CurrencyInput.vue.d.ts.map +0 -1
  214. package/dist/src/components/forms/FileInput.vue.d.ts +0 -5
  215. package/dist/src/components/forms/FileInput.vue.d.ts.map +0 -1
  216. package/dist/src/components/forms/NumberInput.vue.d.ts +0 -5
  217. package/dist/src/components/forms/NumberInput.vue.d.ts.map +0 -1
  218. package/dist/src/components/forms/PhoneInput.vue.d.ts +0 -5
  219. package/dist/src/components/forms/PhoneInput.vue.d.ts.map +0 -1
  220. package/dist/src/components/forms/RadioInputList.vue.d.ts +0 -5
  221. package/dist/src/components/forms/RadioInputList.vue.d.ts.map +0 -1
  222. package/dist/src/components/forms/SelectInput.vue.d.ts +0 -5
  223. package/dist/src/components/forms/SelectInput.vue.d.ts.map +0 -1
  224. package/dist/src/components/forms/SelectionTiles.vue.d.ts +0 -5
  225. package/dist/src/components/forms/SelectionTiles.vue.d.ts.map +0 -1
  226. package/dist/src/components/forms/TextInput.vue.d.ts +0 -5
  227. package/dist/src/components/forms/TextInput.vue.d.ts.map +0 -1
  228. package/dist/src/components/forms/TileCheckboxInput.vue.d.ts +0 -5
  229. package/dist/src/components/forms/TileCheckboxInput.vue.d.ts.map +0 -1
  230. package/dist/src/components/forms/ToggleInput.vue.d.ts +0 -5
  231. package/dist/src/components/forms/ToggleInput.vue.d.ts.map +0 -1
  232. package/dist/src/components/forms/structure/InputContainer.vue.d.ts +0 -5
  233. package/dist/src/components/forms/structure/InputContainer.vue.d.ts.map +0 -1
  234. package/dist/src/components/forms/structure/InputError.vue.d.ts +0 -5
  235. package/dist/src/components/forms/structure/InputError.vue.d.ts.map +0 -1
  236. package/dist/src/components/forms/structure/InputTitle.vue.d.ts +0 -5
  237. package/dist/src/components/forms/structure/InputTitle.vue.d.ts.map +0 -1
  238. package/dist/src/components/structural/CjaButton.vue.d.ts +0 -5
  239. package/dist/src/components/structural/CjaButton.vue.d.ts.map +0 -1
  240. package/dist/src/components/structural/CollapseContainer.vue.d.ts +0 -5
  241. package/dist/src/components/structural/CollapseContainer.vue.d.ts.map +0 -1
  242. package/dist/src/components/structural/ContentTabs.vue.d.ts +0 -5
  243. package/dist/src/components/structural/ContentTabs.vue.d.ts.map +0 -1
  244. package/dist/src/components/structural/FixedContainer.vue.d.ts +0 -5
  245. package/dist/src/components/structural/FixedContainer.vue.d.ts.map +0 -1
  246. package/dist/src/components/structural/GridContainer.vue.d.ts +0 -5
  247. package/dist/src/components/structural/GridContainer.vue.d.ts.map +0 -1
  248. package/dist/src/components/structural/GridItem.vue.d.ts +0 -5
  249. package/dist/src/components/structural/GridItem.vue.d.ts.map +0 -1
  250. package/dist/src/components/structural/InfoMessage.vue.d.ts +0 -5
  251. package/dist/src/components/structural/InfoMessage.vue.d.ts.map +0 -1
  252. package/dist/src/components/structural/LoadingSpinner.vue.d.ts +0 -5
  253. package/dist/src/components/structural/LoadingSpinner.vue.d.ts.map +0 -1
  254. package/dist/src/components/structural/Modal.vue.d.ts +0 -5
  255. package/dist/src/components/structural/Modal.vue.d.ts.map +0 -1
  256. package/dist/styles.css +0 -1
  257. /package/dist/{components → types/components}/composite/ProductDetails.vue.d.ts +0 -0
  258. /package/dist/{components → types/components}/composite/ResultsLayout.vue.d.ts +0 -0
  259. /package/dist/{components → types/components}/index.d.ts +0 -0
  260. /package/dist/{constants → types/constants}/MyConstants.d.ts +0 -0
  261. /package/dist/{constants → types/constants}/index.d.ts +0 -0
  262. /package/dist/types/{CheckoutMilestone.d.ts → types/CheckoutMilestone.d.ts} +0 -0
  263. /package/dist/types/{Footer.d.ts → types/Footer.d.ts} +0 -0
  264. /package/dist/types/{Menu.d.ts → types/Menu.d.ts} +0 -0
  265. /package/dist/types/{RadioOption.d.ts → types/RadioOption.d.ts} +0 -0
  266. /package/dist/types/{SelectOption.d.ts → types/SelectOption.d.ts} +0 -0
  267. /package/dist/types/{StoreDataValue.d.ts → types/StoreDataValue.d.ts} +0 -0
  268. /package/dist/types/{Storyblok.d.ts → types/Storyblok.d.ts} +0 -0
  269. /package/dist/types/{TileOption.d.ts → types/TileOption.d.ts} +0 -0
  270. /package/dist/{utils → types/utils}/cjaRouter.d.ts +0 -0
  271. /package/dist/{utils → types/utils}/cjaStore.d.ts +0 -0
  272. /package/dist/{utils → types/utils}/findScrollAncestor.d.ts +0 -0
  273. /package/dist/{utils → types/utils}/generateRoutes.d.ts +0 -0
  274. /package/dist/{utils → types/utils}/getFromUrl.d.ts +0 -0
  275. /package/dist/{utils → types/utils}/getMessages.d.ts +0 -0
  276. /package/dist/{utils → types/utils}/gtm.d.ts +0 -0
  277. /package/dist/{utils → types/utils}/index.d.ts +0 -0
  278. /package/dist/{utils → types/utils}/jsonReviver.d.ts +0 -0
  279. /package/dist/{utils → types/utils}/storyblokLink.d.ts +0 -0
  280. /package/dist/{utils → types/utils}/updateForm.d.ts +0 -0
  281. /package/dist/{utils → types/utils}/uploadFile.d.ts +0 -0
  282. /package/dist/{utils → types/utils}/useGlobalProperties.d.ts +0 -0
  283. /package/dist/{utils → types/utils}/useViewportDetector.d.ts +0 -0
@@ -0,0 +1,196 @@
1
+ <template>
2
+ <InputContainer :layout="'vertical'">
3
+ <div class="tiles-container" :class="[`layout-${layout}`]">
4
+ <div
5
+ v-if="options"
6
+ v-for="(option, idx) in options"
7
+ :key="idx"
8
+ class="tile"
9
+ :class="{
10
+ active: multiselect
11
+ ? value.includes(option.value)
12
+ : option.value == value,
13
+ }"
14
+ @click="$emit('update:modelValue', option.value)"
15
+ v-tippy="option.tooltip ? option.tooltip : ''"
16
+ >
17
+ <div class="image-container" v-if="option.image">
18
+ <img :src="option.image" :alt="option.label" />
19
+ </div>
20
+
21
+ <div
22
+ class="text-wrapper"
23
+ v-if="layout != 'image' || (layout == 'image' && !option.image)"
24
+ >
25
+ <span class="title">{{ option.label }}</span>
26
+ <span class="description" v-if="option.description">
27
+ {{ option.description }}
28
+ </span>
29
+ <div
30
+ class="long-description"
31
+ v-if="option.descriptionLong"
32
+ v-html="option.descriptionLong"
33
+ ></div>
34
+ </div>
35
+ <span v-if="layout == 'list'" class="m-cgg-icon--chevron-right"></span>
36
+ </div>
37
+ </div>
38
+ <InputError :error="errorMessage" v-if="errorMessage && errorDisplay" />
39
+ </InputContainer>
40
+ </template>
41
+
42
+ <script lang="ts" setup>
43
+ import { useField } from "vee-validate";
44
+ import { TileOption } from "../../types/TileOption";
45
+ import InputError from "./structure/InputError.vue";
46
+ import InputContainer from "./structure/InputContainer.vue";
47
+
48
+ const props = withDefaults(
49
+ defineProps<{
50
+ options: TileOption[] | undefined;
51
+ modelValue: any;
52
+ layout?: "list" | "grid" | "image";
53
+ multiselect?: boolean;
54
+ error?: string;
55
+ validation?: any;
56
+ errorDisplay?: boolean;
57
+ }>(),
58
+ {
59
+ layout: "list",
60
+ errorDisplay: true,
61
+ }
62
+ );
63
+
64
+ const { value, errorMessage, meta, validate } = useField(
65
+ "input",
66
+ props.validation,
67
+ { initialValue: props.modelValue }
68
+ );
69
+
70
+ defineExpose({ errorMessage, meta, validate });
71
+
72
+ defineEmits(["update:modelValue"]);
73
+ </script>
74
+
75
+ <style lang="scss" scoped>
76
+ @import "../../assets/shadows.scss";
77
+
78
+ .tiles-container {
79
+ display: grid;
80
+ width: 100%;
81
+ gap: 16px;
82
+
83
+ .tile {
84
+ display: flex;
85
+ flex-direction: row;
86
+ align-items: center;
87
+ gap: 15px;
88
+ padding: 20px;
89
+ border: 1px solid #dedede;
90
+ border-radius: 10px;
91
+ cursor: pointer;
92
+ user-select: none;
93
+ overflow-x: hidden;
94
+ color: #0d2745;
95
+ transition: all 0.3s ease-in-out;
96
+
97
+ @media screen and (min-width: 992px) {
98
+ padding-right: 20px;
99
+ }
100
+
101
+ @mixin activeStyle {
102
+ box-shadow: $box-shadow-m;
103
+ background-color: #f4f9fc;
104
+ border-color: #076b9c;
105
+ }
106
+
107
+ &.active {
108
+ @include activeStyle;
109
+ }
110
+
111
+ @media (any-hover: hover) {
112
+ &:hover {
113
+ @include activeStyle;
114
+ }
115
+ }
116
+
117
+ .text-wrapper {
118
+ font-size: 18px;
119
+ line-height: 22px;
120
+
121
+ .title {
122
+ font-weight: 700;
123
+ }
124
+ }
125
+
126
+ .m-cgg-icon--chevron-right {
127
+ background: none;
128
+ border-radius: 0;
129
+ padding: 0;
130
+ color: inherit;
131
+ margin: 0;
132
+ font-size: 18px;
133
+ font-weight: 700;
134
+ margin-left: auto;
135
+ }
136
+ }
137
+
138
+ &.layout-list,
139
+ &.layout-grid {
140
+ .image-container img {
141
+ height: 28px;
142
+ width: 28px;
143
+
144
+ @media screen and (min-width: 992px) {
145
+ height: 32px;
146
+ width: 32px;
147
+ }
148
+ }
149
+ }
150
+
151
+ &.layout-list {
152
+ grid-template-columns: 1fr;
153
+
154
+ .text-wrapper {
155
+ .description:before {
156
+ content: "-";
157
+ margin: 0 5px;
158
+ }
159
+ }
160
+ }
161
+
162
+ &.layout-grid {
163
+ .text-wrapper {
164
+ display: flex;
165
+ flex-direction: column;
166
+ gap: 5px;
167
+
168
+ .title {
169
+ font-size: 15px;
170
+ line-height: 18px;
171
+ }
172
+
173
+ .description {
174
+ font-size: 12px;
175
+ line-height: 12px;
176
+ }
177
+ }
178
+ }
179
+
180
+ &.layout-image {
181
+ .tile {
182
+ justify-content: center;
183
+ text-align: center;
184
+
185
+ .image-container img {
186
+ display: block;
187
+ max-width: 100%;
188
+ }
189
+ }
190
+ }
191
+ }
192
+
193
+ .input-error {
194
+ text-align: center;
195
+ }
196
+ </style>
@@ -0,0 +1,144 @@
1
+ <template>
2
+ <InputContainer v-bind="{ layout }">
3
+ <InputTitle v-bind="{ title, tooltip, size, disabled }" v-if="title" />
4
+
5
+ <div
6
+ class="input-wrapper"
7
+ :class="{
8
+ error: errorMessage,
9
+ }"
10
+ >
11
+ <input
12
+ :class="[`size-${size}`]"
13
+ v-maska
14
+ :data-maska="mask"
15
+ :id="id"
16
+ :inputmode="inputmode"
17
+ :placeholder="placeholder && placeholder"
18
+ :type="type"
19
+ :value="value"
20
+ :min="min"
21
+ :max="max"
22
+ @input="
23
+ $emit('update:modelValue', (<HTMLInputElement>$event.target).value)
24
+ "
25
+ :disabled="disabled"
26
+ :autocomplete="autocomplete"
27
+ ref="inputEl"
28
+ />
29
+
30
+ <div class="input-suffix" ref="suffixEl" v-if="suffix">
31
+ {{ suffix }}
32
+ </div>
33
+ </div>
34
+
35
+ <InputError :error="errorMessage" v-if="errorMessage && errorDisplay" />
36
+ </InputContainer>
37
+ </template>
38
+
39
+ <script lang="ts" setup>
40
+ import { useField } from "vee-validate";
41
+ import { InputHTMLAttributes, onMounted, ref } from "vue";
42
+ import { vMaska } from "maska";
43
+ import InputTitle from "./structure/InputTitle.vue";
44
+ import InputError from "./structure/InputError.vue";
45
+ import InputContainer from "./structure/InputContainer.vue";
46
+
47
+ const props = withDefaults(
48
+ defineProps<{
49
+ title?: string;
50
+ tooltip?: string;
51
+ placeholder?: InputHTMLAttributes["placeholder"];
52
+ layout?: "vertical" | "horizontal";
53
+ size?: "sm" | "md" | "lg";
54
+ validation?: any;
55
+ errorDisplay?: boolean;
56
+ modelValue: InputHTMLAttributes["value"];
57
+ id?: InputHTMLAttributes["id"];
58
+ disabled?: InputHTMLAttributes["disabled"];
59
+ mask?: string;
60
+ inputmode?: InputHTMLAttributes["inputmode"];
61
+ type?: InputHTMLAttributes["type"];
62
+ autocomplete?: InputHTMLAttributes["autocomplete"];
63
+ suffix?: string;
64
+ min?: InputHTMLAttributes["min"];
65
+ max?: InputHTMLAttributes["max"];
66
+ }>(),
67
+ {
68
+ layout: "vertical",
69
+ size: "md",
70
+ type: "text",
71
+ errorDisplay: true,
72
+ }
73
+ );
74
+
75
+ const { value, errorMessage, meta, validate } = useField(
76
+ "input",
77
+ props.validation,
78
+ { initialValue: props.modelValue }
79
+ );
80
+ const inputEl = ref();
81
+ const suffixEl = ref();
82
+
83
+ onMounted(() => {
84
+ if (props.suffix) {
85
+ const inputPadding = parseInt(
86
+ window.getComputedStyle(inputEl.value).getPropertyValue("padding-right")
87
+ );
88
+ const suffixWidth = suffixEl.value.getBoundingClientRect().width;
89
+
90
+ inputEl.value.style.paddingRight = `${suffixWidth + inputPadding * 2}px`;
91
+ }
92
+ });
93
+
94
+ defineExpose({ errorMessage, meta, validate });
95
+
96
+ const emit = defineEmits(["update:modelValue"]);
97
+ </script>
98
+
99
+ <style lang="scss" scoped>
100
+ @import "../../assets/forms.scss";
101
+
102
+ .input-wrapper {
103
+ position: relative;
104
+
105
+ input {
106
+ @include input-template;
107
+
108
+ &:focus {
109
+ + .input-suffix {
110
+ color: #0d2745;
111
+ }
112
+ }
113
+
114
+ &[type="number"] {
115
+ /* Firefox */
116
+ -moz-appearance: textfield;
117
+
118
+ /* Chrome, Safari, Edge, Opera */
119
+ &::-webkit-outer-spin-button,
120
+ &::-webkit-inner-spin-button {
121
+ -webkit-appearance: none;
122
+ margin: 0;
123
+ }
124
+ }
125
+ }
126
+
127
+ &.error {
128
+ input {
129
+ @include input-error;
130
+ }
131
+ }
132
+
133
+ .input-suffix {
134
+ position: absolute;
135
+ top: 50%;
136
+ transform: translateY(-50%);
137
+ right: 8px;
138
+ line-height: 11px;
139
+ font-size: 11px;
140
+ color: #9fabbc;
141
+ transition: color 0.1s ease-in;
142
+ }
143
+ }
144
+ </style>
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <div
3
+ class="tile-checkbox-container"
4
+ :class="{ checked: modelValue }"
5
+ @click="$emit('update:modelValue', !modelValue)"
6
+ >
7
+ <div class="tile-header">
8
+ <div class="tile-image" v-if="image">
9
+ <img :src="image" />
10
+ </div>
11
+ <div class="tile-label">
12
+ {{ label }}
13
+ </div>
14
+ <div class="tile-checkbox">
15
+ <span class="m-cgg-icon--check2"></span>
16
+ </div>
17
+ </div>
18
+ <div class="tile-description" v-html="description" v-if="description"></div>
19
+ </div>
20
+ </template>
21
+
22
+ <script lang="ts" setup>
23
+ defineProps<{
24
+ image?: string;
25
+ label: string;
26
+ description?: string;
27
+ modelValue: boolean;
28
+ }>();
29
+
30
+ defineEmits(["update:modelValue"]);
31
+ </script>
32
+
33
+ <style lang="scss" scoped>
34
+ .tile-checkbox-container {
35
+ cursor: pointer;
36
+ background: #ffffff;
37
+ border: 1px solid #dedede;
38
+ border-radius: 8px;
39
+ padding: 15px;
40
+ box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
41
+ transition: all 0.2s ease-in-out;
42
+
43
+ &.checked {
44
+ border: 1px solid #076b9c;
45
+ background-color: #f4f9fc;
46
+
47
+ .tile-header .tile-checkbox {
48
+ background-color: #076b9c;
49
+ border: 2px solid #076b9c;
50
+
51
+ span {
52
+ opacity: 1;
53
+ }
54
+ }
55
+ }
56
+
57
+ .tile-header {
58
+ display: flex;
59
+ flex-direction: row;
60
+ align-items: flex-start;
61
+ gap: 10px;
62
+
63
+ .tile-label {
64
+ flex-grow: 1;
65
+ font-weight: 700;
66
+ font-size: 16px;
67
+ line-height: 19px;
68
+ color: #155072;
69
+ }
70
+
71
+ .tile-checkbox {
72
+ display: flex;
73
+ justify-content: center;
74
+ align-items: center;
75
+ border: 2px solid #717171;
76
+ width: 18px;
77
+ height: 18px;
78
+ border-radius: 4px;
79
+ transition: all 0.2s ease-in-out;
80
+
81
+ span {
82
+ transition: all 0.2s ease-in-out;
83
+ line-height: 14px;
84
+ opacity: 0;
85
+ color: #fff;
86
+ }
87
+ }
88
+ }
89
+
90
+ .tile-description {
91
+ font-size: 14px;
92
+ line-height: 17px;
93
+ margin-top: 8px;
94
+ }
95
+ }
96
+ </style>
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <div class="input-container">
3
+ <div
4
+ class="input-wrapper"
5
+ :class="[`size-${size}`, { active: modelValue, 'full-width': fullWidth }]"
6
+ @click="$emit('update:modelValue', !modelValue)"
7
+ >
8
+ <div class="label">
9
+ {{ label }}
10
+ </div>
11
+ <div class="toggler">
12
+ <div class="toggle"></div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </template>
17
+
18
+ <script lang="ts" setup>
19
+ import { InputHTMLAttributes } from "vue";
20
+
21
+ withDefaults(
22
+ defineProps<{
23
+ size?: "sm" | "md" | "lg";
24
+ disabled?: InputHTMLAttributes["disabled"];
25
+ validation?: any;
26
+ label: string;
27
+ modelValue: boolean;
28
+ fullWidth: boolean;
29
+ error?: string;
30
+ errorDisplay?: boolean;
31
+ }>(),
32
+ {
33
+ size: "md",
34
+ disabled: false,
35
+ errorDisplay: true,
36
+ }
37
+ );
38
+
39
+ defineEmits(["update:modelValue"]);
40
+ </script>
41
+
42
+ <style lang="scss" scoped>
43
+ @import "../../assets/forms.scss";
44
+
45
+ .input-wrapper {
46
+ display: flex;
47
+ flex-direction: row;
48
+ align-items: center;
49
+ gap: 10px;
50
+ @include input-title;
51
+
52
+ &.full-width {
53
+ justify-content: space-between;
54
+ }
55
+
56
+ .toggler {
57
+ position: relative;
58
+ width: 36px;
59
+ height: 14px;
60
+ border-radius: 7px;
61
+ background-color: #dedcdb;
62
+ cursor: pointer;
63
+ transition: all 0.2s ease-in-out;
64
+
65
+ .toggle {
66
+ position: absolute;
67
+ top: -3px;
68
+ left: 0;
69
+ width: 20px;
70
+ height: 20px;
71
+ border-radius: 50%;
72
+ background-color: #9fabbc;
73
+ box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
74
+ transition: all 0.2s ease-in-out;
75
+ }
76
+ }
77
+
78
+ &.active {
79
+ .toggler {
80
+ background-color: #e5f0f5;
81
+ .toggle {
82
+ background-color: #076b9c;
83
+ left: 16px;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ </style>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div class="input-container" :class="[layout]">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ defineProps<{
9
+ layout?: "vertical" | "horizontal";
10
+ }>();
11
+ </script>
12
+
13
+ <style lang="scss" scoped>
14
+ .input-container {
15
+ display: flex;
16
+
17
+ &.vertical {
18
+ flex-direction: column;
19
+ gap: 8px;
20
+ }
21
+
22
+ &.horizontal {
23
+ flex-direction: row;
24
+ align-items: center;
25
+ gap: 16px;
26
+ }
27
+ }
28
+ </style>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div class="input-error">
3
+ {{ error }}
4
+ </div>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ defineProps<{
9
+ error: string;
10
+ }>();
11
+ </script>
12
+
13
+ <style lang="scss" scoped>
14
+ @import "../../../assets/breakpoints.scss";
15
+
16
+ .input-error {
17
+ color: #ff533f;
18
+ font-size: 14px;
19
+ line-height: 16px;
20
+
21
+ @media screen and (min-width: $break-md-min) {
22
+ font-size: 16px;
23
+ line-height: 18px;
24
+ }
25
+ }
26
+ </style>
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <div
3
+ class="input-title"
4
+ :class="[`size-${size}`, { disabled: disabled }]"
5
+ v-if="title"
6
+ >
7
+ <span>{{ title }}</span>
8
+ <span
9
+ v-if="tooltip"
10
+ class="tooltip m-cgg-icon--help"
11
+ v-tippy="tooltip"
12
+ ></span>
13
+ </div>
14
+ </template>
15
+
16
+ <script lang="ts" setup>
17
+ import { InputHTMLAttributes } from "vue";
18
+
19
+ defineProps<{
20
+ title: string;
21
+ tooltip?: string;
22
+ disabled?: InputHTMLAttributes["disabled"];
23
+ size?: "sm" | "md" | "lg";
24
+ }>();
25
+ </script>
26
+
27
+ <style lang="scss" scoped>
28
+ @import "../../../assets/breakpoints.scss";
29
+ @import "../../../assets/forms.scss";
30
+
31
+ .input-title {
32
+ @include input-title;
33
+
34
+ display: flex;
35
+ justify-content: space-between;
36
+ gap: 10px;
37
+ font-weight: 700;
38
+
39
+ .tooltip {
40
+ font-size: 18px;
41
+ color: #076b9c;
42
+
43
+ @media screen and (min-width: $break-md-min) {
44
+ font-size: 20px;
45
+ }
46
+ }
47
+
48
+ &.disabled {
49
+ color: #dedede;
50
+ }
51
+ }
52
+ </style>
@@ -0,0 +1,73 @@
1
+ import Modal from "./structural/Modal.vue";
2
+ import CjaButton from "./structural/CjaButton.vue";
3
+ import LoadingSpinner from "./structural/LoadingSpinner.vue";
4
+ import ContentTabs from "./structural/ContentTabs.vue";
5
+ import InfoMessage from "./structural/InfoMessage.vue";
6
+ import Scaffold from "./structural/Scaffold.vue";
7
+ import GridContainer from "./structural/GridContainer.vue";
8
+ import GridItem from "./structural/GridItem.vue";
9
+ import CollapseContainer from "./structural/CollapseContainer.vue";
10
+ import FixedContainer from "./structural/FixedContainer.vue";
11
+
12
+ import TextInput from "./forms/TextInput.vue";
13
+ import PhoneInput from "./forms/PhoneInput.vue";
14
+ import CheckboxInput from "./forms/CheckboxInput.vue";
15
+ import RadioInputList from "./forms/RadioInputList.vue";
16
+ import TileCheckboxInput from "./forms/TileCheckboxInput.vue";
17
+ import SelectInput from "./forms/SelectInput.vue";
18
+ import FileInput from "./forms/FileInput.vue";
19
+ import NumberInput from "./forms/NumberInput.vue";
20
+ import ToggleInput from "./forms/ToggleInput.vue";
21
+ import CurrencyInput from "./forms/CurrencyInput.vue";
22
+ import SelectionTiles from "./forms/SelectionTiles.vue";
23
+
24
+ import JourneyMacroSteps from "./composite/JourneyMacroSteps.vue";
25
+ import FunnelLayout from "./composite/FunnelLayout.vue";
26
+ import FunnelSubmit from "./composite/FunnelSubmit.vue";
27
+ import FunnelSummary from "./composite/FunnelSummary.vue";
28
+ import FunnelTitle from "./composite/FunnelTitle.vue";
29
+ import ResultsLayout from "./composite/ResultsLayout.vue";
30
+ import CheckoutCrossSell from "./composite/CheckoutCrossSell.vue";
31
+ import CheckoutLayout from "./composite/CheckoutLayout.vue";
32
+ import CheckoutMilestones from "./composite/CheckoutMilestones.vue";
33
+ import ProductDetails from "./composite/ProductDetails.vue";
34
+ import CjaMenuBar from "./composite/CjaMenuBar.vue";
35
+ import CjaFooter from "./composite/CjaFooter.vue";
36
+ import InfoShowcase from "./composite/InfoShowcase.vue";
37
+
38
+ export {
39
+ Modal,
40
+ CjaButton,
41
+ TextInput,
42
+ PhoneInput,
43
+ RadioInputList,
44
+ CheckboxInput,
45
+ TileCheckboxInput,
46
+ NumberInput,
47
+ SelectInput,
48
+ CurrencyInput,
49
+ SelectionTiles,
50
+ LoadingSpinner,
51
+ Scaffold,
52
+ ProductDetails,
53
+ ToggleInput,
54
+ FileInput,
55
+ ContentTabs,
56
+ CollapseContainer,
57
+ GridContainer,
58
+ GridItem,
59
+ FunnelLayout,
60
+ FunnelSubmit,
61
+ FunnelSummary,
62
+ FunnelTitle,
63
+ ResultsLayout,
64
+ CheckoutCrossSell,
65
+ CheckoutLayout,
66
+ CheckoutMilestones,
67
+ JourneyMacroSteps,
68
+ CjaMenuBar,
69
+ CjaFooter,
70
+ FixedContainer,
71
+ InfoMessage,
72
+ InfoShowcase,
73
+ };