@sbc-connect/nuxt-base 0.1.8 → 0.1.9
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 +11 -0
- package/app/app.config.ts +93 -0
- package/app/components/Connect/Breadcrumb.vue +3 -1
- package/app/components/Connect/I18n/Helper.vue +3 -3
- package/app/components/Connect/Layout/Index.vue +1 -1
- package/app/components/Connect/Spinner.vue +9 -12
- package/app/components/Connect/SystemBanner.vue +7 -4
- package/app/composables/useConnectLaunchDarkly.ts +0 -7
- package/app/error.vue +2 -1
- package/modules/base-assets/runtime/assets/connect-base-tw.css +16 -0
- package/nuxt.config.ts +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-base
|
|
2
2
|
|
|
3
|
+
## 0.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43](https://github.com/bcgov/connect-nuxt/pull/43) [`3b521b7`](https://github.com/bcgov/connect-nuxt/commit/3b521b70bf1a0cc5a0feea63a825ef5544347aa8) Thanks [@deetz99](https://github.com/deetz99)! - Form components and new lint rules
|
|
8
|
+
|
|
9
|
+
- Forms layer address components
|
|
10
|
+
- Lint rules and fixes to prevent rule collision and promote best practices
|
|
11
|
+
|
|
12
|
+
issue: bcgov/entity#29338
|
|
13
|
+
|
|
3
14
|
## 0.1.8
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/app/app.config.ts
CHANGED
|
@@ -10,6 +10,23 @@ export default defineAppConfig({
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
ui: {
|
|
13
|
+
alert: {
|
|
14
|
+
slots: {
|
|
15
|
+
root: 'rounded'
|
|
16
|
+
},
|
|
17
|
+
compoundVariants: [
|
|
18
|
+
{
|
|
19
|
+
color: 'warning',
|
|
20
|
+
variant: 'subtle',
|
|
21
|
+
class: {
|
|
22
|
+
root: 'text-highlighted bg-yellow-400/25 ring-2 ring-yellow-400',
|
|
23
|
+
icon: 'text-warning',
|
|
24
|
+
title: 'font-bold text-nuetral-highlighted',
|
|
25
|
+
description: 'text-nuetral-highlighted'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
13
30
|
breadcrumb: {
|
|
14
31
|
slots: {
|
|
15
32
|
separatorIcon: 'text-secondary'
|
|
@@ -144,6 +161,46 @@ export default defineAppConfig({
|
|
|
144
161
|
}
|
|
145
162
|
]
|
|
146
163
|
},
|
|
164
|
+
formField: {
|
|
165
|
+
slots: {
|
|
166
|
+
root: '',
|
|
167
|
+
wrapper: 'space-y-1',
|
|
168
|
+
labelWrapper: 'flex content-center items-center justify-between',
|
|
169
|
+
label: 'block font-bold text-base text-neutral-highlighted',
|
|
170
|
+
container: 'mt-1 relative',
|
|
171
|
+
description: 'text-(--ui-text) text-base text-neutral-toned mb-4 whitespace-normal',
|
|
172
|
+
error: 'pl-4.5 mt-1 text-(--ui-error) text-xs',
|
|
173
|
+
hint: 'text-(--ui-text)',
|
|
174
|
+
help: 'pl-4.5 mt-1 text-(--ui-text) text-xs'
|
|
175
|
+
},
|
|
176
|
+
variants: {
|
|
177
|
+
size: {
|
|
178
|
+
xs: {
|
|
179
|
+
root: 'text-xs'
|
|
180
|
+
},
|
|
181
|
+
sm: {
|
|
182
|
+
root: 'text-xs'
|
|
183
|
+
},
|
|
184
|
+
md: {
|
|
185
|
+
root: 'text-sm'
|
|
186
|
+
},
|
|
187
|
+
lg: {
|
|
188
|
+
root: 'text-sm'
|
|
189
|
+
},
|
|
190
|
+
xl: {
|
|
191
|
+
root: 'text-base'
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
required: {
|
|
195
|
+
true: {
|
|
196
|
+
label: 'after:content-[\'*\'] after:ms-0.5 after:text-(--ui-error)'
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
defaultVariants: {
|
|
201
|
+
size: 'md'
|
|
202
|
+
}
|
|
203
|
+
},
|
|
147
204
|
icons: {
|
|
148
205
|
arrowLeft: 'i-mdi-arrow-left',
|
|
149
206
|
arrowRight: 'i-mdi-arrow-right',
|
|
@@ -188,6 +245,42 @@ export default defineAppConfig({
|
|
|
188
245
|
variant: 'bcGov'
|
|
189
246
|
}
|
|
190
247
|
},
|
|
248
|
+
select: {
|
|
249
|
+
slots: {
|
|
250
|
+
content: 'rounded-sm',
|
|
251
|
+
group: 'px-0 py-2',
|
|
252
|
+
trailingIcon: 'group-data-[state=open]:rotate-180 transition-transform duration-200 text-(--ui-text) group-data-[state=open]:text-primary group-focus:text-primary',
|
|
253
|
+
item: 'my-0.75 text-neutral-highlighted before:rounded-none data-highlighted:not-data-disabled:text-primary data-highlighted:not-data-disabled:before:bg-shade data-[state=checked]:text-primary data-[state=checked]:bg-blue-50',
|
|
254
|
+
itemLeadingIcon: 'group-data-[state=checked]:text-primary group-data-highlighted:not-data-disabled:text-primary text-neutral-highlighted'
|
|
255
|
+
},
|
|
256
|
+
variants: {
|
|
257
|
+
size: {
|
|
258
|
+
bcGov: {
|
|
259
|
+
base: 'px-0 py-0 text-base gap-1.5',
|
|
260
|
+
leading: 'ps-2.5',
|
|
261
|
+
trailing: 'pe-2.5',
|
|
262
|
+
leadingIcon: 'size-5',
|
|
263
|
+
leadingAvatarSize: '2xs',
|
|
264
|
+
trailingIcon: 'size-5',
|
|
265
|
+
label: 'p-1.5 text-xs gap-1.5',
|
|
266
|
+
item: 'py-3 px-4 text-sm gap-3',
|
|
267
|
+
itemLeadingIcon: 'size-5',
|
|
268
|
+
itemLeadingAvatarSize: '2xs',
|
|
269
|
+
itemLeadingChip: 'size-5',
|
|
270
|
+
itemLeadingChipSize: 'md',
|
|
271
|
+
itemTrailingIcon: 'size-5'
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
variant: {
|
|
275
|
+
bcGov: 'peer rounded-t-sm rounded-b-none bg-shade focus:ring-0 focus:outline-none shadow-input data-[state=open]:shadow-input-focus focus:shadow-input-focus text-neutral-highlighted'
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
defaultVariants: {
|
|
279
|
+
size: 'bcGov',
|
|
280
|
+
color: 'primary',
|
|
281
|
+
variant: 'bcGov'
|
|
282
|
+
}
|
|
283
|
+
},
|
|
191
284
|
textarea: {
|
|
192
285
|
variants: {
|
|
193
286
|
size: {
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
const
|
|
3
|
-
fullscreen
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
size
|
|
8
|
-
|
|
9
|
-
default: 75
|
|
10
|
-
}
|
|
11
|
-
})
|
|
2
|
+
const {
|
|
3
|
+
fullscreen = false,
|
|
4
|
+
size = 75
|
|
5
|
+
} = defineProps<{
|
|
6
|
+
fullscreen?: boolean
|
|
7
|
+
size?: number
|
|
8
|
+
}>()
|
|
12
9
|
|
|
13
10
|
const spinnerStyle = computed(() => ({
|
|
14
|
-
'--spinner-size': `${
|
|
15
|
-
'--spinner-margin': `${
|
|
11
|
+
'--spinner-size': `${size}px`,
|
|
12
|
+
'--spinner-margin': `${size / -2}px`
|
|
16
13
|
}))
|
|
17
14
|
</script>
|
|
18
15
|
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
const ld = useConnectLaunchDarkly()
|
|
3
3
|
const { $sanitize } = useNuxtApp()
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
dismissible
|
|
7
|
-
icon
|
|
8
|
-
}
|
|
5
|
+
const {
|
|
6
|
+
dismissible = false,
|
|
7
|
+
icon = 'i-mdi-information'
|
|
8
|
+
} = defineProps<{
|
|
9
|
+
dismissible?: boolean
|
|
10
|
+
icon?: string
|
|
11
|
+
}>()
|
|
9
12
|
|
|
10
13
|
const close = ref(false)
|
|
11
14
|
const message = ref('')
|
|
@@ -148,13 +148,6 @@ export const useConnectLaunchDarkly = () => {
|
|
|
148
148
|
}))
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
// TODO: or do we do this and then everytime the fn is called its required to use await?
|
|
152
|
-
// TODO: returning the computed means we dont need to add LD to middleware
|
|
153
|
-
// async function getStoredFlag(name: string): Promise<unknown> {
|
|
154
|
-
// await ldClient.value?.waitUntilReady()
|
|
155
|
-
// return ldFlagSet.value[name]
|
|
156
|
-
// }
|
|
157
|
-
|
|
158
151
|
/**
|
|
159
152
|
* Resets the LaunchDarkly state and closes the client connection.
|
|
160
153
|
*/
|
package/app/error.vue
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/* eslint-disable vue/define-props-declaration */
|
|
2
3
|
import type { NuxtError } from '#app'
|
|
3
4
|
|
|
4
5
|
const { t } = useI18n()
|
|
@@ -36,7 +37,7 @@ onMounted(() => {
|
|
|
36
37
|
<template>
|
|
37
38
|
<UApp :toaster="{ position: 'bottom-center' }">
|
|
38
39
|
<NuxtLayout name="connect-base">
|
|
39
|
-
<div class="m-auto flex flex-col items-center gap-4
|
|
40
|
+
<div class="m-auto flex flex-col items-center gap-4">
|
|
40
41
|
<h1>
|
|
41
42
|
{{ $t(`connect.page.error.${errorKey}.h1`) }}
|
|
42
43
|
</h1>
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
/* Customize Nuxt UI default tokens */
|
|
7
7
|
/* Follows https://sites.google.com/bcdevexchange.org/designsystem/foundation-styles/colours */
|
|
8
8
|
:root {
|
|
9
|
+
/* Default Text Colours */
|
|
10
|
+
--ui-text-dimmed: var(--ui-color-gray-400);
|
|
11
|
+
--ui-text-muted: var(--ui-color-gray-500);
|
|
12
|
+
--ui-text-toned: var(--ui-color-gray-600);
|
|
13
|
+
--ui-text: var(--ui-color-neutral);
|
|
14
|
+
--ui-text-highlighted: var(--ui-color-neutral-highlighted);
|
|
15
|
+
--ui-text-inverted: var(--color-white);
|
|
16
|
+
/* Variant Colours */
|
|
9
17
|
--ui-error: var(--color-red-600);
|
|
10
18
|
--ui-primary: var(--color-blue-500);
|
|
11
19
|
--ui-secondary: white;
|
|
@@ -34,6 +42,14 @@
|
|
|
34
42
|
|
|
35
43
|
/* FUTURE: add dark themed colours (currently set to be the same) */
|
|
36
44
|
.dark {
|
|
45
|
+
/* Default Text Colours */
|
|
46
|
+
--ui-text-dimmed: var(--ui-color-gray-400);
|
|
47
|
+
--ui-text-muted: var(--ui-color-gray-500);
|
|
48
|
+
--ui-text-toned: var(--ui-color-gray-600);
|
|
49
|
+
--ui-text: var(--ui-color-neutral);
|
|
50
|
+
--ui-text-highlighted: var(--ui-color-neutral-highlighted);
|
|
51
|
+
--ui-text-inverted: var(--color-white);
|
|
52
|
+
/* Variant Colours */
|
|
37
53
|
--ui-error: var(--color-red-600);
|
|
38
54
|
--ui-primary: var(--color-blue-500);
|
|
39
55
|
--ui-secondary: white;
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.9",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"nuxt": "^4.0.2",
|
|
24
24
|
"typescript": "^5.8.3",
|
|
25
25
|
"vue-tsc": "^3.0.4",
|
|
26
|
-
"@sbc-connect/eslint-config": "0.0.
|
|
27
|
-
"@sbc-connect/
|
|
28
|
-
"@sbc-connect/
|
|
26
|
+
"@sbc-connect/eslint-config": "0.0.7",
|
|
27
|
+
"@sbc-connect/vitest-config": "0.0.6",
|
|
28
|
+
"@sbc-connect/playwright-config": "0.0.6"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"preinstall": "npx only-allow pnpm",
|