@sapudex/web-components 2.7.2 → 2.8.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.
- package/bundle.esm.js +2 -0
- package/cypress/specs/LinkList.cy.tsx +49 -0
- package/cypress/specs/LinkListItem.cy.tsx +102 -0
- package/cypress/support/component-imports.instrumented.ts +4 -0
- package/cypress/support/component-imports.src.ts +4 -0
- package/dist/LinkList.d.ts +58 -0
- package/dist/LinkList.js +89 -0
- package/dist/LinkList.js.map +1 -0
- package/dist/LinkListItem.d.ts +78 -0
- package/dist/LinkListItem.js +97 -0
- package/dist/LinkListItem.js.map +1 -0
- package/dist/LinkListItemTemplate.d.ts +2 -0
- package/dist/LinkListItemTemplate.js +17 -0
- package/dist/LinkListItemTemplate.js.map +1 -0
- package/dist/LinkListTemplate.d.ts +2 -0
- package/dist/LinkListTemplate.js +5 -0
- package/dist/LinkListTemplate.js.map +1 -0
- package/dist/Tile.d.ts +2 -2
- package/dist/Tile.js +3 -3
- package/dist/Tile.js.map +1 -1
- package/dist/TileTemplate.d.ts +2 -0
- package/dist/TileTemplate.js +7 -0
- package/dist/TileTemplate.js.map +1 -0
- package/dist/assets/{InputSuggestions-D0OZo5eY.js → InputSuggestions-CmCRxU5Z.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-BOc_KoW1.js → ListItemStandardExpandableTextTemplate-i35T7dr8.js} +1 -1
- package/dist/assets/{bundle.esm-BLn1Dq6A.js → bundle.esm-BIStxKRx.js} +204 -202
- package/dist/css/themes/LinkList.css +1 -0
- package/dist/css/themes/LinkListItem.css +1 -0
- package/dist/css/themes/ListGroupHeader.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/custom-elements-internal.json +305 -0
- package/dist/custom-elements.json +287 -0
- package/dist/generated/themes/LinkList.css.d.ts +2 -0
- package/dist/generated/themes/LinkList.css.js +8 -0
- package/dist/generated/themes/LinkList.css.js.map +1 -0
- package/dist/generated/themes/LinkListItem.css.d.ts +2 -0
- package/dist/generated/themes/LinkListItem.css.js +8 -0
- package/dist/generated/themes/LinkListItem.css.js.map +1 -0
- package/dist/generated/themes/ListGroupHeader.css.d.ts +1 -1
- package/dist/generated/themes/ListGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.d.ts +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.d.ts +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +72 -0
- package/dist/web-types.json +141 -1
- package/package.json +1 -1
- package/src/LinkList.ts +93 -0
- package/src/LinkListItem.ts +126 -0
- package/src/LinkListItemTemplate.tsx +52 -0
- package/src/LinkListTemplate.tsx +13 -0
- package/src/Tile.ts +5 -5
- package/src/TileTemplate.tsx +31 -0
- package/src/generated/themes/LinkList.css.ts +9 -0
- package/src/generated/themes/LinkListItem.css.ts +9 -0
- package/src/generated/themes/ListGroupHeader.css.ts +1 -1
- package/src/generated/themes/ListItem.css.ts +1 -1
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/themes/LinkList.css +53 -0
- package/src/themes/LinkListItem.css +84 -0
- package/src/themes/ListGroupHeader.css +1 -1
- package/src/themes/ListItem.css +2 -2
- package/dist/generated/templates/TileTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/TileTemplate.lit.js +0 -9
- package/dist/generated/templates/TileTemplate.lit.js.map +0 -1
- package/src/Tile.hbs +0 -21
- package/src/generated/templates/TileTemplate.lit.ts +0 -13
package/bundle.esm.js
CHANGED
|
@@ -48,6 +48,8 @@ import "./dist/Footer.js";
|
|
|
48
48
|
import "./dist/HeroBanner.js";
|
|
49
49
|
import "./dist/InputGroup.js";
|
|
50
50
|
import "./dist/Link.js";
|
|
51
|
+
import "./dist/LinkList.js";
|
|
52
|
+
import "./dist/LinkListItem.js";
|
|
51
53
|
import "./dist/List.js";
|
|
52
54
|
import "./dist/ListGroupHeader.js";
|
|
53
55
|
import "./dist/ListGroupHeaderBase.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { UDExLinkList, UDExLinkListItem } from "../support/component-imports.js";
|
|
2
|
+
|
|
3
|
+
const linkList = <UDExLinkList
|
|
4
|
+
id="udex-link-list"
|
|
5
|
+
accessibleName="link list accessible name"
|
|
6
|
+
accessibleRole="link list role">
|
|
7
|
+
<UDExLinkListItem
|
|
8
|
+
icon="sap-icon://physical-activity"
|
|
9
|
+
href="www.sap.com"
|
|
10
|
+
label="CRM and customer experience"
|
|
11
|
+
target="_self">
|
|
12
|
+
</UDExLinkListItem>
|
|
13
|
+
<UDExLinkListItem
|
|
14
|
+
icon="sap-icon://ai"
|
|
15
|
+
href="https://www.sap.com/products/artificial-intelligence/blogs-resources.html"
|
|
16
|
+
label="AI"
|
|
17
|
+
target="_self"
|
|
18
|
+
accessible-role="listitem">
|
|
19
|
+
</UDExLinkListItem>
|
|
20
|
+
<UDExLinkListItem
|
|
21
|
+
icon="sap-icon://business-by-design"
|
|
22
|
+
href="https://www.sap.com/topics/business-transformation"
|
|
23
|
+
label="Business transformation"
|
|
24
|
+
target="_self">
|
|
25
|
+
</UDExLinkListItem>
|
|
26
|
+
</UDExLinkList>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
describe("Link List component", () => {
|
|
30
|
+
beforeEach(() => {
|
|
31
|
+
cy.mount(linkList)
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it("is correctly rendered", () => {
|
|
35
|
+
cy.get("[udex-link-list]").shadow().find(".udex-link-list").should("be.visible");
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("renders right amount of items", () => {
|
|
39
|
+
cy.get("[udex-link-list]").find("udex-link-list-item").should("have.length", 3);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("renders", () => {
|
|
43
|
+
cy.get("[udex-link-list]").shadow().find(".udex-link-list").should("have.attr", "role", "link list role")
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("renders", () => {
|
|
47
|
+
cy.get("[udex-link-list]").shadow().find(".udex-link-list").should("have.attr", "aria-label", "link list accessible name")
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { UDExLinkListItem } from "../support/component-imports.js";
|
|
2
|
+
|
|
3
|
+
const linkBased = <UDExLinkListItem
|
|
4
|
+
id="linkBased"
|
|
5
|
+
href="www.sap.com"
|
|
6
|
+
label="CRM and customer experience"
|
|
7
|
+
target="_blank"
|
|
8
|
+
accessibleName="item accessible name">
|
|
9
|
+
</UDExLinkListItem>
|
|
10
|
+
|
|
11
|
+
const tileBased = <UDExLinkListItem
|
|
12
|
+
id="tileBased"
|
|
13
|
+
icon="sap-icon://physical-activity"
|
|
14
|
+
href="www.sap.com"
|
|
15
|
+
label="Supply chain management"
|
|
16
|
+
target="_blank"
|
|
17
|
+
type="TileS"
|
|
18
|
+
accessibleName="item accessible name">
|
|
19
|
+
</UDExLinkListItem>
|
|
20
|
+
|
|
21
|
+
describe("Link item component", () => {
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
cy.mount(linkBased)
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it("link is correctly rendered", () => {
|
|
27
|
+
cy.get("#linkBased").shadow().find("[udex-link]").should("be.visible");
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("label is set correctly", () => {
|
|
31
|
+
cy.get("#linkBased").shadow().find("[udex-link]").should("have.text", "CRM and customer experience");
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("icon does not exist for link-based item", () => {
|
|
35
|
+
cy.get("#linkBased").shadow().find("[ui5-icon]").should("not.exist");
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("href attribute is set correctly", () => {
|
|
39
|
+
cy.get("#linkBased").shadow().find("[udex-link]").should("have.attr", "href", "www.sap.com");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("accessibleName attribute is set correctly", () => {
|
|
43
|
+
cy.get("#linkBased").shadow().find("[udex-link]").should("have.attr", "accessible-name", "item accessible name");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("target attribute is set correctly", () => {
|
|
47
|
+
cy.get("#linkBased").shadow().find("[udex-link]").should("have.attr", "target", "_blank");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("click item emits \"item-click\" event", () => {
|
|
51
|
+
const stub = cy.stub();
|
|
52
|
+
cy.get("#linkBased").then($el => {
|
|
53
|
+
$el.get(0).addEventListener("item-click", stub);
|
|
54
|
+
});
|
|
55
|
+
cy.get("#linkBased").shadow().find("[udex-link]").click()
|
|
56
|
+
.then(() => {
|
|
57
|
+
expect(stub).to.have.been.called;
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("tests the \"item-click\" event is prevented when prevent default is called", () => {
|
|
62
|
+
cy.get("#linkBased").shadow().find("[udex-link]")
|
|
63
|
+
.then($link => {
|
|
64
|
+
$link.get(0).addEventListener("item-click", event => {
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
cy.get("#linkBased").shadow().find("[udex-link]").click();
|
|
70
|
+
cy.url().should("not.include", "www.sap.com");
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
describe("Tile item component", () => {
|
|
75
|
+
beforeEach(() => {
|
|
76
|
+
cy.mount(tileBased)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it("tile is correctly rendered", () => {
|
|
80
|
+
cy.get("#tileBased").shadow().find("[udex-tile]").should("be.visible");
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("label is set correctly", () => {
|
|
84
|
+
cy.get("#tileBased").shadow().find("[udex-tile]").should("have.text", "Supply chain management");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("icon is set correctly", () => {
|
|
88
|
+
cy.get("#tileBased").shadow().find("[ui5-icon]").should("exist");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("href attribute is set correctly", () => {
|
|
92
|
+
cy.get("#tileBased").shadow().find("[udex-tile]").should("have.attr", "href", "www.sap.com");
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("accessibleName attribute is set correctly", () => {
|
|
96
|
+
cy.get("#tileBased").shadow().find("[udex-tile]").should("have.attr", "accessible-name", "item accessible name");
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("target attribute is set correctly", () => {
|
|
100
|
+
cy.get("#tileBased").shadow().find("[udex-tile]").should("have.attr", "target", "_blank");
|
|
101
|
+
});
|
|
102
|
+
});
|
|
@@ -37,6 +37,8 @@ import UDExTableRow from "../../instrumented/TableRow.js";
|
|
|
37
37
|
import UDExTableGroupRow from "../../instrumented/TableGroupRow.js";
|
|
38
38
|
import UDExTableCell from "../../instrumented/TableCell.js";
|
|
39
39
|
import UDExLink from "../../instrumented/Link.js";
|
|
40
|
+
import UDExLinkList from "../../instrumented/LinkList.js";
|
|
41
|
+
import UDExLinkListItem from "../../instrumented/LinkListItem.js";
|
|
40
42
|
import UDExRatingIndicator from "../../instrumented/RatingIndicator.js";
|
|
41
43
|
import UDExSelectBoxSelectAll from "../../instrumented/SelectBoxSelectAll.js";
|
|
42
44
|
import UDExSelectBoxGroupHeader from "../../instrumented/SelectBoxGroupHeader.js";
|
|
@@ -61,6 +63,8 @@ export {
|
|
|
61
63
|
UDExEventRibbon,
|
|
62
64
|
UDExFooter,
|
|
63
65
|
UDExLink,
|
|
66
|
+
UDExLinkList,
|
|
67
|
+
UDExLinkListItem,
|
|
64
68
|
UDExListItem,
|
|
65
69
|
UDExPhoneNumberField,
|
|
66
70
|
UDExRatingBar,
|
|
@@ -37,6 +37,8 @@ import UDExTableRow from "../../src/TableRow.js";
|
|
|
37
37
|
import UDExTableGroupRow from "../../src/TableGroupRow.js";
|
|
38
38
|
import UDExTableCell from "../../src/TableCell.js";
|
|
39
39
|
import UDExLink from "../../src/Link.js";
|
|
40
|
+
import UDExLinkList from "../../src/LinkList.js";
|
|
41
|
+
import UDExLinkListItem from "../../src/LinkListItem.js";
|
|
40
42
|
import UDExRatingIndicator from "../../src/RatingIndicator.js";
|
|
41
43
|
import UDExSelectBoxSelectAll from "../../src/SelectBoxSelectAll.js";
|
|
42
44
|
import UDExSelectBoxGroupHeader from "../../src/SelectBoxGroupHeader.js";
|
|
@@ -61,6 +63,8 @@ export {
|
|
|
61
63
|
UDExEventRibbon,
|
|
62
64
|
UDExFooter,
|
|
63
65
|
UDExLink,
|
|
66
|
+
UDExLinkList,
|
|
67
|
+
UDExLinkListItem,
|
|
64
68
|
UDExListItem,
|
|
65
69
|
UDExPhoneNumberField,
|
|
66
70
|
UDExRatingBar,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type UDExLinkListItem from "./LinkListItem.js";
|
|
3
|
+
export declare enum UDExLinkListType {
|
|
4
|
+
Link = "Link",
|
|
5
|
+
TileS = "TileS",
|
|
6
|
+
TileL = "TileL"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @class
|
|
10
|
+
*
|
|
11
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* <h3>Usage</h3>
|
|
15
|
+
*
|
|
16
|
+
* For the <code>udex-link-list</code>
|
|
17
|
+
* <h3>ES6 Module Import</h3>
|
|
18
|
+
*
|
|
19
|
+
* <code>import "@sapudex/web-components/dist/LinkList.js";</code>
|
|
20
|
+
*
|
|
21
|
+
* @constructor
|
|
22
|
+
* @extends UI5Element
|
|
23
|
+
* @tagname udex-link-list
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
declare class UDExLinkList extends UI5Element {
|
|
27
|
+
/**
|
|
28
|
+
* Defines the accessible ARIA name of the component.
|
|
29
|
+
*
|
|
30
|
+
* @default undefined
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
accessibleName?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Defines the role of the item.
|
|
36
|
+
* @public
|
|
37
|
+
* @default "list"
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
accessibleRole: string;
|
|
41
|
+
/**
|
|
42
|
+
* Slot for list items.
|
|
43
|
+
*
|
|
44
|
+
* @slot items
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
items: Array<UDExLinkListItem>;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the type of the item.
|
|
50
|
+
*
|
|
51
|
+
* @default "link-based"
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
type: `${UDExLinkListType}`;
|
|
55
|
+
onBeforeRendering(): void;
|
|
56
|
+
prepareListItems(): void;
|
|
57
|
+
}
|
|
58
|
+
export default UDExLinkList;
|
package/dist/LinkList.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
11
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
12
|
+
import LinkListTemplate from "./LinkListTemplate.js";
|
|
13
|
+
// Styles
|
|
14
|
+
import LinkListCss from "./generated/themes/LinkList.css.js";
|
|
15
|
+
export var UDExLinkListType;
|
|
16
|
+
(function (UDExLinkListType) {
|
|
17
|
+
UDExLinkListType["Link"] = "Link";
|
|
18
|
+
UDExLinkListType["TileS"] = "TileS";
|
|
19
|
+
UDExLinkListType["TileL"] = "TileL";
|
|
20
|
+
})(UDExLinkListType || (UDExLinkListType = {}));
|
|
21
|
+
/**
|
|
22
|
+
* @class
|
|
23
|
+
*
|
|
24
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* <h3>Usage</h3>
|
|
28
|
+
*
|
|
29
|
+
* For the <code>udex-link-list</code>
|
|
30
|
+
* <h3>ES6 Module Import</h3>
|
|
31
|
+
*
|
|
32
|
+
* <code>import "@sapudex/web-components/dist/LinkList.js";</code>
|
|
33
|
+
*
|
|
34
|
+
* @constructor
|
|
35
|
+
* @extends UI5Element
|
|
36
|
+
* @tagname udex-link-list
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
let UDExLinkList = class UDExLinkList extends UI5Element {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
/**
|
|
43
|
+
* Defines the role of the item.
|
|
44
|
+
* @public
|
|
45
|
+
* @default "list"
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
this.accessibleRole = "list";
|
|
49
|
+
/**
|
|
50
|
+
* Defines the type of the item.
|
|
51
|
+
*
|
|
52
|
+
* @default "link-based"
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
this.type = UDExLinkListType.Link;
|
|
56
|
+
}
|
|
57
|
+
onBeforeRendering() {
|
|
58
|
+
this.prepareListItems();
|
|
59
|
+
}
|
|
60
|
+
prepareListItems() {
|
|
61
|
+
this.items.forEach(item => {
|
|
62
|
+
item.type = this.type;
|
|
63
|
+
item._accessibleRole = "listitem";
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
__decorate([
|
|
68
|
+
property()
|
|
69
|
+
], UDExLinkList.prototype, "accessibleName", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
property()
|
|
72
|
+
], UDExLinkList.prototype, "accessibleRole", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
slot({ type: HTMLElement, "default": true })
|
|
75
|
+
], UDExLinkList.prototype, "items", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
property()
|
|
78
|
+
], UDExLinkList.prototype, "type", void 0);
|
|
79
|
+
UDExLinkList = __decorate([
|
|
80
|
+
customElement({
|
|
81
|
+
tag: "udex-link-list",
|
|
82
|
+
renderer: jsxRenderer,
|
|
83
|
+
styles: LinkListCss,
|
|
84
|
+
template: LinkListTemplate,
|
|
85
|
+
})
|
|
86
|
+
], UDExLinkList);
|
|
87
|
+
UDExLinkList.define();
|
|
88
|
+
export default UDExLinkList;
|
|
89
|
+
//# sourceMappingURL=LinkList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkList.js","sourceRoot":"","sources":["../src/LinkList.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAE/E,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAE7D,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,mCAAe,CAAA;IACf,mCAAe,CAAA;AACjB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AACD;;;;;;;;;;;;;;;;;GAiBG;AAQH,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QAUE;;;;;WAKG;QAED,mBAAc,GAAG,MAAM,CAAC;QAW1B;;;;;WAKG;QAED,SAAI,GAA0B,gBAAgB,CAAC,IAAI,CAAC;IAYxD,CAAC;IAVC,iBAAiB;QACf,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACtB,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAvCG;IADD,QAAQ,EAAE;oDACe;AASxB;IADD,QAAQ,EAAE;oDACe;AASxB;IADD,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;2CACX;AAShC;IADD,QAAQ,EAAE;0CAC2C;AAnClD,YAAY;IAPjB,aAAa,CAAC;QACb,GAAG,EAAE,gBAAgB;QACrB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;KAC3B,CAAC;GAEI,YAAY,CA+CjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type UDExLinkListItem from \"./LinkListItem.js\";\nimport LinkListTemplate from \"./LinkListTemplate.js\";\n\n// Styles\nimport LinkListCss from \"./generated/themes/LinkList.css.js\";\n\nexport enum UDExLinkListType {\n Link = \"Link\",\n TileS = \"TileS\",\n TileL = \"TileL\",\n}\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>udex-link-list</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/LinkList.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @tagname udex-link-list\n * @public\n */\n@customElement({\n tag: \"udex-link-list\",\n renderer: jsxRenderer,\n styles: LinkListCss,\n template: LinkListTemplate,\n})\n\nclass UDExLinkList extends UI5Element {\n /**\n * Defines the accessible ARIA name of the component.\n *\n * @default undefined\n * @public\n */\n @property()\n accessibleName?: string;\n\n /**\n * Defines the role of the item.\n * @public\n * @default \"list\"\n *\n */\n @property()\n accessibleRole = \"list\";\n\n /**\n * Slot for list items.\n *\n * @slot items\n * @public\n */\n @slot({ type: HTMLElement, \"default\": true })\n items!: Array<UDExLinkListItem>;\n\n /**\n * Defines the type of the item.\n *\n * @default \"link-based\"\n * @public\n */\n @property()\n type: `${UDExLinkListType}` = UDExLinkListType.Link;\n\n onBeforeRendering(): void {\n this.prepareListItems();\n }\n\n prepareListItems(): void {\n this.items.forEach(item => {\n item.type = this.type;\n item._accessibleRole = \"listitem\";\n });\n }\n}\n\nUDExLinkList.define();\n\nexport default UDExLinkList;\n"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import { UDExLinkListType } from "./LinkList.js";
|
|
3
|
+
import { UDExTarget } from "./types/common.js";
|
|
4
|
+
type UDExListLinkItemClickEventDetail = {
|
|
5
|
+
originalEvent: Event;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @class
|
|
9
|
+
*
|
|
10
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* <h3>Usage</h3>
|
|
14
|
+
*
|
|
15
|
+
* For the <code>udex-link-list-item</code>
|
|
16
|
+
* <h3>ES6 Module Import</h3>
|
|
17
|
+
*
|
|
18
|
+
* <code>import "@sapudex/web-components/dist/LinkListItem.js";</code>
|
|
19
|
+
*
|
|
20
|
+
* @constructor
|
|
21
|
+
* @extends UI5Element
|
|
22
|
+
* @tagname udex-link-list-item
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
declare class UDExLinkListItem extends UI5Element {
|
|
26
|
+
eventDetails: {
|
|
27
|
+
"item-click": UDExListLinkItemClickEventDetail;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Defines the href for the item.
|
|
31
|
+
* @default undefined
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
href?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Defines target for the item
|
|
37
|
+
* @default "_self"
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
target: `${UDExTarget}`;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the icon, displayed as graphical element within the component before the item's label.
|
|
43
|
+
*
|
|
44
|
+
* @default undefined
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
icon?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the type of the item.
|
|
50
|
+
* @default "link"
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
type: `${UDExLinkListType}`;
|
|
54
|
+
/**
|
|
55
|
+
* Defines the accessible aria-label of the component.
|
|
56
|
+
*
|
|
57
|
+
* @default undefined
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
accessibleName?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Defines the role of the item.
|
|
63
|
+
* @private
|
|
64
|
+
* @default "listitem"
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
_accessibleRole?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Defines the label of the item.
|
|
70
|
+
*
|
|
71
|
+
* @default undefined
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
label?: string;
|
|
75
|
+
fireItemClickEvent(e: CustomEvent): void;
|
|
76
|
+
get isLink(): boolean;
|
|
77
|
+
}
|
|
78
|
+
export default UDExLinkListItem;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
11
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
12
|
+
import { UDExLinkListType } from "./LinkList.js";
|
|
13
|
+
import LinkListItemTemplate from "./LinkListItemTemplate.js";
|
|
14
|
+
import { UDExTarget } from "./types/common.js";
|
|
15
|
+
// Styles
|
|
16
|
+
import LinkListItemCss from "./generated/themes/LinkListItem.css.js";
|
|
17
|
+
/**
|
|
18
|
+
* @class
|
|
19
|
+
*
|
|
20
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* <h3>Usage</h3>
|
|
24
|
+
*
|
|
25
|
+
* For the <code>udex-link-list-item</code>
|
|
26
|
+
* <h3>ES6 Module Import</h3>
|
|
27
|
+
*
|
|
28
|
+
* <code>import "@sapudex/web-components/dist/LinkListItem.js";</code>
|
|
29
|
+
*
|
|
30
|
+
* @constructor
|
|
31
|
+
* @extends UI5Element
|
|
32
|
+
* @tagname udex-link-list-item
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
let UDExLinkListItem = class UDExLinkListItem extends UI5Element {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
/**
|
|
39
|
+
* Defines target for the item
|
|
40
|
+
* @default "_self"
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
this.target = UDExTarget._self;
|
|
44
|
+
/**
|
|
45
|
+
* Defines the type of the item.
|
|
46
|
+
* @default "link"
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
this.type = UDExLinkListType.Link;
|
|
50
|
+
}
|
|
51
|
+
fireItemClickEvent(e) {
|
|
52
|
+
this.fireDecoratorEvent("item-click", {
|
|
53
|
+
originalEvent: this.isLink ? e : e.detail.originalEvent,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
get isLink() {
|
|
57
|
+
return this.type === UDExLinkListType.Link;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
__decorate([
|
|
61
|
+
property()
|
|
62
|
+
], UDExLinkListItem.prototype, "href", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
property()
|
|
65
|
+
], UDExLinkListItem.prototype, "target", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
property()
|
|
68
|
+
], UDExLinkListItem.prototype, "icon", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
property()
|
|
71
|
+
], UDExLinkListItem.prototype, "type", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
property()
|
|
74
|
+
], UDExLinkListItem.prototype, "accessibleName", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
property()
|
|
77
|
+
], UDExLinkListItem.prototype, "_accessibleRole", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
property()
|
|
80
|
+
], UDExLinkListItem.prototype, "label", void 0);
|
|
81
|
+
UDExLinkListItem = __decorate([
|
|
82
|
+
customElement({
|
|
83
|
+
tag: "udex-link-list-item",
|
|
84
|
+
renderer: jsxRenderer,
|
|
85
|
+
styles: LinkListItemCss,
|
|
86
|
+
template: LinkListItemTemplate,
|
|
87
|
+
})
|
|
88
|
+
/**
|
|
89
|
+
* Triggered when the user clicks on an item.
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
,
|
|
93
|
+
event("item-click", { bubbles: true })
|
|
94
|
+
], UDExLinkListItem);
|
|
95
|
+
UDExLinkListItem.define();
|
|
96
|
+
export default UDExLinkListItem;
|
|
97
|
+
//# sourceMappingURL=LinkListItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkListItem.js","sourceRoot":"","sources":["../src/LinkListItem.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,SAAS;AACT,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAMrE;;;;;;;;;;;;;;;;;GAiBG;AAcH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAaE;;;;WAIG;QAED,WAAM,GAAoB,UAAU,CAAC,KAAK,CAAC;QAW7C;;;;WAIG;QAED,SAAI,GAA0B,gBAAgB,CAAC,IAAI,CAAC;IAsCxD,CAAC;IATC,kBAAkB,CAAC,CAAc;QAC/B,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE;YACpC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa;SACxD,CAAC,CAAC;IACL,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,IAAI,KAAK,gBAAgB,CAAC,IAAI,CAAC;IAC7C,CAAC;CACF,CAAA;AA/DG;IADD,QAAQ,EAAE;8CACK;AAQd;IADD,QAAQ,EAAE;gDACkC;AAS3C;IADD,QAAQ,EAAE;8CACK;AAQd;IADD,QAAQ,EAAE;8CAC2C;AASpD;IADD,QAAQ,EAAE;wDACe;AASxB;IADD,QAAQ,EAAE;yDACgB;AASzB;IADD,QAAQ,EAAE;+CACM;AA/Db,gBAAgB;IAbrB,aAAa,CAAC;QACb,GAAG,EAAE,qBAAqB;QAC1B,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,eAAe;QACvB,QAAQ,EAAE,oBAAoB;KAC/B,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;GAEjC,gBAAgB,CA0ErB;AAED,gBAAgB,CAAC,MAAM,EAAE,CAAC;AAE1B,eAAe,gBAAgB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { UDExLinkListType } from \"./LinkList.js\";\nimport LinkListItemTemplate from \"./LinkListItemTemplate.js\";\nimport { UDExTarget } from \"./types/common.js\";\n\n// Styles\nimport LinkListItemCss from \"./generated/themes/LinkListItem.css.js\";\n\ntype UDExListLinkItemClickEventDetail = {\n originalEvent: Event,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>udex-link-list-item</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/LinkListItem.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @tagname udex-link-list-item\n * @public\n */\n@customElement({\n tag: \"udex-link-list-item\",\n renderer: jsxRenderer,\n styles: LinkListItemCss,\n template: LinkListItemTemplate,\n})\n\n/**\n * Triggered when the user clicks on an item.\n * @public\n */\n@event(\"item-click\", { bubbles: true })\n\nclass UDExLinkListItem extends UI5Element {\n eventDetails!: {\n \"item-click\": UDExListLinkItemClickEventDetail,\n };\n\n /**\n * Defines the href for the item.\n * @default undefined\n * @public\n */\n @property()\n href?: string;\n\n /**\n * Defines target for the item\n * @default \"_self\"\n * @public\n */\n @property()\n target: `${UDExTarget}` = UDExTarget._self;\n\n /**\n * Defines the icon, displayed as graphical element within the component before the item's label.\n *\n * @default undefined\n * @public\n */\n @property()\n icon?: string;\n\n /**\n * Defines the type of the item.\n * @default \"link\"\n * @public\n */\n @property()\n type: `${UDExLinkListType}` = UDExLinkListType.Link;\n\n /**\n * Defines the accessible aria-label of the component.\n *\n * @default undefined\n * @public\n */\n @property()\n accessibleName?: string;\n\n /**\n * Defines the role of the item.\n * @private\n * @default \"listitem\"\n *\n */\n @property()\n _accessibleRole?: string;\n\n /**\n * Defines the label of the item.\n *\n * @default undefined\n * @public\n */\n @property()\n label?: string;\n\n fireItemClickEvent(e: CustomEvent): void {\n this.fireDecoratorEvent(\"item-click\", {\n originalEvent: this.isLink ? e : e.detail.originalEvent,\n });\n }\n\n get isLink(): boolean {\n return this.type === UDExLinkListType.Link;\n }\n}\n\nUDExLinkListItem.define();\n\nexport default UDExLinkListItem;\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
|
+
import { UDExLinkListType } from "./LinkList.js";
|
|
3
|
+
import UDExDivider from "./Divider.js";
|
|
4
|
+
import UDExLink from "./Link.js";
|
|
5
|
+
import UDExTile from "./Tile.js";
|
|
6
|
+
import UI5Icon from "@ui5/webcomponents/dist/Icon.js";
|
|
7
|
+
import slimArrowRight from "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
8
|
+
export default function LinkListItemTemplate() {
|
|
9
|
+
const isTileL = this.type === UDExLinkListType.TileL;
|
|
10
|
+
const rootClass = "udex-link-list-item";
|
|
11
|
+
const tileClass = isTileL ? `${rootClass}__tile-l` : `${rootClass}__tile-s`;
|
|
12
|
+
const iconClass = isTileL ? `${rootClass}__tile-icon-l` : `${rootClass}__tile-icon-s`;
|
|
13
|
+
const holderClass = isTileL ? `${rootClass}__tile-holder-l` : `${rootClass}__tile-holder-s`;
|
|
14
|
+
const textClass = isTileL ? `${rootClass}__tile-text-l` : `${rootClass}__tile-text-s`;
|
|
15
|
+
return (_jsxs("div", { className: rootClass, role: this._accessibleRole, children: [this.isLink && (_jsxs(_Fragment, { children: [_jsx(UDExLink, { class: `${rootClass}__link`, endIcon: slimArrowRight, accessibleName: this.accessibleName, href: this.href, target: this.target, onClick: this.fireItemClickEvent, children: this.label }), _jsx(UDExDivider, { class: `${rootClass}__divider` })] })), !this.isLink && (_jsx(UDExTile, { class: tileClass, href: this.href, target: this.target, accessibleName: this.accessibleName, "onui5-click": this.fireItemClickEvent, interactive: true, children: _jsxs("div", { class: holderClass, children: [this.icon && _jsx(UI5Icon, { class: iconClass, name: this.icon }), _jsx("span", { class: textClass, children: this.label })] }) }))] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=LinkListItemTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkListItemTemplate.js","sourceRoot":"","sources":["../src/LinkListItemTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,OAAO,MAAM,iCAAiC,CAAC;AACtD,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAG/E,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,KAAK,gBAAgB,CAAC,KAAK,CAAC;IACrD,MAAM,SAAS,GAAG,qBAAqB,CAAC;IACxC,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,UAAU,CAAC;IAC5E,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,eAAe,CAAC;IACtF,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,iBAAiB,CAAC,CAAC,CAAC,GAAG,SAAS,iBAAiB,CAAC;IAC5F,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,eAAe,CAAC;IAEtF,OAAO,CACL,eACE,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,CAAC,eAA2B,aACrC,IAAI,CAAC,MAAM,IAAI,CACd,8BACE,KAAC,QAAQ,IACP,KAAK,EAAE,GAAG,SAAS,QAAQ,EAC3B,OAAO,EAAE,cAAc,EACvB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,kBAAkB,YAC/B,IAAI,CAAC,KAAK,GACF,EACX,KAAC,WAAW,IAAC,KAAK,EAAE,GAAG,SAAS,WAAW,GAAgB,IAC1D,CACJ,EACA,CAAC,IAAI,CAAC,MAAM,IAAI,CACf,KAAC,QAAQ,IACP,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,cAAc,EAAE,IAAI,CAAC,cAAc,iBACtB,IAAI,CAAC,kBAAkB,EACpC,WAAW,kBACX,eAAK,KAAK,EAAE,WAAW,aACpB,IAAI,CAAC,IAAI,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAY,EACpE,eAAM,KAAK,EAAE,SAAS,YAAG,IAAI,CAAC,KAAK,GAAQ,IACvC,GACG,CACZ,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type LinkListItem from \"./LinkListItem.js\";\nimport { UDExLinkListType } from \"./LinkList.js\";\nimport UDExDivider from \"./Divider.js\";\nimport UDExLink from \"./Link.js\";\nimport UDExTile from \"./Tile.js\";\nimport UI5Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport slimArrowRight from \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport type { AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\n\nexport default function LinkListItemTemplate(this: LinkListItem) {\n const isTileL = this.type === UDExLinkListType.TileL;\n const rootClass = \"udex-link-list-item\";\n const tileClass = isTileL ? `${rootClass}__tile-l` : `${rootClass}__tile-s`;\n const iconClass = isTileL ? `${rootClass}__tile-icon-l` : `${rootClass}__tile-icon-s`;\n const holderClass = isTileL ? `${rootClass}__tile-holder-l` : `${rootClass}__tile-holder-s`;\n const textClass = isTileL ? `${rootClass}__tile-text-l` : `${rootClass}__tile-text-s`;\n\n return (\n <div\n className={rootClass}\n role={this._accessibleRole as AriaRole}>\n {this.isLink && (\n <>\n <UDExLink\n class={`${rootClass}__link`}\n endIcon={slimArrowRight}\n accessibleName={this.accessibleName}\n href={this.href}\n target={this.target}\n onClick={this.fireItemClickEvent}>\n {this.label}\n </UDExLink>\n <UDExDivider class={`${rootClass}__divider`}></UDExDivider>\n </>\n )}\n {!this.isLink && (\n <UDExTile\n class={tileClass}\n href={this.href}\n target={this.target}\n accessibleName={this.accessibleName}\n onui5-click={this.fireItemClickEvent}\n interactive>\n <div class={holderClass}>\n {this.icon && <UI5Icon class={iconClass} name={this.icon}></UI5Icon>}\n <span class={textClass}>{this.label}</span>\n </div>\n </UDExTile>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
|
+
export default function LinkListTemplate() {
|
|
3
|
+
return (_jsx("div", { className: "udex-link-list", role: this.accessibleRole, "aria-label": this.accessibleName, children: _jsx("slot", {}) }));
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=LinkListTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkListTemplate.js","sourceRoot":"","sources":["../src/LinkListTemplate.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACtC,OAAO,CACL,cACE,SAAS,EAAC,gBAAgB,EAC1B,IAAI,EAAE,IAAI,CAAC,cAA0B,gBACzB,IAAI,CAAC,cAAc,YAC/B,gBAAa,GACT,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type LinkList from \"./LinkList.js\";\nimport type { AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\n\nexport default function LinkListTemplate(this: LinkList) {\n return (\n <div\n className=\"udex-link-list\"\n role={this.accessibleRole as AriaRole}\n aria-label={this.accessibleName}>\n <slot></slot>\n </div>\n );\n}\n"]}
|
package/dist/Tile.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
type UDExTileClickEventDetail = {
|
|
3
|
-
originalEvent:
|
|
3
|
+
originalEvent: MouseEvent;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
6
|
* @class
|
|
@@ -75,6 +75,6 @@ declare class UDExTile extends UI5Element {
|
|
|
75
75
|
default: Node;
|
|
76
76
|
onEnterDOM(): void;
|
|
77
77
|
_onkeydown(e: KeyboardEvent): void;
|
|
78
|
-
_onclick(e:
|
|
78
|
+
_onclick(e: MouseEvent): void;
|
|
79
79
|
}
|
|
80
80
|
export default UDExTile;
|
package/dist/Tile.js
CHANGED
|
@@ -8,11 +8,11 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
8
8
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
9
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
10
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
11
|
-
import
|
|
11
|
+
import jsxRenderer from "@ui5/webcomponents-base/renderer/JsxRenderer.js";
|
|
12
12
|
import { isSpace } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
13
13
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
14
14
|
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
15
|
-
import TileTemplate from "./
|
|
15
|
+
import TileTemplate from "./TileTemplate.js";
|
|
16
16
|
// Styles
|
|
17
17
|
import TileCss from "./generated/themes/Tile.css.js";
|
|
18
18
|
/**
|
|
@@ -66,7 +66,7 @@ __decorate([
|
|
|
66
66
|
UDExTile = __decorate([
|
|
67
67
|
customElement({
|
|
68
68
|
tag: "udex-tile",
|
|
69
|
-
renderer:
|
|
69
|
+
renderer: jsxRenderer,
|
|
70
70
|
styles: TileCss,
|
|
71
71
|
template: TileTemplate,
|
|
72
72
|
})
|