@jumpgroup/jump-design-system 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/{index-168ed626.js → index-46644e39.js} +503 -152
- package/dist/cjs/index-46644e39.js.map +1 -0
- package/dist/cjs/jump-button.cjs.entry.js +35 -0
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-design-system.cjs.js +6 -4
- package/dist/cjs/jump-design-system.cjs.js.map +1 -1
- package/dist/cjs/{app-icon.cjs.entry.js → jump-icon.cjs.entry.js} +22 -33
- package/dist/cjs/jump-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-pagination.cjs.entry.js +35 -0
- package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -4
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/app-icon/{app-icon.css → jump-icon.css} +2 -2
- package/dist/collection/components/app-icon/jump-icon.js +64 -0
- package/dist/collection/components/app-icon/jump-icon.js.map +1 -0
- package/dist/collection/components/app-icon/jump-icon.stories.js +25 -0
- 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/jump-icon.spec.js +18 -0
- 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/jump-button/jump-button.js +270 -0
- package/dist/collection/components/jump-button/jump-button.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button.stories.js +344 -0
- 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/jump-button/test/jump-button.spec.js +18 -0
- 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 +116 -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/collection/utils/utils.js +1 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/collection/utils/utils.spec.js +12 -12
- package/dist/collection/utils/utils.spec.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{app-button.d.ts → jump-button.d.ts} +4 -4
- package/dist/components/jump-button.js +62 -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} +39 -53
- package/dist/components/jump-icon2.js.map +1 -0
- package/dist/components/jump-pagination.d.ts +11 -0
- package/dist/components/jump-pagination.js +63 -0
- package/dist/components/jump-pagination.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/{index-330d1de1.js → index-b0176170.js} +503 -152
- package/dist/esm/index-b0176170.js.map +1 -0
- package/dist/esm/jump-button.entry.js +31 -0
- package/dist/esm/jump-button.entry.js.map +1 -0
- package/dist/esm/jump-design-system.js +7 -5
- package/dist/esm/jump-design-system.js.map +1 -1
- package/dist/esm/{app-icon.entry.js → jump-icon.entry.js} +22 -33
- package/dist/esm/jump-icon.entry.js.map +1 -0
- package/dist/esm/jump-pagination.entry.js +31 -0
- package/dist/esm/jump-pagination.entry.js.map +1 -0
- package/dist/esm/loader.js +7 -5
- package/dist/esm/loader.js.map +1 -1
- 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-0d2b55a8.entry.js +2 -0
- package/dist/jump-design-system/p-0d2b55a8.entry.js.map +1 -0
- package/dist/jump-design-system/{p-e8515cce.entry.js → p-3cbc3a68.entry.js} +3 -3
- package/dist/jump-design-system/p-3cbc3a68.entry.js.map +1 -0
- package/dist/jump-design-system/p-68bce598.js +3 -0
- package/dist/jump-design-system/p-68bce598.js.map +1 -0
- package/dist/jump-design-system/p-9e6ea006.entry.js +2 -0
- package/dist/jump-design-system/p-9e6ea006.entry.js.map +1 -0
- package/dist/jump-design-system/p-e1255160.js +2 -0
- package/dist/jump-design-system/p-e1255160.js.map +1 -0
- package/dist/jump-design-system-elements.json +92 -3
- package/dist/types/components/app-icon/jump-icon.d.ts +12 -0
- package/dist/types/components/app-icon/jump-icon.stories.d.ts +19 -0
- package/dist/types/components/jump-button/jump-button.d.ts +55 -0
- package/dist/types/components/jump-button/jump-button.stories.d.ts +157 -0
- 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 +123 -22
- package/dist/types/stencil-public-runtime.d.ts +46 -5
- package/loader/index.d.ts +1 -1
- package/package.json +2 -2
- package/readme.md +33 -66
- 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 +0 -157
- package/dist/collection/components/app-button/app-button.js.map +0 -1
- package/dist/collection/components/app-button/app-button.stories.js +0 -227
- 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 +0 -18
- package/dist/collection/components/app-button/test/app-button.spec.js.map +0 -1
- package/dist/collection/components/app-icon/app-icon.js +0 -64
- package/dist/collection/components/app-icon/app-icon.js.map +0 -1
- package/dist/collection/components/app-icon/app-icon.stories.js +0 -25
- 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 +0 -18
- 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/esm/index-330d1de1.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-button/app-button.d.ts +0 -31
- package/dist/types/components/app-button/app-button.stories.d.ts +0 -95
- package/dist/types/components/app-icon/app-icon.d.ts +0 -12
- package/dist/types/components/app-icon/app-icon.stories.d.ts +0 -19
|
@@ -6,11 +6,23 @@
|
|
|
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
|
+
* Indicates the value of text alternative to an element that has no visible text on the screen
|
|
12
|
+
*/
|
|
13
|
+
"ariaLabel": string;
|
|
14
|
+
/**
|
|
15
|
+
* Set the button as disabled; Vale solo per i bottoni
|
|
12
16
|
*/
|
|
13
17
|
"disabled": boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates if button becames a anchor
|
|
20
|
+
*/
|
|
21
|
+
"href": string;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates the name that the sender button will send
|
|
24
|
+
*/
|
|
25
|
+
"name": string;
|
|
14
26
|
/**
|
|
15
27
|
* Indicates the button as only icon
|
|
16
28
|
*/
|
|
@@ -27,16 +39,28 @@ export namespace Components {
|
|
|
27
39
|
* Indicates the size of the button
|
|
28
40
|
*/
|
|
29
41
|
"size": string;
|
|
42
|
+
/**
|
|
43
|
+
* Indicates the type of anchor's target
|
|
44
|
+
*/
|
|
45
|
+
"target": '_blank' | '_parent' | '_self' | '_top';
|
|
30
46
|
/**
|
|
31
47
|
* Indicates the button as text
|
|
32
48
|
*/
|
|
33
49
|
"text": boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Indicates type button
|
|
52
|
+
*/
|
|
53
|
+
"type": 'button'|'submit'|'reset';
|
|
54
|
+
/**
|
|
55
|
+
* Indicates the value that the sender button will send
|
|
56
|
+
*/
|
|
57
|
+
"value": string;
|
|
34
58
|
/**
|
|
35
59
|
* Indicates the variant of the button
|
|
36
60
|
*/
|
|
37
|
-
"variant": 'primary'|'secondary'|'tertiary';
|
|
61
|
+
"variant": 'primary'|'secondary'|'tertiary'|'neutral';
|
|
38
62
|
}
|
|
39
|
-
interface
|
|
63
|
+
interface JumpIcon {
|
|
40
64
|
/**
|
|
41
65
|
* Additional classes
|
|
42
66
|
*/
|
|
@@ -46,31 +70,72 @@ export namespace Components {
|
|
|
46
70
|
*/
|
|
47
71
|
"name": string;
|
|
48
72
|
}
|
|
73
|
+
interface JumpPagination {
|
|
74
|
+
/**
|
|
75
|
+
* If true, the component will show the complete version of the pagination, with elements informations
|
|
76
|
+
*/
|
|
77
|
+
"completeVersion": boolean;
|
|
78
|
+
"currentPage": number;
|
|
79
|
+
/**
|
|
80
|
+
* Values for the elements per page select
|
|
81
|
+
*/
|
|
82
|
+
"elementsRanges": Array<number>;
|
|
83
|
+
/**
|
|
84
|
+
* Indicates the first page/product of the list
|
|
85
|
+
*/
|
|
86
|
+
"firstPage": number;
|
|
87
|
+
/**
|
|
88
|
+
* Label for the elements per page select
|
|
89
|
+
*/
|
|
90
|
+
"labelElementsPerPage": string;
|
|
91
|
+
"lastPage": number;
|
|
92
|
+
"showAdditionalChrevrons": boolean;
|
|
93
|
+
"totalElements": number;
|
|
94
|
+
}
|
|
49
95
|
}
|
|
50
96
|
declare global {
|
|
51
|
-
interface
|
|
97
|
+
interface HTMLJumpButtonElement extends Components.JumpButton, HTMLStencilElement {
|
|
98
|
+
}
|
|
99
|
+
var HTMLJumpButtonElement: {
|
|
100
|
+
prototype: HTMLJumpButtonElement;
|
|
101
|
+
new (): HTMLJumpButtonElement;
|
|
102
|
+
};
|
|
103
|
+
interface HTMLJumpIconElement extends Components.JumpIcon, HTMLStencilElement {
|
|
52
104
|
}
|
|
53
|
-
var
|
|
54
|
-
prototype:
|
|
55
|
-
new ():
|
|
105
|
+
var HTMLJumpIconElement: {
|
|
106
|
+
prototype: HTMLJumpIconElement;
|
|
107
|
+
new (): HTMLJumpIconElement;
|
|
56
108
|
};
|
|
57
|
-
interface
|
|
109
|
+
interface HTMLJumpPaginationElement extends Components.JumpPagination, HTMLStencilElement {
|
|
58
110
|
}
|
|
59
|
-
var
|
|
60
|
-
prototype:
|
|
61
|
-
new ():
|
|
111
|
+
var HTMLJumpPaginationElement: {
|
|
112
|
+
prototype: HTMLJumpPaginationElement;
|
|
113
|
+
new (): HTMLJumpPaginationElement;
|
|
62
114
|
};
|
|
63
115
|
interface HTMLElementTagNameMap {
|
|
64
|
-
"
|
|
65
|
-
"
|
|
116
|
+
"jump-button": HTMLJumpButtonElement;
|
|
117
|
+
"jump-icon": HTMLJumpIconElement;
|
|
118
|
+
"jump-pagination": HTMLJumpPaginationElement;
|
|
66
119
|
}
|
|
67
120
|
}
|
|
68
121
|
declare namespace LocalJSX {
|
|
69
|
-
interface
|
|
122
|
+
interface JumpButton {
|
|
123
|
+
/**
|
|
124
|
+
* Indicates the value of text alternative to an element that has no visible text on the screen
|
|
125
|
+
*/
|
|
126
|
+
"ariaLabel"?: string;
|
|
70
127
|
/**
|
|
71
|
-
* Set the button as disabled
|
|
128
|
+
* Set the button as disabled; Vale solo per i bottoni
|
|
72
129
|
*/
|
|
73
130
|
"disabled"?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Indicates if button becames a anchor
|
|
133
|
+
*/
|
|
134
|
+
"href"?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Indicates the name that the sender button will send
|
|
137
|
+
*/
|
|
138
|
+
"name"?: string;
|
|
74
139
|
/**
|
|
75
140
|
* Indicates the button as only icon
|
|
76
141
|
*/
|
|
@@ -87,16 +152,28 @@ declare namespace LocalJSX {
|
|
|
87
152
|
* Indicates the size of the button
|
|
88
153
|
*/
|
|
89
154
|
"size"?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Indicates the type of anchor's target
|
|
157
|
+
*/
|
|
158
|
+
"target"?: '_blank' | '_parent' | '_self' | '_top';
|
|
90
159
|
/**
|
|
91
160
|
* Indicates the button as text
|
|
92
161
|
*/
|
|
93
162
|
"text"?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Indicates type button
|
|
165
|
+
*/
|
|
166
|
+
"type"?: 'button'|'submit'|'reset';
|
|
167
|
+
/**
|
|
168
|
+
* Indicates the value that the sender button will send
|
|
169
|
+
*/
|
|
170
|
+
"value"?: string;
|
|
94
171
|
/**
|
|
95
172
|
* Indicates the variant of the button
|
|
96
173
|
*/
|
|
97
|
-
"variant"?: 'primary'|'secondary'|'tertiary';
|
|
174
|
+
"variant"?: 'primary'|'secondary'|'tertiary'|'neutral';
|
|
98
175
|
}
|
|
99
|
-
interface
|
|
176
|
+
interface JumpIcon {
|
|
100
177
|
/**
|
|
101
178
|
* Additional classes
|
|
102
179
|
*/
|
|
@@ -106,17 +183,41 @@ declare namespace LocalJSX {
|
|
|
106
183
|
*/
|
|
107
184
|
"name"?: string;
|
|
108
185
|
}
|
|
186
|
+
interface JumpPagination {
|
|
187
|
+
/**
|
|
188
|
+
* If true, the component will show the complete version of the pagination, with elements informations
|
|
189
|
+
*/
|
|
190
|
+
"completeVersion"?: boolean;
|
|
191
|
+
"currentPage"?: number;
|
|
192
|
+
/**
|
|
193
|
+
* Values for the elements per page select
|
|
194
|
+
*/
|
|
195
|
+
"elementsRanges"?: Array<number>;
|
|
196
|
+
/**
|
|
197
|
+
* Indicates the first page/product of the list
|
|
198
|
+
*/
|
|
199
|
+
"firstPage"?: number;
|
|
200
|
+
/**
|
|
201
|
+
* Label for the elements per page select
|
|
202
|
+
*/
|
|
203
|
+
"labelElementsPerPage"?: string;
|
|
204
|
+
"lastPage"?: number;
|
|
205
|
+
"showAdditionalChrevrons"?: boolean;
|
|
206
|
+
"totalElements"?: number;
|
|
207
|
+
}
|
|
109
208
|
interface IntrinsicElements {
|
|
110
|
-
"
|
|
111
|
-
"
|
|
209
|
+
"jump-button": JumpButton;
|
|
210
|
+
"jump-icon": JumpIcon;
|
|
211
|
+
"jump-pagination": JumpPagination;
|
|
112
212
|
}
|
|
113
213
|
}
|
|
114
214
|
export { LocalJSX as JSX };
|
|
115
215
|
declare module "@stencil/core" {
|
|
116
216
|
export namespace JSX {
|
|
117
217
|
interface IntrinsicElements {
|
|
118
|
-
"
|
|
119
|
-
"
|
|
218
|
+
"jump-button": LocalJSX.JumpButton & JSXBase.HTMLAttributes<HTMLJumpButtonElement>;
|
|
219
|
+
"jump-icon": LocalJSX.JumpIcon & JSXBase.HTMLAttributes<HTMLJumpIconElement>;
|
|
220
|
+
"jump-pagination": LocalJSX.JumpPagination & JSXBase.HTMLAttributes<HTMLJumpPaginationElement>;
|
|
120
221
|
}
|
|
121
222
|
}
|
|
122
223
|
}
|
|
@@ -3,6 +3,16 @@ export interface ComponentDecorator {
|
|
|
3
3
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
4
|
}
|
|
5
5
|
export interface ComponentOptions {
|
|
6
|
+
/**
|
|
7
|
+
* When set to `true` this component will be form-associated. See
|
|
8
|
+
* https://stenciljs.com/docs/next/form-associated documentation on how to
|
|
9
|
+
* build form-associated Stencil components that integrate into forms like
|
|
10
|
+
* native browser elements such as `<input>` and `<textarea>`.
|
|
11
|
+
*
|
|
12
|
+
* The {@link AttachInternals} decorator allows for access to the
|
|
13
|
+
* `ElementInternals` object to modify the associated form.
|
|
14
|
+
*/
|
|
15
|
+
formAssociated?: boolean;
|
|
6
16
|
/**
|
|
7
17
|
* Tag name of the web component. Ideally, the tag name must be globally unique,
|
|
8
18
|
* so it's recommended to choose an unique prefix for all your components within the same collection.
|
|
@@ -62,7 +72,7 @@ export interface PropOptions {
|
|
|
62
72
|
/**
|
|
63
73
|
* The name of the associated DOM attribute.
|
|
64
74
|
* Stencil uses different heuristics to determine the default name of the attribute,
|
|
65
|
-
* but using this property, you can override the default
|
|
75
|
+
* but using this property, you can override the default behavior.
|
|
66
76
|
*/
|
|
67
77
|
attribute?: string | null;
|
|
68
78
|
/**
|
|
@@ -107,6 +117,9 @@ export interface EventOptions {
|
|
|
107
117
|
*/
|
|
108
118
|
composed?: boolean;
|
|
109
119
|
}
|
|
120
|
+
export interface AttachInternalsDecorator {
|
|
121
|
+
(): PropertyDecorator;
|
|
122
|
+
}
|
|
110
123
|
export interface ListenDecorator {
|
|
111
124
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
112
125
|
}
|
|
@@ -128,7 +141,7 @@ export interface ListenOptions {
|
|
|
128
141
|
* By default, Stencil uses several heuristics to determine if
|
|
129
142
|
* it must attach a `passive` event listener or not.
|
|
130
143
|
*
|
|
131
|
-
* Using the `passive` option can be used to change the default
|
|
144
|
+
* Using the `passive` option can be used to change the default behavior.
|
|
132
145
|
* Please see https://developers.google.com/web/updates/2016/06/passive-event-listeners for further information.
|
|
133
146
|
*/
|
|
134
147
|
passive?: boolean;
|
|
@@ -175,6 +188,12 @@ export declare const Element: ElementDecorator;
|
|
|
175
188
|
* https://stenciljs.com/docs/events
|
|
176
189
|
*/
|
|
177
190
|
export declare const Event: EventDecorator;
|
|
191
|
+
/**
|
|
192
|
+
* If the `formAssociated` option is set in options passed to the
|
|
193
|
+
* `@Component()` decorator then this decorator may be used to get access to the
|
|
194
|
+
* `ElementInternals` instance associated with the component.
|
|
195
|
+
*/
|
|
196
|
+
export declare const AttachInternals: AttachInternalsDecorator;
|
|
178
197
|
/**
|
|
179
198
|
* The `Listen()` decorator is for listening DOM events, including the ones
|
|
180
199
|
* dispatched from `@Events()`.
|
|
@@ -432,7 +451,7 @@ export interface QueueApi {
|
|
|
432
451
|
/**
|
|
433
452
|
* Host
|
|
434
453
|
*/
|
|
435
|
-
interface HostAttributes {
|
|
454
|
+
export interface HostAttributes {
|
|
436
455
|
class?: string | {
|
|
437
456
|
[className: string]: boolean;
|
|
438
457
|
};
|
|
@@ -471,7 +490,7 @@ export interface FunctionalUtilities {
|
|
|
471
490
|
/**
|
|
472
491
|
* Utility for reading the children of a functional component at runtime.
|
|
473
492
|
* Since the Stencil runtime uses a different interface for children it is
|
|
474
|
-
* not
|
|
493
|
+
* not recommended to read the children directly, and is preferable to use
|
|
475
494
|
* this utility to, for instance, perform a side effect for each child.
|
|
476
495
|
*/
|
|
477
496
|
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
|
|
@@ -791,6 +810,9 @@ export declare namespace JSXBase {
|
|
|
791
810
|
name?: string;
|
|
792
811
|
type?: string;
|
|
793
812
|
value?: string | string[] | number;
|
|
813
|
+
popoverTargetAction?: string;
|
|
814
|
+
popoverTargetElement?: Element | null;
|
|
815
|
+
popoverTarget?: string;
|
|
794
816
|
}
|
|
795
817
|
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
796
818
|
height?: number | string;
|
|
@@ -872,6 +894,8 @@ export declare namespace JSXBase {
|
|
|
872
894
|
}
|
|
873
895
|
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
874
896
|
alt?: string;
|
|
897
|
+
crossOrigin?: string;
|
|
898
|
+
crossorigin?: string;
|
|
875
899
|
decoding?: 'async' | 'auto' | 'sync';
|
|
876
900
|
importance?: 'low' | 'auto' | 'high';
|
|
877
901
|
height?: number | string;
|
|
@@ -930,6 +954,8 @@ export declare namespace JSXBase {
|
|
|
930
954
|
minlength?: number | string;
|
|
931
955
|
multiple?: boolean;
|
|
932
956
|
name?: string;
|
|
957
|
+
onSelect?: (event: Event) => void;
|
|
958
|
+
onselect?: (event: Event) => void;
|
|
933
959
|
pattern?: string;
|
|
934
960
|
placeholder?: string;
|
|
935
961
|
readOnly?: boolean;
|
|
@@ -948,6 +974,9 @@ export declare namespace JSXBase {
|
|
|
948
974
|
webkitdirectory?: boolean;
|
|
949
975
|
webkitEntries?: any;
|
|
950
976
|
width?: number | string;
|
|
977
|
+
popoverTargetAction?: string;
|
|
978
|
+
popoverTargetElement?: Element | null;
|
|
979
|
+
popoverTarget?: string;
|
|
951
980
|
}
|
|
952
981
|
interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
953
982
|
autoFocus?: boolean;
|
|
@@ -1111,11 +1140,13 @@ export declare namespace JSXBase {
|
|
|
1111
1140
|
autocomplete?: string;
|
|
1112
1141
|
}
|
|
1113
1142
|
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1143
|
+
height?: number;
|
|
1114
1144
|
media?: string;
|
|
1115
1145
|
sizes?: string;
|
|
1116
1146
|
src?: string;
|
|
1117
1147
|
srcSet?: string;
|
|
1118
1148
|
type?: string;
|
|
1149
|
+
width?: number;
|
|
1119
1150
|
}
|
|
1120
1151
|
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1121
1152
|
media?: string;
|
|
@@ -1143,6 +1174,8 @@ export declare namespace JSXBase {
|
|
|
1143
1174
|
minLength?: number;
|
|
1144
1175
|
minlength?: number | string;
|
|
1145
1176
|
name?: string;
|
|
1177
|
+
onSelect?: (event: Event) => void;
|
|
1178
|
+
onselect?: (event: Event) => void;
|
|
1146
1179
|
placeholder?: string;
|
|
1147
1180
|
readOnly?: boolean;
|
|
1148
1181
|
readonly?: boolean | string;
|
|
@@ -1196,6 +1229,7 @@ export declare namespace JSXBase {
|
|
|
1196
1229
|
draggable?: boolean;
|
|
1197
1230
|
hidden?: boolean;
|
|
1198
1231
|
id?: string;
|
|
1232
|
+
inert?: boolean;
|
|
1199
1233
|
lang?: string;
|
|
1200
1234
|
spellcheck?: 'true' | 'false' | any;
|
|
1201
1235
|
style?: {
|
|
@@ -1204,6 +1238,7 @@ export declare namespace JSXBase {
|
|
|
1204
1238
|
tabIndex?: number;
|
|
1205
1239
|
tabindex?: number | string;
|
|
1206
1240
|
title?: string;
|
|
1241
|
+
popover?: string | null;
|
|
1207
1242
|
inputMode?: string;
|
|
1208
1243
|
inputmode?: string;
|
|
1209
1244
|
enterKeyHint?: string;
|
|
@@ -1289,7 +1324,7 @@ export declare namespace JSXBase {
|
|
|
1289
1324
|
clipPathUnits?: number | string;
|
|
1290
1325
|
'clip-rule'?: number | string;
|
|
1291
1326
|
'color-interpolation'?: number | string;
|
|
1292
|
-
'color-interpolation-filters'?: 'auto' | '
|
|
1327
|
+
'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB';
|
|
1293
1328
|
'color-profile'?: number | string;
|
|
1294
1329
|
'color-rendering'?: number | string;
|
|
1295
1330
|
contentScriptType?: number | string;
|
|
@@ -1619,8 +1654,14 @@ export declare namespace JSXBase {
|
|
|
1619
1654
|
onAnimationEndCapture?: (event: AnimationEvent) => void;
|
|
1620
1655
|
onAnimationIteration?: (event: AnimationEvent) => void;
|
|
1621
1656
|
onAnimationIterationCapture?: (event: AnimationEvent) => void;
|
|
1657
|
+
onTransitionCancel?: (event: TransitionEvent) => void;
|
|
1658
|
+
onTransitionCancelCapture?: (event: TransitionEvent) => void;
|
|
1622
1659
|
onTransitionEnd?: (event: TransitionEvent) => void;
|
|
1623
1660
|
onTransitionEndCapture?: (event: TransitionEvent) => void;
|
|
1661
|
+
onTransitionRun?: (event: TransitionEvent) => void;
|
|
1662
|
+
onTransitionRunCapture?: (event: TransitionEvent) => void;
|
|
1663
|
+
onTransitionStart?: (event: TransitionEvent) => void;
|
|
1664
|
+
onTransitionStartCapture?: (event: TransitionEvent) => void;
|
|
1624
1665
|
}
|
|
1625
1666
|
}
|
|
1626
1667
|
export interface JSXAttributes<T = Element> {
|
package/loader/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface CustomElementsDefineOptions {
|
|
|
8
8
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
9
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions):
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
|
|
12
12
|
export declare function applyPolyfills(): Promise<void>;
|
|
13
13
|
|
|
14
14
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jumpgroup/jump-design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"generate-styles": "node ./style-generator.mjs"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@stencil/core": "^4.
|
|
37
|
+
"@stencil/core": "^4.12.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@babel/preset-env": "^7.21.5",
|
package/readme.md
CHANGED
|
@@ -1,91 +1,58 @@
|
|
|
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
|
|
12
|
-
|
|
13
|
-
```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:
|
|
5
|
+
## To start the project
|
|
6
|
+
To start the Stencil + Storybook project, run the following commands in two separate terminals:
|
|
36
7
|
|
|
37
8
|
```bash
|
|
38
|
-
|
|
39
|
-
|
|
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
|
+
Effettuando un push su master viene automaticamente deployato lo storybook con le modifiche.
|
|
16
|
+
Per aggiornare la versione di npm è necessario creare un tag (e modificare la versione su package.json).
|
|
57
17
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
18
|
+
### Caricare gli stili
|
|
19
|
+
Per visualizzare il design system con i colori correttamente configurati, seguire i passaggi:
|
|
20
|
+
- Da storybook andare alla voce (nella barra sx) "Introduction".
|
|
21
|
+
- 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.
|
|
22
|
+
- Copiare nell'url appena aperto il percorso a partire da ?path= e incollarlo nell'url del locale.
|
|
23
|
+
es: http://localhost/?path=/docs/tokens-colori--documentation&figma-board=rdyLtvCq162n61XTXFAmWe
|
|
24
|
+
Se non si vedono correttamente gli stili, controllare la sezione Troubleshooting.
|
|
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
|
|
|
72
|
-
There are three strategies we recommend for using web components built with Stencil.
|
|
73
|
-
|
|
74
|
-
The first step for all three of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
|
75
|
-
|
|
76
35
|
### Script tag
|
|
77
36
|
|
|
78
|
-
|
|
37
|
+
#### unpkg
|
|
38
|
+
- This tag `<script type='module' src='https://unpkg.com/@jumpgroup/jump-design-system/dist/jump-design-system/jump-design-system.esm.js'></script>` in the head of your index.html.
|
|
39
|
+
- To include also the style, add `<style src='https://unpkg.com/@jumpgroup/jump-design-system/dist/jump-design-system/jump-design-system.css'></script>`in the head of your index.html.
|
|
79
40
|
- Then you can use the element anywhere in your template, JSX, html etc
|
|
80
41
|
|
|
42
|
+
#### jsdeliver
|
|
43
|
+
- Includi i seguenti tag
|
|
44
|
+
`<script type='module' src='https://cdn.jsdelivr.net/npm/@jumpgroup/jump-design-system/dist/jump-design-system/jump-design-system.esm.js'></script>`
|
|
45
|
+
|
|
81
46
|
### Node Modules
|
|
82
47
|
|
|
83
48
|
- Run `npm install my-component --save`
|
|
84
49
|
- 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
50
|
- Then you can use the element anywhere in your template, JSX, html etc
|
|
86
51
|
|
|
87
|
-
|
|
52
|
+
## Troubleshooting
|
|
53
|
+
### Non si vedono gli stili
|
|
54
|
+
Se in locale non si vedono gli stili una volta configurato l'url con il path corretto, potrebbero esserci diversi problemi:
|
|
55
|
+
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!
|
|
88
56
|
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
- Then you can use the element anywhere in your template, JSX, html etc
|
|
57
|
+
## Link utili
|
|
58
|
+
- [Storybook repository](https://designsystem.jumpgroup.it/]
|
|
@@ -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}
|