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

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.
@@ -20079,11 +20079,11 @@ html {
20079
20079
  padding: 11.5px 16px;
20080
20080
  }
20081
20081
 
20082
- .psui-el-input.layout-default.status-resting .psui-el-input-wrapper.hover {
20083
- --border-opacity: 1;
20084
- border-color: #64B5CE;
20085
- border-color: rgba(100, 181, 206, var(--border-opacity))
20086
- }
20082
+ .psui-el-input.layout-default.status-resting .psui-el-input-wrapper:hover {
20083
+ --border-opacity: 1;
20084
+ border-color: #64B5CE;
20085
+ border-color: rgba(100, 181, 206, var(--border-opacity))
20086
+ }
20087
20087
 
20088
20088
  .psui-el-input.layout-default.status-active .psui-el-input-wrapper {
20089
20089
  --border-opacity: 1;
@@ -20099,11 +20099,11 @@ html {
20099
20099
  padding: 7px 8px;
20100
20100
  }
20101
20101
 
20102
- .psui-el-input.layout-mini.status-resting .psui-el-input-wrapper.hover {
20103
- --border-opacity: 1;
20104
- border-color: #5DB883;
20105
- border-color: rgba(93, 184, 131, var(--border-opacity))
20106
- }
20102
+ .psui-el-input.layout-mini.status-resting .psui-el-input-wrapper:hover {
20103
+ --border-opacity: 1;
20104
+ border-color: #5DB883;
20105
+ border-color: rgba(93, 184, 131, var(--border-opacity))
20106
+ }
20107
20107
 
20108
20108
  .psui-el-input.layout-mini.status-active .psui-el-input-wrapper {
20109
20109
  --border-opacity: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.34",
3
+ "version": "1.0.37",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -63,9 +63,12 @@
63
63
  }
64
64
 
65
65
  &.status-resting {
66
- .psui-el-input-wrapper.hover {
67
- @apply psui-border-blue-50
66
+ .psui-el-input-wrapper{
67
+ &:hover {
68
+ @apply psui-border-blue-50
69
+ }
68
70
  }
71
+
69
72
  }
70
73
 
71
74
  &.status-active {
@@ -86,8 +89,10 @@
86
89
  padding: 7px 8px;
87
90
  }
88
91
  &.status-resting {
89
- .psui-el-input-wrapper.hover {
90
- @apply psui-border-green-20
92
+ .psui-el-input-wrapper {
93
+ &:hover {
94
+ @apply psui-border-green-20
95
+ }
91
96
  }
92
97
  }
93
98
  &.status-active {
@@ -4,10 +4,9 @@
4
4
  <label v-if="label"> {{ label }} </label>
5
5
 
6
6
  <div
7
- class="psui-el-input-wrapper"
8
- @mouseenter="isHoveringInputWrapper = true"
9
- @mouseleave="isHoveringInputWrapper = false"
10
- :class="{ 'hover' : isHoveringInputWrapper }"
7
+ class="psui-el-input-wrapper"
8
+ @mouseenter="$emit('mouseenter',$event)"
9
+ @mouseleave="$emit('mouseenter',$event)"
11
10
  >
12
11
 
13
12
  <div v-if="$slots.prepend" class="psui-el-input-prepend">
@@ -108,7 +107,6 @@ export default {
108
107
  },
109
108
  },
110
109
  data: () => ({
111
- isHoveringInputWrapper: false,
112
110
  isFocus: false,
113
111
  }),
114
112
  computed: {
@@ -135,10 +133,12 @@ export default {
135
133
  },
136
134
  methods: {
137
135
  onInputFocus($event) {
136
+ console.log('focus')
138
137
  this.isFocus = true
139
138
  this.$emit('focus', $event)
140
139
  },
141
140
  onInputBlur($event) {
141
+ console.log('blur')
142
142
  this.isFocus = false
143
143
  this.$emit('blur', $event)
144
144
  }
@@ -7,8 +7,8 @@ export default {
7
7
  required: { control: 'boolean' },
8
8
  },
9
9
  }
10
-
11
- const TemplateDefault = (args, { argTypes }) => ({
10
+
11
+ const TemplateInputText = (args, { argTypes }) => ({
12
12
  props: Object.keys(argTypes),
13
13
  components: { PsInput },
14
14
  data: () => {
@@ -21,19 +21,19 @@ const TemplateDefault = (args, { argTypes }) => ({
21
21
  },
22
22
  template: `
23
23
  <div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-3 psui-gap-6">
24
-
24
+
25
25
  <div class="psui-col-span-3 psui-mt-8">
26
26
  <h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Layout Default</h1>
27
27
  </div>
28
-
29
- <PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '' }" />
28
+
29
+ <PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '' }" />
30
30
  <PsInput label="Resting without hint" />
31
31
  <PsInput label="Resting with Placeholder" placeholder="This is a placeholder" />
32
32
 
33
33
  <PsInput v-bind="{...$props, label: 'Focus'}" />
34
34
  <PsInput label="Typing" placeholder="Type to see the effect..." />
35
35
  <PsInput v-bind="{...$props, label: 'Active', active: true }" />
36
-
36
+
37
37
  <PsInput v-bind="{...$props, label: 'Error', hasError: true }" />
38
38
  <PsInput v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
39
39
  <PsInput v-bind="{...$props, label: 'Prepend / Append ' }" >
@@ -44,17 +44,17 @@ const TemplateDefault = (args, { argTypes }) => ({
44
44
  Prepend
45
45
  </template>
46
46
  </PsInput>
47
-
47
+
48
48
  <PsInput label="Disabled" :disabled="true" value="100,000" />
49
49
  <PsInput v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }" />
50
50
  <PsInput v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" />
51
-
52
-
53
-
51
+
52
+
53
+
54
54
  <div class="psui-col-span-3 psui-mt-8">
55
55
  <h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Layout Mini</h1>
56
56
  </div>
57
-
57
+
58
58
  <PsInput layout="mini" label="Resting with hint" hint="This is a hint" value="1,653" />
59
59
  <PsInput layout="mini" label="Resting without hint" />
60
60
  <PsInput layout="mini" label="Resting with Placeholder" placeholder="This is a placeholder" />
@@ -62,7 +62,7 @@ const TemplateDefault = (args, { argTypes }) => ({
62
62
  <PsInput layout="mini" v-bind="{...$props, label: 'Focus'}" />
63
63
  <PsInput layout="mini" label="Typing" placeholder="Type to see the effect..." />
64
64
  <PsInput layout="mini" v-bind="{...$props, label: 'Active', active: true }" />
65
-
65
+
66
66
  <PsInput layout="mini" v-bind="{...$props, label: 'Error', hasError: true }" />
67
67
  <PsInput layout="mini" v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
68
68
  <PsInput layout="mini" v-bind="{...$props, label: 'Prepend / Append ' }" >
@@ -73,15 +73,120 @@ const TemplateDefault = (args, { argTypes }) => ({
73
73
  Prepend
74
74
  </template>
75
75
  </PsInput>
76
-
76
+
77
77
  <PsInput layout="mini" label="Disabled" :disabled="true" value="100,000" />
78
78
  <PsInput layout="mini" v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }" />
79
79
  <PsInput layout="mini" v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" />
80
-
81
- </div>
80
+
81
+ </div>
82
82
  `
83
83
  })
84
-
84
+
85
+ const TemplateInputPassword = (args, { argTypes }) => ({
86
+ props: Object.keys(argTypes),
87
+ components: { PsInput },
88
+ data: () => {
89
+ return {
90
+ validator: {
91
+ hasError: true,
92
+ label: 'Error message!'
93
+ }
94
+ }
95
+ },
96
+ template: `
97
+ <div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-3 psui-gap-6">
98
+
99
+ <div class="psui-col-span-3 psui-mt-8">
100
+ <h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Password Layout Default</h1>
101
+ </div>
102
+
103
+ <PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '', hint: 'Between 8 and 16 characters' }" >
104
+ <template v-slot:append>
105
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
106
+ visibility_off
107
+ </span>
108
+ </template>
109
+ </PsInput>
110
+
111
+ <PsInput label="Resting without hint" hint="Between 8 and 16 characters">
112
+ <template v-slot:append>
113
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
114
+ visibility_off
115
+ </span>
116
+ </template>
117
+ </PsInput>
118
+
119
+ <PsInput label="Resting with Placeholder" placeholder="This is a placeholder" hint="Between 8 and 16 characters">
120
+ <template v-slot:append>
121
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
122
+ visibility_off
123
+ </span>
124
+ </template>
125
+ </PsInput>
126
+
127
+
128
+ <PsInput v-bind="{...$props, label: 'Focus'}" hint="Between 8 and 16 characters">
129
+ <template v-slot:append>
130
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
131
+ visibility_off
132
+ </span>
133
+ </template>
134
+ </PsInput>
135
+
136
+ <PsInput v-bind="{...$props, label: 'Typing', placeholder: 'Type to see the effect...', value: '' }" hint="Between 8 and 16 characters" >
137
+ <template v-slot:append>
138
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
139
+ visibility_off
140
+ </span>
141
+ </template>
142
+ </PsInput>
143
+
144
+ <PsInput v-bind="{label: 'Active', active: true }" value="Password123" hint="Between 8 and 16 characters">
145
+ <template v-slot:append>
146
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
147
+ visibility
148
+ </span>
149
+ </template>
150
+ </PsInput>
151
+
152
+ <PsInput v-bind="{...$props, label: 'Error', hasError: true }" hint="Between 8 and 16 characters" />
153
+ <PsInput v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
154
+ <PsInput v-bind="{...$props, label: 'Prepend / Append ' }" hint="Between 8 and 16 characters">
155
+ <template v-slot:append>
156
+ Append
157
+ </template>
158
+ <template v-slot:prepend>
159
+ Prepend
160
+ </template>
161
+ </PsInput>
162
+
163
+ <PsInput label="Disabled" :disabled="true" value="100,000" hint="Between 8 and 16 characters">
164
+ <template v-slot:append>
165
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
166
+ visibility
167
+ </span>
168
+ </template>
169
+ </PsInput>
170
+
171
+ <PsInput v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }">
172
+ <template v-slot:append>
173
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
174
+ visibility_off
175
+ </span>
176
+ </template>
177
+ </PsInput>
178
+
179
+ <PsInput v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" hint="Between 8 and 16 characters">
180
+ <template v-slot:append>
181
+ <span class="material-icons-round psui-text-gray-50 psui-mr-2">
182
+ visibility_off
183
+ </span>
184
+ </template>
185
+ </PsInput>
186
+ </div>
187
+ `
188
+ })
189
+
85
190
  const TemplateSlots = (args, { argTypes }) => ({
86
191
  props: Object.keys(argTypes),
87
192
  components: { PsInput },
@@ -91,12 +196,12 @@ const TemplateSlots = (args, { argTypes }) => ({
91
196
  <template v-slot:append>
92
197
  ft²
93
198
  </template>
94
- </PsInput>
199
+ </PsInput>
95
200
  <PsInput v-bind="$props" class="psui-mb-4">
96
201
  <template v-slot:prepend>
97
202
  ft²
98
203
  </template>
99
- </PsInput>
204
+ </PsInput>
100
205
  <PsInput v-bind="$props" class="psui-mb-4">
101
206
  <template v-slot:prepend>
102
207
  ft²
@@ -108,8 +213,8 @@ const TemplateSlots = (args, { argTypes }) => ({
108
213
  </div>
109
214
  `
110
215
  })
111
-
112
- export const InputText = TemplateDefault.bind({})
216
+
217
+ export const InputText = TemplateInputText.bind({})
113
218
  InputText.args = {
114
219
  label: 'Input Text',
115
220
  placeholder: 'Placeholder',
@@ -118,8 +223,8 @@ InputText.args = {
118
223
  required: false,
119
224
  value: 10,
120
225
  }
121
-
122
- export const InputPassword = TemplateDefault.bind({})
226
+
227
+ export const InputPassword = TemplateInputPassword.bind({})
123
228
  InputPassword.args = {
124
229
  type: 'password',
125
230
  label: 'Password',
@@ -127,7 +232,7 @@ InputPassword.args = {
127
232
  disabled: false,
128
233
  required: false,
129
234
  }
130
-
235
+
131
236
  export const InputSlots = TemplateSlots.bind({})
132
237
  InputSlots.args = {
133
238
  label: 'Label',