@sbc-connect/nuxt-forms 0.0.0-test-ld-20260520212549
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/.env.example +14 -0
- package/CHANGELOG.md +394 -0
- package/LICENSE +28 -0
- package/README.md +57 -0
- package/app/components/Connect/Fieldset.vue +87 -0
- package/app/components/Connect/Form/Address/City.vue +20 -0
- package/app/components/Connect/Form/Address/Country.vue +51 -0
- package/app/components/Connect/Form/Address/DeliveryInstructions.vue +20 -0
- package/app/components/Connect/Form/Address/PostalCode.vue +48 -0
- package/app/components/Connect/Form/Address/Region.vue +62 -0
- package/app/components/Connect/Form/Address/Street.vue +64 -0
- package/app/components/Connect/Form/Address/StreetAdditional.vue +18 -0
- package/app/components/Connect/Form/Address/index.vue +116 -0
- package/app/components/Connect/Form/FieldWrapper.vue +52 -0
- package/app/components/Connect/Form/Input.vue +38 -0
- package/app/components/Connect/Form/Phone/CountryCode.vue +128 -0
- package/app/components/Connect/Form/Phone/CountryFlag.vue +14 -0
- package/app/components/Connect/Form/Phone/index.vue +2 -0
- package/app/components/Connect/Form/Textarea.vue +39 -0
- package/app/components/Connect/Layout/Form.vue +21 -0
- package/app/components/HelloWorld/Forms.vue +12 -0
- package/app/composables/useCanadaPost.ts +74 -0
- package/app/coverage/base.css +224 -0
- package/app/coverage/block-navigation.js +87 -0
- package/app/coverage/clover.xml +2803 -0
- package/app/coverage/components/Connect/Fieldset.vue.html +310 -0
- package/app/coverage/components/Connect/Form/Address/City.vue.html +145 -0
- package/app/coverage/components/Connect/Form/Address/Country.vue.html +238 -0
- package/app/coverage/components/Connect/Form/Address/DeliveryInstructions.vue.html +145 -0
- package/app/coverage/components/Connect/Form/Address/PostalCode.vue.html +199 -0
- package/app/coverage/components/Connect/Form/Address/Region.vue.html +271 -0
- package/app/coverage/components/Connect/Form/Address/Street.vue.html +277 -0
- package/app/coverage/components/Connect/Form/Address/StreetAdditional.vue.html +139 -0
- package/app/coverage/components/Connect/Form/Address/index.html +221 -0
- package/app/coverage/components/Connect/Form/Address/index.vue.html +433 -0
- package/app/coverage/components/Connect/Form/FieldWrapper.vue.html +211 -0
- package/app/coverage/components/Connect/Form/Input.vue.html +199 -0
- package/app/coverage/components/Connect/Form/Phone/CountryCode.vue.html +457 -0
- package/app/coverage/components/Connect/Form/Phone/CountryFlag.vue.html +127 -0
- package/app/coverage/components/Connect/Form/Phone/index.html +146 -0
- package/app/coverage/components/Connect/Form/Phone/index.vue.html +91 -0
- package/app/coverage/components/Connect/Form/Textarea.vue.html +196 -0
- package/app/coverage/components/Connect/Form/index.html +146 -0
- package/app/coverage/components/Connect/Layout/Form.vue.html +148 -0
- package/app/coverage/components/Connect/Layout/index.html +116 -0
- package/app/coverage/components/Connect/index.html +116 -0
- package/app/coverage/components/HelloWorld/Forms.vue.html +121 -0
- package/app/coverage/components/HelloWorld/index.html +116 -0
- package/app/coverage/composables/index.html +116 -0
- package/app/coverage/composables/useCanadaPost.ts.html +307 -0
- package/app/coverage/coverage-final.json +29 -0
- package/app/coverage/enums/canada-post-address-datalevel.ts.html +106 -0
- package/app/coverage/enums/index.html +116 -0
- package/app/coverage/favicon.png +0 -0
- package/app/coverage/index.html +296 -0
- package/app/coverage/interfaces/canada-post.ts.html +199 -0
- package/app/coverage/interfaces/index.html +131 -0
- package/app/coverage/interfaces/phone-country.ts.html +127 -0
- package/app/coverage/layouts/ConnectForm.vue.html +100 -0
- package/app/coverage/layouts/index.html +116 -0
- package/app/coverage/prettify.css +1 -0
- package/app/coverage/prettify.js +2 -0
- package/app/coverage/sort-arrow-sprite.png +0 -0
- package/app/coverage/sorter.js +210 -0
- package/app/coverage/types/connect-fieldset.ts.html +88 -0
- package/app/coverage/types/index.html +116 -0
- package/app/coverage/utils/formHelpers.ts.html +124 -0
- package/app/coverage/utils/index.html +146 -0
- package/app/coverage/utils/index.ts.html +88 -0
- package/app/coverage/utils/isoCountriesList.ts.html +6193 -0
- package/app/coverage/utils/zod-schemas/addresses.ts.html +559 -0
- package/app/coverage/utils/zod-schemas/index.html +131 -0
- package/app/coverage/utils/zod-schemas/index.ts.html +88 -0
- package/app/enums/canada-post-address-datalevel.ts +7 -0
- package/app/interfaces/canada-post.ts +38 -0
- package/app/interfaces/phone-country.ts +14 -0
- package/app/layouts/ConnectForm.vue +5 -0
- package/app/types/connect-fieldset.ts +1 -0
- package/app/types/forms-page-meta.d.ts +5 -0
- package/app/utils/formHelpers.ts +13 -0
- package/app/utils/index.ts +1 -0
- package/app/utils/isoCountriesList.ts +2048 -0
- package/app/utils/zod-schemas/addresses.ts +159 -0
- package/app/utils/zod-schemas/index.ts +1 -0
- package/i18n/locales/en-CA.ts +49 -0
- package/i18n/locales/fr-CA.ts +3 -0
- package/nuxt.config.ts +58 -0
- package/package.json +40 -0
- package/playwright-report/index.html +85 -0
- package/public/css/addresscomplete-2.50.min.css +11 -0
- package/public/js/addresscomplete-2.50.min.js +260 -0
- package/test-results/.last-run.json +4 -0
package/.env.example
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Web Urls
|
|
2
|
+
NUXT_PUBLIC_BASE_URL="http://localhost:3000/"
|
|
3
|
+
NUXT_PUBLIC_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/"
|
|
4
|
+
|
|
5
|
+
# API Urls
|
|
6
|
+
# Status API
|
|
7
|
+
NUXT_PUBLIC_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca"
|
|
8
|
+
NUXT_PUBLIC_STATUS_API_VERSION="/api/v1"
|
|
9
|
+
|
|
10
|
+
# LaunchDarkly
|
|
11
|
+
NUXT_PUBLIC_LD_CLIENT_ID=""
|
|
12
|
+
|
|
13
|
+
# Canada Post
|
|
14
|
+
NUXT_PUBLIC_ADDRESS_COMPLETE_KEY=""
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
# @sbc-connect/nuxt-forms
|
|
2
|
+
|
|
3
|
+
## 0.0.0-test-ld-20260520212549
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#157](https://github.com/bcgov/connect-nuxt/pull/157) [`a68fff2`](https://github.com/bcgov/connect-nuxt/commit/a68fff28bf29913c7643b570982568894b7d0704) Thanks [@kialj876](https://github.com/kialj876)! - 33417 update street address additional max len
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`fe5065e`](https://github.com/bcgov/connect-nuxt/commit/fe5065e12d776349e7093e52ecee51ce22a2c271)]:
|
|
10
|
+
- @sbc-connect/nuxt-base@0.0.0-test-ld-20260520212549
|
|
11
|
+
|
|
12
|
+
## 0.7.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#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.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`e4ad236`](https://github.com/bcgov/connect-nuxt/commit/e4ad2360c255173e20b7f6d384de2a9313ce747d)]:
|
|
19
|
+
- @sbc-connect/nuxt-base@0.7.3
|
|
20
|
+
|
|
21
|
+
## 0.7.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#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
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [[`467e679`](https://github.com/bcgov/connect-nuxt/commit/467e679f8bf4b2f3b9ec2294fd28a2a6c5ef3dba)]:
|
|
28
|
+
- @sbc-connect/nuxt-base@0.7.2
|
|
29
|
+
|
|
30
|
+
## 0.7.0
|
|
31
|
+
|
|
32
|
+
### Minor Changes
|
|
33
|
+
|
|
34
|
+
- [#144](https://github.com/bcgov/connect-nuxt/pull/144) [`3b9fddb`](https://github.com/bcgov/connect-nuxt/commit/3b9fddb1c634fa48c8f4426954cbb2a043f78ff1) Thanks [@eve-git](https://github.com/eve-git)! - Fix issue where postal code was not optional for certain countries.
|
|
35
|
+
|
|
36
|
+
## 0.6.2
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- [#141](https://github.com/bcgov/connect-nuxt/pull/141) [`83c5627`](https://github.com/bcgov/connect-nuxt/commit/83c5627689a50d6fa27f12f2ab7b2ef65e752d0e) Thanks [@deetz99](https://github.com/deetz99)! - ConnectFieldset, ConnectFormFieldWrapper: Move error text to always be under label instead of wrapping. ConnectFieldset: add error border styling to card bodyVariant
|
|
41
|
+
|
|
42
|
+
## 0.6.1
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [[`e6dc55d`](https://github.com/bcgov/connect-nuxt/commit/e6dc55d18b84754e2416112ebbf42b780b8bb3ac)]:
|
|
47
|
+
- @sbc-connect/nuxt-base@0.7.1
|
|
48
|
+
|
|
49
|
+
## 0.6.0
|
|
50
|
+
|
|
51
|
+
### Minor Changes
|
|
52
|
+
|
|
53
|
+
- [#137](https://github.com/bcgov/connect-nuxt/pull/137) [`9c10812`](https://github.com/bcgov/connect-nuxt/commit/9c10812d8ecde646eb185310376cabd3319a414d) Thanks [@deetz99](https://github.com/deetz99)! - ConnectFieldset and ConnectFormFieldWrapper: update padding to be configurable
|
|
54
|
+
|
|
55
|
+
- [#136](https://github.com/bcgov/connect-nuxt/pull/136) [`7e3a970`](https://github.com/bcgov/connect-nuxt/commit/7e3a9701ddd5304851c8d55c9fc940b2da656cbf) Thanks [@cameron-eyds](https://github.com/cameron-eyds)! - Misc typing and e2e test fixes
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- Updated dependencies [[`7e3a970`](https://github.com/bcgov/connect-nuxt/commit/7e3a9701ddd5304851c8d55c9fc940b2da656cbf)]:
|
|
60
|
+
- @sbc-connect/nuxt-base@0.7.0
|
|
61
|
+
|
|
62
|
+
## 0.5.0
|
|
63
|
+
|
|
64
|
+
### Minor Changes
|
|
65
|
+
|
|
66
|
+
- [#129](https://github.com/bcgov/connect-nuxt/pull/129) [`93c5650`](https://github.com/bcgov/connect-nuxt/commit/93c5650be9a6b48e51d876d522f168d885d006c4) Thanks [@deetz99](https://github.com/deetz99)! - ConnectFieldset and ConnectFormFieldWrapper: Update error styling to be border only, remove title error styling, add padding to body, make orientation horizontal by default.
|
|
67
|
+
|
|
68
|
+
## 0.4.1
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- Updated dependencies [[`8cc8cc0`](https://github.com/bcgov/connect-nuxt/commit/8cc8cc09aad741dc841a864998129c6ac5a6af2f)]:
|
|
73
|
+
- @sbc-connect/nuxt-base@0.6.1
|
|
74
|
+
|
|
75
|
+
## 0.4.0
|
|
76
|
+
|
|
77
|
+
### Minor Changes
|
|
78
|
+
|
|
79
|
+
- [#118](https://github.com/bcgov/connect-nuxt/pull/118) [`41e58f4`](https://github.com/bcgov/connect-nuxt/commit/41e58f44e6d216e7de568bccb2e240b2d89b8408) Thanks [@deetz99](https://github.com/deetz99)! - Remove now unnecessary css module workaround.
|
|
80
|
+
|
|
81
|
+
- [#117](https://github.com/bcgov/connect-nuxt/pull/117) [`e3da105`](https://github.com/bcgov/connect-nuxt/commit/e3da1056247f5c502578dc70f95375e66e3cc1da) Thanks [@deetz99](https://github.com/deetz99)! - Update all dependencies
|
|
82
|
+
|
|
83
|
+
- [#114](https://github.com/bcgov/connect-nuxt/pull/114) [`fe3eef1`](https://github.com/bcgov/connect-nuxt/commit/fe3eef1b39cc5883cc5e8560efe0dd89d04d0455) Thanks [@cameron-eyds](https://github.com/cameron-eyds)! - Minor styling update, lower level of error styling on FieldSet wrapper
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- Updated dependencies [[`41e58f4`](https://github.com/bcgov/connect-nuxt/commit/41e58f44e6d216e7de568bccb2e240b2d89b8408), [`e3da105`](https://github.com/bcgov/connect-nuxt/commit/e3da1056247f5c502578dc70f95375e66e3cc1da)]:
|
|
88
|
+
- @sbc-connect/nuxt-base@0.6.0
|
|
89
|
+
|
|
90
|
+
## 0.3.0
|
|
91
|
+
|
|
92
|
+
### Minor Changes
|
|
93
|
+
|
|
94
|
+
- [#108](https://github.com/bcgov/connect-nuxt/pull/108) [`8571754`](https://github.com/bcgov/connect-nuxt/commit/8571754160242c3233838fc039fd1a01ff9d7a82) Thanks [@cameron-eyds](https://github.com/cameron-eyds)! - Implements account creation in Auth and Country Code/Country Flag components in Forms
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- [#115](https://github.com/bcgov/connect-nuxt/pull/115) [`dd17349`](https://github.com/bcgov/connect-nuxt/commit/dd173497255f35415b468e17f7192722f604d3c8) Thanks [@deetz99](https://github.com/deetz99)! - Relax postal code mask, different validation message for incorrect format vs invalid postal code
|
|
99
|
+
|
|
100
|
+
- Updated dependencies [[`d9d6356`](https://github.com/bcgov/connect-nuxt/commit/d9d63560e27117c43b9e8e54d363c3fdbb620049)]:
|
|
101
|
+
- @sbc-connect/nuxt-base@0.5.0
|
|
102
|
+
|
|
103
|
+
## 0.2.1
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- Updated dependencies [[`f5d34df`](https://github.com/bcgov/connect-nuxt/commit/f5d34df0bbb2b37cbeda8a9dd39c6bce098c564f)]:
|
|
108
|
+
- @sbc-connect/nuxt-base@0.4.0
|
|
109
|
+
|
|
110
|
+
## 0.2.0
|
|
111
|
+
|
|
112
|
+
### Minor Changes
|
|
113
|
+
|
|
114
|
+
- [#105](https://github.com/bcgov/connect-nuxt/pull/105) [`78195c7`](https://github.com/bcgov/connect-nuxt/commit/78195c765aa337be53fbb4ecf60e45bea44b36ff) Thanks [@deetz99](https://github.com/deetz99)! - Add strict Postal and Zip code validation for CA or US addresses.
|
|
115
|
+
|
|
116
|
+
### Patch Changes
|
|
117
|
+
|
|
118
|
+
- Updated dependencies [[`d714785`](https://github.com/bcgov/connect-nuxt/commit/d71478573f1fe11be34d5d588d68fb75eb5fd159), [`5f1b383`](https://github.com/bcgov/connect-nuxt/commit/5f1b3839ed993654a7f20fe161047ba38ab86274)]:
|
|
119
|
+
- @sbc-connect/nuxt-base@0.3.0
|
|
120
|
+
|
|
121
|
+
## 0.1.33
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- Updated dependencies [[`09323e1`](https://github.com/bcgov/connect-nuxt/commit/09323e1fcaff9a2738528c8161288c1d4bcd0677), [`033f6c6`](https://github.com/bcgov/connect-nuxt/commit/033f6c624fbf953f1d7cf491c876cc9b58619b22)]:
|
|
126
|
+
- @sbc-connect/nuxt-base@0.2.0
|
|
127
|
+
|
|
128
|
+
## 0.1.32
|
|
129
|
+
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- Updated dependencies [[`a0724ac`](https://github.com/bcgov/connect-nuxt/commit/a0724ac5fdf44296e822942b0eea6be3bb313fcb)]:
|
|
133
|
+
- @sbc-connect/nuxt-base@0.1.29
|
|
134
|
+
|
|
135
|
+
## 0.1.31
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- [#92](https://github.com/bcgov/connect-nuxt/pull/92) [`c80a32a`](https://github.com/bcgov/connect-nuxt/commit/c80a32a8781894ee29ade5dc8c47f9e26d52b8b4) Thanks [@deetz99](https://github.com/deetz99)! - feat: ConnectFieldset - Add description and body variant props. Add label and description slots.
|
|
140
|
+
|
|
141
|
+
## 0.1.30
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- [#90](https://github.com/bcgov/connect-nuxt/pull/90) [`b66923e`](https://github.com/bcgov/connect-nuxt/commit/b66923e94a2c8a7aa936b7e371e727be73d90ea7) Thanks [@kialj876](https://github.com/kialj876)! - Base tombstone - bug fix
|
|
146
|
+
|
|
147
|
+
- Updated dependencies [[`b66923e`](https://github.com/bcgov/connect-nuxt/commit/b66923e94a2c8a7aa936b7e371e727be73d90ea7)]:
|
|
148
|
+
- @sbc-connect/nuxt-base@0.1.28
|
|
149
|
+
|
|
150
|
+
## 0.1.29
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- [#88](https://github.com/bcgov/connect-nuxt/pull/88) [`11ccded`](https://github.com/bcgov/connect-nuxt/commit/11ccdedb47c73d36a335ddd96e529fe74ca17480) Thanks [@kialj876](https://github.com/kialj876)! - Base layer - Update tombstone component stateKey prop to optional
|
|
155
|
+
|
|
156
|
+
- Updated dependencies [[`11ccded`](https://github.com/bcgov/connect-nuxt/commit/11ccdedb47c73d36a335ddd96e529fe74ca17480)]:
|
|
157
|
+
- @sbc-connect/nuxt-base@0.1.27
|
|
158
|
+
|
|
159
|
+
## 0.1.28
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- [#86](https://github.com/bcgov/connect-nuxt/pull/86) [`c1fb4f2`](https://github.com/bcgov/connect-nuxt/commit/c1fb4f2a217b3d57e7ea7aed8b9773e215a21978) Thanks [@deetz99](https://github.com/deetz99)! - Update forms to emit @should-validate event instead of requiring form ref as prop to revalidate inputs on address complete.
|
|
164
|
+
|
|
165
|
+
- Updated dependencies [[`c1fb4f2`](https://github.com/bcgov/connect-nuxt/commit/c1fb4f2a217b3d57e7ea7aed8b9773e215a21978)]:
|
|
166
|
+
- @sbc-connect/nuxt-base@0.1.26
|
|
167
|
+
|
|
168
|
+
## 0.1.27
|
|
169
|
+
|
|
170
|
+
### Patch Changes
|
|
171
|
+
|
|
172
|
+
- [#85](https://github.com/bcgov/connect-nuxt/pull/85) [`6b0f70a`](https://github.com/bcgov/connect-nuxt/commit/6b0f70ab895a26c0b049dce84b130d6a04fd911e) Thanks [@kialj876](https://github.com/kialj876)! - Common layout updates, default state key for tombstone, fee store - waive fees, add prioirty, expose cached fees
|
|
173
|
+
|
|
174
|
+
- [#84](https://github.com/bcgov/connect-nuxt/pull/84) [`f37700a`](https://github.com/bcgov/connect-nuxt/commit/f37700ab568335df724a5e9472a5e0b4198704b5) Thanks [@deetz99](https://github.com/deetz99)! - Cleanup model types and floating labels.
|
|
175
|
+
|
|
176
|
+
- Updated dependencies [[`f37700a`](https://github.com/bcgov/connect-nuxt/commit/f37700ab568335df724a5e9472a5e0b4198704b5), [`6b0f70a`](https://github.com/bcgov/connect-nuxt/commit/6b0f70ab895a26c0b049dce84b130d6a04fd911e), [`ba04c84`](https://github.com/bcgov/connect-nuxt/commit/ba04c8424353b32af0811534d9c3edd31e15d39e)]:
|
|
177
|
+
- @sbc-connect/nuxt-base@0.1.25
|
|
178
|
+
|
|
179
|
+
## 0.1.26
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- [#80](https://github.com/bcgov/connect-nuxt/pull/80) [`0615542`](https://github.com/bcgov/connect-nuxt/commit/06155422d0a8d61ee862bb3483330610b4a9434d) Thanks [@deetz99](https://github.com/deetz99)! - feat: Move button control to base and handle loading state internally
|
|
184
|
+
|
|
185
|
+
- Updated dependencies [[`0615542`](https://github.com/bcgov/connect-nuxt/commit/06155422d0a8d61ee862bb3483330610b4a9434d)]:
|
|
186
|
+
- @sbc-connect/nuxt-base@0.1.24
|
|
187
|
+
|
|
188
|
+
## 0.1.25
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- [#77](https://github.com/bcgov/connect-nuxt/pull/77) [`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5) Thanks [@deetz99](https://github.com/deetz99)! - fix: update SbcCountrySubdivision type name to ConnectCountrySubdivision
|
|
193
|
+
|
|
194
|
+
- [#77](https://github.com/bcgov/connect-nuxt/pull/77) [`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5) Thanks [@deetz99](https://github.com/deetz99)! - Update dependencies
|
|
195
|
+
|
|
196
|
+
- Updated dependencies [[`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5), [`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5), [`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5)]:
|
|
197
|
+
- @sbc-connect/nuxt-base@0.1.23
|
|
198
|
+
|
|
199
|
+
## 0.1.24
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- Updated dependencies [[`3dec6d9`](https://github.com/bcgov/connect-nuxt/commit/3dec6d92101915d2253cb177c38acf2a2e534fc1)]:
|
|
204
|
+
- @sbc-connect/nuxt-base@0.1.22
|
|
205
|
+
|
|
206
|
+
## 0.1.23
|
|
207
|
+
|
|
208
|
+
### Patch Changes
|
|
209
|
+
|
|
210
|
+
- Updated dependencies [[`6c568da`](https://github.com/bcgov/connect-nuxt/commit/6c568da341a6d9c56cacf2c5ad56301837f9f525)]:
|
|
211
|
+
- @sbc-connect/nuxt-base@0.1.21
|
|
212
|
+
|
|
213
|
+
## 0.1.22
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- [#69](https://github.com/bcgov/connect-nuxt/pull/69) [`0249697`](https://github.com/bcgov/connect-nuxt/commit/0249697fec6fa0de96b53665a2e6a09254e5af24) Thanks [@deetz99](https://github.com/deetz99)! - Fix incorrect postal code input mask.
|
|
218
|
+
|
|
219
|
+
## 0.1.21
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- Updated dependencies [[`88cd406`](https://github.com/bcgov/connect-nuxt/commit/88cd406e185ec8b91b35ec04efc80e2518412462)]:
|
|
224
|
+
- @sbc-connect/nuxt-base@0.1.20
|
|
225
|
+
|
|
226
|
+
## 0.1.20
|
|
227
|
+
|
|
228
|
+
### Patch Changes
|
|
229
|
+
|
|
230
|
+
- Updated dependencies [[`f1145be`](https://github.com/bcgov/connect-nuxt/commit/f1145be1b8b175d9f2e37ae13305d112c6d31cc9)]:
|
|
231
|
+
- @sbc-connect/nuxt-base@0.1.19
|
|
232
|
+
|
|
233
|
+
## 0.1.19
|
|
234
|
+
|
|
235
|
+
### Patch Changes
|
|
236
|
+
|
|
237
|
+
- Updated dependencies [[`291b7dd`](https://github.com/bcgov/connect-nuxt/commit/291b7dd9147dfe465efaabca645ff5cef23d2a66), [`6ff25af`](https://github.com/bcgov/connect-nuxt/commit/6ff25af994b1099582f632825e1c280a518ff59a)]:
|
|
238
|
+
- @sbc-connect/nuxt-base@0.1.18
|
|
239
|
+
|
|
240
|
+
## 0.1.18
|
|
241
|
+
|
|
242
|
+
### Patch Changes
|
|
243
|
+
|
|
244
|
+
- Updated dependencies [[`b77b067`](https://github.com/bcgov/connect-nuxt/commit/b77b067c07962f79396064f14da87dd25a89a4d1)]:
|
|
245
|
+
- @sbc-connect/nuxt-base@0.1.17
|
|
246
|
+
|
|
247
|
+
## 0.1.17
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- Updated dependencies [[`a98c264`](https://github.com/bcgov/connect-nuxt/commit/a98c2647e041061223d504c8e974670148c08c0b)]:
|
|
252
|
+
- @sbc-connect/nuxt-base@0.1.16
|
|
253
|
+
|
|
254
|
+
## 0.1.16
|
|
255
|
+
|
|
256
|
+
### Patch Changes
|
|
257
|
+
|
|
258
|
+
- Updated dependencies [[`cab53dc`](https://github.com/bcgov/connect-nuxt/commit/cab53dc83ab8c8032bdb424a9e135febdfebf645)]:
|
|
259
|
+
- @sbc-connect/nuxt-base@0.1.15
|
|
260
|
+
|
|
261
|
+
## 0.1.15
|
|
262
|
+
|
|
263
|
+
### Patch Changes
|
|
264
|
+
|
|
265
|
+
- Updated dependencies [[`5d66b92`](https://github.com/bcgov/connect-nuxt/commit/5d66b927121d6144ee7eedb8ed86b64c76e26c7e)]:
|
|
266
|
+
- @sbc-connect/nuxt-base@0.1.14
|
|
267
|
+
|
|
268
|
+
## 0.1.14
|
|
269
|
+
|
|
270
|
+
### Patch Changes
|
|
271
|
+
|
|
272
|
+
- Updated dependencies [[`602360a`](https://github.com/bcgov/connect-nuxt/commit/602360a628742ffe8957209bbe38eff1663a0851)]:
|
|
273
|
+
- @sbc-connect/nuxt-base@0.1.13
|
|
274
|
+
|
|
275
|
+
## 0.1.13
|
|
276
|
+
|
|
277
|
+
### Patch Changes
|
|
278
|
+
|
|
279
|
+
- [#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
|
|
280
|
+
|
|
281
|
+
- update footer link divider colour
|
|
282
|
+
- update formfield help/error placeholder spacer
|
|
283
|
+
- fix fieldset orientation
|
|
284
|
+
|
|
285
|
+
issue: bcgov/entity#30434
|
|
286
|
+
|
|
287
|
+
- Updated dependencies [[`19e3a00`](https://github.com/bcgov/connect-nuxt/commit/19e3a00a8350f8f02f674d10e1d572c909ad90c5)]:
|
|
288
|
+
- @sbc-connect/nuxt-base@0.1.12
|
|
289
|
+
|
|
290
|
+
## 0.1.12
|
|
291
|
+
|
|
292
|
+
### Patch Changes
|
|
293
|
+
|
|
294
|
+
- [#47](https://github.com/bcgov/connect-nuxt/pull/47) [`9edf5ab`](https://github.com/bcgov/connect-nuxt/commit/9edf5ab6c4c7598f661e8ea713e6a60b390105c1) Thanks [@deetz99](https://github.com/deetz99)! - Add zod and address validations. issue: bcgov/entity#29338
|
|
295
|
+
|
|
296
|
+
- Updated dependencies [[`9edf5ab`](https://github.com/bcgov/connect-nuxt/commit/9edf5ab6c4c7598f661e8ea713e6a60b390105c1)]:
|
|
297
|
+
- @sbc-connect/nuxt-base@0.1.11
|
|
298
|
+
|
|
299
|
+
## 0.1.11
|
|
300
|
+
|
|
301
|
+
### Patch Changes
|
|
302
|
+
|
|
303
|
+
- [#45](https://github.com/bcgov/connect-nuxt/pull/45) [`8eb83d3`](https://github.com/bcgov/connect-nuxt/commit/8eb83d3e4d0af392f3e7ca8661020e6ae3f4cc7d) Thanks [@deetz99](https://github.com/deetz99)! - Add a11y check, fix base a11y, add tests for forms - bcgov/entity#29335
|
|
304
|
+
|
|
305
|
+
- Updated dependencies [[`8eb83d3`](https://github.com/bcgov/connect-nuxt/commit/8eb83d3e4d0af392f3e7ca8661020e6ae3f4cc7d)]:
|
|
306
|
+
- @sbc-connect/nuxt-base@0.1.10
|
|
307
|
+
|
|
308
|
+
## 0.1.10
|
|
309
|
+
|
|
310
|
+
### Patch Changes
|
|
311
|
+
|
|
312
|
+
- [#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
|
|
313
|
+
|
|
314
|
+
- Forms layer address components
|
|
315
|
+
- Lint rules and fixes to prevent rule collision and promote best practices
|
|
316
|
+
|
|
317
|
+
issue: bcgov/entity#29338
|
|
318
|
+
|
|
319
|
+
- Updated dependencies [[`3b521b7`](https://github.com/bcgov/connect-nuxt/commit/3b521b70bf1a0cc5a0feea63a825ef5544347aa8)]:
|
|
320
|
+
- @sbc-connect/nuxt-base@0.1.9
|
|
321
|
+
|
|
322
|
+
## 0.1.9
|
|
323
|
+
|
|
324
|
+
### Patch Changes
|
|
325
|
+
|
|
326
|
+
- [#37](https://github.com/bcgov/connect-nuxt/pull/37) [`216dff5`](https://github.com/bcgov/connect-nuxt/commit/216dff5eea1cf8459fc516dc8a1985f922e84533) Thanks [@kialj876](https://github.com/kialj876)! - Button Control Component and Form Layout bcgov/entity/29338
|
|
327
|
+
|
|
328
|
+
## 0.1.8
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- [#32](https://github.com/bcgov/connect-nuxt/pull/32) [`66d83d1`](https://github.com/bcgov/connect-nuxt/commit/66d83d14b2ec7950057dd39a4d876a8c4096923f) Thanks [@kialj876](https://github.com/kialj876)! - Pay layer cleanup bcgov/entity#29337
|
|
333
|
+
|
|
334
|
+
- Updated dependencies [[`66d83d1`](https://github.com/bcgov/connect-nuxt/commit/66d83d14b2ec7950057dd39a4d876a8c4096923f)]:
|
|
335
|
+
- @sbc-connect/nuxt-base@0.1.8
|
|
336
|
+
|
|
337
|
+
## 0.1.7
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- [#28](https://github.com/bcgov/connect-nuxt/pull/28) [`68af125`](https://github.com/bcgov/connect-nuxt/commit/68af1259b87846f42010026977411481e53ca8fb) Thanks [@kialj876](https://github.com/kialj876)! - Filling out the pay layer. Ticket bcgov/entity#29337
|
|
342
|
+
|
|
343
|
+
- Updated dependencies [[`68af125`](https://github.com/bcgov/connect-nuxt/commit/68af1259b87846f42010026977411481e53ca8fb)]:
|
|
344
|
+
- @sbc-connect/nuxt-base@0.1.7
|
|
345
|
+
|
|
346
|
+
## 0.1.6
|
|
347
|
+
|
|
348
|
+
### Patch Changes
|
|
349
|
+
|
|
350
|
+
- Updated dependencies [[`65ae301`](https://github.com/bcgov/connect-nuxt/commit/65ae301972b39cfed8550e49c1209133674528a4), [`09fa4f1`](https://github.com/bcgov/connect-nuxt/commit/09fa4f1b4b2c65d189a6477c9c5f2d44607b543d), [`aba11d1`](https://github.com/bcgov/connect-nuxt/commit/aba11d1303ab1b19b3a51c27959766c4ee0cd5d8)]:
|
|
351
|
+
- @sbc-connect/nuxt-base@0.1.6
|
|
352
|
+
|
|
353
|
+
## 0.1.5
|
|
354
|
+
|
|
355
|
+
### Patch Changes
|
|
356
|
+
|
|
357
|
+
- Updated dependencies [[`4231254`](https://github.com/bcgov/connect-nuxt/commit/42312540f5eec65f5d3979d5492bdfaa9bb0b079)]:
|
|
358
|
+
- @sbc-connect/nuxt-base@0.1.5
|
|
359
|
+
|
|
360
|
+
## 0.1.4
|
|
361
|
+
|
|
362
|
+
### Patch Changes
|
|
363
|
+
|
|
364
|
+
- Updated dependencies [[`90f240f`](https://github.com/bcgov/connect-nuxt/commit/90f240fd789a5286ded5df710bddd6dc953bcba5), [`0fb8c54`](https://github.com/bcgov/connect-nuxt/commit/0fb8c54e059d78b246b80a03f049d075b7bbcf72), [`9b8c225`](https://github.com/bcgov/connect-nuxt/commit/9b8c225a011e3c89c9b490e93a554f55a4e29b78)]:
|
|
365
|
+
- @sbc-connect/nuxt-base@0.1.4
|
|
366
|
+
|
|
367
|
+
## 0.1.3
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- [#9](https://github.com/bcgov/connect-nuxt/pull/9) [`e841fde`](https://github.com/bcgov/connect-nuxt/commit/e841fde27630d63efb2c152cd78d92b1193d1d5e) Thanks [@kialj876](https://github.com/kialj876)! - Add Nuxt back as a dev dependency
|
|
372
|
+
|
|
373
|
+
- [#8](https://github.com/bcgov/connect-nuxt/pull/8) [`c85ebfc`](https://github.com/bcgov/connect-nuxt/commit/c85ebfc879e19cce307b109c9d38044f71f482d2) Thanks [@kialj876](https://github.com/kialj876)! - Added in i18n, added base header components, added in styles for nuxt ui
|
|
374
|
+
|
|
375
|
+
- Updated dependencies [[`e841fde`](https://github.com/bcgov/connect-nuxt/commit/e841fde27630d63efb2c152cd78d92b1193d1d5e), [`c85ebfc`](https://github.com/bcgov/connect-nuxt/commit/c85ebfc879e19cce307b109c9d38044f71f482d2)]:
|
|
376
|
+
- @sbc-connect/nuxt-base@0.1.3
|
|
377
|
+
|
|
378
|
+
## 0.1.2
|
|
379
|
+
|
|
380
|
+
### Patch Changes
|
|
381
|
+
|
|
382
|
+
- [#5](https://github.com/bcgov/connect-nuxt/pull/5) [`2999779`](https://github.com/bcgov/connect-nuxt/commit/29997796bd3908b2c5ba04319b26cbb00bffe0fc) Thanks [@kialj876](https://github.com/kialj876)! - Updated fonts propagation in base, cleaned up dependencies in layers
|
|
383
|
+
|
|
384
|
+
- Updated dependencies [[`2999779`](https://github.com/bcgov/connect-nuxt/commit/29997796bd3908b2c5ba04319b26cbb00bffe0fc)]:
|
|
385
|
+
- @sbc-connect/nuxt-base@0.1.2
|
|
386
|
+
|
|
387
|
+
## 0.1.1
|
|
388
|
+
|
|
389
|
+
### Patch Changes
|
|
390
|
+
|
|
391
|
+
- [#3](https://github.com/bcgov/connect-nuxt/pull/3) [`401b62a`](https://github.com/bcgov/connect-nuxt/commit/401b62a465c338cb745c14db645797ffaac1ddab) Thanks [@kialj876](https://github.com/kialj876)! - Layer updates
|
|
392
|
+
|
|
393
|
+
- Updated dependencies [[`401b62a`](https://github.com/bcgov/connect-nuxt/commit/401b62a465c338cb745c14db645797ffaac1ddab)]:
|
|
394
|
+
- @sbc-connect/nuxt-base@0.1.1
|
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, bcgov
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[](LICENSE) [](https://pkg.pr.new/~/bcgov/connect-nuxt)
|
|
2
|
+
|
|
3
|
+
# @sbc-connect/nuxt-forms
|
|
4
|
+
A Nuxt layer for building and managing complex forms within the Connect ecosystem.
|
|
5
|
+
|
|
6
|
+
This package provides a library of reusable form components, integrated validation logic, and composables to standardize form creation and handling across all filings.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
### Form Management
|
|
11
|
+
- A comprehensive set of accessible, pre-styled form input components.
|
|
12
|
+
- Standardized validation schemas using Zod for consistent error handling.
|
|
13
|
+
|
|
14
|
+
### Core Development Assets
|
|
15
|
+
- Pre-built components for common inputs like addresses, postal codes, names, emails and phone numbers.
|
|
16
|
+
- Reusable Zod schemas to manage the input validations.
|
|
17
|
+
|
|
18
|
+
For detailed usage and API documentation, please see the [Forms Layer Docs](../../../docs/packages/layers/forms/overview.md).
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm install @sbc-connect/nuxt-forms
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Configure
|
|
29
|
+
Then add the dependency to `extends` in `nuxt.config`:
|
|
30
|
+
|
|
31
|
+
> [!NOTE]
|
|
32
|
+
> `@sbc-connect/nuxt-forms` already includes `@sbc-connect/nuxt-base`, it is not necessary to install `@sbc-connect/nuxt-base`.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
defineNuxtConfig({
|
|
36
|
+
extends: '@sbc-connect/nuxt-forms'
|
|
37
|
+
})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Environment Variables
|
|
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.
|
|
55
|
+
|
|
56
|
+
## Contributing
|
|
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.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { FormError } from '@nuxt/ui'
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
orientation = 'horizontal',
|
|
6
|
+
bodyVariant = 'none',
|
|
7
|
+
paddingClass = 'x-default',
|
|
8
|
+
error
|
|
9
|
+
} = defineProps<{
|
|
10
|
+
label?: string
|
|
11
|
+
description?: string
|
|
12
|
+
error?: FormError | boolean
|
|
13
|
+
showErrorMsg?: boolean
|
|
14
|
+
orientation?: 'vertical' | 'horizontal'
|
|
15
|
+
bodyVariant?: FieldsetBodyVariant
|
|
16
|
+
paddingClass?: 'x-default' | 'xy-default' | string
|
|
17
|
+
}>()
|
|
18
|
+
|
|
19
|
+
const id = useId()
|
|
20
|
+
const legendId = id + '-legend'
|
|
21
|
+
const descriptionId = id + '-description'
|
|
22
|
+
|
|
23
|
+
const bodyClassMap = computed<Record<FieldsetBodyVariant, string>>(() => {
|
|
24
|
+
const cardError = error ? 'shadow-section-error' : ''
|
|
25
|
+
return {
|
|
26
|
+
none: '',
|
|
27
|
+
card: 'bg-white rounded shadow-xs overflow-hidden ' + cardError
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const bodyClass = computed(() => bodyClassMap.value[bodyVariant])
|
|
32
|
+
|
|
33
|
+
const padding = paddingClass === 'x-default'
|
|
34
|
+
? 'padding-x-default'
|
|
35
|
+
: paddingClass === 'xy-default'
|
|
36
|
+
? 'padding-xy-default'
|
|
37
|
+
: paddingClass
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<fieldset :aria-labelledby="legendId" :aria-describedby="descriptionId">
|
|
42
|
+
<div
|
|
43
|
+
:class="[
|
|
44
|
+
'flex gap-4 sm:gap-6',
|
|
45
|
+
bodyVariant === 'none' ? padding : '',
|
|
46
|
+
orientation === 'horizontal' ? 'flex-col sm:flex-row' : 'flex-col',
|
|
47
|
+
(error && bodyVariant === 'none') ? 'shadow-section-error' : '',
|
|
48
|
+
]"
|
|
49
|
+
>
|
|
50
|
+
<div
|
|
51
|
+
class="flex flex-col gap-1"
|
|
52
|
+
:class="{ 'w-full sm:basis-1/4 pb-0': orientation === 'horizontal' }"
|
|
53
|
+
>
|
|
54
|
+
<legend
|
|
55
|
+
:id="legendId"
|
|
56
|
+
class="text-base text-neutral-highlighted font-bold"
|
|
57
|
+
>
|
|
58
|
+
<slot name="label">
|
|
59
|
+
<div class="flex flex-col gap-1">
|
|
60
|
+
<span>{{ label }}</span>
|
|
61
|
+
<span
|
|
62
|
+
v-if="error && typeof error === 'object' && 'message' in error && showErrorMsg"
|
|
63
|
+
class="font-normal text-error"
|
|
64
|
+
>
|
|
65
|
+
{{ error.message }}
|
|
66
|
+
</span>
|
|
67
|
+
</div>
|
|
68
|
+
</slot>
|
|
69
|
+
</legend>
|
|
70
|
+
<div v-if="description || $slots.description" id="descriptionId">
|
|
71
|
+
<slot name="description">
|
|
72
|
+
<p>
|
|
73
|
+
{{ description }}
|
|
74
|
+
</p>
|
|
75
|
+
</slot>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div
|
|
80
|
+
class="flex-1"
|
|
81
|
+
:class="bodyClass"
|
|
82
|
+
>
|
|
83
|
+
<slot />
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</fieldset>
|
|
87
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{
|
|
3
|
+
parentId: string
|
|
4
|
+
schemaPrefix: string
|
|
5
|
+
required?: boolean
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const model = defineModel<string | undefined>({ required: true })
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<ConnectFormInput
|
|
13
|
+
v-model="model"
|
|
14
|
+
:data-testid="`${parentId}-field-city`"
|
|
15
|
+
:input-id="`${parentId}-input-city`"
|
|
16
|
+
:name="schemaPrefix + '.city'"
|
|
17
|
+
:required
|
|
18
|
+
:label="$t('connect.label.city')"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectItem } from '@nuxt/ui'
|
|
3
|
+
import { isoCountriesListSortedByName as countries } from '#forms/app/utils/isoCountriesList'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
parentId: string
|
|
7
|
+
schemaPrefix: string
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
required?: boolean
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
defineEmits<{
|
|
13
|
+
change: []
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const model = defineModel<string | undefined>({ required: true })
|
|
17
|
+
|
|
18
|
+
const options: SelectItem[] = [
|
|
19
|
+
countries.find(c => c.alpha_2 === 'CA')!,
|
|
20
|
+
countries.find(c => c.alpha_2 === 'US')!,
|
|
21
|
+
{ type: 'separator' },
|
|
22
|
+
...countries
|
|
23
|
+
]
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<UFormField
|
|
28
|
+
:data-testid="`${parentId}-field-country`"
|
|
29
|
+
:name="schemaPrefix + '.country'"
|
|
30
|
+
class="grow"
|
|
31
|
+
>
|
|
32
|
+
<template #default="{ error }">
|
|
33
|
+
<ConnectSelect
|
|
34
|
+
:id="`${parentId}-input-country`"
|
|
35
|
+
v-model="model"
|
|
36
|
+
:label="$t('connect.label.country')"
|
|
37
|
+
:items="options"
|
|
38
|
+
value-key="alpha_2"
|
|
39
|
+
label-key="name"
|
|
40
|
+
class="w-full"
|
|
41
|
+
:disabled
|
|
42
|
+
:required
|
|
43
|
+
@change="$emit('change')"
|
|
44
|
+
/>
|
|
45
|
+
<div
|
|
46
|
+
v-if="!$slots.help && !error"
|
|
47
|
+
class="h-4 mt-1"
|
|
48
|
+
/>
|
|
49
|
+
</template>
|
|
50
|
+
</UFormField>
|
|
51
|
+
</template>
|