@roadtrip/components 3.32.4 → 3.32.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/road-badge_14.cjs.entry.js +9 -12
- package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
- package/dist/collection/components/accordion/accordion.stories.js +38 -4
- package/dist/collection/components/alert/alert.stories.js +7 -0
- package/dist/collection/components/asset/asset.stories.js +6 -0
- package/dist/collection/components/autocomplete/autocomplete.stories.js +43 -47
- package/dist/collection/components/avatar/avatar.stories.js +6 -0
- package/dist/collection/components/badge/badge.stories.js +6 -0
- package/dist/collection/components/banner/banner.stories.js +33 -3
- package/dist/collection/components/button/button.stories.js +58 -67
- package/dist/collection/components/button-floating/button-floating.stories.js +32 -23
- package/dist/collection/components/card/card.stories.js +25 -15
- package/dist/collection/components/carousel/carousel.stories.js +72 -280
- package/dist/collection/components/checkbox/checkbox.stories.js +54 -33
- package/dist/collection/components/chip/chip.stories.js +32 -47
- package/dist/collection/components/collapse/collapse.stories.js +88 -78
- package/dist/collection/components/content-card/content-card.stories.js +30 -11
- package/dist/collection/components/counter/counter.stories.js +40 -11
- package/dist/collection/components/dialog/dialog.stories.js +37 -51
- package/dist/collection/components/drawer/drawer.js +9 -12
- package/dist/collection/components/drawer/drawer.js.map +1 -1
- package/dist/collection/components/drawer/drawer.stories.js +64 -134
- package/dist/collection/components/dropdown/dropdown.stories.js +69 -53
- package/dist/collection/components/duration/duration.stories.js +49 -45
- package/dist/collection/components/flap/flap.stories.js +22 -10
- package/dist/collection/components/input/input.stories.js +33 -0
- package/dist/collection/components/item/item.stories.js +25 -0
- package/dist/collection/components/list/list.stories.js +2 -0
- package/dist/collection/components/modal/modal.stories.js +14 -0
- package/dist/collection/components/navbar/navbar.stories.js +3 -0
- package/dist/collection/components/navbar-v2/navbar-v2.stories.js +4 -0
- package/dist/collection/components/phone-number-input/phone-number-input.stories.js +15 -1
- package/dist/collection/components/plate-number/plate-number.stories.js +13 -0
- package/dist/collection/components/profil-dropdown/profil-dropdown.stories.js +8 -0
- package/dist/collection/components/progress/progress.stories.js +12 -0
- package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.stories.js +8 -0
- package/dist/collection/components/progress-indicator-vertical/progress-indicator-vertical.stories.js +1 -0
- package/dist/collection/components/progress-tracker/progress-tracker.stories.js +1 -0
- package/dist/collection/components/radio/radio.stories.js +13 -0
- package/dist/collection/components/range/range.stories.js +11 -0
- package/dist/collection/components/rating/rating.stories.js +7 -0
- package/dist/collection/components/segmented-buttons/segmented-buttons.stories.js +2 -0
- package/dist/collection/components/select/select.stories.js +13 -0
- package/dist/collection/components/select-filter/select-filter.stories.js +5 -0
- package/dist/collection/components/skeleton/skeleton.stories.js +2 -0
- package/dist/collection/components/spinner/spinner.stories.js +2 -0
- package/dist/collection/components/table/table.stories.js +1 -0
- package/dist/collection/components/tabs/tabs.stories.js +2 -0
- package/dist/collection/components/tag/tag.stories.js +3 -0
- package/dist/collection/components/text/text.stories.js +2 -0
- package/dist/collection/components/textarea/textarea.stories.js +26 -0
- package/dist/collection/components/toast/toast.stories.js +6 -0
- package/dist/collection/components/toggle/toggle.stories.js +14 -0
- package/dist/collection/components/toolbar/toolbar.stories.js +6 -0
- package/dist/collection/components/toolbar-v2/toolbar-v2.stories.js +5 -0
- package/dist/collection/components/tooltip/tooltip.stories.js +11 -0
- package/dist/esm/road-badge_14.entry.js +9 -12
- package/dist/esm/road-badge_14.entry.js.map +1 -1
- package/dist/roadtrip/{p-e2a00f9c.entry.js → p-b5c4455e.entry.js} +3 -3
- package/dist/roadtrip/p-b5c4455e.entry.js.map +1 -0
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/types/components/drawer/drawer.d.ts +0 -1
- package/hydrate/index.js +271 -255
- package/hydrate/index.mjs +271 -255
- package/package.json +1 -1
- package/dist/roadtrip/p-e2a00f9c.entry.js.map +0 -1
|
@@ -6,99 +6,120 @@ export default {
|
|
|
6
6
|
component: 'road-checkbox',
|
|
7
7
|
parameters: {
|
|
8
8
|
actions: {
|
|
9
|
-
handles: ['roadblur', 'roadfocus'],
|
|
9
|
+
handles: ['roadblur', 'roadfocus', 'roadchange'],
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
argTypes: {
|
|
13
13
|
checked: {
|
|
14
14
|
control: 'boolean',
|
|
15
|
+
description: 'Specifies whether the checkbox is checked.',
|
|
16
|
+
table: {
|
|
17
|
+
defaultValue: { summary: 'false' },
|
|
18
|
+
},
|
|
15
19
|
},
|
|
16
20
|
indeterminate: {
|
|
17
21
|
control: 'boolean',
|
|
22
|
+
description: 'Specifies whether the checkbox is in an indeterminate state.',
|
|
18
23
|
},
|
|
19
24
|
disabled: {
|
|
20
25
|
control: 'boolean',
|
|
26
|
+
description: 'Disables the checkbox if set to `true`.',
|
|
21
27
|
},
|
|
22
28
|
required: {
|
|
23
29
|
control: 'boolean',
|
|
30
|
+
description: 'Marks the checkbox as required in a form.',
|
|
24
31
|
},
|
|
25
32
|
inverse: {
|
|
26
33
|
control: 'boolean',
|
|
34
|
+
description: 'Applies an inverse color style to the checkbox.',
|
|
27
35
|
},
|
|
28
36
|
error: {
|
|
29
37
|
control: 'text',
|
|
38
|
+
description: 'Displays an error message below the checkbox.',
|
|
30
39
|
},
|
|
31
40
|
helper: {
|
|
32
41
|
control: 'text',
|
|
42
|
+
description: 'Displays a helper text below the checkbox.',
|
|
33
43
|
},
|
|
34
44
|
label: {
|
|
35
45
|
control: 'text',
|
|
46
|
+
description: 'Sets the main label of the checkbox.',
|
|
47
|
+
table: {
|
|
48
|
+
defaultValue: { summary: 'Label' },
|
|
49
|
+
},
|
|
36
50
|
},
|
|
37
51
|
'secondary-label': {
|
|
38
52
|
control: 'text',
|
|
53
|
+
description: 'Sets a secondary label, usually displayed next to the main label.',
|
|
39
54
|
},
|
|
40
55
|
name: {
|
|
41
56
|
control: 'text',
|
|
57
|
+
description: 'Sets the name attribute for form submission.',
|
|
42
58
|
},
|
|
43
59
|
'checkbox-id': {
|
|
44
60
|
control: 'text',
|
|
61
|
+
description: 'Sets a unique ID for the checkbox element.',
|
|
45
62
|
},
|
|
46
63
|
value: {
|
|
47
64
|
control: 'text',
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
type: null,
|
|
65
|
+
description: 'Defines the value of the checkbox when checked.',
|
|
66
|
+
table: {
|
|
67
|
+
defaultValue: { summary: 'on' },
|
|
52
68
|
},
|
|
53
69
|
},
|
|
54
70
|
roadblur: {
|
|
55
|
-
|
|
56
|
-
|
|
71
|
+
action: 'roadblur',
|
|
72
|
+
description: 'Triggered when the checkbox loses focus.',
|
|
73
|
+
table: {
|
|
74
|
+
category: 'Events',
|
|
57
75
|
},
|
|
58
76
|
},
|
|
59
77
|
roadfocus: {
|
|
60
|
-
|
|
61
|
-
|
|
78
|
+
action: 'roadfocus',
|
|
79
|
+
description: 'Triggered when the checkbox gains focus.',
|
|
80
|
+
table: {
|
|
81
|
+
category: 'Events',
|
|
62
82
|
},
|
|
63
83
|
},
|
|
64
84
|
roadchange: {
|
|
65
85
|
action: 'roadchange',
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
description: 'Triggered when the checkbox state changes.',
|
|
87
|
+
table: {
|
|
88
|
+
category: 'Events',
|
|
68
89
|
},
|
|
69
90
|
},
|
|
70
91
|
},
|
|
71
92
|
args: {
|
|
72
|
-
checked:
|
|
73
|
-
disabled:
|
|
74
|
-
indeterminate:
|
|
75
|
-
inverse:
|
|
93
|
+
checked: false,
|
|
94
|
+
disabled: false,
|
|
95
|
+
indeterminate: false,
|
|
96
|
+
inverse: false,
|
|
97
|
+
required: false,
|
|
76
98
|
label: 'Label',
|
|
77
|
-
'secondary-label':
|
|
78
|
-
required: null,
|
|
99
|
+
'secondary-label': '',
|
|
79
100
|
value: 'on',
|
|
80
101
|
},
|
|
81
102
|
};
|
|
82
103
|
|
|
83
104
|
const Template = (args) => html`
|
|
84
|
-
<road-checkbox
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
></road-checkbox>
|
|
105
|
+
<road-checkbox
|
|
106
|
+
?checked="${args.checked}"
|
|
107
|
+
?indeterminate="${args.indeterminate}"
|
|
108
|
+
?disabled="${args.disabled}"
|
|
109
|
+
?inverse="${args.inverse}"
|
|
110
|
+
?required="${args.required}"
|
|
111
|
+
value="${ifDefined(args.value)}"
|
|
112
|
+
label="${ifDefined(args.label)}"
|
|
113
|
+
secondary-label="${ifDefined(args['secondary-label'])}"
|
|
114
|
+
name="${ifDefined(args.name)}"
|
|
115
|
+
checkbox-id="${ifDefined(args['checkbox-id'])}"
|
|
116
|
+
error="${ifDefined(args.error)}"
|
|
117
|
+
helper="${ifDefined(args.helper)}"
|
|
118
|
+
@roadchange=${event => args.roadchange(event.detail)}
|
|
119
|
+
></road-checkbox>
|
|
99
120
|
`;
|
|
100
121
|
|
|
101
|
-
export const Playground
|
|
122
|
+
export const Playground = Template.bind({});
|
|
102
123
|
|
|
103
124
|
export const Checked = Template.bind({});
|
|
104
125
|
Checked.args = {
|
|
@@ -11,69 +11,55 @@ export default {
|
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
argTypes: {
|
|
14
|
-
' ': {
|
|
15
|
-
control: 'text',
|
|
16
|
-
},
|
|
17
14
|
outline: {
|
|
18
15
|
control: 'boolean',
|
|
16
|
+
description: 'Displays the chip with an outline style.',
|
|
19
17
|
},
|
|
20
18
|
'has-close-icon': {
|
|
21
19
|
control: 'boolean',
|
|
20
|
+
description: 'Adds a close icon to the chip.',
|
|
22
21
|
},
|
|
23
22
|
size: {
|
|
24
23
|
options: ['md', 'lg'],
|
|
25
|
-
control: {
|
|
26
|
-
|
|
24
|
+
control: { type: 'select' },
|
|
25
|
+
description: 'Defines the size of the chip.',
|
|
26
|
+
table: {
|
|
27
|
+
defaultValue: { summary: 'md' },
|
|
27
28
|
},
|
|
28
29
|
},
|
|
29
30
|
color: {
|
|
30
31
|
options: ['default', 'secondary', 'inverse'],
|
|
31
|
-
control: {
|
|
32
|
-
|
|
32
|
+
control: { type: 'select' },
|
|
33
|
+
description: 'Changes the chip color.',
|
|
34
|
+
table: {
|
|
35
|
+
defaultValue: { summary: 'default' },
|
|
33
36
|
},
|
|
34
37
|
},
|
|
38
|
+
' ': {
|
|
39
|
+
control: 'text',
|
|
40
|
+
description: 'Content inside the chip (label or icon).',
|
|
41
|
+
},
|
|
35
42
|
},
|
|
36
43
|
args: {
|
|
37
|
-
outline:
|
|
38
|
-
'has-close-icon':
|
|
39
|
-
|
|
44
|
+
outline: false,
|
|
45
|
+
'has-close-icon': false,
|
|
46
|
+
size: 'md',
|
|
47
|
+
color: 'default',
|
|
48
|
+
' ': 'Label',
|
|
40
49
|
},
|
|
41
50
|
};
|
|
42
51
|
|
|
43
52
|
const Template = (args) => html`
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
has-close-icon="${ifDefined(args['has-close-icon'])}"
|
|
55
|
-
size="${ifDefined(args.size)}"
|
|
56
|
-
color="${ifDefined(args.color)}"
|
|
57
|
-
>
|
|
58
|
-
${unsafeHTML(args[' '])}
|
|
59
|
-
</road-chip>
|
|
60
|
-
<road-chip
|
|
61
|
-
outline="${ifDefined(args.outline)}"
|
|
62
|
-
has-close-icon="${ifDefined(args['has-close-icon'])}"
|
|
63
|
-
size="${ifDefined(args.size)}"
|
|
64
|
-
color="${ifDefined(args.color)}"
|
|
65
|
-
>
|
|
66
|
-
${unsafeHTML(args[' '])}
|
|
67
|
-
</road-chip>
|
|
68
|
-
<road-chip
|
|
69
|
-
outline="${ifDefined(args.outline)}"
|
|
70
|
-
has-close-icon="${ifDefined(args['has-close-icon'])}"
|
|
71
|
-
size="${ifDefined(args.size)}"
|
|
72
|
-
color="${ifDefined(args.color)}"
|
|
73
|
-
>
|
|
74
|
-
${unsafeHTML(args[' '])}
|
|
75
|
-
</road-chip>
|
|
76
|
-
|
|
53
|
+
${['Label A', 'Label B', 'Label C', 'Label D'].map(label => html`
|
|
54
|
+
<road-chip
|
|
55
|
+
?outline="${args.outline}"
|
|
56
|
+
?has-close-icon="${args['has-close-icon']}"
|
|
57
|
+
size="${ifDefined(args.size)}"
|
|
58
|
+
color="${ifDefined(args.color)}"
|
|
59
|
+
>
|
|
60
|
+
${unsafeHTML(args[' '] || label)}
|
|
61
|
+
</road-chip>
|
|
62
|
+
`)}
|
|
77
63
|
`;
|
|
78
64
|
|
|
79
65
|
export const Playground = Template.bind({});
|
|
@@ -82,12 +68,11 @@ Playground.args = {
|
|
|
82
68
|
'has-close-icon': true,
|
|
83
69
|
};
|
|
84
70
|
|
|
85
|
-
export const
|
|
86
|
-
|
|
71
|
+
export const WithIcon = Template.bind({});
|
|
72
|
+
WithIcon.args = {
|
|
87
73
|
outline: true,
|
|
88
74
|
'has-close-icon': true,
|
|
89
|
-
' ': `<road-icon name="weather-rain" role="button"></road-icon>
|
|
90
|
-
B`,
|
|
75
|
+
' ': `<road-icon name="weather-rain" role="button"></road-icon> B`,
|
|
91
76
|
};
|
|
92
77
|
|
|
93
78
|
export const Color = Template.bind({});
|
|
@@ -8,92 +8,102 @@ export default {
|
|
|
8
8
|
argTypes: {
|
|
9
9
|
'is-open': {
|
|
10
10
|
control: 'boolean',
|
|
11
|
+
description: 'Defines whether the collapse is open or closed.',
|
|
11
12
|
},
|
|
12
13
|
centered: {
|
|
13
14
|
control: 'boolean',
|
|
15
|
+
description: 'Centers the expand/collapse button.',
|
|
14
16
|
},
|
|
15
17
|
'show-less': {
|
|
16
18
|
control: 'text',
|
|
19
|
+
description: 'Label for the button when content is expanded.',
|
|
20
|
+
table: {
|
|
21
|
+
defaultValue: { summary: 'show less' },
|
|
22
|
+
},
|
|
17
23
|
},
|
|
18
24
|
'show-more': {
|
|
19
25
|
control: 'text',
|
|
26
|
+
description: 'Label for the button when content is collapsed.',
|
|
27
|
+
table: {
|
|
28
|
+
defaultValue: { summary: 'show more' },
|
|
29
|
+
},
|
|
20
30
|
},
|
|
21
31
|
' ': {
|
|
22
32
|
control: 'text',
|
|
33
|
+
description: 'Expanded content of the collapse component.',
|
|
23
34
|
},
|
|
24
35
|
'collapsed-content': {
|
|
25
36
|
control: 'text',
|
|
37
|
+
description: 'Content displayed when the collapse is closed.',
|
|
26
38
|
},
|
|
39
|
+
// 🔹 Ajout des CSS Variables pour personnalisation
|
|
27
40
|
'--btn-padding-start': {
|
|
28
|
-
table: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
control: {
|
|
32
|
-
type: null,
|
|
33
|
-
},
|
|
41
|
+
table: { defaultValue: { summary: '1rem' } },
|
|
42
|
+
control: 'text',
|
|
43
|
+
description: 'Padding at the start of the button.',
|
|
34
44
|
},
|
|
35
45
|
'--btn-padding-end': {
|
|
36
|
-
table: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
control: {
|
|
40
|
-
type: null,
|
|
41
|
-
},
|
|
46
|
+
table: { defaultValue: { summary: '1rem' } },
|
|
47
|
+
control: 'text',
|
|
48
|
+
description: 'Padding at the end of the button.',
|
|
42
49
|
},
|
|
43
50
|
'--btn-margin-bottom': {
|
|
44
|
-
table: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
control: {
|
|
48
|
-
type: null,
|
|
49
|
-
},
|
|
51
|
+
table: { defaultValue: { summary: '1rem' } },
|
|
52
|
+
control: 'text',
|
|
53
|
+
description: 'Margin below the button.',
|
|
50
54
|
},
|
|
51
55
|
'--btn-font-size': {
|
|
52
|
-
table: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
control: {
|
|
56
|
-
type: null,
|
|
57
|
-
},
|
|
56
|
+
table: { defaultValue: { summary: '1rem' } },
|
|
57
|
+
control: 'text',
|
|
58
|
+
description: 'Font size of the button text.',
|
|
58
59
|
},
|
|
59
60
|
'--max-height': {
|
|
60
|
-
table: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
control: {
|
|
64
|
-
type: null,
|
|
65
|
-
},
|
|
61
|
+
table: { defaultValue: { summary: '500px' } },
|
|
62
|
+
control: 'text',
|
|
63
|
+
description: 'Maximum height of the collapse content when expanded.',
|
|
66
64
|
},
|
|
67
65
|
},
|
|
68
66
|
args: {
|
|
69
|
-
'is-open':
|
|
70
|
-
centered:
|
|
67
|
+
'is-open': false,
|
|
68
|
+
centered: false,
|
|
71
69
|
'show-less': 'show less',
|
|
72
70
|
'show-more': 'show more',
|
|
73
71
|
' ': `<ul class="m-0">
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
<li>Car tire 205/55 R16 91 V</li>
|
|
73
|
+
<li>Good traction on dry and wet soils.</li>
|
|
74
|
+
<li>Reduced risk of aquaplaning.</li>
|
|
75
|
+
<li>Reduced braking distances.</li>
|
|
76
|
+
</ul>`,
|
|
79
77
|
'collapsed-content': `<ul class="m-0">
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
<li>Specific Homologation: <b>non</b></li>
|
|
79
|
+
<li>XL: <b>non</b></li>
|
|
80
|
+
<li>Runflat: <b>non</b></li>
|
|
81
|
+
<li>Seal: <b>non</b></li>
|
|
82
|
+
<li>Various tire characteristics: <b>MFS</b></li>
|
|
83
|
+
<li>Tire profile: <b>Energy saver</b></li>
|
|
84
|
+
</ul>`,
|
|
87
85
|
},
|
|
88
86
|
};
|
|
89
87
|
|
|
90
88
|
const Template = (args) => html`
|
|
91
|
-
<road-collapse
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
${
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
<road-collapse
|
|
90
|
+
?is-open="${args['is-open']}"
|
|
91
|
+
?centered="${args.centered}"
|
|
92
|
+
show-more="${ifDefined(args['show-more'])}"
|
|
93
|
+
show-less="${ifDefined(args['show-less'])}"
|
|
94
|
+
style="
|
|
95
|
+
--btn-padding-start: ${ifDefined(args['--btn-padding-start'])};
|
|
96
|
+
--btn-padding-end: ${ifDefined(args['--btn-padding-end'])};
|
|
97
|
+
--btn-margin-bottom: ${ifDefined(args['--btn-margin-bottom'])};
|
|
98
|
+
--btn-font-size: ${ifDefined(args['--btn-font-size'])};
|
|
99
|
+
--max-height: ${ifDefined(args['--max-height'])};
|
|
100
|
+
"
|
|
101
|
+
>
|
|
102
|
+
${unsafeHTML(args[' '])}
|
|
103
|
+
<div slot="collapsed-content">
|
|
104
|
+
${unsafeHTML(args['collapsed-content'])}
|
|
105
|
+
</div>
|
|
106
|
+
</road-collapse>
|
|
97
107
|
`;
|
|
98
108
|
|
|
99
109
|
export const Playground = Template.bind({});
|
|
@@ -137,34 +147,34 @@ VehicleTypes.args = {
|
|
|
137
147
|
</road-row>
|
|
138
148
|
</road-grid>`,
|
|
139
149
|
'collapsed-content': `<road-grid>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
150
|
+
<road-row>
|
|
151
|
+
<road-col class="col-6 col-md-4 col-lg-3">
|
|
152
|
+
<road-card button value="scooter">
|
|
153
|
+
<road-icon name="vehicle-scooter" size="3x" aria-hidden="true"></road-icon>
|
|
154
|
+
<road-label>Scooter</road-label>
|
|
155
|
+
</road-card>
|
|
156
|
+
</road-col>
|
|
157
|
+
<road-col class="col-6 col-md-4 col-lg-3">
|
|
158
|
+
<road-card button value="competition">
|
|
159
|
+
<road-icon name="vehicle-rally" size="3x" aria-hidden="true"></road-icon>
|
|
160
|
+
<road-label>Compétition</road-label>
|
|
161
|
+
</road-card>
|
|
162
|
+
</road-col>
|
|
163
|
+
<road-col class="col-6 col-md-4 col-lg-3">
|
|
164
|
+
<road-card button value="collection">
|
|
165
|
+
<road-icon name="vehicle-collector" size="3x" aria-hidden="true"></road-icon>
|
|
166
|
+
<road-label>Collection</road-label>
|
|
167
|
+
</road-card>
|
|
168
|
+
</road-col>
|
|
169
|
+
<road-col class="col-6 col-md-4 col-lg-3">
|
|
170
|
+
<road-card button value="quad">
|
|
171
|
+
<road-icon name="vehicle-quad" size="3x" aria-hidden="true"></road-icon>
|
|
172
|
+
<road-label>Quad</road-label>
|
|
173
|
+
</road-card>
|
|
174
|
+
</road-col>
|
|
175
|
+
</road-row>
|
|
176
|
+
</road-grid>`,
|
|
177
|
+
};
|
|
168
178
|
VehicleTypes.parameters = {
|
|
169
179
|
backgrounds: {
|
|
170
180
|
default: 'grey',
|
|
@@ -5,37 +5,42 @@ import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Listing/ContentCard',
|
|
7
7
|
component: 'road-content-card',
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
parameters: {
|
|
9
|
+
backgrounds: {
|
|
10
|
+
default: 'grey',
|
|
11
|
+
},
|
|
10
12
|
},
|
|
11
13
|
argTypes: {
|
|
12
14
|
label: {
|
|
13
15
|
control: 'text',
|
|
16
|
+
description: 'Title text displayed in the card.',
|
|
14
17
|
},
|
|
15
18
|
description: {
|
|
16
19
|
control: 'text',
|
|
20
|
+
description: 'Main description inside the card.',
|
|
17
21
|
},
|
|
18
22
|
' ': {
|
|
19
23
|
control: 'text',
|
|
24
|
+
description: 'Slot for additional content, such as buttons or links.',
|
|
20
25
|
},
|
|
21
26
|
'inset-image': {
|
|
22
27
|
control: 'boolean',
|
|
28
|
+
description: 'If true, the image is inset within the card.',
|
|
23
29
|
},
|
|
24
30
|
},
|
|
25
31
|
args: {
|
|
26
32
|
label: `Lorem ipsum`,
|
|
27
|
-
description: `Elevate your car's performance with Norauto's all-in-one maintenance kit
|
|
28
|
-
' ':
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
description: `Elevate your car's performance with Norauto's all-in-one maintenance kit.`,
|
|
34
|
+
' ': `
|
|
35
|
+
<road-button color="primary" class="mt-8 mb-0" expand="true" outline="true">Label</road-button>
|
|
36
|
+
<road-button color="primary" class="mt-8 mb-0 mr-0" expand="true">Add to cart</road-button>
|
|
37
|
+
`,
|
|
31
38
|
'inset-image': false,
|
|
32
39
|
},
|
|
33
40
|
};
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export const Template = (args) => html`
|
|
38
|
-
<road-content-card inset-image="${ifDefined(args['inset-image'])}">
|
|
42
|
+
const Template = (args) => html`
|
|
43
|
+
<road-content-card ?inset-image="${args['inset-image']}">
|
|
39
44
|
<div slot="label">
|
|
40
45
|
${unsafeHTML(args.label)}
|
|
41
46
|
</div>
|
|
@@ -44,4 +49,18 @@ export const Template = (args) => html`
|
|
|
44
49
|
</div>
|
|
45
50
|
${unsafeHTML(args[' '])}
|
|
46
51
|
</road-content-card>
|
|
47
|
-
`;
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export const Playground = Template.bind({});
|
|
55
|
+
|
|
56
|
+
export const WithInsetImage = Template.bind({});
|
|
57
|
+
WithInsetImage.args = {
|
|
58
|
+
'inset-image': true,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const CustomContent = Template.bind({});
|
|
62
|
+
CustomContent.args = {
|
|
63
|
+
label: 'Premium Car Wax',
|
|
64
|
+
description: 'Protect your car’s paint with our long-lasting premium wax formula.',
|
|
65
|
+
' ': `<road-button color="secondary" class="mt-8 mb-0" expand="true">Learn more</road-button>`,
|
|
66
|
+
};
|
|
@@ -12,38 +12,56 @@ export default {
|
|
|
12
12
|
argTypes: {
|
|
13
13
|
'input-id': {
|
|
14
14
|
control: 'text',
|
|
15
|
+
description: 'Unique identifier for the input field.',
|
|
15
16
|
},
|
|
16
17
|
size: {
|
|
17
18
|
options: ['sm', 'md', 'lg'],
|
|
18
|
-
control: {
|
|
19
|
-
|
|
19
|
+
control: { type: 'select' },
|
|
20
|
+
description: 'Defines the size of the counter.',
|
|
21
|
+
table: {
|
|
22
|
+
defaultValue: { summary: 'md' },
|
|
20
23
|
},
|
|
21
24
|
},
|
|
22
25
|
min: {
|
|
23
26
|
control: 'number',
|
|
27
|
+
description: 'Minimum value allowed for the counter.',
|
|
28
|
+
table: {
|
|
29
|
+
defaultValue: { summary: 1 },
|
|
30
|
+
},
|
|
24
31
|
},
|
|
25
32
|
max: {
|
|
26
33
|
control: 'number',
|
|
34
|
+
description: 'Maximum value allowed for the counter.',
|
|
35
|
+
table: {
|
|
36
|
+
defaultValue: { summary: 20 },
|
|
37
|
+
},
|
|
27
38
|
},
|
|
28
39
|
step: {
|
|
29
40
|
control: 'number',
|
|
41
|
+
description: 'Step interval for increasing or decreasing the counter value.',
|
|
42
|
+
table: {
|
|
43
|
+
defaultValue: { summary: 1 },
|
|
44
|
+
},
|
|
30
45
|
},
|
|
31
46
|
value: {
|
|
32
47
|
control: 'number',
|
|
48
|
+
description: 'Current value of the counter.',
|
|
49
|
+
table: {
|
|
50
|
+
defaultValue: { summary: 1 },
|
|
51
|
+
},
|
|
33
52
|
},
|
|
34
53
|
dustbin: {
|
|
35
54
|
control: 'boolean',
|
|
55
|
+
description: 'Displays a delete (dustbin) icon when set to `true`.',
|
|
36
56
|
},
|
|
37
57
|
readonly: {
|
|
38
58
|
control: 'boolean',
|
|
59
|
+
description: 'Prevents editing the value when set to `true`.',
|
|
39
60
|
},
|
|
40
61
|
'--counter-margin-bottom': {
|
|
41
|
-
table: {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
control: {
|
|
45
|
-
type: null,
|
|
46
|
-
},
|
|
62
|
+
table: { defaultValue: { summary: '1rem' } },
|
|
63
|
+
control: 'text',
|
|
64
|
+
description: 'Defines the margin-bottom of the counter.',
|
|
47
65
|
},
|
|
48
66
|
},
|
|
49
67
|
args: {
|
|
@@ -63,10 +81,11 @@ const Template = (args) => html`
|
|
|
63
81
|
max="${ifDefined(args.max)}"
|
|
64
82
|
step="${ifDefined(args.step)}"
|
|
65
83
|
value="${ifDefined(args.value)}"
|
|
66
|
-
dustbin="${
|
|
84
|
+
?dustbin="${args.dustbin}"
|
|
85
|
+
?readonly="${args.readonly}"
|
|
67
86
|
input-id="${ifDefined(args['input-id'])}"
|
|
68
|
-
|
|
69
|
-
|
|
87
|
+
style="--counter-margin-bottom: ${ifDefined(args['--counter-margin-bottom'])};"
|
|
88
|
+
></road-counter>
|
|
70
89
|
`;
|
|
71
90
|
|
|
72
91
|
export const Playground = Template.bind({});
|
|
@@ -80,3 +99,13 @@ export const Small = Template.bind({});
|
|
|
80
99
|
Small.args = {
|
|
81
100
|
size: 'sm',
|
|
82
101
|
};
|
|
102
|
+
|
|
103
|
+
export const ReadOnly = Template.bind({});
|
|
104
|
+
ReadOnly.args = {
|
|
105
|
+
readonly: true,
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const WithDustbin = Template.bind({});
|
|
109
|
+
WithDustbin.args = {
|
|
110
|
+
dustbin: true,
|
|
111
|
+
};
|