@mozaic-ds/web-components 0.13.0 → 0.14.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 +1 -1
- package/public/adeo/bundle.js +5 -1
- package/public/adeo/components/button/Button.nested.js +2 -0
- package/public/adeo/components/button/Button.nested.js.map +1 -0
- package/public/adeo/components/button/Button.nested.svelte +173 -0
- package/public/adeo/components/carousel/Carousel.js +2 -0
- package/public/adeo/components/carousel/Carousel.js.map +1 -0
- package/public/adeo/components/carousel/Carousel.svelte +414 -0
- package/public/adeo/components/carousel/CarouselCard.nested.js +2 -0
- package/public/adeo/components/carousel/CarouselCard.nested.js.map +1 -0
- package/public/adeo/components/carousel/carousel.types.d.ts +19 -0
- package/public/adeo/components/carousel/carousel.types.d.ts.map +1 -0
- package/public/adeo/components/carouselcard/CarouselCard.nested.svelte +37 -0
- package/public/adeo/components/datatable/DataTable.js +1 -1
- package/public/adeo/components/datatable/DataTable.js.map +1 -1
- package/public/adeo/components/datatable/DataTable.svelte +5 -3
- package/public/adeo/components/datatable/DataTableDefaultSelection.nested.js +1 -1
- package/public/adeo/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/adeo/components/datatable/datatable.types.d.ts +1 -0
- package/public/adeo/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/adeo/components/datatabledefaultselection/DataTableDefaultSelection.nested.svelte +0 -15
- package/public/adeo/components/header/Header.js.map +1 -1
- package/public/adeo/components/header/Header.svelte +1 -1
- package/public/adeo/components/header/_c.header.scss +310 -0
- package/public/adeo/components/header/_s.header.scss +28 -0
- package/public/adeo/components/layer/Layer.js +1 -1
- package/public/adeo/components/layer/Layer.js.map +1 -1
- package/public/adeo/components/layer/Layer.svelte +3 -0
- package/public/adeo/components/layer/layer.types.d.ts +2 -0
- package/public/adeo/components/layer/layer.types.d.ts.map +1 -0
- package/public/adeo/components/link/Link.nested.js +2 -0
- package/public/adeo/components/link/Link.nested.js.map +1 -0
- package/public/adeo/components/link/Link.nested.svelte +78 -0
- package/public/adeo/components/quantityselector/QuantitySelector.js +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.svelte +1 -1
- package/public/adeo/components/sidebar/sidebar-feature-group.nested.js +1 -1
- package/public/adeo/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/adeo/components/sidebar/sidebar-segment.nested.js +1 -1
- package/public/adeo/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/adeo/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +6 -4
- package/public/adeo/components/sidebar-segment/sidebar-segment.nested.svelte +9 -8
- package/public/adeo/components/undefined/sidebar-variables.scss +9 -0
- package/public/adeo/main.d.ts +1 -0
- package/public/adeo/main.d.ts.map +1 -1
- package/public/adeo/stories/carousel/items.d.ts +3 -0
- package/public/adeo/stories/carousel/items.d.ts.map +1 -0
- package/public/bricoman/bundle.js +5 -1
- package/public/bricoman/components/button/Button.nested.js +2 -0
- package/public/bricoman/components/button/Button.nested.js.map +1 -0
- package/public/bricoman/components/button/Button.nested.svelte +173 -0
- package/public/bricoman/components/carousel/Carousel.js +2 -0
- package/public/bricoman/components/carousel/Carousel.js.map +1 -0
- package/public/bricoman/components/carousel/Carousel.svelte +414 -0
- package/public/bricoman/components/carousel/CarouselCard.nested.js +2 -0
- package/public/bricoman/components/carousel/CarouselCard.nested.js.map +1 -0
- package/public/bricoman/components/carousel/carousel.types.d.ts +19 -0
- package/public/bricoman/components/carousel/carousel.types.d.ts.map +1 -0
- package/public/bricoman/components/carouselcard/CarouselCard.nested.svelte +37 -0
- package/public/bricoman/components/datatable/DataTable.js +1 -1
- package/public/bricoman/components/datatable/DataTable.js.map +1 -1
- package/public/bricoman/components/datatable/DataTable.svelte +5 -3
- package/public/bricoman/components/datatable/DataTableDefaultSelection.nested.js +1 -1
- package/public/bricoman/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/bricoman/components/datatable/datatable.types.d.ts +1 -0
- package/public/bricoman/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/bricoman/components/datatabledefaultselection/DataTableDefaultSelection.nested.svelte +0 -15
- package/public/bricoman/components/header/Header.js.map +1 -1
- package/public/bricoman/components/header/Header.svelte +1 -1
- package/public/bricoman/components/header/_c.header.scss +310 -0
- package/public/bricoman/components/header/_s.header.scss +28 -0
- package/public/bricoman/components/layer/Layer.js +1 -1
- package/public/bricoman/components/layer/Layer.js.map +1 -1
- package/public/bricoman/components/layer/Layer.svelte +3 -0
- package/public/bricoman/components/layer/layer.types.d.ts +2 -0
- package/public/bricoman/components/layer/layer.types.d.ts.map +1 -0
- package/public/bricoman/components/link/Link.nested.js +2 -0
- package/public/bricoman/components/link/Link.nested.js.map +1 -0
- package/public/bricoman/components/link/Link.nested.svelte +78 -0
- package/public/bricoman/components/quantityselector/QuantitySelector.js +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.svelte +1 -1
- package/public/bricoman/components/sidebar/sidebar-feature-group.nested.js +1 -1
- package/public/bricoman/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/bricoman/components/sidebar/sidebar-segment.nested.js +1 -1
- package/public/bricoman/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/bricoman/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +6 -4
- package/public/bricoman/components/sidebar-segment/sidebar-segment.nested.svelte +9 -8
- package/public/bricoman/components/undefined/sidebar-variables.scss +9 -0
- package/public/bricoman/main.d.ts +1 -0
- package/public/bricoman/main.d.ts.map +1 -1
- package/public/bricoman/stories/carousel/items.d.ts +3 -0
- package/public/bricoman/stories/carousel/items.d.ts.map +1 -0
- package/public/bundle.js +5 -1
- package/public/components/button/Button.nested.js +2 -0
- package/public/components/button/Button.nested.js.map +1 -0
- package/public/components/button/Button.nested.svelte +173 -0
- package/public/components/carousel/Carousel.js +2 -0
- package/public/components/carousel/Carousel.js.map +1 -0
- package/public/components/carousel/Carousel.svelte +414 -0
- package/public/components/carousel/CarouselCard.nested.js +2 -0
- package/public/components/carousel/CarouselCard.nested.js.map +1 -0
- package/public/components/carousel/carousel.types.d.ts +19 -0
- package/public/components/carousel/carousel.types.d.ts.map +1 -0
- package/public/components/carouselcard/CarouselCard.nested.svelte +37 -0
- package/public/components/datatable/DataTable.js +1 -1
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTable.svelte +5 -3
- package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/components/datatable/datatable.types.d.ts +1 -0
- package/public/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/components/datatabledefaultselection/DataTableDefaultSelection.nested.svelte +0 -15
- package/public/components/header/Header.js.map +1 -1
- package/public/components/header/Header.svelte +1 -1
- package/public/components/header/_c.header.scss +310 -0
- package/public/components/header/_s.header.scss +28 -0
- package/public/components/layer/Layer.js +1 -1
- package/public/components/layer/Layer.js.map +1 -1
- package/public/components/layer/Layer.svelte +3 -0
- package/public/components/layer/layer.types.d.ts +2 -0
- package/public/components/layer/layer.types.d.ts.map +1 -0
- package/public/components/link/Link.nested.js +2 -0
- package/public/components/link/Link.nested.js.map +1 -0
- package/public/components/link/Link.nested.svelte +78 -0
- package/public/components/quantityselector/QuantitySelector.js +1 -1
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.svelte +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +6 -4
- package/public/components/sidebar-segment/sidebar-segment.nested.svelte +9 -8
- package/public/components/undefined/sidebar-variables.scss +9 -0
- package/public/main.d.ts +1 -0
- package/public/main.d.ts.map +1 -1
- package/public/stories/carousel/items.d.ts +3 -0
- package/public/stories/carousel/items.d.ts.map +1 -0
- package/public/utilities/components/carousel/carousel.types.d.ts +19 -0
- package/public/utilities/components/carousel/carousel.types.d.ts.map +1 -0
- package/public/utilities/components/datatable/datatable.types.d.ts +1 -0
- package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/utilities/components/layer/layer.types.d.ts +2 -0
- package/public/utilities/components/layer/layer.types.d.ts.map +1 -0
- 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/layer/Layer.stories.d.ts +1 -0
- package/public/utilities/stories/layer/Layer.stories.d.ts.map +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<svelte:options tag={null} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { get_current_component } from 'svelte/internal';
|
|
5
|
+
import type { LinkIconPosition, LinkSize, LinkTheme } from './link.types';
|
|
6
|
+
import { createEventForwarder } from '../../utilities/EventForward';
|
|
7
|
+
export let label: string;
|
|
8
|
+
export let href: string;
|
|
9
|
+
export let target: string;
|
|
10
|
+
export let theme: LinkTheme = undefined;
|
|
11
|
+
export let disabled = false;
|
|
12
|
+
export let size: LinkSize = 'm';
|
|
13
|
+
export let iconname: string | undefined = undefined;
|
|
14
|
+
export let iconposition: LinkIconPosition | undefined = undefined;
|
|
15
|
+
|
|
16
|
+
const forwardEvents = createEventForwarder(get_current_component());
|
|
17
|
+
|
|
18
|
+
$: userClass = $$props.class;
|
|
19
|
+
$: attributes = { ...$$restProps };
|
|
20
|
+
$: delete attributes.class;
|
|
21
|
+
|
|
22
|
+
function generateIconName(iconName: string): string {
|
|
23
|
+
return `${iconName} size="1rem"`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function generateIconClass(iconposition: string): string {
|
|
27
|
+
const classes = ['mc-link__icon'];
|
|
28
|
+
|
|
29
|
+
if (iconposition === 'left') {
|
|
30
|
+
classes.push('mc-link__icon--left');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (iconposition === 'right') {
|
|
34
|
+
classes.push('mc-link__icon--right');
|
|
35
|
+
}
|
|
36
|
+
return classes.join(' ');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function setClasses(theme: LinkTheme, size: LinkSize): string {
|
|
40
|
+
const classes = ['mc-link'];
|
|
41
|
+
|
|
42
|
+
if (theme) {
|
|
43
|
+
classes.push(`mc-link--${theme}`);
|
|
44
|
+
}
|
|
45
|
+
if (size) {
|
|
46
|
+
classes.push(`mc-link--${size}`);
|
|
47
|
+
}
|
|
48
|
+
return classes.join(' ');
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<a
|
|
53
|
+
use:forwardEvents
|
|
54
|
+
on:click
|
|
55
|
+
{href}
|
|
56
|
+
{target}
|
|
57
|
+
class="{setClasses(theme, size)} {disabled ? 'is-disabled' : ''} {userClass}"
|
|
58
|
+
{...attributes}
|
|
59
|
+
>
|
|
60
|
+
{#if iconname && iconposition === 'left'}
|
|
61
|
+
<span class={generateIconClass(iconposition)}>
|
|
62
|
+
{@html `<${generateIconName(iconname)} />`}
|
|
63
|
+
</span>
|
|
64
|
+
{/if}
|
|
65
|
+
|
|
66
|
+
{label}
|
|
67
|
+
|
|
68
|
+
{#if iconname && iconposition === 'right'}
|
|
69
|
+
<span class={generateIconClass(iconposition)}>
|
|
70
|
+
{@html `<${generateIconName(iconname)} />`}
|
|
71
|
+
</span>
|
|
72
|
+
{/if}
|
|
73
|
+
</a>
|
|
74
|
+
|
|
75
|
+
<style lang="scss">
|
|
76
|
+
@import '@mozaic-ds/styles/settings-tools/_all-settings';
|
|
77
|
+
@import '@mozaic-ds/styles/components/c.links';
|
|
78
|
+
</style>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as t,i as e,a as i,b as o,f as n,s as r,c as m,e as l,d as c,n as a,g as d,h as s,j as h,U as u,l as b,K as p,Y as f,aa as g,m as x,o as w,M as _,p as v,r as z,q as y}from"../../index-52f16292.js";import{E as k}from"../../EventHandler-f4efd23c.js";import{c as q}from"../../EventForward-422700d7.js";function $(t){let e,i,n,r,v,z,y,k,q,$,E,C,M,j,R,A=[{class:"mc-quantity-selector"},t[13]],H={};for(let t=0;t<A.length;t+=1)H=m(H,A[t]);return{c(){e=l("div"),i=l("button"),n=l("span"),n.innerHTML='<navigation-control-less-32px size="100%"></navigation-control-less-32px>',z=c(),y=l("input"),q=c(),$=l("button"),E=l("span"),E.innerHTML='<navigation-control-more-32px size="100%"></navigation-control-more-32px>',this.c=a,d(n,"class","mc-button__icon"),d(i,"aria-controls",t[1]),d(i,"class",r="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left "+(t[5]?"mc-button--s":"")),d(i,"aria-label",t[6]),i.disabled=v=t[0]===t[2],d(y,"id",t[1]),d(y,"placeholder",t[4]),d(y,"type","number"),d(y,"name","quantity-selector-input"),d(y,"class",k="mc-text-input mc-quantity-selector__input "+(t[5]?"mc-button--s":"")),d(y,"aria-label",t[7]),d(y,"aria-valuemin",t[2]),d(y,"aria-valuemax",t[3]),d(y,"aria-valuenow",t[0]),d(y,"spellcheck","false"),d(E,"class","mc-button__icon"),d($,"aria-controls",t[1]),d($,"class",C="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right "+(t[5]?"mc-button--s":"")),d($,"aria-label",t[8]),$.disabled=M=t[0]===t[3],s(e,H)},m(r,m){o(r,e,m),h(e,i),h(i,n),h(e,z),h(e,y),u(y,t[0]),h(e,q),h(e,$),h($,E),j||(R=[b(i,"click",t[14]),p(t[9].call(null,y)),b(y,"input",t[15]),b(y,"input",f(t[10])),b($,"click",t[16])],j=!0)},p(t,[o]){2&o&&d(i,"aria-controls",t[1]),32&o&&r!==(r="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left "+(t[5]?"mc-button--s":""))&&d(i,"class",r),64&o&&d(i,"aria-label",t[6]),5&o&&v!==(v=t[0]===t[2])&&(i.disabled=v),2&o&&d(y,"id",t[1]),16&o&&d(y,"placeholder",t[4]),32&o&&k!==(k="mc-text-input mc-quantity-selector__input "+(t[5]?"mc-button--s":""))&&d(y,"class",k),128&o&&d(y,"aria-label",t[7]),4&o&&d(y,"aria-valuemin",t[2]),8&o&&d(y,"aria-valuemax",t[3]),1&o&&d(y,"aria-valuenow",t[0]),1&o&&g(y.value)!==t[0]&&u(y,t[0]),2&o&&d($,"aria-controls",t[1]),32&o&&C!==(C="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right "+(t[5]?"mc-button--s":""))&&d($,"class",C),256&o&&d($,"aria-label",t[8]),9&o&&M!==(M=t[0]===t[3])&&($.disabled=M),s(e,H=x(A,[{class:"mc-quantity-selector"},8192&o&&t[13]]))},i:a,o:a,d(t){t&&w(e),j=!1,_(R)}}}function E(t,e,i){const o=["id","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel"];let n=v(e,o),{id:r}=e,{quantity:l=1}=e,{valuemin:c=1}=e,{valuemax:a=100}=e,{placeholder:d}=e,{small:s=!1}=e,{decrementarialabel:h="Decrement"}=e,{inputarialabel:u="Quantity Selector"}=e,{incrementarialabel:b="Increment"}=e,p=new k;const f=q(z());function x(){l>c&&i(0,l--,l),p.dispatch("decrement",l)}function w(){l<a&&i(0,l++,l),p.dispatch("increment",l)}return t.$$set=t=>{e=m(m({},e),y(t)),i(13,n=v(e,o)),"id"in t&&i(1,r=t.id),"quantity"in t&&i(0,l=t.quantity),"valuemin"in t&&i(2,c=t.valuemin),"valuemax"in t&&i(3,a=t.valuemax),"placeholder"in t&&i(4,d=t.placeholder),"small"in t&&i(5,s=t.small),"decrementarialabel"in t&&i(6,h=t.decrementarialabel),"inputarialabel"in t&&i(7,u=t.inputarialabel),"incrementarialabel"in t&&i(8,b=t.incrementarialabel)},[l,r,c,a,d,s,h,u,b,f,function(){l>a&&i(0,l=a),l<c&&i(0,l=c),p.dispatch("input",l)},x,w,n,()=>x(),function(){l=g(this.value),i(0,l)},()=>w()]}class C extends t{constructor(t){super();const m=document.createElement("style");m.textContent=".mc-text-input{font-family:\"Roboto\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-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;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' fill='%2346a610' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a8 8 0 11-8 8 8 8 0 018-8m0-2a10 10 0 1010 10A10 10 0 0012 2z'/%3E%3Cpath d='M10.73 15.75a1 1 0 01-.68-.26l-3-2.74a1 1 0 011.36-1.47l2.25 2.08 4.36-4.42a1 1 0 111.42 1.41l-5 5.1a1 1 0 01-.71.3z'/%3E%3C/svg%3E\")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23c61112'%3E%3Cpath d='M12 2a10 10 0 1010 10A10 10 0 0012 2zm0 18a8 8 0 118-8 8 8 0 01-8 8z'/%3E%3Cpath d='M12 7a1 1 0 00-1 1v4.38a1 1 0 002 0V8a1 1 0 00-1-1z'/%3E%3Ccircle cx='12' cy='16' r='1'/%3E%3C/svg%3E\")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.mc-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;color:#ffffff;background-color:#007f8c;font-family:\"Roboto\", sans-serif;font-weight:700;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;fill:currentColor}.mc-button.is-hover,.mc-button:hover{background-color:#006974;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006974}.mc-button:disabled,.mc-button.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button .mc-button__icon:first-child,.mc-button .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button.is-focus,.mc-button:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.mc-button--s{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s .mc-button__icon:first-child,.mc-button--s .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m .mc-button__icon:first-child,.mc-button--m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l .mc-button__icon{width:2rem;height:2rem}.mc-button--l .mc-button__icon:first-child,.mc-button--l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:0;padding:0}.mc-button__icon{-ms-flex-negative:0;flex-shrink:0}.mc-button__icon:last-child{margin-left:0.5rem;margin-right:-0.25rem}.mc-button__icon:first-child{margin-right:0.5rem;margin-left:-0.25rem}.mc-button__icon:only-child{margin:0}.mc-button__label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none}.mc-button--solid-primary-02{background-color:#6a7081}.mc-button--solid-primary-02.is-hover,.mc-button--solid-primary-02:hover{background-color:#242938}.mc-button--solid-primary-02.is-active,.mc-button--solid-primary-02:active{background-color:#171b26}.mc-button--solid-primary-02:disabled,.mc-button--solid-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-neutral{background-color:#333333}.mc-button--solid-neutral.is-hover,.mc-button--solid-neutral:hover{background-color:#191919}.mc-button--solid-neutral.is-active,.mc-button--solid-neutral:active{background-color:#333333}.mc-button--solid-neutral:disabled,.mc-button--solid-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-danger{background-color:#c61112}.mc-button--solid-danger.is-hover,.mc-button--solid-danger:hover{background-color:#8c0003}.mc-button--solid-danger.is-active,.mc-button--solid-danger:active{background-color:#8c0003}.mc-button--solid-danger:disabled,.mc-button--solid-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered{color:#007f8c;border-color:#007f8c;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#d9f0f3;color:#006974}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.mc-button--bordered:disabled,.mc-button--bordered.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-primary-02{color:#6a7081;border-color:#6a7081;background-color:#ffffff}.mc-button--bordered-primary-02.is-hover,.mc-button--bordered-primary-02:hover{background-color:#eeeff1;color:#6a7081}.mc-button--bordered-primary-02.is-active,.mc-button--bordered-primary-02:active{background-color:#cfd2d8}.mc-button--bordered-primary-02:disabled,.mc-button--bordered-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-neutral{color:#333333;border-color:#333333;background-color:#ffffff}.mc-button--bordered-neutral.is-hover,.mc-button--bordered-neutral:hover{background-color:#e6e6e6;color:#333333}.mc-button--bordered-neutral.is-active,.mc-button--bordered-neutral:active{background-color:#cccccc}.mc-button--bordered-neutral:disabled,.mc-button--bordered-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-danger{color:#c61112;border-color:#c61112;background-color:#ffffff}.mc-button--bordered-danger.is-hover,.mc-button--bordered-danger:hover{background-color:#fdeaea;color:#8c0003}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger:disabled,.mc-button--bordered-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}@media screen and (min-width: 680px){.mc-button--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-m .mc-button__icon:first-child,.mc-button--s\\@from-m .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-m .mc-button__icon:first-child,.mc-button--m\\@from-m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-m{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-m .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-m .mc-button__icon:first-child,.mc-button--l\\@from-m .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-m{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-m{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-m{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1024px){.mc-button--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-l .mc-button__icon:first-child,.mc-button--s\\@from-l .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-l{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-l .mc-button__icon:first-child,.mc-button--m\\@from-l .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-l .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-l .mc-button__icon:first-child,.mc-button--l\\@from-l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-l{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-l{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-l{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{padding:0}}@media screen and (min-width: 1280px){.mc-button--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xl .mc-button__icon:first-child,.mc-button--s\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl .mc-button__icon:first-child,.mc-button--m\\@from-xl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xl .mc-button__icon:first-child,.mc-button--l\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1920px){.mc-button--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xxl .mc-button__icon:first-child,.mc-button--s\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl .mc-button__icon:first-child,.mc-button--m\\@from-xxl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xxl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xxl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xxl .mc-button__icon:first-child,.mc-button--l\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xxl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xxl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xxl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}.mc-quantity-selector{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mc-quantity-selector__button-right,.mc-quantity-selector__button-left{z-index:1}.mc-quantity-selector__button-right{border-radius:0 0.25rem 0.25rem 0}.mc-quantity-selector__button-left{border-radius:0.25rem 0 0 0.25rem}.mc-quantity-selector__input{border-radius:0}.mc-quantity-selector__input::-webkit-input-placeholder{text-align:center}.mc-quantity-selector__input::-moz-placeholder{text-align:center}.mc-quantity-selector__input:-ms-input-placeholder{text-align:center}.mc-quantity-selector__input::-ms-input-placeholder{text-align:center}.mc-quantity-selector__input,.mc-quantity-selector__input::placeholder{text-align:center}.mc-quantity-selector__input:not(:focus){border-left:none;border-right:none}.mc-quantity-selector__input:focus{z-index:2}",this.shadowRoot.appendChild(m),e(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},E,$,r,{id:1,quantity:0,valuemin:2,valuemax:3,placeholder:4,small:5,decrementarialabel:6,inputarialabel:7,incrementarialabel:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["id","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel"]}get id(){return this.$$.ctx[1]}set id(t){this.$$set({id:t}),n()}get quantity(){return this.$$.ctx[0]}set quantity(t){this.$$set({quantity:t}),n()}get valuemin(){return this.$$.ctx[2]}set valuemin(t){this.$$set({valuemin:t}),n()}get valuemax(){return this.$$.ctx[3]}set valuemax(t){this.$$set({valuemax:t}),n()}get placeholder(){return this.$$.ctx[4]}set placeholder(t){this.$$set({placeholder:t}),n()}get small(){return this.$$.ctx[5]}set small(t){this.$$set({small:t}),n()}get decrementarialabel(){return this.$$.ctx[6]}set decrementarialabel(t){this.$$set({decrementarialabel:t}),n()}get inputarialabel(){return this.$$.ctx[7]}set inputarialabel(t){this.$$set({inputarialabel:t}),n()}get incrementarialabel(){return this.$$.ctx[8]}set incrementarialabel(t){this.$$set({incrementarialabel:t}),n()}}export{C as default};
|
|
1
|
+
import{S as t,i as e,a as i,b as o,f as n,s as r,c as m,e as l,d as c,n as a,g as d,h as s,j as h,U as u,l as b,K as p,Y as f,aa as g,m as x,o as w,M as _,p as v,r as y,q as z}from"../../index-52f16292.js";import{E as k}from"../../EventHandler-f4efd23c.js";import{c as q}from"../../EventForward-422700d7.js";function $(t){let e,i,n,r,v,y,z,k,q,$,E,C,M,j,R,A=[{class:"mc-quantity-selector"},t[13]],H={};for(let t=0;t<A.length;t+=1)H=m(H,A[t]);return{c(){e=l("div"),i=l("button"),n=l("span"),n.innerHTML='<navigation-control-less-32px size="100%"></navigation-control-less-32px>',y=c(),z=l("input"),q=c(),$=l("button"),E=l("span"),E.innerHTML='<navigation-control-more-32px size="100%"></navigation-control-more-32px>',this.c=a,d(n,"class","mc-button__icon"),d(i,"aria-controls",t[1]),d(i,"class",r="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left "+(t[5]?"mc-button--s":"")),d(i,"aria-label",t[6]),i.disabled=v=t[0]===t[2],d(z,"id",t[1]),d(z,"placeholder",t[4]),d(z,"type","number"),d(z,"name","quantity-selector-input"),d(z,"class",k="mc-text-input mc-quantity-selector__input "+(t[5]?"mc-button--s":"")),d(z,"aria-label",t[7]),d(z,"aria-valuemin",t[2]),d(z,"aria-valuemax",t[3]),d(z,"aria-valuenow",t[0]),d(z,"spellcheck","false"),d(E,"class","mc-button__icon"),d($,"aria-controls",t[1]),d($,"class",C="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right "+(t[5]?"mc-button--s":"")),d($,"aria-label",t[8]),$.disabled=M=t[0]===t[3],s(e,H)},m(r,m){o(r,e,m),h(e,i),h(i,n),h(e,y),h(e,z),u(z,t[0]),h(e,q),h(e,$),h($,E),j||(R=[b(i,"click",t[14]),p(t[9].call(null,z)),b(z,"input",t[15]),b(z,"input",f(t[10])),b($,"click",t[16])],j=!0)},p(t,[o]){2&o&&d(i,"aria-controls",t[1]),32&o&&r!==(r="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left "+(t[5]?"mc-button--s":""))&&d(i,"class",r),64&o&&d(i,"aria-label",t[6]),5&o&&v!==(v=t[0]===t[2])&&(i.disabled=v),2&o&&d(z,"id",t[1]),16&o&&d(z,"placeholder",t[4]),32&o&&k!==(k="mc-text-input mc-quantity-selector__input "+(t[5]?"mc-button--s":""))&&d(z,"class",k),128&o&&d(z,"aria-label",t[7]),4&o&&d(z,"aria-valuemin",t[2]),8&o&&d(z,"aria-valuemax",t[3]),1&o&&d(z,"aria-valuenow",t[0]),1&o&&g(z.value)!==t[0]&&u(z,t[0]),2&o&&d($,"aria-controls",t[1]),32&o&&C!==(C="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right "+(t[5]?"mc-button--s":""))&&d($,"class",C),256&o&&d($,"aria-label",t[8]),9&o&&M!==(M=t[0]===t[3])&&($.disabled=M),s(e,H=x(A,[{class:"mc-quantity-selector"},8192&o&&t[13]]))},i:a,o:a,d(t){t&&w(e),j=!1,_(R)}}}function E(t,e,i){const o=["id","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel"];let n=v(e,o),{id:r}=e,{quantity:l=1}=e,{valuemin:c=1}=e,{valuemax:a=100}=e,{placeholder:d}=e,{small:s=!1}=e,{decrementarialabel:h="Decrement"}=e,{inputarialabel:u="Quantity Selector"}=e,{incrementarialabel:b="Increment"}=e,p=new k;const f=q(y());function x(){l>c&&i(0,l--,l),p.dispatch("decrement",l)}function w(){l<a&&i(0,l++,l),p.dispatch("increment",l)}return t.$$set=t=>{e=m(m({},e),z(t)),i(13,n=v(e,o)),"id"in t&&i(1,r=t.id),"quantity"in t&&i(0,l=t.quantity),"valuemin"in t&&i(2,c=t.valuemin),"valuemax"in t&&i(3,a=t.valuemax),"placeholder"in t&&i(4,d=t.placeholder),"small"in t&&i(5,s=t.small),"decrementarialabel"in t&&i(6,h=t.decrementarialabel),"inputarialabel"in t&&i(7,u=t.inputarialabel),"incrementarialabel"in t&&i(8,b=t.incrementarialabel)},[l,r,c,a,d,s,h,u,b,f,function(){l>a&&i(0,l=a),l<c&&i(0,l=c),p.dispatch("input-qty",l)},x,w,n,()=>x(),function(){l=g(this.value),i(0,l)},()=>w()]}class C extends t{constructor(t){super();const m=document.createElement("style");m.textContent=".mc-text-input{font-family:\"Roboto\", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-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;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' fill='%2346a610' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a8 8 0 11-8 8 8 8 0 018-8m0-2a10 10 0 1010 10A10 10 0 0012 2z'/%3E%3Cpath d='M10.73 15.75a1 1 0 01-.68-.26l-3-2.74a1 1 0 011.36-1.47l2.25 2.08 4.36-4.42a1 1 0 111.42 1.41l-5 5.1a1 1 0 01-.71.3z'/%3E%3C/svg%3E\")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23c61112'%3E%3Cpath d='M12 2a10 10 0 1010 10A10 10 0 0012 2zm0 18a8 8 0 118-8 8 8 0 01-8 8z'/%3E%3Cpath d='M12 7a1 1 0 00-1 1v4.38a1 1 0 002 0V8a1 1 0 00-1-1z'/%3E%3Ccircle cx='12' cy='16' r='1'/%3E%3C/svg%3E\")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.mc-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;color:#ffffff;background-color:#007f8c;font-family:\"Roboto\", sans-serif;font-weight:700;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;fill:currentColor}.mc-button.is-hover,.mc-button:hover{background-color:#006974;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006974}.mc-button:disabled,.mc-button.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button .mc-button__icon:first-child,.mc-button .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button.is-focus,.mc-button:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.mc-button--s{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s .mc-button__icon:first-child,.mc-button--s .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m .mc-button__icon:first-child,.mc-button--m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l .mc-button__icon{width:2rem;height:2rem}.mc-button--l .mc-button__icon:first-child,.mc-button--l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:0;padding:0}.mc-button__icon{-ms-flex-negative:0;flex-shrink:0}.mc-button__icon:last-child{margin-left:0.5rem;margin-right:-0.25rem}.mc-button__icon:first-child{margin-right:0.5rem;margin-left:-0.25rem}.mc-button__icon:only-child{margin:0}.mc-button__label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none}.mc-button--solid-primary-02{background-color:#6a7081}.mc-button--solid-primary-02.is-hover,.mc-button--solid-primary-02:hover{background-color:#242938}.mc-button--solid-primary-02.is-active,.mc-button--solid-primary-02:active{background-color:#171b26}.mc-button--solid-primary-02:disabled,.mc-button--solid-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-neutral{background-color:#333333}.mc-button--solid-neutral.is-hover,.mc-button--solid-neutral:hover{background-color:#191919}.mc-button--solid-neutral.is-active,.mc-button--solid-neutral:active{background-color:#333333}.mc-button--solid-neutral:disabled,.mc-button--solid-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-danger{background-color:#c61112}.mc-button--solid-danger.is-hover,.mc-button--solid-danger:hover{background-color:#8c0003}.mc-button--solid-danger.is-active,.mc-button--solid-danger:active{background-color:#8c0003}.mc-button--solid-danger:disabled,.mc-button--solid-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered{color:#007f8c;border-color:#007f8c;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#d9f0f3;color:#006974}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.mc-button--bordered:disabled,.mc-button--bordered.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-primary-02{color:#6a7081;border-color:#6a7081;background-color:#ffffff}.mc-button--bordered-primary-02.is-hover,.mc-button--bordered-primary-02:hover{background-color:#eeeff1;color:#6a7081}.mc-button--bordered-primary-02.is-active,.mc-button--bordered-primary-02:active{background-color:#cfd2d8}.mc-button--bordered-primary-02:disabled,.mc-button--bordered-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-neutral{color:#333333;border-color:#333333;background-color:#ffffff}.mc-button--bordered-neutral.is-hover,.mc-button--bordered-neutral:hover{background-color:#e6e6e6;color:#333333}.mc-button--bordered-neutral.is-active,.mc-button--bordered-neutral:active{background-color:#cccccc}.mc-button--bordered-neutral:disabled,.mc-button--bordered-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-danger{color:#c61112;border-color:#c61112;background-color:#ffffff}.mc-button--bordered-danger.is-hover,.mc-button--bordered-danger:hover{background-color:#fdeaea;color:#8c0003}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger:disabled,.mc-button--bordered-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}@media screen and (min-width: 680px){.mc-button--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-m .mc-button__icon:first-child,.mc-button--s\\@from-m .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-m .mc-button__icon:first-child,.mc-button--m\\@from-m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-m{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-m .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-m .mc-button__icon:first-child,.mc-button--l\\@from-m .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-m{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-m{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-m{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1024px){.mc-button--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-l .mc-button__icon:first-child,.mc-button--s\\@from-l .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-l{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-l .mc-button__icon:first-child,.mc-button--m\\@from-l .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-l .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-l .mc-button__icon:first-child,.mc-button--l\\@from-l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-l{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-l{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-l{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{padding:0}}@media screen and (min-width: 1280px){.mc-button--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xl .mc-button__icon:first-child,.mc-button--s\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl .mc-button__icon:first-child,.mc-button--m\\@from-xl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xl .mc-button__icon:first-child,.mc-button--l\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1920px){.mc-button--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xxl .mc-button__icon:first-child,.mc-button--s\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl .mc-button__icon:first-child,.mc-button--m\\@from-xxl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xxl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xxl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xxl .mc-button__icon:first-child,.mc-button--l\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xxl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xxl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xxl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}.mc-quantity-selector{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mc-quantity-selector__button-right,.mc-quantity-selector__button-left{z-index:1}.mc-quantity-selector__button-right{border-radius:0 0.25rem 0.25rem 0}.mc-quantity-selector__button-left{border-radius:0.25rem 0 0 0.25rem}.mc-quantity-selector__input{border-radius:0}.mc-quantity-selector__input::-webkit-input-placeholder{text-align:center}.mc-quantity-selector__input::-moz-placeholder{text-align:center}.mc-quantity-selector__input:-ms-input-placeholder{text-align:center}.mc-quantity-selector__input::-ms-input-placeholder{text-align:center}.mc-quantity-selector__input,.mc-quantity-selector__input::placeholder{text-align:center}.mc-quantity-selector__input:not(:focus){border-left:none;border-right:none}.mc-quantity-selector__input:focus{z-index:2}",this.shadowRoot.appendChild(m),e(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},E,$,r,{id:1,quantity:0,valuemin:2,valuemax:3,placeholder:4,small:5,decrementarialabel:6,inputarialabel:7,incrementarialabel:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["id","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel"]}get id(){return this.$$.ctx[1]}set id(t){this.$$set({id:t}),n()}get quantity(){return this.$$.ctx[0]}set quantity(t){this.$$set({quantity:t}),n()}get valuemin(){return this.$$.ctx[2]}set valuemin(t){this.$$set({valuemin:t}),n()}get valuemax(){return this.$$.ctx[3]}set valuemax(t){this.$$set({valuemax:t}),n()}get placeholder(){return this.$$.ctx[4]}set placeholder(t){this.$$set({placeholder:t}),n()}get small(){return this.$$.ctx[5]}set small(t){this.$$set({small:t}),n()}get decrementarialabel(){return this.$$.ctx[6]}set decrementarialabel(t){this.$$set({decrementarialabel:t}),n()}get inputarialabel(){return this.$$.ctx[7]}set inputarialabel(t){this.$$set({inputarialabel:t}),n()}get incrementarialabel(){return this.$$.ctx[8]}set incrementarialabel(t){this.$$set({incrementarialabel:t}),n()}}export{C as default};
|
|
2
2
|
//# sourceMappingURL=QuantitySelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantitySelector.js","sources":["../../../../src/components/quantityselector/QuantitySelector.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n import { createEventForwarder } from '../../utilities/EventForward';\n export let id: string | undefined = undefined;\n export let quantity = 1;\n export let valuemin = 1;\n export let valuemax = 100;\n export let placeholder: string | undefined = undefined;\n export let small = false;\n export let decrementarialabel = 'Decrement';\n export let inputarialabel = 'Quantity Selector';\n export let incrementarialabel = 'Increment';\n\n let eventHandler = new EventHandler();\n const forwardEvents = createEventForwarder(get_current_component());\n\n function handleValue(): void {\n if (quantity > valuemax) {\n quantity = valuemax;\n }\n if (quantity < valuemin) {\n quantity = valuemin;\n }\n eventHandler.dispatch('input', quantity);\n }\n\n function decrement(): void {\n if (quantity > valuemin) {\n quantity--;\n }\n eventHandler.dispatch('decrement', quantity);\n }\n\n function increment(): void {\n if (quantity < valuemax) {\n quantity++;\n }\n eventHandler.dispatch('increment', quantity);\n }\n</script>\n\n<div class=\"mc-quantity-selector\" {...$$restProps}>\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={decrementarialabel}\n on:click={() => decrement()}\n disabled={quantity === valuemin}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-less-32px size=\"100%\" />\n </span>\n </button>\n\n <input\n use:forwardEvents\n {id}\n {placeholder}\n bind:value={quantity}\n on:input|preventDefault={handleValue}\n type=\"number\"\n name=\"quantity-selector-input\"\n class=\"mc-text-input mc-quantity-selector__input {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={inputarialabel}\n aria-valuemin={valuemin}\n aria-valuemax={valuemax}\n aria-valuenow={quantity}\n spellcheck=\"false\"\n />\n\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={incrementarialabel}\n on:click={() => increment()}\n disabled={quantity === valuemax}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-more-32px size=\"100%\" />\n </span>\n </button>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/_c.text-input';\n @import '@mozaic-ds/styles/components/_c.button';\n @import '@mozaic-ds/styles/components/_c.quantity-selector';\n</style>\n"],"names":["ctx","button0","disabled","button0_disabled_value","button1","button1_disabled_value","insert","target","div","anchor","append","span0","input","span1","dirty","id","$$props","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel","eventHandler","EventHandler","forwardEvents","createEventForwarder","get_current_component","decrement","dispatch","increment","$$invalidate","to_number","this","value"],"mappings":"sYA4CsCA,EAAW,iYAE9BA,EAAE,wGACyEA,EAAA,GACtF,eACA,sBACQA,EAAkB,IAEpBC,EAAAC,SAAAC,EAAAH,OAAaA,EAAQ,iKAemBA,EAAA,GAC9C,eACA,sBACQA,EAAc,wBACXA,EAAQ,wBACRA,EAAQ,wBACRA,EAAQ,iFAKRA,EAAE,yGAC0EA,EAAA,GACvF,eACA,sBACQA,EAAkB,IAEpBI,EAAAF,SAAAG,EAAAL,OAAaA,EAAQ,kBAxCnCM,EA8CKC,EAAAC,EAAAC,GA7CHC,EAYQF,EAAAP,GAHNS,EAEMT,EAAAU,UAGRD,EAgBCF,EAAAI,OAZaZ,EAAQ,WActBU,EAYQF,EAAAJ,GAHNM,EAEMN,EAAAS,mFAxBmBb,EAAW,mEAlBrBA,EAAE,uGACyEA,EAAA,GACtF,eACA,4CACQA,EAAkB,IAEpB,EAAAc,GAAAX,KAAAA,EAAAH,OAAaA,EAAQ,iIAemBA,EAAA,GAC9C,eACA,6CACQA,EAAc,6BACXA,EAAQ,6BACRA,EAAQ,6BACRA,EAAQ,sBAVXA,EAAQ,QAARA,EAAQ,6BAeLA,EAAE,wGAC0EA,EAAA,GACvF,eACA,6CACQA,EAAkB,IAEpB,EAAAc,GAAAT,KAAAA,EAAAL,OAAaA,EAAQ,sEAxCGA,EAAW,0MAtCpCe,GAAAA,GAAkCC,GAClCC,SAAAA,EAAW,GAACD,GACZE,SAAAA,EAAW,GAACF,GACZG,SAAAA,EAAW,KAAGH,GACdI,YAAAA,GAA2CJ,GAC3CK,MAAAA,GAAQ,GAAKL,GACbM,mBAAAA,EAAqB,aAAWN,GAChCO,eAAAA,EAAiB,qBAAmBP,GACpCQ,mBAAAA,EAAqB,aAAWR,EAEvCS,MAAmBC,QACjBC,EAAgBC,EAAqBC,cAYlCC,IACHb,EAAWC,OACbD,IAAQA,GAEVQ,EAAaM,SAAS,YAAad,YAG5Be,IACHf,EAAWE,OACbF,IAAQA,GAEVQ,EAAaM,SAAS,YAAad,kbApB/BA,EAAWE,GACbc,EAAA,EAAAhB,EAAWE,GAETF,EAAWC,GACbe,EAAA,EAAAhB,EAAWC,GAEbO,EAAaM,SAAS,
|
|
1
|
+
{"version":3,"file":"QuantitySelector.js","sources":["../../../../src/components/quantityselector/QuantitySelector.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n import { createEventForwarder } from '../../utilities/EventForward';\n export let id: string | undefined = undefined;\n export let quantity = 1;\n export let valuemin = 1;\n export let valuemax = 100;\n export let placeholder: string | undefined = undefined;\n export let small = false;\n export let decrementarialabel = 'Decrement';\n export let inputarialabel = 'Quantity Selector';\n export let incrementarialabel = 'Increment';\n\n let eventHandler = new EventHandler();\n const forwardEvents = createEventForwarder(get_current_component());\n\n function handleValue(): void {\n if (quantity > valuemax) {\n quantity = valuemax;\n }\n if (quantity < valuemin) {\n quantity = valuemin;\n }\n eventHandler.dispatch('input-qty', quantity);\n }\n\n function decrement(): void {\n if (quantity > valuemin) {\n quantity--;\n }\n eventHandler.dispatch('decrement', quantity);\n }\n\n function increment(): void {\n if (quantity < valuemax) {\n quantity++;\n }\n eventHandler.dispatch('increment', quantity);\n }\n</script>\n\n<div class=\"mc-quantity-selector\" {...$$restProps}>\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={decrementarialabel}\n on:click={() => decrement()}\n disabled={quantity === valuemin}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-less-32px size=\"100%\" />\n </span>\n </button>\n\n <input\n use:forwardEvents\n {id}\n {placeholder}\n bind:value={quantity}\n on:input|preventDefault={handleValue}\n type=\"number\"\n name=\"quantity-selector-input\"\n class=\"mc-text-input mc-quantity-selector__input {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={inputarialabel}\n aria-valuemin={valuemin}\n aria-valuemax={valuemax}\n aria-valuenow={quantity}\n spellcheck=\"false\"\n />\n\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={incrementarialabel}\n on:click={() => increment()}\n disabled={quantity === valuemax}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-more-32px size=\"100%\" />\n </span>\n </button>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/_c.text-input';\n @import '@mozaic-ds/styles/components/_c.button';\n @import '@mozaic-ds/styles/components/_c.quantity-selector';\n</style>\n"],"names":["ctx","button0","disabled","button0_disabled_value","button1","button1_disabled_value","insert","target","div","anchor","append","span0","input","span1","dirty","id","$$props","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel","eventHandler","EventHandler","forwardEvents","createEventForwarder","get_current_component","decrement","dispatch","increment","$$invalidate","to_number","this","value"],"mappings":"sYA4CsCA,EAAW,iYAE9BA,EAAE,wGACyEA,EAAA,GACtF,eACA,sBACQA,EAAkB,IAEpBC,EAAAC,SAAAC,EAAAH,OAAaA,EAAQ,iKAemBA,EAAA,GAC9C,eACA,sBACQA,EAAc,wBACXA,EAAQ,wBACRA,EAAQ,wBACRA,EAAQ,iFAKRA,EAAE,yGAC0EA,EAAA,GACvF,eACA,sBACQA,EAAkB,IAEpBI,EAAAF,SAAAG,EAAAL,OAAaA,EAAQ,kBAxCnCM,EA8CKC,EAAAC,EAAAC,GA7CHC,EAYQF,EAAAP,GAHNS,EAEMT,EAAAU,UAGRD,EAgBCF,EAAAI,OAZaZ,EAAQ,WActBU,EAYQF,EAAAJ,GAHNM,EAEMN,EAAAS,mFAxBmBb,EAAW,mEAlBrBA,EAAE,uGACyEA,EAAA,GACtF,eACA,4CACQA,EAAkB,IAEpB,EAAAc,GAAAX,KAAAA,EAAAH,OAAaA,EAAQ,iIAemBA,EAAA,GAC9C,eACA,6CACQA,EAAc,6BACXA,EAAQ,6BACRA,EAAQ,6BACRA,EAAQ,sBAVXA,EAAQ,QAARA,EAAQ,6BAeLA,EAAE,wGAC0EA,EAAA,GACvF,eACA,6CACQA,EAAkB,IAEpB,EAAAc,GAAAT,KAAAA,EAAAL,OAAaA,EAAQ,sEAxCGA,EAAW,0MAtCpCe,GAAAA,GAAkCC,GAClCC,SAAAA,EAAW,GAACD,GACZE,SAAAA,EAAW,GAACF,GACZG,SAAAA,EAAW,KAAGH,GACdI,YAAAA,GAA2CJ,GAC3CK,MAAAA,GAAQ,GAAKL,GACbM,mBAAAA,EAAqB,aAAWN,GAChCO,eAAAA,EAAiB,qBAAmBP,GACpCQ,mBAAAA,EAAqB,aAAWR,EAEvCS,MAAmBC,QACjBC,EAAgBC,EAAqBC,cAYlCC,IACHb,EAAWC,OACbD,IAAQA,GAEVQ,EAAaM,SAAS,YAAad,YAG5Be,IACHf,EAAWE,OACbF,IAAQA,GAEVQ,EAAaM,SAAS,YAAad,kbApB/BA,EAAWE,GACbc,EAAA,EAAAhB,EAAWE,GAETF,EAAWC,GACbe,EAAA,EAAAhB,EAAWC,GAEbO,EAAaM,SAAS,YAAad,cAyBnBa,eAYJb,EAAQiB,EAAAC,KAAAC,mBAoBJJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E as e,i as t,s as
|
|
1
|
+
import{E as e,i as t,s as i,F as o,e as n,d as s,g as l,b as r,j as a,y as d,x as p,w as c,o as u,O as f,ab as m,t as b,P as v,k as g,B as h,C as x,l as z,N as _,D as w,z as y,H as k,G as $}from"../../index-52f16292.js";import L from"./sidebar-feature.nested.js";import{a as H,i as j,s as E}from"../../sidebar-service-293d79ef.js";import{E as G}from"../../EventHandler-f4efd23c.js";function M(e){o(e,"svelte-1dz8ip",".mc-feature-group.svelte-1dz8ip.svelte-1dz8ip{background:none;border:none;color:#ffffff;cursor:pointer;font-size:inherit;font-family:inherit;text-align:initial;margin:0;padding:0;overflow:hidden}.mc-feature-group__icon.svelte-1dz8ip.svelte-1dz8ip{fill:#ffffff;height:1.5rem;width:1.5rem}.mc-feature-group__container.svelte-1dz8ip.svelte-1dz8ip{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:5px 0;padding:8px 0px;-o-transition:margin 300ms ease-in-out;-webkit-transition:margin 300ms ease-in-out;transition:margin 300ms ease-in-out}.mc-feature-group__label.svelte-1dz8ip.svelte-1dz8ip{margin:0 8px;width:200px;min-width:200px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.mc-feature-group__label__tooltip.svelte-1dz8ip.svelte-1dz8ip{opacity:0;-webkit-transition:0s opacity;-o-transition:0s opacity;transition:0s opacity;background-color:#5b737d;border:1px solid #ffffff;border-radius:4px;position:absolute;pointer-events:none;left:calc(100% - 16px);padding:8px 16px;width:188px}.mc-feature-group__label__tooltip__pointer.svelte-1dz8ip.svelte-1dz8ip{position:absolute;top:50%;left:-8px;top:calc(50% - 6px);width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:8px solid white}.mc-feature-group__label__tooltip__pointer.svelte-1dz8ip div.svelte-1dz8ip{position:relative;top:-6px;left:2px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:8px solid #5b737d}.mc-feature-group__label.svelte-1dz8ip:hover+.mc-feature-group__label__tooltip.svelte-1dz8ip{opacity:1;-webkit-transition-delay:1s;-o-transition-delay:1s;transition-delay:1s}.mc-feature-group__content.svelte-1dz8ip.svelte-1dz8ip{overflow:hidden;-o-transition:height 300ms ease-in-out;-webkit-transition:height 300ms ease-in-out;transition:height 300ms ease-in-out}.mc-feature-group__content.is-close.svelte-1dz8ip.svelte-1dz8ip{height:0}.mc-feature-group.is-selected.svelte-1dz8ip.svelte-1dz8ip{background:#5b737d}.mc-feature-group.is-close.svelte-1dz8ip .mc-feature-group__container.svelte-1dz8ip{margin:0 20px;width:24px}.mc-feature-group.is-open.svelte-1dz8ip .mc-feature-group__container.svelte-1dz8ip{margin:0 32px}.mc-feature-group.svelte-1dz8ip.svelte-1dz8ip:hover{background:#405d68}.mc-feature-group.svelte-1dz8ip.svelte-1dz8ip:focus-visible{-webkit-box-shadow:none;box-shadow:none;border:none;outline:none}.mc-feature-group.svelte-1dz8ip:focus-visible .mc-feature-group__container.svelte-1dz8ip{-webkit-box-shadow:none;box-shadow:none;border:none;border-radius:6px;outline:1px solid #0b96cc}ul.svelte-1dz8ip.svelte-1dz8ip,li.svelte-1dz8ip.svelte-1dz8ip{list-style-type:none;margin:0;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}ul.svelte-1dz8ip.svelte-1dz8ip{-webkit-box-align:start;-ms-flex-align:start;align-items:start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}ul.svelte-1dz8ip li.svelte-1dz8ip{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box}")}function B(e,t,i){const o=e.slice();return o[15]=t[i],o}function C(e){let t,i=`<${V(e[0].icon)} />`;return{c(){t=n("span"),l(t,"class","mc-feature-group__icon svelte-1dz8ip")},m(e,o){r(e,t,o),t.innerHTML=i},p(e,o){1&o&&i!==(i=`<${V(e[0].icon)} />`)&&(t.innerHTML=i)},d(e){e&&u(t)}}}function F(e){let t,i,o,d,p,c=e[0].label+"",f=e[6]?.offsetHeight<e[6]?.scrollHeight&&N(e);function m(e,t){return e[1]?T:q}let h=m(e),x=h(e);return{c(){t=n("span"),i=b(c),o=s(),f&&f.c(),d=s(),x.c(),p=v(),l(t,"class","mc-feature-group__label svelte-1dz8ip")},m(n,s){r(n,t,s),a(t,i),e[9](t),r(n,o,s),f&&f.m(n,s),r(n,d,s),x.m(n,s),r(n,p,s)},p(e,t){1&t&&c!==(c=e[0].label+"")&&g(i,c),e[6]?.offsetHeight<e[6]?.scrollHeight?f?f.p(e,t):(f=N(e),f.c(),f.m(d.parentNode,d)):f&&(f.d(1),f=null),h!==(h=m(e))&&(x.d(1),x=h(e),x&&(x.c(),x.m(p.parentNode,p)))},d(i){i&&u(t),e[9](null),i&&u(o),f&&f.d(i),i&&u(d),x.d(i),i&&u(p)}}}function N(e){let t,i,o,d,p,c=e[0].label+"";return{c(){t=n("div"),i=n("div"),i.innerHTML='<div class="svelte-1dz8ip"></div>',o=s(),d=n("span"),p=b(c),l(i,"class","mc-feature-group__label__tooltip__pointer svelte-1dz8ip"),l(t,"aria-hidden","true"),l(t,"class","mc-feature-group__label__tooltip svelte-1dz8ip")},m(e,n){r(e,t,n),a(t,i),a(t,o),a(t,d),a(d,p)},p(e,t){1&t&&c!==(c=e[0].label+"")&&g(p,c)},d(e){e&&u(t)}}}function T(e){let t,i;return{c(){t=$("svg"),i=$("path"),l(i,"d","M12 9H4a1 1 0 010-2h8a1 1 0 010 2z"),l(t,"class","mc-feature-group__icon svelte-1dz8ip"),l(t,"width","16px"),l(t,"height","16px"),l(t,"viewBox","0 0 16 16")},m(e,o){r(e,t,o),a(t,i)},d(e){e&&u(t)}}}function q(e){let t,i;return{c(){t=$("svg"),i=$("path"),l(i,"d","M13 7H9V3a1 1 0 00-2 0v4H3a1 1 0 000 2h4v4a1 1 0 002 0V9h4a1 1 0 000-2z"),l(t,"class","mc-feature-group__icon svelte-1dz8ip"),l(t,"width","16px"),l(t,"height","16px"),l(t,"viewBox","0 0 16 16")},m(e,o){r(e,t,o),a(t,i)},d(e){e&&u(t)}}}function A(e){let t,i,o,p,f,m;function b(){return e[10](e[15])}return i=new L({props:{feature:e[15],a11yLabels:e[2]}}),{c(){t=n("li"),h(i.$$.fragment),o=s(),l(t,"class","svelte-1dz8ip")},m(e,n){r(e,t,n),x(i,t,null),a(t,o),p=!0,f||(m=z(t,"click",_(b)),f=!0)},p(t,o){e=t;const n={};1&o&&(n.feature=e[15]),4&o&&(n.a11yLabels=e[2]),i.$set(n)},i(e){p||(d(i.$$.fragment,e),p=!0)},o(e){c(i.$$.fragment,e),p=!1},d(e){e&&u(t),w(i),f=!1,m()}}}function S(e){let t,i,o,m,b,v,g,h,x,z,_,w,k,$=e[0].icon&&C(e),L=e[3]&&F(e),H=e[0].items,j=[];for(let t=0;t<H.length;t+=1)j[t]=A(B(e,H,t));const E=e=>c(j[e],1,1,(()=>{j[e]=null}));return{c(){t=n("button"),i=n("span"),$&&$.c(),o=s(),L&&L.c(),x=s(),z=n("ul");for(let e=0;e<j.length;e+=1)j[e].c();l(i,"class","mc-feature-group__container svelte-1dz8ip"),l(t,"class",m="mc-feature-group "+(e[5]?"is-selected":"")+" "+(e[3]?"is-open":"is-close")+" svelte-1dz8ip"),l(t,"aria-label",b=e[0].label),l(t,"aria-expanded",v=e[3]&&e[1]),l(t,"aria-controls",g=e[0].code+"-list"),l(t,"id",h=e[0].code),l(z,"class","mc-feature-group__content is-close svelte-1dz8ip"),l(z,"aria-hidden",_=!e[3]||!e[1]),l(z,"id",w=e[0].code+"-list")},m(n,s){r(n,t,s),a(t,i),$&&$.m(i,null),a(i,o),L&&L.m(i,null),r(n,x,s),r(n,z,s);for(let e=0;e<j.length;e+=1)j[e]&&j[e].m(z,null);e[11](z),k=!0},p(e,[n]){if(e[0].icon?$?$.p(e,n):($=C(e),$.c(),$.m(i,o)):$&&($.d(1),$=null),e[3]?L?L.p(e,n):(L=F(e),L.c(),L.m(i,null)):L&&(L.d(1),L=null),(!k||40&n&&m!==(m="mc-feature-group "+(e[5]?"is-selected":"")+" "+(e[3]?"is-open":"is-close")+" svelte-1dz8ip"))&&l(t,"class",m),(!k||1&n&&b!==(b=e[0].label))&&l(t,"aria-label",b),(!k||10&n&&v!==(v=e[3]&&e[1]))&&l(t,"aria-expanded",v),(!k||1&n&&g!==(g=e[0].code+"-list"))&&l(t,"aria-controls",g),(!k||1&n&&h!==(h=e[0].code))&&l(t,"id",h),133&n){let t;for(H=e[0].items,t=0;t<H.length;t+=1){const i=B(e,H,t);j[t]?(j[t].p(i,n),d(j[t],1)):(j[t]=A(i),j[t].c(),d(j[t],1),j[t].m(z,null))}for(y(),t=H.length;t<j.length;t+=1)E(t);p()}(!k||10&n&&_!==(_=!e[3]||!e[1]))&&l(z,"aria-hidden",_),(!k||1&n&&w!==(w=e[0].code+"-list"))&&l(z,"id",w)},i(e){if(!k){for(let e=0;e<H.length;e+=1)d(j[e]);k=!0}},o(e){j=j.filter(Boolean);for(let e=0;e<j.length;e+=1)c(j[e]);k=!1},d(i){i&&u(t),$&&$.d(),L&&L.d(),i&&u(x),i&&u(z),f(j,i),e[11](null)}}}function V(e){return`${e} size="1.5rem"`}function D(e,t,i){let o,n;m(e,j,(e=>i(3,o=e))),m(e,E,(e=>i(8,n=e)));let s,l,{featureGroup:r}=t,{expand:a}=t,{a11yLabels:d}=t,p=new G,c=!1;function u(e){var t;e.disabled||((null===(t=e.items)||void 0===t?void 0:t.length)?p.dispatch("feature-click",e):H(e.code))}return e.$$set=e=>{"featureGroup"in e&&i(0,r=e.featureGroup),"expand"in e&&i(1,a=e.expand),"a11yLabels"in e&&i(2,d=e.a11yLabels)},e.$$.update=()=>{var t,l,d,p,u,f;267&e.$$.dirty&&(t=a,l=o,d=r,i(5,c=null!==(f=(null==(p=n)?void 0:p.lv0)&&d.code===(null===(u=null==p?void 0:p.lv0)||void 0===u?void 0:u.code)&&(!p.lv1||!t||!l))&&void 0!==f&&f)),10&e.$$.dirty&&function(e,t){if(s){i(4,s.style.height="",s),i(4,s.style.transition="none",s);const o=window.getComputedStyle(s).height;s.classList.add(t&&e?"is-open":"is-close"),s.classList.remove(t&&e?"is-close":"is-open");const n=window.getComputedStyle(s).height;i(4,s.style.height=o,s),requestAnimationFrame((()=>{i(4,s.style.transition="",s),requestAnimationFrame((()=>{i(4,s.style.height=n,s)}))}));const l=()=>{i(4,s.style.height="",s),s.removeEventListener("transitionend",l)};s.addEventListener("transitionend",l)}}(a,o)},[r,a,d,o,s,c,l,u,n,function(e){k[e?"unshift":"push"]((()=>{l=e,i(6,l)}))},e=>u(e),function(e){k[e?"unshift":"push"]((()=>{s=e,i(4,s)}))}]}class O extends e{constructor(e){super(),t(this,e,D,S,i,{featureGroup:0,expand:1,a11yLabels:2},M)}}export{O as default};
|
|
2
2
|
//# sourceMappingURL=sidebar-feature-group.nested.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-feature-group.nested.js","sources":["../../../../src/components/sidebar/sidebar-feature-group.nested.svelte"],"sourcesContent":["<svelte:options />\n\n<script lang=\"ts\">\n import type { FeatureGroup, Feature, A11yLabels } from './sidebar.types';\n import FeatureComponent from './sidebar-feature.nested.svelte';\n import {\n isSidebarOpen,\n selectedFeature,\n selectFeature,\n Selection,\n } from './sidebar-service';\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let featureGroup: FeatureGroup;\n export let expand: boolean;\n export let a11yLabels: A11yLabels;\n let eventHandler = new EventHandler();\n let content: HTMLElement;\n\n $: updateSelection(expand, $isSidebarOpen, featureGroup, $selectedFeature);\n $: updateContentCSS(expand, $isSidebarOpen);\n\n let isSelected = false;\n\n let label: HTMLElement;\n\n function updateSelection(\n isExpanded: boolean,\n isOpen: boolean,\n group: FeatureGroup,\n selection?: Selection,\n ): void {\n isSelected =\n (selection?.lv0 &&\n group.code === selection?.lv0?.code &&\n (!selection.lv1 || !isExpanded || !isOpen)) ??\n false;\n }\n\n // Update the CSS programatically to have a nice animation on height between 0px and 'auto'\n function updateContentCSS(isExpanded: boolean, isOpen: boolean): void {\n if (content) {\n content.style.height = '';\n content.style.transition = 'none';\n const startHeight = window.getComputedStyle(content).height;\n\n content.classList.add(isOpen && isExpanded ? 'is-open' : 'is-close');\n content.classList.remove(isOpen && isExpanded ? 'is-close' : 'is-open');\n\n const height = window.getComputedStyle(content).height;\n content.style.height = startHeight;\n\n // wait until the next frame so that everything has time to update before starting the transition\n requestAnimationFrame(() => {\n content.style.transition = '';\n requestAnimationFrame(() => {\n content.style.height = height;\n });\n });\n\n // Clear the saved height values after the transition\n const handler = () => {\n content.style.height = '';\n content.removeEventListener('transitionend', handler);\n };\n\n content.addEventListener('transitionend', handler);\n }\n }\n\n function generateIcon(iconname: string): string {\n return `${iconname} size=\"1.5rem\" style=\"height: 1.5rem; width: 1.5rem;\"`;\n }\n\n function handleClick(feature: Feature) {\n if (!feature.disabled) {\n // Only select the feature if it is the last level item\n if (feature.items?.length) {\n eventHandler.dispatch('feature-click', feature);\n } else {\n selectFeature(feature.code);\n }\n }\n }\n</script>\n\n<button\n class=\"mc-feature-group {isSelected ? 'is-selected' : ''} {$isSidebarOpen\n ? 'is-open'\n : 'is-close'}\"\n aria-label={featureGroup.label}\n aria-expanded={$isSidebarOpen && expand}\n aria-controls=\"{featureGroup.code}-list\"\n id={featureGroup.code}\n>\n <span class=\"mc-feature-group__container\">\n {#if featureGroup.icon}\n {@html `<${generateIcon(\n featureGroup.icon,\n )} class=\"mc-feature-group__icon\" />`}\n {/if}\n {#if $isSidebarOpen}\n <span class=\"mc-feature-group__label\" bind:this={label}>\n {featureGroup.label}\n </span>\n {#if label?.offsetHeight < label?.scrollHeight}\n <div aria-hidden=\"true\" class=\"mc-feature-group__label__tooltip\">\n <div class=\"mc-feature-group__label__tooltip__pointer\"><div /></div>\n <span>{featureGroup.label}</span>\n </div>\n {/if}\n {#if !expand}\n <svg\n class=\"mc-feature-group__icon\"\n width=\"16px\"\n height=\"16px\"\n viewBox=\"0 0 16 16\"\n ><path\n d=\"M13 7H9V3a1 1 0 00-2 0v4H3a1 1 0 000 2h4v4a1 1 0 002 0V9h4a1 1 0 000-2z\"\n /></svg\n >\n {:else}\n <svg\n class=\"mc-feature-group__icon\"\n width=\"16px\"\n height=\"16px\"\n viewBox=\"0 0 16 16\"\n ><path d=\"M12 9H4a1 1 0 010-2h8a1 1 0 010 2z\" /></svg\n >\n {/if}\n {/if}\n </span>\n</button>\n<ul\n class=\"mc-feature-group__content is-close\"\n aria-hidden={!$isSidebarOpen || !expand}\n id=\"{featureGroup.code}-list\"\n bind:this={content}\n>\n {#each featureGroup.items as feature}\n <li on:click|stopPropagation={() => handleClick(feature)}>\n <FeatureComponent {feature} {a11yLabels} />\n </li>\n {/each}\n</ul>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import './sidebar-variables';\n\n .mc-feature-group {\n background: none;\n border: none;\n color: $color-sidebar-text-color;\n cursor: pointer;\n font-size: inherit;\n font-family: inherit;\n text-align: initial;\n margin: 0;\n padding: 0;\n overflow: hidden;\n\n &__icon {\n fill: $color-sidebar-icon;\n }\n\n &__container {\n display: flex;\n align-items: center;\n margin: 5px 0;\n padding: 8px 0px;\n @include transition(margin 300ms ease-in-out);\n }\n\n &__label {\n margin: 0 8px;\n width: 200px;\n min-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n\n &__tooltip {\n opacity: 0;\n transition: 0s opacity;\n background-color: $color-sidebar-divider-background;\n border: 1px solid $color-sidebar-text-color;\n border-radius: 4px;\n position: absolute;\n pointer-events: none;\n left: calc(100% - 16px);\n padding: 8px 16px;\n width: 188px;\n\n &__pointer {\n position: absolute;\n top: 50%;\n left: -8px;\n top: calc(50% - 6px);\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 8px solid white;\n\n & div {\n position: relative;\n top: -6px;\n left: 2px;\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 8px solid $color-sidebar-divider-background;\n }\n }\n }\n\n &:hover + .mc-feature-group__label__tooltip {\n opacity: 1;\n transition-delay: 1s;\n }\n }\n\n &__content {\n overflow: hidden;\n @include transition(height 300ms ease-in-out);\n &.is-close {\n height: 0;\n }\n\n &.is-open {\n height: auto;\n }\n }\n\n &.is-selected {\n background: $color-sidebar-feature-selected-background;\n }\n\n &.is-close {\n .mc-feature-group__container {\n margin: 0 20px;\n width: 24px;\n }\n }\n\n &.is-open {\n .mc-feature-group__container {\n margin: 0 32px;\n }\n }\n\n &:hover {\n background: $color-sidebar-feature-hover-background;\n }\n\n &:focus-visible {\n box-shadow: none;\n border: none;\n outline: none;\n\n .mc-feature-group__container {\n box-shadow: none;\n border: none;\n border-radius: 6px;\n outline: 1px solid #0b96cc;\n }\n }\n }\n\n ul,\n li {\n list-style-type: none;\n margin: 0;\n padding: 0;\n display: flex;\n width: 100%;\n }\n\n ul {\n align-items: start;\n flex-direction: column;\n justify-content: center;\n\n li {\n flex-direction: column;\n box-sizing: border-box;\n }\n }\n</style>\n"],"names":["generateIcon","ctx","icon","html_tag","p","raw_value","t0_value","label","if_block0","offsetHeight","scrollHeight","create_if_block_2","create_if_block_1","insert","target","span","anchor","dirty","set_data","t0","t1_value","div2","append","div1","t1","svg","path","li","create_if_block_3","create_if_block","each_value","items","length","i","attr","button","button_aria_label_value","button_aria_expanded_value","button_aria_controls_value","code","button_id_value","ul","ul_aria_hidden_value","ul_id_value","current","each_blocks","iconname","content","featureGroup","$$props","expand","a11yLabels","eventHandler","EventHandler","isSelected","handleClick","feature","disabled","_a","dispatch","selectFeature","isExpanded","isOpen","group","selection","$isSidebarOpen","_b","$selectedFeature","lv0","lv1","$$invalidate","style","height","transition","startHeight","window","getComputedStyle","classList","add","remove","requestAnimationFrame","handler","removeEventListener","addEventListener","updateContentCSS","$$value"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"sidebar-feature-group.nested.js","sources":["../../../../src/components/sidebar/sidebar-feature-group.nested.svelte"],"sourcesContent":["<svelte:options />\n\n<script lang=\"ts\">\n import type { FeatureGroup, Feature, A11yLabels } from './sidebar.types';\n import FeatureComponent from './sidebar-feature.nested.svelte';\n import {\n isSidebarOpen,\n selectedFeature,\n selectFeature,\n Selection,\n } from './sidebar-service';\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let featureGroup: FeatureGroup;\n export let expand: boolean;\n export let a11yLabels: A11yLabels;\n let eventHandler = new EventHandler();\n let content: HTMLElement;\n\n $: updateSelection(expand, $isSidebarOpen, featureGroup, $selectedFeature);\n $: updateContentCSS(expand, $isSidebarOpen);\n\n let isSelected = false;\n\n let label: HTMLElement;\n\n function updateSelection(\n isExpanded: boolean,\n isOpen: boolean,\n group: FeatureGroup,\n selection?: Selection,\n ): void {\n isSelected =\n (selection?.lv0 &&\n group.code === selection?.lv0?.code &&\n (!selection.lv1 || !isExpanded || !isOpen)) ??\n false;\n }\n\n // Update the CSS programatically to have a nice animation on height between 0px and 'auto'\n function updateContentCSS(isExpanded: boolean, isOpen: boolean): void {\n if (content) {\n content.style.height = '';\n content.style.transition = 'none';\n const startHeight = window.getComputedStyle(content).height;\n\n content.classList.add(isOpen && isExpanded ? 'is-open' : 'is-close');\n content.classList.remove(isOpen && isExpanded ? 'is-close' : 'is-open');\n\n const height = window.getComputedStyle(content).height;\n content.style.height = startHeight;\n\n // wait until the next frame so that everything has time to update before starting the transition\n requestAnimationFrame(() => {\n content.style.transition = '';\n requestAnimationFrame(() => {\n content.style.height = height;\n });\n });\n\n // Clear the saved height values after the transition\n const handler = () => {\n content.style.height = '';\n content.removeEventListener('transitionend', handler);\n };\n\n content.addEventListener('transitionend', handler);\n }\n }\n\n function generateIcon(iconname: string): string {\n return `${iconname} size=\"1.5rem\"`;\n }\n\n function handleClick(feature: Feature) {\n if (!feature.disabled) {\n // Only select the feature if it is the last level item\n if (feature.items?.length) {\n eventHandler.dispatch('feature-click', feature);\n } else {\n selectFeature(feature.code);\n }\n }\n }\n</script>\n\n<button\n class=\"mc-feature-group {isSelected ? 'is-selected' : ''} {$isSidebarOpen\n ? 'is-open'\n : 'is-close'}\"\n aria-label={featureGroup.label}\n aria-expanded={$isSidebarOpen && expand}\n aria-controls=\"{featureGroup.code}-list\"\n id={featureGroup.code}\n>\n <span class=\"mc-feature-group__container\">\n {#if featureGroup.icon}\n <span class=\"mc-feature-group__icon\">\n {@html `<${generateIcon(featureGroup.icon)} />`}\n </span>\n {/if}\n {#if $isSidebarOpen}\n <span class=\"mc-feature-group__label\" bind:this={label}>\n {featureGroup.label}\n </span>\n {#if label?.offsetHeight < label?.scrollHeight}\n <div aria-hidden=\"true\" class=\"mc-feature-group__label__tooltip\">\n <div class=\"mc-feature-group__label__tooltip__pointer\"><div /></div>\n <span>{featureGroup.label}</span>\n </div>\n {/if}\n {#if !expand}\n <svg\n class=\"mc-feature-group__icon\"\n width=\"16px\"\n height=\"16px\"\n viewBox=\"0 0 16 16\"\n ><path\n d=\"M13 7H9V3a1 1 0 00-2 0v4H3a1 1 0 000 2h4v4a1 1 0 002 0V9h4a1 1 0 000-2z\"\n /></svg\n >\n {:else}\n <svg\n class=\"mc-feature-group__icon\"\n width=\"16px\"\n height=\"16px\"\n viewBox=\"0 0 16 16\"\n ><path d=\"M12 9H4a1 1 0 010-2h8a1 1 0 010 2z\" /></svg\n >\n {/if}\n {/if}\n </span>\n</button>\n<ul\n class=\"mc-feature-group__content is-close\"\n aria-hidden={!$isSidebarOpen || !expand}\n id=\"{featureGroup.code}-list\"\n bind:this={content}\n>\n {#each featureGroup.items as feature}\n <li on:click|stopPropagation={() => handleClick(feature)}>\n <FeatureComponent {feature} {a11yLabels} />\n </li>\n {/each}\n</ul>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import './sidebar-variables';\n\n .mc-feature-group {\n background: none;\n border: none;\n color: $color-sidebar-text-color;\n cursor: pointer;\n font-size: inherit;\n font-family: inherit;\n text-align: initial;\n margin: 0;\n padding: 0;\n overflow: hidden;\n\n &__icon {\n fill: $color-sidebar-icon;\n height: 1.5rem;\n width: 1.5rem;\n }\n\n &__container {\n display: flex;\n align-items: center;\n margin: 5px 0;\n padding: 8px 0px;\n @include transition(margin 300ms ease-in-out);\n }\n\n &__label {\n margin: 0 8px;\n width: 200px;\n min-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n\n &__tooltip {\n opacity: 0;\n transition: 0s opacity;\n background-color: $color-sidebar-divider-background;\n border: 1px solid $color-sidebar-text-color;\n border-radius: 4px;\n position: absolute;\n pointer-events: none;\n left: calc(100% - 16px);\n padding: 8px 16px;\n width: 188px;\n\n &__pointer {\n position: absolute;\n top: 50%;\n left: -8px;\n top: calc(50% - 6px);\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 8px solid white;\n\n & div {\n position: relative;\n top: -6px;\n left: 2px;\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 8px solid $color-sidebar-divider-background;\n }\n }\n }\n\n &:hover + .mc-feature-group__label__tooltip {\n opacity: 1;\n transition-delay: 1s;\n }\n }\n\n &__content {\n overflow: hidden;\n @include transition(height 300ms ease-in-out);\n &.is-close {\n height: 0;\n }\n\n &.is-open {\n height: auto;\n }\n }\n\n &.is-selected {\n background: $color-sidebar-feature-selected-background;\n }\n\n &.is-close {\n .mc-feature-group__container {\n margin: 0 20px;\n width: 24px;\n }\n }\n\n &.is-open {\n .mc-feature-group__container {\n margin: 0 32px;\n }\n }\n\n &:hover {\n background: $color-sidebar-feature-hover-background;\n }\n\n &:focus-visible {\n box-shadow: none;\n border: none;\n outline: none;\n\n .mc-feature-group__container {\n box-shadow: none;\n border: none;\n border-radius: 6px;\n outline: 1px solid #0b96cc;\n }\n }\n }\n\n ul,\n li {\n list-style-type: none;\n margin: 0;\n padding: 0;\n display: flex;\n width: 100%;\n }\n\n ul {\n align-items: start;\n flex-direction: column;\n justify-content: center;\n\n li {\n flex-direction: column;\n box-sizing: border-box;\n }\n }\n</style>\n"],"names":["generateIcon","ctx","icon","insert","target","span","anchor","innerHTML","raw_value","t0_value","label","if_block0","offsetHeight","scrollHeight","create_if_block_2","create_if_block_1","dirty","set_data","t0","t1_value","div2","append","div1","t1","svg","path","li","create_if_block_3","create_if_block","each_value","items","length","i","attr","button","button_aria_label_value","button_aria_expanded_value","button_aria_controls_value","code","button_id_value","ul","ul_aria_hidden_value","ul_id_value","current","each_blocks","iconname","content","featureGroup","$$props","expand","a11yLabels","eventHandler","EventHandler","isSelected","handleClick","feature","disabled","_a","dispatch","selectFeature","isExpanded","isOpen","group","selection","$isSidebarOpen","_b","$selectedFeature","lv0","lv1","$$invalidate","style","height","transition","startHeight","window","getComputedStyle","classList","add","remove","requestAnimationFrame","handler","removeEventListener","addEventListener","updateContentCSS","$$value"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E as e,i as s,s as t,F as
|
|
1
|
+
import{E as e,i as s,s as t,F as i,P as n,b as l,n as a,o,ab as r,e as b,d as c,t as d,g as m,j as h,l as k,k as v}from"../../index-52f16292.js";import{a as g,s as f,i as p}from"../../sidebar-service-293d79ef.js";function x(e){i(e,"svelte-1khl2b1",".mc-sidebar-segment.svelte-1khl2b1.svelte-1khl2b1{cursor:pointer;-webkit-box-flex:0;-ms-flex:0;flex:0;text-decoration:none;color:#ffffff;line-height:22px;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;min-height:40px}.mc-sidebar-segment__icon.svelte-1khl2b1.svelte-1khl2b1{fill:#ffffff;height:1.5rem;width:1.5rem}.mc-sidebar-segment__container.svelte-1khl2b1.svelte-1khl2b1{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;padding:8px 0px}.mc-sidebar-segment__text.svelte-1khl2b1.svelte-1khl2b1{margin-left:10px;width:200px;min-width:200px}.mc-sidebar-segment.is-selected.svelte-1khl2b1.svelte-1khl2b1{background:#5b737d}.mc-sidebar-segment.svelte-1khl2b1 .svelte-1khl2b1:last-child{margin-left:10px}.mc-sidebar-segment.svelte-1khl2b1.svelte-1khl2b1:focus-visible{-webkit-box-shadow:none;box-shadow:none;border:none;outline:none}.mc-sidebar-segment.svelte-1khl2b1:focus-visible .mc-sidebar-segment__container.svelte-1khl2b1{-webkit-box-shadow:none;box-shadow:none;border:none;border-radius:6px;outline:1px solid #0b96cc}.mc-sidebar-segment.svelte-1khl2b1.svelte-1khl2b1:hover{background:#405d68}.mc-sidebar-segment.is-close.svelte-1khl2b1 .mc-sidebar-segment__container.svelte-1khl2b1{-o-transition:margin 300ms ease-in-out;-webkit-transition:margin 300ms ease-in-out;transition:margin 300ms ease-in-out;margin:0 20px;width:24px}.mc-sidebar-segment.is-close.svelte-1khl2b1 .mc-sidebar-segment__text.svelte-1khl2b1{opacity:0}.mc-sidebar-segment.is-open.svelte-1khl2b1 .mc-sidebar-segment__container.svelte-1khl2b1{-o-transition:margin 300ms ease-in-out;-webkit-transition:margin 300ms ease-in-out;transition:margin 300ms ease-in-out;margin:0 32px}.mc-sidebar-segment.is-open.svelte-1khl2b1 .mc-sidebar-segment__text.svelte-1khl2b1{opacity:1}")}function u(e){let s,t,i,n,a,r,g,f,p,x,u,w,y=e[0].label+"",j=e[0].icon&&_(e);return{c(){s=b("a"),t=b("div"),j&&j.c(),i=c(),n=b("span"),a=d(y),m(n,"aria-hidden",r=!e[2]),m(n,"class","mc-sidebar-segment__text svelte-1khl2b1"),m(t,"class","mc-sidebar-segment__container svelte-1khl2b1"),m(s,"aria-label",g=e[0].label),m(s,"class",f="mc-sidebar-segment "+(e[0].code===e[1]?.lv0?.code?"is-selected":"")+" "+(e[2]?"is-open":"is-close")+" svelte-1khl2b1"),m(s,"href",p=e[0].href??"javascript:void(null)"),m(s,"id",x=e[0].code)},m(o,r){l(o,s,r),h(s,t),j&&j.m(t,null),h(t,i),h(t,n),h(n,a),u||(w=k(s,"click",e[3]),u=!0)},p(e,l){e[0].icon?j?j.p(e,l):(j=_(e),j.c(),j.m(t,i)):j&&(j.d(1),j=null),1&l&&y!==(y=e[0].label+"")&&v(a,y),4&l&&r!==(r=!e[2])&&m(n,"aria-hidden",r),1&l&&g!==(g=e[0].label)&&m(s,"aria-label",g),7&l&&f!==(f="mc-sidebar-segment "+(e[0].code===e[1]?.lv0?.code?"is-selected":"")+" "+(e[2]?"is-open":"is-close")+" svelte-1khl2b1")&&m(s,"class",f),1&l&&p!==(p=e[0].href??"javascript:void(null)")&&m(s,"href",p),1&l&&x!==(x=e[0].code)&&m(s,"id",x)},d(e){e&&o(s),j&&j.d(),u=!1,w()}}}function _(e){let s,t=`<${y(e[0].icon)} />`;return{c(){s=b("span"),m(s,"class","mc-sidebar-segment__icon svelte-1khl2b1")},m(e,i){l(e,s,i),s.innerHTML=t},p(e,i){1&i&&t!==(t=`<${y(e[0].icon)} />`)&&(s.innerHTML=t)},d(e){e&&o(s)}}}function w(e){let s,t=e[0]&&u(e);return{c(){t&&t.c(),s=n()},m(e,i){t&&t.m(e,i),l(e,s,i)},p(e,[i]){e[0]?t?t.p(e,i):(t=u(e),t.c(),t.m(s.parentNode,s)):t&&(t.d(1),t=null)},i:a,o:a,d(e){t&&t.d(e),e&&o(s)}}}function y(e){return`${e} size="1.5rem"`}function j(e,s,t){let i,n;r(e,f,(e=>t(1,i=e))),r(e,p,(e=>t(2,n=e)));let{data:l}=s;return e.$$set=e=>{"data"in e&&t(0,l=e.data)},[l,i,n,function(){g(l.code)}]}class $ extends e{constructor(e){super(),s(this,e,j,w,t,{data:0},x)}}export{$ as default};
|
|
2
2
|
//# sourceMappingURL=sidebar-segment.nested.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-segment.nested.js","sources":["../../../../src/components/sidebar/sidebar-segment.nested.svelte"],"sourcesContent":["<svelte:options />\n\n<script lang=\"ts\">\n import type { Segment } from './sidebar.types';\n import {\n isSidebarOpen,\n selectedFeature,\n selectFeature,\n } from './sidebar-service';\n\n export let data: Segment;\n\n function generateIcon(iconname: string): string {\n return `${iconname} size=\"1.5rem\"
|
|
1
|
+
{"version":3,"file":"sidebar-segment.nested.js","sources":["../../../../src/components/sidebar/sidebar-segment.nested.svelte"],"sourcesContent":["<svelte:options />\n\n<script lang=\"ts\">\n import type { Segment } from './sidebar.types';\n import {\n isSidebarOpen,\n selectedFeature,\n selectFeature,\n } from './sidebar-service';\n\n export let data: Segment;\n\n function generateIcon(iconname: string): string {\n return `${iconname} size=\"1.5rem\"`;\n }\n\n function handleClick() {\n selectFeature(data.code);\n }\n</script>\n\n{#if data}\n <a\n aria-label={data.label}\n class=\"mc-sidebar-segment {data.code === $selectedFeature?.lv0?.code\n ? 'is-selected'\n : ''} {$isSidebarOpen ? 'is-open' : 'is-close'}\"\n href={data.href ?? 'javascript:void(null)'}\n id={data.code}\n on:click={handleClick}\n >\n <div class=\"mc-sidebar-segment__container\">\n {#if data.icon}\n <span class=\"mc-sidebar-segment__icon\">\n {@html `<${generateIcon(data.icon)} />`}\n </span>\n {/if}\n <span aria-hidden={!$isSidebarOpen} class=\"mc-sidebar-segment__text\">\n {data.label}\n </span>\n </div>\n </a>\n{/if}\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import './sidebar-variables';\n\n .mc-sidebar-segment {\n cursor: pointer;\n flex: 0;\n text-decoration: none;\n color: $color-sidebar-text-color;\n line-height: 22px;\n display: flex;\n overflow: hidden;\n min-height: 40px;\n\n &__icon {\n fill: $color-sidebar-icon;\n height: 1.5rem;\n width: 1.5rem;\n }\n\n &__container {\n display: flex;\n align-items: center;\n width: 100%;\n padding: 8px 0px;\n }\n\n svg {\n fill: $color-sidebar-icon;\n }\n\n &__text {\n margin-left: 10px;\n width: 200px;\n min-width: 200px;\n }\n\n &.is-selected {\n background: $color-sidebar-feature-selected-background;\n }\n\n :last-child {\n margin-left: 10px;\n }\n\n &:focus-visible {\n box-shadow: none;\n border: none;\n outline: none;\n\n .mc-sidebar-segment__container {\n box-shadow: none;\n border: none;\n border-radius: 6px;\n outline: 1px solid #0b96cc;\n }\n }\n\n &:hover {\n background: $color-sidebar-feature-hover-background;\n }\n\n &.is-close {\n .mc-sidebar-segment__container {\n @include transition(margin 300ms ease-in-out);\n margin: 0 20px;\n width: 24px;\n }\n\n .mc-sidebar-segment__text {\n opacity: 0;\n }\n }\n\n &.is-open {\n .mc-sidebar-segment__container {\n @include transition(margin 300ms ease-in-out);\n margin: 0 32px;\n }\n\n .mc-sidebar-segment__text {\n opacity: 1;\n }\n }\n }\n</style>\n"],"names":["t1_value","ctx","label","if_block","icon","create_if_block_1","attr","a","a_aria_label_value","a_class_value","code","lv0","href","a_id_value","insert","target","anchor","append","div","span","dirty","set_data","t1","generateIcon","innerHTML","raw_value","create_if_block","iconname","data","$$props","selectFeature"],"mappings":"ylEAsCSA,EAAAC,KAAKC,MAAK,GANRC,EAAAF,KAAKG,MAAIC,EAAAJ,yFAKMA,EAAc,uHAdxBK,EAAAC,EAAA,aAAAC,EAAAP,KAAKC,OACUI,EAAAC,EAAA,QAAAE,EAAA,uBAAAR,KAAKS,OAAST,EAAkB,IAAAU,KAAKD,KAC5D,cACA,IAAK,KAAAT,EAAiB,GAAA,UAAY,YAAU,gCAC1CA,EAAI,GAACW,MAAQ,yBACfN,EAAAC,EAAA,KAAAM,EAAAZ,KAAKS,cANXI,EAmBGC,EAAAR,EAAAS,GAVDC,EASKV,EAAAW,yBAHHD,EAEMC,EAAAC,4BAVElB,EAAW,kBAGdA,KAAKG,2DAMP,EAAAgB,GAAApB,KAAAA,EAAAC,KAAKC,MAAK,KAAAmB,EAAAC,EAAAtB,gBADOC,EAAc,0BAdxB,EAAAmB,GAAAZ,KAAAA,EAAAP,KAAKC,4BACU,EAAAkB,GAAAX,KAAAA,EAAA,uBAAAR,KAAKS,OAAST,EAAkB,IAAAU,KAAKD,KAC5D,cACA,IAAK,KAAAT,EAAiB,GAAA,UAAY,YAAU,+CAC1CA,EAAI,GAACW,MAAQ,wCACf,EAAAQ,GAAAP,KAAAA,EAAAZ,KAAKS,+EAMQa,EAAatB,EAAI,GAACG,iGAD/BU,EAEMC,EAAAI,EAAAH,yCADOO,EAAatB,EAAI,GAACG,cAAIe,EAAAK,UAAAC,yCAbtCxB,EAAI,IAAAyB,EAAAzB,oEAAJA,EAAI,sGATE,SAAAsB,EAAaI,YACVA,+FAHDC,GAAaC,kEAOtBC,EAAcF,EAAKlB"}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function generateIcon(iconname: string): string {
|
|
72
|
-
return `${iconname} size="1.5rem"
|
|
72
|
+
return `${iconname} size="1.5rem"`;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
function handleClick(feature: Feature) {
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
>
|
|
96
96
|
<span class="mc-feature-group__container">
|
|
97
97
|
{#if featureGroup.icon}
|
|
98
|
-
|
|
99
|
-
featureGroup.icon
|
|
100
|
-
|
|
98
|
+
<span class="mc-feature-group__icon">
|
|
99
|
+
{@html `<${generateIcon(featureGroup.icon)} />`}
|
|
100
|
+
</span>
|
|
101
101
|
{/if}
|
|
102
102
|
{#if $isSidebarOpen}
|
|
103
103
|
<span class="mc-feature-group__label" bind:this={label}>
|
|
@@ -162,6 +162,8 @@
|
|
|
162
162
|
|
|
163
163
|
&__icon {
|
|
164
164
|
fill: $color-sidebar-icon;
|
|
165
|
+
height: 1.5rem;
|
|
166
|
+
width: 1.5rem;
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
&__container {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
export let data: Segment;
|
|
12
12
|
|
|
13
13
|
function generateIcon(iconname: string): string {
|
|
14
|
-
return `${iconname} size="1.5rem"
|
|
14
|
+
return `${iconname} size="1.5rem"`;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function handleClick() {
|
|
@@ -29,9 +29,11 @@
|
|
|
29
29
|
id={data.code}
|
|
30
30
|
on:click={handleClick}
|
|
31
31
|
>
|
|
32
|
-
<div class="mc-sidebar-segment__container
|
|
32
|
+
<div class="mc-sidebar-segment__container">
|
|
33
33
|
{#if data.icon}
|
|
34
|
-
|
|
34
|
+
<span class="mc-sidebar-segment__icon">
|
|
35
|
+
{@html `<${generateIcon(data.icon)} />`}
|
|
36
|
+
</span>
|
|
35
37
|
{/if}
|
|
36
38
|
<span aria-hidden={!$isSidebarOpen} class="mc-sidebar-segment__text">
|
|
37
39
|
{data.label}
|
|
@@ -56,11 +58,8 @@
|
|
|
56
58
|
|
|
57
59
|
&__icon {
|
|
58
60
|
fill: $color-sidebar-icon;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
span {
|
|
62
|
-
width: 200px;
|
|
63
|
-
min-width: 200px;
|
|
61
|
+
height: 1.5rem;
|
|
62
|
+
width: 1.5rem;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
&__container {
|
|
@@ -76,6 +75,8 @@
|
|
|
76
75
|
|
|
77
76
|
&__text {
|
|
78
77
|
margin-left: 10px;
|
|
78
|
+
width: 200px;
|
|
79
|
+
min-width: 200px;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
&.is-selected {
|
package/public/adeo/main.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,yCAAyC,CAAC;AAqDhE,YAAY,EACV,OAAO,IAAI,WAAW,EACtB,OAAO,EACP,YAAY,EACZ,OAAO,EACP,IAAI,GACL,MAAM,oCAAoC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG5C,wBAsDE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../src/stories/carousel/items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,0CAA0C,CAAC;AAE3E,eAAO,MAAM,KAAK,EAAE,YAAY,EAwJ/B,CAAC"}
|
|
@@ -49,13 +49,17 @@ import OptionButton from './components/optionbutton/OptionButton.js';
|
|
|
49
49
|
import Header from './components/header/Header.js';
|
|
50
50
|
import TagList from './components/taglist/TagList.js';
|
|
51
51
|
import Kpi from './components/kpi/Kpi.js';
|
|
52
|
+
import Carousel from './components/carousel/Carousel.js';
|
|
52
53
|
import SegmentedControl from './components/segmentedcontrol/SegmentedControl.js';
|
|
53
54
|
import Menu from './components/menu/Menu.js';
|
|
54
|
-
|
|
55
55
|
import BottomBar from './components/bottombar/BottomBar.js';
|
|
56
56
|
import ActionBar from './components/actionbar/ActionBar.js';
|
|
57
57
|
import StepperBar from './components/stepperbar/StepperBar.js';
|
|
58
58
|
|
|
59
|
+
if (!customElements.get('m-carousel')) {
|
|
60
|
+
customElements.define('m-carousel', Carousel);
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
if (!customElements.get('m-accordion')) {
|
|
60
64
|
customElements.define('m-accordion', Accordion);
|
|
61
65
|
}
|