@policystudio/policy-studio-ui-vue 1.1.90-beta.3 → 1.1.90-beta.30
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 +13 -8
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6994 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +104 -0
- package/dist/index.js.map +1 -0
- package/dist/util/GeneralFunctions.d.ts +3 -0
- package/dist/util/GeneralFunctions.js +35 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/directives.d.ts +1 -0
- package/dist/util/directives.js +22 -0
- package/dist/util/directives.js.map +1 -0
- package/dist/util/imageLoader.d.ts +6 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/package.json +24 -37
- package/src/App.vue +30 -0
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/components/accordion/PsAccordionItem.vue +88 -74
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -33
- package/src/components/badges-and-tags/PsCardInfos.vue +39 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +46 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
- package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
- package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
- package/src/components/badges-and-tags/PsTagScope.vue +17 -22
- package/src/components/badges-and-tags/PsTestimonialCard.vue +19 -26
- package/src/components/buttons/PsButton.vue +60 -61
- package/src/components/chips/PsChips.vue +98 -101
- package/src/components/controls/PsCheckbox.vue +84 -84
- package/src/components/controls/PsCheckboxSimple.vue +95 -95
- package/src/components/controls/PsDraggable.vue +53 -55
- package/src/components/controls/PsInlineSelector.vue +98 -99
- package/src/components/controls/PsRadioButton.vue +59 -58
- package/src/components/controls/PsRadioButtonSimple.vue +79 -75
- package/src/components/controls/PsSlider.vue +185 -176
- package/src/components/controls/PsSwitch.vue +51 -52
- package/src/components/controls/PsToggle.vue +52 -50
- package/src/components/data-graphics/PsBarChart.vue +18 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +13 -28
- package/src/components/forms/PsDropdown.vue +165 -162
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +154 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +70 -71
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +27 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +456 -466
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +67 -61
- package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +68 -61
- package/src/components/table-results/PsTableResultsRow.vue +55 -56
- package/src/components/tabs/PsTabHeader.vue +106 -100
- package/src/components/tooltip/PsDialogTooltip.vue +96 -101
- package/src/components/tooltip/PsRichTooltip.vue +41 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +131 -129
- package/src/index.ts +156 -0
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/GeneralFunctions.js +16 -7
- package/src/util/directives.ts +24 -0
- package/src/util/imageLoader.js +14 -7
- package/tailwind.config.js +1 -1
- package/tsconfig.json +47 -0
- package/.storybook/PolicyStudio.js +0 -10
- package/.storybook/eventBus.js +0 -26
- package/.storybook/main.js +0 -21
- package/.storybook/manager.js +0 -6
- package/.storybook/preview.js +0 -17
- package/babel.config.js +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/assets/images/multifamily-units.svg +0 -10
- package/src/assets/images/policy-studio.svg +0 -15
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/contents/ComparisonData.js +0 -378
- package/src/contents/FlexibleData.js +0 -502
- package/src/contents/ResultsData.js +0 -531
- package/src/index.js +0 -166
- package/src/stories/Accordion.stories.js +0 -59
- package/src/stories/BadgeWithIcon.stories.js +0 -31
- package/src/stories/BarChart.stories.js +0 -17
- package/src/stories/Breadcrumb.stories.js +0 -25
- package/src/stories/Button.stories.js +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/CardInfos.stories.js +0 -16
- package/src/stories/ChartLegend.stories.js +0 -16
- package/src/stories/Checkbox.stories.js +0 -45
- package/src/stories/CheckboxSimple.stories.js +0 -49
- package/src/stories/Chips.stories.js +0 -31
- package/src/stories/ClimateZoneBadge.stories.js +0 -17
- package/src/stories/Colors.mdx +0 -70
- package/src/stories/CostEffectBar.stories.js +0 -23
- package/src/stories/Datatable.stories.js +0 -50
- package/src/stories/DateCardInfo.stories.js +0 -24
- package/src/stories/Dialog.stories.js +0 -131
- package/src/stories/Draggable.stories.js +0 -22
- package/src/stories/Dropdown.stories.js +0 -99
- package/src/stories/DropdownList.stories.js +0 -211
- package/src/stories/ElevationSystem.mdx +0 -41
- package/src/stories/Header.stories.js +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/HighlightRippleDot.stories.js +0 -15
- package/src/stories/Icon.stories.js +0 -21
- package/src/stories/InlineSelector.stories.js +0 -18
- package/src/stories/Input.stories.js +0 -240
- package/src/stories/InputSelect.stories.js +0 -30
- package/src/stories/InputTextArea.stories.js +0 -25
- package/src/stories/Introduction.mdx +0 -211
- package/src/stories/MiniTag.stories.js +0 -52
- package/src/stories/Playground.stories.js +0 -16
- package/src/stories/ProgressBar.stories.js +0 -23
- package/src/stories/RadioButton.stories.js +0 -40
- package/src/stories/RadioButtonSimple.stories.js +0 -43
- package/src/stories/SimpleAlert.stories.js +0 -21
- package/src/stories/Slider.stories.js +0 -75
- package/src/stories/Switch.stories.js +0 -39
- package/src/stories/TabHeader.stories.js +0 -52
- package/src/stories/TableResults.stories.js +0 -724
- package/src/stories/TagScope.stories.js +0 -17
- package/src/stories/TestimonialCard.stories.js +0 -27
- package/src/stories/Toast.stories.js +0 -52
- package/src/stories/Toggle.stories.js +0 -45
- package/src/stories/Tooltip.stories.js +0 -114
- package/src/stories/Typography.mdx +0 -212
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -22
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import PsDialog from '../components/notifications/PsDialog.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Notifications/Dialog',
|
|
5
|
-
component: PsDialog,
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const TemplateExamples = (args, { argTypes }) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: { PsDialog },
|
|
11
|
-
template: `
|
|
12
|
-
<div class="psui-grid psui-grid-cols-3 psui-gap-4">
|
|
13
|
-
|
|
14
|
-
<div class="psui-col-span-3 psui-mt-8">
|
|
15
|
-
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Horizontal</h1>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div>
|
|
19
|
-
<h2>Informative</h2>
|
|
20
|
-
<PsDialog theme="informative" layout="horizontal" message="teste">
|
|
21
|
-
<template v-slot:action>
|
|
22
|
-
<p style='font-weight: 700;'>Action</p>
|
|
23
|
-
</template>
|
|
24
|
-
</PsDialog>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<div>
|
|
28
|
-
<h2>Success</h2>
|
|
29
|
-
<PsDialog theme="success" layout="horizontal" :hasClose="false">
|
|
30
|
-
<template>
|
|
31
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
32
|
-
</template>
|
|
33
|
-
<template v-slot:action>
|
|
34
|
-
<p style='font-weight: 700;'>Action</p>
|
|
35
|
-
</template>
|
|
36
|
-
</PsDialog>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div>
|
|
40
|
-
<h2>Alert</h2>
|
|
41
|
-
<PsDialog theme="alert" layout="horizontal">
|
|
42
|
-
<template>
|
|
43
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
44
|
-
</template>
|
|
45
|
-
<template v-slot:action>
|
|
46
|
-
<p style='font-weight: 700;'>Action</p>
|
|
47
|
-
</template>
|
|
48
|
-
</PsDialog>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<div class="psui-col-span-3 psui-mt-8">
|
|
52
|
-
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Vertical</h1>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
<div>
|
|
56
|
-
<h2>Informative</h2>
|
|
57
|
-
<PsDialog theme="informative" layout="vertical">
|
|
58
|
-
<template>
|
|
59
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
60
|
-
</template>
|
|
61
|
-
<template v-slot:action>
|
|
62
|
-
<p style='font-weight: 700;'>Action</p>
|
|
63
|
-
</template>
|
|
64
|
-
</PsDialog>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div class="psui-text-red">
|
|
68
|
-
<h2>Success</h2>
|
|
69
|
-
<PsDialog theme="success" layout="vertical" :hasClose="false">
|
|
70
|
-
<template>
|
|
71
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
72
|
-
</template>
|
|
73
|
-
<template v-slot:action>
|
|
74
|
-
<p style='font-weight: 700;'>Action</p>
|
|
75
|
-
</template>
|
|
76
|
-
</PsDialog>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div>
|
|
80
|
-
<h2>Alert</h2>
|
|
81
|
-
<PsDialog theme="alert" layout="vertical">
|
|
82
|
-
<template>
|
|
83
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
84
|
-
</template>
|
|
85
|
-
<template v-slot:action>
|
|
86
|
-
<p style='font-weight: 700;'>Action</p>
|
|
87
|
-
</template>
|
|
88
|
-
</PsDialog>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
<!-- PSDialog Vertical -->
|
|
94
|
-
<div class="psui-col-span-3 psui-mt-8">
|
|
95
|
-
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Vertical Props Message</h1>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<div>
|
|
99
|
-
<h2>Informative</h2>
|
|
100
|
-
<PsDialog theme="informative" layout="vertical" message="This component uses only the props message!">
|
|
101
|
-
<template v-slot:action>
|
|
102
|
-
<p style='font-weight: 700;'>Action</p>
|
|
103
|
-
</template>
|
|
104
|
-
</PsDialog>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<div>
|
|
108
|
-
<h2>Success</h2>
|
|
109
|
-
<PsDialog theme="success" layout="vertical" message="This component uses only the props message!" :hasClose="false">
|
|
110
|
-
<template v-slot:action>
|
|
111
|
-
<p style='font-weight: 700;'>Action</p>
|
|
112
|
-
</template>
|
|
113
|
-
</PsDialog>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<div>
|
|
117
|
-
<h2>Alert</h2>
|
|
118
|
-
<PsDialog theme="alert" layout="vertical" message="This component uses only the props message!">
|
|
119
|
-
<template v-slot:action>
|
|
120
|
-
<p style='font-weight: 700;'>Action</p>
|
|
121
|
-
</template>
|
|
122
|
-
</PsDialog>
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
</div>
|
|
126
|
-
`,
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
export const Examples = TemplateExamples.bind({})
|
|
130
|
-
|
|
131
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import PsDraggable from '../components/controls/PsDraggable.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Controls & Selectors/Draggable',
|
|
5
|
-
component: PsDraggable
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Template = (args, {argTypes}) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: { PsDraggable },
|
|
11
|
-
template: `
|
|
12
|
-
<div style='width: 300px; font-family: "Lato", sans-serif; font-size: 12px;'>
|
|
13
|
-
<PsDraggable v-bind='$props'/>
|
|
14
|
-
</div>
|
|
15
|
-
`
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
export const Component = Template.bind({})
|
|
19
|
-
Component.args = {
|
|
20
|
-
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
|
-
module: 'comparison'
|
|
22
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import PsDropdown from '../components/forms/PsDropdown.vue'
|
|
2
|
-
import PsDropdownList from '../components/forms/PsDropdownList.vue'
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Dropdown',
|
|
5
|
-
component: { PsDropdown, PsDropdownList },
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: { PsDropdown, PsDropdownList },
|
|
11
|
-
template: `
|
|
12
|
-
<div style='background: #E6ECF2; width:1200px; height: 700px; padding: 20px;' class='psui-flex psui-gap-64 psui-bg-gray-20 '>
|
|
13
|
-
<PsDropdown>
|
|
14
|
-
<template #dropdownTrigger>
|
|
15
|
-
<i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
|
|
16
|
-
</template>
|
|
17
|
-
<template #items>
|
|
18
|
-
<div class='psui-pb-5'>
|
|
19
|
-
<p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 20px 8px 20px;'>divider label</p>
|
|
20
|
-
|
|
21
|
-
<ul>
|
|
22
|
-
<li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 01</li>
|
|
23
|
-
<li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 02</li>
|
|
24
|
-
<li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 03</li>
|
|
25
|
-
|
|
26
|
-
<p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
|
|
27
|
-
|
|
28
|
-
<li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 04</li>
|
|
29
|
-
<li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 05</li>
|
|
30
|
-
<li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 06</li>
|
|
31
|
-
</ul>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
</PsDropdown>
|
|
35
|
-
|
|
36
|
-
<PsDropdown>
|
|
37
|
-
<template #dropdownTrigger>
|
|
38
|
-
<i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
|
|
39
|
-
</template>
|
|
40
|
-
<template #items>
|
|
41
|
-
<div class='psui-pb-5'>
|
|
42
|
-
<p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
|
|
43
|
-
|
|
44
|
-
<ul>
|
|
45
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
|
|
46
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
|
|
47
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
|
|
48
|
-
|
|
49
|
-
<p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
|
|
50
|
-
|
|
51
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
|
|
52
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
|
|
53
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
|
|
54
|
-
</ul>
|
|
55
|
-
</div>
|
|
56
|
-
</template>
|
|
57
|
-
</PsDropdown>
|
|
58
|
-
|
|
59
|
-
<PsDropdown>
|
|
60
|
-
<template #dropdownTrigger>
|
|
61
|
-
<i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
|
|
62
|
-
</template>
|
|
63
|
-
<template #items>
|
|
64
|
-
<PsDropdownList v-bind='$props'></PsDropdownList>
|
|
65
|
-
</template>
|
|
66
|
-
</PsDropdown>
|
|
67
|
-
|
|
68
|
-
<PsDropdown>
|
|
69
|
-
<template #dropdownTrigger>
|
|
70
|
-
<i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
|
|
71
|
-
</template>
|
|
72
|
-
<template #items>
|
|
73
|
-
<div class='psui-my-3'>
|
|
74
|
-
<ul>
|
|
75
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
|
|
76
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
|
|
77
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
|
|
78
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
|
|
79
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
|
|
80
|
-
<li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
|
|
81
|
-
</ul>
|
|
82
|
-
</div>
|
|
83
|
-
</template>
|
|
84
|
-
</PsDropdown>
|
|
85
|
-
</div>
|
|
86
|
-
`,
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
export const DropdownMenu = Template.bind({})
|
|
90
|
-
DropdownMenu.args = {
|
|
91
|
-
items: [
|
|
92
|
-
'Selectable option 01',
|
|
93
|
-
'Selectable option 02',
|
|
94
|
-
'Selectable option 03',
|
|
95
|
-
'Selectable option 04',
|
|
96
|
-
'Selectable option 05',
|
|
97
|
-
'Selectable option 06',
|
|
98
|
-
],
|
|
99
|
-
}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import PsDropdownList, { itemStyle } from '../components/forms/PsDropdownList.vue'
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Components/Dropdown/Dropdown List',
|
|
4
|
-
component: { PsDropdownList },
|
|
5
|
-
argTypes: {
|
|
6
|
-
layout: {
|
|
7
|
-
control: {
|
|
8
|
-
type: 'inline-radio',
|
|
9
|
-
options: itemStyle
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
rigthLabelFormatter: {
|
|
13
|
-
control: {
|
|
14
|
-
type: 'select',
|
|
15
|
-
options: [null, 'label', 'function']
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const Template = (args, { argTypes }) => ({
|
|
22
|
-
props: Object.keys(argTypes),
|
|
23
|
-
components: { PsDropdownList },
|
|
24
|
-
data: () => ({
|
|
25
|
-
selected: item,
|
|
26
|
-
onlyTextItems: onlyTextItems,
|
|
27
|
-
richItems: richItems,
|
|
28
|
-
}),
|
|
29
|
-
template: `
|
|
30
|
-
<div style="width:100%;" class="psui-flex psui-gap-8 psui-bg-gray-20 psui-rounded-xl psui-p-10">
|
|
31
|
-
<div class="psui-w-1/2">
|
|
32
|
-
<p class="psui-text-h4 psui-font-bold psui-text-blue-80 psui-mb-2">OnlyText</p>
|
|
33
|
-
|
|
34
|
-
<div class="psui-rounded psui-bg-white psui-shadow-elevation-20 psui-py-3">
|
|
35
|
-
<PsDropdownList
|
|
36
|
-
v-bind="$props"
|
|
37
|
-
:items="onlyTextItems"
|
|
38
|
-
:selected.sync="selected"
|
|
39
|
-
left-label="title"
|
|
40
|
-
key-value="key"
|
|
41
|
-
layout="onlytext"
|
|
42
|
-
:study-data="study_data"
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="psui-w-1/2">
|
|
48
|
-
<p class="psui-text-h4 psui-font-bold psui-text-blue-80 psui-mb-2">Rich</p>
|
|
49
|
-
|
|
50
|
-
<div class="psui-rounded psui-bg-white psui-shadow-elevation-20 psui-py-3">
|
|
51
|
-
<PsDropdownList
|
|
52
|
-
v-bind="$props"
|
|
53
|
-
:items="richItems"
|
|
54
|
-
:selected.sync="selected"
|
|
55
|
-
left-label="title"
|
|
56
|
-
key-value="key"
|
|
57
|
-
layout="rich"
|
|
58
|
-
:study-data="study_data"
|
|
59
|
-
/>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
`,
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
const onlyTextItems = [
|
|
67
|
-
{
|
|
68
|
-
'key': 'item_01',
|
|
69
|
-
'title': 'Dropdown Item',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
'key': 'item_02',
|
|
73
|
-
'title': 'Dropdown Item',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
'key': 'item_03',
|
|
77
|
-
'title': 'Dropdown Item',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
'key': 'item_04',
|
|
81
|
-
'title': 'Dropdown Item',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
'key': 'item_05',
|
|
85
|
-
'title': 'Dropdown Item',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
'key': 'item_06',
|
|
89
|
-
'title': 'Dropdown Item',
|
|
90
|
-
},
|
|
91
|
-
]
|
|
92
|
-
|
|
93
|
-
const richItems = [
|
|
94
|
-
{
|
|
95
|
-
'isActive': true,
|
|
96
|
-
'key': 'forecast_units_affected',
|
|
97
|
-
'title': 'Affected Units',
|
|
98
|
-
'description': '(lifecycle)',
|
|
99
|
-
'right_label': '00',
|
|
100
|
-
'hasProjections': true,
|
|
101
|
-
'hasHelper': {
|
|
102
|
-
'type': 'helpers',
|
|
103
|
-
'id': 17,
|
|
104
|
-
'slug': 'forecast_units_affected'
|
|
105
|
-
},
|
|
106
|
-
'chartProjection': {
|
|
107
|
-
'title': 'Number of Affected Units',
|
|
108
|
-
'subtitle': ''
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
'isActive': false,
|
|
113
|
-
'key': 'forecast_initial_cost',
|
|
114
|
-
'title': 'Compliance Cost',
|
|
115
|
-
'description': '(lifecycle)',
|
|
116
|
-
'right_label': '00',
|
|
117
|
-
'hasProjections': true,
|
|
118
|
-
'hasHelper': {
|
|
119
|
-
'type': 'helpers',
|
|
120
|
-
'id': 20,
|
|
121
|
-
'slug': 'forecast_initial_cost'
|
|
122
|
-
},
|
|
123
|
-
'chartProjection': {
|
|
124
|
-
'title': 'Compliance Cost',
|
|
125
|
-
'subtitle': ''
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
'isActive': true,
|
|
130
|
-
'key': 'forecast_emissions_savings',
|
|
131
|
-
'title': 'Emissions Reductions',
|
|
132
|
-
'description': '(lifecycle MTCO²e)',
|
|
133
|
-
'right_label': '00',
|
|
134
|
-
'hasProjections': true,
|
|
135
|
-
'hasHelper': {
|
|
136
|
-
'type': 'helpers',
|
|
137
|
-
'id': 18,
|
|
138
|
-
'slug': 'forecast_emissions_savings'
|
|
139
|
-
},
|
|
140
|
-
'chartProjection': {
|
|
141
|
-
'title': 'Emissions Reductions',
|
|
142
|
-
'subtitle': 'MTCO²e'
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
'isActive': true,
|
|
147
|
-
'key': 'forecast_lifecycle_savings',
|
|
148
|
-
'title': 'Lifecycle Savings',
|
|
149
|
-
'description': '(on-bill)',
|
|
150
|
-
'right_label': '00',
|
|
151
|
-
'hasProjections': true,
|
|
152
|
-
'hasHelper': {
|
|
153
|
-
'type': 'helpers',
|
|
154
|
-
'id': 19,
|
|
155
|
-
'slug': 'forecast_lifecycle_savings'
|
|
156
|
-
},
|
|
157
|
-
'chartProjection': {
|
|
158
|
-
'title': 'Bill Savings',
|
|
159
|
-
'subtitle': ''
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
'isActive': false,
|
|
164
|
-
'key': 'forecast_kwh_savings',
|
|
165
|
-
'title': 'Electricity Savings',
|
|
166
|
-
'description': '(lifecycle kWh)',
|
|
167
|
-
'right_label': '00',
|
|
168
|
-
'hasProjections': true,
|
|
169
|
-
'hasHelper': {
|
|
170
|
-
'type': 'helpers',
|
|
171
|
-
'id': 21,
|
|
172
|
-
'slug': 'forecast_kwh_savings'
|
|
173
|
-
},
|
|
174
|
-
'chartProjection': {
|
|
175
|
-
'title': 'Electricity Savings',
|
|
176
|
-
'subtitle': 'kWh'
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
'isActive': false,
|
|
181
|
-
'key': 'forecast_therms_savings',
|
|
182
|
-
'title': 'Gas Savings',
|
|
183
|
-
'description': '(lifecycle therms)',
|
|
184
|
-
'right_label': '00',
|
|
185
|
-
'hasProjections': true,
|
|
186
|
-
'hasHelper': {
|
|
187
|
-
'type': 'helpers',
|
|
188
|
-
'id': 22,
|
|
189
|
-
'slug': 'forecast_therms_savings'
|
|
190
|
-
},
|
|
191
|
-
'chartProjection': {
|
|
192
|
-
'title': 'Gas Savings',
|
|
193
|
-
'subtitle': 'therms'
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
]
|
|
197
|
-
const item = richItems[0]
|
|
198
|
-
const studyData = {
|
|
199
|
-
'forecast_units_affected': 7001.75,
|
|
200
|
-
'forecast_emissions_savings': 17575.66588897,
|
|
201
|
-
'forecast_therms_savings': 5060589.279978376,
|
|
202
|
-
'forecast_kwh_savings': -104561078.77158748,
|
|
203
|
-
'forecast_lifecycle_savings': -40645997.14350001,
|
|
204
|
-
'forecast_initial_cost': -21144739.311334003
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export const DropdownList = Template.bind({})
|
|
208
|
-
DropdownList.args = {
|
|
209
|
-
items: onlyTextItems,
|
|
210
|
-
study_data: studyData,
|
|
211
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
<Meta title="Elevation system" />
|
|
4
|
-
|
|
5
|
-
<style>{`
|
|
6
|
-
.mx-auto { margin: 0 auto; }
|
|
7
|
-
`}</style>
|
|
8
|
-
|
|
9
|
-
# Elevation system
|
|
10
|
-
Elevation is the distance between two surfaces on the z-axis. Evidenced by the use of shadows.
|
|
11
|
-
|
|
12
|
-
## 1. Introduction
|
|
13
|
-
Elevation is evidenced by the use of shadows. It's another way to establish a visual hierarchy, create prominence, and increase contrast between interface elements and regions. Because shadows express the degree of elevation between surfaces, they must be used consistently across the tool.
|
|
14
|
-
|
|
15
|
-
### 1.1. Shadow and light
|
|
16
|
-
The shadows in our elements are projected by these two light sources: main light and ambient light.
|
|
17
|
-
<div class="psui-grid psui-grid-cols-3 psui-gap-4">
|
|
18
|
-
<div class="psui-bg-gray-20 psui-pt-8">
|
|
19
|
-
<div class="psui-bg-white psui-w-48 psui-h-48 psui-rounded-md psui-shadow mx-auto"></div>
|
|
20
|
-
<p class="psui-text-center">Shadow cast by main light</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="psui-bg-gray-20 psui-pt-8">
|
|
23
|
-
<div class="psui-bg-white psui-w-48 psui-h-48 psui-rounded-md psui-shadow-sm mx-auto"></div>
|
|
24
|
-
<p class="psui-text-center">Shadow cast by ambient light</p>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="psui-bg-gray-20 psui-pt-8">
|
|
27
|
-
<div class="psui-bg-white psui-w-48 psui-h-48 psui-rounded-md psui-shadow-md mx-auto"></div>
|
|
28
|
-
<p class="psui-text-center">Combined shadow from main and ambient lights</p>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
## 2. Elevation system
|
|
33
|
-
Shadows provide cues about depth, direction of movement, and surface edges. A surface’s shadow is determined by its elevation and relationship to other surfaces.
|
|
34
|
-
<div class="psui-grid psui-grid-cols-2 psui-gap-6 psui-p-6 psui-bg-gray-20">
|
|
35
|
-
<div class="psui-rounded-md psui-p-8 psui-h-20 psui-shadow-elevation--5">Elevation -5</div>
|
|
36
|
-
<div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-5">Elevation 5</div>
|
|
37
|
-
<div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-10">Elevation 10</div>
|
|
38
|
-
<div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-20">Elevation 20</div>
|
|
39
|
-
<div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-30">Elevation 30</div>
|
|
40
|
-
<div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-40">Elevation 40</div>
|
|
41
|
-
</div>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import MyHeader from './Header.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Example/Header',
|
|
5
|
-
component: MyHeader,
|
|
6
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
render: (args) => ({
|
|
9
|
-
// Components used in your story `template` are defined in the `components` object
|
|
10
|
-
components: {
|
|
11
|
-
MyHeader,
|
|
12
|
-
},
|
|
13
|
-
// The story's `args` need to be mapped into the template through the `setup()` method
|
|
14
|
-
setup() {
|
|
15
|
-
// Story args can be spread into the returned object
|
|
16
|
-
return {
|
|
17
|
-
...args,
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
// Then, the spread values can be accessed directly in the template
|
|
21
|
-
template: '<my-header :user="user" />',
|
|
22
|
-
}),
|
|
23
|
-
parameters: {
|
|
24
|
-
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
25
|
-
layout: 'fullscreen',
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const LoggedIn = {
|
|
30
|
-
args: {
|
|
31
|
-
user: {
|
|
32
|
-
name: 'Jane Doe',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const LoggedOut = {
|
|
38
|
-
args: {
|
|
39
|
-
user: null,
|
|
40
|
-
},
|
|
41
|
-
}
|
package/src/stories/Header.vue
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<header>
|
|
3
|
-
<div class="storybook-header">
|
|
4
|
-
<div>
|
|
5
|
-
<svg
|
|
6
|
-
width="32"
|
|
7
|
-
height="32"
|
|
8
|
-
viewBox="0 0 32 32"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
-
>
|
|
11
|
-
<g
|
|
12
|
-
fill="none"
|
|
13
|
-
fill-rule="evenodd"
|
|
14
|
-
>
|
|
15
|
-
<path
|
|
16
|
-
d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
|
|
17
|
-
fill="#FFF"
|
|
18
|
-
/>
|
|
19
|
-
<path
|
|
20
|
-
d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
|
|
21
|
-
fill="#555AB9"
|
|
22
|
-
/>
|
|
23
|
-
<path
|
|
24
|
-
d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
|
|
25
|
-
fill="#91BAF8"
|
|
26
|
-
/>
|
|
27
|
-
</g>
|
|
28
|
-
</svg>
|
|
29
|
-
<h1>Acme</h1>
|
|
30
|
-
</div>
|
|
31
|
-
<div>
|
|
32
|
-
<span
|
|
33
|
-
class="welcome"
|
|
34
|
-
v-if="user"
|
|
35
|
-
>Welcome, aa<b>{{ user.name }}</b>!</span>
|
|
36
|
-
<my-button
|
|
37
|
-
size="small"
|
|
38
|
-
@click="$emit('logout')"
|
|
39
|
-
label="Log out"
|
|
40
|
-
v-if="user"
|
|
41
|
-
/>
|
|
42
|
-
<my-button
|
|
43
|
-
size="small"
|
|
44
|
-
@click="$emit('login')"
|
|
45
|
-
label="Log in"
|
|
46
|
-
v-if="!user"
|
|
47
|
-
/>
|
|
48
|
-
<my-button
|
|
49
|
-
primary
|
|
50
|
-
size="small"
|
|
51
|
-
@click="$emit('createAccount')"
|
|
52
|
-
label="Sign up"
|
|
53
|
-
v-if="!user"
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</header>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
<script>
|
|
61
|
-
import './header.css'
|
|
62
|
-
import MyButton from './Button.vue'
|
|
63
|
-
|
|
64
|
-
export default {
|
|
65
|
-
name: 'MyHeader',
|
|
66
|
-
|
|
67
|
-
components: { MyButton },
|
|
68
|
-
|
|
69
|
-
props: {
|
|
70
|
-
user: {
|
|
71
|
-
type: Object,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
emits: ['login', 'logout', 'createAccount'],
|
|
76
|
-
}
|
|
77
|
-
</script>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import PsHighlightRippleDot from '../components/badges-and-tags/PsHighlightRippleDot.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Badges & Tags/Badges/HighlightRippleDot',
|
|
5
|
-
component: PsHighlightRippleDot,
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: { PsHighlightRippleDot },
|
|
11
|
-
template: '<PsHighlightRippleDot v-bind="$props" />',
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
export const HighlightRippleDot = Template.bind({})
|
|
15
|
-
HighlightRippleDot.args = {}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import PsIcon from '../components/ui/PsIcon.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Icon',
|
|
5
|
-
component: PsIcon,
|
|
6
|
-
argTypes: {},
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const Template = (args, { argTypes }) => ({
|
|
10
|
-
props: Object.keys(argTypes),
|
|
11
|
-
components: { PsIcon },
|
|
12
|
-
template: `
|
|
13
|
-
<div class='psui-flex'>
|
|
14
|
-
<PsIcon v-bind="$props" type='svg' icon="/images/multifamily-units.svg" />
|
|
15
|
-
<PsIcon v-bind="$props" type='svg' icon="/images/multifamily-units.svg"/>
|
|
16
|
-
</div>
|
|
17
|
-
`,
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
export const IconSimple = Template.bind({})
|
|
21
|
-
IconSimple.args = {}
|