@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.
- package/package.json +5 -5
- package/public/ClickOutside-63071e7a.js +15 -1
- package/public/ClickOutside-63071e7a.js.map +1 -1
- package/public/DataTableDefaultAction.nested-46712849.js +762 -0
- package/public/DataTableDefaultAction.nested-46712849.js.map +1 -0
- package/public/DataTableUtilities-313a448d.js +386 -0
- package/public/DataTableUtilities-313a448d.js.map +1 -0
- package/public/EventForward-8492ff62.js +109 -1
- package/public/EventForward-8492ff62.js.map +1 -1
- package/public/EventHandler-02058705.js +15 -1
- package/public/EventHandler-02058705.js.map +1 -1
- package/public/adeo/components/header/Header.js +1 -1
- package/public/adeo/components/header/Header.js.map +1 -1
- package/public/array-5b770a93.js +13 -1
- package/public/array-5b770a93.js.map +1 -1
- package/public/axis-fbc0f7b5.js +174 -1
- package/public/axis-fbc0f7b5.js.map +1 -1
- package/public/band-d7a07d2c.js +186 -1
- package/public/band-d7a07d2c.js.map +1 -1
- package/public/bricoman/components/header/Header.js +1 -1
- package/public/bricoman/components/header/Header.js.map +1 -1
- package/public/bundle.js +56 -60
- package/public/components/accordion/Accordion.js +365 -1
- package/public/components/accordion/Accordion.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.js +1515 -1
- package/public/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.svelte +20 -41
- package/public/components/badge/Badge.js +155 -1
- package/public/components/badge/Badge.js.map +1 -1
- package/public/components/badge/Badge.nested.js +101 -1
- package/public/components/badge/Badge.nested.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.js +372 -1
- package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js +319 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/components/button/Button.js +1141 -1
- package/public/components/button/Button.js.map +1 -1
- package/public/components/button/Button.nested.js +1005 -0
- package/public/components/button/Button.nested.js.map +1 -0
- package/public/components/button/Button.nested.svelte +173 -0
- package/public/components/button/Button.svelte +2 -2
- package/public/components/card/Card.js +369 -1
- package/public/components/card/Card.js.map +1 -1
- package/public/components/carousel/Carousel.js +710 -0
- package/public/components/carousel/Carousel.js.map +1 -0
- package/public/components/carousel/Carousel.svelte +408 -0
- package/public/components/carousel/CarouselCard.nested.js +140 -0
- package/public/components/carousel/CarouselCard.nested.js.map +1 -0
- package/public/components/carousel/carousel.types.d.ts +20 -0
- package/public/components/carousel/carousel.types.d.ts.map +1 -0
- package/public/components/carouselcard/CarouselCard.nested.svelte +54 -0
- package/public/components/chart/BarChart.js +583 -1
- package/public/components/chart/BarChart.js.map +1 -1
- package/public/components/chart/Donut.js +1189 -1
- package/public/components/chart/Donut.js.map +1 -1
- package/public/components/chart/GroupedBarChart.js +750 -1
- package/public/components/chart/GroupedBarChart.js.map +1 -1
- package/public/components/chart/LineChart.js +1731 -1
- package/public/components/chart/LineChart.js.map +1 -1
- package/public/components/chart/Radar.js +729 -1
- package/public/components/chart/Radar.js.map +1 -1
- package/public/components/chart/StackedBarChart.js +745 -1
- package/public/components/chart/StackedBarChart.js.map +1 -1
- package/public/components/checkbox/Checkbox.js +307 -1
- package/public/components/checkbox/Checkbox.js.map +1 -1
- package/public/components/checkboxgroup/checkboxGroup.js +404 -1
- package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
- package/public/components/checkboxgroup/checkboxgroup.types.d.ts.map +1 -1
- package/public/components/datatable/DataTable.js +3098 -1
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTable.svelte +19 -44
- package/public/components/datatable/DataTableDefaultAction.nested.js +4 -1
- package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js +164 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js +380 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js +424 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +263 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
- package/public/components/datatable/DataTableFooter.nested.js +637 -1
- package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
- package/public/components/datatable/data.d.ts.map +1 -1
- package/public/components/datatable/datatable.types.d.ts +2 -16
- package/public/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/components/datatabledefaultaction/DataTableDefaultAction.nested.svelte +0 -18
- package/public/components/dropdown/Dropdown.js +1426 -1
- package/public/components/dropdown/Dropdown.js.map +1 -1
- package/public/components/field/Field.js +375 -1
- package/public/components/field/Field.js.map +1 -1
- package/public/components/fileuploader/FileUploader.js +603 -1
- package/public/components/fileuploader/FileUploader.js.map +1 -1
- package/public/components/fileuploader/ResultFile.nested.js +344 -1
- package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/components/flag/Flag.js +174 -1
- package/public/components/flag/Flag.js.map +1 -1
- package/public/components/header/Header.js +918 -1
- package/public/components/header/Header.js.map +1 -1
- package/public/components/header/Header.types.d.ts.map +1 -1
- package/public/components/hero/Hero.js +271 -1
- package/public/components/hero/Hero.js.map +1 -1
- package/public/components/kpi/Kpi.js +404 -1
- package/public/components/kpi/Kpi.js.map +1 -1
- package/public/components/layer/Layer.js +471 -1
- package/public/components/layer/Layer.js.map +1 -1
- package/public/components/link/Link.js +380 -1
- package/public/components/link/Link.js.map +1 -1
- package/public/components/link/Link.nested.js +285 -0
- package/public/components/link/Link.nested.js.map +1 -0
- package/public/components/link/Link.nested.svelte +78 -0
- package/public/components/listbox/Listbox.js +595 -1
- package/public/components/listbox/Listbox.js.map +1 -1
- package/public/components/listbox/Listbox.nested.js +629 -1
- package/public/components/listbox/Listbox.nested.js.map +1 -1
- package/public/components/loader/Loader.js +246 -1
- package/public/components/loader/Loader.js.map +1 -1
- package/public/components/loader/Loader.nested.js +176 -1
- package/public/components/loader/Loader.nested.js.map +1 -1
- package/public/components/modal/Modal.js +395 -1
- package/public/components/modal/Modal.js.map +1 -1
- package/public/components/notification/Notification.js +458 -1
- package/public/components/notification/Notification.js.map +1 -1
- package/public/components/optionbutton/OptionButton.js +316 -1
- package/public/components/optionbutton/OptionButton.js.map +1 -1
- package/public/components/overlay/Overlay.js +104 -1
- package/public/components/overlay/Overlay.js.map +1 -1
- package/public/components/overlay/OverlayLoader.js +151 -1
- package/public/components/overlay/OverlayLoader.js.map +1 -1
- package/public/components/pagination/Pagination.js +613 -1
- package/public/components/pagination/Pagination.js.map +1 -1
- package/public/components/pagination/Pagination.svelte +4 -5
- package/public/components/passwordinput/PasswordInput.js +291 -1
- package/public/components/passwordinput/PasswordInput.js.map +1 -1
- package/public/components/phonenumber/PhoneNumber.js +6894 -1
- package/public/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/components/phonenumber/PhoneNumber.svelte +1 -1
- package/public/components/price/Price.js +768 -1
- package/public/components/price/Price.js.map +1 -1
- package/public/components/progressbar/ProgressBar.js +278 -1
- package/public/components/progressbar/ProgressBar.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.js +397 -1
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/radio/Radio.js +273 -1
- package/public/components/radio/Radio.js.map +1 -1
- package/public/components/radiogroup/RadioGroup.js +414 -1
- package/public/components/radiogroup/RadioGroup.js.map +1 -1
- package/public/components/radiogroup/radioGroup.types.d.ts.map +1 -1
- package/public/components/ratings/StarsInput.js +292 -1
- package/public/components/ratings/StarsInput.js.map +1 -1
- package/public/components/ratings/StarsResult.js +246 -1
- package/public/components/ratings/StarsResult.js.map +1 -1
- package/public/components/select/Select.js +451 -1
- package/public/components/select/Select.js.map +1 -1
- package/public/components/sidebar/Sidebar.js +784 -1
- package/public/components/sidebar/Sidebar.js.map +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js +592 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-feature.nested.js +402 -1
- package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-section.nested.js +394 -1
- package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js +198 -1
- package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-separator.nested.js +49 -1
- package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-service.d.ts.map +1 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js +312 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-user.nested.js +733 -1
- package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
- package/public/components/sidebar/sidebar.types.d.ts.map +1 -1
- package/public/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +1 -1
- package/public/components/sidebar-segment/sidebar-segment.nested.svelte +1 -1
- package/public/components/sidebar-user/sidebar-user.nested.svelte +0 -1
- package/public/components/starsinput/StarsInput.svelte +2 -9
- package/public/components/stepper/Stepper.js +371 -1
- package/public/components/stepper/Stepper.js.map +1 -1
- package/public/components/tabs/Tabs.js +615 -1
- package/public/components/tabs/Tabs.js.map +1 -1
- package/public/components/tabs/Tabs.nested.js +472 -1
- package/public/components/tabs/Tabs.nested.js.map +1 -1
- package/public/components/tag/Tag.js +665 -1
- package/public/components/tag/Tag.js.map +1 -1
- package/public/components/tag/Tag.nested.js +554 -1
- package/public/components/tag/Tag.nested.js.map +1 -1
- package/public/components/tag/Tag.nested.svelte +5 -5
- package/public/components/tag/Tag.svelte +5 -5
- package/public/components/taglist/TagList.js +475 -1
- package/public/components/taglist/TagList.js.map +1 -1
- package/public/components/textarea/Textarea.js +303 -1
- package/public/components/textarea/Textarea.js.map +1 -1
- package/public/components/textinput/Textinput.js +497 -1
- package/public/components/textinput/Textinput.js.map +1 -1
- package/public/components/textinput/Textinput.nested.js +320 -1
- package/public/components/textinput/Textinput.nested.js.map +1 -1
- package/public/components/toggle/Toggle.js +278 -1
- package/public/components/toggle/Toggle.js.map +1 -1
- package/public/components/tooltip/Tooltip.js +173 -1
- package/public/components/tooltip/Tooltip.js.map +1 -1
- package/public/icons/Billzloty24.js +2 -0
- package/public/icons/Billzloty24.js.map +1 -0
- package/public/icons/Billzloty32.js +2 -0
- package/public/icons/Billzloty32.js.map +1 -0
- package/public/icons/Billzloty48.js +2 -0
- package/public/icons/Billzloty48.js.map +1 -0
- package/public/icons/Billzloty64.js +2 -0
- package/public/icons/Billzloty64.js.map +1 -0
- package/public/icons/CardFundingzloty24.js +2 -0
- package/public/icons/CardFundingzloty24.js.map +1 -0
- package/public/icons/CardFundingzloty32.js +2 -0
- package/public/icons/CardFundingzloty32.js.map +1 -0
- package/public/icons/CardFundingzloty48.js +2 -0
- package/public/icons/CardFundingzloty48.js.map +1 -0
- package/public/icons/CardFundingzloty64.js +2 -0
- package/public/icons/CardFundingzloty64.js.map +1 -0
- package/public/icons/Fundingzloty24.js +2 -0
- package/public/icons/Fundingzloty24.js.map +1 -0
- package/public/icons/Fundingzloty32.js +2 -0
- package/public/icons/Fundingzloty32.js.map +1 -0
- package/public/icons/Fundingzloty48.js +2 -0
- package/public/icons/Fundingzloty48.js.map +1 -0
- package/public/icons/Fundingzloty64.js +2 -0
- package/public/icons/Fundingzloty64.js.map +1 -0
- package/public/icons/MonochromeStoreLocationbm24.js +2 -0
- package/public/icons/MonochromeStoreLocationbm24.js.map +1 -0
- package/public/icons/MonochromeStoreLocationbm32.js +2 -0
- package/public/icons/MonochromeStoreLocationbm32.js.map +1 -0
- package/public/icons/MonochromeStoreLocationbm48.js +2 -0
- package/public/icons/MonochromeStoreLocationbm48.js.map +1 -0
- package/public/icons/MonochromeStoreLocationbm64.js +2 -0
- package/public/icons/MonochromeStoreLocationbm64.js.map +1 -0
- package/public/icons/PaymentMonochromeBonificoBancario24.js +2 -0
- package/public/icons/PaymentMonochromeBonificoBancario24.js.map +1 -0
- package/public/icons/PaymentMonochromeBonificoBancario32.js +2 -0
- package/public/icons/PaymentMonochromeBonificoBancario32.js.map +1 -0
- package/public/icons/PaymentMonochromeBonificoBancario48.js +2 -0
- package/public/icons/PaymentMonochromeBonificoBancario48.js.map +1 -0
- package/public/icons/PaymentMonochromeBonificoBancario64.js +2 -0
- package/public/icons/PaymentMonochromeBonificoBancario64.js.map +1 -0
- package/public/icons/Receiptzloty24.js +2 -0
- package/public/icons/Receiptzloty24.js.map +1 -0
- package/public/icons/Receiptzloty32.js +2 -0
- package/public/icons/Receiptzloty32.js.map +1 -0
- package/public/icons/Receiptzloty48.js +2 -0
- package/public/icons/Receiptzloty48.js.map +1 -0
- package/public/icons/Receiptzloty64.js +2 -0
- package/public/icons/Receiptzloty64.js.map +1 -0
- package/public/icons/Renewableenergy24.js +2 -0
- package/public/icons/Renewableenergy24.js.map +1 -0
- package/public/icons/Renewableenergy32.js +2 -0
- package/public/icons/Renewableenergy32.js.map +1 -0
- package/public/icons/Renewableenergy48.js +2 -0
- package/public/icons/Renewableenergy48.js.map +1 -0
- package/public/icons/Renewableenergy64.js +2 -0
- package/public/icons/Renewableenergy64.js.map +1 -0
- package/public/icons/StoreBM24.js +2 -0
- package/public/icons/StoreBM24.js.map +1 -0
- package/public/icons/StoreBM32.js +2 -0
- package/public/icons/StoreBM32.js.map +1 -0
- package/public/icons/StoreBM48.js +2 -0
- package/public/icons/StoreBM48.js.map +1 -0
- package/public/icons/StoreBM64.js +2 -0
- package/public/icons/StoreBM64.js.map +1 -0
- package/public/icons/Wood24.js +2 -0
- package/public/icons/Wood24.js.map +1 -0
- package/public/icons/Wood32.js +2 -0
- package/public/icons/Wood32.js.map +1 -0
- package/public/icons/Wood48.js +2 -0
- package/public/icons/Wood48.js.map +1 -0
- package/public/icons/Wood64.js +2 -0
- package/public/icons/Wood64.js.map +1 -0
- package/public/icons/Woodflooring24.js +2 -0
- package/public/icons/Woodflooring24.js.map +1 -0
- package/public/icons/Woodflooring32.js +2 -0
- package/public/icons/Woodflooring32.js.map +1 -0
- package/public/icons/Woodflooring48.js +2 -0
- package/public/icons/Woodflooring48.js.map +1 -0
- package/public/icons/Woodflooring64.js +2 -0
- package/public/icons/Woodflooring64.js.map +1 -0
- package/public/icons/Woodflooringalt24.js +2 -0
- package/public/icons/Woodflooringalt24.js.map +1 -0
- package/public/icons/Woodflooringalt32.js +2 -0
- package/public/icons/Woodflooringalt32.js.map +1 -0
- package/public/icons/Woodflooringalt48.js +2 -0
- package/public/icons/Woodflooringalt48.js.map +1 -0
- package/public/icons/Woodflooringalt64.js +2 -0
- package/public/icons/Woodflooringalt64.js.map +1 -0
- package/public/icons/Zloty24.js +2 -0
- package/public/icons/Zloty24.js.map +1 -0
- package/public/icons/Zloty32.js +2 -0
- package/public/icons/Zloty32.js.map +1 -0
- package/public/icons/Zloty48.js +2 -0
- package/public/icons/Zloty48.js.map +1 -0
- package/public/icons/Zloty64.js +2 -0
- package/public/icons/Zloty64.js.map +1 -0
- package/public/icons.js +888 -696
- package/public/index-c33b3772.js +873 -1
- package/public/index-c33b3772.js.map +1 -1
- package/public/linear-f46d7e9e.js +700 -1
- package/public/linear-f46d7e9e.js.map +1 -1
- package/public/main.d.ts +1 -0
- package/public/main.d.ts.map +1 -1
- package/public/path-1b5da959.js +186 -1
- package/public/path-1b5da959.js.map +1 -1
- package/public/sidebar-service-275bf9ef.js +129 -1
- package/public/sidebar-service-275bf9ef.js.map +1 -1
- package/public/sidebar-service-589b271b.js +125 -0
- package/public/sidebar-service-589b271b.js.map +1 -0
- package/public/stories/carousel/items.d.ts +3 -0
- package/public/stories/carousel/items.d.ts.map +1 -0
- package/public/symbol-b05a6e2b.js +169 -1
- package/public/symbol-b05a6e2b.js.map +1 -1
- package/public/transform-15d69d5d.js +2743 -1
- package/public/transform-15d69d5d.js.map +1 -1
- package/public/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/utilities/DataTableUtilities.ts +0 -12
- package/public/utilities/EventForward.js +136 -1
- package/public/utilities/EventForward.js.map +1 -1
- package/public/utilities/EventHandler.js +36 -1
- package/public/utilities/EventHandler.js.map +1 -1
- package/public/utilities/components/carousel/carousel.types.d.ts +20 -0
- package/public/utilities/components/carousel/carousel.types.d.ts.map +1 -0
- package/public/utilities/components/datatable/data.d.ts.map +1 -1
- package/public/utilities/components/datatable/datatable.types.d.ts +2 -16
- package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/utilities/main.d.ts +1 -0
- package/public/utilities/main.d.ts.map +1 -1
- package/public/utilities/stories/carousel/Carousel.stories.d.ts +8 -0
- package/public/utilities/stories/carousel/Carousel.stories.d.ts.map +1 -0
- package/public/utilities/stories/carousel/items.d.ts +3 -0
- package/public/utilities/stories/carousel/items.d.ts.map +1 -0
- package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
- package/public/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -1
- package/public/utilities/utilities/DataTableUtilities.d.ts.map +1 -1
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, e as element, d as space, x as create_component, n as noop, g as attr, y as set_style, j as append, A as mount_component, l as listen, C as transition_in, E as check_outros, D as transition_out, o as detach, G as destroy_component, J as destroy_each, H as run_all, Z as HtmlTag, M as group_outros, v as binding_callbacks } from '../../index-c33b3772.js';
|
|
2
|
+
import Link_nested from '../link/Link.nested.js';
|
|
3
|
+
import CarouselCard_nested from './CarouselCard.nested.js';
|
|
4
|
+
import Button_nested from '../button/Button.nested.js';
|
|
5
|
+
import { E as EventHandler } from '../../EventHandler-02058705.js';
|
|
6
|
+
import '../../EventForward-8492ff62.js';
|
|
7
|
+
import '../loader/Loader.nested.js';
|
|
8
|
+
|
|
9
|
+
/* src/components/carousel/Carousel.svelte generated by Svelte v3.58.0 */
|
|
10
|
+
|
|
11
|
+
function get_each_context(ctx, list, i) {
|
|
12
|
+
const child_ctx = ctx.slice();
|
|
13
|
+
child_ctx[40] = list[i];
|
|
14
|
+
return child_ctx;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// (236:6) {#each carouselItems as item}
|
|
18
|
+
function create_each_block(ctx) {
|
|
19
|
+
let button;
|
|
20
|
+
let carouselcard;
|
|
21
|
+
let t;
|
|
22
|
+
let current;
|
|
23
|
+
let mounted;
|
|
24
|
+
let dispose;
|
|
25
|
+
|
|
26
|
+
carouselcard = new CarouselCard_nested({
|
|
27
|
+
props: {
|
|
28
|
+
titleTag: /*item*/ ctx[40].titleTag,
|
|
29
|
+
imgAlt: /*item*/ ctx[40].imgAlt,
|
|
30
|
+
cardIsInLayer: false,
|
|
31
|
+
title: /*item*/ ctx[40].title,
|
|
32
|
+
imgSrc: /*item*/ ctx[40].imgSrc
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
function click_handler_1() {
|
|
37
|
+
return /*click_handler_1*/ ctx[28](/*item*/ ctx[40]);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
c() {
|
|
42
|
+
button = element("button");
|
|
43
|
+
create_component(carouselcard.$$.fragment);
|
|
44
|
+
t = space();
|
|
45
|
+
attr(button, "class", "mc-carousel-body__item");
|
|
46
|
+
},
|
|
47
|
+
m(target, anchor) {
|
|
48
|
+
insert(target, button, anchor);
|
|
49
|
+
mount_component(carouselcard, button, null);
|
|
50
|
+
append(button, t);
|
|
51
|
+
current = true;
|
|
52
|
+
|
|
53
|
+
if (!mounted) {
|
|
54
|
+
dispose = [
|
|
55
|
+
listen(button, "click", click_handler_1),
|
|
56
|
+
listen(button, "touchstart", /*handleTouchStart*/ ctx[17]),
|
|
57
|
+
listen(button, "touchmove", /*handleTouchMove*/ ctx[18]),
|
|
58
|
+
listen(button, "touchend", /*handleTouchEnd*/ ctx[19], { passive: true })
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
mounted = true;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
p(new_ctx, dirty) {
|
|
65
|
+
ctx = new_ctx;
|
|
66
|
+
const carouselcard_changes = {};
|
|
67
|
+
if (dirty[0] & /*carouselItems*/ 32) carouselcard_changes.titleTag = /*item*/ ctx[40].titleTag;
|
|
68
|
+
if (dirty[0] & /*carouselItems*/ 32) carouselcard_changes.imgAlt = /*item*/ ctx[40].imgAlt;
|
|
69
|
+
if (dirty[0] & /*carouselItems*/ 32) carouselcard_changes.title = /*item*/ ctx[40].title;
|
|
70
|
+
if (dirty[0] & /*carouselItems*/ 32) carouselcard_changes.imgSrc = /*item*/ ctx[40].imgSrc;
|
|
71
|
+
carouselcard.$set(carouselcard_changes);
|
|
72
|
+
},
|
|
73
|
+
i(local) {
|
|
74
|
+
if (current) return;
|
|
75
|
+
transition_in(carouselcard.$$.fragment, local);
|
|
76
|
+
current = true;
|
|
77
|
+
},
|
|
78
|
+
o(local) {
|
|
79
|
+
transition_out(carouselcard.$$.fragment, local);
|
|
80
|
+
current = false;
|
|
81
|
+
},
|
|
82
|
+
d(detaching) {
|
|
83
|
+
if (detaching) detach(button);
|
|
84
|
+
destroy_component(carouselcard);
|
|
85
|
+
mounted = false;
|
|
86
|
+
run_all(dispose);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function create_fragment(ctx) {
|
|
92
|
+
let div5;
|
|
93
|
+
let div2;
|
|
94
|
+
let div1;
|
|
95
|
+
let html_tag;
|
|
96
|
+
let raw_value = `<${/*titleTag*/ ctx[1]} class="mc-carousel-header__container__title">${/*title*/ ctx[0]}</${/*titleTag*/ ctx[1]}>` + "";
|
|
97
|
+
let t0;
|
|
98
|
+
let div0;
|
|
99
|
+
let link;
|
|
100
|
+
let t1;
|
|
101
|
+
let nav;
|
|
102
|
+
let button0;
|
|
103
|
+
let t2;
|
|
104
|
+
let button1;
|
|
105
|
+
let nav_class_value;
|
|
106
|
+
let t3;
|
|
107
|
+
let div4;
|
|
108
|
+
let div3;
|
|
109
|
+
let current;
|
|
110
|
+
let mounted;
|
|
111
|
+
let dispose;
|
|
112
|
+
|
|
113
|
+
link = new Link_nested({
|
|
114
|
+
props: {
|
|
115
|
+
href: "#layer",
|
|
116
|
+
iconname: "navigation-arrow-arrow--right-24px",
|
|
117
|
+
iconposition: "right",
|
|
118
|
+
label: /*subtitle*/ ctx[2],
|
|
119
|
+
size: "s",
|
|
120
|
+
target: "_self"
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
link.$on("click", /*click_handler*/ ctx[27]);
|
|
125
|
+
|
|
126
|
+
button0 = new Button_nested({
|
|
127
|
+
props: {
|
|
128
|
+
theme: "neutral",
|
|
129
|
+
size: "s",
|
|
130
|
+
bordered: true,
|
|
131
|
+
iconmode: "only",
|
|
132
|
+
iconname: "navigation-arrow-arrow--left-32px",
|
|
133
|
+
"aria-label": "Previous page",
|
|
134
|
+
disabled: /*isScrollBeginning*/ ctx[7],
|
|
135
|
+
label: "Previous",
|
|
136
|
+
loader: ""
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
button0.$on("click", /*previousCards*/ ctx[13]);
|
|
141
|
+
|
|
142
|
+
button1 = new Button_nested({
|
|
143
|
+
props: {
|
|
144
|
+
theme: "neutral",
|
|
145
|
+
size: "s",
|
|
146
|
+
type: "button",
|
|
147
|
+
bordered: true,
|
|
148
|
+
disabled: /*isScrollEnd*/ ctx[8],
|
|
149
|
+
iconmode: "only",
|
|
150
|
+
iconname: "navigation-arrow-arrow--right-32px",
|
|
151
|
+
"aria-label": "Next Page",
|
|
152
|
+
label: "Next",
|
|
153
|
+
loader: ""
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
button1.$on("click", /*nextCards*/ ctx[12]);
|
|
158
|
+
let each_value = /*carouselItems*/ ctx[5];
|
|
159
|
+
let each_blocks = [];
|
|
160
|
+
|
|
161
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
162
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
166
|
+
each_blocks[i] = null;
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
c() {
|
|
171
|
+
div5 = element("div");
|
|
172
|
+
div2 = element("div");
|
|
173
|
+
div1 = element("div");
|
|
174
|
+
html_tag = new HtmlTag(false);
|
|
175
|
+
t0 = space();
|
|
176
|
+
div0 = element("div");
|
|
177
|
+
create_component(link.$$.fragment);
|
|
178
|
+
t1 = space();
|
|
179
|
+
nav = element("nav");
|
|
180
|
+
create_component(button0.$$.fragment);
|
|
181
|
+
t2 = space();
|
|
182
|
+
create_component(button1.$$.fragment);
|
|
183
|
+
t3 = space();
|
|
184
|
+
div4 = element("div");
|
|
185
|
+
div3 = element("div");
|
|
186
|
+
|
|
187
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
188
|
+
each_blocks[i].c();
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
this.c = noop;
|
|
192
|
+
html_tag.a = t0;
|
|
193
|
+
attr(div0, "class", "mc-carousel-header__container__subtitle");
|
|
194
|
+
attr(div1, "class", "mc-carousel-header__titles");
|
|
195
|
+
attr(nav, "aria-label", "pagination");
|
|
196
|
+
|
|
197
|
+
attr(nav, "class", nav_class_value = "mc-carousel-header__buttons " + (/*mobile*/ ctx[3]
|
|
198
|
+
? 'mc-carousel-header__buttons-mobile'
|
|
199
|
+
: 'mc-carousel-header__buttons-desktop'));
|
|
200
|
+
|
|
201
|
+
attr(div2, "class", "mc-carousel-header");
|
|
202
|
+
attr(div3, "class", "mc-carousel-body__content");
|
|
203
|
+
set_style(div3, "--carousel__container-width-space", /*carouselContainerWidthSpace*/ ctx[10] + "px");
|
|
204
|
+
set_style(div3, "--carousel__items-count", /*carouselCurrentItemsSize*/ ctx[4]);
|
|
205
|
+
set_style(div3, "--carousel__item-width-space", /*carouselItemWidthSpace*/ ctx[11] + "px");
|
|
206
|
+
set_style(div3, "--carousel__items-visible", /*carouselCurrentItemsVisibleAndHalf*/ ctx[9]);
|
|
207
|
+
set_style(div3, "--carousel__scrollbar-left", carouselScrollbarLeft);
|
|
208
|
+
set_style(div3, "--carousel__container-separate-item-size", separateItemPixelSize + "px");
|
|
209
|
+
attr(div4, "class", "mc-carousel-body");
|
|
210
|
+
set_style(div4, "--carousel__accessibility-focus-padding", accessibilityFocusPadding + "px");
|
|
211
|
+
attr(div5, "class", "mc-carousel");
|
|
212
|
+
},
|
|
213
|
+
m(target, anchor) {
|
|
214
|
+
insert(target, div5, anchor);
|
|
215
|
+
append(div5, div2);
|
|
216
|
+
append(div2, div1);
|
|
217
|
+
html_tag.m(raw_value, div1);
|
|
218
|
+
append(div1, t0);
|
|
219
|
+
append(div1, div0);
|
|
220
|
+
mount_component(link, div0, null);
|
|
221
|
+
append(div2, t1);
|
|
222
|
+
append(div2, nav);
|
|
223
|
+
mount_component(button0, nav, null);
|
|
224
|
+
append(nav, t2);
|
|
225
|
+
mount_component(button1, nav, null);
|
|
226
|
+
append(div5, t3);
|
|
227
|
+
append(div5, div4);
|
|
228
|
+
append(div4, div3);
|
|
229
|
+
|
|
230
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
231
|
+
if (each_blocks[i]) {
|
|
232
|
+
each_blocks[i].m(div3, null);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/*div4_binding*/ ctx[29](div4);
|
|
237
|
+
current = true;
|
|
238
|
+
|
|
239
|
+
if (!mounted) {
|
|
240
|
+
dispose = listen(div4, "scroll", /*handleScrollCarousel*/ ctx[14]);
|
|
241
|
+
mounted = true;
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
p(ctx, dirty) {
|
|
245
|
+
if ((!current || dirty[0] & /*titleTag, title*/ 3) && raw_value !== (raw_value = `<${/*titleTag*/ ctx[1]} class="mc-carousel-header__container__title">${/*title*/ ctx[0]}</${/*titleTag*/ ctx[1]}>` + "")) html_tag.p(raw_value);
|
|
246
|
+
const link_changes = {};
|
|
247
|
+
if (dirty[0] & /*subtitle*/ 4) link_changes.label = /*subtitle*/ ctx[2];
|
|
248
|
+
link.$set(link_changes);
|
|
249
|
+
const button0_changes = {};
|
|
250
|
+
if (dirty[0] & /*isScrollBeginning*/ 128) button0_changes.disabled = /*isScrollBeginning*/ ctx[7];
|
|
251
|
+
button0.$set(button0_changes);
|
|
252
|
+
const button1_changes = {};
|
|
253
|
+
if (dirty[0] & /*isScrollEnd*/ 256) button1_changes.disabled = /*isScrollEnd*/ ctx[8];
|
|
254
|
+
button1.$set(button1_changes);
|
|
255
|
+
|
|
256
|
+
if (!current || dirty[0] & /*mobile*/ 8 && nav_class_value !== (nav_class_value = "mc-carousel-header__buttons " + (/*mobile*/ ctx[3]
|
|
257
|
+
? 'mc-carousel-header__buttons-mobile'
|
|
258
|
+
: 'mc-carousel-header__buttons-desktop'))) {
|
|
259
|
+
attr(nav, "class", nav_class_value);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (dirty[0] & /*handleClickCard, carouselItems, handleTouchStart, handleTouchMove, handleTouchEnd*/ 950304) {
|
|
263
|
+
each_value = /*carouselItems*/ ctx[5];
|
|
264
|
+
let i;
|
|
265
|
+
|
|
266
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
267
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
268
|
+
|
|
269
|
+
if (each_blocks[i]) {
|
|
270
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
271
|
+
transition_in(each_blocks[i], 1);
|
|
272
|
+
} else {
|
|
273
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
274
|
+
each_blocks[i].c();
|
|
275
|
+
transition_in(each_blocks[i], 1);
|
|
276
|
+
each_blocks[i].m(div3, null);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
group_outros();
|
|
281
|
+
|
|
282
|
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
|
283
|
+
out(i);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
check_outros();
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (!current || dirty[0] & /*carouselContainerWidthSpace*/ 1024) {
|
|
290
|
+
set_style(div3, "--carousel__container-width-space", /*carouselContainerWidthSpace*/ ctx[10] + "px");
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
if (!current || dirty[0] & /*carouselCurrentItemsSize*/ 16) {
|
|
294
|
+
set_style(div3, "--carousel__items-count", /*carouselCurrentItemsSize*/ ctx[4]);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (!current || dirty[0] & /*carouselItemWidthSpace*/ 2048) {
|
|
298
|
+
set_style(div3, "--carousel__item-width-space", /*carouselItemWidthSpace*/ ctx[11] + "px");
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (!current || dirty[0] & /*carouselCurrentItemsVisibleAndHalf*/ 512) {
|
|
302
|
+
set_style(div3, "--carousel__items-visible", /*carouselCurrentItemsVisibleAndHalf*/ ctx[9]);
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
i(local) {
|
|
306
|
+
if (current) return;
|
|
307
|
+
transition_in(link.$$.fragment, local);
|
|
308
|
+
transition_in(button0.$$.fragment, local);
|
|
309
|
+
transition_in(button1.$$.fragment, local);
|
|
310
|
+
|
|
311
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
312
|
+
transition_in(each_blocks[i]);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
current = true;
|
|
316
|
+
},
|
|
317
|
+
o(local) {
|
|
318
|
+
transition_out(link.$$.fragment, local);
|
|
319
|
+
transition_out(button0.$$.fragment, local);
|
|
320
|
+
transition_out(button1.$$.fragment, local);
|
|
321
|
+
each_blocks = each_blocks.filter(Boolean);
|
|
322
|
+
|
|
323
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
324
|
+
transition_out(each_blocks[i]);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
current = false;
|
|
328
|
+
},
|
|
329
|
+
d(detaching) {
|
|
330
|
+
if (detaching) detach(div5);
|
|
331
|
+
destroy_component(link);
|
|
332
|
+
destroy_component(button0);
|
|
333
|
+
destroy_component(button1);
|
|
334
|
+
destroy_each(each_blocks, detaching);
|
|
335
|
+
/*div4_binding*/ ctx[29](null);
|
|
336
|
+
mounted = false;
|
|
337
|
+
dispose();
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
let separateItemPixelSize = 16;
|
|
343
|
+
let accessibilityFocusPadding = 4;
|
|
344
|
+
let carouselScrollbarLeft = 0;
|
|
345
|
+
|
|
346
|
+
function getCarouselContainerWidthSpace(totalItems) {
|
|
347
|
+
return (totalItems - 1) * separateItemPixelSize;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function getCarouselItemWidthSpace(itemsVisible, itemsAndHalfVisible) {
|
|
351
|
+
if (itemsAndHalfVisible) {
|
|
352
|
+
return itemsVisible * separateItemPixelSize;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
return (itemsVisible - 1) * separateItemPixelSize;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function initCurrentDevice(mediaQueryM, mediaQueryXL) {
|
|
359
|
+
if (mediaQueryXL.matches) {
|
|
360
|
+
return 'xl';
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if (mediaQueryM.matches) {
|
|
364
|
+
return 'm';
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return 's';
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function instance($$self, $$props, $$invalidate) {
|
|
371
|
+
let carouselItems;
|
|
372
|
+
let carouselOptions;
|
|
373
|
+
let carouselItemsSize;
|
|
374
|
+
let carouselCurrentItemsVisible;
|
|
375
|
+
let carouselCurrentHasHalfItemVisible;
|
|
376
|
+
let carouselCurrentItemsSize;
|
|
377
|
+
let carouselCurrentItemsVisibleAndHalf;
|
|
378
|
+
let carouselItemWidthSpace;
|
|
379
|
+
let carouselContainerWidthSpace;
|
|
380
|
+
let { title } = $$props;
|
|
381
|
+
let { titleTag = 'h1' } = $$props;
|
|
382
|
+
let { subtitle } = $$props;
|
|
383
|
+
let { mobile = false } = $$props;
|
|
384
|
+
let { options } = $$props;
|
|
385
|
+
let { data } = $$props;
|
|
386
|
+
const mediaQueryS = window.matchMedia('(max-width: 679px)');
|
|
387
|
+
const mediaQueryM = window.matchMedia('(min-width: 680px) and (max-width: 1279px)');
|
|
388
|
+
const mediaQueryXL = window.matchMedia('(min-width: 1280px)');
|
|
389
|
+
|
|
390
|
+
const defaultCarousel = {
|
|
391
|
+
s: {
|
|
392
|
+
itemsVisible: 1,
|
|
393
|
+
hasHalfItemVisible: true
|
|
394
|
+
},
|
|
395
|
+
m: {
|
|
396
|
+
itemsVisible: 3,
|
|
397
|
+
hasHalfItemVisible: false
|
|
398
|
+
},
|
|
399
|
+
xl: {
|
|
400
|
+
itemsVisible: 5,
|
|
401
|
+
hasHalfItemVisible: false
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
let eventHandler = new EventHandler();
|
|
406
|
+
let currentDevice = initCurrentDevice(mediaQueryM, mediaQueryXL);
|
|
407
|
+
let carouselTouchStartX = 0;
|
|
408
|
+
let carouselTouchCurrentX = 0;
|
|
409
|
+
let carouselContainer;
|
|
410
|
+
let isScrollBeginning = true;
|
|
411
|
+
let isScrollEnd = false;
|
|
412
|
+
initMediaQueriesChanges();
|
|
413
|
+
|
|
414
|
+
function moveScroll(signe) {
|
|
415
|
+
function getCarouselItemWidth() {
|
|
416
|
+
if (carouselCurrentHasHalfItemVisible) {
|
|
417
|
+
return (carouselContainer.clientWidth - carouselCurrentItemsVisible * 16) / carouselCurrentItemsVisibleAndHalf;
|
|
418
|
+
} else {
|
|
419
|
+
return (carouselContainer.clientWidth - (carouselCurrentItemsVisible - 1) * 16) / carouselCurrentItemsVisible;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
function getLeft() {
|
|
424
|
+
if (!carouselCurrentHasHalfItemVisible) {
|
|
425
|
+
return carouselContainer.scrollLeft + signe * (carouselContainer.clientWidth + separateItemPixelSize - accessibilityFocusPadding * 2);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
const itemWidth = getCarouselItemWidth();
|
|
429
|
+
|
|
430
|
+
if (isScrollBeginning) {
|
|
431
|
+
return carouselContainer.scrollLeft + (signe * (carouselContainer.clientWidth - 3 / 4 * itemWidth - separateItemPixelSize) + accessibilityFocusPadding);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (isScrollEnd) {
|
|
435
|
+
return carouselContainer.scrollLeft + signe * (carouselContainer.clientWidth - 3 / 4 * itemWidth - separateItemPixelSize);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return carouselContainer.scrollLeft + signe * (carouselContainer.clientWidth - itemWidth / 2 - separateItemPixelSize + accessibilityFocusPadding * 2);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
carouselContainer.scrollTo({ behavior: 'smooth', left: getLeft() });
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
function nextCards() {
|
|
445
|
+
moveScroll(1);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
function previousCards() {
|
|
449
|
+
moveScroll(-1);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function handleScrollCarousel() {
|
|
453
|
+
$$invalidate(7, isScrollBeginning = (carouselContainer === null || carouselContainer === void 0
|
|
454
|
+
? void 0
|
|
455
|
+
: carouselContainer.scrollLeft) <= 0);
|
|
456
|
+
|
|
457
|
+
$$invalidate(8, isScrollEnd = (carouselContainer === null || carouselContainer === void 0
|
|
458
|
+
? void 0
|
|
459
|
+
: carouselContainer.scrollWidth) - (carouselContainer === null || carouselContainer === void 0
|
|
460
|
+
? void 0
|
|
461
|
+
: carouselContainer.scrollLeft) <= carouselContainer.offsetWidth);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function handleClickCard(item) {
|
|
465
|
+
eventHandler.dispatch('carousel-item-clicked', item);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function handleClickLink() {
|
|
469
|
+
eventHandler.dispatch('carousel-link-clicked', {});
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function initMediaQueriesChanges() {
|
|
473
|
+
mediaQueryS.onchange = e => {
|
|
474
|
+
handleMediaQueryChange(e, 's');
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
mediaQueryM.onchange = e => {
|
|
478
|
+
handleMediaQueryChange(e, 'm');
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
mediaQueryXL.onchange = e => {
|
|
482
|
+
handleMediaQueryChange(e, 'xl');
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function handleMediaQueryChange(event, matchingDevice) {
|
|
487
|
+
if (event.matches) {
|
|
488
|
+
$$invalidate(22, currentDevice = matchingDevice);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
function handleTouchStart(event) {
|
|
493
|
+
carouselTouchStartX = event.touches[0].clientX;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
function handleTouchMove(event) {
|
|
497
|
+
carouselTouchCurrentX = event.touches[0].clientX;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
function handleTouchEnd() {
|
|
501
|
+
if (carouselTouchStartX > carouselTouchCurrentX + 50) {
|
|
502
|
+
nextCards();
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
if (carouselTouchStartX < carouselTouchCurrentX - 50) {
|
|
506
|
+
previousCards();
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
const click_handler = () => handleClickLink();
|
|
511
|
+
const click_handler_1 = item => handleClickCard(item);
|
|
512
|
+
|
|
513
|
+
function div4_binding($$value) {
|
|
514
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
515
|
+
carouselContainer = $$value;
|
|
516
|
+
$$invalidate(6, carouselContainer);
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
$$self.$$set = $$props => {
|
|
521
|
+
if ('title' in $$props) $$invalidate(0, title = $$props.title);
|
|
522
|
+
if ('titleTag' in $$props) $$invalidate(1, titleTag = $$props.titleTag);
|
|
523
|
+
if ('subtitle' in $$props) $$invalidate(2, subtitle = $$props.subtitle);
|
|
524
|
+
if ('mobile' in $$props) $$invalidate(3, mobile = $$props.mobile);
|
|
525
|
+
if ('options' in $$props) $$invalidate(20, options = $$props.options);
|
|
526
|
+
if ('data' in $$props) $$invalidate(21, data = $$props.data);
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
$$self.$$.update = () => {
|
|
530
|
+
if ($$self.$$.dirty[0] & /*data*/ 2097152) {
|
|
531
|
+
$$invalidate(5, carouselItems = data ? JSON.parse(data) : []);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
if ($$self.$$.dirty[0] & /*options*/ 1048576) {
|
|
535
|
+
$$invalidate(26, carouselOptions = options
|
|
536
|
+
? Object.assign({}, defaultCarousel, JSON.parse(options))
|
|
537
|
+
: defaultCarousel);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if ($$self.$$.dirty[0] & /*carouselItems*/ 32) {
|
|
541
|
+
$$invalidate(25, carouselItemsSize = carouselItems === null || carouselItems === void 0
|
|
542
|
+
? void 0
|
|
543
|
+
: carouselItems.length);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
if ($$self.$$.dirty[0] & /*carouselOptions, currentDevice*/ 71303168) {
|
|
547
|
+
$$invalidate(24, carouselCurrentItemsVisible = carouselOptions[currentDevice].itemsVisible);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
if ($$self.$$.dirty[0] & /*carouselOptions, currentDevice*/ 71303168) {
|
|
551
|
+
$$invalidate(23, carouselCurrentHasHalfItemVisible = carouselOptions[currentDevice].hasHalfItemVisible || false);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
if ($$self.$$.dirty[0] & /*carouselItemsSize, carouselCurrentItemsVisible*/ 50331648) {
|
|
555
|
+
$$invalidate(4, carouselCurrentItemsSize = carouselItemsSize < carouselCurrentItemsVisible
|
|
556
|
+
? carouselCurrentItemsVisible
|
|
557
|
+
: carouselItemsSize);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if ($$self.$$.dirty[0] & /*carouselCurrentHasHalfItemVisible, carouselCurrentItemsVisible*/ 25165824) {
|
|
561
|
+
$$invalidate(9, carouselCurrentItemsVisibleAndHalf = carouselCurrentHasHalfItemVisible
|
|
562
|
+
? carouselCurrentItemsVisible + 0.5
|
|
563
|
+
: carouselCurrentItemsVisible);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
if ($$self.$$.dirty[0] & /*carouselCurrentItemsVisible, carouselCurrentHasHalfItemVisible*/ 25165824) {
|
|
567
|
+
$$invalidate(11, carouselItemWidthSpace = getCarouselItemWidthSpace(carouselCurrentItemsVisible, carouselCurrentHasHalfItemVisible));
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
if ($$self.$$.dirty[0] & /*carouselCurrentItemsSize*/ 16) {
|
|
571
|
+
$$invalidate(10, carouselContainerWidthSpace = getCarouselContainerWidthSpace(carouselCurrentItemsSize));
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
return [
|
|
576
|
+
title,
|
|
577
|
+
titleTag,
|
|
578
|
+
subtitle,
|
|
579
|
+
mobile,
|
|
580
|
+
carouselCurrentItemsSize,
|
|
581
|
+
carouselItems,
|
|
582
|
+
carouselContainer,
|
|
583
|
+
isScrollBeginning,
|
|
584
|
+
isScrollEnd,
|
|
585
|
+
carouselCurrentItemsVisibleAndHalf,
|
|
586
|
+
carouselContainerWidthSpace,
|
|
587
|
+
carouselItemWidthSpace,
|
|
588
|
+
nextCards,
|
|
589
|
+
previousCards,
|
|
590
|
+
handleScrollCarousel,
|
|
591
|
+
handleClickCard,
|
|
592
|
+
handleClickLink,
|
|
593
|
+
handleTouchStart,
|
|
594
|
+
handleTouchMove,
|
|
595
|
+
handleTouchEnd,
|
|
596
|
+
options,
|
|
597
|
+
data,
|
|
598
|
+
currentDevice,
|
|
599
|
+
carouselCurrentHasHalfItemVisible,
|
|
600
|
+
carouselCurrentItemsVisible,
|
|
601
|
+
carouselItemsSize,
|
|
602
|
+
carouselOptions,
|
|
603
|
+
click_handler,
|
|
604
|
+
click_handler_1,
|
|
605
|
+
div4_binding
|
|
606
|
+
];
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
class Carousel extends SvelteElement {
|
|
610
|
+
constructor(options) {
|
|
611
|
+
super();
|
|
612
|
+
const style = document.createElement('style');
|
|
613
|
+
style.textContent = `@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){}@media screen and (min-width: 680px){@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){}}@media screen and (min-width: 1024px){@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){}}@media screen and (min-width: 1280px){@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){}}@media screen and (min-width: 1920px){@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){}}@media screen and (min-width: 680px){}@media screen and (min-width: 1024px){}@media screen and (min-width: 1280px){}@media screen and (min-width: 1920px){}@media screen and (min-width: 1024px){}.mc-carousel{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:1rem}.mc-carousel-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mc-carousel-header__titles{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mc-carousel-header__buttons{gap:0.5rem}.mc-carousel-header__buttons-mobile{display:none}.mc-carousel-header__buttons-desktop{display:-webkit-box;display:-ms-flexbox;display:flex}.mc-carousel-body{position:relative;overflow-x:auto;overflow-y:hidden;padding:var(--carousel__accessibility-focus-padding)}.mc-carousel-body__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-column-gap:var(--carousel__container-separate-item-size);-moz-column-gap:var(--carousel__container-separate-item-size);column-gap:var(--carousel__container-separate-item-size);width:calc((100% - var(--carousel__item-width-space)) / var(--carousel__items-visible) * var(--carousel__items-count) + var(--carousel__container-width-space));margin-bottom:1.25rem}.mc-carousel-body__item{display:-webkit-box;display:-ms-flexbox;display:flex;background:none;border:none;margin:0;padding:0;width:calc(100% - var(--carousel__item-width-space))/var(--carousel__items-visible);position:relative}.mc-carousel-body__item::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-carousel-body__item:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}::-webkit-scrollbar{border-radius:0.25rem;height:6px;background:#e6e6e6;border-top:1px solid white;border-bottom:1px solid white}::-webkit-scrollbar-thumb{background:#333333;border-radius:6px}`;
|
|
614
|
+
this.shadowRoot.appendChild(style);
|
|
615
|
+
|
|
616
|
+
init(
|
|
617
|
+
this,
|
|
618
|
+
{
|
|
619
|
+
target: this.shadowRoot,
|
|
620
|
+
props: attribute_to_object(this.attributes),
|
|
621
|
+
customElement: true
|
|
622
|
+
},
|
|
623
|
+
instance,
|
|
624
|
+
create_fragment,
|
|
625
|
+
safe_not_equal,
|
|
626
|
+
{
|
|
627
|
+
title: 0,
|
|
628
|
+
titleTag: 1,
|
|
629
|
+
subtitle: 2,
|
|
630
|
+
mobile: 3,
|
|
631
|
+
options: 20,
|
|
632
|
+
data: 21
|
|
633
|
+
},
|
|
634
|
+
null,
|
|
635
|
+
[-1, -1]
|
|
636
|
+
);
|
|
637
|
+
|
|
638
|
+
if (options) {
|
|
639
|
+
if (options.target) {
|
|
640
|
+
insert(options.target, this, options.anchor);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
if (options.props) {
|
|
644
|
+
this.$set(options.props);
|
|
645
|
+
flush();
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
static get observedAttributes() {
|
|
651
|
+
return ["title", "titleTag", "subtitle", "mobile", "options", "data"];
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
get title() {
|
|
655
|
+
return this.$$.ctx[0];
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
set title(title) {
|
|
659
|
+
this.$$set({ title });
|
|
660
|
+
flush();
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
get titleTag() {
|
|
664
|
+
return this.$$.ctx[1];
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
set titleTag(titleTag) {
|
|
668
|
+
this.$$set({ titleTag });
|
|
669
|
+
flush();
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
get subtitle() {
|
|
673
|
+
return this.$$.ctx[2];
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
set subtitle(subtitle) {
|
|
677
|
+
this.$$set({ subtitle });
|
|
678
|
+
flush();
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
get mobile() {
|
|
682
|
+
return this.$$.ctx[3];
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
set mobile(mobile) {
|
|
686
|
+
this.$$set({ mobile });
|
|
687
|
+
flush();
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
get options() {
|
|
691
|
+
return this.$$.ctx[20];
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
set options(options) {
|
|
695
|
+
this.$$set({ options });
|
|
696
|
+
flush();
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
get data() {
|
|
700
|
+
return this.$$.ctx[21];
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
set data(data) {
|
|
704
|
+
this.$$set({ data });
|
|
705
|
+
flush();
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
export { Carousel as default };
|
|
710
|
+
//# sourceMappingURL=Carousel.js.map
|