@covalent/components 8.2.0 → 8.2.1
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.js +3 -2
- package/action-ribbon.mjs +10 -9
- package/alert.js +3 -2
- package/alert.mjs +10 -9
- package/app-shell.js +2 -1
- package/app-shell.mjs +20 -19
- package/{base-element-atp_8bvP.js → base-element-58a3f9ea.js} +1 -1
- package/{base-element--jaKdI-8.mjs → base-element-67ae173f.mjs} +2 -2
- package/button.js +3 -2
- package/button.mjs +16 -15
- package/card.js +3 -2
- package/card.mjs +5 -4
- package/check-list-item.js +15 -11
- package/check-list-item.mjs +68 -62
- package/checkbox.js +2 -1
- package/checkbox.mjs +25 -23
- package/circular-progress.js +1 -1
- package/circular-progress.mjs +7 -7
- package/{class-map-YPXv0Hj4.mjs → class-map-4b94b017.mjs} +1 -1
- package/{class-map-wtcW44Of.js → class-map-b5efe8da.js} +1 -1
- package/code-snippet-2137b11c.js +13 -0
- package/code-snippet-ccca324f.mjs +12278 -0
- package/code-snippet.js +1 -12
- package/code-snippet.mjs +7 -12251
- package/{dialog-tIMorfuj.mjs → dialog-3ca1b701.mjs} +62 -60
- package/{dialog-SpbwRuWY.js → dialog-82b03745.js} +7 -6
- package/dialog.js +1 -1
- package/dialog.mjs +10 -10
- package/{directive-helpers--rJ2jf3N.js → directive-helpers-0ce1f995.js} +1 -1
- package/{directive-helpers-9566lOOl.mjs → directive-helpers-e3ea6592.mjs} +1 -1
- package/drawer.js +3 -2
- package/drawer.mjs +12 -11
- package/empty-state.js +2 -1
- package/empty-state.mjs +6 -5
- package/{event-options-2TJPtsKy.js → event-options-3f5eb195.js} +1 -1
- package/{event-options-0xzSdemG.mjs → event-options-78d6cf94.mjs} +1 -1
- package/{form-element-5s8gft-A.js → form-element-c553d6f5.js} +1 -1
- package/{form-element-gM33WEq3.mjs → form-element-ffcf59ff.mjs} +4 -4
- package/{foundation-3Wg80pI7.mjs → foundation-39dc72d2.mjs} +1 -1
- package/{foundation-1Vzfdey_.js → foundation-786bf879.js} +1 -1
- package/icon-button.js +3 -2
- package/icon-button.mjs +15 -14
- package/icon-check-toggle.js +5 -4
- package/icon-check-toggle.mjs +24 -22
- package/icon-radio-toggle.js +5 -4
- package/icon-radio-toggle.mjs +27 -25
- package/icon.js +5 -1
- package/icon.mjs +21 -15
- package/{if-defined-BH_l2PVl.mjs → if-defined-c367f208.mjs} +1 -1
- package/{if-defined-lAIUwAsA.js → if-defined-f1c45245.js} +1 -1
- package/index.js +560 -1
- package/index.mjs +3654 -124
- package/{inert.esm-vhZXthJr.mjs → inert.esm-359d4581.mjs} +1 -1
- package/linear-progress.js +3 -2
- package/linear-progress.mjs +13 -12
- package/{mwc-list-item.css-d-SHhq7Q.mjs → list-item-1fc0d619.mjs} +9 -199
- package/{mwc-list-item.css-yJ5bjNGc.js → list-item-209613bf.js} +6 -28
- package/list-item.js +3 -3
- package/list-item.mjs +25 -25
- package/list.js +8 -3
- package/list.mjs +37 -31
- package/menu.js +5 -1
- package/menu.mjs +34 -28
- package/mwc-checkbox-base-3d8c9549.js +41 -0
- package/mwc-checkbox-base-f10fd709.mjs +198 -0
- package/{mwc-checkbox.css-c44nPIEs.mjs → mwc-checkbox.css-8f4f1a9b.mjs} +3 -198
- package/{mwc-checkbox.css-JOD-Qh-9.js → mwc-checkbox.css-b3434429.js} +2 -42
- package/{mwc-drawer-base-8e_1aSuf.mjs → mwc-drawer-base-135de8a5.mjs} +26 -24
- package/{mwc-drawer-base-Fv3JVYPS.js → mwc-drawer-base-798b11f8.js} +5 -5
- package/{mwc-icon-eaW72Ei7.mjs → mwc-icon-bf656cf5.mjs} +5 -6
- package/{mwc-icon-r2y4-AXI.js → mwc-icon-f87639bc.js} +2 -2
- package/{mwc-line-ripple-directive-iRoAkPnW.js → mwc-line-ripple-directive-a6b39a3c.js} +1 -1
- package/{mwc-line-ripple-directive-Q_HMRGPE.mjs → mwc-line-ripple-directive-b24a914e.mjs} +6 -6
- package/mwc-list-base-400b00e2.js +111 -0
- package/{mwc-list.css-_OVL_dbR.mjs → mwc-list-base-76e37212.mjs} +212 -213
- package/mwc-list-item-base-297d86b0.js +28 -0
- package/mwc-list-item-base-fe4398c3.mjs +202 -0
- package/{mwc-menu.css-cKtc1ZD4.mjs → mwc-menu-base-c4bc88ea.mjs} +75 -74
- package/mwc-menu-base-c75ca473.js +190 -0
- package/mwc-radio-base-913e02e2.js +101 -0
- package/{mwc-radio.css-_lt-Vcvl.mjs → mwc-radio-base-a374fbd9.mjs} +117 -123
- package/mwc-radio.css-4e140252.js +5 -0
- package/mwc-radio.css-7454bb11.mjs +10 -0
- package/{mwc-slider.css-md7hPAE7.mjs → mwc-slider.css-8b6f275c.mjs} +11 -11
- package/{mwc-slider.css-lCfMVbO5.js → mwc-slider.css-c7107d94.js} +1 -1
- package/{mwc-tab.css-lT5vTf5I.mjs → mwc-tab-base-be0c887f.mjs} +123 -127
- package/{mwc-tab.css-q4Jsbyp5.js → mwc-tab-base-f28722aa.js} +22 -26
- package/{mwc-top-app-bar-base-nm6mdCR3.mjs → mwc-top-app-bar-base-55da3fe4.mjs} +13 -12
- package/{mwc-top-app-bar-base-8qOIX1me.js → mwc-top-app-bar-base-aec60f27.js} +3 -3
- package/nav-list-item.js +6 -5
- package/nav-list-item.mjs +38 -37
- package/package.json +1 -1
- package/{query-duvhtfSs.js → query-680f1868.js} +1 -1
- package/{query-assigned-nodes-1p7z6CEm.js → query-assigned-nodes-99eae71d.js} +1 -1
- package/{query-assigned-nodes-6yHI5ePh.mjs → query-assigned-nodes-df691e78.mjs} +1 -1
- package/{query-1WmuF6Bq.mjs → query-d843aa92.mjs} +1 -1
- package/radio-list-item.js +13 -9
- package/radio-list-item.mjs +64 -58
- package/radio.js +2 -1
- package/radio.mjs +25 -23
- package/{ripple-handlers-HeGhXgD2.js → ripple-handlers-5d5b21db.js} +8 -8
- package/{ripple-handlers-BwaZu9Ps.mjs → ripple-handlers-f37f21cf.mjs} +17 -16
- package/select.js +15 -10
- package/select.mjs +147 -139
- package/side-sheet.js +2 -1
- package/side-sheet.mjs +12 -11
- package/slider-range.js +1 -1
- package/slider-range.mjs +14 -14
- package/slider.js +1 -1
- package/slider.mjs +16 -16
- package/snackbar.js +11 -10
- package/snackbar.mjs +36 -34
- package/{state-LqPxt99W.js → state-0974a8e5.js} +1 -1
- package/{state-inNZe6rL.mjs → state-b5e865db.mjs} +1 -1
- package/status-header-item.js +2 -1
- package/status-header-item.mjs +4 -3
- package/status-header.js +3 -2
- package/status-header.mjs +5 -4
- package/{style-map-66_3wrLx.js → style-map-88d2563f.js} +1 -1
- package/{style-map-8yp6DGeh.mjs → style-map-bc3ed3e0.mjs} +2 -2
- package/style.css +1 -1
- package/switch.js +3 -2
- package/switch.mjs +16 -15
- package/tab-bar.js +22 -18
- package/tab-bar.mjs +203 -195
- package/tab.js +6 -1
- package/tab.mjs +32 -26
- package/text-lockup.js +2 -1
- package/text-lockup.mjs +9 -8
- package/textarea.js +19 -15
- package/textarea.mjs +65 -59
- package/textfield-62e16cc2.js +133 -0
- package/textfield-63d1859a.mjs +932 -0
- package/textfield.js +7 -3
- package/textfield.mjs +36 -30
- package/toolbar.js +2 -1
- package/toolbar.mjs +10 -9
- package/tooltip.js +3 -2
- package/tooltip.mjs +10 -9
- package/{top-app-bar-qcW2ucE3.js → top-app-bar-a531c1b4.js} +3 -2
- package/{top-app-bar-h0V-USh_.mjs → top-app-bar-f83386e0.mjs} +3 -2
- package/top-app-bar-fixed.js +6 -6
- package/top-app-bar-fixed.mjs +28 -27
- package/top-app-bar.js +1 -1
- package/top-app-bar.mjs +9 -9
- package/tree-list-item.js +2 -1
- package/tree-list-item.mjs +7 -6
- package/tree-list.js +2 -1
- package/tree-list.mjs +3 -2
- package/{tslib.es6-S8SvF2K1.mjs → tslib.es6-f3e988cd.mjs} +5 -5
- package/typography.js +2 -1
- package/typography.mjs +4 -3
- package/_commonjsHelpers-ZPn_iTGj.mjs +0 -28
- package/_commonjsHelpers-fFrWAeZI.js +0 -1
- package/chip-M5Vb5Kd6.js +0 -492
- package/chip-m2mKzWQT.mjs +0 -3115
- package/chip-set.js +0 -75
- package/chip-set.mjs +0 -531
- package/chip.js +0 -1
- package/chip.mjs +0 -12
- package/expansion-panel-item.js +0 -24
- package/expansion-panel-item.mjs +0 -106
- package/expansion-panel.js +0 -7
- package/expansion-panel.mjs +0 -59
- package/formfield.js +0 -79
- package/formfield.mjs +0 -275
- package/list-item-F2e6aWaj.mjs +0 -11
- package/list-item-Ze98reWt.js +0 -5
- package/mwc-list.css-DjU8XB1m.js +0 -111
- package/mwc-menu.css-qavo4jer.js +0 -190
- package/mwc-radio.css-h_Wv0Eag.js +0 -105
- package/textfield-7aU1kEO6.mjs +0 -936
- package/textfield-jvevIGSw.js +0 -136
- /package/{aria-property-52VAcg_f.js → aria-property-849c8816.js} +0 -0
- /package/{aria-property-wYjPNXcK.mjs → aria-property-fa2717fe.mjs} +0 -0
- /package/{inert.esm-TSRtlTFV.js → inert.esm-2cee6f2e.js} +0 -0
- /package/{observer-LlGBroG9.js → observer-a096ab43.js} +0 -0
- /package/{observer-cKAgu-MI.mjs → observer-be7b92e2.mjs} +0 -0
- /package/{property-iZpLBvy-.js → property-57f6f6fe.js} +0 -0
- /package/{property-K7hFBmOi.mjs → property-9b6ea53b.mjs} +0 -0
- /package/{query-assigned-elements-yFWOzcsT.mjs → query-assigned-elements-4a39219d.mjs} +0 -0
- /package/{query-assigned-elements-j_5ZiL65.js → query-assigned-elements-f623705d.js} +0 -0
- /package/{tslib.es6-5xG0QhxF.js → tslib.es6-98719205.js} +0 -0
- /package/{utils-xAXEDL0Y.mjs → utils-2932417c.mjs} +0 -0
- /package/{utils-W3ENJhq-.js → utils-a8190a39.js} +0 -0
package/list.mjs
CHANGED
@@ -1,37 +1,43 @@
|
|
1
|
-
import { i as
|
2
|
-
import {
|
3
|
-
import "./tslib.es6-
|
4
|
-
import "./mwc-list-item
|
5
|
-
import "./ripple-handlers-
|
6
|
-
import "./base-element
|
7
|
-
import "./utils-
|
8
|
-
import "./property-
|
9
|
-
import "./state-
|
10
|
-
import "./query-
|
11
|
-
import "./class-map-
|
12
|
-
import "./style-map-
|
13
|
-
import "./observer-
|
14
|
-
import "./query-assigned-nodes-
|
15
|
-
import "./if-defined-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
import { i as n, r as l, e as p } from "./query-assigned-elements-4a39219d.mjs";
|
2
|
+
import { L as m } from "./mwc-list-base-76e37212.mjs";
|
3
|
+
import "./tslib.es6-f3e988cd.mjs";
|
4
|
+
import "./mwc-list-item-base-fe4398c3.mjs";
|
5
|
+
import "./ripple-handlers-f37f21cf.mjs";
|
6
|
+
import "./base-element-67ae173f.mjs";
|
7
|
+
import "./utils-2932417c.mjs";
|
8
|
+
import "./property-9b6ea53b.mjs";
|
9
|
+
import "./state-b5e865db.mjs";
|
10
|
+
import "./query-d843aa92.mjs";
|
11
|
+
import "./class-map-4b94b017.mjs";
|
12
|
+
import "./style-map-bc3ed3e0.mjs";
|
13
|
+
import "./observer-be7b92e2.mjs";
|
14
|
+
import "./query-assigned-nodes-df691e78.mjs";
|
15
|
+
import "./if-defined-c367f208.mjs";
|
16
|
+
/**
|
17
|
+
* @license
|
18
|
+
* Copyright 2021 Google LLC
|
19
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
20
|
+
*/
|
21
|
+
const c = n`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`, g = `:host{padding-right:var(--cv-list-padding-right, 0)}:host(.subnav){--cv-list-padding-right: 0;--cv-list-item-text-padding: 68px}:host(.subnav) ::slotted(*){height:32px;font-weight:var(--mdc-typography-body2-font-weight);border-radius:0 28px 28px 0;padding:0}.mdc-deprecated-list{display:flex;flex-direction:column;align-items:center;width:100%}
|
22
|
+
`;
|
23
|
+
var h = Object.defineProperty, f = Object.getOwnPropertyDescriptor, v = (o, e, d, i) => {
|
24
|
+
for (var t = i > 1 ? void 0 : i ? f(e, d) : e, a = o.length - 1, s; a >= 0; a--)
|
25
|
+
(s = o[a]) && (t = (i ? s(e, d, t) : s(t)) || t);
|
26
|
+
return i && t && h(e, d, t), t;
|
21
27
|
};
|
22
|
-
let
|
28
|
+
let r = class extends m {
|
23
29
|
};
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
${
|
30
|
+
r.styles = [
|
31
|
+
c,
|
32
|
+
n`
|
33
|
+
${l(g)}
|
28
34
|
`
|
29
35
|
];
|
30
|
-
|
31
|
-
|
32
|
-
],
|
33
|
-
const
|
36
|
+
r = v([
|
37
|
+
p("cv-list")
|
38
|
+
], r);
|
39
|
+
const R = r;
|
34
40
|
export {
|
35
|
-
|
36
|
-
|
41
|
+
r as CovalentList,
|
42
|
+
R as default
|
37
43
|
};
|
package/menu.js
CHANGED
@@ -1 +1,5 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./mwc-menu-base-c75ca473.js"),l=require("./query-assigned-elements-f623705d.js");require("./tslib.es6-98719205.js");require("./mwc-list-base-400b00e2.js");require("./mwc-list-item-base-297d86b0.js");require("./ripple-handlers-5d5b21db.js");require("./base-element-58a3f9ea.js");require("./utils-a8190a39.js");require("./property-57f6f6fe.js");require("./state-0974a8e5.js");require("./query-680f1868.js");require("./class-map-b5efe8da.js");require("./style-map-88d2563f.js");require("./observer-a096ab43.js");require("./query-assigned-nodes-99eae71d.js");require("./if-defined-f1c45245.js");/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2021 Google LLC
|
4
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
5
|
+
*/const v=l.i`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;var a=Object.defineProperty,q=Object.getOwnPropertyDescriptor,c=(u,r,n,t)=>{for(var e=t>1?void 0:t?q(r,n):r,i=u.length-1,s;i>=0;i--)(s=u[i])&&(e=(t?s(r,n,e):s(e))||e);return t&&e&&a(r,n,e),e};exports.CovalentMenu=class extends o.MenuBase{};exports.CovalentMenu.styles=[v];exports.CovalentMenu=c([l.e("cv-menu")],exports.CovalentMenu);const m=exports.CovalentMenu;exports.default=m;
|
package/menu.mjs
CHANGED
@@ -1,32 +1,38 @@
|
|
1
|
-
import {
|
2
|
-
import { e as
|
3
|
-
import "./tslib.es6-
|
4
|
-
import "./mwc-list
|
5
|
-
import "./mwc-list-item
|
6
|
-
import "./ripple-handlers-
|
7
|
-
import "./base-element
|
8
|
-
import "./utils-
|
9
|
-
import "./property-
|
10
|
-
import "./state-
|
11
|
-
import "./query-
|
12
|
-
import "./class-map-
|
13
|
-
import "./style-map-
|
14
|
-
import "./observer-
|
15
|
-
import "./query-assigned-nodes-
|
16
|
-
import "./if-defined-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
import { M as n } from "./mwc-menu-base-c4bc88ea.mjs";
|
2
|
+
import { i as l, e as c } from "./query-assigned-elements-4a39219d.mjs";
|
3
|
+
import "./tslib.es6-f3e988cd.mjs";
|
4
|
+
import "./mwc-list-base-76e37212.mjs";
|
5
|
+
import "./mwc-list-item-base-fe4398c3.mjs";
|
6
|
+
import "./ripple-handlers-f37f21cf.mjs";
|
7
|
+
import "./base-element-67ae173f.mjs";
|
8
|
+
import "./utils-2932417c.mjs";
|
9
|
+
import "./property-9b6ea53b.mjs";
|
10
|
+
import "./state-b5e865db.mjs";
|
11
|
+
import "./query-d843aa92.mjs";
|
12
|
+
import "./class-map-4b94b017.mjs";
|
13
|
+
import "./style-map-bc3ed3e0.mjs";
|
14
|
+
import "./observer-be7b92e2.mjs";
|
15
|
+
import "./query-assigned-nodes-df691e78.mjs";
|
16
|
+
import "./if-defined-c367f208.mjs";
|
17
|
+
/**
|
18
|
+
* @license
|
19
|
+
* Copyright 2021 Google LLC
|
20
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
21
|
+
*/
|
22
|
+
const v = l`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;
|
23
|
+
var a = Object.defineProperty, f = Object.getOwnPropertyDescriptor, u = (s, e, i, o) => {
|
24
|
+
for (var t = o > 1 ? void 0 : o ? f(e, i) : e, m = s.length - 1, p; m >= 0; m--)
|
25
|
+
(p = s[m]) && (t = (o ? p(e, i, t) : p(t)) || t);
|
26
|
+
return o && t && a(e, i, t), t;
|
21
27
|
};
|
22
|
-
let
|
28
|
+
let r = class extends n {
|
23
29
|
};
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
],
|
28
|
-
const
|
30
|
+
r.styles = [v];
|
31
|
+
r = u([
|
32
|
+
c("cv-menu")
|
33
|
+
], r);
|
34
|
+
const q = r;
|
29
35
|
export {
|
30
|
-
|
31
|
-
|
36
|
+
r as CovalentMenu,
|
37
|
+
q as default
|
32
38
|
};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";const i=require("./tslib.es6-98719205.js"),h=require("./ripple-handlers-5d5b21db.js"),r=require("./aria-property-849c8816.js"),k=require("./form-element-c553d6f5.js"),l=require("./query-assigned-elements-f623705d.js"),n=require("./property-57f6f6fe.js"),c=require("./state-0974a8e5.js"),b=require("./event-options-3f5eb195.js"),p=require("./query-680f1868.js"),v=require("./class-map-b5efe8da.js"),s=require("./if-defined-f1c45245.js");/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2019 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/class t extends k.FormElement{constructor(){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 h.RippleHandlers(()=>(this.shouldRenderRipple=!0,this.ripple.then(e=>this.rippleElement=e),this.ripple))}createAdapter(){return{}}update(e){const a=e.get("indeterminate"),d=e.get("checked"),o=e.get("disabled");if(a!==void 0||d!==void 0||o!==void 0){const u=this.calculateAnimationStateName(!!d,!!a,!!o),m=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${u}-${m}`}super.update(e)}calculateAnimationStateName(e,a,d){return d?"disabled":a?"indeterminate":e?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return l.x`<mwc-ripple
|
6
|
+
.disabled="${this.disabled}"
|
7
|
+
unbounded></mwc-ripple>`}render(){const e=this.indeterminate||this.checked,a={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":e,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":this.animationClass=="checked-indeterminate","mdc-checkbox--anim-checked-unchecked":this.animationClass=="checked-unchecked","mdc-checkbox--anim-indeterminate-checked":this.animationClass=="indeterminate-checked","mdc-checkbox--anim-indeterminate-unchecked":this.animationClass=="indeterminate-unchecked","mdc-checkbox--anim-unchecked-checked":this.animationClass=="unchecked-checked","mdc-checkbox--anim-unchecked-indeterminate":this.animationClass=="unchecked-indeterminate"},d=this.indeterminate?"mixed":void 0;return l.x`
|
8
|
+
<div class="mdc-checkbox mdc-checkbox--upgraded ${v.o(a)}">
|
9
|
+
<input type="checkbox"
|
10
|
+
class="mdc-checkbox__native-control"
|
11
|
+
name="${s.l(this.name)}"
|
12
|
+
aria-checked="${s.l(d)}"
|
13
|
+
aria-label="${s.l(this.ariaLabel)}"
|
14
|
+
aria-labelledby="${s.l(this.ariaLabelledBy)}"
|
15
|
+
aria-describedby="${s.l(this.ariaDescribedBy)}"
|
16
|
+
data-indeterminate="${this.indeterminate?"true":"false"}"
|
17
|
+
?disabled="${this.disabled}"
|
18
|
+
.indeterminate="${this.indeterminate}"
|
19
|
+
.checked="${this.checked}"
|
20
|
+
.value="${this.value}"
|
21
|
+
@change="${this.handleChange}"
|
22
|
+
@focus="${this.handleFocus}"
|
23
|
+
@blur="${this.handleBlur}"
|
24
|
+
@mousedown="${this.handleRippleMouseDown}"
|
25
|
+
@mouseenter="${this.handleRippleMouseEnter}"
|
26
|
+
@mouseleave="${this.handleRippleMouseLeave}"
|
27
|
+
@touchstart="${this.handleRippleTouchStart}"
|
28
|
+
@touchend="${this.handleRippleDeactivate}"
|
29
|
+
@touchcancel="${this.handleRippleDeactivate}">
|
30
|
+
<div class="mdc-checkbox__background"
|
31
|
+
@animationend="${this.resetAnimationClass}">
|
32
|
+
<svg class="mdc-checkbox__checkmark"
|
33
|
+
viewBox="0 0 24 24">
|
34
|
+
<path class="mdc-checkbox__checkmark-path"
|
35
|
+
fill="none"
|
36
|
+
d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
37
|
+
</svg>
|
38
|
+
<div class="mdc-checkbox__mixedmark"></div>
|
39
|
+
</div>
|
40
|
+
${this.renderRipple()}
|
41
|
+
</div>`}setFormData(e){this.name&&this.checked&&e.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(e){const a=()=>{window.removeEventListener("mouseup",a),this.handleRippleDeactivate()};window.addEventListener("mouseup",a),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var e;return((e=this.rippleElement)===null||e===void 0?void 0:e.isActive)||!1}}i.__decorate([p.i(".mdc-checkbox")],t.prototype,"mdcRoot",void 0);i.__decorate([p.i("input")],t.prototype,"formElement",void 0);i.__decorate([n.n({type:Boolean,reflect:!0})],t.prototype,"checked",void 0);i.__decorate([n.n({type:Boolean})],t.prototype,"indeterminate",void 0);i.__decorate([n.n({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0);i.__decorate([n.n({type:String,reflect:!0})],t.prototype,"name",void 0);i.__decorate([n.n({type:String})],t.prototype,"value",void 0);i.__decorate([r.ariaProperty,n.n({type:String,attribute:"aria-label"})],t.prototype,"ariaLabel",void 0);i.__decorate([r.ariaProperty,n.n({type:String,attribute:"aria-labelledby"})],t.prototype,"ariaLabelledBy",void 0);i.__decorate([r.ariaProperty,n.n({type:String,attribute:"aria-describedby"})],t.prototype,"ariaDescribedBy",void 0);i.__decorate([n.n({type:Boolean})],t.prototype,"reducedTouchTarget",void 0);i.__decorate([c.t()],t.prototype,"animationClass",void 0);i.__decorate([c.t()],t.prototype,"shouldRenderRipple",void 0);i.__decorate([c.t()],t.prototype,"focused",void 0);i.__decorate([h.e("mwc-ripple")],t.prototype,"ripple",void 0);i.__decorate([b.e({passive:!0})],t.prototype,"handleRippleTouchStart",null);exports.CheckboxBase=t;
|
@@ -0,0 +1,198 @@
|
|
1
|
+
import { f as t } from "./tslib.es6-f3e988cd.mjs";
|
2
|
+
import { e as u, R as k } from "./ripple-handlers-f37f21cf.mjs";
|
3
|
+
import { a as r } from "./aria-property-fa2717fe.mjs";
|
4
|
+
import { F as b } from "./form-element-ffcf59ff.mjs";
|
5
|
+
import { x as l } from "./query-assigned-elements-4a39219d.mjs";
|
6
|
+
import { n as d } from "./property-9b6ea53b.mjs";
|
7
|
+
import { t as c } from "./state-b5e865db.mjs";
|
8
|
+
import { e as v } from "./event-options-78d6cf94.mjs";
|
9
|
+
import { i as h } from "./query-d843aa92.mjs";
|
10
|
+
import { o as f } from "./class-map-4b94b017.mjs";
|
11
|
+
import { l as s } from "./if-defined-c367f208.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 k(() => (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"), n = e.get("checked"), o = e.get("disabled");
|
26
|
+
if (a !== void 0 || n !== void 0 || o !== void 0) {
|
27
|
+
const p = this.calculateAnimationStateName(!!n, !!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, n) {
|
33
|
+
return n ? "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
|
+
}, n = 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="${s(this.name)}"
|
70
|
+
aria-checked="${s(n)}"
|
71
|
+
aria-label="${s(this.ariaLabel)}"
|
72
|
+
aria-labelledby="${s(this.ariaLabelledBy)}"
|
73
|
+
aria-describedby="${s(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
|
+
u("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
|
+
};
|