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

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.
@@ -0,0 +1,78 @@
1
+ name: Release and publish package
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+
7
+ jobs:
8
+ tagging:
9
+ name: Creates tag when version bump
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v3
14
+ with:
15
+ ref: master
16
+
17
+ - name: Check version changes
18
+ uses: EndBug/version-check@v1
19
+ id: check
20
+ with:
21
+ token: ${{ secrets.GITHUB_TOKEN }}
22
+ file-url: https://unpkg.com/@policystudio/policy-studio-ui-vue@1.0.39/package.json
23
+ static-checking: localIsNew
24
+
25
+ - name: Version update detected
26
+ if: steps.check.outputs.changed == 'true'
27
+ run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
28
+
29
+ - name: Create tag
30
+ if: steps.check.outputs.changed == 'true'
31
+ uses: actions/github-script@v5
32
+ with:
33
+ script: |
34
+ github.rest.git.createRef({
35
+ owner: context.repo.owner,
36
+ repo: context.repo.repo,
37
+ ref: 'refs/tags/v${{ steps.check.outputs.version }}',
38
+ sha: context.sha
39
+ })
40
+
41
+ release:
42
+ name: Creates release
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - name: Checkout code
46
+ uses: actions/checkout@v3
47
+
48
+ - name: Create Release
49
+ id: create_release
50
+ uses: actions/create-release@v1
51
+ env:
52
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53
+ with:
54
+ tag_name: ${{ github.ref }}
55
+ release_name: ${{ github.ref }}
56
+ draft: false
57
+ prerelease: false
58
+
59
+ publish:
60
+ name: Publish NPM.js package
61
+ runs-on: ubuntu-latest
62
+ steps:
63
+ - name: Checkout code
64
+ uses: actions/checkout@v3
65
+
66
+ - name: Setup Node.js
67
+ uses: actions/setup-node@v3
68
+ with:
69
+ node-version: '16.x'
70
+ registry-url: 'https://registry.npmjs.org'
71
+
72
+ - name: Install dependencies
73
+ run: npm ci
74
+
75
+ - name: Publish to npm.js
76
+ run: npm publish
77
+ env:
78
+ NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
@@ -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;
@@ -18723,9 +18727,6 @@ html {
18723
18727
  --text-opacity: 1;
18724
18728
  color: #798490;
18725
18729
  color: rgba(121, 132, 144, var(--text-opacity));
18726
- --bg-opacity: 1;
18727
- background-color: #F3F6F9;
18728
- background-color: rgba(243, 246, 249, var(--bg-opacity));
18729
18730
  }
18730
18731
 
18731
18732
  .psui-el-checkbox.disabled .psui-el-checkmark {
@@ -18774,7 +18775,7 @@ html {
18774
18775
  display: flex;
18775
18776
  cursor: pointer;
18776
18777
  align-items: center;
18777
- height: 18px;
18778
+ height: 100%;
18778
18779
  }
18779
18780
 
18780
18781
  .psui-el-checkbox.size-small .psui-el-checkmark span {
@@ -18823,7 +18824,7 @@ html {
18823
18824
  display: flex;
18824
18825
  cursor: pointer;
18825
18826
  align-items: center;
18826
- height: 24px;
18827
+ height: 100%;
18827
18828
  }
18828
18829
 
18829
18830
  .psui-el-checkbox.size-big .psui-el-checkmark span {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.37",
3
+ "version": "1.0.40",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
7
- "url": "https://bitbucket.org/policy-studio/policy-studio-ui-vue",
7
+ "url": "https://github.com/Policy-Studio/policy-studio-ui-vue",
8
8
  "license": "MIT",
9
9
  "keywords": [
10
10
  "vue",
@@ -1,7 +1,7 @@
1
1
  @layer components {
2
2
 
3
3
  .psui-el-checkbox {
4
- @apply psui-relative psui-text-gray-50 psui-bg-gray-10;
4
+ @apply psui-relative psui-text-gray-50;
5
5
 
6
6
  &.disabled {
7
7
  .psui-el-checkmark {
@@ -38,7 +38,7 @@
38
38
  }
39
39
  .psui-el-checkmark {
40
40
  @apply psui-flex psui-cursor-pointer psui-items-center;
41
- height: 18px;
41
+ height: 100%;
42
42
 
43
43
  span {
44
44
  margin-left: 8px;
@@ -77,7 +77,7 @@
77
77
  }
78
78
  .psui-el-checkmark {
79
79
  @apply psui-flex psui-cursor-pointer psui-items-center;
80
- height: 24px;
80
+ height: 100%;
81
81
 
82
82
  span {
83
83
  margin-left: 8px;
@@ -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;
@@ -28,7 +28,7 @@ export default {
28
28
  * It sets the value which should be monitored.
29
29
  */
30
30
  inputValue: {
31
- type: String,
31
+ type: [String, Boolean],
32
32
  },
33
33
  value:{
34
34
  type: Array
@@ -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>