@sbc-connect/nuxt-base 0.1.1 → 0.1.3
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 +14 -0
- package/app/app.config.ts +197 -2
- package/app/components/Connect/BCGovLogo.vue +42 -0
- package/app/components/Connect/Header/Base.vue +17 -0
- package/app/components/Connect/Header/LogoHomeLink.vue +20 -0
- package/app/components/Connect/Header/Wrapper.vue +14 -0
- package/app/components/Connect/Header/index.vue +3 -0
- package/app/components/Connect/LocaleSelect.vue +37 -0
- package/app/components/HelloWorld/Index.vue +2 -2
- package/app/layouts/default.vue +1 -0
- package/i18n/locales/en-CA.ts +95 -0
- package/i18n/locales/fr-CA.ts +88 -0
- package/modules/assets/index.ts +3 -3
- package/modules/assets/runtime/assets/core-layout.css +3 -3
- package/modules/assets/runtime/assets/core-tw.css +35 -43
- package/nuxt.config.ts +28 -1
- package/package.json +8 -19
- package/eslint.config.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-base
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#9](https://github.com/bcgov/connect-nuxt/pull/9) [`e841fde`](https://github.com/bcgov/connect-nuxt/commit/e841fde27630d63efb2c152cd78d92b1193d1d5e) Thanks [@kialj876](https://github.com/kialj876)! - Add Nuxt back as a dev dependency
|
|
8
|
+
|
|
9
|
+
- [#8](https://github.com/bcgov/connect-nuxt/pull/8) [`c85ebfc`](https://github.com/bcgov/connect-nuxt/commit/c85ebfc879e19cce307b109c9d38044f71f482d2) Thanks [@kialj876](https://github.com/kialj876)! - Added in i18n, added base header components, added in styles for nuxt ui
|
|
10
|
+
|
|
11
|
+
## 0.1.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#5](https://github.com/bcgov/connect-nuxt/pull/5) [`2999779`](https://github.com/bcgov/connect-nuxt/commit/29997796bd3908b2c5ba04319b26cbb00bffe0fc) Thanks [@kialj876](https://github.com/kialj876)! - Updated fonts propagation in base, cleaned up dependencies in layers
|
|
16
|
+
|
|
3
17
|
## 0.1.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/app/app.config.ts
CHANGED
|
@@ -1,6 +1,196 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
1
2
|
export default defineAppConfig({
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
connect: {
|
|
4
|
+
header: {
|
|
5
|
+
localeSelect: true
|
|
6
|
+
},
|
|
7
|
+
footer: {
|
|
8
|
+
versions: []
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
ui: {
|
|
12
|
+
badge: {
|
|
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'
|
|
76
|
+
},
|
|
77
|
+
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: {
|
|
96
|
+
true: {
|
|
97
|
+
label: 'after:content-[\'*\'] after:ms-0.5 after:text-(--ui-error)'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
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'
|
|
115
|
+
}
|
|
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
|
+
}
|
|
120
|
+
},
|
|
121
|
+
defaultVariants: {
|
|
122
|
+
size: 'bcGovLg',
|
|
123
|
+
color: 'primary',
|
|
124
|
+
variant: 'bcGov'
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
modal: {
|
|
128
|
+
variants: {
|
|
129
|
+
fullscreen: {
|
|
130
|
+
false: {
|
|
131
|
+
content: 'max-w-2xl'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
select: {
|
|
137
|
+
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'
|
|
170
|
+
}
|
|
171
|
+
},
|
|
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'
|
|
192
|
+
}
|
|
193
|
+
}
|
|
4
194
|
}
|
|
5
195
|
})
|
|
6
196
|
|
|
@@ -10,5 +200,10 @@ declare module '@nuxt/schema' {
|
|
|
10
200
|
/** Project name */
|
|
11
201
|
name?: string
|
|
12
202
|
}
|
|
203
|
+
connect?: {
|
|
204
|
+
header?: {
|
|
205
|
+
localeSelect?: boolean
|
|
206
|
+
}
|
|
207
|
+
}
|
|
13
208
|
}
|
|
14
209
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// must explicitly import or will fail when publishing layer // TODO: find better way to handle image aliases
|
|
3
|
+
// @ts-expect-error - Cannot find module 'BCGovLogoLgFr' or its corresponding type declarations.ts(2307)
|
|
4
|
+
import frLargeLogo from 'BCGovLogoLgFr'
|
|
5
|
+
// @ts-expect-error - Cannot find module 'BCGovLogoSmFr' or its corresponding type declarations.ts(2307)
|
|
6
|
+
import frSmallLogo from 'BCGovLogoSmFr'
|
|
7
|
+
// @ts-expect-error - Cannot find module 'BCGovLogoLgEn' or its corresponding type declarations.ts(2307)
|
|
8
|
+
import enLargeLogo from 'BCGovLogoLgEn'
|
|
9
|
+
// @ts-expect-error - Cannot find module 'BCGovLogoSmEn' or its corresponding type declarations.ts(2307)
|
|
10
|
+
import enSmallLogo from 'BCGovLogoSmEn'
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<!-- use french logo for french locale, any other locale uses english logo -->
|
|
15
|
+
<div v-if="$i18n.locale === 'fr-CA'" class="shrink-0">
|
|
16
|
+
<!-- Using scale because it will increase the size of the image without affecting the container size -->
|
|
17
|
+
<!-- there is a lot of padding on the images, if only the height gets increased, -->
|
|
18
|
+
<!-- the padding makes the header too tall -->
|
|
19
|
+
<img
|
|
20
|
+
class="hidden h-[60px] scale-125 sm:block"
|
|
21
|
+
:src="frLargeLogo"
|
|
22
|
+
:alt="$t('ConnectBCGovLogo.alt')"
|
|
23
|
+
>
|
|
24
|
+
<img
|
|
25
|
+
class="block h-[64px] scale-125 sm:hidden"
|
|
26
|
+
:src="frSmallLogo"
|
|
27
|
+
:alt="$t('ConnectBCGovLogo.alt')"
|
|
28
|
+
>
|
|
29
|
+
</div>
|
|
30
|
+
<div v-else class="shrink-0">
|
|
31
|
+
<img
|
|
32
|
+
class="hidden h-[60px] scale-125 sm:block"
|
|
33
|
+
:src="enLargeLogo"
|
|
34
|
+
:alt="$t('ConnectBCGovLogo.alt')"
|
|
35
|
+
>
|
|
36
|
+
<img
|
|
37
|
+
class="block h-[64px] scale-150 sm:hidden"
|
|
38
|
+
:src="enSmallLogo"
|
|
39
|
+
:alt="$t('ConnectBCGovLogo.alt')"
|
|
40
|
+
>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const localeSelect = useAppConfig().connect.header.localeSelect
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<ConnectHeaderWrapper>
|
|
7
|
+
<div class="flex items-center justify-between">
|
|
8
|
+
<ConnectHeaderLogoHomeLink />
|
|
9
|
+
<ClientOnly>
|
|
10
|
+
<div class="flex gap-4">
|
|
11
|
+
<slot />
|
|
12
|
+
<ConnectLocaleSelect v-if="localeSelect" />
|
|
13
|
+
</div>
|
|
14
|
+
</ClientOnly>
|
|
15
|
+
</div>
|
|
16
|
+
</ConnectHeaderWrapper>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const localePath = useLocalePath()
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<NuxtLink
|
|
7
|
+
id="header-logo-home-link"
|
|
8
|
+
:to="localePath('/')"
|
|
9
|
+
:class="[
|
|
10
|
+
'flex items-center gap-4 rounded-md',
|
|
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',
|
|
14
|
+
]"
|
|
15
|
+
:aria-label="$t('ConnectHeader.homeLink')"
|
|
16
|
+
>
|
|
17
|
+
<ConnectBCGovLogo />
|
|
18
|
+
<span class="text-base font-semibold text-white lg:text-lg"> {{ $t('ConnectHeader.title') }} </span>
|
|
19
|
+
</NuxtLink>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header
|
|
3
|
+
id="connect-header-wrapper"
|
|
4
|
+
data-testid="connect-header-wrapper"
|
|
5
|
+
class="relative border-b-2 border-connect-yellow bg-connect-darkBlue dark:border-b dark:bg-connect-darkGray"
|
|
6
|
+
>
|
|
7
|
+
<nav
|
|
8
|
+
class="app-inner-container px-2"
|
|
9
|
+
:aria-label="$t('ConnectHeader.navLabel')"
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</nav>
|
|
13
|
+
</header>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuItem } from '@nuxt/ui'
|
|
3
|
+
import type { LocaleObject } from '@nuxtjs/i18n'
|
|
4
|
+
|
|
5
|
+
const { locale, locales, setLocale } = useI18n()
|
|
6
|
+
|
|
7
|
+
const items = computed((): DropdownMenuItem[] => {
|
|
8
|
+
const options = locales.value.map((loc: LocaleObject) => {
|
|
9
|
+
const isCurrentLocal = loc.code === locale.value
|
|
10
|
+
return {
|
|
11
|
+
label: loc.name || 'N/A',
|
|
12
|
+
icon: isCurrentLocal ? 'i-mdi-check' : '',
|
|
13
|
+
onSelect: () => setLocale(loc.code),
|
|
14
|
+
class: isCurrentLocal ? 'bg-gray-100' : 'pl-8',
|
|
15
|
+
color: isCurrentLocal ? 'primary' : 'neutral'
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
return [options]
|
|
19
|
+
})
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<UDropdownMenu
|
|
24
|
+
v-if="items[0] && items[0].length > 1"
|
|
25
|
+
:items
|
|
26
|
+
color="secondary"
|
|
27
|
+
>
|
|
28
|
+
<UButton
|
|
29
|
+
data-testid="locale-select-dropdown"
|
|
30
|
+
icon="i-mdi-web"
|
|
31
|
+
:aria-label="$t('ConnectLocaleSelect.label')"
|
|
32
|
+
size="lg"
|
|
33
|
+
variant="ghost"
|
|
34
|
+
color="secondary"
|
|
35
|
+
/>
|
|
36
|
+
</UDropdownMenu>
|
|
37
|
+
</template>
|
|
@@ -7,8 +7,8 @@ const { myLayer } = useAppConfig()
|
|
|
7
7
|
Should have bg-primary
|
|
8
8
|
<h1>Hello World!</h1>
|
|
9
9
|
<pre>{{ myLayer }}</pre>
|
|
10
|
-
<p class="text-
|
|
11
|
-
Hello World text base should be
|
|
10
|
+
<p class="text-gray-900">
|
|
11
|
+
Hello World text base should be gray-900
|
|
12
12
|
</p>
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
package/app/layouts/default.vue
CHANGED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
export default {
|
|
3
|
+
btn: {
|
|
4
|
+
appVersion: 'App Version',
|
|
5
|
+
bcRegHome: 'BC Registries Home',
|
|
6
|
+
createAccount: 'Create Account',
|
|
7
|
+
editProfile: 'Edit Profile',
|
|
8
|
+
logout: 'Log out',
|
|
9
|
+
login: 'Log in',
|
|
10
|
+
accountInfo: 'Account Info',
|
|
11
|
+
teamMembers: 'Team Members',
|
|
12
|
+
transactions: 'Transactions',
|
|
13
|
+
notifications: {
|
|
14
|
+
main: 'Notifications',
|
|
15
|
+
aria: 'Notifications, {count} New'
|
|
16
|
+
},
|
|
17
|
+
accountOptionsMenu: 'Account Options Menu',
|
|
18
|
+
whatsNew: "What's New",
|
|
19
|
+
mainMenu: 'Main menu',
|
|
20
|
+
goHome: 'Go Home'
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
accountSettings: 'Account Settings',
|
|
24
|
+
bcRegOLServices: 'BC Registries and Online Services',
|
|
25
|
+
switchAccount: 'Switch Account',
|
|
26
|
+
selectLoginMethod: 'Select log in method',
|
|
27
|
+
bcsc: 'BC Services Card',
|
|
28
|
+
bceid: 'BCeID',
|
|
29
|
+
idir: 'IDIR',
|
|
30
|
+
whatsNewSlideover: "What's New at BC Registries"
|
|
31
|
+
},
|
|
32
|
+
notifications: {
|
|
33
|
+
none: 'No Notifications',
|
|
34
|
+
teamMemberApproval: '{count} team member requires approval to access this account. | {count} team members require approval to access this account.'
|
|
35
|
+
},
|
|
36
|
+
ConnectFooter: {
|
|
37
|
+
navLabel: 'Useful Links', // <nav> aria-label
|
|
38
|
+
home: 'Home',
|
|
39
|
+
releaseNotes: 'Release Notes',
|
|
40
|
+
fees: 'Fees',
|
|
41
|
+
disclaimer: 'Disclaimer',
|
|
42
|
+
privacy: 'Privacy',
|
|
43
|
+
ally: 'Accessibility',
|
|
44
|
+
copyright: 'Copyright',
|
|
45
|
+
bcApp: 'A BC Online Application'
|
|
46
|
+
},
|
|
47
|
+
ConnectHeader: {
|
|
48
|
+
title: 'Service BC Connect',
|
|
49
|
+
logoBtnLabel: 'Home', // <img> link aria-label
|
|
50
|
+
navLabel: 'Main Navigation', // <nav> aria-label
|
|
51
|
+
homeLink: 'Home'
|
|
52
|
+
},
|
|
53
|
+
ConnectBCGovLogo: {
|
|
54
|
+
alt: 'Government of British Columbia Logo' // <img> alt
|
|
55
|
+
},
|
|
56
|
+
ConnectLocaleSelect: {
|
|
57
|
+
// aria-label
|
|
58
|
+
label: 'Select a Language, current language: English'
|
|
59
|
+
},
|
|
60
|
+
ConnectBreadcrumb: {
|
|
61
|
+
default: 'Service BC Connect',
|
|
62
|
+
backBtn: 'Go Back',
|
|
63
|
+
arialabel: 'Breadcrumb'
|
|
64
|
+
},
|
|
65
|
+
ConnectPage: {
|
|
66
|
+
error: {
|
|
67
|
+
404: {
|
|
68
|
+
title: 'Page Not Found - Service BC Connect',
|
|
69
|
+
h1: '404 Page Not Found',
|
|
70
|
+
content: 'This page could not be found or does not exist.'
|
|
71
|
+
},
|
|
72
|
+
unknown: {
|
|
73
|
+
title: 'Unknown Error - Service BC Connect',
|
|
74
|
+
h1: 'Unknown Error',
|
|
75
|
+
content: 'An unknown error occured, please refresh the page or try again later.'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
ConnectModalSessionExpiring: {
|
|
80
|
+
title: 'Session Expiring Soon',
|
|
81
|
+
content: 'Your session is about to expire due to inactivity. You will be logged out in {boldStart}0{boldEnd} seconds. Press any key to continue your session. | Your session is about to expire due to inactivity. You will be logged out in {boldStart}1{boldEnd} second. Press any key to continue your session. | Your session is about to expire due to inactivity. You will be logged out in {boldStart}{count}{boldEnd} seconds. Press any key to continue your session.',
|
|
82
|
+
sessionExpired: 'Session Expired',
|
|
83
|
+
continueBtn: {
|
|
84
|
+
main: 'Continue Session',
|
|
85
|
+
aria: 'Your session is about to expire, press any key to continue your session.'
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
test: {
|
|
89
|
+
i18nBold: {
|
|
90
|
+
strong: 'This should have {boldStart} bold {boldEnd} text',
|
|
91
|
+
strongWithProps: 'This should have {boldStart} bold {boldEnd} text and allow a {prop}',
|
|
92
|
+
italic: 'Italic test {italicStart} goes here {italicEnd}.'
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
export default {
|
|
3
|
+
btn: {
|
|
4
|
+
appVersion: "Version de l'Application",
|
|
5
|
+
bcRegHome: 'Accueil des Registres de la CB',
|
|
6
|
+
createAccount: 'Créer un Compte',
|
|
7
|
+
editProfile: 'Editer le Profil',
|
|
8
|
+
logout: 'Se déconnecter',
|
|
9
|
+
login: 'Se connecter',
|
|
10
|
+
accountInfo: 'Infos Compte',
|
|
11
|
+
teamMembers: 'Membres Équipe',
|
|
12
|
+
transactions: 'Transactions',
|
|
13
|
+
notifications: {
|
|
14
|
+
main: 'Notifications',
|
|
15
|
+
aria: 'Notifications, {count} Nouveau'
|
|
16
|
+
},
|
|
17
|
+
accountOptionsMenu: 'Menu Options du Compte',
|
|
18
|
+
whatsNew: 'Quoi de Neuf',
|
|
19
|
+
mainMenu: 'Menu principal',
|
|
20
|
+
goHome: "Retour à l'Accueil"
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
accountSettings: 'Paramètres Compte',
|
|
24
|
+
bcRegOLServices: 'Registres et Services en ligne de la CB',
|
|
25
|
+
switchAccount: 'Changer de Compte',
|
|
26
|
+
selectLoginMethod: 'Sélectionnez la méthode de connexion',
|
|
27
|
+
bcsc: 'BC Services Card',
|
|
28
|
+
bceid: 'BCeID',
|
|
29
|
+
idir: 'IDIR',
|
|
30
|
+
whatsNewSlideover: 'Nouveautés aux Registres de la CB'
|
|
31
|
+
},
|
|
32
|
+
notifications: {
|
|
33
|
+
none: 'Aucune Notification',
|
|
34
|
+
teamMemberApproval: "{count} membre de l'équipe doit être approuvé pour accéder à ce compte. | {count} membres de l'équipe doivent être approuvés pour accéder à ce compte."
|
|
35
|
+
},
|
|
36
|
+
ConnectFooter: {
|
|
37
|
+
navLabel: 'Liens utiles', // <nav> aria-label
|
|
38
|
+
home: 'Accueil',
|
|
39
|
+
releaseNotes: 'Notes de Version',
|
|
40
|
+
fees: 'Frais',
|
|
41
|
+
disclaimer: 'Clause de non-responsabilité',
|
|
42
|
+
privacy: 'Confidentialité',
|
|
43
|
+
ally: 'Accessibilité',
|
|
44
|
+
copyright: "Droits d'auteur",
|
|
45
|
+
bcApp: 'Une application en ligne CB'
|
|
46
|
+
},
|
|
47
|
+
ConnectHeader: {
|
|
48
|
+
title: 'Service Connect CB',
|
|
49
|
+
logoBtnLabel: 'Accueil', // <img> link aria-label
|
|
50
|
+
navLabel: 'Navigation principale', // <nav> aria-label
|
|
51
|
+
homeLink: 'Home'
|
|
52
|
+
},
|
|
53
|
+
ConnectBCGovLogo: {
|
|
54
|
+
alt: 'Logo du gouvernement de la Colombie-Britannique' // <img> alt
|
|
55
|
+
},
|
|
56
|
+
ConnectLocaleSelect: {
|
|
57
|
+
// aria-label
|
|
58
|
+
label: 'Sélectionnez une langue, langue courante: Français'
|
|
59
|
+
},
|
|
60
|
+
ConnectBreadcrumb: {
|
|
61
|
+
default: 'Service Connect CB',
|
|
62
|
+
backBtn: 'Retour',
|
|
63
|
+
arialabel: "Fil d'Ariane"
|
|
64
|
+
},
|
|
65
|
+
ConnectPage: {
|
|
66
|
+
error: {
|
|
67
|
+
404: {
|
|
68
|
+
title: 'Page Introuvable - Service Connect CB',
|
|
69
|
+
h1: '404 Page Introuvable',
|
|
70
|
+
content: 'Cette page est introuvable ou n’existe pas.'
|
|
71
|
+
},
|
|
72
|
+
unknown: {
|
|
73
|
+
title: 'Erreur Inconnue - Service Connect CB',
|
|
74
|
+
h1: 'Erreur Inconnue',
|
|
75
|
+
content: 'Une erreur inconnue s’est produite, veuillez actualiser la page ou réessayer plus tard.'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
ConnectModalSessionExpiring: {
|
|
80
|
+
title: "Session Sur Le Point D'Expirer",
|
|
81
|
+
content: "Votre session est sur le point d'expirer en raison d'inactivité. Vous serez déconnecté dans {boldStart}0{boldEnd} secondes. Appuyez sur n’importe quelle touche pour continuer votre session. | Votre session est sur le point d'expirer en raison d'inactivité. Vous serez déconnecté dans {boldStart}1{boldEnd} seconde. Appuyez sur n’importe quelle touche pour continuer votre session. | Votre session est sur le point d'expirer en raison d'inactivité. Vous serez déconnecté dans {boldStart}{count}{boldEnd} secondes. Appuyez sur n’importe quelle touche pour continuer votre session.",
|
|
82
|
+
sessionExpired: 'Session Expirée',
|
|
83
|
+
continueBtn: {
|
|
84
|
+
main: 'Continuer la Session',
|
|
85
|
+
aria: "Votre session est sur le point d'expirer, appuyez sur n'importe quelle touche pour continuer votre session."
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
package/modules/assets/index.ts
CHANGED
|
@@ -13,12 +13,12 @@ export default defineNuxtModule<ModuleOptions>({
|
|
|
13
13
|
// Default configuration options of the Nuxt module
|
|
14
14
|
defaults: {},
|
|
15
15
|
async setup(_options, _nuxt) {
|
|
16
|
-
console.info('
|
|
16
|
+
console.info('Setting up assets module')
|
|
17
17
|
const resolver = createResolver(import.meta.url)
|
|
18
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'))
|
|
19
21
|
_nuxt.options.css.push(resolver.resolve('./runtime/assets/core-main.css'))
|
|
20
|
-
// _nuxt.options.css.push(resolver.resolve('./runtime/assets/core-tw.css'))
|
|
21
|
-
// _nuxt.options.css.push(resolver.resolve('./runtime/assets/core-layout.css'))
|
|
22
22
|
await installModule('@nuxt/ui')
|
|
23
23
|
}
|
|
24
24
|
})
|
|
@@ -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
|
}
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
/* Customize Nuxt UI default tokens */
|
|
5
5
|
:root {
|
|
6
|
+
--ui-error: var(--color-connect-error);
|
|
7
|
+
--ui-neutral: var(--color-gray-700);
|
|
6
8
|
--ui-primary: var(--color-blue-500);
|
|
9
|
+
--ui-secondary: white;
|
|
10
|
+
--ui-success: var(--color-green-600);
|
|
11
|
+
--ui-warning: #F8661A;
|
|
7
12
|
--ui-radius: 0.25rem;
|
|
8
|
-
--ui-error: var(--color-red-600);
|
|
9
|
-
--ui-text-inverted: #FFFFFF;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
@theme static {
|
|
@@ -29,46 +32,35 @@
|
|
|
29
32
|
/* these colours are as defined in styleguide: */
|
|
30
33
|
/* https://preview.uxpin.com/73eb31e6346bc2863a066f02218a3af289325619#/pages/138840439/simulate/sitemap?mode=i */
|
|
31
34
|
/* for more details see previous link */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
--color-
|
|
35
|
-
--color-
|
|
36
|
-
--color-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
--color-bcGovColor-markBlue: #1a5a96;
|
|
40
|
-
--color-bcGovColor-markBlueHover: #0000EE;
|
|
41
|
-
|
|
42
|
-
--color-
|
|
43
|
-
--color-
|
|
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;
|
|
35
|
+
--color-connect-darkBlue: var(--color-midnightBlue-900);
|
|
36
|
+
--color-connect-lightBlue: var(--color-blue-50);
|
|
37
|
+
--color-connect-darkGray: var(--color-gray-900);
|
|
38
|
+
--color-connect-midGray: var(--color-gray-700);
|
|
39
|
+
--color-connect-lightGray: #757575;
|
|
40
|
+
--color-connect-yellow: var(--color-yellow-400);
|
|
41
|
+
/* Are below used? */
|
|
42
|
+
/* --color-bcGovColor-markBlue: #1a5a96; */
|
|
43
|
+
/* --color-bcGovColor-markBlueHover: #0000EE; */
|
|
44
|
+
--color-connect-nonClickable: var(--color-blue-350);
|
|
45
|
+
--color-connect-gray1: var(--color-gray-100);
|
|
46
|
+
--color-connect-gray2: #E2E8EE;
|
|
51
47
|
/* LINES */
|
|
52
|
-
--color-
|
|
53
|
-
--color-
|
|
54
|
-
--color-
|
|
55
|
-
/* OUTCOMES */
|
|
56
|
-
--color-outcomes-approved: #2E8540;
|
|
57
|
-
--color-outcomes-error: #D3272C;
|
|
58
|
-
--color-outcomes-caution: #F8661A;
|
|
48
|
+
--color-connect-hairlinesOnWhite: var(--color-gray-300);
|
|
49
|
+
--color-connect-specialityDottedLines: #899EB2;
|
|
50
|
+
--color-connect-formFieldLines: #6F7780;
|
|
59
51
|
|
|
60
52
|
/* GRAY */
|
|
61
|
-
--color-
|
|
62
|
-
--color-
|
|
63
|
-
--color-
|
|
64
|
-
--color-
|
|
65
|
-
--color-
|
|
66
|
-
--color-
|
|
67
|
-
--color-
|
|
68
|
-
--color-
|
|
69
|
-
--color-
|
|
70
|
-
--color-
|
|
71
|
-
--color-
|
|
53
|
+
--color-gray-50: #f8f9fa;
|
|
54
|
+
--color-gray-100: #f1f3f5;
|
|
55
|
+
--color-gray-200: #e9ecef;
|
|
56
|
+
--color-gray-300: #dee2e6;
|
|
57
|
+
--color-gray-400: #ced4da;
|
|
58
|
+
--color-gray-500: #adb5bd;
|
|
59
|
+
--color-gray-600: #868e96;
|
|
60
|
+
--color-gray-700: #495057;
|
|
61
|
+
--color-gray-800: #343a40;
|
|
62
|
+
--color-gray-900: #212529;
|
|
63
|
+
--color-gray-950: #232529;
|
|
72
64
|
|
|
73
65
|
/* BLUE */
|
|
74
66
|
--color-blue-50: #e4edf7;
|
|
@@ -194,7 +186,7 @@ body {
|
|
|
194
186
|
h2,
|
|
195
187
|
h3,
|
|
196
188
|
h4 {
|
|
197
|
-
@apply text-
|
|
189
|
+
@apply text-gray-900;
|
|
198
190
|
}
|
|
199
191
|
|
|
200
192
|
h1,
|
|
@@ -221,7 +213,7 @@ body {
|
|
|
221
213
|
}
|
|
222
214
|
|
|
223
215
|
p {
|
|
224
|
-
@apply font-normal text-
|
|
216
|
+
@apply font-normal text-connect-midGray;
|
|
225
217
|
}
|
|
226
218
|
|
|
227
219
|
td,
|
|
@@ -231,10 +223,10 @@ body {
|
|
|
231
223
|
|
|
232
224
|
/* floating labels */
|
|
233
225
|
.floating-label-input {
|
|
234
|
-
@apply pointer-events-none absolute left-0 top-1 text-
|
|
226
|
+
@apply pointer-events-none absolute left-0 top-1 text-gray-900 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-blue-500;
|
|
235
227
|
}
|
|
236
228
|
|
|
237
229
|
.floating-label-textarea {
|
|
238
|
-
@apply pointer-events-none absolute left-0 top-1 text-
|
|
230
|
+
@apply pointer-events-none absolute left-0 top-1 text-gray-900 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-blue-500;
|
|
239
231
|
}
|
|
240
232
|
}
|
package/nuxt.config.ts
CHANGED
|
@@ -16,5 +16,32 @@ export default defineNuxtConfig({
|
|
|
16
16
|
'#base': resolve('./')
|
|
17
17
|
},
|
|
18
18
|
|
|
19
|
-
compatibilityDate: '2025-07-10'
|
|
19
|
+
compatibilityDate: '2025-07-10',
|
|
20
|
+
|
|
21
|
+
modules: ['@nuxtjs/i18n'],
|
|
22
|
+
|
|
23
|
+
// For more details on i18n in layers: https://i18n.nuxtjs.org/docs/guide/layers
|
|
24
|
+
// For more details on config: https://i18n.nuxtjs.org/docs/api/options
|
|
25
|
+
i18n: {
|
|
26
|
+
defaultLocale: 'en-CA',
|
|
27
|
+
detectBrowserLanguage: false,
|
|
28
|
+
langDir: 'locales',
|
|
29
|
+
locales: [
|
|
30
|
+
{
|
|
31
|
+
name: 'English',
|
|
32
|
+
code: 'en-CA',
|
|
33
|
+
language: 'en-CA',
|
|
34
|
+
dir: 'ltr',
|
|
35
|
+
file: 'en-CA.ts'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Français',
|
|
39
|
+
code: 'fr-CA',
|
|
40
|
+
language: 'fr-CA',
|
|
41
|
+
dir: 'ltr',
|
|
42
|
+
file: 'fr-CA.ts'
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
strategy: 'prefix'
|
|
46
|
+
}
|
|
20
47
|
})
|
package/package.json
CHANGED
|
@@ -1,34 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@nuxt/ui": "^3.2.0"
|
|
8
|
+
"@nuxt/ui": "^3.2.0",
|
|
9
|
+
"@nuxtjs/i18n": "^10.0.1"
|
|
9
10
|
},
|
|
10
11
|
"devDependencies": {
|
|
11
|
-
"nuxt": "4.0.0",
|
|
12
|
-
"typescript": "^5.8.3",
|
|
13
|
-
"vue": "latest",
|
|
14
|
-
"@nuxtjs/i18n": "^9.5.5",
|
|
15
|
-
"@playwright/test": "^1.52.0",
|
|
16
12
|
"@axe-core/playwright": "^4.10.2",
|
|
17
|
-
"@faker-js/faker": "^9.8.0",
|
|
18
|
-
"@nuxt/test-utils": "^3.19.1",
|
|
19
|
-
"vitest": "^3.2.3",
|
|
20
13
|
"@vitest/coverage-v8": "^3.2.3",
|
|
21
|
-
"happy-dom": "^17.6.3",
|
|
22
|
-
"otpauth": "^9.4.0",
|
|
23
|
-
"@testing-library/vue": "^8.1.0",
|
|
24
|
-
"@vue/test-utils": "^2.4.6",
|
|
25
14
|
"dotenv": "^17.2.0",
|
|
15
|
+
"nuxt": "4.0.0",
|
|
16
|
+
"typescript": "^5.8.3",
|
|
26
17
|
"vue-tsc": "^3.0.2",
|
|
27
|
-
"@
|
|
28
|
-
"
|
|
29
|
-
"@sbc-connect/
|
|
30
|
-
"@sbc-connect/playwright-config": "0.0.2",
|
|
31
|
-
"@sbc-connect/vitest-config": "0.0.2"
|
|
18
|
+
"@sbc-connect/eslint-config": "0.0.4",
|
|
19
|
+
"@sbc-connect/playwright-config": "0.0.4",
|
|
20
|
+
"@sbc-connect/vitest-config": "0.0.4"
|
|
32
21
|
},
|
|
33
22
|
"scripts": {
|
|
34
23
|
"preinstall": "npx only-allow pnpm",
|
package/eslint.config.ts
DELETED