@jumpgroup/jump-design-system 0.1.4 → 0.1.6

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 (102) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/{index-c572276a.js → index-46644e39.js} +499 -152
  4. package/dist/cjs/index-46644e39.js.map +1 -0
  5. package/dist/cjs/jump-button.cjs.entry.js +24 -16
  6. package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
  7. package/dist/cjs/jump-design-system.cjs.js +6 -4
  8. package/dist/cjs/jump-design-system.cjs.js.map +1 -1
  9. package/dist/cjs/jump-icon.cjs.entry.js +19 -30
  10. package/dist/cjs/jump-icon.cjs.entry.js.map +1 -1
  11. package/dist/cjs/jump-pagination.cjs.entry.js +22 -21
  12. package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +6 -4
  14. package/dist/cjs/loader.cjs.js.map +1 -1
  15. package/dist/collection/collection-manifest.json +2 -2
  16. package/dist/collection/components/app-icon/jump-icon.js +59 -59
  17. package/dist/collection/components/app-icon/jump-icon.js.map +1 -1
  18. package/dist/collection/components/app-icon/jump-icon.stories.js +16 -16
  19. package/dist/collection/components/app-icon/jump-icon.stories.js.map +1 -1
  20. package/dist/collection/components/app-icon/test/jump-icon.e2e.js +6 -6
  21. package/dist/collection/components/app-icon/test/jump-icon.e2e.js.map +1 -1
  22. package/dist/collection/components/app-icon/test/jump-icon.spec.js +7 -7
  23. package/dist/collection/components/app-icon/test/jump-icon.spec.js.map +1 -1
  24. package/dist/collection/components/jump-button/jump-button.css +47 -21
  25. package/dist/collection/components/jump-button/jump-button.js +285 -153
  26. package/dist/collection/components/jump-button/jump-button.js.map +1 -1
  27. package/dist/collection/components/jump-button/jump-button.stories.js +371 -206
  28. package/dist/collection/components/jump-button/jump-button.stories.js.map +1 -1
  29. package/dist/collection/components/jump-button/test/jump-button.e2e.js +6 -6
  30. package/dist/collection/components/jump-button/test/jump-button.e2e.js.map +1 -1
  31. package/dist/collection/components/jump-button/test/jump-button.spec.js +7 -7
  32. package/dist/collection/components/jump-button/test/jump-button.spec.js.map +1 -1
  33. package/dist/collection/components/jump-pagination/jump-pagination.js +175 -175
  34. package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -1
  35. package/dist/collection/components/jump-pagination/jump-pagination.stories.js +91 -92
  36. package/dist/collection/components/jump-pagination/jump-pagination.stories.js.map +1 -1
  37. package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js +6 -6
  38. package/dist/collection/components/jump-pagination/test/jump-pagination.e2e.js.map +1 -1
  39. package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js +7 -7
  40. package/dist/collection/components/jump-pagination/test/jump-pagination.spec.js.map +1 -1
  41. package/dist/collection/utils/utils.js +1 -1
  42. package/dist/collection/utils/utils.js.map +1 -1
  43. package/dist/collection/utils/utils.spec.js +12 -12
  44. package/dist/collection/utils/utils.spec.js.map +1 -1
  45. package/dist/components/index.d.ts +6 -0
  46. package/dist/components/index.js +1 -1
  47. package/dist/components/jump-button.d.ts +2 -2
  48. package/dist/components/jump-button.js +50 -35
  49. package/dist/components/jump-button.js.map +1 -1
  50. package/dist/components/jump-icon.d.ts +2 -2
  51. package/dist/components/jump-icon2.js +33 -44
  52. package/dist/components/jump-icon2.js.map +1 -1
  53. package/dist/components/jump-pagination.d.ts +2 -2
  54. package/dist/components/jump-pagination.js +47 -46
  55. package/dist/components/jump-pagination.js.map +1 -1
  56. package/dist/esm/app-globals-0f993ce5.js +5 -0
  57. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  58. package/dist/esm/{index-ad69454c.js → index-b0176170.js} +499 -152
  59. package/dist/esm/index-b0176170.js.map +1 -0
  60. package/dist/esm/jump-button.entry.js +24 -16
  61. package/dist/esm/jump-button.entry.js.map +1 -1
  62. package/dist/esm/jump-design-system.js +7 -5
  63. package/dist/esm/jump-design-system.js.map +1 -1
  64. package/dist/esm/jump-icon.entry.js +19 -30
  65. package/dist/esm/jump-icon.entry.js.map +1 -1
  66. package/dist/esm/jump-pagination.entry.js +22 -21
  67. package/dist/esm/jump-pagination.entry.js.map +1 -1
  68. package/dist/esm/loader.js +7 -5
  69. package/dist/esm/loader.js.map +1 -1
  70. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  71. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  72. package/dist/jump-design-system/p-0d2b55a8.entry.js +2 -0
  73. package/dist/jump-design-system/p-0d2b55a8.entry.js.map +1 -0
  74. package/dist/jump-design-system/p-1bb7f2a5.entry.js +2 -0
  75. package/dist/jump-design-system/p-1bb7f2a5.entry.js.map +1 -0
  76. package/dist/jump-design-system/{p-15ecd712.entry.js → p-3cbc3a68.entry.js} +3 -3
  77. package/dist/jump-design-system/p-3cbc3a68.entry.js.map +1 -0
  78. package/dist/jump-design-system/p-68bce598.js +3 -0
  79. package/dist/jump-design-system/p-68bce598.js.map +1 -0
  80. package/dist/jump-design-system/p-e1255160.js +2 -0
  81. package/dist/jump-design-system/p-e1255160.js.map +1 -0
  82. package/dist/jump-design-system-elements.json +57 -1
  83. package/dist/types/components/app-icon/jump-icon.d.ts +10 -10
  84. package/dist/types/components/app-icon/jump-icon.stories.d.ts +14 -14
  85. package/dist/types/components/jump-button/jump-button.d.ts +57 -29
  86. package/dist/types/components/jump-button/jump-button.stories.d.ts +152 -86
  87. package/dist/types/components/jump-pagination/jump-pagination.d.ts +24 -24
  88. package/dist/types/components/jump-pagination/jump-pagination.stories.d.ts +63 -63
  89. package/dist/types/components.d.ts +60 -4
  90. package/dist/types/stencil-public-runtime.d.ts +46 -5
  91. package/loader/index.d.ts +1 -1
  92. package/package.json +2 -2
  93. package/readme.md +13 -8
  94. package/dist/cjs/index-c572276a.js.map +0 -1
  95. package/dist/esm/index-ad69454c.js.map +0 -1
  96. package/dist/jump-design-system/p-15ecd712.entry.js.map +0 -1
  97. package/dist/jump-design-system/p-42799645.entry.js +0 -2
  98. package/dist/jump-design-system/p-42799645.entry.js.map +0 -1
  99. package/dist/jump-design-system/p-44f459bb.js +0 -3
  100. package/dist/jump-design-system/p-44f459bb.js.map +0 -1
  101. package/dist/jump-design-system/p-6ba563bd.entry.js +0 -2
  102. package/dist/jump-design-system/p-6ba563bd.entry.js.map +0 -1
@@ -1,227 +1,392 @@
1
1
  import feather from "feather-icons";
2
2
  export default {
3
- title: 'Components/Atoms/Button',
4
- tags: ['autodocs'],
5
- argTypes: {
6
- label: {
7
- name: 'Etichetta',
8
- description: 'Imposta il testo del bottone',
9
- control: 'text'
10
- },
11
- variant: {
12
- name: 'Variante',
13
- description: 'Imposta la variante di colore del bottone',
14
- control: 'select',
15
- options: [
16
- 'primary',
17
- 'secondary'
18
- ],
19
- },
20
- outline: {
21
- name: 'Outline',
22
- description: 'Imposta se il bottone deve avere il solo bordo',
23
- control: 'boolean'
24
- },
25
- size: {
26
- name: 'Dimensione',
27
- description: 'Imposta la dimensione del bottone',
28
- control: 'select',
29
- options: [
30
- 'small',
31
- 'medium',
32
- 'large'
33
- ],
34
- labels: {
35
- small: 'Piccolo',
36
- medium: 'Medio',
37
- large: 'Grande'
38
- }
39
- },
40
- pill: {
41
- name: 'Bordo a Pillola',
42
- description: 'Imposta se il bottone deve avere il bordo completamente stondato a pillola',
43
- control: 'boolean'
44
- },
45
- disabled: {
46
- name: 'Disabilitato',
47
- description: 'Imposta se il bottone deve essere disabilitato',
48
- control: 'boolean'
49
- },
50
- text: {
51
- name: 'Testo',
52
- description: 'Imposta se il bottone essere solo testo, quindi senza bordo, sfondo e padding',
53
- control: 'boolean'
54
- },
55
- showIcon: {
56
- name: 'Mostra Icona',
57
- description: 'Imposta se il bottone deve mostrare un\'icona',
58
- control: 'boolean'
59
- },
60
- iconOnly: {
61
- name: 'Mostra solo Icona',
62
- description: 'Imposta se il bottone deve mostrare solo l\'icona',
63
- control: 'boolean',
64
- if: {
65
- arg: 'showIcon',
66
- eq: true
67
- },
68
- },
69
- iconName: {
70
- name: 'Nome Icona',
71
- control: 'select',
72
- options: Object.keys(feather.icons),
73
- description: 'Seleziona il nome dell\'icona dal menu a tendina',
74
- defaultValue: Object.keys(feather.icons)[0],
75
- if: {
76
- arg: 'showIcon',
77
- eq: true
78
- },
79
- },
80
- iconPosition: {
81
- name: 'Posizione Icona',
82
- description: 'Imposta la posizione dell\'icona',
83
- defaultValue: 'left',
84
- control: 'select',
85
- options: [
86
- 'left',
87
- 'right'
88
- ],
89
- if: {
90
- arg: 'showIcon',
91
- eq: true
92
- },
93
- labels: {
94
- left: 'Sinistra',
95
- right: 'Destra'
96
- }
3
+ title: 'Components/Atoms/Button',
4
+ tags: ['autodocs'],
5
+ argTypes: {
6
+ label: {
7
+ name: 'Etichetta',
8
+ description: 'Imposta il testo del bottone',
9
+ control: 'text'
10
+ },
11
+ variant: {
12
+ name: 'Variante',
13
+ description: 'Imposta la variante di colore del bottone',
14
+ control: 'select',
15
+ options: [
16
+ 'primary',
17
+ 'secondary'
18
+ ],
19
+ },
20
+ outline: {
21
+ name: 'Outline',
22
+ description: 'Imposta se il bottone deve avere il solo bordo',
23
+ control: 'boolean'
24
+ },
25
+ size: {
26
+ name: 'Dimensione',
27
+ description: 'Imposta la dimensione del bottone',
28
+ control: 'select',
29
+ options: [
30
+ 'small',
31
+ 'medium',
32
+ 'large'
33
+ ],
34
+ labels: {
35
+ small: 'Piccolo',
36
+ medium: 'Medio',
37
+ large: 'Grande'
38
+ }
39
+ },
40
+ pill: {
41
+ name: 'Bordo a Pillola',
42
+ description: 'Imposta se il bottone deve avere il bordo completamente stondato a pillola',
43
+ control: 'boolean'
44
+ },
45
+ disabled: {
46
+ name: 'Disabilitato',
47
+ description: 'Imposta se il bottone deve essere disabilitato',
48
+ control: 'boolean'
49
+ },
50
+ text: {
51
+ name: 'Testo',
52
+ description: 'Imposta se il bottone è solo testo, quindi senza bordo, sfondo e padding',
53
+ control: 'boolean'
54
+ },
55
+ showIcon: {
56
+ name: 'Mostra Icona',
57
+ description: 'Imposta se il bottone deve mostrare un\'icona',
58
+ control: 'boolean'
59
+ },
60
+ iconOnly: {
61
+ name: 'Mostra solo Icona',
62
+ description: 'Imposta se il bottone deve mostrare solo l\'icona',
63
+ control: 'boolean',
64
+ if: {
65
+ arg: 'showIcon',
66
+ eq: true
67
+ },
68
+ },
69
+ iconName: {
70
+ name: 'Nome Icona',
71
+ control: 'select',
72
+ options: Object.keys(feather.icons),
73
+ description: 'Seleziona il nome dell\'icona dal menu a tendina',
74
+ defaultValue: Object.keys(feather.icons)[0],
75
+ if: {
76
+ arg: 'showIcon',
77
+ eq: true
78
+ },
79
+ },
80
+ iconPosition: {
81
+ name: 'Posizione Icona',
82
+ description: 'Imposta la posizione dell\'icona',
83
+ defaultValue: 'left',
84
+ control: 'select',
85
+ options: [
86
+ 'left',
87
+ 'right'
88
+ ],
89
+ if: {
90
+ arg: 'showIcon',
91
+ eq: true
92
+ },
93
+ labels: {
94
+ left: 'Sinistra',
95
+ right: 'Destra'
96
+ }
97
+ },
98
+ type: {
99
+ name: 'Tipo di bottone',
100
+ description: 'Imposta il tipo di bottone',
101
+ default: 'button',
102
+ control: 'select',
103
+ if: {
104
+ arg: 'href',
105
+ exists: false
106
+ },
107
+ options: [
108
+ 'button',
109
+ 'submit',
110
+ 'reset'
111
+ ],
112
+ labels: {
113
+ button: 'button',
114
+ submit: 'submit',
115
+ reset: 'reset',
116
+ }
117
+ },
118
+ name: {
119
+ name: 'Nome del bottone',
120
+ description: 'Imposta il nome del bottone',
121
+ control: 'text',
122
+ if: {
123
+ arg: 'href',
124
+ exists: false
125
+ }
126
+ },
127
+ value: {
128
+ name: 'Value del bottone',
129
+ description: 'Imposta il value del bottone',
130
+ control: 'text',
131
+ if: {
132
+ arg: 'href',
133
+ exists: false
134
+ }
135
+ },
136
+ ariaLabel: {
137
+ name: 'Aria Label',
138
+ description: 'Imposta aria label',
139
+ control: 'text',
140
+ },
141
+ href: {
142
+ name: 'Href',
143
+ description: 'Imposta l\'href del link',
144
+ control: 'text',
145
+ },
146
+ target: {
147
+ name: 'Target',
148
+ description: 'Imposta il target del link',
149
+ default: '_self',
150
+ control: 'select',
151
+ if: {
152
+ arg: 'href',
153
+ exists: true
154
+ },
155
+ options: [
156
+ '_blank',
157
+ '_parent',
158
+ '_self',
159
+ '_top'
160
+ ],
161
+ labels: {
162
+ _blank: '_blank',
163
+ _parent: '_parent',
164
+ _self: '_self',
165
+ _top: '_top'
166
+ }
167
+ },
97
168
  }
98
- }
99
169
  };
100
- // regular expression to remove all the spaces indenting the template string
101
- const Template = (args) => `${!args.label && !args.showIcon ? 'Errore nella configurazione del bottone' :
102
- `<jump-button variant="${args.variant}" size="${args.size}"${args.disabled == true ? ' disabled' : ''}${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''}${!args.label || args.iconOnly ? ' only-icon' : ''}>
103
- ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
104
- ${!args.iconOnly ? args.label : ''}
105
- ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
106
- </jump-button>`.replace(/\s\s+/g, '')}`;
170
+ // TODO: non far passare gli undefined
171
+ const Anchor = (args) => {
172
+ return `<jump-button class="${args.class} "variant="${args.variant}" size="${args.size}" href="${args.href}" target="${args.target}" ariaLabel="${args.ariaLabel}" ${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''}${!args.label || args.iconOnly ? ' only-icon' : ''}>${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}${!args.iconOnly ? args.label : ''}${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}</jump-button>`;
173
+ };
174
+ const Button = (args) => {
175
+ return `<jump-button class="${args.class} "variant="${args.variant}" size="${args.size}" type="${args.type}" ariaLabel="${args.ariaLabel}" name="${args.name}" value="${args.value}" ${args.disabled == true ? ' disabled' : ''}${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''} ${!args.label || args.iconOnly ? ' only-icon' : ''}>${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}${!args.iconOnly ? args.label : ''}${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}</jump-button>`;
176
+ };
177
+ const Template = (args) => `${args.href ? Anchor(args) : !args.label && !args.showIcon ? 'Errore nella configurazione del bottone' : Button(args)}`;
178
+ // TODO: gestire la prop che è opzione: cmq se copio il codice e tolgo le props undefined dovrebbe andare tutto
107
179
  export const Primary = Template.bind({});
108
180
  Primary.args = {
109
- label: 'Primary',
110
- variant: 'primary',
111
- outline: false,
112
- pill: false,
113
- size: 'medium',
114
- disabled: false,
115
- text: false,
116
- showIcon: false,
117
- iconOnly: false,
118
- iconName: Object.keys(feather.icons)[0],
119
- iconPosition: 'left'
181
+ label: 'Primary',
182
+ variant: 'primary',
183
+ outline: false,
184
+ pill: false,
185
+ size: 'medium',
186
+ disabled: false,
187
+ text: false,
188
+ showIcon: false,
189
+ iconOnly: false,
190
+ iconName: Object.keys(feather.icons)[0],
191
+ iconPosition: 'left',
192
+ type: 'button',
193
+ name: 'nome bottone',
194
+ value: 'value bottone',
195
+ ariaLabel: 'sono un bottone'
120
196
  };
121
197
  export const OutlinePrimary = Template.bind({});
122
198
  OutlinePrimary.args = {
123
- label: 'Outline Primary',
124
- variant: 'primary',
125
- outline: true,
126
- pill: false,
127
- size: 'medium',
128
- disabled: false,
129
- text: false,
130
- showIcon: false,
131
- iconOnly: false,
132
- iconName: Object.keys(feather.icons)[0],
133
- iconPosition: 'left'
199
+ label: 'Outline Primary',
200
+ variant: 'primary',
201
+ outline: true,
202
+ pill: false,
203
+ size: 'medium',
204
+ disabled: false,
205
+ text: false,
206
+ showIcon: false,
207
+ iconOnly: false,
208
+ iconName: Object.keys(feather.icons)[0],
209
+ iconPosition: 'left',
210
+ type: 'button',
211
+ name: 'nome bottone',
212
+ value: 'value bottone',
213
+ ariaLabel: 'sono un bottone'
134
214
  };
135
215
  export const PillPrimary = Template.bind({});
136
216
  PillPrimary.args = {
137
- label: 'Pill Primary',
138
- variant: 'primary',
139
- outline: false,
140
- pill: true,
141
- size: 'medium',
142
- disabled: false,
143
- text: false,
144
- showIcon: false,
145
- iconOnly: false,
146
- iconName: Object.keys(feather.icons)[0],
147
- iconPosition: 'left'
217
+ label: 'Pill Primary',
218
+ variant: 'primary',
219
+ outline: false,
220
+ pill: true,
221
+ size: 'medium',
222
+ disabled: false,
223
+ text: false,
224
+ showIcon: false,
225
+ iconOnly: false,
226
+ iconName: Object.keys(feather.icons)[0],
227
+ iconPosition: 'left',
228
+ type: 'button',
229
+ name: 'nome bottone',
230
+ value: 'value bottone',
231
+ ariaLabel: 'sono un bottone'
148
232
  };
149
233
  export const OutlinePillPrimary = Template.bind({});
150
234
  OutlinePillPrimary.args = {
151
- label: 'Pill Primary',
152
- variant: 'primary',
153
- outline: true,
154
- pill: true,
155
- size: 'medium',
156
- disabled: false,
157
- text: false,
158
- showIcon: false,
159
- iconOnly: false,
160
- iconName: Object.keys(feather.icons)[0],
161
- iconPosition: 'left'
235
+ label: 'Pill Primary',
236
+ variant: 'primary',
237
+ outline: true,
238
+ pill: true,
239
+ size: 'medium',
240
+ disabled: false,
241
+ text: false,
242
+ showIcon: false,
243
+ iconOnly: false,
244
+ iconName: Object.keys(feather.icons)[0],
245
+ iconPosition: 'left',
246
+ type: 'button',
247
+ name: 'nome bottone',
248
+ value: 'value bottone',
249
+ ariaLabel: 'sono un bottone'
162
250
  };
163
251
  export const Disabled = Template.bind({});
164
252
  Disabled.args = {
165
- label: 'Disabled',
166
- variant: 'primary',
167
- outline: false,
168
- pill: false,
169
- size: 'medium',
170
- disabled: true,
171
- text: false,
172
- showIcon: false,
173
- iconOnly: false,
174
- iconName: Object.keys(feather.icons)[0],
175
- iconPosition: 'left'
253
+ label: 'Disabled',
254
+ variant: 'primary',
255
+ outline: false,
256
+ pill: false,
257
+ size: 'medium',
258
+ disabled: true,
259
+ text: false,
260
+ showIcon: false,
261
+ iconOnly: false,
262
+ iconName: Object.keys(feather.icons)[0],
263
+ iconPosition: 'left',
264
+ type: 'button',
265
+ name: 'nome bottone',
266
+ value: 'value bottone',
267
+ ariaLabel: 'sono un bottone'
268
+ };
269
+ export const TextSecondary = Template.bind({});
270
+ TextSecondary.args = {
271
+ label: 'Button Text',
272
+ variant: 'secondary',
273
+ outline: false,
274
+ pill: false,
275
+ size: 'medium',
276
+ disabled: false,
277
+ text: true,
278
+ showIcon: false,
279
+ iconOnly: false,
280
+ iconName: Object.keys(feather.icons)[0],
281
+ iconPosition: 'left',
282
+ type: 'button',
283
+ name: 'nome bottone',
284
+ value: 'value bottone',
285
+ ariaLabel: 'sono un bottone'
286
+ };
287
+ export const CustomButton = Template.bind({});
288
+ CustomButton.args = {
289
+ label: 'Sono un bottone custom',
290
+ outline: false,
291
+ pill: true,
292
+ size: 'small',
293
+ disabled: false,
294
+ text: false,
295
+ showIcon: true,
296
+ iconOnly: false,
297
+ iconName: 'message-circle',
298
+ iconPosition: 'left',
299
+ type: 'button',
300
+ name: 'nome bottone',
301
+ value: 'value bottone',
302
+ ariaLabel: 'sono un bottone',
303
+ class: 'chat'
304
+ };
305
+ // const TemplateOriginalWithIcon = (args) => `<jump-button variant="${args.variant}" size="${args.size}" type="${args.type}" ariaLabel="${args.ariaLabel}" name="${args.name}" value="${args.value}" ${args.disabled == true ? ' disabled' : ''}${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''}>${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''${args.label${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}</jump-button>`;
306
+ const TemplateWithIcon = (args) => `<jump-button variant="${args.variant}" size="${args.size}" type="${args.type}" ariaLabel="${args.ariaLabel}" name="${args.name}" value="${args.value}" ${args.disabled == true ? ' disabled' : ''}${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''}> ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}${args.label}${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}</jump-button>`;
307
+ export const ButtonWithIcon = TemplateWithIcon.bind({});
308
+ ButtonWithIcon.args = {
309
+ label: 'Primary',
310
+ variant: 'primary',
311
+ outline: false,
312
+ pill: false,
313
+ size: 'medium',
314
+ disabled: false,
315
+ text: false,
316
+ showIcon: true,
317
+ iconName: 'home',
318
+ iconPosition: 'left',
319
+ type: 'button',
320
+ name: 'nome bottone',
321
+ value: 'value bottone',
322
+ ariaLabel: 'sono un bottone'
323
+ };
324
+ // const Template2WithOnlyIcon = (args) => `<jump-button variant="${args.variant}" size="${args.size}"${args.disabled == true ? ' disabled' : ''}${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''}
325
+ // ${ !args.label ? ' only-icon' : ''}>${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}${args.label}${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}</jump-button>`;
326
+ const TemplateWithOnlyIcon = (args) => `<jump-button
327
+ variant="${args.variant}"
328
+ size="${args.size}"
329
+ type="${args.type}"
330
+ ariaLabel="${args.ariaLabel}"
331
+ name="${args.name}"
332
+ value="${args.value}"
333
+ ${args.disabled == true ? ' disabled' : ''}
334
+ ${args.pill == true ? ' pill' : ''}
335
+ ${args.outline == true ? ' outline' : ''}
336
+ ${args.text == true ? ' text' : ''}
337
+ ${!args.label ? ' only-icon' : ''}>
338
+
339
+ ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
340
+ ${args.label}
341
+ ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
342
+
343
+ </jump-button>`;
344
+ export const ButtonWithOnlyIcon = TemplateWithOnlyIcon.bind({});
345
+ ButtonWithOnlyIcon.args = {
346
+ label: '',
347
+ variant: 'primary',
348
+ outline: false,
349
+ pill: true,
350
+ size: 'medium',
351
+ disabled: false,
352
+ text: false,
353
+ showIcon: true,
354
+ iconName: 'home',
355
+ iconPosition: 'left',
356
+ type: 'button',
357
+ name: 'nome bottone',
358
+ value: 'value bottone',
359
+ ariaLabel: 'sono un bottone'
360
+ };
361
+ export const Link = Template.bind({});
362
+ Link.args = {
363
+ label: 'Link',
364
+ variant: 'primary',
365
+ outline: false,
366
+ pill: false,
367
+ size: 'medium',
368
+ disabled: false,
369
+ text: true,
370
+ showIcon: false,
371
+ iconOnly: false,
372
+ iconName: Object.keys(feather.icons)[0],
373
+ iconPosition: 'left',
374
+ href: 'www.jumpgroup.it',
375
+ target: '_blank',
176
376
  };
177
- export const Text = Template.bind({});
178
- Text.args = {
179
- label: 'Text',
180
- variant: 'secondary',
181
- outline: false,
182
- pill: false,
183
- size: 'medium',
184
- disabled: false,
185
- text: true,
186
- showIcon: false,
187
- iconOnly: false,
188
- iconName: Object.keys(feather.icons)[0],
189
- iconPosition: 'left'
377
+ export const AnchorWithIcon = TemplateWithIcon.bind({});
378
+ AnchorWithIcon.args = {
379
+ label: 'Link with icon',
380
+ variant: 'primary',
381
+ outline: false,
382
+ pill: false,
383
+ size: 'medium',
384
+ disabled: false,
385
+ text: true,
386
+ showIcon: true,
387
+ iconName: 'arrow-right',
388
+ iconPosition: 'right',
389
+ href: 'www.google.it',
390
+ ariaLabel: 'sono un bottone'
190
391
  };
191
- // const TemplateWithIcon = (args) => `<jump-button variant="${args.variant}" size="${args.size}"${args.disabled == true ? ' disabled' : ''}${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''}>
192
- // ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
193
- // ${args.label}
194
- // ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
195
- // </jump-button>`;
196
- // export const WithIcon = TemplateWithIcon.bind({});
197
- // WithIcon.args = {
198
- // label: 'Primary',
199
- // variant: 'primary',
200
- // outline: false,
201
- // pill: false,
202
- // size: 'medium',
203
- // disabled: false,
204
- // text: false,
205
- // showIcon: true,
206
- // iconName: 'home',
207
- // iconPosition: 'left'
208
- // };
209
- // const TemplateWithOnlyIcon = (args) => `<jump-button variant="${args.variant}" size="${args.size}"${args.disabled == true ? ' disabled' : ''}${args.pill == true ? ' pill' : ''}${args.outline == true ? ' outline' : ''}${args.text == true ? ' text' : ''}${ !args.label ? ' only-icon' : ''}>
210
- // ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
211
- // ${args.label}
212
- // ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
213
- // </jump-button>`;
214
- // export const WithOnlyIcon = TemplateWithOnlyIcon.bind({});
215
- // WithOnlyIcon.args = {
216
- // label: '',
217
- // variant: 'primary',
218
- // outline: false,
219
- // pill: true,
220
- // size: 'medium',
221
- // disabled: false,
222
- // text: false,
223
- // showIcon: true,
224
- // iconName: 'home',
225
- // iconPosition: 'left',
226
- // };
227
392
  //# sourceMappingURL=jump-button.stories.js.map