@policystudio/policy-studio-ui-vue 1.1.90-beta.47 → 1.1.90-beta.49

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.
@@ -567,21 +567,21 @@ video {
567
567
  --tw-text-opacity: 1;
568
568
  color: rgb(49 143 172/var(--tw-text-opacity));
569
569
  }
570
- .psui-el-chips.type-checkbox input:checked + label.status-disabled, .psui-el-chips.type-radio input:checked + label.status-disabled {
570
+ .psui-el-chips.type-checkbox input:checked + label.layout-disabled, .psui-el-chips.type-radio input:checked + label.layout-disabled {
571
571
  cursor: default;
572
572
  }
573
- .psui-el-chips.type-checkbox input:checked + label.status-disabled, .psui-el-chips.type-radio input:checked + label.status-disabled {
573
+ .psui-el-chips.type-checkbox input:checked + label.layout-disabled, .psui-el-chips.type-radio input:checked + label.layout-disabled {
574
574
  --tw-bg-opacity: 1;
575
575
  background-color: rgb(230 236 242/var(--tw-bg-opacity));
576
576
  }
577
- .psui-el-chips.type-checkbox input:checked + label.status-disabled, .psui-el-chips.type-radio input:checked + label.status-disabled {
577
+ .psui-el-chips.type-checkbox input:checked + label.layout-disabled, .psui-el-chips.type-radio input:checked + label.layout-disabled {
578
578
  --tw-text-opacity: 1;
579
579
  color: rgb(162 172 183/var(--tw-text-opacity));
580
580
  }
581
- .psui-el-chips.type-checkbox input:checked + label.status-disabled:before, .psui-el-chips.type-radio input:checked + label.status-disabled:before {
581
+ .psui-el-chips.type-checkbox input:checked + label.layout-disabled:before, .psui-el-chips.type-radio input:checked + label.layout-disabled:before {
582
582
  cursor: default;
583
583
  }
584
- .psui-el-chips.type-checkbox input:checked + label.status-disabled:before, .psui-el-chips.type-radio input:checked + label.status-disabled:before {
584
+ .psui-el-chips.type-checkbox input:checked + label.layout-disabled:before, .psui-el-chips.type-radio input:checked + label.layout-disabled:before {
585
585
  --tw-text-opacity: 1;
586
586
  color: rgb(214 221 229/var(--tw-text-opacity));
587
587
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.90-beta.47",
3
+ "version": "1.1.90-beta.49",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -20,7 +20,7 @@
20
20
  + label {
21
21
  @apply psui-text-blue-60 psui-bg-blue-20;
22
22
 
23
- &.status-disabled {
23
+ &.layout-disabled {
24
24
  @apply psui-bg-gray-20 psui-text-gray-40 psui-cursor-default;
25
25
 
26
26
  &:before {
@@ -2,6 +2,14 @@
2
2
  <div
3
3
  class="psui-el-chips"
4
4
  :class="[getComponentClass, `layout-${layout}`, `type-${type}`]"
5
+ v-tooltip="{
6
+ content: disabledText,
7
+ trigger: 'hover',
8
+ placement: 'bottom',
9
+ show: layout === 'disabled' && disabledText !== '' && isHovering
10
+ }"
11
+ @mouseover="isHovering = true"
12
+ @mouseleave="isHovering = false"
5
13
  >
6
14
  <input
7
15
  @change="onChange"
@@ -14,7 +22,7 @@
14
22
  <label
15
23
  :disabled="disabled"
16
24
  :for="getInputId"
17
- :class="{'checked': checked && type === 'button', 'status-disabled': disabled }"
25
+ :class="{'checked': checked && type === 'button', 'layout-disabled': layout === 'disabled'}"
18
26
  >
19
27
  <i
20
28
  v-if="icon"
@@ -33,7 +41,7 @@
33
41
  </template>
34
42
 
35
43
  <script setup>
36
- import { computed, useAttrs } from 'vue'
44
+ import { computed, useAttrs, ref } from 'vue'
37
45
 
38
46
  import { randomString } from '../../util/GeneralFunctions.js'
39
47
 
@@ -61,7 +69,7 @@ const props = defineProps({
61
69
  layout: {
62
70
  type: String,
63
71
  default: 'simple',
64
- validator: (value) => ['simple', 'with-icon', 'rich'].includes(value),
72
+ validator: (value) => ['simple', 'with-icon', 'rich', 'disabled'].includes(value),
65
73
  },
66
74
  /**
67
75
  * It sets the text key which will retrieve a icon from Google Fonts. Make sure to get the right description of your icon on https://fonts.google.com/.
@@ -98,8 +106,14 @@ const props = defineProps({
98
106
  type: Object,
99
107
  default: () => ({}),
100
108
  },
109
+ disabledText: {
110
+ type: String,
111
+ default: '',
112
+ }
101
113
  })
102
114
 
115
+ const isHovering = ref(false)
116
+
103
117
  const getComponentClass = computed(() => {
104
118
  if (props.disabled) {
105
119
  return 'status-disabled'