@jumpgroup/jump-design-system 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-168ed626.js → index-c572276a.js} +5 -1
- package/dist/{esm/index-330d1de1.js.map → cjs/index-c572276a.js.map} +1 -1
- package/dist/cjs/jump-button.cjs.entry.js +28 -0
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-design-system.cjs.js +2 -2
- package/dist/cjs/{app-icon.cjs.entry.js → jump-icon.cjs.entry.js} +5 -5
- package/dist/cjs/jump-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-pagination.cjs.entry.js +34 -0
- package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/app-icon/{app-icon.css → jump-icon.css} +2 -2
- package/dist/collection/components/app-icon/{app-icon.js → jump-icon.js} +4 -4
- package/dist/collection/components/app-icon/jump-icon.js.map +1 -0
- package/dist/collection/components/app-icon/{app-icon.stories.js → jump-icon.stories.js} +2 -2
- package/dist/collection/components/app-icon/jump-icon.stories.js.map +1 -0
- package/dist/collection/components/app-icon/test/jump-icon.e2e.js +10 -0
- package/dist/collection/components/app-icon/test/jump-icon.e2e.js.map +1 -0
- package/dist/collection/components/app-icon/test/{app-icon.spec.js → jump-icon.spec.js} +6 -6
- package/dist/collection/components/app-icon/test/jump-icon.spec.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button.css +107 -0
- package/dist/collection/components/{app-button/app-button.js → jump-button/jump-button.js} +4 -4
- package/dist/collection/components/jump-button/jump-button.js.map +1 -0
- package/dist/collection/components/{app-button/app-button.stories.js → jump-button/jump-button.stories.js} +13 -13
- package/dist/collection/components/jump-button/jump-button.stories.js.map +1 -0
- package/dist/collection/components/jump-button/test/jump-button.e2e.js +10 -0
- package/dist/collection/components/jump-button/test/jump-button.e2e.js.map +1 -0
- package/dist/collection/components/{app-button/test/app-button.spec.js → jump-button/test/jump-button.spec.js} +6 -6
- package/dist/collection/components/jump-button/test/jump-button.spec.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination.css +43 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js +180 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination.stories.js +117 -0
- package/dist/collection/components/jump-pagination/jump-pagination.stories.js.map +1 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js +10 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js.map +1 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js +18 -0
- package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js.map +1 -0
- package/dist/components/{app-button.d.ts → jump-button.d.ts} +4 -4
- package/dist/components/jump-button.js +49 -0
- package/dist/components/jump-button.js.map +1 -0
- package/dist/components/{app-icon.d.ts → jump-icon.d.ts} +4 -4
- package/dist/components/jump-icon.js +8 -0
- package/dist/components/jump-icon.js.map +1 -0
- package/dist/components/{app-icon.js → jump-icon2.js} +10 -13
- package/dist/components/jump-icon2.js.map +1 -0
- package/dist/components/jump-pagination.d.ts +11 -0
- package/dist/components/jump-pagination.js +62 -0
- package/dist/components/jump-pagination.js.map +1 -0
- package/dist/esm/{index-330d1de1.js → index-ad69454c.js} +5 -1
- package/dist/esm/index-ad69454c.js.map +1 -0
- package/dist/esm/jump-button.entry.js +24 -0
- package/dist/esm/jump-button.entry.js.map +1 -0
- package/dist/esm/jump-design-system.js +3 -3
- package/dist/esm/{app-icon.entry.js → jump-icon.entry.js} +5 -5
- package/dist/esm/jump-icon.entry.js.map +1 -0
- package/dist/esm/jump-pagination.entry.js +30 -0
- package/dist/esm/jump-pagination.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/{p-e8515cce.entry.js → p-15ecd712.entry.js} +3 -3
- package/dist/jump-design-system/p-15ecd712.entry.js.map +1 -0
- package/dist/jump-design-system/p-42799645.entry.js +2 -0
- package/dist/jump-design-system/p-42799645.entry.js.map +1 -0
- package/dist/jump-design-system/p-44f459bb.js +3 -0
- package/dist/jump-design-system/p-44f459bb.js.map +1 -0
- package/dist/jump-design-system/p-6ba563bd.entry.js +2 -0
- package/dist/jump-design-system/p-6ba563bd.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +39 -2
- package/dist/types/components/jump-pagination/jump-pagination.d.ts +26 -0
- package/dist/types/components/jump-pagination/jump-pagination.stories.d.ts +71 -0
- package/dist/types/components.d.ts +71 -18
- package/package.json +1 -1
- package/readme.md +23 -61
- package/dist/cjs/app-button.cjs.entry.js +0 -28
- package/dist/cjs/app-button.cjs.entry.js.map +0 -1
- package/dist/cjs/app-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/index-168ed626.js.map +0 -1
- package/dist/collection/components/app-button/app-button.css +0 -107
- package/dist/collection/components/app-button/app-button.js.map +0 -1
- package/dist/collection/components/app-button/app-button.stories.js.map +0 -1
- package/dist/collection/components/app-button/test/app-button.e2e.js +0 -10
- package/dist/collection/components/app-button/test/app-button.e2e.js.map +0 -1
- package/dist/collection/components/app-button/test/app-button.spec.js.map +0 -1
- package/dist/collection/components/app-icon/app-icon.js.map +0 -1
- package/dist/collection/components/app-icon/app-icon.stories.js.map +0 -1
- package/dist/collection/components/app-icon/test/app-icon.e2e.js +0 -10
- package/dist/collection/components/app-icon/test/app-icon.e2e.js.map +0 -1
- package/dist/collection/components/app-icon/test/app-icon.spec.js.map +0 -1
- package/dist/components/app-button.js +0 -49
- package/dist/components/app-button.js.map +0 -1
- package/dist/components/app-icon.js.map +0 -1
- package/dist/esm/app-button.entry.js +0 -24
- package/dist/esm/app-button.entry.js.map +0 -1
- package/dist/esm/app-icon.entry.js.map +0 -1
- package/dist/jump-design-system/p-28b9ffd5.js +0 -3
- package/dist/jump-design-system/p-28b9ffd5.js.map +0 -1
- package/dist/jump-design-system/p-da4d9423.entry.js +0 -2
- package/dist/jump-design-system/p-da4d9423.entry.js.map +0 -1
- package/dist/jump-design-system/p-e8515cce.entry.js.map +0 -1
- /package/dist/types/components/app-icon/{app-icon.d.ts → jump-icon.d.ts} +0 -0
- /package/dist/types/components/app-icon/{app-icon.stories.d.ts → jump-icon.stories.d.ts} +0 -0
- /package/dist/types/components/{app-button/app-button.d.ts → jump-button/jump-button.d.ts} +0 -0
- /package/dist/types/components/{app-button/app-button.stories.d.ts → jump-button/jump-button.stories.d.ts} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 1.1,
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
|
-
"name": "
|
|
5
|
+
"name": "jump-button",
|
|
6
6
|
"description": {
|
|
7
7
|
"kind": "markdown",
|
|
8
8
|
"value": ""
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
"name": "
|
|
53
|
+
"name": "jump-icon",
|
|
54
54
|
"description": {
|
|
55
55
|
"kind": "markdown",
|
|
56
56
|
"value": ""
|
|
@@ -65,6 +65,43 @@
|
|
|
65
65
|
"description": "Name of the icon"
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "jump-pagination",
|
|
71
|
+
"description": {
|
|
72
|
+
"kind": "markdown",
|
|
73
|
+
"value": ""
|
|
74
|
+
},
|
|
75
|
+
"attributes": [
|
|
76
|
+
{
|
|
77
|
+
"name": "complete-version",
|
|
78
|
+
"description": "If true, the component will show the complete version of the pagination, with elements informations"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "current-page",
|
|
82
|
+
"description": ""
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "first-page",
|
|
86
|
+
"description": "Indicates the first page/product of the list"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "label-elements-per-page",
|
|
90
|
+
"description": "Label for the elements per page select"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "last-page",
|
|
94
|
+
"description": ""
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "show-additional-chrevrons",
|
|
98
|
+
"description": ""
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "total-elements",
|
|
102
|
+
"description": ""
|
|
103
|
+
}
|
|
104
|
+
]
|
|
68
105
|
}
|
|
69
106
|
]
|
|
70
107
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare class JumpPagination {
|
|
2
|
+
totalElements: number;
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
currentPage: number;
|
|
7
|
+
lastPage: number;
|
|
8
|
+
/**
|
|
9
|
+
* Label for the elements per page select
|
|
10
|
+
*/
|
|
11
|
+
labelElementsPerPage: string;
|
|
12
|
+
/**
|
|
13
|
+
* Values for the elements per page select
|
|
14
|
+
*/
|
|
15
|
+
elementsRanges: Array<number>;
|
|
16
|
+
/**
|
|
17
|
+
* Indicates the first page/product of the list
|
|
18
|
+
*/
|
|
19
|
+
firstPage: number;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the component will show the complete version of the pagination, with elements informations
|
|
22
|
+
*/
|
|
23
|
+
completeVersion: boolean;
|
|
24
|
+
showAdditionalChrevrons: boolean;
|
|
25
|
+
render(): any;
|
|
26
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: string[];
|
|
4
|
+
argTypes: {
|
|
5
|
+
completeVersion: {
|
|
6
|
+
name: string;
|
|
7
|
+
control: string;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
showAdditionalChrevrons: {
|
|
11
|
+
name: string;
|
|
12
|
+
control: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
firstPage: {
|
|
16
|
+
name: string;
|
|
17
|
+
control: string;
|
|
18
|
+
description: string;
|
|
19
|
+
if: {
|
|
20
|
+
arg: string;
|
|
21
|
+
eq: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
currentPage: {
|
|
25
|
+
name: string;
|
|
26
|
+
control: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
lastPage: {
|
|
30
|
+
name: string;
|
|
31
|
+
control: string;
|
|
32
|
+
description: string;
|
|
33
|
+
if: {
|
|
34
|
+
arg: string;
|
|
35
|
+
eq: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
totalElements: {
|
|
39
|
+
name: string;
|
|
40
|
+
control: string;
|
|
41
|
+
description: string;
|
|
42
|
+
if: {
|
|
43
|
+
arg: string;
|
|
44
|
+
eq: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
labelElementsPerPage: {
|
|
48
|
+
name: string;
|
|
49
|
+
control: string;
|
|
50
|
+
description: string;
|
|
51
|
+
if: {
|
|
52
|
+
arg: string;
|
|
53
|
+
eq: boolean;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
elementsRanges: {
|
|
57
|
+
name: string;
|
|
58
|
+
control: string;
|
|
59
|
+
options: number[];
|
|
60
|
+
if: {
|
|
61
|
+
arg: string;
|
|
62
|
+
eq: boolean;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export default _default;
|
|
68
|
+
export declare const PaginationPerProdottiRidotto: any;
|
|
69
|
+
export declare const PaginationPerProdottiCompleto: any;
|
|
70
|
+
export declare const PaginationPerPagineRidotto: any;
|
|
71
|
+
export declare const PaginationPerPagineCompleto: any;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
|
-
interface
|
|
9
|
+
interface JumpButton {
|
|
10
10
|
/**
|
|
11
11
|
* Set the button as disabled
|
|
12
12
|
*/
|
|
@@ -36,7 +36,7 @@ export namespace Components {
|
|
|
36
36
|
*/
|
|
37
37
|
"variant": 'primary'|'secondary'|'tertiary';
|
|
38
38
|
}
|
|
39
|
-
interface
|
|
39
|
+
interface JumpIcon {
|
|
40
40
|
/**
|
|
41
41
|
* Additional classes
|
|
42
42
|
*/
|
|
@@ -46,27 +46,56 @@ export namespace Components {
|
|
|
46
46
|
*/
|
|
47
47
|
"name": string;
|
|
48
48
|
}
|
|
49
|
+
interface JumpPagination {
|
|
50
|
+
/**
|
|
51
|
+
* If true, the component will show the complete version of the pagination, with elements informations
|
|
52
|
+
*/
|
|
53
|
+
"completeVersion": boolean;
|
|
54
|
+
"currentPage": number;
|
|
55
|
+
/**
|
|
56
|
+
* Values for the elements per page select
|
|
57
|
+
*/
|
|
58
|
+
"elementsRanges": Array<number>;
|
|
59
|
+
/**
|
|
60
|
+
* Indicates the first page/product of the list
|
|
61
|
+
*/
|
|
62
|
+
"firstPage": number;
|
|
63
|
+
/**
|
|
64
|
+
* Label for the elements per page select
|
|
65
|
+
*/
|
|
66
|
+
"labelElementsPerPage": string;
|
|
67
|
+
"lastPage": number;
|
|
68
|
+
"showAdditionalChrevrons": boolean;
|
|
69
|
+
"totalElements": number;
|
|
70
|
+
}
|
|
49
71
|
}
|
|
50
72
|
declare global {
|
|
51
|
-
interface
|
|
73
|
+
interface HTMLJumpButtonElement extends Components.JumpButton, HTMLStencilElement {
|
|
74
|
+
}
|
|
75
|
+
var HTMLJumpButtonElement: {
|
|
76
|
+
prototype: HTMLJumpButtonElement;
|
|
77
|
+
new (): HTMLJumpButtonElement;
|
|
78
|
+
};
|
|
79
|
+
interface HTMLJumpIconElement extends Components.JumpIcon, HTMLStencilElement {
|
|
52
80
|
}
|
|
53
|
-
var
|
|
54
|
-
prototype:
|
|
55
|
-
new ():
|
|
81
|
+
var HTMLJumpIconElement: {
|
|
82
|
+
prototype: HTMLJumpIconElement;
|
|
83
|
+
new (): HTMLJumpIconElement;
|
|
56
84
|
};
|
|
57
|
-
interface
|
|
85
|
+
interface HTMLJumpPaginationElement extends Components.JumpPagination, HTMLStencilElement {
|
|
58
86
|
}
|
|
59
|
-
var
|
|
60
|
-
prototype:
|
|
61
|
-
new ():
|
|
87
|
+
var HTMLJumpPaginationElement: {
|
|
88
|
+
prototype: HTMLJumpPaginationElement;
|
|
89
|
+
new (): HTMLJumpPaginationElement;
|
|
62
90
|
};
|
|
63
91
|
interface HTMLElementTagNameMap {
|
|
64
|
-
"
|
|
65
|
-
"
|
|
92
|
+
"jump-button": HTMLJumpButtonElement;
|
|
93
|
+
"jump-icon": HTMLJumpIconElement;
|
|
94
|
+
"jump-pagination": HTMLJumpPaginationElement;
|
|
66
95
|
}
|
|
67
96
|
}
|
|
68
97
|
declare namespace LocalJSX {
|
|
69
|
-
interface
|
|
98
|
+
interface JumpButton {
|
|
70
99
|
/**
|
|
71
100
|
* Set the button as disabled
|
|
72
101
|
*/
|
|
@@ -96,7 +125,7 @@ declare namespace LocalJSX {
|
|
|
96
125
|
*/
|
|
97
126
|
"variant"?: 'primary'|'secondary'|'tertiary';
|
|
98
127
|
}
|
|
99
|
-
interface
|
|
128
|
+
interface JumpIcon {
|
|
100
129
|
/**
|
|
101
130
|
* Additional classes
|
|
102
131
|
*/
|
|
@@ -106,17 +135,41 @@ declare namespace LocalJSX {
|
|
|
106
135
|
*/
|
|
107
136
|
"name"?: string;
|
|
108
137
|
}
|
|
138
|
+
interface JumpPagination {
|
|
139
|
+
/**
|
|
140
|
+
* If true, the component will show the complete version of the pagination, with elements informations
|
|
141
|
+
*/
|
|
142
|
+
"completeVersion"?: boolean;
|
|
143
|
+
"currentPage"?: number;
|
|
144
|
+
/**
|
|
145
|
+
* Values for the elements per page select
|
|
146
|
+
*/
|
|
147
|
+
"elementsRanges"?: Array<number>;
|
|
148
|
+
/**
|
|
149
|
+
* Indicates the first page/product of the list
|
|
150
|
+
*/
|
|
151
|
+
"firstPage"?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Label for the elements per page select
|
|
154
|
+
*/
|
|
155
|
+
"labelElementsPerPage"?: string;
|
|
156
|
+
"lastPage"?: number;
|
|
157
|
+
"showAdditionalChrevrons"?: boolean;
|
|
158
|
+
"totalElements"?: number;
|
|
159
|
+
}
|
|
109
160
|
interface IntrinsicElements {
|
|
110
|
-
"
|
|
111
|
-
"
|
|
161
|
+
"jump-button": JumpButton;
|
|
162
|
+
"jump-icon": JumpIcon;
|
|
163
|
+
"jump-pagination": JumpPagination;
|
|
112
164
|
}
|
|
113
165
|
}
|
|
114
166
|
export { LocalJSX as JSX };
|
|
115
167
|
declare module "@stencil/core" {
|
|
116
168
|
export namespace JSX {
|
|
117
169
|
interface IntrinsicElements {
|
|
118
|
-
"
|
|
119
|
-
"
|
|
170
|
+
"jump-button": LocalJSX.JumpButton & JSXBase.HTMLAttributes<HTMLJumpButtonElement>;
|
|
171
|
+
"jump-icon": LocalJSX.JumpIcon & JSXBase.HTMLAttributes<HTMLJumpIconElement>;
|
|
172
|
+
"jump-pagination": LocalJSX.JumpPagination & JSXBase.HTMLAttributes<HTMLJumpPaginationElement>;
|
|
120
173
|
}
|
|
121
174
|
}
|
|
122
175
|
}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,71 +1,34 @@
|
|
|
1
1
|
[](https://stenciljs.com)
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Jump Group Design System
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
yarn stencil:watch
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
and, in another terminal
|
|
5
|
+
## To start the project
|
|
6
|
+
To start the Stencil + Storybook project, run the following commands in two separate terminals:
|
|
12
7
|
|
|
13
8
|
```bash
|
|
14
|
-
|
|
15
|
-
yarn
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
# Stencil Component Starter
|
|
20
|
-
|
|
21
|
-
This is a starter project for building a standalone Web Component using Stencil.
|
|
22
|
-
|
|
23
|
-
Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
|
|
24
|
-
|
|
25
|
-
# Stencil
|
|
26
|
-
|
|
27
|
-
Stencil is a compiler for building fast web apps using Web Components.
|
|
28
|
-
|
|
29
|
-
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
|
|
30
|
-
|
|
31
|
-
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
|
|
32
|
-
|
|
33
|
-
## Getting Started
|
|
34
|
-
|
|
35
|
-
To start building a new web component using Stencil, clone this repo to a new directory:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
git clone https://github.com/ionic-team/stencil-component-starter.git my-component
|
|
39
|
-
cd my-component
|
|
40
|
-
git remote rm origin
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
and run:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm install
|
|
47
|
-
npm start
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
To build the component for production, run:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
npm run build
|
|
9
|
+
yarn storybook:start
|
|
10
|
+
yarn stencil:watch
|
|
54
11
|
```
|
|
12
|
+
Pushing to MASTER deploys the changes to [Jump Design System](https://designsystem.jumpgroup.it/).
|
|
13
|
+
If you want to propagate the modification to npm to install the design system components, you need to tag the repository by incrementing the version according to [versioning rules](https://semver.org/)
|
|
55
14
|
|
|
56
|
-
|
|
15
|
+
La repository npm è: https://www.npmjs.com/package/@jumpgroup/jump-design-system
|
|
57
16
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
17
|
+
### Caricare gli stili
|
|
18
|
+
Per visualizzare il design system con i colori correttamente configurati, seguire i passaggi:
|
|
19
|
+
- Da storybook andare alla voce (nella barra sx) "Introduction".
|
|
20
|
+
- Nella schermata "Design system attivi" ci sono tutte le configurazioni di colori disponibili. Scegliere quello di interesse e cliccare sul link presente alla colonna "Url" della tabella.
|
|
21
|
+
- Copiare nell'url appena aperto il percorso a partire da ?path= e incollarlo nell'url del locale.
|
|
22
|
+
es: http://localhost/?path=/docs/tokens-colori--documentation&figma-board=rdyLtvCq162n61XTXFAmWe
|
|
23
|
+
Se non si vedono correttamente gli stili, controllare la sezione Troubleshooting.
|
|
61
24
|
|
|
62
|
-
Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
|
|
63
25
|
|
|
64
26
|
## Naming Components
|
|
27
|
+
When creating new component tags, use `jump` as component name prefix (ex: `<jump-button>`)
|
|
65
28
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
29
|
+
## Notes about component stories
|
|
30
|
+
When passing a `@Prop()` to the component within `nomecomponente.stories.ts`, it is necessary to do so using the notation with `-`.
|
|
31
|
+
So, if the prop inside `nomecomponente.tsx` is `currentPage`, in the story, it should be passed as follows: `current-page="${args.currentPage}"`
|
|
69
32
|
|
|
70
33
|
## Using this component
|
|
71
34
|
|
|
@@ -84,8 +47,7 @@ The first step for all three of these strategies is to [publish to NPM](https://
|
|
|
84
47
|
- Put a script tag similar to this `<script type='module' src='node_modules/my-component/dist/my-component.esm.js'></script>` in the head of your index.html
|
|
85
48
|
- Then you can use the element anywhere in your template, JSX, html etc
|
|
86
49
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- Then you can use the element anywhere in your template, JSX, html etc
|
|
50
|
+
## Troubleshooting
|
|
51
|
+
### Non si vedono gli stili
|
|
52
|
+
Se in locale non si vedono gli stili una volta configurato l'url con il path corretto, potrebbero esserci diversi problemi:
|
|
53
|
+
1) L'api di figma impostata nel file env alla voce FIGMA_API_KEY non è corretta. Ad oggi chiedere a Fabio di verificare la chiave. Una volta inserita nel file env, rilanciare i comandi di start del progetto e andare nel local storage del browser e cancellare figmaBoard e figmaBoardList. Infinite rifare la procedura indicata in **Caricare gli stili**. Eliminare la cache!
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-168ed626.js');
|
|
6
|
-
|
|
7
|
-
const appButtonCss = "app-button button{background-color:transparent;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer}app-button{display:inline-flex;align-items:center;--app-button-color:#ffffff;--app-button-color-disabled:#cbcbcb;--app-button-background:blue;--app-button-background-outline:transparent;--app-button-color-hover:#ffffff;--app-button-background-hover:darkblue;--app-button-border-radius:var(--border-radius-1, 0.1875rem) var(--border-radius-1, 0.1875rem) var(--border-radius-1, 0.1875rem) var(--border-radius-1, 0.1875rem);--app-button-padding:1rem 1.25rem}app-button button{background-color:var(--app-button-background);border-radius:var(--app-button-border-radius);color:var(--app-button-color);position:relative;font-family:var(--ff-primary, \"Arial\"), sans-serif;font-weight:var(--fw-400, 400);font-size:var(--fs-400, 1rem);line-height:var(--lh-400, 1.3);display:flex;align-items:center;gap:var(--app-button-gap, 0.5rem);padding:var(--app-button-padding)}app-button button:hover{background-color:var(--app-button-background-hover);color:var(--app-button-color-hover)}app-button button[data-variant=primary]{--app-button-color:var(--neutral-white);--app-button-background:var(--primary-standard);--app-button-color-hover:var(--neutral-white);--app-button-background-hover:var(--primary-hard)}app-button button[data-variant=secondary]{--app-button-color:var(--neutral-white);--app-button-background:var(--secondary-standard);--app-button-color-hover:var(--neutral-white);--app-button-background-hover:var(--secondary-hard)}app-button button[disabled]{--app-button-background:var(--app-button-color-disabled);--app-button-background-hover:var(--app-button-color-disabled);cursor:not-allowed}app-button button[data-pill]{border-radius:100rem}app-button button[data-size=small]{font-size:var(--fs-300, 0.875rem);line-height:var(--lh-300, 1.2);--app-button-padding:0.5rem 1rem}app-button button[data-size=medium]{font-size:var(--fs-400, 1rem);line-height:var(--lh-400, 1.3)}app-button button[data-size=large]{font-size:var(--fs-500, 1.125rem);line-height:var(--lh-500, 1.4);--app-button-padding:1.125rem 1.5rem}app-button button[data-outline]{background-color:var(--app-button-background-outline);border:1px solid var(--app-button-background);color:var(--app-button-background)}app-button button[data-outline]:hover{background-color:var(--app-button-background-hover);border:1px solid var(--app-button-background-hover);color:var(--app-button-background-hover)}app-button button[data-text]{background-color:transparent;border:none;color:var(--app-button-background);padding:0}app-button button[data-text]:hover{background-color:transparent;border:none;color:var(--app-button-background-hover)}app-button button[data-only-icon]{--app-button-padding:1.125rem}app-button button[data-only-icon][data-size=small]{--app-button-padding:0.5rem}app-button button[data-only-icon][data-size=medium]{--app-button-padding:1rem}app-button button[data-only-icon][data-size=large]{--app-button-padding:1.125rem}";
|
|
8
|
-
|
|
9
|
-
const AppButton = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.disabled = false;
|
|
13
|
-
this.variant = 'primary';
|
|
14
|
-
this.outline = false;
|
|
15
|
-
this.size = 'medium';
|
|
16
|
-
this.pill = false;
|
|
17
|
-
this.text = false;
|
|
18
|
-
this.onlyIcon = false;
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return (index.h(index.Host, null, index.h("button", { "data-variant": this.variant, "data-outline": this.outline, "data-size": this.size, "data-pill": this.pill, "data-text": this.text, "data-only-icon": this.onlyIcon, disabled: this.disabled }, index.h("slot", { name: "prefix" }), !this.onlyIcon && index.h("slot", null), index.h("slot", { name: "suffix" }))));
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
AppButton.style = appButtonCss;
|
|
25
|
-
|
|
26
|
-
exports.app_button = AppButton;
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=app-button.cjs.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"app-button.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,s8FAAs8F;;MCO98F,SAAS;;;oBAIQ,KAAK;mBAKkC,SAAS;mBAKlC,KAAK;gBAKT,QAAQ;gBAKP,KAAK;gBAKL,KAAK;oBAKD,KAAK;;EAEhD,MAAM;IACJ,QACEA,QAACC,UAAI,QACHD,oCAAsB,IAAI,CAAC,OAAO,kBAAgB,IAAI,CAAC,OAAO,eAAa,IAAI,CAAC,IAAI,eAAa,IAAI,CAAC,IAAI,eAAa,IAAI,CAAC,IAAI,oBAAkB,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IACtLA,kBAAM,IAAI,EAAC,QAAQ,GAAQ,EAEzB,CAAC,IAAI,CAAC,QAAQ,IAAIA,qBAAa,EAEjCA,kBAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB,CACJ,EACP;GACH;;;;;;","names":["h","Host"],"sources":["src/components/app-button/app-button.scss?tag=app-button","src/components/app-button/app-button.tsx"],"sourcesContent":["%reset-button {\n background-color: transparent;\n border: none;\n padding: 0;\n margin: 0;\n font: inherit;\n color: inherit;\n cursor: pointer;\n}\n\napp-button {\n display: inline-flex;\n align-items: center;\n --app-button-color: #ffffff;\n --app-button-color-disabled: #cbcbcb;\n --app-button-background: blue;\n --app-button-background-outline: transparent;\n --app-button-color-hover: #ffffff;\n --app-button-background-hover: darkblue;\n --app-button-border-radius: var(--border-radius-1, 0.1875rem) var(--border-radius-1, 0.1875rem) var(--border-radius-1, 0.1875rem) var(--border-radius-1, 0.1875rem);\n --app-button-padding: 1rem 1.25rem;\n\n button {\n @extend %reset-button;\n background-color: var(--app-button-background);\n border-radius: var(--app-button-border-radius);\n color: var(--app-button-color);\n position: relative;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n font-weight: var(--fw-400, 400);\n font-size: var(--fs-400, 1rem);\n line-height: var(--lh-400, 1.3);\n display: flex;\n align-items: center;\n gap: var(--app-button-gap, 0.5rem);\n\n //TODO: internal padding of the button\n padding: var(--app-button-padding);\n\n // TODO: gestire il focus con un outline\n &:hover {\n background-color: var(--app-button-background-hover);\n color: var(--app-button-color-hover);\n }\n\n &[data-variant='primary'] {\n --app-button-color: var(--neutral-white);\n --app-button-background: var(--primary-standard);\n --app-button-color-hover: var(--neutral-white);\n --app-button-background-hover: var(--primary-hard);\n }\n\n &[data-variant='secondary'] {\n --app-button-color: var(--neutral-white);\n --app-button-background: var(--secondary-standard);\n --app-button-color-hover: var(--neutral-white);\n --app-button-background-hover: var(--secondary-hard);\n }\n\n &[disabled] {\n --app-button-background: var(--app-button-color-disabled);\n --app-button-background-hover: var(--app-button-color-disabled);\n cursor: not-allowed;\n }\n\n &[data-pill] {\n border-radius: 100rem;\n }\n\n &[data-size='small'] {\n font-size: var(--fs-300, 0.875rem);\n line-height: var(--lh-300, 1.2);\n --app-button-padding: 0.5rem 1rem;\n }\n\n &[data-size='medium'] {\n font-size: var(--fs-400, 1rem);\n line-height: var(--lh-400, 1.3);\n }\n\n &[data-size='large'] {\n font-size: var(--fs-500, 1.125rem);\n line-height: var(--lh-500, 1.4);\n --app-button-padding: 1.125rem 1.5rem;\n }\n\n &[data-outline] {\n background-color: var(--app-button-background-outline);\n border: 1px solid var(--app-button-background);\n color: var(--app-button-background);\n &:hover {\n background-color: var(--app-button-background-hover);\n border: 1px solid var(--app-button-background-hover);\n color: var(--app-button-background-hover);\n }\n }\n\n &[data-text] {\n background-color: transparent;\n border: none;\n color: var(--app-button-background);\n padding: 0;\n &:hover {\n background-color: transparent;\n border: none;\n color: var(--app-button-background-hover);\n }\n }\n\n &[data-only-icon] {\n --app-button-padding: 1.125rem;\n }\n &[data-only-icon][data-size='small'] {\n --app-button-padding: 0.5rem;\n }\n &[data-only-icon][data-size='medium'] {\n --app-button-padding: 1rem;\n }\n &[data-only-icon][data-size='large'] {\n --app-button-padding: 1.125rem;\n }\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'app-button',\n styleUrl: 'app-button.scss',\n shadow: false,\n})\nexport class AppButton {\n /**\n * Set the button as disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Indicates the variant of the button\n */\n @Prop({reflect: true}) variant: 'primary'|'secondary'|'tertiary' = 'primary';\n\n /**\n * Indicates the button as outline\n */\n @Prop({reflect: true}) outline: boolean = false;\n\n /**\n * Indicates the size of the button\n */\n @Prop({reflect: true}) size: string = 'medium';\n\n /**\n * Indicates the button as pill\n */\n @Prop({reflect: true}) pill: boolean = false;\n\n /**\n * Indicates the button as text\n */\n @Prop({reflect: true}) text: boolean = false;\n\n /**\n * Indicates the button as only icon\n **/\n @Prop({reflect: true}) onlyIcon: boolean = false;\n\n render() {\n return (\n <Host>\n <button data-variant={this.variant} data-outline={this.outline} data-size={this.size} data-pill={this.pill} data-text={this.text} data-only-icon={this.onlyIcon} disabled={this.disabled} >\n <slot name=\"prefix\"></slot>\n {\n !this.onlyIcon && <slot></slot>\n }\n <slot name=\"suffix\"></slot>\n </button>\n </Host>\n );\n }\n\n}\n"],"version":3}
|