@sbc-connect/nuxt-base 0.7.1 → 0.7.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 +12 -0
- package/app/assets/css/connect-base-tw.css +29 -3
- package/app/components/Connect/Input.vue +15 -5
- package/app/components/Connect/InputDate.vue +2 -5
- package/app/components/Connect/LocaleSelect.vue +2 -2
- package/app/components/Connect/Textarea.vue +3 -1
- package/app/utils/setBreadcrumbs.ts +3 -1
- package/i18n/locales/fr-CA.ts +8 -2
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-base
|
|
2
2
|
|
|
3
|
+
## 0.7.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#155](https://github.com/bcgov/connect-nuxt/pull/155) [`e4ad236`](https://github.com/bcgov/connect-nuxt/commit/e4ad2360c255173e20b7f6d384de2a9313ce747d) Thanks [@deetz99](https://github.com/deetz99)! - Custom CSS classes for x and xy default padding and left error border for container elements.
|
|
8
|
+
|
|
9
|
+
## 0.7.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#149](https://github.com/bcgov/connect-nuxt/pull/149) [`467e679`](https://github.com/bcgov/connect-nuxt/commit/467e679f8bf4b2f3b9ec2294fd28a2a6c5ef3dba) Thanks [@deetz99](https://github.com/deetz99)! - Update dependencies
|
|
14
|
+
|
|
3
15
|
## 0.7.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -90,9 +90,10 @@
|
|
|
90
90
|
--marker-upper-alpha: upper-alpha;
|
|
91
91
|
|
|
92
92
|
/* box shadow */
|
|
93
|
-
|
|
94
|
-
--shadow-input
|
|
95
|
-
--shadow-input-
|
|
93
|
+
/* bottom neutral/focused/error border for input elements */
|
|
94
|
+
--shadow-input: inset 0 -1px 0 0 var(--ui-neutral);
|
|
95
|
+
--shadow-input-focus: inset 0 -2px 0 0 var(--ui-primary);
|
|
96
|
+
--shadow-input-error: inset 0 -2px 0 0 var(--ui-error);
|
|
96
97
|
|
|
97
98
|
/* GRAY */
|
|
98
99
|
--color-gray-50: #f8f9fa;
|
|
@@ -274,4 +275,29 @@ body {
|
|
|
274
275
|
.floating-label-textarea {
|
|
275
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-sm peer-placeholder-shown:top-2.5 peer-focus:translate-none peer-focus:text-primary peer-aria-invalid:text-error;
|
|
276
277
|
}
|
|
278
|
+
|
|
279
|
+
/* Standard container padding */
|
|
280
|
+
.padding-x-default {
|
|
281
|
+
@apply px-4 sm:px-7.5
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.padding-xy-default {
|
|
285
|
+
@apply py-6 px-4 sm:py-10 sm:px-7.5
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* left error border for section elements */
|
|
289
|
+
/* Psuedo element required to be visible so slot content does not cover it */
|
|
290
|
+
.shadow-section-error {
|
|
291
|
+
position: relative;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.shadow-section-error::before {
|
|
295
|
+
content: "";
|
|
296
|
+
position: absolute;
|
|
297
|
+
inset: 0 auto 0 0;
|
|
298
|
+
width: 3px;
|
|
299
|
+
background-color: var(--ui-error);
|
|
300
|
+
pointer-events: none;
|
|
301
|
+
z-index: 1;
|
|
302
|
+
}
|
|
277
303
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { InputProps } from '@nuxt/ui'
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const {
|
|
5
|
+
id,
|
|
6
|
+
autoFocus = false
|
|
7
|
+
} = defineProps<{
|
|
5
8
|
id: string
|
|
6
9
|
label: string
|
|
7
10
|
mask?: string
|
|
@@ -9,27 +12,34 @@ const props = defineProps<{
|
|
|
9
12
|
autoFocus?: boolean
|
|
10
13
|
}>()
|
|
11
14
|
|
|
12
|
-
const model = defineModel<
|
|
15
|
+
const model = defineModel<InputProps['modelValue']>({ required: true })
|
|
16
|
+
const inputRef = useTemplateRef('input-ref')
|
|
13
17
|
|
|
14
18
|
// Inject props
|
|
15
19
|
const injectedProps = inject<InputProps>(
|
|
16
|
-
`UInput-props${
|
|
20
|
+
`UInput-props${id ? `-${id}` : ''}`,
|
|
17
21
|
{} as InputProps
|
|
18
22
|
)
|
|
19
23
|
|
|
20
24
|
// Inject slots
|
|
21
25
|
const injectedSlots = inject<{ [key: string]: VNode }>(
|
|
22
|
-
`UInput-slots${
|
|
26
|
+
`UInput-slots${id ? `-${id}` : ''}`,
|
|
23
27
|
{}
|
|
24
28
|
)
|
|
29
|
+
|
|
30
|
+
defineExpose({ input: inputRef })
|
|
31
|
+
|
|
32
|
+
// vue ignore reason - type mismatch between model and defaultValue prop caused by strict generics
|
|
25
33
|
</script>
|
|
26
34
|
|
|
27
35
|
<template>
|
|
36
|
+
<!-- @vue-ignore -->
|
|
28
37
|
<UInput
|
|
38
|
+
ref="input-ref"
|
|
29
39
|
v-bind="{
|
|
30
40
|
id,
|
|
31
41
|
disabled,
|
|
32
|
-
autoFocus,
|
|
42
|
+
autofocus: autoFocus,
|
|
33
43
|
...injectedProps, // injected props will default when provided
|
|
34
44
|
}"
|
|
35
45
|
v-model.trim="model"
|
|
@@ -46,17 +46,14 @@ const calendarRef = useTemplateRef('calendar-ref')
|
|
|
46
46
|
const inputRef = useTemplateRef<InstanceType<typeof ConnectInput>>('input-ref')
|
|
47
47
|
|
|
48
48
|
function focusCalendar() {
|
|
49
|
-
const button = (calendarRef.value as any)
|
|
49
|
+
const button = (calendarRef.value as any)?.$el?.querySelector('button')
|
|
50
50
|
if (button) {
|
|
51
51
|
(button as HTMLButtonElement).focus()
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
function focusInput() {
|
|
56
|
-
|
|
57
|
-
if (input) {
|
|
58
|
-
(input as HTMLInputElement).focus()
|
|
59
|
-
}
|
|
56
|
+
inputRef.value?.input?.inputRef?.focus()
|
|
60
57
|
open.value = false
|
|
61
58
|
emit('blur')
|
|
62
59
|
}
|
|
@@ -4,7 +4,7 @@ import type { LocaleObject } from '@nuxtjs/i18n'
|
|
|
4
4
|
|
|
5
5
|
const { locale, locales, setLocale } = useI18n()
|
|
6
6
|
|
|
7
|
-
const items = computed((): DropdownMenuItem[] => {
|
|
7
|
+
const items = computed((): DropdownMenuItem[][] => {
|
|
8
8
|
const options = locales.value.map((loc: LocaleObject) => {
|
|
9
9
|
const isCurrentLocal = loc.code === locale.value
|
|
10
10
|
return {
|
|
@@ -12,7 +12,7 @@ const items = computed((): DropdownMenuItem[] => {
|
|
|
12
12
|
icon: isCurrentLocal ? 'i-mdi-check' : '',
|
|
13
13
|
onSelect: () => setLocale(loc.code),
|
|
14
14
|
class: isCurrentLocal ? 'bg-gray-100' : 'pl-8',
|
|
15
|
-
color: isCurrentLocal ? 'primary' : 'neutral'
|
|
15
|
+
color: isCurrentLocal ? 'primary' as const : 'neutral' as const
|
|
16
16
|
}
|
|
17
17
|
})
|
|
18
18
|
return [options]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
import type { TextareaProps } from '@nuxt/ui'
|
|
3
|
+
|
|
4
|
+
const model = defineModel<Exclude<TextareaProps['modelValue'], null>>({ required: true })
|
|
3
5
|
|
|
4
6
|
defineProps<{
|
|
5
7
|
id: string
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
1
2
|
export function setBreadcrumbs(breadcrumbs: ConnectBreadcrumb[]) {
|
|
2
3
|
const route = useRoute()
|
|
3
|
-
// @ts-
|
|
4
|
+
// @ts-ignore - Type instantiation is excessively deep and possibly infinite.
|
|
5
|
+
// ignore instead of expect error due to local TS vs typecheck variance
|
|
4
6
|
route.meta.breadcrumbs = breadcrumbs
|
|
5
7
|
}
|
package/i18n/locales/fr-CA.ts
CHANGED
|
@@ -28,9 +28,15 @@ export default {
|
|
|
28
28
|
goBack: 'Retour',
|
|
29
29
|
home: 'Accueil',
|
|
30
30
|
localeSelect: 'Sélectionnez une langue, langue courante: Français',
|
|
31
|
-
privacy: 'Confidentialité'
|
|
31
|
+
privacy: 'Confidentialité',
|
|
32
|
+
whatsNew: 'Nouveautés',
|
|
33
|
+
whatsNewAria: 'Nouveautés, {count} non lues',
|
|
34
|
+
whatsNewSlideover: 'Nouveautés — Registres de la CB'
|
|
32
35
|
},
|
|
33
|
-
text: {
|
|
36
|
+
text: {
|
|
37
|
+
whatsNewSlideoverDescription: ' ',
|
|
38
|
+
whatsNewSlideoverEmpty: 'Aucune nouveauté.'
|
|
39
|
+
}
|
|
34
40
|
},
|
|
35
41
|
btn: {
|
|
36
42
|
bcRegHome: 'Accueil des Registres de la CB',
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.3",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@iconify-json/mdi": "1.2.3",
|
|
10
|
-
"@nuxt/ui": "4.
|
|
11
|
-
"@nuxtjs/i18n": "10.2.
|
|
12
|
-
"@vueuse/core": "14.1
|
|
13
|
-
"@vueuse/nuxt": "14.1
|
|
14
|
-
"dompurify": "3.3.
|
|
15
|
-
"es-toolkit": "1.
|
|
16
|
-
"launchdarkly-vue-client-sdk": "2.
|
|
10
|
+
"@nuxt/ui": "4.6.0",
|
|
11
|
+
"@nuxtjs/i18n": "10.2.4",
|
|
12
|
+
"@vueuse/core": "14.2.1",
|
|
13
|
+
"@vueuse/nuxt": "14.2.1",
|
|
14
|
+
"dompurify": "3.3.3",
|
|
15
|
+
"es-toolkit": "1.45.1",
|
|
16
|
+
"launchdarkly-vue-client-sdk": "2.5.0",
|
|
17
17
|
"luxon": "3.7.2",
|
|
18
18
|
"maska": "3.2.0",
|
|
19
|
-
"zod": "4.
|
|
19
|
+
"zod": "4.3.6"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@axe-core/playwright": "4.11.
|
|
22
|
+
"@axe-core/playwright": "4.11.1",
|
|
23
23
|
"@types/luxon": "3.7.1",
|
|
24
|
-
"dotenv": "17.
|
|
24
|
+
"dotenv": "17.3.1",
|
|
25
25
|
"nuxt": "4.2.2",
|
|
26
26
|
"typescript": "5.9.3",
|
|
27
|
-
"vue-tsc": "3.2.
|
|
28
|
-
"@sbc-connect/
|
|
29
|
-
"@sbc-connect/vitest-config": "0.1.
|
|
30
|
-
"@sbc-connect/
|
|
27
|
+
"vue-tsc": "3.2.5",
|
|
28
|
+
"@sbc-connect/eslint-config": "0.0.8",
|
|
29
|
+
"@sbc-connect/vitest-config": "0.1.1",
|
|
30
|
+
"@sbc-connect/playwright-config": "0.1.1"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"preinstall": "npx only-allow pnpm",
|