@covalent/components 8.7.0-beta.8 → 8.7.0-beta.9

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/nav-list-item.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./query-assigned-elements-f623705d.js"),c=require("./property-57f6f6fe.js"),h=require("./list-item.js"),d=require("./list-item-bb932090.js");require("./mwc-list-item-base-297d86b0.js");require("./tslib.es6-98719205.js");require("./ripple-handlers-5d5b21db.js");require("./base-element-58a3f9ea.js");require("./utils-a8190a39.js");require("./state-0974a8e5.js");require("./query-680f1868.js");require("./class-map-b5efe8da.js");require("./style-map-88d2563f.js");require("./observer-a096ab43.js");const p=`:host{font-family:var(--mdc-typography-font-family);font-size:var(--mdc-typography-body2-font-size);font-weight:600;line-height:var(--mdc-typography-body2-line-height);text-align:left;border-radius:var(--cv-list-item-border-radius, 100px);transition:border-radius .1s ease-out;width:var(--cv-list-item-width, 100%);--mdc-list-item-graphic-margin: 4px}::slotted(.section-selector){display:none;position:absolute;top:0;right:0}:host([activated]) ::slotted(cv-icon[slot=graphic]){color:var(--mdc-theme-primary)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{margin-left:var(--cv-list-item-graphic-margin-left, 12px);padding-left:4px}:host([graphic=avatar]){padding:0}:host([graphic=avatar]:not([twoline])){height:48px}:host(.beta-list-item){--mdc-theme-primary: var(--mdc-theme-surface-caution);--mdc-list-item-meta-size: 20px;--mdc-list-item-graphic-size: 40px;--mdc-list-item-graphic-margin: 0;--mdc-typography-subtitle1-font-size: var( --mdc-typography-subtitle2-font-size );--mdc-typography-body2-font-size: var(--mdc-typography-caption-font-size);margin-bottom:8px;margin-right:0;border-radius:0;height:48px;font-size:0;padding:0 0 0 15px}:host([hasChildren]){flex-direction:column;overflow:visible;height:inherit!important;background:none;padding:0;--mdc-list-side-padding: 0;--cv-list-item-graphic-margin-left: 0}:host([hasChildren][open]:hover:not([activated])) .expansion-header{--mdc-ripple-color: transparent}:host([hasChildren][open]:hover:not([activated])) .expansion-header:hover{--mdc-ripple-color: var(--mdc-theme-primary)}.expansion-header{position:relative;height:48px;width:100%;overflow:visible;display:flex;flex-shrink:0;align-items:center}.expansion-header mwc-ripple{border-radius:var(--cv-list-item-border-radius);overflow:hidden}.expansion-header-inner{padding:0 16px}.expansion-icon{margin-right:var(--cv-list-item-expansion-icon-margin, 0);font-size:var(--cv-list-item-expansion-icon-size, --mdc-icon-size);color:var(--cv-list-item-text-icon-on-background, var(--mdc-theme-text-icon-on-background))}.expansion-panel{display:block;width:100%;height:var(--cv-list-menu-height, 0);--mdc-list-side-padding: 72px;transition:transform .15s ease-out;overflow:hidden}:host([open][hasChildren]:not([twoline])){height:inherit;display:flex;flex-direction:column;border-radius:0}:host([open][hasChildren]:not([twoline])) .expansion-panel{transition:min-height .25s ease-in;height:var(--cv-list-menu-height, inherit)}
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./query-assigned-elements-f623705d.js"),c=require("./property-57f6f6fe.js"),h=require("./list-item.js"),d=require("./list-item-bb932090.js");require("./mwc-list-item-base-297d86b0.js");require("./tslib.es6-98719205.js");require("./ripple-handlers-5d5b21db.js");require("./base-element-58a3f9ea.js");require("./utils-a8190a39.js");require("./state-0974a8e5.js");require("./query-680f1868.js");require("./class-map-b5efe8da.js");require("./style-map-88d2563f.js");require("./observer-a096ab43.js");const p=`:host{font-family:var(--mdc-typography-font-family);font-size:var(--mdc-typography-body2-font-size);font-weight:600;line-height:var(--mdc-typography-body2-line-height);text-align:left;border-radius:var(--cv-list-item-border-radius, 100px);transition:border-radius .1s ease-out;width:var(--cv-list-item-width, 100%);--mdc-list-item-graphic-margin: 4px}::slotted(.section-selector){display:none;position:absolute;top:0;right:0}:host([activated]) ::slotted(cv-icon[slot=graphic]){color:var(--mdc-theme-primary)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{--mdc-theme-text-icon-on-background: var(--cv-theme-on-surface);margin-left:var(--cv-list-item-graphic-margin-left, 12px);padding-left:4px;background-color:transparent}:host([graphic=avatar]){padding:0;background-color:transparent}:host([graphic=avatar]:not([twoline])){height:48px}:host(.beta-list-item){--mdc-theme-primary: var(--mdc-theme-surface-caution);--mdc-list-item-meta-size: 20px;--mdc-list-item-graphic-size: 40px;--mdc-list-item-graphic-margin: 0;--mdc-typography-subtitle1-font-size: var( --mdc-typography-subtitle2-font-size );--mdc-typography-body2-font-size: var(--mdc-typography-caption-font-size);margin-bottom:8px;margin-right:0;border-radius:0;height:48px;font-size:0;padding:0 0 0 15px}:host([hasChildren]){flex-direction:column;overflow:visible;height:inherit!important;background:none;padding:0;--mdc-list-side-padding: 0;--cv-list-item-graphic-margin-left: 0}:host([hasChildren][open]:hover:not([activated])) .expansion-header{--mdc-ripple-color: transparent}:host([hasChildren][open]:hover:not([activated])) .expansion-header:hover{--mdc-ripple-color: var(--mdc-theme-primary)}.expansion-header{position:relative;height:48px;width:100%;overflow:visible;display:flex;flex-shrink:0;align-items:center}.expansion-header mwc-ripple{border-radius:var(--cv-list-item-border-radius);overflow:hidden}.expansion-header-inner{padding:0 16px}.expansion-icon{margin-right:var(--cv-list-item-expansion-icon-margin, 0);font-size:var(--cv-list-item-expansion-icon-size, --mdc-icon-size);color:var(--cv-list-item-text-icon-on-background, var(--mdc-theme-text-icon-on-background))}.expansion-panel{display:block;width:100%;height:var(--cv-list-menu-height, 0);--mdc-list-side-padding: 72px;transition:transform .15s ease-out;overflow:hidden}:host([open][hasChildren]:not([twoline])){height:inherit;display:flex;flex-direction:column;border-radius:0}:host([open][hasChildren]:not([twoline])) .expansion-panel{transition:min-height .25s ease-in;height:var(--cv-list-menu-height, inherit)}
2
2
  `;var m=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=(n,e,t,i)=>{for(var r=i>1?void 0:i?u(e,t):e,o=n.length-1,l;o>=0;o--)(l=n[o])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&m(e,t,r),r};exports.CovalentNavRailListItem=class extends h.CovalentListItem{constructor(){super(...arguments),this.open=!1,this.hasChildren=!1,this.activated=!1,this.lastKeySelected=0}_toggleOpen(){this.open=!this.open}_handleKeydown(e){const t=this.expansionPanelElements[0],i=t?t==null?void 0:t.getFocusedItemIndex():0,r=(t==null?void 0:t.items.length)??0;if(this.hasChildren){if(e.code==="Enter"){e.preventDefault(),e.stopImmediatePropagation(),e.target.hasChildren?this._toggleOpen():this._deselectHeader(e);return}if(this.open){if(e.code==="ArrowUp"&&i===0&&this.lastKeySelected===0&&!e.target.hasChildren){e.preventDefault(),e.stopImmediatePropagation(),t.items[0].blur(),this.focus();return}e.code==="ArrowDown"&&i===-1&&(e.preventDefault(),e.stopImmediatePropagation(),t.focusItemAtIndex(0),this.lastKeySelected=0),e.code==="ArrowUp"&&i!==-1&&(e.preventDefault(),e.stopImmediatePropagation(),t.focusItemAtIndex(i),this.lastKeySelected=i),(e.code==="ArrowDown"||e.code==="ArrowUp")&&i!==-1&&this.lastKeySelected<r-1&&(e.preventDefault(),e.stopImmediatePropagation(),t.focusItemAtIndex(i),this.lastKeySelected=i)}}}_handleRequestSelected(e){const t=e;this.hasChildren&&t.detail.selected===!1&&t.detail.source==="property"&&this._deselectChildren()}_deselectChildren(){this.expansionPanelElements.forEach(e=>{e.items.forEach(t=>t.selected=!1)})}_deselectHeader(e){e.preventDefault(),e.stopImmediatePropagation(),this.fireRequestSelected(!1,"interaction"),this.activated=!1}renderExpansionItem(){const e=this.renderText(),t=this.graphic?this.renderGraphic():a.A,i=this.renderMeta();return a.x`
3
3
  <div
4
4
  @mousedown=${this._toggleOpen}
package/nav-list-item.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { i as o, r as n, l as m, A as g, x as h, e as f } from "./query-assigned-elements-4a39219d.mjs";
2
- import { n as c } from "./property-9b6ea53b.mjs";
1
+ import { i as s, r as n, l as m, A as g, x as c, e as f } from "./query-assigned-elements-4a39219d.mjs";
2
+ import { n as h } from "./property-9b6ea53b.mjs";
3
3
  import { CovalentListItem as u } from "./list-item.mjs";
4
4
  import { s as v, a as x, c as y } from "./list-item-430cae02.mjs";
5
5
  import "./mwc-list-item-base-6449e812.mjs";
@@ -12,14 +12,14 @@ import "./query-d843aa92.mjs";
12
12
  import "./class-map-4b94b017.mjs";
13
13
  import "./style-map-bc3ed3e0.mjs";
14
14
  import "./observer-be7b92e2.mjs";
15
- const w = `:host{font-family:var(--mdc-typography-font-family);font-size:var(--mdc-typography-body2-font-size);font-weight:600;line-height:var(--mdc-typography-body2-line-height);text-align:left;border-radius:var(--cv-list-item-border-radius, 100px);transition:border-radius .1s ease-out;width:var(--cv-list-item-width, 100%);--mdc-list-item-graphic-margin: 4px}::slotted(.section-selector){display:none;position:absolute;top:0;right:0}:host([activated]) ::slotted(cv-icon[slot=graphic]){color:var(--mdc-theme-primary)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{margin-left:var(--cv-list-item-graphic-margin-left, 12px);padding-left:4px}:host([graphic=avatar]){padding:0}:host([graphic=avatar]:not([twoline])){height:48px}:host(.beta-list-item){--mdc-theme-primary: var(--mdc-theme-surface-caution);--mdc-list-item-meta-size: 20px;--mdc-list-item-graphic-size: 40px;--mdc-list-item-graphic-margin: 0;--mdc-typography-subtitle1-font-size: var( --mdc-typography-subtitle2-font-size );--mdc-typography-body2-font-size: var(--mdc-typography-caption-font-size);margin-bottom:8px;margin-right:0;border-radius:0;height:48px;font-size:0;padding:0 0 0 15px}:host([hasChildren]){flex-direction:column;overflow:visible;height:inherit!important;background:none;padding:0;--mdc-list-side-padding: 0;--cv-list-item-graphic-margin-left: 0}:host([hasChildren][open]:hover:not([activated])) .expansion-header{--mdc-ripple-color: transparent}:host([hasChildren][open]:hover:not([activated])) .expansion-header:hover{--mdc-ripple-color: var(--mdc-theme-primary)}.expansion-header{position:relative;height:48px;width:100%;overflow:visible;display:flex;flex-shrink:0;align-items:center}.expansion-header mwc-ripple{border-radius:var(--cv-list-item-border-radius);overflow:hidden}.expansion-header-inner{padding:0 16px}.expansion-icon{margin-right:var(--cv-list-item-expansion-icon-margin, 0);font-size:var(--cv-list-item-expansion-icon-size, --mdc-icon-size);color:var(--cv-list-item-text-icon-on-background, var(--mdc-theme-text-icon-on-background))}.expansion-panel{display:block;width:100%;height:var(--cv-list-menu-height, 0);--mdc-list-side-padding: 72px;transition:transform .15s ease-out;overflow:hidden}:host([open][hasChildren]:not([twoline])){height:inherit;display:flex;flex-direction:column;border-radius:0}:host([open][hasChildren]:not([twoline])) .expansion-panel{transition:min-height .25s ease-in;height:var(--cv-list-menu-height, inherit)}
15
+ const w = `:host{font-family:var(--mdc-typography-font-family);font-size:var(--mdc-typography-body2-font-size);font-weight:600;line-height:var(--mdc-typography-body2-line-height);text-align:left;border-radius:var(--cv-list-item-border-radius, 100px);transition:border-radius .1s ease-out;width:var(--cv-list-item-width, 100%);--mdc-list-item-graphic-margin: 4px}::slotted(.section-selector){display:none;position:absolute;top:0;right:0}:host([activated]) ::slotted(cv-icon[slot=graphic]){color:var(--mdc-theme-primary)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{--mdc-theme-text-icon-on-background: var(--cv-theme-on-surface);margin-left:var(--cv-list-item-graphic-margin-left, 12px);padding-left:4px;background-color:transparent}:host([graphic=avatar]){padding:0;background-color:transparent}:host([graphic=avatar]:not([twoline])){height:48px}:host(.beta-list-item){--mdc-theme-primary: var(--mdc-theme-surface-caution);--mdc-list-item-meta-size: 20px;--mdc-list-item-graphic-size: 40px;--mdc-list-item-graphic-margin: 0;--mdc-typography-subtitle1-font-size: var( --mdc-typography-subtitle2-font-size );--mdc-typography-body2-font-size: var(--mdc-typography-caption-font-size);margin-bottom:8px;margin-right:0;border-radius:0;height:48px;font-size:0;padding:0 0 0 15px}:host([hasChildren]){flex-direction:column;overflow:visible;height:inherit!important;background:none;padding:0;--mdc-list-side-padding: 0;--cv-list-item-graphic-margin-left: 0}:host([hasChildren][open]:hover:not([activated])) .expansion-header{--mdc-ripple-color: transparent}:host([hasChildren][open]:hover:not([activated])) .expansion-header:hover{--mdc-ripple-color: var(--mdc-theme-primary)}.expansion-header{position:relative;height:48px;width:100%;overflow:visible;display:flex;flex-shrink:0;align-items:center}.expansion-header mwc-ripple{border-radius:var(--cv-list-item-border-radius);overflow:hidden}.expansion-header-inner{padding:0 16px}.expansion-icon{margin-right:var(--cv-list-item-expansion-icon-margin, 0);font-size:var(--cv-list-item-expansion-icon-size, --mdc-icon-size);color:var(--cv-list-item-text-icon-on-background, var(--mdc-theme-text-icon-on-background))}.expansion-panel{display:block;width:100%;height:var(--cv-list-menu-height, 0);--mdc-list-side-padding: 72px;transition:transform .15s ease-out;overflow:hidden}:host([open][hasChildren]:not([twoline])){height:inherit;display:flex;flex-direction:column;border-radius:0}:host([open][hasChildren]:not([twoline])) .expansion-panel{transition:min-height .25s ease-in;height:var(--cv-list-menu-height, inherit)}
16
16
  `;
17
- var _ = Object.defineProperty, b = Object.getOwnPropertyDescriptor, l = (e, t, i, r) => {
18
- for (var a = r > 1 ? void 0 : r ? b(t, i) : t, d = e.length - 1, p; d >= 0; d--)
19
- (p = e[d]) && (a = (r ? p(t, i, a) : p(a)) || a);
20
- return r && a && _(t, i, a), a;
17
+ var b = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, d = (e, t, i, o) => {
18
+ for (var r = o > 1 ? void 0 : o ? _(t, i) : t, l = e.length - 1, p; l >= 0; l--)
19
+ (p = e[l]) && (r = (o ? p(t, i, r) : p(r)) || r);
20
+ return o && r && b(t, i, r), r;
21
21
  };
22
- let s = class extends u {
22
+ let a = class extends u {
23
23
  constructor() {
24
24
  super(...arguments), this.open = !1, this.hasChildren = !1, this.activated = !1, this.lastKeySelected = 0;
25
25
  }
@@ -27,7 +27,7 @@ let s = class extends u {
27
27
  this.open = !this.open;
28
28
  }
29
29
  _handleKeydown(e) {
30
- const t = this.expansionPanelElements[0], i = t ? t == null ? void 0 : t.getFocusedItemIndex() : 0, r = (t == null ? void 0 : t.items.length) ?? 0;
30
+ const t = this.expansionPanelElements[0], i = t ? t == null ? void 0 : t.getFocusedItemIndex() : 0, o = (t == null ? void 0 : t.items.length) ?? 0;
31
31
  if (this.hasChildren) {
32
32
  if (e.code === "Enter") {
33
33
  e.preventDefault(), e.stopImmediatePropagation(), e.target.hasChildren ? this._toggleOpen() : this._deselectHeader(e);
@@ -38,7 +38,7 @@ let s = class extends u {
38
38
  e.preventDefault(), e.stopImmediatePropagation(), t.items[0].blur(), this.focus();
39
39
  return;
40
40
  }
41
- e.code === "ArrowDown" && i === -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(0), this.lastKeySelected = 0), e.code === "ArrowUp" && i !== -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(i), this.lastKeySelected = i), (e.code === "ArrowDown" || e.code === "ArrowUp") && i !== -1 && this.lastKeySelected < r - 1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(i), this.lastKeySelected = i);
41
+ e.code === "ArrowDown" && i === -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(0), this.lastKeySelected = 0), e.code === "ArrowUp" && i !== -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(i), this.lastKeySelected = i), (e.code === "ArrowDown" || e.code === "ArrowUp") && i !== -1 && this.lastKeySelected < o - 1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(i), this.lastKeySelected = i);
42
42
  }
43
43
  }
44
44
  }
@@ -56,7 +56,7 @@ let s = class extends u {
56
56
  }
57
57
  renderExpansionItem() {
58
58
  const e = this.renderText(), t = this.graphic ? this.renderGraphic() : g, i = this.renderMeta();
59
- return h`
59
+ return c`
60
60
  <div
61
61
  @mousedown=${this._toggleOpen}
62
62
  @touchstart="${this._toggleOpen}"
@@ -77,10 +77,10 @@ let s = class extends u {
77
77
  super.disconnectedCallback(), this.removeEventListener("keydown", this._handleKeydown), this.addEventListener("request-selected", this._handleRequestSelected);
78
78
  }
79
79
  renderMeta() {
80
- const e = this.open ? "arrow_drop_up" : "arrow_drop_down", t = h`<cv-icon slot="meta" class="expansion-icon"
80
+ const e = this.open ? "arrow_drop_up" : "arrow_drop_down", t = c`<cv-icon slot="meta" class="expansion-icon"
81
81
  >${e}</cv-icon
82
82
  >`;
83
- return h` <span class="mdc-deprecated-list-item__meta material-icons">
83
+ return c` <span class="mdc-deprecated-list-item__meta material-icons">
84
84
  ${t}
85
85
  <slot name="meta"></slot>
86
86
  </span>`;
@@ -89,34 +89,34 @@ let s = class extends u {
89
89
  return this.hasChildren ? this.renderExpansionItem() : super.render();
90
90
  }
91
91
  };
92
- s.styles = [
93
- o`
92
+ a.styles = [
93
+ s`
94
94
  ${n(v)}
95
95
  `,
96
- o`
96
+ s`
97
97
  ${n(x)}
98
98
  `,
99
- o`
99
+ s`
100
100
  ${n(y)}
101
101
  `,
102
- o`
102
+ s`
103
103
  ${n(w)}
104
104
  `
105
105
  ];
106
- l([
106
+ d([
107
107
  m({ slot: "expansion-panel", flatten: !0 })
108
- ], s.prototype, "expansionPanelElements", 2);
109
- l([
110
- c({ type: Boolean, reflect: !0 })
111
- ], s.prototype, "open", 2);
112
- l([
113
- c({ type: Boolean, reflect: !0 })
114
- ], s.prototype, "hasChildren", 2);
115
- s = l([
108
+ ], a.prototype, "expansionPanelElements", 2);
109
+ d([
110
+ h({ type: Boolean, reflect: !0 })
111
+ ], a.prototype, "open", 2);
112
+ d([
113
+ h({ type: Boolean, reflect: !0 })
114
+ ], a.prototype, "hasChildren", 2);
115
+ a = d([
116
116
  f("cv-nav-list-item")
117
- ], s);
118
- const q = s;
117
+ ], a);
118
+ const q = a;
119
119
  export {
120
- s as CovalentNavRailListItem,
120
+ a as CovalentNavRailListItem,
121
121
  q as default
122
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covalent/components",
3
- "version": "8.7.0-beta.8",
3
+ "version": "8.7.0-beta.9",
4
4
  "description": "a catalog of material components for covalent",
5
5
  "main": "./index.js",
6
6
  "module": "./index.mjs",