@asd20/ui 3.2.385 → 3.2.388

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/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui",
3
- "version": "3.2.383",
3
+ "version": "3.2.387",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -13063,6 +13063,19 @@
13063
13063
  "integrity": "sha512-LI7v2mH02R55SekHYdv9pRHR9RajVNyIJ2N5IEkWbg7FT5ZmJ9Hw4mWxHeEUcd+dJo0QmzztHvDvWcc7prVFsw==",
13064
13064
  "dev": true
13065
13065
  },
13066
+ "focus-trap": {
13067
+ "version": "6.9.4",
13068
+ "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-6.9.4.tgz",
13069
+ "integrity": "sha512-v2NTsZe2FF59Y+sDykKY+XjqZ0cPfhq/hikWVL88BqLivnNiEffAsac6rP6H45ff9wG9LL5ToiDqrLEP9GX9mw==",
13070
+ "requires": {
13071
+ "tabbable": "^5.3.3"
13072
+ }
13073
+ },
13074
+ "focus-trap-vue": {
13075
+ "version": "1.1.1",
13076
+ "resolved": "https://registry.npmjs.org/focus-trap-vue/-/focus-trap-vue-1.1.1.tgz",
13077
+ "integrity": "sha512-N+M4d4uYymCogct417gUL7wWSMIW/oUcCicfg3eRdo+gz7jlQnIGwUwViFxPkKV7iyzpc81g6JeSxRWiYWU3eQ=="
13078
+ },
13066
13079
  "follow-redirects": {
13067
13080
  "version": "1.5.10",
13068
13081
  "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
@@ -27968,6 +27981,11 @@
27968
27981
  "integrity": "sha512-R9N6uDkVsghHePKh1TEqbnLddO2IY25OcsksyFp/qBe7XYd0PVbKEWxhcdMhpLzE1I6skj5l4aEZ3CRxcbArlA==",
27969
27982
  "dev": true
27970
27983
  },
27984
+ "tabbable": {
27985
+ "version": "5.3.3",
27986
+ "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz",
27987
+ "integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA=="
27988
+ },
27971
27989
  "table": {
27972
27990
  "version": "4.0.2",
27973
27991
  "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz",
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.385",
8
+ "version": "3.2.388",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -33,6 +33,8 @@
33
33
  "basicscroll": "^3.0.2",
34
34
  "countup.js": "^2.0.0",
35
35
  "date-fns": "^1.30.1",
36
+ "focus-trap": "^6.9.4",
37
+ "focus-trap-vue": "^1.1.1",
36
38
  "js-cookie": "^2.2.1",
37
39
  "lodash-es": "^4.17.15",
38
40
  "swiper": "^5.4.5",
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <div v-show="group.description || group.contactPhone || group.contactEmail" :class="classes">
2
+ <div
3
+ v-show="group.description || group.contactPhone || group.contactEmail"
4
+ :class="classes"
5
+ >
3
6
  <div class="asd20-department-contact-card__header">
4
7
  <h2 v-show="group.description">{{ group.title }}</h2>
5
8
  <p v-show="group.description">{{ group.description }}</p>
@@ -18,6 +21,7 @@
18
21
  <asd20-compose-email-modal
19
22
  v-if="group"
20
23
  :open="composingEmail"
24
+ v-model="isActive"
21
25
  :recipient-id="group.id"
22
26
  @dismiss="composingEmail = false"
23
27
  />
@@ -39,6 +43,7 @@ export default {
39
43
  },
40
44
  data: () => ({
41
45
  composingEmail: false,
46
+ isActive: false,
42
47
  }),
43
48
  computed: {
44
49
  classes() {
@@ -143,7 +148,10 @@ export default {
143
148
  methods: {
144
149
  onItemClick(item) {
145
150
  console.log(item)
146
- if (item.label === 'Send an Email') this.composingEmail = true
151
+ if (item.label === 'Send an Email') {
152
+ this.composingEmail = true
153
+ this.isActive = true
154
+ }
147
155
  },
148
156
  },
149
157
  }
@@ -102,8 +102,10 @@ export default {
102
102
  }
103
103
  },
104
104
  tag() {
105
- if (this.actionable && this.to && this.to[0] === '/' && this.$router)
106
- return 'button'
105
+ if (this.actionable)
106
+ return 'button'
107
+ // if (this.actionable && this.to && this.to[0] === '/' && this.$router)
108
+ // return 'button'
107
109
  if (this.actionable && this.hrefValue) return 'a'
108
110
  return 'div'
109
111
  },
@@ -128,11 +130,17 @@ export default {
128
130
 
129
131
  methods: {
130
132
  onClick(e) {
131
- if (this.tag === 'button') {
133
+ if (this.tag === 'button' && this.$router) {
132
134
  e.preventDefault()
133
135
  this.$router.push(this.to)
134
136
  }
135
137
  },
138
+ // onClick(e) {
139
+ // if (this.tag === 'button') {
140
+ // e.preventDefault()
141
+ // this.$router.push(this.to)
142
+ // }
143
+ // },
136
144
  },
137
145
  }
138
146
  </script>
@@ -6,40 +6,47 @@
6
6
  @before-leave="transitioning = true"
7
7
  >
8
8
  <div v-if="open" :class="classes">
9
- <div class="asd20-modal">
10
- <div v-if="title || $slots.title" class="asd20-modal__header">
11
- <asd20-icon v-if="icon" :name="icon" size="md" />
12
- <h2>{{ title }}<slot name="title" /></h2>
9
+ <focus-trap :isActive="isActive">
10
+ <div class="asd20-modal">
11
+ <div v-if="title || $slots.title" class="asd20-modal__header">
12
+ <asd20-icon v-if="icon" :name="icon" size="md" />
13
+ <h2>{{ title }}<slot name="title" /></h2>
13
14
 
14
- <asd20-button
15
- v-if="dismissable"
16
- size="md"
17
- icon="close"
18
- label="Close"
19
- hide-label
20
- transparent
21
- @click.native="$emit('dismiss', false)"
22
- />
15
+ <asd20-button
16
+ v-if="dismissable"
17
+ size="md"
18
+ icon="close"
19
+ label="Close"
20
+ hide-label
21
+ transparent
22
+ @click.native="$emit('dismiss', false)"
23
+ @click="isActive = false"
24
+ />
25
+ </div>
26
+ <slot name="header" />
27
+ <div class="asd20-modal__content">
28
+ <slot name="default" :transitioning="transitioning" />
29
+ <slot name="main" />
30
+ </div>
31
+ <div class="asd20-modal__footer">
32
+ <slot name="footer" />
33
+ </div>
23
34
  </div>
24
- <slot name="header" />
25
- <div class="asd20-modal__content">
26
- <slot name="default" :transitioning="transitioning" />
27
- <slot name="main" />
28
- </div>
29
- <div class="asd20-modal__footer">
30
- <slot name="footer" />
31
- </div>
32
- </div>
35
+ </focus-trap>
33
36
  </div>
34
37
  </transition>
35
38
  </template>
36
39
 
37
40
  <script>
41
+ import Vue from 'vue'
38
42
  import Asd20Icon from '../../atoms/Asd20Icon'
39
43
  import Asd20Button from '../../atoms/Asd20Button'
44
+ import { FocusTrap } from 'focus-trap-vue'
45
+ Vue.use(FocusTrap)
46
+
40
47
  export default {
41
48
  name: 'Asd20Modal',
42
- components: { Asd20Icon, Asd20Button },
49
+ components: { Asd20Icon, Asd20Button, FocusTrap },
43
50
  model: { prop: 'open', event: 'dismiss' },
44
51
  props: {
45
52
  open: { type: Boolean, default: false },
@@ -50,6 +57,7 @@ export default {
50
57
  },
51
58
  data: () => ({
52
59
  transitioning: false,
60
+ isActive: false,
53
61
  }),
54
62
  computed: {
55
63
  classes() {
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <asd20-modal
3
3
  :open="open"
4
+ :isActive="isActive"
4
5
  title="Send an Email"
5
6
  icon="email"
6
7
  dismissable
@@ -77,6 +78,7 @@ export default {
77
78
  },
78
79
  composing: false,
79
80
  sending: false,
81
+ isActive: false,
80
82
  emailMessage: {
81
83
  senderName: '',
82
84
  senderEmail: '',
@@ -5,12 +5,13 @@
5
5
  v-for="(person, index) in mappedPeople"
6
6
  :key="index"
7
7
  v-bind="person"
8
- @click.native="onPersonClick(person)"
8
+ @click.native="()=>{onPersonClick(person); isActive = true}"
9
9
  />
10
10
  </asd20-list>
11
11
  <Asd20PersonModal
12
12
  :person="selectedPerson"
13
13
  :open="!!selectedPerson"
14
+ :isActive="isActive"
14
15
  @dismiss="selectedPerson = null"
15
16
  :force-display-email="forceDisplayEmail"
16
17
  />
@@ -45,6 +46,7 @@ export default {
45
46
  data: () => ({
46
47
  // loadedPeople: [],
47
48
  selectedPerson: null,
49
+ isActive: false,
48
50
  }),
49
51
 
50
52
  methods: {
@@ -2,6 +2,7 @@
2
2
  <asd20-modal
3
3
  v-if="person"
4
4
  :open="open"
5
+ :isActive="isActive"
5
6
  title="Staff Details"
6
7
  icon="staff"
7
8
  dismissable
@@ -45,7 +46,12 @@
45
46
  icon-size="lg"
46
47
  label="Send an Email"
47
48
  actionable
48
- @click.native="composingEmail = true"
49
+ @click.native="
50
+ ()=>{
51
+ composingEmail = true;
52
+ isActive = true
53
+ }
54
+ "
49
55
  />
50
56
  <Asd20ListItem
51
57
  v-show="person.email && !useEmailForm"
@@ -78,6 +84,7 @@
78
84
  <asd20-compose-email-modal
79
85
  v-show="person"
80
86
  :open="open && composingEmail"
87
+ :isActive="isActive"
81
88
  :recipient-id="person.id"
82
89
  @dismiss="composingEmail = false"
83
90
  />
@@ -108,6 +115,7 @@ export default {
108
115
  },
109
116
  data: () => ({
110
117
  composingEmail: false,
118
+ isActive: false,
111
119
  }),
112
120
  computed: {
113
121
  initials() {
@@ -88,7 +88,7 @@
88
88
  <slot name="page-footer" />
89
89
 
90
90
  <!-- analytics requested by Kyle Blakely -->
91
- <!-- <img src="https://jelly.mdhv.io/v1/star.gif?pid=ipUavA655F50RvTSoYZIJU2vFFFB&src=mh&evt=hi"> -->
91
+ <img src="https://jelly.mdhv.io/v1/star.gif?pid=ipUavA655F50RvTSoYZIJU2vFFFB&src=mh&evt=hi">
92
92
 
93
93
  </asd20-page-footer>
94
94
  </div>
@@ -6,7 +6,7 @@ $colors: (
6
6
  brand-gray: #828281,
7
7
  silver-gray: #e3e6e8, //lighten(#d1d7ce, 10%),
8
8
  silver-gray-darker: #d1d7ce,
9
- muted-blue: #477e88,
9
+ muted-blue: #3f507b,
10
10
  muted-yellow: #f7e06e,
11
11
  muted-green: #4d7d36,
12
12
  muted-red: #da2e0b,
@@ -6,7 +6,7 @@
6
6
  "onSecondary": "#ffffff",
7
7
  "onTertiary": "#062137",
8
8
  "primary": "#0e2c6c",
9
- "secondary": "#8a8b8c",
9
+ "secondary": "#3f507b",
10
10
  "tertiary": "#e3e6e8"
11
11
  },
12
12
  "websiteButton": {