@jumpgroup/jump-design-system 0.1.5 → 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.
- package/dist/cjs/jump-button.cjs.entry.js +7 -6
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/jump-button/jump-button.css +47 -21
- package/dist/collection/components/jump-button/jump-button.js +28 -9
- package/dist/collection/components/jump-button/jump-button.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button.stories.js +149 -101
- package/dist/collection/components/jump-button/jump-button.stories.js.map +1 -1
- package/dist/components/jump-button.js +9 -7
- package/dist/components/jump-button.js.map +1 -1
- package/dist/esm/jump-button.entry.js +7 -6
- package/dist/esm/jump-button.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/loader.js +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-1bb7f2a5.entry.js +2 -0
- package/dist/jump-design-system/p-1bb7f2a5.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +4 -0
- package/dist/types/components/jump-button/jump-button.d.ts +4 -0
- package/dist/types/components/jump-button/jump-button.stories.d.ts +7 -3
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-9e6ea006.entry.js +0 -2
- package/dist/jump-design-system/p-9e6ea006.entry.js.map +0 -1
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
},
|
|
50
50
|
text: {
|
|
51
51
|
name: 'Testo',
|
|
52
|
-
description: 'Imposta se il bottone
|
|
52
|
+
description: 'Imposta se il bottone è solo testo, quindi senza bordo, sfondo e padding',
|
|
53
53
|
control: 'boolean'
|
|
54
54
|
},
|
|
55
55
|
showIcon: {
|
|
@@ -101,8 +101,8 @@ export default {
|
|
|
101
101
|
default: 'button',
|
|
102
102
|
control: 'select',
|
|
103
103
|
if: {
|
|
104
|
-
arg: '
|
|
105
|
-
|
|
104
|
+
arg: 'href',
|
|
105
|
+
exists: false
|
|
106
106
|
},
|
|
107
107
|
options: [
|
|
108
108
|
'button',
|
|
@@ -167,60 +167,15 @@ export default {
|
|
|
167
167
|
},
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
//
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// </jump-button>`.replace(/\s\s+/g, '')
|
|
174
|
-
// }`;
|
|
175
|
-
const Template = (args) => `${args.href ?
|
|
176
|
-
`<jump-button
|
|
177
|
-
variant="${args.variant}"
|
|
178
|
-
size="${args.size}"
|
|
179
|
-
href="${args.href}"
|
|
180
|
-
target="${args.target}"
|
|
181
|
-
ariaLabel="${args.ariaLabel}"
|
|
182
|
-
${args.pill == true ? ' pill' : ''}
|
|
183
|
-
${args.outline == true ? ' outline' : ''}
|
|
184
|
-
${args.text == true ? ' text' : ''}
|
|
185
|
-
${!args.label || args.iconOnly ? ' only-icon' : ''}>
|
|
186
|
-
${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
|
|
187
|
-
${!args.iconOnly ? args.label : ''}
|
|
188
|
-
${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
|
|
189
|
-
</jump-button>`
|
|
190
|
-
:
|
|
191
|
-
!args.label && !args.showIcon ? 'Errore nella configurazione del bottone' :
|
|
192
|
-
`<jump-button
|
|
193
|
-
variant="${args.variant}"
|
|
194
|
-
size="${args.size}"
|
|
195
|
-
type="${args.type}"
|
|
196
|
-
ariaLabel="${args.ariaLabel}"
|
|
197
|
-
name="${args.name}"
|
|
198
|
-
value="${args.value}"
|
|
199
|
-
${args.disabled == true ? ' disabled' : ''}
|
|
200
|
-
${args.pill == true ? ' pill' : ''}
|
|
201
|
-
${args.outline == true ? ' outline' : ''}
|
|
202
|
-
${args.text == true ? ' text' : ''}
|
|
203
|
-
${!args.label || args.iconOnly ? ' only-icon' : ''}>
|
|
204
|
-
${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
|
|
205
|
-
${!args.iconOnly ? args.label : ''}
|
|
206
|
-
${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
|
|
207
|
-
</jump-button>`}`;
|
|
208
|
-
// TODO: gestire la prop che è opzione: cmq se copio il codice e tolgo le props undefined dovrebbe andare tutto
|
|
209
|
-
export const Name = Template.bind({});
|
|
210
|
-
Name.args = {
|
|
211
|
-
label: 'Primary',
|
|
212
|
-
variant: 'primary',
|
|
213
|
-
outline: false,
|
|
214
|
-
pill: false,
|
|
215
|
-
size: 'medium',
|
|
216
|
-
disabled: false,
|
|
217
|
-
text: false,
|
|
218
|
-
showIcon: false,
|
|
219
|
-
iconOnly: false,
|
|
220
|
-
iconName: Object.keys(feather.icons)[0],
|
|
221
|
-
iconPosition: 'left',
|
|
222
|
-
name: 'sono un nome'
|
|
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>`;
|
|
223
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
|
|
224
179
|
export const Primary = Template.bind({});
|
|
225
180
|
Primary.args = {
|
|
226
181
|
label: 'Primary',
|
|
@@ -233,7 +188,11 @@ Primary.args = {
|
|
|
233
188
|
showIcon: false,
|
|
234
189
|
iconOnly: false,
|
|
235
190
|
iconName: Object.keys(feather.icons)[0],
|
|
236
|
-
iconPosition: 'left'
|
|
191
|
+
iconPosition: 'left',
|
|
192
|
+
type: 'button',
|
|
193
|
+
name: 'nome bottone',
|
|
194
|
+
value: 'value bottone',
|
|
195
|
+
ariaLabel: 'sono un bottone'
|
|
237
196
|
};
|
|
238
197
|
export const OutlinePrimary = Template.bind({});
|
|
239
198
|
OutlinePrimary.args = {
|
|
@@ -247,7 +206,11 @@ OutlinePrimary.args = {
|
|
|
247
206
|
showIcon: false,
|
|
248
207
|
iconOnly: false,
|
|
249
208
|
iconName: Object.keys(feather.icons)[0],
|
|
250
|
-
iconPosition: 'left'
|
|
209
|
+
iconPosition: 'left',
|
|
210
|
+
type: 'button',
|
|
211
|
+
name: 'nome bottone',
|
|
212
|
+
value: 'value bottone',
|
|
213
|
+
ariaLabel: 'sono un bottone'
|
|
251
214
|
};
|
|
252
215
|
export const PillPrimary = Template.bind({});
|
|
253
216
|
PillPrimary.args = {
|
|
@@ -261,7 +224,11 @@ PillPrimary.args = {
|
|
|
261
224
|
showIcon: false,
|
|
262
225
|
iconOnly: false,
|
|
263
226
|
iconName: Object.keys(feather.icons)[0],
|
|
264
|
-
iconPosition: 'left'
|
|
227
|
+
iconPosition: 'left',
|
|
228
|
+
type: 'button',
|
|
229
|
+
name: 'nome bottone',
|
|
230
|
+
value: 'value bottone',
|
|
231
|
+
ariaLabel: 'sono un bottone'
|
|
265
232
|
};
|
|
266
233
|
export const OutlinePillPrimary = Template.bind({});
|
|
267
234
|
OutlinePillPrimary.args = {
|
|
@@ -275,7 +242,11 @@ OutlinePillPrimary.args = {
|
|
|
275
242
|
showIcon: false,
|
|
276
243
|
iconOnly: false,
|
|
277
244
|
iconName: Object.keys(feather.icons)[0],
|
|
278
|
-
iconPosition: 'left'
|
|
245
|
+
iconPosition: 'left',
|
|
246
|
+
type: 'button',
|
|
247
|
+
name: 'nome bottone',
|
|
248
|
+
value: 'value bottone',
|
|
249
|
+
ariaLabel: 'sono un bottone'
|
|
279
250
|
};
|
|
280
251
|
export const Disabled = Template.bind({});
|
|
281
252
|
Disabled.args = {
|
|
@@ -289,11 +260,15 @@ Disabled.args = {
|
|
|
289
260
|
showIcon: false,
|
|
290
261
|
iconOnly: false,
|
|
291
262
|
iconName: Object.keys(feather.icons)[0],
|
|
292
|
-
iconPosition: 'left'
|
|
263
|
+
iconPosition: 'left',
|
|
264
|
+
type: 'button',
|
|
265
|
+
name: 'nome bottone',
|
|
266
|
+
value: 'value bottone',
|
|
267
|
+
ariaLabel: 'sono un bottone'
|
|
293
268
|
};
|
|
294
|
-
export const
|
|
295
|
-
|
|
296
|
-
label: 'Text',
|
|
269
|
+
export const TextSecondary = Template.bind({});
|
|
270
|
+
TextSecondary.args = {
|
|
271
|
+
label: 'Button Text',
|
|
297
272
|
variant: 'secondary',
|
|
298
273
|
outline: false,
|
|
299
274
|
pill: false,
|
|
@@ -303,42 +278,115 @@ Text.args = {
|
|
|
303
278
|
showIcon: false,
|
|
304
279
|
iconOnly: false,
|
|
305
280
|
iconName: Object.keys(feather.icons)[0],
|
|
306
|
-
iconPosition: 'left'
|
|
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',
|
|
376
|
+
};
|
|
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'
|
|
307
391
|
};
|
|
308
|
-
// 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' : ''}>
|
|
309
|
-
// ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
|
|
310
|
-
// ${args.label}
|
|
311
|
-
// ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
|
|
312
|
-
// </jump-button>`;
|
|
313
|
-
// export const WithIcon = TemplateWithIcon.bind({});
|
|
314
|
-
// WithIcon.args = {
|
|
315
|
-
// label: 'Primary',
|
|
316
|
-
// variant: 'primary',
|
|
317
|
-
// outline: false,
|
|
318
|
-
// pill: false,
|
|
319
|
-
// size: 'medium',
|
|
320
|
-
// disabled: false,
|
|
321
|
-
// text: false,
|
|
322
|
-
// showIcon: true,
|
|
323
|
-
// iconName: 'home',
|
|
324
|
-
// iconPosition: 'left'
|
|
325
|
-
// };
|
|
326
|
-
// 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' : ''}>
|
|
327
|
-
// ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot="prefix" name="${args.iconName}"></jump-icon>` : ''}
|
|
328
|
-
// ${args.label}
|
|
329
|
-
// ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot="suffix" name="${args.iconName}"></jump-icon>` : ''}
|
|
330
|
-
// </jump-button>`;
|
|
331
|
-
// export const WithOnlyIcon = TemplateWithOnlyIcon.bind({});
|
|
332
|
-
// WithOnlyIcon.args = {
|
|
333
|
-
// label: '',
|
|
334
|
-
// variant: 'primary',
|
|
335
|
-
// outline: false,
|
|
336
|
-
// pill: true,
|
|
337
|
-
// size: 'medium',
|
|
338
|
-
// disabled: false,
|
|
339
|
-
// text: false,
|
|
340
|
-
// showIcon: true,
|
|
341
|
-
// iconName: 'home',
|
|
342
|
-
// iconPosition: 'left',
|
|
343
|
-
// };
|
|
344
392
|
//# sourceMappingURL=jump-button.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-button.stories.js","sourceRoot":"","sources":["../../../src/components/jump-button/jump-button.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,MAAM;SAChB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,SAAS;gBACT,WAAW;aACZ;SACF;QACD,OAAO,EAAG;YACR,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,SAAS;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,OAAO;gBACP,QAAQ;gBACR,OAAO;aACR;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,QAAQ;aAChB;SACF;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CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACV,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACvC,YAAY,EAAE,MAAM;CACrB,CAAC;AAEF,4PAA4P;AAC5P,2HAA2H;AAC3H,kBAAkB;AAClB,4HAA4H;AAC5H,mBAAmB;AACnB,qDAAqD;AACrD,oBAAoB;AACpB,sBAAsB;AACtB,wBAAwB;AACxB,oBAAoB;AACpB,iBAAiB;AACjB,oBAAoB;AACpB,qBAAqB;AACrB,iBAAiB;AACjB,oBAAoB;AACpB,sBAAsB;AACtB,yBAAyB;AACzB,KAAK;AAEL,mSAAmS;AACnS,2HAA2H;AAC3H,kBAAkB;AAClB,4HAA4H;AAC5H,mBAAmB;AACnB,6DAA6D;AAC7D,wBAAwB;AACxB,eAAe;AACf,wBAAwB;AACxB,oBAAoB;AACpB,gBAAgB;AAChB,oBAAoB;AACpB,qBAAqB;AACrB,iBAAiB;AACjB,oBAAoB;AACpB,sBAAsB;AACtB,0BAA0B;AAC1B,KAAK","sourcesContent":["import feather from 'feather-icons';\n\nexport default {\n title: 'Components/Atoms/Button',\n tags: ['autodocs'],\n argTypes: {\n label: {\n name: 'Etichetta',\n description: 'Imposta il testo del bottone',\n control: 'text'\n },\n variant: {\n name: 'Variante',\n description: 'Imposta la variante di colore del bottone',\n control: 'select',\n options: [\n 'primary',\n 'secondary'\n ],\n },\n outline : {\n name: 'Outline',\n description: 'Imposta se il bottone deve avere il solo bordo',\n control: 'boolean'\n },\n size: {\n name: 'Dimensione',\n description: 'Imposta la dimensione del bottone',\n control: 'select',\n options: [\n 'small',\n 'medium',\n 'large'\n ],\n labels: {\n small: 'Piccolo',\n medium: 'Medio',\n large: 'Grande'\n }\n },\n pill: {\n name: 'Bordo a Pillola',\n description: 'Imposta se il bottone deve avere il bordo completamente stondato a pillola',\n control: 'boolean'\n },\n disabled: {\n name: 'Disabilitato',\n description: 'Imposta se il bottone deve essere disabilitato',\n control: 'boolean'\n },\n text: {\n name: 'Testo',\n description: 'Imposta se il bottone essere solo testo, quindi senza bordo, sfondo e padding',\n control: 'boolean'\n },\n showIcon: {\n name: 'Mostra Icona',\n description: 'Imposta se il bottone deve mostrare un\\'icona',\n control: 'boolean'\n },\n iconOnly: {\n name: 'Mostra solo Icona',\n description: 'Imposta se il bottone deve mostrare solo l\\'icona',\n control: 'boolean',\n if: {\n arg: 'showIcon',\n eq: true\n },\n },\n iconName: {\n name: 'Nome Icona',\n control: 'select',\n options: Object.keys(feather.icons),\n description: 'Seleziona il nome dell\\'icona dal menu a tendina',\n defaultValue: Object.keys(feather.icons)[0],\n if: {\n arg: 'showIcon',\n eq: true\n },\n },\n iconPosition: {\n name: 'Posizione Icona',\n description: 'Imposta la posizione dell\\'icona',\n defaultValue: 'left',\n control: 'select',\n options: [\n 'left',\n 'right'\n ],\n if: {\n arg: 'showIcon',\n eq: true\n },\n labels: {\n left: 'Sinistra',\n right: 'Destra'\n }\n },\n type: {\n name: 'Tipo di bottone',\n description: 'Imposta il tipo di bottone',\n default: 'button',\n control: 'select',\n if:{\n arg: 'anchor',\n eq: false\n },\n options: [\n 'button',\n 'submit',\n 'reset'\n ],\n labels: {\n button: 'button',\n submit: 'submit',\n reset: 'reset',\n }\n },\n name: {\n name: 'Nome del bottone',\n description: 'Imposta il nome del bottone',\n control: 'text',\n if:{\n arg: 'href',\n exists: false\n }\n },\n value: {\n name: 'Value del bottone',\n description: 'Imposta il value del bottone',\n control: 'text',\n if:{\n arg: 'href',\n exists: false\n }\n },\n ariaLabel: {\n name: 'Aria Label',\n description: 'Imposta aria label',\n control: 'text',\n },\n href: {\n name: 'Href',\n description: 'Imposta l\\'href del link',\n control: 'text',\n },\n target: {\n name: 'Target',\n description: 'Imposta il target del link',\n default: '_self',\n control: 'select',\n if:{\n arg: 'href',\n exists: true\n },\n options: [\n '_blank',\n '_parent',\n '_self',\n '_top'\n ],\n labels: {\n _blank: '_blank',\n _parent: '_parent',\n _self: '_self',\n _top: '_top'\n }\n },\n\n }\n};\n\n// regular expression to remove all the spaces indenting the template string\n\n\n// const AnchorTemplate = (args) => \n// `${ `<jump-button 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>` : ''}\n// </jump-button>`.replace(/\\s\\s+/g, '')\n// }`;\n\nconst Template = (args) => \n`${ \n args.href ? \n `<jump-button\n variant=\"${args.variant}\" \n size=\"${args.size}\" \n href=\"${args.href}\" \n target=\"${args.target}\" \n ariaLabel=\"${args.ariaLabel}\" \n ${args.pill == true ? ' pill' : ''} \n ${args.outline == true ? ' outline' : ''}\n ${args.text == true ? ' text' : ''}\n ${ !args.label || args.iconOnly ? ' only-icon' : ''}>\n ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot=\"prefix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n ${ !args.iconOnly ? args.label : ''}\n ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot=\"suffix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n </jump-button>`\n :\n !args.label && !args.showIcon ? 'Errore nella configurazione del bottone' : \n `<jump-button \n variant=\"${args.variant}\" \n size=\"${args.size}\" \n type=\"${args.type}\" \n ariaLabel=\"${args.ariaLabel}\" \n name=\"${args.name}\" \n value=\"${args.value}\" \n ${args.disabled == true ? ' disabled' : ''} \n ${args.pill == true ? ' pill' : ''} \n ${args.outline == true ? ' outline' : ''}\n ${args.text == true ? ' text' : ''} \n ${ !args.label || args.iconOnly ? ' only-icon' : ''}>\n ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot=\"prefix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n ${ !args.iconOnly ? args.label : ''}\n ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot=\"suffix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n </jump-button>`\n}`;\n\n// TODO: gestire la prop che è opzione: cmq se copio il codice e tolgo le props undefined dovrebbe andare tutto\n\nexport const Name = Template.bind({});\nName.args = {\n label: 'Primary',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n name: 'sono un nome'\n};\n\nexport const Primary = Template.bind({});\nPrimary.args = {\n label: 'Primary',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left'\n};\n\nexport const OutlinePrimary = Template.bind({});\nOutlinePrimary.args = {\n label: 'Outline Primary',\n variant: 'primary',\n outline: true,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left'\n};\n\nexport const PillPrimary = Template.bind({});\nPillPrimary.args = {\n label: 'Pill Primary',\n variant: 'primary',\n outline: false,\n pill: true,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left'\n};\n\nexport const OutlinePillPrimary = Template.bind({});\nOutlinePillPrimary.args = {\n label: 'Pill Primary',\n variant: 'primary',\n outline: true,\n pill: true,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left'\n};\n\nexport const Disabled = Template.bind({});\nDisabled.args = {\n label: 'Disabled',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: true,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left'\n};\n\nexport const Text = Template.bind({});\nText.args = {\n label: 'Text',\n variant: 'secondary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left'\n};\n\n// 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' : ''}>\n// ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot=\"prefix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n// ${args.label}\n// ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot=\"suffix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n// </jump-button>`;\n// export const WithIcon = TemplateWithIcon.bind({});\n// WithIcon.args = {\n// label: 'Primary',\n// variant: 'primary',\n// outline: false,\n// pill: false,\n// size: 'medium',\n// disabled: false,\n// text: false,\n// showIcon: true,\n// iconName: 'home',\n// iconPosition: 'left'\n// };\n\n// 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' : ''}>\n// ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot=\"prefix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n// ${args.label}\n// ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot=\"suffix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n// </jump-button>`;\n// export const WithOnlyIcon = TemplateWithOnlyIcon.bind({});\n// WithOnlyIcon.args = {\n// label: '',\n// variant: 'primary',\n// outline: false,\n// pill: true,\n// size: 'medium',\n// disabled: false,\n// text: false,\n// showIcon: true,\n// iconName: 'home',\n// iconPosition: 'left',\n// };\n"]}
|
|
1
|
+
{"version":3,"file":"jump-button.stories.js","sourceRoot":"","sources":["../../../src/components/jump-button/jump-button.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,MAAM;SAChB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,SAAS;gBACT,WAAW;aACZ;SACF;QACD,OAAO,EAAG;YACR,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,SAAS;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,OAAO;gBACP,QAAQ;gBACR,OAAO;aACR;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,QAAQ;aAChB;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,4EAA4E;YACzF,OAAO,EAAE,SAAS;SACnB;QACD,Q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AK;IACX,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,MAAM;IAChB,YAAY,EAAE,MAAM;IACpB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAGF,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACV,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACvC,YAAY,EAAE,MAAM;IACpB,IAAI,EAAC,kBAAkB;IACvB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAGF,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxD,cAAc,CAAC,IAAI,GAAG;IACpB,KAAK,EAAE,gBAAgB;IACvB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,aAAa;IACvB,YAAY,EAAE,OAAO;IACrB,IAAI,EAAE,eAAe;IACrB,SAAS,EAAE,iBAAiB;CAC7B,CAAC","sourcesContent":["import feather from 'feather-icons';\n\nexport default {\n title: 'Components/Atoms/Button',\n tags: ['autodocs'],\n argTypes: {\n label: {\n name: 'Etichetta',\n description: 'Imposta il testo del bottone',\n control: 'text'\n },\n variant: {\n name: 'Variante',\n description: 'Imposta la variante di colore del bottone',\n control: 'select',\n options: [\n 'primary',\n 'secondary'\n ],\n },\n outline : {\n name: 'Outline',\n description: 'Imposta se il bottone deve avere il solo bordo',\n control: 'boolean'\n },\n size: {\n name: 'Dimensione',\n description: 'Imposta la dimensione del bottone',\n control: 'select',\n options: [\n 'small',\n 'medium',\n 'large'\n ],\n labels: {\n small: 'Piccolo',\n medium: 'Medio',\n large: 'Grande'\n }\n },\n pill: {\n name: 'Bordo a Pillola',\n description: 'Imposta se il bottone deve avere il bordo completamente stondato a pillola',\n control: 'boolean'\n },\n disabled: {\n name: 'Disabilitato',\n description: 'Imposta se il bottone deve essere disabilitato',\n control: 'boolean'\n },\n text: {\n name: 'Testo',\n description: 'Imposta se il bottone è solo testo, quindi senza bordo, sfondo e padding',\n control: 'boolean'\n },\n showIcon: {\n name: 'Mostra Icona',\n description: 'Imposta se il bottone deve mostrare un\\'icona',\n control: 'boolean'\n },\n iconOnly: {\n name: 'Mostra solo Icona',\n description: 'Imposta se il bottone deve mostrare solo l\\'icona',\n control: 'boolean',\n if: {\n arg: 'showIcon',\n eq: true\n },\n },\n iconName: {\n name: 'Nome Icona',\n control: 'select',\n options: Object.keys(feather.icons),\n description: 'Seleziona il nome dell\\'icona dal menu a tendina',\n defaultValue: Object.keys(feather.icons)[0],\n if: {\n arg: 'showIcon',\n eq: true\n },\n },\n iconPosition: {\n name: 'Posizione Icona',\n description: 'Imposta la posizione dell\\'icona',\n defaultValue: 'left',\n control: 'select',\n options: [\n 'left',\n 'right'\n ],\n if: {\n arg: 'showIcon',\n eq: true\n },\n labels: {\n left: 'Sinistra',\n right: 'Destra'\n }\n },\n type: {\n name: 'Tipo di bottone',\n description: 'Imposta il tipo di bottone',\n default: 'button',\n control: 'select',\n if:{\n arg: 'href',\n exists: false\n },\n options: [\n 'button',\n 'submit',\n 'reset'\n ],\n labels: {\n button: 'button',\n submit: 'submit',\n reset: 'reset',\n }\n },\n name: {\n name: 'Nome del bottone',\n description: 'Imposta il nome del bottone',\n control: 'text',\n if:{\n arg: 'href',\n exists: false\n }\n },\n value: {\n name: 'Value del bottone',\n description: 'Imposta il value del bottone',\n control: 'text',\n if:{\n arg: 'href',\n exists: false\n }\n },\n ariaLabel: {\n name: 'Aria Label',\n description: 'Imposta aria label',\n control: 'text',\n },\n href: {\n name: 'Href',\n description: 'Imposta l\\'href del link',\n control: 'text',\n },\n target: {\n name: 'Target',\n description: 'Imposta il target del link',\n default: '_self',\n control: 'select',\n if:{\n arg: 'href',\n exists: true\n },\n options: [\n '_blank',\n '_parent',\n '_self',\n '_top'\n ],\n labels: {\n _blank: '_blank',\n _parent: '_parent',\n _self: '_self',\n _top: '_top'\n }\n },\n\n }\n};\n\n// TODO: non far passare gli undefined\n\nconst Anchor = (args) => {\n 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>`\n}\n\nconst Button = (args) => {\n 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>`\n}\n\nconst Template = (args) => \n`${ args.href ? Anchor(args) : !args.label && !args.showIcon ? 'Errore nella configurazione del bottone' : Button(args)}`;\n\n// TODO: gestire la prop che è opzione: cmq se copio il codice e tolgo le props undefined dovrebbe andare tutto\n\nexport const Primary = Template.bind({});\nPrimary.args = {\n label: 'Primary',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\nexport const OutlinePrimary = Template.bind({});\nOutlinePrimary.args = {\n label: 'Outline Primary',\n variant: 'primary',\n outline: true,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\nexport const PillPrimary = Template.bind({});\nPillPrimary.args = {\n label: 'Pill Primary',\n variant: 'primary',\n outline: false,\n pill: true,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\nexport const OutlinePillPrimary = Template.bind({});\nOutlinePillPrimary.args = {\n label: 'Pill Primary',\n variant: 'primary',\n outline: true,\n pill: true,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\nexport const Disabled = Template.bind({});\nDisabled.args = {\n label: 'Disabled',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: true,\n text: false,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\nexport const TextSecondary = Template.bind({});\nTextSecondary.args = {\n label: 'Button Text',\n variant: 'secondary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\nexport const CustomButton = Template.bind({});\nCustomButton.args = {\n label: 'Sono un bottone custom',\n outline: false,\n pill: true,\n size: 'small',\n disabled: false,\n text: false,\n showIcon: true,\n iconOnly: false,\n iconName: 'message-circle',\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone',\n class: 'chat'\n};\n\n// 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>`;\n\nconst 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>`\n\n\nexport const ButtonWithIcon = TemplateWithIcon.bind({});\nButtonWithIcon.args = {\n label: 'Primary',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: true,\n iconName: 'home',\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\n// 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' : ''}\n// ${ !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>`;\n\nconst TemplateWithOnlyIcon = (args) => \n `<jump-button \n variant=\"${args.variant}\" \n size=\"${args.size}\" \n type=\"${args.type}\" \n ariaLabel=\"${args.ariaLabel}\" \n name=\"${args.name}\" \n value=\"${args.value}\" \n ${args.disabled == true ? ' disabled' : ''}\n ${args.pill == true ? ' pill' : ''}\n ${args.outline == true ? ' outline' : ''}\n ${args.text == true ? ' text' : ''}\n ${ !args.label ? ' only-icon' : ''}>\n\n ${args.iconPosition == 'left' && args.showIcon ? `<jump-icon slot=\"prefix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n ${ args.label }\n ${args.iconPosition == 'right' && args.showIcon ? `<jump-icon slot=\"suffix\" name=\"${args.iconName}\"></jump-icon>` : ''}\n \n </jump-button>`\n\n\nexport const ButtonWithOnlyIcon = TemplateWithOnlyIcon.bind({});\nButtonWithOnlyIcon.args = {\n label: '',\n variant: 'primary',\n outline: false,\n pill: true,\n size: 'medium',\n disabled: false,\n text: false,\n showIcon: true,\n iconName: 'home',\n iconPosition: 'left',\n type: 'button',\n name: 'nome bottone',\n value: 'value bottone',\n ariaLabel: 'sono un bottone'\n};\n\n\nexport const Link = Template.bind({});\nLink.args = {\n label: 'Link',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: false,\n iconOnly: false,\n iconName: Object.keys(feather.icons)[0],\n iconPosition: 'left',\n href:'www.jumpgroup.it',\n target: '_blank',\n};\n\n\nexport const AnchorWithIcon = TemplateWithIcon.bind({});\nAnchorWithIcon.args = {\n label: 'Link with icon',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n showIcon: true,\n iconName: 'arrow-right',\n iconPosition: 'right',\n href: 'www.google.it',\n ariaLabel: 'sono un bottone'\n};\n\n\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const jumpButtonCss = "jump-button button{background-color:transparent;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer}jump-button{display:inline-flex;align-items:center;--jump-button-color:#ffffff;--jump-button-color-disabled:#cbcbcb;--jump-button-background:
|
|
3
|
+
const jumpButtonCss = "jump-button button,jump-button a{background-color:transparent;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer}jump-button{display:inline-flex;align-items:center;--jump-button-color:#ffffff;--jump-button-color-disabled:#cbcbcb;--jump-button-background:var(--primary-standard);--jump-button-background-outline:transparent;--jump-button-color-hover:#ffffff;--jump-button-background-hover:var(--primary-hard);--jump-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);--jump-button-padding:1rem 1.25rem}jump-button button,jump-button a{background-color:var(--jump-button-background);border-radius:var(--jump-button-border-radius);color:var(--jump-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(--jump-button-gap, 0.5rem);text-decoration:none;padding:var(--jump-button-padding)}jump-button button:hover,jump-button a:hover{background-color:var(--jump-button-background-hover);color:var(--jump-button-color-hover)}jump-button button[data-variant=primary],jump-button a[data-variant=primary]{--jump-button-color:var(--neutral-white);--jump-button-background:var(--primary-standard);--jump-button-color-hover:var(--neutral-white);--jump-button-background-hover:var(--primary-hard)}jump-button button[data-variant=secondary],jump-button a[data-variant=secondary]{--jump-button-color:var(--neutral-white);--jump-button-background:var(--secondary-standard);--jump-button-color-hover:var(--neutral-white);--jump-button-background-hover:var(--secondary-hard)}jump-button button[disabled],jump-button a[disabled]{--jump-button-background:var(--jump-button-color-disabled);--jump-button-background-hover:var(--jump-button-color-disabled);cursor:not-allowed}jump-button button[data-pill],jump-button a[data-pill]{border-radius:100rem}jump-button button[data-size=small],jump-button a[data-size=small]{font-size:var(--fs-300, 0.875rem);line-height:var(--lh-300, 1.2);--jump-button-padding:0.5rem 1rem}jump-button button[data-size=medium],jump-button a[data-size=medium]{font-size:var(--fs-400, 1rem);line-height:var(--lh-400, 1.3)}jump-button button[data-size=large],jump-button a[data-size=large]{font-size:var(--fs-500, 1.125rem);line-height:var(--lh-500, 1.4);--jump-button-padding:1.125rem 1.5rem}jump-button button[data-outline],jump-button a[data-outline]{background-color:var(--jump-button-background-outline);border:1px solid var(--jump-button-background);color:var(--jump-button-background)}jump-button button[data-outline]:hover,jump-button a[data-outline]:hover{background-color:var(--jump-button-background-hover);border:1px solid var(--jump-button-background-hover);color:var(--jump-button-color-hover)}jump-button button[data-text],jump-button a[data-text]{background-color:transparent;border:none;color:var(--jump-button-background);padding:0}jump-button button[data-text]:hover,jump-button a[data-text]:hover{background-color:transparent;border:none;color:var(--jump-button-background-hover)}jump-button button[data-only-icon],jump-button a[data-only-icon]{--jump-button-padding:1.125rem}jump-button button[data-only-icon][data-size=small],jump-button a[data-only-icon][data-size=small]{--jump-button-padding:0.5rem}jump-button button[data-only-icon][data-size=medium],jump-button a[data-only-icon][data-size=medium]{--jump-button-padding:1rem}jump-button button[data-only-icon][data-size=large],jump-button a[data-only-icon][data-size=large]{--jump-button-padding:1.125rem}jump-button button.chat,jump-button a.chat{--jump-button-color:var(--neutral-white);--jump-button-background:hsla(133, 54%, 58%, 1);--jump-button-color-hover:var(--neutral-white);--jump-button-background-hover:hsla(161, 63%, 31%, 1)}";
|
|
4
4
|
const JumpButtonStyle0 = jumpButtonCss;
|
|
5
5
|
|
|
6
6
|
const AppButton = /*@__PURE__*/ proxyCustomElement(class AppButton extends HTMLElement {
|
|
@@ -14,15 +14,16 @@ const AppButton = /*@__PURE__*/ proxyCustomElement(class AppButton extends HTMLE
|
|
|
14
14
|
this.pill = false;
|
|
15
15
|
this.text = false;
|
|
16
16
|
this.onlyIcon = false;
|
|
17
|
-
this.href =
|
|
17
|
+
this.href = undefined;
|
|
18
18
|
this.target = undefined;
|
|
19
19
|
this.type = 'button';
|
|
20
|
-
this.name =
|
|
21
|
-
this.value =
|
|
22
|
-
this.ariaLabel =
|
|
20
|
+
this.name = undefined;
|
|
21
|
+
this.value = undefined;
|
|
22
|
+
this.ariaLabel = undefined;
|
|
23
|
+
this.class = undefined;
|
|
23
24
|
}
|
|
24
25
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '74a02b6f19805b842eaa6c6060652225c0f0f255' }, this.href ? (h("a", { href: this.href, class: this.class, "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, "aria-label": this.ariaLabel, target: this.target }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" }))) : (h("button", { class: this.class, "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, "aria-label": this.ariaLabel, type: this.type, name: this.name, value: this.value }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" })))));
|
|
26
27
|
}
|
|
27
28
|
static get style() { return JumpButtonStyle0; }
|
|
28
29
|
}, [4, "jump-button", {
|
|
@@ -38,7 +39,8 @@ const AppButton = /*@__PURE__*/ proxyCustomElement(class AppButton extends HTMLE
|
|
|
38
39
|
"type": [513],
|
|
39
40
|
"name": [513],
|
|
40
41
|
"value": [513],
|
|
41
|
-
"ariaLabel": [513, "aria-label"]
|
|
42
|
+
"ariaLabel": [513, "aria-label"],
|
|
43
|
+
"class": [513]
|
|
42
44
|
}]);
|
|
43
45
|
function defineCustomElement$1() {
|
|
44
46
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-button.js","mappings":";;AAAA,MAAM,aAAa,GAAG,
|
|
1
|
+
{"file":"jump-button.js","mappings":";;AAAA,MAAM,aAAa,GAAG,o0HAAo0H,CAAC;AAC31H,yBAAe,aAAa;;MCMf,SAAS;;;;wBAIQ,KAAK;uBAK4C,SAAS;uBAK5C,KAAK;oBAKT,QAAQ;oBAKP,KAAK;oBAKL,KAAK;wBAKD,KAAK;oBAKV,SAAS;;oBAUU,QAAQ;oBAK3B,SAAS;qBAKR,SAAS;yBAKL,SAAS;qBAKb,SAAS;;IAEhD,MAAM;QACJ,QACE,EAAC,IAAI,uDACF,IAAI,CAAC,IAAI,IACR,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,kBAAgB,IAAI,CAAC,OAAO,kBAAgB,IAAI,CAAC,OAAO,eAAa,IAAI,CAAC,IAAI,eAAa,IAAI,CAAC,IAAI,eAAa,IAAI,CAAC,IAAI,oBAAkB,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAC7O,YAAM,IAAI,EAAC,QAAQ,GAAQ,EAC1B,CAAC,IAAI,CAAC,QAAQ,IAAI,eAAa,EAChC,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACzB,KAEJ,cAAQ,KAAK,EAAE,IAAI,CAAC,KAAK,kBAAgB,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,gBAAc,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAC1R,YAAM,IAAI,EAAC,QAAQ,GAAQ,EAC1B,CAAC,IAAI,CAAC,QAAQ,IAAI,eAAa,EAChC,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB,CACV,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/jump-button/jump-button.scss?tag=jump-button","src/components/jump-button/jump-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\njump-button {\n display: inline-flex;\n align-items: center;\n --jump-button-color: #ffffff;\n --jump-button-color-disabled: #cbcbcb;\n --jump-button-background: var(--primary-standard);\n --jump-button-background-outline: transparent;\n --jump-button-color-hover: #ffffff;\n --jump-button-background-hover: var(--primary-hard);\n --jump-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 --jump-button-padding: 1rem 1.25rem;\n\n button,\n a {\n @extend %reset-button;\n background-color: var(--jump-button-background);\n border-radius: var(--jump-button-border-radius);\n color: var(--jump-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(--jump-button-gap, 0.5rem);\n text-decoration: none;\n\n //TODO: internal padding of the button\n padding: var(--jump-button-padding);\n\n // TODO: gestire il focus con un outline\n &:hover {\n background-color: var(--jump-button-background-hover);\n color: var(--jump-button-color-hover);\n }\n\n &[data-variant='primary'] {\n --jump-button-color: var(--neutral-white);\n --jump-button-background: var(--primary-standard);\n --jump-button-color-hover: var(--neutral-white);\n --jump-button-background-hover: var(--primary-hard);\n }\n\n &[data-variant='secondary'] {\n --jump-button-color: var(--neutral-white);\n --jump-button-background: var(--secondary-standard);\n --jump-button-color-hover: var(--neutral-white);\n --jump-button-background-hover: var(--secondary-hard);\n }\n\n &[disabled] {\n --jump-button-background: var(--jump-button-color-disabled);\n --jump-button-background-hover: var(--jump-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 --jump-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 --jump-button-padding: 1.125rem 1.5rem;\n }\n\n &[data-outline] {\n background-color: var(--jump-button-background-outline);\n border: 1px solid var(--jump-button-background);\n color: var(--jump-button-background);\n &:hover {\n background-color: var(--jump-button-background-hover);\n border: 1px solid var(--jump-button-background-hover);\n color: var(--jump-button-color-hover);\n }\n }\n\n &[data-text] {\n background-color: transparent;\n border: none;\n color: var(--jump-button-background);\n padding: 0;\n &:hover {\n background-color: transparent;\n border: none;\n color: var(--jump-button-background-hover);\n }\n }\n\n &[data-only-icon] {\n --jump-button-padding: 1.125rem;\n }\n &[data-only-icon][data-size='small'] {\n --jump-button-padding: 0.5rem;\n }\n &[data-only-icon][data-size='medium'] {\n --jump-button-padding: 1rem;\n }\n &[data-only-icon][data-size='large'] {\n --jump-button-padding: 1.125rem;\n }\n\n &.chat {\n --jump-button-color: var(--neutral-white);\n --jump-button-background: hsla(133, 54%, 58%, 1);\n --jump-button-color-hover: var(--neutral-white);\n --jump-button-background-hover: hsla(161, 63%, 31%, 1);\n }\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'jump-button',\n styleUrl: 'jump-button.scss',\n shadow: false,\n})\nexport class AppButton {\n /**\n * Set the button as disabled; Vale solo per i bottoni\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Indicates the variant of the button\n */\n @Prop({reflect: true}) variant: 'primary'|'secondary'|'tertiary'|'neutral' = '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 /**\n * Indicates if button becames a anchor\n **/\n @Prop({reflect: true}) href: string = undefined;\n\n /**\n * Indicates the type of anchor's target \n **/\n @Prop({reflect: true}) target: '_blank' | '_parent' | '_self' | '_top'\n\n /**\n * Indicates type button\n **/\n @Prop({reflect: true}) type: 'button'|'submit'|'reset' = 'button';\n\n /**\n * Indicates the name that the sender button will send\n **/\n @Prop({reflect: true}) name: string = undefined;\n\n /**\n * Indicates the value that the sender button will send\n **/\n @Prop({reflect: true}) value: string = undefined;\n\n /**\n * Indicates the value of text alternative to an element that has no visible text on the screen\n **/\n @Prop({reflect: true}) ariaLabel: string = undefined;\n \n /**\n * Indicates classes of the component\n **/\n @Prop({reflect: true}) class: string = undefined;\n\n render() {\n return (\n <Host>\n {this.href ? (\n <a href={this.href} class={this.class} 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} aria-label={this.ariaLabel} target={this.target}>\n <slot name=\"prefix\"></slot>\n {!this.onlyIcon && <slot></slot>}\n <slot name=\"suffix\"></slot>\n </a>\n ) : ( \n <button class={this.class} 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} aria-label={this.ariaLabel} type={this.type} name={this.name} value={this.value}>\n <slot name=\"prefix\"></slot>\n {!this.onlyIcon && <slot></slot> }\n <slot name=\"suffix\"></slot>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-b0176170.js';
|
|
2
2
|
|
|
3
|
-
const jumpButtonCss = "jump-button button{background-color:transparent;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer}jump-button{display:inline-flex;align-items:center;--jump-button-color:#ffffff;--jump-button-color-disabled:#cbcbcb;--jump-button-background:
|
|
3
|
+
const jumpButtonCss = "jump-button button,jump-button a{background-color:transparent;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer}jump-button{display:inline-flex;align-items:center;--jump-button-color:#ffffff;--jump-button-color-disabled:#cbcbcb;--jump-button-background:var(--primary-standard);--jump-button-background-outline:transparent;--jump-button-color-hover:#ffffff;--jump-button-background-hover:var(--primary-hard);--jump-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);--jump-button-padding:1rem 1.25rem}jump-button button,jump-button a{background-color:var(--jump-button-background);border-radius:var(--jump-button-border-radius);color:var(--jump-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(--jump-button-gap, 0.5rem);text-decoration:none;padding:var(--jump-button-padding)}jump-button button:hover,jump-button a:hover{background-color:var(--jump-button-background-hover);color:var(--jump-button-color-hover)}jump-button button[data-variant=primary],jump-button a[data-variant=primary]{--jump-button-color:var(--neutral-white);--jump-button-background:var(--primary-standard);--jump-button-color-hover:var(--neutral-white);--jump-button-background-hover:var(--primary-hard)}jump-button button[data-variant=secondary],jump-button a[data-variant=secondary]{--jump-button-color:var(--neutral-white);--jump-button-background:var(--secondary-standard);--jump-button-color-hover:var(--neutral-white);--jump-button-background-hover:var(--secondary-hard)}jump-button button[disabled],jump-button a[disabled]{--jump-button-background:var(--jump-button-color-disabled);--jump-button-background-hover:var(--jump-button-color-disabled);cursor:not-allowed}jump-button button[data-pill],jump-button a[data-pill]{border-radius:100rem}jump-button button[data-size=small],jump-button a[data-size=small]{font-size:var(--fs-300, 0.875rem);line-height:var(--lh-300, 1.2);--jump-button-padding:0.5rem 1rem}jump-button button[data-size=medium],jump-button a[data-size=medium]{font-size:var(--fs-400, 1rem);line-height:var(--lh-400, 1.3)}jump-button button[data-size=large],jump-button a[data-size=large]{font-size:var(--fs-500, 1.125rem);line-height:var(--lh-500, 1.4);--jump-button-padding:1.125rem 1.5rem}jump-button button[data-outline],jump-button a[data-outline]{background-color:var(--jump-button-background-outline);border:1px solid var(--jump-button-background);color:var(--jump-button-background)}jump-button button[data-outline]:hover,jump-button a[data-outline]:hover{background-color:var(--jump-button-background-hover);border:1px solid var(--jump-button-background-hover);color:var(--jump-button-color-hover)}jump-button button[data-text],jump-button a[data-text]{background-color:transparent;border:none;color:var(--jump-button-background);padding:0}jump-button button[data-text]:hover,jump-button a[data-text]:hover{background-color:transparent;border:none;color:var(--jump-button-background-hover)}jump-button button[data-only-icon],jump-button a[data-only-icon]{--jump-button-padding:1.125rem}jump-button button[data-only-icon][data-size=small],jump-button a[data-only-icon][data-size=small]{--jump-button-padding:0.5rem}jump-button button[data-only-icon][data-size=medium],jump-button a[data-only-icon][data-size=medium]{--jump-button-padding:1rem}jump-button button[data-only-icon][data-size=large],jump-button a[data-only-icon][data-size=large]{--jump-button-padding:1.125rem}jump-button button.chat,jump-button a.chat{--jump-button-color:var(--neutral-white);--jump-button-background:hsla(133, 54%, 58%, 1);--jump-button-color-hover:var(--neutral-white);--jump-button-background-hover:hsla(161, 63%, 31%, 1)}";
|
|
4
4
|
const JumpButtonStyle0 = jumpButtonCss;
|
|
5
5
|
|
|
6
6
|
const AppButton = class {
|
|
@@ -13,15 +13,16 @@ const AppButton = class {
|
|
|
13
13
|
this.pill = false;
|
|
14
14
|
this.text = false;
|
|
15
15
|
this.onlyIcon = false;
|
|
16
|
-
this.href =
|
|
16
|
+
this.href = undefined;
|
|
17
17
|
this.target = undefined;
|
|
18
18
|
this.type = 'button';
|
|
19
|
-
this.name =
|
|
20
|
-
this.value =
|
|
21
|
-
this.ariaLabel =
|
|
19
|
+
this.name = undefined;
|
|
20
|
+
this.value = undefined;
|
|
21
|
+
this.ariaLabel = undefined;
|
|
22
|
+
this.class = undefined;
|
|
22
23
|
}
|
|
23
24
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '74a02b6f19805b842eaa6c6060652225c0f0f255' }, this.href ? (h("a", { href: this.href, class: this.class, "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, "aria-label": this.ariaLabel, target: this.target }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" }))) : (h("button", { class: this.class, "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, "aria-label": this.ariaLabel, type: this.type, name: this.name, value: this.value }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" })))));
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
AppButton.style = JumpButtonStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-button.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,
|
|
1
|
+
{"file":"jump-button.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,o0HAAo0H,CAAC;AAC31H,yBAAe,aAAa;;MCMf,SAAS;;;wBAIQ,KAAK;uBAK4C,SAAS;uBAK5C,KAAK;oBAKT,QAAQ;oBAKP,KAAK;oBAKL,KAAK;wBAKD,KAAK;oBAKV,SAAS;;oBAUU,QAAQ;oBAK3B,SAAS;qBAKR,SAAS;yBAKL,SAAS;qBAKb,SAAS;;IAEhD,MAAM;QACJ,QACE,EAAC,IAAI,uDACF,IAAI,CAAC,IAAI,IACR,SAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,kBAAgB,IAAI,CAAC,OAAO,kBAAgB,IAAI,CAAC,OAAO,eAAa,IAAI,CAAC,IAAI,eAAa,IAAI,CAAC,IAAI,eAAa,IAAI,CAAC,IAAI,oBAAkB,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAC7O,YAAM,IAAI,EAAC,QAAQ,GAAQ,EAC1B,CAAC,IAAI,CAAC,QAAQ,IAAI,eAAa,EAChC,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACzB,KAEJ,cAAQ,KAAK,EAAE,IAAI,CAAC,KAAK,kBAAgB,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,gBAAc,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAC1R,YAAM,IAAI,EAAC,QAAQ,GAAQ,EAC1B,CAAC,IAAI,CAAC,QAAQ,IAAI,eAAa,EAChC,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB,CACV,CACI,EACP;KACH;;;;;;","names":[],"sources":["src/components/jump-button/jump-button.scss?tag=jump-button","src/components/jump-button/jump-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\njump-button {\n display: inline-flex;\n align-items: center;\n --jump-button-color: #ffffff;\n --jump-button-color-disabled: #cbcbcb;\n --jump-button-background: var(--primary-standard);\n --jump-button-background-outline: transparent;\n --jump-button-color-hover: #ffffff;\n --jump-button-background-hover: var(--primary-hard);\n --jump-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 --jump-button-padding: 1rem 1.25rem;\n\n button,\n a {\n @extend %reset-button;\n background-color: var(--jump-button-background);\n border-radius: var(--jump-button-border-radius);\n color: var(--jump-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(--jump-button-gap, 0.5rem);\n text-decoration: none;\n\n //TODO: internal padding of the button\n padding: var(--jump-button-padding);\n\n // TODO: gestire il focus con un outline\n &:hover {\n background-color: var(--jump-button-background-hover);\n color: var(--jump-button-color-hover);\n }\n\n &[data-variant='primary'] {\n --jump-button-color: var(--neutral-white);\n --jump-button-background: var(--primary-standard);\n --jump-button-color-hover: var(--neutral-white);\n --jump-button-background-hover: var(--primary-hard);\n }\n\n &[data-variant='secondary'] {\n --jump-button-color: var(--neutral-white);\n --jump-button-background: var(--secondary-standard);\n --jump-button-color-hover: var(--neutral-white);\n --jump-button-background-hover: var(--secondary-hard);\n }\n\n &[disabled] {\n --jump-button-background: var(--jump-button-color-disabled);\n --jump-button-background-hover: var(--jump-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 --jump-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 --jump-button-padding: 1.125rem 1.5rem;\n }\n\n &[data-outline] {\n background-color: var(--jump-button-background-outline);\n border: 1px solid var(--jump-button-background);\n color: var(--jump-button-background);\n &:hover {\n background-color: var(--jump-button-background-hover);\n border: 1px solid var(--jump-button-background-hover);\n color: var(--jump-button-color-hover);\n }\n }\n\n &[data-text] {\n background-color: transparent;\n border: none;\n color: var(--jump-button-background);\n padding: 0;\n &:hover {\n background-color: transparent;\n border: none;\n color: var(--jump-button-background-hover);\n }\n }\n\n &[data-only-icon] {\n --jump-button-padding: 1.125rem;\n }\n &[data-only-icon][data-size='small'] {\n --jump-button-padding: 0.5rem;\n }\n &[data-only-icon][data-size='medium'] {\n --jump-button-padding: 1rem;\n }\n &[data-only-icon][data-size='large'] {\n --jump-button-padding: 1.125rem;\n }\n\n &.chat {\n --jump-button-color: var(--neutral-white);\n --jump-button-background: hsla(133, 54%, 58%, 1);\n --jump-button-color-hover: var(--neutral-white);\n --jump-button-background-hover: hsla(161, 63%, 31%, 1);\n }\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'jump-button',\n styleUrl: 'jump-button.scss',\n shadow: false,\n})\nexport class AppButton {\n /**\n * Set the button as disabled; Vale solo per i bottoni\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Indicates the variant of the button\n */\n @Prop({reflect: true}) variant: 'primary'|'secondary'|'tertiary'|'neutral' = '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 /**\n * Indicates if button becames a anchor\n **/\n @Prop({reflect: true}) href: string = undefined;\n\n /**\n * Indicates the type of anchor's target \n **/\n @Prop({reflect: true}) target: '_blank' | '_parent' | '_self' | '_top'\n\n /**\n * Indicates type button\n **/\n @Prop({reflect: true}) type: 'button'|'submit'|'reset' = 'button';\n\n /**\n * Indicates the name that the sender button will send\n **/\n @Prop({reflect: true}) name: string = undefined;\n\n /**\n * Indicates the value that the sender button will send\n **/\n @Prop({reflect: true}) value: string = undefined;\n\n /**\n * Indicates the value of text alternative to an element that has no visible text on the screen\n **/\n @Prop({reflect: true}) ariaLabel: string = undefined;\n \n /**\n * Indicates classes of the component\n **/\n @Prop({reflect: true}) class: string = undefined;\n\n render() {\n return (\n <Host>\n {this.href ? (\n <a href={this.href} class={this.class} 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} aria-label={this.ariaLabel} target={this.target}>\n <slot name=\"prefix\"></slot>\n {!this.onlyIcon && <slot></slot>}\n <slot name=\"suffix\"></slot>\n </a>\n ) : ( \n <button class={this.class} 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} aria-label={this.ariaLabel} type={this.type} name={this.name} value={this.value}>\n <slot name=\"prefix\"></slot>\n {!this.onlyIcon && <slot></slot> }\n <slot name=\"suffix\"></slot>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"],"version":3}
|