@policystudio/policy-studio-ui-vue 1.0.47 → 1.0.55
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 +122 -67
- 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 +38 -29
- package/src/assets/scss/components/PsMiniTag.scss +2 -2
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +43 -0
- package/src/components/controls/PsCheckbox.vue +1 -1
- package/src/components/controls/PsCheckboxSimple.vue +65 -0
- package/src/components/controls/PsDraggable.vue +35 -17
- package/src/components/controls/PsRadioButton.vue +2 -2
- 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));
|
|
@@ -17255,13 +17327,35 @@ html {
|
|
|
17255
17327
|
|
|
17256
17328
|
.psui-el-draggable .psui-el-draggable-item-title {
|
|
17257
17329
|
--text-opacity: 1;
|
|
17258
|
-
color: #
|
|
17259
|
-
color: rgba(
|
|
17330
|
+
color: #798490;
|
|
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
|
|
|
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 {
|
|
17350
|
+
--text-opacity: 1;
|
|
17351
|
+
color: #515E6A;
|
|
17352
|
+
color: rgba(81, 94, 106, var(--text-opacity));
|
|
17353
|
+
}
|
|
17354
|
+
|
|
17355
|
+
.psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox.disabled .psui-el-checkmark {
|
|
17356
|
+
color: #798490 !important;
|
|
17357
|
+
}
|
|
17358
|
+
|
|
17265
17359
|
.psui-el-draggable .psui-el-draggable-item-append {
|
|
17266
17360
|
display: flex;
|
|
17267
17361
|
--text-opacity: 1;
|
|
@@ -17274,76 +17368,27 @@ html {
|
|
|
17274
17368
|
font-size: 18px;
|
|
17275
17369
|
}
|
|
17276
17370
|
|
|
17277
|
-
.psui-el-draggable .psui-el-draggable-item:active
|
|
17371
|
+
.psui-el-draggable .psui-el-draggable-item:active,
|
|
17372
|
+
.psui-el-draggable .psui-el-draggable-item.on-dragging {
|
|
17278
17373
|
cursor: -webkit-grabbing;
|
|
17279
17374
|
cursor: grabbing;
|
|
17280
17375
|
}
|
|
17281
17376
|
|
|
17282
|
-
.psui-el-draggable .psui-el-draggable-
|
|
17283
|
-
|
|
17284
|
-
display: flex;
|
|
17285
|
-
flex-wrap: wrap;
|
|
17286
|
-
}
|
|
17287
|
-
|
|
17288
|
-
.psui-el-draggable .psui-el-draggable-list-items-wrapper li {
|
|
17289
|
-
width: 100%;
|
|
17290
|
-
margin-bottom: 0.5rem;
|
|
17291
|
-
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.03), 0px 1px 2px rgba(0, 0, 0, 0.1);
|
|
17292
|
-
background-color: #ffffff;
|
|
17293
|
-
border-radius: 0.25rem;
|
|
17294
|
-
display: flex;
|
|
17295
|
-
align-items: center;
|
|
17296
|
-
padding: 7px 16px;
|
|
17377
|
+
.psui-el-draggable .psui-el-draggable-item.on-drag-over {
|
|
17378
|
+
opacity: 0.2;
|
|
17297
17379
|
}
|
|
17298
17380
|
|
|
17299
|
-
.psui-el-draggable .psui-el-draggable-
|
|
17300
|
-
|
|
17301
|
-
|
|
17302
|
-
color: rgba(121, 132, 144, var(--text-opacity));
|
|
17303
|
-
cursor: -webkit-grab;
|
|
17304
|
-
cursor: grab
|
|
17305
|
-
}
|
|
17306
|
-
|
|
17307
|
-
.psui-el-draggable .psui-el-draggable-list-items-wrapper li:active {
|
|
17308
|
-
cursor: -webkit-grabbing;
|
|
17309
|
-
cursor: grabbing
|
|
17310
|
-
}
|
|
17311
|
-
|
|
17312
|
-
.psui-el-draggable .psui-el-draggable-list-items-wrapper .psui-el-draggable-item-wrapper {
|
|
17313
|
-
-webkit-user-select: none;
|
|
17314
|
-
-moz-user-select: none;
|
|
17315
|
-
-ms-user-select: none;
|
|
17316
|
-
user-select: none;
|
|
17317
|
-
width: 100%;
|
|
17318
|
-
display: flex;
|
|
17319
|
-
align-items: center
|
|
17320
|
-
}
|
|
17321
|
-
|
|
17322
|
-
.psui-el-draggable .psui-el-draggable-list-items-wrapper .psui-el-draggable-item-icon {
|
|
17323
|
-
display: flex;
|
|
17324
|
-
justify-content: flex-end;
|
|
17325
|
-
margin-left: auto;
|
|
17326
|
-
}
|
|
17381
|
+
.psui-el-draggable .psui-el-draggable-item .psui-el-checkbox.size-small .psui-el-checkmark span {
|
|
17382
|
+
font-weight: 700;
|
|
17383
|
+
}
|
|
17327
17384
|
|
|
17328
|
-
.psui-el-draggable .psui-el-draggable-
|
|
17329
|
-
|
|
17330
|
-
|
|
17331
|
-
|
|
17332
|
-
|
|
17333
|
-
|
|
17334
|
-
|
|
17335
|
-
text-transform: none;
|
|
17336
|
-
display: inline-block;
|
|
17337
|
-
white-space: nowrap;
|
|
17338
|
-
word-wrap: normal;
|
|
17339
|
-
direction: ltr;
|
|
17340
|
-
-webkit-font-feature-settings: 'liga';
|
|
17341
|
-
-webkit-font-smoothing: antialiased;
|
|
17342
|
-
--text-opacity: 1;
|
|
17343
|
-
color: #D6DDE5;
|
|
17344
|
-
color: rgba(214, 221, 229, var(--text-opacity));
|
|
17345
|
-
font-size: 18px;
|
|
17346
|
-
}
|
|
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
|
+
}
|
|
17347
17392
|
|
|
17348
17393
|
.psui-el-input-select {
|
|
17349
17394
|
width: 100%;
|
|
@@ -18057,7 +18102,8 @@ html {
|
|
|
18057
18102
|
.psui-el-mini-tag span {
|
|
18058
18103
|
width: 100%;
|
|
18059
18104
|
font-weight: 700;
|
|
18060
|
-
|
|
18105
|
+
text-transform: uppercase;
|
|
18106
|
+
padding: 3px 8px 3px 8px;
|
|
18061
18107
|
font-size: 10px;
|
|
18062
18108
|
letter-spacing: 0.5px;
|
|
18063
18109
|
}
|
|
@@ -18173,6 +18219,7 @@ html {
|
|
|
18173
18219
|
gap: 1rem;
|
|
18174
18220
|
font-size: 12px;
|
|
18175
18221
|
line-height: 130%;
|
|
18222
|
+
letter-spacing: 0.6px;
|
|
18176
18223
|
}
|
|
18177
18224
|
|
|
18178
18225
|
.psui-el-toast.fill-intense.layout-info {
|
|
@@ -25654,11 +25701,13 @@ html {
|
|
|
25654
25701
|
.sm\:psui-text-accent{
|
|
25655
25702
|
font-size: 14px;
|
|
25656
25703
|
line-height: 130%;
|
|
25704
|
+
letter-spacing: 0.6px;
|
|
25657
25705
|
}
|
|
25658
25706
|
|
|
25659
25707
|
.sm\:psui-text-accentSmall{
|
|
25660
25708
|
font-size: 12px;
|
|
25661
25709
|
line-height: 130%;
|
|
25710
|
+
letter-spacing: 0.6px;
|
|
25662
25711
|
}
|
|
25663
25712
|
|
|
25664
25713
|
.sm\:psui-text-p{
|
|
@@ -40074,11 +40123,13 @@ html {
|
|
|
40074
40123
|
.md\:psui-text-accent{
|
|
40075
40124
|
font-size: 14px;
|
|
40076
40125
|
line-height: 130%;
|
|
40126
|
+
letter-spacing: 0.6px;
|
|
40077
40127
|
}
|
|
40078
40128
|
|
|
40079
40129
|
.md\:psui-text-accentSmall{
|
|
40080
40130
|
font-size: 12px;
|
|
40081
40131
|
line-height: 130%;
|
|
40132
|
+
letter-spacing: 0.6px;
|
|
40082
40133
|
}
|
|
40083
40134
|
|
|
40084
40135
|
.md\:psui-text-p{
|
|
@@ -54494,11 +54545,13 @@ html {
|
|
|
54494
54545
|
.lg\:psui-text-accent{
|
|
54495
54546
|
font-size: 14px;
|
|
54496
54547
|
line-height: 130%;
|
|
54548
|
+
letter-spacing: 0.6px;
|
|
54497
54549
|
}
|
|
54498
54550
|
|
|
54499
54551
|
.lg\:psui-text-accentSmall{
|
|
54500
54552
|
font-size: 12px;
|
|
54501
54553
|
line-height: 130%;
|
|
54554
|
+
letter-spacing: 0.6px;
|
|
54502
54555
|
}
|
|
54503
54556
|
|
|
54504
54557
|
.lg\:psui-text-p{
|
|
@@ -68914,11 +68967,13 @@ html {
|
|
|
68914
68967
|
.xl\:psui-text-accent{
|
|
68915
68968
|
font-size: 14px;
|
|
68916
68969
|
line-height: 130%;
|
|
68970
|
+
letter-spacing: 0.6px;
|
|
68917
68971
|
}
|
|
68918
68972
|
|
|
68919
68973
|
.xl\:psui-text-accentSmall{
|
|
68920
68974
|
font-size: 12px;
|
|
68921
68975
|
line-height: 130%;
|
|
68976
|
+
letter-spacing: 0.6px;
|
|
68922
68977
|
}
|
|
68923
68978
|
|
|
68924
68979
|
.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,7 +31,27 @@
|
|
|
31
31
|
padding: 7px 16px;
|
|
32
32
|
|
|
33
33
|
&-title {
|
|
34
|
-
@apply psui-text-gray-
|
|
34
|
+
@apply psui-text-gray-50 psui-text-small;
|
|
35
|
+
|
|
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
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
35
55
|
}
|
|
36
56
|
|
|
37
57
|
&-append {
|
|
@@ -42,38 +62,27 @@
|
|
|
42
62
|
}
|
|
43
63
|
}
|
|
44
64
|
|
|
45
|
-
&:active
|
|
46
|
-
|
|
65
|
+
&:active,
|
|
66
|
+
&.on-dragging {
|
|
67
|
+
cursor: -webkit-grabbing;
|
|
68
|
+
cursor: -moz-grabbing;
|
|
69
|
+
cursor: grabbing;
|
|
47
70
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.psui-el-draggable-list-items-wrapper {
|
|
52
|
-
@apply psui-w-full psui-flex psui-flex-wrap;
|
|
53
|
-
|
|
54
|
-
li {
|
|
55
|
-
@apply psui-w-full psui-mb-2 psui-shadow-elevation-5 psui-bg-white psui-rounded psui-flex psui-items-center;
|
|
56
|
-
padding: 7px 16px;
|
|
57
|
-
|
|
58
|
-
&:hover {
|
|
59
|
-
@apply psui-text-gray-50 psui-cursor-grab
|
|
60
|
-
}
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.psui-el-draggable-item-wrapper {
|
|
68
|
-
@apply psui-select-none psui-w-full psui-flex psui-items-center
|
|
72
|
+
&.on-drag-over {
|
|
73
|
+
opacity: 0.2;
|
|
69
74
|
}
|
|
70
75
|
|
|
71
|
-
.psui-el-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
+
}
|
|
77
86
|
}
|
|
78
87
|
}
|
|
79
88
|
}
|
|
@@ -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>
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
v-for="(columnGroup, indexColumnGroup) in getColumns.columnGroups"
|
|
5
5
|
:key="indexColumnGroup"
|
|
6
6
|
:ref="indexColumnGroup"
|
|
7
|
+
:id="`edit-group-${indexColumnGroup}`"
|
|
7
8
|
>
|
|
8
9
|
<div
|
|
9
10
|
class="psui-el-draggable-wrapper-title"
|
|
10
11
|
draggable="true"
|
|
11
|
-
@dragstart="
|
|
12
|
-
@
|
|
13
|
-
@
|
|
12
|
+
@dragstart="$emit('drag-start-group', indexColumnGroup)"
|
|
13
|
+
@dragend="$emit('drag-end-group', indexColumnGroup)"
|
|
14
|
+
@dragover="$emit('drag-over-group', indexColumnGroup)"
|
|
14
15
|
>
|
|
15
16
|
<p>{{ columnGroup.title }}</p>
|
|
16
17
|
<i class="material-icons-round">drag_indicator</i>
|
|
@@ -22,19 +23,27 @@
|
|
|
22
23
|
:key="`edit-columns-column-${indexColumnGroup}-${indexColumn}`"
|
|
23
24
|
:id="`edit-columns-column-${indexColumnGroup}-${indexColumn}`"
|
|
24
25
|
class="psui-el-draggable-item"
|
|
26
|
+
draggable="true"
|
|
27
|
+
@dragstart="$emit('drag-start-item', { indexColumnGroup, indexColumn }, $event)"
|
|
28
|
+
@dragover="$emit('drag-over-item', { indexColumnGroup, indexColumn }, $event)"
|
|
29
|
+
@dragend="$emit('drag-end-item', $event)"
|
|
25
30
|
>
|
|
26
31
|
<div
|
|
27
32
|
class="psui-w-full psui-flex psui-items-center"
|
|
28
|
-
draggable="true"
|
|
29
|
-
@dragstart="$emit('drag-start-item',$event)"
|
|
30
|
-
@dragover="$emit('drag-over-item',$event)"
|
|
31
|
-
@dragend="$emit('drag-end-item',$event)"
|
|
32
33
|
>
|
|
33
34
|
<span class="psui-el-draggable-item-title">
|
|
34
|
-
|
|
35
|
+
<PsCheckbox
|
|
36
|
+
size="small"
|
|
37
|
+
:value="column.isActive"
|
|
38
|
+
:label="column.title"
|
|
39
|
+
:class="{'active' : column.isActive}"
|
|
40
|
+
:disabled="column.isDisabled"
|
|
41
|
+
class="psui-el-draggable-item-checkbox"
|
|
42
|
+
@input="$emit('on-select-item', { studyKey: getColumns.key, indexColumnGroup, indexColumn, columnGroupKey: columnGroup.key })"
|
|
43
|
+
/>
|
|
35
44
|
</span>
|
|
36
45
|
<span class="psui-el-draggable-item-append">
|
|
37
|
-
<i class="
|
|
46
|
+
<i class="psui-icon">drag_indicator</i>
|
|
38
47
|
</span>
|
|
39
48
|
</div>
|
|
40
49
|
</div>
|
|
@@ -59,16 +68,25 @@ export default {
|
|
|
59
68
|
*/
|
|
60
69
|
module:{
|
|
61
70
|
type: String
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
methods:{
|
|
65
|
-
onDragStart(event){
|
|
66
|
-
this.$emit('drag-start', event)
|
|
67
71
|
},
|
|
68
72
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
/**
|
|
74
|
+
* It disables the input. All mouse events are disabled.
|
|
75
|
+
*/
|
|
76
|
+
disabled: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
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
|
+
},
|
|
72
90
|
}
|
|
73
91
|
}
|
|
74
92
|
</script>
|
|
@@ -29,10 +29,10 @@ export default {
|
|
|
29
29
|
* It's the value of the checkbox
|
|
30
30
|
*/
|
|
31
31
|
inputValue:{
|
|
32
|
-
type: String,
|
|
32
|
+
type: [String, Object],
|
|
33
33
|
},
|
|
34
34
|
value:{
|
|
35
|
-
type: String
|
|
35
|
+
type: [String, Object]
|
|
36
36
|
},
|
|
37
37
|
/**
|
|
38
38
|
* It disables the radio button. All mouse events are disabled.
|
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%'],
|