@jumpgroup/jump-design-system 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-12f40d28.js → index-41aaa52a.js} +125 -5
- package/dist/cjs/index-41aaa52a.js.map +1 -0
- package/dist/cjs/jump-badge.cjs.entry.js +6 -6
- package/dist/cjs/jump-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-button.cjs.entry.js +4 -3
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-card.cjs.entry.js +3 -3
- package/dist/cjs/jump-card.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-design-system.cjs.js +3 -3
- package/dist/cjs/jump-design-system.cjs.js.map +1 -1
- package/dist/cjs/jump-icon.cjs.entry.js +5 -5
- package/dist/cjs/jump-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +32 -10
- package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab.cjs.entry.js +29 -0
- package/dist/cjs/jump-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/jump-badge/jump-badge.css +1 -1
- package/dist/collection/components/jump-badge/jump-badge.js +4 -4
- package/dist/collection/components/jump-badge/jump-badge.js.map +1 -1
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js +2 -2
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js +13 -179
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js +10 -172
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-filled.stories.js +13 -227
- package/dist/collection/components/jump-button/jump-button-filled.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js +12 -245
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-outline.stories.js +18 -214
- package/dist/collection/components/jump-button/jump-button-outline.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-text.stories.js +10 -216
- package/dist/collection/components/jump-button/jump-button-text.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button.css +11 -7
- package/dist/collection/components/jump-button/jump-button.js +22 -3
- package/dist/collection/components/jump-button/jump-button.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card.js +13 -13
- package/dist/collection/components/jump-card/jump-card.js.map +1 -1
- package/dist/collection/components/{app-icon → jump-icon}/jump-icon.js +2 -2
- package/dist/collection/components/jump-icon/jump-icon.js.map +1 -0
- package/dist/collection/components/{app-icon → jump-icon}/jump-icon.stories.js +1 -1
- package/dist/collection/components/jump-icon/jump-icon.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/test/jump-icon.e2e.js.map +1 -0
- package/dist/collection/components/{app-icon → jump-icon}/test/jump-icon.spec.js +2 -2
- package/dist/collection/components/jump-icon/test/jump-icon.spec.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js +41 -24
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination-products.stories.js +19 -40
- package/dist/collection/components/jump-pagination/jump-pagination-products.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination.css +13 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js +64 -31
- package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -1
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js +28 -0
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js.map +1 -0
- package/dist/collection/components/jump-tab/jump-tab.css +3 -0
- package/dist/collection/components/jump-tab/jump-tab.js +71 -0
- package/dist/collection/components/jump-tab/jump-tab.js.map +1 -0
- package/dist/collection/components/jump-tab/test/jump-tab.e2e.js +10 -0
- package/dist/collection/components/jump-tab/test/jump-tab.e2e.js.map +1 -0
- package/dist/collection/components/jump-tab/test/jump-tab.spec.js +18 -0
- package/dist/collection/components/jump-tab/test/jump-tab.spec.js.map +1 -0
- package/dist/collection/utils/utils.js +17 -4
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/jump-badge.js +7 -7
- package/dist/components/jump-badge.js.map +1 -1
- package/dist/components/jump-button.js +4 -2
- package/dist/components/jump-button.js.map +1 -1
- package/dist/components/jump-card.js +13 -13
- package/dist/components/jump-card.js.map +1 -1
- package/dist/components/jump-icon.js +2 -2
- package/dist/components/jump-icon2.js +4 -4
- package/dist/components/jump-icon2.js.map +1 -1
- package/dist/components/jump-pagination.js +38 -13
- package/dist/components/jump-pagination.js.map +1 -1
- package/dist/components/jump-tab.d.ts +11 -0
- package/dist/components/jump-tab.js +46 -0
- package/dist/components/jump-tab.js.map +1 -0
- package/dist/esm/{index-d09b8a38.js → index-192aeaf1.js} +125 -6
- package/dist/esm/index-192aeaf1.js.map +1 -0
- package/dist/esm/jump-badge.entry.js +6 -6
- package/dist/esm/jump-badge.entry.js.map +1 -1
- package/dist/esm/jump-button.entry.js +4 -3
- package/dist/esm/jump-button.entry.js.map +1 -1
- package/dist/esm/jump-card.entry.js +3 -3
- package/dist/esm/jump-card.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +4 -4
- package/dist/esm/jump-design-system.js.map +1 -1
- package/dist/esm/jump-icon.entry.js +5 -5
- package/dist/esm/jump-icon.entry.js.map +1 -1
- package/dist/esm/jump-pagination.entry.js +32 -10
- package/dist/esm/jump-pagination.entry.js.map +1 -1
- package/dist/esm/jump-tab.entry.js +25 -0
- package/dist/esm/jump-tab.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-20ceb40c.js +3 -0
- package/dist/jump-design-system/p-20ceb40c.js.map +1 -0
- package/dist/jump-design-system/{p-b2967e30.entry.js → p-511d4425.entry.js} +3 -3
- package/dist/jump-design-system/p-511d4425.entry.js.map +1 -0
- package/dist/jump-design-system/p-61729377.entry.js +2 -0
- package/dist/jump-design-system/p-61729377.entry.js.map +1 -0
- package/dist/jump-design-system/{p-fea57bd7.entry.js → p-700b96b4.entry.js} +2 -2
- package/dist/jump-design-system/{p-fea57bd7.entry.js.map → p-700b96b4.entry.js.map} +1 -1
- package/dist/jump-design-system/p-87256ed6.entry.js +2 -0
- package/dist/jump-design-system/p-87256ed6.entry.js.map +1 -0
- package/dist/jump-design-system/{p-81fba573.entry.js → p-8f5caf32.entry.js} +2 -2
- package/dist/jump-design-system/p-8f5caf32.entry.js.map +1 -0
- package/dist/jump-design-system/p-9e47f451.entry.js +2 -0
- package/dist/jump-design-system/p-9e47f451.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +20 -7
- package/dist/types/components/jump-badge/jump-badge.d.ts +1 -1
- package/dist/types/components/jump-button/jump-button-anchor.stories.d.ts +0 -116
- package/dist/types/components/jump-button/jump-button-dimension.stories.d.ts +2 -117
- package/dist/types/components/jump-button/jump-button-filled.stories.d.ts +1 -107
- package/dist/types/components/jump-button/jump-button-only-icon.stories.d.ts +4 -115
- package/dist/types/components/jump-button/jump-button-outline.stories.d.ts +4 -110
- package/dist/types/components/jump-button/jump-button-text.stories.d.ts +2 -123
- package/dist/types/components/jump-button/jump-button.d.ts +5 -1
- package/dist/types/components/{app-icon → jump-icon}/jump-icon.d.ts +1 -1
- package/dist/types/components/jump-pagination/jump-pagination-pages.stories.d.ts +2 -1
- package/dist/types/components/jump-pagination/jump-pagination-products.stories.d.ts +2 -2
- package/dist/types/components/jump-pagination/jump-pagination.d.ts +10 -8
- package/dist/types/components/jump-tab/jump-tab-inline.stories.d.ts +18 -0
- package/dist/types/components/jump-tab/jump-tab.d.ts +6 -0
- package/dist/types/components.d.ts +47 -14
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +3 -2
- package/dist/cjs/index-12f40d28.js.map +0 -1
- package/dist/collection/components/app-icon/jump-icon.js.map +0 -1
- package/dist/collection/components/app-icon/jump-icon.stories.js.map +0 -1
- package/dist/collection/components/app-icon/test/jump-icon.e2e.js.map +0 -1
- package/dist/collection/components/app-icon/test/jump-icon.spec.js.map +0 -1
- package/dist/collection/utils/utils.spec.js +0 -16
- package/dist/collection/utils/utils.spec.js.map +0 -1
- package/dist/esm/index-d09b8a38.js.map +0 -1
- package/dist/jump-design-system/p-062fa189.entry.js +0 -2
- package/dist/jump-design-system/p-062fa189.entry.js.map +0 -1
- package/dist/jump-design-system/p-407027a9.js +0 -3
- package/dist/jump-design-system/p-407027a9.js.map +0 -1
- package/dist/jump-design-system/p-81fba573.entry.js.map +0 -1
- package/dist/jump-design-system/p-b2967e30.entry.js.map +0 -1
- package/dist/jump-design-system/p-e0c9453d.entry.js +0 -2
- package/dist/jump-design-system/p-e0c9453d.entry.js.map +0 -1
- /package/dist/collection/components/{app-icon → jump-icon}/jump-icon.css +0 -0
- /package/dist/collection/components/{app-icon → jump-icon}/test/jump-icon.e2e.js +0 -0
- /package/dist/types/components/{app-icon → jump-icon}/jump-icon.stories.d.ts +0 -0
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import feather from "feather-icons";
|
|
2
1
|
import { generateAttributesFromArgs } from "../../utils/utils";
|
|
3
2
|
export default {
|
|
4
3
|
title: 'Components/Button/OnlyIcon',
|
|
5
4
|
tags: ['autodocs'],
|
|
6
5
|
argTypes: {
|
|
7
|
-
label: {
|
|
8
|
-
name: 'Etichetta',
|
|
9
|
-
description: 'Imposta il testo del bottone',
|
|
10
|
-
control: 'text'
|
|
11
|
-
},
|
|
12
6
|
variant: {
|
|
13
7
|
name: 'Variante',
|
|
14
8
|
description: 'Imposta la variante di colore del bottone',
|
|
@@ -50,124 +44,6 @@ export default {
|
|
|
50
44
|
description: 'Imposta se il bottone deve essere disabilitato',
|
|
51
45
|
control: 'boolean'
|
|
52
46
|
},
|
|
53
|
-
text: {
|
|
54
|
-
name: 'Testo',
|
|
55
|
-
description: 'Imposta se il bottone è solo testo, quindi senza bordo, sfondo e padding',
|
|
56
|
-
control: 'boolean'
|
|
57
|
-
},
|
|
58
|
-
showIcon: {
|
|
59
|
-
name: 'Mostra Icona',
|
|
60
|
-
description: 'Imposta se il bottone deve mostrare un\'icona',
|
|
61
|
-
control: 'boolean'
|
|
62
|
-
},
|
|
63
|
-
iconOnly: {
|
|
64
|
-
name: 'Mostra solo Icona',
|
|
65
|
-
description: 'Imposta se il bottone deve mostrare solo l\'icona',
|
|
66
|
-
control: 'boolean',
|
|
67
|
-
if: {
|
|
68
|
-
arg: 'showIcon',
|
|
69
|
-
eq: true
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
iconName: {
|
|
73
|
-
name: 'Nome Icona',
|
|
74
|
-
control: 'select',
|
|
75
|
-
options: Object.keys(feather.icons),
|
|
76
|
-
description: 'Seleziona il nome dell\'icona dal menu a tendina',
|
|
77
|
-
defaultValue: Object.keys(feather.icons)[0],
|
|
78
|
-
if: {
|
|
79
|
-
arg: 'showIcon',
|
|
80
|
-
eq: true
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
iconPosition: {
|
|
84
|
-
name: 'Posizione Icona',
|
|
85
|
-
description: 'Imposta la posizione dell\'icona',
|
|
86
|
-
defaultValue: 'left',
|
|
87
|
-
control: 'select',
|
|
88
|
-
options: [
|
|
89
|
-
'left',
|
|
90
|
-
'right'
|
|
91
|
-
],
|
|
92
|
-
if: {
|
|
93
|
-
arg: 'showIcon',
|
|
94
|
-
eq: true
|
|
95
|
-
},
|
|
96
|
-
labels: {
|
|
97
|
-
left: 'Sinistra',
|
|
98
|
-
right: 'Destra'
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
type: {
|
|
102
|
-
name: 'Tipo di bottone',
|
|
103
|
-
description: 'Imposta il tipo di bottone',
|
|
104
|
-
default: 'button',
|
|
105
|
-
control: 'select',
|
|
106
|
-
if: {
|
|
107
|
-
arg: 'href',
|
|
108
|
-
exists: false
|
|
109
|
-
},
|
|
110
|
-
options: [
|
|
111
|
-
'button',
|
|
112
|
-
'submit',
|
|
113
|
-
'reset'
|
|
114
|
-
],
|
|
115
|
-
labels: {
|
|
116
|
-
button: 'button',
|
|
117
|
-
submit: 'submit',
|
|
118
|
-
reset: 'reset',
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
name: {
|
|
122
|
-
name: 'Nome del bottone',
|
|
123
|
-
description: 'Imposta il nome del bottone',
|
|
124
|
-
control: 'text',
|
|
125
|
-
if: {
|
|
126
|
-
arg: 'href',
|
|
127
|
-
exists: false
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
value: {
|
|
131
|
-
name: 'Value del bottone',
|
|
132
|
-
description: 'Imposta il value del bottone',
|
|
133
|
-
control: 'text',
|
|
134
|
-
if: {
|
|
135
|
-
arg: 'href',
|
|
136
|
-
exists: false
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
ariaLabel: {
|
|
140
|
-
name: 'Aria Label',
|
|
141
|
-
description: 'Imposta aria label',
|
|
142
|
-
control: 'text',
|
|
143
|
-
},
|
|
144
|
-
href: {
|
|
145
|
-
name: 'Href',
|
|
146
|
-
description: 'Imposta l\'href del link',
|
|
147
|
-
control: 'text',
|
|
148
|
-
},
|
|
149
|
-
target: {
|
|
150
|
-
name: 'Target',
|
|
151
|
-
description: 'Imposta il target del link',
|
|
152
|
-
default: '_self',
|
|
153
|
-
control: 'select',
|
|
154
|
-
if: {
|
|
155
|
-
arg: 'href',
|
|
156
|
-
exists: true
|
|
157
|
-
},
|
|
158
|
-
options: [
|
|
159
|
-
'_blank',
|
|
160
|
-
'_parent',
|
|
161
|
-
'_self',
|
|
162
|
-
'_top'
|
|
163
|
-
],
|
|
164
|
-
labels: {
|
|
165
|
-
_blank: '_blank',
|
|
166
|
-
_parent: '_parent',
|
|
167
|
-
_self: '_self',
|
|
168
|
-
_top: '_top'
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
47
|
id: {
|
|
172
48
|
name: 'ID',
|
|
173
49
|
description: 'Imposta l\'id del bottone',
|
|
@@ -177,166 +53,57 @@ export default {
|
|
|
177
53
|
};
|
|
178
54
|
const Template = (args) => {
|
|
179
55
|
const attributes = generateAttributesFromArgs(args);
|
|
180
|
-
return `<jump-button ${attributes}
|
|
56
|
+
return `<jump-button ${attributes} only-icon> <jump-icon slot="suffix" name="arrow-right"></jump-icon> </jump-button>`;
|
|
181
57
|
};
|
|
182
58
|
export const Primary = Template.bind({});
|
|
183
59
|
Primary.args = {
|
|
184
|
-
label: '',
|
|
185
60
|
variant: 'primary',
|
|
186
|
-
|
|
187
|
-
pill: false,
|
|
188
|
-
size: 'medium',
|
|
189
|
-
disabled: false,
|
|
190
|
-
text: false,
|
|
191
|
-
iconOnly: true,
|
|
192
|
-
showIcon: true,
|
|
193
|
-
iconName: 'home',
|
|
194
|
-
iconPosition: 'left',
|
|
195
|
-
type: 'button',
|
|
196
|
-
name: 'nome bottone',
|
|
197
|
-
value: 'value bottone',
|
|
198
|
-
ariaLabel: 'sono un bottone'
|
|
61
|
+
size: 'small',
|
|
199
62
|
};
|
|
200
63
|
export const Secondary = Template.bind({});
|
|
201
64
|
Secondary.args = {
|
|
202
|
-
label: '',
|
|
203
65
|
variant: 'secondary',
|
|
204
|
-
outline: false,
|
|
205
|
-
pill: false,
|
|
206
66
|
size: 'medium',
|
|
207
|
-
disabled: false,
|
|
208
|
-
text: false,
|
|
209
|
-
iconOnly: true,
|
|
210
|
-
showIcon: true,
|
|
211
|
-
iconName: 'home',
|
|
212
|
-
iconPosition: 'left',
|
|
213
|
-
type: 'button',
|
|
214
|
-
name: 'nome bottone',
|
|
215
|
-
value: 'value bottone',
|
|
216
|
-
ariaLabel: 'sono un bottone'
|
|
217
67
|
};
|
|
218
68
|
export const Neutral = Template.bind({});
|
|
219
69
|
Neutral.args = {
|
|
220
|
-
label: '',
|
|
221
70
|
variant: 'neutral',
|
|
222
|
-
|
|
223
|
-
pill: false,
|
|
224
|
-
size: 'medium',
|
|
225
|
-
disabled: false,
|
|
226
|
-
text: false,
|
|
227
|
-
iconOnly: true,
|
|
228
|
-
showIcon: true,
|
|
229
|
-
iconName: 'home',
|
|
230
|
-
iconPosition: 'left',
|
|
231
|
-
type: 'button',
|
|
232
|
-
name: 'nome bottone',
|
|
233
|
-
value: 'value bottone',
|
|
234
|
-
ariaLabel: 'sono un bottone'
|
|
71
|
+
size: 'large',
|
|
235
72
|
};
|
|
236
73
|
export const White = Template.bind({});
|
|
237
74
|
White.args = {
|
|
238
|
-
label: '',
|
|
239
75
|
variant: 'white',
|
|
240
|
-
outline: false,
|
|
241
|
-
pill: false,
|
|
242
76
|
size: 'medium',
|
|
243
|
-
disabled: false,
|
|
244
|
-
text: false,
|
|
245
|
-
iconOnly: true,
|
|
246
|
-
showIcon: true,
|
|
247
|
-
iconName: 'home',
|
|
248
|
-
iconPosition: 'left',
|
|
249
|
-
type: 'button',
|
|
250
|
-
name: 'nome bottone',
|
|
251
|
-
value: 'value bottone',
|
|
252
|
-
ariaLabel: 'sono un bottone'
|
|
253
77
|
};
|
|
254
|
-
export const
|
|
255
|
-
|
|
256
|
-
label: '',
|
|
78
|
+
export const Pill = Template.bind({});
|
|
79
|
+
Pill.args = {
|
|
257
80
|
variant: 'primary',
|
|
258
|
-
outline: false,
|
|
259
81
|
pill: true,
|
|
260
82
|
size: 'medium',
|
|
261
|
-
disabled: false,
|
|
262
|
-
text: false,
|
|
263
|
-
iconOnly: true,
|
|
264
|
-
showIcon: true,
|
|
265
|
-
iconName: 'home',
|
|
266
|
-
iconPosition: 'left',
|
|
267
|
-
type: 'button',
|
|
268
|
-
name: 'nome bottone',
|
|
269
|
-
value: 'value bottone',
|
|
270
|
-
ariaLabel: 'sono un bottone'
|
|
271
83
|
};
|
|
272
|
-
export const
|
|
273
|
-
|
|
274
|
-
label: '',
|
|
84
|
+
export const noBackground = Template.bind({});
|
|
85
|
+
noBackground.args = {
|
|
275
86
|
variant: 'primary',
|
|
276
|
-
outline: false,
|
|
277
|
-
pill: false,
|
|
278
|
-
size: 'medium',
|
|
279
|
-
disabled: false,
|
|
280
87
|
text: true,
|
|
281
|
-
|
|
282
|
-
showIcon: true,
|
|
283
|
-
iconName: 'home',
|
|
284
|
-
iconPosition: 'left',
|
|
285
|
-
type: 'button',
|
|
286
|
-
name: 'nome bottone',
|
|
287
|
-
value: 'value bottone',
|
|
288
|
-
ariaLabel: 'sono un bottone'
|
|
88
|
+
size: 'medium',
|
|
289
89
|
};
|
|
290
|
-
export const
|
|
291
|
-
|
|
292
|
-
label: '',
|
|
90
|
+
export const outline = Template.bind({});
|
|
91
|
+
outline.args = {
|
|
293
92
|
variant: 'primary',
|
|
294
93
|
outline: true,
|
|
295
|
-
pill: false,
|
|
296
94
|
size: 'medium',
|
|
297
|
-
disabled: false,
|
|
298
|
-
text: false,
|
|
299
|
-
showIcon: true,
|
|
300
|
-
iconName: 'home',
|
|
301
|
-
iconPosition: 'left',
|
|
302
|
-
type: 'button',
|
|
303
|
-
name: 'nome bottone',
|
|
304
|
-
value: 'value bottone',
|
|
305
|
-
ariaLabel: 'sono un bottone'
|
|
306
95
|
};
|
|
307
|
-
export const
|
|
308
|
-
|
|
309
|
-
label: '',
|
|
96
|
+
export const outlinePill = Template.bind({});
|
|
97
|
+
outlinePill.args = {
|
|
310
98
|
variant: 'primary',
|
|
311
99
|
outline: true,
|
|
312
100
|
pill: true,
|
|
313
101
|
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
102
|
};
|
|
324
103
|
export const Disabled = Template.bind({});
|
|
325
104
|
Disabled.args = {
|
|
326
|
-
label: '',
|
|
327
105
|
variant: 'primary',
|
|
328
|
-
outline: false,
|
|
329
|
-
pill: false,
|
|
330
106
|
size: 'medium',
|
|
331
107
|
disabled: true,
|
|
332
|
-
text: false,
|
|
333
|
-
iconOnly: true,
|
|
334
|
-
showIcon: true,
|
|
335
|
-
iconName: 'home',
|
|
336
|
-
iconPosition: 'left',
|
|
337
|
-
type: 'button',
|
|
338
|
-
name: 'nome bottone',
|
|
339
|
-
value: 'value bottone',
|
|
340
|
-
ariaLabel: 'sono un bottone'
|
|
341
108
|
};
|
|
342
109
|
//# sourceMappingURL=jump-button-only-icon.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-button-only-icon.stories.js","sourceRoot":"","sources":["../../../src/components/jump-button/jump-button-only-icon.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,4BAA4B;IACnC,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;gBACX,SAAS;gBACT,OAAO;aACR;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,O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AAQ,EAAE,IAAI;IACd,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,IAAI;IACd,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","sourcesContent":["import feather from 'feather-icons';\nimport { generateAttributesFromArgs} from '../../utils/utils';\n\nexport default {\n title: 'Components/Button/OnlyIcon',\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 'neutral',\n 'white'\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 id: {\n name: 'ID',\n description: 'Imposta l\\'id del bottone',\n control: 'text'\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return `<jump-button ${attributes} ${ !args.label ? ' 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\nexport const Primary = Template.bind({});\nPrimary.args = {\n label: '',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n iconOnly: true,\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\nexport const Secondary = Template.bind({});\nSecondary.args = {\n label: '',\n variant: 'secondary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n iconOnly: true,\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\nexport const Neutral = Template.bind({});\nNeutral.args = {\n label: '',\n variant: 'neutral',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n iconOnly: true,\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\nexport const White = Template.bind({});\nWhite.args = {\n label: '',\n variant: 'white',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: false,\n iconOnly: true,\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\nexport const PillPrimary = Template.bind({});\nPillPrimary.args = {\n label: '',\n variant: 'primary',\n outline: false,\n pill: true,\n size: 'medium',\n disabled: false,\n text: false,\n iconOnly: true,\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\nexport const IconText = Template.bind({});\nIconText.args = {\n label: '',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: false,\n text: true,\n iconOnly: true,\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 ButtonWithOnlyIconSquare = Template.bind({});\nButtonWithOnlyIconSquare.args = {\n label: '',\n variant: 'primary',\n outline: true,\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\nexport const ButtonWithOnlyIconPill = Template.bind({});\nButtonWithOnlyIconPill.args = {\n label: '',\n variant: 'primary',\n outline: true,\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\nexport const Disabled = Template.bind({});\nDisabled.args = {\n label: '',\n variant: 'primary',\n outline: false,\n pill: false,\n size: 'medium',\n disabled: true,\n text: false,\n iconOnly: true,\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"]}
|
|
1
|
+
{"version":3,"file":"jump-button-only-icon.stories.js","sourceRoot":"","sources":["../../../src/components/jump-button/jump-button-only-icon.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,4BAA4B;IACnC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,SAAS;gBACT,WAAW;gBACX,SAAS;gBACT,OAAO;aACR;SACF;QACD,OAAO,EAAG;YACR,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,SAAS;SACnB;QACD,IAAI,EAAE;YACJ,I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KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACX,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACV,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9C,YAAY,CAAC,IAAI,GAAG;IAClB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,QAAQ;CACf,CAAC;AAGF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IACjB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG;IACd,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;CACf,CAAC","sourcesContent":["import { generateAttributesFromArgs} from '../../utils/utils';\n\nexport default {\n title: 'Components/Button/OnlyIcon',\n tags: ['autodocs'],\n argTypes: {\n variant: {\n name: 'Variante',\n description: 'Imposta la variante di colore del bottone',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\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 id: {\n name: 'ID',\n description: 'Imposta l\\'id del bottone',\n control: 'text'\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return `<jump-button ${attributes} only-icon> <jump-icon slot=\"suffix\" name=\"arrow-right\"></jump-icon> </jump-button>`\n}\n\nexport const Primary = Template.bind({});\nPrimary.args = {\n variant: 'primary',\n size: 'small',\n};\n\nexport const Secondary = Template.bind({});\nSecondary.args = {\n variant: 'secondary',\n size: 'medium',\n};\n\nexport const Neutral = Template.bind({});\nNeutral.args = {\n variant: 'neutral',\n size: 'large',\n};\n\nexport const White = Template.bind({});\nWhite.args = {\n variant: 'white',\n size: 'medium',\n};\n\nexport const Pill = Template.bind({});\nPill.args = {\n variant: 'primary',\n pill: true,\n size: 'medium',\n};\n\nexport const noBackground = Template.bind({});\nnoBackground.args = {\n variant: 'primary',\n text: true,\n size: 'medium',\n};\n\n\nexport const outline = Template.bind({});\noutline.args = {\n variant: 'primary',\n outline: true,\n size: 'medium',\n};\n\nexport const outlinePill = Template.bind({});\noutlinePill.args = {\n variant: 'primary',\n outline: true,\n pill: true,\n size: 'medium',\n};\n\nexport const Disabled = Template.bind({});\nDisabled.args = {\n variant: 'primary',\n size: 'medium',\n disabled: true,\n};\n\n"]}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import feather from "feather-icons";
|
|
2
1
|
import { generateAttributesFromArgs } from "../../utils/utils";
|
|
3
2
|
export default {
|
|
4
3
|
title: 'Components/Button/Outline',
|
|
5
4
|
tags: ['autodocs'],
|
|
6
5
|
argTypes: {
|
|
7
|
-
label: {
|
|
8
|
-
name: 'Etichetta',
|
|
9
|
-
description: 'Imposta il testo del bottone',
|
|
10
|
-
control: 'text'
|
|
11
|
-
},
|
|
12
6
|
variant: {
|
|
13
7
|
name: 'Variante',
|
|
14
8
|
description: 'Imposta la variante di colore del bottone',
|
|
@@ -20,11 +14,6 @@ export default {
|
|
|
20
14
|
'white'
|
|
21
15
|
],
|
|
22
16
|
},
|
|
23
|
-
outline: {
|
|
24
|
-
name: 'Outline',
|
|
25
|
-
description: 'Imposta se il bottone deve avere il solo bordo',
|
|
26
|
-
control: 'boolean'
|
|
27
|
-
},
|
|
28
17
|
size: {
|
|
29
18
|
name: 'Dimensione',
|
|
30
19
|
description: 'Imposta la dimensione del bottone',
|
|
@@ -50,124 +39,16 @@ export default {
|
|
|
50
39
|
description: 'Imposta se il bottone deve essere disabilitato',
|
|
51
40
|
control: 'boolean'
|
|
52
41
|
},
|
|
42
|
+
full: {
|
|
43
|
+
name: 'Full Width',
|
|
44
|
+
description: 'Imposta se il bottone sarà largo tutto lo spazio che può occupare',
|
|
45
|
+
control: 'boolean'
|
|
46
|
+
},
|
|
53
47
|
text: {
|
|
54
48
|
name: 'Testo',
|
|
55
49
|
description: 'Imposta se il bottone è solo testo, quindi senza bordo, sfondo e padding',
|
|
56
50
|
control: 'boolean'
|
|
57
51
|
},
|
|
58
|
-
showIcon: {
|
|
59
|
-
name: 'Mostra Icona',
|
|
60
|
-
description: 'Imposta se il bottone deve mostrare un\'icona',
|
|
61
|
-
control: 'boolean'
|
|
62
|
-
},
|
|
63
|
-
iconOnly: {
|
|
64
|
-
name: 'Mostra solo Icona',
|
|
65
|
-
description: 'Imposta se il bottone deve mostrare solo l\'icona',
|
|
66
|
-
control: 'boolean',
|
|
67
|
-
if: {
|
|
68
|
-
arg: 'showIcon',
|
|
69
|
-
eq: true
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
iconName: {
|
|
73
|
-
name: 'Nome Icona',
|
|
74
|
-
control: 'select',
|
|
75
|
-
options: Object.keys(feather.icons),
|
|
76
|
-
description: 'Seleziona il nome dell\'icona dal menu a tendina',
|
|
77
|
-
defaultValue: Object.keys(feather.icons)[0],
|
|
78
|
-
if: {
|
|
79
|
-
arg: 'showIcon',
|
|
80
|
-
eq: true
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
iconPosition: {
|
|
84
|
-
name: 'Posizione Icona',
|
|
85
|
-
description: 'Imposta la posizione dell\'icona',
|
|
86
|
-
defaultValue: 'left',
|
|
87
|
-
control: 'select',
|
|
88
|
-
options: [
|
|
89
|
-
'left',
|
|
90
|
-
'right'
|
|
91
|
-
],
|
|
92
|
-
if: {
|
|
93
|
-
arg: 'showIcon',
|
|
94
|
-
eq: true
|
|
95
|
-
},
|
|
96
|
-
labels: {
|
|
97
|
-
left: 'Sinistra',
|
|
98
|
-
right: 'Destra'
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
type: {
|
|
102
|
-
name: 'Tipo di bottone',
|
|
103
|
-
description: 'Imposta il tipo di bottone',
|
|
104
|
-
default: 'button',
|
|
105
|
-
control: 'select',
|
|
106
|
-
if: {
|
|
107
|
-
arg: 'href',
|
|
108
|
-
exists: false
|
|
109
|
-
},
|
|
110
|
-
options: [
|
|
111
|
-
'button',
|
|
112
|
-
'submit',
|
|
113
|
-
'reset'
|
|
114
|
-
],
|
|
115
|
-
labels: {
|
|
116
|
-
button: 'button',
|
|
117
|
-
submit: 'submit',
|
|
118
|
-
reset: 'reset',
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
name: {
|
|
122
|
-
name: 'Nome del bottone',
|
|
123
|
-
description: 'Imposta il nome del bottone',
|
|
124
|
-
control: 'text',
|
|
125
|
-
if: {
|
|
126
|
-
arg: 'href',
|
|
127
|
-
exists: false
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
value: {
|
|
131
|
-
name: 'Value del bottone',
|
|
132
|
-
description: 'Imposta il value del bottone',
|
|
133
|
-
control: 'text',
|
|
134
|
-
if: {
|
|
135
|
-
arg: 'href',
|
|
136
|
-
exists: false
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
ariaLabel: {
|
|
140
|
-
name: 'Aria Label',
|
|
141
|
-
description: 'Imposta aria label',
|
|
142
|
-
control: 'text',
|
|
143
|
-
},
|
|
144
|
-
href: {
|
|
145
|
-
name: 'Href',
|
|
146
|
-
description: 'Imposta l\'href del link',
|
|
147
|
-
control: 'text',
|
|
148
|
-
},
|
|
149
|
-
target: {
|
|
150
|
-
name: 'Target',
|
|
151
|
-
description: 'Imposta il target del link',
|
|
152
|
-
default: '_self',
|
|
153
|
-
control: 'select',
|
|
154
|
-
if: {
|
|
155
|
-
arg: 'href',
|
|
156
|
-
exists: true
|
|
157
|
-
},
|
|
158
|
-
options: [
|
|
159
|
-
'_blank',
|
|
160
|
-
'_parent',
|
|
161
|
-
'_self',
|
|
162
|
-
'_top'
|
|
163
|
-
],
|
|
164
|
-
labels: {
|
|
165
|
-
_blank: '_blank',
|
|
166
|
-
_parent: '_parent',
|
|
167
|
-
_self: '_self',
|
|
168
|
-
_top: '_top'
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
52
|
id: {
|
|
172
53
|
name: 'ID',
|
|
173
54
|
description: 'Imposta l\'id del bottone',
|
|
@@ -177,131 +58,54 @@ export default {
|
|
|
177
58
|
};
|
|
178
59
|
const Template = (args) => {
|
|
179
60
|
const attributes = generateAttributesFromArgs(args);
|
|
180
|
-
return `<jump-button ${attributes}
|
|
61
|
+
return `<jump-button ${attributes} outline name="scopri" value="value" aria-label="Scopri di più"> Scopri di più </jump-button>`;
|
|
62
|
+
};
|
|
63
|
+
const TemplateWithIcon = (args) => {
|
|
64
|
+
const attributes = generateAttributesFromArgs(args);
|
|
65
|
+
return `<jump-button ${attributes} outline name="scopri" value="value" aria-label="Scopri di più"> <jump-icon slot="suffix" name="arrow-right"></jump-icon> Scopri di più </jump-button>`;
|
|
181
66
|
};
|
|
182
67
|
export const OutlinePrimary = Template.bind({});
|
|
183
68
|
OutlinePrimary.args = {
|
|
184
|
-
label: 'Outline Primary',
|
|
185
69
|
variant: 'primary',
|
|
186
|
-
|
|
187
|
-
pill: false,
|
|
188
|
-
size: 'medium',
|
|
189
|
-
disabled: false,
|
|
190
|
-
text: false,
|
|
191
|
-
showIcon: false,
|
|
192
|
-
iconOnly: false,
|
|
193
|
-
iconName: Object.keys(feather.icons)[0],
|
|
194
|
-
iconPosition: 'left',
|
|
195
|
-
type: 'button',
|
|
196
|
-
name: 'nome bottone',
|
|
197
|
-
value: 'value bottone',
|
|
198
|
-
ariaLabel: 'sono un bottone'
|
|
70
|
+
size: 'small',
|
|
199
71
|
};
|
|
200
72
|
export const OutlineSecondary = Template.bind({});
|
|
201
73
|
OutlineSecondary.args = {
|
|
202
74
|
label: 'Outline Secondary',
|
|
203
75
|
variant: 'secondary',
|
|
204
|
-
outline: true,
|
|
205
|
-
pill: false,
|
|
206
76
|
size: 'medium',
|
|
207
|
-
disabled: false,
|
|
208
|
-
text: false,
|
|
209
|
-
showIcon: false,
|
|
210
|
-
iconOnly: false,
|
|
211
|
-
iconName: Object.keys(feather.icons)[0],
|
|
212
|
-
iconPosition: 'left',
|
|
213
|
-
type: 'button',
|
|
214
|
-
name: 'nome bottone',
|
|
215
|
-
value: 'value bottone',
|
|
216
|
-
ariaLabel: 'sono un bottone'
|
|
217
77
|
};
|
|
218
78
|
export const OutlineGrey = Template.bind({});
|
|
219
79
|
OutlineGrey.args = {
|
|
220
80
|
label: 'Outline Neutral',
|
|
221
81
|
variant: 'neutral',
|
|
222
|
-
|
|
223
|
-
pill: false,
|
|
224
|
-
size: 'medium',
|
|
225
|
-
disabled: false,
|
|
226
|
-
text: false,
|
|
227
|
-
showIcon: false,
|
|
228
|
-
iconOnly: false,
|
|
229
|
-
iconName: Object.keys(feather.icons)[0],
|
|
230
|
-
iconPosition: 'left',
|
|
231
|
-
type: 'button',
|
|
232
|
-
name: 'nome bottone',
|
|
233
|
-
value: 'value bottone',
|
|
234
|
-
ariaLabel: 'sono un bottone'
|
|
82
|
+
size: 'large',
|
|
235
83
|
};
|
|
236
84
|
export const OutlineWhite = Template.bind({});
|
|
237
85
|
OutlineWhite.args = {
|
|
238
86
|
label: 'Outline White',
|
|
239
87
|
variant: 'white',
|
|
240
|
-
outline: true,
|
|
241
|
-
pill: false,
|
|
242
88
|
size: 'medium',
|
|
243
|
-
disabled: false,
|
|
244
|
-
text: false,
|
|
245
|
-
showIcon: false,
|
|
246
|
-
iconOnly: false,
|
|
247
|
-
iconName: Object.keys(feather.icons)[0],
|
|
248
|
-
iconPosition: 'left',
|
|
249
|
-
type: 'button',
|
|
250
|
-
name: 'nome bottone',
|
|
251
|
-
value: 'value bottone',
|
|
252
|
-
ariaLabel: 'sono un bottone'
|
|
253
89
|
};
|
|
254
|
-
export const
|
|
255
|
-
|
|
90
|
+
export const outlinePill = Template.bind({});
|
|
91
|
+
outlinePill.args = {
|
|
256
92
|
label: 'Pill Primary',
|
|
257
93
|
variant: 'primary',
|
|
258
|
-
outline: true,
|
|
259
94
|
pill: true,
|
|
260
95
|
size: 'medium',
|
|
261
|
-
disabled: false,
|
|
262
|
-
text: false,
|
|
263
|
-
showIcon: false,
|
|
264
|
-
iconOnly: false,
|
|
265
|
-
iconName: Object.keys(feather.icons)[0],
|
|
266
|
-
iconPosition: 'left',
|
|
267
|
-
type: 'button',
|
|
268
|
-
name: 'nome bottone',
|
|
269
|
-
value: 'value bottone',
|
|
270
|
-
ariaLabel: 'sono un bottone'
|
|
271
96
|
};
|
|
272
|
-
export const
|
|
273
|
-
|
|
97
|
+
export const withIcon = TemplateWithIcon.bind({});
|
|
98
|
+
withIcon.args = {
|
|
274
99
|
label: 'Primary',
|
|
275
100
|
variant: 'primary',
|
|
276
|
-
outline: true,
|
|
277
|
-
pill: false,
|
|
278
101
|
size: 'medium',
|
|
279
|
-
|
|
280
|
-
text: false,
|
|
281
|
-
showIcon: true,
|
|
282
|
-
iconName: 'home',
|
|
283
|
-
iconPosition: 'left',
|
|
284
|
-
type: 'button',
|
|
285
|
-
name: 'nome bottone',
|
|
286
|
-
value: 'value bottone',
|
|
287
|
-
ariaLabel: 'sono un bottone'
|
|
102
|
+
full: true,
|
|
288
103
|
};
|
|
289
104
|
export const Disabled = Template.bind({});
|
|
290
105
|
Disabled.args = {
|
|
291
106
|
label: 'Disabled',
|
|
292
107
|
variant: 'primary',
|
|
293
|
-
outline: true,
|
|
294
|
-
pill: false,
|
|
295
|
-
size: 'medium',
|
|
296
108
|
disabled: true,
|
|
297
|
-
|
|
298
|
-
showIcon: false,
|
|
299
|
-
iconOnly: false,
|
|
300
|
-
iconName: Object.keys(feather.icons)[0],
|
|
301
|
-
iconPosition: 'left',
|
|
302
|
-
type: 'button',
|
|
303
|
-
name: 'nome bottone',
|
|
304
|
-
value: 'value bottone',
|
|
305
|
-
ariaLabel: 'sono un bottone'
|
|
109
|
+
size: 'medium',
|
|
306
110
|
};
|
|
307
111
|
//# sourceMappingURL=jump-button-outline.stories.js.map
|