@jumpgroup/jump-design-system 0.1.9 → 0.2.1
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-46644e39.js → index-79e97f36.js} +25 -4
- package/dist/cjs/index-79e97f36.js.map +1 -0
- package/dist/cjs/jump-badge.cjs.entry.js +24 -0
- package/dist/cjs/jump-badge.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-button.cjs.entry.js +2 -2
- package/dist/cjs/jump-card.cjs.entry.js +34 -0
- package/dist/cjs/jump-card.cjs.entry.js.map +1 -0
- 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 +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/jump-badge/jump-badge.css +25 -0
- package/dist/collection/components/jump-badge/jump-badge.js +62 -0
- package/dist/collection/components/jump-badge/jump-badge.js.map +1 -0
- package/dist/collection/components/jump-badge/jump-badge.stories.js +26 -0
- package/dist/collection/components/jump-badge/jump-badge.stories.js.map +1 -0
- package/dist/collection/components/jump-badge/test/jump-badge.e2e.js +10 -0
- package/dist/collection/components/jump-badge/test/jump-badge.e2e.js.map +1 -0
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js +18 -0
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js.map +1 -0
- package/dist/collection/components/jump-button/{jump-button.stories.js → jump-button-filled.stories.js} +12 -10
- package/dist/collection/components/jump-button/jump-button-filled.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button-outline.stories.js +376 -0
- package/dist/collection/components/jump-button/jump-button-outline.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button.js +1 -1
- package/dist/collection/components/jump-card/jump-card-border-radius.stories.js +114 -0
- package/dist/collection/components/jump-card/jump-card-border-radius.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-border.stories.js +113 -0
- package/dist/collection/components/jump-card/jump-card-border.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-boxed.stories.js +114 -0
- package/dist/collection/components/jump-card/jump-card-boxed.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-horizontal.stories.js +114 -0
- package/dist/collection/components/jump-card/jump-card-horizontal.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-media-rounded.stories.js +125 -0
- package/dist/collection/components/jump-card/jump-card-media-rounded.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-no-image.stories.js +112 -0
- package/dist/collection/components/jump-card/jump-card-no-image.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-shadow.stories.js +113 -0
- package/dist/collection/components/jump-card/jump-card-shadow.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-top-border-content-radius.stories.js +114 -0
- package/dist/collection/components/jump-card/jump-card-top-border-content-radius.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card-video.stories.js +111 -0
- package/dist/collection/components/jump-card/jump-card-video.stories.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card.css +99 -0
- package/dist/collection/components/jump-card/jump-card.js +232 -0
- package/dist/collection/components/jump-card/jump-card.js.map +1 -0
- package/dist/collection/components/jump-card/jump-card.stories.js +113 -0
- package/dist/collection/components/jump-card/jump-card.stories.js.map +1 -0
- package/dist/collection/components/jump-card/test/jump-card.e2e.js +10 -0
- package/dist/collection/components/jump-card/test/jump-card.e2e.js.map +1 -0
- package/dist/collection/components/jump-card/test/jump-card.spec.js +18 -0
- package/dist/collection/components/jump-card/test/jump-card.spec.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js +94 -0
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js.map +1 -0
- package/dist/collection/components/jump-pagination/{jump-pagination.stories.js → jump-pagination-products.stories.js} +18 -18
- package/dist/collection/components/jump-pagination/jump-pagination-products.stories.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js +3 -3
- package/dist/components/jump-badge.d.ts +11 -0
- package/dist/components/jump-badge.js +40 -0
- package/dist/components/jump-badge.js.map +1 -0
- package/dist/components/jump-button.js +1 -1
- package/dist/components/jump-card.d.ts +11 -0
- package/dist/components/jump-card.js +59 -0
- package/dist/components/jump-card.js.map +1 -0
- package/dist/components/jump-pagination.js +3 -3
- package/dist/esm/{index-b0176170.js → index-7feee8ea.js} +25 -4
- package/dist/esm/index-7feee8ea.js.map +1 -0
- package/dist/esm/jump-badge.entry.js +20 -0
- package/dist/esm/jump-badge.entry.js.map +1 -0
- package/dist/esm/jump-button.entry.js +2 -2
- package/dist/esm/jump-card.entry.js +30 -0
- package/dist/esm/jump-card.entry.js.map +1 -0
- 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 +1 -1
- package/dist/esm/jump-pagination.entry.js +4 -4
- 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-7cfed9c6.entry.js +2 -0
- package/dist/jump-design-system/p-7cfed9c6.entry.js.map +1 -0
- package/dist/jump-design-system/{p-0d2b55a8.entry.js → p-8ec7e589.entry.js} +2 -2
- package/dist/jump-design-system/p-99238e3f.entry.js +2 -0
- package/dist/jump-design-system/p-99238e3f.entry.js.map +1 -0
- package/dist/jump-design-system/{p-c34f0f2c.entry.js → p-9fd6e0a0.entry.js} +2 -2
- package/dist/jump-design-system/{p-3cbc3a68.entry.js → p-bc02e346.entry.js} +2 -2
- package/dist/jump-design-system/p-c560071a.js +3 -0
- package/dist/jump-design-system/p-c560071a.js.map +1 -0
- package/dist/jump-design-system-elements.json +78 -0
- package/dist/types/components/jump-badge/jump-badge.d.ts +11 -0
- package/dist/types/components/jump-badge/jump-badge.stories.d.ts +19 -0
- package/dist/types/components/jump-button/jump-button-outline.stories.d.ts +164 -0
- package/dist/types/components/jump-card/jump-card-border-radius.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card-border.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card-boxed.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card-horizontal.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card-media-rounded.stories.d.ts +79 -0
- package/dist/types/components/jump-card/jump-card-no-image.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card-shadow.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card-top-border-content-radius.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card-video.stories.d.ts +77 -0
- package/dist/types/components/jump-card/jump-card.d.ts +47 -0
- package/dist/types/components/jump-card/jump-card.stories.d.ts +77 -0
- package/dist/types/components/jump-pagination/jump-pagination-pages.stories.d.ts +69 -0
- package/dist/types/components/jump-pagination/{jump-pagination.stories.d.ts → jump-pagination-products.stories.d.ts} +0 -2
- package/dist/types/components.d.ts +130 -0
- package/package.json +1 -1
- package/readme.md +4 -3
- package/dist/cjs/index-46644e39.js.map +0 -1
- package/dist/collection/components/jump-button/jump-button.stories.js.map +0 -1
- package/dist/collection/components/jump-pagination/jump-pagination.stories.js.map +0 -1
- package/dist/esm/index-b0176170.js.map +0 -1
- package/dist/jump-design-system/p-68bce598.js +0 -3
- package/dist/jump-design-system/p-68bce598.js.map +0 -1
- /package/dist/jump-design-system/{p-0d2b55a8.entry.js.map → p-8ec7e589.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-c34f0f2c.entry.js.map → p-9fd6e0a0.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-3cbc3a68.entry.js.map → p-bc02e346.entry.js.map} +0 -0
- /package/dist/types/components/jump-button/{jump-button.stories.d.ts → jump-button-filled.stories.d.ts} +0 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class AppCard {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.horizontal = false;
|
|
5
|
+
this.dark = false;
|
|
6
|
+
this.shadow = undefined;
|
|
7
|
+
this.border = undefined;
|
|
8
|
+
this.borderRadius = false;
|
|
9
|
+
this.topBorderContentRadius = false;
|
|
10
|
+
this.boxed = false;
|
|
11
|
+
this.roundedMedia = false;
|
|
12
|
+
this.imgSrc = '';
|
|
13
|
+
this.imgAlt = '';
|
|
14
|
+
this.videoSrc = '';
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (h(Host, { key: 'a1f0752a89731d2f493060b79548fa69e99e1e68', 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: 'a7d7a20a7a5960f3fab3d417d224dd711d119e0b', class: "Content" }, h("slot", { key: '7667cd1ea36b6f2115174f0fa39a6368bc020b16', name: "body" }), h("slot", { key: 'bbaded488f7b0603a9aa19e1549ba41e524ad322', name: "footer" }))));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "jump-card"; }
|
|
21
|
+
static get originalStyleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["jump-card.scss"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get styleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["jump-card.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get properties() {
|
|
32
|
+
return {
|
|
33
|
+
"horizontal": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "boolean",
|
|
38
|
+
"resolved": "boolean",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": "Indicates if the card is horizontal"
|
|
46
|
+
},
|
|
47
|
+
"attribute": "horizontal",
|
|
48
|
+
"reflect": true,
|
|
49
|
+
"defaultValue": "false"
|
|
50
|
+
},
|
|
51
|
+
"dark": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "boolean",
|
|
56
|
+
"resolved": "boolean",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": "Indicates if the card is horizontal"
|
|
64
|
+
},
|
|
65
|
+
"attribute": "dark",
|
|
66
|
+
"reflect": true,
|
|
67
|
+
"defaultValue": "false"
|
|
68
|
+
},
|
|
69
|
+
"shadow": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "boolean",
|
|
74
|
+
"resolved": "boolean",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": "Indicates if card has shadow"
|
|
82
|
+
},
|
|
83
|
+
"attribute": "shadow",
|
|
84
|
+
"reflect": true
|
|
85
|
+
},
|
|
86
|
+
"border": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "boolean",
|
|
91
|
+
"resolved": "boolean",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": "Indicates if card has borders"
|
|
99
|
+
},
|
|
100
|
+
"attribute": "border",
|
|
101
|
+
"reflect": true
|
|
102
|
+
},
|
|
103
|
+
"borderRadius": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"mutable": false,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "boolean",
|
|
108
|
+
"resolved": "boolean",
|
|
109
|
+
"references": {}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": false,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [],
|
|
115
|
+
"text": "Indicates if borders of the entire card are rounded"
|
|
116
|
+
},
|
|
117
|
+
"attribute": "border-radius",
|
|
118
|
+
"reflect": true,
|
|
119
|
+
"defaultValue": "false"
|
|
120
|
+
},
|
|
121
|
+
"topBorderContentRadius": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "boolean",
|
|
126
|
+
"resolved": "boolean",
|
|
127
|
+
"references": {}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": false,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [],
|
|
133
|
+
"text": "Indicates if border top of the body is rounded; Not compatible with boxed"
|
|
134
|
+
},
|
|
135
|
+
"attribute": "top-border-content-radius",
|
|
136
|
+
"reflect": true,
|
|
137
|
+
"defaultValue": "false"
|
|
138
|
+
},
|
|
139
|
+
"boxed": {
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "boolean",
|
|
144
|
+
"resolved": "boolean",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Indicates if media has padding; Not compatible with roundedMedia"
|
|
152
|
+
},
|
|
153
|
+
"attribute": "boxed",
|
|
154
|
+
"reflect": true,
|
|
155
|
+
"defaultValue": "false"
|
|
156
|
+
},
|
|
157
|
+
"roundedMedia": {
|
|
158
|
+
"type": "boolean",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "boolean",
|
|
162
|
+
"resolved": "boolean",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "Indicates if image is rounded and there isnt a bg"
|
|
170
|
+
},
|
|
171
|
+
"attribute": "rounded-media",
|
|
172
|
+
"reflect": true,
|
|
173
|
+
"defaultValue": "false"
|
|
174
|
+
},
|
|
175
|
+
"imgSrc": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "string",
|
|
180
|
+
"resolved": "string",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "Indicates the imgSrc of the card"
|
|
188
|
+
},
|
|
189
|
+
"attribute": "img-src",
|
|
190
|
+
"reflect": true,
|
|
191
|
+
"defaultValue": "''"
|
|
192
|
+
},
|
|
193
|
+
"imgAlt": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"mutable": false,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "string",
|
|
198
|
+
"resolved": "string",
|
|
199
|
+
"references": {}
|
|
200
|
+
},
|
|
201
|
+
"required": false,
|
|
202
|
+
"optional": false,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": "Indicates the img's alt of the card"
|
|
206
|
+
},
|
|
207
|
+
"attribute": "img-alt",
|
|
208
|
+
"reflect": true,
|
|
209
|
+
"defaultValue": "''"
|
|
210
|
+
},
|
|
211
|
+
"videoSrc": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "string",
|
|
216
|
+
"resolved": "string",
|
|
217
|
+
"references": {}
|
|
218
|
+
},
|
|
219
|
+
"required": false,
|
|
220
|
+
"optional": false,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": "Indicates the videoSrc of the card"
|
|
224
|
+
},
|
|
225
|
+
"attribute": "video-src",
|
|
226
|
+
"reflect": true,
|
|
227
|
+
"defaultValue": "''"
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=jump-card.js.map
|
|
@@ -0,0 +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;;0BAI2B,KAAK;oBAKX,KAAK;;;4BAeG,KAAK;sCAKK,KAAK;qBAKtB,KAAK;4BAKE,KAAK;sBAKZ,EAAE;sBAKF,EAAE;wBAKA,EAAE;;IAE5C,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({reflect: true}) horizontal: boolean = false;\n\n /**\n * Indicates if the card is horizontal\n */\n @Prop({reflect: true}) dark: boolean = false;\n\n /**\n * Indicates if card has shadow\n */\n @Prop({reflect: true}) shadow: boolean;\n\n /**\n * Indicates if card has borders\n */\n @Prop({reflect: true}) border: boolean;\n\n /**\n * Indicates if borders of the entire card are rounded\n */\n @Prop({reflect: true}) borderRadius: boolean = false;\n\n /**\n * Indicates if border top of the body is rounded; Not compatible with boxed\n */\n @Prop({reflect: true}) topBorderContentRadius: boolean = false;\n\n /**\n * Indicates if media has padding; Not compatible with roundedMedia\n */\n @Prop({reflect: true}) boxed: boolean = false;\n\n /**\n * Indicates if image is rounded and there isnt a bg\n */\n @Prop({reflect: true}) roundedMedia: boolean = false;\n\n /**\n * Indicates the imgSrc of the card\n */\n @Prop({reflect: true}) imgSrc: string = '';\n\n /**\n * Indicates the img's alt of the card\n */\n @Prop({reflect: true}) imgAlt: string = '';\n\n /**\n * Indicates the videoSrc of the card\n */\n @Prop({reflect: true}) 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"]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Card/BaseCard',
|
|
3
|
+
tags: ['autodocs'],
|
|
4
|
+
argTypes: {
|
|
5
|
+
horizontal: {
|
|
6
|
+
name: 'Direzione della card',
|
|
7
|
+
description: 'Di default è verticale, se si imposta horizontal su true diventa Orizzontale',
|
|
8
|
+
control: 'boolean',
|
|
9
|
+
defaultValue: false
|
|
10
|
+
},
|
|
11
|
+
dark: {
|
|
12
|
+
name: 'Card di colore scuro',
|
|
13
|
+
description: 'Di default ha lo sfondo bianco, se si imposta dark su true diventa con sfondo grigio scuro',
|
|
14
|
+
control: 'boolean',
|
|
15
|
+
defaultValue: false
|
|
16
|
+
},
|
|
17
|
+
border: {
|
|
18
|
+
name: 'Card con bordo',
|
|
19
|
+
control: 'boolean',
|
|
20
|
+
defaultValue: false
|
|
21
|
+
},
|
|
22
|
+
shadow: {
|
|
23
|
+
name: 'Card con ombra',
|
|
24
|
+
control: 'boolean',
|
|
25
|
+
defaultValue: false
|
|
26
|
+
},
|
|
27
|
+
borderRadius: {
|
|
28
|
+
name: 'Bordi arrotondati',
|
|
29
|
+
description: 'Imposta i bordi della card arrotondati',
|
|
30
|
+
control: 'boolean',
|
|
31
|
+
// if:{
|
|
32
|
+
// arg: 'topBorderContentRadius',
|
|
33
|
+
// eq: false
|
|
34
|
+
// }
|
|
35
|
+
},
|
|
36
|
+
topBorderContentRadius: {
|
|
37
|
+
name: 'Border top Content',
|
|
38
|
+
description: 'Border top del Content (esclusa la sezione media) arrotondato',
|
|
39
|
+
control: 'boolean',
|
|
40
|
+
// if:{
|
|
41
|
+
// arg: 'borderRadius',
|
|
42
|
+
// eq: false
|
|
43
|
+
// }
|
|
44
|
+
},
|
|
45
|
+
boxed: {
|
|
46
|
+
name: 'Boxed',
|
|
47
|
+
description: 'Imposta un padding intorno al media',
|
|
48
|
+
control: 'boolean',
|
|
49
|
+
},
|
|
50
|
+
roundedMedia: {
|
|
51
|
+
name: 'Immagine o Video arrotondati',
|
|
52
|
+
description: 'Imposta l\'immagine o il video arrotondati e senza sfondo',
|
|
53
|
+
control: 'boolean',
|
|
54
|
+
},
|
|
55
|
+
imgSrc: {
|
|
56
|
+
name: 'Url del\'immagine',
|
|
57
|
+
description: 'Url dell\'immagine da visualizzare, si attiva solo se non è presente videoSrc',
|
|
58
|
+
control: 'text',
|
|
59
|
+
if: {
|
|
60
|
+
arg: 'videoSrc',
|
|
61
|
+
exists: false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
imgAlt: {
|
|
65
|
+
name: 'Alt dell\'immagine',
|
|
66
|
+
description: 'Alt dell\'immagine da visualizzare, si attiva solo se è presente imgSrc',
|
|
67
|
+
control: 'text',
|
|
68
|
+
if: {
|
|
69
|
+
arg: 'imgSrc',
|
|
70
|
+
exists: true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
videoSrc: {
|
|
74
|
+
name: 'Url del video',
|
|
75
|
+
description: 'Url del video da visualizzare, si attiva solo se non è presente imgSrc',
|
|
76
|
+
control: 'text',
|
|
77
|
+
if: {
|
|
78
|
+
arg: 'imgSrc',
|
|
79
|
+
exists: false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const Template = (args) => {
|
|
85
|
+
var _a;
|
|
86
|
+
return `<jump-card class="${(_a = args.class) !== null && _a !== void 0 ? _a : ''}"
|
|
87
|
+
${args.videoSrc ? `video-src="${args.videoSrc}"` : ''}
|
|
88
|
+
${args.imgSrc ? `img-src="${args.imgSrc}"` : ''}
|
|
89
|
+
${args.imgAlt ? `img-alt="${args.imgAlt}"` : ''}
|
|
90
|
+
${args.border == true ? 'border' : ''}
|
|
91
|
+
${args.horizontal == true ? 'horizontal' : ''}
|
|
92
|
+
${args.dark == true ? 'dark' : ''}
|
|
93
|
+
${args.borderRadius == true ? 'border-radius' : ''}
|
|
94
|
+
${args.topBorderContentRadius == true ? 'top-border-content-radius' : ''}
|
|
95
|
+
${args.boxed == true ? 'boxed' : ''}
|
|
96
|
+
${args.roundedMedia == true ? 'rounded-media' : ''}
|
|
97
|
+
${args.shadow == true ? 'shadow' : ''}
|
|
98
|
+
>
|
|
99
|
+
<div class="ContentWrapper" slot="body">
|
|
100
|
+
<h3 style="margin-top: 0">Titolo della card</h3>
|
|
101
|
+
<p>Testo della card</p>
|
|
102
|
+
</div>
|
|
103
|
+
<jump-button slot="footer" id="#card" class=" "variant="secondary" size="medium" href="#" target="_self" ariaLabel="sono un bottone" text>
|
|
104
|
+
Scopri di più<jump-icon slot="suffix" name="arrow-right"></jump-icon></jump-button>
|
|
105
|
+
</jump-card>`;
|
|
106
|
+
};
|
|
107
|
+
export const Card = Template.bind({});
|
|
108
|
+
Card.args = {
|
|
109
|
+
imgSrc: 'https://picsum.photos/300/200',
|
|
110
|
+
imgAlt: 'Immagine',
|
|
111
|
+
border: false,
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=jump-card.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-card.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card/jump-card.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,UAAU,EAAE;YACV,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,8EAA8E;YAC3F,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;SACpB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,4FAA4F;YACzG,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;SACpB;QACD,MAAM,EAAC;YACL,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;SACpB;QACD,MAAM,EAAC;YACL,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;SACpB;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,wCAAwC;YACrD,OAAO,EAAE,SAAS;YAClB,OAAO;YACP,mCAAmC;YACnC,cAAc;YACd,IAAI;SACL;QACD,sBAAsB,EAAE;YACtB,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAAE,+DAA+D;YAC5E,OAAO,EAAE,SAAS;YAClB,OAAO;YACP,yBAAyB;YACzB,cAAc;YACd,IAAI;SACL;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,qCAAqC;YAClD,OAAO,EAAE,SAAS;SACnB;QACD,YAAY,EAAE;YACZ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M,CAAC,CAAC,CAAC,EAAE;IAC/B,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;IAChD,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE;IACtE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;IACjC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;IAChD,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;;;;;;;;eAQxB,CAAA;AACf,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACV,MAAM,EAAE,+BAA+B;IACvC,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,KAAK;CACd,CAAC","sourcesContent":["export default {\n title: 'Components/Card/BaseCard',\n tags: ['autodocs'],\n argTypes: {\n horizontal: {\n name: 'Direzione della card',\n description: 'Di default è verticale, se si imposta horizontal su true diventa Orizzontale',\n control: 'boolean',\n defaultValue: false\n },\n dark: {\n name: 'Card di colore scuro',\n description: 'Di default ha lo sfondo bianco, se si imposta dark su true diventa con sfondo grigio scuro',\n control: 'boolean',\n defaultValue: false\n },\n border:{\n name: 'Card con bordo',\n control: 'boolean',\n defaultValue: false\n },\n shadow:{\n name: 'Card con ombra',\n control: 'boolean',\n defaultValue: false\n },\n borderRadius: {\n name: 'Bordi arrotondati',\n description: 'Imposta i bordi della card arrotondati',\n control: 'boolean',\n // if:{\n // arg: 'topBorderContentRadius',\n // eq: false\n // }\n },\n topBorderContentRadius: {\n name: 'Border top Content',\n description: 'Border top del Content (esclusa la sezione media) arrotondato',\n control: 'boolean',\n // if:{\n // arg: 'borderRadius',\n // eq: false\n // }\n },\n boxed: {\n name: 'Boxed',\n description: 'Imposta un padding intorno al media',\n control: 'boolean',\n },\n roundedMedia: {\n name: 'Immagine o Video arrotondati',\n description: 'Imposta l\\'immagine o il video arrotondati e senza sfondo',\n control: 'boolean',\n },\n imgSrc: {\n name: 'Url del\\'immagine',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'Alt dell\\'immagine',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente imgSrc',\n control: 'text',\n if:{\n arg: 'imgSrc',\n exists: true\n }\n },\n videoSrc: {\n name: 'Url del video',\n description: 'Url del video da visualizzare, si attiva solo se non è presente imgSrc',\n control: 'text',\n if:{\n arg: 'imgSrc',\n exists: false\n }\n },\n }\n};\n\nconst Template = (args) => {\n return `<jump-card class=\"${args.class ?? ''}\" \n ${args.videoSrc ? `video-src=\"${args.videoSrc}\"` : ''} \n ${args.imgSrc ? `img-src=\"${args.imgSrc}\"` : ''} \n ${args.imgAlt ? `img-alt=\"${args.imgAlt}\"` : ''} \n ${args.border == true ? 'border' : ''} \n ${args.horizontal == true ? 'horizontal' : ''} \n ${args.dark == true ? 'dark' : ''} \n ${args.borderRadius == true ? 'border-radius' : ''} \n ${args.topBorderContentRadius == true ? 'top-border-content-radius' : ''} \n ${args.boxed == true ? 'boxed' : ''} \n ${args.roundedMedia == true ? 'rounded-media' : ''} \n ${args.shadow == true ? 'shadow' : ''} \n > \n <div class=\"ContentWrapper\" slot=\"body\">\n <h3 style=\"margin-top: 0\">Titolo della card</h3>\n <p>Testo della card</p>\n </div>\n <jump-button slot=\"footer\" id=\"#card\" class=\" \"variant=\"secondary\" size=\"medium\" href=\"#\" target=\"_self\" ariaLabel=\"sono un bottone\" text>\n Scopri di più<jump-icon slot=\"suffix\" name=\"arrow-right\"></jump-icon></jump-button>\n </jump-card>`\n}\n\nexport const Card = Template.bind({});\nCard.args = {\n imgSrc: 'https://picsum.photos/300/200',\n imgAlt: 'Immagine',\n border: false,\n};"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('jump-card', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<jump-card></jump-card>');
|
|
6
|
+
const element = await page.find('jump-card');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=jump-card.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-card.e2e.js","sourceRoot":"","sources":["../../../../src/components/jump-card/test/jump-card.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-card', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<jump-card></jump-card>');\n\n const element = await page.find('jump-card');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { AppCard } from "../jump-card";
|
|
3
|
+
describe('jump-card', () => {
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [AppCard],
|
|
7
|
+
html: `<jump-card></jump-card>`,
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toEqualHtml(`
|
|
10
|
+
<jump-card>
|
|
11
|
+
<mock:shadow-root>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</mock:shadow-root>
|
|
14
|
+
</jump-card>
|
|
15
|
+
`);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=jump-card.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-card.spec.js","sourceRoot":"","sources":["../../../../src/components/jump-card/test/jump-card.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,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,OAAO,CAAC;YACrB,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 { AppCard } from '../jump-card';\n\ndescribe('jump-card', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [AppCard],\n html: `<jump-card></jump-card>`,\n });\n expect(page.root).toEqualHtml(`\n <jump-card>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </jump-card>\n `);\n });\n});\n"]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Pagination/Pages',
|
|
3
|
+
tags: ['autodocs'],
|
|
4
|
+
argTypes: {
|
|
5
|
+
completeVersion: {
|
|
6
|
+
name: 'Versione con selezione di prodotti',
|
|
7
|
+
control: 'boolean',
|
|
8
|
+
description: 'Indica se mostrare la versione con selezione di prodotti'
|
|
9
|
+
},
|
|
10
|
+
showAdditionalChrevrons: {
|
|
11
|
+
name: 'Mostra frecce aggiuntive',
|
|
12
|
+
control: 'boolean',
|
|
13
|
+
description: 'Indica se mostrare le frecce aggiuntive per navigare rapidamente nella prima o ultima pagina. Da preferire con un numero elevato di pagine.'
|
|
14
|
+
},
|
|
15
|
+
firstPage: {
|
|
16
|
+
name: 'Primo elemento',
|
|
17
|
+
control: 'number',
|
|
18
|
+
description: 'Se si tratta di pagination per prodotti, indica il valore min di range di prodotto, altrimenti la prima pagina',
|
|
19
|
+
if: {
|
|
20
|
+
arg: 'completeVersion',
|
|
21
|
+
eq: true
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
currentPage: {
|
|
25
|
+
name: 'Elemento Corrente',
|
|
26
|
+
control: 'number',
|
|
27
|
+
description: 'Se si tratta di pagination per prodotti, indica il valore max di range di prodotto, altrimenti la pagina corrente'
|
|
28
|
+
},
|
|
29
|
+
lastPage: {
|
|
30
|
+
name: 'Ultima pagina',
|
|
31
|
+
control: 'number',
|
|
32
|
+
description: 'Indica l\'ultima pagina',
|
|
33
|
+
if: {
|
|
34
|
+
arg: 'completeVersion',
|
|
35
|
+
eq: false
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
totalElements: {
|
|
39
|
+
name: 'Elementi totali',
|
|
40
|
+
control: 'number',
|
|
41
|
+
description: 'Indica il numero totale di elementi disponibili. ',
|
|
42
|
+
if: {
|
|
43
|
+
arg: 'completeVersion',
|
|
44
|
+
eq: true
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
labelElementsPerPage: {
|
|
48
|
+
name: 'Etichetta elementi per pagina',
|
|
49
|
+
control: 'text',
|
|
50
|
+
description: 'Indica l\'etichetta per gli elementi per pagina',
|
|
51
|
+
if: {
|
|
52
|
+
arg: 'completeVersion',
|
|
53
|
+
eq: true
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
elementsRanges: {
|
|
57
|
+
name: 'Range elementi',
|
|
58
|
+
control: 'multi-select',
|
|
59
|
+
options: [10, 20, 30],
|
|
60
|
+
if: {
|
|
61
|
+
arg: 'completeVersion',
|
|
62
|
+
eq: true
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const Template = (args) => {
|
|
68
|
+
return `<jump-pagination
|
|
69
|
+
current-page="${args.currentPage}"
|
|
70
|
+
first-page="${args.firstPage}"
|
|
71
|
+
last-page="${args.lastPage}"
|
|
72
|
+
total-elements="${args.totalElements}"
|
|
73
|
+
complete-version=${args.completeVersion}
|
|
74
|
+
elements-ranges="${args.elementsRanges}"
|
|
75
|
+
show-additional-chrevrons=${args.showAdditionalChrevrons}>
|
|
76
|
+
</jump-pagination>`;
|
|
77
|
+
};
|
|
78
|
+
export const PaginationPerPagineRidotto = Template.bind({});
|
|
79
|
+
PaginationPerPagineRidotto.args = {
|
|
80
|
+
completeVersion: false,
|
|
81
|
+
showAdditionalChrevrons: false,
|
|
82
|
+
firstPage: 1,
|
|
83
|
+
currentPage: 5,
|
|
84
|
+
lastPage: 10,
|
|
85
|
+
};
|
|
86
|
+
export const PaginationPerPagineCompleto = Template.bind({});
|
|
87
|
+
PaginationPerPagineCompleto.args = {
|
|
88
|
+
completeVersion: false,
|
|
89
|
+
showAdditionalChrevrons: true,
|
|
90
|
+
firstPage: 1,
|
|
91
|
+
currentPage: 5,
|
|
92
|
+
lastPage: 10,
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=jump-pagination-pages.stories.js.map
|
|
@@ -0,0 +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,eAAe,EAAE;YACf,IAAI,EAAE,oCAAoC;YAC1C,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,0DAA0D;SACxE;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,6IAA6I;SAC3J;QACD,SAAS,EAAE;YACT,IAAI,EAAE,gBAAgB;YACtB,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,mBAAmB;YACzB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,mHAAmH;SACjI;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,eAAe;YACrB,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,iBAAiB;YACvB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,mDAAmD;YAChE,EAAE,EAAE;gBACF,GAAG,EAAE,iBAAiB;gBACtB,EAAE,EAAE,IAAI;aACT;SACF;QACD,oBAAoB,EAAE;YACpB,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,iDAAiD;YAC5D,EAAE,EAAE;gBACJ,GAAG,EAAE,iBAAiB;gBACtB,EAAE,EAAE,IAAI;aACT;SACF;QACD,cAAc,EAAE;YACd,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,cAAc;YACvB,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;YACrB,EAAE,EAAE;gBACF,GAAG,EAAE,iBAAiB;gBACtB,EAAE,EAAE,IAAI;aACT;SACF;KAIF;CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACxB,OAAO;8BACqB,IAAI,CAAC,WAAW;4BAClB,IAAI,CAAC,SAAS;2BACf,IAAI,CAAC,QAAQ;gCACR,IAAI,CAAC,aAAa;iCACjB,IAAI,CAAC,eAAe;iCACpB,IAAI,CAAC,cAAc;0CACV,IAAI,CAAC,uBAAuB;6BACzC,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE5D,0BAA0B,CAAC,IAAI,GAAG;IAChC,eAAe,EAAE,KAAK;IACtB,uBAAuB,EAAE,KAAK;IAC9B,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;IACd,QAAQ,EAAC,EAAE;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE7D,2BAA2B,CAAC,IAAI,GAAG;IACjC,eAAe,EAAE,KAAK;IACtB,uBAAuB,EAAE,IAAI;IAC7B,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;IACd,QAAQ,EAAC,EAAE;CACZ,CAAC","sourcesContent":["export default {\n title: 'Components/Pagination/Pages',\n tags: ['autodocs'],\n argTypes: {\n completeVersion: {\n name: 'Versione con selezione di prodotti',\n control: 'boolean',\n description: 'Indica se mostrare la versione con selezione di prodotti'\n },\n showAdditionalChrevrons: {\n name: 'Mostra frecce aggiuntive',\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: 'Primo elemento',\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 currentPage: {\n name: 'Elemento Corrente',\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: 'Ultima pagina',\n control: 'number',\n description: 'Indica l\\'ultima pagina',\n if: {\n arg: 'completeVersion',\n eq: false\n },\n },\n totalElements: {\n name: 'Elementi totali',\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: 'Etichetta elementi per pagina',\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: 'Range elementi',\n control: 'multi-select', \n options: [10, 20, 30],\n if: {\n arg: 'completeVersion',\n eq: true\n }, \n },\n\n \n \n }\n};\n\nconst Template = (args) => {\n return `<jump-pagination \n current-page=\"${args.currentPage}\" \n first-page=\"${args.firstPage}\" \n last-page=\"${args.lastPage}\" \n total-elements=\"${args.totalElements}\"\n complete-version=${args.completeVersion} \n elements-ranges=\"${args.elementsRanges}\"\n show-additional-chrevrons=${args.showAdditionalChrevrons}>\n </jump-pagination>`;\n};\n\nexport const PaginationPerPagineRidotto = Template.bind({});\n\nPaginationPerPagineRidotto.args = {\n completeVersion: false,\n showAdditionalChrevrons: false,\n firstPage: 1,\n currentPage: 5,\n lastPage:10,\n};\n\nexport const PaginationPerPagineCompleto = Template.bind({});\n\nPaginationPerPagineCompleto.args = {\n completeVersion: false,\n showAdditionalChrevrons: true,\n firstPage: 1,\n currentPage: 5,\n lastPage:10,\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
title: 'Components/
|
|
2
|
+
title: 'Components/Pagination/Products',
|
|
3
3
|
tags: ['autodocs'],
|
|
4
4
|
argTypes: {
|
|
5
5
|
completeVersion: {
|
|
@@ -97,20 +97,20 @@ PaginationPerProdottiCompleto.args = {
|
|
|
97
97
|
labelElementsPerPage: "Elementi per pagina",
|
|
98
98
|
elementsRanges: [10, 20, 60, 100],
|
|
99
99
|
};
|
|
100
|
-
export const PaginationPerPagineRidotto = Template.bind({});
|
|
101
|
-
PaginationPerPagineRidotto.args = {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
};
|
|
108
|
-
export const PaginationPerPagineCompleto = Template.bind({});
|
|
109
|
-
PaginationPerPagineCompleto.args = {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
};
|
|
116
|
-
//# sourceMappingURL=jump-pagination.stories.js.map
|
|
100
|
+
// export const PaginationPerPagineRidotto = Template.bind({});
|
|
101
|
+
// PaginationPerPagineRidotto.args = {
|
|
102
|
+
// completeVersion: false,
|
|
103
|
+
// showAdditionalChrevrons: false,
|
|
104
|
+
// firstPage: 1,
|
|
105
|
+
// currentPage: 5,
|
|
106
|
+
// lastPage:10,
|
|
107
|
+
// };
|
|
108
|
+
// export const PaginationPerPagineCompleto = Template.bind({});
|
|
109
|
+
// PaginationPerPagineCompleto.args = {
|
|
110
|
+
// completeVersion: false,
|
|
111
|
+
// showAdditionalChrevrons: true,
|
|
112
|
+
// firstPage: 1,
|
|
113
|
+
// currentPage: 5,
|
|
114
|
+
// lastPage:10,
|
|
115
|
+
// };
|
|
116
|
+
//# sourceMappingURL=jump-pagination-products.stories.js.map
|
|
@@ -0,0 +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,eAAe,EAAE;YACf,IA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export default {\n title: 'Components/Pagination/Products',\n tags: ['autodocs'],\n argTypes: {\n completeVersion: {\n name: 'Versione con selezione di prodotti',\n control: 'boolean',\n description: 'Indica se mostrare la versione con selezione di prodotti'\n },\n showAdditionalChrevrons: {\n name: 'Mostra frecce aggiuntive',\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: 'Primo elemento',\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 currentPage: {\n name: 'Elemento Corrente',\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: 'Ultima pagina',\n control: 'number',\n description: 'Indica l\\'ultima pagina',\n if: {\n arg: 'completeVersion',\n eq: false\n },\n },\n totalElements: {\n name: 'Elementi totali',\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: 'Etichetta elementi per pagina',\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: 'Range elementi',\n control: 'multi-select', \n options: [10, 20, 30],\n if: {\n arg: 'completeVersion',\n eq: true\n }, \n },\n\n \n \n }\n};\n\nconst Template = (args) => {\n return `<jump-pagination \n current-page=\"${args.currentPage}\" \n first-page=\"${args.firstPage}\" \n last-page=\"${args.lastPage}\" \n total-elements=\"${args.totalElements}\"\n complete-version=${args.completeVersion} \n elements-ranges=\"${args.elementsRanges}\"\n show-additional-chrevrons=${args.showAdditionalChrevrons}>\n </jump-pagination>`;\n};\n\nexport const PaginationPerProdottiRidotto = Template.bind({});\n\nPaginationPerProdottiRidotto.args = {\n completeVersion: true,\n showAdditionalChrevrons: false,\n firstPage: 1,\n currentPage: 1,\n lastPage:20,\n totalElements: 150,\n labelElementsPerPage: \"Elementi per pagina\",\n elementsRanges: [10, 20, 60, 100],\n};\n\nexport const PaginationPerProdottiCompleto = Template.bind({});\n\nPaginationPerProdottiCompleto.args = {\n completeVersion: true,\n showAdditionalChrevrons: true,\n firstPage: 1,\n currentPage: 1,\n lastPage:20,\n totalElements: 150,\n labelElementsPerPage: \"Elementi per pagina\",\n elementsRanges: [10, 20, 60, 100],\n};\n\n\n// export const PaginationPerPagineRidotto = Template.bind({});\n\n// PaginationPerPagineRidotto.args = {\n// completeVersion: false,\n// showAdditionalChrevrons: false,\n// firstPage: 1,\n// currentPage: 5,\n// lastPage:10,\n// };\n\n// export const PaginationPerPagineCompleto = Template.bind({});\n\n// PaginationPerPagineCompleto.args = {\n// completeVersion: false,\n// showAdditionalChrevrons: true,\n// firstPage: 1,\n// currentPage: 5,\n// lastPage:10,\n// };\n"]}
|
|
@@ -12,11 +12,11 @@ export class JumpPagination {
|
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
14
|
var _a;
|
|
15
|
-
return (h(Host, { key: '
|
|
16
|
-
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", { key: '
|
|
15
|
+
return (h(Host, { key: 'e19fd7770573042573cc19152c02c74054c80ca0', class: "JumpPagination" }, h("div", { key: '293584737d7a7d04e6d35756736f5041e79057bc', class: "JumpPagination__Wrapper" }, this.completeVersion &&
|
|
16
|
+
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", { key: 'abcc46875ebf0e3d6197b964b6ae5fc7d3478bd8', class: "indicators" }, h("div", { key: '4bf7e8c0470eb551389f35ac9325162a01ebdde2', class: "elements" }, this.completeVersion ?
|
|
17
17
|
h("span", null, h("span", null, this.firstPage), " - ", h("span", null, this.currentPage), " di ", h("span", null, this.totalElements))
|
|
18
18
|
:
|
|
19
|
-
h("span", null, h("span", null, this.currentPage), " di ", h("span", null, this.lastPage))), h("div", { key: '
|
|
19
|
+
h("span", null, h("span", null, this.currentPage), " di ", h("span", null, this.lastPage))), h("div", { key: '977288ffe184d14a7bf5b3fe8cb0d252324b303c', class: "arrow" }, this.showAdditionalChrevrons && h("jump-icon", { name: "chevrons-left" }), h("jump-icon", { key: 'b4707986287695a858e70ad2765f2b7e6a3d144c', name: "chevron-left" }), h("jump-icon", { key: '2cbe3824ee94c3d893784ffb78fefff385c714d3', name: "chevron-right" }), this.showAdditionalChrevrons && h("jump-icon", { name: "chevrons-right" }))))));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "jump-pagination"; }
|
|
22
22
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface JumpBadge extends Components.JumpBadge, HTMLElement {}
|
|
4
|
+
export const JumpBadge: {
|
|
5
|
+
prototype: JumpBadge;
|
|
6
|
+
new (): JumpBadge;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|