@bcrs-shared-components/base-address 3.0.1 → 3.0.3

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/BaseAddress.vue CHANGED
@@ -1,372 +1,389 @@
1
- <template>
2
- <div class="base-address">
3
- <!-- Display fields -->
4
- <v-expand-transition>
5
- <div
6
- v-if="!editing"
7
- class="address-block"
8
- >
9
- <div class="address-block__info pre-wrap">
10
- <p class="address-block__info-row">
11
- {{ addressLocal.streetAddress }}
12
- </p>
13
- <p
14
- v-if="addressLocal.streetAddressAdditional"
15
- class="address-block__info-row"
16
- >
17
- {{ addressLocal.streetAddressAdditional }}
18
- </p>
19
- <p class="address-block__info-row">
20
- <span>{{ addressLocal.city }}</span>
21
- <span v-if="addressLocal.region">&nbsp;{{ addressLocal.region }}&nbsp;</span>
22
- <span v-if="addressLocal.postalCode">&nbsp;{{ addressLocal.postalCode }}</span>
23
- </p>
24
- <p class="address-block__info-row">
25
- {{ getCountryName(country) }}
26
- </p>
27
- <p
28
- v-if="addressLocal.deliveryInstructions"
29
- class="address-block__info-row delivery-text"
30
- >
31
- {{ addressLocal.deliveryInstructions }}
32
- </p>
33
- </div>
34
- </div>
35
- </v-expand-transition>
36
-
37
- <!-- Edit fields -->
38
- <v-expand-transition>
39
- <v-form
40
- v-if="editing"
41
- ref="addressForm"
42
- name="address-form"
43
- lazy-validation
44
- >
45
- <div class="form__row">
46
- <v-autocomplete
47
- v-model="addressLocal.country"
48
- autocomplete="new-password"
49
- :name="Math.random().toString()"
50
- variant="filled"
51
- class="address-country"
52
- hide-no-data
53
- item-title="name"
54
- item-value="code"
55
- :items="getCountries()"
56
- :label="countryLabel"
57
- :rules="[...schemaLocal.country]"
58
- />
59
- <!-- special field to select AddressComplete country, separate from our model field -->
60
- <input
61
- :id="countryId"
62
- type="hidden"
63
- :value="country"
64
- >
65
- </div>
66
- <div class="form__row">
67
- <!-- NB1: AddressComplete needs to be enabled each time user clicks in this search field.
68
- NB2: Only process first keypress -- assumes if user moves between instances of this
69
- component then they are using the mouse (and thus, clicking). -->
70
- <v-text-field
71
- :id="streetId"
72
- v-model="addressLocal.street"
73
- autocomplete="new-password"
74
- class="street-address"
75
- variant="filled"
76
- :hint="hideAddressHint ? '' : 'Street address, PO box, rural route, or general delivery address'"
77
- :label="streetLabel"
78
- :name="Math.random().toString()"
79
- persistent-hint
80
- :rules="[...schemaLocal.street]"
81
- @keypress.once="enableAddressComplete()"
82
- @click="enableAddressComplete()"
83
- />
84
- </div>
85
- <div class="form__row">
86
- <v-textarea
87
- v-model="addressLocal.streetAdditional"
88
- autocomplete="new-password"
89
- auto-grow
90
- variant="filled"
91
- class="street-address-additional"
92
- :label="streetAdditionalLabel"
93
- :name="Math.random().toString()"
94
- rows="1"
95
- :rules="!!addressLocal.streetAdditional ? [...schemaLocal.streetAdditional] : []"
96
- />
97
- </div>
98
- <div class="form__row three-column">
99
- <v-text-field
100
- v-model="addressLocal.city"
101
- autocomplete="new-password"
102
- variant="filled"
103
- class="item address-city"
104
- :label="cityLabel"
105
- :name="Math.random().toString()"
106
- :rules="[...schemaLocal.city]"
107
- />
108
- <v-autocomplete
109
- v-if="useCountryRegions(country)"
110
- v-model="addressLocal.region"
111
- autocomplete="new-password"
112
- variant="filled"
113
- class="item address-region"
114
- hide-no-data
115
- item-title="name"
116
- item-value="short"
117
- :items="getCountryRegions(country)"
118
- :label="regionLabel"
119
- :menu-props="{ maxHeight: '14rem' }"
120
- :name="Math.random().toString()"
121
- :rules="[...schemaLocal.region]"
122
- />
123
- <v-text-field
124
- v-else
125
- v-model="addressLocal.region"
126
- variant="filled"
127
- class="item address-region"
128
- :label="regionLabel"
129
- :name="Math.random().toString()"
130
- :rules="[...schemaLocal.region]"
131
- />
132
- <v-text-field
133
- v-model="addressLocal.postalCode"
134
- variant="filled"
135
- class="item postal-code"
136
- :label="postalCodeLabel"
137
- :name="Math.random().toString()"
138
- :rules="[...schemaLocal.postalCode]"
139
- />
140
- </div>
141
- <div
142
- v-if="!hideDeliveryAddress"
143
- class="form__row"
144
- >
145
- <v-textarea
146
- v-model="addressLocal.deliveryInstructions"
147
- auto-grow
148
- variant="filled"
149
- class="delivery-instructions"
150
- :label="deliveryInstructionsLabel"
151
- :name="Math.random().toString()"
152
- rows="2"
153
- :rules="!!addressLocal.deliveryInstructions ? [...schemaLocal.deliveryInstructions] : []"
154
- />
155
- </div>
156
- </v-form>
157
- </v-expand-transition>
158
- </div>
159
- </template>
160
-
161
- <script lang="ts">
162
- import { defineComponent, onMounted, toRefs, watch } from 'vue-demi'
163
- import {
164
- baseRules,
165
- useAddress,
166
- useAddressComplete,
167
- useCountryRegions,
168
- useCountriesProvinces,
169
- useBaseValidations,
170
- spaceRules
171
- } from '@/components/base-address/factories'
172
- import { AddressIF, SchemaIF } from '@bcrs-shared-components/interfaces'
173
- import { AddressValidationRules } from '@bcrs-shared-components/enums'
174
-
175
- export default defineComponent({
176
- name: 'BaseAddress',
177
- props: {
178
- value: {
179
- type: Object as () => AddressIF,
180
- default: () => ({
181
- street: '',
182
- streetAdditional: '',
183
- city: '',
184
- region: '',
185
- postalCode: '',
186
- country: '',
187
- deliveryInstructions: ''
188
- })
189
- },
190
- /* used for readonly mode vs edit mode */
191
- editing: {
192
- type: Boolean,
193
- default: false
194
- },
195
- /* contains validation for each field */
196
- schema: {
197
- type: Object as () => SchemaIF,
198
- default: null
199
- },
200
- /* triggers all current form validation errors */
201
- triggerErrors: {
202
- type: Boolean,
203
- default: false
204
- },
205
- /* Hides the persistent hint field on Address Input */
206
- hideAddressHint: {
207
- type: Boolean,
208
- default: false
209
- },
210
- /* Hides Delivery Address field (e.g. for Unit Notes) */
211
- hideDeliveryAddress: {
212
- type: Boolean,
213
- default: false
214
- }
215
- },
216
- emits: ['valid'],
217
- setup (props, { emit }) {
218
- const localSchema = { ...props.schema }
219
- const {
220
- addressLocal,
221
- country,
222
- schemaLocal,
223
- isSchemaRequired,
224
- labels
225
- } = useAddress(toRefs(props).value, localSchema)
226
-
227
- const origPostalCodeRules = localSchema.postalCode
228
- const origRegionRules = localSchema.region
229
-
230
- const { addressForm, resetValidation, validate } = useBaseValidations()
231
-
232
- const { enableAddressComplete, uniqueIds } = useAddressComplete(addressLocal)
233
-
234
- const countryProvincesHelpers = useCountriesProvinces()
235
-
236
- const countryChangeHandler = (val: string, oldVal: string) => {
237
- // do not trigger any changes if it is view only (summary instance)
238
- if (!props.editing) return
239
-
240
- if (val === 'CA') {
241
- localSchema.postalCode = origPostalCodeRules.concat([baseRules.postalCode])
242
- localSchema.region = origRegionRules
243
- } else if (val === 'US') {
244
- localSchema.postalCode = origPostalCodeRules.concat([baseRules.zipCode])
245
- localSchema.region = origRegionRules
246
- } else {
247
- localSchema.postalCode = origPostalCodeRules.concat([baseRules[AddressValidationRules.MAX_LENGTH](15)])
248
- localSchema.region = [baseRules[AddressValidationRules.MAX_LENGTH](2), ...spaceRules]
249
- }
250
- // reset other address fields (check is for loading an existing address)
251
- if (oldVal) {
252
- addressLocal.value.street = ''
253
- addressLocal.value.streetAdditional = ''
254
- addressLocal.value.city = ''
255
- addressLocal.value.region = ''
256
- addressLocal.value.postalCode = ''
257
- }
258
- // wait for schema update and validate the form
259
- setTimeout(() => {
260
- props.triggerErrors ? validate() : resetValidation()
261
- }, 5)
262
- }
263
-
264
- onMounted(() => {
265
- countryChangeHandler(addressLocal.value.country, null)
266
- })
267
-
268
- watch(() => addressLocal.value, (val) => {
269
- let valid = true
270
- /** checks each field against the schema rules to see if the address is valid or not
271
- * NOTE: we don't want it to trigger error msgs yet which is why this does not call validate()
272
- */
273
- for (const key in val) {
274
- for (const index in schemaLocal.value[key]) {
275
- if (schemaLocal.value[key][index](val[key]) !== true) {
276
- valid = false
277
- break
278
- }
279
- }
280
- if (!valid) break
281
- }
282
- emit('valid', valid)
283
- }, { immediate: true, deep: true })
284
-
285
- watch(() => country.value, (val, oldVal) => {
286
- countryChangeHandler(val, oldVal)
287
- })
288
-
289
- watch(() => props.triggerErrors, () => {
290
- validate()
291
- })
292
-
293
- return {
294
- addressForm,
295
- addressLocal,
296
- country,
297
- ...countryProvincesHelpers,
298
- enableAddressComplete,
299
- isSchemaRequired,
300
- ...labels,
301
- schemaLocal,
302
- useCountryRegions,
303
- ...uniqueIds,
304
- validate
305
- }
306
- }
307
- })
308
- </script>
309
-
310
- <style lang="scss" scoped>
311
- @import '@/assets/styles/theme.scss';
312
-
313
- .delivery-text {
314
- font-style: italic;
315
- margin-top: 10px;
316
- }
317
-
318
- // Address Block Layout
319
- .address-block {
320
- display: flex;
321
- p {
322
- margin-bottom: unset;
323
- }
324
- }
325
-
326
- .address-block__info {
327
- flex: 1 1 auto;
328
- }
329
-
330
- // Form Row Elements
331
- .form__row.three-column {
332
- align-items: stretch;
333
- display: flex;
334
- flex-flow: row nowrap;
335
- margin-left: -0.5rem;
336
- margin-right: -0.5rem;
337
-
338
- .item {
339
- flex: 1 1 auto;
340
- flex-basis: 0;
341
- margin-left: 0.5rem;
342
- margin-right: 0.5rem;
343
- }
344
- }
345
-
346
- .pre-wrap {
347
- white-space: pre-wrap;
348
- }
349
-
350
- // make 'readonly' inputs looks disabled
351
- // (can't use 'disabled' because we want normal error styling)
352
- .v-select.v-input--is-readonly,
353
- .v-text-field.v-input--is-readonly {
354
- pointer-events: none;
355
-
356
- ::v-deep .v-label {
357
- // set label colour to same as disabled
358
- color: rgba(0,0,0,.38);
359
- }
360
-
361
- ::v-deep .v-select__selection {
362
- // set selection colour to same as disabled
363
- color: rgba(0,0,0,.38);
364
- }
365
-
366
- ::v-deep .v-icon {
367
- // set error icon colour to same as disabled
368
- color: rgba(0,0,0,.38) !important;
369
- opacity: 0.6;
370
- }
371
- }
372
- </style>
1
+ <template>
2
+ <div class="base-address">
3
+ <!-- Display fields -->
4
+ <v-expand-transition>
5
+ <div
6
+ v-if="!editing"
7
+ class="address-block"
8
+ >
9
+ <div class="address-block__info pre-wrap">
10
+ <p class="address-block__info-row">
11
+ {{ addressLocal.streetAddress }}
12
+ </p>
13
+ <p
14
+ v-if="addressLocal.streetAddressAdditional"
15
+ class="address-block__info-row"
16
+ >
17
+ {{ addressLocal.streetAddressAdditional }}
18
+ </p>
19
+ <p class="address-block__info-row">
20
+ <span>{{ addressLocal.addressCity }}</span>
21
+ <span v-if="addressLocal.addressRegion">&nbsp;{{ addressLocal.addressRegion }}&nbsp;</span>
22
+ <span v-if="addressLocal.postalCode">&nbsp;{{ addressLocal.postalCode }}</span>
23
+ </p>
24
+ <p class="address-block__info-row">
25
+ {{ getCountryName(country) }}
26
+ </p>
27
+ <p
28
+ v-if="addressLocal.deliveryInstructions"
29
+ class="address-block__info-row delivery-text"
30
+ >
31
+ {{ addressLocal.deliveryInstructions }}
32
+ </p>
33
+ </div>
34
+ </div>
35
+ </v-expand-transition>
36
+
37
+ <!-- Edit fields -->
38
+ <v-expand-transition>
39
+ <v-form
40
+ v-if="editing"
41
+ ref="addressForm"
42
+ name="address-form"
43
+ lazy-validation
44
+ >
45
+ <div class="form__row">
46
+ <v-autocomplete
47
+ v-model="addressLocal.addressCountry"
48
+ autocomplete="new-password"
49
+ :name="Math.random().toString()"
50
+ variant="filled"
51
+ class="address-country"
52
+ hide-no-data
53
+ item-title="name"
54
+ item-value="code"
55
+ :items="getCountries()"
56
+ :label="countryLabel"
57
+ :rules="[...schemaLocal.country]"
58
+ >
59
+ <template #item="{item, props}">
60
+ <v-divider v-if="item.raw.divider" />
61
+ <v-list-item
62
+ v-else
63
+ v-bind="props"
64
+ />
65
+ </template>
66
+ </v-autocomplete>
67
+ <!-- special field to select AddressComplete country, separate from our model field -->
68
+ <input
69
+ :id="countryId"
70
+ type="hidden"
71
+ :value="country"
72
+ >
73
+ </div>
74
+ <div class="form__row">
75
+ <!-- NB1: AddressComplete needs to be enabled each time user clicks in this search field.
76
+ NB2: Only process first keypress -- assumes if user moves between instances of this
77
+ component then they are using the mouse (and thus, clicking). -->
78
+ <v-text-field
79
+ :id="streetId"
80
+ v-model="addressLocal.streetAddress"
81
+ autocomplete="new-password"
82
+ class="street-address"
83
+ variant="filled"
84
+ :hint="hideAddressHint ? '' : 'Street address, PO box, rural route, or general delivery address'"
85
+ :label="streetLabel"
86
+ :name="Math.random().toString()"
87
+ persistent-hint
88
+ :rules="[...schemaLocal.street]"
89
+ @keypress.once="enableAddressComplete()"
90
+ @click="enableAddressComplete()"
91
+ />
92
+ </div>
93
+ <div class="form__row">
94
+ <v-textarea
95
+ v-model="addressLocal.streetAddressAdditional"
96
+ autocomplete="new-password"
97
+ auto-grow
98
+ variant="filled"
99
+ class="street-address-additional"
100
+ :label="streetAdditionalLabel"
101
+ :name="Math.random().toString()"
102
+ rows="1"
103
+ :rules="!!addressLocal.streetAddressAdditional ? [...schemaLocal.streetAdditional] : []"
104
+ />
105
+ </div>
106
+ <div class="form__row three-column">
107
+ <v-text-field
108
+ v-model="addressLocal.addressCity"
109
+ autocomplete="new-password"
110
+ variant="filled"
111
+ class="item address-city"
112
+ :label="cityLabel"
113
+ :name="Math.random().toString()"
114
+ :rules="[...schemaLocal.city]"
115
+ />
116
+ <v-autocomplete
117
+ v-if="useCountryRegions(country)"
118
+ v-model="addressLocal.addressRegion"
119
+ autocomplete="new-password"
120
+ variant="filled"
121
+ class="item address-region"
122
+ hide-no-data
123
+ item-title="name"
124
+ item-value="short"
125
+ :items="getCountryRegions(country)"
126
+ :label="regionLabel"
127
+ :menu-props="{ maxHeight: '14rem' }"
128
+ :name="Math.random().toString()"
129
+ :rules="[...schemaLocal.region]"
130
+ >
131
+ <template #item="{item, props}">
132
+ <v-divider v-if="item.raw.divider" />
133
+ <v-list-item
134
+ v-else
135
+ v-bind="props"
136
+ />
137
+ </template>
138
+ </v-autocomplete>
139
+ <v-text-field
140
+ v-else
141
+ v-model="addressLocal.addressRegion"
142
+ variant="filled"
143
+ class="item address-region"
144
+ :label="regionLabel"
145
+ :name="Math.random().toString()"
146
+ :rules="[...schemaLocal.region]"
147
+ />
148
+ <v-text-field
149
+ v-model="addressLocal.postalCode"
150
+ variant="filled"
151
+ class="item postal-code"
152
+ :label="postalCodeLabel"
153
+ :name="Math.random().toString()"
154
+ :rules="[...schemaLocal.postalCode]"
155
+ />
156
+ </div>
157
+ <div
158
+ v-if="!hideDeliveryAddress"
159
+ class="form__row"
160
+ >
161
+ <v-textarea
162
+ v-model="addressLocal.deliveryInstructions"
163
+ auto-grow
164
+ variant="filled"
165
+ class="delivery-instructions"
166
+ :label="deliveryInstructionsLabel"
167
+ :name="Math.random().toString()"
168
+ rows="2"
169
+ :rules="!!addressLocal.deliveryInstructions ? [...schemaLocal.deliveryInstructions] : []"
170
+ />
171
+ </div>
172
+ </v-form>
173
+ </v-expand-transition>
174
+ </div>
175
+ </template>
176
+
177
+ <script lang="ts">
178
+ import { defineComponent, onMounted, toRefs, watch } from 'vue-demi'
179
+ import {
180
+ baseRules,
181
+ useAddress,
182
+ useAddressComplete,
183
+ useCountryRegions,
184
+ useCountriesProvinces,
185
+ useBaseValidations,
186
+ spaceRules
187
+ } from './factories'
188
+ import { AddressIF, SchemaIF } from '@bcrs-shared-components/interfaces'
189
+ import { AddressValidationRules } from '@bcrs-shared-components/enums'
190
+
191
+ export default defineComponent({
192
+ name: 'BaseAddress',
193
+ props: {
194
+ value: {
195
+ type: Object as () => AddressIF,
196
+ default: () => ({
197
+ streetAddress: '',
198
+ streetAddressAdditional: '',
199
+ addressCity: '',
200
+ addressRegion: '',
201
+ postalCode: '',
202
+ addressCountry: null,
203
+ deliveryInstructions: ''
204
+ })
205
+ },
206
+ /* used for readonly mode vs edit mode */
207
+ editing: {
208
+ type: Boolean,
209
+ default: false
210
+ },
211
+ /* contains validation for each field */
212
+ schema: {
213
+ type: Object as () => SchemaIF,
214
+ default: null
215
+ },
216
+ /* triggers all current form validation errors */
217
+ triggerErrors: {
218
+ type: Boolean,
219
+ default: false
220
+ },
221
+ /* Hides the persistent hint field on Address Input */
222
+ hideAddressHint: {
223
+ type: Boolean,
224
+ default: false
225
+ },
226
+ /* Hides Delivery Address field (e.g. for Unit Notes) */
227
+ hideDeliveryAddress: {
228
+ type: Boolean,
229
+ default: false
230
+ }
231
+ },
232
+ emits: ['valid'],
233
+ setup (props, { emit }) {
234
+ // eslint-disable-next-line vue/no-setup-props-destructure
235
+ const localSchema = { ...props.schema }
236
+ const {
237
+ addressLocal,
238
+ country,
239
+ schemaLocal,
240
+ isSchemaRequired,
241
+ labels
242
+ } = useAddress(toRefs(props).value, localSchema)
243
+
244
+ const origPostalCodeRules = localSchema.postalCode
245
+ const origRegionRules = localSchema.region
246
+
247
+ const { addressForm, resetValidation, validate } = useBaseValidations()
248
+
249
+ const { enableAddressComplete, uniqueIds } = useAddressComplete(addressLocal)
250
+
251
+ const countryProvincesHelpers = useCountriesProvinces()
252
+
253
+ const countryChangeHandler = (val: string, oldVal: string) => {
254
+ // do not trigger any changes if it is view only (summary instance)
255
+ if (!props.editing) return
256
+
257
+ if (val === 'CA') {
258
+ localSchema.postalCode = origPostalCodeRules.concat([baseRules.postalCode])
259
+ localSchema.region = origRegionRules
260
+ } else if (val === 'US') {
261
+ localSchema.postalCode = origPostalCodeRules.concat([baseRules.zipCode])
262
+ localSchema.region = origRegionRules
263
+ } else {
264
+ localSchema.postalCode = origPostalCodeRules.concat([baseRules[AddressValidationRules.MAX_LENGTH](15)])
265
+ localSchema.region = [baseRules[AddressValidationRules.MAX_LENGTH](2), ...spaceRules]
266
+ }
267
+ // reset other address fields (check is for loading an existing address)
268
+ if (oldVal) {
269
+ addressLocal.value.streetAddress = ''
270
+ addressLocal.value.streetAddressAdditional = ''
271
+ addressLocal.value.addressCity = ''
272
+ addressLocal.value.addressRegion = ''
273
+ addressLocal.value.postalCode = ''
274
+ }
275
+ // wait for schema update and validate the form
276
+ setTimeout(() => {
277
+ props.triggerErrors ? validate() : resetValidation()
278
+ }, 5)
279
+ }
280
+
281
+ onMounted(() => {
282
+ countryChangeHandler(addressLocal.value.addressCountry, null)
283
+ })
284
+
285
+ watch(() => addressLocal.value, (val) => {
286
+ let valid = true
287
+ /** checks each field against the schema rules to see if the address is valid or not
288
+ * NOTE: we don't want it to trigger error msgs yet which is why this does not call validate()
289
+ */
290
+ for (const key in val) {
291
+ for (const index in schemaLocal.value[key]) {
292
+ if (schemaLocal.value[key][index](val[key]) !== true) {
293
+ valid = false
294
+ break
295
+ }
296
+ }
297
+ if (!valid) break
298
+ }
299
+ emit('valid', valid)
300
+ }, { immediate: true, deep: true })
301
+
302
+ watch(() => country.value, (val, oldVal) => {
303
+ countryChangeHandler(val, oldVal)
304
+ })
305
+
306
+ watch(() => props.triggerErrors, () => {
307
+ validate()
308
+ })
309
+
310
+ return {
311
+ addressForm,
312
+ addressLocal,
313
+ country,
314
+ ...countryProvincesHelpers,
315
+ enableAddressComplete,
316
+ isSchemaRequired,
317
+ ...labels,
318
+ schemaLocal,
319
+ useCountryRegions,
320
+ ...uniqueIds,
321
+ validate
322
+ }
323
+ }
324
+ })
325
+ </script>
326
+
327
+ <style lang="scss" scoped>
328
+ @import '@/assets/styles/theme.scss';
329
+
330
+ .delivery-text {
331
+ font-style: italic;
332
+ margin-top: 10px;
333
+ }
334
+
335
+ // Address Block Layout
336
+ .address-block {
337
+ display: flex;
338
+ p {
339
+ margin-bottom: unset;
340
+ }
341
+ }
342
+
343
+ .address-block__info {
344
+ flex: 1 1 auto;
345
+ }
346
+
347
+ // Form Row Elements
348
+ .form__row.three-column {
349
+ align-items: stretch;
350
+ display: flex;
351
+ flex-flow: row nowrap;
352
+ margin-left: -0.5rem;
353
+ margin-right: -0.5rem;
354
+
355
+ .item {
356
+ flex: 1 1 auto;
357
+ flex-basis: 0;
358
+ margin-left: 0.5rem;
359
+ margin-right: 0.5rem;
360
+ }
361
+ }
362
+
363
+ .pre-wrap {
364
+ white-space: pre-wrap;
365
+ }
366
+
367
+ // make 'readonly' inputs looks disabled
368
+ // (can't use 'disabled' because we want normal error styling)
369
+ .v-select.v-input--is-readonly,
370
+ .v-text-field.v-input--is-readonly {
371
+ pointer-events: none;
372
+
373
+ ::v-deep .v-label {
374
+ // set label colour to same as disabled
375
+ color: rgba(0,0,0,.38);
376
+ }
377
+
378
+ ::v-deep .v-select__selection {
379
+ // set selection colour to same as disabled
380
+ color: rgba(0,0,0,.38);
381
+ }
382
+
383
+ ::v-deep .v-icon {
384
+ // set error icon colour to same as disabled
385
+ color: rgba(0,0,0,.38) !important;
386
+ opacity: 0.6;
387
+ }
388
+ }
389
+ </style>