@sbc-connect/nuxt-base 0.13.2 → 0.14.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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-base
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#203](https://github.com/bcgov/connect-nuxt/pull/203) [`fedf109`](https://github.com/bcgov/connect-nuxt/commit/fedf109afdefa2869325afb9c7a268767c0e3d38) Thanks [@deetz99](https://github.com/deetz99)! - Add NuxtAnnouncer to app.vue. Update ConnectInputMenu hasValue check.
|
|
8
|
+
|
|
9
|
+
- [#203](https://github.com/bcgov/connect-nuxt/pull/203) [`fedf109`](https://github.com/bcgov/connect-nuxt/commit/fedf109afdefa2869325afb9c7a268767c0e3d38) Thanks [@deetz99](https://github.com/deetz99)! - Update dependencies
|
|
10
|
+
|
|
11
|
+
## 0.13.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#197](https://github.com/bcgov/connect-nuxt/pull/197) [`3ed5c7f`](https://github.com/bcgov/connect-nuxt/commit/3ed5c7f7df24773dcd231be1029f8b87f41a6f0e) Thanks [@panish16](https://github.com/panish16)! - Upgrade to pnpm 11.9.0 ([#182](https://github.com/bcgov/connect-nuxt/issues/182)) and stabilise the flaky WebKit/iPad e2e tests with retries, higher timeouts, and CI path filters that actually trigger on shared config changes ([#196](https://github.com/bcgov/connect-nuxt/issues/196))
|
|
16
|
+
|
|
3
17
|
## 0.13.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/app/app.vue
CHANGED
|
@@ -9,23 +9,39 @@ const props = defineProps<{
|
|
|
9
9
|
const labelId = props.id + '-label'
|
|
10
10
|
const model = defineModel<InputMenuProps['modelValue']>()
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
const val = model.value
|
|
14
|
-
|
|
12
|
+
function isPopulated(val: unknown): boolean {
|
|
15
13
|
if (val === null || val === undefined) {
|
|
16
14
|
return false
|
|
17
15
|
}
|
|
18
16
|
|
|
17
|
+
if (typeof val === 'string') {
|
|
18
|
+
return val.trim().length > 0
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (typeof val === 'number') {
|
|
22
|
+
return !Number.isNaN(val)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (typeof val === 'boolean' || typeof val === 'bigint') {
|
|
26
|
+
return true
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (val instanceof Date) {
|
|
30
|
+
return !Number.isNaN(val.getTime())
|
|
31
|
+
}
|
|
32
|
+
|
|
19
33
|
if (Array.isArray(val)) {
|
|
20
|
-
return val.
|
|
34
|
+
return val.some(isPopulated)
|
|
21
35
|
}
|
|
22
36
|
|
|
23
37
|
if (typeof val === 'object') {
|
|
24
|
-
return Object.
|
|
38
|
+
return Object.values(val).some(isPopulated)
|
|
25
39
|
}
|
|
26
40
|
|
|
27
|
-
return
|
|
28
|
-
}
|
|
41
|
+
return false
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const hasValue = computed(() => isPopulated(model.value))
|
|
29
45
|
|
|
30
46
|
defineOptions({ inheritAttrs: false })
|
|
31
47
|
</script>
|
|
@@ -35,11 +51,11 @@ defineOptions({ inheritAttrs: false })
|
|
|
35
51
|
<span
|
|
36
52
|
:id="labelId"
|
|
37
53
|
:class="[
|
|
38
|
-
'absolute
|
|
39
|
-
'top-1/2 -translate-y-1/2',
|
|
40
|
-
'group-focus-within:
|
|
54
|
+
'absolute text-neutral transition-transform duration-200 ease-out origin-left text-base line-clamp-1',
|
|
55
|
+
'top-1/2 left-2.5 z-10 pointer-events-none -translate-y-1/2',
|
|
56
|
+
'group-focus-within:translate-y-[-115%] group-focus-within:scale-75 group-focus-within:text-primary',
|
|
41
57
|
'group-has-aria-invalid:text-error',
|
|
42
|
-
hasValue ? '
|
|
58
|
+
hasValue ? 'translate-y-[-115%] scale-75' : '',
|
|
43
59
|
]"
|
|
44
60
|
>
|
|
45
61
|
{{ label }}
|
|
@@ -14,7 +14,7 @@ const showSideMenu = ref(true)
|
|
|
14
14
|
size="xs"
|
|
15
15
|
:icon="showSideMenu ? 'i-mdi-minus' : 'i-mdi-plus'"
|
|
16
16
|
data-testid="connect-sidebar-toggle-btn"
|
|
17
|
-
@click="showSideMenu = !showSideMenu"
|
|
17
|
+
@click="() => { showSideMenu = !showSideMenu }"
|
|
18
18
|
/>
|
|
19
19
|
<ConnectTransitionCollapse>
|
|
20
20
|
<div v-if="showSideMenu">
|
|
@@ -85,7 +85,10 @@ async function handleButtonAction(button: ButtonProps, event: MouseEvent) {
|
|
|
85
85
|
v-if="tombstone.bottomButtons.length"
|
|
86
86
|
class="flex flex-wrap gap-2"
|
|
87
87
|
>
|
|
88
|
-
<template
|
|
88
|
+
<template
|
|
89
|
+
v-for="btn in tombstone.bottomButtons"
|
|
90
|
+
:key="btn.button?.label || btn.vNode?.key || undefined"
|
|
91
|
+
>
|
|
89
92
|
<component :is="btn.vNode" v-if="btn.vNode" />
|
|
90
93
|
<UButton
|
|
91
94
|
v-else-if="btn.button"
|
package/package.json
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"repository":
|
|
4
|
+
"version": "0.14.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "github:bcgov/connect-nuxt"
|
|
8
|
+
},
|
|
6
9
|
"license": "BSD-3-Clause",
|
|
7
10
|
"main": "./nuxt.config.ts",
|
|
8
11
|
"dependencies": {
|
|
9
12
|
"@iconify-json/mdi": "1.2.3",
|
|
10
|
-
"@launchdarkly/js-client-sdk": "4.
|
|
13
|
+
"@launchdarkly/js-client-sdk": "4.10.3",
|
|
11
14
|
"@nuxt/ui": "4.7.1",
|
|
12
|
-
"@nuxtjs/i18n": "10.
|
|
13
|
-
"@vueuse/core": "
|
|
14
|
-
"@vueuse/nuxt": "
|
|
15
|
-
"dompurify": "3.4.
|
|
16
|
-
"es-toolkit": "1.
|
|
15
|
+
"@nuxtjs/i18n": "10.6.0",
|
|
16
|
+
"@vueuse/core": "15.0.0",
|
|
17
|
+
"@vueuse/nuxt": "15.0.0",
|
|
18
|
+
"dompurify": "3.4.16",
|
|
19
|
+
"es-toolkit": "1.52.0",
|
|
17
20
|
"luxon": "3.7.2",
|
|
18
|
-
"maska": "3.2.
|
|
19
|
-
"zod": "4.
|
|
21
|
+
"maska": "3.2.1",
|
|
22
|
+
"zod": "4.6.5"
|
|
20
23
|
},
|
|
21
24
|
"devDependencies": {
|
|
22
|
-
"@axe-core/playwright": "4.
|
|
23
|
-
"@types/luxon": "3.7.
|
|
24
|
-
"dotenv": "
|
|
25
|
-
"nuxt": "4.
|
|
25
|
+
"@axe-core/playwright": "4.13.0",
|
|
26
|
+
"@types/luxon": "3.7.5",
|
|
27
|
+
"dotenv": "18.0.4",
|
|
28
|
+
"nuxt": "4.5.2",
|
|
26
29
|
"typescript": "6.0.3",
|
|
27
|
-
"vue-
|
|
30
|
+
"vue-router": "^5.3.1",
|
|
31
|
+
"vue-tsc": "3.3.11",
|
|
28
32
|
"@sbc-connect/eslint-config": "0.0.8",
|
|
29
|
-
"@sbc-connect/
|
|
30
|
-
"@sbc-connect/
|
|
33
|
+
"@sbc-connect/vitest-config": "0.2.0",
|
|
34
|
+
"@sbc-connect/playwright-config": "0.2.1"
|
|
31
35
|
},
|
|
32
36
|
"scripts": {
|
|
33
37
|
"preinstall": "npx only-allow pnpm",
|