@jumpgroup/jump-design-system 0.1.3 → 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.
Files changed (105) hide show
  1. package/dist/cjs/{index-168ed626.js → index-c572276a.js} +5 -1
  2. package/dist/{esm/index-330d1de1.js.map → cjs/index-c572276a.js.map} +1 -1
  3. package/dist/cjs/jump-button.cjs.entry.js +28 -0
  4. package/dist/cjs/jump-button.cjs.entry.js.map +1 -0
  5. package/dist/cjs/jump-design-system.cjs.js +2 -2
  6. package/dist/cjs/{app-icon.cjs.entry.js → jump-icon.cjs.entry.js} +5 -5
  7. package/dist/cjs/jump-icon.cjs.entry.js.map +1 -0
  8. package/dist/cjs/jump-pagination.cjs.entry.js +34 -0
  9. package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -0
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/collection/collection-manifest.json +3 -2
  12. package/dist/collection/components/app-icon/{app-icon.css → jump-icon.css} +2 -2
  13. package/dist/collection/components/app-icon/{app-icon.js → jump-icon.js} +4 -4
  14. package/dist/collection/components/app-icon/jump-icon.js.map +1 -0
  15. package/dist/collection/components/app-icon/{app-icon.stories.js → jump-icon.stories.js} +2 -2
  16. package/dist/collection/components/app-icon/jump-icon.stories.js.map +1 -0
  17. package/dist/collection/components/app-icon/test/jump-icon.e2e.js +10 -0
  18. package/dist/collection/components/app-icon/test/jump-icon.e2e.js.map +1 -0
  19. package/dist/collection/components/app-icon/test/{app-icon.spec.js → jump-icon.spec.js} +6 -6
  20. package/dist/collection/components/app-icon/test/jump-icon.spec.js.map +1 -0
  21. package/dist/collection/components/jump-button/jump-button.css +107 -0
  22. package/dist/collection/components/{app-button/app-button.js → jump-button/jump-button.js} +4 -4
  23. package/dist/collection/components/jump-button/jump-button.js.map +1 -0
  24. package/dist/collection/components/{app-button/app-button.stories.js → jump-button/jump-button.stories.js} +13 -13
  25. package/dist/collection/components/jump-button/jump-button.stories.js.map +1 -0
  26. package/dist/collection/components/jump-button/test/jump-button.e2e.js +10 -0
  27. package/dist/collection/components/jump-button/test/jump-button.e2e.js.map +1 -0
  28. package/dist/collection/components/{app-button/test/app-button.spec.js → jump-button/test/jump-button.spec.js} +6 -6
  29. package/dist/collection/components/jump-button/test/jump-button.spec.js.map +1 -0
  30. package/dist/collection/components/jump-pagination/jump-pagination.css +43 -0
  31. package/dist/collection/components/jump-pagination/jump-pagination.js +180 -0
  32. package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -0
  33. package/dist/collection/components/jump-pagination/jump-pagination.stories.js +117 -0
  34. package/dist/collection/components/jump-pagination/jump-pagination.stories.js.map +1 -0
  35. package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js +10 -0
  36. package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js.map +1 -0
  37. package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js +18 -0
  38. package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js.map +1 -0
  39. package/dist/components/{app-button.d.ts → jump-button.d.ts} +4 -4
  40. package/dist/components/jump-button.js +49 -0
  41. package/dist/components/jump-button.js.map +1 -0
  42. package/dist/components/{app-icon.d.ts → jump-icon.d.ts} +4 -4
  43. package/dist/components/jump-icon.js +8 -0
  44. package/dist/components/jump-icon.js.map +1 -0
  45. package/dist/components/{app-icon.js → jump-icon2.js} +10 -13
  46. package/dist/components/jump-icon2.js.map +1 -0
  47. package/dist/components/jump-pagination.d.ts +11 -0
  48. package/dist/components/jump-pagination.js +62 -0
  49. package/dist/components/jump-pagination.js.map +1 -0
  50. package/dist/esm/{index-330d1de1.js → index-ad69454c.js} +5 -1
  51. package/dist/esm/index-ad69454c.js.map +1 -0
  52. package/dist/esm/jump-button.entry.js +24 -0
  53. package/dist/esm/jump-button.entry.js.map +1 -0
  54. package/dist/esm/jump-design-system.js +3 -3
  55. package/dist/esm/{app-icon.entry.js → jump-icon.entry.js} +5 -5
  56. package/dist/esm/jump-icon.entry.js.map +1 -0
  57. package/dist/esm/jump-pagination.entry.js +30 -0
  58. package/dist/esm/jump-pagination.entry.js.map +1 -0
  59. package/dist/esm/loader.js +3 -3
  60. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  61. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  62. package/dist/jump-design-system/{p-e8515cce.entry.js → p-15ecd712.entry.js} +3 -3
  63. package/dist/jump-design-system/p-15ecd712.entry.js.map +1 -0
  64. package/dist/jump-design-system/p-42799645.entry.js +2 -0
  65. package/dist/jump-design-system/p-42799645.entry.js.map +1 -0
  66. package/dist/jump-design-system/p-44f459bb.js +3 -0
  67. package/dist/jump-design-system/p-44f459bb.js.map +1 -0
  68. package/dist/jump-design-system/p-6ba563bd.entry.js +2 -0
  69. package/dist/jump-design-system/p-6ba563bd.entry.js.map +1 -0
  70. package/dist/jump-design-system-elements.json +39 -2
  71. package/dist/types/components/jump-pagination/jump-pagination.d.ts +26 -0
  72. package/dist/types/components/jump-pagination/jump-pagination.stories.d.ts +71 -0
  73. package/dist/types/components.d.ts +71 -18
  74. package/package.json +1 -1
  75. package/readme.md +23 -61
  76. package/dist/cjs/app-button.cjs.entry.js +0 -28
  77. package/dist/cjs/app-button.cjs.entry.js.map +0 -1
  78. package/dist/cjs/app-icon.cjs.entry.js.map +0 -1
  79. package/dist/cjs/index-168ed626.js.map +0 -1
  80. package/dist/collection/components/app-button/app-button.css +0 -107
  81. package/dist/collection/components/app-button/app-button.js.map +0 -1
  82. package/dist/collection/components/app-button/app-button.stories.js.map +0 -1
  83. package/dist/collection/components/app-button/test/app-button.e2e.js +0 -10
  84. package/dist/collection/components/app-button/test/app-button.e2e.js.map +0 -1
  85. package/dist/collection/components/app-button/test/app-button.spec.js.map +0 -1
  86. package/dist/collection/components/app-icon/app-icon.js.map +0 -1
  87. package/dist/collection/components/app-icon/app-icon.stories.js.map +0 -1
  88. package/dist/collection/components/app-icon/test/app-icon.e2e.js +0 -10
  89. package/dist/collection/components/app-icon/test/app-icon.e2e.js.map +0 -1
  90. package/dist/collection/components/app-icon/test/app-icon.spec.js.map +0 -1
  91. package/dist/components/app-button.js +0 -49
  92. package/dist/components/app-button.js.map +0 -1
  93. package/dist/components/app-icon.js.map +0 -1
  94. package/dist/esm/app-button.entry.js +0 -24
  95. package/dist/esm/app-button.entry.js.map +0 -1
  96. package/dist/esm/app-icon.entry.js.map +0 -1
  97. package/dist/jump-design-system/p-28b9ffd5.js +0 -3
  98. package/dist/jump-design-system/p-28b9ffd5.js.map +0 -1
  99. package/dist/jump-design-system/p-da4d9423.entry.js +0 -2
  100. package/dist/jump-design-system/p-da4d9423.entry.js.map +0 -1
  101. package/dist/jump-design-system/p-e8515cce.entry.js.map +0 -1
  102. /package/dist/types/components/app-icon/{app-icon.d.ts → jump-icon.d.ts} +0 -0
  103. /package/dist/types/components/app-icon/{app-icon.stories.d.ts → jump-icon.stories.d.ts} +0 -0
  104. /package/dist/types/components/{app-button/app-button.d.ts → jump-button/jump-button.d.ts} +0 -0
  105. /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": "app-button",
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": "app-icon",
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 AppButton {
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 AppIcon {
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 HTMLAppButtonElement extends Components.AppButton, HTMLStencilElement {
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 HTMLAppButtonElement: {
54
- prototype: HTMLAppButtonElement;
55
- new (): HTMLAppButtonElement;
81
+ var HTMLJumpIconElement: {
82
+ prototype: HTMLJumpIconElement;
83
+ new (): HTMLJumpIconElement;
56
84
  };
57
- interface HTMLAppIconElement extends Components.AppIcon, HTMLStencilElement {
85
+ interface HTMLJumpPaginationElement extends Components.JumpPagination, HTMLStencilElement {
58
86
  }
59
- var HTMLAppIconElement: {
60
- prototype: HTMLAppIconElement;
61
- new (): HTMLAppIconElement;
87
+ var HTMLJumpPaginationElement: {
88
+ prototype: HTMLJumpPaginationElement;
89
+ new (): HTMLJumpPaginationElement;
62
90
  };
63
91
  interface HTMLElementTagNameMap {
64
- "app-button": HTMLAppButtonElement;
65
- "app-icon": HTMLAppIconElement;
92
+ "jump-button": HTMLJumpButtonElement;
93
+ "jump-icon": HTMLJumpIconElement;
94
+ "jump-pagination": HTMLJumpPaginationElement;
66
95
  }
67
96
  }
68
97
  declare namespace LocalJSX {
69
- interface AppButton {
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 AppIcon {
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
- "app-button": AppButton;
111
- "app-icon": AppIcon;
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
- "app-button": LocalJSX.AppButton & JSXBase.HTMLAttributes<HTMLAppButtonElement>;
119
- "app-icon": LocalJSX.AppIcon & JSXBase.HTMLAttributes<HTMLAppIconElement>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jumpgroup/jump-design-system",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
package/readme.md CHANGED
@@ -1,71 +1,34 @@
1
1
  [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
2
2
 
3
- # To start the project
3
+ # Jump Group Design System
4
4
 
5
- ```bash
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 start:storybook
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
- To run the unit tests for the components, run:
15
+ La repository npm è: https://www.npmjs.com/package/@jumpgroup/jump-design-system
57
16
 
58
- ```bash
59
- npm test
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
- When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
67
-
68
- Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.
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
- ### In a stencil-starter app
88
-
89
- - Run `npm install my-component --save`
90
- - Add an import to the npm packages `import my-component;`
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}