@sbc-connect/nuxt-base 0.1.2 → 0.1.4
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/.env.example +11 -1
- package/CHANGELOG.md +45 -0
- package/LICENSE +28 -0
- package/README.md +36 -47
- package/app/app.config.ts +60 -5
- package/app/app.vue +16 -3
- package/app/components/Connect/BCGovLogo.vue +42 -0
- package/app/components/Connect/Breadcrumb.vue +61 -0
- package/app/components/Connect/Footer.vue +104 -0
- package/app/components/Connect/Header/LogoHomeLink.vue +20 -0
- package/app/components/Connect/Header/WhatsNew.vue +36 -0
- package/app/components/Connect/Header/Wrapper.vue +14 -0
- package/app/components/Connect/Header/index.vue +18 -0
- package/app/components/Connect/LocaleSelect.vue +37 -0
- package/app/components/Connect/Slideover/WhatsNew.vue +61 -0
- package/app/components/Connect/SystemBanner.vue +50 -0
- package/app/components/HelloWorld/Index.vue +2 -2
- package/app/composables/useConnectLaunchDarkly.ts +177 -0
- package/app/error.vue +53 -0
- package/app/interfaces/connect-breadcrumb.ts +5 -0
- package/app/interfaces/connect-whatsnew.ts +14 -0
- package/app/layouts/{default.vue → ConnectBase.vue} +4 -0
- package/app/plugins/launchdarkly.client.ts +9 -0
- package/app/plugins/sanitize.client.ts +13 -0
- package/app/plugins/whats-new.client.ts +45 -0
- package/app/spa-loading-template.html +39 -0
- package/app/utils/appendUrlParam.ts +4 -0
- package/i18n/locales/en-CA.ts +63 -0
- package/i18n/locales/fr-CA.ts +91 -0
- package/modules/assets/index.ts +2 -2
- package/modules/assets/runtime/assets/core-layout.css +3 -3
- package/modules/assets/runtime/assets/core-tw.css +71 -52
- package/nuxt.config.ts +89 -1
- package/package.json +19 -10
- package/eslint.config.ts +0 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
@reference "tailwindcss";
|
|
2
2
|
|
|
3
3
|
.app-container {
|
|
4
|
-
@apply min-h-dvh flex flex-col bg-(--color-
|
|
4
|
+
@apply min-h-dvh flex flex-col bg-(--color-gray-100) text-(--color-gray-700); /* bg-gray-100 text-gray-700 */
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.app-inner-container {
|
|
8
|
-
@apply max-w-(--container-bcGovLg) w-full mx-auto
|
|
8
|
+
@apply max-w-(--container-bcGovLg) w-full mx-auto;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.app-body {
|
|
12
|
-
@apply grow relative flex flex-col;
|
|
12
|
+
@apply grow relative flex flex-col px-4;
|
|
13
13
|
}
|
|
@@ -1,12 +1,63 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "@nuxt/ui";
|
|
3
|
+
|
|
4
|
+
@source "../../../../app/";
|
|
3
5
|
|
|
4
6
|
/* Customize Nuxt UI default tokens */
|
|
7
|
+
/* Follows https://sites.google.com/bcdevexchange.org/designsystem/foundation-styles/colours */
|
|
5
8
|
:root {
|
|
9
|
+
--ui-error: var(--color-red-600);
|
|
6
10
|
--ui-primary: var(--color-blue-500);
|
|
7
|
-
--ui-
|
|
11
|
+
--ui-secondary: white;
|
|
12
|
+
--ui-success: var(--color-green-600);
|
|
13
|
+
--ui-warning: #F8661A;
|
|
14
|
+
/* Custom themes */
|
|
15
|
+
--ui-brandDark: var(--color-midnightBlue-900);
|
|
16
|
+
--ui-brandLight: var(--color-yellow-400);
|
|
17
|
+
--ui-lineDark: #6F7780;
|
|
18
|
+
--ui-lineLight: var(--color-gray-300);
|
|
19
|
+
--ui-lineSpecial: #899EB2;
|
|
20
|
+
--ui-markBlue: #1A5A96;
|
|
21
|
+
--ui-markBlueHover: #0000EE;
|
|
22
|
+
--ui-neutral: var(--color-gray-700);
|
|
23
|
+
--ui-neutralDark: var(--color-gray-900);
|
|
24
|
+
--ui-neutralLight: #757575;
|
|
25
|
+
--ui-shadeCaution: #FFF7E3;
|
|
26
|
+
--ui-shadeLight: white;
|
|
27
|
+
--ui-shadeNew: #E8F5E9;
|
|
28
|
+
--ui-shadePrimary: var(--color-gray-100);
|
|
29
|
+
--ui-shadeSecondary: #E2E8EE;
|
|
30
|
+
--ui-shadeSpecial: var(--color-blue-50);
|
|
31
|
+
--ui-shadeWarning: #FAE9E9;
|
|
32
|
+
--ui-radius: 0.1667rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* FUTURE: add dark themed colours (currently set to be the same) */
|
|
36
|
+
.dark {
|
|
8
37
|
--ui-error: var(--color-red-600);
|
|
9
|
-
--ui-
|
|
38
|
+
--ui-primary: var(--color-blue-500);
|
|
39
|
+
--ui-secondary: white;
|
|
40
|
+
--ui-success: var(--color-green-600);
|
|
41
|
+
--ui-warning: #F8661A;
|
|
42
|
+
/* Custom themes */
|
|
43
|
+
--ui-brandDark: var(--color-midnightBlue-900);
|
|
44
|
+
--ui-brandLight: var(--color-yellow-400);
|
|
45
|
+
--ui-lineDark: #6F7780;
|
|
46
|
+
--ui-lineLight: var(--color-gray-300);
|
|
47
|
+
--ui-lineSpecial: #899EB2;
|
|
48
|
+
--ui-markBlue: #1A5A96;
|
|
49
|
+
--ui-markBlueHover: #0000EE;
|
|
50
|
+
--ui-neutral: var(--color-gray-700);
|
|
51
|
+
--ui-neutralDark: var(--color-gray-900);
|
|
52
|
+
--ui-neutralLight: #757575;
|
|
53
|
+
--ui-shadeCaution: #FFF7E3;
|
|
54
|
+
--ui-shadeLight: white;
|
|
55
|
+
--ui-shadeNew: #E8F5E9;
|
|
56
|
+
--ui-shadePrimary: var(--color-gray-100);
|
|
57
|
+
--ui-shadeSecondary: #E2E8EE;
|
|
58
|
+
--ui-shadeSpecial: var(--color-blue-50);
|
|
59
|
+
--ui-shadeWarning: #FAE9E9;
|
|
60
|
+
--ui-radius: 0.1667rem;
|
|
10
61
|
}
|
|
11
62
|
|
|
12
63
|
@theme static {
|
|
@@ -25,50 +76,18 @@
|
|
|
25
76
|
/* box shadow */
|
|
26
77
|
--shadow-bcGovInput: inset 0 -2px 0 0px #1669bb;
|
|
27
78
|
|
|
28
|
-
/* COLOURS */
|
|
29
|
-
/* these colours are as defined in styleguide: */
|
|
30
|
-
/* https://preview.uxpin.com/73eb31e6346bc2863a066f02218a3af289325619#/pages/138840439/simulate/sitemap?mode=i */
|
|
31
|
-
/* for more details see previous link */
|
|
32
|
-
/* last updated on (2023-10-16) */
|
|
33
|
-
/* PRIMARY COLOURS */
|
|
34
|
-
--color-bcGovColor-footer: #003366;
|
|
35
|
-
--color-bcGovColor-header: #003366;
|
|
36
|
-
--color-bcGovColor-navDivider: #FCBA19;
|
|
37
|
-
/* LINK COLOURS */
|
|
38
|
-
--color-bcGovColor-activeBlue: #1669BB;
|
|
39
|
-
--color-bcGovColor-markBlue: #1a5a96;
|
|
40
|
-
--color-bcGovColor-markBlueHover: #0000EE;
|
|
41
|
-
/* TEXT/NON-CLICKABLE COLOURS */
|
|
42
|
-
--color-bcGovColor-darkGray: #212529;
|
|
43
|
-
--color-bcGovColor-midGray: #495057;
|
|
44
|
-
--color-bcGovColor-lightGray: #757575;
|
|
45
|
-
--color-bcGovColor-nonClickable: #38598A;
|
|
46
|
-
/* BACKGROUND COLOURS */
|
|
47
|
-
--color-bcGovColor-white: #FFFFFF;
|
|
48
|
-
--color-bcGovColor-gray1: #F1F3F5;
|
|
49
|
-
--color-bcGovColor-gray2: #E2E8EE;
|
|
50
|
-
--color-bcGovColor-lightBlue: #E4EDF7;
|
|
51
|
-
/* LINES */
|
|
52
|
-
--color-bcGovColor-hairlinesOnWhite: #DEE2E6;
|
|
53
|
-
--color-bcGovColor-specialityDottedLines: #899EB2;
|
|
54
|
-
--color-bcGovColor-formFieldLines: #6F7780;
|
|
55
|
-
/* OUTCOMES */
|
|
56
|
-
--color-outcomes-approved: #2E8540;
|
|
57
|
-
--color-outcomes-error: #D3272C;
|
|
58
|
-
--color-outcomes-caution: #F8661A;
|
|
59
|
-
|
|
60
79
|
/* GRAY */
|
|
61
|
-
--color-
|
|
62
|
-
--color-
|
|
63
|
-
--color-
|
|
64
|
-
--color-
|
|
65
|
-
--color-
|
|
66
|
-
--color-
|
|
67
|
-
--color-
|
|
68
|
-
--color-
|
|
69
|
-
--color-
|
|
70
|
-
--color-
|
|
71
|
-
--color-
|
|
80
|
+
--color-gray-50: #f8f9fa;
|
|
81
|
+
--color-gray-100: #f1f3f5;
|
|
82
|
+
--color-gray-200: #e9ecef;
|
|
83
|
+
--color-gray-300: #dee2e6;
|
|
84
|
+
--color-gray-400: #ced4da;
|
|
85
|
+
--color-gray-500: #adb5bd;
|
|
86
|
+
--color-gray-600: #868e96;
|
|
87
|
+
--color-gray-700: #495057;
|
|
88
|
+
--color-gray-800: #343a40;
|
|
89
|
+
--color-gray-900: #212529;
|
|
90
|
+
--color-gray-950: #232529;
|
|
72
91
|
|
|
73
92
|
/* BLUE */
|
|
74
93
|
--color-blue-50: #e4edf7;
|
|
@@ -194,7 +213,7 @@ body {
|
|
|
194
213
|
h2,
|
|
195
214
|
h3,
|
|
196
215
|
h4 {
|
|
197
|
-
@apply text-
|
|
216
|
+
@apply text-neutralDark;
|
|
198
217
|
}
|
|
199
218
|
|
|
200
219
|
h1,
|
|
@@ -221,20 +240,20 @@ body {
|
|
|
221
240
|
}
|
|
222
241
|
|
|
223
242
|
p {
|
|
224
|
-
@apply font-normal text-
|
|
243
|
+
@apply font-normal text-neutral;
|
|
225
244
|
}
|
|
226
245
|
|
|
227
246
|
td,
|
|
228
247
|
th {
|
|
229
|
-
@apply text-
|
|
248
|
+
@apply text-neutralDark text-sm;
|
|
230
249
|
}
|
|
231
250
|
|
|
232
251
|
/* floating labels */
|
|
233
252
|
.floating-label-input {
|
|
234
|
-
@apply pointer-events-none absolute left-0 top-1 text-
|
|
253
|
+
@apply pointer-events-none absolute left-0 top-1 text-neutralDark text-xs font-medium px-2.5 transition-all peer-focus:top-1 peer-focus:text-xs peer-placeholder-shown:text-sm peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:translate-none peer-focus:text-primary;
|
|
235
254
|
}
|
|
236
255
|
|
|
237
256
|
.floating-label-textarea {
|
|
238
|
-
@apply pointer-events-none absolute left-0 top-1 text-
|
|
257
|
+
@apply pointer-events-none absolute left-0 top-1 text-neutralDark text-xs font-medium px-2.5 transition-all peer-focus:top-1 peer-focus:text-xs peer-placeholder-shown:text-sm peer-placeholder-shown:top-2.5 peer-focus:translate-none peer-focus:text-primary;
|
|
239
258
|
}
|
|
240
259
|
}
|
package/nuxt.config.ts
CHANGED
|
@@ -16,5 +16,93 @@ export default defineNuxtConfig({
|
|
|
16
16
|
'#base': resolve('./')
|
|
17
17
|
},
|
|
18
18
|
|
|
19
|
-
compatibilityDate: '2025-07-10'
|
|
19
|
+
compatibilityDate: '2025-07-10',
|
|
20
|
+
|
|
21
|
+
imports: {
|
|
22
|
+
dirs: ['interfaces']
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
modules: [
|
|
26
|
+
'@nuxtjs/i18n',
|
|
27
|
+
'@vueuse/nuxt'
|
|
28
|
+
],
|
|
29
|
+
|
|
30
|
+
// For more details on i18n in layers: https://i18n.nuxtjs.org/docs/guide/layers
|
|
31
|
+
// For more details on config: https://i18n.nuxtjs.org/docs/api/options
|
|
32
|
+
i18n: {
|
|
33
|
+
defaultLocale: 'en-CA',
|
|
34
|
+
detectBrowserLanguage: false,
|
|
35
|
+
langDir: 'locales',
|
|
36
|
+
locales: [
|
|
37
|
+
{
|
|
38
|
+
name: 'English',
|
|
39
|
+
code: 'en-CA',
|
|
40
|
+
language: 'en-CA',
|
|
41
|
+
dir: 'ltr',
|
|
42
|
+
file: 'en-CA.ts'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Français',
|
|
46
|
+
code: 'fr-CA',
|
|
47
|
+
language: 'fr-CA',
|
|
48
|
+
dir: 'ltr',
|
|
49
|
+
file: 'fr-CA.ts'
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
strategy: 'prefix'
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
ui: {
|
|
56
|
+
colorMode: false,
|
|
57
|
+
theme: {
|
|
58
|
+
colors: [
|
|
59
|
+
'primary',
|
|
60
|
+
'secondary',
|
|
61
|
+
'success',
|
|
62
|
+
'info',
|
|
63
|
+
'warning',
|
|
64
|
+
'error',
|
|
65
|
+
'brandDark',
|
|
66
|
+
'brandLight',
|
|
67
|
+
'lineDark',
|
|
68
|
+
'lineLight',
|
|
69
|
+
'lineSpecial',
|
|
70
|
+
'neutral',
|
|
71
|
+
'neutralDark',
|
|
72
|
+
'neutralLight',
|
|
73
|
+
'shadeCaution',
|
|
74
|
+
'shadeLight',
|
|
75
|
+
'shadeNew',
|
|
76
|
+
'shadePrimary',
|
|
77
|
+
'shadeSecondary',
|
|
78
|
+
'shadeSpecial',
|
|
79
|
+
'shadeWarning'
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
icon: {
|
|
85
|
+
clientBundle: {
|
|
86
|
+
icons: [
|
|
87
|
+
'mdi:arrow-left',
|
|
88
|
+
'mdi:info-outline',
|
|
89
|
+
'mdi:information',
|
|
90
|
+
'mdi:web',
|
|
91
|
+
'mdi:check'
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
runtimeConfig: {
|
|
97
|
+
public: {
|
|
98
|
+
// Should in alphabetical order
|
|
99
|
+
appName: process.env.npm_package_name || '',
|
|
100
|
+
version: `Connect Base Layer v${process.env.npm_package_version || ''}`,
|
|
101
|
+
baseUrl: '',
|
|
102
|
+
registryHomeUrl: '',
|
|
103
|
+
ldClientId: '',
|
|
104
|
+
statusApiUrl: '',
|
|
105
|
+
statusApiVersion: ''
|
|
106
|
+
}
|
|
107
|
+
}
|
|
20
108
|
})
|
package/package.json
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
|
+
"license": "BSD-3-Clause",
|
|
6
7
|
"main": "./nuxt.config.ts",
|
|
7
8
|
"dependencies": {
|
|
8
|
-
"@
|
|
9
|
+
"@iconify-json/mdi": "^1.2.3",
|
|
10
|
+
"@nuxt/ui": "^3.3.0",
|
|
11
|
+
"@nuxtjs/i18n": "^10.0.2",
|
|
12
|
+
"dompurify": "^3.2.6",
|
|
13
|
+
"launchdarkly-vue-client-sdk": "^2.4.1",
|
|
14
|
+
"@vueuse/nuxt": "^13.5.0",
|
|
15
|
+
"@vueuse/core": "^13.5.0",
|
|
16
|
+
"lodash-es": "^4.17.21"
|
|
9
17
|
},
|
|
10
18
|
"devDependencies": {
|
|
11
19
|
"@axe-core/playwright": "^4.10.2",
|
|
12
|
-
"@
|
|
13
|
-
"@vitest/coverage-v8": "^3.2.3",
|
|
20
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
14
21
|
"dotenv": "^17.2.0",
|
|
15
22
|
"nuxt": "4.0.0",
|
|
16
23
|
"typescript": "^5.8.3",
|
|
17
|
-
"vue": "
|
|
18
|
-
"
|
|
19
|
-
"@sbc-connect/
|
|
20
|
-
"@sbc-connect/
|
|
21
|
-
"@sbc-connect/
|
|
24
|
+
"vue-tsc": "^3.0.3",
|
|
25
|
+
"@types/lodash-es": "^4.17.12",
|
|
26
|
+
"@sbc-connect/eslint-config": "0.0.5",
|
|
27
|
+
"@sbc-connect/playwright-config": "0.0.4",
|
|
28
|
+
"@sbc-connect/vitest-config": "0.0.5"
|
|
22
29
|
},
|
|
23
30
|
"scripts": {
|
|
24
31
|
"preinstall": "npx only-allow pnpm",
|
|
@@ -30,8 +37,10 @@
|
|
|
30
37
|
"lint": "eslint .",
|
|
31
38
|
"lint:fix": "eslint --fix .",
|
|
32
39
|
"test": "pnpm run test:unit; pnpm run test:e2e",
|
|
33
|
-
"test:unit": "vitest run",
|
|
40
|
+
"test:unit": "vitest run --passWithNoTests",
|
|
41
|
+
"test:unit:watch": "vitest",
|
|
34
42
|
"test:e2e": "npx playwright test",
|
|
43
|
+
"test:e2e:ui": "npx playwright test --ui",
|
|
35
44
|
"typecheck": "npx nuxt typecheck"
|
|
36
45
|
}
|
|
37
46
|
}
|
package/eslint.config.ts
DELETED