@covalent/components 6.0.1 → 6.0.3
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/action-ribbon.mjs +9 -7
- package/alert.mjs +13 -11
- package/app-shell.mjs +10 -4
- package/aria-property.mjs +41 -0
- package/base-element.mjs +28 -0
- package/button.mjs +180 -13
- package/card.mjs +3 -3
- package/check-list-item.mjs +92 -14
- package/checkbox.mjs +26 -14
- package/circular-progress.mjs +144 -10
- package/class-map.mjs +62 -0
- package/code-snippet.mjs +6 -5
- package/covalent.mjs +2 -2
- package/covalent.umd.js +3339 -137
- package/dialog.mjs +750 -15
- package/directive-helpers.mjs +11 -0
- package/drawer.mjs +26 -15
- package/empty-state.mjs +4 -4
- package/event-options.mjs +14 -0
- package/form-element.mjs +50 -0
- package/foundation.mjs +152 -0
- package/foundation2.mjs +60 -0
- package/icon-button.mjs +130 -15
- package/icon-check-toggle.mjs +18 -8
- package/icon-radio-toggle.mjs +29 -18
- package/icon.mjs +19 -13
- package/if-defined.mjs +10 -0
- package/inert.esm.mjs +640 -0
- package/linear-progress.mjs +178 -15
- package/list-expansion.mjs +33 -22
- package/list-item.mjs +19 -20
- package/list.mjs +26 -13
- package/menu.mjs +32 -13
- package/mwc-checkbox-base.mjs +198 -0
- package/mwc-checkbox.css.mjs +10 -0
- package/mwc-drawer-base.mjs +335 -0
- package/mwc-icon.mjs +26 -0
- package/mwc-line-ripple-directive.mjs +653 -0
- package/mwc-list-base.mjs +840 -0
- package/mwc-list-item-base.mjs +202 -0
- package/mwc-list-item.css.mjs +17 -0
- package/mwc-menu-base.mjs +1145 -0
- package/mwc-radio-base.mjs +528 -0
- package/mwc-radio.css.mjs +10 -0
- package/mwc-slider.css.mjs +956 -0
- package/mwc-tab-base.mjs +694 -0
- package/mwc-top-app-bar-base.mjs +380 -0
- package/nav-list-item.mjs +28 -20
- package/observer.mjs +32 -0
- package/package.json +9 -2
- package/property.mjs +20 -0
- package/query-assigned-elements.mjs +615 -0
- package/query-assigned-nodes.mjs +17 -0
- package/query.mjs +25 -0
- package/radio-list-item.mjs +93 -12
- package/radio.mjs +28 -15
- package/ripple-handlers.mjs +761 -0
- package/select.mjs +1257 -15
- package/side-sheet.mjs +21 -16
- package/slider-range.mjs +438 -11
- package/slider.mjs +253 -13
- package/snackbar.mjs +456 -15
- package/src/action-ribbon/action-ribbon-base.d.ts +30 -0
- package/src/action-ribbon/action-ribbon-base.d.ts.map +1 -0
- package/src/action-ribbon/action-ribbon.d.ts +15 -0
- package/src/action-ribbon/action-ribbon.d.ts.map +1 -0
- package/src/alert/alert-base.d.ts +31 -0
- package/src/alert/alert-base.d.ts.map +1 -0
- package/src/alert/alert.d.ts +15 -0
- package/src/alert/alert.d.ts.map +1 -0
- package/src/app-shell/app-shell.d.ts +26 -0
- package/src/app-shell/app-shell.d.ts.map +1 -0
- package/src/button/button.d.ts +10 -0
- package/src/button/button.d.ts.map +1 -0
- package/src/card/card-base.d.ts +25 -0
- package/src/card/card-base.d.ts.map +1 -0
- package/src/card/card.d.ts +10 -0
- package/src/card/card.d.ts.map +1 -0
- package/src/checkbox/checkbox.d.ts +10 -0
- package/src/checkbox/checkbox.d.ts.map +1 -0
- package/src/chips/chip-base.d.ts +52 -0
- package/src/chips/chip-base.d.ts.map +1 -0
- package/src/chips/chip-set-base.d.ts +33 -0
- package/src/chips/chip-set-base.d.ts.map +1 -0
- package/src/chips/chip-set.d.ts +15 -0
- package/src/chips/chip-set.d.ts.map +1 -0
- package/src/chips/chip.d.ts +15 -0
- package/src/chips/chip.d.ts.map +1 -0
- package/src/chips/foundation.d.ts +60 -0
- package/src/chips/foundation.d.ts.map +1 -0
- package/src/circular-progress/circular-progress.d.ts +10 -0
- package/src/circular-progress/circular-progress.d.ts.map +1 -0
- package/src/code-snippet/code-snippet.d.ts +21 -0
- package/src/code-snippet/code-snippet.d.ts.map +1 -0
- package/src/dialog/dialog.d.ts +10 -0
- package/src/dialog/dialog.d.ts.map +1 -0
- package/src/drawer/drawer.d.ts +10 -0
- package/src/drawer/drawer.d.ts.map +1 -0
- package/src/empty-state/empty-state.d.ts +16 -0
- package/src/empty-state/empty-state.d.ts.map +1 -0
- package/src/formfield/formfield.d.ts +10 -0
- package/src/formfield/formfield.d.ts.map +1 -0
- package/src/icon/icon.d.ts +10 -0
- package/src/icon/icon.d.ts.map +1 -0
- package/src/icon-button/icon-button.d.ts +10 -0
- package/src/icon-button/icon-button.d.ts.map +1 -0
- package/src/icon-checkbox/icon-check-toggle.d.ts +15 -0
- package/src/icon-checkbox/icon-check-toggle.d.ts.map +1 -0
- package/src/icon-radio/icon-radio-toggle.d.ts +14 -0
- package/src/icon-radio/icon-radio-toggle.d.ts.map +1 -0
- package/src/index.d.ts +3 -0
- package/src/index.d.ts.map +1 -0
- package/src/linear-progress/linear-progress.d.ts +10 -0
- package/src/linear-progress/linear-progress.d.ts.map +1 -0
- package/src/list/check-list-item.d.ts +10 -0
- package/src/list/check-list-item.d.ts.map +1 -0
- package/src/list/list-expansion.d.ts +18 -0
- package/src/list/list-expansion.d.ts.map +1 -0
- package/src/list/list-item.d.ts +12 -0
- package/src/list/list-item.d.ts.map +1 -0
- package/src/list/list.d.ts +10 -0
- package/src/list/list.d.ts.map +1 -0
- package/src/list/nav-list-item.d.ts +12 -0
- package/src/list/nav-list-item.d.ts.map +1 -0
- package/src/list/radio-list-item.d.ts +10 -0
- package/src/list/radio-list-item.d.ts.map +1 -0
- package/src/menu/menu.d.ts +10 -0
- package/src/menu/menu.d.ts.map +1 -0
- package/src/radio/radio.d.ts +10 -0
- package/src/radio/radio.d.ts.map +1 -0
- package/src/select/select.d.ts +10 -0
- package/src/select/select.d.ts.map +1 -0
- package/src/side-sheet/side-sheet.d.ts +18 -0
- package/src/side-sheet/side-sheet.d.ts.map +1 -0
- package/src/slider/slider-range.d.ts +10 -0
- package/src/slider/slider-range.d.ts.map +1 -0
- package/src/slider/slider.d.ts +10 -0
- package/src/slider/slider.d.ts.map +1 -0
- package/src/snackbar/snackbar.d.ts +10 -0
- package/src/snackbar/snackbar.d.ts.map +1 -0
- package/src/status-header/status-header-base.d.ts +9 -0
- package/src/status-header/status-header-base.d.ts.map +1 -0
- package/src/status-header/status-header-item.d.ts +17 -0
- package/src/status-header/status-header-item.d.ts.map +1 -0
- package/src/status-header/status-header.d.ts +15 -0
- package/src/status-header/status-header.d.ts.map +1 -0
- package/src/switch/switch.d.ts +10 -0
- package/src/switch/switch.d.ts.map +1 -0
- package/src/tab/tab-bar.d.ts +10 -0
- package/src/tab/tab-bar.d.ts.map +1 -0
- package/src/tab/tab.d.ts +10 -0
- package/src/tab/tab.d.ts.map +1 -0
- package/src/text-lockup/text-lockup.d.ts +17 -0
- package/src/text-lockup/text-lockup.d.ts.map +1 -0
- package/src/textarea/textarea.d.ts +10 -0
- package/src/textarea/textarea.d.ts.map +1 -0
- package/src/textfield/textfield.d.ts +10 -0
- package/src/textfield/textfield.d.ts.map +1 -0
- package/src/toolbar/toolbar.d.ts +10 -0
- package/src/toolbar/toolbar.d.ts.map +1 -0
- package/src/tooltip/tooltip.d.ts +27 -0
- package/src/tooltip/tooltip.d.ts.map +1 -0
- package/src/top-app-bar/top-app-bar-fixed.d.ts +10 -0
- package/src/top-app-bar/top-app-bar-fixed.d.ts.map +1 -0
- package/src/top-app-bar/top-app-bar.d.ts +10 -0
- package/src/top-app-bar/top-app-bar.d.ts.map +1 -0
- package/src/tree-list/tree-list-item.d.ts +16 -0
- package/src/tree-list/tree-list-item.d.ts.map +1 -0
- package/src/tree-list/tree-list.d.ts +11 -0
- package/src/tree-list/tree-list.d.ts.map +1 -0
- package/src/typography/typography.d.ts +12 -0
- package/src/typography/typography.d.ts.map +1 -0
- package/state.mjs +12 -0
- package/status-header-item.mjs +16 -16
- package/status-header.mjs +5 -5
- package/style-map.mjs +40 -0
- package/switch.mjs +531 -15
- package/tab-bar.mjs +1030 -13
- package/tab.mjs +29 -15
- package/text-lockup.mjs +8 -8
- package/textarea.mjs +111 -16
- package/textfield.mjs +34 -18
- package/textfield2.mjs +929 -2
- package/toolbar.mjs +8 -3
- package/tooltip.mjs +1153 -96
- package/top-app-bar-fixed.mjs +78 -18
- package/top-app-bar.mjs +19 -15
- package/top-app-bar2.mjs +9 -2
- package/tree-list-item.mjs +3 -3
- package/tree-list.mjs +6 -7
- package/tslib.es6.mjs +82 -0
- package/typography.mjs +8 -8
- package/utils.mjs +52 -0
@@ -0,0 +1,198 @@
|
|
1
|
+
import { b as t } from "./tslib.es6.mjs";
|
2
|
+
import { R as u, e as k } from "./ripple-handlers.mjs";
|
3
|
+
import { a as r } from "./aria-property.mjs";
|
4
|
+
import { F as b } from "./form-element.mjs";
|
5
|
+
import { y as l } from "./query-assigned-elements.mjs";
|
6
|
+
import { e as d } from "./property.mjs";
|
7
|
+
import { t as c } from "./state.mjs";
|
8
|
+
import { e as v } from "./event-options.mjs";
|
9
|
+
import { i as h } from "./query.mjs";
|
10
|
+
import { o as f } from "./class-map.mjs";
|
11
|
+
import { l as n } from "./if-defined.mjs";
|
12
|
+
/**
|
13
|
+
* @license
|
14
|
+
* Copyright 2019 Google LLC
|
15
|
+
* SPDX-License-Identifier: Apache-2.0
|
16
|
+
*/
|
17
|
+
class i extends b {
|
18
|
+
constructor() {
|
19
|
+
super(...arguments), this.checked = !1, this.indeterminate = !1, this.disabled = !1, this.name = "", this.value = "on", this.reducedTouchTarget = !1, this.animationClass = "", this.shouldRenderRipple = !1, this.focused = !1, this.mdcFoundationClass = void 0, this.mdcFoundation = void 0, this.rippleElement = null, this.rippleHandlers = new u(() => (this.shouldRenderRipple = !0, this.ripple.then((e) => this.rippleElement = e), this.ripple));
|
20
|
+
}
|
21
|
+
createAdapter() {
|
22
|
+
return {};
|
23
|
+
}
|
24
|
+
update(e) {
|
25
|
+
const a = e.get("indeterminate"), s = e.get("checked"), o = e.get("disabled");
|
26
|
+
if (a !== void 0 || s !== void 0 || o !== void 0) {
|
27
|
+
const p = this.calculateAnimationStateName(!!s, !!a, !!o), m = this.calculateAnimationStateName(this.checked, this.indeterminate, this.disabled);
|
28
|
+
this.animationClass = `${p}-${m}`;
|
29
|
+
}
|
30
|
+
super.update(e);
|
31
|
+
}
|
32
|
+
calculateAnimationStateName(e, a, s) {
|
33
|
+
return s ? "disabled" : a ? "indeterminate" : e ? "checked" : "unchecked";
|
34
|
+
}
|
35
|
+
// TODO(dfreedm): Make this use selected as a param after Polymer/internal#739
|
36
|
+
/** @soyTemplate */
|
37
|
+
renderRipple() {
|
38
|
+
return this.shouldRenderRipple ? this.renderRippleTemplate() : "";
|
39
|
+
}
|
40
|
+
/** @soyTemplate */
|
41
|
+
renderRippleTemplate() {
|
42
|
+
return l`<mwc-ripple
|
43
|
+
.disabled="${this.disabled}"
|
44
|
+
unbounded></mwc-ripple>`;
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* @soyTemplate
|
48
|
+
* @soyAttributes checkboxAttributes: input
|
49
|
+
* @soyClasses checkboxClasses: .mdc-checkbox
|
50
|
+
*/
|
51
|
+
render() {
|
52
|
+
const e = this.indeterminate || this.checked, a = {
|
53
|
+
"mdc-checkbox--disabled": this.disabled,
|
54
|
+
"mdc-checkbox--selected": e,
|
55
|
+
"mdc-checkbox--touch": !this.reducedTouchTarget,
|
56
|
+
"mdc-ripple-upgraded--background-focused": this.focused,
|
57
|
+
// transition animiation classes
|
58
|
+
"mdc-checkbox--anim-checked-indeterminate": this.animationClass == "checked-indeterminate",
|
59
|
+
"mdc-checkbox--anim-checked-unchecked": this.animationClass == "checked-unchecked",
|
60
|
+
"mdc-checkbox--anim-indeterminate-checked": this.animationClass == "indeterminate-checked",
|
61
|
+
"mdc-checkbox--anim-indeterminate-unchecked": this.animationClass == "indeterminate-unchecked",
|
62
|
+
"mdc-checkbox--anim-unchecked-checked": this.animationClass == "unchecked-checked",
|
63
|
+
"mdc-checkbox--anim-unchecked-indeterminate": this.animationClass == "unchecked-indeterminate"
|
64
|
+
}, s = this.indeterminate ? "mixed" : void 0;
|
65
|
+
return l`
|
66
|
+
<div class="mdc-checkbox mdc-checkbox--upgraded ${f(a)}">
|
67
|
+
<input type="checkbox"
|
68
|
+
class="mdc-checkbox__native-control"
|
69
|
+
name="${n(this.name)}"
|
70
|
+
aria-checked="${n(s)}"
|
71
|
+
aria-label="${n(this.ariaLabel)}"
|
72
|
+
aria-labelledby="${n(this.ariaLabelledBy)}"
|
73
|
+
aria-describedby="${n(this.ariaDescribedBy)}"
|
74
|
+
data-indeterminate="${this.indeterminate ? "true" : "false"}"
|
75
|
+
?disabled="${this.disabled}"
|
76
|
+
.indeterminate="${this.indeterminate}"
|
77
|
+
.checked="${this.checked}"
|
78
|
+
.value="${this.value}"
|
79
|
+
@change="${this.handleChange}"
|
80
|
+
@focus="${this.handleFocus}"
|
81
|
+
@blur="${this.handleBlur}"
|
82
|
+
@mousedown="${this.handleRippleMouseDown}"
|
83
|
+
@mouseenter="${this.handleRippleMouseEnter}"
|
84
|
+
@mouseleave="${this.handleRippleMouseLeave}"
|
85
|
+
@touchstart="${this.handleRippleTouchStart}"
|
86
|
+
@touchend="${this.handleRippleDeactivate}"
|
87
|
+
@touchcancel="${this.handleRippleDeactivate}">
|
88
|
+
<div class="mdc-checkbox__background"
|
89
|
+
@animationend="${this.resetAnimationClass}">
|
90
|
+
<svg class="mdc-checkbox__checkmark"
|
91
|
+
viewBox="0 0 24 24">
|
92
|
+
<path class="mdc-checkbox__checkmark-path"
|
93
|
+
fill="none"
|
94
|
+
d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
95
|
+
</svg>
|
96
|
+
<div class="mdc-checkbox__mixedmark"></div>
|
97
|
+
</div>
|
98
|
+
${this.renderRipple()}
|
99
|
+
</div>`;
|
100
|
+
}
|
101
|
+
setFormData(e) {
|
102
|
+
this.name && this.checked && e.append(this.name, this.value);
|
103
|
+
}
|
104
|
+
handleFocus() {
|
105
|
+
this.focused = !0, this.handleRippleFocus();
|
106
|
+
}
|
107
|
+
handleBlur() {
|
108
|
+
this.focused = !1, this.handleRippleBlur();
|
109
|
+
}
|
110
|
+
handleRippleMouseDown(e) {
|
111
|
+
const a = () => {
|
112
|
+
window.removeEventListener("mouseup", a), this.handleRippleDeactivate();
|
113
|
+
};
|
114
|
+
window.addEventListener("mouseup", a), this.rippleHandlers.startPress(e);
|
115
|
+
}
|
116
|
+
handleRippleTouchStart(e) {
|
117
|
+
this.rippleHandlers.startPress(e);
|
118
|
+
}
|
119
|
+
handleRippleDeactivate() {
|
120
|
+
this.rippleHandlers.endPress();
|
121
|
+
}
|
122
|
+
handleRippleMouseEnter() {
|
123
|
+
this.rippleHandlers.startHover();
|
124
|
+
}
|
125
|
+
handleRippleMouseLeave() {
|
126
|
+
this.rippleHandlers.endHover();
|
127
|
+
}
|
128
|
+
handleRippleFocus() {
|
129
|
+
this.rippleHandlers.startFocus();
|
130
|
+
}
|
131
|
+
handleRippleBlur() {
|
132
|
+
this.rippleHandlers.endFocus();
|
133
|
+
}
|
134
|
+
handleChange() {
|
135
|
+
this.checked = this.formElement.checked, this.indeterminate = this.formElement.indeterminate;
|
136
|
+
}
|
137
|
+
resetAnimationClass() {
|
138
|
+
this.animationClass = "";
|
139
|
+
}
|
140
|
+
get isRippleActive() {
|
141
|
+
var e;
|
142
|
+
return ((e = this.rippleElement) === null || e === void 0 ? void 0 : e.isActive) || !1;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
t([
|
146
|
+
h(".mdc-checkbox")
|
147
|
+
], i.prototype, "mdcRoot", void 0);
|
148
|
+
t([
|
149
|
+
h("input")
|
150
|
+
], i.prototype, "formElement", void 0);
|
151
|
+
t([
|
152
|
+
d({ type: Boolean, reflect: !0 })
|
153
|
+
], i.prototype, "checked", void 0);
|
154
|
+
t([
|
155
|
+
d({ type: Boolean })
|
156
|
+
], i.prototype, "indeterminate", void 0);
|
157
|
+
t([
|
158
|
+
d({ type: Boolean, reflect: !0 })
|
159
|
+
], i.prototype, "disabled", void 0);
|
160
|
+
t([
|
161
|
+
d({ type: String, reflect: !0 })
|
162
|
+
], i.prototype, "name", void 0);
|
163
|
+
t([
|
164
|
+
d({ type: String })
|
165
|
+
], i.prototype, "value", void 0);
|
166
|
+
t([
|
167
|
+
r,
|
168
|
+
d({ type: String, attribute: "aria-label" })
|
169
|
+
], i.prototype, "ariaLabel", void 0);
|
170
|
+
t([
|
171
|
+
r,
|
172
|
+
d({ type: String, attribute: "aria-labelledby" })
|
173
|
+
], i.prototype, "ariaLabelledBy", void 0);
|
174
|
+
t([
|
175
|
+
r,
|
176
|
+
d({ type: String, attribute: "aria-describedby" })
|
177
|
+
], i.prototype, "ariaDescribedBy", void 0);
|
178
|
+
t([
|
179
|
+
d({ type: Boolean })
|
180
|
+
], i.prototype, "reducedTouchTarget", void 0);
|
181
|
+
t([
|
182
|
+
c()
|
183
|
+
], i.prototype, "animationClass", void 0);
|
184
|
+
t([
|
185
|
+
c()
|
186
|
+
], i.prototype, "shouldRenderRipple", void 0);
|
187
|
+
t([
|
188
|
+
c()
|
189
|
+
], i.prototype, "focused", void 0);
|
190
|
+
t([
|
191
|
+
k("mwc-ripple")
|
192
|
+
], i.prototype, "ripple", void 0);
|
193
|
+
t([
|
194
|
+
v({ passive: !0 })
|
195
|
+
], i.prototype, "handleRippleTouchStart", null);
|
196
|
+
export {
|
197
|
+
i as C
|
198
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { i as c } from "./query-assigned-elements.mjs";
|
2
|
+
/**
|
3
|
+
* @license
|
4
|
+
* Copyright 2021 Google LLC
|
5
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
6
|
+
*/
|
7
|
+
const o = c`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`;
|
8
|
+
export {
|
9
|
+
o as s
|
10
|
+
};
|
@@ -0,0 +1,335 @@
|
|
1
|
+
import { _ as h, a as p, b as r } from "./tslib.es6.mjs";
|
2
|
+
import "./inert.esm.mjs";
|
3
|
+
import { B as F } from "./base-element.mjs";
|
4
|
+
import { o as b } from "./observer.mjs";
|
5
|
+
import { y as c } from "./query-assigned-elements.mjs";
|
6
|
+
import { e as l } from "./property.mjs";
|
7
|
+
import { i as C } from "./query.mjs";
|
8
|
+
import { o as g } from "./class-map.mjs";
|
9
|
+
import { a as N } from "./utils.mjs";
|
10
|
+
/**
|
11
|
+
* @license
|
12
|
+
* Copyright 2016 Google Inc.
|
13
|
+
*
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
* copies of the Software, and to permit persons to whom the Software is
|
19
|
+
* furnished to do so, subject to the following conditions:
|
20
|
+
*
|
21
|
+
* The above copyright notice and this permission notice shall be included in
|
22
|
+
* all copies or substantial portions of the Software.
|
23
|
+
*
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
* THE SOFTWARE.
|
31
|
+
*/
|
32
|
+
var i = {
|
33
|
+
ANIMATE: "mdc-drawer--animate",
|
34
|
+
CLOSING: "mdc-drawer--closing",
|
35
|
+
DISMISSIBLE: "mdc-drawer--dismissible",
|
36
|
+
MODAL: "mdc-drawer--modal",
|
37
|
+
OPEN: "mdc-drawer--open",
|
38
|
+
OPENING: "mdc-drawer--opening",
|
39
|
+
ROOT: "mdc-drawer"
|
40
|
+
}, u = {
|
41
|
+
APP_CONTENT_SELECTOR: ".mdc-drawer-app-content",
|
42
|
+
CLOSE_EVENT: "MDCDrawer:closed",
|
43
|
+
OPEN_EVENT: "MDCDrawer:opened",
|
44
|
+
SCRIM_SELECTOR: ".mdc-drawer-scrim",
|
45
|
+
LIST_SELECTOR: ".mdc-list,.mdc-deprecated-list",
|
46
|
+
LIST_ITEM_ACTIVATED_SELECTOR: ".mdc-list-item--activated,.mdc-deprecated-list-item--activated"
|
47
|
+
};
|
48
|
+
/**
|
49
|
+
* @license
|
50
|
+
* Copyright 2016 Google Inc.
|
51
|
+
*
|
52
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
53
|
+
* of this software and associated documentation files (the "Software"), to deal
|
54
|
+
* in the Software without restriction, including without limitation the rights
|
55
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
56
|
+
* copies of the Software, and to permit persons to whom the Software is
|
57
|
+
* furnished to do so, subject to the following conditions:
|
58
|
+
*
|
59
|
+
* The above copyright notice and this permission notice shall be included in
|
60
|
+
* all copies or substantial portions of the Software.
|
61
|
+
*
|
62
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
63
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
64
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
65
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
66
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
67
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
68
|
+
* THE SOFTWARE.
|
69
|
+
*/
|
70
|
+
var w = (
|
71
|
+
/** @class */
|
72
|
+
function() {
|
73
|
+
function n(e) {
|
74
|
+
e === void 0 && (e = {}), this.adapter = e;
|
75
|
+
}
|
76
|
+
return Object.defineProperty(n, "cssClasses", {
|
77
|
+
get: function() {
|
78
|
+
return {};
|
79
|
+
},
|
80
|
+
enumerable: !1,
|
81
|
+
configurable: !0
|
82
|
+
}), Object.defineProperty(n, "strings", {
|
83
|
+
get: function() {
|
84
|
+
return {};
|
85
|
+
},
|
86
|
+
enumerable: !1,
|
87
|
+
configurable: !0
|
88
|
+
}), Object.defineProperty(n, "numbers", {
|
89
|
+
get: function() {
|
90
|
+
return {};
|
91
|
+
},
|
92
|
+
enumerable: !1,
|
93
|
+
configurable: !0
|
94
|
+
}), Object.defineProperty(n, "defaultAdapter", {
|
95
|
+
get: function() {
|
96
|
+
return {};
|
97
|
+
},
|
98
|
+
enumerable: !1,
|
99
|
+
configurable: !0
|
100
|
+
}), n.prototype.init = function() {
|
101
|
+
}, n.prototype.destroy = function() {
|
102
|
+
}, n;
|
103
|
+
}()
|
104
|
+
);
|
105
|
+
/**
|
106
|
+
* @license
|
107
|
+
* Copyright 2018 Google Inc.
|
108
|
+
*
|
109
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
110
|
+
* of this software and associated documentation files (the "Software"), to deal
|
111
|
+
* in the Software without restriction, including without limitation the rights
|
112
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
113
|
+
* copies of the Software, and to permit persons to whom the Software is
|
114
|
+
* furnished to do so, subject to the following conditions:
|
115
|
+
*
|
116
|
+
* The above copyright notice and this permission notice shall be included in
|
117
|
+
* all copies or substantial portions of the Software.
|
118
|
+
*
|
119
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
120
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
121
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
122
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
123
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
124
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
125
|
+
* THE SOFTWARE.
|
126
|
+
*/
|
127
|
+
var v = (
|
128
|
+
/** @class */
|
129
|
+
function(n) {
|
130
|
+
h(e, n);
|
131
|
+
function e(t) {
|
132
|
+
var s = n.call(this, p(p({}, e.defaultAdapter), t)) || this;
|
133
|
+
return s.animationFrame = 0, s.animationTimer = 0, s;
|
134
|
+
}
|
135
|
+
return Object.defineProperty(e, "strings", {
|
136
|
+
get: function() {
|
137
|
+
return u;
|
138
|
+
},
|
139
|
+
enumerable: !1,
|
140
|
+
configurable: !0
|
141
|
+
}), Object.defineProperty(e, "cssClasses", {
|
142
|
+
get: function() {
|
143
|
+
return i;
|
144
|
+
},
|
145
|
+
enumerable: !1,
|
146
|
+
configurable: !0
|
147
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
148
|
+
get: function() {
|
149
|
+
return {
|
150
|
+
addClass: function() {
|
151
|
+
},
|
152
|
+
removeClass: function() {
|
153
|
+
},
|
154
|
+
hasClass: function() {
|
155
|
+
return !1;
|
156
|
+
},
|
157
|
+
elementHasClass: function() {
|
158
|
+
return !1;
|
159
|
+
},
|
160
|
+
notifyClose: function() {
|
161
|
+
},
|
162
|
+
notifyOpen: function() {
|
163
|
+
},
|
164
|
+
saveFocus: function() {
|
165
|
+
},
|
166
|
+
restoreFocus: function() {
|
167
|
+
},
|
168
|
+
focusActiveNavigationItem: function() {
|
169
|
+
},
|
170
|
+
trapFocus: function() {
|
171
|
+
},
|
172
|
+
releaseFocus: function() {
|
173
|
+
}
|
174
|
+
};
|
175
|
+
},
|
176
|
+
enumerable: !1,
|
177
|
+
configurable: !0
|
178
|
+
}), e.prototype.destroy = function() {
|
179
|
+
this.animationFrame && cancelAnimationFrame(this.animationFrame), this.animationTimer && clearTimeout(this.animationTimer);
|
180
|
+
}, e.prototype.open = function() {
|
181
|
+
var t = this;
|
182
|
+
this.isOpen() || this.isOpening() || this.isClosing() || (this.adapter.addClass(i.OPEN), this.adapter.addClass(i.ANIMATE), this.runNextAnimationFrame(function() {
|
183
|
+
t.adapter.addClass(i.OPENING);
|
184
|
+
}), this.adapter.saveFocus());
|
185
|
+
}, e.prototype.close = function() {
|
186
|
+
!this.isOpen() || this.isOpening() || this.isClosing() || this.adapter.addClass(i.CLOSING);
|
187
|
+
}, e.prototype.isOpen = function() {
|
188
|
+
return this.adapter.hasClass(i.OPEN);
|
189
|
+
}, e.prototype.isOpening = function() {
|
190
|
+
return this.adapter.hasClass(i.OPENING) || this.adapter.hasClass(i.ANIMATE);
|
191
|
+
}, e.prototype.isClosing = function() {
|
192
|
+
return this.adapter.hasClass(i.CLOSING);
|
193
|
+
}, e.prototype.handleKeydown = function(t) {
|
194
|
+
var s = t.keyCode, a = t.key, d = a === "Escape" || s === 27;
|
195
|
+
d && this.close();
|
196
|
+
}, e.prototype.handleTransitionEnd = function(t) {
|
197
|
+
var s = i.OPENING, a = i.CLOSING, d = i.OPEN, y = i.ANIMATE, E = i.ROOT, O = this.isElement(t.target) && this.adapter.elementHasClass(t.target, E);
|
198
|
+
O && (this.isClosing() ? (this.adapter.removeClass(d), this.closed(), this.adapter.restoreFocus(), this.adapter.notifyClose()) : (this.adapter.focusActiveNavigationItem(), this.opened(), this.adapter.notifyOpen()), this.adapter.removeClass(y), this.adapter.removeClass(s), this.adapter.removeClass(a));
|
199
|
+
}, e.prototype.opened = function() {
|
200
|
+
}, e.prototype.closed = function() {
|
201
|
+
}, e.prototype.runNextAnimationFrame = function(t) {
|
202
|
+
var s = this;
|
203
|
+
cancelAnimationFrame(this.animationFrame), this.animationFrame = requestAnimationFrame(function() {
|
204
|
+
s.animationFrame = 0, clearTimeout(s.animationTimer), s.animationTimer = setTimeout(t, 0);
|
205
|
+
});
|
206
|
+
}, e.prototype.isElement = function(t) {
|
207
|
+
return Boolean(t.classList);
|
208
|
+
}, e;
|
209
|
+
}(w)
|
210
|
+
);
|
211
|
+
const T = v;
|
212
|
+
/**
|
213
|
+
* @license
|
214
|
+
* Copyright 2018 Google Inc.
|
215
|
+
*
|
216
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
217
|
+
* of this software and associated documentation files (the "Software"), to deal
|
218
|
+
* in the Software without restriction, including without limitation the rights
|
219
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
220
|
+
* copies of the Software, and to permit persons to whom the Software is
|
221
|
+
* furnished to do so, subject to the following conditions:
|
222
|
+
*
|
223
|
+
* The above copyright notice and this permission notice shall be included in
|
224
|
+
* all copies or substantial portions of the Software.
|
225
|
+
*
|
226
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
227
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
228
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
229
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
230
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
231
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
232
|
+
* THE SOFTWARE.
|
233
|
+
*/
|
234
|
+
var _ = (
|
235
|
+
/** @class */
|
236
|
+
function(n) {
|
237
|
+
h(e, n);
|
238
|
+
function e() {
|
239
|
+
return n !== null && n.apply(this, arguments) || this;
|
240
|
+
}
|
241
|
+
return e.prototype.handleScrimClick = function() {
|
242
|
+
this.close();
|
243
|
+
}, e.prototype.opened = function() {
|
244
|
+
this.adapter.trapFocus();
|
245
|
+
}, e.prototype.closed = function() {
|
246
|
+
this.adapter.releaseFocus();
|
247
|
+
}, e;
|
248
|
+
}(v)
|
249
|
+
);
|
250
|
+
const m = _;
|
251
|
+
/**
|
252
|
+
* @license
|
253
|
+
* Copyright 2018 Google LLC
|
254
|
+
* SPDX-License-Identifier: Apache-2.0
|
255
|
+
*/
|
256
|
+
const f = document.$blockingElements;
|
257
|
+
class o extends F {
|
258
|
+
constructor() {
|
259
|
+
super(...arguments), this._previousFocus = null, this.open = !1, this.hasHeader = !1, this.type = "";
|
260
|
+
}
|
261
|
+
get mdcFoundationClass() {
|
262
|
+
return this.type === "modal" ? m : T;
|
263
|
+
}
|
264
|
+
createAdapter() {
|
265
|
+
return Object.assign(Object.assign({}, N(this.mdcRoot)), { elementHasClass: (e, t) => e.classList.contains(t), saveFocus: () => {
|
266
|
+
this._previousFocus = this.getRootNode().activeElement;
|
267
|
+
}, restoreFocus: () => {
|
268
|
+
this._previousFocus && this._previousFocus.focus && this._previousFocus.focus();
|
269
|
+
}, notifyClose: () => {
|
270
|
+
this.open = !1, this.dispatchEvent(new Event(u.CLOSE_EVENT, { bubbles: !0, cancelable: !0 }));
|
271
|
+
}, notifyOpen: () => {
|
272
|
+
this.open = !0, this.dispatchEvent(new Event(u.OPEN_EVENT, { bubbles: !0, cancelable: !0 }));
|
273
|
+
}, focusActiveNavigationItem: () => {
|
274
|
+
}, trapFocus: () => {
|
275
|
+
f.push(this), this.appContent.inert = !0;
|
276
|
+
}, releaseFocus: () => {
|
277
|
+
f.remove(this), this.appContent.inert = !1;
|
278
|
+
} });
|
279
|
+
}
|
280
|
+
_handleScrimClick() {
|
281
|
+
this.mdcFoundation instanceof m && this.mdcFoundation.handleScrimClick();
|
282
|
+
}
|
283
|
+
render() {
|
284
|
+
const e = this.type === "dismissible" || this.type === "modal", t = this.type === "modal", s = this.hasHeader ? c`
|
285
|
+
<div class="mdc-drawer__header">
|
286
|
+
<h3 class="mdc-drawer__title"><slot name="title"></slot></h3>
|
287
|
+
<h6 class="mdc-drawer__subtitle"><slot name="subtitle"></slot></h6>
|
288
|
+
<slot name="header"></slot>
|
289
|
+
</div>
|
290
|
+
` : "";
|
291
|
+
return c`
|
292
|
+
<aside class="mdc-drawer ${g({
|
293
|
+
"mdc-drawer--dismissible": e,
|
294
|
+
"mdc-drawer--modal": t
|
295
|
+
})}">
|
296
|
+
${s}
|
297
|
+
<div class="mdc-drawer__content"><slot></slot></div>
|
298
|
+
</aside>
|
299
|
+
${t ? c`<div class="mdc-drawer-scrim"
|
300
|
+
@click="${this._handleScrimClick}"></div>` : ""}
|
301
|
+
<div class="mdc-drawer-app-content">
|
302
|
+
<slot name="appContent"></slot>
|
303
|
+
</div>
|
304
|
+
`;
|
305
|
+
}
|
306
|
+
// note, we avoid calling `super.firstUpdated()` to control when
|
307
|
+
// `createFoundation()` is called.
|
308
|
+
firstUpdated() {
|
309
|
+
this.mdcRoot.addEventListener("keydown", (e) => this.mdcFoundation.handleKeydown(e)), this.mdcRoot.addEventListener("transitionend", (e) => this.mdcFoundation.handleTransitionEnd(e));
|
310
|
+
}
|
311
|
+
updated(e) {
|
312
|
+
e.has("type") && this.createFoundation();
|
313
|
+
}
|
314
|
+
}
|
315
|
+
r([
|
316
|
+
C(".mdc-drawer")
|
317
|
+
], o.prototype, "mdcRoot", void 0);
|
318
|
+
r([
|
319
|
+
C(".mdc-drawer-app-content")
|
320
|
+
], o.prototype, "appContent", void 0);
|
321
|
+
r([
|
322
|
+
b(function(n) {
|
323
|
+
this.type !== "" && (n ? this.mdcFoundation.open() : this.mdcFoundation.close());
|
324
|
+
}),
|
325
|
+
l({ type: Boolean, reflect: !0 })
|
326
|
+
], o.prototype, "open", void 0);
|
327
|
+
r([
|
328
|
+
l({ type: Boolean })
|
329
|
+
], o.prototype, "hasHeader", void 0);
|
330
|
+
r([
|
331
|
+
l({ reflect: !0 })
|
332
|
+
], o.prototype, "type", void 0);
|
333
|
+
export {
|
334
|
+
o as D
|
335
|
+
};
|
package/mwc-icon.mjs
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
import { b as o } from "./tslib.es6.mjs";
|
2
|
+
import { i as n, s as e, y as i, e as s } from "./query-assigned-elements.mjs";
|
3
|
+
/**
|
4
|
+
* @license
|
5
|
+
* Copyright 2021 Google LLC
|
6
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
7
|
+
*/
|
8
|
+
const r = n`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`;
|
9
|
+
/**
|
10
|
+
* @license
|
11
|
+
* Copyright 2018 Google LLC
|
12
|
+
* SPDX-License-Identifier: Apache-2.0
|
13
|
+
*/
|
14
|
+
let t = class extends e {
|
15
|
+
/** @soyTemplate */
|
16
|
+
render() {
|
17
|
+
return i`<span><slot></slot></span>`;
|
18
|
+
}
|
19
|
+
};
|
20
|
+
t.styles = [r];
|
21
|
+
t = o([
|
22
|
+
s("mwc-icon")
|
23
|
+
], t);
|
24
|
+
export {
|
25
|
+
t as I
|
26
|
+
};
|