Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@responsive-ui/bottom-modal

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@responsive-ui/bottom-modal - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

358

lib/index.js

@@ -124,5 +124,2 @@ var BottomModal = (function () {

}
function svg_element(name) {
return document.createElementNS('http://www.w3.org/2000/svg', name);
}
function text(data) {

@@ -154,5 +151,2 @@ return document.createTextNode(data);

}
function set_style(node, key, value, important) {
node.style.setProperty(key, value, important ? 'important' : '');
}

@@ -238,15 +232,2 @@ let current_component;

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) {

@@ -274,5 +255,2 @@ if (block && block.i) {

}
function create_component(block) {
block && block.c();
}
function mount_component(component, target, anchor) {

@@ -551,249 +529,26 @@ const { fragment, on_mount, on_destroy, after_update } = component.$$;

/* components/icon/src/Icon.svelte generated by Svelte v3.31.0 */
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.31.2 */
function create_if_block_2(ctx) {
let svg;
let g1;
let g0;
let circle0;
let g3;
let g2;
let circle1;
let g5;
let g4;
let circle2;
return {
c() {
svg = svg_element("svg");
g1 = svg_element("g");
g0 = svg_element("g");
circle0 = svg_element("circle");
g3 = svg_element("g");
g2 = svg_element("g");
circle1 = svg_element("circle");
g5 = svg_element("g");
g4 = svg_element("g");
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-1ess3g4");
},
m(target, anchor) {
insert(target, svg, anchor);
append(svg, g1);
append(g1, g0);
append(g0, circle0);
append(svg, g3);
append(g3, g2);
append(g2, circle1);
append(svg, g5);
append(g5, g4);
append(g4, circle2);
},
d(detaching) {
if (detaching) detach(svg);
}
};
}
// (28: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, "width", "100%");
attr(svg, "height", "100%");
attr(svg, "viewBox", "0 0 24 24");
attr(svg, "fill", "none");
attr(svg, "stroke", "#000");
attr(svg, "stroke-width", "2");
attr(svg, "stroke-linecap", "round");
attr(svg, "stroke-linejoin", "round");
attr(svg, "class", "svelte-1ess3g4");
},
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);
},
d(detaching) {
if (detaching) detach(svg);
}
};
}
// (15:2) {#if type === 'x'}
function create_if_block(ctx) {
let svg;
let line0;
let line1;
return {
c() {
svg = svg_element("svg");
line0 = svg_element("line");
line1 = svg_element("line");
attr(line0, "x1", "18");
attr(line0, "y1", "6");
attr(line0, "x2", "6");
attr(line0, "y2", "18");
attr(line1, "x1", "6");
attr(line1, "y1", "6");
attr(line1, "x2", "18");
attr(line1, "y2", "18");
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
attr(svg, "viewBox", "0 0 24 24");
attr(svg, "width", "100%");
attr(svg, "height", "100%");
attr(svg, "stroke", "#000");
attr(svg, "stroke-width", "1.5");
attr(svg, "stroke-linecap", "square");
attr(svg, "stroke-linejoin", "round");
attr(svg, "class", "svelte-1ess3g4");
},
m(target, anchor) {
insert(target, svg, anchor);
append(svg, line0);
append(svg, line1);
},
d(detaching) {
if (detaching) detach(svg);
}
};
}
function create_fragment(ctx) {
let span;
let i;
let mounted;
let dispose;
function select_block_type(ctx, dirty) {
if (/*type*/ ctx[0] === "x") return create_if_block;
if (/*type*/ ctx[0] === "filter") return create_if_block_1;
if (/*type*/ ctx[0] === "more") return create_if_block_2;
}
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-1ess3g4");
attr(span, "style", /*style*/ ctx[1]);
i = element("i");
i.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16px" height="16px" stroke="#000" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="round" class="svelte-3sjasj"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`;
attr(i, "class", "close svelte-3sjasj");
},
m(target, anchor) {
insert(target, span, anchor);
if (if_block) if_block.m(span, null);
insert(target, i, anchor);
if (!mounted) {
dispose = listen(span, "click", /*click_handler*/ ctx[2]);
dispose = listen(i, "click", /*click_handler_1*/ ctx[9]);
mounted = true;
}
},
p(ctx, [dirty]) {
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
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*/ 2) {
attr(span, "style", /*style*/ ctx[1]);
}
},
i: noop,
o: noop,
p: noop,
d(detaching) {
if (detaching) detach(span);
if (if_block) {
if_block.d();
}
if (detaching) detach(i);
mounted = false;

@@ -805,63 +560,3 @@ dispose();

function instance($$self, $$props, $$invalidate) {
let { type = "" } = $$props;
let { style = "" } = $$props;
function click_handler(event) {
bubble($$self, event);
}
$$self.$$set = $$props => {
if ("type" in $$props) $$invalidate(0, type = $$props.type);
if ("style" in $$props) $$invalidate(1, style = $$props.style);
};
return [type, style, click_handler];
}
class Icon extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, { type: 0, style: 1 });
}
}
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.31.0 */
function create_if_block$1(ctx) {
let i;
let icon;
let current;
icon = new Icon({ props: { type: "x" } });
icon.$on("click", /*click_handler_1*/ ctx[9]);
return {
c() {
i = element("i");
create_component(icon.$$.fragment);
attr(i, "class", "close svelte-4163ae");
},
m(target, anchor) {
insert(target, i, anchor);
mount_component(icon, i, null);
current = true;
},
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(i);
destroy_component(icon);
}
};
}
function create_fragment$1(ctx) {
function create_fragment(ctx) {
let div1;

@@ -875,3 +570,3 @@ let div0;

let dispose;
let if_block = /*closable*/ ctx[1] && create_if_block$1(ctx);
let if_block = /*closable*/ ctx[1] && create_if_block(ctx);
const default_slot_template = /*#slots*/ ctx[7].default;

@@ -887,5 +582,5 @@ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);

if (default_slot) default_slot.c();
attr(div0, "class", "responsive-ui-modal svelte-4163ae");
attr(div0, "class", "responsive-ui-modal svelte-3sjasj");
attr(div0, "style", div0_style_value = `transform:translateY(${/*$tween*/ ctx[3] * 100}%);${/*style*/ ctx[2]}`);
attr(div1, "class", "responsive-ui-modal__overlay svelte-4163ae");
attr(div1, "class", "responsive-ui-modal__overlay svelte-3sjasj");
attr(div1, "style", div1_style_value = `opacity:${1 - /*$tween*/ ctx[3]}; visibility:${1 - /*$tween*/ ctx[3] <= 0 ? "hidden" : "visible"}`);

@@ -922,20 +617,10 @@ },

if_block.p(ctx, dirty);
if (dirty & /*closable*/ 2) {
transition_in(if_block, 1);
}
} else {
if_block = create_if_block$1(ctx);
if_block = create_if_block(ctx);
if_block.c();
transition_in(if_block, 1);
if_block.m(div0, t);
}
} else if (if_block) {
group_outros();
transition_out(if_block, 1, 1, () => {
if_block = null;
});
check_outros();
if_block.d(1);
if_block = null;
}

@@ -959,3 +644,2 @@

if (current) return;
transition_in(if_block);
transition_in(default_slot, local);

@@ -965,3 +649,2 @@ current = true;

o(local) {
transition_out(if_block);
transition_out(default_slot, local);

@@ -980,3 +663,3 @@ current = false;

function instance$1($$self, $$props, $$invalidate) {
function instance($$self, $$props, $$invalidate) {
let $tween;

@@ -995,3 +678,6 @@ let { $$slots: slots = {}, $$scope } = $$props;

const click_handler_1 = () => $$invalidate(0, open = false);
const click_handler_1 = () => {
$$invalidate(0, open = false);
};
const click_handler_2 = () => $$invalidate(0, open = false);

@@ -1039,3 +725,3 @@

super();
init(this, options, instance$1, create_fragment$1, safe_not_equal, { open: 0, closable: 1, style: 2 });
init(this, options, instance, create_fragment, safe_not_equal, { open: 0, closable: 1, style: 2 });
}

@@ -1042,0 +728,0 @@ }

6

package.json
{
"name": "@responsive-ui/bottom-modal",
"version": "0.4.2",
"version": "0.4.3",
"description": "Bottom Modal component",

@@ -35,6 +35,6 @@ "author": "Si3nLoong <sianloong90@gmail.com>",

},
"gitHead": "66d0f9746f1e476d80e6e9dbd125afd9efa9df7a",
"gitHead": "0fad9d0a11e24a28a2c4bccf6976c176e2fc2fd4",
"dependencies": {
"@responsive-ui/icon": "^0.4.2"
"@responsive-ui/icon": "^0.4.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc