@jumpgroup/jump-design-system 0.2.2 → 0.2.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-79e97f36.js → index-41aaa52a.js} +181 -11
- 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 +10 -6
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-card.cjs.entry.js +4 -4
- 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 +87 -0
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js +74 -0
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button-filled.stories.js +14 -482
- 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 +109 -0
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button-outline.stories.js +20 -285
- 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 +83 -0
- package/dist/collection/components/jump-button/jump-button-text.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button.css +103 -50
- package/dist/collection/components/jump-button/jump-button.js +41 -19
- package/dist/collection/components/jump-button/jump-button.js.map +1 -1
- package/dist/collection/components/jump-button/test/jump-button.spec.js +2 -2
- package/dist/collection/components/jump-button/test/jump-button.spec.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card-border-radius.stories.js +2 -14
- package/dist/collection/components/jump-card/jump-card-border-radius.stories.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card-top-border-content-radius.stories.js +1 -2
- package/dist/collection/components/jump-card/jump-card-top-border-content-radius.stories.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card.css +50 -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 +29 -3
- 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 +26 -20
- package/dist/components/jump-button.js.map +1 -1
- package/dist/components/jump-card.js +14 -14
- 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-7feee8ea.js → index-192aeaf1.js} +181 -12
- 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 +10 -6
- package/dist/esm/jump-button.entry.js.map +1 -1
- package/dist/esm/jump-card.entry.js +4 -4
- 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-bc02e346.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-700b96b4.entry.js +2 -0
- package/dist/jump-design-system/p-700b96b4.entry.js.map +1 -0
- 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-99238e3f.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-9e47f451.entry.js +2 -0
- package/dist/jump-design-system/p-9e47f451.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 +44 -0
- package/dist/types/components/jump-button/jump-button-dimension.stories.d.ts +43 -0
- package/dist/types/components/jump-button/jump-button-filled.stories.d.ts +1 -120
- package/dist/types/components/jump-button/jump-button-only-icon.stories.d.ts +53 -0
- package/dist/types/components/jump-button/jump-button-outline.stories.d.ts +4 -112
- package/dist/types/components/jump-button/jump-button-text.stories.d.ts +40 -0
- package/dist/types/components/jump-button/jump-button.d.ts +7 -2
- 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 +2 -1
- package/package.json +3 -2
- package/dist/cjs/index-79e97f36.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-7feee8ea.js.map +0 -1
- package/dist/jump-design-system/p-7cfed9c6.entry.js +0 -2
- package/dist/jump-design-system/p-7cfed9c6.entry.js.map +0 -1
- package/dist/jump-design-system/p-99238e3f.entry.js.map +0 -1
- package/dist/jump-design-system/p-9fd6e0a0.entry.js +0 -2
- package/dist/jump-design-system/p-9fd6e0a0.entry.js.map +0 -1
- package/dist/jump-design-system/p-bc02e346.entry.js.map +0 -1
- package/dist/jump-design-system/p-c560071a.js +0 -3
- package/dist/jump-design-system/p-c560071a.js.map +0 -1
- package/dist/jump-design-system/p-ddb6c98c.entry.js +0 -2
- package/dist/jump-design-system/p-ddb6c98c.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,3 +1,52 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/*BASE COLOR RULES*/
|
|
3
|
+
--neutral-grey-background: #eeeeee;
|
|
4
|
+
--neutral-grey-disabled: #cbcbcb;
|
|
5
|
+
--neutral-grey-primary: #282828;
|
|
6
|
+
--neutral-grey-secondary: #707070;
|
|
7
|
+
--neutral-white: #ffffff;
|
|
8
|
+
--primary-hard: #e75a50;
|
|
9
|
+
--primary-soft: #ffeae9;
|
|
10
|
+
--primary-standard: #fa7268;
|
|
11
|
+
--secondary-hard: #435171;
|
|
12
|
+
--secondary-soft: #dde3ed;
|
|
13
|
+
--secondary-standard: #5e79ba;
|
|
14
|
+
--status-danger-hard: #ba250a;
|
|
15
|
+
--status-danger-soft: #fdd3d1;
|
|
16
|
+
--status-danger-standard: #d72c0d;
|
|
17
|
+
--status-interaction-hard: #22559e;
|
|
18
|
+
--status-interaction-soft: #f2f7fe;
|
|
19
|
+
--status-interaction-standard: #2c6ecb;
|
|
20
|
+
--status-success-hard: #156048;
|
|
21
|
+
--status-success-soft: #f1f8f5;
|
|
22
|
+
--status-success-standard: #1d7f60;
|
|
23
|
+
--status-warning-hard: #987100;
|
|
24
|
+
--status-warning-soft: #fef5ea;
|
|
25
|
+
--status-warning-standard: #b98900;
|
|
26
|
+
/*TYPOGRAPHY RULES*/
|
|
27
|
+
--ff-primary: "Inter";
|
|
28
|
+
--ff-secondary: "Prompt";
|
|
29
|
+
--lh-300: 1.25rem;
|
|
30
|
+
--lh-400: 1.5rem;
|
|
31
|
+
--lh-500: 1.625rem;
|
|
32
|
+
--lh-600: 2rem;
|
|
33
|
+
--lh-700: 2.75rem;
|
|
34
|
+
--lh-800: 3.5rem;
|
|
35
|
+
--lh-850: 4.375rem;
|
|
36
|
+
--lh-900: 5.5rem;
|
|
37
|
+
--fs-300: 0.875rem;
|
|
38
|
+
--fs-400: 1rem;
|
|
39
|
+
--fs-500: 1.125rem;
|
|
40
|
+
--fs-600: 1.5rem;
|
|
41
|
+
--fs-700: 2.25rem;
|
|
42
|
+
--fs-800: 3rem;
|
|
43
|
+
--fs-850: 3.75rem;
|
|
44
|
+
--fs-900: 4.5rem;
|
|
45
|
+
--fw-300: 300;
|
|
46
|
+
--fw-400: 400;
|
|
47
|
+
--fw-900: 700;
|
|
48
|
+
}
|
|
49
|
+
|
|
1
50
|
jump-card {
|
|
2
51
|
display: flex;
|
|
3
52
|
flex-direction: column;
|
|
@@ -22,6 +71,7 @@ jump-card video {
|
|
|
22
71
|
aspect-ratio: 4/3;
|
|
23
72
|
overflow: hidden;
|
|
24
73
|
position: relative;
|
|
74
|
+
object-fit: cover;
|
|
25
75
|
}
|
|
26
76
|
jump-card .Content {
|
|
27
77
|
padding: 1.5rem 1rem;
|
|
@@ -80,7 +130,6 @@ jump-card[rounded-media] video {
|
|
|
80
130
|
background-color: transparent;
|
|
81
131
|
border-radius: 50%;
|
|
82
132
|
aspect-ratio: 1;
|
|
83
|
-
object-fit: cover;
|
|
84
133
|
width: 100%;
|
|
85
134
|
flex: 0 1 40%;
|
|
86
135
|
}
|
|
@@ -14,8 +14,8 @@ export class AppCard {
|
|
|
14
14
|
this.videoSrc = '';
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h(Host, { key: '
|
|
18
|
-
h("video", { autoplay: true }, h("source", { src: this.videoSrc, type: "video/mp4" }), h("source", { src: this.videoSrc, type: "video/mov" }), h("source", { src: this.videoSrc, type: "video/webm" })) : '', h("div", { key: '
|
|
17
|
+
return (h(Host, { key: '990d2452fd2b295b5b5c78a5cbd311c938318ee7', 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 }, this.imgSrc && !this.videoSrc ? h("img", { src: this.imgSrc, alt: this.imgAlt }) : '', this.videoSrc && !this.imgSrc ?
|
|
18
|
+
h("video", { autoplay: true }, h("source", { src: this.videoSrc, type: "video/mp4" }), h("source", { src: this.videoSrc, type: "video/mov" }), h("source", { src: this.videoSrc, type: "video/webm" })) : '', h("div", { key: 'cb2ca9a506ac28a88fb3e4fb7fe6626f9af6daf5', class: "Content" }, h("slot", { key: '8e893537441beedf925094a99a886f9d5c1a1377', name: "body" }), h("slot", { key: '9436fd7c5030bf0405bb88ab43ca21a4bb7e5e35', name: "footer" }))));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "jump-card"; }
|
|
21
21
|
static get originalStyleUrls() {
|
|
@@ -45,7 +45,7 @@ export class AppCard {
|
|
|
45
45
|
"text": "Indicates if the card is horizontal"
|
|
46
46
|
},
|
|
47
47
|
"attribute": "horizontal",
|
|
48
|
-
"reflect":
|
|
48
|
+
"reflect": false,
|
|
49
49
|
"defaultValue": "false"
|
|
50
50
|
},
|
|
51
51
|
"dark": {
|
|
@@ -63,7 +63,7 @@ export class AppCard {
|
|
|
63
63
|
"text": "Indicates if the card is horizontal"
|
|
64
64
|
},
|
|
65
65
|
"attribute": "dark",
|
|
66
|
-
"reflect":
|
|
66
|
+
"reflect": false,
|
|
67
67
|
"defaultValue": "false"
|
|
68
68
|
},
|
|
69
69
|
"shadow": {
|
|
@@ -81,7 +81,7 @@ export class AppCard {
|
|
|
81
81
|
"text": "Indicates if card has shadow"
|
|
82
82
|
},
|
|
83
83
|
"attribute": "shadow",
|
|
84
|
-
"reflect":
|
|
84
|
+
"reflect": false
|
|
85
85
|
},
|
|
86
86
|
"border": {
|
|
87
87
|
"type": "boolean",
|
|
@@ -98,7 +98,7 @@ export class AppCard {
|
|
|
98
98
|
"text": "Indicates if card has borders"
|
|
99
99
|
},
|
|
100
100
|
"attribute": "border",
|
|
101
|
-
"reflect":
|
|
101
|
+
"reflect": false
|
|
102
102
|
},
|
|
103
103
|
"borderRadius": {
|
|
104
104
|
"type": "boolean",
|
|
@@ -115,7 +115,7 @@ export class AppCard {
|
|
|
115
115
|
"text": "Indicates if borders of the entire card are rounded"
|
|
116
116
|
},
|
|
117
117
|
"attribute": "border-radius",
|
|
118
|
-
"reflect":
|
|
118
|
+
"reflect": false,
|
|
119
119
|
"defaultValue": "false"
|
|
120
120
|
},
|
|
121
121
|
"topBorderContentRadius": {
|
|
@@ -133,7 +133,7 @@ export class AppCard {
|
|
|
133
133
|
"text": "Indicates if border top of the body is rounded; Not compatible with boxed"
|
|
134
134
|
},
|
|
135
135
|
"attribute": "top-border-content-radius",
|
|
136
|
-
"reflect":
|
|
136
|
+
"reflect": false,
|
|
137
137
|
"defaultValue": "false"
|
|
138
138
|
},
|
|
139
139
|
"boxed": {
|
|
@@ -151,7 +151,7 @@ export class AppCard {
|
|
|
151
151
|
"text": "Indicates if media has padding; Not compatible with roundedMedia"
|
|
152
152
|
},
|
|
153
153
|
"attribute": "boxed",
|
|
154
|
-
"reflect":
|
|
154
|
+
"reflect": false,
|
|
155
155
|
"defaultValue": "false"
|
|
156
156
|
},
|
|
157
157
|
"roundedMedia": {
|
|
@@ -169,7 +169,7 @@ export class AppCard {
|
|
|
169
169
|
"text": "Indicates if image is rounded and there isnt a bg"
|
|
170
170
|
},
|
|
171
171
|
"attribute": "rounded-media",
|
|
172
|
-
"reflect":
|
|
172
|
+
"reflect": false,
|
|
173
173
|
"defaultValue": "false"
|
|
174
174
|
},
|
|
175
175
|
"imgSrc": {
|
|
@@ -187,7 +187,7 @@ export class AppCard {
|
|
|
187
187
|
"text": "Indicates the imgSrc of the card"
|
|
188
188
|
},
|
|
189
189
|
"attribute": "img-src",
|
|
190
|
-
"reflect":
|
|
190
|
+
"reflect": false,
|
|
191
191
|
"defaultValue": "''"
|
|
192
192
|
},
|
|
193
193
|
"imgAlt": {
|
|
@@ -205,7 +205,7 @@ export class AppCard {
|
|
|
205
205
|
"text": "Indicates the img's alt of the card"
|
|
206
206
|
},
|
|
207
207
|
"attribute": "img-alt",
|
|
208
|
-
"reflect":
|
|
208
|
+
"reflect": false,
|
|
209
209
|
"defaultValue": "''"
|
|
210
210
|
},
|
|
211
211
|
"videoSrc": {
|
|
@@ -223,7 +223,7 @@ export class AppCard {
|
|
|
223
223
|
"text": "Indicates the videoSrc of the card"
|
|
224
224
|
},
|
|
225
225
|
"attribute": "video-src",
|
|
226
|
-
"reflect":
|
|
226
|
+
"reflect": false,
|
|
227
227
|
"defaultValue": "''"
|
|
228
228
|
}
|
|
229
229
|
};
|
|
@@ -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;oBAKX,KAAK;;;4BAeG,KAAK;sCAKK,KAAK;qBAKtB,KAAK;4BAKE,KAAK;sBAKZ,EAAE;sBAKF,EAAE;wBAKA,EAAE;;IAE7B,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,UAAU,EAAE,IAAI,CAAC,UAAU,mBAAiB,IAAI,CAAC,YAAY,mBAAiB,IAAI,CAAC,YAAY,+BAA6B,IAAI,CAAC,sBAAsB,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;YACvN,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAK,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,GAAQ,CAAC,CAAC,CAAC,EAAE;YACpF,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC9B,aAAO,QAAQ;oBACb,cAAQ,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,WAAW,GAAE;oBAC9C,cAAQ,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,WAAW,GAAE;oBAC9C,cAAQ,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,YAAY,GAAE,CACzC,CAAC,CAAC,CAAC,EAAE;YACf,4DAAK,KAAK,EAAC,SAAS;gBAClB,6DAAM,IAAI,EAAC,MAAM,GAAQ;gBACzB,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,0DAA0D;SACxE;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,yBAAyB;YAC/B,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,WAAW,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,mHAAmH;SACjI;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,yBAAyB;YACpC,EAAE,EAAE;gBACJ,GAAG,EAAE,iBAAiB;gBACtB,EAAE,EAAE,KAAK;aACV;SACF;QACD,aAAa,EAAE;YACb,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,mDAAmD;YAChE,EAAE,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B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE/E,0BAA0B,CAAC,IAAI,GAAG;IAChC,eAAe,EAAE,KAAK;IACtB,uBAAuB,EAAE,KAAK;IAC9B,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;IACd,QAAQ,EAAC,EAAE;IACX,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEhF,2BAA2B,CAAC,IAAI,GAAG;IACjC,eAAe,EAAE,KAAK;IACtB,uBAAuB,EAAE,IAAI;IAC7B,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,IAAI;CACf,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport 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,eA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export 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;
|