@policystudio/policy-studio-ui-vue 1.0.44 → 1.0.45

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.
package/README.md CHANGED
@@ -39,3 +39,4 @@ Inside the policy-studio-ui-vue project folder
39
39
  Navigate to the application folder that you wants to link with the library
40
40
  ```` npm link @policystudio/policy-studio-ui-vue ````
41
41
 
42
+
@@ -19543,6 +19543,15 @@ html {
19543
19543
  background-color: rgba(224, 239, 246, var(--bg-opacity));
19544
19544
  }
19545
19545
 
19546
+ .psui-el-chips.type-button label.checked {
19547
+ --text-opacity: 1;
19548
+ color: #318FAC;
19549
+ color: rgba(49, 143, 172, var(--text-opacity));
19550
+ --bg-opacity: 1;
19551
+ background-color: #E0EFF6;
19552
+ background-color: rgba(224, 239, 246, var(--bg-opacity));
19553
+ }
19554
+
19546
19555
  .psui-el-chips.type-button.layout-with-icon label {
19547
19556
  display: flex;
19548
19557
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -82,6 +82,8 @@
82
82
  }
83
83
 
84
84
  &.type-button {
85
+
86
+
85
87
  label {
86
88
  @apply psui-flex psui-items-center psui-justify-center psui-text-gray-60 psui-transition-all psui-cursor-pointer psui-rounded psui-py-1 psui-px-3 psui-text-small;
87
89
  background-color: #F6F7F8;
@@ -93,6 +95,11 @@
93
95
  &:active {
94
96
  @apply psui-text-blue-60 psui-bg-blue-20;
95
97
  }
98
+
99
+ &.checked {
100
+ @apply psui-text-blue-60 psui-bg-blue-20;
101
+ }
102
+
96
103
  }
97
104
 
98
105
  &.layout-with-icon {
@@ -12,10 +12,9 @@
12
12
  :checked="checked"
13
13
  />
14
14
  <label
15
- @click="onClick"
16
15
  :disabled="disabled"
17
16
  :for="label"
18
- :class="getCssClass"
17
+ :class="{'checked':checked && type === 'button'}"
19
18
  >
20
19
  <i v-if="icon" class="psui-el-chips-icon psui-el-chips-icon-prepend">{{ icon }}</i>
21
20
  {{ label }}
@@ -90,11 +89,6 @@ export default {
90
89
  },
91
90
  },
92
91
  emits: ['click', 'change'],
93
- data() {
94
- return {
95
- isChecked: false,
96
- }
97
- },
98
92
  computed: {
99
93
  getComponentClass() {
100
94
  if (this.disabled) {
@@ -103,23 +97,12 @@ export default {
103
97
  return 'status-resting'
104
98
  }
105
99
  },
106
- getCssClass() {
107
- let cssClass = ''
108
-
109
- if (this.checked === true ) {
110
- cssClass = 'psui-text-blue-50 psui-bg-blue-20'
111
- }
112
-
113
- return cssClass
114
- },
115
100
  },
116
101
  methods: {
117
102
  onClick() {
118
- this.isChecked = !this.isChecked
119
103
  this.$emit('click')
120
104
  },
121
105
  onChange(event) {
122
- this.isChecked = event.target.checked
123
106
  this.$emit('update:checked', event.target.checked)
124
107
  this.$emit('change', event)
125
108
  },
@@ -5,12 +5,12 @@
5
5
  role="group"
6
6
  >
7
7
 
8
- <template v-for="item in getItems">
8
+ <template v-for="(item, index) in getItems">
9
9
  <slot v-bind:item="item" >
10
10
  <PsRichTooltip v-if="item.tooltip" :title="item.tooltip" layout="blue">
11
11
  <template v-slot:trigger>
12
12
  <button
13
- :key="item[keyValue]"
13
+ :key="item[keyValue] + index"
14
14
  type="button"
15
15
  @click="selectTab(item)"
16
16
  :class="getButtonClass(item)"
@@ -20,8 +20,8 @@
20
20
  </template>
21
21
  </PsRichTooltip>
22
22
  <button
23
- v-else
24
- :key="item[keyValue]"
23
+ v-else
24
+ :key="item[keyValue] + index"
25
25
  type="button"
26
26
  @click="selectTab(item)"
27
27
  :class="getButtonClass(item)"
@@ -10,7 +10,7 @@ const Template = (args, { argTypes }) => ({
10
10
  components: { PsChips },
11
11
  data: ()=>{
12
12
  return{
13
- isChecked: null,
13
+ isChecked: true,
14
14
  isCheckedTwo: null,
15
15
  }
16
16
  },