@vandeurenglenn/lite-elements 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/exports/banner/banner.d.ts +7 -0
- package/exports/banner.js +68 -0
- package/exports/bundle/banner.js +37 -0
- package/exports/bundle/button.js +144 -0
- package/exports/bundle/card.js +140 -0
- package/exports/bundle/code.js +35 -0
- package/exports/bundle/custom-element-c2e883ba.js +1 -0
- package/exports/bundle/demo-elements.js +1 -0
- package/exports/bundle/demo-icons.js +16 -0
- package/exports/bundle/demo-shell.js +540 -0
- package/exports/bundle/demo.js +457 -0
- package/exports/bundle/dial.js +1 -0
- package/exports/bundle/dialog.js +149 -0
- package/exports/bundle/divider.js +21 -0
- package/exports/bundle/drawer-button.js +18 -0
- package/exports/bundle/drawer-item.js +39 -0
- package/exports/bundle/drawer-layout.js +96 -0
- package/exports/bundle/drawer.js +56 -0
- package/exports/bundle/dropdown-menu.js +59 -0
- package/exports/bundle/dropdown.js +26 -0
- package/exports/bundle/elements.js +1 -0
- package/exports/bundle/elevation.js +56 -0
- package/exports/bundle/hour-field.js +1 -0
- package/exports/bundle/icon-button.js +13 -0
- package/exports/bundle/icon-set.js +5 -0
- package/exports/bundle/icon.js +16 -0
- package/exports/bundle/index-3c006227.js +1 -0
- package/exports/bundle/index.html +590 -0
- package/exports/bundle/input.js +6 -0
- package/exports/bundle/it-d4d177bf.js +1 -0
- package/exports/bundle/list-item.js +43 -0
- package/exports/bundle/list.js +1 -0
- package/exports/bundle/menu.js +13 -0
- package/exports/bundle/menu2.js +1 -0
- package/exports/bundle/minute-field.js +5 -0
- package/exports/bundle/pages.js +43 -0
- package/exports/bundle/pane.js +96 -0
- package/exports/bundle/property-58e28172.js +11 -0
- package/exports/bundle/query-73dacde5.js +1 -0
- package/exports/bundle/rail.js +58 -0
- package/exports/bundle/root.js +8 -0
- package/exports/bundle/scroll-mixin.js +1 -0
- package/exports/bundle/section.js +11 -0
- package/exports/bundle/section2.js +25 -0
- package/exports/bundle/select-mixin.js +1 -0
- package/exports/bundle/selector-mixin.js +1 -0
- package/exports/bundle/selector.js +31 -0
- package/exports/bundle/supporting-pane.js +47 -0
- package/exports/bundle/tab.js +22 -0
- package/exports/bundle/tabs.js +51 -0
- package/exports/bundle/text-field.js +10 -0
- package/exports/bundle/theme.js +1 -0
- package/exports/bundle/themes/default/colors.module.css +180 -0
- package/exports/bundle/themes/default/missing/motion.css +4 -0
- package/exports/bundle/themes/default/missing/shape.css +13 -0
- package/exports/bundle/themes/default/missing/theme.dark.css +5 -0
- package/exports/bundle/themes/default/missing/theme.light.css +5 -0
- package/exports/bundle/themes/default/missing/tokens.css +9 -0
- package/exports/bundle/themes/default/theme.css +10 -0
- package/exports/bundle/themes/default/theme.dark.css +33 -0
- package/exports/bundle/themes/default/theme.light.css +33 -0
- package/exports/bundle/themes/default/tokens.css +256 -0
- package/exports/bundle/themes/default/typography.module.css +150 -0
- package/exports/bundle/time-picker.js +21 -0
- package/exports/bundle/title.js +1 -0
- package/exports/bundle/toggle-button.js +4 -0
- package/exports/bundle/toggle.js +5 -0
- package/exports/bundle/top-app-bar-e6e33a9e.js +114 -0
- package/exports/bundle/top-app-bar.js +1 -0
- package/exports/bundle/types.js +1 -0
- package/exports/bundle/typography.js +156 -0
- package/exports/button.js +227 -0
- package/exports/card/card.d.ts +13 -0
- package/exports/card.js +187 -0
- package/exports/code.js +77 -0
- package/exports/demo-elements.d.ts +9 -0
- package/exports/demo-elements.js +10 -0
- package/exports/demo-icons.js +48 -0
- package/exports/demo-shell.js +648 -0
- package/exports/demo.js +524 -0
- package/exports/dial.js +1 -0
- package/exports/dialog.js +256 -0
- package/exports/divider/divider.d.ts +17 -0
- package/exports/divider.js +54 -0
- package/exports/drawer/drawer-button.d.ts +9 -0
- package/exports/drawer/drawer-layout.d.ts +19 -0
- package/exports/drawer/drawer.d.ts +13 -0
- package/exports/drawer-button.js +83 -0
- package/exports/drawer-item.js +69 -0
- package/exports/drawer-layout.js +209 -0
- package/exports/drawer.js +140 -0
- package/exports/dropdown-menu.js +172 -0
- package/exports/dropdown.js +68 -0
- package/exports/elements.d.ts +63 -0
- package/exports/elements.js +41 -0
- package/exports/elevation/elevation.d.ts +11 -0
- package/exports/elevation.js +97 -0
- package/exports/hour-field.js +1 -0
- package/exports/icon-button.js +59 -0
- package/exports/icon-set.js +52 -0
- package/exports/icon.js +103 -0
- package/exports/input.js +36 -0
- package/exports/list/list.d.ts +1 -0
- package/exports/list-item.js +127 -0
- package/exports/list.js +1 -0
- package/exports/menu.js +68 -0
- package/exports/menu2.js +1 -0
- package/exports/minute-field.js +36 -0
- package/exports/mixins/scroll-mixin.d.ts +13 -0
- package/exports/mixins/select-mixin.d.ts +32 -0
- package/exports/mixins/selector-mixin.d.ts +8 -0
- package/exports/pages.js +88 -0
- package/exports/pane/pane.d.ts +14 -0
- package/exports/pane.js +182 -0
- package/exports/rail/rail.d.ts +9 -0
- package/exports/rail.js +124 -0
- package/exports/root.js +39 -0
- package/exports/scroll-mixin.js +36 -0
- package/exports/section.js +54 -0
- package/exports/section2.js +58 -0
- package/exports/select-mixin.js +139 -0
- package/exports/selector-mixin.js +43 -0
- package/exports/selector.js +63 -0
- package/exports/supporting-pane/supporting-pane.d.ts +12 -0
- package/exports/supporting-pane.js +133 -0
- package/exports/tab.js +47 -0
- package/exports/tabs/menu.d.ts +1 -0
- package/exports/tabs/tab.d.ts +4 -0
- package/exports/tabs/tabs.d.ts +5 -0
- package/exports/tabs.js +80 -0
- package/exports/text-field.js +88 -0
- package/exports/theme/theme.d.ts +15 -0
- package/exports/theme.js +123 -0
- package/exports/themes/default/colors.module.css +180 -0
- package/exports/themes/default/missing/motion.css +4 -0
- package/exports/themes/default/missing/shape.css +13 -0
- package/exports/themes/default/missing/theme.dark.css +5 -0
- package/exports/themes/default/missing/theme.light.css +5 -0
- package/exports/themes/default/missing/tokens.css +9 -0
- package/exports/themes/default/theme.css +10 -0
- package/exports/themes/default/theme.dark.css +33 -0
- package/exports/themes/default/theme.light.css +33 -0
- package/exports/themes/default/tokens.css +256 -0
- package/exports/themes/default/typography.module.css +150 -0
- package/exports/time-picker/dial.d.ts +1 -0
- package/exports/time-picker/hour-field.d.ts +1 -0
- package/exports/time-picker.js +52 -0
- package/exports/title.js +1 -0
- package/exports/toggle/toggle-button.d.ts +13 -0
- package/exports/toggle-button.js +63 -0
- package/exports/toggle.js +78 -0
- package/exports/top-app-bar.js +143 -0
- package/exports/tslib.es6-d3ba6528.js +57 -0
- package/exports/types.d.ts +18 -0
- package/exports/types.js +1 -0
- package/exports/typography/title.d.ts +1 -0
- package/exports/typography.js +206 -0
- package/package.json +256 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{_ as t,a as e,e as a}from"./custom-element-c2e883ba.js";import{j as l,v as s,D as m}from"./property-58e28172.js";let o=(()=>{let o,r,i=[a("custom-time-picker-minute-field")],n=[],c=m;return class extends c{static{r=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;t(null,o={value:r},i,{kind:"class",name:r.name,metadata:e},null,n),r=o.value,e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static styles=[l`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
`];render(){return s``}static{e(r,n)}},r})();export{o as TimePickerMinuteField};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{j as e,v as t}from"./property-58e28172.js";import{SelectBase as s}from"./select-mixin.js";class CustomPages extends s{async connectedCallback(){super.connectedCallback&&await super.connectedCallback(),this.slotchange=this.slotchange.bind(this),this.shadowRoot.querySelector("slot").addEventListener("slotchange",this.slotchange),this.slotchange(),this.selected=this.defaultSelected}isEvenNumber(e){return Boolean(e%2==0)}slotchange(){let e=0;for(const t of this.slotted.assignedNodes())t&&1===t.nodeType&&(t.style.zIndex=99-e,this.isEvenNumber(e++)?t.classList.add("animate-down"):t.classList.add("animate-up"),this.dispatchEvent(new CustomEvent("child-change",{detail:t})))}static styles=[e`
|
|
2
|
+
:host {
|
|
3
|
+
flex: 1;
|
|
4
|
+
position: relative;
|
|
5
|
+
--primary-background-color: #eceff1;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
::slotted(*) {
|
|
11
|
+
display: flex;
|
|
12
|
+
position: absolute;
|
|
13
|
+
opacity: 0;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
transition: var(--md-sys-motion-easing-emphasized-accelerate) 200ms opacity,
|
|
20
|
+
var(--md-sys-motion-easing-emphasized-accelerate) 200ms transform;
|
|
21
|
+
/*transform: scale(0.1);*/
|
|
22
|
+
transform-origin: left;
|
|
23
|
+
}
|
|
24
|
+
::slotted(.animate-up) {
|
|
25
|
+
transform: translateY(-120%);
|
|
26
|
+
}
|
|
27
|
+
::slotted(.animate-down) {
|
|
28
|
+
transform: translateY(120%);
|
|
29
|
+
}
|
|
30
|
+
::slotted(.custom-selected) {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
pointer-events: auto;
|
|
33
|
+
transform: translateY(0);
|
|
34
|
+
transition: var(--md-sys-motion-easing-emphasized-decelerate) 500ms width,
|
|
35
|
+
var(--md-sys-motion-easing-emphasized-decelerate) 500ms transform;
|
|
36
|
+
max-height: 100%;
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
}
|
|
39
|
+
`];render(){return t`
|
|
40
|
+
<div class="wrapper">
|
|
41
|
+
<slot></slot>
|
|
42
|
+
</div>
|
|
43
|
+
`}}customElements.define("custom-pages",CustomPages);export{CustomPages};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import{_ as e,a as t,e as s}from"./custom-element-c2e883ba.js";import{e as o,v as a,D as i}from"./property-58e28172.js";import"./elevation.js";import"./button.js";import"./icon.js";import"./index-3c006227.js";let r=(()=>{let r,n,c,l,m,h,d,p,g=[s("custom-pane")],u=[],f=i,y=[],_=[],v=[],b=[],x=[],w=[],k=[],j=[],z=[],S=[],B=[],P=[];return class extends f{static{n=this}static{const s="function"==typeof Symbol&&Symbol.metadata?Object.create(f[Symbol.metadata]??null):void 0;c=[o({type:Boolean,reflect:!0})],l=[o({type:Boolean,reflect:!0})],m=[o({type:String,reflect:!0})],h=[o({type:Boolean,reflect:!0})],d=[o({type:Boolean,reflect:!0})],p=[o({type:String})],e(this,null,c,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:e=>"open"in e,get:e=>e.open,set:(e,t)=>{e.open=t}},metadata:s},y,_),e(this,null,l,{kind:"accessor",name:"mobile",static:!1,private:!1,access:{has:e=>"mobile"in e,get:e=>e.mobile,set:(e,t)=>{e.mobile=t}},metadata:s},v,b),e(this,null,m,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:s},x,w),e(this,null,h,{kind:"accessor",name:"left",static:!1,private:!1,access:{has:e=>"left"in e,get:e=>e.left,set:(e,t)=>{e.left=t}},metadata:s},k,j),e(this,null,d,{kind:"accessor",name:"right",static:!1,private:!1,access:{has:e=>"right"in e,get:e=>e.right,set:(e,t)=>{e.right=t}},metadata:s},z,S),e(this,null,p,{kind:"accessor",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:s},B,P),e(null,r={value:n},g,{kind:"class",name:n.name,metadata:s},null,u),n=r.value,s&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),t(n,u)}#e=t(this,y,!1);get open(){return this.#e}set open(e){this.#e=e}#t=(t(this,_),t(this,v,!1));get mobile(){return this.#t}set mobile(e){this.#t=e}#s=(t(this,b),t(this,x,void 0));get type(){return this.#s}set type(e){this.#s=e}#o=(t(this,w),t(this,k,!0));get left(){return this.#o}set left(e){this.#o=e}#a=(t(this,j),t(this,z,!1));get right(){return this.#a}set right(e){this.#a=e}#i=(t(this,S),t(this,B,void 0));get id(){return this.#i}set id(e){this.#i=e}closePane(e){e.stopPropagation(),this.open=!1,document.dispatchEvent(new CustomEvent("custom-pane-close",{detail:this.id||""+(this.left?"left":"right")}))}render(){return a`<style>
|
|
2
|
+
:host {
|
|
3
|
+
--custom-pane-width: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
height: 100%;
|
|
7
|
+
background: var(--md-sys-color-surface);
|
|
8
|
+
color: var(--md-sys-color-on-surface);
|
|
9
|
+
position: relative;
|
|
10
|
+
/* border-radius: 12px; */
|
|
11
|
+
|
|
12
|
+
--md-elevation-level: 0;
|
|
13
|
+
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
opacity: 0;
|
|
16
|
+
width: 100%;
|
|
17
|
+
max-width: var(--custom-pane-width);
|
|
18
|
+
transition: var(--md-sys-motion-easing-emphasized-accelerate) 200ms opacity,
|
|
19
|
+
var(--md-sys-motion-easing-emphasized-accelerate) 200ms transform;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host([left]) {
|
|
23
|
+
border-radius: var(--md-sys-shape-corner-large-end);
|
|
24
|
+
transform: translateX(-100%);
|
|
25
|
+
z-index: 1002;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([right]) {
|
|
29
|
+
border-radius: var(--md-sys-shape-corner-large-start);
|
|
30
|
+
transform: translateX(100%);
|
|
31
|
+
z-index: 1001;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([mobile]) {
|
|
35
|
+
inset: 0;
|
|
36
|
+
position: fixed;
|
|
37
|
+
z-index: 1001;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([type='modal']) {
|
|
41
|
+
--md-elevation-level: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([open]) {
|
|
45
|
+
transform: translateX(0);
|
|
46
|
+
opacity: 1;
|
|
47
|
+
pointer-events: auto;
|
|
48
|
+
transition: var(--md-sys-motion-easing-emphasized-decelerate) 500ms opacity,
|
|
49
|
+
var(--md-sys-motion-easing-emphasized-decelerate) 500ms transform;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([open]) {
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([open][mobile]) {
|
|
57
|
+
position: fixed;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
aside {
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.content {
|
|
66
|
+
height: calc(100% - 54px);
|
|
67
|
+
width: 100%;
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.footer {
|
|
72
|
+
height: 54px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([right]) custom-button {
|
|
76
|
+
transform: rotateZ(180deg);
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
79
|
+
<custom-elevation></custom-elevation>
|
|
80
|
+
<aside>
|
|
81
|
+
<slot name="header">
|
|
82
|
+
<flex-row center>
|
|
83
|
+
<slot name="headline"></slot>
|
|
84
|
+
<flex-it></flex-it>
|
|
85
|
+
<custom-button @click=${e=>this.closePane(e)} .id=${this.id}>
|
|
86
|
+
<custom-icon slot="icon">menu_open</custom-icon>
|
|
87
|
+
</custom-button>
|
|
88
|
+
</flex-row>
|
|
89
|
+
</slot>
|
|
90
|
+
<flex-column class="content">
|
|
91
|
+
<slot name="content"></slot>
|
|
92
|
+
</flex-column>
|
|
93
|
+
<flex-row class="footer">
|
|
94
|
+
<slot name="footer"></slot>
|
|
95
|
+
</flex-row>
|
|
96
|
+
</aside> `}constructor(){super(...arguments),t(this,P)}},n})();export{r as CustomPane};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t=globalThis,e=t.trustedTypes,s=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,i="$lit$",r=`lit$${(Math.random()+"").slice(9)}$`,n="?"+r,o=`<${n}>`,h=document,l=()=>h.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,c="[ \t\n\f\r]",d=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,$=/>/g,p=RegExp(`>|${c}(?:([^\\s"'>=/]+)(${c}*=${c}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),_=/'/g,A=/"/g,g=/^(?:script|style|textarea|title)$/i,v=(t,...e)=>({_$litType$:1,strings:t,values:e}),m=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),f=new WeakMap,S=h.createTreeWalker(h,129);function x(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(e):e}const T=(t,e)=>{const s=t.length-1,n=[];let h,l=2===e?"<svg>":"",a=d;for(let e=0;e<s;e++){const s=t[e];let u,c,v=-1,m=0;for(;m<s.length&&(a.lastIndex=m,c=a.exec(s),null!==c);)m=a.lastIndex,a===d?"!--"===c[1]?a=b:void 0!==c[1]?a=$:void 0!==c[2]?(g.test(c[2])&&(h=RegExp("</"+c[2],"g")),a=p):void 0!==c[3]&&(a=p):a===p?">"===c[0]?(a=h??d,v=-1):void 0===c[1]?v=-2:(v=a.lastIndex-c[2].length,u=c[1],a=void 0===c[3]?p:'"'===c[3]?A:_):a===A||a===_?a=p:a===b||a===$?a=d:(a=p,h=void 0);const y=a===p&&t[e+1].startsWith("/>")?" ":"";l+=a===d?s+o:v>=0?(n.push(u),s.slice(0,v)+i+s.slice(v)+r+y):s+r+(-2===v?e:y)}return[x(t,l+(t[s]||"<?>")+(2===e?"</svg>":"")),n]};class N{constructor({strings:t,_$litType$:s},o){let h;this.parts=[];let a=0,u=0;const c=t.length-1,d=this.parts,[b,$]=T(t,s);if(this.el=N.createElement(b,o),S.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(h=S.nextNode())&&d.length<c;){if(1===h.nodeType){if(h.hasAttributes())for(const t of h.getAttributeNames())if(t.endsWith(i)){const e=$[u++],s=h.getAttribute(t).split(r),i=/([.?@])?(.*)/.exec(e);d.push({type:1,index:a,name:i[2],strings:s,ctor:"."===i[1]?M:"?"===i[1]?E:"@"===i[1]?I:R}),h.removeAttribute(t)}else t.startsWith(r)&&(d.push({type:6,index:a}),h.removeAttribute(t));if(g.test(h.tagName)){const t=h.textContent.split(r),s=t.length-1;if(s>0){h.textContent=e?e.emptyScript:"";for(let e=0;e<s;e++)h.append(t[e],l()),S.nextNode(),d.push({type:2,index:++a});h.append(t[s],l())}}}else if(8===h.nodeType)if(h.data===n)d.push({type:2,index:a});else{let t=-1;for(;-1!==(t=h.data.indexOf(r,t+1));)d.push({type:7,index:a}),t+=r.length-1}a++}}static createElement(t,e){const s=h.createElement("template");return s.innerHTML=t,s}}function H(t,e,s=t,i){if(e===m)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=a(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=H(t,r._$AS(t,e.values),r,i)),e}class C{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??h).importNode(e,!0);S.currentNode=i;let r=S.nextNode(),n=0,o=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new w(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new U(r,this,t)),this._$AV.push(e),l=s[++o]}n!==l?.index&&(r=S.nextNode(),n++)}return S.currentNode=h,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class w{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=H(this,t,e),a(t)?t===y||null==t||""===t?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==m&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>u(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==y&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(h.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(x(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new C(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=f.get(t.strings);return void 0===e&&f.set(t.strings,e=new N(t)),e}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new w(this.S(l()),this.S(l()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=y}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=H(this,t,e,0),n=!a(t)||t!==this._$AH&&t!==m,n&&(this._$AH=t);else{const i=t;let o,h;for(t=r[0],o=0;o<r.length-1;o++)h=H(this,i[s+o],e,o),h===m&&(h=this._$AH[o]),n||=!a(h)||h!==this._$AH[o],h===y?t=y:t!==y&&(t+=(h??"")+r[o+1]),this._$AH[o]=h}n&&!i&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class M extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class E extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class I extends R{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=H(this,t,e,0)??y)===m)return;const s=this._$AH,i=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==y&&(s===y||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){H(this,t)}}const k=t.litHtmlPolyfillSupport;k?.(N,w),(t.litHtmlVersions??=[]).push("3.1.2");const W=globalThis,B=W.ShadowRoot&&(void 0===W.ShadyCSS||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,P=Symbol(),j=new WeakMap;
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2019 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/class O{constructor(t,e,s){if(this._$cssResult$=!0,s!==P)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=j.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&j.set(e,t))}return t}toString(){return this.cssText}}const L=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new O(s,t,P)};Symbol.metadata??=Symbol("metadata");class D extends HTMLElement{static get observedAttributes(){return this[Symbol.metadata]?.observedAttributes?.values()??[]}attributeChangedCallback(t,e,s){this[t]=s}constructor(){super(),this.renderedOnce=!1,this.rendered=new Promise((t=>{this.renderResolve=t})),this.attachShadow({mode:"open"});const t=customElements.get(this.localName);this.shadowRoot.adoptedStyleSheets=t.styles?t.styles.map((t=>t.styleSheet??t)):[],this.requestRender()}render(){return v`<slot></slot>`}requestRender(){((t,e,s)=>{const i=e;let r=i._$litPart$;if(void 0===r){const t=null;i._$litPart$=r=new w(e.insertBefore(l(),t),t,void 0,{})}r._$AI(t)})(this.render(),this.shadowRoot),this.renderedOnce||(this.renderResolve(!0),this.renderedOnce=!0,this.firstRender&&this.firstRender())}}globalThis.pubsub=globalThis.pubsub||new class{subscribers={};verbose;constructor(t){this.verbose=t}_handleContext(t,e){return void 0===e&&(e=t),e}hasSubscribers(t){return!!this.subscribers[t]}subscribe(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[],value:void 0}),s=this._handleContext(e,s),this.subscribers[t].handlers.push(e.bind(s))}unsubscribe(t,e,s){if(!this.hasSubscribers(t))return;s=this._handleContext(e,s);const i=this.subscribers[t].handlers.indexOf(e.bind(s));this.subscribers[t].handlers.splice(i),0===this.subscribers[t].handlers.length&&delete this.subscribers[t]}publish(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[]});const i=this.subscribers[t]?.value;if(this.verbose||s||i!==e){this.subscribers[t].value=e;for(const s of this.subscribers[t].handlers)s(e,i)}}publishVerbose(t,e){this.publish(t,e,!0)}once(t){return new Promise((e=>{const s=i=>{e(i),this.unsubscribe(t,s)};this.subscribe(t,s)}))}};const V={type:String,reflect:!1,renders:!0,batchDelay:50,temporaryRender:10},q=(t,e)=>{let s=t;return e===Boolean?s=Boolean("true"===t):e===Number?s=Number(t):e===Uint8Array?s=new Uint8Array(t.split(",")):e!==Array&&e!==Object&&e!==WeakMap&&e!==Map&&e!==Uint8Array||(s=JSON.parse(t),e===Map&&(s=new Map(t)),e===WeakMap&&(s=new WeakMap(t))),s},z=t=>{t={...V,...t};let e=0;return function(s,{kind:i,name:r,addInitializer:n,access:o,metadata:h}){const{type:l,reflect:a,attribute:u,renders:c,batches:d,batchDelay:b,consumer:$,provider:p,temporaryRender:_}=t,A=String(r),g=u&&"string"==typeof u?u:A,v=l===Boolean;if(n((async function(){"accessor"!==i&&console.warn(`${this.localName}: @property(${t}) ${A} ${i} is not supported`),u&&(h||(h={}),h.observedAttributes||(h.observedAttributes=new Map),h.observedAttributes.set(A,g)),$&&globalThis.pubsub.subscribe(r,(async t=>{this[r]=t}))})),"accessor"===i)return{get(){return m.call(this)},set(t){return y.call(this,t)},init(t){return this.hasAttribute(g)&&(t=v?this.hasAttribute(g):q(this.getAttribute(g),l)),void 0!==t&&y.call(this,t),$&&globalThis.pubsub.subscribers?.[r]?.value&&y.call(this,globalThis.pubsub.subscribers[r].value),this[r]}};function m(){const t=a?v?this.hasAttribute(g):q(this.getAttribute(g),l):this[`__${A}`]?this[`__${A}`]:this[`_${A}`];return $&&!this[`__${A}`]&&globalThis.pubsub.subscribers?.[A]?.value?(t!==globalThis.pubsub.subscribers[r].value&&y.call(this,globalThis.pubsub.subscribers[r].value),globalThis.pubsub.subscribers[r].value):t}async function y(t){if(p&&globalThis.pubsub.publish(r,t),this[`_${A}`]!==t){this.willChange&&(this[`__${A}`]=await this.willChange(r,t)),a?v?t||this[`__${A}`]?this.setAttribute(g,""):this.removeAttribute(g):t||this[`__${A}`]?this.setAttribute(g,((t,e)=>{let s=e;if(t===Boolean||t===Number||t===Uint8Array)return e.toString();if(t===Array||t===Object||t===WeakMap||t===Map||t===Uint8Array){let i;t!==Map&&t!==WeakMap||(i=Object(e).entries()),s=JSON.stringify(i)}return s})(l,this[`__${A}`]??t)):this.removeAttribute(g):this[`_${A}`]=t;const s=()=>{e=0,this.requestRender&&c&&this.requestRender(),this.onChange&&this.onChange(r,this[`__${A}`]??t)};d?(e===_&&s(),this[`_${A}_timeout`]&&clearTimeout(this[`_${A}_timeout`]),this[`_${A}_timeout`]=setTimeout(s,b)):s()}}}};export{D,z as e,L as j,v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=t=>function(e,{kind:o,name:r,access:n,addInitializer:s}){return"accessor"!==o&&s((function(){console.warn(`${this.localName}: @query(${t}) ${String(r)} ${o} is not supported`)})),{get(){return this.shadowRoot?this.shadowRoot.querySelector(t):this.querySelector(t)}}};export{t};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{_ as t,a as e,e as s}from"./custom-element-c2e883ba.js";import{e as o,v as a,D as i}from"./property-58e28172.js";import"./pane.js";import"./elevation.js";import"./button.js";import"./icon.js";import"./index-3c006227.js";let l=(()=>{let l,r,n,c,m,p,h=[s("custom-rail")],d=[],y=i,g=[],u=[],b=[],f=[],_=[],v=[],x=[],j=[];return class extends y{static{r=this}static{const s="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;n=[o({type:Boolean,reflect:!0})],c=[o({type:Boolean,reflect:!0})],m=[o({type:String,reflect:!0})],p=[o({type:Boolean})],t(this,null,n,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:t=>"open"in t,get:t=>t.open,set:(t,e)=>{t.open=e}},metadata:s},g,u),t(this,null,c,{kind:"accessor",name:"mobile",static:!1,private:!1,access:{has:t=>"mobile"in t,get:t=>t.mobile,set:(t,e)=>{t.mobile=e}},metadata:s},b,f),t(this,null,m,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:t=>"type"in t,get:t=>t.type,set:(t,e)=>{t.type=e}},metadata:s},_,v),t(this,null,p,{kind:"accessor",name:"right",static:!1,private:!1,access:{has:t=>"right"in t,get:t=>t.right,set:(t,e)=>{t.right=e}},metadata:s},x,j),t(null,l={value:r},h,{kind:"class",name:r.name,metadata:s},null,d),r=l.value,s&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),e(r,d)}#t=e(this,g,!1);get open(){return this.#t}set open(t){this.#t=t}#e=(e(this,u),e(this,b,!1));get mobile(){return this.#e}set mobile(t){this.#e=t}#s=(e(this,f),e(this,_,void 0));get type(){return this.#s}set type(t){this.#s=t}#o=(e(this,v),e(this,x,!1));get right(){return this.#o}set right(t){this.#o=t}render(){return a`<style>
|
|
2
|
+
:host {
|
|
3
|
+
display: contents;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
custom-pane {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
padding: 12px 24px;
|
|
9
|
+
height: 100%;
|
|
10
|
+
--custom-pane-width: var(--custom-drawer-with, 320px);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
slot[name='headline']::slotted(*) {
|
|
14
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
15
|
+
font-family: var(--md-sys-typescale-title-small-font-family-name);
|
|
16
|
+
font-style: var(--md-sys-typescale-title-small-font-family-style);
|
|
17
|
+
font-weight: var(--md-sys-typescale-title-small-font-weight);
|
|
18
|
+
font-size: var(--md-sys-typescale-title-small-font-size);
|
|
19
|
+
letter-spacing: var(--md-sys-typescale-title-small-tracking);
|
|
20
|
+
line-height: var(--md-sys-typescale-title-small-height);
|
|
21
|
+
text-transform: var(--md-sys-typescale-title-small-text-transform);
|
|
22
|
+
text-decoration: var(--md-sys-typescale-title-small-text-decoration);
|
|
23
|
+
text-transform: capitalize;
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
::slotted([slot='footer']) {
|
|
28
|
+
display: block;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
min-height: 48px;
|
|
31
|
+
border-top: 1px solid rgba(0, 0, 0, 0.14);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
::slotted([slot='content']) {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
height: 100%;
|
|
38
|
+
width: 100%;
|
|
39
|
+
overflow-y: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
::slotted(*) {
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
aside {
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
50
|
+
|
|
51
|
+
<custom-pane .open=${this.open} .mobile=${this.mobile} .type=${this.type}>
|
|
52
|
+
<slot name="header">
|
|
53
|
+
<slot name="headline" slot="headline"></slot>
|
|
54
|
+
<slot name="menu-button" slot="menu-button"></slot>
|
|
55
|
+
</slot>
|
|
56
|
+
<slot name="content" slot="content"></slot>
|
|
57
|
+
<slot name="footer" slot="footer"></slot>
|
|
58
|
+
</custom-pane> `}constructor(){super(...arguments),e(this,j)}},r})();export{l as CustomRail};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{_ as t,a as e,e as a}from"./custom-element-c2e883ba.js";import{j as o,v as s,D as l}from"./property-58e28172.js";import"./theme.js";let m=(()=>{let m,r,n=[a("custom-root")],c=[],i=l;return class extends i{static{r=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;t(null,m={value:r},n,{kind:"class",name:r.name,metadata:e},null,c),r=m.value,e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static styles=[o`
|
|
2
|
+
:host {
|
|
3
|
+
display: contents;
|
|
4
|
+
}
|
|
5
|
+
`];render(){return s`
|
|
6
|
+
<custom-theme></custom-theme>
|
|
7
|
+
<slot></slot>
|
|
8
|
+
`}static{e(r,c)}},r})();export{m as CustomRoot};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const l=l=>class ScrollMixin extends l{set scrolling(l){l?this.setAttribute("scrolling",""):this.removeAttribute("scrolling")}get scrolling(){return this.hasAttribute("scrolling")}scrollElement=this;#l=()=>{this.isScrolling?clearTimeout(this.isScrolling):document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:0!==this.scrollTop}})),this.isScrolling=setTimeout((()=>{this.scrolling=0!==this.scrollTop,document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:this.scrolling}})),this.isScrolling=void 0}),this.scrollTimeout)};async connectedCallback(l={scrollElement:void 0}){super.connectedCallback&&super.connectedCallback(),await this.updateComplete,this.scrollElement=this.shadowRoot.querySelector(l.scrollElement)||this,this.scrollTimeout=100,this.scrollElement.addEventListener("scroll",this.#l)}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.scrollElement.removeEventListener("scroll",this.#l)}};export{l as ScrollMixin};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{_ as e,a as t,e as o}from"./custom-element-c2e883ba.js";import{j as s,v as a,D as l}from"./property-58e28172.js";import"./section2.js";import"./code.js";import"./scroll-mixin.js";import"./elevation.js";let c=(()=>{let c,n,r=[o("demo-section")],i=[],m=l;return class extends m{static{n=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;e(null,c={value:n},r,{kind:"class",name:n.name,metadata:t},null,i),n=c.value,t&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}async connectedCallback(){const e=this.shadowRoot.querySelector("slot").assignedElements();for(const o of e){const e=document.createElement("demo-code");e.code=await(t=o.outerHTML,t.replace(/(\ <\/(?=[^<\/]*$))/g,"<")),o.after(e)}var t}static styles=[s`
|
|
2
|
+
:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
`];render(){return a`
|
|
8
|
+
<custom-section>
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</custom-section>
|
|
11
|
+
`}static{t(n,i)}},n})();export{c as DemoSection};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{_ as e,a as t,e as a}from"./custom-element-c2e883ba.js";import{j as o,v as l,D as n}from"./property-58e28172.js";import{ScrollMixin as s}from"./scroll-mixin.js";import"./elevation.js";let r=(()=>{let r,i,m=[a("custom-section")],c=[],u=s(n);return class extends u{static{i=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;e(null,r={value:i},m,{kind:"class",name:i.name,metadata:t},null,c),i=r.value,t&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static styles=[o`
|
|
2
|
+
:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: baseline;
|
|
6
|
+
margin: 16px;
|
|
7
|
+
position: relative;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
}
|
|
10
|
+
.container {
|
|
11
|
+
align-items: center;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
padding: 12px;
|
|
14
|
+
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
15
|
+
}
|
|
16
|
+
.content {
|
|
17
|
+
max-width: 720px;
|
|
18
|
+
}
|
|
19
|
+
`];render(){return l`
|
|
20
|
+
<flex-column class="container">
|
|
21
|
+
<flex-column class="content">
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</flex-column>
|
|
24
|
+
</flex-column>
|
|
25
|
+
`}static{t(i,c)}},i})();export{r as CustomSection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e}from"./property-58e28172.js";class SelectBase extends e{#e;currentSelected;connectedCallback(){this.selected=this.defaultSelected}get multi(){return this.hasAttribute("multi")}set multi(e){e?this.setAttribute("multi",""):this.removeAttribute("multi")}get defaultSelected(){return this.getAttribute("default-selected")||0}set selected(e){this.#e=e,this.#t()}get selected(){return this.#e}get slotted(){return this.shadowRoot?this.shadowRoot.querySelector("slot"):this}get#s(){const e="assignedNodes"in this.slotted?this.slotted.assignedNodes():this.children,t=[];for(var s=0;s<e.length;s++){const d=e[s];1===d.nodeType&&t.push(d)}return t}get attrForSelected(){return this.getAttribute("attr-for-selected")||"name"}set attrForSelected(e){this.setAttribute("attr-for-selected",e)}attributeChangedCallback(e,t,s){t!==s&&(isNaN(s)||(s=Number(s)),this[e]=s)}select(e){e&&(this.selected=e),this.multi&&this.#t()}next(){const e=this.getIndexFor(this.currentSelected);-1!==e&&e>=0&&this.#s.length>e&&e+1<=this.#s.length-1&&(this.selected=this.#s[e+1])}previous(){const e=this.getIndexFor(this.currentSelected);-1!==e&&e>=0&&this.#s.length>e&&e-1>=0&&(this.selected=this.#s[e-1])}getIndexFor(e){return this.#s.indexOf(e||this.selected)}#d(e,t){e.classList.add("custom-selected"),t&&t!==e&&t.classList.remove("custom-selected"),this.currentSelected=e}#i(e){for(const t of this.#s)e.includes(t.getAttribute(this.attrForSelected))?t.classList.add("custom-selected"):t.classList.remove("custom-selected")}#r(e){for(const t of this.#s)if(t.getAttribute(this.attrForSelected)===e)return this.#d(t,this.currentSelected)}#t(){if(void 0===this.selected)return void(this.currentSelected&&this.currentSelected.classList.remove("custom-selected"));const e=typeof this.selected;if(Array.isArray(this.selected))return this.#i(this.selected);if("object"===e)return this.#d(this.selected,this.currentSelected);if("string"===e)return this.#r(this.selected);const t=this.#s[this.selected];t&&this.#d(t,this.currentSelected)}}function t(e){return SelectBase}export{SelectBase,t as SelectMixin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SelectBase as e}from"./select-mixin.js";import"./property-58e28172.js";class SelectorBase extends e{constructor(){super()}async connectedCallback(){super.connectedCallback&&await super.connectedCallback(),this.slotted.addEventListener("click",this.#e.bind(this))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.slotted.removeEventListener("click",this.#e.bind(this))}#e(e){const t=e.composedPath()[0];if(t.localName===this.localName)return;const s=t.getAttribute(this.attrForSelected)||t;if(this.multi){const e=Array.isArray(this.selected)?this.selected:[],t=e.indexOf(s);-1===t?e.push(s):e.splice(t,1),this.selected=e}else this.selected=s;this.dispatchEvent(new CustomEvent("selected",{detail:s}))}}function t(e){return SelectorBase}export{SelectorBase,t as SelectorMixin};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{_ as e,a as t,e as a}from"./custom-element-c2e883ba.js";import{j as o,v as l}from"./property-58e28172.js";import{SelectorBase as s}from"./selector-mixin.js";import"./select-mixin.js";let r=(()=>{let r,n,c=[a("custom-selector")],i=[],m=s;return class extends m{static{n=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;e(null,r={value:n},c,{kind:"class",name:n.name,metadata:t},null,i),n=r.value,t&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static styles=[o`
|
|
2
|
+
:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
::slotted(.custom-selected:not([non-interactive])) {
|
|
11
|
+
background: var(--md-sys-color-secondary-container);
|
|
12
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
::slotted(*) {
|
|
16
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
17
|
+
font-family: var(--md-sys-typescale-label-large-font-family-name);
|
|
18
|
+
font-style: var(--md-sys-typescale-label-large-font-family-style);
|
|
19
|
+
font-weight: var(--md-sys-typescale-label-large-font-weight);
|
|
20
|
+
font-size: var(--md-sys-typescale-label-large-font-size);
|
|
21
|
+
letter-spacing: var(--md-sys-typescale-label-large-tracking);
|
|
22
|
+
line-height: var(--md-sys-typescale-label-large-height);
|
|
23
|
+
text-transform: var(--md-sys-typescale-label-large-text-transform);
|
|
24
|
+
text-decoration: var(--md-sys-typescale-label-large-text-decoration);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
::slotted(:not(.custom-selected):not([non-interactive]):hover) {
|
|
28
|
+
background: var(--md-sys-color-secondary-container-hover);
|
|
29
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
30
|
+
}
|
|
31
|
+
`];render(){return l`<slot></slot>`}static{t(n,i)}},n})();export{r as CustomSelector};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import{_ as t,a as e,e as s}from"./custom-element-c2e883ba.js";import{e as a,v as o,D as i}from"./property-58e28172.js";import{t as r}from"./query-73dacde5.js";import"./pane.js";import"./elevation.js";import"./button.js";import"./icon.js";import"./index-3c006227.js";let n=(()=>{let n,c,p,l,d,u,h,m=[s("custom-supporting-pane")],g=[],v=i,_=[],f=[],y=[],b=[],x=[],j=[],w=[],k=[],S=[],C=[];return class extends v{static{c=this}static{const s="function"==typeof Symbol&&Symbol.metadata?Object.create(v[Symbol.metadata]??null):void 0;p=[a({type:Boolean,reflect:!0})],l=[a({type:String,reflect:!0})],d=[a({type:Boolean,reflect:!0})],u=[a({type:String})],h=[r(".support")],t(this,null,p,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:t=>"open"in t,get:t=>t.open,set:(t,e)=>{t.open=e}},metadata:s},_,f),t(this,null,l,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:t=>"variant"in t,get:t=>t.variant,set:(t,e)=>{t.variant=e}},metadata:s},y,b),t(this,null,d,{kind:"accessor",name:"left",static:!1,private:!1,access:{has:t=>"left"in t,get:t=>t.left,set:(t,e)=>{t.left=e}},metadata:s},x,j),t(this,null,u,{kind:"accessor",name:"id",static:!1,private:!1,access:{has:t=>"id"in t,get:t=>t.id,set:(t,e)=>{t.id=e}},metadata:s},w,k),t(this,null,h,{kind:"accessor",name:"supporting",static:!1,private:!1,access:{has:t=>"supporting"in t,get:t=>t.supporting,set:(t,e)=>{t.supporting=e}},metadata:s},S,C),t(null,n={value:c},m,{kind:"class",name:c.name,metadata:s},null,g),c=n.value,s&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),e(c,g)}#t=e(this,_,!1);get open(){return this.#t}set open(t){this.#t=t}#e=(e(this,f),e(this,y,"expanded"));get variant(){return this.#e}set variant(t){this.#e=t}#s=(e(this,b),e(this,x,!1));get left(){return this.#s}set left(t){this.#s=t}#a=(e(this,j),e(this,w,void 0));get id(){return this.#a}set id(t){this.#a=t}#o=(e(this,k),e(this,S,void 0));get supporting(){return this.#o}set supporting(t){this.#o=t}onPaneClose({detail:t}){this.id===t&&(this.open=!1)}connectedCallback(){document.addEventListener("custom-pane-close",this.onPaneClose.bind(this)),document.addEventListener("custom-pane-open",(({detail:t})=>{this.id===t&&(this.open=!0)}))}render(){return o`<style>
|
|
2
|
+
:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
height: 100%;
|
|
6
|
+
background: var(--md-sys-color-surface);
|
|
7
|
+
color: var(--md-sys-color-on-surface);
|
|
8
|
+
width: 100%;
|
|
9
|
+
position: relative;
|
|
10
|
+
--supporting-pane-width: 360px;
|
|
11
|
+
}
|
|
12
|
+
.support {
|
|
13
|
+
position: absolute;
|
|
14
|
+
right: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host([left]) {
|
|
18
|
+
left: 0;
|
|
19
|
+
right: none;
|
|
20
|
+
}
|
|
21
|
+
:host([variant='expanded']) .support {
|
|
22
|
+
--custom-pane-width: var(--supporting-pane-width);
|
|
23
|
+
}
|
|
24
|
+
:host([variant='expanded']) {
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([variant='compact']) .support {
|
|
29
|
+
position: absolute;
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
}
|
|
32
|
+
main {
|
|
33
|
+
width: 100%;
|
|
34
|
+
}
|
|
35
|
+
:host([open]) main {
|
|
36
|
+
width: calc(100% - var(--supporting-pane-width));
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
39
|
+
<main>
|
|
40
|
+
<slot></slot>
|
|
41
|
+
</main>
|
|
42
|
+
<custom-pane class="support" ?open=${this.open} ?right=${!this.left} .id=${this.id}>
|
|
43
|
+
<slot name="supporting">
|
|
44
|
+
<slot name="supporting-header" slot="header"></slot>
|
|
45
|
+
<slot name="supporting-content"></slot>
|
|
46
|
+
</slot>
|
|
47
|
+
</custom-pane>`}constructor(){super(...arguments),e(this,C)}},c})();export{n as CustomSupportingPane};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{_ as t,a as e,e as a}from"./custom-element-c2e883ba.js";import{v as o,D as n}from"./property-58e28172.js";let r=(()=>{let r,l,s=[a("custom-tab")],i=[],p=n;return class extends p{static{l=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0;t(null,r={value:l},s,{kind:"class",name:l.name,metadata:a},null,i),l=r.value,a&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e(l,i)}render(){return o`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
height: 40px;
|
|
9
|
+
padding: 0 12px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
width: auto;
|
|
12
|
+
font: var(--_supporting-text-type);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
slot {
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
<slot></slot>
|
|
22
|
+
`}},l})();export{r as CustomTab};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import{_ as r,a as o,e as t}from"./custom-element-c2e883ba.js";import{v as e}from"./property-58e28172.js";import{SelectorBase as a}from"./selector-mixin.js";import"./tab.js";import"./select-mixin.js";let s=(()=>{let s,l,c=[t("custom-tabs")],d=[],m=a;return class extends m{static{l=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;r(null,s={value:l},c,{kind:"class",name:l.name,metadata:t},null,d),l=s.value,t&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t}),o(l,d)}render(){return e`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
--custom-tabs-background: var(---md-sys-color-surface);
|
|
5
|
+
--selected-color: var(--md-sys-color-primary);
|
|
6
|
+
--selected-tab-color: var(--md-sys-color-primary);
|
|
7
|
+
--custom-tabs-shape: var(--md-sys-shape-corner-none);
|
|
8
|
+
--inactive-color: var(--md-sys-color-on-surface-variant);
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
min-height: var(--custom-tabs-height, 64px);
|
|
12
|
+
overflow-x: auto;
|
|
13
|
+
background: var(--custom-tabs-background);
|
|
14
|
+
border-radius: var(--custom-tabs-shape);
|
|
15
|
+
}
|
|
16
|
+
::slotted(*) {
|
|
17
|
+
color: var(--inactive-color);
|
|
18
|
+
}
|
|
19
|
+
::slotted(.custom-selected) {
|
|
20
|
+
color: var(--selected-color);
|
|
21
|
+
border-bottom: 2px solid var(--selected-tab-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([round]) ::slotted(*) {
|
|
25
|
+
gap: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([round]) ::slotted(.custom-selected) {
|
|
29
|
+
--md-sys-color-on-surface: var(--md-sys-color-on-tertiary);
|
|
30
|
+
color: var(--md-sys-color-on-tertiary);
|
|
31
|
+
background: var(--md-sys-color-tertiary);
|
|
32
|
+
border: none;
|
|
33
|
+
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
34
|
+
}
|
|
35
|
+
::-webkit-scrollbar {
|
|
36
|
+
width: 6px;
|
|
37
|
+
border-radius: 12px;
|
|
38
|
+
}
|
|
39
|
+
::-webkit-scrollbar-track {
|
|
40
|
+
background: #f1f1f1;
|
|
41
|
+
}
|
|
42
|
+
::-webkit-scrollbar-thumb {
|
|
43
|
+
background: #888;
|
|
44
|
+
border-radius: 12px;
|
|
45
|
+
}
|
|
46
|
+
::-webkit-scrollbar-thumb:hover {
|
|
47
|
+
background: #555;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
50
|
+
<slot></slot>
|
|
51
|
+
`}},l})();export{s as CustomTabs};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{_ as a,a as t,e}from"./custom-element-c2e883ba.js";import{e as n,j as s,v as i,D as o}from"./property-58e28172.js";import{t as l}from"./query-73dacde5.js";let c=(()=>{let c,r,g,h,d,I,m=[e("text-field")],S=[],_=o,u=[],p=[],b=[],v=[],L=[],y=[],T=[],f=[];return class extends _{static{r=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(_[Symbol.metadata]??null):void 0;g=[l('slot[name="leading-icon"]')],h=[l('slot[name="trailing-icon"]')],d=[n({type:Boolean,reflect:!0,attribute:"has-leading-icon"})],I=[n({type:Boolean,reflect:!0,attribute:"has-trailing-icon"})],a(this,null,g,{kind:"accessor",name:"leadingIconSlot",static:!1,private:!1,access:{has:a=>"leadingIconSlot"in a,get:a=>a.leadingIconSlot,set:(a,t)=>{a.leadingIconSlot=t}},metadata:t},u,p),a(this,null,h,{kind:"accessor",name:"trailingIconSlot",static:!1,private:!1,access:{has:a=>"trailingIconSlot"in a,get:a=>a.trailingIconSlot,set:(a,t)=>{a.trailingIconSlot=t}},metadata:t},b,v),a(this,null,d,{kind:"accessor",name:"hasLeadingIcon",static:!1,private:!1,access:{has:a=>"hasLeadingIcon"in a,get:a=>a.hasLeadingIcon,set:(a,t)=>{a.hasLeadingIcon=t}},metadata:t},L,y),a(this,null,I,{kind:"accessor",name:"hasTrailingIcon",static:!1,private:!1,access:{has:a=>"hasTrailingIcon"in a,get:a=>a.hasTrailingIcon,set:(a,t)=>{a.hasTrailingIcon=t}},metadata:t},T,f),a(null,c={value:r},m,{kind:"class",name:r.name,metadata:t},null,S),r=c.value,t&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}#a=t(this,u,void 0);get leadingIconSlot(){return this.#a}set leadingIconSlot(a){this.#a=a}#t=(t(this,p),t(this,b,void 0));get trailingIconSlot(){return this.#t}set trailingIconSlot(a){this.#t=a}#e=(t(this,v),t(this,L,void 0));get hasLeadingIcon(){return this.#e}set hasLeadingIcon(a){this.#e=a}#n=(t(this,y),t(this,T,void 0));get hasTrailingIcon(){return this.#n}set hasTrailingIcon(a){this.#n=a}#s=(t(this,f),()=>{this.leadingIconSlot.assignedElements.length>0?this.hasLeadingIcon=!0:this.hasLeadingIcon=!1});#i=()=>{this.trailingIconSlot.assignedElements.length>0?this.hasTrailingIcon=!0:this.hasTrailingIcon=!1};connectedCallback(){this.leadingIconSlot.addEventListener("slotchange",this.#s),this.trailingIconSlot.addEventListener("slotchange",this.#i)}static styles=[s`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
.label {
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host([has-leading-icon]) {
|
|
9
|
+
}
|
|
10
|
+
`];render(){return i` <slot name="leading-icon"></slot> `}static{t(r,S)}},r})();export{c as TextField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,a as e,e as a}from"./custom-element-c2e883ba.js";import{e as s,D as o}from"./property-58e28172.js";let r=(()=>{let r,n,i,l,c,g=[a("custom-theme")],d=[],h=o,m=[],u=[],p=[],y=[],b=[],w=[];return class extends h{static{n=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;i=[s({type:Boolean})],l=[s({type:String,attribute:"mobile-trigger"})],c=[s({type:Boolean})],t(this,null,i,{kind:"accessor",name:"loadFont",static:!1,private:!1,access:{has:t=>"loadFont"in t,get:t=>t.loadFont,set:(t,e)=>{t.loadFont=e}},metadata:a},m,u),t(this,null,l,{kind:"accessor",name:"narrowTrigger",static:!1,private:!1,access:{has:t=>"narrowTrigger"in t,get:t=>t.narrowTrigger,set:(t,e)=>{t.narrowTrigger=e}},metadata:a},p,y),t(this,null,c,{kind:"accessor",name:"narrow",static:!1,private:!1,access:{has:t=>"narrow"in t,get:t=>t.narrow,set:(t,e)=>{t.narrow=e}},metadata:a},b,w),t(null,r={value:n},g,{kind:"class",name:n.name,metadata:a},null,d),n=r.value,a&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e(n,d)}#t=e(this,m,!0);get loadFont(){return this.#t}set loadFont(t){this.#t=t}#e=(e(this,u),e(this,p,"(max-width: 860px)"));get narrowTrigger(){return this.#e}set narrowTrigger(t){this.#e=t}#a=(e(this,y),e(this,b,void 0));get narrow(){return this.#a}set narrow(t){this.#a=t}#s(t,e,a){let s=document.createElement("link");if(s.rel=e,s.href=t,a)for(const t of a)s.setAttribute(t,"");document.head.appendChild(s)}#o(){let t="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0&display=swap";return globalThis.symbols&&(t+=`&text=${globalThis.symbols}`),t}constructor(){super();const t=matchMedia("(max-width: 860px)");t.onchange=this.#r,this.#r({matches:t.matches}),this.load("./themes/default/theme.css");const e=document.createElement("style");e.innerHTML="\n html, body {\n inset: 0;\n position: absolute;\n margin: 0;\n background: var(--md-sys-color-background);\n color: var(--md-sys-color-on-background);\n overflow: hidden;\n }",document.head.appendChild(e);const a=!this.hasAttribute("load-symbols")||"false"!==this.getAttribute("load-symbols");(this.loadFont||a)&&this.#s("https://fonts.googleapis.com","preconnect"),this.#s("https://fonts.gstatic.com","preconnect",["crossorigin"]),this.loadFont&&this.#s("https://fonts.googleapis.com/css2?family=Roboto&display=swap","stylesheet"),a&&this.#s(this.#o(),"stylesheet")}#r=(e(this,w),({matches:t})=>{this.narrow=t,document.dispatchEvent(new CustomEvent("custom-theme-narrow",{detail:this.narrow}))});set language(t){this.setAttribute("language",t)}get language(){return this.getAttribute("language")||"css"}async load(t){if("js"===this.language){const e=await import(t);for(const[t,a]of Object.entries(e)){const e=`--${t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}`;document.body.style.setProperty(e,a)}}else if("css"===this.language){const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)}}},n})();export{r as CustomTheme};
|