@sbc-connect/nuxt-base 0.9.0 → 0.11.0
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/assets/css/connect-base-tw.css +3 -3
- package/app/components/Connect/BCGovLogo.vue +3 -1
- package/app/components/Connect/Footer.vue +2 -1
- package/app/components/Connect/Input/Menu.vue +54 -0
- package/package.json +5 -5
- /package/app/components/Connect/{InputDate.vue → Input/Date.vue} +0 -0
- /package/app/components/Connect/{Input.vue → Input/index.vue} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-base
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#178](https://github.com/bcgov/connect-nuxt/pull/178) [`3c8d9bf`](https://github.com/bcgov/connect-nuxt/commit/3c8d9bfdf9147d6fd6ce0dadc4b47f043feb4f4b) Thanks [@deetz99](https://github.com/deetz99)! - Use locale from useI18n instead of $i18n global
|
|
8
|
+
|
|
9
|
+
## 0.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#163](https://github.com/bcgov/connect-nuxt/pull/163) [`c0df0d1`](https://github.com/bcgov/connect-nuxt/commit/c0df0d1deb18d2123bc5e562e3c2ba2028de7ce1) Thanks [@vysakh-menon-aot](https://github.com/vysakh-menon-aot)! - floating label input size changed to 16px
|
|
14
|
+
|
|
15
|
+
- [#165](https://github.com/bcgov/connect-nuxt/pull/165) [`8dedd59`](https://github.com/bcgov/connect-nuxt/commit/8dedd5905ad619d8eaf8fee13a74abbc84019b54) Thanks [@deetz99](https://github.com/deetz99)! - Implement ConnectInputMenu component
|
|
16
|
+
|
|
3
17
|
## 0.9.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -269,11 +269,11 @@ body {
|
|
|
269
269
|
|
|
270
270
|
/* floating labels */
|
|
271
271
|
.floating-label-input {
|
|
272
|
-
@apply pointer-events-none absolute left-0 top-3 text-neutral 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-
|
|
272
|
+
@apply pointer-events-none absolute left-0 top-3 text-neutral 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-base peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:text-primary peer-aria-invalid:text-error;
|
|
273
273
|
}
|
|
274
|
-
|
|
274
|
+
|
|
275
275
|
.floating-label-textarea {
|
|
276
|
-
@apply pointer-events-none absolute left-0 top-1 text-neutral text-xs font-medium px-2.5 transition-all duration-200 peer-focus:top-1 peer-focus:text-xs peer-placeholder-shown:text-
|
|
276
|
+
@apply pointer-events-none absolute left-0 top-1 text-neutral text-xs font-medium px-2.5 transition-all duration-200 peer-focus:top-1 peer-focus:text-xs peer-placeholder-shown:text-base peer-placeholder-shown:top-2.5 peer-focus:translate-none peer-focus:text-primary peer-aria-invalid:text-error;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
/* Standard container padding */
|
|
@@ -8,11 +8,13 @@ import frSmallLogo from 'BCGovLogoSmFr'
|
|
|
8
8
|
import enLargeLogo from 'BCGovLogoLgEn'
|
|
9
9
|
// @ts-expect-error - Cannot find module 'BCGovLogoSmEn' or its corresponding type declarations.ts(2307)
|
|
10
10
|
import enSmallLogo from 'BCGovLogoSmEn'
|
|
11
|
+
|
|
12
|
+
const { locale } = useI18n()
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
<template>
|
|
14
16
|
<!-- use french logo for french locale, any other locale uses english logo -->
|
|
15
|
-
<div v-if="
|
|
17
|
+
<div v-if="locale === 'fr-CA'" class="shrink-0">
|
|
16
18
|
<!-- Using scale because it will increase the size of the image without affecting the container size -->
|
|
17
19
|
<!-- there is a lot of padding on the images, if only the height gets increased, -->
|
|
18
20
|
<!-- the padding makes the header too tall -->
|
|
@@ -4,6 +4,7 @@ const uiVersion = rtc.version
|
|
|
4
4
|
const feesUrl = `${rtc.registryHomeUrl}product-fees`
|
|
5
5
|
const dependencyVersions: string[] = useAppConfig().connect?.footer?.versions || []
|
|
6
6
|
const localePath = useLocalePath()
|
|
7
|
+
const { locale } = useI18n()
|
|
7
8
|
const links = [
|
|
8
9
|
{
|
|
9
10
|
label: 'connect.label.home',
|
|
@@ -64,7 +65,7 @@ const appVersions = computed<string[]>(() => {
|
|
|
64
65
|
]"
|
|
65
66
|
>
|
|
66
67
|
<NuxtLink
|
|
67
|
-
:to="link.to === '/' ? `/${
|
|
68
|
+
:to="link.to === '/' ? `/${locale}` : link.to"
|
|
68
69
|
:target="link.target"
|
|
69
70
|
:class="[
|
|
70
71
|
'rounded p-1 text-sm text-secondary',
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { InputMenuProps } from '@nuxt/ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
id: string
|
|
6
|
+
label: string
|
|
7
|
+
}>()
|
|
8
|
+
|
|
9
|
+
const labelId = props.id + '-label'
|
|
10
|
+
const model = defineModel<InputMenuProps['modelValue']>()
|
|
11
|
+
|
|
12
|
+
const hasValue = computed(() => {
|
|
13
|
+
const val = model.value
|
|
14
|
+
|
|
15
|
+
if (val === null || val === undefined) {
|
|
16
|
+
return false
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (Array.isArray(val)) {
|
|
20
|
+
return val.length > 0
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (typeof val === 'object') {
|
|
24
|
+
return Object.keys(val).length > 0
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return val === 0 || !!val
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
defineOptions({ inheritAttrs: false })
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<div class="relative group">
|
|
35
|
+
<span
|
|
36
|
+
:id="labelId"
|
|
37
|
+
:class="[
|
|
38
|
+
'absolute left-0 z-10 px-2.5 pointer-events-none text-neutral transition-all duration-200 w-fit line-clamp-1',
|
|
39
|
+
'top-1/2 -translate-y-1/2',
|
|
40
|
+
'group-focus-within:top-3 group-focus-within:text-xs group-focus-within:text-primary',
|
|
41
|
+
'group-has-aria-invalid:text-error',
|
|
42
|
+
hasValue ? 'top-3 text-xs' : '',
|
|
43
|
+
]"
|
|
44
|
+
>
|
|
45
|
+
{{ label }}
|
|
46
|
+
</span>
|
|
47
|
+
<UInputMenu
|
|
48
|
+
v-bind="$attrs"
|
|
49
|
+
:id
|
|
50
|
+
v-model="model"
|
|
51
|
+
:aria-labelledby="labelId"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"@types/luxon": "3.7.1",
|
|
24
24
|
"dotenv": "^17.4.2",
|
|
25
25
|
"nuxt": "4.4.6",
|
|
26
|
-
"typescript": "
|
|
27
|
-
"vue-tsc": "3.
|
|
26
|
+
"typescript": "6.0.3",
|
|
27
|
+
"vue-tsc": "3.3.1",
|
|
28
28
|
"@sbc-connect/eslint-config": "0.0.8",
|
|
29
|
-
"@sbc-connect/
|
|
30
|
-
"@sbc-connect/
|
|
29
|
+
"@sbc-connect/vitest-config": "0.2.0",
|
|
30
|
+
"@sbc-connect/playwright-config": "0.2.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"preinstall": "npx only-allow pnpm",
|
|
File without changes
|
|
File without changes
|