@sbc-connect/nuxt-base 0.1.4 → 0.1.6

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 (48) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +1 -1
  3. package/app/app.config.ts +167 -16
  4. package/app/components/Connect/Address/Display.vue +77 -0
  5. package/app/components/Connect/Breadcrumb.vue +2 -2
  6. package/app/components/Connect/Footer.vue +3 -3
  7. package/app/components/Connect/Header/Wrapper.vue +2 -2
  8. package/app/components/Connect/Header/index.vue +4 -5
  9. package/app/components/Connect/I18n/Helper.vue +24 -0
  10. package/app/components/Connect/Input.vue +32 -0
  11. package/app/components/Connect/Layout/Index.vue +23 -0
  12. package/app/components/Connect/Modal/index.vue +51 -0
  13. package/app/components/Connect/PageSection.vue +57 -0
  14. package/app/components/Connect/Slideover/WhatsNew.vue +4 -4
  15. package/app/components/Connect/Spinner.vue +94 -0
  16. package/app/components/Connect/SystemBanner.vue +8 -8
  17. package/app/components/Connect/Textarea.vue +30 -0
  18. package/app/components/Connect/Transition/Collapse.vue +39 -0
  19. package/app/composables/useConnectModal.ts +11 -0
  20. package/app/interfaces/connect-address.ts +12 -0
  21. package/app/interfaces/connect-modal.ts +5 -0
  22. package/app/layouts/ConnectBase.vue +3 -13
  23. package/app/plugins/maska.client.ts +10 -0
  24. package/app/plugins/whats-new.client.ts +1 -1
  25. package/app/spa-loading-template.html +60 -38
  26. package/app/types/base-app-config.d.ts +15 -0
  27. package/app/types/base-page-meta.d.ts +8 -0
  28. package/app/utils/logFetchError.ts +36 -0
  29. package/app/utils/parseSpecialCharacters.ts +25 -0
  30. package/app/utils/setBreadcrumbs.ts +5 -0
  31. package/i18n/locales/en-CA.ts +3 -2
  32. package/modules/base-assets/index.ts +30 -0
  33. package/modules/{assets/runtime/assets/core-tw.css → base-assets/runtime/assets/connect-base-tw.css} +48 -46
  34. package/nuxt.config.ts +43 -17
  35. package/package.json +9 -9
  36. package/app/plugins/launchdarkly.client.ts +0 -9
  37. package/modules/assets/index.ts +0 -24
  38. package/modules/assets/runtime/assets/core-main.css +0 -6
  39. /package/modules/{assets/runtime/assets/core-layout.css → base-assets/runtime/assets/connect-base-layout.css} +0 -0
  40. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-Bold.woff +0 -0
  41. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-Bold.woff2 +0 -0
  42. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-BoldItalic.woff +0 -0
  43. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-BoldItalic.woff2 +0 -0
  44. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-Italic.woff +0 -0
  45. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-Italic.woff2 +0 -0
  46. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-Regular.woff +0 -0
  47. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/BCSans-Regular.woff2 +0 -0
  48. /package/{public → modules/base-assets/runtime/public}/fonts/BCSans/LICENSE_OFL.txt +0 -0
@@ -12,23 +12,23 @@
12
12
  --ui-success: var(--color-green-600);
13
13
  --ui-warning: #F8661A;
14
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;
15
+ --ui-brand: var(--color-midnightBlue-900);
16
+ --ui-brand-inverted: var(--color-yellow-400);
17
+ --ui-line: #6F7780;
18
+ --ui-line-muted: var(--color-gray-300);
19
+ --ui-line-highlighted: #899EB2;
20
+ --ui-mark: #1A5A96;
21
+ --ui-mark-highlighted: #0000EE;
22
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;
23
+ --ui-neutral-highlighted: var(--color-gray-900);
24
+ --ui-neutral-toned: #757575;
25
+ --ui-shade-caution: #FFF7E3;
26
+ --ui-shade-inverted: white;
27
+ --ui-shade-new: #E8F5E9;
28
+ --ui-shade: var(--color-gray-100);
29
+ --ui-shade-secondary: #E2E8EE;
30
+ --ui-shade-highlighted: var(--color-blue-50);
31
+ --ui-shade-warning: #FAE9E9;
32
32
  --ui-radius: 0.1667rem;
33
33
  }
34
34
 
@@ -40,23 +40,23 @@
40
40
  --ui-success: var(--color-green-600);
41
41
  --ui-warning: #F8661A;
42
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;
43
+ --ui-brand: var(--color-midnightBlue-900);
44
+ --ui-brand-inverted: var(--color-yellow-400);
45
+ --ui-line: #6F7780;
46
+ --ui-line-muted: var(--color-gray-300);
47
+ --ui-line-highlighted: #899EB2;
48
+ --ui-mark: #1A5A96;
49
+ --ui-mark-highlighted: #0000EE;
50
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;
51
+ --ui-neutral-highlighted: var(--color-gray-900);
52
+ --ui-neutral-toned: #757575;
53
+ --ui-shade-caution: #FFF7E3;
54
+ --ui-shade-inverted: white;
55
+ --ui-shade-new: #E8F5E9;
56
+ --ui-shade: var(--color-gray-100);
57
+ --ui-shade-secondary: #E2E8EE;
58
+ --ui-shade-highlighted: var(--color-blue-50);
59
+ --ui-shade-warning: #FAE9E9;
60
60
  --ui-radius: 0.1667rem;
61
61
  }
62
62
 
@@ -67,14 +67,16 @@
67
67
  /* widths */
68
68
  --container-bcGovMd: 1020px;
69
69
  --container-bcGovLg: 1360px;
70
- --container-bcGovInput: 600px;
70
+ --container-input: 600px;
71
71
 
72
72
  /* list style types */
73
73
  --marker-alpha: lower-alpha;
74
74
  --marker-upper-alpha: upper-alpha;
75
75
 
76
76
  /* box shadow */
77
- --shadow-bcGovInput: inset 0 -2px 0 0px #1669bb;
77
+ --shadow-input: inset 0 -1px 0 0px var(--ui-neutral);
78
+ --shadow-input-focus: inset 0 -2px 0 0px var(--ui-primary);
79
+ --shadow-input-error: inset 0 -2px 0 0px var(--ui-error);
78
80
 
79
81
  /* GRAY */
80
82
  --color-gray-50: #f8f9fa;
@@ -161,8 +163,8 @@
161
163
  font-family: "BCSans";
162
164
  font-style: normal;
163
165
  font-weight: 400;
164
- src: url("BCGovFonts/BCSans-Regular.woff2") format("woff2"),
165
- url("BCGovFonts/BCSans-Regular.woff") format("woff"); /* Optimized for very modern browsers */
166
+ src: url("/fonts/BCSans/BCSans-Regular.woff2") format("woff2"),
167
+ url("/fonts/BCSans/BCSans-Regular.woff") format("woff"); /* Optimized for very modern browsers */
166
168
  font-display: swap;
167
169
  }
168
170
 
@@ -170,15 +172,15 @@
170
172
  font-family: "BCSans";
171
173
  font-style: italic;
172
174
  font-weight: 400;
173
- src: url("BCGovFonts/BCSans-Italic.woff2") format("woff2"),
174
- url("BCGovFonts/BCSans-Italic.woff") format("woff"); /* Optimized for very modern browsers */
175
+ src: url("/fonts/BCSans/BCSans-Italic.woff2") format("woff2"),
176
+ url("/fonts/BCSans/BCSans-Italic.woff") format("woff"); /* Optimized for very modern browsers */
175
177
  font-display: swap;
176
178
  }
177
179
  @font-face {
178
180
  font-family: "BCSans";
179
181
  font-weight: 700;
180
- src: url("BCGovFonts/BCSans-Bold.woff2") format("woff2"),
181
- url("BCGovFonts/BCSans-Bold.woff") format("woff"); /* Optimized for very modern browsers */
182
+ src: url("/fonts/BCSans/BCSans-Bold.woff2") format("woff2"),
183
+ url("/fonts/BCSans/BCSans-Bold.woff") format("woff"); /* Optimized for very modern browsers */
182
184
  font-display: swap;
183
185
  }
184
186
 
@@ -186,8 +188,8 @@
186
188
  font-family: "BCSans";
187
189
  font-style: italic;
188
190
  font-weight: 700;
189
- src: url("BCGovFonts/BCSans-BoldItalic.woff2") format("woff2"),
190
- url("BCGovFonts/BCSans-BoldItalic.woff") format("woff"); /* Optimized for very modern browsers */
191
+ src: url("/fonts/BCSans/BCSans-BoldItalic.woff2") format("woff2"),
192
+ url("/fonts/BCSans/BCSans-BoldItalic.woff") format("woff"); /* Optimized for very modern browsers */
191
193
  font-display: swap;
192
194
  }
193
195
 
@@ -213,7 +215,7 @@ body {
213
215
  h2,
214
216
  h3,
215
217
  h4 {
216
- @apply text-neutralDark;
218
+ @apply text-neutral-highlighted;
217
219
  }
218
220
 
219
221
  h1,
@@ -245,15 +247,15 @@ body {
245
247
 
246
248
  td,
247
249
  th {
248
- @apply text-neutralDark text-sm;
250
+ @apply text-neutral-highlighted text-sm;
249
251
  }
250
252
 
251
253
  /* floating labels */
252
254
  .floating-label-input {
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;
255
+ @apply pointer-events-none absolute left-0 top-3 text-neutral-highlighted transition-all motion-reduce:transition-none duration-200 text-xs font-medium px-2.5 peer-focus:top-3 peer-focus:text-xs peer-placeholder-shown:text-sm peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:text-primary;
254
256
  }
255
257
 
256
258
  .floating-label-textarea {
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;
259
+ @apply pointer-events-none absolute left-0 top-1 text-neutral-highlighted text-xs font-medium px-2.5 transition-all duration-200 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;
258
260
  }
259
261
  }
package/nuxt.config.ts CHANGED
@@ -8,7 +8,6 @@ export default defineNuxtConfig({
8
8
  devtools: { enabled: false },
9
9
 
10
10
  alias: {
11
- 'BCGovFonts': resolve('./public/fonts/BCSans'),
12
11
  'BCGovLogoSmEn': resolve('./public/BCGovLogo/gov_bc_logo_vert_en.png'),
13
12
  'BCGovLogoSmFr': resolve('./public/BCGovLogo/gov_bc_logo_vert_fr.png'),
14
13
  'BCGovLogoLgEn': resolve('./public/BCGovLogo/gov_bc_logo_horiz_en.png'),
@@ -19,7 +18,7 @@ export default defineNuxtConfig({
19
18
  compatibilityDate: '2025-07-10',
20
19
 
21
20
  imports: {
22
- dirs: ['interfaces']
21
+ dirs: ['interfaces', 'types', 'enums']
23
22
  },
24
23
 
25
24
  modules: [
@@ -62,21 +61,23 @@ export default defineNuxtConfig({
62
61
  'info',
63
62
  'warning',
64
63
  'error',
65
- 'brandDark',
66
- 'brandLight',
67
- 'lineDark',
68
- 'lineLight',
69
- 'lineSpecial',
64
+ 'brand',
65
+ 'brand-inverted',
66
+ 'line',
67
+ 'line-muted',
68
+ 'line-highlighted',
69
+ 'mark',
70
+ 'mark-highlighted',
70
71
  'neutral',
71
- 'neutralDark',
72
- 'neutralLight',
73
- 'shadeCaution',
74
- 'shadeLight',
75
- 'shadeNew',
76
- 'shadePrimary',
77
- 'shadeSecondary',
78
- 'shadeSpecial',
79
- 'shadeWarning'
72
+ 'neutral-highlighted',
73
+ 'neutral-toned',
74
+ 'shade-caution',
75
+ 'shade-inverted',
76
+ 'shade-new',
77
+ 'shade',
78
+ 'shade-secondary',
79
+ 'shade-highlighted',
80
+ 'shade-warning'
80
81
  ]
81
82
  }
82
83
  },
@@ -85,10 +86,35 @@ export default defineNuxtConfig({
85
86
  clientBundle: {
86
87
  icons: [
87
88
  'mdi:arrow-left',
89
+ 'mdi:arrow-right',
88
90
  'mdi:info-outline',
89
91
  'mdi:information',
90
92
  'mdi:web',
91
- 'mdi:check'
93
+ 'mdi:check',
94
+ 'mdi:chevron-double-left',
95
+ 'mdi:chevron-double-right',
96
+ 'mdi:chevron-left',
97
+ 'mdi:chevron-right',
98
+ 'mdi:menu-down',
99
+ 'mdi:menu-left',
100
+ 'mdi:menu-right',
101
+ 'mdi:menu-up',
102
+ 'mdi:close',
103
+ 'mdi:dots-horizontal',
104
+ 'mdi:open-in-new',
105
+ 'mdi:file',
106
+ 'mdi:folder',
107
+ 'mdi:folder-open',
108
+ 'mdi:loading',
109
+ 'mdi:minus',
110
+ 'mdi:plus',
111
+ 'mdi:magnify',
112
+ 'mdi:upload',
113
+ 'mdi:caret-down',
114
+ 'mdi:menu',
115
+ 'mdi:file-document-outline',
116
+ 'mdi:home',
117
+ 'mdi:web'
92
118
  ]
93
119
  }
94
120
  },
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-base",
3
3
  "type": "module",
4
- "version": "0.1.4",
4
+ "version": "0.1.6",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",
8
8
  "dependencies": {
9
9
  "@iconify-json/mdi": "^1.2.3",
10
10
  "@nuxt/ui": "^3.3.0",
11
- "@nuxtjs/i18n": "^10.0.2",
11
+ "@nuxtjs/i18n": "^10.0.3",
12
+ "@vueuse/core": "^13.6.0",
13
+ "@vueuse/nuxt": "^13.6.0",
12
14
  "dompurify": "^3.2.6",
15
+ "es-toolkit": "^1.39.8",
13
16
  "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"
17
+ "maska": "^3.2.0"
17
18
  },
18
19
  "devDependencies": {
19
20
  "@axe-core/playwright": "^4.10.2",
20
21
  "@vitest/coverage-v8": "^3.2.4",
21
- "dotenv": "^17.2.0",
22
- "nuxt": "4.0.0",
22
+ "dotenv": "^17.2.1",
23
+ "nuxt": "^4.0.2",
23
24
  "typescript": "^5.8.3",
24
- "vue-tsc": "^3.0.3",
25
- "@types/lodash-es": "^4.17.12",
25
+ "vue-tsc": "^3.0.4",
26
26
  "@sbc-connect/eslint-config": "0.0.5",
27
27
  "@sbc-connect/playwright-config": "0.0.4",
28
28
  "@sbc-connect/vitest-config": "0.0.5"
@@ -1,9 +0,0 @@
1
- // import { LDPlugin } from 'launchdarkly-vue-client-sdk'
2
-
3
- // export default defineNuxtPlugin({
4
- // name: 'connect-launchdarkly-plugin',
5
- // parallel: true,
6
- // setup(nuxtApp) {
7
- // nuxtApp.vueApp.use(LDPlugin, { deferInitialization: true })
8
- // }
9
- // })
@@ -1,24 +0,0 @@
1
- import { defineNuxtModule, createResolver, installModule } from 'nuxt/kit'
2
-
3
- // Module options TypeScript interface definition
4
- export interface ModuleOptions {
5
- someconfig: boolean
6
- }
7
-
8
- export default defineNuxtModule<ModuleOptions>({
9
- meta: {
10
- name: 'assets',
11
- configKey: 'assets'
12
- },
13
- // Default configuration options of the Nuxt module
14
- defaults: {},
15
- async setup(_options, _nuxt) {
16
- console.info('Setting up assets module')
17
- const resolver = createResolver(import.meta.url)
18
-
19
- _nuxt.options.css.push(resolver.resolve('./runtime/assets/core-tw.css'))
20
- _nuxt.options.css.push(resolver.resolve('./runtime/assets/core-layout.css'))
21
- // _nuxt.options.css.push(resolver.resolve('./runtime/assets/core-main.css'))
22
- await installModule('@nuxt/ui')
23
- }
24
- })
@@ -1,6 +0,0 @@
1
- @import "tailwindcss";
2
- @import "@nuxt/ui";
3
- @import "./core-tw.css";
4
- @import "./core-layout.css";
5
-
6
- @source "../../../../app/";