@digital-realty/ix-widget 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,17 +20,17 @@ let IxStatusCounter = class IxStatusCounter extends LitElement {
20
20
  };
21
21
  }
22
22
  render() {
23
- return html `<ix-widget type="status-counter">
24
- <div
25
- class="content"
26
- @click=${this.navigate}
27
- @keydown=${(e) => {
23
+ return html `<ix-widget
24
+ @click=${this.navigate}
25
+ @keydown=${(e) => {
28
26
  const selectionKeys = [' ', 'Enter'];
29
27
  if (selectionKeys.includes(e.key)) {
30
28
  this.navigate();
31
29
  }
32
30
  }}
33
- >
31
+ type="status-counter"
32
+ >
33
+ <div class="content">
34
34
  <div class="info">
35
35
  ${this.value || this.value === 0
36
36
  ? html `<h3>
@@ -52,6 +52,7 @@ IxStatusCounter.styles = css `
52
52
  --ix-widget-padding: 36.5px 20px 36.5px 24px;
53
53
  --ix-icon-font-size: 5rem;
54
54
  --ix-icon-line-height: 1;
55
+ cursor: pointer;
55
56
  }
56
57
  h2 {
57
58
  margin: 0px;
@@ -1 +1 @@
1
- {"version":3,"file":"ix-status-counter.js","sourceRoot":"","sources":["../src/ix-status-counter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG9C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAqIuB,UAAK,GAAgC,SAAS,CAAC;QAE/C,WAAM,GAAG,QAAQ,CAAC;QAElB,SAAI,GAAG,MAAM,CAAC;QAEd,WAAM,GAAG,GAAG,CAAC;QAEzC,aAAQ,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,MAAM,EAAE,CAAC;+CAAmB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAe;AAEd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AA3I9B,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAiL3B","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@digital-realty/ix-icon/ix-icon.js';\nimport './IxWidget.js';\nimport { laptop, loader } from './assets/iconset.js';\n\n@customElement('ix-status-counter')\nexport class IxStatusCounter extends LitElement {\n static styles = css`\n ix-widget {\n --ix-widget-background: rgb(200, 223, 250);\n --ix-widget-padding: 36.5px 20px 36.5px 24px;\n --ix-icon-font-size: 5rem;\n --ix-icon-line-height: 1;\n }\n h2 {\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 20px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n }\n h3 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 34px;\n line-height: 40px;\n letter-spacing: 0.35px;\n color: rgb(9, 34, 65);\n }\n .content {\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n cursor: pointer;\n }\n ix-icon {\n background-color: rgb(255, 255, 255);\n border-radius: 50%;\n display: flex;\n -webkit-box-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n align-items: center;\n width: 60px;\n height: 60px;\n font-size: 36px;\n }\n .loader {\n width: 24px;\n height: 24px;\n }\n .info svg {\n stroke: rgb(20, 86, 224);\n width: 24px;\n height: 24px;\n animation-name: loading;\n animation-duration: 1000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n @keyframes loading {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n svg {\n width: 24px;\n margin: auto;\n }\n\n @media (min-width: 1200px) {\n svg {\n width: 36px;\n margin: auto;\n }\n .info svg {\n width: 36px;\n height: 36px;\n }\n }\n\n @media (max-width: 1349px) {\n .content {\n display: flex;\n flex-direction: row-reverse;\n -webkit-box-align: center;\n align-items: center;\n justify-content: left;\n }\n ix-icon {\n width: 24px;\n height: 24px;\n }\n\n ix-widget {\n --ix-widget-background: white;\n }\n .info {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n flex-direction: row-reverse;\n }\n h2 {\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 20px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n padding-left: 8px;\n }\n h3 {\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: 700;\n font-size: 14px;\n line-height: 24px;\n letter-spacing: 0.1px;\n color: rgb(9, 34, 65);\n }\n }\n `;\n\n @property({ type: String }) value: number | undefined | string = undefined;\n\n @property({ type: String }) header = 'status';\n\n @property({ type: Object }) icon = laptop;\n\n @property({ type: String }) target = '/';\n\n navigate = () => {\n this.dispatchEvent(\n new CustomEvent('route', {\n detail: { route: this.target },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n protected override render() {\n return html`<ix-widget type=\"status-counter\">\n <div\n class=\"content\"\n @click=${this.navigate}\n @keydown=${(e: KeyboardEvent) => {\n const selectionKeys = [' ', 'Enter'];\n if (selectionKeys.includes(e.key)) {\n this.navigate();\n }\n }}\n >\n <div class=\"info\">\n ${this.value || this.value === 0\n ? html`<h3>\n ${typeof this.value === 'number'\n ? this.value.toLocaleString()\n : this.value}\n </h3>`\n : html`<span class=\"loader\">${loader}</span>`}\n <h2>${this.header}</h2>\n </div>\n <ix-icon>${this.icon}</ix-icon>\n </div>\n </ix-widget>`;\n }\n}\n"]}
1
+ {"version":3,"file":"ix-status-counter.js","sourceRoot":"","sources":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AAC,IAAI,CAAC,KAAK;oBACV;YACR,CAAC,CAAC,IAAI,CAAA,wBAAwB,MAAM,SAAS;gBACzC,IAAI,CAAC,MAAM;;mBAER,IAAI,CAAC,IAAI;;iBAEX,CAAC;IAChB,CAAC;;AAhLM,sBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmIlB,AAnIY,CAmIX;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAgD;AAE/C;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAmB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAe;AAEd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AA5I9B,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAkL3B","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@digital-realty/ix-icon/ix-icon.js';\nimport './IxWidget.js';\nimport { laptop, loader } from './assets/iconset.js';\n\n@customElement('ix-status-counter')\nexport class IxStatusCounter extends LitElement {\n static styles = css`\n ix-widget {\n --ix-widget-background: rgb(200, 223, 250);\n --ix-widget-padding: 36.5px 20px 36.5px 24px;\n --ix-icon-font-size: 5rem;\n --ix-icon-line-height: 1;\n cursor: pointer;\n }\n h2 {\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 20px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n }\n h3 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 34px;\n line-height: 40px;\n letter-spacing: 0.35px;\n color: rgb(9, 34, 65);\n }\n .content {\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n cursor: pointer;\n }\n ix-icon {\n background-color: rgb(255, 255, 255);\n border-radius: 50%;\n display: flex;\n -webkit-box-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n align-items: center;\n width: 60px;\n height: 60px;\n font-size: 36px;\n }\n .loader {\n width: 24px;\n height: 24px;\n }\n .info svg {\n stroke: rgb(20, 86, 224);\n width: 24px;\n height: 24px;\n animation-name: loading;\n animation-duration: 1000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n @keyframes loading {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n svg {\n width: 24px;\n margin: auto;\n }\n\n @media (min-width: 1200px) {\n svg {\n width: 36px;\n margin: auto;\n }\n .info svg {\n width: 36px;\n height: 36px;\n }\n }\n\n @media (max-width: 1349px) {\n .content {\n display: flex;\n flex-direction: row-reverse;\n -webkit-box-align: center;\n align-items: center;\n justify-content: left;\n }\n ix-icon {\n width: 24px;\n height: 24px;\n }\n\n ix-widget {\n --ix-widget-background: white;\n }\n .info {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n flex-direction: row-reverse;\n }\n h2 {\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 20px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n padding-left: 8px;\n }\n h3 {\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: 700;\n font-size: 14px;\n line-height: 24px;\n letter-spacing: 0.1px;\n color: rgb(9, 34, 65);\n }\n }\n `;\n\n @property({ type: String }) value: number | undefined | string = undefined;\n\n @property({ type: String }) header = 'status';\n\n @property({ type: Object }) icon = laptop;\n\n @property({ type: String }) target = '/';\n\n navigate = () => {\n this.dispatchEvent(\n new CustomEvent('route', {\n detail: { route: this.target },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n protected override render() {\n return html`<ix-widget\n @click=${this.navigate}\n @keydown=${(e: KeyboardEvent) => {\n const selectionKeys = [' ', 'Enter'];\n if (selectionKeys.includes(e.key)) {\n this.navigate();\n }\n }}\n type=\"status-counter\"\n >\n <div class=\"content\">\n <div class=\"info\">\n ${this.value || this.value === 0\n ? html`<h3>\n ${typeof this.value === 'number'\n ? this.value.toLocaleString()\n : this.value}\n </h3>`\n : html`<span class=\"loader\">${loader}</span>`}\n <h2>${this.header}</h2>\n </div>\n <ix-icon>${this.icon}</ix-icon>\n </div>\n </ix-widget>`;\n }\n}\n"]}
@@ -7,8 +7,10 @@ export declare class IxTableData extends LitElement {
7
7
  columns: string[];
8
8
  rows: string[] | undefined;
9
9
  disabled: boolean;
10
+ showViewAllButtonOnEmpty: boolean;
10
11
  pageSize: number;
11
12
  header: string;
13
+ emptyDescription: string;
12
14
  href: string;
13
15
  renderEmptyTable(): import("lit").TemplateResult<1>;
14
16
  protected render(): import("lit").TemplateResult<1>;
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { html, LitElement, css } from 'lit';
2
+ import { html, LitElement, css, nothing } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
4
  import '@digital-realty/ix-icon/ix-icon.js';
5
5
  import '@digital-realty/ix-grid/ix-grid.js';
@@ -11,29 +11,41 @@ let IxTableData = class IxTableData extends LitElement {
11
11
  this.columns = [];
12
12
  this.rows = [];
13
13
  this.disabled = false;
14
+ this.showViewAllButtonOnEmpty = false;
14
15
  this.pageSize = 5;
15
16
  this.header = '';
17
+ this.emptyDescription = '';
16
18
  this.href = '/';
17
19
  }
18
20
  renderEmptyTable() {
19
21
  return html `<ix-widget class="empty" type="empty-table">
20
22
  <div class="header">
21
23
  <h2>${this.header}</h2>
22
- <ix-button type="button" has-icon trailing-icon appearance="text">
23
- <ix-icon slot="icon">chevron_right</ix-icon>
24
- View all
25
- </ix-button>
24
+ ${this.showViewAllButtonOnEmpty
25
+ ? html ` <ix-button
26
+ type="button"
27
+ has-icon
28
+ trailing-icon
29
+ appearance="text"
30
+ href=${this.href}
31
+ >
32
+ <ix-icon slot="icon">chevron_right</ix-icon>
33
+ View all
34
+ </ix-button>`
35
+ : nothing}
26
36
  </div>
27
- <div class="content">
28
- <ix-icon class="error">error</ix-icon>
37
+ <div
38
+ class=${`content ${this.showViewAllButtonOnEmpty ? 'view-all' : ''}`}
39
+ >
40
+ <ix-icon class="info" filled>info</ix-icon>
29
41
  <div class="description">
30
- <p>We are unable to display the relevant ticket information.</p>
31
- <p>
32
- Please, reach out to us via
33
- <a href="#">GlobalPortal@digitalrealty.com</a> for further
34
- assistance.
35
- </p>
42
+ <p>${this.emptyDescription}</p>
36
43
  </div>
44
+ ${this.showViewAllButtonOnEmpty
45
+ ? html ` <ix-button type="button" href=${this.href}>
46
+ View all
47
+ </ix-button>`
48
+ : nothing}
37
49
  </div>
38
50
  </ix-widget>`;
39
51
  }
@@ -52,6 +64,7 @@ let IxTableData = class IxTableData extends LitElement {
52
64
  }
53
65
  return html `<ix-widget>
54
66
  <ix-grid
67
+ variantClass="launchpad"
55
68
  .columns=${this.columns}
56
69
  .rows=${this.rows}
57
70
  .pageSize=${this.pageSize}
@@ -90,7 +103,7 @@ IxTableData.styles = css `
90
103
  align-items: center;
91
104
  width: 100%;
92
105
  width: -webkit-fill-available;
93
- margin: 0px -15px 0px -3px;
106
+ margin: 0px -15px 0 4px;
94
107
  }
95
108
  h2 {
96
109
  margin: 0px;
@@ -164,7 +177,7 @@ IxTableData.styles = css `
164
177
  margin: 0;
165
178
  }
166
179
  ix-widget.empty {
167
- --ix-widget-padding: 1rem 11px 1rem 24px;
180
+ --ix-widget-padding: 1rem 11px 22px 24px;
168
181
  }
169
182
  ix-widget.empty .content {
170
183
  display: flex;
@@ -173,23 +186,27 @@ IxTableData.styles = css `
173
186
  align-items: center;
174
187
  -webkit-box-pack: start;
175
188
  justify-content: start;
176
- margin: 40px;
189
+ margin: 22px 0 16px;
177
190
  }
178
- ix-widget.empty ix-icon.error {
191
+ ix-widget.empty .content.view-all {
192
+ margin-bottom: 8px;
193
+ }
194
+ ix-widget.empty ix-icon.info {
179
195
  user-select: none;
180
196
  width: 48px;
181
- height: 48px;
182
- --ix-icon-font-size: 44px;
197
+ height: 44px;
198
+ --ix-icon-font-size: 48px;
183
199
  --ix-icon-line-height: 1;
184
- color: rgba(255, 152, 0, 1);
200
+ color: var(--ix-sys-primary, #1456e0);
185
201
  }
186
202
  ix-widget.empty .description p {
187
203
  font-family: Red Hat Display;
188
- font-size: 24px;
204
+ font-size: 20px;
189
205
  font-weight: 700;
190
- line-height: 32px;
206
+ line-height: 24px;
207
+ letter-spacing: 0.15px;
191
208
  text-align: center;
192
- margin: 0.5rem;
209
+ margin-bottom: 24px;
193
210
  }
194
211
  ix-widget.empty .description p a {
195
212
  color: rgb(20, 86, 224);
@@ -204,12 +221,18 @@ __decorate([
204
221
  __decorate([
205
222
  property({ type: Boolean })
206
223
  ], IxTableData.prototype, "disabled", void 0);
224
+ __decorate([
225
+ property({ type: Boolean })
226
+ ], IxTableData.prototype, "showViewAllButtonOnEmpty", void 0);
207
227
  __decorate([
208
228
  property({ type: Number })
209
229
  ], IxTableData.prototype, "pageSize", void 0);
210
230
  __decorate([
211
231
  property({ type: String })
212
232
  ], IxTableData.prototype, "header", void 0);
233
+ __decorate([
234
+ property({ type: String })
235
+ ], IxTableData.prototype, "emptyDescription", void 0);
213
236
  __decorate([
214
237
  property({ type: String })
215
238
  ], IxTableData.prototype, "href", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"ix-table-data.js","sourceRoot":"","sources":["../src/ix-table-data.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE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;;;;;;;;;;;;;;;GAuHlB,AAvHY,CAuHX;AAEyB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAwB;AAEvB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAAiC;AAE9B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAkB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAa;AAEZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AApI5B,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAiMvB","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@digital-realty/ix-icon/ix-icon.js';\nimport '@digital-realty/ix-grid/ix-grid.js';\nimport './ix-widget.js';\nimport { loader } from './assets/iconset.js';\n\n@customElement('ix-table-data')\nexport class IxTableData extends LitElement {\n static styles = css`\n ix-widget {\n --ix-widget-padding: 0;\n }\n .empty-state {\n padding: 24px;\n }\n .header {\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n width: 100%;\n width: -webkit-fill-available;\n margin: 0px -15px 0px -3px;\n }\n h2 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 20px;\n line-height: 24px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n }\n h3 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n text-align: center;\n padding: 1rem;\n }\n .status {\n display: flex;\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n padding: 2px 12px;\n width: 185px;\n height: 28px;\n left: 0px;\n top: 0px;\n border-radius: 68px;\n flex: 0 0 auto;\n order: 0;\n -webkit-box-flex: 0;\n color: white;\n -webkit-box-pack: center;\n justify-content: center;\n background: rgb(76, 175, 80);\n }\n ix-grid {\n --_cell-padding: 0;\n }\n .loader {\n width: 24px;\n height: 24px;\n margin: 1rem auto;\n }\n svg {\n stroke: rgb(20, 86, 224);\n width: 48px;\n height: 48px;\n animation-name: loading;\n animation-duration: 1000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n margin: auto;\n }\n @keyframes loading {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n ix-widget.empty .header {\n margin: 0;\n }\n ix-widget.empty {\n --ix-widget-padding: 1rem 11px 1rem 24px;\n }\n ix-widget.empty .content {\n display: flex;\n flex-direction: column;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: start;\n justify-content: start;\n margin: 40px;\n }\n ix-widget.empty ix-icon.error {\n user-select: none;\n width: 48px;\n height: 48px;\n --ix-icon-font-size: 44px;\n --ix-icon-line-height: 1;\n color: rgba(255, 152, 0, 1);\n }\n ix-widget.empty .description p {\n font-family: Red Hat Display;\n font-size: 24px;\n font-weight: 700;\n line-height: 32px;\n text-align: center;\n margin: 0.5rem;\n }\n ix-widget.empty .description p a {\n color: rgb(20, 86, 224);\n }\n `;\n\n @property({ type: Array }) columns: string[] = [];\n\n @property({ type: Array }) rows: string[] | undefined = [];\n\n @property({ type: Boolean }) disabled = false;\n\n @property({ type: Number }) pageSize = 5;\n\n @property({ type: String }) header = '';\n\n @property({ type: String }) href = '/';\n\n renderEmptyTable() {\n return html`<ix-widget class=\"empty\" type=\"empty-table\">\n <div class=\"header\">\n <h2>${this.header}</h2>\n <ix-button type=\"button\" has-icon trailing-icon appearance=\"text\">\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View all\n </ix-button>\n </div>\n <div class=\"content\">\n <ix-icon class=\"error\">error</ix-icon>\n <div class=\"description\">\n <p>We are unable to display the relevant ticket information.</p>\n <p>\n Please, reach out to us via\n <a href=\"#\">GlobalPortal@digitalrealty.com</a> for further\n assistance.\n </p>\n </div>\n </div>\n </ix-widget>`;\n }\n\n protected override render() {\n if (this.disabled) {\n return this.renderEmptyTable();\n }\n if (!this.rows?.length) {\n return html`<ix-widget type=\"news-feed\">\n <div class=\"empty-state\">\n <h2>${this.header}</h2>\n <div class=\"loader\">${loader}</div>\n </div>\n </ix-widget>`;\n }\n return html`<ix-widget>\n <ix-grid\n .columns=${this.columns}\n .rows=${this.rows}\n .pageSize=${this.pageSize}\n .rowLimit=${this.rows?.length || 0}\n ?hide-filters=${true}\n add-params-to-url=\"false\"\n ><div slot=\"header\" class=\"header\">\n <h2>${this.header}</h2>\n <ix-button\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n href=${this.href}\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View all\n </ix-button>\n </div>\n </ix-grid>\n </ix-widget>`;\n }\n}\n"]}
1
+ {"version":3,"file":"ix-table-data.js","sourceRoot":"","sources":["../src/ix-table-data.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QA8HsB,YAAO,GAAa,EAAE,CAAC;QAEvB,SAAI,GAAyB,EAAE,CAAC;QAE9B,aAAQ,GAAG,KAAK,CAAC;QAEjB,6BAAwB,GAAG,KAAK,CAAC;QAElC,aAAQ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2HlB,AA3HY,CA2HX;AAEyB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAwB;AAEvB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAAiC;AAE9B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAkB;AAEjB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6DAAkC;AAElC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAa;AAEZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAuB;AAEtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AA5I5B,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAoNvB","sourcesContent":["import { html, LitElement, css, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@digital-realty/ix-icon/ix-icon.js';\nimport '@digital-realty/ix-grid/ix-grid.js';\nimport './ix-widget.js';\nimport { loader } from './assets/iconset.js';\n\n@customElement('ix-table-data')\nexport class IxTableData extends LitElement {\n static styles = css`\n ix-widget {\n --ix-widget-padding: 0;\n }\n .empty-state {\n padding: 24px;\n }\n .header {\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n width: 100%;\n width: -webkit-fill-available;\n margin: 0px -15px 0 4px;\n }\n h2 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 20px;\n line-height: 24px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n }\n h3 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n text-align: center;\n padding: 1rem;\n }\n .status {\n display: flex;\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n padding: 2px 12px;\n width: 185px;\n height: 28px;\n left: 0px;\n top: 0px;\n border-radius: 68px;\n flex: 0 0 auto;\n order: 0;\n -webkit-box-flex: 0;\n color: white;\n -webkit-box-pack: center;\n justify-content: center;\n background: rgb(76, 175, 80);\n }\n ix-grid {\n --_cell-padding: 0;\n }\n .loader {\n width: 24px;\n height: 24px;\n margin: 1rem auto;\n }\n svg {\n stroke: rgb(20, 86, 224);\n width: 48px;\n height: 48px;\n animation-name: loading;\n animation-duration: 1000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n margin: auto;\n }\n @keyframes loading {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n ix-widget.empty .header {\n margin: 0;\n }\n ix-widget.empty {\n --ix-widget-padding: 1rem 11px 22px 24px;\n }\n ix-widget.empty .content {\n display: flex;\n flex-direction: column;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: start;\n justify-content: start;\n margin: 22px 0 16px;\n }\n ix-widget.empty .content.view-all {\n margin-bottom: 8px;\n }\n ix-widget.empty ix-icon.info {\n user-select: none;\n width: 48px;\n height: 44px;\n --ix-icon-font-size: 48px;\n --ix-icon-line-height: 1;\n color: var(--ix-sys-primary, #1456e0);\n }\n ix-widget.empty .description p {\n font-family: Red Hat Display;\n font-size: 20px;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0.15px;\n text-align: center;\n margin-bottom: 24px;\n }\n ix-widget.empty .description p a {\n color: rgb(20, 86, 224);\n }\n `;\n\n @property({ type: Array }) columns: string[] = [];\n\n @property({ type: Array }) rows: string[] | undefined = [];\n\n @property({ type: Boolean }) disabled = false;\n\n @property({ type: Boolean }) showViewAllButtonOnEmpty = false;\n\n @property({ type: Number }) pageSize = 5;\n\n @property({ type: String }) header = '';\n\n @property({ type: String }) emptyDescription = '';\n\n @property({ type: String }) href = '/';\n\n renderEmptyTable() {\n return html`<ix-widget class=\"empty\" type=\"empty-table\">\n <div class=\"header\">\n <h2>${this.header}</h2>\n ${this.showViewAllButtonOnEmpty\n ? html` <ix-button\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n href=${this.href}\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View all\n </ix-button>`\n : nothing}\n </div>\n <div\n class=${`content ${this.showViewAllButtonOnEmpty ? 'view-all' : ''}`}\n >\n <ix-icon class=\"info\" filled>info</ix-icon>\n <div class=\"description\">\n <p>${this.emptyDescription}</p>\n </div>\n ${this.showViewAllButtonOnEmpty\n ? html` <ix-button type=\"button\" href=${this.href}>\n View all\n </ix-button>`\n : nothing}\n </div>\n </ix-widget>`;\n }\n\n protected override render() {\n if (this.disabled) {\n return this.renderEmptyTable();\n }\n if (!this.rows?.length) {\n return html`<ix-widget type=\"news-feed\">\n <div class=\"empty-state\">\n <h2>${this.header}</h2>\n <div class=\"loader\">${loader}</div>\n </div>\n </ix-widget>`;\n }\n return html`<ix-widget>\n <ix-grid\n variantClass=\"launchpad\"\n .columns=${this.columns}\n .rows=${this.rows}\n .pageSize=${this.pageSize}\n .rowLimit=${this.rows?.length || 0}\n ?hide-filters=${true}\n add-params-to-url=\"false\"\n ><div slot=\"header\" class=\"header\">\n <h2>${this.header}</h2>\n <ix-button\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n href=${this.href}\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View all\n </ix-button>\n </div>\n </ix-grid>\n </ix-widget>`;\n }\n}\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent ix-widget following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "Digital Realty",
6
- "version": "2.0.1",
6
+ "version": "2.0.3",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -39,10 +39,10 @@
39
39
  "dependencies": {
40
40
  "@adobe/lit-mobx": "^2.2.2",
41
41
  "@digital-realty/ix-button": "^3.2.31",
42
- "@digital-realty/ix-grid": "^1.0.41",
42
+ "@digital-realty/ix-grid": "^1.0.43",
43
43
  "@digital-realty/ix-icon": "^1.0.36",
44
44
  "@digital-realty/ix-list": "^1.0.7",
45
- "@digital-realty/theme": "^1.0.29",
45
+ "@digital-realty/theme": "^1.0.30",
46
46
  "@lit/react": "^1.0.2",
47
47
  "@material/web": "1.2.0",
48
48
  "date-fns": "^3.6.0",
@@ -126,5 +126,5 @@
126
126
  "README.md",
127
127
  "LICENSE"
128
128
  ],
129
- "gitHead": "961a9be4d7c02a65ef97391d18423ac252074d03"
129
+ "gitHead": "024e4b85148c7a248e9f283e35085f512e7c3b1e"
130
130
  }