@policystudio/policy-studio-ui-vue 1.0.37 → 1.0.38

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.
@@ -18309,6 +18309,10 @@ html {
18309
18309
  border-radius: 1.5rem;
18310
18310
  }
18311
18311
 
18312
+ .psui-el-switch.disabled {
18313
+ pointer-events: none;
18314
+ }
18315
+
18312
18316
  .psui-el-switch.size-big{
18313
18317
  width: 46px;
18314
18318
  height: 24px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -1,6 +1,10 @@
1
1
  @layer components {
2
2
  .psui-el-switch {
3
3
  @apply psui-relative psui-inline-block psui-rounded-3xl;
4
+
5
+ &.disabled {
6
+ pointer-events: none;
7
+ }
4
8
  &.size-big{
5
9
  width: 46px;
6
10
  height: 24px;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class='psui-el-switch' :class="getComponentClass" @click="change()">
2
+ <div class='psui-el-switch' :class="[getComponentClass, {'disabled':disabled}]" @click="change()">
3
3
  <input type="checkbox" :checked="value" />
4
4
  <label class='psui-el-switch-button' :class="[getToggleClass]" />
5
5
  </div>
@@ -23,6 +23,13 @@ export default {
23
23
  value:{
24
24
  type: Boolean,
25
25
  },
26
+ /**
27
+ * It sets disabling mode.
28
+ */
29
+ disabled:{
30
+ type: Boolean,
31
+ default: false
32
+ },
26
33
  /**
27
34
  * It sets the size of the switch button. eg: small and big.
28
35
  */
@@ -6,7 +6,7 @@
6
6
  <div
7
7
  class="psui-el-input-wrapper"
8
8
  @mouseenter="$emit('mouseenter',$event)"
9
- @mouseleave="$emit('mouseenter',$event)"
9
+ @mouseleave="$emit('mouseleave',$event)"
10
10
  >
11
11
 
12
12
  <div v-if="$slots.prepend" class="psui-el-input-prepend">
@@ -133,12 +133,10 @@ export default {
133
133
  },
134
134
  methods: {
135
135
  onInputFocus($event) {
136
- console.log('focus')
137
136
  this.isFocus = true
138
137
  this.$emit('focus', $event)
139
138
  },
140
139
  onInputBlur($event) {
141
- console.log('blur')
142
140
  this.isFocus = false
143
141
  this.$emit('blur', $event)
144
142
  }
@@ -22,8 +22,8 @@ const Template = (args, { argTypes }) => ({
22
22
  </div>
23
23
  <div style='display: flex; gap: 10px; flex-direction: column;'>
24
24
  <span>Disable</span>
25
- <PsSwitch v-bind="$props" v-model="dt" label='Switch1' size='big'/>
26
- <PsSwitch v-bind="$props" v-model="dt" label='Switch2' size='small'/>
25
+ <PsSwitch v-bind="$props" v-model="dt" label='Switch1' disabled size='big'/>
26
+ <PsSwitch v-bind="$props" v-model="dt" label='Switch2' disabled size='small'/>
27
27
  </div>
28
28
  <div style='display: flex; gap: 10px; flex-direction: column;'>
29
29
  <span>Enable</span>