@sbc-connect/nuxt-base 0.1.3 → 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.
Files changed (33) hide show
  1. package/.env.example +11 -1
  2. package/CHANGELOG.md +37 -0
  3. package/LICENSE +28 -0
  4. package/README.md +36 -47
  5. package/app/app.config.ts +31 -171
  6. package/app/app.vue +16 -3
  7. package/app/components/Connect/BCGovLogo.vue +4 -4
  8. package/app/components/Connect/Breadcrumb.vue +61 -0
  9. package/app/components/Connect/Footer.vue +104 -0
  10. package/app/components/Connect/Header/LogoHomeLink.vue +4 -4
  11. package/app/components/Connect/Header/WhatsNew.vue +36 -0
  12. package/app/components/Connect/Header/Wrapper.vue +2 -2
  13. package/app/components/Connect/Header/index.vue +16 -1
  14. package/app/components/Connect/LocaleSelect.vue +1 -1
  15. package/app/components/Connect/Slideover/WhatsNew.vue +61 -0
  16. package/app/components/Connect/SystemBanner.vue +50 -0
  17. package/app/composables/useConnectLaunchDarkly.ts +177 -0
  18. package/app/error.vue +53 -0
  19. package/app/interfaces/connect-breadcrumb.ts +5 -0
  20. package/app/interfaces/connect-whatsnew.ts +14 -0
  21. package/app/layouts/{default.vue → ConnectBase.vue} +3 -0
  22. package/app/plugins/launchdarkly.client.ts +9 -0
  23. package/app/plugins/sanitize.client.ts +13 -0
  24. package/app/plugins/whats-new.client.ts +45 -0
  25. package/app/spa-loading-template.html +39 -0
  26. package/app/utils/appendUrlParam.ts +4 -0
  27. package/i18n/locales/en-CA.ts +50 -82
  28. package/i18n/locales/fr-CA.ts +33 -30
  29. package/modules/assets/index.ts +1 -1
  30. package/modules/assets/runtime/assets/core-tw.css +57 -30
  31. package/nuxt.config.ts +62 -1
  32. package/package.json +18 -8
  33. package/app/components/Connect/Header/Base.vue +0 -17
package/.env.example CHANGED
@@ -1 +1,11 @@
1
- NUXT_BASE_URL="http://localhost:3000/"
1
+ # Web Urls
2
+ NUXT_PUBLIC_BASE_URL="http://localhost:3000/"
3
+ NUXT_PUBLIC_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/"
4
+
5
+ # API Urls
6
+ # Status API
7
+ NUXT_PUBLIC_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca"
8
+ NUXT_PUBLIC_STATUS_API_VERSION="/api/v1"
9
+
10
+ # LaunchDarkly
11
+ NUXT_PUBLIC_LD_CLIENT_ID=""
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @sbc-connect/nuxt-base
2
2
 
3
+ ## 0.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#18](https://github.com/bcgov/connect-nuxt/pull/18) [`90f240f`](https://github.com/bcgov/connect-nuxt/commit/90f240fd789a5286ded5df710bddd6dc953bcba5) Thanks [@deetz99](https://github.com/deetz99)! - **Feat: Whats New**
8
+
9
+ - fetch whats new inside a plugin
10
+ - whats new header button
11
+ - whats new slideover component
12
+ - whats new plugin tests
13
+ - fix eslint to ignore playwright reports
14
+ - whats new items tracked in local storage to display button chip or not
15
+
16
+ issue: bcgov/entity#29334
17
+
18
+ - [#15](https://github.com/bcgov/connect-nuxt/pull/15) [`0fb8c54`](https://github.com/bcgov/connect-nuxt/commit/0fb8c54e059d78b246b80a03f049d075b7bbcf72) Thanks [@deetz99](https://github.com/deetz99)! - - add spa-loading-template
19
+
20
+ - add error.vue
21
+ - add html attrs to app.vue
22
+ - add launch darkly composable & start tests
23
+ - add Banner component
24
+ - add iconify dep and icons to client bundle
25
+ - add test:unit:watch command to run vitest in watch mode
26
+ - update vitest config to search nested folders
27
+ - update --ui-radius var so rounded-md is 0.25rem
28
+ - remove core main css file causing duplicate fonts
29
+ - add html sanitizer plugin
30
+
31
+ issue: bcgov/entity#29334
32
+
33
+ - [#16](https://github.com/bcgov/connect-nuxt/pull/16) [`9b8c225`](https://github.com/bcgov/connect-nuxt/commit/9b8c225a011e3c89c9b490e93a554f55a4e29b78) Thanks [@kialj876](https://github.com/kialj876)! - - add base header components (logo, localeSelect, wrapper)
34
+
35
+ - add footer component
36
+ - appendUrlParam util
37
+
38
+ issue: bcgov/entity#29334
39
+
3
40
  ## 0.1.3
4
41
 
5
42
  ### Patch Changes
package/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, bcgov
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,73 +1,62 @@
1
- # Nuxt Layer Starter
1
+ [![License](https://img.shields.io/badge/License-BSD%203%20Clause-blue.svg)](LICENSE) [![pkg.pr.new](https://pkg.pr.new/badge/OWNER/REPO)](https://pkg.pr.new/~/bcgov/connect-nuxt)
2
2
 
3
- Create Nuxt extendable layer with this GitHub template.
3
+ # @sbc-connect/nuxt-base
4
+ The foundational Nuxt layer for all Connect applications.
4
5
 
5
- ## Setup
6
+ This package contains the core UI components, styling, and utilities for the Connect ecosystem. Extend this layer in your Nuxt project to get a consistent, on-brand starting point with zero configuration.
6
7
 
7
- Make sure to install the dependencies:
8
+ ## Features
8
9
 
9
- ```bash
10
- pnpm install
11
- ```
12
-
13
- ## Working on your layer
14
-
15
- Your layer is at the root of this repository, it is exactly like a regular Nuxt project, except you can publish it on NPM.
16
-
17
- The `.playground` directory should help you on trying your layer during development.
10
+ ### BC Government Branding
11
+ - Official color theme and design tokens
12
+ - BCSans font family with pre-configured @font-face rules
13
+ - BC Government logos and favicon assets
18
14
 
19
- Running `pnpm dev` will prepare and boot `.playground` directory, which imports your layer itself.
15
+ ### Core Development Assets
16
+ - A library of reusable base components
17
+ - Essential composables for common application logic
18
+ - Standard utility functions
19
+ - Pre-configured for Internationalization (i18n)
20
20
 
21
- ## Distributing your layer
22
-
23
- Your Nuxt layer is shaped exactly the same as any other Nuxt project, except you can publish it on NPM.
24
-
25
- To do so, you only have to check if `files` in `package.json` are valid, then run:
26
-
27
- ```bash
28
- npm publish --access public
29
- ```
21
+ For detailed usage and documentation, please see the [Base Layer Docs](../../../docs/packages/layers/base/intro.md)
30
22
 
31
- Once done, your users will only have to run:
23
+ ## Usage
32
24
 
25
+ ### Install
33
26
  ```bash
34
- npm install --save your-layer
27
+ pnpm install @sbc-connect/nuxt-base
35
28
  ```
36
29
 
37
- Then add the dependency to their `extends` in `nuxt.config`:
30
+ ### Configure
31
+ Then add the dependency to `extends` in `nuxt.config`:
38
32
 
39
33
  ```ts
40
34
  defineNuxtConfig({
41
- extends: 'your-layer'
35
+ extends: '@sbc-connect/nuxt-base'
42
36
  })
43
37
  ```
44
38
 
45
- ## Development Server
39
+ ### Environment Variables
40
+ This project requires certain environment variables to be set to run correctly.
46
41
 
47
- Start the development server on http://localhost:3000
42
+ Create a file named .env in the root of the project.
48
43
 
49
- ```bash
50
- pnpm dev
51
- ```
52
-
53
- ## Production
44
+ Copy the contents of the .env.example file into your new .env file.
54
45
 
55
- Build the application for production:
46
+ #### Local Development
47
+ For local development, the following variables are required. The default values are suitable for running the application on your local machine:
56
48
 
57
- ```bash
58
- pnpm build
59
49
  ```
60
-
61
- Or statically generate it with:
62
-
63
- ```bash
64
- pnpm generate
50
+ # .env
51
+ NUXT_BASE_URL="http://localhost:3000/"
65
52
  ```
66
53
 
67
- Locally preview production build:
54
+ #### Production Environments
55
+ > [!IMPORTANT]
56
+ > The values for staging and production environments are managed securely and should not be stored in this file.
68
57
 
69
- ```bash
70
- pnpm preview
71
- ```
58
+ To obtain the correct values for a production build or deployment, please contact the Connect Platform Team.
59
+
60
+ ## Contributing
72
61
 
73
- Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
62
+ We welcome contributions to this package! Please see the main [Contribution Guidelines](../../../CONTRIBUTING.md) for information on our branching strategy, commit conventions, and pull request process.
package/app/app.config.ts CHANGED
@@ -1,194 +1,54 @@
1
- /* eslint-disable max-len */
2
1
  export default defineAppConfig({
3
2
  connect: {
4
3
  header: {
5
- localeSelect: true
4
+ localeSelect: true,
5
+ whatsNew: true
6
6
  },
7
7
  footer: {
8
8
  versions: []
9
9
  }
10
10
  },
11
11
  ui: {
12
- badge: {
12
+ breadcrumb: {
13
13
  slots: {
14
- base: 'font-medium inline-flex items-center',
15
- label: 'truncate font-bold',
16
- leadingIcon: 'shrink-0',
17
- leadingAvatar: 'shrink-0',
18
- leadingAvatarSize: '',
19
- trailingIcon: 'shrink-0'
20
- }
21
- },
22
- button: {
23
- compoundVariants: [
24
- {
25
- color: 'primary',
26
- variant: 'solid',
27
- class: 'font-bold text-(--ui-bg) bg-(--ui-primary) hover:bg-(--ui-primary)/75 disabled:bg-(--ui-primary) aria-disabled:bg-(--ui-primary) focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-(--ui-primary)'
28
- },
29
- {
30
- color: 'primary',
31
- variant: 'ghost',
32
- class: 'text-(--ui-primary) hover:bg-(--ui-primary)/10 active:bg-(--ui-primary)/25 focus:outline-none focus-visible:bg-(--ui-primary)/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent'
33
- }
34
- ]
35
- },
36
- buttonGroup: {
37
- base: 'relative',
38
- variants: {
39
- size: {
40
- xs: '',
41
- sm: '',
42
- md: '',
43
- lg: '',
44
- xl: ''
45
- },
46
- orientation: {
47
- horizontal: 'inline-flex -space-x-px divide-x divide-gray-300',
48
- vertical: 'flex flex-col -space-y-px'
49
- }
50
- }
51
- },
52
- checkbox: {
53
- slots: {
54
- root: 'relative flex items-start',
55
- base: 'shrink-0 flex items-center justify-center rounded-(--ui-radius) text-(--ui-bg) ring-2 ring-inset ring-gray-700 focus-visible:outline-2 focus-visible:outline-offset-2',
56
- label: 'block font-medium text-(--ui-text) text-base'
57
- }
58
- },
59
- dropdownMenu: {
60
- slots: {
61
- content: 'bg-white ring-0',
62
- group: 'p-0'
63
- }
64
- },
65
- formField: {
66
- slots: {
67
- root: '',
68
- wrapper: 'space-y-1',
69
- labelWrapper: 'flex content-center items-center justify-between',
70
- label: 'block font-bold text-base text-gray-900',
71
- container: 'mt-1 relative',
72
- description: 'text-(--ui-text) text-base text-bcGovColor-lightGray mb-4 whitespace-normal',
73
- error: 'pl-4.5 mt-1 text-(--ui-error) text-xs',
74
- hint: 'text-(--ui-text)',
75
- help: 'pl-4.5 mt-1 text-(--ui-text) text-xs'
14
+ separatorIcon: 'text-secondary'
76
15
  },
77
16
  variants: {
78
- size: {
79
- xs: {
80
- root: 'text-xs'
81
- },
82
- sm: {
83
- root: 'text-xs'
84
- },
85
- md: {
86
- root: 'text-sm'
87
- },
88
- lg: {
89
- root: 'text-sm'
90
- },
91
- xl: {
92
- root: 'text-base'
93
- }
94
- },
95
- required: {
17
+ active: {
96
18
  true: {
97
- label: 'after:content-[\'*\'] after:ms-0.5 after:text-(--ui-error)'
19
+ link: 'text-secondary font-medium'
20
+ },
21
+ false: {
22
+ link: 'text-secondary underline font-medium'
98
23
  }
99
24
  }
100
25
  },
101
- defaultVariants: {
102
- size: 'md'
103
- }
104
- },
105
- input: {
106
- variants: {
107
- size: {
108
- bcGovLg: {
109
- base: 'px-2.5 pb-2 pt-6 text-base gap-1.5',
110
- leading: 'ps-2.5',
111
- trailing: 'pe-2.5',
112
- leadingIcon: 'size-5',
113
- leadingAvatarSize: '2xs',
114
- trailingIcon: 'size-5'
26
+ compoundVariants: [
27
+ {
28
+ disabled: false,
29
+ active: false,
30
+ to: true,
31
+ class: {
32
+ link: 'hover:text-secondary hover:underline transition-colors'
115
33
  }
116
- },
117
- variant: {
118
- bcGov: 'ring-0 ring-transparent peer rounded-t-sm rounded-b-none bg-gray-100 shadow-bcGovInput focus:ring-0 focus:outline-none focus:shadow-bcGovInputFocus text-gray-900'
119
34
  }
120
- },
121
- defaultVariants: {
122
- size: 'bcGovLg',
123
- color: 'primary',
124
- variant: 'bcGov'
125
- }
35
+ ]
126
36
  },
127
- modal: {
128
- variants: {
129
- fullscreen: {
130
- false: {
131
- content: 'max-w-2xl'
132
- }
133
- }
37
+ button: {
38
+ slots: {
39
+ base: 'cursor-pointer'
134
40
  }
135
41
  },
136
- select: {
42
+ dropdownMenu: {
137
43
  slots: {
138
- content: 'rounded-sm',
139
- group: 'px-0 py-2',
140
- trailingIcon: 'group-data-[state=open]:rotate-180 transition-transform duration-200 text-(--ui-text)', // group-data-[state=open]:text-blue-500 group-data-focus:text-blue-500 // TODO: icon colour when focused
141
- item: 'my-0.75 text-gray-900 before:rounded-none data-highlighted:text-blue-500 data-highlighted:before:bg-gray-100 data-[state=checked]:text-blue-500 data-[state=checked]:bg-blue-50',
142
- itemLeadingIcon: 'group-data-[state=checked]:text-blue-500 group-data-highlighted:text-blue-500 text-gray-900'
143
- },
144
- variants: {
145
- size: {
146
- bcGov: {
147
- base: 'px-0 py-0 text-base gap-1.5',
148
- leading: 'ps-2.5',
149
- trailing: 'pe-2.5',
150
- leadingIcon: 'size-5',
151
- leadingAvatarSize: '2xs',
152
- trailingIcon: 'size-5',
153
- label: 'p-1.5 text-xs gap-1.5',
154
- item: 'py-3 px-4 text-sm gap-3',
155
- itemLeadingIcon: 'size-5',
156
- itemLeadingAvatarSize: '2xs',
157
- itemLeadingChip: 'size-5',
158
- itemLeadingChipSize: 'md',
159
- itemTrailingIcon: 'size-5'
160
- }
161
- },
162
- variant: {
163
- bcGov: 'peer rounded-t-sm rounded-b-none bg-gray-100 focus:ring-0 focus:outline-none shadow-bcGovInput data-[state=open]:shadow-bcGovInputFocus focus:shadow-bcGovInputFocus text-gray-900'
164
- }
165
- },
166
- defaultVariants: {
167
- size: 'bcGov',
168
- color: 'primary',
169
- variant: 'bcGov'
44
+ content: 'bg-secondary ring-0',
45
+ group: 'p-0'
170
46
  }
171
47
  },
172
- textarea: {
173
- variants: {
174
- size: {
175
- bcGovLg: {
176
- base: 'px-2.5 pb-1.5 pt-5 text-base gap-1.5',
177
- leading: 'ps-2.5',
178
- trailing: 'pe-2.5',
179
- leadingIcon: 'size-5',
180
- leadingAvatarSize: '2xs',
181
- trailingIcon: 'size-5'
182
- }
183
- },
184
- variant: {
185
- bcGov: 'peer rounded-t-sm rounded-b-none bg-gray-100 focus:ring-0 focus:outline-none shadow-bcGovInput focus:shadow-bcGovInputFocus text-gray-900'
186
- }
187
- },
188
- defaultVariants: {
189
- size: 'bcGovLg',
190
- color: 'primary',
191
- variant: 'bcGov'
48
+ tooltip: {
49
+ slots: {
50
+ content: 'bg-neutral ring-neutral text-secondary p-4',
51
+ arrow: 'fill-neutral'
192
52
  }
193
53
  }
194
54
  }
@@ -196,13 +56,13 @@ export default defineAppConfig({
196
56
 
197
57
  declare module '@nuxt/schema' {
198
58
  interface AppConfigInput {
199
- myLayer?: {
200
- /** Project name */
201
- name?: string
202
- }
203
59
  connect?: {
204
60
  header?: {
205
61
  localeSelect?: boolean
62
+ whatsNew?: boolean
63
+ }
64
+ footer?: {
65
+ versions?: string[]
206
66
  }
207
67
  }
208
68
  }
package/app/app.vue CHANGED
@@ -1,5 +1,18 @@
1
+ <script setup lang="ts">
2
+ const { localeProperties } = useI18n()
3
+
4
+ useHead({
5
+ htmlAttrs: {
6
+ lang: () => localeProperties.value.code,
7
+ dir: () => localeProperties.value.dir
8
+ }
9
+ })
10
+ </script>
11
+
1
12
  <template>
2
- <nuxt-layout>
3
- <nuxt-page />
4
- </nuxt-layout>
13
+ <UApp :toaster="{ position: 'bottom-center' }">
14
+ <NuxtLayout>
15
+ <NuxtPage />
16
+ </NuxtLayout>
17
+ </UApp>
5
18
  </template>
@@ -19,24 +19,24 @@ import enSmallLogo from 'BCGovLogoSmEn'
19
19
  <img
20
20
  class="hidden h-[60px] scale-125 sm:block"
21
21
  :src="frLargeLogo"
22
- :alt="$t('ConnectBCGovLogo.alt')"
22
+ :alt="$t('connect.label.bcGovLogo')"
23
23
  >
24
24
  <img
25
25
  class="block h-[64px] scale-125 sm:hidden"
26
26
  :src="frSmallLogo"
27
- :alt="$t('ConnectBCGovLogo.alt')"
27
+ :alt="$t('connect.label.bcGovLogo')"
28
28
  >
29
29
  </div>
30
30
  <div v-else class="shrink-0">
31
31
  <img
32
32
  class="hidden h-[60px] scale-125 sm:block"
33
33
  :src="enLargeLogo"
34
- :alt="$t('ConnectBCGovLogo.alt')"
34
+ :alt="$t('connect.label.bcGovLogo')"
35
35
  >
36
36
  <img
37
37
  class="block h-[64px] scale-150 sm:hidden"
38
38
  :src="enSmallLogo"
39
- :alt="$t('ConnectBCGovLogo.alt')"
39
+ :alt="$t('connect.label.bcGovLogo')"
40
40
  >
41
41
  </div>
42
42
  </template>
@@ -0,0 +1,61 @@
1
+ <script setup lang="ts">
2
+ const props = defineProps({ accountId: { type: String, required: false } })
3
+
4
+ const { t } = useI18n()
5
+
6
+ const breadcrumbs = computed<ConnectBreadcrumb[]>(() => {
7
+ const metaCrumbs = useRoute().meta.breadcrumbs as ConnectBreadcrumb[] | undefined
8
+
9
+ if (metaCrumbs) {
10
+ return metaCrumbs.map((bc) => {
11
+ if (bc.appendAccountId && props.accountId) {
12
+ return {
13
+ ...bc,
14
+ to: appendUrlParam(bc.to as string, 'accountid', props.accountId)
15
+ }
16
+ }
17
+ return bc
18
+ })
19
+ } else {
20
+ return [{ label: t('connect.breadcrumb.default') }]
21
+ }
22
+ })
23
+
24
+ function resolveBackHref() {
25
+ const bcLength = breadcrumbs.value.length
26
+
27
+ if (bcLength > 1) {
28
+ // return the second to last breadcrumb link
29
+ return breadcrumbs.value[bcLength - 2]?.to ?? breadcrumbs.value[bcLength - 2]?.href
30
+ } else {
31
+ return ''
32
+ }
33
+ }
34
+ </script>
35
+
36
+ <template>
37
+ <div
38
+ v-if="$route.meta.hideBreadcrumbs !== true"
39
+ class="bg-blue-350"
40
+ >
41
+ <div class="app-inner-container flex items-center px-4 py-2 gap-3">
42
+ <UButton
43
+ class="size-[28px] rounded-full px-1 bg-secondary hover:bg-secondary/75"
44
+ :disabled="breadcrumbs.length < 2"
45
+ color="secondary"
46
+ icon="i-mdi-arrow-left"
47
+ :aria-label="$t('connect.label.goBack')"
48
+ :to="resolveBackHref()"
49
+ :ui="{
50
+ leadingIcon: 'text-blue-500',
51
+ }"
52
+ />
53
+ <div class="w-[1px] bg-shadePrimary h-[24px]" />
54
+ <UBreadcrumb
55
+ :items="breadcrumbs"
56
+ :aria-label="$t('connect.breadcrumb.arialabel')"
57
+ separator-icon="i-mdi-chevron-right"
58
+ />
59
+ </div>
60
+ </div>
61
+ </template>
@@ -0,0 +1,104 @@
1
+ <script setup lang="ts">
2
+ const rtc = useRuntimeConfig().public
3
+ const uiVersion = rtc.version
4
+ const feesUrl = `${rtc.registryHomeUrl}product-fees`
5
+ const dependencyVersions: string[] = useAppConfig().connect?.footer?.versions || []
6
+ const localePath = useLocalePath()
7
+ const links = [
8
+ {
9
+ label: 'connect.label.home',
10
+ to: localePath('/')
11
+ },
12
+ {
13
+ label: 'connect.label.releaseNotes',
14
+ to: 'https://www.release-notes.bcregistry.gov.bc.ca',
15
+ target: '_blank'
16
+ },
17
+ {
18
+ label: 'connect.label.fees',
19
+ to: feesUrl,
20
+ target: '_blank'
21
+ },
22
+ {
23
+ label: 'connect.label.disclaimer',
24
+ to: 'https://www2.gov.bc.ca/gov/content/home/disclaimer',
25
+ target: '_blank'
26
+ },
27
+ {
28
+ label: 'connect.label.privacy',
29
+ to: 'https://www2.gov.bc.ca/gov/content/home/privacy',
30
+ target: '_blank'
31
+ },
32
+ {
33
+ label: 'connect.label.accessibility',
34
+ to: 'https://www2.gov.bc.ca/gov/content/home/accessibility',
35
+ target: '_blank'
36
+ },
37
+ {
38
+ label: 'connect.label.copyright',
39
+ to: 'https://www2.gov.bc.ca/gov/content/home/copyright',
40
+ target: '_blank'
41
+ }
42
+ ]
43
+
44
+ const appVersions = computed<string[]>(() => {
45
+ const items = [...dependencyVersions]
46
+ if (uiVersion) {
47
+ items.unshift(uiVersion)
48
+ }
49
+ return items
50
+ })
51
+ </script>
52
+
53
+ <template>
54
+ <footer
55
+ id="connect-main-footer"
56
+ data-testid="connect-main-footer"
57
+ class="border-t-2 border-brandLight bg-brandDark"
58
+ >
59
+ <div class="app-inner-container flex items-center justify-between p-2">
60
+ <nav :aria-label="$t('connect.footer.navLabel')" class="flex grow">
61
+ <ul class="list-none flex-col gap-1 p-0 sm:-ml-2 sm:flex-row sm:flex-wrap">
62
+ <li
63
+ v-for="link in links"
64
+ :key="link.to"
65
+ :class="[
66
+ 'flex-col gap-2 border-r-0 pr-2 last:mr-0',
67
+ 'last:border-r-0 sm:mr-2 sm:inline-block sm:flex-none',
68
+ 'sm:border-r sm:first:ml-2 border-lineLight',
69
+ ]"
70
+ >
71
+ <NuxtLink
72
+ :to="link.to === '/' ? `/${$i18n.locale}` : link.to"
73
+ :target="link.target"
74
+ :class="[
75
+ 'rounded p-1 text-sm text-secondary',
76
+ 'hover:underline focus:outline-none',
77
+ 'focus-visible:ring-2 focus-visible:ring-secondary',
78
+ ]"
79
+ >
80
+ {{ $t(link.label) }}
81
+ </NuxtLink>
82
+ </li>
83
+ </ul>
84
+ </nav>
85
+ <div class="-mb-1 flex items-center">
86
+ <span class="italic text-brandLight">{{ $t('connect.label.bcApp') }}</span>
87
+ <UTooltip arrow :delay-duration="200">
88
+ <UButton
89
+ :aria-label="$t('connect.label.appVersion')"
90
+ color="secondary"
91
+ icon="i-mdi-info-outline"
92
+ variant="ghost"
93
+ />
94
+
95
+ <template #content>
96
+ <div class="flex flex-col">
97
+ <span v-for="(item, i) in appVersions" :key="i">{{ item }}</span>
98
+ </div>
99
+ </template>
100
+ </UTooltip>
101
+ </div>
102
+ </div>
103
+ </footer>
104
+ </template>
@@ -9,12 +9,12 @@ const localePath = useLocalePath()
9
9
  :class="[
10
10
  'flex items-center gap-4 rounded-md',
11
11
  'px-2 transition-colors duration-300',
12
- 'ease-in-out hover:bg-white/[0.1]',
13
- 'focus:outline-none focus-visible:ring-2 focus-visible:ring-white',
12
+ 'ease-in-out hover:bg-secondary/[0.1]',
13
+ 'focus:outline-none focus-visible:ring-2 focus-visible:ring-secondary',
14
14
  ]"
15
- :aria-label="$t('ConnectHeader.homeLink')"
15
+ :aria-label="$t('connect.header.homeLink')"
16
16
  >
17
17
  <ConnectBCGovLogo />
18
- <span class="text-base font-semibold text-white lg:text-lg"> {{ $t('ConnectHeader.title') }} </span>
18
+ <span class="text-base font-semibold text-secondary lg:text-lg"> {{ $t('connect.header.title') }} </span>
19
19
  </NuxtLink>
20
20
  </template>