@roadtrip/components 3.29.0 → 3.31.0
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-12592729.js +16 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/road-badge_14.cjs.entry.js +2 -2
- package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
- package/dist/cjs/road-global-navigation-v2.cjs.entry.js +146 -0
- package/dist/cjs/road-global-navigation-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/road-navbar-item-v2.cjs.entry.js +83 -0
- package/dist/cjs/road-navbar-item-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/road-navbar-v2.cjs.entry.js +46 -0
- package/dist/cjs/road-navbar-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/road-toolbar-v2.cjs.entry.js +21 -0
- package/dist/cjs/road-toolbar-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/road-tooltip.cjs.entry.js +23 -3
- package/dist/cjs/road-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/roadtrip.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/drawer/drawer.css +1 -0
- package/dist/collection/components/global-navigation-v2/global-navigation-v2.css +14 -0
- package/dist/collection/components/global-navigation-v2/global-navigation-v2.js +231 -0
- package/dist/collection/components/global-navigation-v2/global-navigation-v2.js.map +1 -0
- package/dist/collection/components/global-navigation-v2/global-navigation-v2.stories.js +446 -0
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/navbar-item-v2/navbar-item-v2.css +221 -0
- package/dist/collection/components/navbar-item-v2/navbar-item-v2.js +268 -0
- package/dist/collection/components/navbar-item-v2/navbar-item-v2.js.map +1 -0
- package/dist/collection/components/navbar-v2/navbar-v2.css +113 -0
- package/dist/collection/components/navbar-v2/navbar-v2.js +143 -0
- package/dist/collection/components/navbar-v2/navbar-v2.js.map +1 -0
- package/dist/collection/components/navbar-v2/navbar-v2.stories.js +381 -0
- package/dist/collection/components/toolbar-v2/toolbar-v2.css +216 -0
- package/dist/collection/components/toolbar-v2/toolbar-v2.js +27 -0
- package/dist/collection/components/toolbar-v2/toolbar-v2.js.map +1 -0
- package/dist/collection/components/toolbar-v2/toolbar-v2.stories.js +90 -0
- package/dist/collection/components/tooltip/tooltip.css +2 -0
- package/dist/collection/components/tooltip/tooltip.js +22 -2
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/esm/index-52302079.js +16 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/road-badge_14.entry.js +2 -2
- package/dist/esm/road-badge_14.entry.js.map +1 -1
- package/dist/esm/road-global-navigation-v2.entry.js +142 -0
- package/dist/esm/road-global-navigation-v2.entry.js.map +1 -0
- package/dist/esm/road-navbar-item-v2.entry.js +79 -0
- package/dist/esm/road-navbar-item-v2.entry.js.map +1 -0
- package/dist/esm/road-navbar-v2.entry.js +42 -0
- package/dist/esm/road-navbar-v2.entry.js.map +1 -0
- package/dist/esm/road-toolbar-v2.entry.js +17 -0
- package/dist/esm/road-toolbar-v2.entry.js.map +1 -0
- package/dist/esm/road-tooltip.entry.js +23 -3
- package/dist/esm/road-tooltip.entry.js.map +1 -1
- package/dist/esm/roadtrip.js +1 -1
- package/dist/html.html-data.json +99 -0
- package/dist/roadtrip/p-36895fa7.entry.js +2 -0
- package/dist/roadtrip/p-36895fa7.entry.js.map +1 -0
- package/dist/roadtrip/p-586a101a.entry.js +2 -0
- package/dist/roadtrip/p-586a101a.entry.js.map +1 -0
- package/dist/roadtrip/p-5bf1b477.entry.js +2 -0
- package/dist/roadtrip/p-5bf1b477.entry.js.map +1 -0
- package/dist/roadtrip/p-5cdf4e2f.entry.js +2 -0
- package/dist/roadtrip/p-5cdf4e2f.entry.js.map +1 -0
- package/dist/roadtrip/p-a498e8eb.entry.js +2 -0
- package/dist/roadtrip/p-a498e8eb.entry.js.map +1 -0
- package/dist/roadtrip/p-e2e3aa1a.entry.js +2 -0
- package/dist/roadtrip/p-e2e3aa1a.entry.js.map +1 -0
- package/dist/roadtrip/roadtrip.css +1 -1
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/roadtrip/roadtrip.esm.js.map +1 -1
- package/dist/types/components/global-navigation-v2/global-navigation-v2.d.ts +32 -0
- package/dist/types/components/navbar-item-v2/navbar-item-v2.d.ts +61 -0
- package/dist/types/components/navbar-v2/navbar-v2.d.ts +23 -0
- package/dist/types/components/toolbar-v2/toolbar-v2.d.ts +11 -0
- package/dist/types/components/tooltip/tooltip.d.ts +6 -0
- package/dist/types/components-react.d.ts +81 -0
- package/dist/types/components.d.ts +180 -0
- package/hydrate/index.js +352 -6
- package/package.json +1 -1
- package/dist/roadtrip/p-1115f970.entry.js +0 -2
- package/dist/roadtrip/p-1115f970.entry.js.map +0 -1
- package/dist/roadtrip/p-a77727f2.entry.js +0 -2
- package/dist/roadtrip/p-a77727f2.entry.js.map +0 -1
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
+
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Navigation/GlobalNavigationV2',
|
|
7
|
+
component: 'road-global-navigation-v2',
|
|
8
|
+
subcomponents: {
|
|
9
|
+
'road-navbar-v2': 'road-navbar-v2',
|
|
10
|
+
'road-navbar-item-v2': 'road-navbar-item-v2',
|
|
11
|
+
'road-toolbar-v2': 'road-toolbar-v2',
|
|
12
|
+
},
|
|
13
|
+
parameters: {
|
|
14
|
+
actions: {
|
|
15
|
+
handles: ['roadnavbaritemclick'],
|
|
16
|
+
},
|
|
17
|
+
backgrounds: {
|
|
18
|
+
default: 'grey',
|
|
19
|
+
},
|
|
20
|
+
layout: 'fullscreen',
|
|
21
|
+
},
|
|
22
|
+
argTypes: {
|
|
23
|
+
toolbar: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
},
|
|
26
|
+
navbar: {
|
|
27
|
+
control: 'text',
|
|
28
|
+
},
|
|
29
|
+
'selected-tab': {
|
|
30
|
+
control: 'text',
|
|
31
|
+
},
|
|
32
|
+
'--z-index': {
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: { summary: '10' },
|
|
35
|
+
},
|
|
36
|
+
control: {
|
|
37
|
+
type: null,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
args: {
|
|
42
|
+
toolbar: `
|
|
43
|
+
<road-toolbar-v2 role="tabpanel">
|
|
44
|
+
<road-button slot="start" class="d-none d-xl-flex border-left-0 compact-button" color="ghost">
|
|
45
|
+
<road-icon name="navigation-back"></road-icon>
|
|
46
|
+
</road-button>
|
|
47
|
+
|
|
48
|
+
<road-select
|
|
49
|
+
slot="primary"
|
|
50
|
+
label="Antony MARQUAIS"
|
|
51
|
+
sizes="lg"
|
|
52
|
+
class="mb-0"
|
|
53
|
+
options='[
|
|
54
|
+
{ "value": "support", "label": "Support" },
|
|
55
|
+
{ "value": "feedback", "label": "Feedback" },
|
|
56
|
+
{ "value": "other", "label": "Other" }
|
|
57
|
+
]'
|
|
58
|
+
></road-select>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<road-button slot="primary" class="border-left-0 flex-none" color="ghost">
|
|
62
|
+
<road-icon name="navigation-close"></road-icon>
|
|
63
|
+
</road-button>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<road-select slot="end" label="Norauto Chambéry" sizes="lg" class="d-none d-xl-flex mb-0"></road-select>
|
|
67
|
+
|
|
68
|
+
<road-input-group slot="secondary" class="d-none d-xl-flex">
|
|
69
|
+
<road-input input-id="cardNumber" sizes="lg" label="Rechercher dans le catalogue" class="mb-0"></road-input>
|
|
70
|
+
<label slot="append" for="cardNumber">
|
|
71
|
+
<road-icon name="search" aria-hidden="true" role="img"></road-icon>
|
|
72
|
+
</label>
|
|
73
|
+
</road-input-group>
|
|
74
|
+
</road-toolbar-v2>
|
|
75
|
+
`,
|
|
76
|
+
navbar: `
|
|
77
|
+
<road-navbar-v2 role="tabpanel">
|
|
78
|
+
<div class="d-flex d-xl-block flex-grow-2 compact-container">
|
|
79
|
+
<a href="#" class="align-self-auto d-none mb-0 py-12 w-full d-xl-flex compact-logo">
|
|
80
|
+
<road-icon name="pass-maintain-logo-solid-color"></road-icon> <road-label class="font-weight-bold h6 mb-0 ml-8 d-xl-compact-none">App Name</road-label>
|
|
81
|
+
</a>
|
|
82
|
+
<hr class="w-full d-none d-xl-block mb-16"/>
|
|
83
|
+
|
|
84
|
+
<div class="text-left d-none d-xl-flex align-items-center mb-12">
|
|
85
|
+
<road-avatar slot="start" class="mr-16 mr-xl-compact-none">
|
|
86
|
+
<road-img src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar"></road-img>
|
|
87
|
+
</road-avatar>
|
|
88
|
+
<road-label class="d-xl-compact-none">
|
|
89
|
+
<p class="h8 mb-4">First and last name</p>
|
|
90
|
+
<p class="text-medium text-truncate m-0 text-gray">Poste</p>
|
|
91
|
+
</road-label>
|
|
92
|
+
</div>
|
|
93
|
+
<road-button expand color="destructive" outline="true" size="sm" class="mb-0 d-none d-xl-flex m-auto-xl-compact w-full w-xl-revert-compact" icon-only>
|
|
94
|
+
<road-icon name="log-out-outline" aria-hidden="true"></road-icon>
|
|
95
|
+
<road-label class="d-xl-compact-none ml-xl-8">Se déconnecter</road-label>
|
|
96
|
+
</road-button>
|
|
97
|
+
|
|
98
|
+
<hr class="w-full d-none d-xl-block my-16"/>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<road-drawer is-open="false" position="left" drawer-width="480" drawer-title="Edit profil" class="drawer-profil" has-close-icon="true">
|
|
102
|
+
<road-avatar class="mx-auto mb-16 mt-24" size="lg">
|
|
103
|
+
<road-img src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar"></road-img>
|
|
104
|
+
</road-avatar>
|
|
105
|
+
<road-label class="mb-24">
|
|
106
|
+
<p class="h8 mb-4">First and last name</p>
|
|
107
|
+
<p class="text-medium text-truncate m-0">Email</p>
|
|
108
|
+
</road-label>
|
|
109
|
+
|
|
110
|
+
<div class="p-16" style="position: absolute; bottom: 0; width: 100%">
|
|
111
|
+
<road-button color="secondary" expand="" class="mb-0">Save changes</road-button>
|
|
112
|
+
</div>
|
|
113
|
+
</road-drawer>
|
|
114
|
+
|
|
115
|
+
<script>
|
|
116
|
+
document.querySelector('.edit-profil').addEventListener('click', () => {
|
|
117
|
+
document.querySelector('.drawer-profil').setAttribute('is-open', 'true');
|
|
118
|
+
});
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<road-navbar-item-v2 tab="tab-home" role="tabpanel">
|
|
123
|
+
<road-tooltip content="Home" position="right" trigger="focus" contentalign="center" class="d-block d-xl-flex align-items-center">
|
|
124
|
+
<road-icon name="navigation-home-outline" role="img" class="mr-xl-12"></road-icon>
|
|
125
|
+
<road-label class="font-weight-bold d-xl-compact-none">Home</road-label>
|
|
126
|
+
</road-tooltip>
|
|
127
|
+
</road-navbar-item-v2>
|
|
128
|
+
|
|
129
|
+
<road-navbar-item-v2 tab="tab-search" role="tabpanel">
|
|
130
|
+
<road-tooltip content="Search" position="right" trigger="focus" contentalign="center" class="d-block d-xl-flex align-items-center">
|
|
131
|
+
<road-icon name="search" role="img" class="mr-xl-12"></road-icon>
|
|
132
|
+
<road-label class="font-weight-bold d-xl-compact-none">Search</road-label>
|
|
133
|
+
</road-tooltip>
|
|
134
|
+
</road-navbar-item-v2>
|
|
135
|
+
|
|
136
|
+
<road-navbar-item-v2 tab="tab-catalog" role="tabpanel">
|
|
137
|
+
<road-tooltip content="Print" position="right" trigger="focus" contentalign="center" class="d-block d-xl-flex align-items-center">
|
|
138
|
+
<road-icon name="print-outline" role="img" class="mr-xl-12"></road-icon>
|
|
139
|
+
<road-label class="font-weight-bold d-xl-compact-none">Print</road-label>
|
|
140
|
+
</road-tooltip>
|
|
141
|
+
</road-navbar-item-v2>
|
|
142
|
+
|
|
143
|
+
<road-navbar-item-v2 tab="tab-notification" class="d-none d-xl-flex" role="tabpanel">
|
|
144
|
+
<road-tooltip content="Notifications" position="right" trigger="focus" contentalign="center" class="d-block d-xl-flex align-items-center">
|
|
145
|
+
<road-icon name="alert-notification-outline" role="img" class="mr-xl-12"></road-icon>
|
|
146
|
+
<road-label class="font-weight-bold d-xl-compact-none">Notifications</road-label>
|
|
147
|
+
</road-tooltip>
|
|
148
|
+
</road-navbar-item-v2>
|
|
149
|
+
|
|
150
|
+
<road-navbar-item-v2 tab="tab-scan" class="d-none d-xl-flex" role="tabpanel">
|
|
151
|
+
<road-tooltip content="Scan" position="right" trigger="focus" contentalign="center" class="d-block d-xl-flex align-items-center">
|
|
152
|
+
<road-icon name="scan" role="img" class="mr-xl-12"></road-icon>
|
|
153
|
+
<road-label class="font-weight-bold d-xl-compact-none">Scan</road-label>
|
|
154
|
+
</road-tooltip>
|
|
155
|
+
</road-navbar-item-v2>
|
|
156
|
+
|
|
157
|
+
<road-navbar-item-v2 tab="tab-catalogue" class="d-none d-xl-flex" role="tabpanel">
|
|
158
|
+
<road-tooltip content="Catalogue" position="right" trigger="focus" contentalign="center" class="d-block d-xl-flex align-items-center">
|
|
159
|
+
<road-icon name="file-catalog" role="img" class="mr-xl-12"></road-icon>
|
|
160
|
+
<road-label class="font-weight-bold d-xl-compact-none">Catalogue</road-label>
|
|
161
|
+
</road-tooltip>
|
|
162
|
+
</road-navbar-item-v2>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<road-navbar-item-v2 tab="tab-diag" class="d-none d-xl-flex" role="tabpanel">
|
|
166
|
+
<road-tooltip content="Diagnostic" position="right" trigger="focus" contentalign="center" class="d-block d-xl-flex align-items-center">
|
|
167
|
+
<road-icon name="Diagnostic" role="img" class="mr-xl-12"></road-icon>
|
|
168
|
+
<road-label class="font-weight-bold d-xl-compact-none">Diagnostic</road-label>
|
|
169
|
+
</road-toolip>
|
|
170
|
+
</road-navbar-item-v2>
|
|
171
|
+
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<div class="text-gray">
|
|
176
|
+
|
|
177
|
+
<road-navbar-item-v2 tab="tab-help" class="d-none d-xl-flex" role="tabpanel">
|
|
178
|
+
<road-tooltip content="Help" position="right" trigger="focus" contentalign="center" class="d-none d-xl-flex align-items-center">
|
|
179
|
+
<road-icon name="alert-question-outline" role="img" class="mr-xl-12"></road-icon><road-label class="font-weight-bold d-xl-compact-none">Help</road-label>
|
|
180
|
+
</road-toolip>
|
|
181
|
+
</road-navbar-item-v2>
|
|
182
|
+
|
|
183
|
+
<road-navbar-item-v2 tab="tab-feedback" class="d-none d-xl-flex" role="tabpanel">
|
|
184
|
+
<road-tooltip content="Feedback" position="right" trigger="focus" contentalign="center" class="d-none d-xl-flex align-items-center">
|
|
185
|
+
<road-icon name="speak-advice-outline" role="img" class="mr-xl-12"></road-icon></road-icon><road-label class="font-weight-bold d-xl-compact-none">Feedback</road-label>
|
|
186
|
+
</road-toolip>
|
|
187
|
+
</road-navbar-item-v2>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<road-navbar-item-v2 tab="tab-menu" class="d-block d-xl-none tab-menu">
|
|
195
|
+
<road-icon name="navigation-menu" role="img"></road-icon>
|
|
196
|
+
<road-label>Menu</road-label>
|
|
197
|
+
</road-navbar-item-v2>
|
|
198
|
+
|
|
199
|
+
<road-drawer is-open="false" position="right" drawer-width="480" class="d-xl-none drawer-menu">
|
|
200
|
+
<div class="p-16 pt-0">
|
|
201
|
+
<div class="text-left d-flex align-items-center">
|
|
202
|
+
<road-avatar slot="start" class="mr-16">
|
|
203
|
+
<road-img src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar"></road-img>
|
|
204
|
+
</road-avatar>
|
|
205
|
+
<road-label>
|
|
206
|
+
<p class="h8 mb-4">First and last name</p>
|
|
207
|
+
<p class="text-medium text-truncate m-0 text-gray">Poste</p>
|
|
208
|
+
</road-label>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<road-button expand color="destructive" outline="true" size="sm" class="d-flex mb-16 mt-12">
|
|
212
|
+
<road-icon slot="start" name="log-out-outline" aria-hidden="true"></road-icon>
|
|
213
|
+
Se déconnecter
|
|
214
|
+
</road-button>
|
|
215
|
+
|
|
216
|
+
<road-item class="text-left bg-light profil" tabindex="0">
|
|
217
|
+
<road-label>
|
|
218
|
+
<span class="text-content mb-8 d-flex align-items-center">
|
|
219
|
+
<road-icon size="sm" class="mr-8" name="shop-outline" role="img"></road-icon>
|
|
220
|
+
Centre
|
|
221
|
+
</span>
|
|
222
|
+
<p class="h8 mb-4">054 Norauto Chambéry
|
|
223
|
+
<p class="text-content mb-0">Code collaborateur 18</p>
|
|
224
|
+
|
|
225
|
+
</road-label>
|
|
226
|
+
<road-icon slot="end" name="navigation-chevron" size="lg" class="ml-16" role="img"></road-icon>
|
|
227
|
+
</road-item>
|
|
228
|
+
|
|
229
|
+
<road-input-group slot="secondary" class="d-block d-xl-none my-12">
|
|
230
|
+
<road-input input-id="cardNumber" sizes="lg" label="Rechercher dans le catalogue" class="mb-0"></road-input>
|
|
231
|
+
<label slot="append" for="cardNumber">
|
|
232
|
+
<road-icon name="search" aria-hidden="true" role="img"></road-icon>
|
|
233
|
+
</label>
|
|
234
|
+
</road-input-group>
|
|
235
|
+
|
|
236
|
+
<hr class="my-16">
|
|
237
|
+
|
|
238
|
+
<road-item class="bg-white border-0" button="true">
|
|
239
|
+
<road-icon name="scan"></road-icon>
|
|
240
|
+
Scan
|
|
241
|
+
</road-item>
|
|
242
|
+
|
|
243
|
+
<road-item class="bg-white border-0" button="true">
|
|
244
|
+
<road-icon name="file-catalog"></road-icon>
|
|
245
|
+
Catalogue
|
|
246
|
+
</road-item>
|
|
247
|
+
|
|
248
|
+
<road-item class="bg-white border-0" button="true">
|
|
249
|
+
<road-icon name="Diagnostic"></road-icon>
|
|
250
|
+
Diagnostic
|
|
251
|
+
</road-item>
|
|
252
|
+
|
|
253
|
+
<road-item class="bg-white border-0" button="true">
|
|
254
|
+
<road-icon name="log-out"></road-icon>
|
|
255
|
+
Log out
|
|
256
|
+
</road-item>
|
|
257
|
+
<road-item class="bg-white border-left-0 border-right-0 border-bottom-0 border-top" button="true">
|
|
258
|
+
<road-icon name="alert-question-outline" role="img"></road-icon>Help
|
|
259
|
+
</road-item>
|
|
260
|
+
</div>
|
|
261
|
+
</road-drawer>
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
<road-drawer is-open="false" position="right" drawer-width="480" drawer-title="Menu" class="d-xl-none drawer-menu2" has-back-icon="true" has-close-icon="true" back-text="back">
|
|
265
|
+
<road-avatar class="mx-auto mb-16 mt-24" size="lg">
|
|
266
|
+
<road-img src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar"></road-img>
|
|
267
|
+
</road-avatar>
|
|
268
|
+
<road-label class="mb-24">
|
|
269
|
+
<p class="h8 mb-4">First and last name</p>
|
|
270
|
+
<p class="text-medium text-truncate m-0">Email</p>
|
|
271
|
+
</road-label>
|
|
272
|
+
|
|
273
|
+
<div class="p-16" style="position: absolute; bottom: 0; width: 100%">
|
|
274
|
+
<road-button color="secondary" expand="" class="mb-0">Save changes</road-button>
|
|
275
|
+
</div>
|
|
276
|
+
</road-drawer>
|
|
277
|
+
</road-navbar-v2>
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
<script>
|
|
281
|
+
document.querySelector('.tab-menu').addEventListener('click', () => {
|
|
282
|
+
document.querySelector('.drawer-menu').setAttribute('is-open', 'true');
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
document.querySelector('.profil').addEventListener('click', () => {
|
|
286
|
+
document.querySelector('.drawer-menu2').setAttribute('is-open', 'true');
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
</script>`,
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
const Template = (args) => html`
|
|
294
|
+
<road-global-navigation-v2 selected-tab="${ifDefined(args['selected-tab'])}">
|
|
295
|
+
${unsafeHTML(args.toolbar)}
|
|
296
|
+
${unsafeHTML(args.navbar)}
|
|
297
|
+
</road-global-navigation-v2>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
`;
|
|
301
|
+
|
|
302
|
+
export const Playground = Template.bind({});
|
|
303
|
+
|
|
304
|
+
export const Page = Template.bind({});
|
|
305
|
+
Page.args = {
|
|
306
|
+
toolbar: `
|
|
307
|
+
<road-toolbar>
|
|
308
|
+
<road-button slot="start" class="border-left-0">
|
|
309
|
+
<road-icon name="navigation-chevron" rotate="180"></road-icon>
|
|
310
|
+
</road-button>
|
|
311
|
+
|
|
312
|
+
<road-toolbar-title>Search</road-toolbar-title>
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
</road-toolbar>
|
|
316
|
+
`,
|
|
317
|
+
navbar: `
|
|
318
|
+
<road-navbar-v2>
|
|
319
|
+
<road-profil-dropdown is-open="false" class="m-24 d-none d-xl-block">
|
|
320
|
+
<road-list slot="list">
|
|
321
|
+
<road-item button="" style="--border-radius: 0; --min-height: 2.5rem; --inner-padding: 0;">
|
|
322
|
+
<road-icon slot="start" name="edit-outline" size="md"></road-icon>
|
|
323
|
+
<road-label style="font-size: 0.75rem">
|
|
324
|
+
Edit profile
|
|
325
|
+
</road-label>
|
|
326
|
+
</road-item>
|
|
327
|
+
<road-item button="" style="--border-radius: 0; --min-height: 2.5rem; --inner-padding: 0;">
|
|
328
|
+
<road-icon slot="start" name="log-out-outline" size="md"></road-icon>
|
|
329
|
+
<road-label style="font-size: 0.75rem">
|
|
330
|
+
Log out
|
|
331
|
+
</road-label>
|
|
332
|
+
</road-item>
|
|
333
|
+
</road-list>
|
|
334
|
+
<road-img slot="avatar" src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar" title="Person name"></road-img>
|
|
335
|
+
<road-img slot="avatarItem" src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar" title="Person name"></road-img>
|
|
336
|
+
<road-label slot="name">First and Last name</road-label>
|
|
337
|
+
<road-label slot="email">email</road-label>
|
|
338
|
+
</road-profil-dropdown>
|
|
339
|
+
|
|
340
|
+
<road-navbar-item-v2 tab="tab-home" role="menu">
|
|
341
|
+
<road-icon name="navigation-home-outline"></road-icon>
|
|
342
|
+
<road-label style="font-size:0.75rem;">Home</road-label>
|
|
343
|
+
</road-navbar-item-v2>
|
|
344
|
+
|
|
345
|
+
<road-navbar-item-v2 tab="tab-search" role="menu">
|
|
346
|
+
<road-icon name="search"></road-icon>
|
|
347
|
+
<road-label style="font-size:0.75rem;">Search</road-label>
|
|
348
|
+
</road-navbar-item-v2>
|
|
349
|
+
|
|
350
|
+
<road-navbar-item-v2 tab="tab-catalog" role="menu">
|
|
351
|
+
<road-icon name="print-outline"></road-icon>
|
|
352
|
+
<road-label style="font-size:0.75rem;">Print</road-label>
|
|
353
|
+
</road-navbar-item-v2>
|
|
354
|
+
|
|
355
|
+
<road-navbar-item-v2 tab="tab-notification" class="d-none d-xl-flex" role="menu">
|
|
356
|
+
<road-icon name="alert-notification-outline"></road-icon>
|
|
357
|
+
<road-label style="font-size:0.75rem;">Notifications</road-label>
|
|
358
|
+
</road-navbar-item-v2>
|
|
359
|
+
|
|
360
|
+
<road-navbar-item-v2 tab="tab-scan" class="d-none d-xl-flex" role="menu">
|
|
361
|
+
<road-icon name="scan"></road-icon>
|
|
362
|
+
<road-label>Scan</road-label>
|
|
363
|
+
</road-navbar-item-v2>
|
|
364
|
+
|
|
365
|
+
<road-navbar-item-v2 tab="tab-catalogue" class="d-none d-xl-flex" role="menu">
|
|
366
|
+
<road-icon name="file-catalog"></road-icon>
|
|
367
|
+
<road-label style="font-size:0.75rem;">Catalogue</road-label>
|
|
368
|
+
</road-navbar-item-v2>
|
|
369
|
+
|
|
370
|
+
<road-navbar-item-v2 tab="tab-diag" class="d-none d-xl-flex" role="menu">
|
|
371
|
+
<road-icon name="Diagnostic"></road-icon>
|
|
372
|
+
<road-label style="font-size:0.75rem;">Diagnostic</road-label>
|
|
373
|
+
</road-navbar-item-v2>
|
|
374
|
+
|
|
375
|
+
<road-navbar-item-v2 tab="tab-menu" class="d-block d-xl-none tab-menu" role="menu">
|
|
376
|
+
<road-icon name="navigation-menu"></road-icon>
|
|
377
|
+
<road-label style="font-size:0.75rem;">Menu</road-label>
|
|
378
|
+
</road-navbar-item-v2>
|
|
379
|
+
|
|
380
|
+
<road-drawer is-open="false" position="right" drawer-width="480" drawer-title="Menu" class="d-xl-none drawer-menu">
|
|
381
|
+
<road-item class="mb-16 text-left bg-light profil" tabindex="0">
|
|
382
|
+
<road-avatar slot="start" class="mr-16">
|
|
383
|
+
<road-img src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar"></road-img>
|
|
384
|
+
</road-avatar>
|
|
385
|
+
<road-label>
|
|
386
|
+
<p class="h8 mb-4">First and last name</p>
|
|
387
|
+
<p class="text-medium text-truncate m-0">Email</p>
|
|
388
|
+
</road-label>
|
|
389
|
+
|
|
390
|
+
<road-icon slot="end" name="edit-outline" size="sm" class="mr-8"></road-icon>
|
|
391
|
+
</road-item>
|
|
392
|
+
|
|
393
|
+
<road-item class="bg-white">
|
|
394
|
+
<road-icon name="scan"></road-icon>
|
|
395
|
+
Scan
|
|
396
|
+
</road-item>
|
|
397
|
+
|
|
398
|
+
<road-item class="bg-white">
|
|
399
|
+
<road-icon name="file-catalog"></road-icon>
|
|
400
|
+
Catalogue
|
|
401
|
+
</road-item>
|
|
402
|
+
|
|
403
|
+
<road-item class="bg-white">
|
|
404
|
+
<road-icon name="Diagnostic"></road-icon>
|
|
405
|
+
Diagnostic
|
|
406
|
+
</road-item>
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
<road-item class="bg-white border-top ">
|
|
411
|
+
<road-icon name="log-out"></road-icon>
|
|
412
|
+
Log out
|
|
413
|
+
</road-item>
|
|
414
|
+
|
|
415
|
+
</road-drawer>
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
<road-drawer is-open="false" position="right" drawer-width="480" drawer-title="Menu" class="d-xl-none drawer-menu2" has-back-icon="true" has-close-icon="true" back-text="back">
|
|
419
|
+
<road-avatar class="mx-auto mb-16 mt-24" size="lg">
|
|
420
|
+
<road-img src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="avatar"></road-img>
|
|
421
|
+
</road-avatar>
|
|
422
|
+
<road-label class="mb-24">
|
|
423
|
+
<p class="h8 mb-4">First and last name</p>
|
|
424
|
+
<p class="text-medium text-truncate m-0">Email</p>
|
|
425
|
+
</road-label>
|
|
426
|
+
|
|
427
|
+
<div class="p-16" style="position: absolute; bottom: 0; width: 100%">
|
|
428
|
+
<road-button color="secondary" expand="" class="mb-0">Save changes</road-button>
|
|
429
|
+
</div>
|
|
430
|
+
</road-drawer>
|
|
431
|
+
</road-navbar-v2>
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
<script>
|
|
435
|
+
document.querySelector('.tab-menu').addEventListener('click', () => {
|
|
436
|
+
document.querySelector('.drawer-menu').setAttribute('is-open', 'true');
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
document.querySelector('.profil').addEventListener('click', () => {
|
|
440
|
+
document.querySelector('.drawer-menu2').setAttribute('is-open', 'true');
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
</script>`,
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Navbar item
|
|
3
|
+
*
|
|
4
|
+
* Index
|
|
5
|
+
* - Native
|
|
6
|
+
* - Inner
|
|
7
|
+
* - Icon
|
|
8
|
+
* - Badge
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
:host {
|
|
13
|
+
position: relative;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex: 1;
|
|
17
|
+
flex-basis: 0;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
flex-grow: 1;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
text-align: center;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (min-width: 1200px) {
|
|
27
|
+
|
|
28
|
+
:host {
|
|
29
|
+
flex-grow: inherit;
|
|
30
|
+
width: -moz-fit-content;
|
|
31
|
+
width: fit-content;
|
|
32
|
+
padding: var(--road-spacing-04) 0 var(--road-spacing-04) var(--road-spacing-04);
|
|
33
|
+
text-align: left;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Disabled
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
:host(.tab-disabled),
|
|
43
|
+
:host(.tab-disabled) road-tooltip,
|
|
44
|
+
:host(.tab-disabled) road-tooltip road-icon,
|
|
45
|
+
:host(.tab-disabled) ::slotted(road-icon) {
|
|
46
|
+
color: var(--road-on-surface-disabled);
|
|
47
|
+
cursor: not-allowed;
|
|
48
|
+
fill: var(--road-on-surface-disabled);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Selected state
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
:host(.tab-selected),
|
|
56
|
+
:host(.tab-selected) road-tooltip road-icon,
|
|
57
|
+
:host(.tab-selected) ::slotted(road-icon) {
|
|
58
|
+
color: var(--road-on-button-tertiary);
|
|
59
|
+
fill: var(--road-on-button-tertiary);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host(.tab-selected)::after {
|
|
63
|
+
position: absolute;
|
|
64
|
+
bottom: -12px;
|
|
65
|
+
left: 0;
|
|
66
|
+
display: block;
|
|
67
|
+
width: 100%;
|
|
68
|
+
height: 4px;
|
|
69
|
+
color: var(--road-on-button-tertiary);
|
|
70
|
+
content: "";
|
|
71
|
+
background-color: var(--road-on-button-tertiary);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (min-width: 1200px) {
|
|
75
|
+
|
|
76
|
+
:host(.tab-selected)::after {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Focus on Tab state
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
:host(.focus-visible) ::slotted(road-icon),
|
|
88
|
+
:host(.focus-visible) ::slotted(road-icon)::after,
|
|
89
|
+
:host(.focus-visible) ::slotted(road-label),
|
|
90
|
+
:host(.focus-visible) ::slotted(road-label)::after,
|
|
91
|
+
:host(:hover) ::slotted(road-icon),
|
|
92
|
+
:host(:hover) ::slotted(road-icon)::after,
|
|
93
|
+
:host(:hover) ::slotted(road-label),
|
|
94
|
+
:host(:hover) ::slotted(road-label)::after {
|
|
95
|
+
color: var(--road-on-button-tertiary);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host(.tab-disabled.focus-visible) ::slotted(road-icon),
|
|
99
|
+
:host(.tab-disabled.focus-visible) ::slotted(road-label),
|
|
100
|
+
:host(.tab-disabled:hover) ::slotted(road-icon),
|
|
101
|
+
:host(.tab-disabled:hover) ::slotted(road-label) {
|
|
102
|
+
color: var(--road-on-surface-disabled);
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
fill: var(--road-on-surface-disabled);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
/* NATIVE
|
|
109
|
+
-------------------- */
|
|
110
|
+
|
|
111
|
+
.button-native {
|
|
112
|
+
position: relative;
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: inherit;
|
|
116
|
+
align-items: inherit;
|
|
117
|
+
justify-content: inherit;
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: 100%;
|
|
120
|
+
margin: 0;
|
|
121
|
+
overflow: visible;
|
|
122
|
+
font-family: inherit;
|
|
123
|
+
font-size: inherit;
|
|
124
|
+
font-style: inherit;
|
|
125
|
+
font-weight: inherit;
|
|
126
|
+
color: inherit;
|
|
127
|
+
text-align: inherit;
|
|
128
|
+
text-decoration: none;
|
|
129
|
+
text-indent: inherit;
|
|
130
|
+
text-overflow: inherit;
|
|
131
|
+
text-transform: inherit;
|
|
132
|
+
letter-spacing: inherit;
|
|
133
|
+
white-space: inherit;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
background: transparent;
|
|
136
|
+
border-color: initial;
|
|
137
|
+
border-style: initial;
|
|
138
|
+
border-width: 0;
|
|
139
|
+
border-radius: inherit;
|
|
140
|
+
border-image: initial;
|
|
141
|
+
outline: 0;
|
|
142
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:host(.tab-disabled) .button-native {
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* INNER
|
|
150
|
+
-------------------- */
|
|
151
|
+
|
|
152
|
+
.button-inner {
|
|
153
|
+
position: relative;
|
|
154
|
+
z-index: 1;
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-flow: inherit;
|
|
157
|
+
align-items: inherit;
|
|
158
|
+
justify-content: inherit;
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* ICON
|
|
164
|
+
-------------------- */
|
|
165
|
+
|
|
166
|
+
::slotted(road-icon) {
|
|
167
|
+
display: block;
|
|
168
|
+
width: 2rem;
|
|
169
|
+
height: 2rem;
|
|
170
|
+
margin-right: auto;
|
|
171
|
+
margin-bottom: 0.25rem;
|
|
172
|
+
margin-left: auto;
|
|
173
|
+
fill: currentColor;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* TOOLTIP
|
|
177
|
+
-------------------- */
|
|
178
|
+
|
|
179
|
+
@media (min-width: 1200px) {
|
|
180
|
+
|
|
181
|
+
:host ::slotted(road-tooltip) {
|
|
182
|
+
width: 100%;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* LABEL
|
|
188
|
+
-------------------- */
|
|
189
|
+
|
|
190
|
+
::slotted(road-label) {
|
|
191
|
+
position: relative;
|
|
192
|
+
box-sizing: border-box;
|
|
193
|
+
display: flex;
|
|
194
|
+
flex: 1;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
font-size: var(--road-label-small);
|
|
197
|
+
font-weight: 700;
|
|
198
|
+
text-align: center;
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@media (min-width: 1200px) {
|
|
203
|
+
|
|
204
|
+
::slotted(road-label) {
|
|
205
|
+
display: block;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* BADGE
|
|
210
|
+
-------------------- */
|
|
211
|
+
|
|
212
|
+
::slotted(road-badge) {
|
|
213
|
+
position: absolute;
|
|
214
|
+
top: 4px;
|
|
215
|
+
left: calc(50% + 0.375rem);
|
|
216
|
+
z-index: 1;
|
|
217
|
+
box-sizing: border-box;
|
|
218
|
+
height: auto;
|
|
219
|
+
font-size: var(--road-font-size-10);
|
|
220
|
+
font-weight: 400;
|
|
221
|
+
}
|