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

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,15 @@ 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 > div {
2841
+ border-bottom-width: 1px;
2842
+ }
2843
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th > div {
2844
+ --tw-border-opacity: 1;
2845
+ border-color: rgb(230 236 242/var(--tw-border-opacity));
2846
+ }
2847
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th > div {
2848
+ padding-right: 20px;
2849
2849
  }
2850
2850
  .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th .title {
2851
2851
  --tw-text-opacity: 1;
@@ -2925,7 +2925,7 @@ video {
2925
2925
  transition: background-color 0.5s ease;
2926
2926
  }
2927
2927
  .psui-el-table-results.layout-flexible tbody tr td {
2928
- height: 2.5rem;
2928
+ height: 32px;
2929
2929
  }
2930
2930
  .psui-el-table-results.layout-flexible tbody tr td {
2931
2931
  text-align: right;
@@ -2938,12 +2938,6 @@ video {
2938
2938
  --tw-text-opacity: 1;
2939
2939
  color: rgb(52 64 74/var(--tw-text-opacity));
2940
2940
  }
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
2941
  .psui-el-table-results.layout-flexible tbody tr td.hover-color {
2948
2942
  background-color: #ECF7FB !important;
2949
2943
  opacity: 0.99;
@@ -2989,10 +2983,7 @@ video {
2989
2983
  text-align: left;
2990
2984
  }
2991
2985
  .psui-el-table-results.layout-flexible tbody tr td:first-child {
2992
- padding-top: 8px;
2993
- padding-bottom: 8px;
2994
2986
  width: 352px;
2995
- padding-left: 0px;
2996
2987
  }
2997
2988
  .psui-el-table-results.layout-flexible tbody tr td:nth-child(2) {
2998
2989
  position: sticky;
@@ -3048,10 +3039,8 @@ video {
3048
3039
  height: auto;
3049
3040
  }
3050
3041
  .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;
3042
+ padding-top: 0.25rem;
3043
+ padding-bottom: 0.25rem;
3055
3044
  }
3056
3045
  .psui-el-table-results.layout-flexible tbody tr.is-first td {
3057
3046
  min-height: 1rem;
@@ -6302,6 +6291,11 @@ video {
6302
6291
  float: left;
6303
6292
  }
6304
6293
 
6294
+ .psui-mx-auto {
6295
+ margin-left: auto;
6296
+ margin-right: auto;
6297
+ }
6298
+
6305
6299
  .psui-my-3 {
6306
6300
  margin-top: 0.75rem;
6307
6301
  margin-bottom: 0.75rem;
@@ -6367,6 +6361,10 @@ video {
6367
6361
  height: 1.25rem;
6368
6362
  }
6369
6363
 
6364
+ .psui-h-full {
6365
+ height: 100%;
6366
+ }
6367
+
6370
6368
  .psui-w-2 {
6371
6369
  width: 0.5rem;
6372
6370
  }
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.63",
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,11 @@
442
438
 
443
439
  &:not(:first-of-type) {
444
440
  th {
445
- padding-left: 20px;
441
+
442
+ > div {
443
+ @apply psui-border-b psui-border-gray-20 psui-pr-[20px];
444
+
445
+ }
446
446
 
447
447
  .title {
448
448
  @apply psui-text-blue-80;
@@ -509,12 +509,7 @@
509
509
 
510
510
 
511
511
  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
-
512
+ @apply psui-text-gray-70 psui-h-[32px] psui-text-right psui-text-small;
518
513
 
519
514
  &.hover-color {
520
515
  background-color: #ECF7FB !important;
@@ -536,10 +531,7 @@
536
531
 
537
532
  &:first-child {
538
533
  @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
534
  width: 352px;
542
- padding-left: 0px;
543
535
  }
544
536
 
545
537
  &:nth-child(2) {
@@ -582,7 +574,7 @@
582
574
  }
583
575
 
584
576
  td {
585
- @apply psui-h-auto psui-pt-2 psui-pb-0;
577
+ @apply psui-h-auto psui-py-1;
586
578
  min-height: 1rem;
587
579
  }
588
580
 
@@ -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 psui-mx-auto">
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>