@policystudio/policy-studio-ui-vue 1.0.14 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -58,6 +58,10 @@ export default {
58
58
  </script>
59
59
 
60
60
  <style scoped>
61
+ /*
62
+ @TODO - Fix the apply error
63
+ https://www.dropbox.com/s/83vwthcdvdt5t97/Screen%20Shot%202022-01-06%20at%2011.49.00%20AM.png?dl=0
64
+
61
65
  .ps-switch {
62
66
  width: 46px;
63
67
  }
@@ -89,5 +93,5 @@ input:checked + .toggle-bg:after {
89
93
 
90
94
  input:checked + .toggle-bg {
91
95
  @apply psui-bg-green-20 psui-border-green-20;
92
- }
96
+ } */
93
97
  </style>
@@ -12,6 +12,13 @@
12
12
  :aria-required="required"
13
13
  :aria-invalid="validation.hasError"
14
14
  :class="[getInputClasses, { 'psui-border-red' : validation.hasError }]"
15
+ :required="required"
16
+ @focus="$emit('focus')"
17
+ @blur="$emit('blur')"
18
+ @input="$emit('input', $event.target.value)"
19
+ @keydown.enter="$emit('keydown', $event.target.value)"
20
+ @change="$emit('change')"
21
+ v-bind="getAttrs"
15
22
  />
16
23
  <div class="psui-absolute psui-inset-y-0 psui-right-0 psui-pr-2 psui-flex psui-items-center" v-if="this.$slots.append">
17
24
  <slot name="append"></slot>
@@ -56,6 +63,9 @@ export default {
56
63
  return { hasError: false, checked: false, filled: false, required: false }
57
64
  }
58
65
  },
66
+ value: {
67
+ required: true,
68
+ },
59
69
  },
60
70
  computed: {
61
71
  getInputClasses() {
@@ -66,8 +76,17 @@ export default {
66
76
  },
67
77
  getPadding() {
68
78
  return this.mini ? 'psui-px-2 mini-p' : 'psui-py-2 psui-px-4'
79
+ },
80
+ getAttrs() {
81
+ const defaultAttrs = {
82
+ autocapitalize: 'sentences',
83
+ autocomplete: 'chrome-off',
84
+ autocorrect: 'off',
85
+ spellcheck: 'spellcheck'
86
+ }
87
+ return { ...defaultAttrs, ...this.$attrs }
69
88
  }
70
- }
89
+ },
71
90
  }
72
91
  </script>
73
92