UNPKG

quarkd

Version:

Mobile UI Components built on Web Components.

2 lines (1 loc) 3.04 kB
import{_ as o,a as r}from"../typeof.js";import{_ as t,a as e,b as n,c as i,P as a,H as d,d as u,N as p,B as s}from"../index2.js";import{_ as l}from"../defineProperty.js";import"../dropdownitem/index.js";import{s as c}from"../public.js";import"../bodyScrollLock.esm.js";import"../popup/index.js";import"../index4.js";import"../index22.js";import"../cell/index.js";import"../index5.js";function h(o){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(o){return!1}}();return function(){var n,i=t(o);if(r){var a=t(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return e(this,n)}}var f=function(t){n(u,d);var e=h(u);function u(){var r;o(this,u);for(var t=arguments.length,n=new Array(t),d=0;d<t;d++)n[d]=arguments[d];return r=e.call.apply(e,[this].concat(n)),l(i(r),"zIndex",10),l(i(r),"activeColor","#08f"),l(i(r),"direction","down"),l(i(r),"hideOverlay",!1),l(i(r),"swipeThreshold",0),l(i(r),"root",a()),l(i(r),"rootSlotRef",a()),l(i(r),"onSlotChange",(function(){var o;r.rootSlotRef.current&&c(null===(o=r.rootSlotRef.current)||void 0===o?void 0:o.assignedNodes()).filter((function(o){return"QUARK-DROPDOWN-ITEM"===o.tagName})).forEach((function(o){o.setProps({activeColor:r.activeColor,zIndex:r.zIndex,hideOverlay:r.hideOverlay,direction:r.direction,swipeThreshold:r.swipeThreshold})}))})),r}return r(u,[{key:"render",value:function(){return d.h("div",{class:"quark-dropdown-menu",part:"root"},d.h("div",{class:"quark-dropdown-menu__bar",part:"menu-bar"},d.h("div",{class:"quark-dropdown-menu__bar-inner",part:"menu-inner"},d.h("div",{class:"quark-dropdown-menu__bar-content",part:"menu-content",ref:this.root},d.h("slot",{ref:this.rootSlotRef,onslotchange:this.onSlotChange})))))}}]),u}();u([p({type:Number,attribute:"z-index"})],f.prototype,"zIndex",void 0),u([p({type:String,attribute:"active-color"})],f.prototype,"activeColor",void 0),u([p({type:String})],f.prototype,"direction",void 0),u([p({type:Boolean,attribute:"hide-overlay"})],f.prototype,"hideOverlay",void 0),u([p({type:Number,attribute:"swipe-threshold"})],f.prototype,"swipeThreshold",void 0);var v=f=u([s({tag:"quark-dropdown-menu",style:":root {\n --quark-dropdown-menu-height: 12.8vw;\n --quark-dropdown-menu-title-background-color: #fff\n}\n\n.quark-dropdown-menu__bar {\n width: 100%;\n height: var(--quark-dropdown-menu-height);\n position: relative;\n box-shadow: 0 0.53333vw 3.2vw rgba(100, 101, 102, 0.12);\n overflow: hidden;\n}\n\n.quark-dropdown-menu__bar-inner {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: -4.53333vw;\n padding-bottom: 4.53333vw;\n overflow-y: hidden;\n overflow-x: scroll;\n background: var(--quark-dropdown-menu-title-background-color);\n}\n\n.quark-dropdown-menu__bar-content {\n display: flex;\n height: var(--quark-dropdown-menu-height);\n}"})],f);export{v as default};