@policystudio/policy-studio-ui-vue 1.1.90-beta.62 → 1.1.90-beta.64

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.
@@ -2728,9 +2728,6 @@ video {
2728
2728
  font-size: 14px;
2729
2729
  line-height: 130%;
2730
2730
  }
2731
- .psui-el-table-results.layout-flexible thead tr .title {
2732
- font-weight: 700;
2733
- }
2734
2731
  .psui-el-table-results.layout-flexible thead tr .title {
2735
2732
  line-height: 1rem;
2736
2733
  }
@@ -2747,10 +2744,6 @@ video {
2747
2744
  --tw-text-opacity: 1;
2748
2745
  color: rgb(121 132 144/var(--tw-text-opacity));
2749
2746
  }
2750
- .psui-el-table-results.layout-flexible thead tr th {
2751
- padding-top: 0.438rem;
2752
- padding-bottom: 0.625rem;
2753
- }
2754
2747
  .psui-el-table-results.layout-flexible thead tr th .description {
2755
2748
  font-size: 12px;
2756
2749
  line-height: 130%;
@@ -2820,7 +2813,7 @@ video {
2820
2813
  }
2821
2814
  .psui-el-table-results.layout-flexible thead tr:first-of-type th > div {
2822
2815
  padding-top: 0.5rem;
2823
- padding-bottom: 0.625rem;
2816
+ padding-bottom: 0.5rem;
2824
2817
  }
2825
2818
  .psui-el-table-results.layout-flexible thead tr:first-of-type th > div > .title {
2826
2819
  font-size: 12px;
@@ -2835,7 +2828,7 @@ video {
2835
2828
  }
2836
2829
  .psui-el-table-results.layout-flexible thead tr:first-of-type th > div > .title {
2837
2830
  --tw-text-opacity: 1;
2838
- color: rgb(81 94 106/var(--tw-text-opacity));
2831
+ color: rgb(0 42 58/var(--tw-text-opacity));
2839
2832
  }
2840
2833
  .psui-el-table-results.layout-flexible thead tr:first-of-type p {
2841
2834
  font-size: 16px;
@@ -2844,8 +2837,19 @@ video {
2844
2837
  .psui-el-table-results.layout-flexible thead tr:first-of-type p {
2845
2838
  line-height: 18px;
2846
2839
  }
2847
- .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th {
2848
- padding-left: 20px;
2840
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th:not(:first-of-type) > div > div {
2841
+ margin-left: auto;
2842
+ margin-right: auto;
2843
+ }
2844
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th > div {
2845
+ border-bottom-width: 1px;
2846
+ }
2847
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th > div {
2848
+ --tw-border-opacity: 1;
2849
+ border-color: rgb(230 236 242/var(--tw-border-opacity));
2850
+ }
2851
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th > div {
2852
+ padding-right: 20px;
2849
2853
  }
2850
2854
  .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th .title {
2851
2855
  --tw-text-opacity: 1;
@@ -2925,7 +2929,7 @@ video {
2925
2929
  transition: background-color 0.5s ease;
2926
2930
  }
2927
2931
  .psui-el-table-results.layout-flexible tbody tr td {
2928
- height: 2.5rem;
2932
+ height: 32px;
2929
2933
  }
2930
2934
  .psui-el-table-results.layout-flexible tbody tr td {
2931
2935
  text-align: right;
@@ -2938,12 +2942,6 @@ video {
2938
2942
  --tw-text-opacity: 1;
2939
2943
  color: rgb(52 64 74/var(--tw-text-opacity));
2940
2944
  }
2941
- .psui-el-table-results.layout-flexible tbody tr td {
2942
- padding-top: 0.688rem;
2943
- padding-bottom: 0.688rem;
2944
- min-height: 41.5px;
2945
- padding-left: 20px;
2946
- }
2947
2945
  .psui-el-table-results.layout-flexible tbody tr td.hover-color {
2948
2946
  background-color: #ECF7FB !important;
2949
2947
  opacity: 0.99;
@@ -2989,10 +2987,7 @@ video {
2989
2987
  text-align: left;
2990
2988
  }
2991
2989
  .psui-el-table-results.layout-flexible tbody tr td:first-child {
2992
- padding-top: 8px;
2993
- padding-bottom: 8px;
2994
2990
  width: 352px;
2995
- padding-left: 0px;
2996
2991
  }
2997
2992
  .psui-el-table-results.layout-flexible tbody tr td:nth-child(2) {
2998
2993
  position: sticky;
@@ -3020,6 +3015,9 @@ video {
3020
3015
  .psui-el-table-results.layout-flexible tbody tr td:nth-child(3) > div {
3021
3016
  justify-content: center;
3022
3017
  }
3018
+ .psui-el-table-results.layout-flexible tbody tr td:nth-child(n+3) {
3019
+ padding-right: 20px;
3020
+ }
3023
3021
  .psui-el-table-results.layout-flexible tbody tr td .psui-el-tooltip-dialog {
3024
3022
  text-align: left;
3025
3023
  max-width: 180px;
@@ -3048,10 +3046,8 @@ video {
3048
3046
  height: auto;
3049
3047
  }
3050
3048
  .psui-el-table-results.layout-flexible tbody tr.is-first td {
3051
- padding-top: 0.5rem;
3052
- }
3053
- .psui-el-table-results.layout-flexible tbody tr.is-first td {
3054
- padding-bottom: 0px;
3049
+ padding-top: 0.25rem;
3050
+ padding-bottom: 0.25rem;
3055
3051
  }
3056
3052
  .psui-el-table-results.layout-flexible tbody tr.is-first td {
3057
3053
  min-height: 1rem;
@@ -6367,6 +6363,10 @@ video {
6367
6363
  height: 1.25rem;
6368
6364
  }
6369
6365
 
6366
+ .psui-h-full {
6367
+ height: 100%;
6368
+ }
6369
+
6370
6370
  .psui-w-2 {
6371
6371
  width: 0.5rem;
6372
6372
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.90-beta.62",
3
+ "version": "1.1.90-beta.64",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -373,13 +373,11 @@
373
373
 
374
374
  tr {
375
375
  .title {
376
- @apply psui-text-small psui-font-bold psui-leading-4;
376
+ @apply psui-text-small psui-leading-4;
377
377
  }
378
378
 
379
379
  th {
380
380
  @apply psui-text-gray-50 psui-text-right psui-w-auto psui-align-top;
381
- padding-top: 0.438rem;
382
- padding-bottom: 0.625rem;
383
381
 
384
382
  .description {
385
383
  @apply psui-text-xsmall psui-font-normal;
@@ -423,12 +421,10 @@
423
421
  }
424
422
 
425
423
  > div {
426
- @apply psui-flex psui-flex-row psui-border-b psui-border-gray-30;
427
- padding-top: 0.5rem;
428
- padding-bottom: 0.625rem;
424
+ @apply psui-flex psui-flex-row psui-border-b psui-border-gray-30 psui-py-2;
429
425
 
430
426
  > .title {
431
- @apply psui-text-accentSmall psui-text-gray-60 psui-font-bold psui-uppercase;
427
+ @apply psui-text-accentSmall psui-text-blue-80 psui-font-bold psui-uppercase;
432
428
 
433
429
  }
434
430
  }
@@ -442,7 +438,18 @@
442
438
 
443
439
  &:not(:first-of-type) {
444
440
  th {
445
- padding-left: 20px;
441
+ &:not(:first-of-type) {
442
+ > div {
443
+ > div {
444
+ @apply psui-mx-auto;
445
+ }
446
+ }
447
+ }
448
+
449
+ > div {
450
+ @apply psui-border-b psui-border-gray-20 psui-pr-[20px];
451
+
452
+ }
446
453
 
447
454
  .title {
448
455
  @apply psui-text-blue-80;
@@ -509,12 +516,7 @@
509
516
 
510
517
 
511
518
  td {
512
- @apply psui-text-gray-70 psui-h-10 psui-text-right psui-text-small;
513
- padding-top: 0.688rem;
514
- padding-bottom: 0.688rem;
515
- min-height: 41.5px;
516
- padding-left: 20px;
517
-
519
+ @apply psui-text-gray-70 psui-h-[32px] psui-text-right psui-text-small;
518
520
 
519
521
  &.hover-color {
520
522
  background-color: #ECF7FB !important;
@@ -536,10 +538,7 @@
536
538
 
537
539
  &:first-child {
538
540
  @apply psui-pr-8 psui-text-left psui-block psui-sticky psui-z-10 psui-left-0;
539
- padding-top: 8px;
540
- padding-bottom: 8px;
541
541
  width: 352px;
542
- padding-left: 0px;
543
542
  }
544
543
 
545
544
  &:nth-child(2) {
@@ -560,6 +559,10 @@
560
559
  }
561
560
  }
562
561
 
562
+ &:nth-child(n+3) {
563
+ padding-right: 20px;
564
+ }
565
+
563
566
  .psui-el-tooltip-dialog {
564
567
  text-align: left;
565
568
  max-width: 180px;
@@ -582,7 +585,7 @@
582
585
  }
583
586
 
584
587
  td {
585
- @apply psui-h-auto psui-pt-2 psui-pb-0;
588
+ @apply psui-h-auto psui-py-1;
586
589
  min-height: 1rem;
587
590
  }
588
591
 
@@ -35,7 +35,7 @@
35
35
  @mouseleave="onRowHover(false, item, 'leave')"
36
36
  >
37
37
  <td :style="item.background_color ? `background-color: ${getBackgroundColor(item.background_color)}; transition: background-color 0.5s ease;` : ''">
38
- <div class="psui-flex psui-relative">
38
+ <div class="psui-flex psui-relative psui-h-full">
39
39
  <div
40
40
  v-tooltip="{
41
41
  classes: 'layout-gray-50',
@@ -52,7 +52,7 @@
52
52
  />
53
53
  </div>
54
54
  <div
55
- class="psui-flex psui-items-center psui-space-x-3"
55
+ class="psui-flex psui-items-center psui-space-x-2"
56
56
  :style="{ paddingLeft: `${item.deep * 16}px` }"
57
57
  >
58
58
  <PsIcon
@@ -207,7 +207,10 @@
207
207
  <div
208
208
  v-if="layout != 'comparison'"
209
209
  class="psui-space-x-2 psui-show-childrens-on-hover"
210
- :class="column.isCenteredContent ? 'psui-justify-center' : 'psui-justify-end'"
210
+ :class="[
211
+ {},
212
+ column.isCenteredContent ? 'psui-justify-center' : 'psui-justify-end'
213
+ ]"
211
214
  >
212
215
  <PsTooltip v-if="isSelectedRow(column, item)">
213
216
  <template #trigger>
@@ -66,6 +66,7 @@
66
66
  @click="emit('click-column-helper', column, $event)"
67
67
  />
68
68
  <p
69
+ v-tooltip="getTooltip(column)"
69
70
  class="title"
70
71
  v-if="column.title"
71
72
  >
@@ -74,7 +75,7 @@
74
75
  </div>
75
76
  <p
76
77
  class="description"
77
- v-if="column.description"
78
+ v-if="column.description && layout != 'flexible'"
78
79
  >
79
80
  {{ column.description }}
80
81
  </p>
@@ -89,7 +90,7 @@
89
90
  import PsIcon from '../ui/PsIcon.vue'
90
91
  import { computed, getCurrentInstance } from 'vue'
91
92
 
92
- defineProps({
93
+ const props = defineProps({
93
94
  /**
94
95
  * It sets the title for the first column.
95
96
  */
@@ -97,6 +98,13 @@ defineProps({
97
98
  type: String,
98
99
  default: '',
99
100
  },
101
+ layout: {
102
+ type: String,
103
+ default: 'results',
104
+ validator: (value) => {
105
+ return ['results', 'comparison', 'flexible'].indexOf(value) !== -1
106
+ },
107
+ },
100
108
  /**
101
109
  * It sets the description for the first column.
102
110
  */
@@ -135,6 +143,15 @@ const orderColumn = computed(() => {
135
143
  return parent.orderColumn
136
144
  })
137
145
 
146
+ const getTooltip = (column) => {
147
+ if(props.layout == 'flexible' && column) {
148
+ return {
149
+ content: column.description,
150
+ classes: 'custom-tooltip'
151
+ }
152
+ }
153
+ return null
154
+ }
138
155
  const orderDirection = computed(() => {
139
156
  return parent.orderDirection
140
157
  })
@@ -24,18 +24,25 @@
24
24
  <tr>
25
25
  <template v-for="(columnGroup, columnGroupIndex) of header">
26
26
  <th
27
- v-for="column of columnGroup.columns"
27
+ v-for="(column, index) of columnGroup.columns"
28
28
  :key="`${columnGroup.key}-${column.key}`"
29
29
  :data-test-id="column.key"
30
+ class="pr-0"
31
+ :class="{'pl-2':index == 0 && columnGroupIndex > 0}"
30
32
  >
31
33
  <div
32
- class="psui-flex psui-flex-col psui-justify-center"
34
+ class="psui-flex psui-flex-col psui-justify-center py-[7px]"
33
35
  :class="columnGroupIndex == 0 ? 'psui-items-center' : 'psui-items-end'"
34
36
  :data-index="columnGroupIndex"
35
37
  @mouseleave="emit('column-alert-hide', column, $event, false)"
36
38
  >
37
- <div class="psui-show-childrens-on-hover absolute-childrens psui-mb-px">
39
+ <div class="psui-show-childrens-on-hover absolute-childrens">
38
40
  <p
41
+ v-tooltip="{
42
+ content: column.description,
43
+ placement: 'bottom',
44
+ classes: 'custom-tooltip'
45
+ }"
39
46
  class="title"
40
47
  :class="{'is-warning-column': !!column.warning}"
41
48
  v-if="column.title"
@@ -82,12 +89,6 @@
82
89
  @click="emit('click-order-column', column)"
83
90
  />
84
91
  </div>
85
- <p
86
- class="description"
87
- v-if="column.description"
88
- >
89
- {{ column.description }}
90
- </p>
91
92
  </div>
92
93
  </th>
93
94
  </template>