@cas-smartdesign/list-item 7.2.3 → 7.3.0

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.
@@ -1,22 +1,22 @@
1
- import { LitElement as m, css as v, unsafeCSS as g, html as a, nothing as f } from "lit";
2
- import { property as r } from "lit/decorators/property.js";
1
+ import { LitElement as m, unsafeCSS as v, css as g, html as a, nothing as f } from "lit";
2
+ import { property as n } from "lit/decorators/property.js";
3
3
  import { unsafeHTML as b } from "lit/directives/unsafe-html.js";
4
4
  import { ifDefined as d } from "lit/directives/if-defined.js";
5
5
  import y from "@cas-smartdesign/image-tools";
6
- const w = ':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}';
7
- var x = Object.defineProperty, k = Object.getOwnPropertyDescriptor, l = (i, t, e, o) => {
8
- for (var c = o > 1 ? void 0 : o ? k(t, e) : t, p = i.length - 1, h; p >= 0; p--)
9
- (h = i[p]) && (c = (o ? h(t, e, c) : h(c)) || c);
10
- return o && c && x(t, e, c), c;
6
+ const w = ':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}';
7
+ var x = Object.defineProperty, r = (t, i, e, l) => {
8
+ for (var c = void 0, p = t.length - 1, h; p >= 0; p--)
9
+ (h = t[p]) && (c = h(i, e, c) || c);
10
+ return c && x(i, e, c), c;
11
11
  }, s;
12
- const n = (s = class extends m {
12
+ const o = (s = class extends m {
13
13
  constructor() {
14
14
  super(...arguments), this.contentMode = "text", this.role = "option";
15
15
  }
16
16
  static get styles() {
17
17
  return [
18
- v`
19
- ${g(w)}
18
+ g`
19
+ ${v(w)}
20
20
  `
21
21
  ];
22
22
  }
@@ -24,7 +24,7 @@ const n = (s = class extends m {
24
24
  return a`
25
25
  <div class="container">
26
26
  ${this.getLevelIndicators().map(
27
- (t, e) => a` <div class="level-indicator level-${e}"></div> `
27
+ (i, e) => a` <div class="level-indicator level-${e}"></div> `
28
28
  )}
29
29
  <div class="side-content">
30
30
  <slot name="left-content"></slot>
@@ -42,12 +42,12 @@ const n = (s = class extends m {
42
42
  }
43
43
  renderIcon() {
44
44
  if (this.icon || this.iconPlaceholder) {
45
- const t = this.iconBackgroundColor != null ? `background-color:${this.iconBackgroundColor}` : void 0;
45
+ const i = this.iconBackgroundColor != null ? `background-color:${this.iconBackgroundColor}` : void 0;
46
46
  return a`
47
47
  <div
48
48
  class="icon-wrapper"
49
49
  @pointerdown="${this.handleIconClick}"
50
- style="${d(t)}"
50
+ style="${d(i)}"
51
51
  role="img"
52
52
  aria-label="${d(this.iconAttrAriaLabel)}"
53
53
  title="${d(this.iconAttrTitle)}"
@@ -58,30 +58,30 @@ const n = (s = class extends m {
58
58
  }
59
59
  return f;
60
60
  }
61
- renderLabel(t, e, o) {
61
+ renderLabel(i, e, l) {
62
62
  return e ? a`
63
- <div class="${t}" title="${d(o)}">
63
+ <div class="${i}" title="${d(l)}">
64
64
  ${this.contentMode === "html" ? b(e) : e}
65
65
  </div>
66
66
  ` : f;
67
67
  }
68
- updated(t) {
69
- super.updated(t), (t.has("icon") || t.has("iconPlaceholder")) && (this.icon || this.iconPlaceholder) && y.showImage(this.shadowRoot.querySelector(".icon"), this.icon, this.iconPlaceholder), t.has("selected") && this.setAttribute("aria-selected", String(this.selected));
68
+ updated(i) {
69
+ super.updated(i), (i.has("icon") || i.has("iconPlaceholder")) && (this.icon || this.iconPlaceholder) && y.showImage(this.shadowRoot.querySelector(".icon"), this.icon, this.iconPlaceholder), i.has("selected") && this.setAttribute("aria-selected", String(this.selected));
70
70
  }
71
71
  /**
72
72
  * Returns the width in pixel which is missing to show the caption and description without ellipsis.
73
73
  */
74
74
  get missingWidthForTexts() {
75
- const t = this.enableLineClamp;
75
+ const i = this.enableLineClamp;
76
76
  this.removeAttribute("enable-line-clamp");
77
77
  let e = 0;
78
- const o = this.shadowRoot.querySelector(".caption");
79
- o && (e += o.scrollWidth - o.clientWidth);
78
+ const l = this.shadowRoot.querySelector(".caption");
79
+ l && (e += l.scrollWidth - l.clientWidth);
80
80
  const c = this.shadowRoot.querySelector(".description");
81
- return c && (e = Math.max(e, c.scrollWidth - c.clientWidth)), e > 0 && e++, t && this.setAttribute("enable-line-clamp", ""), e;
81
+ return c && (e = Math.max(e, c.scrollWidth - c.clientWidth)), e > 0 && e++, i && this.setAttribute("enable-line-clamp", ""), e;
82
82
  }
83
- handleIconClick(t) {
84
- !this.disabled && !this.dispatchEvent(new PointerEvent("list-item-icon-click", t)) && t.preventDefault();
83
+ handleIconClick(i) {
84
+ !this.disabled && !this.dispatchEvent(new PointerEvent("list-item-icon-click", i)) && i.preventDefault();
85
85
  }
86
86
  getLevelIndicators() {
87
87
  return this.level ? Array(Number(this.level)).fill(null) : [];
@@ -89,62 +89,69 @@ const n = (s = class extends m {
89
89
  }, s.ID = "sd-list-item", s.ensureDefined = () => {
90
90
  customElements.get(s.ID) || customElements.define(s.ID, s);
91
91
  }, s);
92
- l([
93
- r({ type: String })
94
- ], n.prototype, "caption", 2);
95
- l([
96
- r({ type: String })
97
- ], n.prototype, "description", 2);
98
- l([
99
- r({ type: Boolean })
100
- ], n.prototype, "selected", 2);
101
- l([
102
- r({ type: String })
103
- ], n.prototype, "icon", 2);
104
- l([
105
- r({ type: String })
106
- ], n.prototype, "iconBackgroundColor", 2);
107
- l([
108
- r({ type: String })
109
- ], n.prototype, "iconPlaceholder", 2);
110
- l([
111
- r({ type: Number })
112
- ], n.prototype, "level", 2);
113
- l([
114
- r()
115
- ], n.prototype, "contentMode", 2);
116
- l([
117
- r({ type: Boolean, reflect: !0, attribute: "enable-line-clamp" })
118
- ], n.prototype, "enableLineClamp", 2);
119
- l([
120
- r({ type: Boolean, reflect: !0, attribute: "aria-disabled" })
121
- ], n.prototype, "disabled", 2);
122
- l([
123
- r({ type: String, attribute: "icon-attr-aria-label" })
124
- ], n.prototype, "iconAttrAriaLabel", 2);
125
- l([
126
- r({ type: String, reflect: !0 })
127
- ], n.prototype, "role", 2);
128
- l([
129
- r({ type: String, attribute: "caption-attr-title" })
130
- ], n.prototype, "captionAttrTitle", 2);
131
- l([
132
- r({ type: String, attribute: "description-attr-title" })
133
- ], n.prototype, "descriptionAttrTitle", 2);
134
- l([
135
- r({ type: String, attribute: "icon-attr-title" })
136
- ], n.prototype, "iconAttrTitle", 2);
137
- let u = n;
138
- const $ = (i, t) => {
92
+ r([
93
+ n({ type: String })
94
+ ], o.prototype, "caption");
95
+ r([
96
+ n({ type: String })
97
+ ], o.prototype, "description");
98
+ r([
99
+ n({ type: Boolean })
100
+ ], o.prototype, "selected");
101
+ r([
102
+ n({ type: String })
103
+ ], o.prototype, "icon");
104
+ r([
105
+ n({ type: String })
106
+ ], o.prototype, "iconBackgroundColor");
107
+ r([
108
+ n({ type: String })
109
+ ], o.prototype, "iconPlaceholder");
110
+ r([
111
+ n({ type: Number })
112
+ ], o.prototype, "level");
113
+ r([
114
+ n()
115
+ ], o.prototype, "contentMode");
116
+ r([
117
+ n({ type: Boolean, reflect: !0, attribute: "enable-line-clamp" })
118
+ ], o.prototype, "enableLineClamp");
119
+ r([
120
+ n({
121
+ converter: {
122
+ fromAttribute: (t) => t == "true",
123
+ toAttribute: (t) => t
124
+ },
125
+ reflect: !0,
126
+ attribute: "aria-disabled"
127
+ })
128
+ ], o.prototype, "disabled");
129
+ r([
130
+ n({ type: String, attribute: "icon-attr-aria-label" })
131
+ ], o.prototype, "iconAttrAriaLabel");
132
+ r([
133
+ n({ type: String, reflect: !0 })
134
+ ], o.prototype, "role");
135
+ r([
136
+ n({ type: String, attribute: "caption-attr-title" })
137
+ ], o.prototype, "captionAttrTitle");
138
+ r([
139
+ n({ type: String, attribute: "description-attr-title" })
140
+ ], o.prototype, "descriptionAttrTitle");
141
+ r([
142
+ n({ type: String, attribute: "icon-attr-title" })
143
+ ], o.prototype, "iconAttrTitle");
144
+ let u = o;
145
+ const L = (t, i) => {
139
146
  const e = document.createElement(u.ID);
140
- if (i) {
141
- if (e.caption = i.caption, e.description = i.description, e.icon = i.icon, e.iconBackgroundColor = i.iconBackgroundColor, e.iconPlaceholder = i.iconPlaceholder, e.level = i.level, e.disabled = i.disabled, i.contentMode && (e.contentMode = i.contentMode), i.leftContentGenerator) {
142
- const o = i.leftContentGenerator(i, e);
143
- o && (o.slot = "left-content", e.appendChild(o));
147
+ if (t) {
148
+ if (e.caption = t.caption, e.description = t.description, e.icon = t.icon, e.iconBackgroundColor = t.iconBackgroundColor, e.iconPlaceholder = t.iconPlaceholder, e.level = t.level, e.disabled = t.disabled, t.contentMode && (e.contentMode = t.contentMode), t.leftContentGenerator) {
149
+ const l = t.leftContentGenerator(t, e);
150
+ l && (l.slot = "left-content", e.appendChild(l));
144
151
  }
145
- if (i.rightContentGenerator) {
146
- const o = i.rightContentGenerator(i, e);
147
- o && (o.slot = "right-content", e.appendChild(o));
152
+ if (t.rightContentGenerator) {
153
+ const l = t.rightContentGenerator(t, e);
154
+ l && (l.slot = "right-content", e.appendChild(l));
148
155
  }
149
156
  }
150
157
  return e;
@@ -152,6 +159,6 @@ const $ = (i, t) => {
152
159
  u.ensureDefined();
153
160
  export {
154
161
  u as default,
155
- $ as generator
162
+ L as generator
156
163
  };
157
164
  //# sourceMappingURL=list-item.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-item.mjs","sources":["../list-item.ts"],"sourcesContent":["import { LitElement, html, unsafeCSS, PropertyValues, css, nothing, TemplateResult } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport ImageTools from \"@cas-smartdesign/image-tools\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [ListItem.ID]: ListItem;\n }\n}\n\nimport styles from \"./styles.scss?inline\";\n\nexport interface ItemData {\n caption?: string;\n description?: string;\n leftContentGenerator?: (data: ItemData, element: ListItem) => HTMLElement;\n rightContentGenerator?: (data: ItemData, element: ListItem) => HTMLElement;\n icon?: string;\n iconBackgroundColor?: string;\n iconPlaceholder?: string;\n level?: number;\n contentMode?: ContentMode;\n disabled?: boolean;\n}\n\nexport type ContentMode = \"text\" | \"html\";\n\nexport default class ListItem extends LitElement {\n public static readonly ID = \"sd-list-item\";\n public static ensureDefined = (): void => {\n if (!customElements.get(ListItem.ID)) {\n customElements.define(ListItem.ID, ListItem);\n }\n };\n\n @property({ type: String })\n public caption: string;\n @property({ type: String })\n public description: string;\n @property({ type: Boolean })\n public selected: boolean;\n @property({ type: String })\n public icon: string;\n @property({ type: String })\n public iconBackgroundColor: string;\n @property({ type: String })\n public iconPlaceholder: string;\n @property({ type: Number })\n public level: number;\n @property()\n public contentMode: ContentMode = \"text\";\n @property({ type: Boolean, reflect: true, attribute: \"enable-line-clamp\" })\n public enableLineClamp: boolean;\n @property({ type: Boolean, reflect: true, attribute: \"aria-disabled\" })\n public disabled: boolean;\n\n // aria attributes\n @property({ type: String, attribute: \"icon-attr-aria-label\" })\n public iconAttrAriaLabel: string;\n @property({ type: String, reflect: true })\n public role = \"option\";\n\n // title attributes\n @property({ type: String, attribute: \"caption-attr-title\" })\n public captionAttrTitle: string;\n @property({ type: String, attribute: \"description-attr-title\" })\n public descriptionAttrTitle: string;\n @property({ type: String, attribute: \"icon-attr-title\" })\n public iconAttrTitle: string;\n\n static get styles() {\n return [\n css`\n ${unsafeCSS(styles)}\n `,\n ];\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"container\">\n ${this.getLevelIndicators().map(\n (_, level) => html` <div class=\"level-indicator level-${level}\"></div> `,\n )}\n <div class=\"side-content\">\n <slot name=\"left-content\"></slot>\n ${this.renderIcon()}\n </div>\n <div class=\"labels\">\n ${this.renderLabel(\"caption\", this.caption, this.captionAttrTitle)}\n ${this.renderLabel(\"description\", this.description, this.descriptionAttrTitle)}\n </div>\n <div class=\"side-content\">\n <slot name=\"right-content\"></slot>\n </div>\n </div>\n `;\n }\n\n private renderIcon() {\n if (this.icon || this.iconPlaceholder) {\n const iconBackgroundStyle =\n this.iconBackgroundColor != null ? `background-color:${this.iconBackgroundColor}` : undefined;\n return html`\n <div\n class=\"icon-wrapper\"\n @pointerdown=\"${this.handleIconClick}\"\n style=\"${ifDefined(iconBackgroundStyle)}\"\n role=\"img\"\n aria-label=\"${ifDefined(this.iconAttrAriaLabel)}\"\n title=\"${ifDefined(this.iconAttrTitle)}\"\n >\n <div class=\"icon\"></div>\n </div>\n `;\n }\n return nothing;\n }\n\n private renderLabel(className: string, value: string, title: string) {\n return value\n ? html`\n <div class=\"${className}\" title=\"${ifDefined(title)}\">\n ${this.contentMode === \"html\" ? unsafeHTML(value) : value}\n </div>\n `\n : nothing;\n }\n\n public updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (\n (changedProperties.has(\"icon\") || changedProperties.has(\"iconPlaceholder\")) &&\n (this.icon || this.iconPlaceholder)\n ) {\n ImageTools.showImage(this.shadowRoot.querySelector(\".icon\"), this.icon, this.iconPlaceholder);\n }\n if (changedProperties.has(\"selected\")) {\n this.setAttribute(\"aria-selected\", String(this.selected));\n }\n }\n\n /**\n * Returns the width in pixel which is missing to show the caption and description without ellipsis.\n */\n public get missingWidthForTexts(): number {\n const originalLineClamp = this.enableLineClamp;\n this.removeAttribute(\"enable-line-clamp\"); // Need to remove immediately, otherwise the calculation may fail.\n\n let requiredWidth = 0;\n\n const captionElement = this.shadowRoot.querySelector(\".caption\");\n if (captionElement) {\n requiredWidth += captionElement.scrollWidth - captionElement.clientWidth;\n }\n\n const descriptionElement = this.shadowRoot.querySelector(\".description\");\n if (descriptionElement) {\n requiredWidth = Math.max(requiredWidth, descriptionElement.scrollWidth - descriptionElement.clientWidth);\n }\n if (requiredWidth > 0) {\n requiredWidth++; // Additional one pixel to ensure ellipsis is not needed anymore.\n }\n if (originalLineClamp) {\n this.setAttribute(\"enable-line-clamp\", \"\");\n }\n return requiredWidth;\n }\n\n private handleIconClick(event: PointerEvent): void {\n if (!this.disabled && !this.dispatchEvent(new PointerEvent(\"list-item-icon-click\", event))) {\n event.preventDefault();\n }\n }\n\n private getLevelIndicators(): number[] {\n if (!this.level) {\n return [];\n }\n // fill is needed because the ArrayConstructor\n // result an array with \"empty\" values in it\n // which are skipped when iterating\n return Array(Number(this.level)).fill(null);\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const generator = (data: ItemData, _index: number): ListItem => {\n const listItem = document.createElement(ListItem.ID) as ListItem;\n if (data) {\n listItem.caption = data.caption;\n listItem.description = data.description;\n listItem.icon = data.icon;\n listItem.iconBackgroundColor = data.iconBackgroundColor;\n listItem.iconPlaceholder = data.iconPlaceholder;\n listItem.level = data.level;\n listItem.disabled = data.disabled;\n if (data.contentMode) {\n listItem.contentMode = data.contentMode;\n }\n if (data.leftContentGenerator) {\n const leftContent = data.leftContentGenerator(data, listItem);\n if (leftContent) {\n leftContent.slot = \"left-content\";\n listItem.appendChild(leftContent);\n }\n }\n if (data.rightContentGenerator) {\n const rightContent = data.rightContentGenerator(data, listItem);\n if (rightContent) {\n rightContent.slot = \"right-content\";\n listItem.appendChild(rightContent);\n }\n }\n }\n return listItem;\n};\n\nListItem.ensureDefined();\n"],"names":["_ListItem","_a","LitElement","css","unsafeCSS","styles","html","_","level","iconBackgroundStyle","ifDefined","nothing","className","value","title","unsafeHTML","changedProperties","ImageTools","originalLineClamp","requiredWidth","captionElement","descriptionElement","event","__decorateClass","property","ListItem","generator","data","_index","listItem","leftContent","rightContent"],"mappings":";;;;;;;;;;;AA6BA,MAAqBA,KAArBC,IAAA,cAAsCC,EAAW;AAAA,EAAjD,cAAA;AAAA,UAAA,GAAA,SAAA,GAuBI,KAAO,cAA2B,QAUlC,KAAO,OAAO;AAAA,EAAA;AAAA,EAUd,WAAW,SAAS;AACT,WAAA;AAAA,MACHC;AAAA,kBACMC,EAAUC,CAAM,CAAC;AAAA;AAAA,IAAA;AAAA,EAG/B;AAAA,EAEO,SAAyB;AACrB,WAAAC;AAAA;AAAA,kBAEG,KAAK,qBAAqB;AAAA,MACxB,CAACC,GAAGC,MAAUF,uCAA0CE,CAAK;AAAA,IAAA,CAChE;AAAA;AAAA;AAAA,sBAGK,KAAK,YAAY;AAAA;AAAA;AAAA,sBAGjB,KAAK,YAAY,WAAW,KAAK,SAAS,KAAK,gBAAgB,CAAC;AAAA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EAAK,qBAAqBA,GAAME,CAAQ;AAC5D,MAAIC,MACAA,EAAY,OAAO,gBACnBD,EAAS,YAAYC,CAAW;AAAA,IAExC;AACA,QAAIH,EAAK,uBAAuB;AAC5B,YAAMI,IAAeJ,EAAK,sBAAsBA,GAAME,CAAQ;AAC9D,MAAIE,MACAA,EAAa,OAAO,iBACpBF,EAAS,YAAYE,CAAY;AAAA,IAEzC;AAAA,EACJ;AACO,SAAAF;AACX;AAEAJ,EAAS,cAAc;"}
1
+ {"version":3,"file":"list-item.mjs","sources":["../list-item.ts"],"sourcesContent":["import { LitElement, html, unsafeCSS, PropertyValues, css, nothing, TemplateResult } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport ImageTools from \"@cas-smartdesign/image-tools\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [ListItem.ID]: ListItem;\n }\n}\n\nimport styles from \"./styles.scss?inline\";\n\nexport interface ItemData {\n caption?: string;\n description?: string;\n leftContentGenerator?: (data: ItemData, element: ListItem) => HTMLElement;\n rightContentGenerator?: (data: ItemData, element: ListItem) => HTMLElement;\n icon?: string;\n iconBackgroundColor?: string;\n iconPlaceholder?: string;\n level?: number;\n contentMode?: ContentMode;\n disabled?: boolean;\n}\n\nexport type ContentMode = \"text\" | \"html\";\n\nexport default class ListItem extends LitElement {\n public static readonly ID = \"sd-list-item\";\n public static ensureDefined = (): void => {\n if (!customElements.get(ListItem.ID)) {\n customElements.define(ListItem.ID, ListItem);\n }\n };\n\n @property({ type: String })\n public caption: string;\n @property({ type: String })\n public description: string;\n @property({ type: Boolean })\n public selected: boolean;\n @property({ type: String })\n public icon: string;\n @property({ type: String })\n public iconBackgroundColor: string;\n @property({ type: String })\n public iconPlaceholder: string;\n @property({ type: Number })\n public level: number;\n @property()\n public contentMode: ContentMode = \"text\";\n @property({ type: Boolean, reflect: true, attribute: \"enable-line-clamp\" })\n public enableLineClamp: boolean;\n @property({\n converter: {\n fromAttribute: (value) => value == \"true\",\n toAttribute: (value) => value,\n },\n reflect: true,\n attribute: \"aria-disabled\",\n })\n public disabled: boolean;\n\n // aria attributes\n @property({ type: String, attribute: \"icon-attr-aria-label\" })\n public iconAttrAriaLabel: string;\n @property({ type: String, reflect: true })\n public role = \"option\";\n\n // title attributes\n @property({ type: String, attribute: \"caption-attr-title\" })\n public captionAttrTitle: string;\n @property({ type: String, attribute: \"description-attr-title\" })\n public descriptionAttrTitle: string;\n @property({ type: String, attribute: \"icon-attr-title\" })\n public iconAttrTitle: string;\n\n static get styles() {\n return [\n css`\n ${unsafeCSS(styles)}\n `,\n ];\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"container\">\n ${this.getLevelIndicators().map(\n (_, level) => html` <div class=\"level-indicator level-${level}\"></div> `,\n )}\n <div class=\"side-content\">\n <slot name=\"left-content\"></slot>\n ${this.renderIcon()}\n </div>\n <div class=\"labels\">\n ${this.renderLabel(\"caption\", this.caption, this.captionAttrTitle)}\n ${this.renderLabel(\"description\", this.description, this.descriptionAttrTitle)}\n </div>\n <div class=\"side-content\">\n <slot name=\"right-content\"></slot>\n </div>\n </div>\n `;\n }\n\n private renderIcon() {\n if (this.icon || this.iconPlaceholder) {\n const iconBackgroundStyle =\n this.iconBackgroundColor != null ? `background-color:${this.iconBackgroundColor}` : undefined;\n return html`\n <div\n class=\"icon-wrapper\"\n @pointerdown=\"${this.handleIconClick}\"\n style=\"${ifDefined(iconBackgroundStyle)}\"\n role=\"img\"\n aria-label=\"${ifDefined(this.iconAttrAriaLabel)}\"\n title=\"${ifDefined(this.iconAttrTitle)}\"\n >\n <div class=\"icon\"></div>\n </div>\n `;\n }\n return nothing;\n }\n\n private renderLabel(className: string, value: string, title: string) {\n return value\n ? html`\n <div class=\"${className}\" title=\"${ifDefined(title)}\">\n ${this.contentMode === \"html\" ? unsafeHTML(value) : value}\n </div>\n `\n : nothing;\n }\n\n public updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (\n (changedProperties.has(\"icon\") || changedProperties.has(\"iconPlaceholder\")) &&\n (this.icon || this.iconPlaceholder)\n ) {\n ImageTools.showImage(this.shadowRoot.querySelector(\".icon\"), this.icon, this.iconPlaceholder);\n }\n if (changedProperties.has(\"selected\")) {\n this.setAttribute(\"aria-selected\", String(this.selected));\n }\n }\n\n /**\n * Returns the width in pixel which is missing to show the caption and description without ellipsis.\n */\n public get missingWidthForTexts(): number {\n const originalLineClamp = this.enableLineClamp;\n this.removeAttribute(\"enable-line-clamp\"); // Need to remove immediately, otherwise the calculation may fail.\n\n let requiredWidth = 0;\n\n const captionElement = this.shadowRoot.querySelector(\".caption\");\n if (captionElement) {\n requiredWidth += captionElement.scrollWidth - captionElement.clientWidth;\n }\n\n const descriptionElement = this.shadowRoot.querySelector(\".description\");\n if (descriptionElement) {\n requiredWidth = Math.max(requiredWidth, descriptionElement.scrollWidth - descriptionElement.clientWidth);\n }\n if (requiredWidth > 0) {\n requiredWidth++; // Additional one pixel to ensure ellipsis is not needed anymore.\n }\n if (originalLineClamp) {\n this.setAttribute(\"enable-line-clamp\", \"\");\n }\n return requiredWidth;\n }\n\n private handleIconClick(event: PointerEvent): void {\n if (!this.disabled && !this.dispatchEvent(new PointerEvent(\"list-item-icon-click\", event))) {\n event.preventDefault();\n }\n }\n\n private getLevelIndicators(): number[] {\n if (!this.level) {\n return [];\n }\n // fill is needed because the ArrayConstructor\n // result an array with \"empty\" values in it\n // which are skipped when iterating\n return Array(Number(this.level)).fill(null);\n }\n}\n\nexport const generator = (data: ItemData, _index: number): ListItem => {\n const listItem = document.createElement(ListItem.ID) as ListItem;\n if (data) {\n listItem.caption = data.caption;\n listItem.description = data.description;\n listItem.icon = data.icon;\n listItem.iconBackgroundColor = data.iconBackgroundColor;\n listItem.iconPlaceholder = data.iconPlaceholder;\n listItem.level = data.level;\n listItem.disabled = data.disabled;\n if (data.contentMode) {\n listItem.contentMode = data.contentMode;\n }\n if (data.leftContentGenerator) {\n const leftContent = data.leftContentGenerator(data, listItem);\n if (leftContent) {\n leftContent.slot = \"left-content\";\n listItem.appendChild(leftContent);\n }\n }\n if (data.rightContentGenerator) {\n const rightContent = data.rightContentGenerator(data, listItem);\n if (rightContent) {\n rightContent.slot = \"right-content\";\n listItem.appendChild(rightContent);\n }\n }\n }\n return listItem;\n};\n\nListItem.ensureDefined();\n"],"names":["_ListItem","_a","LitElement","css","unsafeCSS","styles","html","_","level","iconBackgroundStyle","ifDefined","nothing","className","value","title","unsafeHTML","changedProperties","ImageTools","originalLineClamp","requiredWidth","captionElement","descriptionElement","event","__decorateClass","property","ListItem","generator","data","_index","listItem","leftContent","rightContent"],"mappings":";;;;;;;;;;;AA6BA,MAAqBA,KAArBC,IAAA,cAAsCC,EAAW;AAAA,EAAjD,cAAA;AAAA,UAAA,GAAA,SAAA,GAuBI,KAAO,cAA2B,QAiBlC,KAAO,OAAO;AAAA,EAAA;AAAA,EAUd,WAAW,SAAS;AAChB,WAAO;AAAA,MACHC;AAAA,kBACMC,EAAUC,CAAM,CAAC;AAAA;AAAA,IAAA;AAAA,EAG/B;AAAA,EAEO,SAAyB;AAC5B,WAAOC;AAAA;AAAA,kBAEG,KAAK,qBAAqB;AAAA,MACxB,CAACC,GAAGC,MAAUF,uCAA0CE,CAAK;AAAA,IAAA,CAChE;AAAA;AAAA;AAAA,sBAGK,KAAK,YAAY;AAAA;AAAA;AAAA,sBAGjB,KAAK,YAAY,WAAW,KAAK,SAAS,KAAK,gBAAgB,CAAC;AAAA,sBAChE,KAAK,YAAY,eAAe,KAAK,aAAa,KAAK,oBAAoB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO9F;AAAA,EAEQ,aAAa;AACjB,QAAI,KAAK,QAAQ,KAAK,iBAAiB;AACnC,YAAMC,IACF,KAAK,uBAAuB,OAAO,oBAAoB,KAAK,mBAAmB,KAAK;AACxF,aAAOH;AAAA;AAAA;AAAA,oCAGiB,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AAO,iBACpBF,EAAS,YAAYE,CAAY;AAAA,IAEzC;AAAA,EACJ;AACA,SAAOF;AACX;AAEAJ,EAAS,cAAA;"}
@@ -1,15 +1,20 @@
1
1
  {
2
- "@cypress/vite-dev-server@5.0.7": {
2
+ "@cypress/vite-dev-server@7.0.0": {
3
3
  "licenses": "MIT",
4
4
  "repository": "https://github.com/cypress-io/cypress",
5
5
  "licenseUrl": "https://github.com/cypress-io/cypress/tree/develop/npm/vite-dev-server#readme"
6
6
  },
7
- "@rollup/plugin-node-resolve@15.2.3": {
7
+ "@eslint/js@9.34.0": {
8
+ "licenses": "MIT",
9
+ "repository": "https://github.com/eslint/eslint",
10
+ "licenseUrl": "https://github.com/eslint/eslint/raw/HEAD/LICENSE"
11
+ },
12
+ "@rollup/plugin-node-resolve@16.0.1": {
8
13
  "licenses": "MIT",
9
14
  "repository": "https://github.com/rollup/plugins",
10
15
  "licenseUrl": "https://github.com/rollup/plugins/raw/HEAD/LICENSE"
11
16
  },
12
- "@types/node@20.10.6": {
17
+ "@types/node@24.3.0": {
13
18
  "licenses": "MIT",
14
19
  "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped",
15
20
  "licenseUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/raw/HEAD/LICENSE"
@@ -19,47 +24,42 @@
19
24
  "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped",
20
25
  "licenseUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/raw/HEAD/LICENSE"
21
26
  },
22
- "@typescript-eslint/eslint-plugin@6.17.0": {
27
+ "@typescript-eslint/eslint-plugin@8.41.0": {
23
28
  "licenses": "MIT",
24
29
  "repository": "https://github.com/typescript-eslint/typescript-eslint",
25
30
  "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
26
31
  },
27
- "@typescript-eslint/parser@6.17.0": {
28
- "licenses": "BSD-2-Clause",
32
+ "@typescript-eslint/parser@8.41.0": {
33
+ "licenses": "MIT",
29
34
  "repository": "https://github.com/typescript-eslint/typescript-eslint",
30
35
  "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
31
36
  },
32
- "@vitest/coverage-v8@1.1.1": {
37
+ "@vitest/coverage-v8@3.2.4": {
33
38
  "licenses": "MIT",
34
39
  "repository": "https://github.com/vitest-dev/vitest",
35
40
  "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE"
36
41
  },
37
- "@vitest/ui@1.1.1": {
42
+ "@vitest/ui@3.2.4": {
38
43
  "licenses": "MIT",
39
44
  "repository": "https://github.com/vitest-dev/vitest",
40
45
  "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE"
41
46
  },
42
- "axe-core@4.8.3": {
47
+ "axe-core@4.10.3": {
43
48
  "licenses": "MPL-2.0",
44
49
  "repository": "https://github.com/dequelabs/axe-core",
45
50
  "licenseUrl": "https://github.com/dequelabs/axe-core/raw/HEAD/LICENSE"
46
51
  },
47
- "cypress-axe@1.5.0": {
52
+ "cypress-axe@1.7.0": {
48
53
  "licenses": "MIT",
49
54
  "repository": "https://github.com/component-driven/cypress-axe",
50
55
  "licenseUrl": "https://github.com/component-driven/cypress-axe/raw/HEAD/License.md"
51
56
  },
52
- "cypress-real-events@1.13.0": {
53
- "licenses": "MIT",
54
- "repository": "https://github.com/dmtrKovalenko/cypress-real-events",
55
- "licenseUrl": "https://github.com/dmtrKovalenko/cypress-real-events"
56
- },
57
- "cypress@13.6.2": {
57
+ "cypress@15.0.0": {
58
58
  "licenses": "MIT",
59
59
  "repository": "https://github.com/cypress-io/cypress",
60
60
  "licenseUrl": "https://cypress.io"
61
61
  },
62
- "esbuild@0.19.11": {
62
+ "esbuild@0.25.9": {
63
63
  "licenses": "MIT",
64
64
  "repository": "https://github.com/evanw/esbuild",
65
65
  "licenseUrl": "https://github.com/evanw/esbuild/raw/HEAD/LICENSE.md"
@@ -69,57 +69,57 @@
69
69
  "repository": "https://github.com/google/eslint-config-google",
70
70
  "licenseUrl": "https://github.com/google/eslint-config-google/raw/HEAD/LICENSE"
71
71
  },
72
- "eslint-config-prettier@9.1.0": {
72
+ "eslint-config-prettier@10.1.8": {
73
73
  "licenses": "MIT",
74
74
  "repository": "https://github.com/prettier/eslint-config-prettier",
75
75
  "licenseUrl": "https://github.com/prettier/eslint-config-prettier/raw/HEAD/LICENSE"
76
76
  },
77
- "eslint@8.56.0": {
77
+ "eslint@9.34.0": {
78
78
  "licenses": "MIT",
79
79
  "repository": "https://github.com/eslint/eslint",
80
80
  "licenseUrl": "https://github.com/eslint/eslint/raw/HEAD/LICENSE"
81
81
  },
82
- "github-markdown-css@5.5.0": {
82
+ "github-markdown-css@5.8.1": {
83
83
  "licenses": "MIT",
84
84
  "repository": "https://github.com/sindresorhus/github-markdown-css",
85
85
  "licenseUrl": "https://github.com/sindresorhus/github-markdown-css/raw/HEAD/license"
86
86
  },
87
- "highlight.js@11.9.0": {
87
+ "highlight.js@11.11.1": {
88
88
  "licenses": "BSD-3-Clause",
89
89
  "repository": "https://github.com/highlightjs/highlight.js",
90
90
  "licenseUrl": "https://github.com/highlightjs/highlight.js/raw/HEAD/LICENSE"
91
91
  },
92
- "junit-report-builder@3.1.0": {
92
+ "junit-report-builder@5.1.1": {
93
93
  "licenses": "MIT",
94
94
  "repository": "https://github.com/davidparsson/junit-report-builder",
95
95
  "licenseUrl": "https://github.com/davidparsson/junit-report-builder/raw/HEAD/LICENSE"
96
96
  },
97
- "lint-staged@15.2.0": {
97
+ "lint-staged@16.1.5": {
98
98
  "licenses": "MIT",
99
- "repository": "https://github.com/okonet/lint-staged",
100
- "licenseUrl": "https://github.com/okonet/lint-staged/raw/HEAD/LICENSE"
99
+ "repository": "https://github.com/lint-staged/lint-staged",
100
+ "licenseUrl": "https://github.com/lint-staged/lint-staged/raw/HEAD/LICENSE"
101
101
  },
102
- "lit@2.8.0": {
102
+ "lit@3.3.1": {
103
103
  "licenses": "BSD-3-Clause",
104
104
  "repository": "https://github.com/lit/lit",
105
105
  "licenseUrl": "https://github.com/lit/lit/raw/HEAD/LICENSE"
106
106
  },
107
- "marked@11.1.1": {
107
+ "marked@16.2.1": {
108
108
  "licenses": "MIT",
109
109
  "repository": "https://github.com/markedjs/marked",
110
110
  "licenseUrl": "https://github.com/markedjs/marked/raw/HEAD/LICENSE.md"
111
111
  },
112
- "postcss-prefix-selector@1.16.0": {
112
+ "postcss-prefix-selector@2.1.1": {
113
113
  "licenses": "MIT",
114
114
  "repository": "https://github.com/RadValentin/postcss-prefix-selector",
115
115
  "licenseUrl": "https://github.com/RadValentin/postcss-prefix-selector/raw/HEAD/LICENSE"
116
116
  },
117
- "postcss@8.4.32": {
117
+ "postcss@8.5.6": {
118
118
  "licenses": "MIT",
119
119
  "repository": "https://github.com/postcss/postcss",
120
120
  "licenseUrl": "https://github.com/postcss/postcss/raw/HEAD/LICENSE"
121
121
  },
122
- "prettier@3.1.1": {
122
+ "prettier@3.6.2": {
123
123
  "licenses": "MIT",
124
124
  "repository": "https://github.com/prettier/prettier",
125
125
  "licenseUrl": "https://github.com/prettier/prettier/raw/HEAD/LICENSE"
@@ -129,62 +129,67 @@
129
129
  "repository": "https://github.com/sindresorhus/resolve-pkg",
130
130
  "licenseUrl": "https://github.com/sindresorhus/resolve-pkg/raw/HEAD/license"
131
131
  },
132
- "sass@1.69.6": {
132
+ "sass@1.91.0": {
133
133
  "licenses": "MIT",
134
134
  "repository": "https://github.com/sass/dart-sass",
135
135
  "licenseUrl": "https://github.com/sass/dart-sass/raw/HEAD/LICENSE"
136
136
  },
137
- "stylelint-config-recommended-scss@14.0.0": {
137
+ "stylelint-config-recommended-scss@16.0.0": {
138
138
  "licenses": "MIT",
139
139
  "repository": "https://github.com/stylelint-scss/stylelint-config-recommended-scss",
140
140
  "licenseUrl": "https://github.com/stylelint-scss/stylelint-config-recommended-scss/raw/HEAD/LICENSE"
141
141
  },
142
- "stylelint-config-standard@36.0.0": {
142
+ "stylelint-config-standard@39.0.0": {
143
143
  "licenses": "MIT",
144
144
  "repository": "https://github.com/stylelint/stylelint-config-standard",
145
145
  "licenseUrl": "https://github.com/stylelint/stylelint-config-standard/raw/HEAD/LICENSE"
146
146
  },
147
- "stylelint-scss@6.0.0": {
147
+ "stylelint-scss@6.12.1": {
148
148
  "licenses": "MIT",
149
149
  "repository": "https://github.com/stylelint-scss/stylelint-scss",
150
150
  "licenseUrl": "https://github.com/stylelint-scss/stylelint-scss/raw/HEAD/LICENSE"
151
151
  },
152
- "stylelint@16.1.0": {
152
+ "stylelint@16.23.1": {
153
153
  "licenses": "MIT",
154
154
  "repository": "https://github.com/stylelint/stylelint",
155
155
  "licenseUrl": "https://github.com/stylelint/stylelint/raw/HEAD/LICENSE"
156
156
  },
157
- "tsup@8.0.1": {
157
+ "tsup@8.5.0": {
158
158
  "licenses": "MIT",
159
159
  "repository": "https://github.com/egoist/tsup",
160
160
  "licenseUrl": "https://github.com/egoist/tsup/raw/HEAD/LICENSE"
161
161
  },
162
- "turbo@1.11.2": {
163
- "licenses": "MPL-2.0",
164
- "repository": "https://github.com/vercel/turbo",
165
- "licenseUrl": "https://github.com/vercel/turbo/raw/HEAD/LICENSE"
162
+ "turbo@2.5.6": {
163
+ "licenses": "MIT",
164
+ "repository": "https://github.com/vercel/turborepo",
165
+ "licenseUrl": "https://github.com/vercel/turborepo/raw/HEAD/LICENSE"
166
+ },
167
+ "typescript-eslint@8.41.0": {
168
+ "licenses": "MIT",
169
+ "repository": "https://github.com/typescript-eslint/typescript-eslint",
170
+ "licenseUrl": "https://github.com/typescript-eslint/typescript-eslint/raw/HEAD/LICENSE"
166
171
  },
167
- "typescript@5.3.3": {
172
+ "typescript@5.9.2": {
168
173
  "licenses": "Apache-2.0",
169
- "repository": "https://github.com/Microsoft/TypeScript",
170
- "licenseUrl": "https://github.com/Microsoft/TypeScript/raw/HEAD/LICENSE.txt"
174
+ "repository": "https://github.com/microsoft/TypeScript",
175
+ "licenseUrl": "https://github.com/microsoft/TypeScript/raw/HEAD/LICENSE.txt"
171
176
  },
172
- "vite-tsconfig-paths@4.2.3": {
177
+ "vite-tsconfig-paths@5.1.4": {
173
178
  "licenses": "MIT",
174
179
  "repository": "https://github.com/aleclarson/vite-tsconfig-paths",
175
180
  "licenseUrl": "https://github.com/aleclarson/vite-tsconfig-paths/raw/HEAD/LICENSE"
176
181
  },
177
- "vite@5.0.10": {
182
+ "vite@7.1.3": {
178
183
  "licenses": "MIT",
179
184
  "repository": "https://github.com/vitejs/vite",
180
185
  "licenseUrl": "https://github.com/vitejs/vite/raw/HEAD/LICENSE.md"
181
186
  },
182
- "vitest@1.1.1": {
187
+ "vitest@3.2.4": {
183
188
  "licenses": "MIT",
184
189
  "repository": "https://github.com/vitest-dev/vitest",
185
190
  "licenseUrl": "https://github.com/vitest-dev/vitest/raw/HEAD/LICENSE.md"
186
191
  },
187
- "yargs@17.7.2": {
192
+ "yargs@18.0.0": {
188
193
  "licenses": "MIT",
189
194
  "repository": "https://github.com/yargs/yargs",
190
195
  "licenseUrl": "https://github.com/yargs/yargs/raw/HEAD/LICENSE"
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@cas-smartdesign/list-item",
3
- "version": "7.2.3",
3
+ "version": "7.3.0",
4
4
  "description": "A list item element based on LitElement",
5
5
  "main": "dist/list-item-with-externals.js",
6
6
  "module": "dist/list-item.mjs",
7
7
  "license": "SEE LICENSE IN LICENSE",
8
8
  "types": "dist/list-item.d.ts",
9
9
  "dependencies": {
10
- "lit": "^2.8.0",
11
- "@cas-smartdesign/image-tools": "^3.0.2"
10
+ "lit": "^3.3.1",
11
+ "@cas-smartdesign/image-tools": "^3.1.0"
12
12
  },
13
13
  "devDependencies": {
14
- "@cas-smartdesign/element-preview": "^0.2.2",
15
- "@cas-smartdesign/license-generator": "^1.6.3"
14
+ "@cas-smartdesign/license-generator": "^1.7.0",
15
+ "@cas-smartdesign/element-preview": "^0.3.0"
16
16
  },
17
17
  "files": [
18
18
  "dist",