@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.91
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 +67 -81
- package/.github/workflows/deploy-storybook.yml +1 -1
- package/.storybook/PolicyStudio.js +10 -0
- package/.storybook/eventBus.js +3 -0
- package/.storybook/main.js +25 -0
- package/.storybook/manager.js +6 -0
- package/babel.config.js +3 -17
- package/backup-package-lock.json +37194 -0
- package/dist/css/psui_styles.css +110273 -4031
- package/package.json +33 -52
- package/postcss.config.js +1 -1
- package/src/assets/scss/base.scss +23 -27
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +3 -3
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +1 -1
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/components/accordion/PsAccordion.vue +21 -20
- package/src/components/accordion/PsAccordionItem.vue +8 -30
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +4 -8
- package/src/components/badges-and-tags/PsCardInfos.vue +1 -3
- package/src/components/badges-and-tags/PsChartLegend.vue +5 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +5 -4
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
- package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
- package/src/components/badges-and-tags/PsTestimonialCard.vue +4 -6
- package/src/components/buttons/PsButton.vue +88 -85
- package/src/components/chips/PsChips.vue +2 -5
- package/src/components/controls/PsCheckbox.vue +2 -5
- package/src/components/controls/PsCheckboxSimple.vue +4 -4
- package/src/components/controls/PsDraggable.vue +67 -70
- package/src/components/controls/PsInlineSelector.vue +14 -13
- package/src/components/controls/PsRadioButton.vue +5 -10
- package/src/components/controls/PsRadioButtonSimple.vue +3 -3
- package/src/components/controls/PsSlider.vue +6 -6
- package/src/components/controls/PsSwitch.vue +3 -13
- package/src/components/controls/PsToggle.vue +11 -14
- package/src/components/data-graphics/PsBarChart.vue +2 -4
- package/src/components/datatable/PsDataTable.vue +5 -14
- package/src/components/datatable/PsDataTableItem.vue +4 -17
- package/src/components/forms/PsDropdown.vue +5 -8
- package/src/components/forms/PsDropdownList.vue +1 -1
- package/src/components/forms/PsInput.vue +14 -30
- package/src/components/forms/PsInputSelect.vue +11 -33
- package/src/components/forms/PsInputTextArea.vue +4 -15
- package/src/components/navigations/PsBreadcrumb.vue +1 -1
- package/src/components/notifications/PsDialog.vue +5 -11
- package/src/components/notifications/PsSimpleAlert.vue +10 -22
- package/src/components/notifications/PsToast.vue +3 -8
- package/src/components/playground/PsScrollBar.vue +50 -122
- package/src/components/table-results/PsTableResults.vue +60 -76
- package/src/components/table-results/PsTableResultsBody.vue +1 -3
- package/src/components/table-results/PsTableResultsHead.vue +13 -32
- package/src/components/table-results/PsTableResultsHeadComparison.vue +8 -24
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +11 -23
- package/src/components/table-results/PsTableResultsRow.vue +2 -6
- package/src/components/tabs/PsTabHeader.vue +16 -19
- package/src/components/tooltip/PsDialogTooltip.vue +8 -18
- package/src/components/tooltip/PsRichTooltip.vue +5 -12
- package/src/components/tooltip/PsTooltip.vue +9 -17
- package/src/components/ui/PsDotLoader.vue +5 -5
- package/src/components/ui/PsIcon.vue +2 -6
- package/src/{index.ts → index.js} +1 -0
- package/src/stories/{Accordion.stories.ts → Accordion.stories.js} +2 -2
- package/src/stories/{BadgeWithIcon.stories.ts → BadgeWithIcon.stories.js} +1 -1
- package/src/stories/{BarChart.stories.ts → BarChart.stories.js} +1 -1
- package/src/stories/{Breadcrumb.stories.ts → Breadcrumb.stories.js} +4 -1
- package/src/stories/Button.stories.js +130 -0
- package/src/stories/{CardInfos.stories.ts → CardInfos.stories.js} +2 -1
- package/src/stories/{ChartLegend.stories.ts → ChartLegend.stories.js} +2 -1
- package/src/stories/{Checkbox.stories.ts → Checkbox.stories.js} +1 -1
- package/src/stories/{CheckboxSimple.stories.ts → CheckboxSimple.stories.js} +1 -1
- package/src/stories/{Chips.stories.ts → Chips.stories.js} +22 -24
- package/src/stories/{ClimateZoneBadge.stories.ts → ClimateZoneBadge.stories.js} +1 -1
- package/src/stories/{CostEffectBar.stories.ts → CostEffectBar.stories.js} +1 -1
- package/src/stories/{Datatable.stories.ts → Datatable.stories.js} +2 -2
- package/src/stories/{DateCardInfo.stories.ts → DateCardInfo.stories.js} +5 -1
- package/src/stories/{ElevationSystem.mdx → ElevationSystem.stories.mdx} +1 -1
- package/src/stories/{InlineSelector.stories.ts → InlineSelector.stories.js} +1 -1
- package/src/stories/{InputTextArea.stories.ts → InputTextArea.stories.js} +1 -1
- package/src/stories/{Introduction.mdx → Introduction.stories.mdx} +101 -101
- package/src/stories/{RadioButtonSimple.stories.ts → RadioButtonSimple.stories.js} +1 -1
- package/src/stories/{Toggle.stories.ts → Toggle.stories.js} +1 -1
- package/src/stories/{Tooltip.stories.ts → Tooltip.stories.js} +3 -3
- package/src/stories/{Typography.mdx → Typography.stories.mdx} +105 -107
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +4 -4
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -7
- package/tailwind.config.js +2 -11
- package/.eslintignore +0 -1
- package/.storybook/PolicyStudio.ts +0 -11
- package/.storybook/eventBus.ts +0 -26
- package/.storybook/main.ts +0 -21
- package/.storybook/manager.ts +0 -7
- package/scripts/kill-port.sh +0 -12
- package/src/App.vue +0 -30
- package/src/shims-vue.d.ts +0 -11
- 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/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/tsconfig.json +0 -42
- package/webpack.config.js +0 -22
- /package/.storybook/{preview.ts → preview.js} +0 -0
- /package/src/contents/{ComparisonData.ts → ComparisonData.js} +0 -0
- /package/src/contents/{FlexibleData.ts → FlexibleData.js} +0 -0
- /package/src/contents/{ResultsData.ts → ResultsData.js} +0 -0
- /package/src/stories/{Colors.mdx → Colors.stories.mdx} +0 -0
- /package/src/stories/{Dialog.stories.ts → Dialog.stories.js} +0 -0
- /package/src/stories/{Draggable.stories.ts → Draggable.stories.js} +0 -0
- /package/src/stories/{Dropdown.stories.ts → Dropdown.stories.js} +0 -0
- /package/src/stories/{DropdownList.stories.ts → DropdownList.stories.js} +0 -0
- /package/src/stories/{HighlightRippleDot.stories.ts → HighlightRippleDot.stories.js} +0 -0
- /package/src/stories/{Icon.stories.ts → Icon.stories.js} +0 -0
- /package/src/stories/{Input.stories.ts → Input.stories.js} +0 -0
- /package/src/stories/{InputSelect.stories.ts → InputSelect.stories.js} +0 -0
- /package/src/stories/{MiniTag.stories.ts → MiniTag.stories.js} +0 -0
- /package/src/stories/{Playground.stories.ts → Playground.stories.js} +0 -0
- /package/src/stories/{ProgressBar.stories.ts → ProgressBar.stories.js} +0 -0
- /package/src/stories/{RadioButton.stories.ts → RadioButton.stories.js} +0 -0
- /package/src/stories/{SimpleAlert.stories.ts → SimpleAlert.stories.js} +0 -0
- /package/src/stories/{Slider.stories.ts → Slider.stories.js} +0 -0
- /package/src/stories/{Switch.stories.ts → Switch.stories.js} +0 -0
- /package/src/stories/{TabHeader.stories.ts → TabHeader.stories.js} +0 -0
- /package/src/stories/{TableResults.stories.ts → TableResults.stories.js} +0 -0
- /package/src/stories/{TagScope.stories.ts → TagScope.stories.js} +0 -0
- /package/src/stories/{TestimonialCard.stories.ts → TestimonialCard.stories.js} +0 -0
- /package/src/stories/{Toast.stories.ts → Toast.stories.js} +0 -0
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="tooltip"
|
|
4
|
-
class=
|
|
4
|
+
class='psui-el-tooltip'
|
|
5
5
|
@mouseenter="open"
|
|
6
6
|
@mouseleave="close"
|
|
7
7
|
>
|
|
8
|
-
<div
|
|
9
|
-
|
|
10
|
-
class="psui-el-tooltip-trigger"
|
|
11
|
-
>
|
|
12
|
-
<slot name="trigger" />
|
|
8
|
+
<div ref="tooltiptrigger" class='psui-el-tooltip-trigger'>
|
|
9
|
+
<slot name="trigger"></slot>
|
|
13
10
|
</div>
|
|
14
11
|
|
|
15
12
|
<div
|
|
16
|
-
class=
|
|
13
|
+
class='psui-el-tooltip-wrapper'
|
|
17
14
|
>
|
|
18
15
|
<div
|
|
19
16
|
role="menu"
|
|
20
17
|
ref="dialog"
|
|
21
|
-
class=
|
|
18
|
+
class='psui-el-tooltip-dialog'
|
|
22
19
|
:class="cssClass"
|
|
23
20
|
>
|
|
24
21
|
<div
|
|
@@ -26,14 +23,9 @@
|
|
|
26
23
|
aria-orientation="vertical"
|
|
27
24
|
:class="getComponentClass"
|
|
28
25
|
>
|
|
29
|
-
<h2 v-if="title">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div
|
|
33
|
-
v-else
|
|
34
|
-
class="psui-el-tooltip-content-wrapper"
|
|
35
|
-
>
|
|
36
|
-
<slot name="content" />
|
|
26
|
+
<h2 v-if="title">{{ title}}</h2>
|
|
27
|
+
<div v-else class="psui-el-tooltip-content-wrapper">
|
|
28
|
+
<slot name="content"></slot>
|
|
37
29
|
</div>
|
|
38
30
|
</div>
|
|
39
31
|
</div>
|
|
@@ -102,7 +94,7 @@ export default {
|
|
|
102
94
|
mounted() {
|
|
103
95
|
document.addEventListener('resize', this.updatePosition)
|
|
104
96
|
},
|
|
105
|
-
|
|
97
|
+
beforeDestroy() {
|
|
106
98
|
document.removeEventListener('resize', this.updatePosition)
|
|
107
99
|
},
|
|
108
100
|
methods: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="psui-el-dotloader">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
<div class="psui-el-dotloader-wrapper">
|
|
4
|
+
<span></span>
|
|
5
|
+
<span></span>
|
|
6
|
+
<span></span>
|
|
7
|
+
</div>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
@@ -8,11 +8,7 @@
|
|
|
8
8
|
>
|
|
9
9
|
{{ getIcon }}
|
|
10
10
|
</span>
|
|
11
|
-
<img
|
|
12
|
-
v-else-if="getIconType === 'url'"
|
|
13
|
-
:src="icon"
|
|
14
|
-
:class="[iconClasses]"
|
|
15
|
-
>
|
|
11
|
+
<img v-else-if="getIconType === 'url'" :src="icon" :class="[iconClasses]" />
|
|
16
12
|
<inline-svg
|
|
17
13
|
v-else
|
|
18
14
|
:src="icon"
|
|
@@ -20,7 +16,7 @@
|
|
|
20
16
|
:height="size"
|
|
21
17
|
:stroke="getColor"
|
|
22
18
|
:fill="getColor"
|
|
23
|
-
|
|
19
|
+
></inline-svg>
|
|
24
20
|
</div>
|
|
25
21
|
</template>
|
|
26
22
|
|
|
@@ -8,8 +8,8 @@ export default {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
export const Index = (args
|
|
12
|
-
props: Object.keys(
|
|
11
|
+
export const Index = (args, { argTypes }) => ({
|
|
12
|
+
props: Object.keys(argTypes, args),
|
|
13
13
|
components: { PsAccordion, PsAccordionItem },
|
|
14
14
|
template:
|
|
15
15
|
`
|
|
@@ -11,7 +11,7 @@ const items = [
|
|
|
11
11
|
{ title: '4th level', route: '' },
|
|
12
12
|
]
|
|
13
13
|
|
|
14
|
-
const Template = (args
|
|
14
|
+
const Template = (args, { argTypes }) => ({
|
|
15
15
|
props: Object.keys(argTypes),
|
|
16
16
|
components: { PsBreadcrumb },
|
|
17
17
|
template: `
|
|
@@ -20,3 +20,6 @@ const Template = (args:any, { argTypes }:{argTypes:any}) => ({
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
export const Default = Template.bind({})
|
|
23
|
+
Default.args = {
|
|
24
|
+
items: items,
|
|
25
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import PsButton, { sizes } from '../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({})
|
|
@@ -6,10 +6,11 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const Template = (args
|
|
9
|
+
const Template = (args, { argTypes }) => ({
|
|
10
10
|
props: Object.keys(argTypes),
|
|
11
11
|
components: { PsCardInfos },
|
|
12
12
|
template: '<PsCardInfos v-bind="$props" />',
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
export const CardInfos = Template.bind({})
|
|
16
|
+
CardInfos.args = {}
|
|
@@ -6,10 +6,11 @@ export default {
|
|
|
6
6
|
argTypes: {},
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const Template = (args
|
|
9
|
+
const Template = (args, { argTypes }) => ({
|
|
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,33 +1,31 @@
|
|
|
1
1
|
import PsChips from '../components/chips/PsChips.vue'
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
component: PsChips
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Chips',
|
|
5
|
+
component: PsChips,
|
|
8
6
|
}
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
const Template = (args, { argTypes }) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsChips },
|
|
11
|
+
data: ()=>{
|
|
12
|
+
return{
|
|
13
|
+
isChecked: true,
|
|
14
|
+
isCheckedTwo: null,
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
template: `<div style="display:flex; gap: 10px;">
|
|
18
|
+
<PsChips v-bind='$props' type="button" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
21
19
|
<PsChips v-bind='$props' label="Simple chips with icons" type="button" layout="with-icon" icon="home" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
22
20
|
<PsChips v-bind='$props' label="Radio chips" type="radio" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
23
21
|
<PsChips v-bind='$props' label="Checkbox chips" type="checkbox" @update:checked='isCheckedTwo = $event' :checked='isCheckedTwo'/>
|
|
24
22
|
<PsChips v-bind='$props' label="Rich chips" type="button" layout="rich" icon="text_snippet" @update:checked='isChecked = $event' :checked='isChecked'/>
|
|
25
23
|
</div>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
24
|
+
`
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
export const Default = Template.bind({})
|
|
28
|
+
Default.args = {
|
|
29
|
+
label: 'Simple Chip',
|
|
30
|
+
icon:'',
|
|
31
|
+
}
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
component: PsClimateZoneBadge,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const Template = (args
|
|
8
|
+
const Template = (args, { argTypes }) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsClimateZoneBadge },
|
|
11
11
|
template: '<PsClimateZoneBadge v-bind="$props" />',
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
},
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const Template = (args
|
|
16
|
+
const Template = (args, { argTypes }) => ({
|
|
17
17
|
props: Object.keys(argTypes),
|
|
18
18
|
components: { PsCostEffectBar },
|
|
19
19
|
template: '<PsCostEffectBar v-bind="$props" />',
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const Template = (args
|
|
13
|
+
const Template = (args, { argTypes }) => ({
|
|
14
14
|
props: Object.keys(argTypes),
|
|
15
15
|
components: {PsDataTable},
|
|
16
16
|
template: `
|
|
@@ -20,7 +20,7 @@ const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
|
|
|
20
20
|
`
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
const RichTemplate = (args
|
|
23
|
+
const RichTemplate = (args, { argTypes } ) => ({
|
|
24
24
|
props: Object.keys(argTypes),
|
|
25
25
|
components: {PsDataTable, PsDataTableItem},
|
|
26
26
|
template: `
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
component: PsDateCardInfo,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const Template = (args
|
|
8
|
+
const Template = (args,{argTypes}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components:{PsDateCardInfo},
|
|
11
11
|
template: `
|
|
@@ -18,3 +18,7 @@ export default {
|
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
export const Default = Template.bind({})
|
|
21
|
+
|
|
22
|
+
Default.args = {
|
|
23
|
+
date: '2021/02/23'
|
|
24
|
+
}
|