@sbc-connect/nuxt-forms 0.1.12 → 0.1.13

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,20 @@
1
1
  # @sbc-connect/nuxt-forms
2
2
 
3
+ ## 0.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#50](https://github.com/bcgov/connect-nuxt/pull/50) [`19e3a00`](https://github.com/bcgov/connect-nuxt/commit/19e3a00a8350f8f02f674d10e1d572c909ad90c5) Thanks [@deetz99](https://github.com/deetz99)! - Minor CSS updates
8
+
9
+ - update footer link divider colour
10
+ - update formfield help/error placeholder spacer
11
+ - fix fieldset orientation
12
+
13
+ issue: bcgov/entity#30434
14
+
15
+ - Updated dependencies [[`19e3a00`](https://github.com/bcgov/connect-nuxt/commit/19e3a00a8350f8f02f674d10e1d572c909ad90c5)]:
16
+ - @sbc-connect/nuxt-base@0.1.12
17
+
3
18
  ## 0.1.12
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -15,7 +15,7 @@ This package provides a library of reusable form components, integrated validati
15
15
  - Pre-built components for common inputs like addresses, postal codes, names, emails and phone numbers.
16
16
  - Reusable Zod schemas to manage the input validations.
17
17
 
18
- For detailed usage and API documentation, please see the [Forms Layer Docs](../../../docs/packages/layers/forms/intro.md).
18
+ For detailed usage and API documentation, please see the [Forms Layer Docs](../../../docs/packages/layers/forms/overview.md).
19
19
 
20
20
  ## Usage
21
21
 
@@ -38,7 +38,20 @@ defineNuxtConfig({
38
38
  ```
39
39
 
40
40
  ## Environment Variables
41
- This layer does not require any specific environment variables to be set.
41
+ This project requires certain environment variables to be set to run correctly.
42
+
43
+ Create a file named .env in the root of the project.
44
+
45
+ Copy the contents of the .env.example file into your new .env file.
46
+
47
+ ### Local Development
48
+ Copy the contents of the **.env.example** file into your new .env file.
49
+
50
+ ### Production Environments
51
+ > [!IMPORTANT]
52
+ > The values for staging and production environments are managed securely and should not be stored in this file.
53
+
54
+ To obtain the correct values for a production build or deployment, please contact the Connect Platform Team.
42
55
 
43
56
  ## Contributing
44
- We welcome contributions to this package! Please see the main [suspicious link removed] for information on our branching strategy, commit conventions, and pull request process.
57
+ We welcome contributions to this package! Please see the main [Contribution Guidelines](../../../CONTRIBUTING.md) for information on our branching strategy, commit conventions, and pull request process.
@@ -10,33 +10,38 @@ const {
10
10
  orientation?: 'vertical' | 'horizontal'
11
11
  }>()
12
12
  // TODO: figure out why text-error doesnt work on the legend text
13
+
14
+ const legendId = useId()
13
15
  </script>
14
16
 
15
17
  <template>
16
- <fieldset
17
- class="flex"
18
- :class="[orientation === 'horizontal' ? 'flex-col gap-6 sm:flex-row sm:gap-4' : 'flex-col gap-6']"
19
- >
20
- <legend
21
- class="text-base text-neutral-highlighted font-bold pb-6"
22
- :class="[
23
- { 'text-red-600': !!error },
24
- { 'w-full sm:w-1/4 pb-0': orientation === 'horizontal' },
25
- ]"
18
+ <fieldset :aria-labelledby="legendId">
19
+ <div
20
+ class="flex"
21
+ :class="[orientation === 'horizontal' ? 'flex-col gap-6 sm:flex-row sm:gap-4' : 'flex-col gap-6']"
26
22
  >
27
- <div class="flex flex-wrap gap-4">
28
- <span>{{ label }}</span>
29
- <span
30
- v-if="!!error && showErrorMsg"
31
- class="font-normal"
32
- >
33
- {{ error.message }}
34
- </span>
35
- </div>
36
- </legend>
23
+ <legend
24
+ :id="legendId"
25
+ class="text-base text-neutral-highlighted font-bold"
26
+ :class="[
27
+ { 'text-red-600': !!error },
28
+ { 'w-full sm:w-1/4 pb-0': orientation === 'horizontal' },
29
+ ]"
30
+ >
31
+ <div class="flex flex-wrap gap-4">
32
+ <span>{{ label }}</span>
33
+ <span
34
+ v-if="!!error && showErrorMsg"
35
+ class="font-normal"
36
+ >
37
+ {{ error.message }}
38
+ </span>
39
+ </div>
40
+ </legend>
37
41
 
38
- <div class="flex-1">
39
- <slot />
42
+ <div class="flex-1">
43
+ <slot />
44
+ </div>
40
45
  </div>
41
46
  </fieldset>
42
47
  </template>
@@ -7,6 +7,7 @@ defineProps<{
7
7
  autofocus?: boolean
8
8
  mask?: string
9
9
  disabled?: boolean
10
+ help?: string
10
11
  }>()
11
12
 
12
13
  const model = defineModel<string>({ required: true })
@@ -15,6 +16,7 @@ const model = defineModel<string>({ required: true })
15
16
  <template>
16
17
  <UFormField
17
18
  :name
19
+ :help
18
20
  class="grow flex-1"
19
21
  >
20
22
  <template #default="{ error }">
@@ -28,7 +30,7 @@ const model = defineModel<string>({ required: true })
28
30
  :disabled
29
31
  />
30
32
  <div
31
- v-if="!$slots.help && !error"
33
+ v-if="!help && !error"
32
34
  class="h-4 mt-1"
33
35
  />
34
36
  </template>
@@ -6,6 +6,7 @@ defineProps<{
6
6
  required?: boolean
7
7
  autofocus?: boolean
8
8
  disabled?: boolean
9
+ help?: string
9
10
  }>()
10
11
 
11
12
  const model = defineModel<string>({ required: true })
@@ -14,6 +15,7 @@ const model = defineModel<string>({ required: true })
14
15
  <template>
15
16
  <UFormField
16
17
  :name
18
+ :help
17
19
  class="grow flex-1"
18
20
  >
19
21
  <template #default="{ error }">
@@ -27,7 +29,7 @@ const model = defineModel<string>({ required: true })
27
29
  :disabled
28
30
  />
29
31
  <div
30
- v-if="!$slots.help && !error"
32
+ v-if="!help && !error"
31
33
  class="h-4 mt-1"
32
34
  />
33
35
  </template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-forms",
3
3
  "type": "module",
4
- "version": "0.1.12",
4
+ "version": "0.1.13",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "zod": "^4.0.17",
21
- "@sbc-connect/nuxt-base": "0.1.11"
21
+ "@sbc-connect/nuxt-base": "0.1.12"
22
22
  },
23
23
  "scripts": {
24
24
  "preinstall": "npx only-allow pnpm",