@sbc-connect/nuxt-base 0.5.0 → 0.6.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @sbc-connect/nuxt-base
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#128](https://github.com/bcgov/connect-nuxt/pull/128) [`8cc8cc0`](https://github.com/bcgov/connect-nuxt/commit/8cc8cc09aad741dc841a864998129c6ac5a6af2f) Thanks [@kialj876](https://github.com/kialj876)! - Updates to connect button styling
8
+
9
+ ## 0.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#118](https://github.com/bcgov/connect-nuxt/pull/118) [`41e58f4`](https://github.com/bcgov/connect-nuxt/commit/41e58f44e6d216e7de568bccb2e240b2d89b8408) Thanks [@deetz99](https://github.com/deetz99)! - Remove now unnecessary css module workaround.
14
+
15
+ - [#117](https://github.com/bcgov/connect-nuxt/pull/117) [`e3da105`](https://github.com/bcgov/connect-nuxt/commit/e3da1056247f5c502578dc70f95375e66e3cc1da) Thanks [@deetz99](https://github.com/deetz99)! - Update all dependencies
16
+
3
17
  ## 0.5.0
4
18
 
5
19
  ### Minor Changes
@@ -1,8 +1,6 @@
1
1
  @import "tailwindcss";
2
2
  @import "@nuxt/ui";
3
3
 
4
- @source "../../../../app/";
5
-
6
4
  /* Customize Nuxt UI default tokens */
7
5
  /* Follows https://sites.google.com/bcdevexchange.org/designsystem/foundation-styles/colours */
8
6
  :root {
@@ -181,8 +179,8 @@
181
179
  font-family: "BCSans";
182
180
  font-style: normal;
183
181
  font-weight: 400;
184
- src: url("/fonts/BCSans/BCSans-Regular.woff2") format("woff2"),
185
- url("/fonts/BCSans/BCSans-Regular.woff") format("woff"); /* Optimized for very modern browsers */
182
+ src: url("BCGovFonts/BCSans-Regular.woff2") format("woff2"),
183
+ url("BCGovFonts/BCSans-Regular.woff") format("woff"); /* Optimized for very modern browsers */
186
184
  font-display: swap;
187
185
  }
188
186
 
@@ -190,15 +188,15 @@
190
188
  font-family: "BCSans";
191
189
  font-style: italic;
192
190
  font-weight: 400;
193
- src: url("/fonts/BCSans/BCSans-Italic.woff2") format("woff2"),
194
- url("/fonts/BCSans/BCSans-Italic.woff") format("woff"); /* Optimized for very modern browsers */
191
+ src: url("BCGovFonts/BCSans-Italic.woff2") format("woff2"),
192
+ url("BCGovFonts/BCSans-Italic.woff") format("woff"); /* Optimized for very modern browsers */
195
193
  font-display: swap;
196
194
  }
197
195
  @font-face {
198
196
  font-family: "BCSans";
199
197
  font-weight: 700;
200
- src: url("/fonts/BCSans/BCSans-Bold.woff2") format("woff2"),
201
- url("/fonts/BCSans/BCSans-Bold.woff") format("woff"); /* Optimized for very modern browsers */
198
+ src: url("BCGovFonts/BCSans-Bold.woff2") format("woff2"),
199
+ url("BCGovFonts/BCSans-Bold.woff") format("woff"); /* Optimized for very modern browsers */
202
200
  font-display: swap;
203
201
  }
204
202
 
@@ -206,8 +204,8 @@
206
204
  font-family: "BCSans";
207
205
  font-style: italic;
208
206
  font-weight: 700;
209
- src: url("/fonts/BCSans/BCSans-BoldItalic.woff2") format("woff2"),
210
- url("/fonts/BCSans/BCSans-BoldItalic.woff") format("woff"); /* Optimized for very modern browsers */
207
+ src: url("BCGovFonts/BCSans-BoldItalic.woff2") format("woff2"),
208
+ url("BCGovFonts/BCSans-BoldItalic.woff") format("woff"); /* Optimized for very modern browsers */
211
209
  font-display: swap;
212
210
  }
213
211
 
@@ -15,9 +15,10 @@ const removeButtonAttrs = (button: ConnectButton) => {
15
15
  v-for="(button, i) in buttons"
16
16
  :key="`${position}-button-${i}`"
17
17
  data-testid="button-wrapper"
18
+ class="flex flex-col grow"
18
19
  >
19
20
  <UButton
20
- class="max-w-fit px-7 py-3 mb-1"
21
+ class="grow px-7 py-3 mb-1 justify-center"
21
22
  v-bind="removeButtonAttrs(button)"
22
23
  />
23
24
  <p :class="['text-center', !button.removeAlertSpacing ? 'h-[1.25rem]' : '']">
@@ -18,15 +18,15 @@ const rightAlertText = computed(() => buttonControl.value?.rightGroup.alertText
18
18
  class="@container"
19
19
  data-testid="connect-button-control"
20
20
  >
21
- <div class="grid grid-cols-1 gap-4 @3xl:grid-cols-2">
21
+ <div class="grid grid-cols-1 gap-4 @4xl:grid-cols-2">
22
22
  <div>
23
23
  <div
24
- class="flex justify-center @3xl:justify-start"
24
+ class="flex justify-center @4xl:justify-start"
25
25
  data-testid="left-buttons"
26
26
  >
27
27
  <div
28
- class="relative flex flex-col flex-wrap gap-4 justify-center"
29
- :class="leftGroup.stacked ? '' : 'flex-row'"
28
+ class="relative grow flex flex-col flex-wrap gap-4 @4xl:grow-0"
29
+ :class="(leftGroup.class || '') + (leftGroup.stacked ? '' : ' flex-row')"
30
30
  >
31
31
  <div
32
32
  v-if="leftAlertText"
@@ -42,12 +42,12 @@ const rightAlertText = computed(() => buttonControl.value?.rightGroup.alertText
42
42
  </div>
43
43
  <div>
44
44
  <div
45
- class="flex justify-center @3xl:justify-end"
45
+ class="flex grow justify-center @4xl:justify-end"
46
46
  data-testid="right-buttons"
47
47
  >
48
48
  <div
49
- class="relative flex flex-col flex-wrap gap-4 justify-center"
50
- :class="rightGroup.stacked ? '' : 'flex-row'"
49
+ class="relative grow flex flex-col flex-wrap gap-4 @4xl:grow-0"
50
+ :class="(rightGroup.class || '') + (rightGroup.stacked ? '' : ' flex-row')"
51
51
  >
52
52
  <div
53
53
  v-if="rightAlertText"
@@ -8,6 +8,7 @@ export interface ConnectButton extends ButtonProps {
8
8
  export interface ConnectButtonGroup {
9
9
  alertText?: string
10
10
  buttons: ConnectButton[]
11
+ class?: string
11
12
  stacked?: boolean
12
13
  }
13
14
 
package/firebase.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "hosting":
3
+ {
4
+ "site": "connect-nuxt-layer-base-dev",
5
+ "public": "dist",
6
+ "ignore": ["**/devops/**", "**/.*", "**/node_modules/**"],
7
+ "rewrites": [
8
+ {
9
+ "source": "**",
10
+ "destination": "/index.html"
11
+ }
12
+ ],
13
+ "headers" : [
14
+ {
15
+ "source": "**",
16
+ "headers" : [
17
+ { "key" : "Access-Control-Allow-Origin", "value" : "*" },
18
+ { "key" : "X-Frame-Options", "value" : "DENY" },
19
+ { "key" : "X-Content-Type-Options", "value" : "nosniff" },
20
+ { "key" : "X-XSS-Protection", "value" : "1; mode=block" },
21
+ {
22
+ "key": "Content-Security-Policy",
23
+ "value": "default-src 'self'; frame-src 'self' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; script-src 'self' 'unsafe-eval' 'unsafe-inline' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; style-src 'self' 'unsafe-inline' *.cloudflare.com *.googleapis.com *.jsdelivr.net; font-src 'self' *.gov.bc.ca *.hotjar.com *.cloudflare.com *.googleapis.com *.gstatic.com *.jsdelivr.net; img-src 'self' data: *.hotjar.com https://*.cac1.pure.cloud https://ws1.postescanada-canadapost.ca; connect-src 'self' https://api.iconify.design *.gov.bc.ca *.launchdarkly.com *.run.app *.hotjar.com *.postescanada-canadapost.ca *.sentry.io *.apigee.net wss://*.hotjar.com *.hotjar.io https://*.nr-data.net https://shyrka-prod-cac1.s3.ca-central-1.amazonaws.com https://*.newrelic.com https://*.cac1.pure.cloud wss://*.cac1.pure.cloud; manifest-src 'self'; media-src 'self' https://*.cac1.pure.cloud; object-src 'self' https://*.cac1.pure.cloud; child-src 'self' https://*.cac1.pure.cloud;"
24
+ },
25
+ { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate"},
26
+ { "key": "Pragma", "value": "no-cache"},
27
+ { "key": "Referrer-Policy", "value": "no-referrer" },
28
+ { "key": "Feature-Policy", "value": "microphone 'self'" },
29
+ { "key": "Strict-Transport-Security", "value": "max-age=31536000;" }
30
+ ]
31
+ }
32
+ ]
33
+ }
34
+ }
package/nuxt.config.ts CHANGED
@@ -8,13 +8,20 @@ export default defineNuxtConfig({
8
8
  devtools: { enabled: false },
9
9
 
10
10
  alias: {
11
+ 'BCGovFonts': resolve('./public/fonts/BCSans'),
11
12
  'BCGovLogoSmEn': resolve('./public/BCGovLogo/gov_bc_logo_vert_en.png'),
12
13
  'BCGovLogoSmFr': resolve('./public/BCGovLogo/gov_bc_logo_vert_fr.png'),
13
14
  'BCGovLogoLgEn': resolve('./public/BCGovLogo/gov_bc_logo_horiz_en.png'),
14
15
  'BCGovLogoLgFr': resolve('./public/BCGovLogo/gov_bc_logo_horiz_fr.png'),
15
- '#base': resolve('./')
16
+ '#base': resolve('./'),
17
+ '#connect-theme': resolve('./app/assets/css/connect-base-tw.css')
16
18
  },
17
19
 
20
+ css: [
21
+ resolve('./app/assets/css/connect-base-layout.css'),
22
+ resolve('./app/assets/css/connect-base-tw.css')
23
+ ],
24
+
18
25
  compatibilityDate: '2025-07-10',
19
26
 
20
27
  imports: {
@@ -23,7 +30,8 @@ export default defineNuxtConfig({
23
30
 
24
31
  modules: [
25
32
  '@nuxtjs/i18n',
26
- '@vueuse/nuxt'
33
+ '@vueuse/nuxt',
34
+ '@nuxt/ui'
27
35
  ],
28
36
 
29
37
  // For more details on i18n in layers: https://i18n.nuxtjs.org/docs/guide/layers
package/package.json CHANGED
@@ -1,34 +1,33 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-base",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.6.1",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",
8
8
  "dependencies": {
9
- "@iconify-json/mdi": "^1.2.3",
10
- "@nuxt/ui": "^4.1.0",
11
- "@nuxtjs/i18n": "^10.1.2",
12
- "@vueuse/core": "14.0.0",
13
- "@vueuse/nuxt": "14.0.0",
14
- "dompurify": "^3.3.0",
15
- "es-toolkit": "^1.41.0",
16
- "launchdarkly-vue-client-sdk": "^2.4.1",
17
- "luxon": "^3.7.2",
18
- "maska": "^3.2.0",
19
- "zod": "^4.1.12"
9
+ "@iconify-json/mdi": "1.2.3",
10
+ "@nuxt/ui": "4.3.0",
11
+ "@nuxtjs/i18n": "10.2.1",
12
+ "@vueuse/core": "14.1.0",
13
+ "@vueuse/nuxt": "14.1.0",
14
+ "dompurify": "3.3.1",
15
+ "es-toolkit": "1.43.0",
16
+ "launchdarkly-vue-client-sdk": "2.4.1",
17
+ "luxon": "3.7.2",
18
+ "maska": "3.2.0",
19
+ "zod": "4.1.12"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@axe-core/playwright": "4.11.0",
23
- "@types/luxon": "^3.7.1",
24
- "@vitest/coverage-v8": "3.2.4",
23
+ "@types/luxon": "3.7.1",
25
24
  "dotenv": "17.2.3",
26
- "nuxt": "4.1.3",
25
+ "nuxt": "4.2.2",
27
26
  "typescript": "5.9.3",
28
- "vue-tsc": "3.1.2",
27
+ "vue-tsc": "3.2.1",
29
28
  "@sbc-connect/eslint-config": "0.0.8",
30
- "@sbc-connect/playwright-config": "0.0.8",
31
- "@sbc-connect/vitest-config": "0.0.6"
29
+ "@sbc-connect/vitest-config": "0.1.0",
30
+ "@sbc-connect/playwright-config": "0.1.1"
32
31
  },
33
32
  "scripts": {
34
33
  "preinstall": "npx only-allow pnpm",
@@ -1,30 +0,0 @@
1
- import { defineNuxtModule, createResolver, installModule } from 'nuxt/kit'
2
-
3
- export default defineNuxtModule({
4
- meta: {
5
- name: 'base-assets',
6
- configKey: 'baseAssets'
7
- },
8
- defaults: {},
9
- async setup(_options, _nuxt) {
10
- console.info('Setting up **base** assets module')
11
- const resolver = createResolver(import.meta.url)
12
-
13
- _nuxt.hook('nitro:config', async (nitroConfig) => {
14
- nitroConfig.publicAssets ||= []
15
- nitroConfig.publicAssets.push({
16
- dir: resolver.resolve('./runtime/public'),
17
- maxAge: 60 * 60 * 24 * 365
18
- })
19
- })
20
-
21
- _nuxt.options.css.push(resolver.resolve('./runtime/assets/connect-base-tw.css'))
22
- _nuxt.options.css.push(resolver.resolve('./runtime/assets/connect-base-layout.css'))
23
- await installModule('@nuxt/ui')
24
-
25
- _nuxt.options.alias = {
26
- ..._nuxt.options.alias,
27
- '#connect-theme': resolver.resolve('./runtime/assets/connect-base-tw.css')
28
- }
29
- }
30
- })