@policystudio/policy-studio-ui-vue 1.0.55 → 1.0.61
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 +289 -263
- package/package.json +1 -1
- package/src/assets/scss/components/PsAccordion.scss +8 -3
- package/src/assets/scss/components/PsInputSelect.scss +53 -32
- package/src/assets/scss/components/PsMiniTag.scss +52 -53
- package/src/assets/scss/components/PsTabHeader.scss +19 -2
- package/src/assets/scss/components/PsTooltip.scss +1 -1
- package/src/components/accordion/PsAccordionItem.vue +15 -4
- package/src/components/badges-and-tags/PsMiniTag.vue +5 -1
- package/src/components/controls/PsCheckboxSimple.vue +40 -5
- package/src/components/controls/PsDraggable.vue +3 -4
- package/src/components/controls/PsRadioButton.vue +12 -9
- package/src/components/forms/PsDropdown.vue +9 -0
- package/src/components/forms/PsInputSelect.vue +4 -2
- package/src/stories/CheckboxSimple.stories.js +6 -5
- package/tailwind.config.js +1 -1
- package/vetur/attributes.json +150 -42
- package/vetur/tags.json +56 -8
package/package.json
CHANGED
|
@@ -6,13 +6,18 @@
|
|
|
6
6
|
border-bottom: 1px solid #e6ecf2;
|
|
7
7
|
|
|
8
8
|
&-header {
|
|
9
|
-
@apply psui-flex psui-
|
|
9
|
+
@apply psui-flex psui-justify-between psui-items-center;
|
|
10
10
|
padding-top: 16px;
|
|
11
11
|
padding-bottom: 16px;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
@apply psui-text-
|
|
13
|
+
&-wrapper {
|
|
14
|
+
@apply psui-flex psui-w-full psui-cursor-pointer psui-transition-all psui-justify-between transition-default psui-text-gray-80;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
@apply psui-text-blue-60;
|
|
18
|
+
}
|
|
15
19
|
}
|
|
20
|
+
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
&-icon {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.psui-el-input-select {
|
|
3
|
-
@apply psui-
|
|
3
|
+
@apply psui-flex psui-flex-col psui-w-full psui-relative psui-text-gray-40 psui-box-border;
|
|
4
4
|
transition: ease 130ms;
|
|
5
5
|
|
|
6
6
|
&.disabled {
|
|
@@ -11,13 +11,17 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
select {
|
|
14
|
-
@apply psui-text-gray-40 psui-border-gray-20 psui-bg-gray-20 !important
|
|
14
|
+
@apply psui-text-gray-40 psui-border-gray-20 psui-bg-gray-20 !important;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
|
|
17
|
+
.psui-el-input-select-wrapper {
|
|
18
|
+
&::after {
|
|
19
|
+
@apply psui-text-gray-50 !important;
|
|
20
|
+
z-index: 100 !important;
|
|
21
|
+
}
|
|
19
22
|
}
|
|
20
23
|
}
|
|
24
|
+
|
|
21
25
|
|
|
22
26
|
&.layout-default {
|
|
23
27
|
|
|
@@ -26,20 +30,27 @@
|
|
|
26
30
|
@apply psui-border-blue-50 psui-text-gray-60
|
|
27
31
|
}
|
|
28
32
|
}
|
|
33
|
+
|
|
34
|
+
.psui-el-input-select-wrapper {
|
|
35
|
+
@apply psui-relative psui-w-auto;
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
&::after {
|
|
38
|
+
@apply psui-absolute psui-inline-block psui-text-gray-50;
|
|
39
|
+
content: 'arrow_drop_down';
|
|
40
|
+
font-family: 'Material Icons Round';
|
|
41
|
+
font-size: 24px;
|
|
42
|
+
top: 13%;
|
|
43
|
+
left: calc(100% - 26px);
|
|
44
|
+
z-index: -20;
|
|
45
|
+
}
|
|
38
46
|
}
|
|
47
|
+
|
|
39
48
|
|
|
40
49
|
select {
|
|
41
|
-
@apply psui-appearance-none psui-bg-transparent psui-text-big psui-
|
|
42
|
-
padding: 11.5px 16px;
|
|
50
|
+
@apply psui-appearance-none psui-bg-transparent psui-text-big psui-border psui-border-gray-30 psui-rounded-md psui-text-gray-40;
|
|
51
|
+
padding: 11.5px 26px 11.5px 16px;
|
|
52
|
+
min-width: 100%;
|
|
53
|
+
|
|
43
54
|
|
|
44
55
|
&:hover,
|
|
45
56
|
&:active {
|
|
@@ -51,6 +62,8 @@
|
|
|
51
62
|
}
|
|
52
63
|
}
|
|
53
64
|
|
|
65
|
+
|
|
66
|
+
|
|
54
67
|
}
|
|
55
68
|
|
|
56
69
|
|
|
@@ -68,9 +81,22 @@
|
|
|
68
81
|
|
|
69
82
|
&.layout-mini {
|
|
70
83
|
|
|
84
|
+
.psui-el-input-select-wrapper {
|
|
85
|
+
@apply psui-relative psui-w-full;
|
|
86
|
+
|
|
87
|
+
&::after {
|
|
88
|
+
@apply psui-absolute psui-inline-block psui-text-gray-50;
|
|
89
|
+
content: 'unfold_more';
|
|
90
|
+
font-family: 'Material Icons Round';
|
|
91
|
+
font-size: 18px;
|
|
92
|
+
top: 13%;
|
|
93
|
+
left: calc(100% - 26px);
|
|
94
|
+
z-index: -20;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
71
97
|
|
|
72
98
|
select {
|
|
73
|
-
@apply psui-text-small psui-appearance-none psui-bg-transparent psui-
|
|
99
|
+
@apply psui-text-small psui-w-full psui-appearance-none psui-bg-transparent psui-border psui-border-gray-30;
|
|
74
100
|
border-radius: 4px;
|
|
75
101
|
padding: 7px 8px;
|
|
76
102
|
|
|
@@ -82,26 +108,21 @@
|
|
|
82
108
|
&:focus {
|
|
83
109
|
@apply psui-border-green-70 psui-text-gray-50
|
|
84
110
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&::after {
|
|
90
|
-
@apply psui-absolute psui-inline-block psui-text-gray-50 ;
|
|
91
|
-
content: 'unfold_more';
|
|
92
|
-
font-family: 'Material Icons Round';
|
|
93
|
-
font-size: 18px;
|
|
94
|
-
top: 4px;
|
|
95
|
-
right: 4px;
|
|
96
|
-
z-index: -20;
|
|
97
|
-
}
|
|
111
|
+
|
|
112
|
+
}
|
|
98
113
|
|
|
99
114
|
&.selected {
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
|
|
116
|
+
.psui-el-input-select-wrapper {
|
|
117
|
+
select {
|
|
118
|
+
@apply psui-border-green-20 !important;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:not(option) {
|
|
123
|
+
@apply psui-text-green-70;
|
|
102
124
|
}
|
|
103
125
|
}
|
|
104
|
-
|
|
105
126
|
}
|
|
106
127
|
}
|
|
107
128
|
}
|
|
@@ -1,56 +1,55 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
letter-spacing: 0.5px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&-layout{
|
|
15
|
-
&-solid-info{
|
|
16
|
-
@apply psui-bg-blue-50 psui-text-white
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&-info {
|
|
20
|
-
@apply psui-bg-blue-20 psui-text-blue-60
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&-solid-success {
|
|
24
|
-
@apply psui-bg-green-20 psui-text-white
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&-success {
|
|
28
|
-
@apply psui-bg-green-10 psui-text-green-70
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&-solid-warning {
|
|
32
|
-
@apply psui-bg-yellow-20 psui-text-white
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&-warning {
|
|
36
|
-
@apply psui-bg-yellow-10 psui-text-yellow-70
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&-solid-error {
|
|
40
|
-
@apply psui-bg-red-20 psui-text-white
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&-error {
|
|
44
|
-
@apply psui-bg-red-10 psui-text-red-20
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&-solid-default {
|
|
48
|
-
@apply psui-bg-gray-40 psui-text-white
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&-default {
|
|
52
|
-
@apply psui-bg-gray-20 psui-text-gray-50
|
|
53
|
-
}
|
|
54
|
-
}
|
|
2
|
+
.psui-el-mini-tag {
|
|
3
|
+
@apply psui-flex psui-rounded-full psui-items-center psui-justify-center psui-flex-row;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
|
|
6
|
+
span {
|
|
7
|
+
@apply psui-w-full psui-font-bold psui-uppercase;
|
|
8
|
+
padding: 3px 8px 3px 8px;
|
|
9
|
+
font-size: 10px;
|
|
10
|
+
letter-spacing: 0.5px;
|
|
55
11
|
}
|
|
12
|
+
|
|
13
|
+
&-layout{
|
|
14
|
+
&-solid-info{
|
|
15
|
+
@apply psui-bg-blue-50 psui-text-white
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-info {
|
|
19
|
+
@apply psui-bg-blue-20 psui-text-blue-60
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-solid-success {
|
|
23
|
+
@apply psui-bg-green-20 psui-text-white
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-success {
|
|
27
|
+
@apply psui-bg-green-10 psui-text-green-70
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-solid-warning {
|
|
31
|
+
@apply psui-bg-yellow-20 psui-text-white
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-warning {
|
|
35
|
+
@apply psui-bg-yellow-10 psui-text-yellow-70
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-solid-error {
|
|
39
|
+
@apply psui-bg-red-20 psui-text-white
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-error {
|
|
43
|
+
@apply psui-bg-red-10 psui-text-red-20
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-solid-default {
|
|
47
|
+
@apply psui-bg-gray-40 psui-text-white
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&-default {
|
|
51
|
+
@apply psui-bg-gray-20 psui-text-gray-50
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
56
55
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
button {
|
|
7
7
|
@apply transition-default psui-text-small;
|
|
8
8
|
&.status-disabled {
|
|
9
|
-
@apply cursor-not-allowed
|
|
9
|
+
@apply cursor-not-allowed;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
&:focus {
|
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
/* ----------------------------------------- */
|
|
25
25
|
&.layout-standard {
|
|
26
26
|
@apply psui-rounded-md;
|
|
27
|
+
|
|
28
|
+
.psui-el-tooltip{
|
|
29
|
+
&:not(:last-child) {
|
|
30
|
+
margin-right: 20px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
27
33
|
|
|
28
34
|
button {
|
|
29
35
|
@apply psui-bg-gray-10 psui-text-gray-60;
|
|
@@ -61,7 +67,11 @@
|
|
|
61
67
|
/* Layout Underline */
|
|
62
68
|
/* ----------------------------------------- */
|
|
63
69
|
&.layout-underline {
|
|
64
|
-
|
|
70
|
+
.psui-el-tooltip {
|
|
71
|
+
&:not(:last-child) {
|
|
72
|
+
margin-right: 20px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
65
75
|
|
|
66
76
|
button {
|
|
67
77
|
@apply psui-text-gray-50 psui-font-bold;
|
|
@@ -91,6 +101,13 @@
|
|
|
91
101
|
/* Layout Folder */
|
|
92
102
|
/* ----------------------------------------- */
|
|
93
103
|
&.layout-folder {
|
|
104
|
+
|
|
105
|
+
.psui-el-tooltip{
|
|
106
|
+
&:not(:last-child) {
|
|
107
|
+
margin-right: 20px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
94
111
|
button {
|
|
95
112
|
@apply psui-bg-gray-10 psui-text-gray-50 psui-rounded-t;
|
|
96
113
|
padding: 9px 12px;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@apply psui-relative;
|
|
6
6
|
|
|
7
7
|
.psui-el-tooltip-dialog {
|
|
8
|
-
@apply psui-fixed psui-opacity-0 psui-transition-opacity psui-duration-300 psui-ease-in-out;
|
|
8
|
+
@apply psui-fixed psui-opacity-0 psui-transition-opacity psui-duration-300 psui-ease-in-out psui-z-10;
|
|
9
9
|
transition-delay: 0.4s;
|
|
10
10
|
|
|
11
11
|
.psui-el-tooltip-content {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="psui-el-accordion-item" :class="`status-${isOpen ? 'opened' : 'closed'}`">
|
|
3
|
-
<div
|
|
4
|
-
<
|
|
5
|
-
<
|
|
3
|
+
<div class="psui-el-accordion-item-header">
|
|
4
|
+
<slot name='custom-header' :toggle="toggle" :isOpen="isOpen">
|
|
5
|
+
<div @click="toggle" class="psui-el-accordion-item-header-wrapper" v-if="!hasCustomHeader">
|
|
6
|
+
<h2 v-if="title" class="psui-el-accordion-item-title">{{ title }}</h2>
|
|
7
|
+
<i class="psui-el-accordion-item-icon">{{ getIcon }}</i>
|
|
8
|
+
</div>
|
|
9
|
+
</slot>
|
|
6
10
|
</div>
|
|
7
11
|
<transition
|
|
8
12
|
name="accordion-fade"
|
|
@@ -20,6 +24,7 @@
|
|
|
20
24
|
|
|
21
25
|
<script>
|
|
22
26
|
import { getParentVueComponentByName } from '../../util/GeneralFunctions'
|
|
27
|
+
|
|
23
28
|
export default {
|
|
24
29
|
name: 'PsAccordionItem',
|
|
25
30
|
props: {
|
|
@@ -28,7 +33,6 @@ export default {
|
|
|
28
33
|
*/
|
|
29
34
|
title: {
|
|
30
35
|
type: String,
|
|
31
|
-
required: true,
|
|
32
36
|
},
|
|
33
37
|
/**
|
|
34
38
|
* It sets the status of the accordion item when mounted.
|
|
@@ -42,6 +46,13 @@ export default {
|
|
|
42
46
|
*/
|
|
43
47
|
icon: {
|
|
44
48
|
type: String
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* It sets if it has a custom header
|
|
52
|
+
*/
|
|
53
|
+
hasCustomHeader: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false
|
|
45
56
|
}
|
|
46
57
|
},
|
|
47
58
|
data() {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="psui-el-mini-tag"
|
|
4
|
+
:class="getComponentClass"
|
|
5
|
+
@click="$emit('click', $event.target)"
|
|
6
|
+
>
|
|
3
7
|
<span>{{ message }}</span>
|
|
4
8
|
</div>
|
|
5
9
|
</template>
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class='psui-el-checkbox'
|
|
4
|
+
@click="$emit('click')"
|
|
5
|
+
:class="[getComponentClass, {'disabled':disabled}]"
|
|
6
|
+
v-bind="getComponentAttrs"
|
|
7
|
+
>
|
|
3
8
|
<input
|
|
4
9
|
type="checkbox"
|
|
5
10
|
:checked="checked"
|
|
6
11
|
:disabled="disabled"
|
|
7
12
|
:name="label"
|
|
13
|
+
:id="getInputId"
|
|
14
|
+
v-bind="inputAttrs"
|
|
15
|
+
@change="$emit('change')"
|
|
8
16
|
/>
|
|
9
17
|
<label
|
|
10
|
-
:for="
|
|
18
|
+
:for="getInputId"
|
|
11
19
|
class="psui-el-checkmark"
|
|
12
20
|
>
|
|
13
|
-
<slot
|
|
14
|
-
|
|
21
|
+
<slot name="content">
|
|
22
|
+
<span>{{ label }}</span>
|
|
23
|
+
</slot>
|
|
15
24
|
</label>
|
|
16
25
|
</div>
|
|
17
26
|
</template>
|
|
18
27
|
|
|
19
28
|
<script>
|
|
20
29
|
//FIGMA CONTROLS & SELECTORS https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64852
|
|
30
|
+
import { randomString } from '../../util/GeneralFunctions'
|
|
21
31
|
|
|
22
32
|
export default {
|
|
23
33
|
name: 'PsCheckboxSimple',
|
|
@@ -35,10 +45,20 @@ export default {
|
|
|
35
45
|
type: Boolean,
|
|
36
46
|
default: false,
|
|
37
47
|
},
|
|
48
|
+
/**
|
|
49
|
+
* Sets the input as checked
|
|
50
|
+
*/
|
|
38
51
|
checked: {
|
|
39
52
|
type: Boolean,
|
|
40
53
|
default: false
|
|
41
54
|
},
|
|
55
|
+
/**
|
|
56
|
+
* Add html attributes to the element input
|
|
57
|
+
*/
|
|
58
|
+
inputAttrs: {
|
|
59
|
+
type: Object,
|
|
60
|
+
default: () => ({})
|
|
61
|
+
},
|
|
42
62
|
/**
|
|
43
63
|
* It set the of the checkbox input. eg: big and small.
|
|
44
64
|
*/
|
|
@@ -56,10 +76,25 @@ export default {
|
|
|
56
76
|
validator: (value)=> ['default','mixed'].includes(value)
|
|
57
77
|
}
|
|
58
78
|
},
|
|
79
|
+
inheritAttrs: false,
|
|
59
80
|
computed:{
|
|
60
81
|
getComponentClass(){
|
|
61
82
|
return `size-${this.size} layout-${this.layout}`
|
|
62
|
-
},
|
|
83
|
+
},
|
|
84
|
+
getInputId() {
|
|
85
|
+
if (this?.inputAttrs?.id) {
|
|
86
|
+
return this.inputAttrs.id
|
|
87
|
+
} else if (this?.$attrs?.id) {
|
|
88
|
+
return this.$attrs.id
|
|
89
|
+
} else {
|
|
90
|
+
return randomString(16)
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
getComponentAttrs() {
|
|
94
|
+
let componentAttrs = { ... this.$attrs }
|
|
95
|
+
delete componentAttrs.id
|
|
96
|
+
return componentAttrs
|
|
97
|
+
}
|
|
63
98
|
},
|
|
64
99
|
}
|
|
65
100
|
</script>
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
class="psui-w-full psui-flex psui-items-center"
|
|
33
33
|
>
|
|
34
34
|
<span class="psui-el-draggable-item-title">
|
|
35
|
-
<
|
|
35
|
+
<PsCheckboxSimple
|
|
36
36
|
size="small"
|
|
37
|
-
:value="column.isActive"
|
|
38
37
|
:label="column.title"
|
|
39
38
|
:class="{'active' : column.isActive}"
|
|
39
|
+
:checked="column.isActive"
|
|
40
40
|
:disabled="column.isDisabled"
|
|
41
41
|
class="psui-el-draggable-item-checkbox"
|
|
42
|
-
@
|
|
42
|
+
@change="$emit('on-select-item', { studyKey: getColumns.key, indexColumnGroup, indexColumn, columnGroupKey: columnGroup.key })"
|
|
43
43
|
/>
|
|
44
44
|
</span>
|
|
45
45
|
<span class="psui-el-draggable-item-append">
|
|
@@ -80,7 +80,6 @@ export default {
|
|
|
80
80
|
},
|
|
81
81
|
computed: {
|
|
82
82
|
getStatus() {
|
|
83
|
-
console.log('var:', this.column.key)
|
|
84
83
|
if (this.column.key == 'compliance_margin') {
|
|
85
84
|
return true
|
|
86
85
|
} else {
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class='psui-el-radio' :class="[getComponentClass, {'disabled':disabled}]" >
|
|
3
|
-
<input
|
|
4
|
-
:id="
|
|
5
|
-
type="radio"
|
|
3
|
+
<input
|
|
4
|
+
:id="inputId"
|
|
5
|
+
type="radio"
|
|
6
6
|
:value="inputValue"
|
|
7
7
|
v-model="model"
|
|
8
8
|
:disabled='disabled'
|
|
9
9
|
/>
|
|
10
|
-
<label :for="
|
|
10
|
+
<label :for="inputId" class="psui-el-checkmark"><span>{{ label }}</span></label>
|
|
11
11
|
</div>
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
</template>
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
<script>
|
|
16
16
|
//FIGMA CONTROLS & SELECTORS https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64852
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
export default {
|
|
19
19
|
name: 'PsRadioButton',
|
|
20
20
|
props: {
|
|
21
|
+
inputId: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ''
|
|
24
|
+
},
|
|
21
25
|
/**
|
|
22
26
|
* It sets the label of the radio button.
|
|
23
27
|
*/
|
|
@@ -64,5 +68,4 @@ export default {
|
|
|
64
68
|
}
|
|
65
69
|
},
|
|
66
70
|
}
|
|
67
|
-
</script>
|
|
68
|
-
|
|
71
|
+
</script>
|
|
@@ -70,6 +70,13 @@ export default {
|
|
|
70
70
|
type: Boolean,
|
|
71
71
|
default: true,
|
|
72
72
|
},
|
|
73
|
+
/**
|
|
74
|
+
* Disable the toogle on click. default: false.
|
|
75
|
+
*/
|
|
76
|
+
disabled: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false,
|
|
79
|
+
},
|
|
73
80
|
},
|
|
74
81
|
data() {
|
|
75
82
|
return {
|
|
@@ -90,6 +97,8 @@ export default {
|
|
|
90
97
|
},
|
|
91
98
|
methods: {
|
|
92
99
|
toggle() {
|
|
100
|
+
if (this.disabled) return
|
|
101
|
+
|
|
93
102
|
if (!this.show) {
|
|
94
103
|
this.open()
|
|
95
104
|
} else {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="psui-el-input-select" :class="[{'
|
|
2
|
+
<div class="psui-el-input-select" :class="[getComponentClass, {'selected':selectedClass}, {'disabled':disabled}]">
|
|
3
3
|
<label :for='label' v-if="label" >{{ label }}</label>
|
|
4
|
+
<div class="psui-el-input-select-wrapper">
|
|
4
5
|
<select
|
|
5
6
|
:name="label"
|
|
6
7
|
:id="label"
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
<option value='' disabled>Select</option>
|
|
10
11
|
<option v-for="item in getItems" :value="item[keyValue]" :key="item[keyValue]">{{ item[keyLabel] }}</option>
|
|
11
12
|
</select>
|
|
13
|
+
</div>
|
|
12
14
|
<p v-if="optionalLabel && !disabled && layout !== 'mini'" class="psui-el-input-helper">{{ optionalLabel }}</p>
|
|
13
15
|
</div>
|
|
14
16
|
</template>
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
<script>
|
|
17
19
|
|
|
18
20
|
export default {
|
|
19
|
-
name: '
|
|
21
|
+
name: 'PsInputSelect',
|
|
20
22
|
props: {
|
|
21
23
|
/**
|
|
22
24
|
* It sets the items which will be rendered within the select input.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PsCheckboxSimple from '../components/controls/PsCheckboxSimple.vue'
|
|
2
2
|
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
3
|
export default {
|
|
4
|
-
title: 'Components/
|
|
4
|
+
title: 'Components/Inputs V2/Checkbox',
|
|
5
5
|
component: PsCheckboxSimple,
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -23,8 +23,8 @@ const defaultTemplate = (args, {argTypes}) => ({
|
|
|
23
23
|
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
24
24
|
<p>Active</p>
|
|
25
25
|
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
26
|
-
<PsCheckboxSimple v-bind="$props" label='Label 3'
|
|
27
|
-
<PsCheckboxSimple v-bind="$props" label='Label 4'
|
|
26
|
+
<PsCheckboxSimple v-bind="$props" label='Label 3' checked />
|
|
27
|
+
<PsCheckboxSimple v-bind="$props" label='Label 4' checked size='small'/>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
@@ -37,8 +37,9 @@ const defaultTemplate = (args, {argTypes}) => ({
|
|
|
37
37
|
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
38
38
|
<p>Disabled</p>
|
|
39
39
|
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
40
|
-
<PsCheckboxSimple v-bind="$props" label='
|
|
41
|
-
<PsCheckboxSimple v-bind="$props" label='
|
|
40
|
+
<PsCheckboxSimple v-bind="$props" label='Input via inputAttrs' :inputAttrs="{ id: 'my-input-id' }" disabled/>
|
|
41
|
+
<PsCheckboxSimple v-bind="$props" label='Input via component id' size='small' id="my-component-id" data-test="test" disabled/>
|
|
42
|
+
<PsCheckboxSimple v-bind="$props" label='Input fallback' size='small' disabled/>
|
|
42
43
|
</div>
|
|
43
44
|
</div>
|
|
44
45
|
</div>
|