@policystudio/policy-studio-ui-vue 1.0.99 → 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.
- package/dist/css/psui_styles.css +77 -0
- package/package.json +1 -2
- package/src/assets/scss/base.scss +2 -0
- package/src/assets/scss/components/PsBarChart.scss +17 -0
- package/src/assets/scss/components/PsTagScope.scss +16 -0
- package/src/components/badges-and-tags/PsDateCardInfo.vue +13 -16
- package/src/components/badges-and-tags/PsTagScope.vue +31 -0
- package/src/components/data-graphics/PsBarChart.vue +34 -0
- package/src/index.js +7 -1
- package/src/stories/BadgeWithIcon.stories.js +1 -1
- package/src/stories/BarChart.stories.js +17 -0
- package/src/stories/ChartLegend.stories.js +1 -1
- package/src/stories/Checkbox.stories.js +1 -1
- package/src/stories/CheckboxSimple.stories.js +1 -1
- package/src/stories/ClimateZoneBadge.stories.js +1 -1
- package/src/stories/CostEffectBar.stories.js +1 -1
- package/src/stories/Datatable.stories.js +1 -1
- package/src/stories/DateCardInfo.stories.js +2 -2
- package/src/stories/Dialog.stories.js +1 -1
- package/src/stories/Draggable.stories.js +1 -1
- package/src/stories/HighlightRippleDot.stories.js +1 -2
- package/src/stories/InlineSelector.stories.js +6 -6
- package/src/stories/Input.stories.js +1 -1
- package/src/stories/InputSelect.stories.js +2 -2
- package/src/stories/InputTextArea.stories.js +16 -16
- package/src/stories/MiniTag.stories.js +1 -1
- package/src/stories/ProgressBar.stories.js +1 -1
- package/src/stories/RadioButton.stories.js +1 -1
- package/src/stories/RadioButtonSimple.stories.js +1 -1
- package/src/stories/Switch.stories.js +1 -1
- package/src/stories/TableResults.stories.js +1 -1
- package/src/stories/TagScope.stories.js +17 -0
- package/src/stories/Toast.stories.js +1 -1
package/dist/css/psui_styles.css
CHANGED
|
@@ -3923,6 +3923,83 @@ video {
|
|
|
3923
3923
|
font-weight: 700;
|
|
3924
3924
|
}
|
|
3925
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
|
+
|
|
3926
4003
|
.psui-space-y-0 > :not(template) ~ :not(template){
|
|
3927
4004
|
--space-y-reverse: 0;
|
|
3928
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
|
|
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";
|
|
@@ -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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
|
|
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>
|
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
|
|
|
@@ -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 PsCheckboxSimple from '../components/controls/PsCheckboxSimple.vue'
|
|
2
2
|
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'Text fields & Forms/Inputs V2/Checkbox',
|
|
5
5
|
component: PsCheckboxSimple,
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -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: '
|
|
5
|
+
title: 'Data Tables/DataTable',
|
|
6
6
|
component: PsDataTable,
|
|
7
7
|
subcomponents: { PsDataTableItem },
|
|
8
8
|
argTypes: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import PsHighlightRippleDot from '../components/badges-and-tags/PsHighlightRippleDot.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
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
|
-
|
|
5
|
-
|
|
4
|
+
title: 'Controls & Selectors/InlineSelector',
|
|
5
|
+
component: PsInlineSelector,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const TemplateDefault = (args, {argTypes}) => ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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,8 +1,8 @@
|
|
|
1
1
|
import PsInputSelect from '../components/forms/PsInputSelect.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
5
|
-
|
|
4
|
+
title: 'Text fields & Forms/Input Textarea',
|
|
5
|
+
component: PsInputTextArea,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const Template = (args, {argTypes}) => ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 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: '
|
|
6
|
+
title: 'Data Tables/TableResults',
|
|
7
7
|
component: { PsTableResults, PsTableResultsHead },
|
|
8
8
|
argTypes: {
|
|
9
9
|
onClick: { action: 'clicked' },
|
|
@@ -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({})
|