qc-trousse-sdg 1.2.5-dev → 1.3.0-develop.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/README.md +18 -3
- package/dist/css/qc-sdg-design-tokens.min.css +1 -1
- package/dist/css/qc-sdg-no-grid.min.css +1 -1
- package/dist/css/qc-sdg.min.css +1 -1
- package/dist/img/QUEBEC_blanc.svg +1 -1
- package/dist/img/QUEBEC_couleur.svg +24 -0
- package/dist/js/qc-sdg.min.js +1 -1
- package/package.json +23 -18
- package/public/css/qc-doc-sdg.css +247 -335
- package/public/css/qc-sdg-design-tokens.css +111 -64
- package/public/css/qc-sdg-no-grid.css +932 -428
- package/public/css/qc-sdg.css +941 -609
- package/public/img/QUEBEC_blanc.svg +1 -1
- package/public/img/QUEBEC_couleur.svg +24 -0
- package/public/img/ampoule.svg +1 -0
- package/public/img/note.svg +1 -0
- package/public/img/piv-MCE-theme-clair.svg +79 -0
- package/public/img/piv-MCE-theme-sombre.svg +62 -0
- package/public/img/piv-bas-MCE-theme-clair.png +0 -0
- package/public/img/piv-bas-MCE-theme-sombre.png +0 -0
- package/public/img/piv-logo-pied-de-page.svg +37 -0
- package/public/index.html +871 -715
- package/public/js/qc-doc-exemple.js +9 -0
- package/public/js/qc-doc-sdg.js +6893 -3724
- package/public/js/qc-sdg.js +2103 -962
- package/rollup.config.js +58 -23
- package/src/doc/components/Code.svelte +69 -0
- package/src/doc/components/Exemple.svelte +71 -0
- package/src/doc/components/Switch.svelte +108 -0
- package/src/doc/components/TopNav.svelte +53 -0
- package/src/doc/components/color-doc.svelte +44 -0
- package/src/doc/qc-doc-sdg.js +25 -14
- package/src/doc/scss/_tables.scss +1 -2
- package/src/doc/scss/components/_button.scss +14 -14
- package/src/doc/scss/components/_code.scss +106 -4
- package/src/doc/scss/jQueryUI/_jquery-ui.autocomplete.scss +48 -0
- package/src/doc/scss/qc-doc-sdg.scss +76 -75
- package/src/sdg/components/Button/IconButton.svelte +29 -0
- package/src/sdg/components/Icon.svelte +39 -0
- package/src/sdg/components/{pivHeader.svelte → PivHeader/pivHeader.svelte} +49 -69
- package/src/sdg/components/SearchBar/searchBar.svelte +87 -0
- package/src/sdg/components/SearchInput/SearchInput.svelte +48 -0
- package/src/sdg/components/alert.svelte +40 -23
- package/src/sdg/components/componentWrapper.js +0 -3
- package/src/sdg/components/externalLink.svelte +92 -0
- package/src/sdg/components/notice.svelte +61 -34
- package/src/sdg/components/pivFooter.svelte +37 -36
- package/src/sdg/components/toTop.svelte +16 -10
- package/src/sdg/components/utils.js +28 -4
- package/src/sdg/qc-sdg.js +11 -3
- package/src/sdg/scss/_qc-sdg-lib.scss +3 -0
- package/src/sdg/scss/base/_accessibility.scss +4 -0
- package/src/sdg/scss/base/_colors.scss +10 -10
- package/src/sdg/scss/base/_figure.scss +14 -9
- package/src/sdg/scss/base/_fonts.scss +4 -4
- package/src/sdg/scss/base/_form.scss +7 -0
- package/src/sdg/scss/base/_layout.scss +45 -0
- package/src/sdg/scss/base/_lists.scss +5 -5
- package/src/sdg/scss/base/_shadings.scss +3 -11
- package/src/sdg/scss/base/_typography.scss +42 -25
- package/src/sdg/scss/components/_alert.scss +11 -34
- package/src/sdg/scss/components/_icons.scss +67 -38
- package/src/sdg/scss/components/_notice.scss +51 -44
- package/src/sdg/scss/components/_pivFooter.scss +35 -23
- package/src/sdg/scss/components/_pivHeader.scss +131 -154
- package/src/sdg/scss/components/_searchBar.scss +75 -0
- package/src/sdg/scss/components/_searchInput.scss +64 -0
- package/src/sdg/scss/components/_separator.scss +2 -5
- package/src/sdg/scss/components/_toTop.scss +4 -6
- package/src/sdg/scss/grid/_grid-lib.scss +516 -0
- package/src/sdg/scss/grid/_grid.scss +78 -0
- package/src/sdg/scss/lib/_functions.scss +78 -0
- package/src/sdg/scss/lib/_gridless-lib.scss +4 -0
- package/src/sdg/scss/lib/_mixins.scss +221 -0
- package/src/sdg/scss/qc-design-tokens.scss +31 -8
- package/src/sdg/scss/qc-sdg-utilities.scss +1 -0
- package/src/sdg/scss/qc-sdg.scss +1 -1
- package/src/sdg/scss/qc-sgd-no-grid.scss +20 -15
- package/src/sdg/scss/settings/_base.scss +58 -0
- package/src/sdg/scss/settings/_tokens.scss +145 -77
- package/src/sdg/scss/utilities/_display.scss +43 -3
- package/src/sdg/scss/utilities/_themes.scss +17 -0
- package/src/sdg/scss/vendor/modern-css-reset/src/reset.css +9 -8
- package/dist/img/logo-quebec-piv-footer.svg +0 -1
- package/dist/img/quebec-logo.svg +0 -13
- package/public/img/logo-quebec-piv-footer.svg +0 -1
- package/src/doc/components/code.svelte +0 -54
- package/src/sdg/scss/base/_grid.scss +0 -9
- package/src/sdg/scss/functions/_tokens.scss +0 -12
- package/src/sdg/scss/functions/_utils.scss +0 -44
- package/src/sdg/scss/modules/_grid.scss +0 -19
- package/src/sdg/scss/modules/_helpers.scss +0 -32
- package/src/sdg/scss/modules/_map.scss +0 -14
- package/src/sdg/scss/modules/_tokens.scss +0 -3
- package/src/sdg/scss/modules/_utils.scss +0 -55
- package/src/sdg/scss/settings/_grid.scss +0 -24
- package/src/sdg/scss/settings/_settings.scss +0 -12
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
@use "
|
|
2
|
-
@use "functions/utils" as *;
|
|
3
|
-
@use "modules/tokens" as *;
|
|
4
|
-
@use "modules/utils" as *;
|
|
1
|
+
@use "qc-sdg-lib" as *;
|
|
5
2
|
|
|
6
3
|
qc-code {
|
|
7
4
|
display: block;
|
|
@@ -60,3 +57,108 @@ pre {
|
|
|
60
57
|
margin-top: token-value(spacer lg);
|
|
61
58
|
}
|
|
62
59
|
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
pre code.hljs {
|
|
63
|
+
display: block;
|
|
64
|
+
overflow-x: auto;
|
|
65
|
+
padding: 1em
|
|
66
|
+
}
|
|
67
|
+
code.hljs {
|
|
68
|
+
padding: rem(4)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
pre code.hljs {
|
|
72
|
+
display: block;
|
|
73
|
+
overflow-x: auto;
|
|
74
|
+
padding: rem(16)
|
|
75
|
+
}
|
|
76
|
+
code.hljs {
|
|
77
|
+
padding: rem(4)
|
|
78
|
+
}
|
|
79
|
+
/* end baseline CSS */
|
|
80
|
+
.hljs {
|
|
81
|
+
background: token-value(color grey pale);
|
|
82
|
+
color: token-value(color blue dark)
|
|
83
|
+
}
|
|
84
|
+
/* Base color: saturation 0; */
|
|
85
|
+
.hljs-subst {
|
|
86
|
+
/* default */
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
/* purposely ignored */
|
|
90
|
+
.hljs-formula,
|
|
91
|
+
.hljs-attr,
|
|
92
|
+
.hljs-property,
|
|
93
|
+
.hljs-params {
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
.hljs-comment {
|
|
97
|
+
color: token-value(color grey dark)
|
|
98
|
+
}
|
|
99
|
+
.hljs-tag,
|
|
100
|
+
.hljs-punctuation {
|
|
101
|
+
color: token-value(color blue medium)
|
|
102
|
+
}
|
|
103
|
+
.hljs-tag .hljs-name,
|
|
104
|
+
.hljs-tag .hljs-attr {
|
|
105
|
+
color: token-value(color blue dark)
|
|
106
|
+
}
|
|
107
|
+
.hljs-keyword,
|
|
108
|
+
.hljs-attribute,
|
|
109
|
+
.hljs-selector-tag,
|
|
110
|
+
.hljs-meta .hljs-keyword,
|
|
111
|
+
.hljs-doctag,
|
|
112
|
+
.hljs-name {
|
|
113
|
+
font-weight: bold
|
|
114
|
+
}
|
|
115
|
+
/* User color: hue: 0 */
|
|
116
|
+
.hljs-type,
|
|
117
|
+
.hljs-string,
|
|
118
|
+
.hljs-number,
|
|
119
|
+
.hljs-selector-id,
|
|
120
|
+
.hljs-selector-class,
|
|
121
|
+
.hljs-quote,
|
|
122
|
+
.hljs-template-tag,
|
|
123
|
+
.hljs-deletion {
|
|
124
|
+
color: token-value(color red dark)
|
|
125
|
+
}
|
|
126
|
+
.hljs-title,
|
|
127
|
+
.hljs-section {
|
|
128
|
+
color: token-value(color red dark);
|
|
129
|
+
font-weight: bold
|
|
130
|
+
}
|
|
131
|
+
.hljs-regexp,
|
|
132
|
+
.hljs-symbol,
|
|
133
|
+
.hljs-variable,
|
|
134
|
+
.hljs-template-variable,
|
|
135
|
+
.hljs-link,
|
|
136
|
+
.hljs-selector-attr,
|
|
137
|
+
.hljs-operator,
|
|
138
|
+
.hljs-selector-pseudo {
|
|
139
|
+
color: token-value(color pink regular)
|
|
140
|
+
}
|
|
141
|
+
/* Language color: hue: 90; */
|
|
142
|
+
.hljs-literal {
|
|
143
|
+
color: token-value(color green regular)
|
|
144
|
+
}
|
|
145
|
+
.hljs-built_in,
|
|
146
|
+
.hljs-bullet,
|
|
147
|
+
.hljs-code,
|
|
148
|
+
.hljs-addition {
|
|
149
|
+
color: token-value(color green dark)
|
|
150
|
+
}
|
|
151
|
+
/* Meta color: hue: 200 */
|
|
152
|
+
.hljs-meta {
|
|
153
|
+
color: token-value(color blue medium)
|
|
154
|
+
}
|
|
155
|
+
.hljs-meta .hljs-string {
|
|
156
|
+
color: token-value(color blue regular)
|
|
157
|
+
}
|
|
158
|
+
/* Misc effects */
|
|
159
|
+
.hljs-emphasis {
|
|
160
|
+
font-style: italic
|
|
161
|
+
}
|
|
162
|
+
.hljs-strong {
|
|
163
|
+
font-weight: bold
|
|
164
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@use "qc-sdg-lib" as *;
|
|
2
|
+
.ui-autocomplete {
|
|
3
|
+
max-height: calc(rem(32 * 5) + 2px) !important;
|
|
4
|
+
overflow-y: auto !important;
|
|
5
|
+
list-style-type: none !important;
|
|
6
|
+
padding-left: 0 !important;
|
|
7
|
+
margin: 0 !important;
|
|
8
|
+
border: 1px solid token-value(color grey medium);
|
|
9
|
+
background-color: token-value(color background);
|
|
10
|
+
@include qc-shading(4);
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ui-menu-item {
|
|
15
|
+
padding: 0!important;
|
|
16
|
+
margin: 0!important;
|
|
17
|
+
}
|
|
18
|
+
.ui-menu-item-wrapper {
|
|
19
|
+
padding: rem(8);
|
|
20
|
+
}
|
|
21
|
+
.ui-state-active {
|
|
22
|
+
background-color: token-value(color blue pale);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ui-autocomplete::-webkit-scrollbar {
|
|
26
|
+
width: 8px;
|
|
27
|
+
margin-left: 5px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Track */
|
|
31
|
+
.ui-autocomplete::-webkit-scrollbar-track {
|
|
32
|
+
background: token-value(color background);;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Handle */
|
|
36
|
+
.ui-autocomplete::-webkit-scrollbar-thumb {
|
|
37
|
+
background: token-value(color blue piv);
|
|
38
|
+
border-radius: 15px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Handle on hover */
|
|
42
|
+
.ui-autocomplete::-webkit-scrollbar-thumb:hover {
|
|
43
|
+
background: token-value(color blue piv);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ui-helper-hidden-accessible {
|
|
47
|
+
@include sr-only();
|
|
48
|
+
}
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
@use "
|
|
2
|
-
@use "functions/utils" as *;
|
|
3
|
-
@use "modules/tokens" as *;
|
|
4
|
-
@use "modules/utils" as *;
|
|
5
|
-
@use "components/icons" as *;
|
|
1
|
+
@use "qc-sdg-lib" as *;
|
|
6
2
|
@use "components/code" as *;
|
|
7
3
|
@use "components/button" as *;
|
|
8
4
|
@use "tables";
|
|
5
|
+
@use "jQueryUI/jquery-ui.autocomplete";
|
|
9
6
|
|
|
10
7
|
main {
|
|
11
|
-
|
|
8
|
+
margin-bottom: token-value(spacer lg);
|
|
12
9
|
}
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
display:
|
|
16
|
-
|
|
17
|
-
align-items: center;
|
|
18
|
-
> div + div {
|
|
19
|
-
margin-left: token-value(spacer,md);
|
|
20
|
-
}
|
|
21
|
-
& + & {
|
|
22
|
-
margin-top: token-value(spacer,md);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.color-sample {
|
|
27
|
-
width: rem(6 * $base-spacer);
|
|
28
|
-
height: rem(6 * $base-spacer);
|
|
29
|
-
border-radius: 50%;
|
|
30
|
-
flex-shrink: 0;
|
|
11
|
+
qc-color-doc {
|
|
12
|
+
display: block;
|
|
13
|
+
margin-bottom: token-value(spacer,md);;
|
|
31
14
|
}
|
|
32
15
|
.title-samples {
|
|
33
16
|
border: 1px solid token-value(color,grey,light);
|
|
@@ -54,6 +37,9 @@ main {
|
|
|
54
37
|
font-family: token-value(font,family,header);
|
|
55
38
|
}
|
|
56
39
|
|
|
40
|
+
h1,h2,h3,h4,h5,h6 {
|
|
41
|
+
scroll-margin-top: rem(96);
|
|
42
|
+
}
|
|
57
43
|
|
|
58
44
|
#grid-samples {
|
|
59
45
|
position: relative;
|
|
@@ -89,15 +75,20 @@ main {
|
|
|
89
75
|
}
|
|
90
76
|
}
|
|
91
77
|
|
|
92
|
-
|
|
78
|
+
#liste-elevation {
|
|
93
79
|
display: flex;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
80
|
+
gap: token-value(grid gutter);
|
|
81
|
+
flex-wrap: wrap;
|
|
82
|
+
[class*=qc-shading-] {
|
|
83
|
+
display: flex;
|
|
84
|
+
width: rem(15 * $base-spacer);
|
|
85
|
+
height: rem(15 * $base-spacer);
|
|
86
|
+
justify-content: center;
|
|
87
|
+
align-items: center;
|
|
98
88
|
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
&.qc-shading-0 {
|
|
90
|
+
border: 1px solid token-value(color, grey, light)
|
|
91
|
+
}
|
|
101
92
|
}
|
|
102
93
|
}
|
|
103
94
|
|
|
@@ -109,14 +100,32 @@ a {
|
|
|
109
100
|
&.pseudo-active {
|
|
110
101
|
@include active-link();
|
|
111
102
|
}
|
|
112
|
-
&.
|
|
113
|
-
|
|
103
|
+
&.pseudo-focus {
|
|
104
|
+
@include focus-link();
|
|
105
|
+
}
|
|
106
|
+
&.pseudo-visited {
|
|
107
|
+
color: token-value(color,link,visited)!important;
|
|
114
108
|
}
|
|
115
109
|
&.not-visited:visited:not(:hover) {
|
|
116
110
|
color: token-value(color,link,text);
|
|
117
111
|
}
|
|
118
112
|
}
|
|
119
113
|
|
|
114
|
+
span.qc-ext-link-img {
|
|
115
|
+
a.pseudo-visited & {
|
|
116
|
+
background: token-value(color link visited)!important;
|
|
117
|
+
}
|
|
118
|
+
a.pseudo-focus & {
|
|
119
|
+
background: token-value(color link hover)!important;
|
|
120
|
+
}
|
|
121
|
+
a.pseudo-hover & {
|
|
122
|
+
background: token-value(color link hover)!important;
|
|
123
|
+
}
|
|
124
|
+
a.pseudo-active & {
|
|
125
|
+
background: token-value(color link active)!important;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
120
129
|
p,h1,h2,h3,h4,h5,h6 {
|
|
121
130
|
hyphens: auto;
|
|
122
131
|
}
|
|
@@ -125,53 +134,45 @@ table.component-attributes-description td:first-child {
|
|
|
125
134
|
white-space: nowrap;
|
|
126
135
|
}
|
|
127
136
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
137
|
+
qc-piv-footer + qc-code {
|
|
138
|
+
margin-top: 0;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
qc-doc-exemple {
|
|
142
|
+
display: block;
|
|
143
|
+
margin-bottom: token-value(spacer xl);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
dl {
|
|
147
|
+
margin: 0 0 token-value(spacer content-block mb);
|
|
148
|
+
dt { font-weight: token-value(font weight content medium)}
|
|
149
|
+
dd {
|
|
150
|
+
margin-left: 0;
|
|
151
|
+
margin-bottom : token-value(spacer list-item mb);
|
|
152
|
+
& + dd {
|
|
153
|
+
margin-top : calc(-1 * token-value(spacer list-item mb));
|
|
154
|
+
&:has(.pseudo-focus) {
|
|
155
|
+
margin-top : calc(-1 * token-value(spacer list-item mb) + 6px);
|
|
146
156
|
}
|
|
147
157
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
&:focus{
|
|
156
|
-
outline: rem(2) solid token-value(color blue light);
|
|
157
|
-
border-left: 1px solid black;
|
|
158
|
-
}
|
|
159
|
-
.qc-search-submit {
|
|
160
|
-
min-width: rem(24);
|
|
161
|
-
height: rem(24);
|
|
162
|
-
align-self: center;
|
|
163
|
-
}
|
|
164
|
-
.sr-description {
|
|
165
|
-
position: absolute;
|
|
166
|
-
width: 1px;
|
|
167
|
-
height: 1px;
|
|
168
|
-
clip: rect(0 0 0 0);
|
|
169
|
-
}
|
|
158
|
+
}
|
|
159
|
+
&.qc-list-inline {
|
|
160
|
+
dt, dd { display: inline;}
|
|
161
|
+
dt::before {
|
|
162
|
+
display: block;
|
|
163
|
+
content: "";
|
|
164
|
+
margin-bottom: token-value(spacer list-item mb);
|
|
170
165
|
}
|
|
171
|
-
|
|
172
166
|
}
|
|
167
|
+
|
|
173
168
|
}
|
|
174
|
-
|
|
175
|
-
|
|
169
|
+
|
|
170
|
+
.table-overflow {
|
|
171
|
+
width: 100%;
|
|
172
|
+
overflow-x: auto;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
hr {
|
|
176
|
+
max-width: token-value(max-content-width);
|
|
176
177
|
}
|
|
177
178
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Icon from "../Icon.svelte";
|
|
3
|
+
|
|
4
|
+
export let
|
|
5
|
+
size = 'xl',
|
|
6
|
+
label,
|
|
7
|
+
icon,
|
|
8
|
+
iconSize,
|
|
9
|
+
iconColor
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<button on:click
|
|
15
|
+
data-button-size={size}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
class="qc-icon-button {$$restProps.class ?? ''}"
|
|
18
|
+
|
|
19
|
+
>
|
|
20
|
+
{#if icon}
|
|
21
|
+
<Icon type="{icon}"
|
|
22
|
+
size={iconSize}
|
|
23
|
+
color={iconColor}
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
label={label}
|
|
26
|
+
/>
|
|
27
|
+
{/if}
|
|
28
|
+
</button>
|
|
29
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<svelte:options customElement="{{
|
|
2
|
+
tag: 'qc-icon',
|
|
3
|
+
shadow: 'none',
|
|
4
|
+
props: {
|
|
5
|
+
type : {attribute: 'icon'},
|
|
6
|
+
label: {attribute: 'label'},
|
|
7
|
+
color: {attribute: 'color'},
|
|
8
|
+
size: {attribute: 'size'},
|
|
9
|
+
width: {attribute: 'width'},
|
|
10
|
+
height: {attribute: 'height'}
|
|
11
|
+
}
|
|
12
|
+
}}" />
|
|
13
|
+
<script>
|
|
14
|
+
export let
|
|
15
|
+
type,
|
|
16
|
+
label,
|
|
17
|
+
size='md',
|
|
18
|
+
color = 'text-primary',
|
|
19
|
+
width='auto',
|
|
20
|
+
height='auto'
|
|
21
|
+
;
|
|
22
|
+
$: attributes = width === "auto"
|
|
23
|
+
? {
|
|
24
|
+
"data-img-size":size,
|
|
25
|
+
}
|
|
26
|
+
: {}
|
|
27
|
+
</script>
|
|
28
|
+
<div role="img"
|
|
29
|
+
class="qc-icon"
|
|
30
|
+
aria-label={label}
|
|
31
|
+
style="--img-color:var(--qc-color-{color});
|
|
32
|
+
--img-width:{width};
|
|
33
|
+
--img-height:{height};
|
|
34
|
+
"
|
|
35
|
+
data-img-type={type}
|
|
36
|
+
{...attributes}
|
|
37
|
+
{...$$restProps}
|
|
38
|
+
>
|
|
39
|
+
</div>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
, logoAlt : {attribute: 'logo-alt'}
|
|
8
8
|
, titleUrl : {attribute: 'title-url'}
|
|
9
9
|
, titleText: {attribute: 'title-text'}
|
|
10
|
+
, linksLabel: {attribute: 'links-label'}
|
|
10
11
|
, altLanguageText: {attribute: 'alt-language-text'}
|
|
11
12
|
, altLanguageUrl: {attribute: 'alt-language-url'}
|
|
12
13
|
, joinUsText: {attribute: 'join-us-text'}
|
|
@@ -14,12 +15,8 @@
|
|
|
14
15
|
, goToContent: {attribute: 'go-to-content'}
|
|
15
16
|
, goToContentAnchor : {attribute: 'go-to-content-anchor'}
|
|
16
17
|
, goToContentText: {attribute: 'go-to-content-text'}
|
|
17
|
-
, searchPlaceholder : {attribute: 'search-placeholder'}
|
|
18
|
-
, searchInputName : {attribute: 'search-input-name'}
|
|
19
|
-
, submitSearchText : {attribute: 'submit-search-text'}
|
|
20
18
|
, displaySearchText : {attribute: 'display-search-text'}
|
|
21
19
|
, hideSearchText : {attribute: 'hide-search-text'}
|
|
22
|
-
, searchFormAction : {attribute: 'search-form-action'}
|
|
23
20
|
, enableSearch : {attribute: 'enable-search'}
|
|
24
21
|
, showSearch : {attribute: 'show-search'}
|
|
25
22
|
}
|
|
@@ -27,7 +24,7 @@
|
|
|
27
24
|
|
|
28
25
|
<script>
|
|
29
26
|
import { onMount } from "svelte";
|
|
30
|
-
import { Utils } from "
|
|
27
|
+
import { Utils } from "../utils"
|
|
31
28
|
|
|
32
29
|
const
|
|
33
30
|
lang = Utils.getPageLanguage()
|
|
@@ -35,15 +32,18 @@ const
|
|
|
35
32
|
export let
|
|
36
33
|
logoUrl= '/'
|
|
37
34
|
, fullWidth = 'false'
|
|
38
|
-
, logoSrc = Utils.imagesRelativePath + '
|
|
35
|
+
, logoSrc = Utils.imagesRelativePath + 'QUEBEC_blanc.svg'
|
|
39
36
|
, logoAlt = lang === 'fr'
|
|
40
37
|
? 'Logo du gouvernement du Québec'
|
|
41
38
|
: 'Logo of government of Québec'
|
|
42
39
|
, titleUrl= '/'
|
|
43
40
|
, titleText= ''
|
|
41
|
+
, linksLabel= lang === 'fr'
|
|
42
|
+
? 'Navigation PIV'
|
|
43
|
+
: 'PIV navigation'
|
|
44
44
|
, altLanguageText= lang === 'fr'
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
? 'English'
|
|
46
|
+
: 'Français'
|
|
47
47
|
, altLanguageUrl= ''
|
|
48
48
|
, joinUsText= lang === 'fr'
|
|
49
49
|
? 'Nous joindre'
|
|
@@ -54,33 +54,24 @@ export let
|
|
|
54
54
|
, goToContentText= lang === 'fr'
|
|
55
55
|
? 'Passer au contenu'
|
|
56
56
|
: 'Skip to content'
|
|
57
|
-
, searchPlaceholder = lang === 'fr'
|
|
58
|
-
? 'Rechercher…'
|
|
59
|
-
: 'Search…'
|
|
60
|
-
, searchInputName = 'q'
|
|
61
|
-
, submitSearchText = lang === 'fr'
|
|
62
|
-
? 'Rechercher'
|
|
63
|
-
: 'Search'
|
|
64
57
|
, displaySearchText = lang === 'fr'
|
|
65
58
|
? 'Cliquer pour faire une recherche'
|
|
66
59
|
: 'Click to search'
|
|
67
60
|
, hideSearchText = lang === 'fr'
|
|
68
61
|
? 'Masquer la barre de recherche'
|
|
69
62
|
: 'Hide search bar'
|
|
70
|
-
, searchFormAction = '#'
|
|
71
63
|
, enableSearch = 'false'
|
|
72
64
|
, showSearch = 'false'
|
|
73
65
|
|
|
74
|
-
export function focusOnSearchInput() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
66
|
+
export function focusOnSearchInput() {
|
|
67
|
+
if (displaySearchForm) {
|
|
68
|
+
document.querySelector('[slot="search-zone"] input')?.focus();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
79
71
|
|
|
80
72
|
let
|
|
81
73
|
containerClass = 'qc-container'
|
|
82
74
|
, displaySearchForm = false
|
|
83
|
-
, searchInput
|
|
84
75
|
;
|
|
85
76
|
|
|
86
77
|
onMount(() => {
|
|
@@ -94,7 +85,10 @@ onMount(() => {
|
|
|
94
85
|
|
|
95
86
|
</script>
|
|
96
87
|
|
|
97
|
-
<div
|
|
88
|
+
<div role="banner"
|
|
89
|
+
class="qc-piv-header qc-component"
|
|
90
|
+
style="--logo-src:url({logoSrc})"
|
|
91
|
+
>
|
|
98
92
|
<div class="{containerClass}">
|
|
99
93
|
{#if goToContent == 'true'}
|
|
100
94
|
<div class="go-to-content">
|
|
@@ -104,24 +98,30 @@ onMount(() => {
|
|
|
104
98
|
</div>
|
|
105
99
|
{/if}
|
|
106
100
|
<div class="piv-top">
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
101
|
+
<div class="signature-group">
|
|
102
|
+
<a href="{logoUrl}"
|
|
103
|
+
class="logo"
|
|
104
|
+
target="_blank"
|
|
105
|
+
rel="noreferrer">
|
|
106
|
+
<div role="img"
|
|
107
|
+
aria-label="{logoAlt}"
|
|
108
|
+
></div>
|
|
109
|
+
</a>
|
|
110
|
+
|
|
111
|
+
{#if titleText}
|
|
112
|
+
<div class="title">
|
|
113
|
+
<a href="{titleUrl}"
|
|
114
|
+
class="title">
|
|
115
|
+
{titleText}
|
|
116
|
+
</a>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
{/if}
|
|
120
120
|
</div>
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
<div class="right-section">
|
|
123
123
|
{#if enableSearch == 'true'}
|
|
124
|
-
<a class="qc-
|
|
124
|
+
<a class="qc-search"
|
|
125
125
|
href="/"
|
|
126
126
|
role="button"
|
|
127
127
|
on:click|preventDefault = {() => displaySearchForm = !displaySearchForm}
|
|
@@ -132,48 +132,28 @@ onMount(() => {
|
|
|
132
132
|
<div class="links">
|
|
133
133
|
<slot name="links">
|
|
134
134
|
{#if joinUsUrl || altLanguageUrl}
|
|
135
|
+
<nav aria-label="{linksLabel}">
|
|
135
136
|
<ul>
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
{#if altLanguageUrl}
|
|
138
|
+
<li><a href="{altLanguageUrl}">{altLanguageText}</a></li>
|
|
139
|
+
{/if}
|
|
140
|
+
{#if joinUsUrl}
|
|
141
|
+
<li><a href="{joinUsUrl}">{joinUsText}</a></li>
|
|
142
|
+
{/if}
|
|
143
|
+
</ul>
|
|
144
|
+
</nav>
|
|
143
145
|
{/if}
|
|
144
146
|
</slot>
|
|
145
147
|
</div>
|
|
146
148
|
</div>
|
|
147
149
|
</div>
|
|
148
150
|
<div class="piv-bottom">
|
|
149
|
-
{#if titleText}
|
|
150
|
-
<div class="title">
|
|
151
|
-
<a href="{titleUrl}">
|
|
152
|
-
<span>{titleText}</span>
|
|
153
|
-
</a>
|
|
154
|
-
</div>
|
|
155
|
-
{/if}
|
|
156
151
|
{#if displaySearchForm}
|
|
157
152
|
<div class="search-zone">
|
|
158
|
-
<slot name="search-zone"
|
|
159
|
-
<form method="get"
|
|
160
|
-
action="{searchFormAction}">
|
|
161
|
-
<div class="input-group">
|
|
162
|
-
<input type="text"
|
|
163
|
-
bind:this = {searchInput}
|
|
164
|
-
placeholder="{searchPlaceholder}"
|
|
165
|
-
name="{searchInputName}">
|
|
166
|
-
<button>
|
|
167
|
-
<span class="qc-icon qc-search-submit" />
|
|
168
|
-
<span class="sr-description">{submitSearchText}</span>
|
|
169
|
-
</button>
|
|
170
|
-
</div>
|
|
171
|
-
</form>
|
|
172
|
-
</slot>
|
|
153
|
+
<slot name="search-zone" />
|
|
173
154
|
</div>
|
|
174
155
|
{/if}
|
|
175
156
|
</div>
|
|
176
157
|
</div>
|
|
177
158
|
</div>
|
|
178
|
-
|
|
179
|
-
<link rel='stylesheet' href='{Utils.cssRelativePath}{Utils.cssFileName}'>
|
|
159
|
+
<link rel='stylesheet' href='{Utils.cssPath}'>
|