@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.90-beta.50
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 +2 -8
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6639 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +106 -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/doc/.nvmrc +1 -0
- package/{.storybook → doc/.storybook}/main.ts +8 -2
- package/{.storybook → doc/.storybook}/preview.ts +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/{src → doc}/shims-vue.d.ts +0 -5
- package/{src → doc/src}/stories/Accordion.stories.ts +2 -3
- package/{src → doc/src}/stories/BadgeWithIcon.stories.ts +1 -1
- package/{src → doc/src}/stories/BarChart.stories.ts +1 -1
- package/{src → doc/src}/stories/Breadcrumb.stories.ts +1 -1
- package/doc/src/stories/Button.stories.ts +130 -0
- package/{src → doc/src}/stories/CardInfos.stories.ts +1 -1
- package/{src → doc/src}/stories/ChartLegend.stories.ts +1 -1
- package/{src → doc/src}/stories/Checkbox.stories.ts +1 -1
- package/{src → doc/src}/stories/CheckboxSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/Chips.stories.ts +1 -4
- package/{src → doc/src}/stories/ClimateZoneBadge.stories.ts +2 -1
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src → doc/src}/stories/CostEffectBar.stories.ts +2 -1
- package/{src → doc/src}/stories/Datatable.stories.ts +5 -2
- package/{src → doc/src}/stories/DateCardInfo.stories.ts +1 -1
- package/{src → doc/src}/stories/Dialog.stories.ts +2 -2
- package/{src → doc/src}/stories/Draggable.stories.ts +3 -2
- package/{src → doc/src}/stories/Dropdown.stories.ts +4 -3
- package/{src → doc/src}/stories/DropdownList.stories.ts +4 -2
- package/{src → doc/src}/stories/HighlightRippleDot.stories.ts +3 -2
- package/{src → doc/src}/stories/Icon.stories.ts +3 -1
- package/{src → doc/src}/stories/InlineSelector.stories.ts +1 -1
- package/{src → doc/src}/stories/Input.stories.ts +7 -4
- package/{src → doc/src}/stories/InputSelect.stories.ts +3 -2
- package/{src → doc/src}/stories/InputTextArea.stories.ts +1 -1
- package/{src → doc/src}/stories/MiniTag.stories.ts +9 -2
- package/{src → doc/src}/stories/ProgressBar.stories.ts +3 -2
- package/{src → doc/src}/stories/RadioButton.stories.ts +2 -2
- package/{src → doc/src}/stories/RadioButtonSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/SimpleAlert.stories.ts +3 -2
- package/{src → doc/src}/stories/Slider.stories.ts +6 -2
- package/{src → doc/src}/stories/Switch.stories.ts +2 -2
- package/{src → doc/src}/stories/TabHeader.stories.ts +6 -1
- package/{src → doc/src}/stories/TableResults.stories.ts +11 -7
- package/{src → doc/src}/stories/TagScope.stories.ts +3 -2
- package/{src → doc/src}/stories/TestimonialCard.stories.ts +3 -3
- package/{src → doc/src}/stories/Toast.stories.ts +2 -2
- package/{src → doc/src}/stories/Toggle.stories.ts +6 -3
- package/{src → doc/src}/stories/Tooltip.stories.ts +3 -3
- package/doc/tsconfig.json +17 -0
- package/package.json +13 -28
- 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/PsChips.scss +9 -3
- package/src/assets/scss/components/PsCollapse.scss +71 -0
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +28 -1
- package/src/assets/scss/components/PsTooltip.scss +2 -1
- package/src/components/accordion/PsAccordionItem.vue +88 -74
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
- 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 +61 -62
- package/src/components/chips/PsChips.vue +112 -101
- package/src/components/collapse/PsCollapse.vue +124 -0
- 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 +65 -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 +166 -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 +461 -468
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +70 -67
- package/src/components/table-results/PsTableResultsHeadComparison.vue +67 -64
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +94 -67
- 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 +143 -132
- package/src/index.ts +60 -67
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +12 -3
- package/src/util/directives.ts +24 -0
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -0
- package/tailwind.config.js +1 -1
- package/tsconfig.json +18 -13
- package/.storybook/eventBus.ts +0 -26
- package/babel.config.js +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/Header.stories.ts +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/Playground.stories.ts +0 -16
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -22
- /package/{.storybook → doc/.storybook}/PolicyStudio.ts +0 -0
- /package/{.storybook → doc/.storybook}/manager.ts +0 -0
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src → doc/src}/contents/ComparisonData.ts +0 -0
- /package/{src → doc/src}/contents/FlexibleData.ts +0 -0
- /package/{src → doc/src}/contents/ResultsData.ts +0 -0
- /package/{src → doc/src}/stories/Colors.mdx +0 -0
- /package/{src → doc/src}/stories/ElevationSystem.mdx +0 -0
- /package/{src → doc/src}/stories/Introduction.mdx +0 -0
- /package/{src → doc/src}/stories/Typography.mdx +0 -0
- /package/{src → doc/src}/stories/assets/code-brackets.svg +0 -0
- /package/{src → doc/src}/stories/assets/colors.svg +0 -0
- /package/{src → doc/src}/stories/assets/comments.svg +0 -0
- /package/{src → doc/src}/stories/assets/direction.svg +0 -0
- /package/{src → doc/src}/stories/assets/flow.svg +0 -0
- /package/{src → doc/src}/stories/assets/plugin.svg +0 -0
- /package/{src → doc/src}/stories/assets/repo.svg +0 -0
- /package/{src → doc/src}/stories/assets/stackalt.svg +0 -0
package/doc/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@policystudio/policy-studio-ui-vue",
|
|
3
|
+
"version": "1.1.90-beta.12",
|
|
4
|
+
"description": "Policy Studio UI",
|
|
5
|
+
"author": "Policy Studio Team",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"serve": "concurrently --kill-others \"npm run watch-storybook\" \"npm run watch-tailwind\"",
|
|
8
|
+
"lint": "vue-cli-service lint",
|
|
9
|
+
"build-storybook": "storybook build",
|
|
10
|
+
"kill-port": "sh ../scripts/kill-port.sh",
|
|
11
|
+
"serve-prod": "concurrently --kill-others \"npm run watch-storybook\" \"npm run watch-prod-tailwind\"",
|
|
12
|
+
"storybook": "concurrently \"npm run kill-port\" \"storybook dev -p 6006\"",
|
|
13
|
+
"watch-prod-tailwind": "watch 'npm run build-tailwind' ./src/assets",
|
|
14
|
+
"watch-tailwind": "watch 'npm run build-temp-tailwind' ./src/assets"
|
|
15
|
+
},
|
|
16
|
+
"types": "shims-vue.d.ts",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@vue/compat": "^3.4.5",
|
|
19
|
+
"core-js": "^3.6.5",
|
|
20
|
+
"tiny-emitter": "^2.1.0",
|
|
21
|
+
"v-tooltip": "^2.1.3",
|
|
22
|
+
"vue": "^3.4.5"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@storybook/addon-essentials": "^7.6.7",
|
|
26
|
+
"@storybook/addon-interactions": "^7.6.7",
|
|
27
|
+
"@storybook/addon-links": "^7.6.7",
|
|
28
|
+
"@storybook/blocks": "^7.6.7",
|
|
29
|
+
"@storybook/test": "^7.6.7",
|
|
30
|
+
"@storybook/vue3": "^7.6.7",
|
|
31
|
+
"@storybook/vue3-webpack5": "^7.6.7",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
33
|
+
"@typescript-eslint/parser": "^5.4.0",
|
|
34
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
35
|
+
"@vue/cli-plugin-typescript": "~5.0.0",
|
|
36
|
+
"@vue/cli-service": "~5.0.8",
|
|
37
|
+
"@vue/compiler-sfc": "^3.4.5",
|
|
38
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
39
|
+
"@vue/eslint-config-typescript": "^9.1.0",
|
|
40
|
+
"concurrently": "^7.0.0",
|
|
41
|
+
"eslint": "^8.56.0",
|
|
42
|
+
"eslint-plugin-prettier": "^5.1.2",
|
|
43
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
44
|
+
"eslint-plugin-vue": "^8.7.1",
|
|
45
|
+
"postcss": "^8.3.11",
|
|
46
|
+
"postcss-cli": "^9.0.2",
|
|
47
|
+
"postcss-import": "^14.0.2",
|
|
48
|
+
"postcss-nested": "^5.0.6",
|
|
49
|
+
"prettier": "^3.1.1",
|
|
50
|
+
"react": "^18.2.0",
|
|
51
|
+
"react-dom": "^18.2.0",
|
|
52
|
+
"storybook": "^7.6.7",
|
|
53
|
+
"tailwindcss": "^3.4.1",
|
|
54
|
+
"ts-loader": "^9.5.1",
|
|
55
|
+
"typescript": "~4.5.5",
|
|
56
|
+
"vue-eslint-parser": "^9.3.2",
|
|
57
|
+
"vue-loader": "^17.4.2",
|
|
58
|
+
"vue-tsc": "^1.8.27",
|
|
59
|
+
"watch": "^1.0.2",
|
|
60
|
+
"webpack": "^5.89.0"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": "20.11.0"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"vue",
|
|
67
|
+
"ui"
|
|
68
|
+
],
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"url": "https://github.com/Policy-Studio/policy-studio-ui-vue"
|
|
71
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PsAccordionItem from '
|
|
2
|
-
import PsAccordion from '
|
|
1
|
+
import PsAccordionItem from '../../../src/components/accordion/PsAccordionItem.vue'
|
|
2
|
+
import PsAccordion from '../../../src/components/accordion/PsAccordion.vue'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/Accordion',
|
|
@@ -7,7 +7,6 @@ export default {
|
|
|
7
7
|
subcomponents: { PsAccordionItem },
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
export const Index = (args:any, { argTypes }: { argTypes:any }) => ({
|
|
12
11
|
props: Object.keys({argTypes, args}),
|
|
13
12
|
components: { PsAccordion, PsAccordionItem },
|
|
@@ -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({})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsCheckboxSimple from '
|
|
1
|
+
import PsCheckboxSimple from '../../../src/components/controls/PsCheckboxSimple.vue'
|
|
2
2
|
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Text fields & Forms/Inputs V2/Checkbox',
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import PsChips from '
|
|
1
|
+
import PsChips from '../../../src/components/chips/PsChips.vue'
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
3
3
|
|
|
4
|
-
import * as HeaderStories from '../stories/Header.stories'
|
|
5
|
-
|
|
6
4
|
const meta: Meta<typeof PsChips> = {
|
|
7
5
|
component: PsChips
|
|
8
6
|
}
|
|
@@ -27,7 +25,6 @@ export const Primary: Story = {
|
|
|
27
25
|
args:{
|
|
28
26
|
label: 'Simple Chip',
|
|
29
27
|
icon:'',
|
|
30
|
-
...HeaderStories.LoggedIn.args
|
|
31
28
|
}
|
|
32
29
|
})
|
|
33
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsClimateZoneBadge from '
|
|
1
|
+
import PsClimateZoneBadge from '../../../src/components/badges-and-tags/PsClimateZoneBadge.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Badges & Tags/Badges/ClimateZoneBadge',
|
|
@@ -12,6 +12,7 @@ const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
|
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
|
}
|
|
@@ -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
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsCostEffectBar from '
|
|
1
|
+
import PsCostEffectBar from '../../../src/components/badges-and-tags/PsCostEffectBar.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Badges & Tags/Badges/CostEffectBar',
|
|
@@ -20,4 +20,5 @@ const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
export const SimpleProgressBar = Template.bind({})
|
|
23
|
+
// @ts-ignore
|
|
23
24
|
SimpleProgressBar.args = {}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import PsDataTable, { alignment } from '../../../src/components/datatable/PsDataTable.vue'
|
|
3
|
+
import PsDataTableItem from '../../../src/components/datatable/PsDataTableItem.vue'
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Data Tables/DataTable',
|
|
@@ -34,6 +35,7 @@ const RichTemplate = (args:any, { argTypes }:{ argTypes:any } ) => ({
|
|
|
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} }],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsDialog from '
|
|
1
|
+
import PsDialog from '../../../src/components/notifications/PsDialog.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Notifications/Dialog',
|
|
5
5
|
component: PsDialog,
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const TemplateExamples = (args, { argTypes }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsDialog },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsDraggable from '
|
|
1
|
+
import PsDraggable from '../../../src/components/controls/PsDraggable.vue'
|
|
2
2
|
|
|
3
3
|
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'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsDropdown from '
|
|
2
|
-
import PsDropdownList from '
|
|
1
|
+
import PsDropdown from '../../../src/components/forms/PsDropdown.vue'
|
|
2
|
+
import PsDropdownList from '../../../src/components/forms/PsDropdownList.vue'
|
|
3
3
|
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,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import PsDropdownList, { itemStyle } from '../../../src/components/forms/PsDropdownList.vue'
|
|
2
3
|
export default {
|
|
3
4
|
title: 'Components/Dropdown/Dropdown List',
|
|
4
5
|
component: { PsDropdownList },
|
|
@@ -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,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsHighlightRippleDot from '
|
|
1
|
+
import PsHighlightRippleDot from '../../../src/components/badges-and-tags/PsHighlightRippleDot.vue'
|
|
2
2
|
|
|
3
3
|
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 = {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsIcon from '
|
|
1
|
+
import PsIcon from '../../../src/components/ui/PsIcon.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Icon',
|
|
@@ -6,6 +6,7 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// @ts-ignore
|
|
9
10
|
const Template = (args, { argTypes }) => ({
|
|
10
11
|
props: Object.keys(argTypes),
|
|
11
12
|
components: { PsIcon },
|
|
@@ -18,4 +19,5 @@ export default {
|
|
|
18
19
|
})
|
|
19
20
|
|
|
20
21
|
export const IconSimple = Template.bind({})
|
|
22
|
+
// @ts-ignore
|
|
21
23
|
IconSimple.args = {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsInput from '
|
|
1
|
+
import PsInput from '../../../src/components/forms/PsInput.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Text fields & Forms/Input',
|
|
4
4
|
component: PsInput,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
required: { control: 'boolean' },
|
|
8
8
|
},
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
// @ts-ignore
|
|
11
11
|
const TemplateInputText = (args, { argTypes }) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
13
13
|
components: { PsInput },
|
|
@@ -79,7 +79,7 @@ const TemplateInputText = (args, { argTypes }) => ({
|
|
|
79
79
|
</div>
|
|
80
80
|
`
|
|
81
81
|
})
|
|
82
|
-
|
|
82
|
+
// @ts-ignore
|
|
83
83
|
const TemplateInputPassword = (args, { argTypes }) => ({
|
|
84
84
|
props: Object.keys(argTypes),
|
|
85
85
|
components: { PsInput },
|
|
@@ -183,7 +183,7 @@ const TemplateInputPassword = (args, { argTypes }) => ({
|
|
|
183
183
|
</div>
|
|
184
184
|
`
|
|
185
185
|
})
|
|
186
|
-
|
|
186
|
+
// @ts-ignore
|
|
187
187
|
const TemplateSlots = (args, { argTypes }) => ({
|
|
188
188
|
props: Object.keys(argTypes),
|
|
189
189
|
components: { PsInput },
|
|
@@ -212,6 +212,7 @@ const TemplateSlots = (args, { argTypes }) => ({
|
|
|
212
212
|
})
|
|
213
213
|
|
|
214
214
|
export const InputText = TemplateInputText.bind({})
|
|
215
|
+
// @ts-ignore
|
|
215
216
|
InputText.args = {
|
|
216
217
|
label: 'Input Text',
|
|
217
218
|
placeholder: 'Placeholder',
|
|
@@ -222,6 +223,7 @@ InputText.args = {
|
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
export const InputPassword = TemplateInputPassword.bind({})
|
|
226
|
+
// @ts-ignore
|
|
225
227
|
InputPassword.args = {
|
|
226
228
|
type: 'password',
|
|
227
229
|
label: 'Password',
|
|
@@ -231,6 +233,7 @@ InputPassword.args = {
|
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
export const InputSlots = TemplateSlots.bind({})
|
|
236
|
+
// @ts-ignore
|
|
234
237
|
InputSlots.args = {
|
|
235
238
|
label: 'Label',
|
|
236
239
|
placeholder: 'Placeholder',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsInputSelect from '
|
|
1
|
+
import PsInputSelect from '../../../src/components/forms/PsInputSelect.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Text fields & Forms/InputSelect',
|
|
5
5
|
component: PsInputSelect
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
const TemplateDefault = (args, {argTypes})=> ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: {PsInputSelect},
|
|
@@ -25,6 +25,7 @@ const TemplateDefault = (args, {argTypes})=> ({
|
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
export const Default = TemplateDefault.bind({})
|
|
28
|
+
// @ts-ignore
|
|
28
29
|
Default.args = {
|
|
29
30
|
items: [{title:'Text 1', value:'Value 1'}, {title:'Text 2', value:'Value 2'}]
|
|
30
31
|
}
|