@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.91

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 (131) hide show
  1. package/.eslintrc.js +67 -81
  2. package/.github/workflows/deploy-storybook.yml +1 -1
  3. package/.storybook/PolicyStudio.js +10 -0
  4. package/.storybook/eventBus.js +3 -0
  5. package/.storybook/main.js +25 -0
  6. package/.storybook/manager.js +6 -0
  7. package/babel.config.js +3 -17
  8. package/backup-package-lock.json +37194 -0
  9. package/dist/css/psui_styles.css +110273 -4031
  10. package/package.json +33 -52
  11. package/postcss.config.js +1 -1
  12. package/src/assets/scss/base.scss +23 -27
  13. package/src/assets/scss/components/PsAccordion.scss +1 -1
  14. package/src/assets/scss/components/PsChips.scss +3 -3
  15. package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
  16. package/src/assets/scss/components/PsProgressBar.scss +4 -4
  17. package/src/assets/scss/components/PsTabHeader.scss +1 -1
  18. package/src/assets/scss/components/PsTableResults.scss +1 -1
  19. package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
  20. package/src/components/accordion/PsAccordion.vue +21 -20
  21. package/src/components/accordion/PsAccordionItem.vue +8 -30
  22. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +4 -8
  23. package/src/components/badges-and-tags/PsCardInfos.vue +1 -3
  24. package/src/components/badges-and-tags/PsChartLegend.vue +5 -19
  25. package/src/components/badges-and-tags/PsCostEffectBar.vue +5 -4
  26. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
  27. package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
  28. package/src/components/badges-and-tags/PsTestimonialCard.vue +4 -6
  29. package/src/components/buttons/PsButton.vue +88 -85
  30. package/src/components/chips/PsChips.vue +2 -5
  31. package/src/components/controls/PsCheckbox.vue +2 -5
  32. package/src/components/controls/PsCheckboxSimple.vue +4 -4
  33. package/src/components/controls/PsDraggable.vue +67 -70
  34. package/src/components/controls/PsInlineSelector.vue +14 -13
  35. package/src/components/controls/PsRadioButton.vue +5 -10
  36. package/src/components/controls/PsRadioButtonSimple.vue +3 -3
  37. package/src/components/controls/PsSlider.vue +6 -6
  38. package/src/components/controls/PsSwitch.vue +3 -13
  39. package/src/components/controls/PsToggle.vue +11 -14
  40. package/src/components/data-graphics/PsBarChart.vue +2 -4
  41. package/src/components/datatable/PsDataTable.vue +5 -14
  42. package/src/components/datatable/PsDataTableItem.vue +4 -17
  43. package/src/components/forms/PsDropdown.vue +5 -8
  44. package/src/components/forms/PsDropdownList.vue +1 -1
  45. package/src/components/forms/PsInput.vue +14 -30
  46. package/src/components/forms/PsInputSelect.vue +11 -33
  47. package/src/components/forms/PsInputTextArea.vue +4 -15
  48. package/src/components/navigations/PsBreadcrumb.vue +1 -1
  49. package/src/components/notifications/PsDialog.vue +5 -11
  50. package/src/components/notifications/PsSimpleAlert.vue +10 -22
  51. package/src/components/notifications/PsToast.vue +3 -8
  52. package/src/components/playground/PsScrollBar.vue +50 -122
  53. package/src/components/table-results/PsTableResults.vue +60 -76
  54. package/src/components/table-results/PsTableResultsBody.vue +1 -3
  55. package/src/components/table-results/PsTableResultsHead.vue +13 -32
  56. package/src/components/table-results/PsTableResultsHeadComparison.vue +8 -24
  57. package/src/components/table-results/PsTableResultsHeadFlexible.vue +11 -23
  58. package/src/components/table-results/PsTableResultsRow.vue +2 -6
  59. package/src/components/tabs/PsTabHeader.vue +16 -19
  60. package/src/components/tooltip/PsDialogTooltip.vue +8 -18
  61. package/src/components/tooltip/PsRichTooltip.vue +5 -12
  62. package/src/components/tooltip/PsTooltip.vue +9 -17
  63. package/src/components/ui/PsDotLoader.vue +5 -5
  64. package/src/components/ui/PsIcon.vue +2 -6
  65. package/src/{index.ts → index.js} +1 -0
  66. package/src/stories/{Accordion.stories.ts → Accordion.stories.js} +2 -2
  67. package/src/stories/{BadgeWithIcon.stories.ts → BadgeWithIcon.stories.js} +1 -1
  68. package/src/stories/{BarChart.stories.ts → BarChart.stories.js} +1 -1
  69. package/src/stories/{Breadcrumb.stories.ts → Breadcrumb.stories.js} +4 -1
  70. package/src/stories/Button.stories.js +130 -0
  71. package/src/stories/{CardInfos.stories.ts → CardInfos.stories.js} +2 -1
  72. package/src/stories/{ChartLegend.stories.ts → ChartLegend.stories.js} +2 -1
  73. package/src/stories/{Checkbox.stories.ts → Checkbox.stories.js} +1 -1
  74. package/src/stories/{CheckboxSimple.stories.ts → CheckboxSimple.stories.js} +1 -1
  75. package/src/stories/{Chips.stories.ts → Chips.stories.js} +22 -24
  76. package/src/stories/{ClimateZoneBadge.stories.ts → ClimateZoneBadge.stories.js} +1 -1
  77. package/src/stories/{CostEffectBar.stories.ts → CostEffectBar.stories.js} +1 -1
  78. package/src/stories/{Datatable.stories.ts → Datatable.stories.js} +2 -2
  79. package/src/stories/{DateCardInfo.stories.ts → DateCardInfo.stories.js} +5 -1
  80. package/src/stories/{ElevationSystem.mdx → ElevationSystem.stories.mdx} +1 -1
  81. package/src/stories/{InlineSelector.stories.ts → InlineSelector.stories.js} +1 -1
  82. package/src/stories/{InputTextArea.stories.ts → InputTextArea.stories.js} +1 -1
  83. package/src/stories/{Introduction.mdx → Introduction.stories.mdx} +101 -101
  84. package/src/stories/{RadioButtonSimple.stories.ts → RadioButtonSimple.stories.js} +1 -1
  85. package/src/stories/{Toggle.stories.ts → Toggle.stories.js} +1 -1
  86. package/src/stories/{Tooltip.stories.ts → Tooltip.stories.js} +3 -3
  87. package/src/stories/{Typography.mdx → Typography.stories.mdx} +105 -107
  88. package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +4 -4
  89. package/src/util/{imageLoader.ts → imageLoader.js} +7 -7
  90. package/tailwind.config.js +2 -11
  91. package/.eslintignore +0 -1
  92. package/.storybook/PolicyStudio.ts +0 -11
  93. package/.storybook/eventBus.ts +0 -26
  94. package/.storybook/main.ts +0 -21
  95. package/.storybook/manager.ts +0 -7
  96. package/scripts/kill-port.sh +0 -12
  97. package/src/App.vue +0 -30
  98. package/src/shims-vue.d.ts +0 -11
  99. package/src/stories/Button.stories.ts +0 -48
  100. package/src/stories/Button.vue +0 -59
  101. package/src/stories/Header.stories.ts +0 -41
  102. package/src/stories/Header.vue +0 -77
  103. package/src/stories/button.css +0 -30
  104. package/src/stories/header.css +0 -32
  105. package/tsconfig.json +0 -42
  106. package/webpack.config.js +0 -22
  107. /package/.storybook/{preview.ts → preview.js} +0 -0
  108. /package/src/contents/{ComparisonData.ts → ComparisonData.js} +0 -0
  109. /package/src/contents/{FlexibleData.ts → FlexibleData.js} +0 -0
  110. /package/src/contents/{ResultsData.ts → ResultsData.js} +0 -0
  111. /package/src/stories/{Colors.mdx → Colors.stories.mdx} +0 -0
  112. /package/src/stories/{Dialog.stories.ts → Dialog.stories.js} +0 -0
  113. /package/src/stories/{Draggable.stories.ts → Draggable.stories.js} +0 -0
  114. /package/src/stories/{Dropdown.stories.ts → Dropdown.stories.js} +0 -0
  115. /package/src/stories/{DropdownList.stories.ts → DropdownList.stories.js} +0 -0
  116. /package/src/stories/{HighlightRippleDot.stories.ts → HighlightRippleDot.stories.js} +0 -0
  117. /package/src/stories/{Icon.stories.ts → Icon.stories.js} +0 -0
  118. /package/src/stories/{Input.stories.ts → Input.stories.js} +0 -0
  119. /package/src/stories/{InputSelect.stories.ts → InputSelect.stories.js} +0 -0
  120. /package/src/stories/{MiniTag.stories.ts → MiniTag.stories.js} +0 -0
  121. /package/src/stories/{Playground.stories.ts → Playground.stories.js} +0 -0
  122. /package/src/stories/{ProgressBar.stories.ts → ProgressBar.stories.js} +0 -0
  123. /package/src/stories/{RadioButton.stories.ts → RadioButton.stories.js} +0 -0
  124. /package/src/stories/{SimpleAlert.stories.ts → SimpleAlert.stories.js} +0 -0
  125. /package/src/stories/{Slider.stories.ts → Slider.stories.js} +0 -0
  126. /package/src/stories/{Switch.stories.ts → Switch.stories.js} +0 -0
  127. /package/src/stories/{TabHeader.stories.ts → TabHeader.stories.js} +0 -0
  128. /package/src/stories/{TableResults.stories.ts → TableResults.stories.js} +0 -0
  129. /package/src/stories/{TagScope.stories.ts → TagScope.stories.js} +0 -0
  130. /package/src/stories/{TestimonialCard.stories.ts → TestimonialCard.stories.js} +0 -0
  131. /package/src/stories/{Toast.stories.ts → Toast.stories.js} +0 -0
@@ -13,7 +13,7 @@
13
13
  { 'is-sticky': isSticky }
14
14
  ]"
15
15
  >
16
- <slot name="header" />
16
+ <slot name="header"></slot>
17
17
 
18
18
  <tbody>
19
19
  <tr
@@ -40,6 +40,7 @@
40
40
  <td
41
41
  :style="item.background_color ? `background-color: ${getBackgroundColor(item.background_color)}; transition: background-color 0.5s ease;` : ''"
42
42
  >
43
+
43
44
  <div class="psui-flex psui-relative">
44
45
  <div
45
46
  v-tooltip="{
@@ -48,13 +49,13 @@
48
49
  }"
49
50
  >
50
51
  <PsIcon
51
- v-if="item.remove_add_button"
52
- :icon="item.remove_add_button_icon"
53
- class="psui-flex psui-text-gray-40 pl-4 psui-cursor-pointer leading-none hover:psui-text-blue-60 transition-all"
54
- size="15"
55
- display="flex"
56
- @click="$emit('removeOrAddButtonChange', item, $event)"
57
- />
52
+ v-if="item.remove_add_button"
53
+ :icon="item.remove_add_button_icon"
54
+ class="psui-flex psui-text-gray-40 pl-4 psui-cursor-pointer leading-none hover:psui-text-blue-60 transition-all"
55
+ size="15"
56
+ display="flex"
57
+ @click.native="$emit('removeOrAddButtonChange', item, $event)"
58
+ />
58
59
  </div>
59
60
  <div
60
61
  class="psui-flex psui-items-center psui-space-x-3"
@@ -68,10 +69,10 @@
68
69
  :icon-classes="item.is_disabled ? 'psui-text-gray-40' : getIconClasses(item)"
69
70
  display="flex"
70
71
  :class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90',
71
- { 'psui--rotate-90': item.is_disabled },
72
- { 'psui-pointer-events-none psui--rotate-90' : item.items.length == 0}
72
+ { 'psui--rotate-90': item.is_disabled },
73
+ { 'psui-pointer-events-none psui--rotate-90' : item.items.length == 0}
73
74
  ]"
74
- @click="onCollapse(item, $event)"
75
+ @click.native="onCollapse(item, $event)"
75
76
  />
76
77
 
77
78
  <div v-if="item.is_appended">
@@ -87,25 +88,18 @@
87
88
  v-tooltip="getTooltipContent(item)"
88
89
  >
89
90
  <div class="flex psui-items-center psui-relative ">
90
- <PsIcon
91
- v-if="item.has_blocked_icon"
92
- icon="do_disturb_alt"
93
- size="14"
94
- icon-classes="psui-absolute psui--left-1 psui-text-gray-50"
95
- />
96
- <p
97
- class="title psui-text-gray-50 opacity-100-childrens-on-hover"
98
- :style="item.text_color ? `color: ${item.text_color};` : ''"
99
- >
91
+ <PsIcon v-if="item.has_blocked_icon" icon="do_disturb_alt" size="14" icon-classes="psui-absolute psui--left-1 psui-text-gray-50"/>
92
+ <p class="title psui-text-gray-50 opacity-100-childrens-on-hover" :style='item.text_color ? `color: ${item.text_color};` : ""'>
93
+
100
94
  {{ item.title }}
101
-
95
+
102
96
  <PsIcon
103
97
  v-if="item.has_helper"
104
- icon="info"
105
- size="14"
106
- class="psui-text-gray-40 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
98
+ icon="info_outline"
99
+ size="16"
100
+ class="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
107
101
  display="flex"
108
- @click="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
102
+ @click.native="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
109
103
  />
110
104
  </p>
111
105
  </div>
@@ -123,12 +117,11 @@
123
117
 
124
118
  <PsIcon
125
119
  v-if="item.has_helper"
126
- icon="info"
127
- size="14"
128
- :class="[{'psui-text-gray-50': item.tooltip_text}, {'psui-text-blue-60': !item.tooltip_text}]"
129
- class="psui-opacity-0 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
120
+ icon="info_outline"
121
+ size="16"
122
+ class="psui-opacity-0 psui-text-gray-40 hover:psui-text-blue-60 psui-transition psui-leading-none psui-cursor-pointer psui-ml-1"
130
123
  display="flex"
131
- @click="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
124
+ @click.native="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
132
125
  />
133
126
  </p>
134
127
 
@@ -150,18 +143,18 @@
150
143
  layout="gray"
151
144
  class="psui-inline-flex psui-cursor-default"
152
145
  :class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0']"
153
- :ignore-dialog="getIgnoreDialogIcon(item)"
146
+ :ignoreDialog="getIgnoreDialogIcon(item)"
154
147
  >
155
- <template #trigger>
148
+ <template v-slot:trigger>
156
149
  <PsIcon
157
150
  :icon="getIcon(item)"
158
151
  class="psui-flex psui-text-gray-40 psui-cursor-pointer leading-none hover:psui-text-blue-60 psui-gap-3 psui-px-5 psui-py-1 transition-all"
159
- size="18"
152
+ size="16"
160
153
  display="flex"
161
- @click="executeCallback(item)"
154
+ @click.native="executeCallback(item)"
162
155
  />
163
156
  </template>
164
- <template #content>
157
+ <template v-slot:content>
165
158
  <p
166
159
  class="psui-font-bold psui-text-gray-80 psui-text-xsmall"
167
160
  >
@@ -176,7 +169,7 @@
176
169
  :class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0']"
177
170
  position="custom"
178
171
  >
179
- <template #dropdownTrigger>
172
+ <template v-slot:dropdownTrigger>
180
173
  <PsIcon
181
174
  icon="more_horiz"
182
175
  size="18"
@@ -184,7 +177,7 @@
184
177
  display="flex"
185
178
  />
186
179
  </template>
187
- <template #items>
180
+ <template v-slot:items>
188
181
  <ul class="psui-w-full psui-font-bold psui-my-3">
189
182
  <li
190
183
  v-for="(action, index) in item.actions"
@@ -217,54 +210,48 @@
217
210
  :class="column.isCenteredContent ? 'psui-justify-center' : 'psui-justify-end'"
218
211
  >
219
212
  <PsTooltip v-if="isSelectedRow(column,item)">
220
- <template #trigger>
213
+ <template v-slot:trigger>
221
214
  <PsIcon
222
215
  icon="close"
223
216
  size="16"
224
217
  class="psui-cursor-pointer"
225
218
  icon-classes="psui-text-blue-60 psui-leading-none psui-transition"
226
219
  display="flex"
227
- @click="onCloseSelectRow(item,column)"
220
+ @click.native="onCloseSelectRow(item,column)"
228
221
  />
229
222
  </template>
230
- <template #content>
223
+ <template v-slot:content>
231
224
  Close projections
232
225
  </template>
233
226
  </PsTooltip>
234
227
 
235
- <PsTooltip
236
- v-else-if="column.hasProjections && !item.is_disabled && item.disable_projection_select !== true && layout != 'flexible' ||
237
- column.hasProjections && item.disable_projection_select != true && item.deep != 0 && layout == 'flexible'"
228
+ <PsTooltip v-else-if="column.hasProjections && !item.is_disabled && item.disable_projection_select !== true && layout != 'flexible' ||
229
+ column.hasProjections && item.disable_projection_select != true && item.deep != 0 && layout == 'flexible'"
238
230
  >
239
- <template #trigger>
231
+ <template v-slot:trigger>
240
232
  <PsIcon
241
233
  icon="bar_chart"
242
234
  size="16"
243
235
  class="psui-cursor-pointer"
244
236
  icon-classes="psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
245
237
  display="flex"
246
- @click="onSelectRow(item, column, $event)"
238
+ @click.native="onSelectRow(item, column, $event)"
247
239
  />
248
240
  </template>
249
- <template #content>
241
+ <template v-slot:content>
250
242
  Show projections in the chart
251
243
  </template>
252
244
  </PsTooltip>
253
- <p
254
- class="ps-table-cell-value"
255
- v-if="!column.isSwitch"
256
- >
245
+ <p class="ps-table-cell-value" v-if="!column.isSwitch">
257
246
  <template v-if="column.hasScoreHelper">
258
247
  <PsTooltip
259
248
  layout="blue"
260
249
  >
261
- <template #trigger>
250
+ <template v-slot:trigger>
262
251
  {{ getItemContent(column, item) }}
263
252
  </template>
264
- <template #content>
265
- <p class="psui-text-xsmall psui-font-bold">
266
- {{ column.hasScoreHelper.title }}
267
- </p>
253
+ <template v-slot:content>
254
+ <p class="psui-text-xsmall psui-font-bold">{{ column.hasScoreHelper.title }}</p>
268
255
  {{ column.hasScoreHelper.description }}
269
256
  </template>
270
257
  </PsTooltip>
@@ -293,20 +280,20 @@
293
280
  classes: 'layout-blue'
294
281
  }"
295
282
  >
296
- <div class="flex psui-items-center psui-relative">
297
- <span
298
- v-if="item.has_flag"
299
- class="psui-w-2 psui-h-2 psui-bg-yellow-20 psui-absolute psui--right-2 psui--top-2 psui-rounded-md"
300
- />
301
- <PsSwitch
302
- :disabled="item.data.is_disabled || item.is_excluded"
303
- :value="item.data[column.key]"
304
- :background-color="switchButtonBackgroundColor"
305
- class="psui-justify-self-center"
306
- :class="{'psui-pointer-events-none':preventClickOnSwitchButtons}"
307
- size="small"
308
- @change="$emit('switchButtonItemChanged', item, $event)"
309
- />
283
+ <div class="flex psui-items-center psui-relative">
284
+ <span
285
+ v-if="item.has_flag"
286
+ class="psui-w-2 psui-h-2 psui-bg-yellow-20 psui-absolute psui--right-2 psui--top-2 psui-rounded-md"
287
+ />
288
+ <PsSwitch
289
+ :disabled="item.data.is_disabled || item.is_excluded"
290
+ :value="item.data[column.key]"
291
+ :background-color="switchButtonBackgroundColor"
292
+ class="psui-justify-self-center"
293
+ :class="{'psui-pointer-events-none':preventClickOnSwitchButtons}"
294
+ size="small"
295
+ @change="$emit('switchButtonItemChanged', item, $event)"
296
+ />
310
297
  </div>
311
298
  </div>
312
299
  </div>
@@ -326,10 +313,7 @@
326
313
  :fill-width="getPsBarChartWidth(column.key, item.data[column.key])"
327
314
  />
328
315
 
329
- <p
330
- class="ps-table-cell-value"
331
- v-else-if="item.data[column.key] != 0"
332
- >
316
+ <p class="ps-table-cell-value" v-else-if="item.data[column.key] != 0">
333
317
  {{ formatFunction(column.key, item.data[column.key], item.data) }}
334
318
  </p>
335
319
  </div>
@@ -338,7 +322,7 @@
338
322
  </template>
339
323
  </tr>
340
324
  </tbody>
341
- <slot name="footer" />
325
+ <slot name="footer"></slot>
342
326
  </table>
343
327
  </div>
344
328
  </template>
@@ -532,7 +516,7 @@ export default {
532
516
  this.selectedRow = null
533
517
  })
534
518
  },
535
- beforeUnmount() {
519
+ beforeDestroy() {
536
520
  eventBus.$off('resetPolicyImpactItemSelected')
537
521
  this.$refs.tableWrapper.removeEventListener('scroll', this.handleTableScroll)
538
522
  },
@@ -5,9 +5,7 @@
5
5
  :key="index"
6
6
  >
7
7
  <td>
8
- <p class="title">
9
- {{ row.title }}
10
- </p>
8
+ <p class="title">{{ row.title }}</p>
11
9
  </td>
12
10
 
13
11
  <template
@@ -3,9 +3,7 @@
3
3
  <tr>
4
4
  <th>
5
5
  <div v-if="firstColumnTitle">
6
- <p class="title">
7
- {{ firstColumnTitle }}
8
- </p>
6
+ <p class="title">{{ firstColumnTitle }}</p>
9
7
  </div>
10
8
  </th>
11
9
 
@@ -15,16 +13,14 @@
15
13
  :colspan="columnGroup.columns.reduce( (prev, cur) => cur.isActive ? prev + 1 : prev, 0 )"
16
14
  >
17
15
  <div class="psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
18
- <p class="title">
19
- {{ columnGroup.title }}
20
- </p>
16
+ <p class="title">{{ columnGroup.title }}</p>
21
17
  <PsIcon
22
- icon="info"
23
- size="18"
18
+ icon="info_outline"
19
+ size="16"
24
20
  class="psui-cursor-pointer"
25
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
21
+ icon-classes="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
26
22
  :style="{ display: 'flex' }"
27
- @click="$emit('click-column-group-helper', columnGroup, $event)"
23
+ @click.native="$emit('click-column-group-helper', columnGroup, $event)"
28
24
  />
29
25
  </div>
30
26
  </th>
@@ -33,12 +29,7 @@
33
29
  <tr>
34
30
  <th>
35
31
  <div>
36
- <p
37
- v-if="firstColumnDescription"
38
- class="description"
39
- >
40
- {{ firstColumnDescription }}
41
- </p>
32
+ <p v-if="firstColumnDescription" class="description">{{ firstColumnDescription }}</p>
42
33
  </div>
43
34
  </th>
44
35
 
@@ -57,30 +48,20 @@
57
48
  class="psui-cursor-pointer helper"
58
49
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
59
50
  :style="{ display: 'flex' }"
60
- @click="$emit('click-order-column', column)"
51
+ @click.native="$emit('click-order-column', column)"
61
52
  />
62
53
 
63
54
  <PsIcon
64
- icon="info"
55
+ icon="info_outline"
65
56
  size="16"
66
57
  class="psui-cursor-pointer helper"
67
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
58
+ icon-classes="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
68
59
  :style="{ display: 'flex' }"
69
- @click="$emit('click-column-helper', column, $event)"
60
+ @click.native="$emit('click-column-helper', column, $event)"
70
61
  />
71
- <p
72
- class="title"
73
- v-if="column.title"
74
- >
75
- {{ column.title }}
76
- </p>
62
+ <p class="title" v-if="column.title">{{ column.title }}</p>
77
63
  </div>
78
- <p
79
- class="description"
80
- v-if="column.description"
81
- >
82
- {{ column.description }}
83
- </p>
64
+ <p class="description" v-if="column.description">{{ column.description }}</p>
84
65
  </div>
85
66
  </th>
86
67
  </template>
@@ -3,14 +3,10 @@
3
3
  <tr>
4
4
  <th rowspan="2">
5
5
  <div v-if="firstColumnTitle">
6
- <p class="title">
7
- {{ firstColumnTitle }}
8
- </p>
6
+ <p class="title">{{ firstColumnTitle }}</p>
9
7
  </div>
10
8
  <div v-if="firstColumnDescription">
11
- <p class="description">
12
- {{ firstColumnDescription }}
13
- </p>
9
+ <p class="description">{{ firstColumnDescription }}</p>
14
10
  </div>
15
11
  </th>
16
12
 
@@ -20,16 +16,14 @@
20
16
  :colspan="columnGroup.columns.reduce( (prev, cur) => cur.isActive ? prev + 1 : prev, 0 )"
21
17
  >
22
18
  <div class="psui-flex psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
23
- <p class="title">
24
- {{ columnGroup.title }}
25
- </p>
19
+ <p class="title">{{ columnGroup.title }}</p>
26
20
  <PsIcon
27
21
  icon="info"
28
22
  size="18"
29
23
  class="psui-cursor-pointer"
30
24
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
31
25
  :style="{ display: 'flex' }"
32
- @click="$emit('click-column-group-helper', columnGroup, $event)"
26
+ @click.native="$emit('click-column-group-helper', columnGroup, $event)"
33
27
  />
34
28
  </div>
35
29
  </th>
@@ -43,12 +37,7 @@
43
37
  >
44
38
  <div class="psui-flex psui-flex-col psui-justify-center psui-items-center psui-text-center">
45
39
  <div class="psui-show-childrens-on-hover absolute-childrens psui-mb-px">
46
- <p
47
- class="title"
48
- v-if="column.title"
49
- >
50
- {{ column.title }}
51
- </p>
40
+ <p class="title" v-if="column.title">{{ column.title }}</p>
52
41
 
53
42
  <PsIcon
54
43
  icon="info"
@@ -56,7 +45,7 @@
56
45
  class="psui-cursor-pointer helper"
57
46
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
58
47
  :style="{ display: 'flex' }"
59
- @click="$emit('click-column-helper', column, $event)"
48
+ @click.native="$emit('click-column-helper', column, $event)"
60
49
  />
61
50
 
62
51
  <PsIcon
@@ -67,15 +56,10 @@
67
56
  class="psui-cursor-pointer helper"
68
57
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
69
58
  :style="{ display: 'flex' }"
70
- @click="$emit('click-order-column', column)"
59
+ @click.native="$emit('click-order-column', column)"
71
60
  />
72
61
  </div>
73
- <p
74
- class="description"
75
- v-if="column.description"
76
- >
77
- {{ column.description }}
78
- </p>
62
+ <p class="description" v-if="column.description">{{ column.description }}</p>
79
63
  </div>
80
64
  </th>
81
65
  </template>
@@ -7,16 +7,14 @@
7
7
  :colspan="columnGroup.columns.reduce( (prev, cur) => cur.isActive ? prev + 1 : prev, 0 )"
8
8
  >
9
9
  <div class="psui-flex psui-space-x-1 psui-items-center psui-show-childrens-on-hover">
10
- <p class="title">
11
- {{ columnGroup.title }}
12
- </p>
10
+ <p class="title">{{ columnGroup.title }}</p>
13
11
  <PsIcon
14
- icon="info"
15
- size="18"
12
+ icon="info_outline"
13
+ size="16"
16
14
  class="psui-cursor-pointer"
17
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
15
+ icon-classes="psui-text-blue-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
18
16
  :style="{ display: 'flex' }"
19
- @click="$emit('click-column-group-helper', columnGroup, $event)"
17
+ @click.native="$emit('click-column-group-helper', columnGroup, $event)"
20
18
  />
21
19
  </div>
22
20
  </th>
@@ -35,20 +33,15 @@
35
33
  :data-index="columnGroupIndex"
36
34
  >
37
35
  <div class="psui-show-childrens-on-hover absolute-childrens psui-mb-px">
38
- <p
39
- class="title"
40
- v-if="column.title"
41
- >
42
- {{ column.title }}
43
- </p>
36
+ <p class="title" v-if="column.title">{{ column.title }}</p>
44
37
 
45
38
  <PsIcon
46
- icon="info"
39
+ icon="info_outline"
47
40
  size="16"
48
41
  class="psui-cursor-pointer helper"
49
- icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
42
+ icon-classes="psui-text-gray-40 hover:psui-text-blue-60 psui-opacity-0 psui-leading-none psui-transition"
50
43
  :style="{ display: 'flex' }"
51
- @click="$emit('click-column-helper', column, $event)"
44
+ @click.native="$emit('click-column-helper', column, $event)"
52
45
  />
53
46
 
54
47
  <PsIcon
@@ -59,15 +52,10 @@
59
52
  class="psui-cursor-pointer helper"
60
53
  icon-classes="psui-text-blue-50 psui-opacity-0 psui-leading-none psui-transition"
61
54
  :style="{ display: 'flex' }"
62
- @click="$emit('click-order-column', column)"
55
+ @click.native="$emit('click-order-column', column)"
63
56
  />
64
57
  </div>
65
- <p
66
- class="description"
67
- v-if="column.description"
68
- >
69
- {{ column.description }}
70
- </p>
58
+ <p class="description" v-if="column.description">{{ column.description }}</p>
71
59
  </div>
72
60
  </th>
73
61
  </template>
@@ -5,9 +5,7 @@
5
5
  :key="index"
6
6
  >
7
7
  <td>
8
- <p class="title">
9
- {{ row.title }}
10
- </p>
8
+ <p class="title">{{ row.title }}</p>
11
9
  </td>
12
10
 
13
11
  <template
@@ -17,9 +15,7 @@
17
15
  v-for="column of columnGroup.columns"
18
16
  :key="indexColumn + '-' + columnGroup.key + '-' + column.key"
19
17
  >
20
- <p class="ps-table-cell-value">
21
- {{ row.data[column.key] }}
22
- </p>
18
+ <p class="ps-table-cell-value">{{ row.data[column.key] }}</p>
23
19
  </td>
24
20
  </template>
25
21
  </tr>
@@ -4,24 +4,21 @@
4
4
  :class="[getComponentClass, `layout-${layout}`]"
5
5
  role="group"
6
6
  >
7
+
7
8
  <template v-for="(item, index) in getItems">
8
- <slot :item="item">
9
- <PsRichTooltip
10
- v-if="item.tooltip"
11
- :title="item.tooltip"
12
- layout="blue"
13
- >
14
- <template #trigger>
15
- <button
16
- :key="item[keyValue] + index"
17
- type="button"
18
- @click="selectTab(item)"
19
- :class="getButtonClass(item)"
20
- >
21
- <span>{{ item[keyLabel] }}</span>
22
- </button>
23
- </template>
24
- </PsRichTooltip>
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] + index"
14
+ type="button"
15
+ @click="selectTab(item)"
16
+ :class="getButtonClass(item)"
17
+ >
18
+ <span>{{ item[keyLabel] }}</span>
19
+ </button>
20
+ </template>
21
+ </PsRichTooltip>
25
22
  <button
26
23
  v-else
27
24
  :key="item[keyValue] + index"
@@ -29,11 +26,11 @@
29
26
  @click="selectTab(item)"
30
27
  :class="getButtonClass(item)"
31
28
  >
32
- <span>{{ item[keyLabel] }}</span>
29
+ <span>{{ item[keyLabel] }}</span>
33
30
  </button>
34
31
  </slot>
35
32
  </template>
36
- </div>
33
+ </div>
37
34
  </template>
38
35
 
39
36
  <script>
@@ -1,22 +1,14 @@
1
1
  <template>
2
- <div
3
- @mouseenter="open"
4
- v-click-outside="close"
5
- ref="tooltip"
6
- class="psui-el-tooltip"
7
- >
8
- <div
9
- ref="tooltiptrigger"
10
- class="psui-el-tooltip-trigger"
11
- >
12
- <slot name="trigger" />
2
+ <div @mouseenter="open" v-click-outside="close" ref="tooltip" class='psui-el-tooltip'>
3
+ <div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
4
+ <slot name="trigger"></slot>
13
5
  </div>
14
6
 
15
- <div class="psui-el-tooltip-wrapper">
7
+ <div class='psui-el-tooltip-wrapper'>
16
8
  <div
17
9
  role="menu"
18
10
  ref="dialog"
19
- class="psui-el-tooltip-dialog"
11
+ class='psui-el-tooltip-dialog'
20
12
  :class="cssClass"
21
13
  >
22
14
  <div
@@ -24,11 +16,9 @@
24
16
  aria-orientation="vertical"
25
17
  :class="getComponentClass"
26
18
  >
27
- <h2 v-if="title">
28
- {{ title }}
29
- </h2>
19
+ <h2 v-if="title">{{ title}}</h2>
30
20
  <div class="psui-el-tooltip-content-wrapper">
31
- <slot name="content" />
21
+ <slot name="content"></slot>
32
22
  <button
33
23
  v-if="buttonText"
34
24
  @click="onClick"
@@ -99,7 +89,7 @@ export default {
99
89
  mounted() {
100
90
  document.addEventListener('resize', this.updatePosition)
101
91
  },
102
- beforeUnmount() {
92
+ beforeDestroy() {
103
93
  document.removeEventListener('resize', this.updatePosition)
104
94
  },
105
95
  methods: {
@@ -1,17 +1,10 @@
1
1
  <template>
2
- <PsTooltip
3
- :layout="layout"
4
- :title="title"
5
- :css-class="cssClass"
6
- :position="position"
7
- :ignore-dialog="ignoreDialog"
8
- :custom-position="customPosition"
9
- >
10
- <template #trigger>
11
- <slot name="trigger" />
2
+ <PsTooltip :layout="layout" :title="title" :cssClass="cssClass" :position="position" :ignoreDialog="ignoreDialog" :customPosition="customPosition">
3
+ <template v-slot:trigger>
4
+ <slot name="trigger"></slot>
12
5
  </template>
13
- <template #content>
14
- <slot name="content" />
6
+ <template v-slot:content>
7
+ <slot name="content"></slot>
15
8
  </template>
16
9
  </PsTooltip>
17
10
  </template>