@digital-realty/ix-widget 1.0.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/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/IxWidget.d.ts +6 -0
- package/dist/IxWidget.js +85 -0
- package/dist/IxWidget.js.map +1 -0
- package/dist/assets/columns.d.ts +5 -0
- package/dist/assets/columns.js +45 -0
- package/dist/assets/columns.js.map +1 -0
- package/dist/assets/contacts.d.ts +17 -0
- package/dist/assets/contacts.js +88 -0
- package/dist/assets/contacts.js.map +1 -0
- package/dist/assets/data.d.ts +2243 -0
- package/dist/assets/data.js +2354 -0
- package/dist/assets/data.js.map +1 -0
- package/dist/assets/iconset.d.ts +16 -0
- package/dist/assets/iconset.js +18 -0
- package/dist/assets/iconset.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/ix-action-list.d.ts +8 -0
- package/dist/ix-action-list.js +108 -0
- package/dist/ix-action-list.js.map +1 -0
- package/dist/ix-contacts.d.ts +9 -0
- package/dist/ix-contacts.js +137 -0
- package/dist/ix-contacts.js.map +1 -0
- package/dist/ix-info-card.d.ts +10 -0
- package/dist/ix-info-card.js +164 -0
- package/dist/ix-info-card.js.map +1 -0
- package/dist/ix-launchpad.d.ts +14 -0
- package/dist/ix-launchpad.js +188 -0
- package/dist/ix-launchpad.js.map +1 -0
- package/dist/ix-nav-item.d.ts +8 -0
- package/dist/ix-nav-item.js +98 -0
- package/dist/ix-nav-item.js.map +1 -0
- package/dist/ix-nav-list.d.ts +8 -0
- package/dist/ix-nav-list.js +44 -0
- package/dist/ix-nav-list.js.map +1 -0
- package/dist/ix-news-feed.d.ts +9 -0
- package/dist/ix-news-feed.js +243 -0
- package/dist/ix-news-feed.js.map +1 -0
- package/dist/ix-status-counter-group.d.ts +8 -0
- package/dist/ix-status-counter-group.js +115 -0
- package/dist/ix-status-counter-group.js.map +1 -0
- package/dist/ix-status-counter.d.ts +12 -0
- package/dist/ix-status-counter.js +163 -0
- package/dist/ix-status-counter.js.map +1 -0
- package/dist/ix-table-data.d.ts +12 -0
- package/dist/ix-table-data.js +99 -0
- package/dist/ix-table-data.js.map +1 -0
- package/dist/ix-widget.d.ts +1 -0
- package/dist/ix-widget.js +3 -0
- package/dist/ix-widget.js.map +1 -0
- package/dist/ix-widget.min.js +1 -0
- package/dist/styles/launchpad-styles.d.ts +1 -0
- package/dist/styles/launchpad-styles.js +221 -0
- package/dist/styles/launchpad-styles.js.map +1 -0
- package/package.json +128 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-launchpad.js","sourceRoot":"","sources":["../src/ix-launchpad.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,8BAA8B,CAAC;AACtC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,SAAS,GACb,sGAAsG,CAAC;AAGlG,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAGuB,SAAI,GAAQ;YACtC,UAAU;YACV,OAAO;YACP,QAAQ;YACR,GAAG,EAAE;gBACH,MAAM,EAAE,iBAAiB;gBACz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AC,IAAI,0CAAE,KAAK,CAAC,GAAG,CACzB,CAAC,CAAM,EAAE,EAAE,CACT,IAAI,CAAA,sBAAsB,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI;6BAC5B,CAAC,CAAC,IAAI;0BACT,CACL;;;;;;;;KAQhB,CAAC;IACJ,CAAC;;AAjLM,kBAAM,GAAG,CAAC,iBAAiB,CAAC,AAAtB,CAAuB;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAqBzB;AAxBS,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAmLvB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport './ix-status-counter-group.js';\nimport './ix-action-list.js';\nimport './ix-contacts.js';\nimport './ix-info-card.js';\nimport './ix-news-feed.js';\nimport './ix-table-data.js';\nimport './ix-nav-item.js';\nimport './ix-nav-list.js';\nimport { IxLaunchpadStyles } from './styles/launchpad-styles.js';\nimport { statusData, pageProps } from './assets/data.js';\nimport { columns } from './assets/columns.js';\nimport { contacts } from './assets/contacts.js';\n\nconst imgServer =\n 'https://gp-tst.digitalrealty.com/_next/image?url=https%3A%2F%2Ftst-cms-strapi.digitalrealtytrust.com';\n\n@customElement('ix-launchpad')\nexport class IxLaunchpad extends LitElement {\n static styles = [IxLaunchpadStyles];\n\n @property({ type: Object }) data: any = {\n statusData,\n columns,\n contacts,\n nav: {\n header: 'Service tickets',\n items: [\n { name: 'Customer Support', icon: 'cutomerSupport' },\n { name: 'Facility Access', icon: 'lock' },\n { name: 'Remote Hands', icon: 'remoteHands' },\n { name: 'Shipping and Receiving', icon: 'shipping' },\n ],\n },\n nav2: {\n header: 'USER MANAGEMENT',\n items: [\n { name: 'Add user', icon: 'addUser' },\n { name: 'Manage users', icon: 'manageUsers' },\n ],\n },\n pageProps,\n };\n\n /* fetchData() {\n fetch('./data.json')\n .then(response => response.json())\n .then(data => {\n setTimeout(() => {\n console.log(data);\n }, 2000);\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.fetchData();\n } */\n\n protected override render() {\n return html`\n <div class=\"outer\">\n <main>\n <div class=\"inner\">\n <header>\n <div>\n <h1>Launchpad</h1>\n </div>\n </header>\n <section>\n <div class=\"container\">\n <div class=\"content\">\n <ix-status-counter-group\n .data=${this.data.statusData}\n ></ix-status-counter-group>\n\n <ix-table-data\n .columns=${this.data.columns}\n .rows=${this.data.contacts}\n header=\"Ticket Updates\"\n >\n </ix-table-data>\n\n <ix-action-list></ix-action-list>\n\n <nav>\n <ix-nav-list .header=\"${this.data.nav.header}\">\n ${this.data.nav.items.map(\n (i: any) =>\n html`<ix-nav-item .icon=${i?.icon}\n >${i.name}</ix-nav-item\n >`\n )}\n </ix-nav-list>\n <ix-nav-list .header=\"${this.data.nav2?.header}\">\n ${this.data.nav2?.items.map(\n (i: any) =>\n html`<ix-nav-item .icon=${i?.icon}\n >${i.name}</ix-nav-item\n >`\n )}\n </ix-nav-list>\n </nav>\n\n <ix-news-feed\n header=\"What's New\"\n .data=${this.data.pageProps.pageProps.whatsNews}\n ></ix-news-feed>\n\n <div class=\"news-info\">\n <h2>Resources</h2>\n <div class=\"resources\">\n ${this.data.pageProps.pageProps.resources.map(\n (item: any) => html` <ix-info-card type=\"info-card-2\"\n ><img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${imgServer}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n <div slot=\"label\">${item.topics?.[0]?.name}</div>\n <div slot=\"title\">${item.title}</div>\n <ix-button\n slot=\"cta\"\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n Learn more\n </ix-button>\n </ix-info-card>`\n )}\n </div>\n\n <h2 class=\"\">News & Promotions</h2>\n <div class=\"newsAndPromotions\">\n ${this.data.pageProps.pageProps.newsAndPromotions.map(\n (item: any) => html` <ix-info-card type=\"info-card\">\n <img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${imgServer}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n <div slot=\"title\">${item.title}</div>\n <div slot=\"description\">${item.abstract}</div>\n <ix-button\n slot=\"cta\"\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n Learn more\n </ix-button>\n </ix-info-card>`\n )}\n </div>\n </div>\n\n <ix-contacts\n phonenumbers=${this.data.pageProps.pageProps.contactInfo\n .attributes.phoneNumbers}\n ></ix-contacts>\n </div>\n <nav>\n <ix-nav-list .header=\"${this.data.nav.header}\">\n ${this.data.nav.items.map(\n (i: any) =>\n html`<ix-nav-item .icon=${i?.icon}\n >${i.name}</ix-nav-item\n >`\n )}\n </ix-nav-list>\n <ix-nav-list .header=\"${this.data.nav2?.header}\">\n ${this.data.nav2?.items.map(\n (i: any) =>\n html`<ix-nav-item .icon=${i?.icon}\n >${i.name}</ix-nav-item\n >`\n )}\n </ix-nav-list>\n </nav>\n </div>\n </section>\n </div>\n </main>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@digital-realty/ix-icon/ix-icon.js';
|
|
3
|
+
import './IxWidget.js';
|
|
4
|
+
export declare class IxNavItem extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
icon: string;
|
|
7
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement, css } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import '@digital-realty/ix-icon/ix-icon.js';
|
|
5
|
+
import './IxWidget.js';
|
|
6
|
+
import { lock, cutomerSupport, remoteHands, shipping, addUser, manageUsers, } from './assets/iconset.js';
|
|
7
|
+
const iconMap = {
|
|
8
|
+
lock,
|
|
9
|
+
cutomerSupport,
|
|
10
|
+
remoteHands,
|
|
11
|
+
shipping,
|
|
12
|
+
addUser,
|
|
13
|
+
manageUsers,
|
|
14
|
+
};
|
|
15
|
+
let IxNavItem = class IxNavItem extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.icon = 'customerSupport';
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return html `<button>
|
|
22
|
+
<ix-icon>${iconMap[this.icon]}</ix-icon>
|
|
23
|
+
<h3><slot></slot></h3>
|
|
24
|
+
</button> `;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
IxNavItem.styles = css `
|
|
28
|
+
button {
|
|
29
|
+
padding: 12px 43px 12px 24px;
|
|
30
|
+
-webkit-box-pack: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
position: relative;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
-webkit-tap-highlight-color: transparent;
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
outline: 0px;
|
|
37
|
+
border-width: 1px 0px 0px;
|
|
38
|
+
border-right-style: initial;
|
|
39
|
+
border-bottom-style: initial;
|
|
40
|
+
border-left-style: initial;
|
|
41
|
+
border-right-color: initial;
|
|
42
|
+
border-bottom-color: initial;
|
|
43
|
+
border-left-color: initial;
|
|
44
|
+
border-image: initial;
|
|
45
|
+
margin: 0px;
|
|
46
|
+
border-radius: 0px;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
user-select: none;
|
|
49
|
+
vertical-align: middle;
|
|
50
|
+
appearance: none;
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
border-top-style: solid;
|
|
53
|
+
border-top-color: rgba(255, 255, 255, 0.25);
|
|
54
|
+
padding: 12px 24px;
|
|
55
|
+
display: flex;
|
|
56
|
+
-webkit-box-align: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
color: white;
|
|
59
|
+
width: 100%;
|
|
60
|
+
}
|
|
61
|
+
h3 {
|
|
62
|
+
margin: 0px;
|
|
63
|
+
font-family: "Red Hat Display", sans-serif;
|
|
64
|
+
font-style: normal;
|
|
65
|
+
font-weight: bold;
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
line-height: 24px;
|
|
68
|
+
letter-spacing: 0.15px;
|
|
69
|
+
-webkit-box-flex: 1;
|
|
70
|
+
flex-grow: 1;
|
|
71
|
+
color: rgb(255, 255, 255);
|
|
72
|
+
text-align: left;
|
|
73
|
+
}
|
|
74
|
+
ix-icon {
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
background-color: rgb(20, 86, 224);
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
display: flex;
|
|
79
|
+
-webkit-box-pack: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
-webkit-box-align: center;
|
|
82
|
+
align-items: center;
|
|
83
|
+
width: 48px;
|
|
84
|
+
height: 48px;
|
|
85
|
+
margin-right: 24px;
|
|
86
|
+
}
|
|
87
|
+
svg {
|
|
88
|
+
width: 32px;
|
|
89
|
+
margin: auto;
|
|
90
|
+
`;
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: String })
|
|
93
|
+
], IxNavItem.prototype, "icon", void 0);
|
|
94
|
+
IxNavItem = __decorate([
|
|
95
|
+
customElement('ix-nav-item')
|
|
96
|
+
], IxNavItem);
|
|
97
|
+
export { IxNavItem };
|
|
98
|
+
//# sourceMappingURL=ix-nav-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-nav-item.js","sourceRoot":"","sources":["../src/ix-nav-item.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,EACL,IAAI,EACJ,cAAc,EACd,WAAW,EACX,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,GAAQ;IACnB,IAAI;IACJ,cAAc;IACd,WAAW;IACX,QAAQ;IACR,OAAO;IACP,WAAW;CACZ,CAAC;AAGK,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAkEuB,SAAI,GAAG,iBAAiB,CAAC;IAQvD,CAAC;IANoB,MAAM;QACvB,OAAO,IAAI,CAAA;iBACE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;eAEpB,CAAC;IACd,CAAC;;AAxEM,gBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+DhB,AA/DU,CA+DT;AAEwB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAA0B;AAlE1C,SAAS;IADrB,aAAa,CAAC,aAAa,CAAC;GAChB,SAAS,CA0ErB","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 {\n lock,\n cutomerSupport,\n remoteHands,\n shipping,\n addUser,\n manageUsers,\n} from './assets/iconset.js';\n\nconst iconMap: any = {\n lock,\n cutomerSupport,\n remoteHands,\n shipping,\n addUser,\n manageUsers,\n};\n\n@customElement('ix-nav-item')\nexport class IxNavItem extends LitElement {\n static styles = css`\n button {\n padding: 12px 43px 12px 24px;\n -webkit-box-pack: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n outline: 0px;\n border-width: 1px 0px 0px;\n border-right-style: initial;\n border-bottom-style: initial;\n border-left-style: initial;\n border-right-color: initial;\n border-bottom-color: initial;\n border-left-color: initial;\n border-image: initial;\n margin: 0px;\n border-radius: 0px;\n cursor: pointer;\n user-select: none;\n vertical-align: middle;\n appearance: none;\n text-decoration: none;\n border-top-style: solid;\n border-top-color: rgba(255, 255, 255, 0.25);\n padding: 12px 24px;\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n color: white;\n width: 100%;\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: 20px;\n line-height: 24px;\n letter-spacing: 0.15px;\n -webkit-box-flex: 1;\n flex-grow: 1;\n color: rgb(255, 255, 255);\n text-align: left;\n }\n ix-icon {\n flex-shrink: 0;\n background-color: rgb(20, 86, 224);\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: 48px;\n height: 48px;\n margin-right: 24px;\n }\n svg {\n width: 32px;\n margin: auto;\n `;\n\n @property({ type: String }) icon = 'customerSupport';\n\n protected override render() {\n return html`<button>\n <ix-icon>${iconMap[this.icon]}</ix-icon>\n <h3><slot></slot></h3>\n </button> `;\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@digital-realty/ix-icon/ix-icon.js';
|
|
3
|
+
import './IxWidget.js';
|
|
4
|
+
export declare class IxNavList extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
header: string;
|
|
7
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement, css } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import '@digital-realty/ix-icon/ix-icon.js';
|
|
5
|
+
import './IxWidget.js';
|
|
6
|
+
let IxNavList = class IxNavList extends LitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.header = 'title';
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return html `<ix-widget type="nav-list">
|
|
13
|
+
<h2>${this.header}</h2>
|
|
14
|
+
<slot></slot>
|
|
15
|
+
</ix-widget>`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
IxNavList.styles = css `
|
|
19
|
+
ix-widget {
|
|
20
|
+
--ix-widget-background: rgb(7, 20, 84);
|
|
21
|
+
--ix-widget-padding: 0 0 1rem;
|
|
22
|
+
}
|
|
23
|
+
h2 {
|
|
24
|
+
margin: 0px;
|
|
25
|
+
font-family: 'Red Hat Display', sans-serif;
|
|
26
|
+
font-weight: 700;
|
|
27
|
+
font-style: normal;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
line-height: 18.52px;
|
|
30
|
+
letter-spacing: 1.25px;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
color: rgba(255, 255, 255, 0.6);
|
|
33
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.25);
|
|
34
|
+
padding: 20px 24px 12px;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: String })
|
|
39
|
+
], IxNavList.prototype, "header", void 0);
|
|
40
|
+
IxNavList = __decorate([
|
|
41
|
+
customElement('ix-nav-list')
|
|
42
|
+
], IxNavList);
|
|
43
|
+
export { IxNavList };
|
|
44
|
+
//# sourceMappingURL=ix-nav-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-nav-list.js","sourceRoot":"","sources":["../src/ix-nav-list.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;AAGhB,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAqBuB,WAAM,GAAG,OAAO,CAAC;IAQ/C,CAAC;IANoB,MAAM;QACvB,OAAO,IAAI,CAAA;YACH,IAAI,CAAC,MAAM;;iBAEN,CAAC;IAChB,CAAC;;AA3BM,gBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;GAkBlB,AAlBY,CAkBX;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAkB;AArBlC,SAAS;IADrB,aAAa,CAAC,aAAa,CAAC;GAChB,SAAS,CA6BrB","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';\n\n@customElement('ix-nav-list')\nexport class IxNavList extends LitElement {\n static styles = css`\n ix-widget {\n --ix-widget-background: rgb(7, 20, 84);\n --ix-widget-padding: 0 0 1rem;\n }\n h2 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-weight: 700;\n font-style: normal;\n font-size: 14px;\n line-height: 18.52px;\n letter-spacing: 1.25px;\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.6);\n border-bottom: 1px solid rgba(255, 255, 255, 0.25);\n padding: 20px 24px 12px;\n }\n `;\n\n @property({ type: String }) header = 'title';\n\n protected override render() {\n return html`<ix-widget type=\"nav-list\">\n <h2>${this.header}</h2>\n <slot></slot>\n </ix-widget>`;\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@digital-realty/ix-icon/ix-icon.js';
|
|
3
|
+
import './IxWidget.js';
|
|
4
|
+
export declare class IxNewsFeed extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
header: string;
|
|
7
|
+
data: never[];
|
|
8
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement, css } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import '@digital-realty/ix-icon/ix-icon.js';
|
|
5
|
+
import './IxWidget.js';
|
|
6
|
+
import { formatDistance, parseISO, startOfToday } from 'date-fns';
|
|
7
|
+
import { ticket } from './assets/iconset.js';
|
|
8
|
+
// import { enUS, es, pt } from "date-fns/locale";
|
|
9
|
+
let IxNewsFeed = class IxNewsFeed extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.header = 'title';
|
|
13
|
+
this.data = [];
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return html `<ix-widget type="news-feed">
|
|
17
|
+
<div class="header">
|
|
18
|
+
<h6>${this.header}</h6>
|
|
19
|
+
<ix-button
|
|
20
|
+
slot="cta"
|
|
21
|
+
type="button"
|
|
22
|
+
has-icon
|
|
23
|
+
trailing-icon
|
|
24
|
+
appearance="text"
|
|
25
|
+
>
|
|
26
|
+
<ix-icon slot="icon">chevron_right</ix-icon>
|
|
27
|
+
View All
|
|
28
|
+
</ix-button>
|
|
29
|
+
</div>
|
|
30
|
+
${this.data.map((item, id) => {
|
|
31
|
+
const { title = 'date', abstract = '...', uid = '#', dateAdded = '', } = item;
|
|
32
|
+
const dateOffset = formatDistance(parseISO(dateAdded), startOfToday(), {
|
|
33
|
+
addSuffix: true,
|
|
34
|
+
});
|
|
35
|
+
return html `<li>
|
|
36
|
+
<a href=${uid} tabindex=${id}>
|
|
37
|
+
<div class="icon">${ticket}</div>
|
|
38
|
+
<div class="details">
|
|
39
|
+
<p class="title">${title}</p>
|
|
40
|
+
<p class="description">${abstract}</p>
|
|
41
|
+
</div>
|
|
42
|
+
<span class="caption">${dateOffset}</span>
|
|
43
|
+
<span class="ripple"></span>
|
|
44
|
+
</a>
|
|
45
|
+
<span class="ripple"></span>
|
|
46
|
+
</li>`;
|
|
47
|
+
})}
|
|
48
|
+
</ix-widget>`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
IxNewsFeed.styles = css `
|
|
52
|
+
:host {
|
|
53
|
+
--ix-widget-padding: 0;
|
|
54
|
+
}
|
|
55
|
+
.header {
|
|
56
|
+
display: flex;
|
|
57
|
+
-webkit-box-pack: justify;
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
-webkit-box-align: center;
|
|
60
|
+
align-items: center;
|
|
61
|
+
padding: 10px 16px 10px 20px;
|
|
62
|
+
}
|
|
63
|
+
h6 {
|
|
64
|
+
margin: 0px;
|
|
65
|
+
font-family: 'Red Hat Display', sans-serif;
|
|
66
|
+
font-style: normal;
|
|
67
|
+
font-weight: bold;
|
|
68
|
+
font-size: 20px;
|
|
69
|
+
line-height: 24px;
|
|
70
|
+
letter-spacing: 0.15px;
|
|
71
|
+
color: rgb(9, 34, 65);
|
|
72
|
+
}
|
|
73
|
+
li {
|
|
74
|
+
-webkit-tap-highlight-color: transparent;
|
|
75
|
+
background-color: transparent;
|
|
76
|
+
outline: 0px;
|
|
77
|
+
border: 0px;
|
|
78
|
+
margin: 0px;
|
|
79
|
+
border-radius: 0px;
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
user-select: none;
|
|
82
|
+
vertical-align: middle;
|
|
83
|
+
appearance: none;
|
|
84
|
+
color: inherit;
|
|
85
|
+
display: flex;
|
|
86
|
+
-webkit-box-pack: start;
|
|
87
|
+
justify-content: flex-start;
|
|
88
|
+
-webkit-box-align: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
position: relative;
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
width: 100%;
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
text-align: left;
|
|
95
|
+
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
96
|
+
padding: 0px;
|
|
97
|
+
}
|
|
98
|
+
li:hover {
|
|
99
|
+
text-decoration: none;
|
|
100
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
101
|
+
-webkit-tap-highlight-color: transparent;
|
|
102
|
+
background-color: transparent;
|
|
103
|
+
outline: 0px;
|
|
104
|
+
border: 0px;
|
|
105
|
+
margin: 0px;
|
|
106
|
+
border-radius: 0px;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
user-select: none;
|
|
109
|
+
vertical-align: middle;
|
|
110
|
+
appearance: none;
|
|
111
|
+
color: inherit;
|
|
112
|
+
display: flex;
|
|
113
|
+
-webkit-box-pack: start;
|
|
114
|
+
justify-content: flex-start;
|
|
115
|
+
-webkit-box-align: center;
|
|
116
|
+
align-items: center;
|
|
117
|
+
position: relative;
|
|
118
|
+
text-decoration: none;
|
|
119
|
+
width: 100%;
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
text-align: left;
|
|
122
|
+
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
123
|
+
padding: 0px;
|
|
124
|
+
text-decoration: none;
|
|
125
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
126
|
+
}
|
|
127
|
+
a {
|
|
128
|
+
display: grid;
|
|
129
|
+
grid-template-columns: auto 1fr auto;
|
|
130
|
+
padding: 12px 24px 12px 20px;
|
|
131
|
+
-webkit-box-align: center;
|
|
132
|
+
|
|
133
|
+
-webkit-box-pack: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
position: relative;
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
-webkit-tap-highlight-color: transparent;
|
|
138
|
+
background-color: transparent;
|
|
139
|
+
outline: 0px;
|
|
140
|
+
border: 0px;
|
|
141
|
+
margin: 0px;
|
|
142
|
+
border-radius: 0px;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
user-select: none;
|
|
145
|
+
appearance: none;
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
color: inherit;
|
|
148
|
+
-webkit-box-flex: 1;
|
|
149
|
+
flex-grow: 1;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: 20px;
|
|
152
|
+
text-align: start;
|
|
153
|
+
}
|
|
154
|
+
aa {
|
|
155
|
+
display: grid;
|
|
156
|
+
grid-template-columns: auto 1fr;
|
|
157
|
+
padding: 8px 20px;
|
|
158
|
+
}
|
|
159
|
+
.icon {
|
|
160
|
+
flex-shrink: 0;
|
|
161
|
+
display: inline-flex;
|
|
162
|
+
-webkit-box-pack: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
-webkit-box-align: center;
|
|
165
|
+
align-items: center;
|
|
166
|
+
min-width: 48px;
|
|
167
|
+
width: 48px;
|
|
168
|
+
height: 48px;
|
|
169
|
+
font-size: 20px;
|
|
170
|
+
border-radius: 8px;
|
|
171
|
+
color: rgb(255, 255, 255);
|
|
172
|
+
background-color: rgb(20, 86, 224);
|
|
173
|
+
}
|
|
174
|
+
svg {
|
|
175
|
+
user-select: none;
|
|
176
|
+
width: 1em;
|
|
177
|
+
height: 1em;
|
|
178
|
+
display: inline-block;
|
|
179
|
+
fill: currentcolor;
|
|
180
|
+
flex-shrink: 0;
|
|
181
|
+
transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
182
|
+
font-size: 1.5rem;
|
|
183
|
+
}
|
|
184
|
+
.details {
|
|
185
|
+
gap: 0;
|
|
186
|
+
min-width: 0px;
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
}
|
|
190
|
+
.title {
|
|
191
|
+
margin: 0;
|
|
192
|
+
font-family: 'Open Sans', sans-serif;
|
|
193
|
+
font-style: normal;
|
|
194
|
+
font-weight: 400;
|
|
195
|
+
font-size: 16px;
|
|
196
|
+
line-height: 20px;
|
|
197
|
+
letter-spacing: 0.15px;
|
|
198
|
+
color: rgb(9, 34, 65);
|
|
199
|
+
}
|
|
200
|
+
.description {
|
|
201
|
+
overflow-wrap: break-word;
|
|
202
|
+
white-space: nowrap;
|
|
203
|
+
overflow-x: hidden;
|
|
204
|
+
text-overflow: ellipsis;
|
|
205
|
+
margin: 0;
|
|
206
|
+
font-family: 'Open Sans', sans-serif;
|
|
207
|
+
font-style: normal;
|
|
208
|
+
font-weight: 400;
|
|
209
|
+
font-size: 14px;
|
|
210
|
+
line-height: 24px;
|
|
211
|
+
letter-spacing: 0.25px;
|
|
212
|
+
color: rgb(9, 34, 65);
|
|
213
|
+
}
|
|
214
|
+
.caption {
|
|
215
|
+
margin: 0px;
|
|
216
|
+
font-family: 'Open Sans', sans-serif;
|
|
217
|
+
font-weight: 400;
|
|
218
|
+
font-style: normal;
|
|
219
|
+
font-size: 12px;
|
|
220
|
+
line-height: 16px;
|
|
221
|
+
letter-spacing: 0.4px;
|
|
222
|
+
color: rgba(9, 34, 65, 0.7);
|
|
223
|
+
}
|
|
224
|
+
.ripple {
|
|
225
|
+
overflow: hidden;
|
|
226
|
+
pointer-events: none;
|
|
227
|
+
position: absolute;
|
|
228
|
+
z-index: 0;
|
|
229
|
+
inset: 0px;
|
|
230
|
+
border-radius: inherit;
|
|
231
|
+
}
|
|
232
|
+
`;
|
|
233
|
+
__decorate([
|
|
234
|
+
property({ type: String })
|
|
235
|
+
], IxNewsFeed.prototype, "header", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
property({ type: Array })
|
|
238
|
+
], IxNewsFeed.prototype, "data", void 0);
|
|
239
|
+
IxNewsFeed = __decorate([
|
|
240
|
+
customElement('ix-news-feed')
|
|
241
|
+
], IxNewsFeed);
|
|
242
|
+
export { IxNewsFeed };
|
|
243
|
+
//# sourceMappingURL=ix-news-feed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-news-feed.js","sourceRoot":"","sources":["../src/ix-news-feed.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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CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;wCAAW;AA1L1B,UAAU;IADtB,aAAa,CAAC,cAAc,CAAC;GACjB,UAAU,CAoOtB","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 { formatDistance, parseISO, startOfToday } from 'date-fns';\nimport { ticket } from './assets/iconset.js';\n// import { enUS, es, pt } from \"date-fns/locale\";\n\n@customElement('ix-news-feed')\nexport class IxNewsFeed extends LitElement {\n static styles = css`\n :host {\n --ix-widget-padding: 0;\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 padding: 10px 16px 10px 20px;\n }\n h6 {\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 li {\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n outline: 0px;\n border: 0px;\n margin: 0px;\n border-radius: 0px;\n cursor: pointer;\n user-select: none;\n vertical-align: middle;\n appearance: none;\n color: inherit;\n display: flex;\n -webkit-box-pack: start;\n justify-content: flex-start;\n -webkit-box-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n text-align: left;\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n padding: 0px;\n }\n li:hover {\n text-decoration: none;\n background-color: rgba(0, 0, 0, 0.04);\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n outline: 0px;\n border: 0px;\n margin: 0px;\n border-radius: 0px;\n cursor: pointer;\n user-select: none;\n vertical-align: middle;\n appearance: none;\n color: inherit;\n display: flex;\n -webkit-box-pack: start;\n justify-content: flex-start;\n -webkit-box-align: center;\n align-items: center;\n position: relative;\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n text-align: left;\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n padding: 0px;\n text-decoration: none;\n background-color: rgba(0, 0, 0, 0.04);\n }\n a {\n display: grid;\n grid-template-columns: auto 1fr auto;\n padding: 12px 24px 12px 20px;\n -webkit-box-align: center;\n\n -webkit-box-pack: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n outline: 0px;\n border: 0px;\n margin: 0px;\n border-radius: 0px;\n cursor: pointer;\n user-select: none;\n appearance: none;\n text-decoration: none;\n color: inherit;\n -webkit-box-flex: 1;\n flex-grow: 1;\n align-items: center;\n gap: 20px;\n text-align: start;\n }\n aa {\n display: grid;\n grid-template-columns: auto 1fr;\n padding: 8px 20px;\n }\n .icon {\n flex-shrink: 0;\n display: inline-flex;\n -webkit-box-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n align-items: center;\n min-width: 48px;\n width: 48px;\n height: 48px;\n font-size: 20px;\n border-radius: 8px;\n color: rgb(255, 255, 255);\n background-color: rgb(20, 86, 224);\n }\n svg {\n user-select: none;\n width: 1em;\n height: 1em;\n display: inline-block;\n fill: currentcolor;\n flex-shrink: 0;\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n font-size: 1.5rem;\n }\n .details {\n gap: 0;\n min-width: 0px;\n display: flex;\n flex-direction: column;\n }\n .title {\n margin: 0;\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 .description {\n overflow-wrap: break-word;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n margin: 0;\n font-family: 'Open Sans', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n letter-spacing: 0.25px;\n color: rgb(9, 34, 65);\n }\n .caption {\n margin: 0px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 400;\n font-style: normal;\n font-size: 12px;\n line-height: 16px;\n letter-spacing: 0.4px;\n color: rgba(9, 34, 65, 0.7);\n }\n .ripple {\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n z-index: 0;\n inset: 0px;\n border-radius: inherit;\n }\n `;\n\n @property({ type: String }) header = 'title';\n\n @property({ type: Array }) data = [];\n\n protected override render() {\n return html`<ix-widget type=\"news-feed\">\n <div class=\"header\">\n <h6>${this.header}</h6>\n <ix-button\n slot=\"cta\"\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View All\n </ix-button>\n </div>\n ${this.data.map((item: any, id: number) => {\n const {\n title = 'date',\n abstract = '...',\n uid = '#',\n dateAdded = '',\n } = item;\n const dateOffset = formatDistance(parseISO(dateAdded), startOfToday(), {\n addSuffix: true,\n });\n return html`<li>\n <a href=${uid} tabindex=${id}>\n <div class=\"icon\">${ticket}</div>\n <div class=\"details\">\n <p class=\"title\">${title}</p>\n <p class=\"description\">${abstract}</p>\n </div>\n <span class=\"caption\">${dateOffset}</span>\n <span class=\"ripple\"></span>\n </a>\n <span class=\"ripple\"></span>\n </li>`;\n })}\n </ix-widget>`;\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import './IxWidget.js';
|
|
3
|
+
import './ix-status-counter.js';
|
|
4
|
+
export declare class IxStatusCounterGroup extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
data: never[];
|
|
7
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement, css } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import './IxWidget.js';
|
|
5
|
+
import './ix-status-counter.js';
|
|
6
|
+
import { laptop, users, mySites, dcim, locations } from './assets/iconset.js';
|
|
7
|
+
const iconMap = {
|
|
8
|
+
laptop,
|
|
9
|
+
users,
|
|
10
|
+
mySites,
|
|
11
|
+
dcim,
|
|
12
|
+
locations,
|
|
13
|
+
};
|
|
14
|
+
let IxStatusCounterGroup = class IxStatusCounterGroup extends LitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.data = [];
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return html `<ix-widget type="status-counter-group">
|
|
21
|
+
<div class="content">
|
|
22
|
+
<div class="layout">
|
|
23
|
+
${this.data.map((item, index) => {
|
|
24
|
+
const { value = 0, header = 'status', icon } = item;
|
|
25
|
+
return html `<ix-status-counter
|
|
26
|
+
class="b${index + 1}"
|
|
27
|
+
value=${value}
|
|
28
|
+
header=${header}
|
|
29
|
+
.icon=${iconMap[icon]}
|
|
30
|
+
>
|
|
31
|
+
</ix-status-counter>`;
|
|
32
|
+
})}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</ix-widget>`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
IxStatusCounterGroup.styles = css `
|
|
39
|
+
.layout {
|
|
40
|
+
display: grid;
|
|
41
|
+
}
|
|
42
|
+
@media (min-width: 1350px) {
|
|
43
|
+
.layout {
|
|
44
|
+
grid-gap: 44px 32px;
|
|
45
|
+
}
|
|
46
|
+
.layout .b1 {
|
|
47
|
+
grid-column-start: 1;
|
|
48
|
+
grid-column-end: 2;
|
|
49
|
+
}
|
|
50
|
+
.layout .b2 {
|
|
51
|
+
grid-column-start: 2;
|
|
52
|
+
grid-column-end: 4;
|
|
53
|
+
}
|
|
54
|
+
.layout .b3 {
|
|
55
|
+
grid-column-start: 4;
|
|
56
|
+
grid-column-end: 6;
|
|
57
|
+
}
|
|
58
|
+
.layout .b4 {
|
|
59
|
+
grid-column-start: 1;
|
|
60
|
+
grid-column-end: 3;
|
|
61
|
+
}
|
|
62
|
+
.layout .b5 {
|
|
63
|
+
grid-column-start: 3;
|
|
64
|
+
grid-column-end: 6;
|
|
65
|
+
}
|
|
66
|
+
ix-status-counter {
|
|
67
|
+
--ix-widget-padding: 1rem;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (max-width: 1349px) {
|
|
72
|
+
.layout {
|
|
73
|
+
grid-gap: 0 24px;
|
|
74
|
+
background: linear-gradient(
|
|
75
|
+
90deg,
|
|
76
|
+
rgba(0, 0, 0, 0) calc(50% - 1px),
|
|
77
|
+
rgba(9, 34, 65, 0.12) calc(50%),
|
|
78
|
+
rgba(0, 0, 0, 0) calc(50% + 1px)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
.layout .b1 {
|
|
82
|
+
grid-column-start: 1;
|
|
83
|
+
grid-column-end: 2;
|
|
84
|
+
grid-row-start: 1;
|
|
85
|
+
}
|
|
86
|
+
.layout .b2 {
|
|
87
|
+
grid-column-start: 1;
|
|
88
|
+
grid-column-end: 2;
|
|
89
|
+
grid-row-start: 2;
|
|
90
|
+
}
|
|
91
|
+
.layout .b3 {
|
|
92
|
+
grid-column-start: 1;
|
|
93
|
+
grid-column-end: 2;
|
|
94
|
+
grid-row-start: 3;
|
|
95
|
+
}
|
|
96
|
+
.layout .b4 {
|
|
97
|
+
grid-column-start: 2;
|
|
98
|
+
grid-column-end: 3;
|
|
99
|
+
grid-row-start: 1;
|
|
100
|
+
}
|
|
101
|
+
.layout .b5 {
|
|
102
|
+
grid-column-start: 2;
|
|
103
|
+
grid-column-end: 3;
|
|
104
|
+
grid-row-start: 2;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`;
|
|
108
|
+
__decorate([
|
|
109
|
+
property({ type: Array })
|
|
110
|
+
], IxStatusCounterGroup.prototype, "data", void 0);
|
|
111
|
+
IxStatusCounterGroup = __decorate([
|
|
112
|
+
customElement('ix-status-counter-group')
|
|
113
|
+
], IxStatusCounterGroup);
|
|
114
|
+
export { IxStatusCounterGroup };
|
|
115
|
+
//# sourceMappingURL=ix-status-counter-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ix-status-counter-group.js","sourceRoot":"","sources":["../src/ix-status-counter-group.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,eAAe,CAAC;AACvB,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE9E,MAAM,OAAO,GAAG;IACd,MAAM;IACN,KAAK;IACL,OAAO;IACP,IAAI;IACJ,SAAS;CACV,CAAC;AAGK,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAA7C;;QAwEsB,SAAI,GAAG,EAAE,CAAC;IAoBvC,CAAC;IAlBoB,MAAM;QACvB,OAAO,IAAI,CAAA;;;YAGH,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC9B,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;YACpD,OAAO,IAAI,CAAA;wBACC,KAAK,GAAG,CAAC;sBACX,KAAK;uBACJ,MAAM;sBACP,OAAO,CAAC,IAAI,CAAC;;iCAEF,CAAC;QACxB,CAAC,CAAC;;;iBAGK,CAAC;IAChB,CAAC;;AA1FM,2BAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqElB,AArEY,CAqEX;AAEyB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;kDAAW;AAxE1B,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CA4FhC","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport './IxWidget.js';\nimport './ix-status-counter.js';\nimport { laptop, users, mySites, dcim, locations } from './assets/iconset.js';\n\nconst iconMap = {\n laptop,\n users,\n mySites,\n dcim,\n locations,\n};\n\n@customElement('ix-status-counter-group')\nexport class IxStatusCounterGroup extends LitElement {\n static styles = css`\n .layout {\n display: grid;\n }\n @media (min-width: 1350px) {\n .layout {\n grid-gap: 44px 32px;\n }\n .layout .b1 {\n grid-column-start: 1;\n grid-column-end: 2;\n }\n .layout .b2 {\n grid-column-start: 2;\n grid-column-end: 4;\n }\n .layout .b3 {\n grid-column-start: 4;\n grid-column-end: 6;\n }\n .layout .b4 {\n grid-column-start: 1;\n grid-column-end: 3;\n }\n .layout .b5 {\n grid-column-start: 3;\n grid-column-end: 6;\n }\n ix-status-counter {\n --ix-widget-padding: 1rem;\n }\n }\n\n @media (max-width: 1349px) {\n .layout {\n grid-gap: 0 24px;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0) calc(50% - 1px),\n rgba(9, 34, 65, 0.12) calc(50%),\n rgba(0, 0, 0, 0) calc(50% + 1px)\n );\n }\n .layout .b1 {\n grid-column-start: 1;\n grid-column-end: 2;\n grid-row-start: 1;\n }\n .layout .b2 {\n grid-column-start: 1;\n grid-column-end: 2;\n grid-row-start: 2;\n }\n .layout .b3 {\n grid-column-start: 1;\n grid-column-end: 2;\n grid-row-start: 3;\n }\n .layout .b4 {\n grid-column-start: 2;\n grid-column-end: 3;\n grid-row-start: 1;\n }\n .layout .b5 {\n grid-column-start: 2;\n grid-column-end: 3;\n grid-row-start: 2;\n }\n }\n `;\n\n @property({ type: Array }) data = [];\n\n protected override render() {\n return html`<ix-widget type=\"status-counter-group\">\n <div class=\"content\">\n <div class=\"layout\">\n ${this.data.map((item, index) => {\n const { value = 0, header = 'status', icon } = item;\n return html`<ix-status-counter\n class=\"b${index + 1}\"\n value=${value}\n header=${header}\n .icon=${iconMap[icon]}\n >\n </ix-status-counter>`;\n })}\n </div>\n </div>\n </ix-widget>`;\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@digital-realty/ix-icon/ix-icon.js';
|
|
3
|
+
import './IxWidget.js';
|
|
4
|
+
export declare class IxStatusCounter extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
value: number | undefined;
|
|
7
|
+
header: string;
|
|
8
|
+
icon: import("lit").TemplateResult<2>;
|
|
9
|
+
apiUrl: string | undefined;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
12
|
+
}
|