@policystudio/policy-studio-ui-vue 1.1.47 → 1.1.48

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.
@@ -3010,6 +3010,12 @@ video {
3010
3010
  pointer-events: none;
3011
3011
  }
3012
3012
 
3013
+ .psui-el-switch.disabled .psui-el-switch-button {
3014
+ --bg-opacity: 1;
3015
+ background-color: #E6ECF2;
3016
+ background-color: rgba(230, 236, 242, var(--bg-opacity));
3017
+ }
3018
+
3013
3019
  .psui-el-switch.size-big {
3014
3020
  width: 46px;
3015
3021
  height: 24px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.47",
3
+ "version": "1.1.48",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -4,7 +4,11 @@
4
4
 
5
5
  &.disabled {
6
6
  pointer-events: none;
7
+ .psui-el-switch-button {
8
+ @apply psui-bg-gray-20;
9
+ }
7
10
  }
11
+
8
12
  &.size-big {
9
13
  width: 46px;
10
14
  height: 24px;
@@ -41,6 +41,7 @@ export default {
41
41
  },
42
42
  computed:{
43
43
  getToggleClass(){
44
+ if(this.disabled) return 'toggle-false'
44
45
  return this.value ? 'toggle-true' : 'toggle-false'
45
46
  },
46
47
  getComponentClass(){
@@ -39,7 +39,15 @@
39
39
  :style="item.background_color ? `background-color: ${getBackgroundColor(item.background_color)};` : ''"
40
40
  class="psui-transition"
41
41
  >
42
- <div class="psui-flex psui-justify-between psui-relative">
42
+ <div class="psui-flex psui-relative">
43
+ <PsIcon
44
+ v-if="item.remove_add_button"
45
+ :icon="item.remove_add_button_icon"
46
+ class="psui-flex psui-text-gray-40 pl-8 psui-cursor-pointer leading-none hover:psui-text-blue-60 transition-all"
47
+ size="15"
48
+ display="flex"
49
+ @click.native="$emit('removeOrAddButtonChange',item)"
50
+ />
43
51
  <div
44
52
  class="psui-flex psui-items-center actions psui-space-x-3"
45
53
  :style="{paddingLeft: `${item.deep * 16}px`}"
@@ -189,6 +197,7 @@
189
197
  class="psui-space-x-2 psui-show-childrens-on-hover"
190
198
  :class="column.isCenteredContent ? 'psui-justify-center' : 'psui-justify-end'"
191
199
  >
200
+
192
201
  <PsTooltip v-if="isSelectedRow(column,item)">
193
202
  <template v-slot:trigger>
194
203
  <PsIcon
@@ -255,8 +264,10 @@
255
264
 
256
265
  <PsSwitch
257
266
  v-if="column.isSwitch && item.data[column.key] != null"
267
+ :disabled="item.data.is_disabled"
258
268
  :value="item.data[column.key]"
259
269
  size="small"
270
+ @change="$emit('switchButtonItemChanged', item)"
260
271
  />
261
272
  </div>
262
273