@jumpgroup/jump-design-system 0.1.2 → 0.1.4
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-168ed626.js → index-c572276a.js} +5 -1
- package/dist/{esm/index-330d1de1.js.map → cjs/index-c572276a.js.map} +1 -1
- package/dist/cjs/jump-button.cjs.entry.js +28 -0
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-design-system.cjs.js +2 -2
- package/dist/cjs/{app-icon.cjs.entry.js → jump-icon.cjs.entry.js} +5 -5
- package/dist/cjs/jump-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-pagination.cjs.entry.js +34 -0
- package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/app-icon/{app-icon.css → jump-icon.css} +2 -2
- package/dist/collection/components/app-icon/{app-icon.js → jump-icon.js} +4 -4
- package/dist/collection/components/app-icon/jump-icon.js.map +1 -0
- package/dist/collection/components/app-icon/{app-icon.stories.js → jump-icon.stories.js} +2 -2
- package/dist/collection/components/app-icon/jump-icon.stories.js.map +1 -0
- package/dist/collection/components/app-icon/test/jump-icon.e2e.js +10 -0
- package/dist/collection/components/app-icon/test/jump-icon.e2e.js.map +1 -0
- package/dist/collection/components/app-icon/test/{app-icon.spec.js → jump-icon.spec.js} +6 -6
- package/dist/collection/components/app-icon/test/jump-icon.spec.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button.css +107 -0
- package/dist/collection/components/{app-button/app-button.js → jump-button/jump-button.js} +4 -4
- package/dist/collection/components/jump-button/jump-button.js.map +1 -0
- package/dist/collection/components/{app-button/app-button.stories.js → jump-button/jump-button.stories.js} +13 -13
- package/dist/collection/components/jump-button/jump-button.stories.js.map +1 -0
- package/dist/collection/components/jump-button/test/jump-button.e2e.js +10 -0
- package/dist/collection/components/jump-button/test/jump-button.e2e.js.map +1 -0
- package/dist/collection/components/{app-button/test/app-button.spec.js → jump-button/test/jump-button.spec.js} +6 -6
- package/dist/collection/components/jump-button/test/jump-button.spec.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination.css +43 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js +180 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination.stories.js +117 -0
- package/dist/collection/components/jump-pagination/jump-pagination.stories.js.map +1 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js +10 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js.map +1 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js +18 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js.map +1 -0
- package/dist/components/{app-button.d.ts → jump-button.d.ts} +4 -4
- package/dist/components/jump-button.js +49 -0
- package/dist/components/jump-button.js.map +1 -0
- package/dist/components/{app-icon.d.ts → jump-icon.d.ts} +4 -4
- package/dist/components/jump-icon.js +8 -0
- package/dist/components/jump-icon.js.map +1 -0
- package/dist/components/{app-icon.js → jump-icon2.js} +10 -13
- package/dist/components/jump-icon2.js.map +1 -0
- package/dist/components/jump-pagination.d.ts +11 -0
- package/dist/components/jump-pagination.js +62 -0
- package/dist/components/jump-pagination.js.map +1 -0
- package/dist/esm/{index-330d1de1.js → index-ad69454c.js} +5 -1
- package/dist/esm/index-ad69454c.js.map +1 -0
- package/dist/esm/jump-button.entry.js +24 -0
- package/dist/esm/jump-button.entry.js.map +1 -0
- package/dist/esm/jump-design-system.js +3 -3
- package/dist/esm/{app-icon.entry.js → jump-icon.entry.js} +5 -5
- package/dist/esm/jump-icon.entry.js.map +1 -0
- package/dist/esm/jump-pagination.entry.js +30 -0
- package/dist/esm/jump-pagination.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-e8515cce.entry.js → p-15ecd712.entry.js} +3 -3
- package/dist/jump-design-system/p-15ecd712.entry.js.map +1 -0
- package/dist/jump-design-system/p-42799645.entry.js +2 -0
- package/dist/jump-design-system/p-42799645.entry.js.map +1 -0
- package/dist/jump-design-system/p-44f459bb.js +3 -0
- package/dist/jump-design-system/p-44f459bb.js.map +1 -0
- package/dist/jump-design-system/p-6ba563bd.entry.js +2 -0
- package/dist/jump-design-system/p-6ba563bd.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +39 -2
- package/dist/types/components/jump-pagination/jump-pagination.d.ts +26 -0
- package/dist/types/components/jump-pagination/jump-pagination.stories.d.ts +71 -0
- package/dist/types/components.d.ts +71 -18
- package/package.json +1 -1
- package/readme.md +23 -61
- package/dist/cjs/app-button.cjs.entry.js +0 -28
- package/dist/cjs/app-button.cjs.entry.js.map +0 -1
- package/dist/cjs/app-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/index-168ed626.js.map +0 -1
- package/dist/collection/components/app-button/app-button.css +0 -107
- package/dist/collection/components/app-button/app-button.js.map +0 -1
- package/dist/collection/components/app-button/app-button.stories.js.map +0 -1
- package/dist/collection/components/app-button/test/app-button.e2e.js +0 -10
- package/dist/collection/components/app-button/test/app-button.e2e.js.map +0 -1
- package/dist/collection/components/app-button/test/app-button.spec.js.map +0 -1
- package/dist/collection/components/app-icon/app-icon.js.map +0 -1
- package/dist/collection/components/app-icon/app-icon.stories.js.map +0 -1
- package/dist/collection/components/app-icon/test/app-icon.e2e.js +0 -10
- package/dist/collection/components/app-icon/test/app-icon.e2e.js.map +0 -1
- package/dist/collection/components/app-icon/test/app-icon.spec.js.map +0 -1
- package/dist/components/app-button.js +0 -49
- package/dist/components/app-button.js.map +0 -1
- package/dist/components/app-icon.js.map +0 -1
- package/dist/esm/app-button.entry.js +0 -24
- package/dist/esm/app-button.entry.js.map +0 -1
- package/dist/esm/app-icon.entry.js.map +0 -1
- package/dist/jump-design-system/p-28b9ffd5.js +0 -3
- package/dist/jump-design-system/p-28b9ffd5.js.map +0 -1
- package/dist/jump-design-system/p-da4d9423.entry.js +0 -2
- package/dist/jump-design-system/p-da4d9423.entry.js.map +0 -1
- package/dist/jump-design-system/p-e8515cce.entry.js.map +0 -1
- /package/dist/types/components/app-icon/{app-icon.d.ts → jump-icon.d.ts} +0 -0
- /package/dist/types/components/app-icon/{app-icon.stories.d.ts → jump-icon.stories.d.ts} +0 -0
- /package/dist/types/components/{app-button/app-button.d.ts → jump-button/jump-button.d.ts} +0 -0
- /package/dist/types/components/{app-button/app-button.stories.d.ts → jump-button/jump-button.stories.d.ts} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface JumpPagination extends Components.JumpPagination, HTMLElement {}
|
|
4
|
+
export const JumpPagination: {
|
|
5
|
+
prototype: JumpPagination;
|
|
6
|
+
new (): JumpPagination;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './jump-icon2.js';
|
|
3
|
+
|
|
4
|
+
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}";
|
|
5
|
+
|
|
6
|
+
const JumpPagination$1 = /*@__PURE__*/ proxyCustomElement(class JumpPagination extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.totalElements = undefined;
|
|
11
|
+
this.currentPage = undefined;
|
|
12
|
+
this.lastPage = undefined;
|
|
13
|
+
this.labelElementsPerPage = 'Elementi per pagina';
|
|
14
|
+
this.elementsRanges = [10, 20, 60, 100];
|
|
15
|
+
this.firstPage = undefined;
|
|
16
|
+
this.completeVersion = false;
|
|
17
|
+
this.showAdditionalChrevrons = false;
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
var _a;
|
|
21
|
+
return (h(Host, { class: "JumpPagination" }, h("div", { class: "JumpPagination__Wrapper" }, this.completeVersion &&
|
|
22
|
+
h("div", { class: "elementsPerPage" }, h("label", { htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), h("select", { name: "elements", id: "elements" }, this.elementsRanges.map((range) => (h("option", { value: range }, range))))), h("div", { class: "indicators" }, h("div", { class: "elements" }, this.completeVersion ?
|
|
23
|
+
h("span", null, h("span", null, this.firstPage), " - ", h("span", null, this.currentPage), " di ", h("span", null, this.totalElements))
|
|
24
|
+
:
|
|
25
|
+
h("span", null, h("span", null, this.currentPage), " di ", h("span", null, this.lastPage))), h("div", { class: "arrow" }, this.showAdditionalChrevrons && h("jump-icon", { name: "chevrons-left" }), h("jump-icon", { name: "chevron-left" }), h("jump-icon", { name: "chevron-right" }), this.showAdditionalChrevrons && h("jump-icon", { name: "chevrons-right" }))))));
|
|
26
|
+
}
|
|
27
|
+
static get style() { return jumpPaginationCss; }
|
|
28
|
+
}, [0, "jump-pagination", {
|
|
29
|
+
"totalElements": [514, "total-elements"],
|
|
30
|
+
"currentPage": [514, "current-page"],
|
|
31
|
+
"lastPage": [514, "last-page"],
|
|
32
|
+
"labelElementsPerPage": [513, "label-elements-per-page"],
|
|
33
|
+
"elementsRanges": [16],
|
|
34
|
+
"firstPage": [514, "first-page"],
|
|
35
|
+
"completeVersion": [516, "complete-version"],
|
|
36
|
+
"showAdditionalChrevrons": [516, "show-additional-chrevrons"]
|
|
37
|
+
}]);
|
|
38
|
+
function defineCustomElement$1() {
|
|
39
|
+
if (typeof customElements === "undefined") {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const components = ["jump-pagination", "jump-icon"];
|
|
43
|
+
components.forEach(tagName => { switch (tagName) {
|
|
44
|
+
case "jump-pagination":
|
|
45
|
+
if (!customElements.get(tagName)) {
|
|
46
|
+
customElements.define(tagName, JumpPagination$1);
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
case "jump-icon":
|
|
50
|
+
if (!customElements.get(tagName)) {
|
|
51
|
+
defineCustomElement$2();
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
} });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const JumpPagination = JumpPagination$1;
|
|
58
|
+
const defineCustomElement = defineCustomElement$1;
|
|
59
|
+
|
|
60
|
+
export { JumpPagination, defineCustomElement };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=jump-pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-pagination.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,o1BAAo1B;;MCOj2BA,gBAAc;;;;;;;gCAe+B,qBAAqB;0BAKpB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;;2BAUtB,KAAK;mCAEG,KAAK;;EAEjE,MAAM;;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAC,gBAAgB,IAC1B,WAAK,KAAK,EAAC,yBAAyB,IAChC,IAAI,CAAC,eAAe;MACpB,WAAK,KAAK,EAAC,iBAAiB,IAC1B,aAAO,OAAO,EAAC,UAAU,IAAE,MAAA,IAAI,CAAC,oBAAoB,mCAAI,mBAAmB,CAAS,EAChF,cAAQ,IAAI,EAAC,UAAU,EAAC,EAAE,EAAC,UAAU,IAClC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,MAC7B,cAAQ,KAAK,EAAE,KAAK,IAAG,KAAK,CAAU,CACvC,CAAC,CACK,CACT,EAER,WAAK,KAAK,EAAC,YAAY,IACrB,WAAK,KAAK,EAAC,UAAU,IAClB,IAAI,CAAC,eAAe;MACnB,gBACE,gBAAO,IAAI,CAAC,SAAS,CAAQ,SAAG,gBAAO,IAAI,CAAC,WAAW,CAAQ,UAAI,gBAAO,IAAI,CAAC,aAAa,CAAQ,CAC/F;;QAGP,gBACE,gBAAO,IAAI,CAAC,WAAW,CAAQ,UAAI,gBAAO,IAAI,CAAC,QAAQ,CAAQ,CAC1D,CAEL,EACN,WAAK,KAAK,EAAC,OAAO,IACf,IAAI,CAAC,uBAAuB,IAAI,iBAAW,IAAI,EAAC,eAAe,GAAa,EAC7E,iBAAW,IAAI,EAAC,cAAc,GAAa,EAC3C,iBAAW,IAAI,EAAC,eAAe,GAAa,EAC3C,IAAI,CAAC,uBAAuB,IAAI,iBAAW,IAAI,EAAC,gBAAgB,GAAa,CAC1E,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpPagination"],"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 \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\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, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination',\n styleUrl: 'jump-pagination.scss',\n shadow: false,\n})\nexport class JumpPagination {\n \n /* ---------------------- @PROPERTIES ------------------------- */\n\n @Prop({ reflect: true }) totalElements: number;\n\n /**\n * \n */\n @Prop({ reflect: true }) currentPage: number;\n @Prop({ reflect: true }) lastPage: number; \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 * Indicates the first page/product of the list\n */\n @Prop({ reflect: true }) firstPage: number;\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 }) showAdditionalChrevrons: boolean = false;\n\n render() {\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> di <span>{this.totalElements}</span>\n </span>\n \n :\n <span>\n <span>{this.currentPage}</span> di <span>{this.lastPage}</span>\n </span>\n }\n </div>\n <div class=\"arrow\">\n {this.showAdditionalChrevrons && <jump-icon name=\"chevrons-left\"></jump-icon>}\n <jump-icon name=\"chevron-left\"></jump-icon>\n <jump-icon name=\"chevron-right\"></jump-icon>\n {this.showAdditionalChrevrons && <jump-icon name=\"chevrons-right\"></jump-icon>}\n </div> \n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -190,6 +190,10 @@ const parsePropertyValue = (propValue, propType) => {
|
|
|
190
190
|
// but we'll cheat here and say that the string "false" is the boolean false
|
|
191
191
|
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
192
192
|
}
|
|
193
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
194
|
+
// force it to be a number
|
|
195
|
+
return parseFloat(propValue);
|
|
196
|
+
}
|
|
193
197
|
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
194
198
|
// could have been passed as a number or boolean
|
|
195
199
|
// but we still want it as a string
|
|
@@ -1730,4 +1734,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
1730
1734
|
|
|
1731
1735
|
export { Host as H, bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1732
1736
|
|
|
1733
|
-
//# sourceMappingURL=index-
|
|
1737
|
+
//# sourceMappingURL=index-ad69454c.js.map
|