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,70 @@
1
+ <template>
2
+ <div :class="[`grid-container-${size}`]">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ withDefaults(
9
+ defineProps<{
10
+ size?: 1 | 2 | 3;
11
+ }>(),
12
+ {
13
+ size: 1,
14
+ }
15
+ );
16
+ </script>
17
+
18
+ <style lang="scss" scoped>
19
+ @import "../../assets/breakpoints.scss";
20
+ @import "../../assets/grid.scss";
21
+
22
+ .grid-container-1,
23
+ .grid-container-2,
24
+ .grid-container-3 {
25
+ display: grid;
26
+ column-gap: $grid-column-gap-sm;
27
+ padding-left: $grid-side-padding-sm;
28
+ padding-right: $grid-side-padding-sm;
29
+
30
+ @media screen and (min-width: $break-md-min) and (max-width: $break-md-max) {
31
+ grid-template-columns: $grid-columns-md;
32
+ column-gap: $grid-column-gap-md;
33
+ padding-left: $grid-side-padding-md;
34
+ padding-right: $grid-side-padding-md;
35
+ }
36
+
37
+ @media screen and (min-width: 1024px) {
38
+ grid-template-columns: $grid-columns-lg;
39
+ column-gap: $grid-column-gap-lg;
40
+ padding-left: $grid-side-padding-lg;
41
+ padding-right: $grid-side-padding-lg;
42
+ }
43
+
44
+ @media screen and (min-width: 1200px) {
45
+ padding-left: $grid-side-padding-xl;
46
+ padding-right: $grid-side-padding-xl;
47
+ max-width: 1440px;
48
+ margin-left: auto;
49
+ margin-right: auto;
50
+ }
51
+ }
52
+
53
+ .grid-container-1 {
54
+ @media screen and (max-width: 767px) {
55
+ grid-template-columns: $grid-columns-sm-1;
56
+ }
57
+ }
58
+
59
+ .grid-container-2 {
60
+ @media screen and (max-width: 767px) {
61
+ grid-template-columns: $grid-columns-sm-2;
62
+ }
63
+ }
64
+
65
+ .grid-container-3 {
66
+ @media screen and (max-width: 767px) {
67
+ grid-template-columns: $grid-columns-sm-3;
68
+ }
69
+ }
70
+ </style>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <div
3
+ :class="{
4
+ [`grid-item-sm-${sizeSm}`]: sizeSm,
5
+ [`grid-item-md-${sizeMd}`]: sizeMd,
6
+ [`grid-item-lg-${sizeLg}`]: sizeLg,
7
+ }"
8
+ >
9
+ <slot></slot>
10
+ </div>
11
+ </template>
12
+
13
+ <script lang="ts" setup>
14
+ defineProps<{
15
+ sizeSm?: 1 | 2 | 3 | 4;
16
+ sizeMd?: 1 | 2 | 3 | 4;
17
+ sizeLg?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
18
+ }>();
19
+ </script>
20
+
21
+ <style lang="scss" scoped>
22
+ @import "../../assets/breakpoints.scss";
23
+
24
+ @for $i from 0 to 4 {
25
+ .grid-item-sm-#{$i + 1} {
26
+ @media screen and (max-width: 767px) {
27
+ grid-column: span #{$i + 1};
28
+ }
29
+ }
30
+ }
31
+
32
+ @for $i from 0 to 4 {
33
+ .grid-item-md-#{$i + 1} {
34
+ @media screen and (min-width: $break-md-min) and (max-width: $break-md-max) {
35
+ grid-column: span #{$i + 1};
36
+ }
37
+ }
38
+ }
39
+
40
+ @for $i from 0 to 12 {
41
+ .grid-item-lg-#{$i + 1} {
42
+ @media screen and (min-width: 1024px) {
43
+ grid-column: span #{$i + 1};
44
+ }
45
+ }
46
+ }
47
+ </style>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <div
3
+ class="info-message"
4
+ :class="[
5
+ `color-${color}`,
6
+ { 'has-icon': $slots.icon, 'has-toggle': toggle },
7
+ ]"
8
+ >
9
+ <slot name="icon"></slot>
10
+ <div class="text-container">
11
+ <h4 v-if="title">{{ title }}</h4>
12
+ <p v-if="description" v-html="description"></p>
13
+ </div>
14
+ <div class="btn-container" v-if="toggle">
15
+ <button class="m-cgg-icon--cross2" @click="$emit('btn:close')"></button>
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <script lang="ts" setup>
21
+ import { useViewportDetector } from "../../utils";
22
+
23
+ defineProps<{
24
+ title?: string;
25
+ description?: string;
26
+ toggle?: boolean;
27
+ color: "blue" | "green";
28
+ }>();
29
+
30
+ const { activeViewport } = useViewportDetector();
31
+
32
+ defineEmits(["btn:close"]);
33
+ </script>
34
+
35
+ <style lang="scss" scoped>
36
+ @import "../../assets/breakpoints.scss";
37
+
38
+ .info-message {
39
+ display: grid;
40
+ grid-template-columns: 1fr;
41
+ gap: 16px;
42
+ padding: 8px 16px;
43
+ border: 2px solid #000;
44
+ border-radius: 16px;
45
+
46
+ @media screen and (min-width: $break-md-min) {
47
+ padding: 16px 24px;
48
+ }
49
+
50
+ &.has-icon {
51
+ grid-template-columns: auto 1fr;
52
+ }
53
+
54
+ &.has-toggle {
55
+ grid-template-columns: 1fr 18px;
56
+
57
+ &.has-icon {
58
+ grid-template-columns: auto 1fr 18px;
59
+ }
60
+ }
61
+
62
+ &.color-green {
63
+ background-color: #f8faf5;
64
+ border-color: #c4dab1;
65
+ color: #56924b;
66
+ }
67
+
68
+ &.color-blue {
69
+ background-color: #f4f9fc;
70
+ border-color: #076b9c;
71
+ color: #076b9c;
72
+ }
73
+
74
+ .text-container {
75
+ display: flex;
76
+ flex-direction: column;
77
+ gap: 16px;
78
+
79
+ h4 {
80
+ font-weight: 700;
81
+ font-size: 16px;
82
+ line-height: 20px;
83
+ margin: 0;
84
+ }
85
+
86
+ p {
87
+ font-size: 13px;
88
+ line-height: 17px;
89
+ margin: 0;
90
+ }
91
+ }
92
+
93
+ .btn-container {
94
+ button {
95
+ padding: 0;
96
+ border: none;
97
+ font-size: 18px;
98
+ line-height: 18px;
99
+ color: inherit;
100
+ cursor: pointer;
101
+ background: none;
102
+ }
103
+ }
104
+ }
105
+ </style>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div
3
+ class="spinner"
4
+ :style="{
5
+ width: `${size}px`,
6
+ height: `${size}px`,
7
+ borderWidth: `${border}px`,
8
+ }"
9
+ ></div>
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+ defineProps<{
14
+ size?: number;
15
+ border?: number;
16
+ }>();
17
+ </script>
18
+
19
+ <style lang="scss" scoped>
20
+ .spinner {
21
+ width: 80px;
22
+ height: 80px;
23
+ border: 7px solid #b5e187;
24
+ border-top: 7px solid rgba(255, 255, 255, 0.2);
25
+ border-radius: 50%;
26
+ animation: spin 1s infinite;
27
+ animation-timing-function: linear;
28
+ }
29
+
30
+ @keyframes spin {
31
+ from {
32
+ transform: rotate(0deg);
33
+ }
34
+
35
+ to {
36
+ transform: rotate(360deg);
37
+ }
38
+ }
39
+ </style>
@@ -0,0 +1,209 @@
1
+ <template>
2
+ <Teleport to="body">
3
+ <Transition name="fade">
4
+ <div v-show="active" class="modal-backdrop" :style="{ ...cssVars }">
5
+ <div class="modal-overlay" @click.self="closeModal">
6
+ <div class="modal-container" ref="modalContainer">
7
+ <div class="modal-header" :class="{ 'has-title': $slots.header }">
8
+ <div class="modal-header-wrapper">
9
+ <slot name="header"></slot>
10
+ </div>
11
+ <button
12
+ type="button"
13
+ class="btn-close m-cgg-icon--cross"
14
+ aria-label="Close"
15
+ @click="closeModal"
16
+ ></button>
17
+ </div>
18
+ <div class="modal-body">
19
+ <slot name="body"></slot>
20
+ </div>
21
+ <div class="modal-footer" v-if="$slots.footer">
22
+ <slot name="footer"></slot>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </Transition>
28
+ </Teleport>
29
+ </template>
30
+
31
+ <script lang="ts" setup>
32
+ import { ref, watch, computed } from "vue";
33
+
34
+ const props = withDefaults(
35
+ defineProps<{
36
+ maxWidth?: {
37
+ md?: string;
38
+ lg?: string;
39
+ xl?: string;
40
+ };
41
+ }>(),
42
+ {
43
+ maxWidth: () => ({
44
+ md: "min(calc(100% - 48px), 768px)",
45
+ lg: "min(calc(100% - 48px), 1024px)",
46
+ xl: "1024px",
47
+ }),
48
+ }
49
+ );
50
+
51
+ const active = ref(false);
52
+ const modalContainer = ref();
53
+
54
+ const cssVars = computed(() => ({
55
+ "--md-max-width": props.maxWidth.md,
56
+ "--lg-max-width": props.maxWidth.lg,
57
+ "--xl-max-width": props.maxWidth.xl,
58
+ }));
59
+
60
+ const emit = defineEmits(["close"]);
61
+
62
+ watch(
63
+ () => active.value,
64
+ (active) => {
65
+ document.querySelectorAll("html, body").forEach((el) => {
66
+ (el as HTMLElement).style.overflow = active ? "hidden" : "";
67
+ });
68
+ }
69
+ );
70
+
71
+ const openModal = () => {
72
+ active.value = true;
73
+ };
74
+
75
+ const closeModal = () => {
76
+ active.value = false;
77
+ emit("close");
78
+ };
79
+
80
+ const toggleModal = () => {
81
+ active.value = !active.value;
82
+
83
+ if (!active.value) {
84
+ emit("close");
85
+ }
86
+ };
87
+
88
+ defineExpose({ active, openModal, closeModal, toggleModal });
89
+ </script>
90
+
91
+ <style lang="scss" scoped>
92
+ @import "../../assets/breakpoints.scss";
93
+ @import "../../assets/backdrop.scss";
94
+
95
+ .modal-backdrop {
96
+ @include backdrop;
97
+ }
98
+
99
+ .modal-overlay {
100
+ position: fixed;
101
+ top: 0;
102
+ left: 0;
103
+ width: 100%;
104
+ height: 100%;
105
+ z-index: 13;
106
+ }
107
+
108
+ .modal-container {
109
+ position: absolute;
110
+ top: 0;
111
+ left: 0;
112
+ height: 100%;
113
+ background: #ffffff;
114
+ padding: 20px;
115
+ width: 100%;
116
+ box-sizing: border-box;
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 16px;
120
+
121
+ @media screen and (min-width: $break-md-min) {
122
+ top: 50%;
123
+ left: 50%;
124
+ transform: translateY(-50%) translateX(-50%);
125
+ max-width: var(--md-max-width);
126
+ max-height: calc(100% - 48px);
127
+ border-radius: 8px;
128
+ padding: 20px 40px;
129
+ height: auto;
130
+ }
131
+
132
+ @media screen and (min-width: $break-lg-min) {
133
+ max-width: var(--lg-max-width);
134
+ }
135
+
136
+ @media screen and (min-width: $break-xl-min) {
137
+ max-width: var(--xl-max-width);
138
+ }
139
+
140
+ .modal-header {
141
+ display: grid;
142
+ grid-template-columns: 1fr 20px;
143
+ padding: 0;
144
+
145
+ &:before,
146
+ &:after {
147
+ content: none;
148
+ }
149
+
150
+ &.has-title {
151
+ padding: 0 0 8px 0;
152
+ border-bottom: 1px solid #dedede;
153
+ }
154
+
155
+ .modal-header-wrapper {
156
+ font-size: 16px;
157
+ line-height: 20px;
158
+ font-weight: 700;
159
+ }
160
+
161
+ .btn-close {
162
+ background: none;
163
+ border: none;
164
+ padding: 0;
165
+ outline: 0;
166
+ height: 20px;
167
+ width: 20px;
168
+ cursor: pointer;
169
+ z-index: 2;
170
+ font-size: 16px;
171
+ line-height: 20px;
172
+
173
+ &:focus {
174
+ outline: 0;
175
+ }
176
+ }
177
+ }
178
+
179
+ .modal-body {
180
+ font-size: 14px;
181
+ line-height: 18px;
182
+ overflow-y: auto;
183
+ flex-grow: 1;
184
+ height: auto;
185
+ }
186
+
187
+ .modal-footer {
188
+ border-top: 1px solid #dedede;
189
+ padding: 8px 0 0;
190
+
191
+ :deep(.button-container) {
192
+ display: flex;
193
+ flex-direction: row;
194
+ justify-content: flex-end;
195
+ gap: 8px;
196
+ }
197
+ }
198
+ }
199
+
200
+ .fade-enter-from,
201
+ .fade-leave-to {
202
+ opacity: 0;
203
+ }
204
+
205
+ .fade-enter-to,
206
+ .fade-leave-from {
207
+ opacity: 1;
208
+ }
209
+ </style>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <slot></slot>
3
+ </template>
@@ -0,0 +1 @@
1
+ export const MAGIC_NUM = 100
@@ -0,0 +1,5 @@
1
+ import * as MyConstants from './MyConstants'
2
+
3
+ export {
4
+ MyConstants
5
+ }
package/src/env.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="@histoire/plugin-vue/components" />
3
+
4
+ export {};
5
+
6
+ declare module "*.vue" {
7
+ import { DefineComponent } from "vue";
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
9
+ const component: DefineComponent<{}, {}, any>;
10
+ export default component;
11
+ }
package/src/index.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { App } from "vue";
2
+ import * as components from "./components";
3
+ import VueTippy from "vue-tippy";
4
+ import "./assets/main.scss";
5
+ import "./assets/iconia/style.scss";
6
+
7
+ type Options = {
8
+ apiURL: string;
9
+ imageURL: string;
10
+ providerImageURL: string;
11
+ };
12
+
13
+ const install = (app: App, options: Options) => {
14
+ app.config.globalProperties.apiURL = options.apiURL;
15
+ app.config.globalProperties.imageURL = options.imageURL;
16
+ app.config.globalProperties.providerImageURL = options.providerImageURL;
17
+
18
+ for (const key in components) {
19
+ app.component(key, components[key]);
20
+ }
21
+
22
+ app.use(VueTippy, {
23
+ defaultProps: { theme: "light-border", allowHTML: true },
24
+ });
25
+ };
26
+
27
+ export default { install };
28
+ export * from "./types";
29
+ export * from "./components";
30
+ export * from "./constants";
31
+ export * from "./utils";