@policystudio/policy-studio-ui-vue 1.1.89 → 1.1.90-access.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -0
- package/.eslintrc.js +75 -67
- package/.github/workflows/deploy-storybook.yml +5 -5
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6617 -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/doc/.storybook/PolicyStudio.ts +11 -0
- package/doc/.storybook/main.ts +27 -0
- package/doc/.storybook/manager.ts +7 -0
- package/{.storybook/preview.js → doc/.storybook/preview.ts} +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/doc/shims-vue.d.ts +6 -0
- package/{src/stories/Accordion.stories.js → doc/src/stories/Accordion.stories.ts} +4 -5
- package/{src/stories/BadgeWithIcon.stories.js → doc/src/stories/BadgeWithIcon.stories.ts} +2 -2
- package/{src/stories/BarChart.stories.js → doc/src/stories/BarChart.stories.ts} +2 -2
- package/{src/stories/Breadcrumb.stories.js → doc/src/stories/Breadcrumb.stories.ts} +2 -5
- package/{src/stories/Button.stories.js → doc/src/stories/Button.stories.ts} +130 -130
- package/{src/stories/CardInfos.stories.js → doc/src/stories/CardInfos.stories.ts} +2 -3
- package/{src/stories/ChartLegend.stories.js → doc/src/stories/ChartLegend.stories.ts} +2 -3
- package/{src/stories/Checkbox.stories.js → doc/src/stories/Checkbox.stories.ts} +2 -2
- package/{src/stories/CheckboxSimple.stories.js → doc/src/stories/CheckboxSimple.stories.ts} +2 -2
- package/{src/stories/Chips.stories.js → doc/src/stories/Chips.stories.ts} +22 -23
- package/{src/stories/ClimateZoneBadge.stories.js → doc/src/stories/ClimateZoneBadge.stories.ts} +3 -2
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src/stories/CostEffectBar.stories.js → doc/src/stories/CostEffectBar.stories.ts} +3 -2
- package/{src/stories/Datatable.stories.js → doc/src/stories/Datatable.stories.ts} +7 -4
- package/{src/stories/DateCardInfo.stories.js → doc/src/stories/DateCardInfo.stories.ts} +2 -6
- package/{src/stories/Dialog.stories.js → doc/src/stories/Dialog.stories.ts} +2 -2
- package/{src/stories/Draggable.stories.js → doc/src/stories/Draggable.stories.ts} +3 -2
- package/{src/stories/Dropdown.stories.js → doc/src/stories/Dropdown.stories.ts} +4 -3
- package/{src/stories/DropdownList.stories.js → doc/src/stories/DropdownList.stories.ts} +4 -2
- package/{src/stories/ElevationSystem.stories.mdx → doc/src/stories/ElevationSystem.mdx} +1 -1
- package/{src/stories/HighlightRippleDot.stories.js → doc/src/stories/HighlightRippleDot.stories.ts} +3 -2
- package/{src/stories/Icon.stories.js → doc/src/stories/Icon.stories.ts} +3 -1
- package/{src/stories/InlineSelector.stories.js → doc/src/stories/InlineSelector.stories.ts} +2 -2
- package/{src/stories/Input.stories.js → doc/src/stories/Input.stories.ts} +7 -4
- package/{src/stories/InputSelect.stories.js → doc/src/stories/InputSelect.stories.ts} +3 -2
- package/{src/stories/InputTextArea.stories.js → doc/src/stories/InputTextArea.stories.ts} +2 -2
- package/{src/stories/Introduction.stories.mdx → doc/src/stories/Introduction.mdx} +101 -101
- package/{src/stories/MiniTag.stories.js → doc/src/stories/MiniTag.stories.ts} +9 -2
- package/{src/stories/ProgressBar.stories.js → doc/src/stories/ProgressBar.stories.ts} +3 -2
- package/{src/stories/RadioButton.stories.js → doc/src/stories/RadioButton.stories.ts} +2 -2
- package/{src/stories/RadioButtonSimple.stories.js → doc/src/stories/RadioButtonSimple.stories.ts} +2 -2
- package/{src/stories/SimpleAlert.stories.js → doc/src/stories/SimpleAlert.stories.ts} +3 -2
- package/{src/stories/Slider.stories.js → doc/src/stories/Slider.stories.ts} +6 -2
- package/{src/stories/Switch.stories.js → doc/src/stories/Switch.stories.ts} +2 -2
- package/{src/stories/TabHeader.stories.js → doc/src/stories/TabHeader.stories.ts} +6 -1
- package/{src/stories/TableResults.stories.js → doc/src/stories/TableResults.stories.ts} +11 -7
- package/{src/stories/TagScope.stories.js → doc/src/stories/TagScope.stories.ts} +3 -2
- package/{src/stories/TestimonialCard.stories.js → doc/src/stories/TestimonialCard.stories.ts} +3 -3
- package/{src/stories/Toast.stories.js → doc/src/stories/Toast.stories.ts} +2 -2
- package/{src/stories/Toggle.stories.js → doc/src/stories/Toggle.stories.ts} +7 -4
- package/{src/stories/Tooltip.stories.js → doc/src/stories/Tooltip.stories.ts} +6 -6
- package/{src/stories/Typography.stories.mdx → doc/src/stories/Typography.mdx} +107 -105
- package/doc/tsconfig.json +17 -0
- package/package.json +43 -39
- package/scripts/gulp.js +11 -0
- package/scripts/kill-port.sh +12 -0
- package/src/App.vue +30 -0
- package/src/assets/scss/base.scss +3 -30
- package/src/assets/scss/components/PsAccordion.scss +2 -2
- package/src/assets/scss/components/PsButton.scss +7 -1
- package/src/assets/scss/components/PsChips.scss +12 -7
- package/src/assets/scss/components/PsCollapse.scss +71 -0
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDateCardInfo.scss +4 -5
- package/src/assets/scss/components/PsDialog.scss +7 -0
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsInput.scss +9 -0
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +57 -2
- package/src/assets/scss/components/PsTableResults.scss +51 -82
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/assets/scss/components/PsTooltip.scss +149 -145
- package/src/components/accordion/PsAccordion.vue +20 -21
- package/src/components/accordion/PsAccordionItem.vue +121 -81
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +37 -36
- package/src/components/badges-and-tags/PsCardInfos.vue +40 -40
- package/src/components/badges-and-tags/PsChartLegend.vue +50 -41
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +28 -61
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +4 -3
- 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 +25 -30
- package/src/components/buttons/PsButton.vue +90 -98
- package/src/components/chips/PsChips.vue +118 -103
- package/src/components/collapse/PsCollapse.vue +124 -0
- package/src/components/controls/PsCheckbox.vue +86 -83
- package/src/components/controls/PsCheckboxSimple.vue +97 -97
- package/src/components/controls/PsDraggable.vue +100 -99
- package/src/components/controls/PsInlineSelector.vue +111 -113
- package/src/components/controls/PsRadioButton.vue +72 -60
- package/src/components/controls/PsRadioButtonSimple.vue +81 -77
- package/src/components/controls/PsSlider.vue +190 -181
- package/src/components/controls/PsSwitch.vue +63 -54
- package/src/components/controls/PsToggle.vue +62 -57
- package/src/components/data-graphics/PsBarChart.vue +22 -23
- package/src/components/datatable/PsDataTable.vue +70 -65
- package/src/components/datatable/PsDataTableItem.vue +30 -32
- package/src/components/forms/PsDropdown.vue +173 -166
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +163 -146
- package/src/components/forms/PsInputSelect.vue +121 -100
- package/src/components/forms/PsInputTextArea.vue +84 -74
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +67 -60
- package/src/components/notifications/PsSimpleAlert.vue +47 -37
- package/src/components/notifications/PsToast.vue +48 -42
- package/src/components/table-results/PsTableResults.vue +527 -504
- package/src/components/table-results/PsTableResultsBody.vue +69 -68
- package/src/components/table-results/PsTableResultsHead.vue +108 -69
- package/src/components/table-results/PsTableResultsHeadComparison.vue +88 -69
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +112 -72
- package/src/components/table-results/PsTableResultsRow.vue +61 -58
- package/src/components/tabs/PsTabHeader.vue +138 -116
- package/src/components/tooltip/PsDialogTooltip.vue +112 -107
- package/src/components/tooltip/PsRichTooltip.vue +46 -43
- package/src/components/tooltip/PsTooltip.vue +126 -122
- package/src/components/ui/PsDotLoader.vue +6 -10
- package/src/components/ui/PsIcon.vue +149 -134
- package/src/index.ts +159 -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 +12 -3
- package/tsconfig.json +47 -0
- package/.storybook/PolicyStudio.js +0 -10
- package/.storybook/eventBus.js +0 -3
- package/.storybook/main.js +0 -25
- package/.storybook/manager.js +0 -6
- package/babel.config.js +0 -3
- package/backup-package-lock.json +0 -37194
- package/dist/css/psui_styles.css +0 -110965
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -248
- package/src/index.js +0 -167
- package/src/stories/Playground.stories.js +0 -16
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src/contents/ComparisonData.js → doc/src/contents/ComparisonData.ts} +0 -0
- /package/{src/contents/FlexibleData.js → doc/src/contents/FlexibleData.ts} +0 -0
- /package/{src/contents/ResultsData.js → doc/src/contents/ResultsData.ts} +0 -0
- /package/{src/stories/Colors.stories.mdx → doc/src/stories/Colors.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,9 +7,8 @@ export default {
|
|
|
7
7
|
subcomponents: { PsAccordionItem },
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
props: Object.keys(argTypes, args),
|
|
10
|
+
export const Index = (args:any, { argTypes }: { argTypes:any }) => ({
|
|
11
|
+
props: Object.keys({argTypes, args}),
|
|
13
12
|
components: { PsAccordion, PsAccordionItem },
|
|
14
13
|
template:
|
|
15
14
|
`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsBadgeWithIcon from '
|
|
1
|
+
import PsBadgeWithIcon from '../../../src/components/badges-and-tags/PsBadgeWithIcon.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Badges & Tags/Badges/BadgeWithIcon',
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
},
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const TemplateDefault = (args, {argTypes})=>({
|
|
10
|
+
const TemplateDefault = (args:any, {argTypes}:{argTypes:any})=>({
|
|
11
11
|
props: Object.keys(argTypes),
|
|
12
12
|
components:{PsBadgeWithIcon},
|
|
13
13
|
template: `
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsBarChart from '
|
|
1
|
+
import PsBarChart from '../../../src/components/data-graphics/PsBarChart.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Data Graphics/Charts/BarChart',
|
|
4
4
|
component: PsBarChart,
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const defaultTemplate = (args, {argTypes}) => ({
|
|
7
|
+
const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
8
8
|
props: Object.keys(argTypes),
|
|
9
9
|
components: { PsBarChart },
|
|
10
10
|
template: `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsBreadcrumb from '
|
|
1
|
+
import PsBreadcrumb from '../../../src/components/navigations/PsBreadcrumb.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Navigations/Breadcrumb',
|
|
4
4
|
component: PsBreadcrumb,
|
|
@@ -11,7 +11,7 @@ const items = [
|
|
|
11
11
|
{ title: '4th level', route: '' },
|
|
12
12
|
]
|
|
13
13
|
|
|
14
|
-
const Template = (args, { argTypes }) => ({
|
|
14
|
+
const Template = (args:any, { argTypes }:{argTypes:any}) => ({
|
|
15
15
|
props: Object.keys(argTypes),
|
|
16
16
|
components: { PsBreadcrumb },
|
|
17
17
|
template: `
|
|
@@ -20,6 +20,3 @@ const Template = (args, { argTypes }) => ({
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
export const Default = Template.bind({})
|
|
23
|
-
Default.args = {
|
|
24
|
-
items: items,
|
|
25
|
-
}
|
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
import PsButton, { sizes } from '
|
|
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
|
+
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 PsCardInfos from '
|
|
1
|
+
import PsCardInfos from '../../../src/components/badges-and-tags/PsCardInfos.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/CardInfos',
|
|
@@ -6,11 +6,10 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
10
10
|
props: Object.keys(argTypes),
|
|
11
11
|
components: { PsCardInfos },
|
|
12
12
|
template: '<PsCardInfos v-bind="$props" />',
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
export const CardInfos = Template.bind({})
|
|
16
|
-
CardInfos.args = {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsChartLegend from '
|
|
1
|
+
import PsChartLegend from '../../../src/components/badges-and-tags/PsChartLegend.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Badges & Tags/Badges/ChartLegend',
|
|
@@ -6,11 +6,10 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const Template = (args, { argTypes }) => ({
|
|
9
|
+
const Template = (args:any, { argTypes } : { argTypes:any }) => ({
|
|
10
10
|
props: Object.keys(argTypes),
|
|
11
11
|
components: { PsChartLegend },
|
|
12
12
|
template: '<PsChartLegend v-bind="$props" />',
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
export const ChartLegend = Template.bind({})
|
|
16
|
-
ChartLegend.args = {}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import PsCheckbox from '
|
|
1
|
+
import PsCheckbox from '../../../src/components/controls/PsCheckbox.vue'
|
|
2
2
|
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Controls & Selectors/Checkbox',
|
|
5
5
|
component: PsCheckbox,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const defaultTemplate = (args, {argTypes}) => ({
|
|
8
|
+
const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsCheckbox},
|
|
11
11
|
template: `
|
|
@@ -1,11 +1,11 @@
|
|
|
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',
|
|
5
5
|
component: PsCheckboxSimple,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const defaultTemplate = (args, {argTypes}) => ({
|
|
8
|
+
const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsCheckboxSimple },
|
|
11
11
|
data: () => ({
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import PsChips from '
|
|
1
|
+
import PsChips from '../../../src/components/chips/PsChips.vue'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
component: PsChips,
|
|
4
|
+
const meta: Meta<typeof PsChips> = {
|
|
5
|
+
component: PsChips
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
19
|
<PsChips v-bind='$props' label="Simple chips with icons" type="button" layout="with-icon" icon="home" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
20
20
|
<PsChips v-bind='$props' label="Radio chips" type="radio" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
21
21
|
<PsChips v-bind='$props' label="Checkbox chips" type="checkbox" @update:checked='isCheckedTwo = $event' :checked='isCheckedTwo'/>
|
|
22
22
|
<PsChips v-bind='$props' label="Rich chips" type="button" layout="rich" icon="text_snippet" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
23
23
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
24
|
+
`,
|
|
25
|
+
args:{
|
|
26
|
+
label: 'Simple Chip',
|
|
27
|
+
icon:'',
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
}
|
package/{src/stories/ClimateZoneBadge.stories.js → doc/src/stories/ClimateZoneBadge.stories.ts}
RENAMED
|
@@ -1,17 +1,18 @@
|
|
|
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',
|
|
5
5
|
component: PsClimateZoneBadge,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const Template = (args, { argTypes }) => ({
|
|
8
|
+
const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsClimateZoneBadge },
|
|
11
11
|
template: '<PsClimateZoneBadge v-bind="$props" />',
|
|
12
12
|
})
|
|
13
13
|
|
|
14
14
|
export const ClimateZoneBadge = Template.bind({})
|
|
15
|
+
// @ts-ignore
|
|
15
16
|
ClimateZoneBadge.args = {
|
|
16
17
|
icon: 'area_chart',
|
|
17
18
|
}
|
|
@@ -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
|
+
}
|