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

systema-dropdown

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systema-dropdown - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

example.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("systema-attach")):"function"==typeof define&&define.amd?define(["react","systema-attach"],t):"object"==typeof exports?exports.dropdown=t(require("react"),require("systema-attach")):e.dropdown=t(e.react,e["systema-attach"])}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./example/index.js")}({"./example/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n("react"),s=r(u),f=n("./src/index.js"),i=r(f),d=n("./example/styles.css"),p=r(d),m=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setAnchorRef=function(e){n.setState({anchor:e})},n.state={anchor:null},n}return l(t,e),c(t,[{key:"render",value:function(){var e=this.state.anchor;return s.default.createElement("div",{"data-snapshot":this.props.placement},s.default.createElement("div",{className:p.default.example},s.default.createElement("a",{className:p.default.anchor,ref:this.setAnchorRef},"anchor for drop-down"),e&&s.default.createElement(i.default,{anchor:e,placement:this.props.placement},s.default.createElement("div",{className:p.default.dropdownContent},this.props.placement))))}}]),t}(u.Component),h=function(){return s.default.createElement("div",{className:p.default.page},s.default.createElement("h1",null,"Dropdown"),s.default.createElement("p",null,"A component to show drop down. It uses the systema-attach component for positioning and adds basic styling."),s.default.createElement("h2",null,"Dropdown component"),s.default.createElement("p",null),s.default.createElement("table",{width:"100%"},s.default.createElement("thead",null,s.default.createElement("tr",null,s.default.createElement("th",{width:"20%"},"Prop"),s.default.createElement("th",null,"Description"))),s.default.createElement("tbody",null,s.default.createElement("tr",null,s.default.createElement("td",null,s.default.createElement("code",null,"anchor")," (required)"),s.default.createElement("td",null,"Dom element to be used for positioning the dropdown")),s.default.createElement("tr",null,s.default.createElement("td",null,s.default.createElement("code",null,"placement")),s.default.createElement("td",null,"Determines the positioning of the dropdown (",s.default.createElement("code",null,"bottom")," is the default value). Valid values are:",s.default.createElement("code",null,"auto-start"),", ",s.default.createElement("code",null,"auto"),", ",s.default.createElement("code",null,"auto-end"),","," ",s.default.createElement("code",null,"top-start"),", ",s.default.createElement("code",null,"top"),", ",s.default.createElement("code",null,"top-end"),","," ",s.default.createElement("code",null,"right-start"),", ",s.default.createElement("code",null,"right"),", ",s.default.createElement("code",null,"right-end"),","," ",s.default.createElement("code",null,"bottom-end"),", ",s.default.createElement("code",null,"bottom"),","," ",s.default.createElement("code",null,"bottom-start"),", ",s.default.createElement("code",null,"left-end"),", ",s.default.createElement("code",null,"left")," ","and ",s.default.createElement("code",null,"left-start"))),s.default.createElement("tr",null,s.default.createElement("td",null,s.default.createElement("code",null,"children")),s.default.createElement("td",null,"Content to be rendered.")))),s.default.createElement("h3",null,"Example"),s.default.createElement("pre",null,s.default.createElement("code",null,'\n// Example component that shows a dropdown attached to an element.\nclass Example extends Component {\n constructor(props) {\n super(props);\n this.state = {\n anchor: undefined,\n };\n }\n\n setAnchorRef = (ref) => {\n this.setState({\n anchor: ref,\n });\n }\n\n render() {\n const {\n anchor\n } = this.state;\n return (\n <div className={styles.example}>\n <a className={styles.anchor} ref={this.setAnchorRef}>\n anchor for drop-down\n </a>\n {anchor && <Dropdown anchor={anchor}>\n <div className={styles.dropdownContent} placement="bottom">\n Content {this.props.placement}\n </div>\n </Dropdown>}\n </div>\n )\n }\n}\n')),s.default.createElement("p",null,"Here is a similar component in action:"),s.default.createElement(m,{placement:"top"}),s.default.createElement(m,{placement:"right"}),s.default.createElement(m,{placement:"left"}),s.default.createElement(m,{placement:"bottom"}))};h.displayName="dropdown-example",t.default=h,e.exports=t.default},"./example/styles.css":function(e,t){e.exports={page:"_1oyee12R",example:"_19xrO_1O",dropdownContent:"pNTdDUyp"}},"./src/arrow/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n("react"),a=r(o),l=n("./src/arrow/styles.css"),c=r(l),u=function(e){return-1!==e.indexOf("top")?c.default.top:-1!==e.indexOf("left")?c.default.left:-1!==e.indexOf("right")?c.default.right:c.default.bottom},s=function(e){var t=u(e.placement);return a.default.createElement("div",{className:t,style:e.style,ref:e.setRef})};s.displayName="DropdownArrow",t.default=s,e.exports=t.default},"./src/arrow/styles.css":function(e,t){e.exports={arrow:"tGRunOoS",bottom:"ptpf9cjK tGRunOoS",left:"_2yfDicBM tGRunOoS",top:"_3tnFEAch tGRunOoS",right:"_14B83tTL tGRunOoS"}},"./src/content/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n("react"),s=r(u),f=n("./src/arrow/index.js"),i=r(f),d=n("./src/content/styles.css"),p=r(d),m=function(e){return-1!==e.indexOf("top")?p.default.top:-1!==e.indexOf("left")?p.default.left:-1!==e.indexOf("right")?p.default.right:p.default.bottom},h=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"render",value:function(){var e=m(this.props.placement);return s.default.createElement("div",{ref:this.props.setContentRef,style:this.props.contentStyles,className:e},s.default.createElement(i.default,{setRef:this.props.setArrowRef,style:this.props.arrowStyles,placement:this.props.placement}),this.props.children)}}]),t}(u.Component);h.displayName="DropdownContent",t.default=h,e.exports=t.default},"./src/content/styles.css":function(e,t){e.exports={content:"_3x_FieL9",fadeIn:"_3oUMAv0a",top:"_21KYDCKa _3x_FieL9",right:"_3FxlnKXH _3x_FieL9",bottom:"FRV48PTT _3x_FieL9",left:"_3HK6wtnr _3x_FieL9"}},"./src/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n("react"),s=r(u),f=n("./src/content/index.js"),i=r(f),d=n("systema-attach"),p=r(d),m=(0,p.default)()(i.default),h=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"render",value:function(){return s.default.createElement(m,{to:this.props.anchor,placement:this.props.placement},this.props.children)}}]),t}(u.Component);h.displayName="Dropdown",h.defaultProps={placement:"bottom"},t.default=h,e.exports=t.default},react:function(e,t){e.exports=require("react")},"systema-attach":function(e,t){e.exports=require("systema-attach")}})});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("systema-attach")):"function"==typeof define&&define.amd?define(["react","systema-attach"],t):"object"==typeof exports?exports.dropdown=t(require("react"),require("systema-attach")):e.dropdown=t(e.react,e["systema-attach"])}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./example/index.js")}({"./example/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n("react"),s=r(u),f=n("./src/index.js"),i=r(f),d=n("./example/styles.css"),p=r(d),m=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setAnchorRef=function(e){n.setState({anchor:e})},n.state={anchor:null},n}return l(t,e),c(t,[{key:"render",value:function(){var e=this.state.anchor;return s.default.createElement("div",{"data-snapshot":this.props.placement},s.default.createElement("div",{className:p.default.example},s.default.createElement("a",{className:p.default.anchor,ref:this.setAnchorRef},"anchor for drop-down"),e&&s.default.createElement(i.default,{anchor:e,placement:this.props.placement},s.default.createElement("div",{className:p.default.dropdownContent},this.props.placement))))}}]),t}(u.Component),h=function(){return s.default.createElement("div",{className:p.default.page},s.default.createElement("h1",null,"Dropdown"),s.default.createElement("p",null,"A component to show drop down. It uses the systema-attach component for positioning and adds basic styling."),s.default.createElement("h2",null,"Dropdown component"),s.default.createElement("p",null),s.default.createElement("table",{width:"100%"},s.default.createElement("thead",null,s.default.createElement("tr",null,s.default.createElement("th",{width:"20%"},"Prop"),s.default.createElement("th",null,"Description"))),s.default.createElement("tbody",null,s.default.createElement("tr",null,s.default.createElement("td",null,s.default.createElement("code",null,"anchor")," (required)"),s.default.createElement("td",null,"Dom element to be used for positioning the dropdown")),s.default.createElement("tr",null,s.default.createElement("td",null,s.default.createElement("code",null,"placement")),s.default.createElement("td",null,"Determines the positioning of the dropdown (",s.default.createElement("code",null,"bottom")," is the default value). Valid values are:",s.default.createElement("code",null,"auto-start"),", ",s.default.createElement("code",null,"auto"),", ",s.default.createElement("code",null,"auto-end"),","," ",s.default.createElement("code",null,"top-start"),", ",s.default.createElement("code",null,"top"),", ",s.default.createElement("code",null,"top-end"),","," ",s.default.createElement("code",null,"right-start"),", ",s.default.createElement("code",null,"right"),", ",s.default.createElement("code",null,"right-end"),","," ",s.default.createElement("code",null,"bottom-end"),", ",s.default.createElement("code",null,"bottom"),","," ",s.default.createElement("code",null,"bottom-start"),", ",s.default.createElement("code",null,"left-end"),", ",s.default.createElement("code",null,"left")," ","and ",s.default.createElement("code",null,"left-start"))),s.default.createElement("tr",null,s.default.createElement("td",null,s.default.createElement("code",null,"children")),s.default.createElement("td",null,"Content to be rendered.")))),s.default.createElement("h3",null,"Example"),s.default.createElement("pre",null,s.default.createElement("code",null,'\n// Example component that shows a dropdown attached to an element.\nclass Example extends Component {\n constructor(props) {\n super(props);\n this.state = {\n anchor: undefined,\n };\n }\n\n setAnchorRef = (ref) => {\n this.setState({\n anchor: ref,\n });\n }\n\n render() {\n const {\n anchor\n } = this.state;\n return (\n <div className={styles.example}>\n <a className={styles.anchor} ref={this.setAnchorRef}>\n anchor for drop-down\n </a>\n {anchor && <Dropdown anchor={anchor}>\n <div className={styles.dropdownContent} placement="bottom">\n Content {this.props.placement}\n </div>\n </Dropdown>}\n </div>\n )\n }\n}\n')),s.default.createElement("p",null,"Here is a similar component in action:"),s.default.createElement(m,{placement:"top"}),s.default.createElement(m,{placement:"right"}),s.default.createElement(m,{placement:"left"}),s.default.createElement(m,{placement:"bottom"}))};h.displayName="dropdown-example",t.default=h,e.exports=t.default},"./example/styles.css":function(e,t){e.exports={page:"_1oyee12R",example:"_19xrO_1O",dropdownContent:"pNTdDUyp"}},"./src/arrow/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n("react"),a=r(o),l=n("./src/arrow/styles.css"),c=r(l),u=function(e){return-1!==e.indexOf("top")?c.default.top:-1!==e.indexOf("left")?c.default.left:-1!==e.indexOf("right")?c.default.right:c.default.bottom},s=function(e){var t=u(e.placement);return a.default.createElement("div",{className:t,style:e.style,ref:e.setRef})};s.displayName="DropdownArrow",t.default=s,e.exports=t.default},"./src/arrow/styles.css":function(e,t){e.exports={arrow:"tGRunOoS",bottom:"ptpf9cjK tGRunOoS",left:"_2yfDicBM tGRunOoS",top:"_3tnFEAch tGRunOoS",right:"_14B83tTL tGRunOoS"}},"./src/content/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n("react"),s=r(u),f=n("./src/arrow/index.js"),i=r(f),d=n("./src/content/styles.css"),p=r(d),m=function(e){return-1!==e.indexOf("top")?p.default.top:-1!==e.indexOf("left")?p.default.left:-1!==e.indexOf("right")?p.default.right:p.default.bottom},h=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"render",value:function(){var e=m(this.props.placement);return s.default.createElement("div",{ref:this.props.setContentRef,style:this.props.contentStyles,className:e},s.default.createElement(i.default,{setRef:this.props.setArrowRef,style:this.props.arrowStyles,placement:this.props.placement}),this.props.children)}}]),t}(u.Component);h.displayName="DropdownContent",t.default=h,e.exports=t.default},"./src/content/styles.css":function(e,t){e.exports={content:"_3x_FieL9",fadeIn:"_3oUMAv0a",top:"_21KYDCKa _3x_FieL9",right:"_3FxlnKXH _3x_FieL9",bottom:"FRV48PTT _3x_FieL9",left:"_3HK6wtnr _3x_FieL9"}},"./src/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n("react"),s=r(u),f=n("./src/content/index.js"),i=r(f),d=n("systema-attach"),p=r(d),m=n("./src/styles.css"),h=r(m),y=(0,p.default)()(i.default),b=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"render",value:function(){return s.default.createElement("div",{className:h.default.placeHolder},s.default.createElement(y,{to:this.props.anchor,placement:this.props.placement},this.props.children))}}]),t}(u.Component);b.displayName="Dropdown",b.defaultProps={placement:"bottom"},t.default=b,e.exports=t.default},"./src/styles.css":function(e,t){e.exports={placeHolder:"_3X99uxFo"}},react:function(e,t){e.exports=require("react")},"systema-attach":function(e,t){e.exports=require("systema-attach")}})});

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("systema-attach")):"function"==typeof define&&define.amd?define(["react","systema-attach"],t):"object"==typeof exports?exports.dropdown=t(require("react"),require("systema-attach")):e.dropdown=t(e.react,e["systema-attach"])}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="../dropdown/src/index.js")}({"../dropdown/src/arrow/index.js":function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r("react"),a=n(o),u=r("../dropdown/src/arrow/styles.css"),s=n(u),c=function(e){return-1!==e.indexOf("top")?s.default.top:-1!==e.indexOf("left")?s.default.left:-1!==e.indexOf("right")?s.default.right:s.default.bottom},i=function(e){var t=c(e.placement);return a.default.createElement("div",{className:t,style:e.style,ref:e.setRef})};i.displayName="DropdownArrow",t.default=i,e.exports=t.default},"../dropdown/src/arrow/styles.css":function(e,t){e.exports={arrow:"tGRunOoS",bottom:"ptpf9cjK tGRunOoS",left:"_2yfDicBM tGRunOoS",top:"_3tnFEAch tGRunOoS",right:"_14B83tTL tGRunOoS"}},"../dropdown/src/content/index.js":function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r("react"),i=n(c),f=r("../dropdown/src/arrow/index.js"),p=n(f),l=r("../dropdown/src/content/styles.css"),d=n(l),y=function(e){return-1!==e.indexOf("top")?d.default.top:-1!==e.indexOf("left")?d.default.left:-1!==e.indexOf("right")?d.default.right:d.default.bottom},h=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"render",value:function(){var e=y(this.props.placement);return i.default.createElement("div",{ref:this.props.setContentRef,style:this.props.contentStyles,className:e},i.default.createElement(p.default,{setRef:this.props.setArrowRef,style:this.props.arrowStyles,placement:this.props.placement}),this.props.children)}}]),t}(c.Component);h.displayName="DropdownContent",t.default=h,e.exports=t.default},"../dropdown/src/content/styles.css":function(e,t){e.exports={content:"_3x_FieL9",fadeIn:"_3oUMAv0a",top:"_21KYDCKa _3x_FieL9",right:"_3FxlnKXH _3x_FieL9",bottom:"FRV48PTT _3x_FieL9",left:"_3HK6wtnr _3x_FieL9"}},"../dropdown/src/index.js":function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r("react"),i=n(c),f=r("../dropdown/src/content/index.js"),p=n(f),l=r("systema-attach"),d=n(l),y=(0,d.default)()(p.default),h=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"render",value:function(){return i.default.createElement(y,{to:this.props.anchor,placement:this.props.placement},this.props.children)}}]),t}(c.Component);h.displayName="Dropdown",h.defaultProps={placement:"bottom"},t.default=h,e.exports=t.default},react:function(e,t){e.exports=require("react")},"systema-attach":function(e,t){e.exports=require("systema-attach")}})});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("systema-attach")):"function"==typeof define&&define.amd?define(["react","systema-attach"],t):"object"==typeof exports?exports.dropdown=t(require("react"),require("systema-attach")):e.dropdown=t(e.react,e["systema-attach"])}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="../dropdown/src/index.js")}({"../dropdown/src/arrow/index.js":function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r("react"),s=n(o),a=r("../dropdown/src/arrow/styles.css"),u=n(a),c=function(e){return-1!==e.indexOf("top")?u.default.top:-1!==e.indexOf("left")?u.default.left:-1!==e.indexOf("right")?u.default.right:u.default.bottom},i=function(e){var t=c(e.placement);return s.default.createElement("div",{className:t,style:e.style,ref:e.setRef})};i.displayName="DropdownArrow",t.default=i,e.exports=t.default},"../dropdown/src/arrow/styles.css":function(e,t){e.exports={arrow:"tGRunOoS",bottom:"ptpf9cjK tGRunOoS",left:"_2yfDicBM tGRunOoS",top:"_3tnFEAch tGRunOoS",right:"_14B83tTL tGRunOoS"}},"../dropdown/src/content/index.js":function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r("react"),i=n(c),f=r("../dropdown/src/arrow/index.js"),l=n(f),p=r("../dropdown/src/content/styles.css"),d=n(p),y=function(e){return-1!==e.indexOf("top")?d.default.top:-1!==e.indexOf("left")?d.default.left:-1!==e.indexOf("right")?d.default.right:d.default.bottom},h=function(e){function t(){return o(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){var e=y(this.props.placement);return i.default.createElement("div",{ref:this.props.setContentRef,style:this.props.contentStyles,className:e},i.default.createElement(l.default,{setRef:this.props.setArrowRef,style:this.props.arrowStyles,placement:this.props.placement}),this.props.children)}}]),t}(c.Component);h.displayName="DropdownContent",t.default=h,e.exports=t.default},"../dropdown/src/content/styles.css":function(e,t){e.exports={content:"_3x_FieL9",fadeIn:"_3oUMAv0a",top:"_21KYDCKa _3x_FieL9",right:"_3FxlnKXH _3x_FieL9",bottom:"FRV48PTT _3x_FieL9",left:"_3HK6wtnr _3x_FieL9"}},"../dropdown/src/index.js":function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r("react"),i=n(c),f=r("../dropdown/src/content/index.js"),l=n(f),p=r("systema-attach"),d=n(p),y=r("../dropdown/src/styles.css"),h=n(y),_=(0,d.default)()(l.default),b=function(e){function t(){return o(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return i.default.createElement("div",{className:h.default.placeHolder},i.default.createElement(_,{to:this.props.anchor,placement:this.props.placement},this.props.children))}}]),t}(c.Component);b.displayName="Dropdown",b.defaultProps={placement:"bottom"},t.default=b,e.exports=t.default},"../dropdown/src/styles.css":function(e,t){e.exports={placeHolder:"_3X99uxFo"}},react:function(e,t){e.exports=require("react")},"systema-attach":function(e,t){e.exports=require("systema-attach")}})});
//# sourceMappingURL=index.js.map
{
"name": "systema-dropdown",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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