@responsive-ui/bottom-modal
Advanced tools
Comparing version 1.0.7-alpha.0 to 1.0.9-alpha.1
@@ -132,5 +132,2 @@ 'use strict'; | ||
} | ||
function svg_element(name) { | ||
return document.createElementNS('http://www.w3.org/2000/svg', name); | ||
} | ||
function text(data) { | ||
@@ -155,5 +152,2 @@ return document.createTextNode(data); | ||
} | ||
function set_style(node, key, value, important) { | ||
node.style.setProperty(key, value, important ? 'important' : ''); | ||
} | ||
@@ -172,12 +166,2 @@ let current_component; | ||
} | ||
// TODO figure out if we still want to support | ||
// shorthand events, or if we want to implement | ||
// a real bubbling mechanism | ||
function bubble(component, event) { | ||
const callbacks = component.$$.callbacks[event.type]; | ||
if (callbacks) { | ||
// @ts-ignore | ||
callbacks.slice().forEach(fn => fn.call(this, event)); | ||
} | ||
} | ||
@@ -199,13 +183,30 @@ const dirty_components = []; | ||
} | ||
let flushing = false; | ||
// flush() calls callbacks in this order: | ||
// 1. All beforeUpdate callbacks, in order: parents before children | ||
// 2. All bind:this callbacks, in reverse order: children before parents. | ||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT | ||
// for afterUpdates called during the initial onMount, which are called in | ||
// reverse order: children before parents. | ||
// Since callbacks might update component values, which could trigger another | ||
// call to flush(), the following steps guard against this: | ||
// 1. During beforeUpdate, any updated components will be added to the | ||
// dirty_components array and will cause a reentrant call to flush(). Because | ||
// the flush index is kept outside the function, the reentrant call will pick | ||
// up where the earlier call left off and go through all dirty components. The | ||
// current_component value is saved and restored so that the reentrant call will | ||
// not interfere with the "parent" flush() call. | ||
// 2. bind:this callbacks cannot trigger new flush() calls. | ||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate | ||
// callback called a second time; the seen_callbacks set, outside the flush() | ||
// function, guarantees this behavior. | ||
const seen_callbacks = new Set(); | ||
let flushidx = 0; // Do *not* move this inside the flush() function | ||
function flush() { | ||
if (flushing) | ||
return; | ||
flushing = true; | ||
const saved_component = current_component; | ||
do { | ||
// first, call beforeUpdate functions | ||
// and update components | ||
for (let i = 0; i < dirty_components.length; i += 1) { | ||
const component = dirty_components[i]; | ||
while (flushidx < dirty_components.length) { | ||
const component = dirty_components[flushidx]; | ||
flushidx++; | ||
set_current_component(component); | ||
@@ -216,2 +217,3 @@ update(component.$$); | ||
dirty_components.length = 0; | ||
flushidx = 0; | ||
while (binding_callbacks.length) | ||
@@ -236,4 +238,4 @@ binding_callbacks.pop()(); | ||
update_scheduled = false; | ||
flushing = false; | ||
seen_callbacks.clear(); | ||
set_current_component(saved_component); | ||
} | ||
@@ -252,15 +254,2 @@ function update($$) { | ||
let outros; | ||
function group_outros() { | ||
outros = { | ||
r: 0, | ||
c: [], | ||
p: outros // parent group | ||
}; | ||
} | ||
function check_outros() { | ||
if (!outros.r) { | ||
run_all(outros.c); | ||
} | ||
outros = outros.p; | ||
} | ||
function transition_in(block, local) { | ||
@@ -288,5 +277,2 @@ if (block && block.i) { | ||
} | ||
function create_component(block) { | ||
block && block.c(); | ||
} | ||
function mount_component(component, target, anchor, customElement) { | ||
@@ -565,403 +551,21 @@ const { fragment, on_mount, on_destroy, after_update } = component.$$; | ||
/* components/icon/src/Icon.svelte generated by Svelte v3.44.0 */ | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.3 */ | ||
function create_if_block_5(ctx) { | ||
let svg; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M1.119 16.841a1.118 1.118 0 01-1.111-1.127c0-.619.492-1.111\n 1.111-1.111h13.475V1.127A1.133 1.133 0 0115.722 0c.619 0 1.111.508 1.111\n 1.127v13.476h13.475c.619 0 1.127.492 1.127 1.111s-.508 1.127-1.127\n 1.127H16.833v13.476c0 .619-.492 1.127-1.111 1.127a1.131 1.131 0\n 01-1.127-1.127V16.841H1.119z"); | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "x", "0"); | ||
attr(svg, "y", "0"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 31.444 31.444"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (82:28) | ||
function create_if_block_4(ctx) { | ||
let svg; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M1.111 16.832A1.117 1.117 0 010 15.706c0-.619.492-1.111\n 1.111-1.111H30.3c.619 0 1.127.492 1.127 1.111s-.508 1.127-1.127\n 1.127H1.111z"); | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "x", "0"); | ||
attr(svg, "y", "0"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 31.427 31.427"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (61:35) | ||
function create_if_block_3(ctx) { | ||
let svg; | ||
let g; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M617.858,370.896L221.513,9.705c-13.006-12.94-34.099-12.94-47.105,0c-13.006,12.939-13.006,33.934,0,46.874\n l372.447,339.438L174.441,735.454c-13.006,12.94-13.006,33.935,0,46.874s34.099,12.939,47.104,0l396.346-361.191\n c6.932-6.898,9.904-16.043,9.441-25.087C627.763,386.972,624.792,377.828,617.858,370.896z"); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "x", "0px"); | ||
attr(svg, "y", "0px"); | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 792.033 792.033"); | ||
set_style(svg, "enable-background", "new 0 0 792.033 792.033"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (45:28) | ||
function create_if_block_2(ctx) { | ||
let svg; | ||
let g; | ||
let circle0; | ||
let circle1; | ||
let circle2; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
circle0 = svg_element("circle"); | ||
circle1 = svg_element("circle"); | ||
circle2 = svg_element("circle"); | ||
attr(circle0, "cx", "42.667"); | ||
attr(circle0, "cy", "213.333"); | ||
attr(circle0, "r", "42.667"); | ||
attr(circle1, "cx", "213.333"); | ||
attr(circle1, "cy", "213.333"); | ||
attr(circle1, "r", "42.667"); | ||
attr(circle2, "cx", "384"); | ||
attr(circle2, "cy", "213.333"); | ||
attr(circle2, "r", "42.667"); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 426.667 426.667"); | ||
set_style(svg, "enable-background", "new 0 0 426.667 426.667"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, circle0); | ||
append(g, circle1); | ||
append(g, circle2); | ||
}, | ||
p: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (26:30) | ||
function create_if_block_1(ctx) { | ||
let svg; | ||
let line0; | ||
let line1; | ||
let line2; | ||
let line3; | ||
let line4; | ||
let line5; | ||
let line6; | ||
let line7; | ||
let line8; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
line0 = svg_element("line"); | ||
line1 = svg_element("line"); | ||
line2 = svg_element("line"); | ||
line3 = svg_element("line"); | ||
line4 = svg_element("line"); | ||
line5 = svg_element("line"); | ||
line6 = svg_element("line"); | ||
line7 = svg_element("line"); | ||
line8 = svg_element("line"); | ||
attr(line0, "x1", "4"); | ||
attr(line0, "y1", "21"); | ||
attr(line0, "x2", "4"); | ||
attr(line0, "y2", "14"); | ||
attr(line1, "x1", "4"); | ||
attr(line1, "y1", "10"); | ||
attr(line1, "x2", "4"); | ||
attr(line1, "y2", "3"); | ||
attr(line2, "x1", "12"); | ||
attr(line2, "y1", "21"); | ||
attr(line2, "x2", "12"); | ||
attr(line2, "y2", "12"); | ||
attr(line3, "x1", "12"); | ||
attr(line3, "y1", "8"); | ||
attr(line3, "x2", "12"); | ||
attr(line3, "y2", "3"); | ||
attr(line4, "x1", "20"); | ||
attr(line4, "y1", "21"); | ||
attr(line4, "x2", "20"); | ||
attr(line4, "y2", "16"); | ||
attr(line5, "x1", "20"); | ||
attr(line5, "y1", "12"); | ||
attr(line5, "x2", "20"); | ||
attr(line5, "y2", "3"); | ||
attr(line6, "x1", "1"); | ||
attr(line6, "y1", "14"); | ||
attr(line6, "x2", "7"); | ||
attr(line6, "y2", "14"); | ||
attr(line7, "x1", "9"); | ||
attr(line7, "y1", "8"); | ||
attr(line7, "x2", "15"); | ||
attr(line7, "y2", "8"); | ||
attr(line8, "x1", "17"); | ||
attr(line8, "y1", "16"); | ||
attr(line8, "x2", "23"); | ||
attr(line8, "y2", "16"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 24 24"); | ||
attr(svg, "fill", "none"); | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
attr(svg, "stroke-width", "2"); | ||
attr(svg, "stroke-linecap", "round"); | ||
attr(svg, "stroke-linejoin", "round"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, line0); | ||
append(svg, line1); | ||
append(svg, line2); | ||
append(svg, line3); | ||
append(svg, line4); | ||
append(svg, line5); | ||
append(svg, line6); | ||
append(svg, line7); | ||
append(svg, line8); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (7:2) {#if type === "x"} | ||
function create_if_block$1(ctx) { | ||
let svg; | ||
let g; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M228.929,205.01L404.596,29.343c6.78-6.548,6.968-17.352,0.42-24.132c-6.548-6.78-17.352-6.968-24.132-0.42\n c-0.142,0.137-0.282,0.277-0.42,0.42L204.796,180.878L29.129,5.21c-6.78-6.548-17.584-6.36-24.132,0.42\n c-6.388,6.614-6.388,17.099,0,23.713L180.664,205.01L4.997,380.677c-6.663,6.664-6.663,17.468,0,24.132\n c6.664,6.662,17.468,6.662,24.132,0l175.667-175.667l175.667,175.667c6.78,6.548,17.584,6.36,24.132-0.42\n c6.387-6.614,6.387-17.099,0-23.712L228.929,205.01z"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "x", "0px"); | ||
attr(svg, "y", "0px"); | ||
attr(svg, "viewBox", "0 0 408 408"); | ||
set_style(svg, "enable-background", "new 0 0 408 408"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path); | ||
}, | ||
p: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
function create_fragment$1(ctx) { | ||
let span; | ||
let mounted; | ||
let dispose; | ||
function select_block_type(ctx, dirty) { | ||
if (/*type*/ ctx[1] === "x") return create_if_block$1; | ||
if (/*type*/ ctx[1] === "filter") return create_if_block_1; | ||
if (/*type*/ ctx[1] === "more") return create_if_block_2; | ||
if (/*type*/ ctx[1] === "right-arrow") return create_if_block_3; | ||
if (/*type*/ ctx[1] == "minus") return create_if_block_4; | ||
if (/*type*/ ctx[1] == "plus") return create_if_block_5; | ||
} | ||
let current_block_type = select_block_type(ctx); | ||
let if_block = current_block_type && current_block_type(ctx); | ||
return { | ||
c() { | ||
span = element("span"); | ||
if (if_block) if_block.c(); | ||
attr(span, "class", "responsive-ui-icon svelte-2o8tyv"); | ||
attr(span, "style", /*style*/ ctx[2]); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
if (if_block) if_block.m(span, null); | ||
if (!mounted) { | ||
dispose = listen(span, "click", /*click_handler*/ ctx[3]); | ||
mounted = true; | ||
} | ||
}, | ||
p(ctx, [dirty]) { | ||
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { | ||
if_block.p(ctx, dirty); | ||
} else { | ||
if (if_block) if_block.d(1); | ||
if_block = current_block_type && current_block_type(ctx); | ||
if (if_block) { | ||
if_block.c(); | ||
if_block.m(span, null); | ||
} | ||
} | ||
if (dirty & /*style*/ 4) { | ||
attr(span, "style", /*style*/ ctx[2]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
if (if_block) { | ||
if_block.d(); | ||
} | ||
mounted = false; | ||
dispose(); | ||
} | ||
}; | ||
} | ||
function instance$1($$self, $$props, $$invalidate) { | ||
let { stroke = "#000" } = $$props; | ||
let { type = "" } = $$props; | ||
let { style = "" } = $$props; | ||
function click_handler(event) { | ||
bubble.call(this, $$self, event); | ||
} | ||
$$self.$$set = $$props => { | ||
if ('stroke' in $$props) $$invalidate(0, stroke = $$props.stroke); | ||
if ('type' in $$props) $$invalidate(1, type = $$props.type); | ||
if ('style' in $$props) $$invalidate(2, style = $$props.style); | ||
}; | ||
return [stroke, type, style, click_handler]; | ||
} | ||
class Icon extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance$1, create_fragment$1, safe_not_equal, { stroke: 0, type: 1, style: 2 }); | ||
} | ||
} | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.0 */ | ||
function create_if_block(ctx) { | ||
let span; | ||
let icon; | ||
let current; | ||
let i; | ||
let raw_value = `<svg width="1em" height="1em" viewBox="64 64 896 896" focusable="false" data-icon="close" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" /></svg>` + ""; | ||
let mounted; | ||
let dispose; | ||
icon = new Icon({ props: { type: "x" } }); | ||
return { | ||
c() { | ||
span = element("span"); | ||
create_component(icon.$$.fragment); | ||
attr(span, "class", "responsive-ui-modal__close svelte-etosnx"); | ||
i = element("i"); | ||
attr(i, "class", "resp-modal__close"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
mount_component(icon, span, null); | ||
current = true; | ||
insert(target, i, anchor); | ||
i.innerHTML = raw_value; | ||
if (!mounted) { | ||
dispose = listen(span, "click", /*click_handler_1*/ ctx[9]); | ||
dispose = listen(i, "click", /*click_handler_1*/ ctx[9]); | ||
mounted = true; | ||
@@ -971,14 +575,4 @@ } | ||
p: noop, | ||
i(local) { | ||
if (current) return; | ||
transition_in(icon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(icon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
destroy_component(icon); | ||
if (detaching) detach(i); | ||
mounted = false; | ||
@@ -1012,6 +606,6 @@ dispose(); | ||
if (default_slot) default_slot.c(); | ||
attr(div0, "class", "responsive-ui-modal__overlay svelte-etosnx"); | ||
attr(div0, "style", div0_style_value = `opacity:${1 - /*$tween*/ ctx[3]};visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`); | ||
attr(div1, "class", "responsive-ui-modal svelte-etosnx"); | ||
attr(div1, "style", div1_style_value = `transform:translateY(${/*$tween*/ ctx[3] * 100}%);visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`); | ||
attr(div0, "class", "resp-modal__overlay"); | ||
attr(div0, "style", div0_style_value = `opacity: ${1 - /*$tween*/ ctx[3]}; visibility: ${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`); | ||
attr(div1, "class", "resp-modal"); | ||
attr(div1, "style", div1_style_value = `transform: translateY(${/*$tween*/ ctx[3] * 100}%); visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`); | ||
}, | ||
@@ -1033,7 +627,3 @@ m(target, anchor) { | ||
dispose = listen(div0, "click", function () { | ||
if (is_function(/*closable*/ ctx[1] | ||
? /*click_handler*/ ctx[8] | ||
: undefined)) (/*closable*/ ctx[1] | ||
? /*click_handler*/ ctx[8] | ||
: undefined).apply(this, arguments); | ||
if (is_function(/*closable*/ ctx[1] ? /*click_handler*/ ctx[8] : noop)) (/*closable*/ ctx[1] ? /*click_handler*/ ctx[8] : noop).apply(this, arguments); | ||
}); | ||
@@ -1047,3 +637,3 @@ | ||
if (!current || dirty & /*$tween*/ 8 && div0_style_value !== (div0_style_value = `opacity:${1 - /*$tween*/ ctx[3]};visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`)) { | ||
if (!current || dirty & /*$tween*/ 8 && div0_style_value !== (div0_style_value = `opacity: ${1 - /*$tween*/ ctx[3]}; visibility: ${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`)) { | ||
attr(div0, "style", div0_style_value); | ||
@@ -1055,20 +645,10 @@ } | ||
if_block.p(ctx, dirty); | ||
if (dirty & /*closable*/ 2) { | ||
transition_in(if_block, 1); | ||
} | ||
} else { | ||
if_block = create_if_block(ctx); | ||
if_block.c(); | ||
transition_in(if_block, 1); | ||
if_block.m(div1, t1); | ||
} | ||
} else if (if_block) { | ||
group_outros(); | ||
transition_out(if_block, 1, 1, () => { | ||
if_block = null; | ||
}); | ||
check_outros(); | ||
if_block.d(1); | ||
if_block = null; | ||
} | ||
@@ -1091,3 +671,3 @@ | ||
if (!current || dirty & /*$tween, style*/ 12 && div1_style_value !== (div1_style_value = `transform:translateY(${/*$tween*/ ctx[3] * 100}%);visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`)) { | ||
if (!current || dirty & /*$tween, style*/ 12 && div1_style_value !== (div1_style_value = `transform: translateY(${/*$tween*/ ctx[3] * 100}%); visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`)) { | ||
attr(div1, "style", div1_style_value); | ||
@@ -1098,3 +678,2 @@ } | ||
if (current) return; | ||
transition_in(if_block); | ||
transition_in(default_slot, local); | ||
@@ -1104,3 +683,2 @@ current = true; | ||
o(local) { | ||
transition_out(if_block); | ||
transition_out(default_slot, local); | ||
@@ -1131,3 +709,3 @@ current = false; | ||
scrollY = window.scrollY; | ||
document.body.setAttribute("style", `position:fixed;top:-${scrollY}px`); | ||
document.body.setAttribute("style", `position: fixed; top: -${scrollY}px`); | ||
} else { | ||
@@ -1134,0 +712,0 @@ document.body.setAttribute("style", ""); |
@@ -130,5 +130,2 @@ function noop() { } | ||
} | ||
function svg_element(name) { | ||
return document.createElementNS('http://www.w3.org/2000/svg', name); | ||
} | ||
function text(data) { | ||
@@ -153,5 +150,2 @@ return document.createTextNode(data); | ||
} | ||
function set_style(node, key, value, important) { | ||
node.style.setProperty(key, value, important ? 'important' : ''); | ||
} | ||
@@ -170,12 +164,2 @@ let current_component; | ||
} | ||
// TODO figure out if we still want to support | ||
// shorthand events, or if we want to implement | ||
// a real bubbling mechanism | ||
function bubble(component, event) { | ||
const callbacks = component.$$.callbacks[event.type]; | ||
if (callbacks) { | ||
// @ts-ignore | ||
callbacks.slice().forEach(fn => fn.call(this, event)); | ||
} | ||
} | ||
@@ -197,13 +181,30 @@ const dirty_components = []; | ||
} | ||
let flushing = false; | ||
// flush() calls callbacks in this order: | ||
// 1. All beforeUpdate callbacks, in order: parents before children | ||
// 2. All bind:this callbacks, in reverse order: children before parents. | ||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT | ||
// for afterUpdates called during the initial onMount, which are called in | ||
// reverse order: children before parents. | ||
// Since callbacks might update component values, which could trigger another | ||
// call to flush(), the following steps guard against this: | ||
// 1. During beforeUpdate, any updated components will be added to the | ||
// dirty_components array and will cause a reentrant call to flush(). Because | ||
// the flush index is kept outside the function, the reentrant call will pick | ||
// up where the earlier call left off and go through all dirty components. The | ||
// current_component value is saved and restored so that the reentrant call will | ||
// not interfere with the "parent" flush() call. | ||
// 2. bind:this callbacks cannot trigger new flush() calls. | ||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate | ||
// callback called a second time; the seen_callbacks set, outside the flush() | ||
// function, guarantees this behavior. | ||
const seen_callbacks = new Set(); | ||
let flushidx = 0; // Do *not* move this inside the flush() function | ||
function flush() { | ||
if (flushing) | ||
return; | ||
flushing = true; | ||
const saved_component = current_component; | ||
do { | ||
// first, call beforeUpdate functions | ||
// and update components | ||
for (let i = 0; i < dirty_components.length; i += 1) { | ||
const component = dirty_components[i]; | ||
while (flushidx < dirty_components.length) { | ||
const component = dirty_components[flushidx]; | ||
flushidx++; | ||
set_current_component(component); | ||
@@ -214,2 +215,3 @@ update(component.$$); | ||
dirty_components.length = 0; | ||
flushidx = 0; | ||
while (binding_callbacks.length) | ||
@@ -234,4 +236,4 @@ binding_callbacks.pop()(); | ||
update_scheduled = false; | ||
flushing = false; | ||
seen_callbacks.clear(); | ||
set_current_component(saved_component); | ||
} | ||
@@ -250,15 +252,2 @@ function update($$) { | ||
let outros; | ||
function group_outros() { | ||
outros = { | ||
r: 0, | ||
c: [], | ||
p: outros // parent group | ||
}; | ||
} | ||
function check_outros() { | ||
if (!outros.r) { | ||
run_all(outros.c); | ||
} | ||
outros = outros.p; | ||
} | ||
function transition_in(block, local) { | ||
@@ -286,5 +275,2 @@ if (block && block.i) { | ||
} | ||
function create_component(block) { | ||
block && block.c(); | ||
} | ||
function mount_component(component, target, anchor, customElement) { | ||
@@ -563,403 +549,21 @@ const { fragment, on_mount, on_destroy, after_update } = component.$$; | ||
/* components/icon/src/Icon.svelte generated by Svelte v3.44.0 */ | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.3 */ | ||
function create_if_block_5(ctx) { | ||
let svg; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M1.119 16.841a1.118 1.118 0 01-1.111-1.127c0-.619.492-1.111\n 1.111-1.111h13.475V1.127A1.133 1.133 0 0115.722 0c.619 0 1.111.508 1.111\n 1.127v13.476h13.475c.619 0 1.127.492 1.127 1.111s-.508 1.127-1.127\n 1.127H16.833v13.476c0 .619-.492 1.127-1.111 1.127a1.131 1.131 0\n 01-1.127-1.127V16.841H1.119z"); | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "x", "0"); | ||
attr(svg, "y", "0"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 31.444 31.444"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (82:28) | ||
function create_if_block_4(ctx) { | ||
let svg; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M1.111 16.832A1.117 1.117 0 010 15.706c0-.619.492-1.111\n 1.111-1.111H30.3c.619 0 1.127.492 1.127 1.111s-.508 1.127-1.127\n 1.127H1.111z"); | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "x", "0"); | ||
attr(svg, "y", "0"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 31.427 31.427"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (61:35) | ||
function create_if_block_3(ctx) { | ||
let svg; | ||
let g; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M617.858,370.896L221.513,9.705c-13.006-12.94-34.099-12.94-47.105,0c-13.006,12.939-13.006,33.934,0,46.874\n l372.447,339.438L174.441,735.454c-13.006,12.94-13.006,33.935,0,46.874s34.099,12.939,47.104,0l396.346-361.191\n c6.932-6.898,9.904-16.043,9.441-25.087C627.763,386.972,624.792,377.828,617.858,370.896z"); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "x", "0px"); | ||
attr(svg, "y", "0px"); | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 792.033 792.033"); | ||
set_style(svg, "enable-background", "new 0 0 792.033 792.033"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (45:28) | ||
function create_if_block_2(ctx) { | ||
let svg; | ||
let g; | ||
let circle0; | ||
let circle1; | ||
let circle2; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
circle0 = svg_element("circle"); | ||
circle1 = svg_element("circle"); | ||
circle2 = svg_element("circle"); | ||
attr(circle0, "cx", "42.667"); | ||
attr(circle0, "cy", "213.333"); | ||
attr(circle0, "r", "42.667"); | ||
attr(circle1, "cx", "213.333"); | ||
attr(circle1, "cy", "213.333"); | ||
attr(circle1, "r", "42.667"); | ||
attr(circle2, "cx", "384"); | ||
attr(circle2, "cy", "213.333"); | ||
attr(circle2, "r", "42.667"); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 426.667 426.667"); | ||
set_style(svg, "enable-background", "new 0 0 426.667 426.667"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, circle0); | ||
append(g, circle1); | ||
append(g, circle2); | ||
}, | ||
p: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (26:30) | ||
function create_if_block_1(ctx) { | ||
let svg; | ||
let line0; | ||
let line1; | ||
let line2; | ||
let line3; | ||
let line4; | ||
let line5; | ||
let line6; | ||
let line7; | ||
let line8; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
line0 = svg_element("line"); | ||
line1 = svg_element("line"); | ||
line2 = svg_element("line"); | ||
line3 = svg_element("line"); | ||
line4 = svg_element("line"); | ||
line5 = svg_element("line"); | ||
line6 = svg_element("line"); | ||
line7 = svg_element("line"); | ||
line8 = svg_element("line"); | ||
attr(line0, "x1", "4"); | ||
attr(line0, "y1", "21"); | ||
attr(line0, "x2", "4"); | ||
attr(line0, "y2", "14"); | ||
attr(line1, "x1", "4"); | ||
attr(line1, "y1", "10"); | ||
attr(line1, "x2", "4"); | ||
attr(line1, "y2", "3"); | ||
attr(line2, "x1", "12"); | ||
attr(line2, "y1", "21"); | ||
attr(line2, "x2", "12"); | ||
attr(line2, "y2", "12"); | ||
attr(line3, "x1", "12"); | ||
attr(line3, "y1", "8"); | ||
attr(line3, "x2", "12"); | ||
attr(line3, "y2", "3"); | ||
attr(line4, "x1", "20"); | ||
attr(line4, "y1", "21"); | ||
attr(line4, "x2", "20"); | ||
attr(line4, "y2", "16"); | ||
attr(line5, "x1", "20"); | ||
attr(line5, "y1", "12"); | ||
attr(line5, "x2", "20"); | ||
attr(line5, "y2", "3"); | ||
attr(line6, "x1", "1"); | ||
attr(line6, "y1", "14"); | ||
attr(line6, "x2", "7"); | ||
attr(line6, "y2", "14"); | ||
attr(line7, "x1", "9"); | ||
attr(line7, "y1", "8"); | ||
attr(line7, "x2", "15"); | ||
attr(line7, "y2", "8"); | ||
attr(line8, "x1", "17"); | ||
attr(line8, "y1", "16"); | ||
attr(line8, "x2", "23"); | ||
attr(line8, "y2", "16"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 24 24"); | ||
attr(svg, "fill", "none"); | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
attr(svg, "stroke-width", "2"); | ||
attr(svg, "stroke-linecap", "round"); | ||
attr(svg, "stroke-linejoin", "round"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, line0); | ||
append(svg, line1); | ||
append(svg, line2); | ||
append(svg, line3); | ||
append(svg, line4); | ||
append(svg, line5); | ||
append(svg, line6); | ||
append(svg, line7); | ||
append(svg, line8); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (7:2) {#if type === "x"} | ||
function create_if_block$1(ctx) { | ||
let svg; | ||
let g; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M228.929,205.01L404.596,29.343c6.78-6.548,6.968-17.352,0.42-24.132c-6.548-6.78-17.352-6.968-24.132-0.42\n c-0.142,0.137-0.282,0.277-0.42,0.42L204.796,180.878L29.129,5.21c-6.78-6.548-17.584-6.36-24.132,0.42\n c-6.388,6.614-6.388,17.099,0,23.713L180.664,205.01L4.997,380.677c-6.663,6.664-6.663,17.468,0,24.132\n c6.664,6.662,17.468,6.662,24.132,0l175.667-175.667l175.667,175.667c6.78,6.548,17.584,6.36,24.132-0.42\n c6.387-6.614,6.387-17.099,0-23.712L228.929,205.01z"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "x", "0px"); | ||
attr(svg, "y", "0px"); | ||
attr(svg, "viewBox", "0 0 408 408"); | ||
set_style(svg, "enable-background", "new 0 0 408 408"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path); | ||
}, | ||
p: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
function create_fragment$1(ctx) { | ||
let span; | ||
let mounted; | ||
let dispose; | ||
function select_block_type(ctx, dirty) { | ||
if (/*type*/ ctx[1] === "x") return create_if_block$1; | ||
if (/*type*/ ctx[1] === "filter") return create_if_block_1; | ||
if (/*type*/ ctx[1] === "more") return create_if_block_2; | ||
if (/*type*/ ctx[1] === "right-arrow") return create_if_block_3; | ||
if (/*type*/ ctx[1] == "minus") return create_if_block_4; | ||
if (/*type*/ ctx[1] == "plus") return create_if_block_5; | ||
} | ||
let current_block_type = select_block_type(ctx); | ||
let if_block = current_block_type && current_block_type(ctx); | ||
return { | ||
c() { | ||
span = element("span"); | ||
if (if_block) if_block.c(); | ||
attr(span, "class", "responsive-ui-icon svelte-2o8tyv"); | ||
attr(span, "style", /*style*/ ctx[2]); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
if (if_block) if_block.m(span, null); | ||
if (!mounted) { | ||
dispose = listen(span, "click", /*click_handler*/ ctx[3]); | ||
mounted = true; | ||
} | ||
}, | ||
p(ctx, [dirty]) { | ||
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { | ||
if_block.p(ctx, dirty); | ||
} else { | ||
if (if_block) if_block.d(1); | ||
if_block = current_block_type && current_block_type(ctx); | ||
if (if_block) { | ||
if_block.c(); | ||
if_block.m(span, null); | ||
} | ||
} | ||
if (dirty & /*style*/ 4) { | ||
attr(span, "style", /*style*/ ctx[2]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
if (if_block) { | ||
if_block.d(); | ||
} | ||
mounted = false; | ||
dispose(); | ||
} | ||
}; | ||
} | ||
function instance$1($$self, $$props, $$invalidate) { | ||
let { stroke = "#000" } = $$props; | ||
let { type = "" } = $$props; | ||
let { style = "" } = $$props; | ||
function click_handler(event) { | ||
bubble.call(this, $$self, event); | ||
} | ||
$$self.$$set = $$props => { | ||
if ('stroke' in $$props) $$invalidate(0, stroke = $$props.stroke); | ||
if ('type' in $$props) $$invalidate(1, type = $$props.type); | ||
if ('style' in $$props) $$invalidate(2, style = $$props.style); | ||
}; | ||
return [stroke, type, style, click_handler]; | ||
} | ||
class Icon extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance$1, create_fragment$1, safe_not_equal, { stroke: 0, type: 1, style: 2 }); | ||
} | ||
} | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.0 */ | ||
function create_if_block(ctx) { | ||
let span; | ||
let icon; | ||
let current; | ||
let i; | ||
let raw_value = `<svg width="1em" height="1em" viewBox="64 64 896 896" focusable="false" data-icon="close" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" /></svg>` + ""; | ||
let mounted; | ||
let dispose; | ||
icon = new Icon({ props: { type: "x" } }); | ||
return { | ||
c() { | ||
span = element("span"); | ||
create_component(icon.$$.fragment); | ||
attr(span, "class", "responsive-ui-modal__close svelte-etosnx"); | ||
i = element("i"); | ||
attr(i, "class", "resp-modal__close"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
mount_component(icon, span, null); | ||
current = true; | ||
insert(target, i, anchor); | ||
i.innerHTML = raw_value; | ||
if (!mounted) { | ||
dispose = listen(span, "click", /*click_handler_1*/ ctx[9]); | ||
dispose = listen(i, "click", /*click_handler_1*/ ctx[9]); | ||
mounted = true; | ||
@@ -969,14 +573,4 @@ } | ||
p: noop, | ||
i(local) { | ||
if (current) return; | ||
transition_in(icon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(icon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
destroy_component(icon); | ||
if (detaching) detach(i); | ||
mounted = false; | ||
@@ -1010,6 +604,6 @@ dispose(); | ||
if (default_slot) default_slot.c(); | ||
attr(div0, "class", "responsive-ui-modal__overlay svelte-etosnx"); | ||
attr(div0, "style", div0_style_value = `opacity:${1 - /*$tween*/ ctx[3]};visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`); | ||
attr(div1, "class", "responsive-ui-modal svelte-etosnx"); | ||
attr(div1, "style", div1_style_value = `transform:translateY(${/*$tween*/ ctx[3] * 100}%);visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`); | ||
attr(div0, "class", "resp-modal__overlay"); | ||
attr(div0, "style", div0_style_value = `opacity: ${1 - /*$tween*/ ctx[3]}; visibility: ${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`); | ||
attr(div1, "class", "resp-modal"); | ||
attr(div1, "style", div1_style_value = `transform: translateY(${/*$tween*/ ctx[3] * 100}%); visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`); | ||
}, | ||
@@ -1031,7 +625,3 @@ m(target, anchor) { | ||
dispose = listen(div0, "click", function () { | ||
if (is_function(/*closable*/ ctx[1] | ||
? /*click_handler*/ ctx[8] | ||
: undefined)) (/*closable*/ ctx[1] | ||
? /*click_handler*/ ctx[8] | ||
: undefined).apply(this, arguments); | ||
if (is_function(/*closable*/ ctx[1] ? /*click_handler*/ ctx[8] : noop)) (/*closable*/ ctx[1] ? /*click_handler*/ ctx[8] : noop).apply(this, arguments); | ||
}); | ||
@@ -1045,3 +635,3 @@ | ||
if (!current || dirty & /*$tween*/ 8 && div0_style_value !== (div0_style_value = `opacity:${1 - /*$tween*/ ctx[3]};visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`)) { | ||
if (!current || dirty & /*$tween*/ 8 && div0_style_value !== (div0_style_value = `opacity: ${1 - /*$tween*/ ctx[3]}; visibility: ${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`)) { | ||
attr(div0, "style", div0_style_value); | ||
@@ -1053,20 +643,10 @@ } | ||
if_block.p(ctx, dirty); | ||
if (dirty & /*closable*/ 2) { | ||
transition_in(if_block, 1); | ||
} | ||
} else { | ||
if_block = create_if_block(ctx); | ||
if_block.c(); | ||
transition_in(if_block, 1); | ||
if_block.m(div1, t1); | ||
} | ||
} else if (if_block) { | ||
group_outros(); | ||
transition_out(if_block, 1, 1, () => { | ||
if_block = null; | ||
}); | ||
check_outros(); | ||
if_block.d(1); | ||
if_block = null; | ||
} | ||
@@ -1089,3 +669,3 @@ | ||
if (!current || dirty & /*$tween, style*/ 12 && div1_style_value !== (div1_style_value = `transform:translateY(${/*$tween*/ ctx[3] * 100}%);visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`)) { | ||
if (!current || dirty & /*$tween, style*/ 12 && div1_style_value !== (div1_style_value = `transform: translateY(${/*$tween*/ ctx[3] * 100}%); visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`)) { | ||
attr(div1, "style", div1_style_value); | ||
@@ -1096,3 +676,2 @@ } | ||
if (current) return; | ||
transition_in(if_block); | ||
transition_in(default_slot, local); | ||
@@ -1102,3 +681,2 @@ current = true; | ||
o(local) { | ||
transition_out(if_block); | ||
transition_out(default_slot, local); | ||
@@ -1129,3 +707,3 @@ current = false; | ||
scrollY = window.scrollY; | ||
document.body.setAttribute("style", `position:fixed;top:-${scrollY}px`); | ||
document.body.setAttribute("style", `position: fixed; top: -${scrollY}px`); | ||
} else { | ||
@@ -1132,0 +710,0 @@ document.body.setAttribute("style", ""); |
510
lib/index.js
@@ -133,5 +133,2 @@ var BottomModal = (function () { | ||
} | ||
function svg_element(name) { | ||
return document.createElementNS('http://www.w3.org/2000/svg', name); | ||
} | ||
function text(data) { | ||
@@ -156,5 +153,2 @@ return document.createTextNode(data); | ||
} | ||
function set_style(node, key, value, important) { | ||
node.style.setProperty(key, value, important ? 'important' : ''); | ||
} | ||
@@ -173,12 +167,2 @@ let current_component; | ||
} | ||
// TODO figure out if we still want to support | ||
// shorthand events, or if we want to implement | ||
// a real bubbling mechanism | ||
function bubble(component, event) { | ||
const callbacks = component.$$.callbacks[event.type]; | ||
if (callbacks) { | ||
// @ts-ignore | ||
callbacks.slice().forEach(fn => fn.call(this, event)); | ||
} | ||
} | ||
@@ -200,13 +184,30 @@ const dirty_components = []; | ||
} | ||
let flushing = false; | ||
// flush() calls callbacks in this order: | ||
// 1. All beforeUpdate callbacks, in order: parents before children | ||
// 2. All bind:this callbacks, in reverse order: children before parents. | ||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT | ||
// for afterUpdates called during the initial onMount, which are called in | ||
// reverse order: children before parents. | ||
// Since callbacks might update component values, which could trigger another | ||
// call to flush(), the following steps guard against this: | ||
// 1. During beforeUpdate, any updated components will be added to the | ||
// dirty_components array and will cause a reentrant call to flush(). Because | ||
// the flush index is kept outside the function, the reentrant call will pick | ||
// up where the earlier call left off and go through all dirty components. The | ||
// current_component value is saved and restored so that the reentrant call will | ||
// not interfere with the "parent" flush() call. | ||
// 2. bind:this callbacks cannot trigger new flush() calls. | ||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate | ||
// callback called a second time; the seen_callbacks set, outside the flush() | ||
// function, guarantees this behavior. | ||
const seen_callbacks = new Set(); | ||
let flushidx = 0; // Do *not* move this inside the flush() function | ||
function flush() { | ||
if (flushing) | ||
return; | ||
flushing = true; | ||
const saved_component = current_component; | ||
do { | ||
// first, call beforeUpdate functions | ||
// and update components | ||
for (let i = 0; i < dirty_components.length; i += 1) { | ||
const component = dirty_components[i]; | ||
while (flushidx < dirty_components.length) { | ||
const component = dirty_components[flushidx]; | ||
flushidx++; | ||
set_current_component(component); | ||
@@ -217,2 +218,3 @@ update(component.$$); | ||
dirty_components.length = 0; | ||
flushidx = 0; | ||
while (binding_callbacks.length) | ||
@@ -237,4 +239,4 @@ binding_callbacks.pop()(); | ||
update_scheduled = false; | ||
flushing = false; | ||
seen_callbacks.clear(); | ||
set_current_component(saved_component); | ||
} | ||
@@ -253,15 +255,2 @@ function update($$) { | ||
let outros; | ||
function group_outros() { | ||
outros = { | ||
r: 0, | ||
c: [], | ||
p: outros // parent group | ||
}; | ||
} | ||
function check_outros() { | ||
if (!outros.r) { | ||
run_all(outros.c); | ||
} | ||
outros = outros.p; | ||
} | ||
function transition_in(block, local) { | ||
@@ -289,5 +278,2 @@ if (block && block.i) { | ||
} | ||
function create_component(block) { | ||
block && block.c(); | ||
} | ||
function mount_component(component, target, anchor, customElement) { | ||
@@ -566,403 +552,21 @@ const { fragment, on_mount, on_destroy, after_update } = component.$$; | ||
/* components/icon/src/Icon.svelte generated by Svelte v3.44.0 */ | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.3 */ | ||
function create_if_block_5(ctx) { | ||
let svg; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M1.119 16.841a1.118 1.118 0 01-1.111-1.127c0-.619.492-1.111\n 1.111-1.111h13.475V1.127A1.133 1.133 0 0115.722 0c.619 0 1.111.508 1.111\n 1.127v13.476h13.475c.619 0 1.127.492 1.127 1.111s-.508 1.127-1.127\n 1.127H16.833v13.476c0 .619-.492 1.127-1.111 1.127a1.131 1.131 0\n 01-1.127-1.127V16.841H1.119z"); | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "x", "0"); | ||
attr(svg, "y", "0"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 31.444 31.444"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (82:28) | ||
function create_if_block_4(ctx) { | ||
let svg; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M1.111 16.832A1.117 1.117 0 010 15.706c0-.619.492-1.111\n 1.111-1.111H30.3c.619 0 1.127.492 1.127 1.111s-.508 1.127-1.127\n 1.127H1.111z"); | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "x", "0"); | ||
attr(svg, "y", "0"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 31.427 31.427"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(path, "fill", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (61:35) | ||
function create_if_block_3(ctx) { | ||
let svg; | ||
let g; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M617.858,370.896L221.513,9.705c-13.006-12.94-34.099-12.94-47.105,0c-13.006,12.939-13.006,33.934,0,46.874\n l372.447,339.438L174.441,735.454c-13.006,12.94-13.006,33.935,0,46.874s34.099,12.939,47.104,0l396.346-361.191\n c6.932-6.898,9.904-16.043,9.441-25.087C627.763,386.972,624.792,377.828,617.858,370.896z"); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "x", "0px"); | ||
attr(svg, "y", "0px"); | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 792.033 792.033"); | ||
set_style(svg, "enable-background", "new 0 0 792.033 792.033"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (45:28) | ||
function create_if_block_2(ctx) { | ||
let svg; | ||
let g; | ||
let circle0; | ||
let circle1; | ||
let circle2; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
circle0 = svg_element("circle"); | ||
circle1 = svg_element("circle"); | ||
circle2 = svg_element("circle"); | ||
attr(circle0, "cx", "42.667"); | ||
attr(circle0, "cy", "213.333"); | ||
attr(circle0, "r", "42.667"); | ||
attr(circle1, "cx", "213.333"); | ||
attr(circle1, "cy", "213.333"); | ||
attr(circle1, "r", "42.667"); | ||
attr(circle2, "cx", "384"); | ||
attr(circle2, "cy", "213.333"); | ||
attr(circle2, "r", "42.667"); | ||
attr(svg, "version", "1.1"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "width", "100%"); | ||
attr(svg, "height", "100%"); | ||
attr(svg, "viewBox", "0 0 426.667 426.667"); | ||
set_style(svg, "enable-background", "new 0 0 426.667 426.667"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, circle0); | ||
append(g, circle1); | ||
append(g, circle2); | ||
}, | ||
p: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (26:30) | ||
function create_if_block_1(ctx) { | ||
let svg; | ||
let line0; | ||
let line1; | ||
let line2; | ||
let line3; | ||
let line4; | ||
let line5; | ||
let line6; | ||
let line7; | ||
let line8; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
line0 = svg_element("line"); | ||
line1 = svg_element("line"); | ||
line2 = svg_element("line"); | ||
line3 = svg_element("line"); | ||
line4 = svg_element("line"); | ||
line5 = svg_element("line"); | ||
line6 = svg_element("line"); | ||
line7 = svg_element("line"); | ||
line8 = svg_element("line"); | ||
attr(line0, "x1", "4"); | ||
attr(line0, "y1", "21"); | ||
attr(line0, "x2", "4"); | ||
attr(line0, "y2", "14"); | ||
attr(line1, "x1", "4"); | ||
attr(line1, "y1", "10"); | ||
attr(line1, "x2", "4"); | ||
attr(line1, "y2", "3"); | ||
attr(line2, "x1", "12"); | ||
attr(line2, "y1", "21"); | ||
attr(line2, "x2", "12"); | ||
attr(line2, "y2", "12"); | ||
attr(line3, "x1", "12"); | ||
attr(line3, "y1", "8"); | ||
attr(line3, "x2", "12"); | ||
attr(line3, "y2", "3"); | ||
attr(line4, "x1", "20"); | ||
attr(line4, "y1", "21"); | ||
attr(line4, "x2", "20"); | ||
attr(line4, "y2", "16"); | ||
attr(line5, "x1", "20"); | ||
attr(line5, "y1", "12"); | ||
attr(line5, "x2", "20"); | ||
attr(line5, "y2", "3"); | ||
attr(line6, "x1", "1"); | ||
attr(line6, "y1", "14"); | ||
attr(line6, "x2", "7"); | ||
attr(line6, "y2", "14"); | ||
attr(line7, "x1", "9"); | ||
attr(line7, "y1", "8"); | ||
attr(line7, "x2", "15"); | ||
attr(line7, "y2", "8"); | ||
attr(line8, "x1", "17"); | ||
attr(line8, "y1", "16"); | ||
attr(line8, "x2", "23"); | ||
attr(line8, "y2", "16"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 24 24"); | ||
attr(svg, "fill", "none"); | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
attr(svg, "stroke-width", "2"); | ||
attr(svg, "stroke-linecap", "round"); | ||
attr(svg, "stroke-linejoin", "round"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, line0); | ||
append(svg, line1); | ||
append(svg, line2); | ||
append(svg, line3); | ||
append(svg, line4); | ||
append(svg, line5); | ||
append(svg, line6); | ||
append(svg, line7); | ||
append(svg, line8); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*stroke*/ 1) { | ||
attr(svg, "stroke", /*stroke*/ ctx[0]); | ||
} | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
// (7:2) {#if type === "x"} | ||
function create_if_block$1(ctx) { | ||
let svg; | ||
let g; | ||
let path; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path = svg_element("path"); | ||
attr(path, "d", "M228.929,205.01L404.596,29.343c6.78-6.548,6.968-17.352,0.42-24.132c-6.548-6.78-17.352-6.968-24.132-0.42\n c-0.142,0.137-0.282,0.277-0.42,0.42L204.796,180.878L29.129,5.21c-6.78-6.548-17.584-6.36-24.132,0.42\n c-6.388,6.614-6.388,17.099,0,23.713L180.664,205.01L4.997,380.677c-6.663,6.664-6.663,17.468,0,24.132\n c6.664,6.662,17.468,6.662,24.132,0l175.667-175.667l175.667,175.667c6.78,6.548,17.584,6.36,24.132-0.42\n c6.387-6.614,6.387-17.099,0-23.712L228.929,205.01z"); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
attr(svg, "x", "0px"); | ||
attr(svg, "y", "0px"); | ||
attr(svg, "viewBox", "0 0 408 408"); | ||
set_style(svg, "enable-background", "new 0 0 408 408"); | ||
attr(svg, "xml:space", "preserve"); | ||
attr(svg, "class", "svelte-2o8tyv"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path); | ||
}, | ||
p: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
function create_fragment$1(ctx) { | ||
let span; | ||
let mounted; | ||
let dispose; | ||
function select_block_type(ctx, dirty) { | ||
if (/*type*/ ctx[1] === "x") return create_if_block$1; | ||
if (/*type*/ ctx[1] === "filter") return create_if_block_1; | ||
if (/*type*/ ctx[1] === "more") return create_if_block_2; | ||
if (/*type*/ ctx[1] === "right-arrow") return create_if_block_3; | ||
if (/*type*/ ctx[1] == "minus") return create_if_block_4; | ||
if (/*type*/ ctx[1] == "plus") return create_if_block_5; | ||
} | ||
let current_block_type = select_block_type(ctx); | ||
let if_block = current_block_type && current_block_type(ctx); | ||
return { | ||
c() { | ||
span = element("span"); | ||
if (if_block) if_block.c(); | ||
attr(span, "class", "responsive-ui-icon svelte-2o8tyv"); | ||
attr(span, "style", /*style*/ ctx[2]); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
if (if_block) if_block.m(span, null); | ||
if (!mounted) { | ||
dispose = listen(span, "click", /*click_handler*/ ctx[3]); | ||
mounted = true; | ||
} | ||
}, | ||
p(ctx, [dirty]) { | ||
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { | ||
if_block.p(ctx, dirty); | ||
} else { | ||
if (if_block) if_block.d(1); | ||
if_block = current_block_type && current_block_type(ctx); | ||
if (if_block) { | ||
if_block.c(); | ||
if_block.m(span, null); | ||
} | ||
} | ||
if (dirty & /*style*/ 4) { | ||
attr(span, "style", /*style*/ ctx[2]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
if (if_block) { | ||
if_block.d(); | ||
} | ||
mounted = false; | ||
dispose(); | ||
} | ||
}; | ||
} | ||
function instance$1($$self, $$props, $$invalidate) { | ||
let { stroke = "#000" } = $$props; | ||
let { type = "" } = $$props; | ||
let { style = "" } = $$props; | ||
function click_handler(event) { | ||
bubble.call(this, $$self, event); | ||
} | ||
$$self.$$set = $$props => { | ||
if ('stroke' in $$props) $$invalidate(0, stroke = $$props.stroke); | ||
if ('type' in $$props) $$invalidate(1, type = $$props.type); | ||
if ('style' in $$props) $$invalidate(2, style = $$props.style); | ||
}; | ||
return [stroke, type, style, click_handler]; | ||
} | ||
class Icon extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance$1, create_fragment$1, safe_not_equal, { stroke: 0, type: 1, style: 2 }); | ||
} | ||
} | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.0 */ | ||
function create_if_block(ctx) { | ||
let span; | ||
let icon; | ||
let current; | ||
let i; | ||
let raw_value = `<svg width="1em" height="1em" viewBox="64 64 896 896" focusable="false" data-icon="close" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" /></svg>` + ""; | ||
let mounted; | ||
let dispose; | ||
icon = new Icon({ props: { type: "x" } }); | ||
return { | ||
c() { | ||
span = element("span"); | ||
create_component(icon.$$.fragment); | ||
attr(span, "class", "responsive-ui-modal__close svelte-etosnx"); | ||
i = element("i"); | ||
attr(i, "class", "resp-modal__close"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
mount_component(icon, span, null); | ||
current = true; | ||
insert(target, i, anchor); | ||
i.innerHTML = raw_value; | ||
if (!mounted) { | ||
dispose = listen(span, "click", /*click_handler_1*/ ctx[9]); | ||
dispose = listen(i, "click", /*click_handler_1*/ ctx[9]); | ||
mounted = true; | ||
@@ -972,14 +576,4 @@ } | ||
p: noop, | ||
i(local) { | ||
if (current) return; | ||
transition_in(icon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(icon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
destroy_component(icon); | ||
if (detaching) detach(i); | ||
mounted = false; | ||
@@ -1013,6 +607,6 @@ dispose(); | ||
if (default_slot) default_slot.c(); | ||
attr(div0, "class", "responsive-ui-modal__overlay svelte-etosnx"); | ||
attr(div0, "style", div0_style_value = `opacity:${1 - /*$tween*/ ctx[3]};visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`); | ||
attr(div1, "class", "responsive-ui-modal svelte-etosnx"); | ||
attr(div1, "style", div1_style_value = `transform:translateY(${/*$tween*/ ctx[3] * 100}%);visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`); | ||
attr(div0, "class", "resp-modal__overlay"); | ||
attr(div0, "style", div0_style_value = `opacity: ${1 - /*$tween*/ ctx[3]}; visibility: ${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`); | ||
attr(div1, "class", "resp-modal"); | ||
attr(div1, "style", div1_style_value = `transform: translateY(${/*$tween*/ ctx[3] * 100}%); visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`); | ||
}, | ||
@@ -1034,7 +628,3 @@ m(target, anchor) { | ||
dispose = listen(div0, "click", function () { | ||
if (is_function(/*closable*/ ctx[1] | ||
? /*click_handler*/ ctx[8] | ||
: undefined)) (/*closable*/ ctx[1] | ||
? /*click_handler*/ ctx[8] | ||
: undefined).apply(this, arguments); | ||
if (is_function(/*closable*/ ctx[1] ? /*click_handler*/ ctx[8] : noop)) (/*closable*/ ctx[1] ? /*click_handler*/ ctx[8] : noop).apply(this, arguments); | ||
}); | ||
@@ -1048,3 +638,3 @@ | ||
if (!current || dirty & /*$tween*/ 8 && div0_style_value !== (div0_style_value = `opacity:${1 - /*$tween*/ ctx[3]};visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`)) { | ||
if (!current || dirty & /*$tween*/ 8 && div0_style_value !== (div0_style_value = `opacity: ${1 - /*$tween*/ ctx[3]}; visibility: ${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`)) { | ||
attr(div0, "style", div0_style_value); | ||
@@ -1056,20 +646,10 @@ } | ||
if_block.p(ctx, dirty); | ||
if (dirty & /*closable*/ 2) { | ||
transition_in(if_block, 1); | ||
} | ||
} else { | ||
if_block = create_if_block(ctx); | ||
if_block.c(); | ||
transition_in(if_block, 1); | ||
if_block.m(div1, t1); | ||
} | ||
} else if (if_block) { | ||
group_outros(); | ||
transition_out(if_block, 1, 1, () => { | ||
if_block = null; | ||
}); | ||
check_outros(); | ||
if_block.d(1); | ||
if_block = null; | ||
} | ||
@@ -1092,3 +672,3 @@ | ||
if (!current || dirty & /*$tween, style*/ 12 && div1_style_value !== (div1_style_value = `transform:translateY(${/*$tween*/ ctx[3] * 100}%);visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`)) { | ||
if (!current || dirty & /*$tween, style*/ 12 && div1_style_value !== (div1_style_value = `transform: translateY(${/*$tween*/ ctx[3] * 100}%); visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"};${/*style*/ ctx[2]}`)) { | ||
attr(div1, "style", div1_style_value); | ||
@@ -1099,3 +679,2 @@ } | ||
if (current) return; | ||
transition_in(if_block); | ||
transition_in(default_slot, local); | ||
@@ -1105,3 +684,2 @@ current = true; | ||
o(local) { | ||
transition_out(if_block); | ||
transition_out(default_slot, local); | ||
@@ -1132,3 +710,3 @@ current = false; | ||
scrollY = window.scrollY; | ||
document.body.setAttribute("style", `position:fixed;top:-${scrollY}px`); | ||
document.body.setAttribute("style", `position: fixed; top: -${scrollY}px`); | ||
} else { | ||
@@ -1135,0 +713,0 @@ document.body.setAttribute("style", ""); |
{ | ||
"name": "@responsive-ui/bottom-modal", | ||
"version": "1.0.7-alpha.0", | ||
"version": "1.0.9-alpha.1", | ||
"description": "A bottom modal component of responsive-ui.", | ||
@@ -8,2 +8,3 @@ "author": "Si3nLoong <sianloong90@gmail.com> (https://github.com/si3nloong)", | ||
"license": "MIT", | ||
"type": "module", | ||
"main": "lib/cjs/index.js", | ||
@@ -26,2 +27,3 @@ "browser": "lib/index.js", | ||
"peerDependencies": { | ||
"@responsive-ui/icon": "*", | ||
"svelte": "^3.27.0", | ||
@@ -42,3 +44,4 @@ "svelte-preprocess": "^4.5.0", | ||
"type": "git", | ||
"url": "git+https://github.com/wetix/responsive-ui.git" | ||
"url": "https://github.com/wetix/responsive-ui", | ||
"directory": "components/bottom-modal" | ||
}, | ||
@@ -51,6 +54,3 @@ "scripts": { | ||
}, | ||
"gitHead": "3fde8242766d6298122a874e2415ced21cd78f27", | ||
"dependencies": { | ||
"@responsive-ui/icon": "^1.0.7-alpha.0" | ||
} | ||
"gitHead": "50c6059183e704685646087a37edcd430b875948" | ||
} |
@@ -34,3 +34,3 @@ | ||
[@responsive-ui/accordion](https://github.com/wetix/responsive-ui/tree/main/components/accordion) is 100% free and open-source, under the [MIT license](https://github.com/wetix/responsive-ui/blob/main/LICENSE). | ||
[@responsive-ui/bottom-modal](https://github.com/wetix/responsive-ui/tree/main/components/bottom-modal) is 100% free and open-source, under the [MIT license](https://github.com/wetix/responsive-ui/blob/main/LICENSE). | ||
@@ -37,0 +37,0 @@ ## 🎉 Big Thanks To |
@@ -9,4 +9,15 @@ import type { SvelteComponentTyped } from "svelte/internal"; | ||
declare class BottomModal extends SvelteComponentTyped<BottomModalProps> {} | ||
/** | ||
* Component slots. | ||
*/ | ||
export interface BottomModalSlots { | ||
default: {}; | ||
} | ||
declare class BottomModal extends SvelteComponentTyped< | ||
BottomModalProps, | ||
{}, | ||
BottomModalSlots | ||
> {} | ||
export default BottomModal; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
80217
9
2221
+ Added@responsive-ui/icon@0.16.0(transitive)
- Removed@responsive-ui/icon@^1.0.7-alpha.0
- Removed@responsive-ui/icon@1.0.7-alpha.0(transitive)