@sbc-connect/nuxt-base 0.1.13 → 0.1.15

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,17 @@
1
1
  # @sbc-connect/nuxt-base
2
2
 
3
+ ## 0.1.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [#56](https://github.com/bcgov/connect-nuxt/pull/56) [`cab53dc`](https://github.com/bcgov/connect-nuxt/commit/cab53dc83ab8c8032bdb424a9e135febdfebf645) Thanks [@kialj876](https://github.com/kialj876)! - Address display component update
8
+
9
+ ## 0.1.14
10
+
11
+ ### Patch Changes
12
+
13
+ - [#54](https://github.com/bcgov/connect-nuxt/pull/54) [`5d66b92`](https://github.com/bcgov/connect-nuxt/commit/5d66b927121d6144ee7eedb8ed86b64c76e26c7e) Thanks [@deetz99](https://github.com/deetz99)! - Update layout padding, fix text-highlighted css var reference.
14
+
3
15
  ## 0.1.13
4
16
 
5
17
  ### Patch Changes
@@ -2,6 +2,8 @@
2
2
  const props = defineProps<{
3
3
  address: Partial<ConnectAddress>
4
4
  omitCountry?: boolean
5
+ separateCity?: boolean
6
+ textDecor?: boolean
5
7
  }>()
6
8
 
7
9
  const getAddressDisplayParts = (
@@ -37,9 +39,12 @@ const getAddressDisplayParts = (
37
39
  }
38
40
 
39
41
  const getCountry = () => {
40
- return address.country && !omitCountry ? (regionNamesInEnglish.of(address.country) || address.country) : ''
42
+ try {
43
+ return address.country && !omitCountry ? (regionNamesInEnglish.of(address.country) || address.country) : ''
44
+ } catch {
45
+ return address.country || ''
46
+ }
41
47
  }
42
-
43
48
  return [
44
49
  getLine1(),
45
50
  getLine2(),
@@ -49,7 +54,7 @@ const getAddressDisplayParts = (
49
54
  ].filter(val => !!val && val !== ',')
50
55
  }
51
56
 
52
- const addressDisplay = getAddressDisplayParts(props.address, false, true, props.omitCountry)
57
+ const addressDisplay = getAddressDisplayParts(props.address, props.separateCity, props.textDecor, props.omitCountry)
53
58
  </script>
54
59
 
55
60
  <template>
@@ -39,11 +39,11 @@ function resolveBackHref() {
39
39
  <div
40
40
  v-if="$route.meta.hideBreadcrumbs !== true"
41
41
  data-testid="connect-breadcrumb-wrapper"
42
- class="bg-blue-350"
42
+ class="bg-blue-350 p-2 sm:px-4 py-2"
43
43
  >
44
44
  <nav
45
45
  :aria-label="$t('connect.breadcrumb.arialabel')"
46
- class="app-inner-container flex items-center p-2 sm:px-4 py-2 gap-3"
46
+ class="app-inner-container flex items-center gap-3"
47
47
  >
48
48
  <UButton
49
49
  class="size-[28px] rounded-full px-1 bg-secondary hover:bg-secondary/75"
@@ -54,9 +54,9 @@ const appVersions = computed<string[]>(() => {
54
54
  <footer
55
55
  id="connect-main-footer"
56
56
  data-testid="connect-main-footer"
57
- class="border-t-2 border-brand-inverted bg-brand"
57
+ class="border-t-2 border-brand-inverted bg-brand p-2 sm:px-4"
58
58
  >
59
- <div class="app-inner-container flex items-center justify-between p-2">
59
+ <div class="app-inner-container flex items-center justify-between">
60
60
  <nav :aria-label="$t('connect.footer.navLabel')" class="flex grow">
61
61
  <ul class="list-none flex-col gap-1 p-0 sm:-ml-2 sm:flex-row sm:flex-wrap">
62
62
  <li
@@ -9,12 +9,14 @@
9
9
  <slot name="breadcrumb">
10
10
  <ConnectBreadcrumb />
11
11
  </slot>
12
- <main class="app-inner-container app-body">
13
- <slot name="body">
14
- <div class="grow max-w-full flex flex-col overflow-hidden">
15
- <slot />
16
- </div>
17
- </slot>
12
+ <main class="app-body px-2 sm:px-4">
13
+ <div class="app-inner-container ">
14
+ <slot name="body">
15
+ <div class="grow max-w-full flex flex-col overflow-hidden">
16
+ <slot />
17
+ </div>
18
+ </slot>
19
+ </div>
18
20
  </main>
19
21
  <slot name="footer">
20
22
  <ConnectFooter />
@@ -18,7 +18,7 @@ onMounted(async () => {
18
18
  </script>
19
19
 
20
20
  <template>
21
- <div id="connect-system-banner" class="bg-brand-inverted">
21
+ <div id="connect-system-banner" class="bg-brand-inverted px-2 sm:px-4">
22
22
  <UAlert
23
23
  v-show="!!message && !close"
24
24
  class="py-0"
@@ -26,7 +26,7 @@ onMounted(async () => {
26
26
  :close="dismissible"
27
27
  close-icon="i-mdi-close"
28
28
  :ui="{
29
- root: 'rounded-none bg-brand-inverted p-2 sm:px-4 app-inner-container',
29
+ root: 'rounded-none bg-brand-inverted px-0 sm:px-0 app-inner-container',
30
30
  wrapper: 'bg-brand-inverted',
31
31
  close: 'mt-2 text-neutral-highlighted',
32
32
  }"
@@ -9,5 +9,5 @@
9
9
  }
10
10
 
11
11
  .app-body {
12
- @apply grow relative flex flex-col px-4;
12
+ @apply grow relative flex flex-col;
13
13
  }
@@ -6,12 +6,12 @@
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);
9
+ /* Nuxt UI Default Text Colours */
10
+ --ui-text-dimmed: var(--color-gray-400);
11
+ --ui-text-muted: var(--color-gray-500);
12
+ --ui-text-toned: var(--color-gray-600);
13
+ --ui-text: var(--ui-neutral);
14
+ --ui-text-highlighted: var(--ui-neutral-highlighted);
15
15
  --ui-text-inverted: var(--color-white);
16
16
  /* Variant Colours */
17
17
  --ui-error: var(--color-red-600);
@@ -42,12 +42,12 @@
42
42
 
43
43
  /* FUTURE: add dark themed colours (currently set to be the same) */
44
44
  .dark {
45
- /* Default Text Colours */
45
+ /* Nuxt UI Default Text Colours */
46
46
  --ui-text-dimmed: var(--ui-color-gray-400);
47
47
  --ui-text-muted: var(--ui-color-gray-500);
48
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);
49
+ --ui-text: var(--ui-neutral);
50
+ --ui-text-highlighted: var(--ui-neutral-highlighted);
51
51
  --ui-text-inverted: var(--color-white);
52
52
  /* Variant Colours */
53
53
  --ui-error: var(--color-red-600);
@@ -76,6 +76,7 @@
76
76
  --ui-radius: 0.1667rem;
77
77
  }
78
78
 
79
+ /* Main Theme */
79
80
  @theme static {
80
81
  /* font */
81
82
  --font-sans: 'BCSans', 'Verdana', 'Arial', 'sans-serif';
@@ -275,3 +276,14 @@ body {
275
276
  @apply pointer-events-none absolute left-0 top-1 text-neutral-highlighted 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
  }
277
278
  }
279
+
280
+ /* TODO: maybe delete this */
281
+ /* Extra Utilities */
282
+ /* This should be working out-of-the-box from Nuxt UI but isnt for some reason */
283
+ /* https://ui.nuxt.com/getting-started/theme#neutral */
284
+ /* .text-highlighted {
285
+ color: var(--color-gray-900);
286
+ @variant dark {
287
+ color: var(--color-gray-900);
288
+ }
289
+ } */
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.13",
4
+ "version": "0.1.15",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",