@jumpgroup/jump-design-system 0.2.3 → 0.2.5
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/dist/cjs/{index-12f40d28.js → index-41aaa52a.js} +125 -5
- package/dist/cjs/index-41aaa52a.js.map +1 -0
- package/dist/cjs/jump-badge.cjs.entry.js +6 -6
- package/dist/cjs/jump-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-button.cjs.entry.js +4 -3
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-card.cjs.entry.js +3 -3
- package/dist/cjs/jump-card.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-design-system.cjs.js +3 -3
- package/dist/cjs/jump-design-system.cjs.js.map +1 -1
- package/dist/cjs/jump-icon.cjs.entry.js +5 -5
- package/dist/cjs/jump-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +32 -10
- package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab.cjs.entry.js +29 -0
- package/dist/cjs/jump-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/jump-badge/jump-badge.css +1 -1
- package/dist/collection/components/jump-badge/jump-badge.js +4 -4
- package/dist/collection/components/jump-badge/jump-badge.js.map +1 -1
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js +2 -2
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js +14 -181
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js +10 -172
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-filled.stories.js +13 -227
- package/dist/collection/components/jump-button/jump-button-filled.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js +12 -245
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-outline.stories.js +18 -214
- package/dist/collection/components/jump-button/jump-button-outline.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-text.stories.js +10 -216
- package/dist/collection/components/jump-button/jump-button-text.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button.css +17 -7
- package/dist/collection/components/jump-button/jump-button.js +22 -3
- package/dist/collection/components/jump-button/jump-button.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card.js +13 -13
- package/dist/collection/components/jump-card/jump-card.js.map +1 -1
- package/dist/collection/components/{app-icon → jump-icon}/jump-icon.js +2 -2
- package/dist/collection/components/jump-icon/jump-icon.js.map +1 -0
- package/dist/collection/components/{app-icon → jump-icon}/jump-icon.stories.js +1 -1
- package/dist/collection/components/jump-icon/jump-icon.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/test/jump-icon.e2e.js.map +1 -0
- package/dist/collection/components/{app-icon → jump-icon}/test/jump-icon.spec.js +2 -2
- package/dist/collection/components/jump-icon/test/jump-icon.spec.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js +41 -24
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination-products.stories.js +19 -40
- package/dist/collection/components/jump-pagination/jump-pagination-products.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination.css +13 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js +64 -31
- package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -1
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js +28 -0
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js.map +1 -0
- package/dist/collection/components/jump-tab/jump-tab.css +3 -0
- package/dist/collection/components/jump-tab/jump-tab.js +71 -0
- package/dist/collection/components/jump-tab/jump-tab.js.map +1 -0
- package/dist/collection/components/jump-tab/test/jump-tab.e2e.js +10 -0
- package/dist/collection/components/jump-tab/test/jump-tab.e2e.js.map +1 -0
- package/dist/collection/components/jump-tab/test/jump-tab.spec.js +18 -0
- package/dist/collection/components/jump-tab/test/jump-tab.spec.js.map +1 -0
- package/dist/collection/utils/utils.js +17 -4
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/jump-badge.js +7 -7
- package/dist/components/jump-badge.js.map +1 -1
- package/dist/components/jump-button.js +4 -2
- package/dist/components/jump-button.js.map +1 -1
- package/dist/components/jump-card.js +13 -13
- package/dist/components/jump-card.js.map +1 -1
- package/dist/components/jump-icon.js +2 -2
- package/dist/components/jump-icon2.js +4 -4
- package/dist/components/jump-icon2.js.map +1 -1
- package/dist/components/jump-pagination.js +38 -13
- package/dist/components/jump-pagination.js.map +1 -1
- package/dist/components/jump-tab.d.ts +11 -0
- package/dist/components/jump-tab.js +46 -0
- package/dist/components/jump-tab.js.map +1 -0
- package/dist/esm/{index-d09b8a38.js → index-192aeaf1.js} +125 -6
- package/dist/esm/index-192aeaf1.js.map +1 -0
- package/dist/esm/jump-badge.entry.js +6 -6
- package/dist/esm/jump-badge.entry.js.map +1 -1
- package/dist/esm/jump-button.entry.js +4 -3
- package/dist/esm/jump-button.entry.js.map +1 -1
- package/dist/esm/jump-card.entry.js +3 -3
- package/dist/esm/jump-card.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +4 -4
- package/dist/esm/jump-design-system.js.map +1 -1
- package/dist/esm/jump-icon.entry.js +5 -5
- package/dist/esm/jump-icon.entry.js.map +1 -1
- package/dist/esm/jump-pagination.entry.js +32 -10
- package/dist/esm/jump-pagination.entry.js.map +1 -1
- package/dist/esm/jump-tab.entry.js +25 -0
- package/dist/esm/jump-tab.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-20ceb40c.js +3 -0
- package/dist/jump-design-system/p-20ceb40c.js.map +1 -0
- package/dist/jump-design-system/{p-b2967e30.entry.js → p-511d4425.entry.js} +3 -3
- package/dist/jump-design-system/p-511d4425.entry.js.map +1 -0
- package/dist/jump-design-system/p-61729377.entry.js +2 -0
- package/dist/jump-design-system/p-61729377.entry.js.map +1 -0
- package/dist/jump-design-system/{p-fea57bd7.entry.js → p-700b96b4.entry.js} +2 -2
- package/dist/jump-design-system/{p-fea57bd7.entry.js.map → p-700b96b4.entry.js.map} +1 -1
- package/dist/jump-design-system/p-87256ed6.entry.js +2 -0
- package/dist/jump-design-system/p-87256ed6.entry.js.map +1 -0
- package/dist/jump-design-system/{p-81fba573.entry.js → p-8f5caf32.entry.js} +2 -2
- package/dist/jump-design-system/p-8f5caf32.entry.js.map +1 -0
- package/dist/jump-design-system/p-960188c6.entry.js +2 -0
- package/dist/jump-design-system/p-960188c6.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +20 -7
- package/dist/types/components/jump-badge/jump-badge.d.ts +1 -1
- package/dist/types/components/jump-button/jump-button-anchor.stories.d.ts +0 -116
- package/dist/types/components/jump-button/jump-button-dimension.stories.d.ts +2 -117
- package/dist/types/components/jump-button/jump-button-filled.stories.d.ts +1 -107
- package/dist/types/components/jump-button/jump-button-only-icon.stories.d.ts +4 -115
- package/dist/types/components/jump-button/jump-button-outline.stories.d.ts +4 -110
- package/dist/types/components/jump-button/jump-button-text.stories.d.ts +2 -123
- package/dist/types/components/jump-button/jump-button.d.ts +5 -1
- package/dist/types/components/{app-icon → jump-icon}/jump-icon.d.ts +1 -1
- package/dist/types/components/jump-pagination/jump-pagination-pages.stories.d.ts +2 -1
- package/dist/types/components/jump-pagination/jump-pagination-products.stories.d.ts +2 -2
- package/dist/types/components/jump-pagination/jump-pagination.d.ts +10 -8
- package/dist/types/components/jump-tab/jump-tab-inline.stories.d.ts +18 -0
- package/dist/types/components/jump-tab/jump-tab.d.ts +6 -0
- package/dist/types/components.d.ts +47 -14
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +3 -2
- package/dist/cjs/index-12f40d28.js.map +0 -1
- package/dist/collection/components/app-icon/jump-icon.js.map +0 -1
- package/dist/collection/components/app-icon/jump-icon.stories.js.map +0 -1
- package/dist/collection/components/app-icon/test/jump-icon.e2e.js.map +0 -1
- package/dist/collection/components/app-icon/test/jump-icon.spec.js.map +0 -1
- package/dist/collection/utils/utils.spec.js +0 -16
- package/dist/collection/utils/utils.spec.js.map +0 -1
- package/dist/esm/index-d09b8a38.js.map +0 -1
- package/dist/jump-design-system/p-062fa189.entry.js +0 -2
- package/dist/jump-design-system/p-062fa189.entry.js.map +0 -1
- package/dist/jump-design-system/p-407027a9.js +0 -3
- package/dist/jump-design-system/p-407027a9.js.map +0 -1
- package/dist/jump-design-system/p-81fba573.entry.js.map +0 -1
- package/dist/jump-design-system/p-b2967e30.entry.js.map +0 -1
- package/dist/jump-design-system/p-e0c9453d.entry.js +0 -2
- package/dist/jump-design-system/p-e0c9453d.entry.js.map +0 -1
- /package/dist/collection/components/{app-icon → jump-icon}/jump-icon.css +0 -0
- /package/dist/collection/components/{app-icon → jump-icon}/test/jump-icon.e2e.js +0 -0
- /package/dist/types/components/{app-icon → jump-icon}/jump-icon.stories.d.ts +0 -0
|
@@ -2,32 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-41aaa52a.js');
|
|
6
6
|
|
|
7
|
-
const jumpPaginationCss = ":host{display:block}.JumpPagination{--pagination-label-color:var(--neutral-grey-secondary);--pagination-arrows-color:var(--neutral-grey-secondary);font-family:var(--ff-primary)}.JumpPagination__Wrapper{display:flex;justify-content:space-between}.JumpPagination__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPagination__Wrapper .elementsPerPage label{color:var(--pagination-label-color);font-size:14px;font-weight:normal}.JumpPagination__Wrapper .indicators{font-size:16px;font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--pagination-label-color)}.JumpPagination__Wrapper .indicators .arrow{color:var(--pagination-arrows-color);display:flex;align-items:center;gap:10px}.JumpPagination__Wrapper .indicators .elements{color:var(--pagination-label-color);display:flex;align-items:center;gap:5px}";
|
|
7
|
+
const jumpPaginationCss = ":host{display:block}.JumpPagination{--pagination-label-color:var(--neutral-grey-secondary);--pagination-arrows-color:var(--neutral-grey-secondary);--pagination-arrows-disabled:#CBCBCB;font-family:var(--ff-primary)}.JumpPagination__Wrapper{display:flex;justify-content:space-between}.JumpPagination__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPagination__Wrapper .elementsPerPage label{color:var(--pagination-label-color);font-size:14px;font-weight:normal}.JumpPagination__Wrapper .indicators{font-size:16px;font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--pagination-label-color)}.JumpPagination__Wrapper .indicators .arrow{color:var(--pagination-arrows-color);display:flex;align-items:center;gap:10px}.JumpPagination__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPagination__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--pagination-arrows-disabled)}.JumpPagination__Wrapper .indicators .elements{color:var(--pagination-label-color);display:flex;align-items:center;gap:5px}";
|
|
8
8
|
const JumpPaginationStyle0 = jumpPaginationCss;
|
|
9
9
|
|
|
10
10
|
const JumpPagination = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
+
this.jumpChangePage = index.createEvent(this, "jump-change-page", 7);
|
|
14
|
+
this.firstPage = 1;
|
|
15
|
+
this.currentPage = undefined;
|
|
13
16
|
this.totalElements = undefined;
|
|
14
17
|
this.pagLabel = 'di';
|
|
15
|
-
this.
|
|
16
|
-
this.lastPage =
|
|
18
|
+
this.initialPage = 1;
|
|
19
|
+
this.lastPage = 10;
|
|
17
20
|
this.labelElementsPerPage = 'Elementi per pagina';
|
|
18
21
|
this.elementsRanges = [10, 20, 60, 100];
|
|
19
|
-
this.firstPage = undefined;
|
|
20
22
|
this.completeVersion = false;
|
|
21
|
-
this.
|
|
23
|
+
this.showFirstAndLast = false;
|
|
24
|
+
}
|
|
25
|
+
watchCurrentPage(newValue, oldValue) {
|
|
26
|
+
let details = {
|
|
27
|
+
currentPage: newValue,
|
|
28
|
+
previousPage: oldValue,
|
|
29
|
+
firstPage: this.firstPage,
|
|
30
|
+
lastPage: this.lastPage,
|
|
31
|
+
direction: newValue > oldValue ? 'next' : 'prev'
|
|
32
|
+
};
|
|
33
|
+
this.jumpChangePage.emit(details);
|
|
34
|
+
}
|
|
35
|
+
/* ---------------------- @LIFECYCLE ------------------------- */
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.currentPage = this.initialPage;
|
|
22
38
|
}
|
|
23
39
|
render() {
|
|
24
40
|
var _a;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
index.h("
|
|
41
|
+
console.log('completeVersion', this.completeVersion);
|
|
42
|
+
return (index.h(index.Host, { key: '32e300881b3a78d25edf6480e9a8a6594f907c76', class: "JumpPagination" }, index.h("div", { key: '0c4e133e409740331083588fbb046d79c2878ea9', class: "JumpPagination__Wrapper" }, this.completeVersion &&
|
|
43
|
+
index.h("div", { key: '13daa8e819ec294b50823becc7e8d904eff66f32', class: "elementsPerPage" }, index.h("label", { key: '162555e0ebfc295d96d5ba358ec879eba1730746', htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), index.h("select", { key: 'c4e99d784347a67c5616b3ed0ca25934dbdae55f', name: "elements", id: "elements" }, this.elementsRanges.map((range) => (index.h("option", { value: range }, range))))), index.h("div", { key: '5eb516226cf5bcb23e575109371c4f55ca235e04', class: "indicators" }, index.h("div", { key: '58a8655b582e8cdcd9f8c553343d9e407dd66971', class: "elements" }, this.completeVersion ?
|
|
44
|
+
index.h("span", null, index.h("span", null, this.firstPage), " - ", index.h("span", null, this.currentPage), " ", this.pagLabel, " ", index.h("span", null, this.totalElements))
|
|
28
45
|
:
|
|
29
|
-
index.h("span", null, index.h("span", null, this.currentPage), "
|
|
46
|
+
index.h("span", null, index.h("span", null, this.currentPage), " ", this.pagLabel, " ", index.h("span", null, this.lastPage))), index.h("div", { key: '92b5476c223e477532726304c282ed34e1acccc7', class: "arrow" }, this.showFirstAndLast &&
|
|
47
|
+
index.h("button", { key: '740c67ee4f73c5a55a022b2281913d8652deeed2', onClick: () => { this.currentPage = this.firstPage; }, disabled: (this.currentPage === this.firstPage) ? true : false }, " ", index.h("jump-icon", { key: '5a880ea7c01afcc8ae9a4e84934e386e0edab58c', slot: "prefix", name: "chevrons-left" }), " "), index.h("button", { key: '08fe7f7faa6c7645151ec3ea2b4bf4247f082a2d', onClick: () => { this.currentPage--; }, disabled: (this.currentPage === this.firstPage) ? true : false }, " ", index.h("jump-icon", { key: '04a972584533f1272b10c7e9068ce332aef77299', slot: "prefix", name: "chevron-left" }), " "), index.h("button", { key: '0ea012c03b06b587296c9190eece67351579b6e3', onClick: () => { this.currentPage++; }, disabled: (this.currentPage === this.lastPage) ? true : false }, " ", index.h("jump-icon", { key: '155d6a407989f9cc5d38832df8fb98a3505c3113', slot: "prefix", name: "chevron-right" }), " "), this.showFirstAndLast &&
|
|
48
|
+
index.h("button", { key: 'be46c67831f6d732d47e9340aca1a43a650af958', onClick: () => { this.currentPage = this.lastPage; }, disabled: (this.currentPage === this.lastPage) ? true : false }, " ", index.h("jump-icon", { key: 'b04a3d8a8726f945d5639761dde68a300e40f80a', slot: "prefix", name: "chevrons-right" }), " "))))));
|
|
30
49
|
}
|
|
50
|
+
static get watchers() { return {
|
|
51
|
+
"currentPage": ["watchCurrentPage"]
|
|
52
|
+
}; }
|
|
31
53
|
};
|
|
32
54
|
JumpPagination.style = JumpPaginationStyle0;
|
|
33
55
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-pagination.entry.cjs.js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C,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAA,EAAC,EACjD,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,QAAQ,IAAI,IAAI,GAAG,KAAK,SAC3DA,wEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,gBAAgB,GAAa,QAAY,CAEzE,CACF,CACF,CACD,EACP;KACH;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-pagination/jump-pagination.scss?tag=jump-pagination","src/components/jump-pagination/jump-pagination.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPagination {\n --pagination-label-color: var(--neutral-grey-secondary);\n --pagination-arrows-color: var(--neutral-grey-secondary);\n --pagination-arrows-disabled: #CBCBCB;\n \n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n\n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n\n label {\n color: var(--pagination-label-color);\n font-size: 14px;\n font-weight: normal;\n }\n } \n \n .indicators {\n font-size: 16px;\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--pagination-label-color);\n\n .arrow {\n color: var(--pagination-arrows-color);\n display: flex;\n align-items: center;\n gap: 10px;\n\n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n\n button:disabled {\n cursor: not-allowed;\n color: var(--pagination-arrows-disabled); \n \n }\n }\n\n .elements {\n color: var(--pagination-label-color);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n \n}","import { Component, Host, State, Event, EventEmitter, Prop, h, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination',\n styleUrl: 'jump-pagination.scss',\n shadow: false,\n})\nexport class JumpPagination {\n \n /* ---------------------- @STATE ------------------------- */\n /**\n * Indicates the first page/product of the list\n */\n @State() firstPage: number = 1;\n\n @State() currentPage: number;\n\n @Watch('currentPage')\n watchCurrentPage(newValue: number, oldValue: number) {\n let details = {\n currentPage: newValue,\n previousPage: oldValue,\n firstPage: this.firstPage,\n lastPage: this.lastPage,\n direction: newValue > oldValue ? 'next' : 'prev'\n };\n\n this.jumpChangePage.emit(details);\n }\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n @Prop({reflect:true}) totalElements: number;\n\n @Prop({reflect:true}) pagLabel: string = 'di'; // Identifica la label testuale di pagination. \n\n @Prop({reflect:true}) initialPage: number = 1;\n\n @Prop({reflect:true}) lastPage: number = 10; \n\n /**\n * Label for the elements per page select\n */\n @Prop({reflect:true}) labelElementsPerPage: string = 'Elementi per pagina';\n\n /**\n * Values for the elements per page select\n */\n @Prop({reflect:true}) elementsRanges: Array<number> = [10, 20, 60, 100];\n\n\n /**\n * If true, the component will show the complete version of the pagination, with elements informations\n */\n @Prop({reflect:true}) completeVersion: boolean = false;\n\n @Prop({reflect:true}) showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) jumpChangePage: EventEmitter;\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentWillLoad() {\n this.currentPage = this.initialPage;\n }\n\n render() {\n console.log('completeVersion', this.completeVersion);\n return (\n <Host class=\"JumpPagination\">\n <div class=\"JumpPagination__Wrapper\">\n { this.completeVersion && \n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\">\n {this.elementsRanges.map((range) => (\n <option value={range}>{range}</option>\n ))}\n </select>\n </div> \n }\n <div class=\"indicators\"> \n <div class=\"elements\">\n {this.completeVersion ?\n <span>\n <span>{this.firstPage}</span> - <span>{this.currentPage}</span> {this.pagLabel} <span>{this.totalElements}</span>\n </span>\n \n :\n <span>\n <span>{this.currentPage}</span> {this.pagLabel} <span>{this.lastPage}</span>\n </span>\n }\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <button \n onClick={() => {this.currentPage = this.firstPage} }\n disabled={(this.currentPage === this.firstPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevrons-left\"></jump-icon> </button>\n }\n <button \n onClick={() => {this.currentPage--}} \n disabled={(this.currentPage === this.firstPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevron-left\"></jump-icon> </button>\n <button \n onClick={() => {this.currentPage++}}\n disabled={(this.currentPage === this.lastPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevron-right\"></jump-icon> </button>\n {this.showFirstAndLast &&\n <button \n onClick={() => {this.currentPage = this.lastPage}}\n disabled={(this.currentPage === this.lastPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevrons-right\"></jump-icon> </button> \n }\n </div> \n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-41aaa52a.js');
|
|
6
|
+
|
|
7
|
+
const jumpTabCss = ":host{display:block}";
|
|
8
|
+
const JumpTabStyle0 = jumpTabCss;
|
|
9
|
+
|
|
10
|
+
const JumpTab = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.activeTab = undefined;
|
|
14
|
+
this.tabNames = undefined;
|
|
15
|
+
}
|
|
16
|
+
componentWillLoad() {
|
|
17
|
+
console.log('Component is about to be rendered');
|
|
18
|
+
console.log('active', this.activeTab);
|
|
19
|
+
console.log('tabNames', this.tabNames);
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (index.h(index.Host, { key: '08d20c1e157286fd4034790df04c2f7113e57e43', class: "JumpTab" }, (this.tabNames && this.activeTab) && this.tabNames.map((tabName) => (index.h("div", { class: `JumpTab__Tab ${this.activeTab === tabName ? 'active' : ''}` }, tabName)))));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
JumpTab.style = JumpTabStyle0;
|
|
26
|
+
|
|
27
|
+
exports.jump_tab = JumpTab;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=jump-tab.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-tab.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,sBAAe,UAAU;;MCMZ,OAAO;;;yBAGU,SAAS;wBACH,SAAS;;IAE3C,iBAAiB;QACf,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACvC;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,KAAK,EAAC,SAAS,IAClB,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,MAC9DD,iBAAK,KAAK,EAAE,gBAAgB,IAAI,CAAC,SAAS,KAAK,OAAO,GAAG,QAAQ,GAAG,EAAE,EAAE,IACrE,OAAO,CACJ,CACP,CAAC,CACG,EACP;KACH;;;;;;","names":["h","Host"],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() activeTab: string = undefined;\n @Prop() tabNames: Array<string> = undefined;\n\n componentWillLoad() {\n console.log('Component is about to be rendered');\n console.log('active',this.activeTab);\n console.log('tabNames',this.tabNames);\n }\n\n render() {\n return (\n <Host class=\"JumpTab\">\n {(this.tabNames && this.activeTab) && this.tabNames.map((tabName) => (\n <div class={`JumpTab__Tab ${this.activeTab === tabName ? 'active' : ''}`}>\n {tabName}\n </div>\n ))}\n </Host>\n );\n }\n\n}\n"],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-41aaa52a.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["jump-pagination.cjs",[[0,"jump-pagination",{"totalElements":[514,"total-elements"],"pagLabel":[513,"pag-label"],"
|
|
11
|
+
return index.bootstrapLazy([["jump-pagination.cjs",[[0,"jump-pagination",{"totalElements":[514,"total-elements"],"pagLabel":[513,"pag-label"],"initialPage":[514,"initial-page"],"lastPage":[514,"last-page"],"labelElementsPerPage":[513,"label-elements-per-page"],"elementsRanges":[16],"completeVersion":[516,"complete-version"],"showFirstAndLast":[516,"show-first-and-last"],"firstPage":[32],"currentPage":[32]},null,{"currentPage":["watchCurrentPage"]}]]],["jump-badge.cjs",[[0,"jump-badge",{"label":[1],"variant":[1]}]]],["jump-button.cjs",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}]]],["jump-card.cjs",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-tab.cjs",[[1,"jump-tab",{"activeTab":[1,"active-tab"],"tabNames":[16]}]]],["jump-icon.cjs",[[0,"jump-icon",{"name":[1],"class":[1]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
-
"components/app-icon/jump-icon.js",
|
|
4
3
|
"components/jump-badge/jump-badge.js",
|
|
5
4
|
"components/jump-button/jump-button.js",
|
|
6
5
|
"components/jump-card/jump-card.js",
|
|
7
|
-
"components/jump-
|
|
6
|
+
"components/jump-icon/jump-icon.js",
|
|
7
|
+
"components/jump-pagination/jump-pagination.js",
|
|
8
|
+
"components/jump-tab/jump-tab.js"
|
|
8
9
|
],
|
|
9
10
|
"compiler": {
|
|
10
11
|
"name": "@stencil/core",
|
|
11
|
-
"version": "4.
|
|
12
|
-
"typescriptVersion": "5.4.
|
|
12
|
+
"version": "4.15.0",
|
|
13
|
+
"typescriptVersion": "5.4.4"
|
|
13
14
|
},
|
|
14
15
|
"collections": [],
|
|
15
16
|
"bundles": []
|
|
@@ -8,7 +8,7 @@ jump-badge {
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
font-size: var(--fs-300);
|
|
11
|
-
font-weight: var(--fw-
|
|
11
|
+
font-weight: var(--fw-700);
|
|
12
12
|
line-height: 1;
|
|
13
13
|
border-radius: var(--jump-bafge-border-radius);
|
|
14
14
|
border: solid 1px var(--jump-bafge-border-radius);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
export class
|
|
2
|
+
export class AppBadge {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.label = '';
|
|
5
5
|
this.variant = 'primary';
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '1a0a2b2bf95c1217ca9546b19c4ff6b25ca2a86a', variant: this.variant }, this.label));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "jump-badge"; }
|
|
11
11
|
static get originalStyleUrls() {
|
|
@@ -35,7 +35,7 @@ export class AppCard {
|
|
|
35
35
|
"text": "Indicates the label of the badge"
|
|
36
36
|
},
|
|
37
37
|
"attribute": "label",
|
|
38
|
-
"reflect":
|
|
38
|
+
"reflect": false,
|
|
39
39
|
"defaultValue": "''"
|
|
40
40
|
},
|
|
41
41
|
"variant": {
|
|
@@ -53,7 +53,7 @@ export class AppCard {
|
|
|
53
53
|
"text": "Indicates the variant of the badge"
|
|
54
54
|
},
|
|
55
55
|
"attribute": "variant",
|
|
56
|
-
"reflect":
|
|
56
|
+
"reflect": false,
|
|
57
57
|
"defaultValue": "'primary'"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-badge.js","sourceRoot":"","sources":["../../../src/components/jump-badge/jump-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"jump-badge.js","sourceRoot":"","sources":["../../../src/components/jump-badge/jump-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,QAAQ;;qBAIK,EAAE;uBAKe,SAAS;;IAElD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,OAAO,EAAE,IAAI,CAAC,OAAO,IACxB,IAAI,CAAC,KAAK,CACN,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'jump-badge',\n styleUrl: 'jump-badge.scss',\n shadow: false,\n})\nexport class AppBadge {\n /**\n * Indicates the label of the badge\n */\n @Prop() label: string = '';\n\n /**\n * Indicates the variant of the badge\n */\n @Prop() variant: 'primary'|'secondary' = 'primary';\n\n render() {\n return (\n <Host variant={this.variant}>\n {this.label}\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import {
|
|
2
|
+
import { AppBadge } from "../jump-badge";
|
|
3
3
|
describe('jump-badge', () => {
|
|
4
4
|
it('renders', async () => {
|
|
5
5
|
const page = await newSpecPage({
|
|
6
|
-
components: [
|
|
6
|
+
components: [AppBadge],
|
|
7
7
|
html: `<jump-badge></jump-badge>`,
|
|
8
8
|
});
|
|
9
9
|
expect(page.root).toEqualHtml(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-badge.spec.js","sourceRoot":"","sources":["../../../../src/components/jump-badge/test/jump-badge.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"jump-badge.spec.js","sourceRoot":"","sources":["../../../../src/components/jump-badge/test/jump-badge.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,QAAQ,CAAC;YACtB,IAAI,EAAE,2BAA2B;SAClC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAM7B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { AppBadge } from '../jump-badge';\n\ndescribe('jump-badge', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [AppBadge],\n html: `<jump-badge></jump-badge>`,\n });\n expect(page.root).toEqualHtml(`\n <jump-badge>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </jump-badge>\n `);\n });\n});\n"]}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import feather from "feather-icons";
|
|
2
1
|
import { generateAttributesFromArgs } from "../../utils/utils";
|
|
3
2
|
export default {
|
|
4
3
|
title: 'Components/Button/Anchor',
|
|
5
4
|
tags: ['autodocs'],
|
|
6
5
|
argTypes: {
|
|
7
|
-
label: {
|
|
8
|
-
name: 'Etichetta',
|
|
9
|
-
description: 'Imposta il testo del bottone',
|
|
10
|
-
control: 'text'
|
|
11
|
-
},
|
|
12
6
|
variant: {
|
|
13
7
|
name: 'Variante',
|
|
14
|
-
description: 'Imposta la variante di colore del
|
|
8
|
+
description: 'Imposta la variante di colore del link',
|
|
15
9
|
control: 'select',
|
|
16
10
|
options: [
|
|
17
11
|
'primary',
|
|
@@ -20,14 +14,9 @@ export default {
|
|
|
20
14
|
'white'
|
|
21
15
|
],
|
|
22
16
|
},
|
|
23
|
-
outline: {
|
|
24
|
-
name: 'Outline',
|
|
25
|
-
description: 'Imposta se il bottone deve avere il solo bordo',
|
|
26
|
-
control: 'boolean'
|
|
27
|
-
},
|
|
28
17
|
size: {
|
|
29
18
|
name: 'Dimensione',
|
|
30
|
-
description: 'Imposta la dimensione del
|
|
19
|
+
description: 'Imposta la dimensione del link',
|
|
31
20
|
control: 'select',
|
|
32
21
|
options: [
|
|
33
22
|
'small',
|
|
@@ -40,214 +29,58 @@ export default {
|
|
|
40
29
|
large: 'Grande'
|
|
41
30
|
}
|
|
42
31
|
},
|
|
43
|
-
pill: {
|
|
44
|
-
name: 'Bordo a Pillola',
|
|
45
|
-
description: 'Imposta se il bottone deve avere il bordo completamente stondato a pillola',
|
|
46
|
-
control: 'boolean'
|
|
47
|
-
},
|
|
48
32
|
disabled: {
|
|
49
33
|
name: 'Disabilitato',
|
|
50
|
-
description: 'Imposta se il
|
|
34
|
+
description: 'Imposta se il link deve essere disabilitato',
|
|
51
35
|
control: 'boolean'
|
|
52
36
|
},
|
|
53
37
|
text: {
|
|
54
38
|
name: 'Testo',
|
|
55
|
-
description: 'Imposta se il
|
|
39
|
+
description: 'Imposta se il link è solo testo, quindi senza bordo, sfondo e padding',
|
|
56
40
|
control: 'boolean'
|
|
57
41
|
},
|
|
58
|
-
showIcon: {
|
|
59
|
-
name: 'Mostra Icona',
|
|
60
|
-
description: 'Imposta se il bottone deve mostrare un\'icona',
|
|
61
|
-
control: 'boolean'
|
|
62
|
-
},
|
|
63
|
-
iconOnly: {
|
|
64
|
-
name: 'Mostra solo Icona',
|
|
65
|
-
description: 'Imposta se il bottone deve mostrare solo l\'icona',
|
|
66
|
-
control: 'boolean',
|
|
67
|
-
if: {
|
|
68
|
-
arg: 'showIcon',
|
|
69
|
-
eq: true
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
iconName: {
|
|
73
|
-
name: 'Nome Icona',
|
|
74
|
-
control: 'select',
|
|
75
|
-
options: Object.keys(feather.icons),
|
|
76
|
-
description: 'Seleziona il nome dell\'icona dal menu a tendina',
|
|
77
|
-
defaultValue: Object.keys(feather.icons)[0],
|
|
78
|
-
if: {
|
|
79
|
-
arg: 'showIcon',
|
|
80
|
-
eq: true
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
iconPosition: {
|
|
84
|
-
name: 'Posizione Icona',
|
|
85
|
-
description: 'Imposta la posizione dell\'icona',
|
|
86
|
-
defaultValue: 'left',
|
|
87
|
-
control: 'select',
|
|
88
|
-
options: [
|
|
89
|
-
'left',
|
|
90
|
-
'right'
|
|
91
|
-
],
|
|
92
|
-
if: {
|
|
93
|
-
arg: 'showIcon',
|
|
94
|
-
eq: true
|
|
95
|
-
},
|
|
96
|
-
labels: {
|
|
97
|
-
left: 'Sinistra',
|
|
98
|
-
right: 'Destra'
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
type: {
|
|
102
|
-
name: 'Tipo di bottone',
|
|
103
|
-
description: 'Imposta il tipo di bottone',
|
|
104
|
-
default: 'button',
|
|
105
|
-
control: 'select',
|
|
106
|
-
if: {
|
|
107
|
-
arg: 'href',
|
|
108
|
-
exists: false
|
|
109
|
-
},
|
|
110
|
-
options: [
|
|
111
|
-
'button',
|
|
112
|
-
'submit',
|
|
113
|
-
'reset'
|
|
114
|
-
],
|
|
115
|
-
labels: {
|
|
116
|
-
button: 'button',
|
|
117
|
-
submit: 'submit',
|
|
118
|
-
reset: 'reset',
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
name: {
|
|
122
|
-
name: 'Nome del bottone',
|
|
123
|
-
description: 'Imposta il nome del bottone',
|
|
124
|
-
control: 'text',
|
|
125
|
-
if: {
|
|
126
|
-
arg: 'href',
|
|
127
|
-
exists: false
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
value: {
|
|
131
|
-
name: 'Value del bottone',
|
|
132
|
-
description: 'Imposta il value del bottone',
|
|
133
|
-
control: 'text',
|
|
134
|
-
if: {
|
|
135
|
-
arg: 'href',
|
|
136
|
-
exists: false
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
ariaLabel: {
|
|
140
|
-
name: 'Aria Label',
|
|
141
|
-
description: 'Imposta aria label',
|
|
142
|
-
control: 'text',
|
|
143
|
-
},
|
|
144
|
-
href: {
|
|
145
|
-
name: 'Href',
|
|
146
|
-
description: 'Imposta l\'href del link',
|
|
147
|
-
control: 'text',
|
|
148
|
-
},
|
|
149
|
-
target: {
|
|
150
|
-
name: 'Target',
|
|
151
|
-
description: 'Imposta il target del link',
|
|
152
|
-
default: '_self',
|
|
153
|
-
control: 'select',
|
|
154
|
-
if: {
|
|
155
|
-
arg: 'href',
|
|
156
|
-
exists: true
|
|
157
|
-
},
|
|
158
|
-
options: [
|
|
159
|
-
'_blank',
|
|
160
|
-
'_parent',
|
|
161
|
-
'_self',
|
|
162
|
-
'_top'
|
|
163
|
-
],
|
|
164
|
-
labels: {
|
|
165
|
-
_blank: '_blank',
|
|
166
|
-
_parent: '_parent',
|
|
167
|
-
_self: '_self',
|
|
168
|
-
_top: '_top'
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
42
|
id: {
|
|
172
43
|
name: 'ID',
|
|
173
|
-
description: 'Imposta l\'id del
|
|
44
|
+
description: 'Imposta l\'id del link',
|
|
174
45
|
control: 'text'
|
|
175
46
|
},
|
|
176
47
|
}
|
|
177
48
|
};
|
|
178
49
|
const Template = (args) => {
|
|
179
50
|
const attributes = generateAttributesFromArgs(args);
|
|
180
|
-
return `<jump-button ${attributes}
|
|
51
|
+
return `<jump-button ${attributes} href="www.jumpgroup.it" target="_blank"> Scopri di più </jump-button>`;
|
|
52
|
+
};
|
|
53
|
+
const TemplateWithIcon = (args) => {
|
|
54
|
+
const attributes = generateAttributesFromArgs(args);
|
|
55
|
+
return `<jump-button ${attributes} href="www.jumpgroup.it" target="_blank"> <jump-icon slot="suffix" name="arrow-right"></jump-icon> Scopri di più </jump-button>`;
|
|
181
56
|
};
|
|
182
57
|
export const LinkPrimary = Template.bind({});
|
|
183
58
|
LinkPrimary.args = {
|
|
184
|
-
label: 'Link',
|
|
185
59
|
variant: 'primary',
|
|
186
|
-
|
|
187
|
-
pill: false,
|
|
188
|
-
size: 'medium',
|
|
189
|
-
disabled: false,
|
|
60
|
+
size: 'small',
|
|
190
61
|
text: true,
|
|
191
|
-
showIcon: false,
|
|
192
|
-
iconOnly: false,
|
|
193
|
-
href: 'www.jumpgroup.it',
|
|
194
|
-
target: '_blank',
|
|
195
62
|
};
|
|
196
63
|
export const LinkSecondary = Template.bind({});
|
|
197
64
|
LinkSecondary.args = {
|
|
198
|
-
label: 'Link',
|
|
199
65
|
variant: 'secondary',
|
|
200
|
-
outline: false,
|
|
201
|
-
pill: false,
|
|
202
66
|
size: 'medium',
|
|
203
|
-
disabled: false,
|
|
204
|
-
text: true,
|
|
205
|
-
showIcon: false,
|
|
206
|
-
iconOnly: false,
|
|
207
|
-
href: 'www.jumpgroup.it',
|
|
208
|
-
target: '_blank',
|
|
209
67
|
};
|
|
210
68
|
export const LinkNeutral = Template.bind({});
|
|
211
69
|
LinkNeutral.args = {
|
|
212
|
-
label: 'Link',
|
|
213
70
|
variant: 'neutral',
|
|
214
|
-
|
|
215
|
-
pill: false,
|
|
216
|
-
size: 'medium',
|
|
217
|
-
disabled: false,
|
|
71
|
+
size: 'large',
|
|
218
72
|
text: true,
|
|
219
|
-
showIcon: false,
|
|
220
|
-
iconOnly: false,
|
|
221
|
-
href: 'www.jumpgroup.it',
|
|
222
|
-
target: '_blank',
|
|
223
73
|
};
|
|
224
74
|
export const LinkWhite = Template.bind({});
|
|
225
75
|
LinkWhite.args = {
|
|
226
|
-
label: 'Link',
|
|
227
76
|
variant: 'white',
|
|
228
|
-
outline: false,
|
|
229
|
-
pill: false,
|
|
230
77
|
size: 'medium',
|
|
231
|
-
disabled: false,
|
|
232
78
|
text: true,
|
|
233
|
-
showIcon: false,
|
|
234
|
-
iconOnly: false,
|
|
235
|
-
href: 'www.jumpgroup.it',
|
|
236
|
-
target: '_blank',
|
|
237
79
|
};
|
|
238
|
-
export const LinkWithIcon =
|
|
80
|
+
export const LinkWithIcon = TemplateWithIcon.bind({});
|
|
239
81
|
LinkWithIcon.args = {
|
|
240
|
-
label: 'Link with icon',
|
|
241
82
|
variant: 'primary',
|
|
242
|
-
outline: false,
|
|
243
|
-
pill: false,
|
|
244
83
|
size: 'medium',
|
|
245
|
-
|
|
246
|
-
text: true,
|
|
247
|
-
showIcon: true,
|
|
248
|
-
iconName: 'home',
|
|
249
|
-
iconPosition: 'left',
|
|
250
|
-
href: 'www.jumpgroup.it',
|
|
251
|
-
target: '_blank',
|
|
84
|
+
full: true
|
|
252
85
|
};
|
|
253
86
|
//# sourceMappingURL=jump-button-anchor.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-button-anchor.stories.js","sourceRoot":"","sources":["../../../src/components/jump-button/jump-button-anchor.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,MAAM;SAChB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,SAAS;gBACT,WAAW;gBACX,SAAS;gBACT,OAAO;aACR;SACF;QACD,OAAO,EAAG;YACR,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,SAAS;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,OAAO;gBACP,QAAQ;gBACR,OAAO;aACR;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,QAAQ;aAChB;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,4EAA4E;YACzF,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,cAAc;YACpB,WAAW,E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,MAAM;IACpB,IAAI,EAAC,kBAAkB;IACvB,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["import feather from 'feather-icons';\nimport { generateAttributesFromArgs} from '../../utils/utils';\n\nexport default {\n title: 'Components/Button/Anchor',\n tags: ['autodocs'],\n argTypes: {\n label: {\n name: 'Etichetta',\n description: 'Imposta il testo del bottone',\n control: 'text'\n },\n variant: {\n name: 'Variante',\n description: 'Imposta la variante di colore del bottone',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n outline : {\n name: 'Outline',\n description: 'Imposta se il bottone deve avere il solo bordo',\n control: 'boolean'\n },\n size: {\n name: 'Dimensione',\n description: 'Imposta la dimensione del bottone',\n control: 'select',\n options: [\n 'small',\n 'medium',\n 'large'\n ],\n labels: {\n small: 'Piccolo',\n medium: 'Medio',\n large: 'Grande'\n }\n },\n pill: {\n name: 'Bordo a Pillola',\n description: 'Imposta se il bottone deve avere il bordo completamente stondato a pillola',\n control: 'boolean'\n },\n disabled: {\n name: 'Disabilitato',\n description: 'Imposta se il bottone deve essere disabilitato',\n control: 'boolean'\n },\n text: {\n name: 'Testo',\n description: 'Imposta se il bottone è solo testo, quindi senza bordo, sfondo e padding',\n control: 'boolean'\n },\n showIcon: {\n name: 'Mostra Icona',\n description: 'Imposta se il bottone deve mostrare un\\'icona',\n control: 'boolean'\n },\n iconOnly: {\n name: 'Mostra solo Icona',\n description: 'Imposta se il bottone deve mostrare solo l\\'icona',\n control: 'boolean',\n if: {\n arg: 'showIcon',\n eq: true\n },\n },\n iconName: {\n name: 'Nome Icona',\n control: 'select',\n options: Object.keys(feather.icons),\n description: 'Seleziona il nome dell\\'icona dal menu a tendina',\n defaultValue: Object.keys(feather.icons)[0],\n if: {\n arg: 'showIcon',\n eq: true\n },\n },\n iconPosition: {\n name: 'Posizione Icona',\n description: 'Imposta la posizione dell\\'icona',\n defaultValue: 'left',\n control: 'select',\n options: [\n 'left',\n 'right'\n ],\n if: {\n arg: 'showIcon',\n eq: true\n },\n labels: {\n left: 'Sinistra',\n right: 'Destra'\n }\n },\n type: {\n name: 'Tipo di bottone',\n description: 'Imposta il tipo di bottone',\n default: 'button',\n control: 'select',\n if:{\n arg: 'href',\n exists: false\n },\n options: [\n 'button',\n 'submit',\n 'reset'\n ],\n labels: {\n button: 'button',\n submit: 'submit',\n reset: 'reset',\n }\n },\n name: {\n name: 'Nome del bottone',\n description: 'Imposta il nome del bottone',\n control: 'text',\n if:{\n arg: 'href',\n exists: false\n }\n },\n value: {\n name: 'Value del bottone',\n description: 'Imposta il value del bottone',\n control: 'text',\n if:{\n arg: 'href',\n exists: false\n }\n },\n ariaLabel: {\n name: 'Aria Label',\n description: 'Imposta aria label',\n control: 'text',\n },\n href: {\n name: 'Href',\n description: 'Imposta l\\'href del link',\n control: 'text',\n },\n target: {\n name: 'Target',\n description: 'Imposta il target del link',\n default: '_self',\n control: 'select',\n if:{\n arg: 'href',\n exists: true\n },\n options: [\n '_blank',\n '_parent',\n '_self',\n '_top'\n ],\n labels: {\n _blank: '_blank',\n _parent: '_parent',\n _self: '_self',\n _top: '_top'\n }\n },\n id: {\n name: 'ID',\n description: 'Imposta l\\'id del bottone',\n control: 'text'\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return `<jump-button ${attributes} ${ !args.label ? ' only-icon' : ''}> ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot=\"prefix\" name=\"${args.iconName}\"></jump-icon>` : ''} ${ !args.iconOnly ? args.label : ''} ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot=\"suffix\" name=\"${args.iconName}\"></jump-icon>` : ''} </jump-button>`\n}\n\nexport const LinkPrimary = Template.bind({});\nLinkPrimary.args = {\n label: 'Link',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: false,\n iconOnly: false,\n href:'www.jumpgroup.it',\n target: '_blank',\n};\n\nexport const LinkSecondary = Template.bind({});\nLinkSecondary.args = {\n label: 'Link',\n variant: 'secondary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: false,\n iconOnly: false,\n href:'www.jumpgroup.it',\n target: '_blank',\n};\n\nexport const LinkNeutral = Template.bind({});\nLinkNeutral.args = {\n label: 'Link',\n variant: 'neutral',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: false,\n iconOnly: false,\n href:'www.jumpgroup.it',\n target: '_blank',\n};\n\nexport const LinkWhite = Template.bind({});\nLinkWhite.args = {\n label: 'Link',\n variant: 'white',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: false,\n iconOnly: false,\n href:'www.jumpgroup.it',\n target: '_blank',\n};\n\nexport const LinkWithIcon = Template.bind({});\nLinkWithIcon.args = {\n label: 'Link with icon',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: true,\n iconName: 'home',\n iconPosition: 'left',\n href:'www.jumpgroup.it',\n target: '_blank',\n};"]}
|
|
1
|
+
{"version":3,"file":"jump-button-anchor.stories.js","sourceRoot":"","sources":["../../../src/components/jump-button/jump-button-anchor.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,wCAAwC;YACrD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,SAAS;gBACT,WAAW;gBACX,SAAS;gBACT,OAAO;aACR;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,gCAAgC;YAC7C,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,OAAO;gBACP,QAAQ;gBACR,OAA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AAE,SAAS;IAClB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IACf,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,YAAY,CAAC,IAAI,GAAG;IAClB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,IAAI;CACX,CAAC","sourcesContent":["import { generateAttributesFromArgs} from '../../utils/utils';\n\nexport default {\n title: 'Components/Button/Anchor',\n tags: ['autodocs'],\n argTypes: {\n variant: {\n name: 'Variante',\n description: 'Imposta la variante di colore del link',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n size: {\n name: 'Dimensione',\n description: 'Imposta la dimensione del link',\n control: 'select',\n options: [\n 'small',\n 'medium',\n 'large'\n ],\n labels: {\n small: 'Piccolo',\n medium: 'Medio',\n large: 'Grande'\n }\n },\n disabled: {\n name: 'Disabilitato',\n description: 'Imposta se il link deve essere disabilitato',\n control: 'boolean'\n },\n text: {\n name: 'Testo',\n description: 'Imposta se il link è solo testo, quindi senza bordo, sfondo e padding',\n control: 'boolean'\n },\n id: {\n name: 'ID',\n description: 'Imposta l\\'id del link',\n control: 'text'\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return `<jump-button ${attributes} href=\"www.jumpgroup.it\" target=\"_blank\"> Scopri di più </jump-button>`\n}\n\nconst TemplateWithIcon = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return `<jump-button ${attributes} href=\"www.jumpgroup.it\" target=\"_blank\"> <jump-icon slot=\"suffix\" name=\"arrow-right\"></jump-icon> Scopri di più </jump-button>`\n}\n\nexport const LinkPrimary = Template.bind({});\nLinkPrimary.args = {\n variant: 'primary',\n size: 'small',\n text: true,\n};\n\nexport const LinkSecondary = Template.bind({});\nLinkSecondary.args = {\n variant: 'secondary',\n size: 'medium',\n};\n\nexport const LinkNeutral = Template.bind({});\nLinkNeutral.args = {\n variant: 'neutral',\n size: 'large',\n text: true,\n};\n\nexport const LinkWhite = Template.bind({});\nLinkWhite.args = {\n variant: 'white',\n size: 'medium',\n text: true,\n};\n\nexport const LinkWithIcon = TemplateWithIcon.bind({});\nLinkWithIcon.args = {\n variant: 'primary',\n size: 'medium',\n full: true\n};"]}
|