@covalent/components 6.2.2 → 6.3.0-beta.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 +1 -1
- package/action-ribbon.mjs +9 -9
- package/alert.js +1 -1
- package/alert.mjs +9 -9
- package/app-shell/app-shell.d.ts +14 -0
- package/app-shell/app-shell.d.ts.map +1 -1
- package/app-shell.js +20 -12
- package/app-shell.mjs +89 -56
- package/aria-property-fa2717fe.mjs +41 -0
- package/base-element-c3dc926e.mjs +28 -0
- package/{base-element.mjs → base-element-d5abe37a.js} +1 -1
- package/button.js +1 -1
- package/button.mjs +14 -14
- package/card.js +1 -1
- package/card.mjs +3 -3
- package/check-list-item.js +1 -1
- package/check-list-item.mjs +18 -18
- package/checkbox.js +1 -1
- package/checkbox.mjs +16 -16
- package/circular-progress.js +1 -1
- package/circular-progress.mjs +7 -7
- package/class-map-08c84aeb.mjs +62 -0
- package/{class-map.mjs → class-map-50b8edb4.js} +3 -3
- package/code-snippet.js +1 -1
- package/code-snippet.mjs +4 -4
- package/{dialog2.mjs → dialog-85c21333.mjs} +9 -9
- package/dialog-8ee07177.js +162 -0
- package/dialog.js +1 -1
- package/dialog.mjs +14 -162
- package/directive-helpers-725a181d.mjs +11 -0
- package/directive-helpers-fce8cf91.js +5 -0
- package/drawer.js +1 -1
- package/drawer.mjs +10 -10
- package/empty-state.js +1 -1
- package/empty-state.mjs +4 -4
- package/event-options-3937d997.mjs +14 -0
- package/event-options-7bc382d8.js +5 -0
- package/form-element-6dbd7afa.mjs +50 -0
- package/{form-element.mjs → form-element-d4e7bcdb.js} +1 -1
- package/foundation-2334d146.mjs +60 -0
- package/{foundation.mjs → foundation-3f55a9dc.js} +3 -3
- package/foundation-c580100a.mjs +152 -0
- package/icon-button.js +1 -1
- package/icon-button.mjs +13 -13
- package/icon-check-toggle.js +1 -1
- package/icon-check-toggle.mjs +16 -16
- package/icon-radio-toggle.js +1 -1
- package/icon-radio-toggle.mjs +17 -17
- package/icon.js +1 -1
- package/icon.mjs +3 -3
- package/if-defined-639ed018.mjs +10 -0
- package/if-defined-cb12d481.js +5 -0
- package/index.js +1 -1
- package/index.mjs +39 -39
- package/inert.esm-359d4581.mjs +640 -0
- package/linear-progress.js +1 -1
- package/linear-progress.mjs +9 -9
- package/{list2.mjs → list-d616957b.mjs} +3 -3
- package/list-defdaa3b.js +5 -0
- package/list-expansion.js +8 -8
- package/list-expansion.mjs +37 -37
- package/list-item-e78d76c5.js +9 -0
- package/{list-item2.mjs → list-item-f7cb5460.mjs} +16 -16
- package/list-item.js +1 -1
- package/list-item.mjs +18 -9
- package/list.js +1 -1
- package/list.mjs +20 -5
- package/menu.js +1 -1
- package/menu.mjs +16 -16
- package/mwc-checkbox-base-10e977f2.mjs +198 -0
- package/{mwc-checkbox-base.mjs → mwc-checkbox-base-435c1f1d.js} +1 -1
- package/{mwc-checkbox.css.mjs → mwc-checkbox.css-956e3d6c.js} +1 -1
- package/mwc-checkbox.css-b7abc7fd.mjs +10 -0
- package/mwc-drawer-base-b2b772c3.mjs +335 -0
- package/{mwc-drawer-base.mjs → mwc-drawer-base-f44fcf34.js} +1 -1
- package/{mwc-icon.mjs → mwc-icon-b96fb867.js} +3 -3
- package/mwc-icon-c7013880.mjs +26 -0
- package/{mwc-line-ripple-directive.mjs → mwc-line-ripple-directive-a97ce725.js} +1 -1
- package/mwc-line-ripple-directive-c3e1f04a.mjs +653 -0
- package/{mwc-list-base.mjs → mwc-list-base-7d5f7278.js} +1 -1
- package/mwc-list-base-c0f8af1c.mjs +840 -0
- package/{mwc-list-item-base.mjs → mwc-list-item-base-803b9771.js} +1 -1
- package/mwc-list-item-base-acef0223.mjs +202 -0
- package/{mwc-list-item.css.mjs → mwc-list-item.css-401e2407.js} +1 -1
- package/mwc-list-item.css-b5481d96.mjs +17 -0
- package/mwc-menu-base-8970b43d.mjs +1145 -0
- package/{mwc-menu-base.mjs → mwc-menu-base-ac49fe54.js} +1 -1
- package/{mwc-radio-base.mjs → mwc-radio-base-442d495a.js} +1 -1
- package/mwc-radio-base-c29e6f42.mjs +528 -0
- package/{mwc-radio.css.mjs → mwc-radio.css-388ad26d.js} +1 -1
- package/mwc-radio.css-4694aa9c.mjs +10 -0
- package/mwc-slider.css-336f809b.mjs +956 -0
- package/{mwc-slider.css.mjs → mwc-slider.css-48f02f1e.js} +16 -16
- package/{mwc-tab-base.mjs → mwc-tab-base-1a19b299.js} +1 -1
- package/mwc-tab-base-7fb3d339.mjs +694 -0
- package/{mwc-top-app-bar-base.mjs → mwc-top-app-bar-base-14e0a018.js} +1 -1
- package/mwc-top-app-bar-base-79c87e69.mjs +380 -0
- package/nav-list-item.js +10 -10
- package/nav-list-item.mjs +31 -31
- package/{observer.mjs → observer-a096ab43.js} +1 -1
- package/observer-be7b92e2.mjs +32 -0
- package/package.json +1 -1
- package/{property.mjs → property-074570d1.js} +1 -1
- package/property-ca27685b.mjs +20 -0
- package/query-1e7846ea.mjs +25 -0
- package/query-2ba749b7.js +5 -0
- package/query-assigned-elements-514e5265.mjs +615 -0
- package/{query-assigned-nodes.mjs → query-assigned-nodes-9ec0fa5f.js} +1 -1
- package/query-assigned-nodes-bea12e0c.mjs +17 -0
- package/radio-list-item.js +1 -1
- package/radio-list-item.mjs +18 -18
- package/radio.js +1 -1
- package/radio.mjs +17 -17
- package/{ripple-handlers.mjs → ripple-handlers-2176f137.js} +7 -7
- package/ripple-handlers-227497d3.mjs +761 -0
- package/select.js +1 -1
- package/select.mjs +20 -20
- package/side-sheet.js +1 -1
- package/side-sheet.mjs +10 -10
- package/slider-range.js +1 -1
- package/slider-range.mjs +14 -14
- package/slider.js +1 -1
- package/slider.mjs +14 -14
- package/snackbar.js +1 -1
- package/snackbar.mjs +9 -9
- package/state-6f7e570d.mjs +12 -0
- package/{state.mjs → state-949232e6.js} +1 -1
- package/status-header-item.js +1 -1
- package/status-header-item.mjs +2 -2
- package/status-header.js +1 -1
- package/status-header.mjs +3 -3
- package/style-map-2cb0fb63.mjs +40 -0
- package/{style-map.mjs → style-map-3056a771.js} +1 -1
- package/style.css +1 -1
- package/switch.js +1 -1
- package/switch.mjs +14 -14
- package/tab-bar.js +1 -1
- package/tab-bar.mjs +13 -13
- package/tab.js +1 -1
- package/tab.mjs +13 -13
- package/text-lockup.js +1 -1
- package/text-lockup.mjs +3 -3
- package/textarea.js +1 -1
- package/textarea.mjs +15 -15
- package/{textfield2.mjs → textfield-276b0ded.mjs} +13 -13
- package/textfield-507c6a06.js +133 -0
- package/textfield.js +1 -1
- package/textfield.mjs +41 -132
- package/toolbar.js +1 -1
- package/toolbar.mjs +8 -8
- package/tooltip.js +1 -1
- package/tooltip.mjs +6 -6
- package/top-app-bar-34e85527.js +6 -0
- package/{top-app-bar2.mjs → top-app-bar-a236c3bc.mjs} +1 -1
- package/top-app-bar-fixed.js +1 -1
- package/top-app-bar-fixed.mjs +9 -9
- package/top-app-bar.js +1 -1
- package/top-app-bar.mjs +30 -6
- package/tree-list-item.js +1 -1
- package/tree-list-item.mjs +3 -3
- package/tree-list.js +1 -1
- package/tree-list.mjs +1 -1
- package/{tslib.es6.mjs → tslib.es6-6b53b818.js} +1 -1
- package/tslib.es6-b5e819a6.mjs +82 -0
- package/typography.js +1 -1
- package/typography.mjs +2 -2
- package/{utils.mjs → utils-a8190a39.js} +1 -1
- package/utils-dc65fdc9.mjs +52 -0
- package/directive-helpers.mjs +0 -5
- package/event-options.mjs +0 -5
- package/if-defined.mjs +0 -5
- package/query.mjs +0 -5
- /package/{aria-property.mjs → aria-property-849c8816.js} +0 -0
- /package/{foundation2.mjs → foundation-e830bd94.js} +0 -0
- /package/{inert.esm.mjs → inert.esm-2cee6f2e.js} +0 -0
- /package/{query-assigned-elements.mjs → query-assigned-elements-07e38f46.js} +0 -0
package/switch.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./query-assigned-elements.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./query-assigned-elements-07e38f46.js"),i=require("./tslib.es6-6b53b818.js"),P=require("./ripple-handlers-2176f137.js"),O=require("./aria-property-849c8816.js"),$=require("./form-element-d4e7bcdb.js"),y=require("./property-074570d1.js"),R=require("./state-949232e6.js"),L=require("./event-options-7bc382d8.js"),S=require("./query-2ba749b7.js"),q=require("./class-map-50b8edb4.js"),k=require("./if-defined-cb12d481.js");require("./base-element-d5abe37a.js");require("./utils-a8190a39.js");require("./style-map-3056a771.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2016 Google Inc.
|
4
4
|
*
|
package/switch.mjs
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import { y as f, i as D, r as F, e as T } from "./query-assigned-elements.mjs";
|
2
|
-
import { b as B, c as x, a as P, d as H, e as I, _ as n } from "./tslib.es6.mjs";
|
3
|
-
import { e as M, R as j } from "./ripple-handlers.mjs";
|
4
|
-
import { a as E } from "./aria-property.mjs";
|
5
|
-
import { F as X } from "./form-element.mjs";
|
6
|
-
import { e as y } from "./property.mjs";
|
7
|
-
import { t as G } from "./state.mjs";
|
8
|
-
import { e as U } from "./event-options.mjs";
|
9
|
-
import { i as $ } from "./query.mjs";
|
10
|
-
import { o as A } from "./class-map.mjs";
|
11
|
-
import { l as O } from "./if-defined.mjs";
|
12
|
-
import "./base-element.mjs";
|
13
|
-
import "./utils.mjs";
|
14
|
-
import "./style-map.mjs";
|
1
|
+
import { y as f, i as D, r as F, e as T } from "./query-assigned-elements-514e5265.mjs";
|
2
|
+
import { b as B, c as x, a as P, d as H, e as I, _ as n } from "./tslib.es6-b5e819a6.mjs";
|
3
|
+
import { e as M, R as j } from "./ripple-handlers-227497d3.mjs";
|
4
|
+
import { a as E } from "./aria-property-fa2717fe.mjs";
|
5
|
+
import { F as X } from "./form-element-6dbd7afa.mjs";
|
6
|
+
import { e as y } from "./property-ca27685b.mjs";
|
7
|
+
import { t as G } from "./state-6f7e570d.mjs";
|
8
|
+
import { e as U } from "./event-options-3937d997.mjs";
|
9
|
+
import { i as $ } from "./query-1e7846ea.mjs";
|
10
|
+
import { o as A } from "./class-map-08c84aeb.mjs";
|
11
|
+
import { l as O } from "./if-defined-639ed018.mjs";
|
12
|
+
import "./base-element-c3dc926e.mjs";
|
13
|
+
import "./utils-dc65fdc9.mjs";
|
14
|
+
import "./style-map-2cb0fb63.mjs";
|
15
15
|
/**
|
16
16
|
* @license
|
17
17
|
* Copyright 2016 Google Inc.
|
package/tab-bar.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./tslib.es6.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./tslib.es6-6b53b818.js"),f=require("./query-assigned-elements-07e38f46.js"),C=require("./mwc-tab-base-1a19b299.js"),x=require("./base-element-d5abe37a.js"),R=require("./event-options-7bc382d8.js"),g=require("./query-2ba749b7.js"),L=require("./utils-a8190a39.js"),I=require("./observer-a096ab43.js"),O=require("./property-074570d1.js");require("./class-map-50b8edb4.js");require("./ripple-handlers-2176f137.js");require("./state-949232e6.js");require("./style-map-3056a771.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2021 Google LLC
|
4
4
|
* SPDX-LIcense-Identifier: Apache-2.0
|
package/tab-bar.mjs
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
import { _ as u, a as g, b as S, e as P } from "./tslib.es6.mjs";
|
2
|
-
import { i as R, e as x, y as I } from "./query-assigned-elements.mjs";
|
3
|
-
import { T as O } from "./mwc-tab-base.mjs";
|
4
|
-
import { B as w } from "./base-element.mjs";
|
5
|
-
import { e as D } from "./event-options.mjs";
|
6
|
-
import { i as b } from "./query.mjs";
|
7
|
-
import { a as M } from "./utils.mjs";
|
8
|
-
import { o as K } from "./observer.mjs";
|
9
|
-
import { e as W } from "./property.mjs";
|
10
|
-
import "./class-map.mjs";
|
11
|
-
import "./ripple-handlers.mjs";
|
12
|
-
import "./state.mjs";
|
13
|
-
import "./style-map.mjs";
|
1
|
+
import { _ as u, a as g, b as S, e as P } from "./tslib.es6-b5e819a6.mjs";
|
2
|
+
import { i as R, e as x, y as I } from "./query-assigned-elements-514e5265.mjs";
|
3
|
+
import { T as O } from "./mwc-tab-base-7fb3d339.mjs";
|
4
|
+
import { B as w } from "./base-element-c3dc926e.mjs";
|
5
|
+
import { e as D } from "./event-options-3937d997.mjs";
|
6
|
+
import { i as b } from "./query-1e7846ea.mjs";
|
7
|
+
import { a as M } from "./utils-dc65fdc9.mjs";
|
8
|
+
import { o as K } from "./observer-be7b92e2.mjs";
|
9
|
+
import { e as W } from "./property-ca27685b.mjs";
|
10
|
+
import "./class-map-08c84aeb.mjs";
|
11
|
+
import "./ripple-handlers-227497d3.mjs";
|
12
|
+
import "./state-6f7e570d.mjs";
|
13
|
+
import "./style-map-2cb0fb63.mjs";
|
14
14
|
/**
|
15
15
|
* @license
|
16
16
|
* Copyright 2021 Google LLC
|
package/tab.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./query-assigned-elements.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./query-assigned-elements-07e38f46.js"),n=require("./mwc-tab-base-1a19b299.js");require("./tslib.es6-6b53b818.js");require("./base-element-d5abe37a.js");require("./utils-a8190a39.js");require("./property-074570d1.js");require("./query-2ba749b7.js");require("./class-map-50b8edb4.js");require("./ripple-handlers-2176f137.js");require("./state-949232e6.js");require("./style-map-3056a771.js");require("./observer-a096ab43.js");require("./event-options-7bc382d8.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2021 Google LLC
|
4
4
|
* SPDX-LIcense-Identifier: Apache-2.0
|
package/tab.mjs
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
import { i as n, r as p, e as m } from "./query-assigned-elements.mjs";
|
2
|
-
import { T as l } from "./mwc-tab-base.mjs";
|
3
|
-
import "./tslib.es6.mjs";
|
4
|
-
import "./base-element.mjs";
|
5
|
-
import "./utils.mjs";
|
6
|
-
import "./property.mjs";
|
7
|
-
import "./query.mjs";
|
8
|
-
import "./class-map.mjs";
|
9
|
-
import "./ripple-handlers.mjs";
|
10
|
-
import "./state.mjs";
|
11
|
-
import "./style-map.mjs";
|
12
|
-
import "./observer.mjs";
|
13
|
-
import "./event-options.mjs";
|
1
|
+
import { i as n, r as p, e as m } from "./query-assigned-elements-514e5265.mjs";
|
2
|
+
import { T as l } from "./mwc-tab-base-7fb3d339.mjs";
|
3
|
+
import "./tslib.es6-b5e819a6.mjs";
|
4
|
+
import "./base-element-c3dc926e.mjs";
|
5
|
+
import "./utils-dc65fdc9.mjs";
|
6
|
+
import "./property-ca27685b.mjs";
|
7
|
+
import "./query-1e7846ea.mjs";
|
8
|
+
import "./class-map-08c84aeb.mjs";
|
9
|
+
import "./ripple-handlers-227497d3.mjs";
|
10
|
+
import "./state-6f7e570d.mjs";
|
11
|
+
import "./style-map-2cb0fb63.mjs";
|
12
|
+
import "./observer-be7b92e2.mjs";
|
13
|
+
import "./event-options-3937d997.mjs";
|
14
14
|
/**
|
15
15
|
* @license
|
16
16
|
* Copyright 2021 Google LLC
|
package/text-lockup.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./query-assigned-elements.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./query-assigned-elements-07e38f46.js"),n=require("./property-074570d1.js"),l=require("./class-map-50b8edb4.js"),y=`.subtext--trailing{display:flex;flex-direction:column-reverse}.subtext{display:flex;align-items:center;--mdc-icon-size: 16px;color:var(--mdc-theme-text-secondary-on-background);font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);font-weight:var(--mdc-typography-caption-font-weight);line-height:var(--mdc-typography-caption-line-height);margin-bottom:2px}.subtext cv-icon{margin-right:8px}slot{font-family:var(--mdc-typography-body1-font-family);font-size:var(--mdc-typography-body1-font-size);font-weight:var(--mdc-typography-body1-font-weight);line-height:var(--mdc-typography-body1-line-height);margin-bottom:8px}.scale--large .subtext{--mdc-icon-size: 24px;font-family:var(--mdc-typography-body1-font-family);font-size:var(--mdc-typography-body1-font-size);font-weight:var(--mdc-typography-body1-font-weight);line-height:var(--mdc-typography-body1-line-height);margin-bottom:2px}.scale--large slot{font-family:var(--mdc-typography-headline4-font-family);font-size:var(--mdc-typography-headline4-font-size);font-weight:var(--mdc-typography-headline4-font-weight);line-height:var(--mdc-typography-headline4-line-height);margin-bottom:8px}.subtext-state--positive .subtext{color:var(--mdc-theme-positive)}.subtext-state--negative .subtext{color:var(--mdc-theme-negative)}.subtext-state--caution .subtext{color:var(--mdc-theme-caution)}.subtext-state--active .subtext{color:var(--mdc-theme-accent)}
|
2
2
|
`;var h=Object.defineProperty,u=Object.getOwnPropertyDescriptor,a=(r,t,s,i)=>{for(var e=i>1?void 0:i?u(t,s):t,c=r.length-1,p;c>=0;c--)(p=r[c])&&(e=(i?p(t,s,e):p(e))||e);return i&&e&&h(t,s,e),e};exports.CovalentTextLockup=class extends o.s{constructor(){super(...arguments),this.scale="small",this.trailingSubText=!1}render(){const t={"subtext--trailing":this.trailingSubText};return t[`scale--${this.scale}`]=!0,this.state&&(t[`subtext-state--${this.state}`]=!0),o.y`<span class="${l.o(t)}"
|
3
3
|
><span class="subtext">${this.renderIcon()}${this.subText}</span
|
4
4
|
><slot></slot
|
package/text-lockup.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { i as h, r as y, s as m, y as l, b as g, e as f } from "./query-assigned-elements.mjs";
|
2
|
-
import { e as i } from "./property.mjs";
|
3
|
-
import { o as d } from "./class-map.mjs";
|
1
|
+
import { i as h, r as y, s as m, y as l, b as g, e as f } from "./query-assigned-elements-514e5265.mjs";
|
2
|
+
import { e as i } from "./property-ca27685b.mjs";
|
3
|
+
import { o as d } from "./class-map-08c84aeb.mjs";
|
4
4
|
const v = `.subtext--trailing{display:flex;flex-direction:column-reverse}.subtext{display:flex;align-items:center;--mdc-icon-size: 16px;color:var(--mdc-theme-text-secondary-on-background);font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);font-weight:var(--mdc-typography-caption-font-weight);line-height:var(--mdc-typography-caption-line-height);margin-bottom:2px}.subtext cv-icon{margin-right:8px}slot{font-family:var(--mdc-typography-body1-font-family);font-size:var(--mdc-typography-body1-font-size);font-weight:var(--mdc-typography-body1-font-weight);line-height:var(--mdc-typography-body1-line-height);margin-bottom:8px}.scale--large .subtext{--mdc-icon-size: 24px;font-family:var(--mdc-typography-body1-font-family);font-size:var(--mdc-typography-body1-font-size);font-weight:var(--mdc-typography-body1-font-weight);line-height:var(--mdc-typography-body1-line-height);margin-bottom:2px}.scale--large slot{font-family:var(--mdc-typography-headline4-font-family);font-size:var(--mdc-typography-headline4-font-size);font-weight:var(--mdc-typography-headline4-font-weight);line-height:var(--mdc-typography-headline4-line-height);margin-bottom:8px}.subtext-state--positive .subtext{color:var(--mdc-theme-positive)}.subtext-state--negative .subtext{color:var(--mdc-theme-negative)}.subtext-state--caution .subtext{color:var(--mdc-theme-caution)}.subtext-state--active .subtext{color:var(--mdc-theme-accent)}
|
5
5
|
`;
|
6
6
|
var u = Object.defineProperty, b = Object.getOwnPropertyDescriptor, a = (o, r, n, s) => {
|
package/textarea.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./query-assigned-elements.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./query-assigned-elements-07e38f46.js"),n=require("./tslib.es6-6b53b818.js"),f=require("./textfield-507c6a06.js"),x=require("./property-074570d1.js"),s=require("./query-2ba749b7.js"),p=require("./class-map-50b8edb4.js"),a=require("./if-defined-cb12d481.js");require("./mwc-line-ripple-directive-a97ce725.js");require("./base-element-d5abe37a.js");require("./utils-a8190a39.js");require("./form-element-d4e7bcdb.js");require("./observer-a096ab43.js");require("./state-949232e6.js");require("./event-options-7bc382d8.js");require("./directive-helpers-fce8cf91.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2019 Google LLC
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
package/textarea.mjs
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
import { y as s, i as f, r as p, e as h } from "./query-assigned-elements.mjs";
|
2
|
-
import { _ as n } from "./tslib.es6.mjs";
|
3
|
-
import { T as g, l as b, s as u } from "./
|
4
|
-
import { e as x } from "./property.mjs";
|
5
|
-
import { i as _ } from "./query.mjs";
|
6
|
-
import { o as v } from "./class-map.mjs";
|
7
|
-
import { l as o } from "./if-defined.mjs";
|
8
|
-
import "./mwc-line-ripple-directive.mjs";
|
9
|
-
import "./base-element.mjs";
|
10
|
-
import "./utils.mjs";
|
11
|
-
import "./form-element.mjs";
|
12
|
-
import "./observer.mjs";
|
13
|
-
import "./state.mjs";
|
14
|
-
import "./event-options.mjs";
|
15
|
-
import "./directive-helpers.mjs";
|
1
|
+
import { y as s, i as f, r as p, e as h } from "./query-assigned-elements-514e5265.mjs";
|
2
|
+
import { _ as n } from "./tslib.es6-b5e819a6.mjs";
|
3
|
+
import { T as g, l as b, s as u } from "./textfield-276b0ded.mjs";
|
4
|
+
import { e as x } from "./property-ca27685b.mjs";
|
5
|
+
import { i as _ } from "./query-1e7846ea.mjs";
|
6
|
+
import { o as v } from "./class-map-08c84aeb.mjs";
|
7
|
+
import { l as o } from "./if-defined-639ed018.mjs";
|
8
|
+
import "./mwc-line-ripple-directive-c3e1f04a.mjs";
|
9
|
+
import "./base-element-c3dc926e.mjs";
|
10
|
+
import "./utils-dc65fdc9.mjs";
|
11
|
+
import "./form-element-6dbd7afa.mjs";
|
12
|
+
import "./observer-be7b92e2.mjs";
|
13
|
+
import "./state-6f7e570d.mjs";
|
14
|
+
import "./event-options-3937d997.mjs";
|
15
|
+
import "./directive-helpers-725a181d.mjs";
|
16
16
|
/**
|
17
17
|
* @license
|
18
18
|
* Copyright 2019 Google LLC
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import { a as H, b as C, c as b, _ as a } from "./tslib.es6.mjs";
|
2
|
-
import { f as $, l as w } from "./mwc-line-ripple-directive.mjs";
|
3
|
-
import { F as B } from "./form-element.mjs";
|
4
|
-
import { o as E } from "./observer.mjs";
|
5
|
-
import { x, b as U, y as c } from "./query-assigned-elements.mjs";
|
6
|
-
import { e as l } from "./property.mjs";
|
7
|
-
import { t as I } from "./state.mjs";
|
8
|
-
import { e as _ } from "./event-options.mjs";
|
9
|
-
import { i as y } from "./query.mjs";
|
10
|
-
import { e as T, i as M, t as v, o as L } from "./class-map.mjs";
|
11
|
-
import { l as u } from "./if-defined.mjs";
|
12
|
-
import { e as k, s as S } from "./directive-helpers.mjs";
|
13
|
-
import { a as D } from "./utils.mjs";
|
1
|
+
import { a as H, b as C, c as b, _ as a } from "./tslib.es6-b5e819a6.mjs";
|
2
|
+
import { f as $, l as w } from "./mwc-line-ripple-directive-c3e1f04a.mjs";
|
3
|
+
import { F as B } from "./form-element-6dbd7afa.mjs";
|
4
|
+
import { o as E } from "./observer-be7b92e2.mjs";
|
5
|
+
import { x, b as U, y as c } from "./query-assigned-elements-514e5265.mjs";
|
6
|
+
import { e as l } from "./property-ca27685b.mjs";
|
7
|
+
import { t as I } from "./state-6f7e570d.mjs";
|
8
|
+
import { e as _ } from "./event-options-3937d997.mjs";
|
9
|
+
import { i as y } from "./query-1e7846ea.mjs";
|
10
|
+
import { e as T, i as M, t as v, o as L } from "./class-map-08c84aeb.mjs";
|
11
|
+
import { l as u } from "./if-defined-639ed018.mjs";
|
12
|
+
import { e as k, s as S } from "./directive-helpers-725a181d.mjs";
|
13
|
+
import { a as D } from "./utils-dc65fdc9.mjs";
|
14
14
|
/**
|
15
15
|
* @license
|
16
16
|
* Copyright 2016 Google Inc.
|
@@ -0,0 +1,133 @@
|
|
1
|
+
"use strict";const a=require("./tslib.es6-6b53b818.js"),L=require("./mwc-line-ripple-directive-a97ce725.js"),R=require("./form-element-d4e7bcdb.js"),A=require("./observer-a096ab43.js"),u=require("./query-assigned-elements-07e38f46.js"),l=require("./property-074570d1.js"),b=require("./state-949232e6.js"),E=require("./event-options-7bc382d8.js"),y=require("./query-2ba749b7.js"),p=require("./class-map-50b8edb4.js"),h=require("./if-defined-cb12d481.js"),I=require("./directive-helpers-fce8cf91.js"),H=require("./utils-a8190a39.js");/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2016 Google Inc.
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
13
|
+
* all copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
* THE SOFTWARE.
|
22
|
+
*/var $=function(){function s(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(s,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(s,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(s,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(s,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),s.prototype.init=function(){},s.prototype.destroy=function(){},s}();/**
|
23
|
+
* @license
|
24
|
+
* Copyright 2016 Google Inc.
|
25
|
+
*
|
26
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
27
|
+
* of this software and associated documentation files (the "Software"), to deal
|
28
|
+
* in the Software without restriction, including without limitation the rights
|
29
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
30
|
+
* copies of the Software, and to permit persons to whom the Software is
|
31
|
+
* furnished to do so, subject to the following conditions:
|
32
|
+
*
|
33
|
+
* The above copyright notice and this permission notice shall be included in
|
34
|
+
* all copies or substantial portions of the Software.
|
35
|
+
*
|
36
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
37
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
38
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
39
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
40
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
41
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
42
|
+
* THE SOFTWARE.
|
43
|
+
*/var x={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},w={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},_={LABEL_SCALE:.75},B=["pattern","min","max","required","step","minlength","maxlength"],U=["color","date","datetime-local","month","range","time","week"];/**
|
44
|
+
* @license
|
45
|
+
* Copyright 2016 Google Inc.
|
46
|
+
*
|
47
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
48
|
+
* of this software and associated documentation files (the "Software"), to deal
|
49
|
+
* in the Software without restriction, including without limitation the rights
|
50
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
51
|
+
* copies of the Software, and to permit persons to whom the Software is
|
52
|
+
* furnished to do so, subject to the following conditions:
|
53
|
+
*
|
54
|
+
* The above copyright notice and this permission notice shall be included in
|
55
|
+
* all copies or substantial portions of the Software.
|
56
|
+
*
|
57
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
58
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
59
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
60
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
61
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
62
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
63
|
+
* THE SOFTWARE.
|
64
|
+
*/var F=["mousedown","touchstart"],C=["click","keydown"],T=function(s){a.__extends(e,s);function e(t,i){i===void 0&&(i={});var n=s.call(this,a.__assign(a.__assign({},e.defaultAdapter),t))||this;return n.isFocused=!1,n.receivedUserInput=!1,n.valid=!0,n.useNativeValidation=!0,n.validateOnValueChange=!0,n.helperText=i.helperText,n.characterCounter=i.characterCounter,n.leadingIcon=i.leadingIcon,n.trailingIcon=i.trailingIcon,n.inputFocusHandler=function(){n.activateFocus()},n.inputBlurHandler=function(){n.deactivateFocus()},n.inputInputHandler=function(){n.handleInput()},n.setPointerXOffset=function(o){n.setTransformOrigin(o)},n.textFieldInteractionHandler=function(){n.handleTextFieldInteraction()},n.validationAttributeChangeHandler=function(o){n.handleValidationAttributeChange(o)},n}return Object.defineProperty(e,"cssClasses",{get:function(){return w},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return U.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,i,n,o;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var d=a.__values(F),c=d.next();!c.done;c=d.next()){var m=c.value;this.adapter.registerInputInteractionHandler(m,this.setPointerXOffset)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(t)throw t.error}}try{for(var v=a.__values(C),f=v.next();!f.done;f=v.next()){var m=f.value;this.adapter.registerTextFieldInteractionHandler(m,this.textFieldInteractionHandler)}}catch(g){n={error:g}}finally{try{f&&!f.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,i,n,o;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var d=a.__values(F),c=d.next();!c.done;c=d.next()){var m=c.value;this.adapter.deregisterInputInteractionHandler(m,this.setPointerXOffset)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(t)throw t.error}}try{for(var v=a.__values(C),f=v.next();!f.done;f=v.next()){var m=f.value;this.adapter.deregisterTextFieldInteractionHandler(m,this.textFieldInteractionHandler)}}catch(g){n={error:g}}finally{try{f&&!f.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var i=this;t.some(function(n){return B.indexOf(n)>-1?(i.styleValidity(!0),i.adapter.setLabelRequired(i.getNativeInput().required),!0):!1}),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(!(!this.adapter.hasOutline()||!this.adapter.hasLabel()))if(t){var i=this.adapter.getLabelWidth()*_.LABEL_SCALE;this.adapter.notchOutline(i)}else this.adapter.closeOutline()},e.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.helperText&&(this.helperText.isPersistent()||!this.helperText.isValidation()||!this.valid)&&this.helperText.showToScreenReader()},e.prototype.setTransformOrigin=function(t){if(!(this.isDisabled()||this.adapter.hasOutline())){var i=t.touches,n=i?i[0]:t,o=n.target.getBoundingClientRect(),d=n.clientX-o.left;this.adapter.setLineRippleTransformOrigin(d)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var i=this.isValid();this.styleValidity(i)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var i=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(i)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var i=this.getNativeInput().maxLength;if(i===-1)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,i)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var i=e.cssClasses.INVALID;if(t?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText){this.helperText.setValidity(t);var n=this.helperText.isValidation();if(!n)return;var o=this.helperText.isVisible(),d=this.helperText.getId();o&&d?this.adapter.setInputAttr(x.ARIA_DESCRIBEDBY,d):this.adapter.removeInputAttr(x.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var i=e.cssClasses.FOCUSED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.styleDisabled=function(t){var i=e.cssClasses,n=i.DISABLED,o=i.INVALID;t?(this.adapter.addClass(n),this.adapter.removeClass(o)):this.adapter.removeClass(n),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},e.prototype.styleFloating=function(t){var i=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.getNativeInput=function(){var t=this.adapter?this.adapter.getNativeInput():null;return t||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}($);const M=T;/**
|
65
|
+
* @license
|
66
|
+
* Copyright 2020 Google LLC
|
67
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
68
|
+
*/const V=p.e(class extends p.i{constructor(s){if(super(s),s.type!==p.t.PROPERTY&&s.type!==p.t.ATTRIBUTE&&s.type!==p.t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!I.e(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[e]){if(e===u.x||e===u.b)return e;const t=s.element,i=s.name;if(s.type===p.t.PROPERTY){if(e===t[i])return u.x}else if(s.type===p.t.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return u.x}else if(s.type===p.t.ATTRIBUTE&&t.getAttribute(i)===e+"")return u.x;return I.s(s),e}});/**
|
69
|
+
* @license
|
70
|
+
* Copyright 2019 Google LLC
|
71
|
+
* SPDX-License-Identifier: Apache-2.0
|
72
|
+
*/const q=["touchstart","touchmove","scroll","mousewheel"],O=(s={})=>{const e={};for(const t in s)e[t]=s[t];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)};class r extends R.FormElement{constructor(){super(...arguments),this.mdcFoundationClass=M,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=O(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&typeof this.value!="string"&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&this.maxLength!==-1,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return u.y`
|
73
|
+
<label class="mdc-text-field ${p.o(i)}">
|
74
|
+
${this.renderRipple()}
|
75
|
+
${this.outlined?this.renderOutline():this.renderLabel()}
|
76
|
+
${this.renderLeadingIcon()}
|
77
|
+
${this.renderPrefix()}
|
78
|
+
${this.renderInput(t)}
|
79
|
+
${this.renderSuffix()}
|
80
|
+
${this.renderTrailingIcon()}
|
81
|
+
${this.renderLineRipple()}
|
82
|
+
</label>
|
83
|
+
${this.renderHelperText(t,e)}
|
84
|
+
`}updated(e){e.has("value")&&e.get("value")!==void 0&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":u.y`
|
85
|
+
<span class="mdc-text-field__ripple"></span>
|
86
|
+
`}renderOutline(){return this.outlined?u.y`
|
87
|
+
<mwc-notched-outline
|
88
|
+
.width=${this.outlineWidth}
|
89
|
+
.open=${this.outlineOpen}
|
90
|
+
class="mdc-notched-outline">
|
91
|
+
${this.renderLabel()}
|
92
|
+
</mwc-notched-outline>`:""}renderLabel(){return this.label?u.y`
|
93
|
+
<span
|
94
|
+
.floatingLabelFoundation=${L.floatingLabel(this.label)}
|
95
|
+
id="label">${this.label}</span>
|
96
|
+
`:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(e,t=!1){const i={"mdc-text-field__icon--leading":!t,"mdc-text-field__icon--trailing":t};return u.y`<i class="material-icons mdc-text-field__icon ${p.o(i)}">${e}</i>`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(e,t=!1){const i={"mdc-text-field__affix--prefix":!t,"mdc-text-field__affix--suffix":t};return u.y`<span class="mdc-text-field__affix ${p.o(i)}">
|
97
|
+
${e}</span>`}renderInput(e){const t=this.minLength===-1?void 0:this.minLength,i=this.maxLength===-1?void 0:this.maxLength,n=this.autocapitalize?this.autocapitalize:void 0,o=this.validationMessage&&!this.isUiValid,d=this.label?"label":void 0,c=e?"helper-text":void 0,m=this.focused||this.helperPersistent||o?"helper-text":void 0;return u.y`
|
98
|
+
<input
|
99
|
+
aria-labelledby=${h.l(d)}
|
100
|
+
aria-controls="${h.l(c)}"
|
101
|
+
aria-describedby="${h.l(m)}"
|
102
|
+
class="mdc-text-field__input"
|
103
|
+
type="${this.type}"
|
104
|
+
.value="${V(this.value)}"
|
105
|
+
?disabled="${this.disabled}"
|
106
|
+
placeholder="${this.placeholder}"
|
107
|
+
?required="${this.required}"
|
108
|
+
?readonly="${this.readOnly}"
|
109
|
+
minlength="${h.l(t)}"
|
110
|
+
maxlength="${h.l(i)}"
|
111
|
+
pattern="${h.l(this.pattern?this.pattern:void 0)}"
|
112
|
+
min="${h.l(this.min===""?void 0:this.min)}"
|
113
|
+
max="${h.l(this.max===""?void 0:this.max)}"
|
114
|
+
step="${h.l(this.step===null?void 0:this.step)}"
|
115
|
+
size="${h.l(this.size===null?void 0:this.size)}"
|
116
|
+
name="${h.l(this.name===""?void 0:this.name)}"
|
117
|
+
inputmode="${h.l(this.inputMode)}"
|
118
|
+
autocapitalize="${h.l(n)}"
|
119
|
+
@input="${this.handleInputChange}"
|
120
|
+
@focus="${this.onInputFocus}"
|
121
|
+
@blur="${this.onInputBlur}">`}renderLineRipple(){return this.outlined?"":u.y`
|
122
|
+
<span .lineRippleFoundation=${L.lineRipple()}></span>
|
123
|
+
`}renderHelperText(e,t){const i=this.validationMessage&&!this.isUiValid,n={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},o=this.focused||this.helperPersistent||i?void 0:"true",d=i?this.validationMessage:this.helper;return e?u.y`
|
124
|
+
<div class="mdc-text-field-helper-line">
|
125
|
+
<div id="helper-text"
|
126
|
+
aria-hidden="${h.l(o)}"
|
127
|
+
class="mdc-text-field-helper-text ${p.o(n)}"
|
128
|
+
>${d}</div>
|
129
|
+
${this.renderCharCounter(t)}
|
130
|
+
</div>`:""}renderCharCounter(e){const t=Math.min(this.value.length,this.maxLength);return e?u.y`
|
131
|
+
<span class="mdc-text-field-character-counter"
|
132
|
+
>${t} / ${this.maxLength}</span>`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const e=this._checkValidity(this.value);if(!e){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return e}reportValidity(){const e=this.checkValidity();return this.mdcFoundation.setValid(e),this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=O(t);if(this.validityTransform){const n=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),n),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(e,t)=>this.addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>this.removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=o=>o.map(d=>d.attributeName).filter(d=>d),i=new MutationObserver(o=>{e(t(o))}),n={attributes:!0};return i.observe(this.formElement,n),i},deregisterValidationAttributeChangeHandler:e=>e.disconnect()},H.addHasRemoveClass(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>this.shadowRoot?this.shadowRoot.activeElement===this.formElement:!1,registerInputInteractionHandler:(e,t)=>this.formElement.addEventListener(e,t,{passive:e in q}),deregisterInputInteractionHandler:(e,t)=>this.formElement.removeEventListener(e,t)}}getLabelAdapterMethods(){return{floatLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(e),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(e),setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:e=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}}}async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await((e=this.outlineElement)===null||e===void 0?void 0:e.updateComplete),t}firstUpdated(){var e;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),(e=this.outlineElement)===null||e===void 0||e.updateComplete.then(()=>{var t;this.outlineWidth=((t=this.labelElement)===null||t===void 0?void 0:t.floatingLabelFoundation.getWidth())||0})}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const e=this.labelElement;if(!e){this.outlineOpen=!1;return}const t=!!this.label&&!!this.value;if(e.floatingLabelFoundation.float(t),!this.outlined)return;this.outlineOpen=t,await this.updateComplete;const i=e.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}a.__decorate([y.i(".mdc-text-field")],r.prototype,"mdcRoot",void 0);a.__decorate([y.i("input")],r.prototype,"formElement",void 0);a.__decorate([y.i(".mdc-floating-label")],r.prototype,"labelElement",void 0);a.__decorate([y.i(".mdc-line-ripple")],r.prototype,"lineRippleElement",void 0);a.__decorate([y.i("mwc-notched-outline")],r.prototype,"outlineElement",void 0);a.__decorate([y.i(".mdc-notched-outline__notch")],r.prototype,"notchElement",void 0);a.__decorate([l.e({type:String})],r.prototype,"value",void 0);a.__decorate([l.e({type:String})],r.prototype,"type",void 0);a.__decorate([l.e({type:String})],r.prototype,"placeholder",void 0);a.__decorate([l.e({type:String}),A.observer(function(s,e){e!==void 0&&this.label!==e&&this.layout()})],r.prototype,"label",void 0);a.__decorate([l.e({type:String})],r.prototype,"icon",void 0);a.__decorate([l.e({type:String})],r.prototype,"iconTrailing",void 0);a.__decorate([l.e({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0);a.__decorate([l.e({type:Boolean})],r.prototype,"required",void 0);a.__decorate([l.e({type:Number})],r.prototype,"minLength",void 0);a.__decorate([l.e({type:Number})],r.prototype,"maxLength",void 0);a.__decorate([l.e({type:Boolean,reflect:!0}),A.observer(function(s,e){e!==void 0&&this.outlined!==e&&this.layout()})],r.prototype,"outlined",void 0);a.__decorate([l.e({type:String})],r.prototype,"helper",void 0);a.__decorate([l.e({type:Boolean})],r.prototype,"validateOnInitialRender",void 0);a.__decorate([l.e({type:String})],r.prototype,"validationMessage",void 0);a.__decorate([l.e({type:Boolean})],r.prototype,"autoValidate",void 0);a.__decorate([l.e({type:String})],r.prototype,"pattern",void 0);a.__decorate([l.e({type:String})],r.prototype,"min",void 0);a.__decorate([l.e({type:String})],r.prototype,"max",void 0);a.__decorate([l.e({type:String})],r.prototype,"step",void 0);a.__decorate([l.e({type:Number})],r.prototype,"size",void 0);a.__decorate([l.e({type:Boolean})],r.prototype,"helperPersistent",void 0);a.__decorate([l.e({type:Boolean})],r.prototype,"charCounter",void 0);a.__decorate([l.e({type:Boolean})],r.prototype,"endAligned",void 0);a.__decorate([l.e({type:String})],r.prototype,"prefix",void 0);a.__decorate([l.e({type:String})],r.prototype,"suffix",void 0);a.__decorate([l.e({type:String})],r.prototype,"name",void 0);a.__decorate([l.e({type:String})],r.prototype,"inputMode",void 0);a.__decorate([l.e({type:Boolean})],r.prototype,"readOnly",void 0);a.__decorate([l.e({type:String})],r.prototype,"autocapitalize",void 0);a.__decorate([b.t()],r.prototype,"outlineOpen",void 0);a.__decorate([b.t()],r.prototype,"outlineWidth",void 0);a.__decorate([b.t()],r.prototype,"isUiValid",void 0);a.__decorate([b.t()],r.prototype,"focused",void 0);a.__decorate([E.e({passive:!0})],r.prototype,"handleInputChange",null);const k=`:host{--mdc-text-field-label-ink-color: var(--mdc-theme-text-secondary-on-background);--mdc-text-field-ink-color: var(--mdc-theme-text-secondary-on-background);--mdc-text-field-fill-color: var(--mdc-theme-surface-canvas);--mdc-text-field-idle-line-color: var(--mdc-theme-border);--mdc-text-field-hover-line-color: var(--mdc-theme-text-icon-on-background);--mdc-text-field-outlined-idle-border-color: var(--mdc-theme-border);--mdc-text-field-outlined-hover-border-color: var(--mdc-theme-text-icon-on-background)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--mdc-theme-text-icon-on-background)}
|
133
|
+
`;exports.TextFieldBase=r;exports.l=V;exports.styles=k;
|
package/textfield.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./query-assigned-elements.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./query-assigned-elements-07e38f46.js"),c=require("./textfield-507c6a06.js");require("./tslib.es6-6b53b818.js");require("./mwc-line-ripple-directive-a97ce725.js");require("./base-element-d5abe37a.js");require("./utils-a8190a39.js");require("./property-074570d1.js");require("./query-2ba749b7.js");require("./class-map-50b8edb4.js");require("./form-element-d4e7bcdb.js");require("./observer-a096ab43.js");require("./state-949232e6.js");require("./event-options-7bc382d8.js");require("./if-defined-cb12d481.js");require("./directive-helpers-fce8cf91.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2021 Google LLC
|
4
4
|
* SPDX-LIcense-Identifier: Apache-2.0
|