@bcrs-shared-components/base-address 2.0.24 → 2.0.26

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.
@@ -1,65 +1,65 @@
1
- import type { Meta } from '@storybook/vue'
2
- import { BaseAddress } from './index'
3
- import Vuetify from 'vuetify'
4
- import { required, maxLength } from 'vuelidate/lib/validators'
5
-
6
- const meta: Meta<typeof BaseAddress> = {
7
- title: 'component/BaseAddress'
8
- }
9
- export default meta
10
-
11
- const PersonAddressSchema = {
12
- streetAddress: {
13
- required,
14
- maxLength: maxLength(50)
15
- },
16
- streetAddressAdditional: {
17
- maxLength: maxLength(50)
18
- },
19
- addressCity: {
20
- required,
21
- maxLength: maxLength(40)
22
- },
23
- addressCountry: {
24
- required
25
- },
26
- addressRegion: {
27
- maxLength: maxLength(2)
28
- },
29
- postalCode: {
30
- required,
31
- maxLength: maxLength(15)
32
- },
33
- deliveryInstructions: {
34
- maxLength: maxLength(80)
35
- }
36
- }
37
-
38
- const Template = (args, { argTypes }) => ({
39
- vuetify: new Vuetify({ iconfont: 'mdi' }),
40
- props: Object.keys(argTypes),
41
- components: { BaseAddress },
42
- template: '<BaseAddress v-bind="$props" />' // $props comes from args below
43
- })
44
-
45
- export const DefaultBaseAddress = Template.bind({})
46
- DefaultBaseAddress['args'] = {
47
- editing: true,
48
- schema: PersonAddressSchema,
49
- address: {}
50
- }
51
- export const FilledInBaseAddress = Template.bind({})
52
- FilledInBaseAddress['args'] = {
53
- editing: true,
54
- schema: PersonAddressSchema,
55
- address: {
56
- streetAddress: '1234 Sesame Street',
57
- streetAddressAdditional: '4th Floor',
58
- addressCity: 'Victoria',
59
- addressRegion: 'British Columbia',
60
- addressCountry: 'Canada',
61
- postalCode: 'V8N 1A1',
62
- deliveryInstructions: 'Leave at front door'
63
- },
64
- noPoBox: true
65
- }
1
+ import type { Meta } from '@storybook/vue'
2
+ import { BaseAddress } from './index'
3
+ import Vuetify from 'vuetify'
4
+ import { required, maxLength } from 'vuelidate/lib/validators'
5
+
6
+ const meta: Meta<typeof BaseAddress> = {
7
+ title: 'component/BaseAddress'
8
+ }
9
+ export default meta
10
+
11
+ const PersonAddressSchema = {
12
+ streetAddress: {
13
+ required,
14
+ maxLength: maxLength(50)
15
+ },
16
+ streetAddressAdditional: {
17
+ maxLength: maxLength(50)
18
+ },
19
+ addressCity: {
20
+ required,
21
+ maxLength: maxLength(40)
22
+ },
23
+ addressCountry: {
24
+ required
25
+ },
26
+ addressRegion: {
27
+ maxLength: maxLength(2)
28
+ },
29
+ postalCode: {
30
+ required,
31
+ maxLength: maxLength(15)
32
+ },
33
+ deliveryInstructions: {
34
+ maxLength: maxLength(80)
35
+ }
36
+ }
37
+
38
+ const Template = (args, { argTypes }) => ({
39
+ vuetify: new Vuetify({ iconfont: 'mdi' }),
40
+ props: Object.keys(argTypes),
41
+ components: { BaseAddress },
42
+ template: '<BaseAddress v-bind="$props" />' // $props comes from args below
43
+ })
44
+
45
+ export const DefaultBaseAddress = Template.bind({})
46
+ DefaultBaseAddress['args'] = {
47
+ editing: true,
48
+ schema: PersonAddressSchema,
49
+ address: {}
50
+ }
51
+ export const FilledInBaseAddress = Template.bind({})
52
+ FilledInBaseAddress['args'] = {
53
+ editing: true,
54
+ schema: PersonAddressSchema,
55
+ address: {
56
+ streetAddress: '1234 Sesame Street',
57
+ streetAddressAdditional: '4th Floor',
58
+ addressCity: 'Victoria',
59
+ addressRegion: 'British Columbia',
60
+ addressCountry: 'Canada',
61
+ postalCode: 'V8N 1A1',
62
+ deliveryInstructions: 'Leave at front door'
63
+ },
64
+ noPoBox: true
65
+ }