@policystudio/policy-studio-ui-vue 1.0.95 → 1.0.98

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.
@@ -3842,6 +3842,82 @@ video {
3842
3842
  font-weight: 700;
3843
3843
  }
3844
3844
 
3845
+ .psui-el-testimonial {
3846
+ position: relative;
3847
+ background-color: #ffffff ;
3848
+ display: flex;
3849
+ flex-direction: column;
3850
+ border-radius: 0.5rem;
3851
+ width: 100%;
3852
+ padding: 56px 42px 40px 32px;
3853
+ }
3854
+
3855
+ .psui-el-testimonial-icon {
3856
+ position: absolute;
3857
+ --bg-opacity: 1;
3858
+ background-color: #318FAC;
3859
+ background-color: rgba(49, 143, 172, var(--bg-opacity));
3860
+ border-radius: 0.125rem;
3861
+ display: flex;
3862
+ align-items: center;
3863
+ top:-15px;
3864
+ right:16px;
3865
+ }
3866
+
3867
+ .psui-el-testimonial-description {
3868
+ --text-opacity: 1;
3869
+ color: #002A3A;
3870
+ color: rgba(0, 42, 58, var(--text-opacity));
3871
+ font-style: italic;
3872
+ font-size: 16px;
3873
+ line-height: 130%;
3874
+ margin-bottom: 33px;
3875
+ }
3876
+
3877
+ .psui-el-testimonial-info {
3878
+ display: flex;
3879
+ flex-direction: column;
3880
+ margin-top: auto;
3881
+ }
3882
+
3883
+ .psui-el-testimonial-info-user {
3884
+ margin-bottom: 0.25rem;
3885
+ --text-opacity: 1;
3886
+ color: #002A3A;
3887
+ color: rgba(0, 42, 58, var(--text-opacity));
3888
+ font-size: 14px;
3889
+ line-height: 130%;
3890
+ font-weight: 700;
3891
+ }
3892
+
3893
+ .psui-el-testimonial-info-position,.psui-el-testimonial-info-jurisdiction {
3894
+ --text-opacity: 1;
3895
+ color: #798490;
3896
+ color: rgba(121, 132, 144, var(--text-opacity));
3897
+ font-size: 14px;
3898
+ line-height: 130%;
3899
+ }
3900
+
3901
+ .psui-el-date-card {
3902
+ display: flex;
3903
+ flex-direction: column;
3904
+ align-items: center;
3905
+ --bg-opacity: 1;
3906
+ background-color: #318FAC;
3907
+ background-color: rgba(49, 143, 172, var(--bg-opacity));
3908
+ color: #ffffff ;
3909
+ padding: 8px 11px;
3910
+ border-radius:3px;
3911
+ width: -moz-fit-content;
3912
+ width: fit-content;
3913
+ height: -moz-fit-content;
3914
+ height: fit-content;
3915
+ }
3916
+
3917
+ .psui-el-date-card-day {
3918
+ font-weight: 700;
3919
+ }
3920
+
3845
3921
  .psui-space-y-0 > :not(template) ~ :not(template){
3846
3922
  --space-y-reverse: 0;
3847
3923
  margin-top: calc(0px * calc(1 - var(--space-y-reverse)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.95",
3
+ "version": "1.0.98",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -25,6 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "core-js": "^3.6.5",
28
+ "dayjs": "^1.11.7",
28
29
  "vue": "^2.6.11"
29
30
  },
30
31
  "devDependencies": {
@@ -29,6 +29,8 @@
29
29
  @import './components/PsInputSelect.scss';
30
30
  @import './components/PsDraggable.scss';
31
31
  @import './components/PsBadgeWithIcon.scss';
32
+ @import './components/PsTestimonialCard.scss';
33
+ @import './components/PsDateCardInfo.scss';
32
34
  @import "tailwindcss/base";
33
35
  @import "tailwindcss/components";
34
36
  @import "tailwindcss/utilities";
@@ -0,0 +1,13 @@
1
+ @layer components {
2
+ .psui-el-date-card {
3
+ @apply psui-flex psui-flex-col psui-items-center psui-bg-blue-60 psui-text-white;
4
+ padding: 8px 11px;
5
+ border-radius:3px;
6
+ width: fit-content;
7
+ height: fit-content;
8
+
9
+ &-day {
10
+ @apply psui-font-bold;
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,28 @@
1
+ @layer components {
2
+ .psui-el-testimonial {
3
+ @apply psui-relative psui-bg-white psui-flex psui-flex-col psui-rounded-lg w-full;
4
+ padding: 56px 42px 40px 32px;
5
+
6
+ &-icon {
7
+ @apply psui-absolute psui-bg-blue-60 psui-rounded-sm psui-flex psui-items-center;
8
+ top:-15px;
9
+ right:16px;
10
+ }
11
+
12
+ &-description {
13
+ @apply psui-text-blue-80 psui-italic psui-text-p;
14
+ margin-bottom: 33px;
15
+ }
16
+
17
+ &-info {
18
+ @apply psui-flex psui-flex-col psui-mt-auto;
19
+ &-user {
20
+ @apply psui-mb-1 psui-text-blue-80 psui-text-small psui-font-bold;
21
+ }
22
+
23
+ &-position,&-jurisdiction {
24
+ @apply psui-text-gray-50 psui-text-small;
25
+ }
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div class="psui-el-date-card">
3
+ <span class="psui-el-date-card-month">
4
+ {{getMonthFromDate}}
5
+ </span>
6
+ <span class="psui-el-date-card-day">
7
+ {{getDayFromDate}}
8
+ </span>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+
14
+ import dayjs from 'dayjs'
15
+
16
+ export default {
17
+ name:'PsDateCardInfo',
18
+ props:{
19
+ date:{
20
+ type:String,
21
+ default:'',
22
+ }
23
+ },
24
+ computed:{
25
+ getMonthFromDate(){
26
+ return dayjs(this.date).format('MMM')
27
+ },
28
+ getDayFromDate(){
29
+ return dayjs(this.date).format('DD')
30
+ }
31
+ }
32
+ }
33
+ </script>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <div class="psui-el-testimonial">
3
+ <div class="psui-el-testimonial-icon">
4
+ <PsIcon
5
+ icon="format_quote"
6
+ size="35"
7
+ color="psui-text-white"
8
+ />
9
+ </div>
10
+ <p class="psui-el-testimonial-description">{{description}}</p>
11
+ <div class="psui-el-testimonial-info">
12
+ <span class="psui-el-testimonial-info-user" >{{user}}</span>
13
+ <span class="psui-el-testimonial-info-position">{{position}}</span>
14
+ <span class="psui-el-testimonial-info-jurisdiction">{{jurisdiction}}</span>
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ import PsIcon from '../ui/PsIcon.vue'
21
+
22
+ export default {
23
+ name: 'PsTestimonialCard',
24
+ components:{
25
+ PsIcon
26
+ },
27
+ props:{
28
+ description:{
29
+ type: String,
30
+ default: '',
31
+ },
32
+ user:{
33
+ type: String,
34
+ default: '',
35
+ },
36
+ position:{
37
+ type: String,
38
+ default: '',
39
+ },
40
+ jurisdiction:{
41
+ type: String,
42
+ default: '',
43
+ },
44
+ }
45
+ }
46
+ </script>
47
+
package/src/index.js CHANGED
@@ -1,3 +1,8 @@
1
+
2
+ /**
3
+ * General Components
4
+ */
5
+
1
6
  import PsButton from './components/buttons/PsButton.vue'
2
7
  import PsCheckbox from './components/controls/PsCheckbox.vue'
3
8
  import PsRadioButton from './components/controls/PsRadioButton.vue'
@@ -35,8 +40,8 @@ import PsCheckboxSimple from './components/controls/PsCheckboxSimple.vue'
35
40
  import PsBadgeWithIcon from './components/badges-and-tags/PsBadgeWithIcon.vue'
36
41
  import PsProgressBar from './components/badges-and-tags/PsProgressBar.vue'
37
42
  import PsRadioButtonSimple from './components/controls/PsRadioButtonSimple.vue'
38
-
39
-
43
+ import PsTestimonialCard from './components/badges-and-tags/PsTestimonialCard.vue'
44
+ import PsDateCardInfo from './components/badges-and-tags/PsDateCardInfo.vue'
40
45
 
41
46
  export default {
42
47
  install(Vue) {
@@ -77,6 +82,8 @@ export default {
77
82
  Vue.component('PsBadgeWithIcon', PsBadgeWithIcon)
78
83
  Vue.component('PsProgressBar', PsProgressBar)
79
84
  Vue.component('PsRadioButtonSimple', PsRadioButtonSimple)
85
+ Vue.component('PsTestimonialCard',PsTestimonialCard)
86
+ Vue.component('PsDateCardInfo',PsDateCardInfo)
80
87
 
81
88
  Vue.directive('click-outside', {
82
89
  bind: function (el, binding, vnode) {
@@ -133,6 +140,8 @@ export {
133
140
  PsCheckboxSimple,
134
141
  PsBadgeWithIcon,
135
142
  PsProgressBar,
136
- PsRadioButtonSimple
143
+ PsRadioButtonSimple,
144
+ PsTestimonialCard,
145
+ PsDateCardInfo
137
146
  }
138
147
 
@@ -0,0 +1,24 @@
1
+ import PsDateCardInfo from '../components/badges-and-tags/PsDateCardInfo.vue'
2
+
3
+ export default {
4
+ title: 'Components/DateCardInfo',
5
+ component: PsDateCardInfo,
6
+ }
7
+
8
+ const Template = (args,{argTypes}) => ({
9
+ props: Object.keys(argTypes),
10
+ components:{PsDateCardInfo},
11
+ template: `
12
+ <div style="width: 1000px; background:#DBE9F1; display:flex; gap: 7px; padding: 20px; height: 100%;">
13
+ <PsDateCardInfo v-bind="$props"/>
14
+ <PsDateCardInfo v-bind="$props"/>
15
+ <PsDateCardInfo v-bind="$props"/>
16
+ </div>
17
+ `
18
+ })
19
+
20
+ export const Default = Template.bind({})
21
+
22
+ Default.args ={
23
+ date:'23/05/2023'
24
+ }
@@ -0,0 +1,27 @@
1
+ import PsTestimonialCard from '../components/badges-and-tags/PsTestimonialCard.vue'
2
+
3
+ export default {
4
+ title: 'Components/TestimonialCard',
5
+ component: PsTestimonialCard,
6
+ }
7
+
8
+ const Template = (args,{argTypes}) => ({
9
+ props: Object.keys(argTypes),
10
+ components:{PsTestimonialCard},
11
+ template: `
12
+ <div style="width: 1000px; background:#DBE9F1; display:flex; gap: 7px; padding: 20px; height: 100%;">
13
+ <PsTestimonialCard v-bind="$props"/>
14
+ <PsTestimonialCard v-bind="$props"/>
15
+ <PsTestimonialCard v-bind="$props"/>
16
+ </div>
17
+ `
18
+ })
19
+
20
+ export const Default = Template.bind({})
21
+
22
+ Default.args = {
23
+ testimonial: 'I used to spend most of my time helping California cities make reach codes. Now, i just show them the Explorer and get to focus on helping cities in other states.',
24
+ user:'Amy Rider',
25
+ position:'Head Sustainability Department',
26
+ jurisdiction:'City of Chula vista'
27
+ }