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.
Files changed (97) hide show
  1. package/README.md +18 -3
  2. package/dist/css/qc-sdg-design-tokens.min.css +1 -1
  3. package/dist/css/qc-sdg-no-grid.min.css +1 -1
  4. package/dist/css/qc-sdg.min.css +1 -1
  5. package/dist/img/QUEBEC_blanc.svg +1 -1
  6. package/dist/img/QUEBEC_couleur.svg +24 -0
  7. package/dist/js/qc-sdg.min.js +1 -1
  8. package/package.json +23 -18
  9. package/public/css/qc-doc-sdg.css +247 -335
  10. package/public/css/qc-sdg-design-tokens.css +111 -64
  11. package/public/css/qc-sdg-no-grid.css +932 -428
  12. package/public/css/qc-sdg.css +941 -609
  13. package/public/img/QUEBEC_blanc.svg +1 -1
  14. package/public/img/QUEBEC_couleur.svg +24 -0
  15. package/public/img/ampoule.svg +1 -0
  16. package/public/img/note.svg +1 -0
  17. package/public/img/piv-MCE-theme-clair.svg +79 -0
  18. package/public/img/piv-MCE-theme-sombre.svg +62 -0
  19. package/public/img/piv-bas-MCE-theme-clair.png +0 -0
  20. package/public/img/piv-bas-MCE-theme-sombre.png +0 -0
  21. package/public/img/piv-logo-pied-de-page.svg +37 -0
  22. package/public/index.html +871 -715
  23. package/public/js/qc-doc-exemple.js +9 -0
  24. package/public/js/qc-doc-sdg.js +6893 -3724
  25. package/public/js/qc-sdg.js +2103 -962
  26. package/rollup.config.js +58 -23
  27. package/src/doc/components/Code.svelte +69 -0
  28. package/src/doc/components/Exemple.svelte +71 -0
  29. package/src/doc/components/Switch.svelte +108 -0
  30. package/src/doc/components/TopNav.svelte +53 -0
  31. package/src/doc/components/color-doc.svelte +44 -0
  32. package/src/doc/qc-doc-sdg.js +25 -14
  33. package/src/doc/scss/_tables.scss +1 -2
  34. package/src/doc/scss/components/_button.scss +14 -14
  35. package/src/doc/scss/components/_code.scss +106 -4
  36. package/src/doc/scss/jQueryUI/_jquery-ui.autocomplete.scss +48 -0
  37. package/src/doc/scss/qc-doc-sdg.scss +76 -75
  38. package/src/sdg/components/Button/IconButton.svelte +29 -0
  39. package/src/sdg/components/Icon.svelte +39 -0
  40. package/src/sdg/components/{pivHeader.svelte → PivHeader/pivHeader.svelte} +49 -69
  41. package/src/sdg/components/SearchBar/searchBar.svelte +87 -0
  42. package/src/sdg/components/SearchInput/SearchInput.svelte +48 -0
  43. package/src/sdg/components/alert.svelte +40 -23
  44. package/src/sdg/components/componentWrapper.js +0 -3
  45. package/src/sdg/components/externalLink.svelte +92 -0
  46. package/src/sdg/components/notice.svelte +61 -34
  47. package/src/sdg/components/pivFooter.svelte +37 -36
  48. package/src/sdg/components/toTop.svelte +16 -10
  49. package/src/sdg/components/utils.js +28 -4
  50. package/src/sdg/qc-sdg.js +11 -3
  51. package/src/sdg/scss/_qc-sdg-lib.scss +3 -0
  52. package/src/sdg/scss/base/_accessibility.scss +4 -0
  53. package/src/sdg/scss/base/_colors.scss +10 -10
  54. package/src/sdg/scss/base/_figure.scss +14 -9
  55. package/src/sdg/scss/base/_fonts.scss +4 -4
  56. package/src/sdg/scss/base/_form.scss +7 -0
  57. package/src/sdg/scss/base/_layout.scss +45 -0
  58. package/src/sdg/scss/base/_lists.scss +5 -5
  59. package/src/sdg/scss/base/_shadings.scss +3 -11
  60. package/src/sdg/scss/base/_typography.scss +42 -25
  61. package/src/sdg/scss/components/_alert.scss +11 -34
  62. package/src/sdg/scss/components/_icons.scss +67 -38
  63. package/src/sdg/scss/components/_notice.scss +51 -44
  64. package/src/sdg/scss/components/_pivFooter.scss +35 -23
  65. package/src/sdg/scss/components/_pivHeader.scss +131 -154
  66. package/src/sdg/scss/components/_searchBar.scss +75 -0
  67. package/src/sdg/scss/components/_searchInput.scss +64 -0
  68. package/src/sdg/scss/components/_separator.scss +2 -5
  69. package/src/sdg/scss/components/_toTop.scss +4 -6
  70. package/src/sdg/scss/grid/_grid-lib.scss +516 -0
  71. package/src/sdg/scss/grid/_grid.scss +78 -0
  72. package/src/sdg/scss/lib/_functions.scss +78 -0
  73. package/src/sdg/scss/lib/_gridless-lib.scss +4 -0
  74. package/src/sdg/scss/lib/_mixins.scss +221 -0
  75. package/src/sdg/scss/qc-design-tokens.scss +31 -8
  76. package/src/sdg/scss/qc-sdg-utilities.scss +1 -0
  77. package/src/sdg/scss/qc-sdg.scss +1 -1
  78. package/src/sdg/scss/qc-sgd-no-grid.scss +20 -15
  79. package/src/sdg/scss/settings/_base.scss +58 -0
  80. package/src/sdg/scss/settings/_tokens.scss +145 -77
  81. package/src/sdg/scss/utilities/_display.scss +43 -3
  82. package/src/sdg/scss/utilities/_themes.scss +17 -0
  83. package/src/sdg/scss/vendor/modern-css-reset/src/reset.css +9 -8
  84. package/dist/img/logo-quebec-piv-footer.svg +0 -1
  85. package/dist/img/quebec-logo.svg +0 -13
  86. package/public/img/logo-quebec-piv-footer.svg +0 -1
  87. package/src/doc/components/code.svelte +0 -54
  88. package/src/sdg/scss/base/_grid.scss +0 -9
  89. package/src/sdg/scss/functions/_tokens.scss +0 -12
  90. package/src/sdg/scss/functions/_utils.scss +0 -44
  91. package/src/sdg/scss/modules/_grid.scss +0 -19
  92. package/src/sdg/scss/modules/_helpers.scss +0 -32
  93. package/src/sdg/scss/modules/_map.scss +0 -14
  94. package/src/sdg/scss/modules/_tokens.scss +0 -3
  95. package/src/sdg/scss/modules/_utils.scss +0 -55
  96. package/src/sdg/scss/settings/_grid.scss +0 -24
  97. package/src/sdg/scss/settings/_settings.scss +0 -12
package/rollup.config.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import svelte from 'rollup-plugin-svelte';
2
2
  import resolve from '@rollup/plugin-node-resolve';
3
3
  import css from 'rollup-plugin-css-only'
4
- import livereload from 'rollup-plugin-livereload';
4
+ import sveltePreprocess from 'svelte-preprocess';
5
5
  import commonjs from '@rollup/plugin-commonjs'
6
- import { terser } from 'rollup-plugin-terser';
6
+ import terser from '@rollup/plugin-terser';
7
+ // import scss from 'rollup-plugin-sass'
7
8
  import scss from 'rollup-plugin-scss'
8
9
  import copy from 'rollup-plugin-copy'
9
10
  import replace from '@rollup/plugin-replace';
@@ -11,11 +12,17 @@ import postcss from 'postcss'
11
12
  import autoprefixer from 'autoprefixer'
12
13
  import cssReplace from 'postcss-replace'
13
14
  import pkg from './package.json';
15
+ import fs from "fs";
14
16
 
15
17
 
16
18
  const dev_process = (process.env.npm_lifecycle_event == 'dev');
17
19
  const verbose = false;
18
- const path = require('path');
20
+ const includePaths = [
21
+ 'src/sdg/scss',
22
+ 'src/doc/scss'
23
+ ];
24
+
25
+ // const path = require('path');
19
26
 
20
27
  function serve() {
21
28
  // Keep a reference to a spawned server process
@@ -47,6 +54,7 @@ function serve() {
47
54
  }
48
55
 
49
56
  const scssOptions = {
57
+ includePaths: includePaths,
50
58
  processor: css =>
51
59
  postcss([
52
60
  autoprefixer(),
@@ -55,13 +63,19 @@ const scssOptions = {
55
63
  'pkg-version': pkg.version
56
64
  }
57
65
  })
58
- ]),
66
+ ])
67
+ .process(css, {
68
+ from: undefined
69
+ })
70
+ .then((result) => result.css),
59
71
  sourceMap: false,
60
- includePaths: [
61
- 'src/sdg/scss',
62
- ],
72
+
73
+ prependData: `
74
+ @use "qc-sdg-lib" as *;
75
+ `,
63
76
  outputStyle: dev_process ? 'expanded' : 'compressed',
64
- watch: ['src/sdg/scss', 'src/doc/scss']
77
+ watch: ['src/sdg/scss', 'src/doc/scss'],
78
+ silenceDeprecations: ['legacy-js-api'],
65
79
  };
66
80
 
67
81
  let
@@ -74,8 +88,16 @@ let
74
88
  , svelteOptions = {
75
89
  compilerOptions: {
76
90
  // enable run-time checks
77
- customElement: true
78
- }
91
+ customElement: true,
92
+ cssHash: ({ hash, name, filename, css }) => {
93
+ // replacement of default `svelte-${hash(css)}`
94
+ return `qc-hash-${hash(css)}`;
95
+ },
96
+ },
97
+ emitCss: false,
98
+ preprocess: sveltePreprocess({
99
+ scss: scssOptions
100
+ })
79
101
  }
80
102
  , rollupOptions = [
81
103
  {
@@ -86,7 +108,7 @@ let
86
108
  ? 'public/js/qc-sdg.js'
87
109
  : 'dist/js/qc-sdg.min.js',
88
110
  format: 'iife',
89
- name: 'qcSdg'
111
+ name: 'qcSdg',
90
112
  },
91
113
  plugins: [
92
114
  replace(replacements),
@@ -104,10 +126,12 @@ let
104
126
 
105
127
  // will output compiled styles to output.css
106
128
  scss(Object.assign({
107
- output: dev_process
108
- ? 'public/css/qc-sdg.css'
109
- : 'dist/css/qc-sdg.min.css'
110
- }
129
+ output: (styles, styleNodes) => {
130
+ fs.writeFileSync( dev_process
131
+ ? 'public/css/qc-sdg.css'
132
+ : 'dist/css/qc-sdg.min.css'
133
+ , styles)
134
+ }}
111
135
  , scssOptions
112
136
  )),
113
137
  !dev_process && copy({
@@ -139,9 +163,12 @@ let
139
163
  }),
140
164
  // will output compiled styles to output.css
141
165
  scss(Object.assign({
142
- output: dev_process
143
- ? 'public/css/qc-sdg-no-grid.css'
144
- : 'dist/css/qc-sdg-no-grid.min.css',
166
+ output: (styles, styleNodes) => {
167
+ fs.writeFileSync( dev_process
168
+ ? 'public/css/qc-sdg-no-grid.css'
169
+ : 'dist/css/qc-sdg-no-grid.min.css'
170
+ , styles)
171
+ }
145
172
  }
146
173
  , scssOptions
147
174
  ))
@@ -159,9 +186,12 @@ let
159
186
  browser: true
160
187
  }),
161
188
  scss(Object.assign({
162
- output: dev_process
163
- ? 'public/css/qc-sdg-design-tokens.css'
164
- : 'dist/css/qc-sdg-design-tokens.min.css',
189
+ output: (styles, styleNodes) => {
190
+ fs.writeFileSync( dev_process
191
+ ? 'public/css/qc-sdg-design-tokens.css'
192
+ : 'dist/css/qc-sdg-design-tokens.min.css'
193
+ , styles)
194
+ }
165
195
  }
166
196
  , scssOptions
167
197
  )),
@@ -188,8 +218,13 @@ if (dev_process) {
188
218
  }),
189
219
  commonjs(),
190
220
  scss(
191
- Object.assign(
192
- {output: 'public/css/qc-doc-sdg.css'},
221
+ Object.assign({
222
+ output: (styles, styleNodes) => {
223
+ fs.writeFileSync( dev_process
224
+ ? 'public/css/qc-doc-sdg.css'
225
+ : 'dist/css/qc-doc-sdg.min.css'
226
+ , styles)
227
+ }},
193
228
  scssOptions
194
229
  )
195
230
  ),
@@ -0,0 +1,69 @@
1
+ <svelte:options customElement="{{
2
+ tag: 'qc-code'
3
+ , shadow: 'none'
4
+ , props: {
5
+ targetId : {attribute: 'target-id'},
6
+ rawCode : {attribute: 'raw-code'},
7
+ outerHTML: {attribute: 'outer-html', type: 'Boolean'},
8
+ }
9
+ }}" />
10
+
11
+ <script>
12
+
13
+ import {HighlightJS} from "highlight.js"
14
+ // import 'highlight.js/styles/default.css';
15
+ import pretty from "pretty";
16
+ import { onMount } from "svelte";
17
+ import { Utils } from "../../sdg/components/utils"
18
+
19
+ export let
20
+ targetId = ''
21
+ , rawCode = ''
22
+ , language = 'html'
23
+ , outerHTML = false
24
+ ;
25
+
26
+ let
27
+ hlCode
28
+ , prettyCode
29
+ ;
30
+
31
+ function copy() {
32
+ navigator.clipboard.writeText(prettyCode);
33
+ this.classList.add('copied')
34
+ setTimeout(() => {this.classList.remove('copied')}, 500)
35
+ }
36
+
37
+ function updateHLCode(rawCode, targetId) {
38
+ if (!rawCode) {
39
+ rawCode = document.getElementById(targetId)?.[outerHTML ? 'outerHTML' : 'innerHTML' ]
40
+ ?? ''
41
+ }
42
+ rawCode
43
+ . replace('class="mounted"', '')
44
+ . replace('/qc-hash-.*/g', '')
45
+ . replace('/is-external=""/g', 'is-external')
46
+ ;
47
+ prettyCode = pretty(rawCode, {wrap_attributes: 'force-aligned'});
48
+ hlCode = HighlightJS.highlight(prettyCode, {language:language}).value;
49
+ }
50
+
51
+ $: updateHLCode(rawCode, targetId)
52
+
53
+ </script>
54
+
55
+ <pre
56
+ ><code class="hljs"
57
+ ><button class="btn btn-sm btn-primary"
58
+ on:click={copy}>
59
+ <span class="copy">copier</span>
60
+ <span class="copied">copié !</span>
61
+ </button
62
+ >{@html hlCode}</code
63
+ ></pre>
64
+ <style lang="scss">
65
+ pre {
66
+ max-inline-size: token-value(max-content-width);
67
+ }
68
+ </style>
69
+
@@ -0,0 +1,71 @@
1
+ <svelte:options customElement={{
2
+ tag: 'qc-doc-exemple',
3
+ shadow: 'none',
4
+ props: {
5
+ caption : {attribute: 'caption'},
6
+ codeTargetId: {attribute: 'code-target-id'},
7
+ hideCode: {attribute: 'hide-code', type: 'Boolean'},
8
+ rawCode: {attribute: 'raw-code'}
9
+ }
10
+ }} />
11
+ <script>
12
+ import Code from "./Code.svelte";
13
+ import {onMount} from "svelte";
14
+ export let
15
+ caption = "SVP fournir une description"
16
+ , codeTargetId
17
+ , hideCode = false
18
+ , rawCode
19
+ ;
20
+ let exempleCode,
21
+ figure,
22
+ rootElement,
23
+ exempleArea,
24
+ figCaption;
25
+ onMount(() => {
26
+ rootElement.parentElement.childNodes.forEach(node => {
27
+ if (node.nodeType == 3) {
28
+ return;
29
+ }
30
+ if (node != rootElement) {
31
+ // let detach = rootElement.removeChild(node)
32
+ exempleArea.appendChild(node)
33
+ }
34
+ exempleCode = rawCode
35
+ ? rawCode
36
+ : (codeTargetId ? document.getElementById(codeTargetId): exempleArea).innerHTML;
37
+ })
38
+ })
39
+
40
+ </script>
41
+
42
+ <div bind:this={rootElement}
43
+ class="exemple-area"
44
+ >
45
+ <figure {...$$restProps}
46
+ bind:this={figure}
47
+ >
48
+ <div bind:this={exempleArea}
49
+ class="exemple"
50
+ ></div>
51
+ <figcaption bind:this={figCaption}>
52
+ {@html caption}
53
+ </figcaption>
54
+ </figure>
55
+ {#if !hideCode}
56
+ <Code rawCode={exempleCode}></Code>
57
+ {/if}
58
+ </div>
59
+ <style lang="scss">
60
+ figure {
61
+ //display: block;
62
+ max-width: token-value(max-content-width);
63
+ width: 100%;
64
+ @include qc-shading(0);
65
+ margin-bottom: token-value(spacer content-block mb);
66
+ .exemple {
67
+ padding: token-value(spacer sm) token-value(spacer sm) 0 token-value(spacer sm);
68
+ margin-bottom: token-value(spacer sm);
69
+ }
70
+ }
71
+ </style>
@@ -0,0 +1,108 @@
1
+ <svelte:options customElement="{{
2
+ tag: 'qc-switch',
3
+ shadow:'none'
4
+ }}" />
5
+ <script>
6
+ export let
7
+ value=false,
8
+ name='switch',
9
+ color = {
10
+ unchecked: 'grey-light',
11
+ checked: 'blue-regular',
12
+ slider: 'background'
13
+ }
14
+ ;
15
+
16
+ </script>
17
+ <div class="switch"
18
+ style="--unchecked-bg-color: var(--qc-color-{color.unchecked});
19
+ --checked-bg-color: var(--qc-color-{color.checked});
20
+ --slider-color: var(--qc-color-{color.slider});
21
+ "
22
+ >
23
+ <input type="checkbox"
24
+ role="switch"
25
+ {name}
26
+ bind:checked={value}
27
+ aria-checked={value}
28
+ {...$$restProps}
29
+ />
30
+ <span class="slider round" ></span>
31
+ </div>
32
+ <style lang="scss">
33
+
34
+ $switch-height: 32;
35
+ $switch-width: 56;
36
+ $switch-gap: 2;
37
+ $slider-height: $switch-height - 2 * $switch-gap;
38
+
39
+ /* The switch - the box around the slider */
40
+ .switch {
41
+ position: relative;
42
+ display: inline-block;
43
+ width: rem($switch-width);
44
+ height: rem($switch-height);
45
+ }
46
+
47
+ /* Hide default HTML checkbox */
48
+ input {
49
+ z-index: 10;
50
+ opacity: 0;
51
+ position: absolute;
52
+ cursor: pointer;
53
+ margin:0;
54
+ padding:0;
55
+ inset: 0;
56
+ height: auto;
57
+ width: auto;
58
+ }
59
+
60
+ /* The slider */
61
+ .slider {
62
+ z-index: 5;
63
+ //opacity: 0;
64
+ position: absolute;
65
+
66
+ top: 0;
67
+ left: 0;
68
+ right: 0;
69
+ bottom: 0;
70
+ background-color: var(--unchecked-bg-color);
71
+ -webkit-transition: .4s;
72
+ transition: .4s;
73
+ }
74
+
75
+ .slider::before {
76
+ position: absolute;
77
+ content: "";
78
+ height: rem($slider-height);
79
+ width: rem($slider-height);
80
+ left: rem($switch-gap);
81
+ bottom: rem($switch-gap);
82
+ background-color: var(--slider-color);
83
+ -webkit-transition: .4s;
84
+ transition: .4s;
85
+ }
86
+
87
+ input:checked + .slider {
88
+ background-color: var(--checked-bg-color);
89
+ }
90
+
91
+ input:focus + .slider {
92
+ box-shadow: 0 0 1px token-value(bok-shadow color);
93
+ }
94
+ $slider-translateX: translateX(rem($switch-width - $slider-height - 2 * $switch-gap));
95
+ input:checked + .slider::before {
96
+ transform: $slider-translateX;
97
+ }
98
+
99
+ .slider.round, input {
100
+ border-radius: rem($switch-height);
101
+ }
102
+
103
+ .slider.round::before {
104
+ border-radius: 50%;
105
+ }
106
+
107
+
108
+ </style>
@@ -0,0 +1,53 @@
1
+ <svelte:options customElement="{{
2
+ tag: 'qc-doc-top-nav',
3
+ shadow: 'none',
4
+ props: {
5
+
6
+ }
7
+ }}" />
8
+ <script>
9
+ import Switch from "./Switch.svelte";
10
+ let value = localStorage.getItem('dark-theme') === "true";
11
+
12
+ $: document.documentElement.classList.toggle('qc-dark-theme', value)
13
+ $: localStorage.setItem('dark-theme', value)
14
+ </script>
15
+ <div role="complementary">
16
+ <div class="qc-container top-nav">
17
+ <div class="switch-control">
18
+ <label for="switch">Activer le thème sombre</label>
19
+ <Switch id="switch" bind:value />
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <style lang="scss">
24
+
25
+ [role=complementary] {
26
+ position: sticky;
27
+ z-index: 100;
28
+ top: 0;
29
+ background-color: token-value(color blue medium);
30
+ color: token-value(color grey pale);
31
+ min-height: rem(72);
32
+ height: rem(72);
33
+ }
34
+ .top-nav {
35
+ position: absolute;
36
+ inset: 0;
37
+ display: flex;
38
+
39
+ align-items: end;
40
+ padding-bottom: token-value(spacer sm);
41
+ .switch-control {
42
+ margin-left: auto;
43
+ margin-right: 0;
44
+ display: flex;
45
+ align-items: center;
46
+ label:first-child {
47
+ margin-right: rem(16);
48
+ }
49
+ }
50
+ }
51
+
52
+
53
+ </style>
@@ -0,0 +1,44 @@
1
+ <svelte:options customElement="{{
2
+ tag: 'qc-color-doc'
3
+ , props: {
4
+ color : {attribute: 'target-id'},
5
+ rawCode : {attribute: 'raw-code'},
6
+ }
7
+ }}" />
8
+ <script>
9
+ export let
10
+ title,
11
+ token,
12
+ border = null
13
+ ;
14
+
15
+ </script>
16
+ <div class="color-details">
17
+ <div class="color-sample qc-bg-color-{token.split(',')[0]}"
18
+ class:border={border}></div>
19
+ <div class="color-description">
20
+ <strong>{title}</strong><br/>
21
+ <code>{token.split(',').map(part => '--qc-color-' + part.trim()).join(', ')}</code>
22
+ </div>
23
+ </div>
24
+ <style lang="scss">
25
+ @use "base/colors";
26
+ .color-details {
27
+ display: flex;
28
+ justify-content: flex-start;
29
+ align-items: center;
30
+ > div + div {
31
+ margin-left: token-value(spacer,md);
32
+ }
33
+ }
34
+
35
+ .color-sample {
36
+ width: rem(6 * $base-spacer);
37
+ height: rem(6 * $base-spacer);
38
+ border-radius: 50%;
39
+ flex-shrink: 0;
40
+ }
41
+ .border {
42
+ border: 1px solid token-value(color grey light);
43
+ }
44
+ </style>
@@ -1,21 +1,32 @@
1
- export * from './components/code.svelte';
1
+ export * from './components/Code.svelte';
2
+ export * from './components/color-doc.svelte'
3
+ export * from './components/TopNav.svelte'
4
+ export * from './components/Switch.svelte'
5
+ export * from './components/Exemple.svelte'
2
6
  import './scss/qc-doc-sdg.scss';
3
7
 
8
+ if (document.getElementById("version")) {
9
+ document.getElementById("version").textContent = `_vSDG_`
10
+ }
11
+
4
12
  // Show maskable "general alert" component
5
13
  const displayAlertLink = document.getElementById("show-qc-alert");
6
- const maskableAlert = document.getElementById("alert-warning");
7
- displayAlertLink.addEventListener(
8
- 'click',
9
- () => {
10
- maskableAlert.setAttribute('hide', 'false');
11
- displayAlertLink.hidden = true;
12
- }
13
- );
14
- document.addEventListener(
15
- 'qc.alert.hide',
16
- () => displayAlertLink.hidden = false
17
- )
14
+ const maskableAlert = document.getElementById("alerte-masquable");
15
+ if (displayAlertLink) {
16
+ displayAlertLink.addEventListener(
17
+ 'click',
18
+ () => {
19
+ maskableAlert.setAttribute('hide', 'false');
20
+ displayAlertLink.hidden = true;
21
+ }
22
+ );
23
+ document.addEventListener(
24
+ 'qc.alert.hide',
25
+ () => displayAlertLink.hidden = false
26
+ )
27
+ }
28
+
18
29
 
19
30
  // add version
20
- document.getElementById("version").textContent = `_vSDG_`
31
+
21
32
 
@@ -1,5 +1,4 @@
1
- @use "modules/utils" as *;
2
- @use "modules/tokens" as *;
1
+ @use "qc-sdg-lib" as *;
3
2
 
4
3
  table.qc-table {
5
4
  margin-bottom: 0;
@@ -1,7 +1,4 @@
1
- @use "settings/settings" as *;
2
- @use "functions/utils" as *;
3
- @use "modules/tokens" as *;
4
- @use "modules/utils" as *;
1
+ @use "qc-sdg-lib" as *;
5
2
  @use "base/shadings" as *;
6
3
 
7
4
  @mixin button-border-and-padding($border-size, $padding-y, $padding-x) {
@@ -12,7 +9,7 @@
12
9
 
13
10
  .btn {
14
11
  /* si Compact font-weight: 600; */
15
- @include content-font();
12
+ @include content-font($include-family: 1);
16
13
  display: inline-block;
17
14
  box-sizing: border-box;
18
15
  min-width: rem(112);
@@ -31,29 +28,32 @@
31
28
  @include button-border-and-padding(1px, xs, sm);
32
29
  }
33
30
 
31
+ @mixin state-color($color) {
32
+ border-color : $color;
33
+ background-color: $color;
34
+ }
35
+
34
36
  &.btn-primary {
35
37
 
36
- color: #fff;
38
+ color: token-value(color background);
37
39
  border-color: token-value(color blue piv);
38
40
  background-color: token-value(color blue piv);
39
- @extend .qc-shading-1;
41
+ @include qc-shading(1);
40
42
 
41
43
  &:hover {
42
- border-color: #156bb2;
43
- background-color: #156bb2;
44
+ @include state-color(token-value(color blue regular));
44
45
  }
45
46
 
46
- &:focus {
47
- border-color: token-value(color blue dark);
48
- background-color: #156bb2;
47
+ &:focus,&:focus-visible {
48
+ @include state-color(token-value(color blue regular));
49
49
  box-shadow:
50
50
  0 2px 8px rgba(34, 54, 84, 0.24),
51
51
  0 0 0 2px token-value(color blue light);
52
+ outline: none;
52
53
  }
53
54
 
54
55
  &:active {
55
- border-color: #3783c9;
56
- background-color: #3783c9;
56
+ @include state-color(token-value(color blue regular_light));
57
57
  }
58
58
  }
59
59
  }