@policystudio/policy-studio-ui-vue 1.1.90-rc.0 → 1.1.90-rc.2

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.
@@ -541,6 +541,114 @@ video {
541
541
  -webkit-font-feature-settings: "liga";
542
542
  -webkit-font-smoothing: antialiased;
543
543
  }
544
+ .psui-el-chips label {
545
+ display: flex;
546
+ }
547
+ .psui-el-chips label {
548
+ cursor: pointer;
549
+ }
550
+ .psui-el-chips label {
551
+ align-items: center;
552
+ }
553
+ .psui-el-chips label {
554
+ justify-content: center;
555
+ }
556
+ .psui-el-chips label {
557
+ border-radius: 0.25rem;
558
+ }
559
+ .psui-el-chips label {
560
+ border-width: 1px;
561
+ }
562
+ .psui-el-chips label {
563
+ --tw-border-opacity: 1;
564
+ border-color: rgb(162, 172, 183, var(--tw-border-opacity, 1));
565
+ }
566
+ .psui-el-chips label {
567
+ --tw-bg-opacity: 1;
568
+ background-color: rgb(255, 255, 255, var(--tw-bg-opacity, 1));
569
+ }
570
+ .psui-el-chips label {
571
+ padding-top: 0.25rem;
572
+ padding-bottom: 0.25rem;
573
+ }
574
+ .psui-el-chips label {
575
+ padding-left: 0.75rem;
576
+ padding-right: 0.75rem;
577
+ }
578
+ .psui-el-chips label {
579
+ font-size: 14px;
580
+ line-height: 130%;
581
+ }
582
+ .psui-el-chips label {
583
+ --tw-text-opacity: 1;
584
+ color: rgb(81, 94, 106, var(--tw-text-opacity, 1));
585
+ }
586
+ .psui-el-chips label {
587
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
588
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
589
+ transition-duration: 150ms;
590
+ }
591
+ .psui-el-chips label {
592
+ padding: 5px 8px 5px 6px;
593
+ }
594
+ .psui-el-chips label:hover {
595
+ --tw-border-opacity: 1;
596
+ border-color: rgb(49, 143, 172, var(--tw-border-opacity, 1));
597
+ }
598
+ .psui-el-chips label:hover {
599
+ --tw-text-opacity: 1;
600
+ color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
601
+ }
602
+ .psui-el-chips label:focus, .psui-el-chips label:active {
603
+ --tw-bg-opacity: 1;
604
+ background-color: rgb(224, 239, 246, var(--tw-bg-opacity, 1));
605
+ }
606
+ .psui-el-chips label:focus, .psui-el-chips label:active {
607
+ --tw-text-opacity: 1;
608
+ color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
609
+ }
610
+ .psui-el-chips label.checked {
611
+ --tw-border-opacity: 1;
612
+ border-color: rgb(49, 143, 172, var(--tw-border-opacity, 1));
613
+ }
614
+ .psui-el-chips label.checked {
615
+ --tw-bg-opacity: 1;
616
+ background-color: rgb(236, 247, 251, var(--tw-bg-opacity, 1));
617
+ }
618
+ .psui-el-chips label.checked {
619
+ --tw-text-opacity: 1;
620
+ color: rgb(0, 70, 95, var(--tw-text-opacity, 1));
621
+ }
622
+ .psui-el-chips label.icon-position-right {
623
+ flex-direction: row-reverse;
624
+ }
625
+ .psui-el-chips label.icon-position-right {
626
+ padding: 5px 6px 5px 8px;
627
+ }
628
+ .psui-el-chips label.icon-position-right .psui-el-chips-icon {
629
+ margin-left: 0.25rem;
630
+ }
631
+ .psui-el-chips .psui-el-chips-icon {
632
+ font-family: "Material Icons Round";
633
+ font-weight: normal;
634
+ font-style: normal;
635
+ font-size: 24px;
636
+ line-height: 1;
637
+ letter-spacing: normal;
638
+ text-transform: none;
639
+ display: inline-block;
640
+ white-space: nowrap;
641
+ word-wrap: normal;
642
+ direction: ltr;
643
+ -webkit-font-feature-settings: "liga";
644
+ -webkit-font-smoothing: antialiased;
645
+ }
646
+ .psui-el-chips .psui-el-chips-icon {
647
+ font-size: 16px;
648
+ }
649
+ .psui-el-chips .psui-el-chips-icon.is-rotated {
650
+ transform: rotate(180deg);
651
+ }
544
652
  .psui-el-chips.type-checkbox, .psui-el-chips.type-radio {
545
653
  font-size: 14px;
546
654
  }
@@ -559,13 +667,20 @@ video {
559
667
  .psui-el-chips.type-checkbox input, .psui-el-chips.type-radio input {
560
668
  clip: rect(0, 0, 0, 0);
561
669
  }
670
+ .psui-el-chips.type-checkbox input:checked + label, .psui-el-chips.type-radio input:checked + label {
671
+ --tw-border-opacity: 1;
672
+ border-color: rgb(49, 143, 172, var(--tw-border-opacity, 1));
673
+ }
562
674
  .psui-el-chips.type-checkbox input:checked + label, .psui-el-chips.type-radio input:checked + label {
563
675
  --tw-bg-opacity: 1;
564
676
  background-color: rgb(224, 239, 246, var(--tw-bg-opacity, 1));
565
677
  }
678
+ .psui-el-chips.type-checkbox input:checked + label, .psui-el-chips.type-radio input:checked + label {
679
+ font-weight: 700;
680
+ }
566
681
  .psui-el-chips.type-checkbox input:checked + label, .psui-el-chips.type-radio input:checked + label {
567
682
  --tw-text-opacity: 1;
568
- color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
683
+ color: rgb(0, 70, 95, var(--tw-text-opacity, 1));
569
684
  }
570
685
  .psui-el-chips.type-checkbox input:checked + label.layout-disabled, .psui-el-chips.type-radio input:checked + label.layout-disabled {
571
686
  cursor: default;
@@ -587,38 +702,11 @@ video {
587
702
  }
588
703
  .psui-el-chips.type-checkbox input:checked + label:before, .psui-el-chips.type-radio input:checked + label:before {
589
704
  --tw-text-opacity: 1;
590
- color: rgb(100, 181, 206, var(--tw-text-opacity, 1));
591
- }
592
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
593
- display: flex;
594
- }
595
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
596
- cursor: pointer;
597
- }
598
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
599
- align-items: center;
600
- }
601
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
602
- justify-content: center;
603
- }
604
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
605
- border-radius: 0.25rem;
606
- }
607
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
608
- --tw-bg-opacity: 1;
609
- background-color: rgb(243, 246, 249, var(--tw-bg-opacity, 1));
705
+ color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
610
706
  }
611
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
707
+ .psui-el-chips.type-checkbox input:checked + label:hover, .psui-el-chips.type-radio input:checked + label:hover {
612
708
  --tw-text-opacity: 1;
613
- color: rgb(121, 132, 144, var(--tw-text-opacity, 1));
614
- }
615
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
616
- transition-property: all;
617
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
618
- transition-duration: 150ms;
619
- }
620
- .psui-el-chips.type-checkbox label, .psui-el-chips.type-radio label {
621
- padding: 4px 8px 4px 6px;
709
+ color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
622
710
  }
623
711
  .psui-el-chips.type-checkbox label:before, .psui-el-chips.type-radio label:before {
624
712
  display: inline-block;
@@ -665,69 +753,6 @@ video {
665
753
  .psui-el-chips.type-radio label:before {
666
754
  content: "radio_button_unchecked";
667
755
  }
668
- .psui-el-chips.type-button label {
669
- display: flex;
670
- }
671
- .psui-el-chips.type-button label {
672
- cursor: pointer;
673
- }
674
- .psui-el-chips.type-button label {
675
- align-items: center;
676
- }
677
- .psui-el-chips.type-button label {
678
- justify-content: center;
679
- }
680
- .psui-el-chips.type-button label {
681
- border-radius: 0.25rem;
682
- }
683
- .psui-el-chips.type-button label {
684
- padding-top: 0.25rem;
685
- padding-bottom: 0.25rem;
686
- }
687
- .psui-el-chips.type-button label {
688
- padding-left: 0.75rem;
689
- padding-right: 0.75rem;
690
- }
691
- .psui-el-chips.type-button label {
692
- font-size: 14px;
693
- line-height: 130%;
694
- }
695
- .psui-el-chips.type-button label {
696
- --tw-text-opacity: 1;
697
- color: rgb(81, 94, 106, var(--tw-text-opacity, 1));
698
- }
699
- .psui-el-chips.type-button label {
700
- transition-property: all;
701
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
702
- transition-duration: 150ms;
703
- }
704
- .psui-el-chips.type-button label {
705
- background-color: #F6F7F8;
706
- }
707
- .psui-el-chips.type-button label:hover {
708
- --tw-bg-opacity: 1;
709
- background-color: rgb(255, 255, 255, var(--tw-bg-opacity, 1));
710
- }
711
- .psui-el-chips.type-button label:hover {
712
- --tw-text-opacity: 1;
713
- color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
714
- }
715
- .psui-el-chips.type-button label:focus, .psui-el-chips.type-button label:active {
716
- --tw-bg-opacity: 1;
717
- background-color: rgb(224, 239, 246, var(--tw-bg-opacity, 1));
718
- }
719
- .psui-el-chips.type-button label:focus, .psui-el-chips.type-button label:active {
720
- --tw-text-opacity: 1;
721
- color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
722
- }
723
- .psui-el-chips.type-button label.checked {
724
- --tw-bg-opacity: 1;
725
- background-color: rgb(224, 239, 246, var(--tw-bg-opacity, 1));
726
- }
727
- .psui-el-chips.type-button label.checked {
728
- --tw-text-opacity: 1;
729
- color: rgb(49, 143, 172, var(--tw-text-opacity, 1));
730
- }
731
756
  .psui-el-chips.type-button.layout-with-icon label {
732
757
  display: flex;
733
758
  }
@@ -828,10 +853,7 @@ video {
828
853
  background-color: rgb(49, 143, 172, var(--tw-bg-opacity, 1));
829
854
  }
830
855
  .psui-el-chips.type-button.layout-rich .psui-el-chips-icon {
831
- font-size: 18px;
832
- }
833
- .psui-el-chips.type-button.layout-rich .psui-el-chips-icon-prepend {
834
- margin-right: 0.5rem;
856
+ font-size: 16px;
835
857
  }
836
858
  .psui-el-chips.type-button.layout-rich .psui-el-chips-icon-prepend {
837
859
  display: flex;
@@ -859,9 +881,6 @@ video {
859
881
  --tw-text-opacity: 1;
860
882
  color: rgb(255, 255, 255, var(--tw-text-opacity, 1));
861
883
  }
862
- .psui-el-chips.type-button.layout-rich .psui-el-chips-close {
863
- margin-left: 0.5rem;
864
- }
865
884
  .psui-el-chips.type-button.layout-rich .psui-el-chips-close {
866
885
  display: flex;
867
886
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.90-rc.0",
3
+ "version": "1.1.90-rc.2",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -7,6 +7,43 @@
7
7
  @apply psui-icon;
8
8
  }
9
9
 
10
+ label {
11
+ @apply psui-flex psui-bg-white psui-items-center psui-justify-center psui-text-gray-60 psui-transition-colors psui-cursor-pointer psui-rounded psui-py-1 psui-px-3 psui-text-small psui-border psui-border-gray-40;
12
+ padding: 5px 8px 5px 6px;
13
+
14
+ &:hover {
15
+ @apply psui-text-blue-60 psui-border-blue-60;
16
+ }
17
+
18
+ &:focus,
19
+ &:active {
20
+ @apply psui-text-blue-60 psui-bg-blue-20;
21
+ }
22
+
23
+ &.checked {
24
+ @apply psui-text-blue-70 psui-bg-blue-10 psui-border-blue-60;
25
+ }
26
+
27
+ &.icon-position-right {
28
+ @apply psui-flex-row-reverse;
29
+ padding: 5px 6px 5px 8px;
30
+
31
+ .psui-el-chips-icon {
32
+ @apply psui-ml-1;
33
+ }
34
+ }
35
+
36
+ }
37
+
38
+ .psui-el-chips-icon {
39
+ @apply psui-icon;
40
+ font-size: 16px;
41
+
42
+ &.is-rotated {
43
+ transform: rotate(180deg);
44
+ }
45
+ }
46
+
10
47
  &.type-checkbox,
11
48
  &.type-radio {
12
49
  font-size: 14px;
@@ -18,7 +55,7 @@
18
55
 
19
56
  &:checked {
20
57
  + label {
21
- @apply psui-text-blue-60 psui-bg-blue-20;
58
+ @apply psui-text-blue-70 psui-bg-blue-20 psui-border-blue-60 psui-font-bold;
22
59
 
23
60
  &.layout-disabled {
24
61
  @apply psui-bg-gray-20 psui-text-gray-40 psui-cursor-default;
@@ -29,15 +66,17 @@
29
66
  }
30
67
 
31
68
  &:before {
32
- @apply psui-text-blue-50;
69
+ @apply psui-text-blue-60;
70
+ }
71
+
72
+ &:hover {
73
+ @apply psui-text-blue-60;
33
74
  }
34
75
  }
35
76
  }
36
77
  }
37
78
 
38
79
  label {
39
- @apply psui-flex psui-items-center psui-justify-center psui-text-gray-50 psui-bg-gray-10 psui-transition-all psui-cursor-pointer psui-rounded;
40
- padding: 4px 8px 4px 6px;
41
80
 
42
81
  &:before {
43
82
  @apply psui-inline-block psui-text-gray-30 psui-cursor-pointer psui-transition-all;
@@ -90,22 +129,6 @@
90
129
  }
91
130
 
92
131
  &.type-button {
93
- label {
94
- @apply psui-flex psui-items-center psui-justify-center psui-text-gray-60 psui-transition-all psui-cursor-pointer psui-rounded psui-py-1 psui-px-3 psui-text-small;
95
- background-color: #F6F7F8;
96
- &:hover {
97
- @apply psui-text-blue-60 psui-bg-white;
98
- }
99
-
100
- &:focus,
101
- &:active {
102
- @apply psui-text-blue-60 psui-bg-blue-20;
103
- }
104
-
105
- &.checked {
106
- @apply psui-text-blue-60 psui-bg-blue-20;
107
- }
108
- }
109
132
 
110
133
  &.layout-with-icon {
111
134
  label {
@@ -155,15 +178,15 @@
155
178
  }
156
179
 
157
180
  .psui-el-chips-icon {
158
- font-size: 18px;
181
+ font-size: 16px;
159
182
 
160
183
  &-prepend {
161
- @apply psui-bg-gray-30 psui-rounded-full psui-text-white psui-mr-2 psui-w-6 psui-h-6 psui-flex psui-items-center psui-justify-center;
184
+ @apply psui-bg-gray-30 psui-rounded-full psui-text-white psui-w-6 psui-h-6 psui-flex psui-items-center psui-justify-center;
162
185
  }
163
186
  }
164
187
 
165
188
  .psui-el-chips-close {
166
- @apply psui-text-gray-40 psui-flex psui-items-center psui-justify-center psui-ml-2;
189
+ @apply psui-text-gray-40 psui-flex psui-items-center psui-justify-center;
167
190
  }
168
191
  }
169
192
  }
@@ -23,11 +23,15 @@
23
23
  <label
24
24
  :disabled="disabled"
25
25
  :for="getInputId"
26
- :class="{'checked': checked && type === 'button', 'layout-disabled': layout === 'disabled'}"
26
+ :class="[
27
+ {'checked': checked && type === 'button', 'layout-disabled': layout === 'disabled'},
28
+ `icon-position-${iconPosition}`
29
+ ]"
27
30
  >
28
31
  <i
29
32
  v-if="icon"
30
33
  class="psui-el-chips-icon psui-el-chips-icon-prepend"
34
+ :class="{ 'is-rotated': rotableIcon }"
31
35
  >{{ icon }}</i>
32
36
  {{ label }}
33
37
  <button
@@ -82,6 +86,15 @@ const props = defineProps({
82
86
  /**
83
87
  * It sets if the button was checked or not checked.
84
88
  */
89
+ iconPosition: {
90
+ type: String,
91
+ default: 'left',
92
+ validator: (value) => ['left', 'right'].includes(value)
93
+ },
94
+ rotableIcon:{
95
+ type: Boolean,
96
+ defaul: false
97
+ },
85
98
  checked: {
86
99
  type: Boolean,
87
100
  default: false,