@policystudio/policy-studio-ui-vue 1.0.31 → 1.0.34

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.
Files changed (31) hide show
  1. package/.eslintrc.js +36 -35
  2. package/babel.config.js +1 -1
  3. package/dist/css/psui_styles.css +26 -8
  4. package/package.json +2 -1
  5. package/postcss.config.js +1 -1
  6. package/src/assets/images/multifamily-units.svg +10 -0
  7. package/src/assets/scss/components/PsChips.scss +4 -4
  8. package/src/assets/scss/components/PsDataTable.scss +17 -0
  9. package/src/assets/scss/components/PsDropdown.scss +6 -4
  10. package/src/assets/scss/components/PsDropdownList.scss +2 -2
  11. package/src/assets/scss/components/PsTooltip.scss +0 -1
  12. package/src/components/accordion/PsAccordionItem.vue +1 -1
  13. package/src/components/chips/PsChips.vue +10 -10
  14. package/src/components/controls/PsSwitch.vue +10 -13
  15. package/src/components/datatable/PsDataTable.vue +3 -1
  16. package/src/components/datatable/PsDataTableItem.vue +1 -1
  17. package/src/components/forms/PsDropdown.vue +58 -44
  18. package/src/components/forms/PsDropdownList.vue +1 -1
  19. package/src/components/forms/PsInputTextArea.vue +1 -1
  20. package/src/components/playground/PsScrollBar.vue +236 -3
  21. package/src/components/tabs/PsTabHeader.vue +13 -5
  22. package/src/components/tooltip/PsDialogTooltip.vue +11 -11
  23. package/src/components/tooltip/PsRichTooltip.vue +6 -6
  24. package/src/components/tooltip/PsTooltip.vue +8 -8
  25. package/src/components/ui/PsIcon.vue +14 -23
  26. package/src/stories/Chips.stories.js +6 -31
  27. package/src/stories/Dropdown.stories.js +73 -29
  28. package/src/stories/Icon.stories.js +21 -0
  29. package/src/stories/InlineSelector.stories.js +1 -1
  30. package/src/stories/Playground.stories.js +1 -1
  31. package/src/util/imageLoader.js +1 -1
@@ -1,31 +1,33 @@
1
1
  <template>
2
- <div
3
- class="psui-el-dropdown-menu"
4
- ref="PSDropdown"
5
- v-click-outside="close"
6
- >
7
-
8
- <div ref="PSDropdownTrigger" v-if="$slots.dropdownTrigger" @click="show && !toggleWhenActive ? '' : toggle()">
2
+ <div class="psui-el-dropdown-menu" ref="PSDropdown" v-click-outside="close">
3
+ <div
4
+ ref="PSDropdownTrigger"
5
+ v-if="$slots.dropdownTrigger"
6
+ @click="show && !toggleWhenActive ? '' : toggle()"
7
+ >
9
8
  <slot name="dropdownTrigger"></slot>
10
9
  </div>
11
10
 
12
11
  <button
13
12
  v-else
14
- @click="show && !toggleWhenActive ? '' : toggle()"
15
- type="button"
13
+ @click="show && !toggleWhenActive ? '' : toggle()"
14
+ type="button"
16
15
  :id="id"
17
- aria-haspopup="true"
16
+ aria-haspopup="true"
18
17
  aria-expanded="true"
19
18
  ref="PSDropdownTrigger"
20
19
  >
21
- <slot v-if="show && $slots.buttonLabelOnShow" name="buttonLabelOnShow"></slot>
20
+ <slot
21
+ v-if="show && $slots.buttonLabelOnShow"
22
+ name="buttonLabelOnShow"
23
+ ></slot>
22
24
  <slot v-else name="buttonLabel"></slot>
23
25
  </button>
24
- <div
26
+ <div
25
27
  ref="PSDropdownDialog"
26
- role="menu"
27
- class="psui-el-dropdown-menu-dialog-wrapper psui-duration-300"
28
- aria-orientation="vertical"
28
+ role="menu"
29
+ class="psui-el-dropdown-menu-dialog-wrapper psui-duration-300"
30
+ aria-orientation="vertical"
29
31
  :aria-labelledby="id"
30
32
  :style="{ minWidth: minWidthDropDown }"
31
33
  >
@@ -39,7 +41,10 @@
39
41
  <script>
40
42
  // Figma - 2.3 Dropdown with category divider https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64886
41
43
 
42
- import { randomString, getParentScrollableEl } from '../../util/GeneralFunctions'
44
+ import {
45
+ randomString,
46
+ getParentScrollableEl,
47
+ } from '../../util/GeneralFunctions'
43
48
 
44
49
  export default {
45
50
  name: 'PsDropdown',
@@ -49,21 +54,21 @@ export default {
49
54
  */
50
55
  minWidthDropDown: {
51
56
  type: String,
52
- default: '340px'
57
+ default: '240px',
53
58
  },
54
59
  /**
55
60
  * It's a boolean responsible for showing a slot within the html tag button.
56
61
  */
57
62
  buttonLabelOnShow: {
58
63
  type: Boolean,
59
- default: false
64
+ default: false,
60
65
  },
61
66
  /**
62
67
  * It's a property responsible for toggling the dropdown menu. default: true.
63
68
  */
64
69
  toggleWhenActive: {
65
70
  type: Boolean,
66
- default: true
71
+ default: true,
67
72
  },
68
73
  },
69
74
  data() {
@@ -71,14 +76,14 @@ export default {
71
76
  show: false,
72
77
  id: randomString(8),
73
78
  marginLeft: '-0px',
74
- scrollableParentEl : null
79
+ scrollableParentEl: null,
75
80
  }
76
81
  },
77
82
  computed: {
78
83
  getMaxWidth() {
79
84
  let bounds = this.$refs.PSDropdown.getBoundingClientRect()
80
- return (document.documentElement.clientWidth - bounds['left']) -30
81
- }
85
+ return document.documentElement.clientWidth - bounds['left'] - 30
86
+ },
82
87
  },
83
88
  beforeDestroy() {
84
89
  this.unwatchParentScrolling()
@@ -99,36 +104,41 @@ export default {
99
104
  },
100
105
  unwatchParentScrolling() {
101
106
  if (this.scrollableParentEl) {
102
- this.scrollableParentEl.removeEventListener('scroll', this.updatePosition)
107
+ this.scrollableParentEl.removeEventListener(
108
+ 'scroll',
109
+ this.updatePosition
110
+ )
103
111
  }
104
112
  },
105
113
  updatePosition() {
106
-
107
114
  const PSDropdownDialog = this.$refs.PSDropdownDialog
108
115
  const PSDropdownTrigger = this.$refs.PSDropdownTrigger
109
- if (!PSDropdownDialog || !PSDropdownTrigger) return
116
+ if (!PSDropdownDialog || !PSDropdownTrigger) return
110
117
 
111
118
  const rectTrigger = PSDropdownTrigger.getBoundingClientRect()
112
119
  const rectDialog = PSDropdownDialog.getBoundingClientRect()
113
120
  const windowWidth = document.documentElement.clientWidth
114
121
 
115
122
  PSDropdownDialog.style.position = 'fixed'
116
- PSDropdownDialog.style.top = `${rectTrigger.y + rectTrigger.height }px`
117
-
118
- if (( rectTrigger.x + rectDialog.width + 20 ) > windowWidth ) {
119
- PSDropdownDialog.style.left = `${windowWidth - rectDialog.width - 30}px`
120
- } else {
123
+ PSDropdownDialog.style.top = `${rectTrigger.y + rectTrigger.height}px`
124
+
125
+ if (rectTrigger.x + rectDialog.width + 20 > windowWidth) {
126
+ PSDropdownDialog.style.left = `${
127
+ windowWidth - rectDialog.width - 30
128
+ }px`
129
+ } else {
121
130
  PSDropdownDialog.style.left = `${rectTrigger.x}px`
122
131
  }
123
132
 
124
- if(rectTrigger.top < 10) {
133
+ if (rectTrigger.top < 10) {
125
134
  this.close()
126
135
  console.warn('The dropdown are too close from the top of the page')
127
136
  return
128
137
  }
129
138
 
130
- setTimeout(() => { PSDropdownDialog.style.opacity = 1 }, 10)
131
-
139
+ setTimeout(() => {
140
+ PSDropdownDialog.style.opacity = 1
141
+ }, 10)
132
142
  },
133
143
  open() {
134
144
  this.$emit('open')
@@ -138,9 +148,9 @@ export default {
138
148
  setTimeout(() => {
139
149
  this.updatePosition()
140
150
  this.watchParentScrolling()
141
- document.addEventListener("keyup", this.handleEsc)
142
- window.addEventListener("resize", this.updatePosition)
143
- window.addEventListener("click", this.clickOutside)
151
+ document.addEventListener('keyup', this.handleEsc)
152
+ window.addEventListener('resize', this.updatePosition)
153
+ window.addEventListener('click', this.clickOutside)
144
154
  }, 10)
145
155
  },
146
156
  close() {
@@ -151,20 +161,24 @@ export default {
151
161
  this.show = false
152
162
  this.unwatchParentScrolling()
153
163
  }
154
- document.removeEventListener("keyup", this.handleEsc)
155
- document.removeEventListener("resize", this.updatePosition)
156
- document.removeEventListener("click", this.clickOutside)
164
+ document.removeEventListener('keyup', this.handleEsc)
165
+ document.removeEventListener('resize', this.updatePosition)
166
+ document.removeEventListener('click', this.clickOutside)
157
167
  },
158
168
  handleEsc(evt) {
159
169
  if (this.show && evt.keyCode === 27) this.close()
160
170
  },
161
171
  clickOutside(event) {
162
- if(!this.show) return
163
- if (!(this.$refs.PSDropdown == event.target || this.$refs.PSDropdown.contains(event.target))) {
172
+ if (!this.show) return
173
+ if (
174
+ !(
175
+ this.$refs.PSDropdown == event.target ||
176
+ this.$refs.PSDropdown.contains(event.target)
177
+ )
178
+ ) {
164
179
  this.close()
165
180
  }
166
- }
167
- }
181
+ },
182
+ },
168
183
  }
169
184
  </script>
170
-
@@ -79,4 +79,4 @@ export default {
79
79
  },
80
80
  }
81
81
  }
82
- </script>
82
+ </script>
@@ -21,7 +21,7 @@
21
21
 
22
22
  <script>
23
23
  export default {
24
- name: "PsInputTextArea",
24
+ name: 'PsInputTextArea',
25
25
  props: {
26
26
  /**
27
27
  * It sets the placeholder of the textarea input.
@@ -1,15 +1,248 @@
1
1
  <template>
2
- <div>
3
- Playground
2
+ <div class="wrapper psui-flex psui-gap-4">
3
+ <div
4
+ class="visible-scrollbar psui-flex psui-flex-col psui-h-full psui-w-56 psui-bg-gray-30 psui-p-2"
5
+ @click="onClick"
6
+ >
7
+ <h2 class="psui-font-bold">Scrollbar Playground (click over here to copy the computed style to clipboard)</h2>
8
+ <p >Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
9
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
10
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
11
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
12
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
13
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
14
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
15
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
16
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
17
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
18
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
19
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
20
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
21
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
22
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
23
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
24
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
25
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
26
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
27
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
28
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
29
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
30
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
31
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
32
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
33
+ </div>
34
+ <div class="psui-flex psui-bg-gray-60 psui-p-2 psui-gap-4">
35
+ <div class="psui-flex psui-flex-col">
36
+ <div class="psui-flex psui-flex-col psui-w-48">
37
+ <label for="width">Scroll Width (px)</label>
38
+ <input type="text" id="width" name="width" @change="onChange">
39
+ </div>
40
+ <div class="psui-flex psui-flex-col psui-w-48">
41
+ <label for="width">Scroll Height (px)</label>
42
+ <input type="text" id="height" name="height" @change="onChange">
43
+ </div>
44
+ <div class="psui-flex psui-flex-col psui-w-48">
45
+ <label for="width">ScrollTrack Color</label>
46
+ <input type="text" id="track" name="track" @change="onChange">
47
+ </div>
48
+ <div class="psui-flex psui-flex-col psui-w-48">
49
+ <label for="width">Thumb Color</label>
50
+ <input type="text" id="thumb" name="thumb" @change="onChange">
51
+ </div>
52
+ <div class="psui-flex psui-flex-col psui-w-48">
53
+ <label for="width">Thumb Border-Radius (px)</label>
54
+ <input type="text" id="thumb-radius" name="thumb-radius" @change="onChange">
55
+ </div>
56
+ <div class="psui-flex psui-flex-col psui-w-48">
57
+ <label for="width">Thumb Border Size(px)</label>
58
+ <input type="text" id="thumb-border" name="thumb-border" @change="onChange">
59
+ </div>
60
+ <div class="psui-flex psui-flex-col psui-w-48">
61
+ <label for="width">Thumb Border Color</label>
62
+ <input type="text" id="thumb-border-color" name="thumb-border-color" @change="onChange">
63
+ </div>
64
+ <div class="psui-flex psui-flex-col psui-w-48">
65
+ <label for="width">Thumb Border Style</label>
66
+ <select id="thumb-border-style" name="thumb-border-style" v-model="selectedStyle">
67
+ <option value="" hidden selected></option>
68
+ <option
69
+ v-for="(style, index) in borderStyle"
70
+ :value="style"
71
+ :key="index"
72
+ >{{style}}</option>
73
+ </select>
74
+ </div>
75
+ </div>
76
+ <div class="psui-flex psui-flex-col">
77
+ <div class="psui-flex psui-flex-col psui-w-48">
78
+ <label for="width">Thumb Hover Color</label>
79
+ <input type="text" id="thumb-hover-color" name="thumb-hover-color" @change="onChange">
80
+ </div>
81
+ <div class="psui-flex psui-flex-col psui-w-48">
82
+ <label for="width">Thumb Hover Border Size</label>
83
+ <input type="text" id="thumb-hover-border-size" name="thumb-hover-border-size" @change="onChange">
84
+ </div>
85
+ <div class="psui-flex psui-flex-col psui-w-48">
86
+ <label for="width">Thumb Hover Border Color</label>
87
+ <input type="text" id="thumb-hover-border-color" name="thumb-hover-border-color" @change="onChange">
88
+ </div>
89
+ <div class="psui-flex psui-flex-col psui-w-48">
90
+ <label for="width">Thumb Border Style</label>
91
+ <select id="thumb-border-style" name="thumb-border-style" v-model="selectedHoverStyle">
92
+ <option value="" hidden selected></option>
93
+ <option
94
+ v-for="(style, index) in borderStyle"
95
+ :value="style"
96
+ :key="index"
97
+ >{{style}}</option>
98
+ </select>
99
+ </div>
100
+ </div>
101
+ </div>
4
102
  </div>
5
103
  </template>
6
104
 
7
105
  <script>
106
+
8
107
  export default {
9
108
  name: 'PsScrollBar',
109
+ data(){
110
+ return {
111
+ borderStyle: ['dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'ouset'],
112
+ selectedStyle: null,
113
+ selectedHoverStyle: null
114
+ }
115
+ },
116
+ watch:{
117
+ selectedStyle(){
118
+ const visibleScrollBar = document.querySelector('.visible-scrollbar')
119
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-border-style', this.selectedStyle)
120
+ },
121
+ selectedHoverStyle(){
122
+ const visibleScrollBar = document.querySelector('.visible-scrollbar')
123
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-border-style', this.selectedHoverStyle)
124
+ }
125
+ },
126
+ methods:{
127
+ onChange(event){
128
+
129
+ const visibleScrollBar = document.querySelector('.visible-scrollbar')
130
+
131
+ switch(event.target.id){
132
+ case 'width':
133
+ visibleScrollBar.style.setProperty('--scrollbar-width', `${event.target.value}px`)
134
+ break
135
+ case 'thumb':
136
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-color', event.target.value)
137
+ break
138
+ case 'track':
139
+ visibleScrollBar.style.setProperty('--scrollbar-track-color', event.target.value)
140
+ break
141
+ case 'thumb-radius':
142
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-radius', `${event.target.value}px`)
143
+ break
144
+ case 'thumb-border':
145
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-border', `${event.target.value}px`)
146
+ break
147
+ case 'thumb-border-color':
148
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-border-color', event.target.value)
149
+ break
150
+ case 'height':
151
+ visibleScrollBar.style.setProperty('--scrollbar-height', `${event.target.value}px`)
152
+ break
153
+ case 'thumb-hover-color':
154
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-color', event.target.value)
155
+ break
156
+ case 'thumb-hover-border-size':
157
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-border-size', `${event.target.value}px`)
158
+ break
159
+ case 'thumb-hover-border-color':
160
+ visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-border-color', event.target.value)
161
+ break
162
+ }
163
+
164
+ },
165
+ onClick(){
166
+ const visibleScrollBar = document.querySelector('.visible-scrollbar')
167
+
168
+ const styleScrollBar = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar')
169
+ const styleScrollBarTrack = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-track')
170
+ const styleScrollBarThumb = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-thumb')
171
+ const styleScrollBarThumbHover = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-thumb:hover')
172
+ const styleScrollBarCorner = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-corner')
173
+
174
+ navigator.clipboard.writeText(`
175
+ ::-webkit-scrollbar {
176
+ display: ${styleScrollBar.display};
177
+ width: ${styleScrollBar.width};
178
+ }
179
+
180
+ ::-webkit-scrollbar-track {
181
+ background-color: ${styleScrollBarTrack.backgroundColor};
182
+ }
183
+
184
+ ::-webkit-scrollbar-thumb {
185
+ background-color: ${styleScrollBarThumb.backgroundColor};
186
+ border-radius: ${styleScrollBarThumb.borderRadius};
187
+ border: ${styleScrollBarThumb.border};
188
+ }
189
+
190
+ ::-webkit-scrollbar-thumb:hover {
191
+ background-color: ${styleScrollBarThumbHover.backgroundColor};
192
+ border: ${styleScrollBarThumbHover.border};
193
+ }
194
+
195
+ ::-webkit-scrollbar-corner {
196
+ display: ${styleScrollBarCorner.display};
197
+ background-color: ${styleScrollBarCorner.backgroundColor};
198
+ height: ${styleScrollBarCorner.height};
199
+ width: ${styleScrollBarCorner.width};
200
+ }
201
+ `)
202
+
203
+ window.alert('Copied to clipboard')
204
+ }
205
+ },
10
206
  }
207
+
11
208
  </script>
12
209
 
13
- <style>
210
+ <style scoped>
211
+
212
+ .visible-scrollbar{
213
+ overflow: scroll;
214
+ white-space: nowrap;
215
+ }
216
+
217
+ .visible-scrollbar::-webkit-scrollbar {
218
+ display: block;
219
+ width: var(--scrollbar-width, 10px);
220
+ height: var(--scrollbar-height, 10px);
221
+ }
222
+
223
+ .visible-scrollbar::-webkit-scrollbar-track {
224
+ background: var(--scrollbar-track-color, gray);
225
+ }
226
+
227
+ .visible-scrollbar::-webkit-scrollbar-thumb {
228
+ background: var(--scrollbar-thumb-color,black);
229
+ border-radius: var(--scrollbar-thumb-radius);
230
+ border: var(--scrollbar-thumb-border) var(--scrollbar-thumb-border-style) var(--scrollbar-thumb-border-color);
231
+ }
232
+
233
+ .visible-scrollbar::-webkit-scrollbar-thumb:hover {
234
+ background: var(--scrollbar-thumb-hover-color, black);
235
+ border: var(--scrollbar-thumb-hover-border-size) var(--scrollbar-thumb-hover-border-style) var(--scrollbar-thumb-hover-border-color);
236
+ }
237
+
238
+ .visible-scrollbar::-webkit-scrollbar-corner {
239
+ display: none;
240
+ background-color: var(--scrollbar-track-color, gray);
241
+ height: var(--scrollbar-height, 10px);
242
+ width: var(--scrollbar-width, 10px);
243
+ }
14
244
 
245
+ .wrapper {
246
+ height: 450px;
247
+ }
15
248
  </style>
@@ -7,18 +7,26 @@
7
7
 
8
8
  <template v-for="item in getItems">
9
9
  <slot v-bind:item="item" >
10
+ <PsRichTooltip v-if="item.tooltip" :title="item.tooltip" layout="blue">
11
+ <template v-slot:trigger>
12
+ <button
13
+ :key="item[keyValue]"
14
+ type="button"
15
+ @click="selectTab(item)"
16
+ :class="getButtonClass(item)"
17
+ >
18
+ <span>{{ item[keyLabel] }}</span>
19
+ </button>
20
+ </template>
21
+ </PsRichTooltip>
10
22
  <button
23
+ v-else
11
24
  :key="item[keyValue]"
12
25
  type="button"
13
26
  @click="selectTab(item)"
14
27
  :class="getButtonClass(item)"
15
28
  >
16
- <PsRichTooltip v-if="item.tooltip" :title="item.tooltip" layout="blue">
17
- <template v-slot:trigger>
18
29
  <span>{{ item[keyLabel] }}</span>
19
- </template>
20
- </PsRichTooltip>
21
- <span v-else>{{ item[keyLabel] }}</span>
22
30
  </button>
23
31
  </slot>
24
32
  </template>
@@ -35,7 +35,7 @@
35
35
  <script>
36
36
 
37
37
  export default {
38
- name: "PsDialogTooltip",
38
+ name: 'PsDialogTooltip',
39
39
  props: {
40
40
  /**
41
41
  * It sets the title of the tooltip if needed.
@@ -54,8 +54,8 @@ export default {
54
54
  */
55
55
  layout: {
56
56
  type: String,
57
- default: "white",
58
- validator: (value) => ["white", "dark", "color"].includes(value),
57
+ default: 'white',
58
+ validator: (value) => ['white', 'dark', 'color'].includes(value),
59
59
  },
60
60
  /**
61
61
  * It sets a additional styling if needed.
@@ -66,7 +66,7 @@ export default {
66
66
  },
67
67
  },
68
68
  inheritAttrs: true,
69
- emits: ["show", 'click'],
69
+ emits: ['show', 'click'],
70
70
  data() {
71
71
  return {
72
72
  show: false,
@@ -79,18 +79,18 @@ export default {
79
79
  }
80
80
  },
81
81
  mounted() {
82
- document.addEventListener("resize", this.updatePosition)
82
+ document.addEventListener('resize', this.updatePosition)
83
83
  },
84
84
  beforeDestroy() {
85
- document.removeEventListener("resize", this.updatePosition)
85
+ document.removeEventListener('resize', this.updatePosition)
86
86
  },
87
87
  methods: {
88
88
  open() {
89
89
  if (this.show || this.ignoreDialog) return
90
- this.$emit("show")
90
+ this.$emit('show')
91
91
  this.show = true
92
92
 
93
- this.$refs.dialog.style.display = "block"
93
+ this.$refs.dialog.style.display = 'block'
94
94
  this.$refs.dialog.style.opacity = 0
95
95
 
96
96
  setTimeout(() => {
@@ -99,10 +99,10 @@ export default {
99
99
  },
100
100
  close() {
101
101
  if (this.show && this.$refs.dialog) {
102
- this.$emit("close")
102
+ this.$emit('close')
103
103
  this.show = false
104
104
 
105
- this.$refs.dialog.style.display = "none"
105
+ this.$refs.dialog.style.display = 'none'
106
106
  }
107
107
  },
108
108
  updatePosition() {
@@ -129,7 +129,7 @@ export default {
129
129
  }, 100)
130
130
  },
131
131
  onClick() {
132
- this.$emit("click", this.$event)
132
+ this.$emit('click', this.$event)
133
133
  },
134
134
  },
135
135
  }
@@ -10,10 +10,10 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
- import PsTooltip from "../tooltip/PsTooltip.vue"
13
+ import PsTooltip from '../tooltip/PsTooltip.vue'
14
14
 
15
15
  export default {
16
- name: "PsRichTooltip",
16
+ name: 'PsRichTooltip',
17
17
  components: { PsTooltip },
18
18
  props: {
19
19
  /**
@@ -21,19 +21,19 @@ export default {
21
21
  */
22
22
  title: {
23
23
  type: String,
24
- default: "",
24
+ default: '',
25
25
  },
26
26
  /**
27
27
  * It sets the layout of the tooltip. eg: gray, red and blue.
28
28
  */
29
29
  layout: {
30
30
  type: String,
31
- default: "gray",
32
- validator: (type) => ["gray", "red", "blue"].includes(type),
31
+ default: 'gray',
32
+ validator: (type) => ['gray', 'red', 'blue'].includes(type),
33
33
  },
34
34
  cssClass: {
35
35
  type: String,
36
- default: "",
36
+ default: '',
37
37
  },
38
38
  },
39
39
  }
@@ -28,7 +28,7 @@
28
28
 
29
29
  <script>
30
30
  export default {
31
- name: "PsTooltip",
31
+ name: 'PsTooltip',
32
32
  props: {
33
33
  /**
34
34
  * It sets the title of the tooltip if needed.
@@ -57,7 +57,7 @@ export default {
57
57
  }
58
58
  },
59
59
  inheritAttrs: true,
60
- emits: ["show"],
60
+ emits: ['show'],
61
61
  data() {
62
62
  return {
63
63
  show: false,
@@ -70,18 +70,18 @@ export default {
70
70
  }
71
71
  },
72
72
  mounted() {
73
- document.addEventListener("resize", this.updatePosition)
73
+ document.addEventListener('resize', this.updatePosition)
74
74
  },
75
75
  beforeDestroy() {
76
- document.removeEventListener("resize", this.updatePosition)
76
+ document.removeEventListener('resize', this.updatePosition)
77
77
  },
78
78
  methods: {
79
79
  open() {
80
80
  if (this.show || this.ignoreDialog) return
81
- this.$emit("show")
81
+ this.$emit('show')
82
82
  this.show = true
83
83
 
84
- this.$refs.dialog.style.display = "block"
84
+ this.$refs.dialog.style.display = 'block'
85
85
  this.$refs.dialog.style.opacity = 0
86
86
 
87
87
  setTimeout(() => {
@@ -90,10 +90,10 @@ export default {
90
90
  },
91
91
  close() {
92
92
  if (this.show && this.$refs.dialog) {
93
- this.$emit("close")
93
+ this.$emit('close')
94
94
  this.show = false
95
95
 
96
- this.$refs.dialog.style.display = "none"
96
+ this.$refs.dialog.style.display = 'none'
97
97
  }
98
98
  },
99
99
  updatePosition() {