@sbc-connect/nuxt-forms 0.7.0 → 0.7.2

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,23 @@
1
1
  # @sbc-connect/nuxt-forms
2
2
 
3
+ ## 0.7.2
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)! - Apply new padding and error classes to form wrapper elements, add optional prop to apply aria-hidden to formfieldwrapper details content.
8
+
9
+ - Updated dependencies [[`e4ad236`](https://github.com/bcgov/connect-nuxt/commit/e4ad2360c255173e20b7f6d384de2a9313ce747d)]:
10
+ - @sbc-connect/nuxt-base@0.7.3
11
+
12
+ ## 0.7.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#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
17
+
18
+ - Updated dependencies [[`467e679`](https://github.com/bcgov/connect-nuxt/commit/467e679f8bf4b2f3b9ec2294fd28a2a6c5ef3dba)]:
19
+ - @sbc-connect/nuxt-base@0.7.2
20
+
3
21
  ## 0.7.0
4
22
 
5
23
  ### Minor Changes
@@ -21,19 +21,19 @@ const legendId = id + '-legend'
21
21
  const descriptionId = id + '-description'
22
22
 
23
23
  const bodyClassMap = computed<Record<FieldsetBodyVariant, string>>(() => {
24
- const cardError = error ? 'border-error border-l-3' : 'border-transparent border-l-3'
24
+ const cardError = error ? 'shadow-section-error' : ''
25
25
  return {
26
26
  none: '',
27
- card: 'bg-white rounded shadow-xs ' + cardError
27
+ card: 'bg-white rounded shadow-xs overflow-hidden ' + cardError
28
28
  }
29
29
  })
30
30
 
31
31
  const bodyClass = computed(() => bodyClassMap.value[bodyVariant])
32
32
 
33
33
  const padding = paddingClass === 'x-default'
34
- ? 'px-4 sm:px-8'
34
+ ? 'padding-x-default'
35
35
  : paddingClass === 'xy-default'
36
- ? 'py-6 px-4 sm:py-10 sm:px-8'
36
+ ? 'padding-xy-default'
37
37
  : paddingClass
38
38
  </script>
39
39
 
@@ -44,7 +44,7 @@ const padding = paddingClass === 'x-default'
44
44
  'flex gap-4 sm:gap-6',
45
45
  bodyVariant === 'none' ? padding : '',
46
46
  orientation === 'horizontal' ? 'flex-col sm:flex-row' : 'flex-col',
47
- (error && bodyVariant === 'none') ? 'border-error border-l-3' : 'border-transparent border-l-3',
47
+ (error && bodyVariant === 'none') ? 'shadow-section-error' : '',
48
48
  ]"
49
49
  >
50
50
  <div
@@ -3,19 +3,21 @@ import type { FormError } from '@nuxt/ui'
3
3
 
4
4
  const {
5
5
  orientation = 'horizontal',
6
- paddingClass = 'x-default'
6
+ paddingClass = 'x-default',
7
+ detailsAriaHidden = false
7
8
  } = defineProps<{
8
9
  label: string
9
10
  error?: FormError | boolean
11
+ detailsAriaHidden?: boolean
10
12
  showErrorMsg?: boolean
11
13
  orientation?: 'vertical' | 'horizontal'
12
14
  paddingClass?: 'x-default' | 'xy-default' | string
13
15
  }>()
14
16
 
15
17
  const padding = paddingClass === 'x-default'
16
- ? 'px-4 sm:px-8'
18
+ ? 'padding-x-default'
17
19
  : paddingClass === 'xy-default'
18
- ? 'py-6 px-4 sm:py-10 sm:px-8'
20
+ ? 'padding-xy-default'
19
21
  : paddingClass
20
22
  </script>
21
23
 
@@ -25,11 +27,11 @@ const padding = paddingClass === 'x-default'
25
27
  'flex gap-4 sm:gap-6',
26
28
  padding,
27
29
  orientation === 'horizontal' ? 'flex-col sm:flex-row' : 'flex-col',
28
- error ? 'border-error border-l-3' : 'border-transparent border-l-3',
30
+ error ? 'shadow-section-error' : '',
29
31
  ]"
30
32
  >
31
33
  <span
32
- aria-hidden="true"
34
+ :aria-hidden="detailsAriaHidden"
33
35
  class="text-base text-neutral-highlighted font-bold"
34
36
  :class="{ 'w-full sm:basis-1/4': orientation === 'horizontal' }"
35
37
  >
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import type { TextareaProps } from '@nuxt/ui'
3
+
2
4
  defineProps<{
3
5
  name: string
4
6
  label: string
@@ -9,7 +11,7 @@ defineProps<{
9
11
  help?: string
10
12
  }>()
11
13
 
12
- const model = defineModel<null | string | number | undefined>({ required: true })
14
+ const model = defineModel<Exclude<TextareaProps['modelValue'], null>>({ required: true })
13
15
  </script>
14
16
 
15
17
  <template>
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-forms",
3
3
  "type": "module",
4
- "version": "0.7.0",
4
+ "version": "0.7.2",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",
8
8
  "devDependencies": {
9
- "@axe-core/playwright": "4.11.0",
10
- "dotenv": "17.2.3",
9
+ "@axe-core/playwright": "4.11.1",
10
+ "dotenv": "17.3.1",
11
11
  "nuxt": "4.2.2",
12
12
  "typescript": "5.9.3",
13
- "vue-tsc": "3.2.1",
13
+ "vue-tsc": "3.2.5",
14
14
  "@sbc-connect/eslint-config": "0.0.8",
15
15
  "@sbc-connect/playwright-config": "0.1.1",
16
- "@sbc-connect/vitest-config": "0.1.0"
16
+ "@sbc-connect/vitest-config": "0.1.1"
17
17
  },
18
18
  "dependencies": {
19
19
  "country-codes-list": "2.0.0",
20
20
  "vue-country-flag-next": "2.3.2",
21
- "@sbc-connect/nuxt-base": "0.7.1"
21
+ "@sbc-connect/nuxt-base": "0.7.3"
22
22
  },
23
23
  "scripts": {
24
24
  "preinstall": "npx only-allow pnpm",