@policystudio/policy-studio-ui-vue 1.0.24 → 1.0.25
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 +279 -24
- package/package.json +1 -1
- package/src/assets/scss/base.scss +2 -0
- package/src/assets/scss/components/PsAccordion.scss +6 -2
- package/src/assets/scss/components/PsButton.scss +19 -17
- package/src/assets/scss/components/PsDialog.scss +71 -0
- package/src/assets/scss/components/PsTabHeader.scss +98 -0
- package/src/components/accordion/PsAccordion.vue +0 -1
- package/src/components/accordion/PsAccordionItem.vue +9 -2
- package/src/components/badges-and-tags/PsChartLegend.vue +6 -6
- package/src/components/buttons/PsButton.vue +10 -9
- package/src/components/notifications/PsDialog.vue +29 -23
- package/src/components/tabs/PsTabHeader.vue +25 -31
- package/src/index.js +3 -3
- package/src/stories/Button.stories.js +12 -2
- package/src/stories/Dialog.stories.js +14 -50
- package/src/stories/TabHeader.stories.js +6 -6
package/dist/css/psui_styles.css
CHANGED
|
@@ -16081,6 +16081,252 @@ html {
|
|
|
16081
16081
|
-moz-osx-font-smoothing: grayscale;
|
|
16082
16082
|
}
|
|
16083
16083
|
|
|
16084
|
+
.transition-default {
|
|
16085
|
+
transition: cubic-bezier(.17,.67,.83,.67) 250ms;
|
|
16086
|
+
}
|
|
16087
|
+
|
|
16088
|
+
.psui-el-dialog {
|
|
16089
|
+
display: flex;
|
|
16090
|
+
justify-content: flex-start;
|
|
16091
|
+
align-items: flex-start;
|
|
16092
|
+
padding-right: 0.75rem;
|
|
16093
|
+
padding-left: 0.5rem;
|
|
16094
|
+
padding-top: 0.5rem;
|
|
16095
|
+
padding-bottom: 0.5rem;
|
|
16096
|
+
border-radius: 0.375rem;
|
|
16097
|
+
}
|
|
16098
|
+
|
|
16099
|
+
.psui-el-dialog-wrapper {
|
|
16100
|
+
display: flex;
|
|
16101
|
+
flex-grow: 1
|
|
16102
|
+
}
|
|
16103
|
+
|
|
16104
|
+
.psui-el-dialog-icon {
|
|
16105
|
+
display: flex;
|
|
16106
|
+
margin-right: 0.5rem;
|
|
16107
|
+
vertical-align: top;
|
|
16108
|
+
}
|
|
16109
|
+
|
|
16110
|
+
.psui-el-dialog-close {
|
|
16111
|
+
margin-left: auto;
|
|
16112
|
+
display: inline-block;
|
|
16113
|
+
}
|
|
16114
|
+
|
|
16115
|
+
.psui-el-dialog-close:focus{
|
|
16116
|
+
outline: 2px solid transparent;
|
|
16117
|
+
outline-offset: 2px
|
|
16118
|
+
}
|
|
16119
|
+
|
|
16120
|
+
.psui-el-dialog-close i {
|
|
16121
|
+
vertical-align: middle;
|
|
16122
|
+
font-size: 18px;
|
|
16123
|
+
}
|
|
16124
|
+
|
|
16125
|
+
.psui-el-dialog.layout-vertical {
|
|
16126
|
+
padding-right: 0.5rem;
|
|
16127
|
+
padding-left: 0.5rem;
|
|
16128
|
+
display: flex;
|
|
16129
|
+
align-items: flex-start;
|
|
16130
|
+
}
|
|
16131
|
+
|
|
16132
|
+
.psui-el-dialog.layout-vertical .psui-el-dialog-wrapper {
|
|
16133
|
+
flex-direction: column;
|
|
16134
|
+
font-size: 14px;
|
|
16135
|
+
line-height: 130%
|
|
16136
|
+
}
|
|
16137
|
+
|
|
16138
|
+
.psui-el-dialog.layout-vertical i {
|
|
16139
|
+
vertical-align: top
|
|
16140
|
+
}
|
|
16141
|
+
|
|
16142
|
+
.psui-el-dialog.layout-vertical .psui-el-dialog-action {
|
|
16143
|
+
padding-top: 0.5rem
|
|
16144
|
+
}
|
|
16145
|
+
|
|
16146
|
+
.psui-el-dialog.layout-horizontal .psui-el-dialog-close {
|
|
16147
|
+
margin-left: 0.75rem
|
|
16148
|
+
}
|
|
16149
|
+
|
|
16150
|
+
.psui-el-dialog.layout-horizontal .psui-el-dialog-default {
|
|
16151
|
+
margin-right: auto
|
|
16152
|
+
}
|
|
16153
|
+
|
|
16154
|
+
.psui-el-dialog.layout-horizontal .psui-el-dialog-action {
|
|
16155
|
+
margin-left: 0.75rem
|
|
16156
|
+
}
|
|
16157
|
+
|
|
16158
|
+
.psui-el-dialog.layout-horizontal .psui-el-dialog-wrapper {
|
|
16159
|
+
font-size: 14px;
|
|
16160
|
+
line-height: 130%;
|
|
16161
|
+
padding-top: 0.25rem;
|
|
16162
|
+
padding-bottom: 0.25rem
|
|
16163
|
+
}
|
|
16164
|
+
|
|
16165
|
+
.psui-el-dialog.theme-informative {
|
|
16166
|
+
--bg-opacity: 1;
|
|
16167
|
+
background-color: #E0EFF6;
|
|
16168
|
+
background-color: rgba(224, 239, 246, var(--bg-opacity));
|
|
16169
|
+
--text-opacity: 1;
|
|
16170
|
+
color: #318FAC;
|
|
16171
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
16172
|
+
}
|
|
16173
|
+
|
|
16174
|
+
.psui-el-dialog.theme-success {
|
|
16175
|
+
--bg-opacity: 1;
|
|
16176
|
+
background-color: #DEF8E8;
|
|
16177
|
+
background-color: rgba(222, 248, 232, var(--bg-opacity));
|
|
16178
|
+
--text-opacity: 1;
|
|
16179
|
+
color: #44A06A;
|
|
16180
|
+
color: rgba(68, 160, 106, var(--text-opacity));
|
|
16181
|
+
}
|
|
16182
|
+
|
|
16183
|
+
.psui-el-dialog.theme-alert {
|
|
16184
|
+
--bg-opacity: 1;
|
|
16185
|
+
background-color: #FDF3E3;
|
|
16186
|
+
background-color: rgba(253, 243, 227, var(--bg-opacity));
|
|
16187
|
+
--text-opacity: 1;
|
|
16188
|
+
color: #B87305;
|
|
16189
|
+
color: rgba(184, 115, 5, var(--text-opacity));
|
|
16190
|
+
}
|
|
16191
|
+
|
|
16192
|
+
.psui-el-tab-header {
|
|
16193
|
+
display: flex;
|
|
16194
|
+
/* Layout Standard */
|
|
16195
|
+
/* ----------------------------------------- Layout Standard */
|
|
16196
|
+
/* Layout Underline */
|
|
16197
|
+
/* ----------------------------------------- Layout Underline */
|
|
16198
|
+
/* Layout Folder */
|
|
16199
|
+
/* ----------------------------------------- Layout Folder */
|
|
16200
|
+
}
|
|
16201
|
+
|
|
16202
|
+
.psui-el-tab-header button {
|
|
16203
|
+
transition: cubic-bezier(.17,.67,.83,.67) 250ms;
|
|
16204
|
+
font-size: 14px;
|
|
16205
|
+
line-height: 130%;
|
|
16206
|
+
}
|
|
16207
|
+
|
|
16208
|
+
.psui-el-tab-header.status-disabled .psui-el-input-wrapper {
|
|
16209
|
+
--bg-opacity: 1;
|
|
16210
|
+
background-color: #E6ECF2;
|
|
16211
|
+
background-color: rgba(230, 236, 242, var(--bg-opacity));
|
|
16212
|
+
--border-opacity: 1;
|
|
16213
|
+
border-color: #E6ECF2;
|
|
16214
|
+
border-color: rgba(230, 236, 242, var(--border-opacity))
|
|
16215
|
+
}
|
|
16216
|
+
|
|
16217
|
+
/* ----------------------------------------- */
|
|
16218
|
+
|
|
16219
|
+
.psui-el-tab-header.layout-standard {
|
|
16220
|
+
border-radius: 0.375rem;
|
|
16221
|
+
}
|
|
16222
|
+
|
|
16223
|
+
.psui-el-tab-header.layout-standard button {
|
|
16224
|
+
--bg-opacity: 1;
|
|
16225
|
+
background-color: #F3F6F9;
|
|
16226
|
+
background-color: rgba(243, 246, 249, var(--bg-opacity));
|
|
16227
|
+
--text-opacity: 1;
|
|
16228
|
+
color: #515E6A;
|
|
16229
|
+
color: rgba(81, 94, 106, var(--text-opacity));
|
|
16230
|
+
padding: 6px 12px;
|
|
16231
|
+
}
|
|
16232
|
+
|
|
16233
|
+
.psui-el-tab-header.layout-standard button:not(:last-child) {
|
|
16234
|
+
margin-right: 1px;
|
|
16235
|
+
}
|
|
16236
|
+
|
|
16237
|
+
.psui-el-tab-header.layout-standard button:first-child {
|
|
16238
|
+
border-top-left-radius: 0.25rem;
|
|
16239
|
+
border-bottom-left-radius: 0.25rem;
|
|
16240
|
+
}
|
|
16241
|
+
|
|
16242
|
+
.psui-el-tab-header.layout-standard button:last-child {
|
|
16243
|
+
border-top-right-radius: 0.25rem;
|
|
16244
|
+
border-bottom-right-radius: 0.25rem;
|
|
16245
|
+
}
|
|
16246
|
+
|
|
16247
|
+
.psui-el-tab-header.layout-standard button:hover {
|
|
16248
|
+
--text-opacity: 1;
|
|
16249
|
+
color: #318FAC;
|
|
16250
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
16251
|
+
}
|
|
16252
|
+
|
|
16253
|
+
.psui-el-tab-header.layout-standard button.status-active {
|
|
16254
|
+
color: #ffffff;
|
|
16255
|
+
--bg-opacity: 1;
|
|
16256
|
+
background-color: #318FAC;
|
|
16257
|
+
background-color: rgba(49, 143, 172, var(--bg-opacity));
|
|
16258
|
+
font-weight: 700;
|
|
16259
|
+
}
|
|
16260
|
+
|
|
16261
|
+
/* ----------------------------------------- */
|
|
16262
|
+
|
|
16263
|
+
.psui-el-tab-header.layout-underline {
|
|
16264
|
+
border-bottom-width: 1px;
|
|
16265
|
+
--border-opacity: 1;
|
|
16266
|
+
border-color: #E6ECF2;
|
|
16267
|
+
border-color: rgba(230, 236, 242, var(--border-opacity));
|
|
16268
|
+
}
|
|
16269
|
+
|
|
16270
|
+
.psui-el-tab-header.layout-underline button {
|
|
16271
|
+
--text-opacity: 1;
|
|
16272
|
+
color: #798490;
|
|
16273
|
+
color: rgba(121, 132, 144, var(--text-opacity));
|
|
16274
|
+
font-weight: 700;
|
|
16275
|
+
border-bottom: 3px solid transparent;
|
|
16276
|
+
padding: 11.5px 0;
|
|
16277
|
+
}
|
|
16278
|
+
|
|
16279
|
+
.psui-el-tab-header.layout-underline button:not(:last-child) {
|
|
16280
|
+
margin-right: 20px;
|
|
16281
|
+
}
|
|
16282
|
+
|
|
16283
|
+
.psui-el-tab-header.layout-underline button:hover {
|
|
16284
|
+
--text-opacity: 1;
|
|
16285
|
+
color: #318FAC;
|
|
16286
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
16287
|
+
}
|
|
16288
|
+
|
|
16289
|
+
.psui-el-tab-header.layout-underline button.status-active {
|
|
16290
|
+
--text-opacity: 1;
|
|
16291
|
+
color: #318FAC;
|
|
16292
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
16293
|
+
--border-opacity: 1;
|
|
16294
|
+
border-color: #318FAC;
|
|
16295
|
+
border-color: rgba(49, 143, 172, var(--border-opacity));
|
|
16296
|
+
}
|
|
16297
|
+
|
|
16298
|
+
/* ----------------------------------------- */
|
|
16299
|
+
|
|
16300
|
+
.psui-el-tab-header.layout-folder button {
|
|
16301
|
+
--bg-opacity: 1;
|
|
16302
|
+
background-color: #F3F6F9;
|
|
16303
|
+
background-color: rgba(243, 246, 249, var(--bg-opacity));
|
|
16304
|
+
--text-opacity: 1;
|
|
16305
|
+
color: #798490;
|
|
16306
|
+
color: rgba(121, 132, 144, var(--text-opacity));
|
|
16307
|
+
border-top-left-radius: 0.25rem;
|
|
16308
|
+
border-top-right-radius: 0.25rem;
|
|
16309
|
+
padding: 9px 12px;
|
|
16310
|
+
}
|
|
16311
|
+
|
|
16312
|
+
.psui-el-tab-header.layout-folder button:not(:last-child) {
|
|
16313
|
+
margin-right: 4px;
|
|
16314
|
+
}
|
|
16315
|
+
|
|
16316
|
+
.psui-el-tab-header.layout-folder button:hover {
|
|
16317
|
+
--text-opacity: 1;
|
|
16318
|
+
color: #515E6A;
|
|
16319
|
+
color: rgba(81, 94, 106, var(--text-opacity));
|
|
16320
|
+
}
|
|
16321
|
+
|
|
16322
|
+
.psui-el-tab-header.layout-folder button.status-active {
|
|
16323
|
+
--text-opacity: 1;
|
|
16324
|
+
color: #318FAC;
|
|
16325
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
16326
|
+
font-weight: 700;
|
|
16327
|
+
background-color: #ffffff;
|
|
16328
|
+
}
|
|
16329
|
+
|
|
16084
16330
|
.psui-el-accordion-item {
|
|
16085
16331
|
border-bottom: 1px solid #e6ecf2;
|
|
16086
16332
|
}
|
|
@@ -16091,6 +16337,9 @@ html {
|
|
|
16091
16337
|
transition-property: all;
|
|
16092
16338
|
justify-content: space-between;
|
|
16093
16339
|
transition: cubic-bezier(.17,.67,.83,.67) 250ms;
|
|
16340
|
+
--text-opacity: 1;
|
|
16341
|
+
color: #28323B;
|
|
16342
|
+
color: rgba(40, 50, 59, var(--text-opacity));
|
|
16094
16343
|
padding-top: 16px;
|
|
16095
16344
|
padding-bottom: 16px;
|
|
16096
16345
|
}
|
|
@@ -16133,7 +16382,19 @@ html {
|
|
|
16133
16382
|
font-weight: 700;
|
|
16134
16383
|
}
|
|
16135
16384
|
|
|
16136
|
-
.psui-el-accordion
|
|
16385
|
+
.psui-el-accordion.layout-medium .psui-el-accordion-item-icon {
|
|
16386
|
+
--text-opacity: 1;
|
|
16387
|
+
color: #515E6A;
|
|
16388
|
+
color: rgba(81, 94, 106, var(--text-opacity))
|
|
16389
|
+
}
|
|
16390
|
+
|
|
16391
|
+
.psui-el-accordion .psui-el-accordion-item.status-opened .psui-el-accordion-item-header, .psui-el-accordion .psui-el-accordion-item-header:hover {
|
|
16392
|
+
--text-opacity: 1;
|
|
16393
|
+
color: #318FAC;
|
|
16394
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
16395
|
+
}
|
|
16396
|
+
|
|
16397
|
+
.psui-el-accordion .psui-el-accordion-item.status-opened .psui-el-accordion-item-header .psui-el-accordion-item-icon, .psui-el-accordion .psui-el-accordion-item-header:hover .psui-el-accordion-item-icon {
|
|
16137
16398
|
--text-opacity: 1;
|
|
16138
16399
|
color: #318FAC;
|
|
16139
16400
|
color: rgba(49, 143, 172, var(--text-opacity));
|
|
@@ -16305,11 +16566,11 @@ html {
|
|
|
16305
16566
|
outline: none;
|
|
16306
16567
|
}
|
|
16307
16568
|
|
|
16308
|
-
.psui-el-button.right {
|
|
16569
|
+
.psui-el-button.icon-right {
|
|
16309
16570
|
flex-direction: row-reverse;
|
|
16310
16571
|
}
|
|
16311
16572
|
|
|
16312
|
-
.psui-el-button.big {
|
|
16573
|
+
.psui-el-button.size-big {
|
|
16313
16574
|
display: flex;
|
|
16314
16575
|
align-items: center;
|
|
16315
16576
|
align-content: center;
|
|
@@ -16317,17 +16578,17 @@ html {
|
|
|
16317
16578
|
font-size: 16px;
|
|
16318
16579
|
}
|
|
16319
16580
|
|
|
16320
|
-
.psui-el-button.big.left i {
|
|
16581
|
+
.psui-el-button.size-big.icon-left i {
|
|
16321
16582
|
font-size: 24px;
|
|
16322
16583
|
margin-right: 8px;
|
|
16323
16584
|
}
|
|
16324
16585
|
|
|
16325
|
-
.psui-el-button.big.right i {
|
|
16586
|
+
.psui-el-button.size-big.icon-right i {
|
|
16326
16587
|
font-size: 24px;
|
|
16327
16588
|
margin-left: 8px;
|
|
16328
16589
|
}
|
|
16329
16590
|
|
|
16330
|
-
.psui-el-button.medium {
|
|
16591
|
+
.psui-el-button.size-medium {
|
|
16331
16592
|
display: flex;
|
|
16332
16593
|
align-items: center;
|
|
16333
16594
|
align-content: center;
|
|
@@ -16335,17 +16596,17 @@ html {
|
|
|
16335
16596
|
font-size: 14px;
|
|
16336
16597
|
}
|
|
16337
16598
|
|
|
16338
|
-
.psui-el-button.medium.left i {
|
|
16599
|
+
.psui-el-button.size-medium.icon-left i {
|
|
16339
16600
|
font-size: 18px;
|
|
16340
16601
|
margin-right: 4px;
|
|
16341
16602
|
}
|
|
16342
16603
|
|
|
16343
|
-
.psui-el-button.medium.right i {
|
|
16604
|
+
.psui-el-button.size-medium.icon-right i {
|
|
16344
16605
|
font-size: 18px;
|
|
16345
16606
|
margin-left: 4px;
|
|
16346
16607
|
}
|
|
16347
16608
|
|
|
16348
|
-
.psui-el-button.small {
|
|
16609
|
+
.psui-el-button.size-small {
|
|
16349
16610
|
display: flex;
|
|
16350
16611
|
align-items: center;
|
|
16351
16612
|
align-content: center;
|
|
@@ -16353,7 +16614,7 @@ html {
|
|
|
16353
16614
|
font-size: 14px;
|
|
16354
16615
|
}
|
|
16355
16616
|
|
|
16356
|
-
.psui-el-button.small
|
|
16617
|
+
.psui-el-button.size-small:focus {
|
|
16357
16618
|
--bg-opacity: 1;
|
|
16358
16619
|
background-color: #E0EFF6;
|
|
16359
16620
|
background-color: rgba(224, 239, 246, var(--bg-opacity));
|
|
@@ -16363,7 +16624,7 @@ html {
|
|
|
16363
16624
|
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.05);
|
|
16364
16625
|
}
|
|
16365
16626
|
|
|
16366
|
-
.psui-el-button.small.hover.layout-onlytext {
|
|
16627
|
+
.psui-el-button.size-small.hover.layout-onlytext {
|
|
16367
16628
|
--text-opacity: 1 !important;
|
|
16368
16629
|
color: #318FAC !important;
|
|
16369
16630
|
color: rgba(49, 143, 172, var(--text-opacity)) !important;
|
|
@@ -16372,12 +16633,12 @@ html {
|
|
|
16372
16633
|
background-color: rgba(224, 239, 246, var(--bg-opacity)) !important;
|
|
16373
16634
|
}
|
|
16374
16635
|
|
|
16375
|
-
.psui-el-button.small.left i {
|
|
16636
|
+
.psui-el-button.size-small.icon-left i {
|
|
16376
16637
|
font-size: 18px;
|
|
16377
16638
|
margin-right: 4px;
|
|
16378
16639
|
}
|
|
16379
16640
|
|
|
16380
|
-
.psui-el-button.small.right i {
|
|
16641
|
+
.psui-el-button.size-small.icon-right i {
|
|
16381
16642
|
font-size: 18px;
|
|
16382
16643
|
margin-left: 4px;
|
|
16383
16644
|
}
|
|
@@ -16396,7 +16657,7 @@ html {
|
|
|
16396
16657
|
color: #ffffff;
|
|
16397
16658
|
}
|
|
16398
16659
|
|
|
16399
|
-
.psui-el-button.layout-solid
|
|
16660
|
+
.psui-el-button.layout-solid:focus {
|
|
16400
16661
|
--bg-opacity: 1;
|
|
16401
16662
|
background-color: #64B5CE;
|
|
16402
16663
|
background-color: rgba(100, 181, 206, var(--bg-opacity));
|
|
@@ -16426,7 +16687,7 @@ html {
|
|
|
16426
16687
|
}
|
|
16427
16688
|
|
|
16428
16689
|
.psui-el-button.layout-outline.hover,
|
|
16429
|
-
.psui-el-button.layout-outline
|
|
16690
|
+
.psui-el-button.layout-outline:focus {
|
|
16430
16691
|
border-width: 1px;
|
|
16431
16692
|
--border-opacity: 1;
|
|
16432
16693
|
border-color: #318FAC;
|
|
@@ -16452,11 +16713,9 @@ html {
|
|
|
16452
16713
|
color: rgba(49, 143, 172, var(--text-opacity));
|
|
16453
16714
|
}
|
|
16454
16715
|
|
|
16455
|
-
.psui-el-button.layout-ghost.hover,
|
|
16456
|
-
.psui-el-button.layout-ghost
|
|
16457
|
-
|
|
16458
|
-
background-color: #ECF7FB;
|
|
16459
|
-
background-color: rgba(236, 247, 251, var(--bg-opacity))
|
|
16716
|
+
.psui-el-button.layout-ghost.hover,
|
|
16717
|
+
.psui-el-button.layout-ghost:focus {
|
|
16718
|
+
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.05);
|
|
16460
16719
|
}
|
|
16461
16720
|
|
|
16462
16721
|
.psui-el-button.layout-ghost.disabled {
|
|
@@ -16489,10 +16748,6 @@ html {
|
|
|
16489
16748
|
color: rgba(100, 181, 206, var(--text-opacity))
|
|
16490
16749
|
}
|
|
16491
16750
|
|
|
16492
|
-
.transition-default {
|
|
16493
|
-
transition: cubic-bezier(.17,.67,.83,.67) 250ms;
|
|
16494
|
-
}
|
|
16495
|
-
|
|
16496
16751
|
@media (min-width: 640px){
|
|
16497
16752
|
.sm\:psui-container{
|
|
16498
16753
|
width: 100%;
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
@import url('https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Round');
|
|
2
|
+
@import './components/PsTabHeader.scss';
|
|
2
3
|
@import './components/PsAccordion.scss';
|
|
3
4
|
@import './components/PsInput.scss';
|
|
4
5
|
@import './components/PsButton.scss';
|
|
6
|
+
@import './components//PsDialog.scss';
|
|
5
7
|
@import "tailwindcss/base";
|
|
6
8
|
@import "tailwindcss/components";
|
|
7
9
|
@import "tailwindcss/utilities";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
border-bottom: 1px solid #e6ecf2;
|
|
7
7
|
|
|
8
8
|
&-header {
|
|
9
|
-
@apply psui-flex psui-cursor-pointer psui-transition-all psui-justify-between transition-default;
|
|
9
|
+
@apply psui-flex psui-cursor-pointer psui-transition-all psui-justify-between transition-default psui-text-gray-80;
|
|
10
10
|
padding-top: 16px;
|
|
11
11
|
padding-bottom: 16px;
|
|
12
12
|
&:hover {
|
|
@@ -45,11 +45,15 @@
|
|
|
45
45
|
&-title {
|
|
46
46
|
@apply psui-text-small psui-font-bold;
|
|
47
47
|
}
|
|
48
|
+
&-icon {
|
|
49
|
+
@apply psui-text-gray-60
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
.psui-el-accordion-item {
|
|
52
|
-
&.status-opened, &-header:hover {
|
|
55
|
+
&.status-opened .psui-el-accordion-item-header, &-header:hover {
|
|
56
|
+
@apply psui-text-blue-60;
|
|
53
57
|
.psui-el-accordion-item-icon {
|
|
54
58
|
@apply psui-text-blue-60;
|
|
55
59
|
}
|
|
@@ -15,52 +15,52 @@
|
|
|
15
15
|
outline: none;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
&.right {
|
|
18
|
+
&.icon-right {
|
|
19
19
|
@apply psui-flex-row-reverse;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
&.big {
|
|
22
|
+
&.size-big {
|
|
23
23
|
@apply psui-flex psui-items-center psui-content-center;
|
|
24
24
|
padding: 9.5px 16px;
|
|
25
25
|
font-size: 16px;
|
|
26
26
|
|
|
27
|
-
&.left i {
|
|
27
|
+
&.icon-left i {
|
|
28
28
|
font-size: 24px;
|
|
29
29
|
margin-right: 8px;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
&.right i {
|
|
32
|
+
&.icon-right i {
|
|
33
33
|
font-size: 24px;
|
|
34
34
|
margin-left: 8px;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
&.medium {
|
|
39
|
+
&.size-medium {
|
|
40
40
|
|
|
41
41
|
@apply psui-flex psui-items-center psui-content-center;
|
|
42
42
|
padding: 7px 16px;
|
|
43
43
|
font-size: 14px;
|
|
44
44
|
|
|
45
|
-
&.left i {
|
|
45
|
+
&.icon-left i {
|
|
46
46
|
font-size: 18px;
|
|
47
47
|
margin-right: 4px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
&.right i {
|
|
50
|
+
&.icon-right i {
|
|
51
51
|
font-size: 18px;
|
|
52
52
|
margin-left: 4px;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
&.small {
|
|
56
|
+
&.size-small {
|
|
57
57
|
|
|
58
58
|
@apply psui-flex psui-items-center psui-content-center;
|
|
59
59
|
padding: 4px 8px;
|
|
60
60
|
font-size: 14px;
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
@apply psui-bg-blue-20 psui-text-blue-60;
|
|
62
|
+
&:focus {
|
|
63
|
+
@apply psui-bg-blue-20 psui-text-blue-60;
|
|
64
64
|
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.05);
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
@apply psui-text-blue-60 psui-bg-blue-20 !important;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
&.left {
|
|
71
|
+
&.icon-left {
|
|
72
72
|
i {
|
|
73
73
|
font-size: 18px;
|
|
74
74
|
margin-right: 4px;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
&.right {
|
|
78
|
+
&.icon-right {
|
|
79
79
|
i {
|
|
80
80
|
font-size: 18px;
|
|
81
81
|
margin-left: 4px;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
@apply psui-bg-blue-50 psui-text-white;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
&:focus {
|
|
96
96
|
@apply psui-bg-blue-50 psui-text-white;
|
|
97
97
|
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.15);
|
|
98
98
|
}
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
background: transparent;
|
|
109
109
|
|
|
110
110
|
&.hover,
|
|
111
|
-
|
|
111
|
+
&:focus {
|
|
112
112
|
@apply psui-border psui-border-blue-60
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -120,10 +120,12 @@
|
|
|
120
120
|
&.layout-ghost {
|
|
121
121
|
|
|
122
122
|
@apply psui-bg-blue-20 psui-text-blue-60;
|
|
123
|
-
|
|
124
|
-
&.
|
|
125
|
-
|
|
123
|
+
|
|
124
|
+
&.hover,
|
|
125
|
+
&:focus {
|
|
126
|
+
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.05);
|
|
126
127
|
}
|
|
128
|
+
|
|
127
129
|
&.disabled {
|
|
128
130
|
@apply psui-text-gray-40 psui-bg-gray-20 psui-cursor-default
|
|
129
131
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
|
|
3
|
+
.psui-el-dialog {
|
|
4
|
+
@apply psui-flex psui-justify-start psui-items-start psui-pr-3 psui-pl-2 psui-py-2 psui-rounded-md;
|
|
5
|
+
|
|
6
|
+
&-wrapper {
|
|
7
|
+
@apply psui-flex psui-flex-grow
|
|
8
|
+
}
|
|
9
|
+
&-icon {
|
|
10
|
+
@apply psui-flex psui-mr-2 psui-align-top;
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
&-close {
|
|
14
|
+
@apply psui-ml-auto psui-inline-block;
|
|
15
|
+
|
|
16
|
+
&:focus{
|
|
17
|
+
@apply psui-outline-none
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
i {
|
|
21
|
+
@apply psui-align-middle;
|
|
22
|
+
font-size: 18px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.layout-vertical {
|
|
28
|
+
@apply psui-pr-2 psui-pl-2 psui-flex psui-items-start;
|
|
29
|
+
|
|
30
|
+
.psui-el-dialog-wrapper {
|
|
31
|
+
@apply psui-flex-col psui-text-small
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
i {
|
|
35
|
+
@apply psui-align-top
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.psui-el-dialog-action {
|
|
39
|
+
@apply psui-pt-2
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.layout-horizontal {
|
|
44
|
+
.psui-el-dialog-close {
|
|
45
|
+
@apply psui-ml-3
|
|
46
|
+
}
|
|
47
|
+
.psui-el-dialog-default {
|
|
48
|
+
@apply psui-mr-auto
|
|
49
|
+
}
|
|
50
|
+
.psui-el-dialog-action {
|
|
51
|
+
@apply psui-ml-3
|
|
52
|
+
}
|
|
53
|
+
.psui-el-dialog-wrapper {
|
|
54
|
+
@apply psui-text-small psui-py-1
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
&.theme-informative {
|
|
60
|
+
@apply psui-bg-blue-20 psui-text-blue-60;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.theme-success {
|
|
64
|
+
@apply psui-bg-green-10 psui-text-green-70;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.theme-alert {
|
|
68
|
+
@apply psui-bg-yellow-10 psui-text-yellow-70;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@layer components{
|
|
2
|
+
|
|
3
|
+
.psui-el-tab-header {
|
|
4
|
+
@apply psui-flex;
|
|
5
|
+
|
|
6
|
+
button {
|
|
7
|
+
@apply transition-default psui-text-small;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.status-disabled {
|
|
11
|
+
.psui-el-input-wrapper {
|
|
12
|
+
@apply psui-bg-gray-20 psui-border-gray-20
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Layout Standard */
|
|
17
|
+
/* ----------------------------------------- */
|
|
18
|
+
&.layout-standard {
|
|
19
|
+
@apply psui-rounded-md;
|
|
20
|
+
|
|
21
|
+
button {
|
|
22
|
+
@apply psui-bg-gray-10 psui-text-gray-60;
|
|
23
|
+
padding: 6px 12px;
|
|
24
|
+
|
|
25
|
+
&:not(:last-child) {
|
|
26
|
+
margin-right: 1px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:first-child {
|
|
30
|
+
@apply psui-rounded-l;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:last-child {
|
|
34
|
+
@apply psui-rounded-r;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
@apply psui-text-blue-60;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.status-active {
|
|
42
|
+
@apply psui-text-white psui-bg-blue-60 psui-font-bold;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/* ----------------------------------------- Layout Standard */
|
|
47
|
+
|
|
48
|
+
/* Layout Underline */
|
|
49
|
+
/* ----------------------------------------- */
|
|
50
|
+
&.layout-underline {
|
|
51
|
+
@apply psui-border-b psui-border-gray-20;
|
|
52
|
+
|
|
53
|
+
button {
|
|
54
|
+
@apply psui-text-gray-50 psui-font-bold;
|
|
55
|
+
border-bottom: 3px solid transparent;
|
|
56
|
+
padding: 11.5px 0;
|
|
57
|
+
|
|
58
|
+
&:not(:last-child) {
|
|
59
|
+
margin-right: 20px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
@apply psui-text-blue-60;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.status-active {
|
|
67
|
+
@apply psui-text-blue-60 psui-border-blue-60;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/* ----------------------------------------- Layout Underline */
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/* Layout Folder */
|
|
75
|
+
/* ----------------------------------------- */
|
|
76
|
+
&.layout-folder {
|
|
77
|
+
button {
|
|
78
|
+
@apply psui-bg-gray-10 psui-text-gray-50 psui-rounded-t;
|
|
79
|
+
padding: 9px 12px;
|
|
80
|
+
|
|
81
|
+
&:not(:last-child) {
|
|
82
|
+
margin-right: 4px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
@apply psui-text-gray-60;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.status-active {
|
|
90
|
+
@apply psui-text-blue-60 psui-font-bold psui-bg-white;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/* ----------------------------------------- Layout Folder */
|
|
95
|
+
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
@@ -37,8 +37,8 @@ export default {
|
|
|
37
37
|
computed: {
|
|
38
38
|
getIcons() {
|
|
39
39
|
return {
|
|
40
|
-
'iconOpened' : this.iconOpened ?? this.$parent.getIcons.iconOpened,
|
|
41
|
-
'iconClosed' : this.iconClosed ?? this.$parent.getIcons.iconClosed,
|
|
40
|
+
'iconOpened' : this.iconOpened ?? this.getParentVueComponentByName(this.$parent, 'PsAccordion').getIcons.iconOpened,
|
|
41
|
+
'iconClosed' : this.iconClosed ?? this.getParentVueComponentByName(this.$parent, 'PsAccordion').getIcons.iconClosed,
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
getIcon() {
|
|
@@ -56,6 +56,13 @@ export default {
|
|
|
56
56
|
this.localOpened = !this.localOpened
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
getParentVueComponentByName(comp, name) {
|
|
60
|
+
if (comp.$options.name === name) {
|
|
61
|
+
return comp
|
|
62
|
+
} else {
|
|
63
|
+
return this.getParentVueComponentByName(comp.$parent, name)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
}
|
|
61
68
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="psui-flex psui-p-2 psui-rounded">
|
|
3
3
|
<div class="psui-flex psui-flex-shrink-0">
|
|
4
|
-
<div
|
|
4
|
+
<div class="dot psui-rounded-full" :style="dotColor"></div>
|
|
5
5
|
</div>
|
|
6
6
|
<div class="psui-flex-grow-1">
|
|
7
7
|
<div class="psui-text-xsmall psui-text-gray-50 psui-font-bold psui-mb-1">{{ text }}</div>
|
|
@@ -19,16 +19,16 @@ export default {
|
|
|
19
19
|
default: 'Climate Zone 10',
|
|
20
20
|
},
|
|
21
21
|
total: {
|
|
22
|
-
type:
|
|
22
|
+
type: String,
|
|
23
23
|
default: null,
|
|
24
24
|
},
|
|
25
25
|
percentage: {
|
|
26
|
-
type:
|
|
27
|
-
default:
|
|
26
|
+
type: String,
|
|
27
|
+
default: null,
|
|
28
28
|
},
|
|
29
29
|
dotColor: {
|
|
30
|
-
type:
|
|
31
|
-
default:
|
|
30
|
+
type: Object,
|
|
31
|
+
default: null
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
@mouseenter="onMouseEnter"
|
|
5
5
|
@mouseleave="onMouseLeave"
|
|
6
6
|
class='psui-el-button'
|
|
7
|
-
:class="[getComponentClass, {'hover': isHover}, {'
|
|
7
|
+
:class="[getComponentClass, {'hover': isHover}, {'disabled': disabled}]"
|
|
8
8
|
>
|
|
9
|
-
<i v-if="icon"
|
|
10
|
-
<span v-if="label"
|
|
9
|
+
<i v-if="icon" :class='iconClass' class='material-icons-round'>{{icon}}</i>
|
|
10
|
+
<span v-if="label">{{ label }}</span>
|
|
11
11
|
</button>
|
|
12
12
|
</template>
|
|
13
13
|
|
|
@@ -19,7 +19,6 @@ export default {
|
|
|
19
19
|
},
|
|
20
20
|
layout: {
|
|
21
21
|
type: String,
|
|
22
|
-
required: true,
|
|
23
22
|
default: 'solid',
|
|
24
23
|
validator: (value) => ['solid','outline','ghost','onlytext'].includes(value)
|
|
25
24
|
},
|
|
@@ -28,13 +27,13 @@ export default {
|
|
|
28
27
|
},
|
|
29
28
|
iconPosition:{
|
|
30
29
|
type: String,
|
|
31
|
-
default: '
|
|
30
|
+
default: 'left',
|
|
32
31
|
validator: (value) => ['left','right'].includes(value)
|
|
33
32
|
},
|
|
34
33
|
size: {
|
|
35
34
|
type: String,
|
|
36
35
|
default: 'big',
|
|
37
|
-
validator: (value) => ['small','medium','big'].includes(value)
|
|
36
|
+
validator: (value) => ['small','medium','big','custom'].includes(value)
|
|
38
37
|
},
|
|
39
38
|
disabled: {
|
|
40
39
|
type: Boolean,
|
|
@@ -47,18 +46,20 @@ export default {
|
|
|
47
46
|
data(){
|
|
48
47
|
return {
|
|
49
48
|
isHover: false,
|
|
50
|
-
isActive: false,
|
|
51
49
|
}
|
|
52
50
|
},
|
|
53
51
|
computed: {
|
|
54
52
|
getComponentClass(){
|
|
55
|
-
|
|
53
|
+
if (this.size != 'custom') {
|
|
54
|
+
return `layout-${this.layout} size-${this.size} icon-${this.iconPosition}`
|
|
55
|
+
} else {
|
|
56
|
+
return `layout-${this.layout} icon-${this.iconPosition}`
|
|
57
|
+
}
|
|
56
58
|
}
|
|
57
59
|
},
|
|
58
60
|
methods: {
|
|
59
61
|
onClick() {
|
|
60
62
|
if (this.disabled) return
|
|
61
|
-
this.isActive = true,
|
|
62
63
|
this.$emit('click')
|
|
63
64
|
},
|
|
64
65
|
onMouseEnter(){
|
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="psui-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<div class="psui-el-dialog" :class="getComponentClass">
|
|
3
|
+
<div class="psui-el-dialog-icon">
|
|
4
|
+
<i class="material-icons-round">{{icon}}</i>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="psui-el-dialog-wrapper">
|
|
7
|
+
<div class="psui-el-dialog-default">
|
|
8
|
+
<slot>
|
|
9
|
+
<p class="psui-el-dialog-message">{{ message }}</p>
|
|
10
|
+
</slot>
|
|
10
11
|
</div>
|
|
11
|
-
<div class="psui-
|
|
12
|
-
<slot
|
|
13
|
-
<button @click="onClose" class="psui-w-4 psui-h-4 focus:psui-outline-none hover:opacity-70 transition-default">
|
|
14
|
-
<i class="material-icons-round">close</i>
|
|
15
|
-
</button>
|
|
12
|
+
<div class="psui-el-dialog-action">
|
|
13
|
+
<slot name="action"></slot>
|
|
16
14
|
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<button
|
|
17
|
+
class="psui-el-dialog-close"
|
|
18
|
+
v-if="hasClose"
|
|
19
|
+
@click="onClose">
|
|
20
|
+
<i class="material-icons-round">close</i>
|
|
21
|
+
</button>
|
|
17
22
|
</div>
|
|
18
23
|
</template>
|
|
19
24
|
|
|
20
25
|
<script>
|
|
21
|
-
|
|
26
|
+
// Figma - 3. Inline Dialog https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=3694%3A55841
|
|
22
27
|
export default {
|
|
23
28
|
name: 'PsDialog',
|
|
24
29
|
props: {
|
|
25
|
-
|
|
30
|
+
theme: {
|
|
26
31
|
type: String,
|
|
27
32
|
default: 'informative',
|
|
28
33
|
validator: (value) => ['informative', 'success', 'alert'].includes(value)
|
|
@@ -35,18 +40,19 @@ export default {
|
|
|
35
40
|
default: 'horizontal',
|
|
36
41
|
validator: (value) => ['horizontal', 'vertical'].includes(value)
|
|
37
42
|
},
|
|
38
|
-
|
|
39
|
-
type:
|
|
43
|
+
hasClose: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
47
|
+
icon: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: 'info'
|
|
40
50
|
}
|
|
41
51
|
},
|
|
42
52
|
emits:['close'],
|
|
43
53
|
computed: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if(this.status === 'informative') dialogColor = `psui-bg-blue-20 psui-text-blue-60 ${this.cssClass}`
|
|
47
|
-
if(this.status === 'success') dialogColor = `psui-bg-green-10 psui-text-green-70 ${this.cssClass}`
|
|
48
|
-
if(this.status === 'alert') dialogColor = `psui-bg-yellow-10 psui-text-yellow-70 ${this.cssClass}`
|
|
49
|
-
return dialogColor
|
|
54
|
+
getComponentClass() {
|
|
55
|
+
return [`layout-${this.layout}`, `theme-${this.theme}`, `close-${this.hasClose ? 'on' : 'off'}` ]
|
|
50
56
|
}
|
|
51
57
|
},
|
|
52
58
|
methods:{
|
|
@@ -1,38 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="psui-el-tab-header"
|
|
4
|
+
:class="[getComponentClass, `layout-${layout}`]"
|
|
5
|
+
role="group"
|
|
6
|
+
>
|
|
7
|
+
|
|
3
8
|
<button
|
|
4
9
|
type="button"
|
|
5
10
|
v-for="item in getItems"
|
|
6
11
|
:key="item[keyValue]"
|
|
7
12
|
@click="selectTab(item)"
|
|
8
|
-
:class="[
|
|
9
|
-
'transition-default',
|
|
10
|
-
classes,
|
|
11
|
-
{ 'psui-bg-blue-60 psui-text-white': getSelected === item[keyValue] && theme === 'standard' },
|
|
12
|
-
{ 'psui-border-blue-60 psui-text-blue-60': getSelected === item[keyValue] && theme === 'underline' },
|
|
13
|
-
{ 'psui-text-blue-60 psui-font-bold psui-bg-white hover:psui-text-blue-60': getSelected === item[keyValue] && theme === 'folder' }
|
|
14
|
-
]"
|
|
13
|
+
:class="{ 'status-active': getSelected === item[keyValue] }"
|
|
15
14
|
>
|
|
16
15
|
{{ item[keyLabel] }}
|
|
17
16
|
</button>
|
|
18
|
-
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
|
-
export const themeOptions = ['standard', 'underline', 'folder']
|
|
23
22
|
export default {
|
|
24
23
|
name: 'PsTabHeader',
|
|
25
24
|
props: {
|
|
26
|
-
|
|
25
|
+
layout: {
|
|
27
26
|
type: String,
|
|
28
27
|
default: 'standard',
|
|
29
|
-
validator: (value) =>
|
|
28
|
+
validator: (value) => ['standard', 'underline', 'folder'].includes(value)
|
|
30
29
|
},
|
|
31
30
|
items: {
|
|
32
31
|
type: Array,
|
|
33
32
|
required: true
|
|
34
33
|
},
|
|
35
|
-
selected: {},
|
|
36
34
|
keyLabel: {
|
|
37
35
|
type: String,
|
|
38
36
|
default: 'label'
|
|
@@ -40,26 +38,20 @@ export default {
|
|
|
40
38
|
keyValue: {
|
|
41
39
|
type: String,
|
|
42
40
|
default: 'value'
|
|
43
|
-
}
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
selected: {},
|
|
44
47
|
},
|
|
45
48
|
computed: {
|
|
46
|
-
|
|
47
|
-
if (this.
|
|
48
|
-
return '
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return 'psui-flex psui-space-x-1'
|
|
52
|
-
}
|
|
53
|
-
return 'psui-inline-flex psui-rounded-md psui-flex psui-gap-x-px'
|
|
54
|
-
},
|
|
55
|
-
classes() {
|
|
56
|
-
if (this.theme === 'underline') {
|
|
57
|
-
return 'psui-text-gray-60 psui-pb-3 psui-text-small psui-border-b-2 psui-border-transparent psui-font-bold hover:psui-text-blue-60'
|
|
58
|
-
}
|
|
59
|
-
if (this.theme === 'folder') {
|
|
60
|
-
return 'psui-bg-gray-10 psui-text-gray-50 psui-py-2 psui-px-4 psui-rounded-t-lg hover:psui-text-gray-60 active:psui-text-blue-60'
|
|
49
|
+
getComponentClass() {
|
|
50
|
+
if (this.disabled) {
|
|
51
|
+
return 'status-disabled'
|
|
52
|
+
} else {
|
|
53
|
+
return 'status-resting'
|
|
61
54
|
}
|
|
62
|
-
return 'psui-bg-gray-10 psui-px-4 psui-py-2 psui-text-gray-60 hover:psui-text-blue-60 last:psui-rounded-r-lg first:psui-rounded-l-lg active:psui-text-white active:psui-bg-blue-60'
|
|
63
55
|
},
|
|
64
56
|
getIsObject() {
|
|
65
57
|
return typeof this.selected === 'object'
|
|
@@ -86,7 +78,7 @@ export default {
|
|
|
86
78
|
} else {
|
|
87
79
|
return this.items
|
|
88
80
|
}
|
|
89
|
-
}
|
|
81
|
+
},
|
|
90
82
|
},
|
|
91
83
|
methods: {
|
|
92
84
|
selectTab(item) {
|
|
@@ -97,3 +89,5 @@ export default {
|
|
|
97
89
|
|
|
98
90
|
}
|
|
99
91
|
</script>
|
|
92
|
+
|
|
93
|
+
<style> /* Please, use the file src/assets/scss/components/PsTabHeader.scss */</style>
|
package/src/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import PsTooltip from './components/tooltip/PsTooltip.vue'
|
|
|
18
18
|
import PsRichTooltip from './components/tooltip/PsRichTooltip.vue'
|
|
19
19
|
import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
|
|
20
20
|
import PsDraggable from './components/controls/PsDraggable.vue'
|
|
21
|
-
|
|
21
|
+
import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
|
|
22
22
|
import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
|
|
23
23
|
|
|
24
24
|
export default {
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
Vue.component('PsRichTooltip', PsRichTooltip)
|
|
44
44
|
Vue.component('PsDialogTooltip', PsDialogTooltip)
|
|
45
45
|
Vue.component('PsDraggable', PsDraggable)
|
|
46
|
-
|
|
46
|
+
Vue.component('PsCardInfos', PsCardInfos)
|
|
47
47
|
Vue.component('PsChartLegend', PsChartLegend)
|
|
48
48
|
},
|
|
49
49
|
}
|
|
@@ -68,6 +68,6 @@ export {
|
|
|
68
68
|
PsRichTooltip,
|
|
69
69
|
PsDialogTooltip,
|
|
70
70
|
PsDraggable,
|
|
71
|
-
|
|
71
|
+
PsCardInfos,
|
|
72
72
|
PsChartLegend,
|
|
73
73
|
}
|
|
@@ -75,7 +75,7 @@ const TemplateDefault = (args, {argTypes}) => ({
|
|
|
75
75
|
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
|
|
76
76
|
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
|
|
77
77
|
<PsButton label='Text Only' layout='onlytext' size='medium'/>
|
|
78
|
-
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left'size='medium'/>
|
|
78
|
+
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
|
|
79
79
|
</div>
|
|
80
80
|
</div>
|
|
81
81
|
<p>Size: Small</p>
|
|
@@ -92,7 +92,17 @@ const TemplateDefault = (args, {argTypes}) => ({
|
|
|
92
92
|
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
|
|
93
93
|
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
|
|
94
94
|
<PsButton label='Text Only' layout='onlytext' size='small'/>
|
|
95
|
-
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left'size='small'/>
|
|
95
|
+
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<p>Size: Custom</p>
|
|
99
|
+
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
100
|
+
<div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
101
|
+
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
102
|
+
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
|
|
103
|
+
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
|
|
104
|
+
<PsButton label='Text Only' layout='onlytext'/>
|
|
105
|
+
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' />
|
|
96
106
|
</div>
|
|
97
107
|
</div>
|
|
98
108
|
</div>
|
|
@@ -5,21 +5,6 @@ export default {
|
|
|
5
5
|
component: PsDialog,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: { PsDialog },
|
|
11
|
-
template: `
|
|
12
|
-
<PsDialog v-bind="$props">
|
|
13
|
-
<template v-slot:content>
|
|
14
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
15
|
-
</template>
|
|
16
|
-
<template v-slot:action>
|
|
17
|
-
<p style='font-weight: 700;'>Action</p>
|
|
18
|
-
</template>
|
|
19
|
-
</PsDialog>
|
|
20
|
-
`,
|
|
21
|
-
})
|
|
22
|
-
|
|
23
8
|
const TemplateExamples = (args, { argTypes }) => ({
|
|
24
9
|
props: Object.keys(argTypes),
|
|
25
10
|
components: { PsDialog },
|
|
@@ -32,10 +17,7 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
32
17
|
|
|
33
18
|
<div>
|
|
34
19
|
<h2>Informative</h2>
|
|
35
|
-
<PsDialog
|
|
36
|
-
<template v-slot:content>
|
|
37
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
38
|
-
</template>
|
|
20
|
+
<PsDialog theme="informative" layout="horizontal" message="teste">
|
|
39
21
|
<template v-slot:action>
|
|
40
22
|
<p style='font-weight: 700;'>Action</p>
|
|
41
23
|
</template>
|
|
@@ -44,8 +26,8 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
44
26
|
|
|
45
27
|
<div>
|
|
46
28
|
<h2>Success</h2>
|
|
47
|
-
<PsDialog
|
|
48
|
-
<template
|
|
29
|
+
<PsDialog theme="success" layout="horizontal" :hasClose="false">
|
|
30
|
+
<template>
|
|
49
31
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
50
32
|
</template>
|
|
51
33
|
<template v-slot:action>
|
|
@@ -56,8 +38,8 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
56
38
|
|
|
57
39
|
<div>
|
|
58
40
|
<h2>Alert</h2>
|
|
59
|
-
<PsDialog
|
|
60
|
-
<template
|
|
41
|
+
<PsDialog theme="alert" layout="horizontal">
|
|
42
|
+
<template>
|
|
61
43
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
62
44
|
</template>
|
|
63
45
|
<template v-slot:action>
|
|
@@ -72,8 +54,8 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
72
54
|
|
|
73
55
|
<div>
|
|
74
56
|
<h2>Informative</h2>
|
|
75
|
-
<PsDialog
|
|
76
|
-
<template
|
|
57
|
+
<PsDialog theme="informative" layout="vertical">
|
|
58
|
+
<template>
|
|
77
59
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
78
60
|
</template>
|
|
79
61
|
<template v-slot:action>
|
|
@@ -84,8 +66,8 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
84
66
|
|
|
85
67
|
<div>
|
|
86
68
|
<h2>Success</h2>
|
|
87
|
-
<PsDialog
|
|
88
|
-
<template
|
|
69
|
+
<PsDialog theme="success" layout="vertical" :hasClose="false">
|
|
70
|
+
<template>
|
|
89
71
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
90
72
|
</template>
|
|
91
73
|
<template v-slot:action>
|
|
@@ -96,8 +78,8 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
96
78
|
|
|
97
79
|
<div>
|
|
98
80
|
<h2>Alert</h2>
|
|
99
|
-
<PsDialog
|
|
100
|
-
<template
|
|
81
|
+
<PsDialog theme="alert" layout="vertical">
|
|
82
|
+
<template>
|
|
101
83
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
102
84
|
</template>
|
|
103
85
|
<template v-slot:action>
|
|
@@ -115,7 +97,7 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
115
97
|
|
|
116
98
|
<div>
|
|
117
99
|
<h2>Informative</h2>
|
|
118
|
-
<PsDialog
|
|
100
|
+
<PsDialog theme="informative" layout="vertical" message="This component uses only the props message!">
|
|
119
101
|
<template v-slot:action>
|
|
120
102
|
<p style='font-weight: 700;'>Action</p>
|
|
121
103
|
</template>
|
|
@@ -124,7 +106,7 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
124
106
|
|
|
125
107
|
<div>
|
|
126
108
|
<h2>Success</h2>
|
|
127
|
-
<PsDialog
|
|
109
|
+
<PsDialog theme="success" layout="vertical" message="This component uses only the props message!" :hasClose="false">
|
|
128
110
|
<template v-slot:action>
|
|
129
111
|
<p style='font-weight: 700;'>Action</p>
|
|
130
112
|
</template>
|
|
@@ -133,7 +115,7 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
133
115
|
|
|
134
116
|
<div>
|
|
135
117
|
<h2>Alert</h2>
|
|
136
|
-
<PsDialog
|
|
118
|
+
<PsDialog theme="alert" layout="vertical" message="This component uses only the props message!">
|
|
137
119
|
<template v-slot:action>
|
|
138
120
|
<p style='font-weight: 700;'>Action</p>
|
|
139
121
|
</template>
|
|
@@ -146,22 +128,4 @@ const TemplateExamples = (args, { argTypes }) => ({
|
|
|
146
128
|
|
|
147
129
|
export const Examples = TemplateExamples.bind({})
|
|
148
130
|
|
|
149
|
-
export const Informative = Template.bind({})
|
|
150
|
-
Informative.args = {
|
|
151
|
-
status: 'informative',
|
|
152
|
-
layout: 'vertical',
|
|
153
|
-
cssClass: 'psui-w-2/3'
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export const Success = Template.bind({})
|
|
157
|
-
Success.args = {
|
|
158
|
-
status: 'success',
|
|
159
|
-
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export const Warning = Template.bind({})
|
|
163
|
-
Warning.args = {
|
|
164
|
-
status: 'alert',
|
|
165
|
-
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
166
|
-
}
|
|
167
131
|
|
|
@@ -17,13 +17,13 @@ const Template = (args, { argTypes }) => ({
|
|
|
17
17
|
template: `
|
|
18
18
|
<div class="psui-bg-gray-20 psui-p-8">
|
|
19
19
|
<PsTabHeader :selected.sync=selected v-bind="$props"/>
|
|
20
|
-
<div v-if="$props['selected'] === 'Existing Buildings'" class="psui-bg-white psui-p-4" :class="{ 'psui-mt-4' : $props['
|
|
20
|
+
<div v-if="$props['selected'] === 'Existing Buildings'" class="psui-bg-white psui-p-4" :class="{ 'psui-mt-4' : $props['layout'] === 'standard'}">
|
|
21
21
|
<p v-for="i of 4">Tab Existing Buildings Selected</p>
|
|
22
22
|
</div>
|
|
23
|
-
<div v-if="$props['selected'] === 'New Constructions'" class="psui-bg-white psui-p-4" :class="{ 'psui-mt-4' : $props['
|
|
23
|
+
<div v-if="$props['selected'] === 'New Constructions'" class="psui-bg-white psui-p-4" :class="{ 'psui-mt-4' : $props['layout'] === 'standard'}">
|
|
24
24
|
<p v-for="i of 4">Tab New Constructions Selected</p>
|
|
25
25
|
</div>
|
|
26
|
-
<div v-if="$props['selected'] === 'Other tab'" class="psui-bg-white psui-p-4" :class="{ 'psui-mt-4' : $props['
|
|
26
|
+
<div v-if="$props['selected'] === 'Other tab'" class="psui-bg-white psui-p-4" :class="{ 'psui-mt-4' : $props['layout'] === 'standard'}">
|
|
27
27
|
<p v-for="i of 4">Other tab Selected</p>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
@@ -32,21 +32,21 @@ const Template = (args, { argTypes }) => ({
|
|
|
32
32
|
|
|
33
33
|
export const Standard = Template.bind({})
|
|
34
34
|
Standard.args = {
|
|
35
|
-
|
|
35
|
+
layout: 'standard',
|
|
36
36
|
items: items,
|
|
37
37
|
selected: item
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export const Underline = Template.bind({})
|
|
41
41
|
Underline.args = {
|
|
42
|
-
|
|
42
|
+
layout: 'underline',
|
|
43
43
|
items: items,
|
|
44
44
|
selected: item
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export const Folder = Template.bind({})
|
|
48
48
|
Folder.args = {
|
|
49
|
-
|
|
49
|
+
layout: 'folder',
|
|
50
50
|
items: items,
|
|
51
51
|
selected: item
|
|
52
52
|
}
|