@policystudio/policy-studio-ui-vue 1.0.33 → 1.0.36
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/dist/css/psui_styles.css
CHANGED
|
@@ -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
|
|
20083
|
-
|
|
20084
|
-
|
|
20085
|
-
|
|
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
|
|
20103
|
-
|
|
20104
|
-
|
|
20105
|
-
|
|
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
|
@@ -63,9 +63,12 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
&.status-resting {
|
|
66
|
-
.psui-el-input-wrapper
|
|
67
|
-
|
|
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
|
|
90
|
-
|
|
92
|
+
.psui-el-input-wrapper {
|
|
93
|
+
&:hover {
|
|
94
|
+
@apply psui-border-green-20
|
|
95
|
+
}
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
&.status-active {
|
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
<div
|
|
7
7
|
class="psui-el-input-wrapper"
|
|
8
|
-
@mouseenter="isHoveringInputWrapper = true"
|
|
9
|
-
@mouseleave="isHoveringInputWrapper = false"
|
|
10
|
-
:class="{ 'hover' : isHoveringInputWrapper }"
|
|
11
8
|
>
|
|
12
9
|
|
|
13
10
|
<div v-if="$slots.prepend" class="psui-el-input-prepend">
|
|
@@ -108,7 +105,6 @@ export default {
|
|
|
108
105
|
},
|
|
109
106
|
},
|
|
110
107
|
data: () => ({
|
|
111
|
-
isHoveringInputWrapper: false,
|
|
112
108
|
isFocus: false,
|
|
113
109
|
}),
|
|
114
110
|
computed: {
|
|
@@ -135,10 +131,12 @@ export default {
|
|
|
135
131
|
},
|
|
136
132
|
methods: {
|
|
137
133
|
onInputFocus($event) {
|
|
134
|
+
console.log('focus')
|
|
138
135
|
this.isFocus = true
|
|
139
136
|
this.$emit('focus', $event)
|
|
140
137
|
},
|
|
141
138
|
onInputBlur($event) {
|
|
139
|
+
console.log('blur')
|
|
142
140
|
this.isFocus = false
|
|
143
141
|
this.$emit('blur', $event)
|
|
144
142
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
v-if="getIconType === 'material-icons'"
|
|
5
5
|
class="material-icons-round"
|
|
6
6
|
:class="[getIconClasses]"
|
|
7
|
+
:style="{ fontSize: `${size}px`}"
|
|
7
8
|
>
|
|
8
9
|
{{ getIcon }}
|
|
9
10
|
</span>
|
|
@@ -11,8 +12,8 @@
|
|
|
11
12
|
<inline-svg
|
|
12
13
|
v-else
|
|
13
14
|
:src="icon"
|
|
14
|
-
:width="
|
|
15
|
-
:height="
|
|
15
|
+
:width="size"
|
|
16
|
+
:height="size"
|
|
16
17
|
:stroke="getColor"
|
|
17
18
|
:fill="getColor"
|
|
18
19
|
></inline-svg>
|
|
@@ -32,38 +33,30 @@ export default {
|
|
|
32
33
|
type: String,
|
|
33
34
|
default: 'more_horiz'
|
|
34
35
|
},
|
|
36
|
+
|
|
35
37
|
/**
|
|
36
38
|
* It sets the type of the icon.
|
|
37
39
|
*/
|
|
38
40
|
type: {
|
|
39
41
|
type: String,
|
|
40
42
|
},
|
|
43
|
+
|
|
41
44
|
/**
|
|
42
45
|
* It sets the style of the icon.
|
|
43
46
|
*/
|
|
44
47
|
iconClasses: {
|
|
45
|
-
type: String
|
|
48
|
+
type: String,
|
|
49
|
+
default: null
|
|
46
50
|
},
|
|
51
|
+
|
|
47
52
|
/**
|
|
48
|
-
* It sets the size of the icon.
|
|
53
|
+
* It sets the size of the icon.
|
|
49
54
|
*/
|
|
50
55
|
size: {
|
|
51
56
|
type: [Number, String],
|
|
52
|
-
},
|
|
53
|
-
/**
|
|
54
|
-
* It sets the width of the icon.
|
|
55
|
-
*/
|
|
56
|
-
width: {
|
|
57
|
-
type: [Number, String],
|
|
58
|
-
default: 24
|
|
59
|
-
},
|
|
60
|
-
/**
|
|
61
|
-
* It sets the height of the icon.
|
|
62
|
-
*/
|
|
63
|
-
height: {
|
|
64
|
-
type: [Number, String],
|
|
65
57
|
default: 24
|
|
66
58
|
},
|
|
59
|
+
|
|
67
60
|
/**
|
|
68
61
|
* It sets fill property of the icon.
|
|
69
62
|
*/
|
|
@@ -71,6 +64,7 @@ export default {
|
|
|
71
64
|
type: String,
|
|
72
65
|
default: null
|
|
73
66
|
},
|
|
67
|
+
|
|
74
68
|
/**
|
|
75
69
|
* It sets the color of the icon.
|
|
76
70
|
*/
|
|
@@ -83,6 +77,7 @@ export default {
|
|
|
83
77
|
typeof(tailwindConfig.theme.colors[value]) != 'undefined'
|
|
84
78
|
}
|
|
85
79
|
},
|
|
80
|
+
|
|
86
81
|
/**
|
|
87
82
|
* It set a animation icon if needed.
|
|
88
83
|
*/
|
|
@@ -90,6 +85,7 @@ export default {
|
|
|
90
85
|
type: String,
|
|
91
86
|
default: 'hourglass_top'
|
|
92
87
|
},
|
|
88
|
+
|
|
93
89
|
/**
|
|
94
90
|
* It sets a error when the icon is not available.
|
|
95
91
|
*/
|
|
@@ -120,14 +116,9 @@ export default {
|
|
|
120
116
|
},
|
|
121
117
|
getIconClasses() {
|
|
122
118
|
if(this.iconClasses) return this.iconClasses
|
|
123
|
-
return `${this.
|
|
124
|
-
},
|
|
125
|
-
getWidth() {
|
|
126
|
-
if(this.size) return this.size
|
|
127
|
-
return this.width
|
|
119
|
+
return `${this.color}`
|
|
128
120
|
},
|
|
129
121
|
getHeight() {
|
|
130
|
-
if(this.size) return this.size
|
|
131
122
|
return this.height
|
|
132
123
|
},
|
|
133
124
|
getColor() {
|
|
@@ -7,8 +7,8 @@ export default {
|
|
|
7
7
|
required: { control: 'boolean' },
|
|
8
8
|
},
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
const
|
|
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 =
|
|
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 =
|
|
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',
|