@policystudio/policy-studio-ui-vue 1.1.90-beta.30 → 1.1.90-beta.32
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_output.css +5679 -6077
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/doc/.nvmrc +1 -0
- package/doc/.storybook/PolicyStudio.ts +11 -0
- package/doc/.storybook/main.ts +27 -0
- package/doc/.storybook/manager.ts +7 -0
- package/doc/.storybook/preview.ts +16 -0
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/doc/shims-vue.d.ts +6 -0
- package/doc/src/assets/images/multifamily-units.svg +10 -0
- package/doc/src/assets/images/policy-studio.svg +15 -0
- package/doc/src/contents/ComparisonData.ts +378 -0
- package/doc/src/contents/FlexibleData.ts +502 -0
- package/doc/src/contents/ResultsData.ts +531 -0
- package/doc/src/stories/Accordion.stories.ts +58 -0
- package/doc/src/stories/BadgeWithIcon.stories.ts +31 -0
- package/doc/src/stories/BarChart.stories.ts +17 -0
- package/doc/src/stories/Breadcrumb.stories.ts +22 -0
- package/doc/src/stories/Button.stories.ts +130 -0
- package/doc/src/stories/CardInfos.stories.ts +15 -0
- package/doc/src/stories/ChartLegend.stories.ts +15 -0
- package/doc/src/stories/Checkbox.stories.ts +45 -0
- package/doc/src/stories/CheckboxSimple.stories.ts +49 -0
- package/doc/src/stories/Chips.stories.ts +30 -0
- package/doc/src/stories/ClimateZoneBadge.stories.ts +18 -0
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/doc/src/stories/Colors.mdx +70 -0
- package/doc/src/stories/CostEffectBar.stories.ts +24 -0
- package/doc/src/stories/Datatable.stories.ts +53 -0
- package/doc/src/stories/DateCardInfo.stories.ts +20 -0
- package/doc/src/stories/Dialog.stories.ts +131 -0
- package/doc/src/stories/Draggable.stories.ts +23 -0
- package/doc/src/stories/Dropdown.stories.ts +100 -0
- package/doc/src/stories/DropdownList.stories.ts +213 -0
- package/doc/src/stories/ElevationSystem.mdx +41 -0
- package/doc/src/stories/HighlightRippleDot.stories.ts +16 -0
- package/doc/src/stories/Icon.stories.ts +23 -0
- package/doc/src/stories/InlineSelector.stories.ts +18 -0
- package/doc/src/stories/Input.stories.ts +243 -0
- package/doc/src/stories/InputSelect.stories.ts +31 -0
- package/doc/src/stories/InputTextArea.stories.ts +25 -0
- package/doc/src/stories/Introduction.mdx +211 -0
- package/doc/src/stories/MiniTag.stories.ts +59 -0
- package/doc/src/stories/ProgressBar.stories.ts +24 -0
- package/doc/src/stories/RadioButton.stories.ts +40 -0
- package/doc/src/stories/RadioButtonSimple.stories.ts +43 -0
- package/doc/src/stories/SimpleAlert.stories.ts +22 -0
- package/doc/src/stories/Slider.stories.ts +79 -0
- package/doc/src/stories/Switch.stories.ts +39 -0
- package/doc/src/stories/TabHeader.stories.ts +57 -0
- package/doc/src/stories/TableResults.stories.ts +728 -0
- package/doc/src/stories/TagScope.stories.ts +18 -0
- package/doc/src/stories/TestimonialCard.stories.ts +27 -0
- package/doc/src/stories/Toast.stories.ts +52 -0
- package/doc/src/stories/Toggle.stories.ts +48 -0
- package/doc/src/stories/Tooltip.stories.ts +114 -0
- package/doc/src/stories/Typography.mdx +212 -0
- package/doc/src/stories/assets/code-brackets.svg +1 -0
- package/doc/src/stories/assets/colors.svg +1 -0
- package/doc/src/stories/assets/comments.svg +1 -0
- package/doc/src/stories/assets/direction.svg +1 -0
- package/doc/src/stories/assets/flow.svg +1 -0
- package/doc/src/stories/assets/plugin.svg +1 -0
- package/doc/src/stories/assets/repo.svg +1 -0
- package/doc/src/stories/assets/stackalt.svg +1 -0
- package/doc/tsconfig.json +17 -0
- package/package.json +7 -3
- package/scripts/gulp.js +11 -0
- package/src/assets/scss/base.scss +3 -34
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsCollapse.css +74 -0
- package/src/components/collapse/PsCollapse.vue +121 -0
- package/src/index.ts +4 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import PsButton, { sizes } from '../../../src/components/buttons/PsButton.vue'
|
|
2
|
+
const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Button',
|
|
5
|
+
component: PsButton,
|
|
6
|
+
argTypes: {
|
|
7
|
+
size: { control: { type: 'select', options: sizes } },
|
|
8
|
+
disabled: { control: 'boolean' },
|
|
9
|
+
icon: { control: { type: 'select', options: icons } },
|
|
10
|
+
iconRight: { control: { type: 'select', options: icons } },
|
|
11
|
+
},
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const TemplateDefault = (args, { argTypes }) => ({
|
|
15
|
+
props: Object.keys(argTypes),
|
|
16
|
+
components: { PsButton },
|
|
17
|
+
template: `
|
|
18
|
+
<div style="display:flex; flex-direction: column;">
|
|
19
|
+
<p>Size: Big</p>
|
|
20
|
+
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
21
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;">
|
|
22
|
+
<span style="text-align: center; color: black;">Solid Style</span>
|
|
23
|
+
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left'/>
|
|
24
|
+
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right'/>
|
|
25
|
+
<PsButton label='Text Only' layout='solid' />
|
|
26
|
+
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled/>
|
|
27
|
+
<PsButton label='Loading Solid' layout='solid' icon='verified' iconPosition='left' loading />
|
|
28
|
+
</div>
|
|
29
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
30
|
+
<span style="text-align: center; color: blue;">Outline Style</span>
|
|
31
|
+
<PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
|
|
32
|
+
<PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
|
|
33
|
+
<PsButton label='Text Only' layout='outline'/>
|
|
34
|
+
<PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
|
|
35
|
+
<PsButton label='Loading Outline' layout='outline' icon='verified' iconPosition='left' loading />
|
|
36
|
+
</div>
|
|
37
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
38
|
+
<span style="text-align: center; color: brown;">Ghost Style</span>
|
|
39
|
+
<PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
|
|
40
|
+
<PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
|
|
41
|
+
<PsButton label='Text Only' layout='ghost' />
|
|
42
|
+
<PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
|
|
43
|
+
<PsButton label='Loading Ghost' layout='ghost' icon='verified' iconPosition='left' loading />
|
|
44
|
+
</div>
|
|
45
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
46
|
+
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
47
|
+
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
|
|
48
|
+
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
|
|
49
|
+
<PsButton label='Text Only' layout='onlytext'/>
|
|
50
|
+
<PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
|
|
51
|
+
<PsButton label='Loading Only-Text' layout='onlytext' icon='verified' iconPosition='left' loading />
|
|
52
|
+
</div>
|
|
53
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
54
|
+
<span style="text-align: center; color: red;">Caution Button</span>
|
|
55
|
+
<PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left'/>
|
|
56
|
+
<PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right'/>
|
|
57
|
+
<PsButton label='Text Only' layout='caution' />
|
|
58
|
+
<PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled/>
|
|
59
|
+
<PsButton label='Loading Caution' layout='caution' icon='verified' iconPosition='left' loading />
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
<p>Size: Medium</p>
|
|
65
|
+
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
66
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
67
|
+
<span style="text-align: center; color: black;">Solid Style</span>
|
|
68
|
+
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
|
|
69
|
+
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
|
|
70
|
+
<PsButton label='Text Only' layout='solid' size='medium'/>
|
|
71
|
+
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
72
|
+
</div>
|
|
73
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
74
|
+
<span style="text-align: center; color: blue;">Outline Style</span>
|
|
75
|
+
<PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
|
|
76
|
+
<PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
|
|
77
|
+
<PsButton label='Text Only' layout='outline' size='medium'/>
|
|
78
|
+
<PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
79
|
+
</div>
|
|
80
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
81
|
+
<span style="text-align: center; color: brown;">Ghost Style</span>
|
|
82
|
+
<PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
|
|
83
|
+
<PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
|
|
84
|
+
<PsButton label='Text Only' layout='ghost' size='medium'/>
|
|
85
|
+
<PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
86
|
+
</div>
|
|
87
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
88
|
+
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
89
|
+
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
|
|
90
|
+
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
|
|
91
|
+
<PsButton label='Text Only' layout='onlytext' size='medium'/>
|
|
92
|
+
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
|
|
93
|
+
</div>
|
|
94
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
95
|
+
<span style="text-align: center; color: red;">Caution Button</span>
|
|
96
|
+
<PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='medium'/>
|
|
97
|
+
<PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='medium'/>
|
|
98
|
+
<PsButton label='Text Only' layout='caution' size='medium'/>
|
|
99
|
+
<PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled size='medium'/>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<p>Size: Small</p>
|
|
103
|
+
<div style="display: flex; flex-direction: column; gap: 10px;">
|
|
104
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
105
|
+
<span style="text-align: center; color: black;">Solid Style</span>
|
|
106
|
+
<PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
|
|
107
|
+
<PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
|
|
108
|
+
<PsButton label='Text Only' layout='solid' size='small'/>
|
|
109
|
+
<PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
|
|
110
|
+
</div>
|
|
111
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
112
|
+
<span style="text-align: center; color: green;">Only-Text Style</span>
|
|
113
|
+
<PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
|
|
114
|
+
<PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
|
|
115
|
+
<PsButton label='Text Only' layout='onlytext' size='small'/>
|
|
116
|
+
<PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
|
|
117
|
+
</div>
|
|
118
|
+
<div style="display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
|
|
119
|
+
<span style="text-align: center; color: red;">Caution Button</span>
|
|
120
|
+
<PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='small'/>
|
|
121
|
+
<PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='small'/>
|
|
122
|
+
<PsButton label='Text Only' layout='caution' size='small'/>
|
|
123
|
+
<PsButton label='Disabled' layout='caution' disabled icon='verified' iconPosition='left' size='small'/>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
`,
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
export const Default = TemplateDefault.bind({})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import PsCardInfos from '../../../src/components/badges-and-tags/PsCardInfos.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/CardInfos',
|
|
5
|
+
component: PsCardInfos,
|
|
6
|
+
argTypes: {},
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
10
|
+
props: Object.keys(argTypes),
|
|
11
|
+
components: { PsCardInfos },
|
|
12
|
+
template: '<PsCardInfos v-bind="$props" />',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const CardInfos = Template.bind({})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import PsChartLegend from '../../../src/components/badges-and-tags/PsChartLegend.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Badges & Tags/Badges/ChartLegend',
|
|
5
|
+
component: PsChartLegend,
|
|
6
|
+
argTypes: {},
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Template = (args:any, { argTypes } : { argTypes:any }) => ({
|
|
10
|
+
props: Object.keys(argTypes),
|
|
11
|
+
components: { PsChartLegend },
|
|
12
|
+
template: '<PsChartLegend v-bind="$props" />',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const ChartLegend = Template.bind({})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import PsCheckbox from '../../../src/components/controls/PsCheckbox.vue'
|
|
2
|
+
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Controls & Selectors/Checkbox',
|
|
5
|
+
component: PsCheckbox,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsCheckbox},
|
|
11
|
+
template: `
|
|
12
|
+
<div style='display:flex; gap: 20px;'>
|
|
13
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
14
|
+
<p>Resting</p>
|
|
15
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
16
|
+
<PsCheckbox v-bind="$props" label='Label 1' />
|
|
17
|
+
<PsCheckbox v-bind="$props" label='Label 2' size='small' />
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
21
|
+
<p>Active</p>
|
|
22
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
23
|
+
<PsCheckbox v-bind="$props" label='Label 3' checked />
|
|
24
|
+
<PsCheckbox v-bind="$props" label='Label 4' checked size='small'/>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
28
|
+
<p>Mixed</p>
|
|
29
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
30
|
+
<PsCheckbox v-bind="$props" label='Label 5' layout='mixed' checked />
|
|
31
|
+
<PsCheckbox v-bind="$props" label='Label 6' layout='mixed' size='small' checked />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
35
|
+
<p>Disabled</p>
|
|
36
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
37
|
+
<PsCheckbox v-bind="$props" label='Label 7' disabled/>
|
|
38
|
+
<PsCheckbox v-bind="$props" label='Label 8' size='small' disabled/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
`
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
export const Default = defaultTemplate.bind({})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import PsCheckboxSimple from '../../../src/components/controls/PsCheckboxSimple.vue'
|
|
2
|
+
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Text fields & Forms/Inputs V2/Checkbox',
|
|
5
|
+
component: PsCheckboxSimple,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsCheckboxSimple },
|
|
11
|
+
data: () => ({
|
|
12
|
+
checkBox1 : true
|
|
13
|
+
}),
|
|
14
|
+
template: `
|
|
15
|
+
<div style='display:flex; gap: 20px;'>
|
|
16
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
17
|
+
<p>Resting</p>
|
|
18
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
19
|
+
<PsCheckboxSimple :checked="checkBox1" @click="checkBox1 = !checkBox1" label='Label 1' />
|
|
20
|
+
<PsCheckboxSimple v-bind="$props" label='Label 2' size='small' />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
24
|
+
<p>Active</p>
|
|
25
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
26
|
+
<PsCheckboxSimple v-bind="$props" label='Label 3' checked />
|
|
27
|
+
<PsCheckboxSimple v-bind="$props" label='Label 4' checked size='small'/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
31
|
+
<p>Mixed</p>
|
|
32
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
33
|
+
<PsCheckboxSimple v-bind="$props" label='Label 5' layout='mixed' checked />
|
|
34
|
+
<PsCheckboxSimple v-bind="$props" label='Label 6' layout='mixed' size='small' checked />
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
38
|
+
<p>Disabled</p>
|
|
39
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
40
|
+
<PsCheckboxSimple v-bind="$props" label='Input via inputAttrs' :inputAttrs="{ id: 'my-input-id' }" disabled/>
|
|
41
|
+
<PsCheckboxSimple v-bind="$props" label='Input via component id' size='small' id="my-component-id" data-test="test" disabled/>
|
|
42
|
+
<PsCheckboxSimple v-bind="$props" label='Input fallback' size='small' disabled/>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
`
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
export const Default = defaultTemplate.bind({})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import PsChips from '../../../src/components/chips/PsChips.vue'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof PsChips> = {
|
|
5
|
+
component: PsChips
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default meta
|
|
9
|
+
|
|
10
|
+
type Story = StoryObj<typeof PsChips>
|
|
11
|
+
|
|
12
|
+
export const Primary: Story = {
|
|
13
|
+
render: (args) => ({
|
|
14
|
+
components: { PsChips },
|
|
15
|
+
setup(){
|
|
16
|
+
return { args }
|
|
17
|
+
},
|
|
18
|
+
template: `<div style="display:flex; gap: 10px;">
|
|
19
|
+
<PsChips v-bind='$props' label="Simple chips with icons" type="button" layout="with-icon" icon="home" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
20
|
+
<PsChips v-bind='$props' label="Radio chips" type="radio" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
21
|
+
<PsChips v-bind='$props' label="Checkbox chips" type="checkbox" @update:checked='isCheckedTwo = $event' :checked='isCheckedTwo'/>
|
|
22
|
+
<PsChips v-bind='$props' label="Rich chips" type="button" layout="rich" icon="text_snippet" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
args:{
|
|
26
|
+
label: 'Simple Chip',
|
|
27
|
+
icon:'',
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import PsClimateZoneBadge from '../../../src/components/badges-and-tags/PsClimateZoneBadge.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Badges & Tags/Badges/ClimateZoneBadge',
|
|
5
|
+
component: PsClimateZoneBadge,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsClimateZoneBadge },
|
|
11
|
+
template: '<PsClimateZoneBadge v-bind="$props" />',
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export const ClimateZoneBadge = Template.bind({})
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
ClimateZoneBadge.args = {
|
|
17
|
+
icon: 'area_chart',
|
|
18
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import PsCollapse from '../../../src/components/collapse/PsCollapse.vue'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof PsCollapse> = {
|
|
5
|
+
title: 'Collapse/Collapse/Default',
|
|
6
|
+
component: PsCollapse
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default meta
|
|
10
|
+
|
|
11
|
+
type Story = StoryObj<typeof PsCollapse>
|
|
12
|
+
|
|
13
|
+
export const Primary: Story = {
|
|
14
|
+
render: (args) => ({
|
|
15
|
+
components: { PsCollapse },
|
|
16
|
+
setup(){
|
|
17
|
+
return { ...args }
|
|
18
|
+
},
|
|
19
|
+
template: `<div style="width: 150px;">
|
|
20
|
+
<PsCollapse :title="title">
|
|
21
|
+
<template #header-action>
|
|
22
|
+
<span>a</span>
|
|
23
|
+
</template>
|
|
24
|
+
<template #content>
|
|
25
|
+
<PsCollapse :title="title_second" :disabled="true">
|
|
26
|
+
<template #header-action>
|
|
27
|
+
<div>a</div>
|
|
28
|
+
</template>
|
|
29
|
+
<template #content>
|
|
30
|
+
<div style="display: flex; flex-direction: column; padding: 0px 8px;">
|
|
31
|
+
<span>Active</span>
|
|
32
|
+
<span>Resting</span>
|
|
33
|
+
<span>Disabled</span>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
</PsCollapse>
|
|
37
|
+
</template>
|
|
38
|
+
</PsCollapse>
|
|
39
|
+
</div>
|
|
40
|
+
`,
|
|
41
|
+
}),
|
|
42
|
+
args:{
|
|
43
|
+
title: 'First Level',
|
|
44
|
+
title_second: '2nd Level Dis'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {Meta } from '@storybook/addon-docs';
|
|
2
|
+
|
|
3
|
+
<Meta title="Colors" />
|
|
4
|
+
|
|
5
|
+
<style>{`
|
|
6
|
+
.mx-auto { margin: 0 auto; }
|
|
7
|
+
`}</style>
|
|
8
|
+
|
|
9
|
+
# Colors
|
|
10
|
+
Out colors are designed to be harmonious, ensure accessible text, and distinguish UI elements and surfaces from one another. The support colors are used as a visual support to communicate and provide better and more meaningful feedback.
|
|
11
|
+
|
|
12
|
+
## Blue
|
|
13
|
+
<div class="psui-flex">
|
|
14
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue click-to-copy" data-to-copy="psui-bg-blue">Blue <div>#5094D3</div></div>
|
|
15
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-80 click-to-copy" data-to-copy="psui-bg-blue-80">Blue 80 <div>#002A3A</div></div>
|
|
16
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-70 click-to-copy" data-to-copy="psui-bg-blue-70">Blue 70 <div>#00465F</div></div>
|
|
17
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-60 click-to-copy" data-to-copy="psui-bg-blue-60">Blue 60 <div>#318FAC</div></div>
|
|
18
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-50 click-to-copy" data-to-copy="psui-bg-blue-50">Blue 50 <div>#64B5CE</div></div>
|
|
19
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-blue-20 click-to-copy" data-to-copy="psui-bg-blue-20">Blue 20 <div>#E0EFF6</div></div>
|
|
20
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-blue-10 click-to-copy" data-to-copy="psui-bg-blue-10">Blue 10 <div>#ECF7FB</div></div>
|
|
21
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-white click-to-copy" data-to-copy="psui-bg-white">White <div>#FFFFFF</div></div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
## Gray
|
|
25
|
+
<div class="psui-flex">
|
|
26
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-80 click-to-copy" data-to-copy="psui-bg-gray-80">Gray 80 <div>#28323B</div></div>
|
|
27
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-70 click-to-copy" data-to-copy="psui-bg-gray-70">Gray 70 <div>#34404A</div></div>
|
|
28
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-60 click-to-copy" data-to-copy="psui-bg-gray-60">Gray 60 <div>#515E6A</div></div>
|
|
29
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-50 click-to-copy" data-to-copy="psui-bg-gray-50">Gray 50 <div>#798490</div></div>
|
|
30
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-40 click-to-copy" data-to-copy="psui-bg-gray-40">Gray 40 <div>#A2ACB7</div></div>
|
|
31
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-30 click-to-copy" data-to-copy="psui-bg-gray-30">Gray 30 <div>#D6DDE5</div></div>
|
|
32
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-20 click-to-copy" data-to-copy="psui-bg-gray-20">Gray 20 <div>#E6ECF2</div></div>
|
|
33
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-10 click-to-copy" data-to-copy="psui-bg-gray-10">Gray 10 <div>#F3F6F9</div></div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
## Yellow
|
|
37
|
+
<div class="psui-flex">
|
|
38
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-80 click-to-copy" data-to-copy="psui-bg-yellow-80">Yellow 80 <div>#834C0D</div></div>
|
|
39
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-70 click-to-copy" data-to-copy="psui-bg-yellow-70">Yellow 70 <div>#B87305</div></div>
|
|
40
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-20 click-to-copy" data-to-copy="psui-bg-yellow-20">Yellow 20 <div>#EDAB3E</div></div>
|
|
41
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-yellow-20 psui-bg-yellow-10 click-to-copy" data-to-copy="psui-bg-yellow-10">Yellow 10 <div>#FDF3E3</div></div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
## Green
|
|
45
|
+
<div class="psui-flex">
|
|
46
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-80 click-to-copy" data-to-copy="psui-bg-green-80">Green 80 <div>#286943</div></div>
|
|
47
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-70 click-to-copy" data-to-copy="psui-bg-green-70">Green 70 <div>#44A06A</div></div>
|
|
48
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-20 click-to-copy" data-to-copy="psui-bg-green-20">Green 20 <div>#5DB883</div></div>
|
|
49
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-green-20 psui-bg-green-10 click-to-copy" data-to-copy="psui-bg-green-10">Green 10 <div>#DEF8E8</div></div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
## Red
|
|
53
|
+
<div class="psui-flex">
|
|
54
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-80 click-to-copy" data-to-copy="psui-bg-red-80">Red 80 <div>#832F2E</div></div>
|
|
55
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-70 click-to-copy" data-to-copy="psui-bg-red-70">Red 70 <div>#AA3937</div></div>
|
|
56
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-20 click-to-copy" data-to-copy="psui-bg-red-20">Red 20 <div>#D65C5A</div></div>
|
|
57
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-red-20 psui-bg-red-15 click-to-copy" data-to-copy="psui-bg-red-15">Red 15 <div>#EAC5C5</div></div>
|
|
58
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-red-20 psui-bg-red-10 click-to-copy" data-to-copy="psui-bg-red-10">Red 10 <div>#FCEBEB</div></div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
## Chart colors
|
|
62
|
+
<div class="psui-flex">
|
|
63
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-sky click-to-copy" data-to-copy="psui-bg-sky">Sky <div>#518BE2</div></div>
|
|
64
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-teal click-to-copy" data-to-copy="psui-bg-teal">Teal <div>#57C0BA</div></div>
|
|
65
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-emerald click-to-copy" data-to-copy="psui-bg-emerald">Emerald <div>#8CCA82</div></div>
|
|
66
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-mustard click-to-copy" data-to-copy="psui-bg-mustard">Mustard <div>#E9CF74</div></div>
|
|
67
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-orange click-to-copy" data-to-copy="psui-bg-orange">Orange <div>#FF906D</div></div>
|
|
68
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-pink click-to-copy" data-to-copy="psui-bg-pink">Pink <div>#FF77B8</div></div>
|
|
69
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-purple click-to-copy" data-to-copy="psui-bg-purple">Purple <div>#9278C9</div></div>
|
|
70
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PsCostEffectBar from '../../../src/components/badges-and-tags/PsCostEffectBar.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Badges & Tags/Badges/CostEffectBar',
|
|
5
|
+
component: PsCostEffectBar,
|
|
6
|
+
argTypes: {
|
|
7
|
+
value: {
|
|
8
|
+
control: { type: 'number', min: 0, max: 100 },
|
|
9
|
+
},
|
|
10
|
+
breakEven: {
|
|
11
|
+
control: { type: 'number', min: 0, max: 100 },
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
17
|
+
props: Object.keys(argTypes),
|
|
18
|
+
components: { PsCostEffectBar },
|
|
19
|
+
template: '<PsCostEffectBar v-bind="$props" />',
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export const SimpleProgressBar = Template.bind({})
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
SimpleProgressBar.args = {}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import PsDataTable, { alignment } from '../../../src/components/datatable/PsDataTable.vue'
|
|
3
|
+
import PsDataTableItem from '../../../src/components/datatable/PsDataTableItem.vue'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Data Tables/DataTable',
|
|
7
|
+
component: PsDataTable,
|
|
8
|
+
subcomponents: { PsDataTableItem },
|
|
9
|
+
argTypes: {
|
|
10
|
+
align: { control: { type: 'select', options: alignment } },
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
15
|
+
props: Object.keys(argTypes),
|
|
16
|
+
components: {PsDataTable},
|
|
17
|
+
template: `
|
|
18
|
+
<div style="width:400px;">
|
|
19
|
+
<PsDataTable v-bind="$props" />
|
|
20
|
+
</div>
|
|
21
|
+
`
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const RichTemplate = (args:any, { argTypes }:{ argTypes:any } ) => ({
|
|
25
|
+
props: Object.keys(argTypes),
|
|
26
|
+
components: {PsDataTable, PsDataTableItem},
|
|
27
|
+
template: `
|
|
28
|
+
<div style="width:400px">
|
|
29
|
+
<PsDataTable v-bind="$props">
|
|
30
|
+
<PsDataTableItem v-bind="$props"/>
|
|
31
|
+
</PsDataTable>
|
|
32
|
+
</div>
|
|
33
|
+
`
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export const Simple = Template.bind({})
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
Simple.args = {
|
|
40
|
+
header: ['year', 'month', 'sale'],
|
|
41
|
+
data: [{ year: '1992', month: '12', sale: '1000.00' }, { year: '1989', month: '02', sale: '1200.00' }],
|
|
42
|
+
footer: ['Footer 1', 'Footer 2', 'Footer 3'],
|
|
43
|
+
type: 'simple',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const Rich = RichTemplate.bind({})
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
Rich.args = {
|
|
49
|
+
header: ['header 1', 'header 2', 'header 3'],
|
|
50
|
+
data:[[ [ 20, -3], [ 20, 2], [ 20, 2] ], { header4: { value: 20, delta: 2}, header5: { value: 20, delta: 2}, header6: { value: 20, delta: 2} }],
|
|
51
|
+
footer: ['Footer 1', 'Footer 2', 'Footer 3'],
|
|
52
|
+
type: 'rich'
|
|
53
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import PsDateCardInfo from '../../../src/components/badges-and-tags/PsDateCardInfo.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/DateCardInfo',
|
|
5
|
+
component: PsDateCardInfo,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const Template = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
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({})
|