@policystudio/policy-studio-ui-vue 1.0.58 → 1.0.60
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 +70 -50
- 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/components/accordion/PsAccordionItem.vue +15 -4
- package/src/components/controls/PsCheckboxSimple.vue +40 -5
- package/src/components/forms/PsInputSelect.vue +4 -2
- package/src/stories/CheckboxSimple.stories.js +4 -3
- package/vetur/attributes.json +150 -42
- package/vetur/tags.json +56 -8
package/dist/css/psui_styles.css
CHANGED
|
@@ -17391,9 +17391,9 @@ html {
|
|
|
17391
17391
|
}
|
|
17392
17392
|
|
|
17393
17393
|
.psui-el-input-select {
|
|
17394
|
-
width: 100%;
|
|
17395
17394
|
display: flex;
|
|
17396
17395
|
flex-direction: column;
|
|
17396
|
+
width: 100%;
|
|
17397
17397
|
position: relative;
|
|
17398
17398
|
--text-opacity: 1;
|
|
17399
17399
|
color: #A2ACB7;
|
|
@@ -17421,15 +17421,15 @@ html {
|
|
|
17421
17421
|
border-color: rgba(230, 236, 242, var(--border-opacity)) !important;
|
|
17422
17422
|
--bg-opacity: 1 !important;
|
|
17423
17423
|
background-color: #E6ECF2 !important;
|
|
17424
|
-
background-color: rgba(230, 236, 242, var(--bg-opacity)) !important
|
|
17424
|
+
background-color: rgba(230, 236, 242, var(--bg-opacity)) !important;
|
|
17425
17425
|
}
|
|
17426
17426
|
|
|
17427
|
-
.psui-el-input-select.disabled::after {
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17427
|
+
.psui-el-input-select.disabled .psui-el-input-select-wrapper::after {
|
|
17428
|
+
--text-opacity: 1 !important;
|
|
17429
|
+
color: #798490 !important;
|
|
17430
|
+
color: rgba(121, 132, 144, var(--text-opacity)) !important;
|
|
17431
|
+
z-index: 100 !important;
|
|
17432
|
+
}
|
|
17433
17433
|
|
|
17434
17434
|
.psui-el-input-select.layout-default.selected select {
|
|
17435
17435
|
--border-opacity: 1;
|
|
@@ -17440,20 +17440,25 @@ html {
|
|
|
17440
17440
|
color: rgba(81, 94, 106, var(--text-opacity))
|
|
17441
17441
|
}
|
|
17442
17442
|
|
|
17443
|
-
.psui-el-input-select.layout-default
|
|
17444
|
-
position:
|
|
17445
|
-
|
|
17446
|
-
--text-opacity: 1;
|
|
17447
|
-
color: #798490;
|
|
17448
|
-
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17449
|
-
content: 'arrow_drop_down';
|
|
17450
|
-
font-family: 'Material Icons Round';
|
|
17451
|
-
font-size: 24px;
|
|
17452
|
-
top: 38px;
|
|
17453
|
-
right: 15px;
|
|
17454
|
-
z-index: -20;
|
|
17443
|
+
.psui-el-input-select.layout-default .psui-el-input-select-wrapper {
|
|
17444
|
+
position: relative;
|
|
17445
|
+
width: auto;
|
|
17455
17446
|
}
|
|
17456
17447
|
|
|
17448
|
+
.psui-el-input-select.layout-default .psui-el-input-select-wrapper::after {
|
|
17449
|
+
position: absolute;
|
|
17450
|
+
display: inline-block;
|
|
17451
|
+
--text-opacity: 1;
|
|
17452
|
+
color: #798490;
|
|
17453
|
+
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17454
|
+
content: 'arrow_drop_down';
|
|
17455
|
+
font-family: 'Material Icons Round';
|
|
17456
|
+
font-size: 24px;
|
|
17457
|
+
top: 13%;
|
|
17458
|
+
left: calc(100% - 26px);
|
|
17459
|
+
z-index: -20;
|
|
17460
|
+
}
|
|
17461
|
+
|
|
17457
17462
|
.psui-el-input-select.layout-default select {
|
|
17458
17463
|
-webkit-appearance: none;
|
|
17459
17464
|
-moz-appearance: none;
|
|
@@ -17461,7 +17466,6 @@ html {
|
|
|
17461
17466
|
background-color: transparent;
|
|
17462
17467
|
font-size: 16px;
|
|
17463
17468
|
line-height: 130%;
|
|
17464
|
-
width: 100%;
|
|
17465
17469
|
border-width: 1px;
|
|
17466
17470
|
--border-opacity: 1;
|
|
17467
17471
|
border-color: #D6DDE5;
|
|
@@ -17470,7 +17474,8 @@ html {
|
|
|
17470
17474
|
--text-opacity: 1;
|
|
17471
17475
|
color: #A2ACB7;
|
|
17472
17476
|
color: rgba(162, 172, 183, var(--text-opacity));
|
|
17473
|
-
padding: 11.5px 16px;
|
|
17477
|
+
padding: 11.5px 26px 11.5px 16px;
|
|
17478
|
+
min-width: 100%;
|
|
17474
17479
|
}
|
|
17475
17480
|
|
|
17476
17481
|
.psui-el-input-select.layout-default select:hover,
|
|
@@ -17513,14 +17518,33 @@ html {
|
|
|
17513
17518
|
line-height: 24px;
|
|
17514
17519
|
}
|
|
17515
17520
|
|
|
17521
|
+
.psui-el-input-select.layout-mini .psui-el-input-select-wrapper {
|
|
17522
|
+
position: relative;
|
|
17523
|
+
width: 100%;
|
|
17524
|
+
}
|
|
17525
|
+
|
|
17526
|
+
.psui-el-input-select.layout-mini .psui-el-input-select-wrapper::after {
|
|
17527
|
+
position: absolute;
|
|
17528
|
+
display: inline-block;
|
|
17529
|
+
--text-opacity: 1;
|
|
17530
|
+
color: #798490;
|
|
17531
|
+
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17532
|
+
content: 'unfold_more';
|
|
17533
|
+
font-family: 'Material Icons Round';
|
|
17534
|
+
font-size: 18px;
|
|
17535
|
+
top: 13%;
|
|
17536
|
+
left: calc(100% - 26px);
|
|
17537
|
+
z-index: -20;
|
|
17538
|
+
}
|
|
17539
|
+
|
|
17516
17540
|
.psui-el-input-select.layout-mini select {
|
|
17517
17541
|
font-size: 14px;
|
|
17518
17542
|
line-height: 130%;
|
|
17543
|
+
width: 100%;
|
|
17519
17544
|
-webkit-appearance: none;
|
|
17520
17545
|
-moz-appearance: none;
|
|
17521
17546
|
appearance: none;
|
|
17522
17547
|
background-color: transparent;
|
|
17523
|
-
width: 100%;
|
|
17524
17548
|
border-width: 1px;
|
|
17525
17549
|
--border-opacity: 1;
|
|
17526
17550
|
border-color: #D6DDE5;
|
|
@@ -17548,27 +17572,16 @@ html {
|
|
|
17548
17572
|
color: rgba(121, 132, 144, var(--text-opacity))
|
|
17549
17573
|
}
|
|
17550
17574
|
|
|
17551
|
-
.psui-el-input-select.layout-mini
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17557
|
-
content: 'unfold_more';
|
|
17558
|
-
font-family: 'Material Icons Round';
|
|
17559
|
-
font-size: 18px;
|
|
17560
|
-
top: 4px;
|
|
17561
|
-
right: 4px;
|
|
17562
|
-
z-index: -20;
|
|
17563
|
-
}
|
|
17575
|
+
.psui-el-input-select.layout-mini.selected .psui-el-input-select-wrapper select {
|
|
17576
|
+
--border-opacity: 1 !important;
|
|
17577
|
+
border-color: #5DB883 !important;
|
|
17578
|
+
border-color: rgba(93, 184, 131, var(--border-opacity)) !important;
|
|
17579
|
+
}
|
|
17564
17580
|
|
|
17565
|
-
.psui-el-input-select.layout-mini.selected
|
|
17566
|
-
--border-opacity: 1;
|
|
17567
|
-
border-color: #5DB883;
|
|
17568
|
-
border-color: rgba(93, 184, 131, var(--border-opacity));
|
|
17581
|
+
.psui-el-input-select.layout-mini.selected:not(option) {
|
|
17569
17582
|
--text-opacity: 1;
|
|
17570
17583
|
color: #44A06A;
|
|
17571
|
-
color: rgba(68, 160, 106, var(--text-opacity))
|
|
17584
|
+
color: rgba(68, 160, 106, var(--text-opacity));
|
|
17572
17585
|
}
|
|
17573
17586
|
|
|
17574
17587
|
.psui-el-input-textarea {
|
|
@@ -20003,23 +20016,30 @@ html {
|
|
|
20003
20016
|
|
|
20004
20017
|
.psui-el-accordion-item-header {
|
|
20005
20018
|
display: flex;
|
|
20006
|
-
cursor: pointer;
|
|
20007
|
-
transition-property: all;
|
|
20008
20019
|
justify-content: space-between;
|
|
20009
|
-
|
|
20010
|
-
--text-opacity: 1;
|
|
20011
|
-
color: #28323B;
|
|
20012
|
-
color: rgba(40, 50, 59, var(--text-opacity));
|
|
20020
|
+
align-items: center;
|
|
20013
20021
|
padding-top: 16px;
|
|
20014
20022
|
padding-bottom: 16px;
|
|
20015
20023
|
}
|
|
20016
20024
|
|
|
20017
|
-
.psui-el-accordion-item-header
|
|
20025
|
+
.psui-el-accordion-item-header-wrapper {
|
|
20026
|
+
display: flex;
|
|
20027
|
+
width: 100%;
|
|
20028
|
+
cursor: pointer;
|
|
20029
|
+
transition-property: all;
|
|
20030
|
+
justify-content: space-between;
|
|
20031
|
+
transition: cubic-bezier(.17,.67,.83,.67) 250ms;
|
|
20018
20032
|
--text-opacity: 1;
|
|
20019
|
-
color: #
|
|
20020
|
-
color: rgba(
|
|
20033
|
+
color: #28323B;
|
|
20034
|
+
color: rgba(40, 50, 59, var(--text-opacity));
|
|
20021
20035
|
}
|
|
20022
20036
|
|
|
20037
|
+
.psui-el-accordion-item-header-wrapper:hover {
|
|
20038
|
+
--text-opacity: 1;
|
|
20039
|
+
color: #318FAC;
|
|
20040
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
20041
|
+
}
|
|
20042
|
+
|
|
20023
20043
|
.psui-el-accordion-item-icon {
|
|
20024
20044
|
font-family: 'Material Icons Round';
|
|
20025
20045
|
font-weight: normal;
|
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,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,23 +1,32 @@
|
|
|
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"
|
|
8
15
|
/>
|
|
9
16
|
<label
|
|
10
|
-
:for="
|
|
17
|
+
:for="getInputId"
|
|
11
18
|
class="psui-el-checkmark"
|
|
12
19
|
>
|
|
13
|
-
<slot
|
|
14
|
-
|
|
20
|
+
<slot name="content">
|
|
21
|
+
<span>{{ label }}</span>
|
|
22
|
+
</slot>
|
|
15
23
|
</label>
|
|
16
24
|
</div>
|
|
17
25
|
</template>
|
|
18
26
|
|
|
19
27
|
<script>
|
|
20
28
|
//FIGMA CONTROLS & SELECTORS https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64852
|
|
29
|
+
import { randomString } from '../../util/GeneralFunctions'
|
|
21
30
|
|
|
22
31
|
export default {
|
|
23
32
|
name: 'PsCheckboxSimple',
|
|
@@ -35,10 +44,20 @@ export default {
|
|
|
35
44
|
type: Boolean,
|
|
36
45
|
default: false,
|
|
37
46
|
},
|
|
47
|
+
/**
|
|
48
|
+
* Sets the input as checked
|
|
49
|
+
*/
|
|
38
50
|
checked: {
|
|
39
51
|
type: Boolean,
|
|
40
52
|
default: false
|
|
41
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* Add html attributes to the element input
|
|
56
|
+
*/
|
|
57
|
+
inputAttrs: {
|
|
58
|
+
type: Object,
|
|
59
|
+
default: () => ({})
|
|
60
|
+
},
|
|
42
61
|
/**
|
|
43
62
|
* It set the of the checkbox input. eg: big and small.
|
|
44
63
|
*/
|
|
@@ -56,10 +75,26 @@ export default {
|
|
|
56
75
|
validator: (value)=> ['default','mixed'].includes(value)
|
|
57
76
|
}
|
|
58
77
|
},
|
|
78
|
+
inheritAttrs: false,
|
|
59
79
|
computed:{
|
|
60
80
|
getComponentClass(){
|
|
61
81
|
return `size-${this.size} layout-${this.layout}`
|
|
62
|
-
},
|
|
82
|
+
},
|
|
83
|
+
getInputId() {
|
|
84
|
+
if (this?.inputAttrs?.id) {
|
|
85
|
+
return this.inputAttrs.id
|
|
86
|
+
} else if (this?.$attrs?.id) {
|
|
87
|
+
return this.$attrs.id
|
|
88
|
+
} else {
|
|
89
|
+
return randomString(16)
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
getComponentAttrs() {
|
|
93
|
+
let componentAttrs = { ... this.$attrs }
|
|
94
|
+
// delete componentAttrs.id
|
|
95
|
+
console.log('componentAttrs', componentAttrs)
|
|
96
|
+
return componentAttrs
|
|
97
|
+
}
|
|
63
98
|
},
|
|
64
99
|
}
|
|
65
100
|
</script>
|
|
@@ -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
|
|
|
@@ -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>
|
package/vetur/attributes.json
CHANGED
|
@@ -39,6 +39,44 @@
|
|
|
39
39
|
"type": "string",
|
|
40
40
|
"description": "It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/."
|
|
41
41
|
},
|
|
42
|
+
"ps-badge-with-icon/icon": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"PsBadgeWithIcon/icon": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"ps-badge-with-icon/iconClass": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "It set any further css style that might be needed."
|
|
51
|
+
},
|
|
52
|
+
"PsBadgeWithIcon/iconClass": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "It set any further css style that might be needed."
|
|
55
|
+
},
|
|
56
|
+
"ps-badge-with-icon/message": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"PsBadgeWithIcon/message": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"ps-badge-with-icon/layout": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"options": [
|
|
65
|
+
"grey",
|
|
66
|
+
"blue",
|
|
67
|
+
"green",
|
|
68
|
+
"yellow"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"PsBadgeWithIcon/layout": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"options": [
|
|
74
|
+
"grey",
|
|
75
|
+
"blue",
|
|
76
|
+
"green",
|
|
77
|
+
"yellow"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
42
80
|
"ps-card-infos/title": {
|
|
43
81
|
"type": "string",
|
|
44
82
|
"description": "It sets the title of your card."
|
|
@@ -143,7 +181,12 @@
|
|
|
143
181
|
"success",
|
|
144
182
|
"warning",
|
|
145
183
|
"error",
|
|
146
|
-
"default"
|
|
184
|
+
"default",
|
|
185
|
+
"solid-info",
|
|
186
|
+
"solid-success",
|
|
187
|
+
"solid-warning",
|
|
188
|
+
"solid-error",
|
|
189
|
+
"solid-default"
|
|
147
190
|
]
|
|
148
191
|
},
|
|
149
192
|
"PsMiniTag/layout": {
|
|
@@ -154,7 +197,12 @@
|
|
|
154
197
|
"success",
|
|
155
198
|
"warning",
|
|
156
199
|
"error",
|
|
157
|
-
"default"
|
|
200
|
+
"default",
|
|
201
|
+
"solid-info",
|
|
202
|
+
"solid-success",
|
|
203
|
+
"solid-warning",
|
|
204
|
+
"solid-error",
|
|
205
|
+
"solid-default"
|
|
158
206
|
]
|
|
159
207
|
},
|
|
160
208
|
"ps-mini-tag/message": {
|
|
@@ -362,18 +410,18 @@
|
|
|
362
410
|
"description": "It sets the label of the checkbox input."
|
|
363
411
|
},
|
|
364
412
|
"ps-checkbox/inputValue": {
|
|
365
|
-
"type": "string",
|
|
413
|
+
"type": "string|boolean",
|
|
366
414
|
"description": "It sets the value which should be monitored."
|
|
367
415
|
},
|
|
368
416
|
"PsCheckbox/inputValue": {
|
|
369
|
-
"type": "string",
|
|
417
|
+
"type": "string|boolean",
|
|
370
418
|
"description": "It sets the value which should be monitored."
|
|
371
419
|
},
|
|
372
420
|
"ps-checkbox/value": {
|
|
373
|
-
"type": "array"
|
|
421
|
+
"type": "array|boolean"
|
|
374
422
|
},
|
|
375
423
|
"PsCheckbox/value": {
|
|
376
|
-
"type": "array"
|
|
424
|
+
"type": "array|boolean"
|
|
377
425
|
},
|
|
378
426
|
"ps-checkbox/disabled": {
|
|
379
427
|
"type": "boolean",
|
|
@@ -415,6 +463,60 @@
|
|
|
415
463
|
"mixed"
|
|
416
464
|
]
|
|
417
465
|
},
|
|
466
|
+
"ps-checkbox-simple/label": {
|
|
467
|
+
"type": "string",
|
|
468
|
+
"description": "It sets the label of the checkbox input."
|
|
469
|
+
},
|
|
470
|
+
"PsCheckboxSimple/label": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"description": "It sets the label of the checkbox input."
|
|
473
|
+
},
|
|
474
|
+
"ps-checkbox-simple/disabled": {
|
|
475
|
+
"type": "boolean",
|
|
476
|
+
"description": "It disables the checkbox input."
|
|
477
|
+
},
|
|
478
|
+
"PsCheckboxSimple/disabled": {
|
|
479
|
+
"type": "boolean",
|
|
480
|
+
"description": "It disables the checkbox input."
|
|
481
|
+
},
|
|
482
|
+
"ps-checkbox-simple/checked": {
|
|
483
|
+
"type": "boolean"
|
|
484
|
+
},
|
|
485
|
+
"PsCheckboxSimple/checked": {
|
|
486
|
+
"type": "boolean"
|
|
487
|
+
},
|
|
488
|
+
"ps-checkbox-simple/size": {
|
|
489
|
+
"type": "string",
|
|
490
|
+
"description": "It set the of the checkbox input. eg: big and small.",
|
|
491
|
+
"options": [
|
|
492
|
+
"big",
|
|
493
|
+
"small"
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
"PsCheckboxSimple/size": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"description": "It set the of the checkbox input. eg: big and small.",
|
|
499
|
+
"options": [
|
|
500
|
+
"big",
|
|
501
|
+
"small"
|
|
502
|
+
]
|
|
503
|
+
},
|
|
504
|
+
"ps-checkbox-simple/layout": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"description": "It set the layout of the checkbox input. eg: default and mixed.",
|
|
507
|
+
"options": [
|
|
508
|
+
"default",
|
|
509
|
+
"mixed"
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
"PsCheckboxSimple/layout": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"description": "It set the layout of the checkbox input. eg: default and mixed.",
|
|
515
|
+
"options": [
|
|
516
|
+
"default",
|
|
517
|
+
"mixed"
|
|
518
|
+
]
|
|
519
|
+
},
|
|
418
520
|
"ps-draggable/getColumns": {
|
|
419
521
|
"type": "object",
|
|
420
522
|
"description": "It sets the data that will be used."
|
|
@@ -431,6 +533,14 @@
|
|
|
431
533
|
"type": "string",
|
|
432
534
|
"description": "It sets the module which will be used to set getters and actions."
|
|
433
535
|
},
|
|
536
|
+
"ps-draggable/disabled": {
|
|
537
|
+
"type": "boolean",
|
|
538
|
+
"description": "It disables the input. All mouse events are disabled."
|
|
539
|
+
},
|
|
540
|
+
"PsDraggable/disabled": {
|
|
541
|
+
"type": "boolean",
|
|
542
|
+
"description": "It disables the input. All mouse events are disabled."
|
|
543
|
+
},
|
|
434
544
|
"ps-inline-selector/width": {
|
|
435
545
|
"type": "number",
|
|
436
546
|
"description": "It sets the default width of the inline selector."
|
|
@@ -529,6 +639,12 @@
|
|
|
529
639
|
"type": "string",
|
|
530
640
|
"description": "It sets the placeholder of the component."
|
|
531
641
|
},
|
|
642
|
+
"ps-radio-button/inputId": {
|
|
643
|
+
"type": "string"
|
|
644
|
+
},
|
|
645
|
+
"PsRadioButton/inputId": {
|
|
646
|
+
"type": "string"
|
|
647
|
+
},
|
|
532
648
|
"ps-radio-button/label": {
|
|
533
649
|
"type": "string",
|
|
534
650
|
"description": "It sets the label of the radio button."
|
|
@@ -538,18 +654,18 @@
|
|
|
538
654
|
"description": "It sets the label of the radio button."
|
|
539
655
|
},
|
|
540
656
|
"ps-radio-button/inputValue": {
|
|
541
|
-
"type": "string",
|
|
657
|
+
"type": "string|object",
|
|
542
658
|
"description": "It's the value of the checkbox"
|
|
543
659
|
},
|
|
544
660
|
"PsRadioButton/inputValue": {
|
|
545
|
-
"type": "string",
|
|
661
|
+
"type": "string|object",
|
|
546
662
|
"description": "It's the value of the checkbox"
|
|
547
663
|
},
|
|
548
664
|
"ps-radio-button/value": {
|
|
549
|
-
"type": "string"
|
|
665
|
+
"type": "string|object"
|
|
550
666
|
},
|
|
551
667
|
"PsRadioButton/value": {
|
|
552
|
-
"type": "string"
|
|
668
|
+
"type": "string|object"
|
|
553
669
|
},
|
|
554
670
|
"ps-radio-button/disabled": {
|
|
555
671
|
"type": "boolean",
|
|
@@ -639,6 +755,14 @@
|
|
|
639
755
|
"type": "boolean",
|
|
640
756
|
"description": "It sets the value of the switch button."
|
|
641
757
|
},
|
|
758
|
+
"ps-switch/disabled": {
|
|
759
|
+
"type": "boolean",
|
|
760
|
+
"description": "It sets disabling mode."
|
|
761
|
+
},
|
|
762
|
+
"PsSwitch/disabled": {
|
|
763
|
+
"type": "boolean",
|
|
764
|
+
"description": "It sets disabling mode."
|
|
765
|
+
},
|
|
642
766
|
"ps-switch/size": {
|
|
643
767
|
"type": "string",
|
|
644
768
|
"description": "It sets the size of the switch button. eg: small and big.",
|
|
@@ -885,61 +1009,61 @@
|
|
|
885
1009
|
"type": "boolean",
|
|
886
1010
|
"description": "It sets a active css class based on a boolean property."
|
|
887
1011
|
},
|
|
888
|
-
"ps-select
|
|
1012
|
+
"ps-input-select/items": {
|
|
889
1013
|
"type": "",
|
|
890
1014
|
"description": "It sets the items which will be rendered within the select input."
|
|
891
1015
|
},
|
|
892
|
-
"
|
|
1016
|
+
"PsInputSelect/items": {
|
|
893
1017
|
"type": "",
|
|
894
1018
|
"description": "It sets the items which will be rendered within the select input."
|
|
895
1019
|
},
|
|
896
|
-
"ps-select
|
|
1020
|
+
"ps-input-select/value": {
|
|
897
1021
|
"type": "string"
|
|
898
1022
|
},
|
|
899
|
-
"
|
|
1023
|
+
"PsInputSelect/value": {
|
|
900
1024
|
"type": "string"
|
|
901
1025
|
},
|
|
902
|
-
"ps-select
|
|
1026
|
+
"ps-input-select/label": {
|
|
903
1027
|
"type": "string",
|
|
904
1028
|
"description": "It sets the value label of the select input if needed."
|
|
905
1029
|
},
|
|
906
|
-
"
|
|
1030
|
+
"PsInputSelect/label": {
|
|
907
1031
|
"type": "string",
|
|
908
1032
|
"description": "It sets the value label of the select input if needed."
|
|
909
1033
|
},
|
|
910
|
-
"ps-select
|
|
1034
|
+
"ps-input-select/optionalLabel": {
|
|
911
1035
|
"type": "string",
|
|
912
1036
|
"description": "It sets a o optional label below the select input."
|
|
913
1037
|
},
|
|
914
|
-
"
|
|
1038
|
+
"PsInputSelect/optionalLabel": {
|
|
915
1039
|
"type": "string",
|
|
916
1040
|
"description": "It sets a o optional label below the select input."
|
|
917
1041
|
},
|
|
918
|
-
"ps-select
|
|
1042
|
+
"ps-input-select/keyLabel": {
|
|
919
1043
|
"type": "string",
|
|
920
1044
|
"description": "It sets the key label of your items if needed."
|
|
921
1045
|
},
|
|
922
|
-
"
|
|
1046
|
+
"PsInputSelect/keyLabel": {
|
|
923
1047
|
"type": "string",
|
|
924
1048
|
"description": "It sets the key label of your items if needed."
|
|
925
1049
|
},
|
|
926
|
-
"ps-select
|
|
1050
|
+
"ps-input-select/keyValue": {
|
|
927
1051
|
"type": "string",
|
|
928
1052
|
"description": "It sets the key value of yout items if needed."
|
|
929
1053
|
},
|
|
930
|
-
"
|
|
1054
|
+
"PsInputSelect/keyValue": {
|
|
931
1055
|
"type": "string",
|
|
932
1056
|
"description": "It sets the key value of yout items if needed."
|
|
933
1057
|
},
|
|
934
|
-
"ps-select
|
|
1058
|
+
"ps-input-select/disabled": {
|
|
935
1059
|
"type": "boolean",
|
|
936
1060
|
"description": "It disables the select input. All mouse events are disabled."
|
|
937
1061
|
},
|
|
938
|
-
"
|
|
1062
|
+
"PsInputSelect/disabled": {
|
|
939
1063
|
"type": "boolean",
|
|
940
1064
|
"description": "It disables the select input. All mouse events are disabled."
|
|
941
1065
|
},
|
|
942
|
-
"ps-select
|
|
1066
|
+
"ps-input-select/layout": {
|
|
943
1067
|
"type": "string",
|
|
944
1068
|
"description": "It sets the layout of the select input. eg: default and mini.",
|
|
945
1069
|
"options": [
|
|
@@ -947,7 +1071,7 @@
|
|
|
947
1071
|
"mini"
|
|
948
1072
|
]
|
|
949
1073
|
},
|
|
950
|
-
"
|
|
1074
|
+
"PsInputSelect/layout": {
|
|
951
1075
|
"type": "string",
|
|
952
1076
|
"description": "It sets the layout of the select input. eg: default and mini.",
|
|
953
1077
|
"options": [
|
|
@@ -1325,22 +1449,6 @@
|
|
|
1325
1449
|
"type": "number|string",
|
|
1326
1450
|
"description": "It sets the size of the icon."
|
|
1327
1451
|
},
|
|
1328
|
-
"app-icon/width": {
|
|
1329
|
-
"type": "number|string",
|
|
1330
|
-
"description": "It sets the width of the icon."
|
|
1331
|
-
},
|
|
1332
|
-
"AppIcon/width": {
|
|
1333
|
-
"type": "number|string",
|
|
1334
|
-
"description": "It sets the width of the icon."
|
|
1335
|
-
},
|
|
1336
|
-
"app-icon/height": {
|
|
1337
|
-
"type": "number|string",
|
|
1338
|
-
"description": "It sets the height of the icon."
|
|
1339
|
-
},
|
|
1340
|
-
"AppIcon/height": {
|
|
1341
|
-
"type": "number|string",
|
|
1342
|
-
"description": "It sets the height of the icon."
|
|
1343
|
-
},
|
|
1344
1452
|
"app-icon/stroke": {
|
|
1345
1453
|
"type": "string",
|
|
1346
1454
|
"description": "It sets fill property of the icon."
|
package/vetur/tags.json
CHANGED
|
@@ -27,6 +27,24 @@
|
|
|
27
27
|
],
|
|
28
28
|
"description": ""
|
|
29
29
|
},
|
|
30
|
+
"ps-badge-with-icon": {
|
|
31
|
+
"attributes": [
|
|
32
|
+
"icon",
|
|
33
|
+
"iconClass",
|
|
34
|
+
"message",
|
|
35
|
+
"layout"
|
|
36
|
+
],
|
|
37
|
+
"description": ""
|
|
38
|
+
},
|
|
39
|
+
"PsBadgeWithIcon": {
|
|
40
|
+
"attributes": [
|
|
41
|
+
"icon",
|
|
42
|
+
"iconClass",
|
|
43
|
+
"message",
|
|
44
|
+
"layout"
|
|
45
|
+
],
|
|
46
|
+
"description": ""
|
|
47
|
+
},
|
|
30
48
|
"ps-card-infos": {
|
|
31
49
|
"attributes": [
|
|
32
50
|
"title",
|
|
@@ -199,17 +217,39 @@
|
|
|
199
217
|
],
|
|
200
218
|
"description": ""
|
|
201
219
|
},
|
|
220
|
+
"ps-checkbox-simple": {
|
|
221
|
+
"attributes": [
|
|
222
|
+
"label",
|
|
223
|
+
"disabled",
|
|
224
|
+
"checked",
|
|
225
|
+
"size",
|
|
226
|
+
"layout"
|
|
227
|
+
],
|
|
228
|
+
"description": ""
|
|
229
|
+
},
|
|
230
|
+
"PsCheckboxSimple": {
|
|
231
|
+
"attributes": [
|
|
232
|
+
"label",
|
|
233
|
+
"disabled",
|
|
234
|
+
"checked",
|
|
235
|
+
"size",
|
|
236
|
+
"layout"
|
|
237
|
+
],
|
|
238
|
+
"description": ""
|
|
239
|
+
},
|
|
202
240
|
"ps-draggable": {
|
|
203
241
|
"attributes": [
|
|
204
242
|
"getColumns",
|
|
205
|
-
"module"
|
|
243
|
+
"module",
|
|
244
|
+
"disabled"
|
|
206
245
|
],
|
|
207
246
|
"description": ""
|
|
208
247
|
},
|
|
209
248
|
"PsDraggable": {
|
|
210
249
|
"attributes": [
|
|
211
250
|
"getColumns",
|
|
212
|
-
"module"
|
|
251
|
+
"module",
|
|
252
|
+
"disabled"
|
|
213
253
|
],
|
|
214
254
|
"description": ""
|
|
215
255
|
},
|
|
@@ -251,6 +291,7 @@
|
|
|
251
291
|
},
|
|
252
292
|
"ps-radio-button": {
|
|
253
293
|
"attributes": [
|
|
294
|
+
"inputId",
|
|
254
295
|
"label",
|
|
255
296
|
"inputValue",
|
|
256
297
|
"value",
|
|
@@ -261,6 +302,7 @@
|
|
|
261
302
|
},
|
|
262
303
|
"PsRadioButton": {
|
|
263
304
|
"attributes": [
|
|
305
|
+
"inputId",
|
|
264
306
|
"label",
|
|
265
307
|
"inputValue",
|
|
266
308
|
"value",
|
|
@@ -299,6 +341,7 @@
|
|
|
299
341
|
"attributes": [
|
|
300
342
|
"label",
|
|
301
343
|
"value",
|
|
344
|
+
"disabled",
|
|
302
345
|
"size"
|
|
303
346
|
],
|
|
304
347
|
"description": ""
|
|
@@ -307,6 +350,7 @@
|
|
|
307
350
|
"attributes": [
|
|
308
351
|
"label",
|
|
309
352
|
"value",
|
|
353
|
+
"disabled",
|
|
310
354
|
"size"
|
|
311
355
|
],
|
|
312
356
|
"description": ""
|
|
@@ -427,7 +471,7 @@
|
|
|
427
471
|
],
|
|
428
472
|
"description": ""
|
|
429
473
|
},
|
|
430
|
-
"ps-select
|
|
474
|
+
"ps-input-select": {
|
|
431
475
|
"attributes": [
|
|
432
476
|
"items",
|
|
433
477
|
"value",
|
|
@@ -440,7 +484,7 @@
|
|
|
440
484
|
],
|
|
441
485
|
"description": ""
|
|
442
486
|
},
|
|
443
|
-
"
|
|
487
|
+
"PsInputSelect": {
|
|
444
488
|
"attributes": [
|
|
445
489
|
"items",
|
|
446
490
|
"value",
|
|
@@ -517,6 +561,14 @@
|
|
|
517
561
|
],
|
|
518
562
|
"description": ""
|
|
519
563
|
},
|
|
564
|
+
"ps-scroll-bar": {
|
|
565
|
+
"attributes": [],
|
|
566
|
+
"description": ""
|
|
567
|
+
},
|
|
568
|
+
"PsScrollBar": {
|
|
569
|
+
"attributes": [],
|
|
570
|
+
"description": ""
|
|
571
|
+
},
|
|
520
572
|
"ps-tab-header": {
|
|
521
573
|
"attributes": [
|
|
522
574
|
"layout",
|
|
@@ -605,8 +657,6 @@
|
|
|
605
657
|
"type",
|
|
606
658
|
"iconClasses",
|
|
607
659
|
"size",
|
|
608
|
-
"width",
|
|
609
|
-
"height",
|
|
610
660
|
"stroke",
|
|
611
661
|
"color",
|
|
612
662
|
"loaderIcon",
|
|
@@ -620,8 +670,6 @@
|
|
|
620
670
|
"type",
|
|
621
671
|
"iconClasses",
|
|
622
672
|
"size",
|
|
623
|
-
"width",
|
|
624
|
-
"height",
|
|
625
673
|
"stroke",
|
|
626
674
|
"color",
|
|
627
675
|
"loaderIcon",
|