@mozaic-ds/web-components 0.11.1 → 0.12.0-beta.0

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 (335) hide show
  1. package/package.json +5 -5
  2. package/public/ClickOutside-63071e7a.js +15 -1
  3. package/public/ClickOutside-63071e7a.js.map +1 -1
  4. package/public/DataTableDefaultAction.nested-46712849.js +762 -0
  5. package/public/DataTableDefaultAction.nested-46712849.js.map +1 -0
  6. package/public/DataTableUtilities-313a448d.js +386 -0
  7. package/public/DataTableUtilities-313a448d.js.map +1 -0
  8. package/public/EventForward-8492ff62.js +109 -1
  9. package/public/EventForward-8492ff62.js.map +1 -1
  10. package/public/EventHandler-02058705.js +15 -1
  11. package/public/EventHandler-02058705.js.map +1 -1
  12. package/public/adeo/components/header/Header.js +1 -1
  13. package/public/adeo/components/header/Header.js.map +1 -1
  14. package/public/array-5b770a93.js +13 -1
  15. package/public/array-5b770a93.js.map +1 -1
  16. package/public/axis-fbc0f7b5.js +174 -1
  17. package/public/axis-fbc0f7b5.js.map +1 -1
  18. package/public/band-d7a07d2c.js +186 -1
  19. package/public/band-d7a07d2c.js.map +1 -1
  20. package/public/bricoman/components/header/Header.js +1 -1
  21. package/public/bricoman/components/header/Header.js.map +1 -1
  22. package/public/bundle.js +56 -60
  23. package/public/components/accordion/Accordion.js +365 -1
  24. package/public/components/accordion/Accordion.js.map +1 -1
  25. package/public/components/autocomplete/Autocomplete.js +1515 -1
  26. package/public/components/autocomplete/Autocomplete.js.map +1 -1
  27. package/public/components/autocomplete/Autocomplete.svelte +20 -41
  28. package/public/components/badge/Badge.js +155 -1
  29. package/public/components/badge/Badge.js.map +1 -1
  30. package/public/components/badge/Badge.nested.js +101 -1
  31. package/public/components/badge/Badge.nested.js.map +1 -1
  32. package/public/components/breadcrumb/Breadcrumb.js +372 -1
  33. package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
  34. package/public/components/breadcrumb/Breadcrumb.nested.js +319 -1
  35. package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
  36. package/public/components/button/Button.js +1141 -1
  37. package/public/components/button/Button.js.map +1 -1
  38. package/public/components/button/Button.nested.js +1005 -0
  39. package/public/components/button/Button.nested.js.map +1 -0
  40. package/public/components/button/Button.nested.svelte +173 -0
  41. package/public/components/button/Button.svelte +2 -2
  42. package/public/components/card/Card.js +369 -1
  43. package/public/components/card/Card.js.map +1 -1
  44. package/public/components/carousel/Carousel.js +710 -0
  45. package/public/components/carousel/Carousel.js.map +1 -0
  46. package/public/components/carousel/Carousel.svelte +408 -0
  47. package/public/components/carousel/CarouselCard.nested.js +140 -0
  48. package/public/components/carousel/CarouselCard.nested.js.map +1 -0
  49. package/public/components/carousel/carousel.types.d.ts +20 -0
  50. package/public/components/carousel/carousel.types.d.ts.map +1 -0
  51. package/public/components/carouselcard/CarouselCard.nested.svelte +54 -0
  52. package/public/components/chart/BarChart.js +583 -1
  53. package/public/components/chart/BarChart.js.map +1 -1
  54. package/public/components/chart/Donut.js +1189 -1
  55. package/public/components/chart/Donut.js.map +1 -1
  56. package/public/components/chart/GroupedBarChart.js +750 -1
  57. package/public/components/chart/GroupedBarChart.js.map +1 -1
  58. package/public/components/chart/LineChart.js +1731 -1
  59. package/public/components/chart/LineChart.js.map +1 -1
  60. package/public/components/chart/Radar.js +729 -1
  61. package/public/components/chart/Radar.js.map +1 -1
  62. package/public/components/chart/StackedBarChart.js +745 -1
  63. package/public/components/chart/StackedBarChart.js.map +1 -1
  64. package/public/components/checkbox/Checkbox.js +307 -1
  65. package/public/components/checkbox/Checkbox.js.map +1 -1
  66. package/public/components/checkboxgroup/checkboxGroup.js +404 -1
  67. package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
  68. package/public/components/checkboxgroup/checkboxgroup.types.d.ts.map +1 -1
  69. package/public/components/datatable/DataTable.js +3098 -1
  70. package/public/components/datatable/DataTable.js.map +1 -1
  71. package/public/components/datatable/DataTable.svelte +19 -44
  72. package/public/components/datatable/DataTableDefaultAction.nested.js +4 -1
  73. package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
  74. package/public/components/datatable/DataTableDefaultEdtion.nested.js +164 -1
  75. package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
  76. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +380 -1
  77. package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
  78. package/public/components/datatable/DataTableDefaultSelection.nested.js +424 -1
  79. package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
  80. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +263 -1
  81. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
  82. package/public/components/datatable/DataTableFooter.nested.js +637 -1
  83. package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
  84. package/public/components/datatable/data.d.ts.map +1 -1
  85. package/public/components/datatable/datatable.types.d.ts +2 -16
  86. package/public/components/datatable/datatable.types.d.ts.map +1 -1
  87. package/public/components/datatabledefaultaction/DataTableDefaultAction.nested.svelte +0 -18
  88. package/public/components/dropdown/Dropdown.js +1426 -1
  89. package/public/components/dropdown/Dropdown.js.map +1 -1
  90. package/public/components/field/Field.js +375 -1
  91. package/public/components/field/Field.js.map +1 -1
  92. package/public/components/fileuploader/FileUploader.js +603 -1
  93. package/public/components/fileuploader/FileUploader.js.map +1 -1
  94. package/public/components/fileuploader/ResultFile.nested.js +344 -1
  95. package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
  96. package/public/components/flag/Flag.js +174 -1
  97. package/public/components/flag/Flag.js.map +1 -1
  98. package/public/components/header/Header.js +918 -1
  99. package/public/components/header/Header.js.map +1 -1
  100. package/public/components/header/Header.types.d.ts.map +1 -1
  101. package/public/components/hero/Hero.js +271 -1
  102. package/public/components/hero/Hero.js.map +1 -1
  103. package/public/components/kpi/Kpi.js +404 -1
  104. package/public/components/kpi/Kpi.js.map +1 -1
  105. package/public/components/layer/Layer.js +471 -1
  106. package/public/components/layer/Layer.js.map +1 -1
  107. package/public/components/link/Link.js +380 -1
  108. package/public/components/link/Link.js.map +1 -1
  109. package/public/components/link/Link.nested.js +285 -0
  110. package/public/components/link/Link.nested.js.map +1 -0
  111. package/public/components/link/Link.nested.svelte +78 -0
  112. package/public/components/listbox/Listbox.js +595 -1
  113. package/public/components/listbox/Listbox.js.map +1 -1
  114. package/public/components/listbox/Listbox.nested.js +629 -1
  115. package/public/components/listbox/Listbox.nested.js.map +1 -1
  116. package/public/components/loader/Loader.js +246 -1
  117. package/public/components/loader/Loader.js.map +1 -1
  118. package/public/components/loader/Loader.nested.js +176 -1
  119. package/public/components/loader/Loader.nested.js.map +1 -1
  120. package/public/components/modal/Modal.js +395 -1
  121. package/public/components/modal/Modal.js.map +1 -1
  122. package/public/components/notification/Notification.js +458 -1
  123. package/public/components/notification/Notification.js.map +1 -1
  124. package/public/components/optionbutton/OptionButton.js +316 -1
  125. package/public/components/optionbutton/OptionButton.js.map +1 -1
  126. package/public/components/overlay/Overlay.js +104 -1
  127. package/public/components/overlay/Overlay.js.map +1 -1
  128. package/public/components/overlay/OverlayLoader.js +151 -1
  129. package/public/components/overlay/OverlayLoader.js.map +1 -1
  130. package/public/components/pagination/Pagination.js +613 -1
  131. package/public/components/pagination/Pagination.js.map +1 -1
  132. package/public/components/pagination/Pagination.svelte +4 -5
  133. package/public/components/passwordinput/PasswordInput.js +291 -1
  134. package/public/components/passwordinput/PasswordInput.js.map +1 -1
  135. package/public/components/phonenumber/PhoneNumber.js +6894 -1
  136. package/public/components/phonenumber/PhoneNumber.js.map +1 -1
  137. package/public/components/phonenumber/PhoneNumber.svelte +1 -1
  138. package/public/components/price/Price.js +768 -1
  139. package/public/components/price/Price.js.map +1 -1
  140. package/public/components/progressbar/ProgressBar.js +278 -1
  141. package/public/components/progressbar/ProgressBar.js.map +1 -1
  142. package/public/components/quantityselector/QuantitySelector.js +397 -1
  143. package/public/components/quantityselector/QuantitySelector.js.map +1 -1
  144. package/public/components/radio/Radio.js +273 -1
  145. package/public/components/radio/Radio.js.map +1 -1
  146. package/public/components/radiogroup/RadioGroup.js +414 -1
  147. package/public/components/radiogroup/RadioGroup.js.map +1 -1
  148. package/public/components/radiogroup/radioGroup.types.d.ts.map +1 -1
  149. package/public/components/ratings/StarsInput.js +292 -1
  150. package/public/components/ratings/StarsInput.js.map +1 -1
  151. package/public/components/ratings/StarsResult.js +246 -1
  152. package/public/components/ratings/StarsResult.js.map +1 -1
  153. package/public/components/select/Select.js +451 -1
  154. package/public/components/select/Select.js.map +1 -1
  155. package/public/components/sidebar/Sidebar.js +784 -1
  156. package/public/components/sidebar/Sidebar.js.map +1 -1
  157. package/public/components/sidebar/sidebar-feature-group.nested.js +592 -1
  158. package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  159. package/public/components/sidebar/sidebar-feature.nested.js +402 -1
  160. package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
  161. package/public/components/sidebar/sidebar-section.nested.js +394 -1
  162. package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
  163. package/public/components/sidebar/sidebar-segment.nested.js +198 -1
  164. package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
  165. package/public/components/sidebar/sidebar-separator.nested.js +49 -1
  166. package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
  167. package/public/components/sidebar/sidebar-service.d.ts.map +1 -1
  168. package/public/components/sidebar/sidebar-sub-features.nested.js +312 -1
  169. package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
  170. package/public/components/sidebar/sidebar-user.nested.js +733 -1
  171. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  172. package/public/components/sidebar/sidebar.types.d.ts.map +1 -1
  173. package/public/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +1 -1
  174. package/public/components/sidebar-segment/sidebar-segment.nested.svelte +1 -1
  175. package/public/components/sidebar-user/sidebar-user.nested.svelte +0 -1
  176. package/public/components/starsinput/StarsInput.svelte +2 -9
  177. package/public/components/stepper/Stepper.js +371 -1
  178. package/public/components/stepper/Stepper.js.map +1 -1
  179. package/public/components/tabs/Tabs.js +615 -1
  180. package/public/components/tabs/Tabs.js.map +1 -1
  181. package/public/components/tabs/Tabs.nested.js +472 -1
  182. package/public/components/tabs/Tabs.nested.js.map +1 -1
  183. package/public/components/tag/Tag.js +665 -1
  184. package/public/components/tag/Tag.js.map +1 -1
  185. package/public/components/tag/Tag.nested.js +554 -1
  186. package/public/components/tag/Tag.nested.js.map +1 -1
  187. package/public/components/tag/Tag.nested.svelte +5 -5
  188. package/public/components/tag/Tag.svelte +5 -5
  189. package/public/components/taglist/TagList.js +475 -1
  190. package/public/components/taglist/TagList.js.map +1 -1
  191. package/public/components/textarea/Textarea.js +303 -1
  192. package/public/components/textarea/Textarea.js.map +1 -1
  193. package/public/components/textinput/Textinput.js +497 -1
  194. package/public/components/textinput/Textinput.js.map +1 -1
  195. package/public/components/textinput/Textinput.nested.js +320 -1
  196. package/public/components/textinput/Textinput.nested.js.map +1 -1
  197. package/public/components/toggle/Toggle.js +278 -1
  198. package/public/components/toggle/Toggle.js.map +1 -1
  199. package/public/components/tooltip/Tooltip.js +173 -1
  200. package/public/components/tooltip/Tooltip.js.map +1 -1
  201. package/public/icons/Billzloty24.js +2 -0
  202. package/public/icons/Billzloty24.js.map +1 -0
  203. package/public/icons/Billzloty32.js +2 -0
  204. package/public/icons/Billzloty32.js.map +1 -0
  205. package/public/icons/Billzloty48.js +2 -0
  206. package/public/icons/Billzloty48.js.map +1 -0
  207. package/public/icons/Billzloty64.js +2 -0
  208. package/public/icons/Billzloty64.js.map +1 -0
  209. package/public/icons/CardFundingzloty24.js +2 -0
  210. package/public/icons/CardFundingzloty24.js.map +1 -0
  211. package/public/icons/CardFundingzloty32.js +2 -0
  212. package/public/icons/CardFundingzloty32.js.map +1 -0
  213. package/public/icons/CardFundingzloty48.js +2 -0
  214. package/public/icons/CardFundingzloty48.js.map +1 -0
  215. package/public/icons/CardFundingzloty64.js +2 -0
  216. package/public/icons/CardFundingzloty64.js.map +1 -0
  217. package/public/icons/Fundingzloty24.js +2 -0
  218. package/public/icons/Fundingzloty24.js.map +1 -0
  219. package/public/icons/Fundingzloty32.js +2 -0
  220. package/public/icons/Fundingzloty32.js.map +1 -0
  221. package/public/icons/Fundingzloty48.js +2 -0
  222. package/public/icons/Fundingzloty48.js.map +1 -0
  223. package/public/icons/Fundingzloty64.js +2 -0
  224. package/public/icons/Fundingzloty64.js.map +1 -0
  225. package/public/icons/MonochromeStoreLocationbm24.js +2 -0
  226. package/public/icons/MonochromeStoreLocationbm24.js.map +1 -0
  227. package/public/icons/MonochromeStoreLocationbm32.js +2 -0
  228. package/public/icons/MonochromeStoreLocationbm32.js.map +1 -0
  229. package/public/icons/MonochromeStoreLocationbm48.js +2 -0
  230. package/public/icons/MonochromeStoreLocationbm48.js.map +1 -0
  231. package/public/icons/MonochromeStoreLocationbm64.js +2 -0
  232. package/public/icons/MonochromeStoreLocationbm64.js.map +1 -0
  233. package/public/icons/PaymentMonochromeBonificoBancario24.js +2 -0
  234. package/public/icons/PaymentMonochromeBonificoBancario24.js.map +1 -0
  235. package/public/icons/PaymentMonochromeBonificoBancario32.js +2 -0
  236. package/public/icons/PaymentMonochromeBonificoBancario32.js.map +1 -0
  237. package/public/icons/PaymentMonochromeBonificoBancario48.js +2 -0
  238. package/public/icons/PaymentMonochromeBonificoBancario48.js.map +1 -0
  239. package/public/icons/PaymentMonochromeBonificoBancario64.js +2 -0
  240. package/public/icons/PaymentMonochromeBonificoBancario64.js.map +1 -0
  241. package/public/icons/Receiptzloty24.js +2 -0
  242. package/public/icons/Receiptzloty24.js.map +1 -0
  243. package/public/icons/Receiptzloty32.js +2 -0
  244. package/public/icons/Receiptzloty32.js.map +1 -0
  245. package/public/icons/Receiptzloty48.js +2 -0
  246. package/public/icons/Receiptzloty48.js.map +1 -0
  247. package/public/icons/Receiptzloty64.js +2 -0
  248. package/public/icons/Receiptzloty64.js.map +1 -0
  249. package/public/icons/Renewableenergy24.js +2 -0
  250. package/public/icons/Renewableenergy24.js.map +1 -0
  251. package/public/icons/Renewableenergy32.js +2 -0
  252. package/public/icons/Renewableenergy32.js.map +1 -0
  253. package/public/icons/Renewableenergy48.js +2 -0
  254. package/public/icons/Renewableenergy48.js.map +1 -0
  255. package/public/icons/Renewableenergy64.js +2 -0
  256. package/public/icons/Renewableenergy64.js.map +1 -0
  257. package/public/icons/StoreBM24.js +2 -0
  258. package/public/icons/StoreBM24.js.map +1 -0
  259. package/public/icons/StoreBM32.js +2 -0
  260. package/public/icons/StoreBM32.js.map +1 -0
  261. package/public/icons/StoreBM48.js +2 -0
  262. package/public/icons/StoreBM48.js.map +1 -0
  263. package/public/icons/StoreBM64.js +2 -0
  264. package/public/icons/StoreBM64.js.map +1 -0
  265. package/public/icons/Wood24.js +2 -0
  266. package/public/icons/Wood24.js.map +1 -0
  267. package/public/icons/Wood32.js +2 -0
  268. package/public/icons/Wood32.js.map +1 -0
  269. package/public/icons/Wood48.js +2 -0
  270. package/public/icons/Wood48.js.map +1 -0
  271. package/public/icons/Wood64.js +2 -0
  272. package/public/icons/Wood64.js.map +1 -0
  273. package/public/icons/Woodflooring24.js +2 -0
  274. package/public/icons/Woodflooring24.js.map +1 -0
  275. package/public/icons/Woodflooring32.js +2 -0
  276. package/public/icons/Woodflooring32.js.map +1 -0
  277. package/public/icons/Woodflooring48.js +2 -0
  278. package/public/icons/Woodflooring48.js.map +1 -0
  279. package/public/icons/Woodflooring64.js +2 -0
  280. package/public/icons/Woodflooring64.js.map +1 -0
  281. package/public/icons/Woodflooringalt24.js +2 -0
  282. package/public/icons/Woodflooringalt24.js.map +1 -0
  283. package/public/icons/Woodflooringalt32.js +2 -0
  284. package/public/icons/Woodflooringalt32.js.map +1 -0
  285. package/public/icons/Woodflooringalt48.js +2 -0
  286. package/public/icons/Woodflooringalt48.js.map +1 -0
  287. package/public/icons/Woodflooringalt64.js +2 -0
  288. package/public/icons/Woodflooringalt64.js.map +1 -0
  289. package/public/icons/Zloty24.js +2 -0
  290. package/public/icons/Zloty24.js.map +1 -0
  291. package/public/icons/Zloty32.js +2 -0
  292. package/public/icons/Zloty32.js.map +1 -0
  293. package/public/icons/Zloty48.js +2 -0
  294. package/public/icons/Zloty48.js.map +1 -0
  295. package/public/icons/Zloty64.js +2 -0
  296. package/public/icons/Zloty64.js.map +1 -0
  297. package/public/icons.js +888 -696
  298. package/public/index-c33b3772.js +873 -1
  299. package/public/index-c33b3772.js.map +1 -1
  300. package/public/linear-f46d7e9e.js +700 -1
  301. package/public/linear-f46d7e9e.js.map +1 -1
  302. package/public/main.d.ts +1 -0
  303. package/public/main.d.ts.map +1 -1
  304. package/public/path-1b5da959.js +186 -1
  305. package/public/path-1b5da959.js.map +1 -1
  306. package/public/sidebar-service-275bf9ef.js +129 -1
  307. package/public/sidebar-service-275bf9ef.js.map +1 -1
  308. package/public/sidebar-service-589b271b.js +125 -0
  309. package/public/sidebar-service-589b271b.js.map +1 -0
  310. package/public/stories/carousel/items.d.ts +3 -0
  311. package/public/stories/carousel/items.d.ts.map +1 -0
  312. package/public/symbol-b05a6e2b.js +169 -1
  313. package/public/symbol-b05a6e2b.js.map +1 -1
  314. package/public/transform-15d69d5d.js +2743 -1
  315. package/public/transform-15d69d5d.js.map +1 -1
  316. package/public/utilities/DataTableUtilities.d.ts.map +1 -1
  317. package/public/utilities/DataTableUtilities.ts +0 -12
  318. package/public/utilities/EventForward.js +136 -1
  319. package/public/utilities/EventForward.js.map +1 -1
  320. package/public/utilities/EventHandler.js +36 -1
  321. package/public/utilities/EventHandler.js.map +1 -1
  322. package/public/utilities/components/carousel/carousel.types.d.ts +20 -0
  323. package/public/utilities/components/carousel/carousel.types.d.ts.map +1 -0
  324. package/public/utilities/components/datatable/data.d.ts.map +1 -1
  325. package/public/utilities/components/datatable/datatable.types.d.ts +2 -16
  326. package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
  327. package/public/utilities/main.d.ts +1 -0
  328. package/public/utilities/main.d.ts.map +1 -1
  329. package/public/utilities/stories/carousel/Carousel.stories.d.ts +8 -0
  330. package/public/utilities/stories/carousel/Carousel.stories.d.ts.map +1 -0
  331. package/public/utilities/stories/carousel/items.d.ts +3 -0
  332. package/public/utilities/stories/carousel/items.d.ts.map +1 -0
  333. package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
  334. package/public/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -1
  335. package/public/utilities/utilities/DataTableUtilities.d.ts.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Carousel.js","sources":["../../../src/components/carousel/Carousel.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type {\n CarouselDevice,\n CarouselItem,\n CarouselOptions,\n CarouselTitleTag,\n } from './carousel.types';\n import Link from '../link/Link.nested.svelte';\n import CarouselCard from './CarouselCard.nested.svelte';\n import Button from '../button/Button.nested.svelte';\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let title: string;\n export let titleTag: CarouselTitleTag = 'h1';\n export let subtitle: string;\n export let mobile = false;\n export let options: string;\n export let data: string;\n\n const mediaQueryS: MediaQueryList = window.matchMedia('(max-width: 679px)');\n const mediaQueryM: MediaQueryList = window.matchMedia(\n '(min-width: 680px) and (max-width: 1279px)',\n );\n const mediaQueryXL: MediaQueryList = window.matchMedia('(min-width: 1280px)');\n\n const defaultCarousel: CarouselOptions = {\n s: {\n itemsVisible: 1,\n hasHalfItemVisible: true,\n },\n m: {\n itemsVisible: 3,\n hasHalfItemVisible: false,\n },\n xl: {\n itemsVisible: 5,\n hasHalfItemVisible: false,\n },\n };\n\n let separateItemPixelSize = 16;\n let accessibilityFocusPadding = 4;\n let eventHandler = new EventHandler();\n\n let currentDevice: CarouselDevice = initCurrentDevice(\n mediaQueryM,\n mediaQueryXL,\n );\n\n let carouselTouchStartX = 0;\n let carouselTouchCurrentX = 0;\n\n let carouselContainer: HTMLDivElement;\n let carouselScrollbarLeft = 0;\n\n let isScrollBeginning = true;\n let isScrollEnd = false;\n\n $: carouselItems = data ? (JSON.parse(data) as CarouselItem[]) : [];\n $: carouselOptions = options\n ? Object.assign({}, defaultCarousel, JSON.parse(options) as CarouselOptions)\n : defaultCarousel;\n $: carouselItemsSize = carouselItems?.length;\n\n $: carouselCurrentItemsVisible = carouselOptions[currentDevice].itemsVisible;\n $: carouselCurrentHasHalfItemVisible =\n carouselOptions[currentDevice].hasHalfItemVisible || false;\n $: carouselCurrentItemsSize =\n carouselItemsSize < carouselCurrentItemsVisible\n ? carouselCurrentItemsVisible\n : carouselItemsSize;\n\n $: carouselCurrentItemsVisibleAndHalf = carouselCurrentHasHalfItemVisible\n ? carouselCurrentItemsVisible + 0.5\n : carouselCurrentItemsVisible;\n\n $: carouselItemWidthSpace = getCarouselItemWidthSpace(\n carouselCurrentItemsVisible,\n carouselCurrentHasHalfItemVisible,\n );\n $: carouselContainerWidthSpace = getCarouselContainerWidthSpace(\n carouselCurrentItemsSize,\n );\n\n initMediaQueriesChanges();\n\n function getCarouselContainerWidthSpace(totalItems: number) {\n return (totalItems - 1) * separateItemPixelSize;\n }\n\n function getCarouselItemWidthSpace(\n itemsVisible: number,\n itemsAndHalfVisible: boolean,\n ) {\n if (itemsAndHalfVisible) {\n return itemsVisible * separateItemPixelSize;\n }\n return (itemsVisible - 1) * separateItemPixelSize;\n }\n\n function moveScroll(signe: number) {\n function getCarouselItemWidth() {\n if (carouselCurrentHasHalfItemVisible) {\n return (\n (carouselContainer.clientWidth - carouselCurrentItemsVisible * 16) /\n carouselCurrentItemsVisibleAndHalf\n );\n } else {\n return (\n (carouselContainer.clientWidth -\n (carouselCurrentItemsVisible - 1) * 16) /\n carouselCurrentItemsVisible\n );\n }\n }\n\n function getLeft() {\n if (!carouselCurrentHasHalfItemVisible) {\n return (\n carouselContainer.scrollLeft +\n signe *\n (carouselContainer.clientWidth +\n separateItemPixelSize -\n accessibilityFocusPadding * 2)\n );\n }\n const itemWidth = getCarouselItemWidth();\n if (isScrollBeginning) {\n return (\n carouselContainer.scrollLeft +\n (signe *\n (carouselContainer.clientWidth -\n (3 / 4) * itemWidth -\n separateItemPixelSize) +\n accessibilityFocusPadding)\n );\n }\n if (isScrollEnd) {\n return (\n carouselContainer.scrollLeft +\n signe *\n (carouselContainer.clientWidth -\n (3 / 4) * itemWidth -\n separateItemPixelSize)\n );\n }\n return (\n carouselContainer.scrollLeft +\n signe *\n (carouselContainer.clientWidth -\n itemWidth / 2 -\n separateItemPixelSize +\n accessibilityFocusPadding * 2)\n );\n }\n\n carouselContainer.scrollTo({ behavior: 'smooth', left: getLeft() });\n }\n\n function nextCards() {\n moveScroll(1);\n }\n\n function previousCards() {\n moveScroll(-1);\n }\n\n function handleScrollCarousel() {\n isScrollBeginning = carouselContainer?.scrollLeft <= 0;\n isScrollEnd =\n carouselContainer?.scrollWidth - carouselContainer?.scrollLeft <=\n carouselContainer.offsetWidth;\n }\n\n function handleClickCard(item: CarouselItem) {\n eventHandler.dispatch('carousel-item-clicked', item);\n }\n function handleClickLink() {\n eventHandler.dispatch('carousel-link-clicked', {});\n }\n\n function initCurrentDevice(\n mediaQueryM: MediaQueryList,\n mediaQueryXL: MediaQueryList,\n ) {\n if (mediaQueryXL.matches) {\n return 'xl';\n }\n if (mediaQueryM.matches) {\n return 'm';\n }\n return 's';\n }\n function initMediaQueriesChanges() {\n mediaQueryS.onchange = (e) => {\n handleMediaQueryChange(e, 's');\n };\n mediaQueryM.onchange = (e) => {\n handleMediaQueryChange(e, 'm');\n };\n mediaQueryXL.onchange = (e) => {\n handleMediaQueryChange(e, 'xl');\n };\n }\n\n function handleMediaQueryChange(\n event: MediaQueryListEvent,\n matchingDevice: CarouselDevice,\n ) {\n if (event.matches) {\n currentDevice = matchingDevice;\n }\n }\n\n function handleTouchStart(event: TouchEvent) {\n carouselTouchStartX = event.touches[0].clientX;\n }\n\n function handleTouchMove(event: TouchEvent) {\n carouselTouchCurrentX = event.touches[0].clientX;\n }\n\n function handleTouchEnd() {\n if (carouselTouchStartX > carouselTouchCurrentX + 50) {\n nextCards();\n }\n if (carouselTouchStartX < carouselTouchCurrentX - 50) {\n previousCards();\n }\n }\n</script>\n\n<div class=\"mc-carousel\">\n <div class=\"mc-carousel-header\">\n <div class=\"mc-carousel-header__titles\">\n {@html `<${titleTag} class=\"mc-carousel-header__container__title\">${title}</${titleTag}>`}\n <div class=\"mc-carousel-header__container__subtitle\">\n <Link\n href=\"#layer\"\n iconname=\"navigation-arrow-arrow--right-24px\"\n iconposition=\"right\"\n label={subtitle}\n on:click={() => handleClickLink()}\n size=\"s\"\n target=\"_self\"\n />\n </div>\n </div>\n <nav\n aria-label=\"pagination\"\n class=\"mc-carousel-header__buttons {mobile\n ? 'mc-carousel-header__buttons-mobile'\n : 'mc-carousel-header__buttons-desktop'}\"\n >\n <Button\n theme=\"neutral\"\n size=\"s\"\n bordered={true}\n iconmode=\"only\"\n iconname=\"navigation-arrow-arrow--left-32px\"\n aria-label=\"Previous page\"\n disabled={isScrollBeginning}\n on:click={previousCards}\n label=\"Previous\"\n loader=\"\"\n />\n <Button\n theme=\"neutral\"\n size=\"s\"\n type=\"button\"\n bordered={true}\n disabled={isScrollEnd}\n iconmode=\"only\"\n iconname=\"navigation-arrow-arrow--right-32px\"\n aria-label=\"Next Page\"\n on:click={nextCards}\n label=\"Next\"\n loader=\"\"\n />\n </nav>\n </div>\n <div\n class=\"mc-carousel-body\"\n bind:this={carouselContainer}\n on:scroll={handleScrollCarousel}\n style=\"--carousel__accessibility-focus-padding: {accessibilityFocusPadding}px;\"\n >\n <div\n class=\"mc-carousel-body__content\"\n style=\"\n --carousel__container-width-space: {carouselContainerWidthSpace}px;\n --carousel__items-count: {carouselCurrentItemsSize};\n --carousel__item-width-space: {carouselItemWidthSpace}px;\n --carousel__items-visible: {carouselCurrentItemsVisibleAndHalf};\n --carousel__scrollbar-left: {carouselScrollbarLeft};\n --carousel__container-separate-item-size: {separateItemPixelSize}px;\"\n >\n {#each carouselItems as item}\n <button\n class=\"mc-carousel-body__item\"\n on:click={() => handleClickCard(item)}\n on:touchstart={handleTouchStart}\n on:touchmove={handleTouchMove}\n on:touchend={handleTouchEnd}\n >\n <CarouselCard\n titleTag={item.titleTag}\n imgAlt={item.imgAlt}\n cardIsInLayer={false}\n title={item.title}\n imgSrc={item.imgSrc}\n />\n </button>\n {/each}\n </div>\n </div>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.button';\n @import '@mozaic-ds/styles/components/c.links';\n @import '@mozaic-ds/styles/components/c.pagination';\n\n .mc-carousel {\n display: flex;\n flex-direction: column;\n gap: $mu100;\n\n &-header {\n /* Auto layout */\n\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n\n &__titles {\n display: flex;\n flex-direction: column;\n }\n &__buttons {\n gap: $mu050;\n &-mobile {\n display: none;\n }\n &-desktop {\n display: flex;\n }\n }\n }\n\n &-body {\n position: relative;\n overflow-x: auto;\n overflow-y: hidden;\n padding: var(--carousel__accessibility-focus-padding);\n\n &__content {\n display: flex;\n flex-wrap: nowrap;\n column-gap: var(--carousel__container-separate-item-size);\n width: calc(\n (\n calc(100% - var(--carousel__item-width-space)) /\n var(--carousel__items-visible)\n ) * var(--carousel__items-count) +\n var(--carousel__container-width-space)\n );\n margin-bottom: $mu125;\n }\n\n &__item {\n display: flex;\n background: none;\n border: none;\n margin: 0;\n padding: 0;\n width: calc(100% - var(--carousel__item-width-space)) /\n var(--carousel__items-visible);\n @include set-focus-floating-base();\n\n &:focus {\n @include set-focus-floating();\n }\n }\n }\n\n &-footer {\n display: flex;\n flex-direction: column;\n }\n }\n\n ::-webkit-scrollbar {\n border-radius: $mu025;\n height: 6px;\n background: $color-grey-100;\n border-top: 1px solid white;\n border-bottom: 1px solid white;\n }\n\n ::-webkit-scrollbar-thumb {\n background: $color-grey-800;\n border-radius: 6px;\n }\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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GAEtB,YAAA,CAAA,CAAA,EAAE,kCAAkC,GAAG,iCAAA;AACpC,KAAA,2BAA2B,GAAG,GAApC;KACM,2BAA2B,CAAA,CAAA;;;;AAE/B,oBAAG,sBAAsB,GAAG,yBAAyB,CACnD,2BAA2B,EAC3B,iCAAiC,CAAA,CAAA,CAAA;;;;AAEnC,GAAG,YAAA,CAAA,EAAA,EAAA,2BAA2B,GAAG,8BAA8B,CAC7D,wBAAwB,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,408 @@
1
+ <svelte:options tag={null} />
2
+
3
+ <script lang="ts">
4
+ import type {
5
+ CarouselDevice,
6
+ CarouselItem,
7
+ CarouselOptions,
8
+ CarouselTitleTag,
9
+ } from './carousel.types';
10
+ import Link from '../link/Link.nested.svelte';
11
+ import CarouselCard from './CarouselCard.nested.svelte';
12
+ import Button from '../button/Button.nested.svelte';
13
+ import { EventHandler } from '../../utilities/EventHandler';
14
+
15
+ export let title: string;
16
+ export let titleTag: CarouselTitleTag = 'h1';
17
+ export let subtitle: string;
18
+ export let mobile = false;
19
+ export let options: string;
20
+ export let data: string;
21
+
22
+ const mediaQueryS: MediaQueryList = window.matchMedia('(max-width: 679px)');
23
+ const mediaQueryM: MediaQueryList = window.matchMedia(
24
+ '(min-width: 680px) and (max-width: 1279px)',
25
+ );
26
+ const mediaQueryXL: MediaQueryList = window.matchMedia('(min-width: 1280px)');
27
+
28
+ const defaultCarousel: CarouselOptions = {
29
+ s: {
30
+ itemsVisible: 1,
31
+ hasHalfItemVisible: true,
32
+ },
33
+ m: {
34
+ itemsVisible: 3,
35
+ hasHalfItemVisible: false,
36
+ },
37
+ xl: {
38
+ itemsVisible: 5,
39
+ hasHalfItemVisible: false,
40
+ },
41
+ };
42
+
43
+ let separateItemPixelSize = 16;
44
+ let accessibilityFocusPadding = 4;
45
+ let eventHandler = new EventHandler();
46
+
47
+ let currentDevice: CarouselDevice = initCurrentDevice(
48
+ mediaQueryM,
49
+ mediaQueryXL,
50
+ );
51
+
52
+ let carouselTouchStartX = 0;
53
+ let carouselTouchCurrentX = 0;
54
+
55
+ let carouselContainer: HTMLDivElement;
56
+ let carouselScrollbarLeft = 0;
57
+
58
+ let isScrollBeginning = true;
59
+ let isScrollEnd = false;
60
+
61
+ $: carouselItems = data ? (JSON.parse(data) as CarouselItem[]) : [];
62
+ $: carouselOptions = options
63
+ ? Object.assign({}, defaultCarousel, JSON.parse(options) as CarouselOptions)
64
+ : defaultCarousel;
65
+ $: carouselItemsSize = carouselItems?.length;
66
+
67
+ $: carouselCurrentItemsVisible = carouselOptions[currentDevice].itemsVisible;
68
+ $: carouselCurrentHasHalfItemVisible =
69
+ carouselOptions[currentDevice].hasHalfItemVisible || false;
70
+ $: carouselCurrentItemsSize =
71
+ carouselItemsSize < carouselCurrentItemsVisible
72
+ ? carouselCurrentItemsVisible
73
+ : carouselItemsSize;
74
+
75
+ $: carouselCurrentItemsVisibleAndHalf = carouselCurrentHasHalfItemVisible
76
+ ? carouselCurrentItemsVisible + 0.5
77
+ : carouselCurrentItemsVisible;
78
+
79
+ $: carouselItemWidthSpace = getCarouselItemWidthSpace(
80
+ carouselCurrentItemsVisible,
81
+ carouselCurrentHasHalfItemVisible,
82
+ );
83
+ $: carouselContainerWidthSpace = getCarouselContainerWidthSpace(
84
+ carouselCurrentItemsSize,
85
+ );
86
+
87
+ initMediaQueriesChanges();
88
+
89
+ function getCarouselContainerWidthSpace(totalItems: number) {
90
+ return (totalItems - 1) * separateItemPixelSize;
91
+ }
92
+
93
+ function getCarouselItemWidthSpace(
94
+ itemsVisible: number,
95
+ itemsAndHalfVisible: boolean,
96
+ ) {
97
+ if (itemsAndHalfVisible) {
98
+ return itemsVisible * separateItemPixelSize;
99
+ }
100
+ return (itemsVisible - 1) * separateItemPixelSize;
101
+ }
102
+
103
+ function moveScroll(signe: number) {
104
+ function getCarouselItemWidth() {
105
+ if (carouselCurrentHasHalfItemVisible) {
106
+ return (
107
+ (carouselContainer.clientWidth - carouselCurrentItemsVisible * 16) /
108
+ carouselCurrentItemsVisibleAndHalf
109
+ );
110
+ } else {
111
+ return (
112
+ (carouselContainer.clientWidth -
113
+ (carouselCurrentItemsVisible - 1) * 16) /
114
+ carouselCurrentItemsVisible
115
+ );
116
+ }
117
+ }
118
+
119
+ function getLeft() {
120
+ if (!carouselCurrentHasHalfItemVisible) {
121
+ return (
122
+ carouselContainer.scrollLeft +
123
+ signe *
124
+ (carouselContainer.clientWidth +
125
+ separateItemPixelSize -
126
+ accessibilityFocusPadding * 2)
127
+ );
128
+ }
129
+ const itemWidth = getCarouselItemWidth();
130
+ if (isScrollBeginning) {
131
+ return (
132
+ carouselContainer.scrollLeft +
133
+ (signe *
134
+ (carouselContainer.clientWidth -
135
+ (3 / 4) * itemWidth -
136
+ separateItemPixelSize) +
137
+ accessibilityFocusPadding)
138
+ );
139
+ }
140
+ if (isScrollEnd) {
141
+ return (
142
+ carouselContainer.scrollLeft +
143
+ signe *
144
+ (carouselContainer.clientWidth -
145
+ (3 / 4) * itemWidth -
146
+ separateItemPixelSize)
147
+ );
148
+ }
149
+ return (
150
+ carouselContainer.scrollLeft +
151
+ signe *
152
+ (carouselContainer.clientWidth -
153
+ itemWidth / 2 -
154
+ separateItemPixelSize +
155
+ accessibilityFocusPadding * 2)
156
+ );
157
+ }
158
+
159
+ carouselContainer.scrollTo({ behavior: 'smooth', left: getLeft() });
160
+ }
161
+
162
+ function nextCards() {
163
+ moveScroll(1);
164
+ }
165
+
166
+ function previousCards() {
167
+ moveScroll(-1);
168
+ }
169
+
170
+ function handleScrollCarousel() {
171
+ isScrollBeginning = carouselContainer?.scrollLeft <= 0;
172
+ isScrollEnd =
173
+ carouselContainer?.scrollWidth - carouselContainer?.scrollLeft <=
174
+ carouselContainer.offsetWidth;
175
+ }
176
+
177
+ function handleClickCard(item: CarouselItem) {
178
+ eventHandler.dispatch('carousel-item-clicked', item);
179
+ }
180
+ function handleClickLink() {
181
+ eventHandler.dispatch('carousel-link-clicked', {});
182
+ }
183
+
184
+ function initCurrentDevice(
185
+ mediaQueryM: MediaQueryList,
186
+ mediaQueryXL: MediaQueryList,
187
+ ) {
188
+ if (mediaQueryXL.matches) {
189
+ return 'xl';
190
+ }
191
+ if (mediaQueryM.matches) {
192
+ return 'm';
193
+ }
194
+ return 's';
195
+ }
196
+ function initMediaQueriesChanges() {
197
+ mediaQueryS.onchange = (e) => {
198
+ handleMediaQueryChange(e, 's');
199
+ };
200
+ mediaQueryM.onchange = (e) => {
201
+ handleMediaQueryChange(e, 'm');
202
+ };
203
+ mediaQueryXL.onchange = (e) => {
204
+ handleMediaQueryChange(e, 'xl');
205
+ };
206
+ }
207
+
208
+ function handleMediaQueryChange(
209
+ event: MediaQueryListEvent,
210
+ matchingDevice: CarouselDevice,
211
+ ) {
212
+ if (event.matches) {
213
+ currentDevice = matchingDevice;
214
+ }
215
+ }
216
+
217
+ function handleTouchStart(event: TouchEvent) {
218
+ carouselTouchStartX = event.touches[0].clientX;
219
+ }
220
+
221
+ function handleTouchMove(event: TouchEvent) {
222
+ carouselTouchCurrentX = event.touches[0].clientX;
223
+ }
224
+
225
+ function handleTouchEnd() {
226
+ if (carouselTouchStartX > carouselTouchCurrentX + 50) {
227
+ nextCards();
228
+ }
229
+ if (carouselTouchStartX < carouselTouchCurrentX - 50) {
230
+ previousCards();
231
+ }
232
+ }
233
+ </script>
234
+
235
+ <div class="mc-carousel">
236
+ <div class="mc-carousel-header">
237
+ <div class="mc-carousel-header__titles">
238
+ {@html `<${titleTag} class="mc-carousel-header__container__title">${title}</${titleTag}>`}
239
+ <div class="mc-carousel-header__container__subtitle">
240
+ <Link
241
+ href="#layer"
242
+ iconname="navigation-arrow-arrow--right-24px"
243
+ iconposition="right"
244
+ label={subtitle}
245
+ on:click={() => handleClickLink()}
246
+ size="s"
247
+ target="_self"
248
+ />
249
+ </div>
250
+ </div>
251
+ <nav
252
+ aria-label="pagination"
253
+ class="mc-carousel-header__buttons {mobile
254
+ ? 'mc-carousel-header__buttons-mobile'
255
+ : 'mc-carousel-header__buttons-desktop'}"
256
+ >
257
+ <Button
258
+ theme="neutral"
259
+ size="s"
260
+ bordered={true}
261
+ iconmode="only"
262
+ iconname="navigation-arrow-arrow--left-32px"
263
+ aria-label="Previous page"
264
+ disabled={isScrollBeginning}
265
+ on:click={previousCards}
266
+ label="Previous"
267
+ loader=""
268
+ />
269
+ <Button
270
+ theme="neutral"
271
+ size="s"
272
+ type="button"
273
+ bordered={true}
274
+ disabled={isScrollEnd}
275
+ iconmode="only"
276
+ iconname="navigation-arrow-arrow--right-32px"
277
+ aria-label="Next Page"
278
+ on:click={nextCards}
279
+ label="Next"
280
+ loader=""
281
+ />
282
+ </nav>
283
+ </div>
284
+ <div
285
+ class="mc-carousel-body"
286
+ bind:this={carouselContainer}
287
+ on:scroll={handleScrollCarousel}
288
+ style="--carousel__accessibility-focus-padding: {accessibilityFocusPadding}px;"
289
+ >
290
+ <div
291
+ class="mc-carousel-body__content"
292
+ style="
293
+ --carousel__container-width-space: {carouselContainerWidthSpace}px;
294
+ --carousel__items-count: {carouselCurrentItemsSize};
295
+ --carousel__item-width-space: {carouselItemWidthSpace}px;
296
+ --carousel__items-visible: {carouselCurrentItemsVisibleAndHalf};
297
+ --carousel__scrollbar-left: {carouselScrollbarLeft};
298
+ --carousel__container-separate-item-size: {separateItemPixelSize}px;"
299
+ >
300
+ {#each carouselItems as item}
301
+ <button
302
+ class="mc-carousel-body__item"
303
+ on:click={() => handleClickCard(item)}
304
+ on:touchstart={handleTouchStart}
305
+ on:touchmove={handleTouchMove}
306
+ on:touchend={handleTouchEnd}
307
+ >
308
+ <CarouselCard
309
+ titleTag={item.titleTag}
310
+ imgAlt={item.imgAlt}
311
+ cardIsInLayer={false}
312
+ title={item.title}
313
+ imgSrc={item.imgSrc}
314
+ />
315
+ </button>
316
+ {/each}
317
+ </div>
318
+ </div>
319
+ </div>
320
+
321
+ <style lang="scss">
322
+ @import '@mozaic-ds/styles/settings-tools/_all-settings';
323
+ @import '@mozaic-ds/styles/components/c.button';
324
+ @import '@mozaic-ds/styles/components/c.links';
325
+ @import '@mozaic-ds/styles/components/c.pagination';
326
+
327
+ .mc-carousel {
328
+ display: flex;
329
+ flex-direction: column;
330
+ gap: $mu100;
331
+
332
+ &-header {
333
+ /* Auto layout */
334
+
335
+ display: flex;
336
+ align-items: flex-end;
337
+ justify-content: space-between;
338
+
339
+ &__titles {
340
+ display: flex;
341
+ flex-direction: column;
342
+ }
343
+ &__buttons {
344
+ gap: $mu050;
345
+ &-mobile {
346
+ display: none;
347
+ }
348
+ &-desktop {
349
+ display: flex;
350
+ }
351
+ }
352
+ }
353
+
354
+ &-body {
355
+ position: relative;
356
+ overflow-x: auto;
357
+ overflow-y: hidden;
358
+ padding: var(--carousel__accessibility-focus-padding);
359
+
360
+ &__content {
361
+ display: flex;
362
+ flex-wrap: nowrap;
363
+ column-gap: var(--carousel__container-separate-item-size);
364
+ width: calc(
365
+ (
366
+ calc(100% - var(--carousel__item-width-space)) /
367
+ var(--carousel__items-visible)
368
+ ) * var(--carousel__items-count) +
369
+ var(--carousel__container-width-space)
370
+ );
371
+ margin-bottom: $mu125;
372
+ }
373
+
374
+ &__item {
375
+ display: flex;
376
+ background: none;
377
+ border: none;
378
+ margin: 0;
379
+ padding: 0;
380
+ width: calc(100% - var(--carousel__item-width-space)) /
381
+ var(--carousel__items-visible);
382
+ @include set-focus-floating-base();
383
+
384
+ &:focus {
385
+ @include set-focus-floating();
386
+ }
387
+ }
388
+ }
389
+
390
+ &-footer {
391
+ display: flex;
392
+ flex-direction: column;
393
+ }
394
+ }
395
+
396
+ ::-webkit-scrollbar {
397
+ border-radius: $mu025;
398
+ height: 6px;
399
+ background: $color-grey-100;
400
+ border-top: 1px solid white;
401
+ border-bottom: 1px solid white;
402
+ }
403
+
404
+ ::-webkit-scrollbar-thumb {
405
+ background: $color-grey-800;
406
+ border-radius: 6px;
407
+ }
408
+ </style>
@@ -0,0 +1,140 @@
1
+ import { P as SvelteComponent, i as init, s as safe_not_equal, Q as append_styles, c as assign, e as element, d as space, t as text, g as attr, $ as src_url_equal, R as null_to_empty, h as set_attributes, z as toggle_class, b as insert, j as append, k as set_data, m as get_spread_update, n as noop, o as detach, p as compute_rest_props, q as exclude_internal_props } from '../../index-c33b3772.js';
2
+
3
+ /* src/components/carousel/CarouselCard.nested.svelte generated by Svelte v3.58.0 */
4
+
5
+ function add_css(target) {
6
+ append_styles(target, "svelte-hdxc38", ".mc-card.svelte-hdxc38.svelte-hdxc38{font-family:\"LeroyMerlin\", sans-serif;max-width:17.75rem}.mc-card.svelte-hdxc38.svelte-hdxc38,.mc-card.svelte-hdxc38 .svelte-hdxc38{-webkit-box-sizing:border-box;box-sizing:border-box}@media screen and (min-width: 680px){.mc-card.svelte-hdxc38.svelte-hdxc38{max-width:18.25rem}}@media screen and (min-width: 1024px){.mc-card.svelte-hdxc38.svelte-hdxc38{max-width:18rem}}@media screen and (min-width: 1280px){.mc-card.svelte-hdxc38.svelte-hdxc38{max-width:17.5rem}}@media screen and (min-width: 1920px){.mc-card.svelte-hdxc38.svelte-hdxc38{max-width:27.25rem}}.mc-card__visual.svelte-hdxc38.svelte-hdxc38{margin:0;overflow:hidden;position:relative}.mc-card__visual.svelte-hdxc38.svelte-hdxc38::before{content:\"\";display:block;width:100%;padding-top:75%}.mc-card__visual--1x1.svelte-hdxc38.svelte-hdxc38::before{padding-top:100%}.mc-card__visual--16x9.svelte-hdxc38.svelte-hdxc38::before{padding-top:56.25%}.mc-card__img.svelte-hdxc38.svelte-hdxc38{height:auto;left:0;position:absolute;top:50%;width:100%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.mc-card__content.svelte-hdxc38.svelte-hdxc38{padding-top:1rem}.mc-card__title.svelte-hdxc38.svelte-hdxc38,.mc-card__subtitle.svelte-hdxc38.svelte-hdxc38{margin-top:0;margin-bottom:0.5rem}.mc-card__title.svelte-hdxc38.svelte-hdxc38{font-size:1.125rem;line-height:1.3333333333;font-weight:600;color:#000000}.mc-card__subtitle.svelte-hdxc38.svelte-hdxc38{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#333333}.mc-card__body.svelte-hdxc38.svelte-hdxc38{font-size:1rem;line-height:1.375;color:#191919}.mc-card__body.svelte-hdxc38.svelte-hdxc38:not(:last-child){margin-bottom:1rem}.mc-card--bordered.svelte-hdxc38.svelte-hdxc38{background:#ffffff;border:2px solid #808080;border-radius:0.25rem;overflow:hidden}.mc-card--fluid.svelte-hdxc38.svelte-hdxc38{max-width:none}.mc-carousel-card.svelte-hdxc38.svelte-hdxc38{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;padding:0.5rem;gap:0.25rem;cursor:pointer}.mc-carousel-card--slider.svelte-hdxc38.svelte-hdxc38{border:1px solid #666666;border-radius:0.25rem}.mc-carousel-card--layer__title.svelte-hdxc38.svelte-hdxc38{text-decoration:underline}.mc-carousel-card__image.svelte-hdxc38.svelte-hdxc38{width:100%}");
7
+ }
8
+
9
+ function create_fragment(ctx) {
10
+ let div1;
11
+ let img;
12
+ let img_src_value;
13
+ let t0;
14
+ let div0;
15
+ let t1;
16
+ let div0_class_value;
17
+ let div1_class_value;
18
+
19
+ let div1_levels = [
20
+ /*attributes*/ ctx[4],
21
+ {
22
+ class: div1_class_value = "mc-carousel-card " + (/*cardIsInLayer*/ ctx[2]
23
+ ? 'mc-carousel-card--layer'
24
+ : 'mc-carousel-card--slider')
25
+ }
26
+ ];
27
+
28
+ let div_data_1 = {};
29
+
30
+ for (let i = 0; i < div1_levels.length; i += 1) {
31
+ div_data_1 = assign(div_data_1, div1_levels[i]);
32
+ }
33
+
34
+ return {
35
+ c() {
36
+ div1 = element("div");
37
+ img = element("img");
38
+ t0 = space();
39
+ div0 = element("div");
40
+ t1 = text(/*title*/ ctx[0]);
41
+ attr(img, "alt", /*imgAlt*/ ctx[3]);
42
+ attr(img, "class", "mc-carousel-card__image svelte-hdxc38");
43
+ if (!src_url_equal(img.src, img_src_value = /*imgSrc*/ ctx[1])) attr(img, "src", img_src_value);
44
+
45
+ attr(div0, "class", div0_class_value = "" + (null_to_empty(/*cardIsInLayer*/ ctx[2]
46
+ ? 'mc-carousel-card--layer__title'
47
+ : 'mc-carousel-card--slider__title') + " svelte-hdxc38"));
48
+
49
+ set_attributes(div1, div_data_1);
50
+ toggle_class(div1, "svelte-hdxc38", true);
51
+ },
52
+ m(target, anchor) {
53
+ insert(target, div1, anchor);
54
+ append(div1, img);
55
+ append(div1, t0);
56
+ append(div1, div0);
57
+ append(div0, t1);
58
+ },
59
+ p(ctx, [dirty]) {
60
+ if (dirty & /*imgAlt*/ 8) {
61
+ attr(img, "alt", /*imgAlt*/ ctx[3]);
62
+ }
63
+
64
+ if (dirty & /*imgSrc*/ 2 && !src_url_equal(img.src, img_src_value = /*imgSrc*/ ctx[1])) {
65
+ attr(img, "src", img_src_value);
66
+ }
67
+
68
+ if (dirty & /*title*/ 1) set_data(t1, /*title*/ ctx[0]);
69
+
70
+ if (dirty & /*cardIsInLayer*/ 4 && div0_class_value !== (div0_class_value = "" + (null_to_empty(/*cardIsInLayer*/ ctx[2]
71
+ ? 'mc-carousel-card--layer__title'
72
+ : 'mc-carousel-card--slider__title') + " svelte-hdxc38"))) {
73
+ attr(div0, "class", div0_class_value);
74
+ }
75
+
76
+ set_attributes(div1, div_data_1 = get_spread_update(div1_levels, [
77
+ dirty & /*attributes*/ 16 && /*attributes*/ ctx[4],
78
+ dirty & /*cardIsInLayer*/ 4 && div1_class_value !== (div1_class_value = "mc-carousel-card " + (/*cardIsInLayer*/ ctx[2]
79
+ ? 'mc-carousel-card--layer'
80
+ : 'mc-carousel-card--slider')) && { class: div1_class_value }
81
+ ]));
82
+
83
+ toggle_class(div1, "svelte-hdxc38", true);
84
+ },
85
+ i: noop,
86
+ o: noop,
87
+ d(detaching) {
88
+ if (detaching) detach(div1);
89
+ }
90
+ };
91
+ }
92
+
93
+ function instance($$self, $$props, $$invalidate) {
94
+ let attributes;
95
+ const omit_props_names = ["title","imgSrc","cardIsInLayer","imgAlt"];
96
+ let $$restProps = compute_rest_props($$props, omit_props_names);
97
+ let { title } = $$props;
98
+ let { imgSrc } = $$props;
99
+ let { cardIsInLayer = false } = $$props;
100
+ let { imgAlt } = $$props;
101
+
102
+ $$self.$$set = $$new_props => {
103
+ $$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
104
+ $$invalidate(5, $$restProps = compute_rest_props($$props, omit_props_names));
105
+ if ('title' in $$new_props) $$invalidate(0, title = $$new_props.title);
106
+ if ('imgSrc' in $$new_props) $$invalidate(1, imgSrc = $$new_props.imgSrc);
107
+ if ('cardIsInLayer' in $$new_props) $$invalidate(2, cardIsInLayer = $$new_props.cardIsInLayer);
108
+ if ('imgAlt' in $$new_props) $$invalidate(3, imgAlt = $$new_props.imgAlt);
109
+ };
110
+
111
+ $$self.$$.update = () => {
112
+ $$invalidate(4, attributes = Object.assign({}, $$restProps));
113
+ };
114
+
115
+ return [title, imgSrc, cardIsInLayer, imgAlt, attributes];
116
+ }
117
+
118
+ class CarouselCard_nested extends SvelteComponent {
119
+ constructor(options) {
120
+ super();
121
+
122
+ init(
123
+ this,
124
+ options,
125
+ instance,
126
+ create_fragment,
127
+ safe_not_equal,
128
+ {
129
+ title: 0,
130
+ imgSrc: 1,
131
+ cardIsInLayer: 2,
132
+ imgAlt: 3
133
+ },
134
+ add_css
135
+ );
136
+ }
137
+ }
138
+
139
+ export { CarouselCard_nested as default };
140
+ //# sourceMappingURL=CarouselCard.nested.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarouselCard.nested.js","sources":["../../../src/components/carousel/CarouselCard.nested.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n export let title: string;\n export let imgSrc: string;\n export let cardIsInLayer = false;\n export let imgAlt: string;\n $: attributes = { ...$$restProps };\n</script>\n\n<div\n {...attributes}\n class=\"mc-carousel-card {cardIsInLayer\n ? 'mc-carousel-card--layer'\n : 'mc-carousel-card--slider'}\"\n>\n <img alt={imgAlt} class=\"mc-carousel-card__image\" src={imgSrc} />\n <div\n class={cardIsInLayer\n ? 'mc-carousel-card--layer__title'\n : 'mc-carousel-card--slider__title'}\n >\n {title}\n </div>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.card';\n\n .mc-carousel-card {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: $mu050;\n gap: $mu025;\n cursor: pointer;\n\n &--slider {\n border: 1px solid $color-grey-600;\n border-radius: $mu025;\n }\n\n &--layer {\n &__title {\n text-decoration: underline;\n }\n }\n\n &__image {\n width: 100%;\n }\n }\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;iBAWM,GAAU,CAAA,CAAA,CAAA;;sEACW,GAAA,CAAA,CAAA,CAAA;KACrB,yBAAwB;KACxB,0BAA0B,CAAA;;;;;;;;;;;;;;;;uBAQ3B,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA;+BANE,GAAM,CAAA,CAAA,CAAA,CAAA,CAAA;;0DAAuC,GAAM,CAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,GAAA,EAAA,KAAA,EAAA,aAAA,CAAA,CAAA;;gFAEpD,GAAA,CAAA,CAAA,CAAA;KACH,gCAA+B;KAC/B,iCAAiC,CAAA,GAAA,gBAAA,CAAA,CAAA,CAAA;;;;;;GAVzC,MAcK,CAAA,MAAA,EAAA,IAAA,EAAA,MAAA,CAAA,CAAA;GARH,MAAgE,CAAA,IAAA,EAAA,GAAA,CAAA,CAAA;;GAChE,MAMK,CAAA,IAAA,EAAA,IAAA,CAAA,CAAA;;;;;gCAPK,GAAM,CAAA,CAAA,CAAA,CAAA,CAAA;;;kFAAuC,GAAM,CAAA,CAAA,CAAA,CAAA,EAAA;;;;mDAM1D,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA;;qHAJC,GAAA,CAAA,CAAA,CAAA;KACH,gCAA+B;KAC/B,iCAAiC,CAAA,GAAA,gBAAA,CAAA,CAAA,EAAA;;;;;gDATnC,GAAU,CAAA,CAAA,CAAA;qHACW,GAAA,CAAA,CAAA,CAAA;MACrB,yBAAwB;MACxB,0BAA0B,CAAA,CAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA;;;;;;;;;;;;;;;;;OAXnB,KAAa,EAAA,GAAA,OAAA,CAAA;OACb,MAAc,EAAA,GAAA,OAAA,CAAA;AACd,CAAA,IAAA,EAAA,aAAa,GAAG,KAAK,EAAA,GAAA,OAAA,CAAA;OACrB,MAAc,EAAA,GAAA,OAAA,CAAA;;;;;;;;;;;;AACzB,kBAAG,UAAU,GAAf,MAAA,CAAA,MAAA,KAAuB,WAAW,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,20 @@
1
+ export type CarouselTitleTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
2
+ export type CarouselDevice = 's' | 'm' | 'xl';
3
+ export type CarouselOptions = {
4
+ s: ItemOptions;
5
+ m: ItemOptions;
6
+ xl: ItemOptions;
7
+ };
8
+ type ItemOptions = {
9
+ itemsVisible: number;
10
+ hasHalfItemVisible?: boolean;
11
+ };
12
+ export type CarouselItem = {
13
+ id: string;
14
+ title: string;
15
+ imgSrc: string;
16
+ titleTag?: string;
17
+ imgAlt: string;
18
+ };
19
+ export {};
20
+ //# sourceMappingURL=carousel.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel.types.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/carousel.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,EAAE,WAAW,CAAC;IACf,CAAC,EAAE,WAAW,CAAC;IACf,EAAE,EAAE,WAAW,CAAC;CACjB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1,54 @@
1
+ <svelte:options tag={null} />
2
+
3
+ <script lang="ts">
4
+ export let title: string;
5
+ export let imgSrc: string;
6
+ export let cardIsInLayer = false;
7
+ export let imgAlt: string;
8
+ $: attributes = { ...$$restProps };
9
+ </script>
10
+
11
+ <div
12
+ {...attributes}
13
+ class="mc-carousel-card {cardIsInLayer
14
+ ? 'mc-carousel-card--layer'
15
+ : 'mc-carousel-card--slider'}"
16
+ >
17
+ <img alt={imgAlt} class="mc-carousel-card__image" src={imgSrc} />
18
+ <div
19
+ class={cardIsInLayer
20
+ ? 'mc-carousel-card--layer__title'
21
+ : 'mc-carousel-card--slider__title'}
22
+ >
23
+ {title}
24
+ </div>
25
+ </div>
26
+
27
+ <style lang="scss">
28
+ @import '@mozaic-ds/styles/settings-tools/_all-settings';
29
+ @import '@mozaic-ds/styles/components/c.card';
30
+
31
+ .mc-carousel-card {
32
+ display: flex;
33
+ flex-direction: column;
34
+ align-items: flex-start;
35
+ padding: $mu050;
36
+ gap: $mu025;
37
+ cursor: pointer;
38
+
39
+ &--slider {
40
+ border: 1px solid $color-grey-600;
41
+ border-radius: $mu025;
42
+ }
43
+
44
+ &--layer {
45
+ &__title {
46
+ text-decoration: underline;
47
+ }
48
+ }
49
+
50
+ &__image {
51
+ width: 100%;
52
+ }
53
+ }
54
+ </style>