@ongov/ontario-design-system-component-library 6.0.0-alpha.6 → 6.0.0-alpha.9
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/components/ontario-header.js.map +1 -1
- package/dist/cjs/ontario-accordion_48.cjs.entry.js.map +1 -1
- package/dist/collection/components/ontario-header/ontario-header.js +1 -1
- package/dist/collection/components/ontario-header/ontario-header.js.map +1 -1
- package/dist/esm/ontario-accordion_48.entry.js.map +1 -1
- package/dist/ontario-design-system-components/p-64a5a97a.entry.js.map +1 -1
- package/dist/types/components/ontario-header/ontario-header.d.ts +1 -1
- package/dist/types/components.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/ontario-header/ontario-header.tsx +1 -1
- package/src/components/ontario-header/readme.md +41 -50
- package/src/components/ontario-header-overflow-menu/readme.md +3 -30
- package/src/components.d.ts +1 -1
- package/www/build/p-64a5a97a.entry.js.map +1 -1
|
@@ -175,7 +175,7 @@ export declare class OntarioHeader {
|
|
|
175
175
|
): void;
|
|
176
176
|
/**
|
|
177
177
|
* This event is toggled when the menu button is pressed.
|
|
178
|
-
* The
|
|
178
|
+
* The `<ontario-header-overflow-menu>` sub-component listens for this event
|
|
179
179
|
* To trigger the showing and hiding of the overflow menu.
|
|
180
180
|
*/
|
|
181
181
|
menuButtonToggled: EventEmitter<boolean>;
|
|
@@ -4419,7 +4419,7 @@ declare namespace LocalJSX {
|
|
|
4419
4419
|
*/
|
|
4420
4420
|
menuItems?: MenuItem[] | string;
|
|
4421
4421
|
/**
|
|
4422
|
-
* This event is toggled when the menu button is pressed. The
|
|
4422
|
+
* This event is toggled when the menu button is pressed. The `<ontario-header-overflow-menu>` sub-component listens for this event To trigger the showing and hiding of the overflow menu.
|
|
4423
4423
|
*/
|
|
4424
4424
|
onMenuButtonToggled?: (event: OntarioHeaderCustomEvent<boolean>) => void;
|
|
4425
4425
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ongov/ontario-design-system-component-library",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Ontario Design System Component Library",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"test:unit": "stencil test --spec"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@ongov/ontario-design-system-design-tokens": "6.0.0-alpha.
|
|
79
|
-
"@ongov/ontario-design-system-global-styles": "6.0.0-alpha.
|
|
78
|
+
"@ongov/ontario-design-system-design-tokens": "6.0.0-alpha.9",
|
|
79
|
+
"@ongov/ontario-design-system-global-styles": "6.0.0-alpha.9",
|
|
80
80
|
"@stencil/core": "^4.33.1",
|
|
81
81
|
"dotenv": "^16.4.5",
|
|
82
82
|
"uuid": "^11.0.5"
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"collection:main": "dist/collection/index.js",
|
|
143
143
|
"es2015": "dist/esm/index.mjs",
|
|
144
144
|
"es2017": "dist/esm/index.mjs",
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "94ac0c8e4029a7a9044a84a0d8743e9f14767e09"
|
|
146
146
|
}
|
|
@@ -342,7 +342,7 @@ export class OntarioHeader {
|
|
|
342
342
|
|
|
343
343
|
/**
|
|
344
344
|
* This event is toggled when the menu button is pressed.
|
|
345
|
-
* The
|
|
345
|
+
* The `<ontario-header-overflow-menu>` sub-component listens for this event
|
|
346
346
|
* To trigger the showing and hiding of the overflow menu.
|
|
347
347
|
*/
|
|
348
348
|
@Event() menuButtonToggled: EventEmitter<boolean>;
|
|
@@ -105,49 +105,44 @@ Example of an Ontario.ca header component.
|
|
|
105
105
|
|
|
106
106
|
<div>
|
|
107
107
|
<OntarioHeader
|
|
108
|
-
|
|
108
|
+
assetBasePath={useBaseUrl("/assets")}
|
|
109
109
|
type="application"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
}
|
|
148
|
-
]'
|
|
149
|
-
custom-language-toggle="{changeLanguage}">
|
|
150
|
-
</OntarioHeader>
|
|
110
|
+
disableDynamicMenu="true"
|
|
111
|
+
applicationHeaderInfo={{
|
|
112
|
+
title: "Driving and roads",
|
|
113
|
+
href: "/driving-and-roads",
|
|
114
|
+
maxSubheaderLinks: {
|
|
115
|
+
desktop: 1,
|
|
116
|
+
tablet: 1,
|
|
117
|
+
},
|
|
118
|
+
}}
|
|
119
|
+
languageToggleOptions={{
|
|
120
|
+
englishLink: "/",
|
|
121
|
+
frenchLink: "/fr",
|
|
122
|
+
}}
|
|
123
|
+
menuItems={[
|
|
124
|
+
{
|
|
125
|
+
title: "Vehicle registration",
|
|
126
|
+
href: "/vehicle-registration",
|
|
127
|
+
linkIsActive: false,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
title: "Driver records",
|
|
131
|
+
href: "/driver-records",
|
|
132
|
+
linkIsActive: false,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
title: "Accessible Parking Permits",
|
|
136
|
+
href: "/accessible-parking-permits",
|
|
137
|
+
linkIsActive: true,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
title: "Highway traveler information",
|
|
141
|
+
href: "/highway-traveler-information",
|
|
142
|
+
linkIsActive: false,
|
|
143
|
+
},
|
|
144
|
+
]}
|
|
145
|
+
></OntarioHeader>
|
|
151
146
|
</div>
|
|
152
147
|
|
|
153
148
|
Example of an Application header component.
|
|
@@ -189,11 +184,7 @@ Example of an Application header component.
|
|
|
189
184
|
{
|
|
190
185
|
"title": "Highway traveler information",
|
|
191
186
|
"href": "/highway-traveler-information",
|
|
192
|
-
"linkIsActive": "true"
|
|
193
|
-
"onClickHandler": (e: Event) => {
|
|
194
|
-
e.preventDefault();
|
|
195
|
-
alert("Menu item clicked!")
|
|
196
|
-
},
|
|
187
|
+
"linkIsActive": "true"
|
|
197
188
|
}
|
|
198
189
|
]'
|
|
199
190
|
custom-language-toggle="{changeLanguage}"
|
|
@@ -312,9 +303,9 @@ Important considerations:
|
|
|
312
303
|
|
|
313
304
|
## Events
|
|
314
305
|
|
|
315
|
-
| Event | Description
|
|
316
|
-
| ------------------- |
|
|
317
|
-
| `menuButtonToggled` | This event is toggled when the menu button is pressed. The
|
|
306
|
+
| Event | Description | Type |
|
|
307
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
|
|
308
|
+
| `menuButtonToggled` | This event is toggled when the menu button is pressed. The `<ontario-header-overflow-menu>` sub-component listens for this event To trigger the showing and hiding of the overflow menu. | `CustomEvent<boolean>` |
|
|
318
309
|
|
|
319
310
|
## Dependencies
|
|
320
311
|
|
|
@@ -12,7 +12,7 @@ Once the component package has been installed (see Ontario Design System Compone
|
|
|
12
12
|
## Examples
|
|
13
13
|
|
|
14
14
|
```html
|
|
15
|
-
<ontario-header-menu
|
|
15
|
+
<ontario-header-overflow-menu
|
|
16
16
|
menu-items='[
|
|
17
17
|
{
|
|
18
18
|
"title":"Item 1",
|
|
@@ -31,36 +31,10 @@ Once the component package has been installed (see Ontario Design System Compone
|
|
|
31
31
|
"href":"/item-4"
|
|
32
32
|
},
|
|
33
33
|
]'
|
|
34
|
-
trap-menu-focus="false"
|
|
35
34
|
>
|
|
36
|
-
</ontario-header-menu
|
|
35
|
+
</ontario-header-overflow-menu>
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
<div>
|
|
40
|
-
<OntarioHeaderMenuOverflow
|
|
41
|
-
menu-items='[
|
|
42
|
-
{
|
|
43
|
-
"title":"Item 1",
|
|
44
|
-
"href":"/item-1"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"title":"Item 2",
|
|
48
|
-
"href":"/item-2"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"title":"Item 3",
|
|
52
|
-
"href":"/item-3"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"title":"Item 4",
|
|
56
|
-
"href":"/item-4"
|
|
57
|
-
},
|
|
58
|
-
]'
|
|
59
|
-
trap-menu-focus='false'
|
|
60
|
-
>
|
|
61
|
-
</OntarioHeaderMenuOverflow>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
38
|
## Custom property types
|
|
65
39
|
|
|
66
40
|
### menuItems
|
|
@@ -92,8 +66,7 @@ If `maxSubheaderLinks` is set within `applicationHeaderInfo` on the `ontario-hea
|
|
|
92
66
|
{
|
|
93
67
|
"title": "Highway traveler information",
|
|
94
68
|
"href": "/highway-traveler-information",
|
|
95
|
-
"linkIsActive": "true"
|
|
96
|
-
"onClickHandler": (e: Event) => { e.preventDefault(); alert("Menu item clicked!") }
|
|
69
|
+
"linkIsActive": "true"
|
|
97
70
|
}
|
|
98
71
|
]'
|
|
99
72
|
></ontario-header>
|
package/src/components.d.ts
CHANGED
|
@@ -4419,7 +4419,7 @@ declare namespace LocalJSX {
|
|
|
4419
4419
|
*/
|
|
4420
4420
|
menuItems?: MenuItem[] | string;
|
|
4421
4421
|
/**
|
|
4422
|
-
* This event is toggled when the menu button is pressed. The
|
|
4422
|
+
* This event is toggled when the menu button is pressed. The `<ontario-header-overflow-menu>` sub-component listens for this event To trigger the showing and hiding of the overflow menu.
|
|
4423
4423
|
*/
|
|
4424
4424
|
onMenuButtonToggled?: (event: OntarioHeaderCustomEvent<boolean>) => void;
|
|
4425
4425
|
/**
|