@policystudio/policy-studio-ui-vue 1.1.90-beta.0 → 1.1.90-beta.12
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/.eslintrc.js +12 -8
- package/.storybook/PolicyStudio.ts +11 -0
- package/.storybook/manager.ts +7 -0
- package/dist/contents/ComparisonData.js +376 -0
- package/dist/contents/ComparisonData.js.map +1 -0
- package/dist/contents/FlexibleData.js +501 -0
- package/dist/contents/FlexibleData.js.map +1 -0
- package/dist/contents/ResultsData.js +530 -0
- package/dist/contents/ResultsData.js.map +1 -0
- package/dist/css/psui_styles.css +4035 -110277
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/stories/Accordion.stories.js +56 -0
- package/dist/stories/Accordion.stories.js.map +1 -0
- package/dist/stories/BadgeWithIcon.stories.js +28 -0
- package/dist/stories/BadgeWithIcon.stories.js.map +1 -0
- package/dist/stories/BarChart.stories.js +16 -0
- package/dist/stories/BarChart.stories.js.map +1 -0
- package/dist/stories/Breadcrumb.stories.js +21 -0
- package/dist/stories/Breadcrumb.stories.js.map +1 -0
- package/dist/stories/Button.stories.js +44 -0
- package/dist/stories/Button.stories.js.map +1 -0
- package/dist/stories/CardInfos.stories.js +13 -0
- package/dist/stories/CardInfos.stories.js.map +1 -0
- package/dist/stories/ChartLegend.stories.js +13 -0
- package/dist/stories/ChartLegend.stories.js.map +1 -0
- package/dist/stories/Checkbox.stories.js +44 -0
- package/dist/stories/Checkbox.stories.js.map +1 -0
- package/dist/stories/CheckboxSimple.stories.js +48 -0
- package/dist/stories/CheckboxSimple.stories.js.map +1 -0
- package/dist/stories/Chips.stories.js +27 -0
- package/dist/stories/Chips.stories.js.map +1 -0
- package/dist/stories/ClimateZoneBadge.stories.js +15 -0
- package/dist/stories/ClimateZoneBadge.stories.js.map +1 -0
- package/dist/stories/CostEffectBar.stories.js +21 -0
- package/dist/stories/CostEffectBar.stories.js.map +1 -0
- package/dist/stories/Datatable.stories.js +45 -0
- package/dist/stories/Datatable.stories.js.map +1 -0
- package/dist/stories/DateCardInfo.stories.js +18 -0
- package/dist/stories/DateCardInfo.stories.js.map +1 -0
- package/dist/stories/Dialog.stories.js +127 -0
- package/dist/stories/Dialog.stories.js.map +1 -0
- package/dist/stories/Draggable.stories.js +20 -0
- package/dist/stories/Draggable.stories.js.map +1 -0
- package/dist/stories/Dropdown.stories.js +98 -0
- package/dist/stories/Dropdown.stories.js.map +1 -0
- package/dist/stories/DropdownList.stories.js +208 -0
- package/dist/stories/DropdownList.stories.js.map +1 -0
- package/dist/stories/Header.stories.js +39 -0
- package/dist/stories/Header.stories.js.map +1 -0
- package/dist/stories/HighlightRippleDot.stories.js +13 -0
- package/dist/stories/HighlightRippleDot.stories.js.map +1 -0
- package/dist/stories/Icon.stories.js +19 -0
- package/dist/stories/Icon.stories.js.map +1 -0
- package/dist/stories/InlineSelector.stories.js +16 -0
- package/dist/stories/InlineSelector.stories.js.map +1 -0
- package/dist/stories/Input.stories.js +235 -0
- package/dist/stories/Input.stories.js.map +1 -0
- package/dist/stories/InputSelect.stories.js +28 -0
- package/dist/stories/InputSelect.stories.js.map +1 -0
- package/dist/stories/InputTextArea.stories.js +23 -0
- package/dist/stories/InputTextArea.stories.js.map +1 -0
- package/dist/stories/MiniTag.stories.js +44 -0
- package/dist/stories/MiniTag.stories.js.map +1 -0
- package/dist/stories/Playground.stories.js +14 -0
- package/dist/stories/Playground.stories.js.map +1 -0
- package/dist/stories/ProgressBar.stories.js +21 -0
- package/dist/stories/ProgressBar.stories.js.map +1 -0
- package/dist/stories/RadioButton.stories.js +36 -0
- package/dist/stories/RadioButton.stories.js.map +1 -0
- package/dist/stories/RadioButtonSimple.stories.js +40 -0
- package/dist/stories/RadioButtonSimple.stories.js.map +1 -0
- package/dist/stories/SimpleAlert.stories.js +19 -0
- package/dist/stories/SimpleAlert.stories.js.map +1 -0
- package/dist/stories/Slider.stories.js +70 -0
- package/dist/stories/Slider.stories.js.map +1 -0
- package/dist/stories/Switch.stories.js +35 -0
- package/dist/stories/Switch.stories.js.map +1 -0
- package/dist/stories/TabHeader.stories.js +48 -0
- package/dist/stories/TabHeader.stories.js.map +1 -0
- package/dist/stories/TableResults.stories.js +717 -0
- package/dist/stories/TableResults.stories.js.map +1 -0
- package/dist/stories/TagScope.stories.js +16 -0
- package/dist/stories/TagScope.stories.js.map +1 -0
- package/dist/stories/TestimonialCard.stories.js +24 -0
- package/dist/stories/TestimonialCard.stories.js.map +1 -0
- package/dist/stories/Toast.stories.js +51 -0
- package/dist/stories/Toast.stories.js.map +1 -0
- package/dist/stories/Toggle.stories.js +42 -0
- package/dist/stories/Toggle.stories.js.map +1 -0
- package/dist/stories/Tooltip.stories.js +108 -0
- package/dist/stories/Tooltip.stories.js.map +1 -0
- package/dist/util/GeneralFunctions.js +29 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/package.json +25 -22
- package/postcss.config.js +1 -1
- package/src/App.vue +30 -0
- package/src/assets/scss/base.scss +27 -23
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +3 -3
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +1 -1
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +2 -1
- package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
- package/src/components/buttons/PsButton.vue +74 -96
- package/src/{index.js → index.ts} +4 -0
- package/src/shims-vue.d.ts +11 -0
- package/src/stories/{Accordion.stories.js → Accordion.stories.ts} +2 -2
- package/src/stories/{BadgeWithIcon.stories.js → BadgeWithIcon.stories.ts} +1 -1
- package/src/stories/{BarChart.stories.js → BarChart.stories.ts} +1 -1
- package/src/stories/{Breadcrumb.stories.js → Breadcrumb.stories.ts} +1 -4
- package/src/stories/{CardInfos.stories.js → CardInfos.stories.ts} +1 -2
- package/src/stories/{ChartLegend.stories.js → ChartLegend.stories.ts} +1 -2
- package/src/stories/{Checkbox.stories.js → Checkbox.stories.ts} +1 -1
- package/src/stories/{CheckboxSimple.stories.js → CheckboxSimple.stories.ts} +1 -1
- package/src/stories/{Chips.stories.js → Chips.stories.ts} +24 -22
- package/src/stories/{ClimateZoneBadge.stories.js → ClimateZoneBadge.stories.ts} +2 -1
- package/src/stories/{CostEffectBar.stories.js → CostEffectBar.stories.ts} +2 -1
- package/src/stories/{Datatable.stories.js → Datatable.stories.ts} +5 -2
- package/src/stories/{DateCardInfo.stories.js → DateCardInfo.stories.ts} +1 -5
- package/src/stories/{Dialog.stories.js → Dialog.stories.ts} +1 -1
- package/src/stories/{Draggable.stories.js → Draggable.stories.ts} +2 -1
- package/src/stories/{Dropdown.stories.js → Dropdown.stories.ts} +2 -1
- package/src/stories/{DropdownList.stories.js → DropdownList.stories.ts} +3 -1
- package/src/stories/{Header.stories.js → Header.stories.ts} +1 -0
- package/src/stories/{HighlightRippleDot.stories.js → HighlightRippleDot.stories.ts} +2 -1
- package/src/stories/{Icon.stories.js → Icon.stories.ts} +2 -0
- package/src/stories/{InlineSelector.stories.js → InlineSelector.stories.ts} +1 -1
- package/src/stories/{Input.stories.js → Input.stories.ts} +6 -3
- package/src/stories/{InputSelect.stories.js → InputSelect.stories.ts} +2 -1
- package/src/stories/{InputTextArea.stories.js → InputTextArea.stories.ts} +1 -1
- package/src/stories/{MiniTag.stories.js → MiniTag.stories.ts} +8 -1
- package/src/stories/{Playground.stories.js → Playground.stories.ts} +1 -1
- package/src/stories/{ProgressBar.stories.js → ProgressBar.stories.ts} +2 -1
- package/src/stories/{RadioButton.stories.js → RadioButton.stories.ts} +1 -1
- package/src/stories/{RadioButtonSimple.stories.js → RadioButtonSimple.stories.ts} +1 -1
- package/src/stories/{SimpleAlert.stories.js → SimpleAlert.stories.ts} +2 -1
- package/src/stories/{Slider.stories.js → Slider.stories.ts} +5 -1
- package/src/stories/{Switch.stories.js → Switch.stories.ts} +1 -1
- package/src/stories/{TabHeader.stories.js → TabHeader.stories.ts} +5 -0
- package/src/stories/{TableResults.stories.js → TableResults.stories.ts} +5 -1
- package/src/stories/{TagScope.stories.js → TagScope.stories.ts} +1 -1
- package/src/stories/{TestimonialCard.stories.js → TestimonialCard.stories.ts} +2 -2
- package/src/stories/{Toast.stories.js → Toast.stories.ts} +1 -1
- package/src/stories/{Toggle.stories.js → Toggle.stories.ts} +6 -3
- package/src/stories/{Tooltip.stories.js → Tooltip.stories.ts} +3 -3
- package/src/util/{GeneralFunctions.js → GeneralFunctions.ts} +7 -6
- package/src/util/{imageLoader.js → imageLoader.ts} +15 -7
- package/tailwind.config.js +11 -2
- package/tsconfig.json +47 -0
- package/webpack.config.js +17 -3
- package/.storybook/PolicyStudio.js +0 -10
- package/.storybook/manager.js +0 -6
- package/babel.config.js +0 -17
- /package/.storybook/{eventBus.js → eventBus.ts} +0 -0
- /package/.storybook/{main.js → main.ts} +0 -0
- /package/.storybook/{preview.js → preview.ts} +0 -0
- /package/src/contents/{ComparisonData.js → ComparisonData.ts} +0 -0
- /package/src/contents/{FlexibleData.js → FlexibleData.ts} +0 -0
- /package/src/contents/{ResultsData.js → ResultsData.ts} +0 -0
- /package/src/stories/{Button.stories.js → Button.stories.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.psui-el-progress-bar {
|
|
3
|
-
@apply
|
|
3
|
+
@apply psui-relative psui-h-2 psui-rounded-full psui-bg-red-10;
|
|
4
4
|
width: 100px;
|
|
5
5
|
|
|
6
6
|
&.is-breakeven {
|
|
7
|
-
@apply
|
|
7
|
+
@apply psui-bg-blue-20;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
&-percentage {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&-divider {
|
|
19
|
-
@apply
|
|
19
|
+
@apply psui-absolute psui-rounded-full psui-z-auto psui-bg-gray-30;
|
|
20
20
|
width: 2px; height: 14px;
|
|
21
21
|
top: -3px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&-value {
|
|
25
|
-
@apply
|
|
25
|
+
@apply psui-h-2 psui-rounded-tl-full psui-rounded-bl-full;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@keyframes animate-stripes {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.psui-el-testimonial {
|
|
3
|
-
@apply psui-relative psui-bg-white psui-shadow-elevation-5 psui-flex psui-flex-col psui-rounded-lg w-full;
|
|
3
|
+
@apply psui-relative psui-bg-white psui-shadow-elevation-5 psui-flex psui-flex-col psui-rounded-lg psui-w-full;
|
|
4
4
|
padding: 56px 42px 40px 32px;
|
|
5
5
|
|
|
6
6
|
&-icon {
|
|
@@ -6,127 +6,105 @@
|
|
|
6
6
|
class="psui-el-button"
|
|
7
7
|
:class="[getComponentClass, {'hover': isHover}, {'disabled': disabled || loading }]"
|
|
8
8
|
>
|
|
9
|
-
<svg
|
|
9
|
+
<svg
|
|
10
10
|
v-if="loading"
|
|
11
11
|
class="psui-animate-spin psui-mr-3 psui-h-5 psui-w-5 psui-text-black"
|
|
12
12
|
:class="`${iconPosition == 'left' ? 'psui-mr-3' : 'psui-ml-3 psui--mr-1'}`"
|
|
13
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
-
fill="none"
|
|
15
|
-
viewBox="0 0 24 24"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
fill="none"
|
|
15
|
+
viewBox="0 0 24 24"
|
|
16
16
|
>
|
|
17
|
-
<circle
|
|
18
|
-
class="psui-opacity-25"
|
|
19
|
-
cx="12"
|
|
20
|
-
cy="12"
|
|
21
|
-
r="10"
|
|
22
|
-
stroke="currentColor"
|
|
23
|
-
stroke-width="4"
|
|
17
|
+
<circle
|
|
18
|
+
class="psui-opacity-25"
|
|
19
|
+
cx="12"
|
|
20
|
+
cy="12"
|
|
21
|
+
r="10"
|
|
22
|
+
stroke="currentColor"
|
|
23
|
+
stroke-width="4"
|
|
24
24
|
/>
|
|
25
|
-
<path
|
|
26
|
-
class="psui-opacity-75"
|
|
27
|
-
fill="currentColor"
|
|
28
|
-
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
25
|
+
<path
|
|
26
|
+
class="psui-opacity-75"
|
|
27
|
+
fill="currentColor"
|
|
28
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
29
29
|
/>
|
|
30
30
|
</svg>
|
|
31
|
-
<i
|
|
32
|
-
v-else-if="icon"
|
|
33
|
-
:class="iconClass"
|
|
34
|
-
class="material-icons-round"
|
|
31
|
+
<i
|
|
32
|
+
v-else-if="icon"
|
|
33
|
+
:class="iconClass"
|
|
34
|
+
class="material-icons-round"
|
|
35
35
|
>{{ icon }}</i>
|
|
36
36
|
<span v-if="label">{{ label }}</span>
|
|
37
37
|
</button>
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
|
-
<script>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
import { PropType, computed, ref } from 'vue'
|
|
42
|
+
|
|
43
|
+
const isHover = ref(false)
|
|
44
|
+
|
|
45
|
+
const emit = defineEmits(['click'])
|
|
46
|
+
|
|
47
|
+
const props = defineProps({
|
|
46
48
|
label: {
|
|
47
49
|
type: String,
|
|
50
|
+
default: ''
|
|
48
51
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*/
|
|
52
|
-
layout: {
|
|
53
|
-
type: String,
|
|
52
|
+
layout:{
|
|
53
|
+
type: String as PropType<'solid' | 'outline' | 'ghost' | 'onlytext' | 'caution'>,
|
|
54
54
|
default: 'solid',
|
|
55
|
-
validator: (value) => ['solid','outline','ghost','onlytext','caution'].includes(value)
|
|
55
|
+
validator: (value:string) => ['solid','outline','ghost','onlytext','caution'].includes(value)
|
|
56
56
|
},
|
|
57
|
-
/**
|
|
58
|
-
* It sets the text key which will retrieve a icon from Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
59
|
-
*/
|
|
60
57
|
icon: {
|
|
61
58
|
type: String,
|
|
59
|
+
default: ''
|
|
62
60
|
},
|
|
63
|
-
|
|
64
|
-
* It sets the position of the icon. eg: left or right.
|
|
65
|
-
*/
|
|
66
|
-
iconPosition:{
|
|
61
|
+
iconPosition: {
|
|
67
62
|
type: String,
|
|
68
63
|
default: 'left',
|
|
69
|
-
validator: (value) => ['left','right'].includes(value)
|
|
64
|
+
validator: (value:string) => ['left','right'].includes(value)
|
|
70
65
|
},
|
|
71
|
-
/**
|
|
72
|
-
* It sets the size of the icon. eg: small, medium and big.
|
|
73
|
-
*/
|
|
74
66
|
size: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
methods: {
|
|
115
|
-
onClick() {
|
|
116
|
-
if (this.disabled) return
|
|
117
|
-
this.$emit('click')
|
|
118
|
-
},
|
|
119
|
-
onMouseEnter(){
|
|
120
|
-
if(!this.disabled){
|
|
121
|
-
this.isHover = true
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
onMouseLeave(){
|
|
125
|
-
if(!this.disabled){
|
|
126
|
-
this.isHover = false
|
|
127
|
-
}
|
|
67
|
+
type: String,
|
|
68
|
+
default: 'big',
|
|
69
|
+
validator: (value:string) => ['small','medium','big'].includes(value)
|
|
70
|
+
},
|
|
71
|
+
disabled: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
75
|
+
loading: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
78
|
+
},
|
|
79
|
+
iconClass:{
|
|
80
|
+
type: String,
|
|
81
|
+
default: ''
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
const getComponentClass = computed(()=>{
|
|
86
|
+
if(props.icon){
|
|
87
|
+
return `layout-${props.layout} size-${props.size} icon-${props.iconPosition}`
|
|
88
|
+
} else {
|
|
89
|
+
return `layout-${props.layout} size-${props.size}`
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const onClick = () => {
|
|
94
|
+
if (props.disabled) return
|
|
95
|
+
emit('click')
|
|
96
|
+
}
|
|
97
|
+
const onMouseEnter = () => {
|
|
98
|
+
if(!props.disabled){
|
|
99
|
+
isHover.value = true
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const onMouseLeave = () => {
|
|
104
|
+
if(!props.disabled){
|
|
105
|
+
isHover.value = false
|
|
128
106
|
}
|
|
129
107
|
}
|
|
130
|
-
|
|
108
|
+
|
|
131
109
|
</script>
|
|
132
110
|
|
|
@@ -50,6 +50,7 @@ import PsBreadcrumb from './components/navigations/PsBreadcrumb.vue'
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
export default {
|
|
53
|
+
// @ts-ignore
|
|
53
54
|
install(Vue) {
|
|
54
55
|
Vue.component('PsButton', PsButton)
|
|
55
56
|
Vue.component('PsCheckbox', PsCheckbox)
|
|
@@ -99,7 +100,9 @@ export default {
|
|
|
99
100
|
|
|
100
101
|
|
|
101
102
|
Vue.directive('click-outside', {
|
|
103
|
+
// @ts-ignore
|
|
102
104
|
bind: function (el, binding, vnode) {
|
|
105
|
+
// @ts-ignore
|
|
103
106
|
el.clickOutsideEvent = function (event) {
|
|
104
107
|
// here I check that click was outside the el and his children
|
|
105
108
|
if (!(el == event.target || el.contains(event.target))) {
|
|
@@ -109,6 +112,7 @@ export default {
|
|
|
109
112
|
}
|
|
110
113
|
document.body.addEventListener('click', el.clickOutsideEvent)
|
|
111
114
|
},
|
|
115
|
+
// @ts-ignore
|
|
112
116
|
unbind: function (el) {
|
|
113
117
|
document.body.removeEventListener('click', el.clickOutsideEvent)
|
|
114
118
|
},
|
|
@@ -8,8 +8,8 @@ export default {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
export const Index = (args, { argTypes }) => ({
|
|
12
|
-
props: Object.keys(argTypes, args),
|
|
11
|
+
export const Index = (args:any, { argTypes }: { argTypes:any }) => ({
|
|
12
|
+
props: Object.keys({argTypes, args}),
|
|
13
13
|
components: { PsAccordion, PsAccordionItem },
|
|
14
14
|
template:
|
|
15
15
|
`
|
|
@@ -11,7 +11,7 @@ const items = [
|
|
|
11
11
|
{ title: '4th level', route: '' },
|
|
12
12
|
]
|
|
13
13
|
|
|
14
|
-
const Template = (args, { argTypes }) => ({
|
|
14
|
+
const Template = (args:any, { argTypes }:{argTypes:any}) => ({
|
|
15
15
|
props: Object.keys(argTypes),
|
|
16
16
|
components: { PsBreadcrumb },
|
|
17
17
|
template: `
|
|
@@ -20,6 +20,3 @@ const Template = (args, { argTypes }) => ({
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
export const Default = Template.bind({})
|
|
23
|
-
Default.args = {
|
|
24
|
-
items: items,
|
|
25
|
-
}
|
|
@@ -6,11 +6,10 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
10
10
|
props: Object.keys(argTypes),
|
|
11
11
|
components: { PsCardInfos },
|
|
12
12
|
template: '<PsCardInfos v-bind="$props" />',
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
export const CardInfos = Template.bind({})
|
|
16
|
-
CardInfos.args = {}
|
|
@@ -6,11 +6,10 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
+
const Template = (args:any, { argTypes } : { argTypes:any }) => ({
|
|
10
10
|
props: Object.keys(argTypes),
|
|
11
11
|
components: { PsChartLegend },
|
|
12
12
|
template: '<PsChartLegend v-bind="$props" />',
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
export const ChartLegend = Template.bind({})
|
|
16
|
-
ChartLegend.args = {}
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import PsChips from '../components/chips/PsChips.vue'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import * as HeaderStories from '../stories/Header.stories'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof PsChips> = {
|
|
7
|
+
component: PsChips
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
export default meta
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<typeof PsChips>
|
|
13
|
+
|
|
14
|
+
export const Primary: Story = {
|
|
15
|
+
render: (args) => ({
|
|
16
|
+
components: { PsChips },
|
|
17
|
+
setup(){
|
|
18
|
+
return { args }
|
|
19
|
+
},
|
|
20
|
+
template: `<div style="display:flex; gap: 10px;">
|
|
19
21
|
<PsChips v-bind='$props' label="Simple chips with icons" type="button" layout="with-icon" icon="home" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
20
22
|
<PsChips v-bind='$props' label="Radio chips" type="radio" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
21
23
|
<PsChips v-bind='$props' label="Checkbox chips" type="checkbox" @update:checked='isCheckedTwo = $event' :checked='isCheckedTwo'/>
|
|
22
24
|
<PsChips v-bind='$props' label="Rich chips" type="button" layout="rich" icon="text_snippet" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
23
25
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
26
|
+
`,
|
|
27
|
+
args:{
|
|
28
|
+
label: 'Simple Chip',
|
|
29
|
+
icon:'',
|
|
30
|
+
...HeaderStories.LoggedIn.args
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
}
|
|
@@ -5,13 +5,14 @@ export default {
|
|
|
5
5
|
component: PsClimateZoneBadge,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const Template = (args, { argTypes }) => ({
|
|
8
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsClimateZoneBadge },
|
|
11
11
|
template: '<PsClimateZoneBadge v-bind="$props" />',
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
export const ClimateZoneBadge = Template.bind({})
|
|
15
|
+
// @ts-ignore
|
|
15
16
|
ClimateZoneBadge.args = {
|
|
16
17
|
icon: 'area_chart',
|
|
17
18
|
}
|
|
@@ -13,11 +13,12 @@ export default {
|
|
|
13
13
|
},
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const Template = (args, { argTypes }) => ({
|
|
16
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
17
17
|
props: Object.keys(argTypes),
|
|
18
18
|
components: { PsCostEffectBar },
|
|
19
19
|
template: '<PsCostEffectBar v-bind="$props" />',
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
export const SimpleProgressBar = Template.bind({})
|
|
23
|
+
// @ts-ignore
|
|
23
24
|
SimpleProgressBar.args = {}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-ignore
|
|
1
2
|
import PsDataTable, { alignment } from '../components/datatable/PsDataTable.vue'
|
|
2
3
|
import PsDataTableItem from '../components/datatable/PsDataTableItem.vue'
|
|
3
4
|
|
|
@@ -10,7 +11,7 @@ export default {
|
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const Template = (args, { argTypes }) => ({
|
|
14
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
14
15
|
props: Object.keys(argTypes),
|
|
15
16
|
components: {PsDataTable},
|
|
16
17
|
template: `
|
|
@@ -20,7 +21,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
20
21
|
`
|
|
21
22
|
})
|
|
22
23
|
|
|
23
|
-
const RichTemplate = (args, { argTypes } ) => ({
|
|
24
|
+
const RichTemplate = (args:any, { argTypes }:{ argTypes:any } ) => ({
|
|
24
25
|
props: Object.keys(argTypes),
|
|
25
26
|
components: {PsDataTable, PsDataTableItem},
|
|
26
27
|
template: `
|
|
@@ -34,6 +35,7 @@ const RichTemplate = (args, { argTypes } ) => ({
|
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
export const Simple = Template.bind({})
|
|
38
|
+
// @ts-ignore
|
|
37
39
|
Simple.args = {
|
|
38
40
|
header: ['year', 'month', 'sale'],
|
|
39
41
|
data: [{ year: '1992', month: '12', sale: '1000.00' }, { year: '1989', month: '02', sale: '1200.00' }],
|
|
@@ -42,6 +44,7 @@ Simple.args = {
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
export const Rich = RichTemplate.bind({})
|
|
47
|
+
// @ts-ignore
|
|
45
48
|
Rich.args = {
|
|
46
49
|
header: ['header 1', 'header 2', 'header 3'],
|
|
47
50
|
data:[[ [ 20, -3], [ 20, 2], [ 20, 2] ], { header4: { value: 20, delta: 2}, header5: { value: 20, delta: 2}, header6: { value: 20, delta: 2} }],
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
component: PsDateCardInfo,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const Template = (args,{argTypes}) => ({
|
|
8
|
+
const Template = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components:{PsDateCardInfo},
|
|
11
11
|
template: `
|
|
@@ -18,7 +18,3 @@ export default {
|
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
export const Default = Template.bind({})
|
|
21
|
-
|
|
22
|
-
Default.args = {
|
|
23
|
-
date: '2021/02/23'
|
|
24
|
-
}
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
title: 'Controls & Selectors/Draggable',
|
|
5
5
|
component: PsDraggable
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const Template = (args, {argTypes}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsDraggable },
|
|
@@ -16,6 +16,7 @@ const Template = (args, {argTypes}) => ({
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
export const Component = Template.bind({})
|
|
19
|
+
// @ts-ignore
|
|
19
20
|
Component.args = {
|
|
20
21
|
getColumns: {columnGroups:[{title: 'COST EFFECTIVENESS', columns: [ 'Item 1' , 'Item 2' , 'Item 3', 'Item 4']}, {title: 'PER HOME RESULTS', columns: [ 'Item 1' , 'Item 2' , 'Item 3', 'Item 4']}]},
|
|
21
22
|
module: 'comparison'
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
title: 'Components/Dropdown',
|
|
5
5
|
component: { PsDropdown, PsDropdownList },
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const Template = (args, { argTypes }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsDropdown, PsDropdownList },
|
|
@@ -87,6 +87,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
87
87
|
})
|
|
88
88
|
|
|
89
89
|
export const DropdownMenu = Template.bind({})
|
|
90
|
+
// @ts-ignore
|
|
90
91
|
DropdownMenu.args = {
|
|
91
92
|
items: [
|
|
92
93
|
'Selectable option 01',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-ignore
|
|
1
2
|
import PsDropdownList, { itemStyle } from '../components/forms/PsDropdownList.vue'
|
|
2
3
|
export default {
|
|
3
4
|
title: 'Components/Dropdown/Dropdown List',
|
|
@@ -17,7 +18,7 @@ export default {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
// @ts-ignore
|
|
21
22
|
const Template = (args, { argTypes }) => ({
|
|
22
23
|
props: Object.keys(argTypes),
|
|
23
24
|
components: { PsDropdownList },
|
|
@@ -205,6 +206,7 @@ const studyData = {
|
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
export const DropdownList = Template.bind({})
|
|
209
|
+
// @ts-ignore
|
|
208
210
|
DropdownList.args = {
|
|
209
211
|
items: onlyTextItems,
|
|
210
212
|
study_data: studyData,
|
|
@@ -5,6 +5,7 @@ export default {
|
|
|
5
5
|
component: MyHeader,
|
|
6
6
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
7
7
|
tags: ['autodocs'],
|
|
8
|
+
// @ts-ignore
|
|
8
9
|
render: (args) => ({
|
|
9
10
|
// Components used in your story `template` are defined in the `components` object
|
|
10
11
|
components: {
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
title: 'Badges & Tags/Badges/HighlightRippleDot',
|
|
5
5
|
component: PsHighlightRippleDot,
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const Template = (args, { argTypes }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsHighlightRippleDot },
|
|
@@ -12,4 +12,5 @@ const Template = (args, { argTypes }) => ({
|
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
export const HighlightRippleDot = Template.bind({})
|
|
15
|
+
// @ts-ignore
|
|
15
16
|
HighlightRippleDot.args = {}
|