@policystudio/policy-studio-ui-vue 1.0.48 → 1.0.58
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 +129 -7
- package/package.json +1 -1
- package/src/assets/scss/base.scss +1 -0
- package/src/assets/scss/components/PsBadgeWithIcon.scss +40 -0
- package/src/assets/scss/components/PsDraggable.scss +31 -4
- package/src/assets/scss/components/PsMiniTag.scss +2 -2
- package/src/assets/scss/components/PsTabHeader.scss +20 -1
- package/src/assets/scss/components/PsTooltip.scss +1 -1
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +43 -0
- package/src/components/controls/PsCheckboxSimple.vue +65 -0
- package/src/components/controls/PsDraggable.vue +21 -0
- package/src/components/controls/PsRadioButton.vue +14 -11
- package/src/index.js +7 -1
- package/src/stories/BadgeWithIcon.stories.js +31 -0
- package/src/stories/CheckboxSimple.stories.js +48 -0
- package/tailwind.config.js +2 -2
package/dist/css/psui_styles.css
CHANGED
|
@@ -8025,11 +8025,13 @@ video {
|
|
|
8025
8025
|
.psui-text-accent{
|
|
8026
8026
|
font-size: 14px;
|
|
8027
8027
|
line-height: 130%;
|
|
8028
|
+
letter-spacing: 0.6px;
|
|
8028
8029
|
}
|
|
8029
8030
|
|
|
8030
8031
|
.psui-text-accentSmall{
|
|
8031
8032
|
font-size: 12px;
|
|
8032
8033
|
line-height: 130%;
|
|
8034
|
+
letter-spacing: 0.6px;
|
|
8033
8035
|
}
|
|
8034
8036
|
|
|
8035
8037
|
.psui-text-p{
|
|
@@ -17181,6 +17183,75 @@ html {
|
|
|
17181
17183
|
-webkit-font-smoothing: antialiased;
|
|
17182
17184
|
}
|
|
17183
17185
|
|
|
17186
|
+
.psui-el-badge-with-icon {
|
|
17187
|
+
display: flex;
|
|
17188
|
+
align-items: center;
|
|
17189
|
+
padding-top: 0.25rem;
|
|
17190
|
+
padding-bottom: 0.25rem;
|
|
17191
|
+
padding-left: 0.5rem;
|
|
17192
|
+
padding-right: 0.5rem;
|
|
17193
|
+
border-radius: 0.25rem;
|
|
17194
|
+
}
|
|
17195
|
+
|
|
17196
|
+
.psui-el-badge-with-icon.layout-grey{
|
|
17197
|
+
--bg-opacity: 1;
|
|
17198
|
+
background-color: #F3F6F9;
|
|
17199
|
+
background-color: rgba(243, 246, 249, var(--bg-opacity));
|
|
17200
|
+
--text-opacity: 1;
|
|
17201
|
+
color: #798490;
|
|
17202
|
+
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17203
|
+
}
|
|
17204
|
+
|
|
17205
|
+
.psui-el-badge-with-icon.layout-blue{
|
|
17206
|
+
--bg-opacity: 1;
|
|
17207
|
+
background-color: #E0EFF6;
|
|
17208
|
+
background-color: rgba(224, 239, 246, var(--bg-opacity));
|
|
17209
|
+
--text-opacity: 1;
|
|
17210
|
+
color: #318FAC;
|
|
17211
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
17212
|
+
}
|
|
17213
|
+
|
|
17214
|
+
.psui-el-badge-with-icon.layout-green{
|
|
17215
|
+
--bg-opacity: 1;
|
|
17216
|
+
background-color: #DEF8E8;
|
|
17217
|
+
background-color: rgba(222, 248, 232, var(--bg-opacity));
|
|
17218
|
+
--text-opacity: 1;
|
|
17219
|
+
color: #44A06A;
|
|
17220
|
+
color: rgba(68, 160, 106, var(--text-opacity));
|
|
17221
|
+
}
|
|
17222
|
+
|
|
17223
|
+
.psui-el-badge-with-icon.layout-yellow{
|
|
17224
|
+
--bg-opacity: 1;
|
|
17225
|
+
background-color: #FDF3E3;
|
|
17226
|
+
background-color: rgba(253, 243, 227, var(--bg-opacity));
|
|
17227
|
+
--text-opacity: 1;
|
|
17228
|
+
color: #B87305;
|
|
17229
|
+
color: rgba(184, 115, 5, var(--text-opacity));
|
|
17230
|
+
}
|
|
17231
|
+
|
|
17232
|
+
.psui-el-badge-with-icon .psui-el-badge-with-icon-icon {
|
|
17233
|
+
font-family: 'Material Icons Round';
|
|
17234
|
+
font-weight: normal;
|
|
17235
|
+
font-style: normal;
|
|
17236
|
+
font-size: 16px;
|
|
17237
|
+
line-height: 1;
|
|
17238
|
+
letter-spacing: normal;
|
|
17239
|
+
text-transform: none;
|
|
17240
|
+
display: inline-block;
|
|
17241
|
+
white-space: nowrap;
|
|
17242
|
+
word-wrap: normal;
|
|
17243
|
+
direction: ltr;
|
|
17244
|
+
-webkit-font-feature-settings: 'liga';
|
|
17245
|
+
-webkit-font-smoothing: antialiased;
|
|
17246
|
+
}
|
|
17247
|
+
|
|
17248
|
+
.psui-el-badge-with-icon .psui-el-badge-with-icon-message {
|
|
17249
|
+
margin-left: 0.25rem;
|
|
17250
|
+
font-size: 12px;
|
|
17251
|
+
line-height: 130%;
|
|
17252
|
+
font-weight: 700;
|
|
17253
|
+
}
|
|
17254
|
+
|
|
17184
17255
|
.psui-el-draggable {
|
|
17185
17256
|
width: 100%;
|
|
17186
17257
|
display: flex;
|
|
@@ -17218,6 +17289,7 @@ html {
|
|
|
17218
17289
|
.psui-el-draggable .psui-el-draggable-wrapper-title p {
|
|
17219
17290
|
font-size: 12px;
|
|
17220
17291
|
line-height: 130%;
|
|
17292
|
+
letter-spacing: 0.6px;
|
|
17221
17293
|
--text-opacity: 1;
|
|
17222
17294
|
color: #28323B;
|
|
17223
17295
|
color: rgba(40, 50, 59, var(--text-opacity));
|
|
@@ -17259,16 +17331,31 @@ html {
|
|
|
17259
17331
|
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17260
17332
|
font-size: 14px;
|
|
17261
17333
|
line-height: 130%;
|
|
17262
|
-
font-weight: 700;
|
|
17263
17334
|
}
|
|
17264
17335
|
|
|
17265
|
-
.psui-el-draggable .psui-el-draggable-item-title .psui-el-
|
|
17266
|
-
|
|
17336
|
+
.psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox {
|
|
17337
|
+
--text-opacity: 1;
|
|
17338
|
+
color: #798490;
|
|
17339
|
+
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17340
|
+
}
|
|
17341
|
+
|
|
17342
|
+
.psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox .psui-el-checkmark:before {
|
|
17343
|
+
margin-right: 0.25rem;
|
|
17344
|
+
--text-opacity: 1;
|
|
17345
|
+
color: #D6DDE5;
|
|
17346
|
+
color: rgba(214, 221, 229, var(--text-opacity));
|
|
17347
|
+
}
|
|
17348
|
+
|
|
17349
|
+
.psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox.active {
|
|
17267
17350
|
--text-opacity: 1;
|
|
17268
|
-
color: #
|
|
17269
|
-
color: rgba(
|
|
17351
|
+
color: #515E6A;
|
|
17352
|
+
color: rgba(81, 94, 106, var(--text-opacity));
|
|
17270
17353
|
}
|
|
17271
17354
|
|
|
17355
|
+
.psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox.disabled .psui-el-checkmark {
|
|
17356
|
+
color: #798490 !important;
|
|
17357
|
+
}
|
|
17358
|
+
|
|
17272
17359
|
.psui-el-draggable .psui-el-draggable-item-append {
|
|
17273
17360
|
display: flex;
|
|
17274
17361
|
--text-opacity: 1;
|
|
@@ -17291,6 +17378,18 @@ html {
|
|
|
17291
17378
|
opacity: 0.2;
|
|
17292
17379
|
}
|
|
17293
17380
|
|
|
17381
|
+
.psui-el-draggable .psui-el-draggable-item .psui-el-checkbox.size-small .psui-el-checkmark span {
|
|
17382
|
+
font-weight: 700;
|
|
17383
|
+
}
|
|
17384
|
+
|
|
17385
|
+
.psui-el-draggable .psui-el-draggable-item .psui-el-checkbox.size-small .psui-el-checkmark:before {
|
|
17386
|
+
display: flex;
|
|
17387
|
+
align-items: center;
|
|
17388
|
+
justify-content: center;
|
|
17389
|
+
font-size: 24px;
|
|
17390
|
+
min-height: 24px;
|
|
17391
|
+
}
|
|
17392
|
+
|
|
17294
17393
|
.psui-el-input-select {
|
|
17295
17394
|
width: 100%;
|
|
17296
17395
|
display: flex;
|
|
@@ -17590,6 +17689,7 @@ html {
|
|
|
17590
17689
|
transition-property: opacity;
|
|
17591
17690
|
transition-duration: 300ms;
|
|
17592
17691
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
17692
|
+
z-index: 10;
|
|
17593
17693
|
transition-delay: 0.4s;
|
|
17594
17694
|
}
|
|
17595
17695
|
|
|
@@ -18003,7 +18103,8 @@ html {
|
|
|
18003
18103
|
.psui-el-mini-tag span {
|
|
18004
18104
|
width: 100%;
|
|
18005
18105
|
font-weight: 700;
|
|
18006
|
-
|
|
18106
|
+
text-transform: uppercase;
|
|
18107
|
+
padding: 3px 8px 3px 8px;
|
|
18007
18108
|
font-size: 10px;
|
|
18008
18109
|
letter-spacing: 0.5px;
|
|
18009
18110
|
}
|
|
@@ -18119,6 +18220,7 @@ html {
|
|
|
18119
18220
|
gap: 1rem;
|
|
18120
18221
|
font-size: 12px;
|
|
18121
18222
|
line-height: 130%;
|
|
18223
|
+
letter-spacing: 0.6px;
|
|
18122
18224
|
}
|
|
18123
18225
|
|
|
18124
18226
|
.psui-el-toast.fill-intense.layout-info {
|
|
@@ -19734,7 +19836,7 @@ html {
|
|
|
19734
19836
|
}
|
|
19735
19837
|
|
|
19736
19838
|
.psui-el-tab-header button.status-disabled {
|
|
19737
|
-
cursor: not-allowed
|
|
19839
|
+
cursor: not-allowed;
|
|
19738
19840
|
}
|
|
19739
19841
|
|
|
19740
19842
|
.psui-el-tab-header button:focus {
|
|
@@ -19756,6 +19858,10 @@ html {
|
|
|
19756
19858
|
border-radius: 0.375rem;
|
|
19757
19859
|
}
|
|
19758
19860
|
|
|
19861
|
+
.psui-el-tab-header.layout-standard .psui-el-tooltip:not(:last-child) {
|
|
19862
|
+
margin-right: 20px;
|
|
19863
|
+
}
|
|
19864
|
+
|
|
19759
19865
|
.psui-el-tab-header.layout-standard button {
|
|
19760
19866
|
--bg-opacity: 1;
|
|
19761
19867
|
background-color: #F3F6F9;
|
|
@@ -19811,6 +19917,10 @@ html {
|
|
|
19811
19917
|
border-color: rgba(230, 236, 242, var(--border-opacity));
|
|
19812
19918
|
}
|
|
19813
19919
|
|
|
19920
|
+
.psui-el-tab-header.layout-underline .psui-el-tooltip:not(:last-child) {
|
|
19921
|
+
margin-right: 20px;
|
|
19922
|
+
}
|
|
19923
|
+
|
|
19814
19924
|
.psui-el-tab-header.layout-underline button {
|
|
19815
19925
|
--text-opacity: 1;
|
|
19816
19926
|
color: #798490;
|
|
@@ -19847,6 +19957,10 @@ html {
|
|
|
19847
19957
|
|
|
19848
19958
|
/* ----------------------------------------- */
|
|
19849
19959
|
|
|
19960
|
+
.psui-el-tab-header.layout-folder .psui-el-tooltip:not(:last-child) {
|
|
19961
|
+
margin-right: 20px;
|
|
19962
|
+
}
|
|
19963
|
+
|
|
19850
19964
|
.psui-el-tab-header.layout-folder button {
|
|
19851
19965
|
--bg-opacity: 1;
|
|
19852
19966
|
background-color: #F3F6F9;
|
|
@@ -25600,11 +25714,13 @@ html {
|
|
|
25600
25714
|
.sm\:psui-text-accent{
|
|
25601
25715
|
font-size: 14px;
|
|
25602
25716
|
line-height: 130%;
|
|
25717
|
+
letter-spacing: 0.6px;
|
|
25603
25718
|
}
|
|
25604
25719
|
|
|
25605
25720
|
.sm\:psui-text-accentSmall{
|
|
25606
25721
|
font-size: 12px;
|
|
25607
25722
|
line-height: 130%;
|
|
25723
|
+
letter-spacing: 0.6px;
|
|
25608
25724
|
}
|
|
25609
25725
|
|
|
25610
25726
|
.sm\:psui-text-p{
|
|
@@ -40020,11 +40136,13 @@ html {
|
|
|
40020
40136
|
.md\:psui-text-accent{
|
|
40021
40137
|
font-size: 14px;
|
|
40022
40138
|
line-height: 130%;
|
|
40139
|
+
letter-spacing: 0.6px;
|
|
40023
40140
|
}
|
|
40024
40141
|
|
|
40025
40142
|
.md\:psui-text-accentSmall{
|
|
40026
40143
|
font-size: 12px;
|
|
40027
40144
|
line-height: 130%;
|
|
40145
|
+
letter-spacing: 0.6px;
|
|
40028
40146
|
}
|
|
40029
40147
|
|
|
40030
40148
|
.md\:psui-text-p{
|
|
@@ -54440,11 +54558,13 @@ html {
|
|
|
54440
54558
|
.lg\:psui-text-accent{
|
|
54441
54559
|
font-size: 14px;
|
|
54442
54560
|
line-height: 130%;
|
|
54561
|
+
letter-spacing: 0.6px;
|
|
54443
54562
|
}
|
|
54444
54563
|
|
|
54445
54564
|
.lg\:psui-text-accentSmall{
|
|
54446
54565
|
font-size: 12px;
|
|
54447
54566
|
line-height: 130%;
|
|
54567
|
+
letter-spacing: 0.6px;
|
|
54448
54568
|
}
|
|
54449
54569
|
|
|
54450
54570
|
.lg\:psui-text-p{
|
|
@@ -68860,11 +68980,13 @@ html {
|
|
|
68860
68980
|
.xl\:psui-text-accent{
|
|
68861
68981
|
font-size: 14px;
|
|
68862
68982
|
line-height: 130%;
|
|
68983
|
+
letter-spacing: 0.6px;
|
|
68863
68984
|
}
|
|
68864
68985
|
|
|
68865
68986
|
.xl\:psui-text-accentSmall{
|
|
68866
68987
|
font-size: 12px;
|
|
68867
68988
|
line-height: 130%;
|
|
68989
|
+
letter-spacing: 0.6px;
|
|
68868
68990
|
}
|
|
68869
68991
|
|
|
68870
68992
|
.xl\:psui-text-p{
|
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
@import './components/PsInputTextArea.scss';
|
|
28
28
|
@import './components/PsInputSelect.scss';
|
|
29
29
|
@import './components/PsDraggable.scss';
|
|
30
|
+
@import './components//PsBadgeWithIcon.scss';
|
|
30
31
|
@import "tailwindcss/base";
|
|
31
32
|
@import "tailwindcss/components";
|
|
32
33
|
@import "tailwindcss/utilities";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
|
|
3
|
+
.psui-el-badge-with-icon {
|
|
4
|
+
@apply psui-flex psui-items-center psui-py-1 psui-px-2 psui-rounded;
|
|
5
|
+
|
|
6
|
+
&.layout-grey{
|
|
7
|
+
@apply psui-bg-gray-10 psui-text-gray-50;
|
|
8
|
+
}
|
|
9
|
+
&.layout-blue{
|
|
10
|
+
@apply psui-bg-blue-20 psui-text-blue-60;
|
|
11
|
+
}
|
|
12
|
+
&.layout-green{
|
|
13
|
+
@apply psui-bg-green-10 psui-text-green-70;
|
|
14
|
+
}
|
|
15
|
+
&.layout-yellow{
|
|
16
|
+
@apply psui-bg-yellow-10 psui-text-yellow-70;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
.psui-el-badge-with-icon-icon {
|
|
21
|
+
font-family: 'Material Icons Round';
|
|
22
|
+
font-weight: normal;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-size: 16px;
|
|
25
|
+
line-height: 1;
|
|
26
|
+
letter-spacing: normal;
|
|
27
|
+
text-transform: none;
|
|
28
|
+
display: inline-block;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
word-wrap: normal;
|
|
31
|
+
direction: ltr;
|
|
32
|
+
-webkit-font-feature-settings: 'liga';
|
|
33
|
+
-webkit-font-smoothing: antialiased;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.psui-el-badge-with-icon-message {
|
|
37
|
+
@apply psui-ml-1 psui-text-xsmall psui-font-bold;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -31,11 +31,25 @@
|
|
|
31
31
|
padding: 7px 16px;
|
|
32
32
|
|
|
33
33
|
&-title {
|
|
34
|
-
@apply psui-text-gray-50 psui-text-small
|
|
34
|
+
@apply psui-text-gray-50 psui-text-small;
|
|
35
35
|
|
|
36
|
-
.psui-el-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
.psui-el-checkbox {
|
|
37
|
+
@apply psui-text-gray-50;
|
|
38
|
+
|
|
39
|
+
.psui-el-checkmark {
|
|
40
|
+
&:before {
|
|
41
|
+
@apply psui-mr-1 psui-text-gray-30;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.active {
|
|
46
|
+
@apply psui-text-gray-60;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.disabled {
|
|
50
|
+
.psui-el-checkmark {
|
|
51
|
+
color: #798490 !important;
|
|
52
|
+
}
|
|
39
53
|
}
|
|
40
54
|
}
|
|
41
55
|
}
|
|
@@ -58,6 +72,19 @@
|
|
|
58
72
|
&.on-drag-over {
|
|
59
73
|
opacity: 0.2;
|
|
60
74
|
}
|
|
75
|
+
|
|
76
|
+
.psui-el-checkbox.size-small {
|
|
77
|
+
.psui-el-checkmark {
|
|
78
|
+
span {
|
|
79
|
+
@apply psui-font-bold;
|
|
80
|
+
}
|
|
81
|
+
&:before {
|
|
82
|
+
@apply psui-flex psui-items-center psui-justify-center;
|
|
83
|
+
font-size: 24px;
|
|
84
|
+
min-height: 24px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
61
88
|
}
|
|
62
89
|
}
|
|
63
90
|
}
|
|
@@ -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;
|
|
@@ -63,6 +69,12 @@
|
|
|
63
69
|
&.layout-underline {
|
|
64
70
|
@apply psui-border-b psui-border-gray-20;
|
|
65
71
|
|
|
72
|
+
.psui-el-tooltip{
|
|
73
|
+
&:not(:last-child) {
|
|
74
|
+
margin-right: 20px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
66
78
|
button {
|
|
67
79
|
@apply psui-text-gray-50 psui-font-bold;
|
|
68
80
|
border-bottom: 3px solid transparent;
|
|
@@ -91,6 +103,13 @@
|
|
|
91
103
|
/* Layout Folder */
|
|
92
104
|
/* ----------------------------------------- */
|
|
93
105
|
&.layout-folder {
|
|
106
|
+
|
|
107
|
+
.psui-el-tooltip{
|
|
108
|
+
&:not(:last-child) {
|
|
109
|
+
margin-right: 20px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
94
113
|
button {
|
|
95
114
|
@apply psui-bg-gray-10 psui-text-gray-50 psui-rounded-t;
|
|
96
115
|
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 {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="psui-el-badge-with-icon" :class="getComponentClass">
|
|
3
|
+
<i
|
|
4
|
+
v-if="icon"
|
|
5
|
+
:class="iconClass"
|
|
6
|
+
class="psui-el-badge-with-icon-icon"
|
|
7
|
+
>{{icon}}</i>
|
|
8
|
+
<span class="psui-el-badge-with-icon-message">{{message}}</span>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
name: 'PsBadgeWithIcon',
|
|
15
|
+
props: {
|
|
16
|
+
icon: {
|
|
17
|
+
type: String,
|
|
18
|
+
default:'info'
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* It set any further css style that might be needed.
|
|
22
|
+
*/
|
|
23
|
+
iconClass: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
message: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'Lorem ipsum'
|
|
29
|
+
},
|
|
30
|
+
layout: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'grey',
|
|
33
|
+
validator: (value) => ['grey', 'blue', 'green','yellow'].includes(value)
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
computed:{
|
|
37
|
+
getComponentClass(){
|
|
38
|
+
return `layout-${this.layout}`
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class='psui-el-checkbox' @click="$emit('click')" :class="[getComponentClass, {'disabled':disabled}]" >
|
|
3
|
+
<input
|
|
4
|
+
type="checkbox"
|
|
5
|
+
:checked="checked"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:name="label"
|
|
8
|
+
/>
|
|
9
|
+
<label
|
|
10
|
+
:for="label"
|
|
11
|
+
class="psui-el-checkmark"
|
|
12
|
+
>
|
|
13
|
+
<slot v-if="!label" name="content"></slot>
|
|
14
|
+
<span v-else>{{ label }}</span>
|
|
15
|
+
</label>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
//FIGMA CONTROLS & SELECTORS https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64852
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'PsCheckboxSimple',
|
|
24
|
+
props: {
|
|
25
|
+
/**
|
|
26
|
+
* It sets the label of the checkbox input.
|
|
27
|
+
*/
|
|
28
|
+
label: {
|
|
29
|
+
type: String,
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* It disables the checkbox input.
|
|
33
|
+
*/
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
checked: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* It set the of the checkbox input. eg: big and small.
|
|
44
|
+
*/
|
|
45
|
+
size: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: 'big',
|
|
48
|
+
validator: (value)=> ['big', 'small'].includes(value)
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* It set the layout of the checkbox input. eg: default and mixed.
|
|
52
|
+
*/
|
|
53
|
+
layout:{
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'default',
|
|
56
|
+
validator: (value)=> ['default','mixed'].includes(value)
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
computed:{
|
|
60
|
+
getComponentClass(){
|
|
61
|
+
return `size-${this.size} layout-${this.layout}`
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
size="small"
|
|
37
37
|
:value="column.isActive"
|
|
38
38
|
:label="column.title"
|
|
39
|
+
:class="{'active' : column.isActive}"
|
|
40
|
+
:disabled="column.isDisabled"
|
|
41
|
+
class="psui-el-draggable-item-checkbox"
|
|
39
42
|
@input="$emit('on-select-item', { studyKey: getColumns.key, indexColumnGroup, indexColumn, columnGroupKey: columnGroup.key })"
|
|
40
43
|
/>
|
|
41
44
|
</span>
|
|
@@ -66,6 +69,24 @@ export default {
|
|
|
66
69
|
module:{
|
|
67
70
|
type: String
|
|
68
71
|
},
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* It disables the input. All mouse events are disabled.
|
|
75
|
+
*/
|
|
76
|
+
disabled: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
69
80
|
},
|
|
81
|
+
computed: {
|
|
82
|
+
getStatus() {
|
|
83
|
+
console.log('var:', this.column.key)
|
|
84
|
+
if (this.column.key == 'compliance_margin') {
|
|
85
|
+
return true
|
|
86
|
+
} else {
|
|
87
|
+
return false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
}
|
|
70
91
|
}
|
|
71
92
|
</script>
|
|
@@ -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
|
*/
|
|
@@ -29,10 +33,10 @@ export default {
|
|
|
29
33
|
* It's the value of the checkbox
|
|
30
34
|
*/
|
|
31
35
|
inputValue:{
|
|
32
|
-
type: String,
|
|
36
|
+
type: [String, Object],
|
|
33
37
|
},
|
|
34
38
|
value:{
|
|
35
|
-
type: String
|
|
39
|
+
type: [String, Object]
|
|
36
40
|
},
|
|
37
41
|
/**
|
|
38
42
|
* It disables the radio button. All mouse events are disabled.
|
|
@@ -64,5 +68,4 @@ export default {
|
|
|
64
68
|
}
|
|
65
69
|
},
|
|
66
70
|
}
|
|
67
|
-
</script>
|
|
68
|
-
|
|
71
|
+
</script>
|
package/src/index.js
CHANGED
|
@@ -28,6 +28,8 @@ import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
|
|
|
28
28
|
import PsInlineSelector from './components/controls/PsInlineSelector.vue'
|
|
29
29
|
import PsScrollBar from './components/playground/PsScrollBar.vue'
|
|
30
30
|
import PsMiniTag from './components/badges-and-tags/PsMiniTag.vue'
|
|
31
|
+
import PsCheckboxSimple from './components/controls/PsCheckboxSimple.vue'
|
|
32
|
+
import PsBadgeWithIcon from './components/badges-and-tags/PsBadgeWithIcon.vue'
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
|
|
@@ -63,6 +65,8 @@ export default {
|
|
|
63
65
|
Vue.component('PsDropdownList', PsDropdownList)
|
|
64
66
|
Vue.component('PsScrollBar', PsScrollBar)
|
|
65
67
|
Vue.component('PsMiniTag', PsMiniTag)
|
|
68
|
+
Vue.component('PsCheckboxSimple', PsCheckboxSimple)
|
|
69
|
+
Vue.component('PsBadgeWithIcon', PsBadgeWithIcon)
|
|
66
70
|
|
|
67
71
|
Vue.directive('click-outside', {
|
|
68
72
|
bind: function (el, binding, vnode) {
|
|
@@ -112,6 +116,8 @@ export {
|
|
|
112
116
|
PsDropdown,
|
|
113
117
|
PsDropdownList,
|
|
114
118
|
PsScrollBar,
|
|
115
|
-
PsMiniTag
|
|
119
|
+
PsMiniTag,
|
|
120
|
+
PsCheckboxSimple,
|
|
121
|
+
PsBadgeWithIcon
|
|
116
122
|
}
|
|
117
123
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import PsBadgeWithIcon from '../components/badges-and-tags/PsBadgeWithIcon.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/BadgeWithIcon',
|
|
5
|
+
component: PsBadgeWithIcon,
|
|
6
|
+
argTypes: {
|
|
7
|
+
},
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const TemplateDefault = (args, {argTypes})=>({
|
|
11
|
+
props: Object.keys(argTypes),
|
|
12
|
+
components:{PsBadgeWithIcon},
|
|
13
|
+
template: `
|
|
14
|
+
<div style="display: flex; flex-direction: column;">
|
|
15
|
+
<div style="width: fit-content; display:flex; gap:70px; margin-left: 40px;">
|
|
16
|
+
<span>Grey</span>
|
|
17
|
+
<span style="margin-left: 8px;">Blue</span>
|
|
18
|
+
<span style="margin-left: 5px;">Green</span>
|
|
19
|
+
<span>Yellow</span>
|
|
20
|
+
</div>
|
|
21
|
+
<div style="width: fit-content; display:flex; gap:5px;">
|
|
22
|
+
<PsBadgeWithIcon/>
|
|
23
|
+
<PsBadgeWithIcon layout="blue"/>
|
|
24
|
+
<PsBadgeWithIcon layout="green"/>
|
|
25
|
+
<PsBadgeWithIcon layout="yellow"/>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
`
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
export const Default = TemplateDefault.bind({})
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import PsCheckboxSimple from '../components/controls/PsCheckboxSimple.vue'
|
|
2
|
+
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/CheckboxSimple',
|
|
5
|
+
component: PsCheckboxSimple,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const defaultTemplate = (args, {argTypes}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsCheckboxSimple },
|
|
11
|
+
data: () => ({
|
|
12
|
+
checkBox1 : true
|
|
13
|
+
}),
|
|
14
|
+
template: `
|
|
15
|
+
<div style='display:flex; gap: 20px;'>
|
|
16
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
17
|
+
<p>Resting</p>
|
|
18
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
19
|
+
<PsCheckboxSimple :checked="checkBox1" @click="checkBox1 = !checkBox1" label='Label 1' />
|
|
20
|
+
<PsCheckboxSimple v-bind="$props" label='Label 2' size='small' />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
24
|
+
<p>Active</p>
|
|
25
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
26
|
+
<PsCheckboxSimple v-bind="$props" label='Label 3' checked />
|
|
27
|
+
<PsCheckboxSimple v-bind="$props" label='Label 4' checked size='small'/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
31
|
+
<p>Mixed</p>
|
|
32
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
33
|
+
<PsCheckboxSimple v-bind="$props" label='Label 5' layout='mixed' checked />
|
|
34
|
+
<PsCheckboxSimple v-bind="$props" label='Label 6' layout='mixed' size='small' checked />
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
38
|
+
<p>Disabled</p>
|
|
39
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
40
|
+
<PsCheckboxSimple v-bind="$props" label='Label 7' disabled/>
|
|
41
|
+
<PsCheckboxSimple v-bind="$props" label='Label 8' size='small' disabled/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
`
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
export const Default = defaultTemplate.bind({})
|
package/tailwind.config.js
CHANGED
|
@@ -54,8 +54,8 @@ module.exports = {
|
|
|
54
54
|
big: ['16px', '130%'],
|
|
55
55
|
small: ['14px', '130%'],
|
|
56
56
|
xsmall: ['12px', '130%'],
|
|
57
|
-
accent: ['14px', '130%',
|
|
58
|
-
accentSmall: ['12px', '130%',
|
|
57
|
+
accent: ['14px', { lineHeight: '130%', letterSpacing: '0.6px' }],
|
|
58
|
+
accentSmall: ['12px', { lineHeight: '130%', letterSpacing: '0.6px' }],
|
|
59
59
|
p: ['16px', '130%'],
|
|
60
60
|
h1: ['28px', '130%'],
|
|
61
61
|
h2: ['24px', '130%'],
|