@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-card.js","sourceRoot":"","sources":["../../../src/components/jump-card/jump-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,OAAO;;
|
|
1
|
+
{"version":3,"file":"jump-card.js","sourceRoot":"","sources":["../../../src/components/jump-card/jump-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,OAAO;;0BAIY,KAAK;oBAK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'jump-card',\n styleUrl: 'jump-card.scss',\n shadow: false,\n})\nexport class AppCard {\n /**\n * Indicates if the card is horizontal\n */\n @Prop() horizontal: boolean = false;\n\n /**\n * Indicates if the card is horizontal\n */\n @Prop() dark: boolean = false;\n\n /**\n * Indicates if card has shadow\n */\n @Prop() shadow: boolean;\n\n /**\n * Indicates if card has borders\n */\n @Prop() border: boolean;\n\n /**\n * Indicates if borders of the entire card are rounded\n */\n @Prop() borderRadius: boolean = false;\n\n /**\n * Indicates if border top of the body is rounded; Not compatible with boxed\n */\n @Prop() topBorderContentRadius: boolean = false;\n\n /**\n * Indicates if media has padding; Not compatible with roundedMedia\n */\n @Prop() boxed: boolean = false;\n\n /**\n * Indicates if image is rounded and there isnt a bg\n */\n @Prop() roundedMedia: boolean = false;\n\n /**\n * Indicates the imgSrc of the card\n */\n @Prop() imgSrc: string = '';\n\n /**\n * Indicates the img's alt of the card\n */\n @Prop() imgAlt: string = '';\n\n /**\n * Indicates the videoSrc of the card\n */\n @Prop() videoSrc: string = '';\n\n render() {\n return (\n <Host horizontal={this.horizontal} border-radius={this.borderRadius} rounded-media={this.roundedMedia} top-border-content-radius={this.topBorderContentRadius} boxed={this.boxed} shadow={this.shadow} border={this.border}>\n {this.imgSrc && !this.videoSrc ? <img src={this.imgSrc} alt={this.imgAlt}></img> : ''}\n {this.videoSrc && !this.imgSrc ? \n <video autoplay> \n <source src={this.videoSrc} type=\"video/mp4\"/> \n <source src={this.videoSrc} type=\"video/mov\"/> \n <source src={this.videoSrc} type=\"video/webm\"/> \n </video> : ''}\n <div class=\"Content\">\n <slot name=\"body\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import feather from "feather-icons";
|
|
3
|
-
export class
|
|
3
|
+
export class JumpIcon {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.name = undefined;
|
|
6
6
|
this.class = undefined;
|
|
@@ -9,7 +9,7 @@ export class AppIcon {
|
|
|
9
9
|
feather.replace();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'c61b602c009a61e74b1ade495fc2188bdcad79dc' }, h("i", { key: 'adf4f1038dbb9809f524bacaffca00a43c164652', "data-feather": this.name, class: this.class })));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "jump-icon"; }
|
|
15
15
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-icon.js","sourceRoot":"","sources":["../../../src/components/jump-icon/jump-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,OAAO,MAAM,eAAe,CAAC;AAOpC,MAAM,OAAO,QAAQ;;;;;IAYnB,gBAAgB;QACd,OAAO,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,0EAAiB,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAM,CAC9C,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport feather from 'feather-icons';\n\n@Component({\n tag: 'jump-icon',\n styleUrl: 'jump-icon.scss',\n shadow: false,\n})\nexport class JumpIcon {\n /**\n * Name of the icon\n **/\n @Prop() name: string;\n\n /**\n * Additional classes\n **/\n @Prop() class: string;\n\n\n componentDidLoad() {\n feather.replace();\n }\n\n render() {\n return (\n <Host>\n <i data-feather={this.name} class={this.class}></i>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-icon.stories.js","sourceRoot":"","sources":["../../../src/components/jump-icon/jump-icon.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YACnC,WAAW,EAAE,kDAAkD;SAChE;QACD,KAAK,EAAE;YACL,IAAI,EAAE,mBAAmB;YACzB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,4DAA4D;SAC1E;KACF;CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,qBAAqB,IAAI,CAAC,KAAK,WAAW,IAAI,CAAC,IAAI,gBAAgB,CAAC;AAE/F,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,KAAK,EAAE,EAAE;CACV,CAAC","sourcesContent":["import feather from 'feather-icons';\n\nexport default {\n title: 'Components/Icon',\n tags: ['autodocs'],\n argTypes: {\n name: {\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 },\n class: {\n name: 'Classi aggiuntive',\n control: 'text',\n description: 'Aggiungi classi aggiuntive all\\'icona (separate da spazio)'\n }\n }\n};\n\nconst Template = (args) => `<jump-icon class=\"${args.class}\" name=\"${args.name}\"></jump-icon>`;\n\nexport const Icon = Template.bind({});\nIcon.args = {\n name: Object.keys(feather.icons)[0],\n class: '',\n};"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-icon.e2e.js","sourceRoot":"","sources":["../../../../src/components/jump-icon/test/jump-icon.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;QAEjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('jump-icon', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<jump-icon></jump-icon>');\n\n const element = await page.find('jump-icon');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import {
|
|
2
|
+
import { JumpIcon } from "../jump-icon";
|
|
3
3
|
describe('jump-icon', () => {
|
|
4
4
|
it('renders', async () => {
|
|
5
5
|
const page = await newSpecPage({
|
|
6
|
-
components: [
|
|
6
|
+
components: [JumpIcon],
|
|
7
7
|
html: `<jump-icon></jump-icon>`,
|
|
8
8
|
});
|
|
9
9
|
expect(page.root).toEqualHtml(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-icon.spec.js","sourceRoot":"","sources":["../../../../src/components/jump-icon/test/jump-icon.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,QAAQ,CAAC;YACtB,IAAI,EAAE,yBAAyB;SAChC,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 { JumpIcon } from '../jump-icon';\n\ndescribe('jump-icon', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [JumpIcon],\n html: `<jump-icon></jump-icon>`,\n });\n expect(page.root).toEqualHtml(`\n <jump-icon>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </jump-icon>\n `);\n });\n});\n"]}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
import { generateAttributesFromArgs, formatHtml } from "../../utils/utils";
|
|
1
2
|
export default {
|
|
2
3
|
title: 'Components/Pagination/Pages',
|
|
3
4
|
tags: ['autodocs'],
|
|
4
5
|
argTypes: {
|
|
5
6
|
pagLabel: {
|
|
6
|
-
name: "
|
|
7
|
+
name: "pagLabel",
|
|
7
8
|
control: 'text',
|
|
8
9
|
description: 'Indica la dicitura di paginazione. Di default è "di".'
|
|
9
10
|
},
|
|
10
11
|
completeVersion: {
|
|
11
|
-
name: '
|
|
12
|
+
name: 'completeVersion',
|
|
12
13
|
control: 'boolean',
|
|
13
14
|
description: 'Indica se mostrare la versione con selezione di prodotti'
|
|
14
15
|
},
|
|
15
16
|
showAdditionalChrevrons: {
|
|
16
|
-
name: '
|
|
17
|
+
name: 'showAdditionalChrevrons',
|
|
17
18
|
control: 'boolean',
|
|
18
19
|
description: 'Indica se mostrare le frecce aggiuntive per navigare rapidamente nella prima o ultima pagina. Da preferire con un numero elevato di pagine.'
|
|
19
20
|
},
|
|
20
21
|
firstPage: {
|
|
21
|
-
name: '
|
|
22
|
+
name: 'firstPage',
|
|
22
23
|
control: 'number',
|
|
23
24
|
description: 'Se si tratta di pagination per prodotti, indica il valore min di range di prodotto, altrimenti la prima pagina',
|
|
24
25
|
if: {
|
|
@@ -26,13 +27,13 @@ export default {
|
|
|
26
27
|
eq: true
|
|
27
28
|
},
|
|
28
29
|
},
|
|
29
|
-
|
|
30
|
-
name: '
|
|
30
|
+
initialPage: {
|
|
31
|
+
name: 'initialPage',
|
|
31
32
|
control: 'number',
|
|
32
33
|
description: 'Se si tratta di pagination per prodotti, indica il valore max di range di prodotto, altrimenti la pagina corrente'
|
|
33
34
|
},
|
|
34
35
|
lastPage: {
|
|
35
|
-
name: '
|
|
36
|
+
name: 'lastPage',
|
|
36
37
|
control: 'number',
|
|
37
38
|
description: 'Indica l\'ultima pagina',
|
|
38
39
|
if: {
|
|
@@ -41,7 +42,7 @@ export default {
|
|
|
41
42
|
},
|
|
42
43
|
},
|
|
43
44
|
totalElements: {
|
|
44
|
-
name: '
|
|
45
|
+
name: 'totalElements',
|
|
45
46
|
control: 'number',
|
|
46
47
|
description: 'Indica il numero totale di elementi disponibili. ',
|
|
47
48
|
if: {
|
|
@@ -50,7 +51,7 @@ export default {
|
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
53
|
labelElementsPerPage: {
|
|
53
|
-
name: '
|
|
54
|
+
name: 'labelElementsPerPage',
|
|
54
55
|
control: 'text',
|
|
55
56
|
description: 'Indica l\'etichetta per gli elementi per pagina',
|
|
56
57
|
if: {
|
|
@@ -59,7 +60,7 @@ export default {
|
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
62
|
elementsRanges: {
|
|
62
|
-
name: '
|
|
63
|
+
name: 'elementsRanges',
|
|
63
64
|
control: 'multi-select',
|
|
64
65
|
options: [10, 20, 30],
|
|
65
66
|
if: {
|
|
@@ -70,32 +71,48 @@ export default {
|
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
73
|
const Template = (args) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
first-page="${args.firstPage}"
|
|
76
|
-
last-page="${args.lastPage}"
|
|
77
|
-
total-elements="${args.totalElements}"
|
|
78
|
-
complete-version=${args.completeVersion}
|
|
79
|
-
elements-ranges="${args.elementsRanges}"
|
|
80
|
-
pag-label="${args.pagLabel}"
|
|
81
|
-
show-additional-chrevrons=${args.showAdditionalChrevrons}>
|
|
82
|
-
</jump-pagination>`;
|
|
74
|
+
const attributes = generateAttributesFromArgs(args);
|
|
75
|
+
return formatHtml(`<jump-pagination ${attributes}></jump-pagination>`);
|
|
83
76
|
};
|
|
84
|
-
|
|
77
|
+
const TemplateWithListenerExample = (args, data) => {
|
|
78
|
+
let id = data.id;
|
|
79
|
+
const attributes = generateAttributesFromArgs(args);
|
|
80
|
+
return formatHtml(`<jump-pagination ${attributes}></jump-pagination>
|
|
81
|
+
<div>La pagina corrente è: <span id="page-number">loading..<span></div>
|
|
82
|
+
<script>
|
|
83
|
+
(function() {
|
|
84
|
+
let container;
|
|
85
|
+
container = document.querySelector('#story--${id}');
|
|
86
|
+
container.querySelector('jump-pagination').addEventListener('jump-change-page', (ev) => {
|
|
87
|
+
container.querySelector('#page-number').innerText = ev.detail.currentPage;
|
|
88
|
+
});
|
|
89
|
+
})();
|
|
90
|
+
</script>`);
|
|
91
|
+
};
|
|
92
|
+
export const Playground = Template.bind({});
|
|
93
|
+
Playground.args = {
|
|
94
|
+
completeVersion: false,
|
|
95
|
+
showAdditionalChrevrons: false,
|
|
96
|
+
firstPage: 1,
|
|
97
|
+
initialPage: 1,
|
|
98
|
+
lastPage: 10,
|
|
99
|
+
pagLabel: 'di'
|
|
100
|
+
};
|
|
101
|
+
export const PaginationPerPagineRidotto = TemplateWithListenerExample.bind({});
|
|
85
102
|
PaginationPerPagineRidotto.args = {
|
|
86
103
|
completeVersion: false,
|
|
87
104
|
showAdditionalChrevrons: false,
|
|
88
105
|
firstPage: 1,
|
|
89
|
-
|
|
106
|
+
initialPage: 1,
|
|
90
107
|
lastPage: 10,
|
|
91
108
|
pagLabel: 'di'
|
|
92
109
|
};
|
|
93
|
-
export const PaginationPerPagineCompleto =
|
|
110
|
+
export const PaginationPerPagineCompleto = TemplateWithListenerExample.bind({});
|
|
94
111
|
PaginationPerPagineCompleto.args = {
|
|
95
112
|
completeVersion: false,
|
|
96
113
|
showAdditionalChrevrons: true,
|
|
97
114
|
firstPage: 1,
|
|
98
|
-
|
|
115
|
+
initialPage: 3,
|
|
99
116
|
lastPage: 10,
|
|
100
117
|
pagLabel: 'di'
|
|
101
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-pagination-pages.stories.js","sourceRoot":"","sources":["../../../src/components/jump-pagination/jump-pagination-pages.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,QAAQ,EAAC;YACP,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"jump-pagination-pages.stories.js","sourceRoot":"","sources":["../../../src/components/jump-pagination/jump-pagination-pages.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,QAAQ,EAAC;YACP,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,uDAAuD;SACrE;QACD,eAAe,EAAE;YACf,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,SAAS;YAClB,WAAW,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default {\n title: 'Components/Pagination/Pages',\n tags: ['autodocs'],\n argTypes: {\n pagLabel:{\n name: \"pagLabel\",\n control: 'text',\n description: 'Indica la dicitura di paginazione. Di default è \"di\".'\n },\n completeVersion: {\n name: 'completeVersion',\n control: 'boolean',\n description: 'Indica se mostrare la versione con selezione di prodotti'\n },\n showAdditionalChrevrons: {\n name: 'showAdditionalChrevrons',\n control: 'boolean',\n description: 'Indica se mostrare le frecce aggiuntive per navigare rapidamente nella prima o ultima pagina. Da preferire con un numero elevato di pagine.'\n },\n firstPage: {\n name: 'firstPage',\n control: 'number',\n description: 'Se si tratta di pagination per prodotti, indica il valore min di range di prodotto, altrimenti la prima pagina',\n if: {\n arg: 'completeVersion',\n eq: true\n },\n },\n initialPage: {\n name: 'initialPage',\n control: 'number',\n description: 'Se si tratta di pagination per prodotti, indica il valore max di range di prodotto, altrimenti la pagina corrente'\n },\n lastPage: {\n name: 'lastPage',\n control: 'number',\n description: 'Indica l\\'ultima pagina',\n if: {\n arg: 'completeVersion',\n eq: false\n },\n },\n totalElements: {\n name: 'totalElements',\n control: 'number',\n description: 'Indica il numero totale di elementi disponibili. ',\n if: {\n arg: 'completeVersion',\n eq: true\n },\n },\n labelElementsPerPage: {\n name: 'labelElementsPerPage',\n control: 'text',\n description: 'Indica l\\'etichetta per gli elementi per pagina',\n if: {\n arg: 'completeVersion',\n eq: true\n },\n },\n elementsRanges: {\n name: 'elementsRanges',\n control: 'multi-select', \n options: [10, 20, 30],\n if: {\n arg: 'completeVersion',\n eq: true\n }, \n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-pagination ${attributes}></jump-pagination>`);\n};\n\nconst TemplateWithListenerExample = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-pagination ${attributes}></jump-pagination>\n <div>La pagina corrente è: <span id=\"page-number\">loading..<span></div>\n <script>\n (function() {\n let container;\n container = document.querySelector('#story--${id}');\n container.querySelector('jump-pagination').addEventListener('jump-change-page', (ev) => {\n container.querySelector('#page-number').innerText = ev.detail.currentPage;\n });\n })();\n </script>`);\n};\n\nexport const Playground = Template.bind({});\n\nPlayground.args = {\n completeVersion: false,\n showAdditionalChrevrons: false,\n firstPage: 1,\n initialPage: 1,\n lastPage: 10,\n pagLabel: 'di'\n};\n\nexport const PaginationPerPagineRidotto = TemplateWithListenerExample.bind({});\n\nPaginationPerPagineRidotto.args = {\n completeVersion: false,\n showAdditionalChrevrons: false,\n firstPage: 1,\n initialPage: 1,\n lastPage:10,\n pagLabel: 'di'\n};\n\nexport const PaginationPerPagineCompleto = TemplateWithListenerExample.bind({});\n\nPaginationPerPagineCompleto.args = {\n completeVersion: false,\n showAdditionalChrevrons: true,\n firstPage: 1,\n initialPage: 3,\n lastPage: 10,\n pagLabel: 'di'\n};\n"]}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
import { generateAttributesFromArgs } from "../../utils/utils";
|
|
1
2
|
export default {
|
|
2
3
|
title: 'Components/Pagination/Products',
|
|
3
4
|
tags: ['autodocs'],
|
|
4
5
|
argTypes: {
|
|
5
6
|
pagLabel: {
|
|
6
|
-
name: "
|
|
7
|
+
name: "pagLabel",
|
|
7
8
|
control: 'text',
|
|
8
9
|
description: 'Indica la dicitura di paginazione. Di default è "di".'
|
|
9
10
|
},
|
|
10
11
|
completeVersion: {
|
|
11
|
-
name: '
|
|
12
|
+
name: 'completeVersion',
|
|
12
13
|
control: 'boolean',
|
|
13
14
|
description: 'Indica se mostrare la versione con selezione di prodotti'
|
|
14
15
|
},
|
|
15
|
-
|
|
16
|
-
name: '
|
|
16
|
+
showFirstAndLast: {
|
|
17
|
+
name: 'showFirstAndLast',
|
|
17
18
|
control: 'boolean',
|
|
18
19
|
description: 'Indica se mostrare le frecce aggiuntive per navigare rapidamente nella prima o ultima pagina. Da preferire con un numero elevato di pagine.'
|
|
19
20
|
},
|
|
20
21
|
firstPage: {
|
|
21
|
-
name: '
|
|
22
|
+
name: 'firstPage',
|
|
22
23
|
control: 'number',
|
|
23
24
|
description: 'Se si tratta di pagination per prodotti, indica il valore min di range di prodotto, altrimenti la prima pagina',
|
|
24
25
|
if: {
|
|
@@ -26,13 +27,13 @@ export default {
|
|
|
26
27
|
eq: true
|
|
27
28
|
},
|
|
28
29
|
},
|
|
29
|
-
|
|
30
|
-
name: '
|
|
30
|
+
initialPage: {
|
|
31
|
+
name: 'initialPage',
|
|
31
32
|
control: 'number',
|
|
32
33
|
description: 'Se si tratta di pagination per prodotti, indica il valore max di range di prodotto, altrimenti la pagina corrente'
|
|
33
34
|
},
|
|
34
35
|
lastPage: {
|
|
35
|
-
name: '
|
|
36
|
+
name: 'lastPage',
|
|
36
37
|
control: 'number',
|
|
37
38
|
description: 'Indica l\'ultima pagina',
|
|
38
39
|
if: {
|
|
@@ -41,7 +42,7 @@ export default {
|
|
|
41
42
|
},
|
|
42
43
|
},
|
|
43
44
|
totalElements: {
|
|
44
|
-
name: '
|
|
45
|
+
name: 'totalElements',
|
|
45
46
|
control: 'number',
|
|
46
47
|
description: 'Indica il numero totale di elementi disponibili. ',
|
|
47
48
|
if: {
|
|
@@ -50,7 +51,7 @@ export default {
|
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
53
|
labelElementsPerPage: {
|
|
53
|
-
name: '
|
|
54
|
+
name: 'labelElementsPerPage',
|
|
54
55
|
control: 'text',
|
|
55
56
|
description: 'Indica l\'etichetta per gli elementi per pagina',
|
|
56
57
|
if: {
|
|
@@ -59,7 +60,7 @@ export default {
|
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
62
|
elementsRanges: {
|
|
62
|
-
name: '
|
|
63
|
+
name: 'elementsRanges',
|
|
63
64
|
control: 'multi-select',
|
|
64
65
|
options: [10, 20, 30],
|
|
65
66
|
if: {
|
|
@@ -70,23 +71,16 @@ export default {
|
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
73
|
const Template = (args) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
last-page="${args.lastPage}"
|
|
77
|
-
total-elements="${args.totalElements}"
|
|
78
|
-
complete-version=${args.completeVersion}
|
|
79
|
-
elements-ranges="${args.elementsRanges}"
|
|
80
|
-
pag-label="${args.pagLabel}"
|
|
81
|
-
show-additional-chrevrons=${args.showAdditionalChrevrons}>
|
|
82
|
-
</jump-pagination>`;
|
|
74
|
+
const attributes = generateAttributesFromArgs(args);
|
|
75
|
+
console.log('attributes', attributes);
|
|
76
|
+
return `<jump-pagination ${attributes}></jump-pagination>`;
|
|
83
77
|
};
|
|
84
78
|
export const PaginationPerProdottiRidotto = Template.bind({});
|
|
85
79
|
PaginationPerProdottiRidotto.args = {
|
|
86
80
|
completeVersion: true,
|
|
87
|
-
|
|
81
|
+
showFirstAndLast: false,
|
|
88
82
|
firstPage: 1,
|
|
89
|
-
|
|
83
|
+
initialPage: 1,
|
|
90
84
|
lastPage: 20,
|
|
91
85
|
totalElements: 150,
|
|
92
86
|
labelElementsPerPage: "Elementi per pagina",
|
|
@@ -96,28 +90,13 @@ PaginationPerProdottiRidotto.args = {
|
|
|
96
90
|
export const PaginationPerProdottiCompleto = Template.bind({});
|
|
97
91
|
PaginationPerProdottiCompleto.args = {
|
|
98
92
|
completeVersion: true,
|
|
99
|
-
|
|
93
|
+
showFirstAndLast: true,
|
|
100
94
|
firstPage: 1,
|
|
101
|
-
|
|
95
|
+
initialPage: 1,
|
|
102
96
|
lastPage: 20,
|
|
103
97
|
totalElements: 150,
|
|
104
98
|
labelElementsPerPage: "Elementi per pagina",
|
|
105
99
|
elementsRanges: [10, 20, 60, 100],
|
|
106
100
|
pagLabel: 'di'
|
|
107
101
|
};
|
|
108
|
-
// PaginationPerPagineRidotto.args = {
|
|
109
|
-
// completeVersion: false,
|
|
110
|
-
// showAdditionalChrevrons: false,
|
|
111
|
-
// firstPage: 1,
|
|
112
|
-
// currentPage: 5,
|
|
113
|
-
// lastPage:10,
|
|
114
|
-
// };
|
|
115
|
-
// export const PaginationPerPagineCompleto = Template.bind({});
|
|
116
|
-
// PaginationPerPagineCompleto.args = {
|
|
117
|
-
// completeVersion: false,
|
|
118
|
-
// showAdditionalChrevrons: true,
|
|
119
|
-
// firstPage: 1,
|
|
120
|
-
// currentPage: 5,
|
|
121
|
-
// lastPage:10,
|
|
122
|
-
// };
|
|
123
102
|
//# sourceMappingURL=jump-pagination-products.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-pagination-products.stories.js","sourceRoot":"","sources":["../../../src/components/jump-pagination/jump-pagination-products.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,gCAAgC;IACvC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,QAAQ,EAAC;YACP,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"jump-pagination-products.stories.js","sourceRoot":"","sources":["../../../src/components/jump-pagination/jump-pagination-products.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,gCAAgC;IACvC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,QAAQ,EAAC;YACP,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,uDAAuD;SACrE;QACD,eAAe,EAAE;YACf,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,0DAA0D;SACxE;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,6IAA6I;SAC3J;QACD,SAAS,EAAE;YACT,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,gHAAgH;YAC7H,EAAE,EAAE;gBACF,GAAG,EAAE,iBAAiB;gBACtB,EAAE,EAAE,IAAI;aACT;SACF;QACD,W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,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;IACd,QAAQ,EAAC,EAAE;IACX,aAAa,EAAE,GAAG;IAClB,oBAAoB,EAAE,qBAAqB;IAC3C,cAAc,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;IACjC,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE/D,6BAA6B,CAAC,IAAI,GAAG;IACnC,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,IAAI;IACtB,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;IACd,QAAQ,EAAC,EAAE;IACX,aAAa,EAAE,GAAG;IAClB,oBAAoB,EAAE,qBAAqB;IAC3C,cAAc,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;IACjC,QAAQ,EAAE,IAAI;CACf,CAAC","sourcesContent":["import { generateAttributesFromArgs} from '../../utils/utils';\n\nexport default {\n title: 'Components/Pagination/Products',\n tags: ['autodocs'],\n argTypes: {\n pagLabel:{\n name: \"pagLabel\",\n control: 'text',\n description: 'Indica la dicitura di paginazione. Di default è \"di\".'\n },\n completeVersion: {\n name: 'completeVersion',\n control: 'boolean',\n description: 'Indica se mostrare la versione con selezione di prodotti'\n },\n showFirstAndLast: {\n name: 'showFirstAndLast',\n control: 'boolean',\n description: 'Indica se mostrare le frecce aggiuntive per navigare rapidamente nella prima o ultima pagina. Da preferire con un numero elevato di pagine.'\n },\n firstPage: {\n name: 'firstPage',\n control: 'number',\n description: 'Se si tratta di pagination per prodotti, indica il valore min di range di prodotto, altrimenti la prima pagina',\n if: {\n arg: 'completeVersion',\n eq: true\n },\n },\n initialPage: {\n name: 'initialPage',\n control: 'number',\n description: 'Se si tratta di pagination per prodotti, indica il valore max di range di prodotto, altrimenti la pagina corrente'\n },\n lastPage: {\n name: 'lastPage',\n control: 'number',\n description: 'Indica l\\'ultima pagina',\n if: {\n arg: 'completeVersion',\n eq: false\n },\n },\n totalElements: {\n name: 'totalElements',\n control: 'number',\n description: 'Indica il numero totale di elementi disponibili. ',\n if: {\n arg: 'completeVersion',\n eq: true\n },\n },\n labelElementsPerPage: {\n name: 'labelElementsPerPage',\n control: 'text',\n description: 'Indica l\\'etichetta per gli elementi per pagina',\n if: {\n arg: 'completeVersion',\n eq: true\n },\n },\n elementsRanges: {\n name: 'elementsRanges',\n control: 'multi-select', \n options: [10, 20, 30],\n if: {\n arg: 'completeVersion',\n eq: true\n }, \n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n console.log('attributes', attributes);\n return `<jump-pagination ${attributes}></jump-pagination>`;\n};\n\nexport const PaginationPerProdottiRidotto = Template.bind({});\n\nPaginationPerProdottiRidotto.args = {\n completeVersion: true,\n showFirstAndLast: false,\n firstPage: 1,\n initialPage: 1,\n lastPage:20,\n totalElements: 150,\n labelElementsPerPage: \"Elementi per pagina\",\n elementsRanges: [10, 20, 60, 100],\n pagLabel: 'di'\n};\n\nexport const PaginationPerProdottiCompleto = Template.bind({});\n\nPaginationPerProdottiCompleto.args = {\n completeVersion: true,\n showFirstAndLast: true,\n firstPage: 1,\n initialPage: 1,\n lastPage:20,\n totalElements: 150,\n labelElementsPerPage: \"Elementi per pagina\",\n elementsRanges: [10, 20, 60, 100],\n pagLabel: 'di'\n};"]}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
.JumpPagination {
|
|
6
6
|
--pagination-label-color: var(--neutral-grey-secondary);
|
|
7
7
|
--pagination-arrows-color: var(--neutral-grey-secondary);
|
|
8
|
+
--pagination-arrows-disabled: #CBCBCB;
|
|
8
9
|
font-family: var(--ff-primary);
|
|
9
10
|
}
|
|
10
11
|
.JumpPagination__Wrapper {
|
|
@@ -35,6 +36,18 @@
|
|
|
35
36
|
align-items: center;
|
|
36
37
|
gap: 10px;
|
|
37
38
|
}
|
|
39
|
+
.JumpPagination__Wrapper .indicators .arrow button {
|
|
40
|
+
background-color: transparent;
|
|
41
|
+
border: none;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
padding: 0px;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
}
|
|
47
|
+
.JumpPagination__Wrapper .indicators .arrow button:disabled {
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
color: var(--pagination-arrows-disabled);
|
|
50
|
+
}
|
|
38
51
|
.JumpPagination__Wrapper .indicators .elements {
|
|
39
52
|
color: var(--pagination-label-color);
|
|
40
53
|
display: flex;
|
|
@@ -1,23 +1,41 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class JumpPagination {
|
|
3
3
|
constructor() {
|
|
4
|
+
this.firstPage = 1;
|
|
5
|
+
this.currentPage = undefined;
|
|
4
6
|
this.totalElements = undefined;
|
|
5
7
|
this.pagLabel = 'di';
|
|
6
|
-
this.
|
|
7
|
-
this.lastPage =
|
|
8
|
+
this.initialPage = 1;
|
|
9
|
+
this.lastPage = 10;
|
|
8
10
|
this.labelElementsPerPage = 'Elementi per pagina';
|
|
9
11
|
this.elementsRanges = [10, 20, 60, 100];
|
|
10
|
-
this.firstPage = undefined;
|
|
11
12
|
this.completeVersion = false;
|
|
12
|
-
this.
|
|
13
|
+
this.showFirstAndLast = false;
|
|
14
|
+
}
|
|
15
|
+
watchCurrentPage(newValue, oldValue) {
|
|
16
|
+
let details = {
|
|
17
|
+
currentPage: newValue,
|
|
18
|
+
previousPage: oldValue,
|
|
19
|
+
firstPage: this.firstPage,
|
|
20
|
+
lastPage: this.lastPage,
|
|
21
|
+
direction: newValue > oldValue ? 'next' : 'prev'
|
|
22
|
+
};
|
|
23
|
+
this.jumpChangePage.emit(details);
|
|
24
|
+
}
|
|
25
|
+
/* ---------------------- @LIFECYCLE ------------------------- */
|
|
26
|
+
componentWillLoad() {
|
|
27
|
+
this.currentPage = this.initialPage;
|
|
13
28
|
}
|
|
14
29
|
render() {
|
|
15
30
|
var _a;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
h("
|
|
31
|
+
console.log('completeVersion', this.completeVersion);
|
|
32
|
+
return (h(Host, { key: '32e300881b3a78d25edf6480e9a8a6594f907c76', class: "JumpPagination" }, h("div", { key: '0c4e133e409740331083588fbb046d79c2878ea9', class: "JumpPagination__Wrapper" }, this.completeVersion &&
|
|
33
|
+
h("div", { key: '13daa8e819ec294b50823becc7e8d904eff66f32', class: "elementsPerPage" }, h("label", { key: '162555e0ebfc295d96d5ba358ec879eba1730746', htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), h("select", { key: 'c4e99d784347a67c5616b3ed0ca25934dbdae55f', name: "elements", id: "elements" }, this.elementsRanges.map((range) => (h("option", { value: range }, range))))), h("div", { key: '5eb516226cf5bcb23e575109371c4f55ca235e04', class: "indicators" }, h("div", { key: '58a8655b582e8cdcd9f8c553343d9e407dd66971', class: "elements" }, this.completeVersion ?
|
|
34
|
+
h("span", null, h("span", null, this.firstPage), " - ", h("span", null, this.currentPage), " ", this.pagLabel, " ", h("span", null, this.totalElements))
|
|
19
35
|
:
|
|
20
|
-
h("span", null, h("span", null, this.currentPage), "
|
|
36
|
+
h("span", null, h("span", null, this.currentPage), " ", this.pagLabel, " ", h("span", null, this.lastPage))), h("div", { key: '92b5476c223e477532726304c282ed34e1acccc7', class: "arrow" }, this.showFirstAndLast &&
|
|
37
|
+
h("button", { key: '740c67ee4f73c5a55a022b2281913d8652deeed2', onClick: () => { this.currentPage = this.firstPage; }, disabled: (this.currentPage === this.firstPage) ? true : false }, " ", h("jump-icon", { key: '5a880ea7c01afcc8ae9a4e84934e386e0edab58c', slot: "prefix", name: "chevrons-left" }), " "), h("button", { key: '08fe7f7faa6c7645151ec3ea2b4bf4247f082a2d', onClick: () => { this.currentPage--; }, disabled: (this.currentPage === this.firstPage) ? true : false }, " ", h("jump-icon", { key: '04a972584533f1272b10c7e9068ce332aef77299', slot: "prefix", name: "chevron-left" }), " "), h("button", { key: '0ea012c03b06b587296c9190eece67351579b6e3', onClick: () => { this.currentPage++; }, disabled: (this.currentPage === this.lastPage) ? true : false }, " ", h("jump-icon", { key: '155d6a407989f9cc5d38832df8fb98a3505c3113', slot: "prefix", name: "chevron-right" }), " "), this.showFirstAndLast &&
|
|
38
|
+
h("button", { key: 'be46c67831f6d732d47e9340aca1a43a650af958', onClick: () => { this.currentPage = this.lastPage; }, disabled: (this.currentPage === this.lastPage) ? true : false }, " ", h("jump-icon", { key: 'b04a3d8a8726f945d5639761dde68a300e40f80a', slot: "prefix", name: "chevrons-right" }), " "))))));
|
|
21
39
|
}
|
|
22
40
|
static get is() { return "jump-pagination"; }
|
|
23
41
|
static get originalStyleUrls() {
|
|
@@ -67,7 +85,7 @@ export class JumpPagination {
|
|
|
67
85
|
"reflect": true,
|
|
68
86
|
"defaultValue": "'di'"
|
|
69
87
|
},
|
|
70
|
-
"
|
|
88
|
+
"initialPage": {
|
|
71
89
|
"type": "number",
|
|
72
90
|
"mutable": false,
|
|
73
91
|
"complexType": {
|
|
@@ -81,8 +99,9 @@ export class JumpPagination {
|
|
|
81
99
|
"tags": [],
|
|
82
100
|
"text": ""
|
|
83
101
|
},
|
|
84
|
-
"attribute": "
|
|
85
|
-
"reflect": true
|
|
102
|
+
"attribute": "initial-page",
|
|
103
|
+
"reflect": true,
|
|
104
|
+
"defaultValue": "1"
|
|
86
105
|
},
|
|
87
106
|
"lastPage": {
|
|
88
107
|
"type": "number",
|
|
@@ -99,7 +118,8 @@ export class JumpPagination {
|
|
|
99
118
|
"text": ""
|
|
100
119
|
},
|
|
101
120
|
"attribute": "last-page",
|
|
102
|
-
"reflect": true
|
|
121
|
+
"reflect": true,
|
|
122
|
+
"defaultValue": "10"
|
|
103
123
|
},
|
|
104
124
|
"labelElementsPerPage": {
|
|
105
125
|
"type": "string",
|
|
@@ -140,23 +160,6 @@ export class JumpPagination {
|
|
|
140
160
|
},
|
|
141
161
|
"defaultValue": "[10, 20, 60, 100]"
|
|
142
162
|
},
|
|
143
|
-
"firstPage": {
|
|
144
|
-
"type": "number",
|
|
145
|
-
"mutable": false,
|
|
146
|
-
"complexType": {
|
|
147
|
-
"original": "number",
|
|
148
|
-
"resolved": "number",
|
|
149
|
-
"references": {}
|
|
150
|
-
},
|
|
151
|
-
"required": false,
|
|
152
|
-
"optional": false,
|
|
153
|
-
"docs": {
|
|
154
|
-
"tags": [],
|
|
155
|
-
"text": "Indicates the first page/product of the list"
|
|
156
|
-
},
|
|
157
|
-
"attribute": "first-page",
|
|
158
|
-
"reflect": true
|
|
159
|
-
},
|
|
160
163
|
"completeVersion": {
|
|
161
164
|
"type": "boolean",
|
|
162
165
|
"mutable": false,
|
|
@@ -175,7 +178,7 @@ export class JumpPagination {
|
|
|
175
178
|
"reflect": true,
|
|
176
179
|
"defaultValue": "false"
|
|
177
180
|
},
|
|
178
|
-
"
|
|
181
|
+
"showFirstAndLast": {
|
|
179
182
|
"type": "boolean",
|
|
180
183
|
"mutable": false,
|
|
181
184
|
"complexType": {
|
|
@@ -189,11 +192,41 @@ export class JumpPagination {
|
|
|
189
192
|
"tags": [],
|
|
190
193
|
"text": ""
|
|
191
194
|
},
|
|
192
|
-
"attribute": "show-
|
|
195
|
+
"attribute": "show-first-and-last",
|
|
193
196
|
"reflect": true,
|
|
194
197
|
"defaultValue": "false"
|
|
195
198
|
}
|
|
196
199
|
};
|
|
197
200
|
}
|
|
201
|
+
static get states() {
|
|
202
|
+
return {
|
|
203
|
+
"firstPage": {},
|
|
204
|
+
"currentPage": {}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
static get events() {
|
|
208
|
+
return [{
|
|
209
|
+
"method": "jumpChangePage",
|
|
210
|
+
"name": "jump-change-page",
|
|
211
|
+
"bubbles": true,
|
|
212
|
+
"cancelable": true,
|
|
213
|
+
"composed": true,
|
|
214
|
+
"docs": {
|
|
215
|
+
"tags": [],
|
|
216
|
+
"text": ""
|
|
217
|
+
},
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "any",
|
|
220
|
+
"resolved": "any",
|
|
221
|
+
"references": {}
|
|
222
|
+
}
|
|
223
|
+
}];
|
|
224
|
+
}
|
|
225
|
+
static get watchers() {
|
|
226
|
+
return [{
|
|
227
|
+
"propName": "currentPage",
|
|
228
|
+
"methodName": "watchCurrentPage"
|
|
229
|
+
}];
|
|
230
|
+
}
|
|
198
231
|
}
|
|
199
232
|
//# sourceMappingURL=jump-pagination.js.map
|