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

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.
Files changed (36) hide show
  1. package/dist/css/psui_styles.css +98 -16
  2. package/package.json +1 -2
  3. package/src/assets/scss/base.scss +2 -0
  4. package/src/assets/scss/components/PsAccordion.scss +16 -8
  5. package/src/assets/scss/components/PsBarChart.scss +17 -0
  6. package/src/assets/scss/components/PsTagScope.scss +16 -0
  7. package/src/components/badges-and-tags/PsDateCardInfo.vue +13 -16
  8. package/src/components/badges-and-tags/PsTagScope.vue +31 -0
  9. package/src/components/data-graphics/PsBarChart.vue +34 -0
  10. package/src/components/table-results/PsTableResults.vue +65 -2
  11. package/src/components/tooltip/PsRichTooltip.vue +7 -4
  12. package/src/index.js +7 -1
  13. package/src/stories/BadgeWithIcon.stories.js +1 -1
  14. package/src/stories/BarChart.stories.js +17 -0
  15. package/src/stories/ChartLegend.stories.js +1 -1
  16. package/src/stories/Checkbox.stories.js +1 -1
  17. package/src/stories/CheckboxSimple.stories.js +1 -1
  18. package/src/stories/ClimateZoneBadge.stories.js +1 -1
  19. package/src/stories/CostEffectBar.stories.js +1 -1
  20. package/src/stories/Datatable.stories.js +1 -1
  21. package/src/stories/DateCardInfo.stories.js +2 -2
  22. package/src/stories/Dialog.stories.js +1 -1
  23. package/src/stories/Draggable.stories.js +1 -1
  24. package/src/stories/HighlightRippleDot.stories.js +1 -2
  25. package/src/stories/InlineSelector.stories.js +6 -6
  26. package/src/stories/Input.stories.js +1 -1
  27. package/src/stories/InputSelect.stories.js +2 -2
  28. package/src/stories/InputTextArea.stories.js +16 -16
  29. package/src/stories/MiniTag.stories.js +1 -1
  30. package/src/stories/ProgressBar.stories.js +1 -1
  31. package/src/stories/RadioButton.stories.js +1 -1
  32. package/src/stories/RadioButtonSimple.stories.js +1 -1
  33. package/src/stories/Switch.stories.js +1 -1
  34. package/src/stories/TableResults.stories.js +107 -2
  35. package/src/stories/TagScope.stories.js +17 -0
  36. package/src/stories/Toast.stories.js +1 -1
@@ -1128,11 +1128,17 @@ video {
1128
1128
  color: rgba(40, 50, 59, var(--text-opacity));
1129
1129
  }
1130
1130
 
1131
- .psui-el-accordion-item-header-wrapper:hover {
1132
- --text-opacity: 1;
1133
- color: #318FAC;
1134
- color: rgba(49, 143, 172, var(--text-opacity));
1135
- }
1131
+ .psui-el-accordion-item-header-wrapper:hover .psui-el-accordion-item-icon {
1132
+ --text-opacity: 1 !important;
1133
+ color: #318FAC !important;
1134
+ color: rgba(49, 143, 172, var(--text-opacity)) !important;
1135
+ }
1136
+
1137
+ .psui-el-accordion-item-header-wrapper:hover .psui-el-accordion-item-title{
1138
+ --text-opacity: 1;
1139
+ color: #318FAC;
1140
+ color: rgba(49, 143, 172, var(--text-opacity));
1141
+ }
1136
1142
 
1137
1143
  .psui-el-accordion-item-icon {
1138
1144
  font-family: 'Material Icons Round';
@@ -1186,18 +1192,17 @@ video {
1186
1192
  transform: rotate(180deg);
1187
1193
  }
1188
1194
 
1189
- .psui-el-accordion .psui-el-accordion-item.status-opened .psui-el-accordion-item-header,
1190
- .psui-el-accordion .psui-el-accordion-item-header:hover {
1191
- --text-opacity: 1;
1192
- color: #318FAC;
1193
- color: rgba(49, 143, 172, var(--text-opacity));
1194
- }
1195
+ .psui-el-accordion .psui-el-accordion-item.status-opened .psui-el-accordion-item-header .psui-el-accordion-item-header-wrapper .psui-el-accordion-item-icon {
1196
+ --text-opacity: 1;
1197
+ color: #318FAC;
1198
+ color: rgba(49, 143, 172, var(--text-opacity));
1199
+ }
1195
1200
 
1196
- .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 {
1197
- --text-opacity: 1;
1198
- color: #318FAC;
1199
- color: rgba(49, 143, 172, var(--text-opacity));
1200
- }
1201
+ .psui-el-accordion .psui-el-accordion-item.status-opened .psui-el-accordion-item-header .psui-el-accordion-item-header-wrapper .psui-el-accordion-item-title{
1202
+ --text-opacity: 1;
1203
+ color: #318FAC;
1204
+ color: rgba(49, 143, 172, var(--text-opacity));
1205
+ }
1201
1206
 
1202
1207
  .psui-el-accordion .psui-el-accordion-item-content {
1203
1208
  list-style-type: none;
@@ -3918,6 +3923,83 @@ video {
3918
3923
  font-weight: 700;
3919
3924
  }
3920
3925
 
3926
+ .psui-el-tag-scope {
3927
+ display: flex;
3928
+ align-items: center;
3929
+ border-radius: 0.25rem;
3930
+ padding-top: 0.25rem;
3931
+ padding-bottom: 0.25rem;
3932
+ padding-right: 0.5rem;
3933
+ height: 1.5rem;
3934
+ --bg-opacity: 1;
3935
+ background-color: #F3F6F9;
3936
+ background-color: rgba(243, 246, 249, var(--bg-opacity));
3937
+ --text-opacity: 1;
3938
+ color: #798490;
3939
+ color: rgba(121, 132, 144, var(--text-opacity));
3940
+ width: 150px;
3941
+ }
3942
+
3943
+ .psui-el-tag-scope-icon {
3944
+ font-family: 'Material Icons Round';
3945
+ font-weight: normal;
3946
+ font-style: normal;
3947
+ font-size: 24px;
3948
+ line-height: 1;
3949
+ letter-spacing: normal;
3950
+ text-transform: none;
3951
+ display: inline-block;
3952
+ white-space: nowrap;
3953
+ word-wrap: normal;
3954
+ direction: ltr;
3955
+ -webkit-font-feature-settings: 'liga';
3956
+ -webkit-font-smoothing: antialiased;
3957
+ margin-left: auto;
3958
+ margin-right: auto;
3959
+ font-size: 1.125rem;
3960
+ }
3961
+
3962
+ .psui-el-tag-scope-true {
3963
+ --text-opacity: 1;
3964
+ color: #44A06A;
3965
+ color: rgba(68, 160, 106, var(--text-opacity));
3966
+ background-color: #D3EFDE;
3967
+ }
3968
+
3969
+ .psui-el-bar-chart {
3970
+ display: flex;
3971
+ align-items: center;
3972
+ border-radius: 0.25rem;
3973
+ font-size: 12px;
3974
+ line-height: 130%;
3975
+ font-weight: 700;
3976
+ overflow: hidden;
3977
+ padding-top: 0.25rem;
3978
+ padding-bottom: 0.25rem;
3979
+ padding-right: 0.5rem;
3980
+ height: 1.5rem;
3981
+ position: relative;
3982
+ background-color: #D4E7F0;
3983
+ width: 150px;
3984
+ }
3985
+
3986
+ .psui-el-bar-chart-total {
3987
+ --text-opacity: 1;
3988
+ color: #00465F;
3989
+ color: rgba(0, 70, 95, var(--text-opacity));
3990
+ margin-left: auto;
3991
+ position: relative;
3992
+ z-index: 1;
3993
+ }
3994
+
3995
+ .psui-el-bar-chart-bar {
3996
+ position: absolute;
3997
+ top: 0;
3998
+ left: 0;
3999
+ height: 100%;
4000
+ background-color: #8AC6D9;
4001
+ }
4002
+
3921
4003
  .psui-space-y-0 > :not(template) ~ :not(template){
3922
4004
  --space-y-reverse: 0;
3923
4005
  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.98",
3
+ "version": "1.1.0",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -25,7 +25,6 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "core-js": "^3.6.5",
28
- "dayjs": "^1.11.7",
29
28
  "vue": "^2.6.11"
30
29
  },
31
30
  "devDependencies": {
@@ -31,6 +31,8 @@
31
31
  @import './components/PsBadgeWithIcon.scss';
32
32
  @import './components/PsTestimonialCard.scss';
33
33
  @import './components/PsDateCardInfo.scss';
34
+ @import './components/PsTagScope.scss';
35
+ @import './components/PsBarChart.scss';
34
36
  @import "tailwindcss/base";
35
37
  @import "tailwindcss/components";
36
38
  @import "tailwindcss/utilities";
@@ -5,7 +5,6 @@
5
5
  &-item {
6
6
  border-bottom: 1px solid #e6ecf2;
7
7
 
8
-
9
8
  &.disabled {
10
9
  .psui-el-accordion-item-header {
11
10
  .psui-el-accordion-item-header-wrapper {
@@ -24,7 +23,12 @@
24
23
  @apply psui-flex psui-w-full psui-cursor-pointer psui-transition-all psui-justify-between transition-default psui-text-gray-80;
25
24
 
26
25
  &:hover {
27
- @apply psui-text-blue-60;
26
+ .psui-el-accordion-item-icon {
27
+ @apply psui-text-blue-60 !important;
28
+ }
29
+ .psui-el-accordion-item-title{
30
+ @apply psui-text-blue-60;
31
+ }
28
32
  }
29
33
  }
30
34
 
@@ -71,15 +75,19 @@
71
75
  }
72
76
 
73
77
  .psui-el-accordion-item {
74
- &.status-opened .psui-el-accordion-item-header,
75
- &-header:hover {
76
- @apply psui-text-blue-60;
77
-
78
- .psui-el-accordion-item-icon {
79
- @apply psui-text-blue-60;
78
+ &.status-opened .psui-el-accordion-item-header {
79
+ .psui-el-accordion-item-header-wrapper {
80
+
81
+ .psui-el-accordion-item-icon {
82
+ @apply psui-text-blue-60;
83
+ }
84
+ .psui-el-accordion-item-title{
85
+ @apply psui-text-blue-60;
86
+ }
80
87
  }
81
88
  }
82
89
  }
90
+
83
91
 
84
92
  .psui-el-accordion-item-content {
85
93
  @apply psui-list-none psui-text-gray-60 psui-mb-5;
@@ -0,0 +1,17 @@
1
+ @layer components {
2
+ .psui-el-bar-chart {
3
+ @apply psui-flex psui-items-center psui-rounded psui-text-xsmall psui-font-bold psui-overflow-hidden psui-py-1 psui-pr-2 psui-h-6 psui-relative;
4
+ background-color: #D4E7F0;
5
+ width: 150px;
6
+
7
+ &-total {
8
+ @apply psui-text-blue-70 psui-ml-auto psui-relative;
9
+ z-index: 1;
10
+ }
11
+
12
+ &-bar {
13
+ @apply psui-absolute psui-top-0 psui-left-0 psui-h-full;
14
+ background-color: #8AC6D9;
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,16 @@
1
+ @layer components {
2
+ .psui-el-tag-scope {
3
+ @apply psui-flex psui-items-center psui-rounded psui-py-1 psui-pr-2 psui-h-6 psui-bg-gray-10 psui-text-gray-50;
4
+ width: 150px;
5
+
6
+ &-icon {
7
+ @apply psui-icon psui-mx-auto;
8
+ font-size: 1.125rem;
9
+ }
10
+
11
+ &-true {
12
+ @apply psui-text-green-70;
13
+ background-color: #D3EFDE;
14
+ }
15
+ }
16
+ }
@@ -10,24 +10,21 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
-
14
- import dayjs from 'dayjs'
15
-
16
13
  export default {
17
- name:'PsDateCardInfo',
18
- props:{
19
- date:{
20
- type:String,
21
- default:'',
22
- }
14
+ name: 'PsDateCardInfo',
15
+ props: {
16
+ date: {
17
+ type: [Date, String],
18
+ default: new Date(),
19
+ }
20
+ },
21
+ computed: {
22
+ getMonthFromDate() {
23
+ return (new Date(this.date))?.toLocaleString('default', { month: 'short' })
23
24
  },
24
- computed:{
25
- getMonthFromDate(){
26
- return dayjs(this.date).format('MMM')
27
- },
28
- getDayFromDate(){
29
- return dayjs(this.date).format('DD')
30
- }
25
+ getDayFromDate() {
26
+ return (new Date(this.date))?.toLocaleString('default', { day: '2-digit' })
31
27
  }
28
+ }
32
29
  }
33
30
  </script>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div
3
+ class="psui-el-tag-scope"
4
+ :class="getComponentClass"
5
+ >
6
+ <span class="psui-el-tag-scope-icon">{{ getComponentIcon }}</span>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: 'PsTagScope',
13
+ props: {
14
+ included: {
15
+ type: Boolean,
16
+ default: true
17
+ },
18
+ },
19
+ computed: {
20
+ getComponentClass() {
21
+ return `psui-el-tag-scope-${this.included}`
22
+ },
23
+ getComponentIcon() {
24
+ return this.included ? 'check' : 'remove'
25
+ }
26
+ },
27
+ }
28
+ </script>
29
+
30
+ <style> /* Please, use the file src/assets/scss/components/PsTagScope.scss */ </style>
31
+
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div class="psui-el-bar-chart">
3
+ <p
4
+ v-if="showNumber"
5
+ class="psui-el-bar-chart-total"
6
+ >{{ total }}</p>
7
+
8
+ <div
9
+ class="psui-el-bar-chart-bar"
10
+ :style="{width: `${fillWidth}%`}"
11
+ ></div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'PsBarChart',
18
+ props: {
19
+ showNumber: {
20
+ type: Boolean,
21
+ default: true
22
+ },
23
+ total: {
24
+ type: String,
25
+ default: '5,0',
26
+ },
27
+ fillWidth: {
28
+ type: Number,
29
+ default: 50
30
+ },
31
+ },
32
+ computed: {}
33
+ }
34
+ </script>
@@ -24,6 +24,8 @@
24
24
  },
25
25
  `type-${item.type}`
26
26
  ]"
27
+ @mouseenter="onRowHover(index)"
28
+ @mouseleave="onRowHover(false)"
27
29
  >
28
30
  <td>
29
31
  <div
@@ -85,6 +87,31 @@
85
87
  @click.native="$eventBus.$emit('openDescriptionModal', { type: 'helper', slug: `table-results-${item.helper_slug}` })"
86
88
  />
87
89
  </p>
90
+ <PsRichTooltip
91
+ v-if="shouldShowIcon(item)"
92
+ position="top"
93
+ layout="gray"
94
+ class="psui-inline-flex psui-cursor-default"
95
+ :class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0', { 'is-last-deep' : item.last_deep }]"
96
+ :ignoreDialog="!shouldShowIcon(item)"
97
+ >
98
+ <template v-slot:trigger>
99
+ <PsIcon
100
+ :icon="getIcon(item)"
101
+ class="psui-flex psui-text-gray-40 psui-cursor-pointer leading-none hover:psui-text-blue-60 psui-gap-3 psui-px-5 psui-py-1 transition-all"
102
+ size="18"
103
+ :style="{ display: 'flex' }"
104
+ @click.native="executeCallback(item)"
105
+ />
106
+ </template>
107
+ <template v-slot:content>
108
+ <p
109
+ class="psui-font-bold psui-text-gray-80 psui-text-xsmall"
110
+ >
111
+ {{ getText(item) }}
112
+ </p>
113
+ </template>
114
+ </PsRichTooltip>
88
115
  </div>
89
116
  </td>
90
117
 
@@ -236,7 +263,8 @@ export default {
236
263
  },
237
264
  },
238
265
  data: () => ({
239
- collapsedRows : []
266
+ collapsedRows : [],
267
+ isHoveringRow: false
240
268
  }),
241
269
  computed: {
242
270
  getRows() {
@@ -323,7 +351,42 @@ export default {
323
351
  }
324
352
  this.$forceUpdate()
325
353
  this.$emit('collapse-row', this.collapsedRows)
326
- }
354
+ },
355
+ shouldShowIcon(item) {
356
+ if(item.actions && (item.deep == 1 || item.deep == 2)) {
357
+ return true
358
+ } else {
359
+ return false
360
+ }
361
+ },
362
+ onRowHover(index) {
363
+ this.isHoveringRow = index
364
+ },
365
+ getIcon(item) {
366
+ if(item.actions && item.is_disabled) {
367
+ return item.actions[1].icon
368
+ } else if(item.actions && !item.is_disabled) {
369
+ return item.actions[0].icon
370
+ } else {
371
+ return ''
372
+ }
373
+ },
374
+ getText(item) {
375
+ if(item.actions && item.is_disabled) {
376
+ return item.actions[1].text
377
+ } else if(item.actions && !item.is_disabled) {
378
+ return item.actions[0].text
379
+ } else {
380
+ return ''
381
+ }
382
+ },
383
+ executeCallback(item) {
384
+ if(item.actions && item.is_disabled) {
385
+ item.actions[1].callback()
386
+ } else if(item.actions && !item.is_disabled) {
387
+ item.actions[0].callback()
388
+ }
389
+ },
327
390
  }
328
391
  }
329
392
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <PsTooltip :layout="layout" :title="title" :cssClass="cssClass" :position="position" :ignoreDialog="ignoreDialog">
2
+ <PsTooltip :layout="layout" :title="title" :cssClass="cssClass" :position="position" :ignoreDialog="ignoreDialog" :customPosition="customPosition">
3
3
  <template v-slot:trigger>
4
4
  <slot name="trigger"></slot>
5
5
  </template>
@@ -35,16 +35,19 @@ export default {
35
35
  type: String,
36
36
  default: '',
37
37
  },
38
- position:{
38
+ position: {
39
39
  type: String,
40
40
  default: 'bottom',
41
- validator: (value)=> ['bottom','top'].includes(value)
41
+ validator: (value)=> ['bottom', 'top', 'custom'].includes(value)
42
42
  },
43
43
  ignoreDialog: {
44
44
  type: Boolean,
45
45
  default: false
46
+ },
47
+ customPosition: {
48
+ type: String,
49
+ default: '',
46
50
  }
47
-
48
51
  },
49
52
  }
50
53
  </script>
package/src/index.js CHANGED
@@ -42,6 +42,8 @@ import PsProgressBar from './components/badges-and-tags/PsProgressBar.vue'
42
42
  import PsRadioButtonSimple from './components/controls/PsRadioButtonSimple.vue'
43
43
  import PsTestimonialCard from './components/badges-and-tags/PsTestimonialCard.vue'
44
44
  import PsDateCardInfo from './components/badges-and-tags/PsDateCardInfo.vue'
45
+ import PsTagScope from './components/badges-and-tags/PsTagScope.vue'
46
+ import PsBarChart from './components/data-graphics/PsBarChart.vue'
45
47
 
46
48
  export default {
47
49
  install(Vue) {
@@ -84,6 +86,8 @@ export default {
84
86
  Vue.component('PsRadioButtonSimple', PsRadioButtonSimple)
85
87
  Vue.component('PsTestimonialCard',PsTestimonialCard)
86
88
  Vue.component('PsDateCardInfo',PsDateCardInfo)
89
+ Vue.component('PsTagScope',PsTagScope)
90
+ Vue.component('PsBarChart',PsBarChart)
87
91
 
88
92
  Vue.directive('click-outside', {
89
93
  bind: function (el, binding, vnode) {
@@ -142,6 +146,8 @@ export {
142
146
  PsProgressBar,
143
147
  PsRadioButtonSimple,
144
148
  PsTestimonialCard,
145
- PsDateCardInfo
149
+ PsDateCardInfo,
150
+ PsTagScope,
151
+ PsBarChart
146
152
  }
147
153
 
@@ -1,7 +1,7 @@
1
1
  import PsBadgeWithIcon from '../components/badges-and-tags/PsBadgeWithIcon.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/BadgeWithIcon',
4
+ title: 'Badges & Tags/Badges/BadgeWithIcon',
5
5
  component: PsBadgeWithIcon,
6
6
  argTypes: {
7
7
  },
@@ -0,0 +1,17 @@
1
+ import PsBarChart from '../components/data-graphics/PsBarChart.vue'
2
+ export default {
3
+ title: 'Data Graphics/Charts/BarChart',
4
+ component: PsBarChart,
5
+ }
6
+
7
+ const defaultTemplate = (args, {argTypes}) => ({
8
+ props: Object.keys(argTypes),
9
+ components: { PsBarChart },
10
+ template: `
11
+ <div style='padding: 20px;'>
12
+ <PsBarChart v-bind="$props"/>
13
+ </div>
14
+ `
15
+ })
16
+
17
+ export const BarChart = defaultTemplate.bind({})
@@ -1,7 +1,7 @@
1
1
  import PsChartLegend from '../components/badges-and-tags/PsChartLegend.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/ChartLegend',
4
+ title: 'Badges & Tags/Badges/ChartLegend',
5
5
  component: PsChartLegend,
6
6
  argTypes: {},
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import PsCheckbox from '../components/controls/PsCheckbox.vue'
2
2
  // const icons = ['add_circle', 'delete', 'done', 'info', 'send']
3
3
  export default {
4
- title: 'Components/Checkbox',
4
+ title: 'Controls & Selectors/Checkbox',
5
5
  component: PsCheckbox,
6
6
  }
7
7
 
@@ -1,7 +1,7 @@
1
1
  import PsCheckboxSimple from '../components/controls/PsCheckboxSimple.vue'
2
2
  // const icons = ['add_circle', 'delete', 'done', 'info', 'send']
3
3
  export default {
4
- title: 'Components/Inputs V2/Checkbox',
4
+ title: 'Text fields & Forms/Inputs V2/Checkbox',
5
5
  component: PsCheckboxSimple,
6
6
  }
7
7
 
@@ -1,7 +1,7 @@
1
1
  import PsClimateZoneBadge from '../components/badges-and-tags/PsClimateZoneBadge.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/ClimateZoneBadge',
4
+ title: 'Badges & Tags/Badges/ClimateZoneBadge',
5
5
  component: PsClimateZoneBadge,
6
6
  }
7
7
 
@@ -1,7 +1,7 @@
1
1
  import PsCostEffectBar from '../components/badges-and-tags/PsCostEffectBar.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/CostEffectBar',
4
+ title: 'Badges & Tags/Badges/CostEffectBar',
5
5
  component: PsCostEffectBar,
6
6
  argTypes: {
7
7
  value: {
@@ -2,7 +2,7 @@ import PsDataTable, { alignment } from '../components/datatable/PsDataTable.vue'
2
2
  import PsDataTableItem from '../components/datatable/PsDataTableItem.vue'
3
3
 
4
4
  export default {
5
- title: 'Components/DataTable',
5
+ title: 'Data Tables/DataTable',
6
6
  component: PsDataTable,
7
7
  subcomponents: { PsDataTableItem },
8
8
  argTypes: {
@@ -19,6 +19,6 @@ export default {
19
19
 
20
20
  export const Default = Template.bind({})
21
21
 
22
- Default.args ={
23
- date:'23/05/2023'
22
+ Default.args = {
23
+ date: new Date()
24
24
  }
@@ -1,7 +1,7 @@
1
1
  import PsDialog from '../components/notifications/PsDialog.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/Dialog',
4
+ title: 'Notifications/Dialog',
5
5
  component: PsDialog,
6
6
  }
7
7
 
@@ -1,7 +1,7 @@
1
1
  import PsDraggable from '../components/controls/PsDraggable.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/Draggable',
4
+ title: 'Controls & Selectors/Draggable',
5
5
  component: PsDraggable
6
6
  }
7
7
 
@@ -1,9 +1,8 @@
1
1
  import PsHighlightRippleDot from '../components/badges-and-tags/PsHighlightRippleDot.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/HighlightRippleDot',
4
+ title: 'Badges & Tags/Badges/HighlightRippleDot',
5
5
  component: PsHighlightRippleDot,
6
- argTypes: {},
7
6
  }
8
7
 
9
8
  const Template = (args, { argTypes }) => ({
@@ -1,18 +1,18 @@
1
1
  import PsInlineSelector from '../components/controls/PsInlineSelector.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/InlineSelector',
5
- component: PsInlineSelector,
4
+ title: 'Controls & Selectors/InlineSelector',
5
+ component: PsInlineSelector,
6
6
  }
7
7
 
8
8
  const TemplateDefault = (args, {argTypes}) => ({
9
- props: Object.keys(argTypes),
10
- components: {PsInlineSelector},
11
- template: `
9
+ props: Object.keys(argTypes),
10
+ components: {PsInlineSelector},
11
+ template: `
12
12
  <div style="width: auto; margin-right: auto; display: flex; align-items: center;">
13
13
  <PsInlineSelector v-bind="$props"></PsInlineSelector>
14
14
  </div>
15
- `
15
+ `
16
16
  })
17
17
 
18
18
  export const Default = TemplateDefault.bind({})
@@ -1,6 +1,6 @@
1
1
  import PsInput from '../components/forms/PsInput.vue'
2
2
  export default {
3
- title: 'Components/Input',
3
+ title: 'Text fields & Forms/Input',
4
4
  component: PsInput,
5
5
  argTypes: {
6
6
  disabled: { control: 'boolean' },
@@ -1,8 +1,8 @@
1
1
  import PsInputSelect from '../components/forms/PsInputSelect.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/InputSelect',
5
- component: PsInputSelect
4
+ title: 'Text fields & Forms/InputSelect',
5
+ component: PsInputSelect
6
6
  }
7
7
 
8
8
  const TemplateDefault = (args, {argTypes})=> ({
@@ -1,25 +1,25 @@
1
1
  import PsInputTextArea from '../components/forms/PsInputTextArea.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/Input Textarea',
5
- component: PsInputTextArea,
4
+ title: 'Text fields & Forms/Input Textarea',
5
+ component: PsInputTextArea,
6
6
  }
7
7
 
8
8
  const Template = (args, {argTypes}) => ({
9
- props: Object.keys(argTypes),
10
- components: {PsInputTextArea},
11
- template: `
12
- <div style='background-color:#F3F6F9; width:400px; height: 100%; padding: 20px 20px; display: flex: display; flex-direction: column;'>
13
- <div style='display: flex; align-items:center; gap:30px;'>
14
- <h1>Default</h1>
15
- <PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" optionalLabel="Optional helper/feedback text"></PsInputTextArea>
16
- </div>
17
- <div style='display: flex; align-items:center; gap:30px; margin-top:40px;'>
18
- <h1>Disable</h1>
19
- <PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" disabled ></PsInputTextArea>
20
- </div>
21
- </div>
22
- `
9
+ props: Object.keys(argTypes),
10
+ components: {PsInputTextArea},
11
+ template: `
12
+ <div style='background-color:#F3F6F9; width:400px; height: 100%; padding: 20px 20px; display: flex: display; flex-direction: column;'>
13
+ <div style='display: flex; align-items:center; gap:30px;'>
14
+ <h1>Default</h1>
15
+ <PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" optionalLabel="Optional helper/feedback text"></PsInputTextArea>
16
+ </div>
17
+ <div style='display: flex; align-items:center; gap:30px; margin-top:40px;'>
18
+ <h1>Disable</h1>
19
+ <PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" disabled ></PsInputTextArea>
20
+ </div>
21
+ </div>
22
+ `
23
23
  })
24
24
 
25
25
  export const Default = Template.bind({})
@@ -3,7 +3,7 @@ import PsMiniTag, {
3
3
  } from '../components/badges-and-tags/PsMiniTag.vue'
4
4
 
5
5
  export default {
6
- title: 'Components/MiniTag',
6
+ title: 'Badges & Tags/Tags/Mini Tag',
7
7
  component: PsMiniTag,
8
8
  argTypes: {
9
9
  type: {
@@ -1,7 +1,7 @@
1
1
  import PsProgressBar from '../components/badges-and-tags/PsProgressBar.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/ProgressBar',
4
+ title: 'Badges & Tags/Badges/ProgressBar',
5
5
  component: PsProgressBar,
6
6
  argTypes: {
7
7
  value: {
@@ -1,7 +1,7 @@
1
1
  import PsRadioButton from '../components/controls/PsRadioButton.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/Radio Button',
4
+ title: 'Controls & Selectors/Radio Button',
5
5
  component: PsRadioButton,
6
6
  }
7
7
 
@@ -1,7 +1,7 @@
1
1
  import PsRadioButtonSimple from '../components/controls/PsRadioButtonSimple.vue'
2
2
 
3
3
  export default {
4
- title: 'Components/Inputs V2/RadioButton',
4
+ title: 'Text fields & Forms/Inputs V2/RadioButton',
5
5
  component: PsRadioButtonSimple,
6
6
  }
7
7
 
@@ -1,6 +1,6 @@
1
1
  import PsSwitch from '../components/controls/PsSwitch.vue'
2
2
  export default {
3
- title: 'Components/Switch',
3
+ title: 'Controls & Selectors/Switch',
4
4
  component: PsSwitch,
5
5
  }
6
6
 
@@ -3,7 +3,7 @@ import PsTableResultsHead from '../components/table-results/PsTableResultsHead.v
3
3
  import PsProgressBar from '../components/badges-and-tags/PsProgressBar.vue'
4
4
 
5
5
  export default {
6
- title: 'Components/TableResults',
6
+ title: 'Data Tables/TableResults',
7
7
  component: { PsTableResults, PsTableResultsHead },
8
8
  argTypes: {
9
9
  onClick: { action: 'clicked' },
@@ -295,6 +295,22 @@ Simple.args = {
295
295
  ],
296
296
  summaryData: [
297
297
  {
298
+ actions: [
299
+ {
300
+ icon: 'delete_outline',
301
+ text: 'Remove prototype from your policy',
302
+ callback: () => {}
303
+ },
304
+ {
305
+ icon: 'add_circle_outline',
306
+ text: 'Add requirements',
307
+ callback: () => {}
308
+ },
309
+ {
310
+ icon: 'more_horiz',
311
+ callback: () => {}
312
+ },
313
+ ],
298
314
  'data': {
299
315
  'forecast_units_affected': 337.5,
300
316
  'forecast_emissions_savings': -1470.2228427746163,
@@ -433,9 +449,98 @@ Simple.args = {
433
449
  }
434
450
  ],
435
451
  'is_disabled': false,
436
- 'is_last': true,
452
+ 'is_last': false,
437
453
  'index': '0-0-0',
438
454
  'last_deep': false
455
+ },
456
+ {
457
+ 'data': {
458
+ 'forecast_units_affected': 77.5,
459
+ 'forecast_emissions_savings': 1427.3145433224304,
460
+ 'forecast_therms_savings': 296624.89395,
461
+ 'forecast_kwh_savings': -2102697.449999999,
462
+ 'forecast_lifecycle_savings': 19620.35775000001,
463
+ 'forecast_initial_cost': 408160,
464
+ 'initial_cost': 2014,
465
+ 'annual_bill_savings_avg': null,
466
+ 'annual_bill_savings': -439.0199999999999,
467
+ 'emissions_savings': 2.045,
468
+ 'kwh_savings': -3999,
469
+ 'therms_savings': 400.1415,
470
+ 'lifecycle_savings': -4160.687805,
471
+ 'compliance_margin': 29.6,
472
+ 'baseline_fuel_type': 'Mixed-fuel',
473
+ 'energy_savings_combined': 26.36819047,
474
+ 'on_bill_cost_ratio': 1.460322707,
475
+ 'tdv_benefit_to_cost_ratio': 1.42,
476
+ 'simple_payback': 0,
477
+ 'tdv2022_benefit_to_cost_ratio': 0
478
+ },
479
+ 'deep': 2,
480
+ 'id': 'policy:container-2459:climateZone-2-PGE',
481
+ 'title': 'Climate Zone 2',
482
+ 'items': [
483
+ {
484
+ 'data': {
485
+ 'forecast_units_affected': 77.5,
486
+ 'forecast_emissions_savings': 1427.3145433224304,
487
+ 'forecast_therms_savings': 296624.89395,
488
+ 'forecast_kwh_savings': -2102697.449999999,
489
+ 'forecast_lifecycle_savings': 19620.35775000001,
490
+ 'forecast_initial_cost': 408160,
491
+ 'initial_cost': 2014,
492
+ 'annual_bill_savings': -439.02,
493
+ 'emissions_savings': 2.045,
494
+ 'kwh_savings': -3999,
495
+ 'therms_savings': 400.1415,
496
+ 'lifecycle_savings': -4160.687805,
497
+ 'compliance_margin': 29.6,
498
+ 'baseline_fuel_type': 'Mixed-fuel',
499
+ 'energy_savings_combined': 26.36819047,
500
+ 'on_bill_cost_ratio': 1.460322707,
501
+ 'tdv_benefit_to_cost_ratio': 1.42,
502
+ 'simple_payback': 0,
503
+ 'tdv2022_benefit_to_cost_ratio': null
504
+ },
505
+ 'deep': 3,
506
+ 'id': 'policy:container-2459:climateZone-2-PGE:fuel-all-electric',
507
+ 'title': 'All Electric',
508
+ 'items': null,
509
+ 'is_disabled': false,
510
+ 'is_last': false,
511
+ 'index': '0-0-0-0',
512
+ 'last_deep': true
513
+ },
514
+ {
515
+ 'data': {
516
+ 'initial_cost': 1806.25,
517
+ 'annual_bill_savings': 186.04,
518
+ 'emissions_savings': 0.42,
519
+ 'kwh_savings': 89.395,
520
+ 'therms_savings': 68.604,
521
+ 'lifecycle_savings': 5647.744375,
522
+ 'compliance_margin': 11.95,
523
+ 'baseline_fuel_type': 'Mixed-fuel',
524
+ 'energy_savings_combined': 7.16541574,
525
+ 'on_bill_cost_ratio': 2.784541829,
526
+ 'tdv_benefit_to_cost_ratio': 2.75,
527
+ 'simple_payback': 9.708831573,
528
+ 'tdv2022_benefit_to_cost_ratio': null
529
+ },
530
+ 'deep': 3,
531
+ 'id': 'policy:container-2459:climateZone-2-PGE:fuel-mixed-fuel',
532
+ 'title': 'Mixed-fuel',
533
+ 'items': null,
534
+ 'is_disabled': true,
535
+ 'is_last': true,
536
+ 'index': '0-0-0-1',
537
+ 'last_deep': true
538
+ }
539
+ ],
540
+ 'is_disabled': true,
541
+ 'is_last': true,
542
+ 'index': '0-0-1',
543
+ 'last_deep': false
439
544
  }
440
545
  ],
441
546
  'is_disabled': false,
@@ -0,0 +1,17 @@
1
+ import PsTagScope from '../components/badges-and-tags/PsTagScope.vue'
2
+ export default {
3
+ title: 'Badges & Tags/Tags/Tag Scope',
4
+ component: PsTagScope,
5
+ }
6
+
7
+ const defaultTemplate = (args, {argTypes}) => ({
8
+ props: Object.keys(argTypes),
9
+ components: { PsTagScope },
10
+ template: `
11
+ <div style='padding: 20px;'>
12
+ <PsTagScope v-bind="$props"/>
13
+ </div>
14
+ `
15
+ })
16
+
17
+ export const TagScope = defaultTemplate.bind({})
@@ -1,6 +1,6 @@
1
1
  import PsToast from '../components/notifications/PsToast.vue'
2
2
  export default {
3
- title: 'Components/Toast',
3
+ title: 'Notifications/Toast',
4
4
  component: PsToast,
5
5
  }
6
6