@policystudio/policy-studio-ui-vue 1.0.28 → 1.0.29

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.
@@ -16969,6 +16969,7 @@ html {
16969
16969
  --text-opacity: 1;
16970
16970
  color: #A2ACB7;
16971
16971
  color: rgba(162, 172, 183, var(--text-opacity));
16972
+ box-sizing: border-box;
16972
16973
  }
16973
16974
 
16974
16975
  .psui-el-input-select.disabled {
@@ -16982,80 +16983,85 @@ html {
16982
16983
  }
16983
16984
 
16984
16985
  .psui-el-input-select.disabled select {
16985
- --bg-opacity: 1;
16986
- background-color: #E6ECF2;
16987
- background-color: rgba(230, 236, 242, var(--bg-opacity));
16988
- --text-opacity: 1;
16989
- color: #A2ACB7;
16990
- color: rgba(162, 172, 183, var(--text-opacity));
16991
- --border-opacity: 1;
16992
- border-color: #E6ECF2;
16993
- border-color: rgba(230, 236, 242, var(--border-opacity))
16986
+ --text-opacity: 1 !important;
16987
+ color: #A2ACB7 !important;
16988
+ color: rgba(162, 172, 183, var(--text-opacity)) !important;
16989
+ --border-opacity: 1 !important;
16990
+ border-color: #E6ECF2 !important;
16991
+ border-color: rgba(230, 236, 242, var(--border-opacity)) !important;
16992
+ --bg-opacity: 1 !important;
16993
+ background-color: #E6ECF2 !important;
16994
+ background-color: rgba(230, 236, 242, var(--bg-opacity)) !important
16994
16995
  }
16995
16996
 
16996
16997
  .psui-el-input-select.disabled::after {
16997
- z-index: 10;
16998
- }
16999
-
17000
- .psui-el-input-select.selected select {
17001
- --border-opacity: 1;
17002
- border-color: #64B5CE;
17003
- border-color: rgba(100, 181, 206, var(--border-opacity));
17004
- --text-opacity: 1;
17005
- color: #515E6A;
17006
- color: rgba(81, 94, 106, var(--text-opacity))
16998
+ z-index: 20 !important;
16999
+ --text-opacity: 1 !important;
17000
+ color: #798490 !important;
17001
+ color: rgba(121, 132, 144, var(--text-opacity)) !important;
17007
17002
  }
17008
17003
 
17009
- .psui-el-input-select::after {
17010
- position: absolute;
17011
- display: inline-block;
17012
- --text-opacity: 1;
17013
- color: #798490;
17014
- color: rgba(121, 132, 144, var(--text-opacity));
17015
- content: 'arrow_drop_down';
17016
- font-family: 'Material Icons Round';
17017
- font-size: 24px;
17018
- top: 28px;
17019
- right: 16px;
17020
- z-index: -20;
17021
- }
17022
-
17023
- .psui-el-input-select select {
17024
- -webkit-appearance: none;
17025
- -moz-appearance: none;
17026
- appearance: none;
17027
- width: 100%;
17028
- border-width: 1px;
17029
- background-color: transparent;
17030
- --border-opacity: 1;
17031
- border-color: #D6DDE5;
17032
- border-color: rgba(214, 221, 229, var(--border-opacity));
17033
- border-radius: 0.375rem;
17034
- --text-opacity: 1;
17035
- color: #A2ACB7;
17036
- color: rgba(162, 172, 183, var(--text-opacity));
17037
- padding: 10px 16px;
17038
- }
17004
+ .psui-el-input-select.layout-default.selected select {
17005
+ --border-opacity: 1;
17006
+ border-color: #64B5CE;
17007
+ border-color: rgba(100, 181, 206, var(--border-opacity));
17008
+ --text-opacity: 1;
17009
+ color: #515E6A;
17010
+ color: rgba(81, 94, 106, var(--text-opacity))
17011
+ }
17039
17012
 
17040
- .psui-el-input-select select:hover,
17041
- .psui-el-input-select select:active {
17042
- --border-opacity: 1;
17043
- border-color: #64B5CE;
17044
- border-color: rgba(100, 181, 206, var(--border-opacity));
17013
+ .psui-el-input-select.layout-default::after {
17014
+ position: absolute;
17015
+ display: inline-block;
17045
17016
  --text-opacity: 1;
17046
- color: #515E6A;
17047
- color: rgba(81, 94, 106, var(--text-opacity))
17017
+ color: #798490;
17018
+ color: rgba(121, 132, 144, var(--text-opacity));
17019
+ content: 'arrow_drop_down';
17020
+ font-family: 'Material Icons Round';
17021
+ font-size: 24px;
17022
+ top: 26px;
17023
+ right: 15px;
17024
+ z-index: -20;
17048
17025
  }
17049
17026
 
17050
- .psui-el-input-select select:focus {
17027
+ .psui-el-input-select.layout-default select {
17028
+ -webkit-appearance: none;
17029
+ -moz-appearance: none;
17030
+ appearance: none;
17031
+ background-color: transparent;
17032
+ font-size: 16px;
17033
+ line-height: 130%;
17034
+ width: 100%;
17035
+ border-width: 1px;
17051
17036
  --border-opacity: 1;
17052
- border-color: #318FAC;
17053
- border-color: rgba(49, 143, 172, var(--border-opacity));
17037
+ border-color: #D6DDE5;
17038
+ border-color: rgba(214, 221, 229, var(--border-opacity));
17039
+ border-radius: 0.375rem;
17054
17040
  --text-opacity: 1;
17055
- color: #515E6A;
17056
- color: rgba(81, 94, 106, var(--text-opacity))
17041
+ color: #A2ACB7;
17042
+ color: rgba(162, 172, 183, var(--text-opacity));
17043
+ padding: 11.5px 16px;
17057
17044
  }
17058
17045
 
17046
+ .psui-el-input-select.layout-default select:hover,
17047
+ .psui-el-input-select.layout-default select:active {
17048
+ --border-opacity: 1;
17049
+ border-color: #64B5CE;
17050
+ border-color: rgba(100, 181, 206, var(--border-opacity));
17051
+ --text-opacity: 1;
17052
+ color: #515E6A;
17053
+ color: rgba(81, 94, 106, var(--text-opacity))
17054
+ }
17055
+
17056
+ .psui-el-input-select.layout-default select:focus {
17057
+ --border-opacity: 1;
17058
+ border-color: #318FAC;
17059
+ border-color: rgba(49, 143, 172, var(--border-opacity));
17060
+ --text-opacity: 1;
17061
+ color: #515E6A;
17062
+ color: rgba(81, 94, 106, var(--text-opacity))
17063
+ }
17064
+
17059
17065
  .psui-el-input-select label {
17060
17066
  display: flex;
17061
17067
  --text-opacity: 1;
@@ -17077,6 +17083,64 @@ html {
17077
17083
  line-height: 120%;
17078
17084
  }
17079
17085
 
17086
+ .psui-el-input-select.layout-mini select {
17087
+ font-size: 14px;
17088
+ line-height: 130%;
17089
+ -webkit-appearance: none;
17090
+ -moz-appearance: none;
17091
+ appearance: none;
17092
+ background-color: transparent;
17093
+ width: 100%;
17094
+ border-width: 1px;
17095
+ --border-opacity: 1;
17096
+ border-color: #D6DDE5;
17097
+ border-color: rgba(214, 221, 229, var(--border-opacity));
17098
+ border-radius: 4px;
17099
+ padding: 7px 8px;
17100
+ }
17101
+
17102
+ .psui-el-input-select.layout-mini select:hover,
17103
+ .psui-el-input-select.layout-mini select:active {
17104
+ --border-opacity: 1;
17105
+ border-color: #5DB883;
17106
+ border-color: rgba(93, 184, 131, var(--border-opacity));
17107
+ --text-opacity: 1;
17108
+ color: #798490;
17109
+ color: rgba(121, 132, 144, var(--text-opacity))
17110
+ }
17111
+
17112
+ .psui-el-input-select.layout-mini select:focus {
17113
+ --border-opacity: 1;
17114
+ border-color: #44A06A;
17115
+ border-color: rgba(68, 160, 106, var(--border-opacity));
17116
+ --text-opacity: 1;
17117
+ color: #798490;
17118
+ color: rgba(121, 132, 144, var(--text-opacity))
17119
+ }
17120
+
17121
+ .psui-el-input-select.layout-mini::after {
17122
+ position: absolute;
17123
+ display: inline-block;
17124
+ --text-opacity: 1;
17125
+ color: #798490;
17126
+ color: rgba(121, 132, 144, var(--text-opacity));
17127
+ content: 'unfold_more';
17128
+ font-family: 'Material Icons Round';
17129
+ font-size: 18px;
17130
+ top: 4px;
17131
+ right: 4px;
17132
+ z-index: -20;
17133
+ }
17134
+
17135
+ .psui-el-input-select.layout-mini.selected select {
17136
+ --border-opacity: 1;
17137
+ border-color: #5DB883;
17138
+ border-color: rgba(93, 184, 131, var(--border-opacity));
17139
+ --text-opacity: 1;
17140
+ color: #44A06A;
17141
+ color: rgba(68, 160, 106, var(--text-opacity))
17142
+ }
17143
+
17080
17144
  .psui-el-input-textarea {
17081
17145
  display: block;
17082
17146
  width: 100%;
@@ -17404,8 +17468,217 @@ html {
17404
17468
  }
17405
17469
 
17406
17470
  .psui-el-inline-selector {
17471
+ width: auto;
17472
+ max-width: 100%;
17473
+ font-size: 20px;
17474
+ line-height: 120%;
17475
+ overflow-x: hidden;
17476
+ position: relative;
17477
+ flex-shrink: 0;
17478
+ --text-opacity: 1;
17479
+ color: #318FAC;
17480
+ color: rgba(49, 143, 172, var(--text-opacity));
17481
+ }
17482
+
17483
+ .psui-el-inline-selector input {
17484
+ border-bottom-width: 1px;
17485
+ border-style: dashed;
17486
+ --border-opacity: 1;
17487
+ border-color: #64B5CE;
17488
+ border-color: rgba(100, 181, 206, var(--border-opacity));
17489
+ transition: 300ms ease-in all;
17490
+ }
17491
+
17492
+ .psui-el-inline-selector input::-moz-placeholder {
17493
+ font-size: 20px;
17494
+ line-height: 120%;
17495
+ --text-opacity: 1;
17496
+ color: #A2ACB7;
17497
+ color: rgba(162, 172, 183, var(--text-opacity))
17498
+ }
17499
+
17500
+ .psui-el-inline-selector input:-ms-input-placeholder {
17501
+ font-size: 20px;
17502
+ line-height: 120%;
17503
+ --text-opacity: 1;
17504
+ color: #A2ACB7;
17505
+ color: rgba(162, 172, 183, var(--text-opacity))
17506
+ }
17507
+
17508
+ .psui-el-inline-selector input::placeholder {
17509
+ font-size: 20px;
17510
+ line-height: 120%;
17511
+ --text-opacity: 1;
17512
+ color: #A2ACB7;
17513
+ color: rgba(162, 172, 183, var(--text-opacity))
17514
+ }
17515
+
17516
+ .psui-el-inline-selector .psui-el-inline-selector-input-wrapper {
17517
+ position: relative;
17518
+ }
17519
+
17520
+ .psui-el-inline-selector .psui-el-inline-selector-input-wrapper span {
17521
+ display: block;
17522
+ opacity: 0;
17523
+ min-width: 100px;
17524
+ min-height: 29px;
17525
+ }
17526
+
17527
+ .psui-el-inline-selector .psui-el-inline-selector-input-wrapper input {
17528
+ -webkit-appearance: none;
17529
+ -moz-appearance: none;
17530
+ appearance: none;
17531
+ background-color: transparent;
17532
+ display: block;
17533
+ position: absolute;
17534
+ width: 100%;
17535
+ left: 0;
17536
+ top: 0;
17537
+ }
17538
+
17539
+ .psui-el-inline-selector .psui-el-inline-selector-input-wrapper input:hover {
17540
+ --text-opacity: 1;
17541
+ color: #64B5CE;
17542
+ color: rgba(100, 181, 206, var(--text-opacity));
17543
+ }
17544
+
17545
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper {
17546
+ transform-origin: top right;
17547
+ position: absolute;
17548
+ overflow-y: auto;
17549
+ left: 0;
17550
+ margin-top: 0.5rem;
17551
+ border-radius: 0.25rem;
17552
+ box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.04), 0px 5px 6px rgba(0, 0, 0, 0.1);
17553
+ background-color: #ffffff;
17554
+ padding: 1rem;
17555
+ z-index: 40;
17556
+ max-height: 50vh;
17557
+ }
17558
+
17559
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown {
17560
+ width: 100%;
17561
+ display: flex;
17562
+ flex-wrap: wrap;
17563
+ background-color: #ffffff;
17564
+ }
17565
+
17566
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown ul {
17567
+ width: 100%;
17568
+ }
17569
+
17570
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown ul li {
17571
+ width: 100%;
17572
+ cursor: pointer;
17573
+ padding: 7.5px 16px;
17574
+ }
17575
+
17576
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown ul li:hover {
17577
+ --text-opacity: 1;
17578
+ color: #318FAC;
17579
+ color: rgba(49, 143, 172, var(--text-opacity));
17580
+ --bg-opacity: 1;
17581
+ background-color: #E0EFF6;
17582
+ background-color: rgba(224, 239, 246, var(--bg-opacity));
17583
+ }
17584
+
17585
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown ul li span > p {
17586
+ font-size: 16px;
17587
+ line-height: 130%;
17588
+ --text-opacity: 1;
17589
+ color: #515E6A;
17590
+ color: rgba(81, 94, 106, var(--text-opacity))
17591
+ }
17592
+
17593
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown ul li span p + p {
17594
+ --text-opacity: 1;
17595
+ color: #A2ACB7;
17596
+ color: rgba(162, 172, 183, var(--text-opacity));
17597
+ font-size: 12px;
17598
+ line-height: 120%;
17599
+ }
17600
+
17601
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown .psui-el-inline-selector-error {
17602
+ width: 100%;
17603
+ padding: 0.75rem;
17604
+ display: flex;
17605
+ flex-direction: column;
17606
+ }
17607
+
17608
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown .psui-el-inline-selector-error h3 {
17609
+ --text-opacity: 1;
17610
+ color: #D65C5A;
17611
+ color: rgba(214, 92, 90, var(--text-opacity))
17612
+ }
17613
+
17614
+ .psui-el-inline-selector .psui-el-inline-selector-dropdown-wrapper .psui-el-inline-selector-dropdown .psui-el-inline-selector-error p {
17615
+ --text-opacity: 1;
17616
+ color: #798490;
17617
+ color: rgba(121, 132, 144, var(--text-opacity))
17618
+ }
17619
+
17620
+ .psui-el-mini-tag {
17621
+ display: flex;
17622
+ border-radius: 9999px;
17623
+ align-items: center;
17624
+ justify-content: center;
17625
+ flex-direction: row;
17626
+ width: -webkit-fit-content;
17627
+ width: -moz-fit-content;
17628
+ width: fit-content;
17407
17629
  }
17408
17630
 
17631
+ .psui-el-mini-tag div {
17632
+ width: 100%;
17633
+ padding: 3px 8px 3px 8px;
17634
+ font-size: 10px;
17635
+ }
17636
+
17637
+ .psui-el-mini-tag-layout-info {
17638
+ --bg-opacity: 1;
17639
+ background-color: #E0EFF6;
17640
+ background-color: rgba(224, 239, 246, var(--bg-opacity));
17641
+ --text-opacity: 1;
17642
+ color: #318FAC;
17643
+ color: rgba(49, 143, 172, var(--text-opacity))
17644
+ }
17645
+
17646
+ .psui-el-mini-tag-layout-success {
17647
+ --bg-opacity: 1;
17648
+ background-color: #DEF8E8;
17649
+ background-color: rgba(222, 248, 232, var(--bg-opacity));
17650
+ --text-opacity: 1;
17651
+ color: #44A06A;
17652
+ color: rgba(68, 160, 106, var(--text-opacity))
17653
+ }
17654
+
17655
+ .psui-el-mini-tag-layout-warning {
17656
+ --bg-opacity: 1;
17657
+ background-color: #FDF3E3;
17658
+ background-color: rgba(253, 243, 227, var(--bg-opacity));
17659
+ --text-opacity: 1;
17660
+ color: #B87305;
17661
+ color: rgba(184, 115, 5, var(--text-opacity))
17662
+ }
17663
+
17664
+ .psui-el-mini-tag-layout-error {
17665
+ --bg-opacity: 1;
17666
+ background-color: #FCEBEB;
17667
+ background-color: rgba(252, 235, 235, var(--bg-opacity));
17668
+ --text-opacity: 1;
17669
+ color: #D65C5A;
17670
+ color: rgba(214, 92, 90, var(--text-opacity))
17671
+ }
17672
+
17673
+ .psui-el-mini-tag-layout-default {
17674
+ --bg-opacity: 1;
17675
+ background-color: #E6ECF2;
17676
+ background-color: rgba(230, 236, 242, var(--bg-opacity));
17677
+ --text-opacity: 1;
17678
+ color: #798490;
17679
+ color: rgba(121, 132, 144, var(--text-opacity))
17680
+ }
17681
+
17409
17682
  .psui-el-toast {
17410
17683
  display: flex;
17411
17684
  align-items: center;
@@ -18151,7 +18424,7 @@ html {
18151
18424
  border-radius: 9999px;
18152
18425
  position: absolute;
18153
18426
  transform-origin: center;
18154
- background-color: #def8e8;
18427
+ background-color: rgba(93, 184, 131, 0.3);
18155
18428
  border: solid 0px;
18156
18429
  content: '';
18157
18430
  width: 36px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -19,6 +19,7 @@
19
19
  @import './components/PsDropdown.scss';
20
20
  @import './components/PsSlider.scss';
21
21
  @import './components/PsToast.scss';
22
+ @import './components/PsMiniTag.scss';
22
23
  @import './components/PsInlineSelector.scss';
23
24
  @import './components/PsTooltip.scss';
24
25
  @import './components/PsInputTextArea.scss';
@@ -9,7 +9,7 @@
9
9
 
10
10
  &::before, &::after {
11
11
  @apply psui-rounded-full psui-absolute psui-origin-center;
12
- background-color: #def8e8;
12
+ background-color: rgba(93, 184, 131, 0.3);
13
13
  border: solid 0px;
14
14
  content: '';
15
15
  width: 36px;
@@ -1,5 +1,81 @@
1
1
  @layer components {
2
2
  .psui-el-inline-selector {
3
-
3
+ @apply psui-w-auto psui-max-w-full psui-text-h4 psui-overflow-x-hidden psui-relative psui-flex-shrink-0 psui-text-blue-60;
4
+
5
+ input {
6
+ @apply psui-border-b psui-border-dashed psui-border-blue-50;
7
+ transition: 300ms ease-in all;
8
+
9
+ &::placeholder {
10
+ @apply psui-text-h4 psui-text-gray-40
11
+ }
12
+ }
13
+
14
+ .psui-el-inline-selector-input-wrapper {
15
+ @apply psui-relative;
16
+
17
+ span {
18
+ @apply psui-block psui-opacity-0;
19
+ min-width: 100px;
20
+ min-height: 29px;
21
+ }
22
+
23
+ input {
24
+ @apply psui-appearance-none psui-bg-transparent psui-block psui-absolute psui-w-full psui-left-0 psui-top-0;
25
+
26
+ &:hover {
27
+ @apply psui-text-blue-50;
28
+ }
29
+ }
30
+ }
31
+
32
+ .psui-el-inline-selector-dropdown-wrapper {
33
+ @apply psui-origin-top-right psui-absolute psui-overflow-y-auto psui-left-0 psui-mt-2 psui-rounded psui-shadow-elevation-20 psui-bg-white psui-p-4 psui-z-40;
34
+ max-height: 50vh;
35
+
36
+ .psui-el-inline-selector-dropdown {
37
+ @apply psui-w-full psui-flex psui-flex-wrap psui-bg-white;
38
+
39
+ ul {
40
+ @apply psui-w-full;
41
+
42
+ li {
43
+ @apply psui-w-full psui-cursor-pointer;
44
+ padding: 7.5px 16px;
45
+
46
+ &:hover {
47
+ @apply psui-text-blue-60 psui-bg-blue-20;
48
+ }
49
+
50
+ span {
51
+
52
+ > p {
53
+ @apply psui-text-big psui-text-gray-60
54
+ }
55
+
56
+ p + p {
57
+ @apply psui-text-gray-40;
58
+ font-size: 12px;
59
+ line-height: 120%;
60
+ }
61
+ }
62
+
63
+ }
64
+ }
65
+
66
+ .psui-el-inline-selector-error {
67
+ @apply psui-w-full psui-p-3 psui-flex psui-flex-col;
68
+
69
+ h3 {
70
+ @apply psui-text-red-20
71
+ }
72
+
73
+ p {
74
+ @apply psui-text-gray-50
75
+ }
76
+ }
77
+ }
78
+ }
79
+
4
80
  }
5
81
  }
@@ -1,6 +1,6 @@
1
1
  @layer components {
2
2
  .psui-el-input-select {
3
- @apply psui-w-full psui-flex psui-flex-col psui-relative psui-text-gray-40;
3
+ @apply psui-w-full psui-flex psui-flex-col psui-relative psui-text-gray-40 psui-box-border;
4
4
 
5
5
  &.disabled {
6
6
  @apply psui-pointer-events-none;
@@ -10,45 +10,49 @@
10
10
  }
11
11
 
12
12
  select {
13
- @apply psui-bg-gray-20 psui-text-gray-40 psui-border-gray-20
13
+ @apply psui-text-gray-40 psui-border-gray-20 psui-bg-gray-20 !important
14
14
  }
15
15
 
16
16
  &::after {
17
- @apply psui-z-10;
17
+ @apply psui-z-20 psui-text-gray-50 !important;
18
18
  }
19
19
  }
20
20
 
21
- &.selected {
22
- select {
23
- @apply psui-border-blue-50 psui-text-gray-60
24
- }
25
- }
26
-
27
- &::after {
28
- @apply psui-absolute psui-inline-block psui-text-gray-50;
29
- content: 'arrow_drop_down';
30
- font-family: 'Material Icons Round';
31
- font-size: 24px;
32
- top: 28px;
33
- right: 16px;
34
- z-index: -20;
35
- }
36
-
37
- select {
38
- @apply psui-appearance-none psui-w-full psui-border psui-bg-transparent psui-border-gray-30 psui-rounded-md psui-text-gray-40;
39
- padding: 10px 16px;
21
+ &.layout-default {
40
22
 
41
- &:hover,
42
- &:active {
43
- @apply psui-border-blue-50 psui-text-gray-60
23
+ &.selected {
24
+ select {
25
+ @apply psui-border-blue-50 psui-text-gray-60
26
+ }
44
27
  }
45
-
46
- &:focus {
47
- @apply psui-border-blue-60 psui-text-gray-60
28
+
29
+ &::after {
30
+ @apply psui-absolute psui-inline-block psui-text-gray-50;
31
+ content: 'arrow_drop_down';
32
+ font-family: 'Material Icons Round';
33
+ font-size: 24px;
34
+ top: 26px;
35
+ right: 15px;
36
+ z-index: -20;
37
+ }
38
+
39
+ select {
40
+ @apply psui-appearance-none psui-bg-transparent psui-text-big psui-w-full psui-border psui-border-gray-30 psui-rounded-md psui-text-gray-40;
41
+ padding: 11.5px 16px;
42
+
43
+ &:hover,
44
+ &:active {
45
+ @apply psui-border-blue-50 psui-text-gray-60
46
+ }
47
+
48
+ &:focus {
49
+ @apply psui-border-blue-60 psui-text-gray-60
50
+ }
48
51
  }
49
52
 
50
53
  }
51
54
 
55
+
52
56
  label {
53
57
  @apply psui-flex psui-text-gray-80 psui-text-big psui-items-center psui-w-full psui-font-bold psui-pointer-events-none
54
58
  }
@@ -58,5 +62,43 @@
58
62
  font-size: 12px;
59
63
  line-height: 120%;
60
64
  }
65
+
66
+ &.layout-mini {
67
+
68
+
69
+ select {
70
+ @apply psui-text-small psui-appearance-none psui-bg-transparent psui-w-full psui-border psui-border-gray-30;
71
+ border-radius: 4px;
72
+ padding: 7px 8px;
73
+
74
+ &:hover,
75
+ &:active {
76
+ @apply psui-border-green-20 psui-text-gray-50
77
+ }
78
+
79
+ &:focus {
80
+ @apply psui-border-green-70 psui-text-gray-50
81
+ }
82
+
83
+
84
+ }
85
+
86
+ &::after {
87
+ @apply psui-absolute psui-inline-block psui-text-gray-50 ;
88
+ content: 'unfold_more';
89
+ font-family: 'Material Icons Round';
90
+ font-size: 18px;
91
+ top: 4px;
92
+ right: 4px;
93
+ z-index: -20;
94
+ }
95
+
96
+ &.selected {
97
+ select {
98
+ @apply psui-border-green-20 psui-text-green-70
99
+ }
100
+ }
101
+
102
+ }
61
103
  }
62
104
  }
@@ -0,0 +1,36 @@
1
+ @layer components {
2
+ .psui-el-mini-tag {
3
+ @apply psui-flex psui-rounded-full psui-items-center psui-justify-center psui-flex-row;
4
+ width: fit-content;
5
+
6
+
7
+ div {
8
+ @apply psui-w-full;
9
+ padding: 3px 8px 3px 8px;
10
+ font-size: 10px;
11
+
12
+ }
13
+
14
+ &-layout{
15
+ &-info {
16
+ @apply psui-bg-blue-20 psui-text-blue-60
17
+ }
18
+
19
+ &-success {
20
+ @apply psui-bg-green-10 psui-text-green-70
21
+ }
22
+
23
+ &-warning {
24
+ @apply psui-bg-yellow-10 psui-text-yellow-70
25
+ }
26
+
27
+ &-error {
28
+ @apply psui-bg-red-10 psui-text-red-20
29
+ }
30
+
31
+ &-default {
32
+ @apply psui-bg-gray-20 psui-text-gray-50
33
+ }
34
+ }
35
+ }
36
+ }
@@ -63,7 +63,6 @@ export default {
63
63
  },
64
64
 
65
65
  bgColor() {
66
- // console.log(this.value >= this.breakEven ? 'psui-bg-blue-20' : 'psui-bg-red-10')
67
66
  return this.value >= this.breakEven
68
67
  ? 'psui-bg-blue-20'
69
68
  : 'psui-bg-red-10'
@@ -1,17 +1,23 @@
1
1
  <template>
2
- <div :class="cssClass">
3
- <div class="psui-w-full">{{ message }}</div>
2
+ <div class="psui-el-mini-tag" :class="getComponentClass">
3
+ <div>{{ message }}</div>
4
4
  </div>
5
5
  </template>
6
6
 
7
7
  <script>
8
- export const typeOptions = ['informative', 'success', 'warning', 'error']
8
+ export const typeOptions = [
9
+ 'info',
10
+ 'success',
11
+ 'warning',
12
+ 'error',
13
+ 'default',
14
+ ]
9
15
  export default {
10
16
  name: 'PsMiniTag',
11
17
  props: {
12
- type: {
18
+ layout: {
13
19
  type: String,
14
- default: 'informative',
20
+ default: 'info',
15
21
  validator: (value) => typeOptions.indexOf(value) !== -1,
16
22
  },
17
23
  message: {
@@ -19,28 +25,13 @@ export default {
19
25
  required: true,
20
26
  },
21
27
  },
22
- data() {
23
- return {
24
- colors: {
25
- informative: { background: 'blue-20', color: 'blue-60' },
26
- success: { background: 'green-10', color: 'green-70' },
27
- warning: { background: 'yellow-10', color: 'yellow-70' },
28
- error: { background: 'red-10', color: 'red-20' },
29
- },
30
- }
31
- },
32
28
  computed: {
33
- cssClass() {
34
- return `fit-content psui-flex psui-rounded-lg psui-px-2 psui-items-center psui-justify-center psui-flex-row psui-mx-6 psui-bg-${
35
- this.colors[this.type].background
36
- } psui-text-${this.colors[this.type].color}`
29
+ getComponentClass() {
30
+ return `psui-el-mini-tag-layout-${this.layout}`
37
31
  },
38
32
  },
39
33
  }
40
34
  </script>
41
35
 
42
- <style scoped>
43
- .fit-content {
44
- width: fit-content;
45
- }
46
- </style>
36
+ <style> /* Please, use the file src/assets/scss/components/PsMiniTag.scss */ </style>
37
+
@@ -1,15 +1,135 @@
1
1
  <template>
2
- <div class="psui-el-inline-selector">
3
- <input type="text">
2
+ <div
3
+ class="psui-el-inline-selector"
4
+ @keydown.up="$emit('keydown-up', $event)"
5
+ @keydown.down="$emit('keydown-down', $event)"
6
+ @keydown.enter="$emit('keydown-enter', $event)"
7
+ @keydown.tab="$emit('keydown-tab',$event)"
8
+ @keydown.esc="$emit('keydown-esc',$event)"
9
+ @mouseleave="$emit('mouse-leave',$event)"
10
+ >
11
+
12
+ <div class='psui-el-inline-selector-input-wrapper'>
13
+ <span> {{ search ? search : placeholder }} </span>
14
+ <input
15
+ ref="input"
16
+ v-model="search"
17
+ :label="label"
18
+ :placeholder="placeholder"
19
+ @input="$emit('input', $event)"
20
+ @focus="$emit('focus', $event)"
21
+ @blur="$emit('blur', $event)"
22
+ autocomplete="chrome-off"
23
+ autocorrect="off"
24
+ autocapitalize="off"
25
+ spellcheck="false"
26
+ />
27
+ </div>
28
+ <transition
29
+ enter-active-class="transition ease-out duration-100 transform"
30
+ enter-class="opacity-0 scale-95"
31
+ enter-to-class="opacity-100 scale-100"
32
+ leave-active-class="transition ease-in duration-100 transform"
33
+ leave-class="opacity-100 scale-100"
34
+ leave-to-class="opacity-0 scale-95"
35
+ >
36
+ <div
37
+ v-if="search"
38
+ role="menu"
39
+ aria-orientation="vertical"
40
+ class="psui-el-inline-selector-dropdown-wrapper"
41
+ >
42
+ <slot name='loader'></slot>
43
+ <div>
44
+ <div v-if="requestFetched && !jurisdictions.length">
45
+ <h3>Hmmmm</h3>
46
+ <p>Please check the spelling and try again</p>
47
+ </div>
48
+ <ul v-else>
49
+ <li
50
+ tabindex="0"
51
+ v-for="(jurisdiction, index) in jurisdictions"
52
+ :key="`dropdown-jurisdiction-${jurisdiction.id}`"
53
+ :id="`jurisdiction-list-item-${index}`"
54
+ @click="$emit('click', $event)"
55
+ @mouseover="('mouse-over', $event)"
56
+ >
57
+ <span >
58
+ <h3>{{jurisdiction.title}}</h3>
59
+ <h3 >{{jurisdiction.type}}</h3>
60
+ </span>
61
+ </li>
62
+ </ul>
63
+ </div>
64
+ </div>
65
+ </transition>
4
66
  </div>
5
67
  </template>
6
68
 
7
69
  <script>
8
70
  export default {
9
-
71
+ name: 'PsInlineSelector',
72
+ props: {
73
+ width: {
74
+ default: 244
75
+ },
76
+ focusOnMount: {
77
+ default: false
78
+ },
79
+ shouldScroll: {
80
+ default: false
81
+ },
82
+ inputClass: {
83
+ default: 'text-gray02'
84
+ },
85
+ label: {
86
+ type: String,
87
+ default: 'Type a City or County'
88
+ },
89
+ selectOnlyFirstClimateZone: {
90
+ type: Boolean,
91
+ default: false
92
+ },
93
+ jurisdictionSelected: {
94
+ type: [ Object, Boolean ]
95
+ },
96
+ search: {
97
+ type: String,
98
+ default: '',
99
+ required: true
100
+ },
101
+ jurisdictions: {
102
+ type: Array,
103
+ default: () => [],
104
+ required: true
105
+ },
106
+ requestFetched: {
107
+ type: Boolean,
108
+ },
109
+ showDropDown:{
110
+ type: Boolean,
111
+ default: true,
112
+ },
113
+ currentSelected:{
114
+ type: Number,
115
+ default: 0,
116
+ },
117
+ isFocused:{
118
+ type: Boolean,
119
+ default: false,
120
+ }
121
+ },
122
+ computed:{
123
+ placeholder(){
124
+ return this.jurisdictionsAsText && !this.isFocused ? this.jurisdictionsAsText : this.label
125
+ },
126
+ jurisdictionsAsText(){
127
+ return this.jurisdictionSelected?.title_type ?? false
128
+ }
129
+ },
130
+ mounted(){
131
+ if(this.focusOnMount) this.$refs.input.focus()
132
+ },
10
133
  }
11
134
  </script>
12
135
 
13
- <style>
14
-
15
- </style>
@@ -0,0 +1,212 @@
1
+ <template>
2
+ <div class="background-temporary">
3
+ <div
4
+ class="psui-el-dropdown-menu"
5
+ ref="PSDropdown"
6
+ >
7
+
8
+ <div class="psui-bg-red" ref="PSDropdownTrigger" v-if="$slots.dropdownTrigger" @click="show && !toggleWhenActive ? '' : toggle()" >
9
+ <slot name="dropdownTrigger" ></slot>
10
+ </div>
11
+
12
+ <button
13
+ v-else
14
+ @click="show && !toggleWhenActive ? '' : toggle()"
15
+ type="button"
16
+ class="psui-el-dropdown-menu-button"
17
+ :class="[buttonClasses]"
18
+ :id="id"
19
+ aria-haspopup="true"
20
+ aria-expanded="true"
21
+ ref="PSDropdownTrigger"
22
+ >
23
+ <slot v-if="show && $slots.buttonLabelOnShow" name="buttonLabelOnShow"></slot>
24
+ <slot v-else name="buttonLabel"></slot>
25
+ </button>
26
+
27
+ <div
28
+ ref="PSDropdownDialog"
29
+ role="menu"
30
+ class="psui-el-dropdown-menu-dialog"
31
+ aria-orientation="vertical"
32
+ :aria-labelledby="id"
33
+ :class="[dialogClasses]"
34
+ :style="{ minWidth: minWidthDropdown, marginLeft: marginLeft }"
35
+ >
36
+
37
+ <div class="psui-el-dropdown-menu-dialog-category-divider">
38
+ <h2 class="ts--accent--1" v-if="title">{{ title }}</h2>
39
+ <slot name="items"></slot>
40
+ </div>
41
+
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </template>
46
+
47
+ <script>
48
+ import { randomString, getParentScrollableEl } from '../../util/GeneralFunctions'
49
+
50
+ export default {
51
+ name: 'PsDropdown',
52
+ props: {
53
+ buttonClasses: {
54
+ type: String,
55
+ default: 'psui-bg-white psui-border psui-border-blue'
56
+ },
57
+ title: {
58
+ type: String,
59
+ },
60
+ dialogClasses: {
61
+ type: String,
62
+ default: 'psui-p-6 psui-left-0 psui-bg-white'
63
+ },
64
+ minWidthDropdown: {
65
+ type: [String, Number],
66
+ },
67
+ maxWidthDropDown: {
68
+ type: String,
69
+ default: '340px'
70
+ },
71
+ buttonLabelOnShow: {
72
+ type: Boolean,
73
+ default: false
74
+ },
75
+ toggleWhenActive: {
76
+ type: Boolean,
77
+ default: true
78
+ },
79
+ },
80
+ data() {
81
+ return {
82
+ show: false,
83
+ id: randomString(8),
84
+ marginLeft: '-0px',
85
+ scrollableParentEl : null
86
+ }
87
+ },
88
+ computed: {
89
+ getMaxWidth() {
90
+ let bounds = this.$refs.PSDropdown.getBoundingClientRect()
91
+ return (document.documentElement.clientWidth - bounds['left']) -30
92
+ }
93
+ },
94
+ beforeDestroy() {
95
+ this.unwatchParentScrolling()
96
+ },
97
+ methods: {
98
+ toggle() {
99
+ if (!this.show) {
100
+ this.open()
101
+ } else {
102
+ this.close()
103
+ }
104
+ },
105
+ watchParentScrolling() {
106
+ this.scrollableParentEl = getParentScrollableEl(this.$refs.PSDropdown)
107
+ if (this.scrollableParentEl) {
108
+ this.scrollableParentEl.addEventListener('scroll', this.updatePosition)
109
+ }
110
+ },
111
+ unwatchParentScrolling() {
112
+ if (this.scrollableParentEl) {
113
+ this.scrollableParentEl.removeEventListener('scroll', this.updatePosition)
114
+ }
115
+ },
116
+ updatePosition() {
117
+
118
+ const PSDropdownDialog = this.$refs.PSDropdownDialog
119
+ const PSDropdownTrigger = this.$refs.PSDropdownTrigger
120
+ if (!PSDropdownDialog || !PSDropdownTrigger) return
121
+
122
+ const rectTrigger = PSDropdownTrigger.getBoundingClientRect()
123
+ const rectDialog = PSDropdownDialog.getBoundingClientRect()
124
+ const windowWidth = document.documentElement.clientWidth
125
+
126
+ PSDropdownDialog.style.position = 'fixed'
127
+ PSDropdownDialog.style.top = `${rectTrigger.y + rectTrigger.height }px`
128
+
129
+ if (( rectTrigger.x + rectDialog.width + 20 ) > windowWidth ) {
130
+ PSDropdownDialog.style.left = `${windowWidth - rectDialog.width - 30}px`
131
+ } else {
132
+ PSDropdownDialog.style.left = `${rectTrigger.x}px`
133
+ }
134
+
135
+ if(rectTrigger.top < 10) {
136
+ this.close()
137
+ console.warn('The dropdown are too close from the top of the page')
138
+ return
139
+ }
140
+
141
+ setTimeout(() => { PSDropdownDialog.style.opacity = 1 }, 10)
142
+
143
+ },
144
+ open() {
145
+ this.$emit('open')
146
+ this.show = true
147
+ this.$refs.PSDropdownDialog.style.opacity = 0
148
+ this.$refs.PSDropdownDialog.style.display = 'block'
149
+ setTimeout(() => {
150
+ this.updatePosition()
151
+ this.watchParentScrolling()
152
+ document.addEventListener("keyup", this.handleEsc)
153
+ window.addEventListener("resize", this.updatePosition)
154
+ window.addEventListener("click", this.clickOutside)
155
+ }, 10)
156
+ },
157
+ close() {
158
+ if (this.show) {
159
+ this.$emit('close')
160
+ this.$refs.PSDropdownDialog.style.display = 'none'
161
+ this.$refs.PSDropdownDialog.style.opacity = 0
162
+ this.show = false
163
+ this.unwatchParentScrolling()
164
+ }
165
+ document.removeEventListener("keyup", this.handleEsc)
166
+ document.removeEventListener("resize", this.updatePosition)
167
+ document.removeEventListener("click", this.clickOutside)
168
+ },
169
+ handleEsc(evt) {
170
+ if (this.show && evt.keyCode === 27) this.close()
171
+ },
172
+ clickOutside(event) {
173
+ if(!this.show) return
174
+ if (!(this.$refs.PSDropdown == event.target || this.$refs.PSDropdown.contains(event.target))) {
175
+ this.close()
176
+ }
177
+ }
178
+ }
179
+ }
180
+ </script>
181
+
182
+ <style>
183
+
184
+ .background-temporary {
185
+ width: 300px;
186
+ height: 200px;
187
+ left: 0;
188
+ top: 8px;
189
+
190
+ background-color: #e6ecf2;
191
+ border: 1.5px dashed #7b61ff;
192
+ display: flex;
193
+ align-items: center;
194
+ justify-content: center;
195
+ }
196
+
197
+ /* .dropdown-button {
198
+ background-color: transparent;
199
+ padding-top: 2.5px;
200
+ padding-bottom: 2.5px;
201
+ min-height: 27px;
202
+ } */
203
+
204
+ /* .dropdown-button:focus {
205
+ outline: none;
206
+ } */
207
+
208
+ /* .psui-dropdown-dialog {
209
+ transition: opacity 150ms ease-in-out;
210
+ } */
211
+
212
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="psui-el-input-select" :class="[{'disabled':disabled}, {'selected':selectedClass}]">
2
+ <div class="psui-el-input-select" :class="[{'disabled':disabled}, getComponentClass, {'selected':selectedClass}]">
3
3
  <label :for='label' v-if="label" >{{ label }}</label>
4
4
  <select
5
5
  :name="label"
@@ -9,7 +9,7 @@
9
9
  <option value='' disabled>Select</option>
10
10
  <option v-for="item in getItems" :value="item[keyValue]" :key="item[keyValue]">{{ item[keyLabel] }}</option>
11
11
  </select>
12
- <p v-if="optionalLabel && !disabled" class="psui-el-input-helper">{{ optionalLabel }}</p>
12
+ <p v-if="optionalLabel && !disabled && layout !== 'mini'" class="psui-el-input-helper">{{ optionalLabel }}</p>
13
13
  </div>
14
14
  </template>
15
15
 
@@ -40,6 +40,11 @@ export default {
40
40
  disabled: {
41
41
  type: Boolean,
42
42
  default: false
43
+ },
44
+ layout:{
45
+ type: String,
46
+ default: 'default',
47
+ validator: (value) => ['default','mini'].includes(value)
43
48
  }
44
49
  },
45
50
  data(){
@@ -48,6 +53,9 @@ export default {
48
53
  }
49
54
  },
50
55
  computed: {
56
+ getComponentClass(){
57
+ return `layout-${this.layout}`
58
+ },
51
59
  childValue: {
52
60
  get() {
53
61
  return this.value
@@ -36,3 +36,6 @@ export default {
36
36
  },
37
37
  }
38
38
  </script>
39
+
40
+ <style> /* Please, use the file src/assets/scss/components/PsToast.scss */ </style>
41
+
@@ -9,8 +9,10 @@ const TemplateDefault = (args, {argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: {PsInlineSelector},
11
11
  template: `
12
+ <div style="width: auto; margin-right: auto; display: flex; align-items: center;">
12
13
  <PsInlineSelector v-bind="$props"></PsInlineSelector>
13
- `
14
+ </div>
15
+ `
14
16
  })
15
17
 
16
18
  export const Default = TemplateDefault.bind({})
@@ -9,10 +9,18 @@ const TemplateDefault = (args, {argTypes})=> ({
9
9
  props: Object.keys(argTypes),
10
10
  components: {PsInputSelect},
11
11
  template: `
12
+ <div style='display:flex; gap: 30px;'>
12
13
  <div style='width:300px; display:flex; flex-direction: column; gap:20px;'>
14
+ <span>Default Select</span>
13
15
  <PsInputSelect v-bind="$props" label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
14
16
  <PsInputSelect v-bind="$props" disabled label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
15
17
  </div>
18
+ <div style='width:90px; display:flex; flex-direction: column; gap:20px;'>
19
+ <span>Mini Select</span>
20
+ <PsInputSelect v-bind="$props" layout="mini" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
21
+ <PsInputSelect v-bind="$props" layout="mini" disabled keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
22
+ </div>
23
+ </div>
16
24
  `
17
25
  })
18
26
 
@@ -21,26 +21,32 @@ const Template = (args, { argTypes }) => ({
21
21
  template: '<PsMiniTag v-bind="$props" />',
22
22
  })
23
23
 
24
- export const Informative = Template.bind({})
25
- Informative.args = {
26
- type: 'informative',
24
+ export const Info = Template.bind({})
25
+ Info.args = {
26
+ layout: 'info',
27
27
  message: 'This is an info alert',
28
28
  }
29
29
 
30
30
  export const Success = Template.bind({})
31
31
  Success.args = {
32
- type: 'success',
32
+ layout: 'success',
33
33
  message: 'This is a success alert',
34
34
  }
35
35
 
36
36
  export const Warning = Template.bind({})
37
37
  Warning.args = {
38
- type: 'warning',
38
+ layout: 'warning',
39
39
  message: 'This is a warning alert',
40
40
  }
41
41
 
42
42
  export const Error = Template.bind({})
43
43
  Error.args = {
44
- type: 'error',
44
+ layout: 'error',
45
45
  message: 'This is an error alert',
46
46
  }
47
+
48
+ export const Default = Template.bind({})
49
+ Default.args = {
50
+ layout: 'default',
51
+ message: 'This is a default color',
52
+ }
@@ -1,72 +0,0 @@
1
- <template>
2
- <div class="psui-el-cost-effect-bar">
3
-
4
- <div
5
- :class="{
6
- 'psui-bg-blue-20': value >= breakEven,
7
- 'psui-bg-red-10': value < breakEven,
8
- }"
9
- >
10
-
11
- <span :style="breakEvenPosition"> </span>
12
-
13
- <div class="psui-overflow-hidden">
14
-
15
- <input
16
- type="number"
17
- :style="{ width: `${value}px` }"
18
- :class="{
19
- 'psui-bg-blue-60': value >= breakEven,
20
- 'psui-bg-red-20': value < breakEven,
21
- }"
22
- />
23
- </div>
24
-
25
- </div>
26
- </div>
27
- </template>
28
-
29
- <script>
30
- export default {
31
- name: 'PsCostEffectBar',
32
-
33
- props: {
34
- value: {
35
- type: Number,
36
- required: true,
37
- default: 0,
38
- },
39
- breakEven: {
40
- type: Number,
41
- required: true,
42
- default: 1,
43
- },
44
- },
45
- data() {
46
- return {
47
- errors: [],
48
- }
49
- },
50
-
51
- computed: {
52
- valueBar() {
53
- if (this.value > 100) return 100
54
- else if (this.value < 0) return 0
55
- else return this.value
56
- },
57
-
58
- breakEvenPosition() {
59
- return `left: ${this.breakEven}px`
60
- },
61
-
62
- getIsBreakEven() {
63
- if (this.breakEven < 0) return 0
64
- else if (this.breakEven > 100) return 100
65
- else return this.breakEven
66
- },
67
- },
68
- }
69
- </script>
70
-
71
- <style> /* Please, use the file src/assets/scss/components/PsCostEffectBar.scss */</style>
72
-