@policystudio/policy-studio-ui-vue 1.0.26 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/psui_styles.css +6011 -496
- package/package.json +1 -1
- package/src/assets/scss/base.scss +40 -3
- package/src/assets/scss/components/PsButton.scss +115 -117
- package/src/assets/scss/components/PsCardInfos.scss +26 -0
- package/src/assets/scss/components/PsChartLegend.scss +25 -0
- package/src/assets/scss/components/PsCheckbox.scss +96 -0
- package/src/assets/scss/components/PsChips.scss +155 -0
- package/src/assets/scss/components/PsClimateZoneBadge.scss +26 -0
- package/src/assets/scss/components/PsCostEffectBar.scss +26 -0
- package/src/assets/scss/components/PsDataTable.scss +50 -0
- package/src/assets/scss/components/PsDialog.scss +10 -1
- package/src/assets/scss/components/PsDotLoader.scss +45 -0
- package/src/assets/scss/components/PsDropdown.scss +44 -0
- package/src/assets/scss/components/PsHighlightRippleDot.scss +48 -0
- package/src/assets/scss/components/PsInlineSelector.scss +96 -0
- package/src/assets/scss/components/PsInputSelect.scss +104 -0
- package/src/assets/scss/components/PsInputTextArea.scss +49 -0
- package/src/assets/scss/components/PsMiniTag.scss +36 -0
- package/src/assets/scss/components/PsProgressBar.scss +24 -0
- package/src/assets/scss/components/PsRadioButton.scss +78 -0
- package/src/assets/scss/components/PsSlider.scss +11 -0
- package/src/assets/scss/components/PsSwitch.scss +66 -0
- package/src/assets/scss/components/PsTabHeader.scss +10 -3
- package/src/assets/scss/components/PsToast.scss +52 -0
- package/src/assets/scss/components/PsToggle.scss +23 -0
- package/src/assets/scss/components/PsTooltip.scss +118 -0
- package/src/components/badges-and-tags/PsCardInfos.vue +14 -7
- package/src/components/badges-and-tags/PsChartLegend.vue +7 -13
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +15 -6
- package/src/components/badges-and-tags/PsCostEffectBar.vue +32 -70
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -69
- package/src/components/badges-and-tags/PsMiniTag.vue +15 -24
- package/src/components/badges-and-tags/PsProgressBar.vue +42 -0
- package/src/components/buttons/PsButton.vue +78 -78
- package/src/components/chips/PsChips.vue +45 -87
- package/src/components/controls/PsCheckbox.vue +58 -134
- package/src/components/controls/PsInlineSelector.vue +123 -0
- package/src/components/controls/PsRadioButton.vue +33 -88
- package/src/components/controls/PsSlider.vue +5 -6
- package/src/components/controls/PsSwitch.vue +29 -81
- package/src/components/controls/PsToggle.vue +45 -39
- package/src/components/datatable/PsDataTable.vue +3 -15
- package/src/components/forms/PsDropdown.vue +28 -12
- package/src/components/forms/PsDropdownCopy.vue +212 -0
- package/src/components/forms/PsInputSelect.vue +88 -0
- package/src/components/forms/PsInputTextArea.vue +80 -0
- package/src/components/notifications/PsDialog.vue +3 -0
- package/src/components/notifications/PsToast.vue +16 -28
- package/src/components/tabs/PsTabHeader.vue +30 -12
- package/src/components/tooltip/PsDialogTooltip.vue +6 -31
- package/src/components/tooltip/PsRichTooltip.vue +37 -44
- package/src/components/tooltip/PsTooltip.vue +18 -28
- package/src/components/ui/PsDotLoader.vue +15 -0
- package/src/components/ui/PsIcon.vue +9 -9
- package/src/index.js +17 -4
- package/src/stories/Button.stories.js +102 -112
- package/src/stories/Checkbox.stories.js +34 -37
- package/src/stories/Chips.stories.js +43 -54
- package/src/stories/ClimateZoneBadge.stories.js +0 -7
- package/src/stories/Colors.stories.mdx +1 -0
- package/src/stories/Dialog.stories.js +1 -1
- package/src/stories/InlineSelector.stories.js +18 -0
- package/src/stories/InputSelect.stories.js +30 -0
- package/src/stories/InputTextArea.stories.js +25 -0
- package/src/stories/MiniTag.stories.js +12 -6
- package/src/stories/RadioButton.stories.js +32 -29
- package/src/stories/Switch.stories.js +33 -0
- package/src/stories/Toast.stories.js +40 -46
- package/src/stories/Tooltip.stories.js +86 -86
- package/tailwind.config.js +8 -1
- package/src/assets/images/check-checkbox-button.svg +0 -1
- package/src/assets/images/radio-checked-button.svg +0 -1
- package/src/stories/Swith.stories.js +0 -38
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import PsInlineSelector from "../components/controls/PsInlineSelector.vue"
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/InlineSelector',
|
|
5
|
+
component: PsInlineSelector,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const TemplateDefault = (args, {argTypes}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: {PsInlineSelector},
|
|
11
|
+
template: `
|
|
12
|
+
<div style="width: auto; margin-right: auto; display: flex; align-items: center;">
|
|
13
|
+
<PsInlineSelector v-bind="$props"></PsInlineSelector>
|
|
14
|
+
</div>
|
|
15
|
+
`
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export const Default = TemplateDefault.bind({})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import PsInputSelect from '../components/forms/PsInputSelect.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/InputSelect',
|
|
5
|
+
component: PsInputSelect
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const TemplateDefault = (args, {argTypes})=> ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: {PsInputSelect},
|
|
11
|
+
template: `
|
|
12
|
+
<div style='display:flex; gap: 30px;'>
|
|
13
|
+
<div style='width:300px; display:flex; flex-direction: column; gap:20px;'>
|
|
14
|
+
<span>Default Select</span>
|
|
15
|
+
<PsInputSelect v-bind="$props" label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
16
|
+
<PsInputSelect v-bind="$props" disabled label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
17
|
+
</div>
|
|
18
|
+
<div style='width:90px; display:flex; flex-direction: column; gap:20px;'>
|
|
19
|
+
<span>Mini Select</span>
|
|
20
|
+
<PsInputSelect v-bind="$props" layout="mini" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
21
|
+
<PsInputSelect v-bind="$props" layout="mini" disabled keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
`
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
export const Default = TemplateDefault.bind({})
|
|
28
|
+
Default.args = {
|
|
29
|
+
items: [{title:'Text 1', value:'Value 1'}, {title:'Text 2', value:'Value 2'}]
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import PsInputTextArea from '../components/forms/PsInputTextArea.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Input Textarea',
|
|
5
|
+
component: PsInputTextArea,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const Template = (args, {argTypes}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: {PsInputTextArea},
|
|
11
|
+
template: `
|
|
12
|
+
<div style='background-color:#F3F6F9; width:400px; height: 100%; padding: 20px 20px; display: flex: display; flex-direction: column;'>
|
|
13
|
+
<div style='display: flex; align-items:center; gap:30px;'>
|
|
14
|
+
<h1>Default</h1>
|
|
15
|
+
<PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" optionalLabel="Optional helper/feedback text"></PsInputTextArea>
|
|
16
|
+
</div>
|
|
17
|
+
<div style='display: flex; align-items:center; gap:30px; margin-top:40px;'>
|
|
18
|
+
<h1>Disable</h1>
|
|
19
|
+
<PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" disabled ></PsInputTextArea>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
`
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
export const Default = Template.bind({})
|
|
@@ -21,26 +21,32 @@ const Template = (args, { argTypes }) => ({
|
|
|
21
21
|
template: '<PsMiniTag v-bind="$props" />',
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
export const Info = Template.bind({})
|
|
25
|
+
Info.args = {
|
|
26
|
+
layout: 'info',
|
|
27
27
|
message: 'This is an info alert',
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export const Success = Template.bind({})
|
|
31
31
|
Success.args = {
|
|
32
|
-
|
|
32
|
+
layout: 'success',
|
|
33
33
|
message: 'This is a success alert',
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export const Warning = Template.bind({})
|
|
37
37
|
Warning.args = {
|
|
38
|
-
|
|
38
|
+
layout: 'warning',
|
|
39
39
|
message: 'This is a warning alert',
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export const Error = Template.bind({})
|
|
43
43
|
Error.args = {
|
|
44
|
-
|
|
44
|
+
layout: 'error',
|
|
45
45
|
message: 'This is an error alert',
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
export const Default = Template.bind({})
|
|
49
|
+
Default.args = {
|
|
50
|
+
layout: 'default',
|
|
51
|
+
message: 'This is a default color',
|
|
52
|
+
}
|
|
@@ -3,35 +3,38 @@ import PsRadioButton from '../components/controls/PsRadioButton.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Radio Button',
|
|
5
5
|
component: PsRadioButton,
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
}
|
|
8
7
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
8
|
+
const DefaultTemplate = (args,{ argTypes}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsRadioButton},
|
|
11
|
+
template: `
|
|
12
|
+
<div style='display: flex; gap: 20px;'>
|
|
13
|
+
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
14
|
+
<span>Resting</span>
|
|
15
|
+
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
16
|
+
<PsRadioButton v-bind='$props' label='Label 1' size='big'/>
|
|
17
|
+
<PsRadioButton v-bind='$props' label='Label 2' size='small'/>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
21
|
+
<span>Active</span>
|
|
22
|
+
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
23
|
+
<PsRadioButton v-bind='$props' label='Label 3' size='big' checked/>
|
|
24
|
+
<PsRadioButton v-bind='$props' label='Label 4' size='small' checked/>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
28
|
+
<span>Disable</span>
|
|
29
|
+
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
30
|
+
<PsRadioButton v-bind='$props' label='Label 5' size='big' disabled/>
|
|
31
|
+
<PsRadioButton v-bind='$props' label='Label 6' size='small' disabled/>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
`
|
|
36
|
+
})
|
|
30
37
|
|
|
31
|
-
export const Default = Template.bind({})
|
|
32
|
-
Default.args = {}
|
|
33
38
|
|
|
34
|
-
export const
|
|
35
|
-
|
|
36
|
-
small: true,
|
|
37
|
-
}
|
|
39
|
+
export const Default = DefaultTemplate.bind({})
|
|
40
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import PsSwitch from '../components/controls/PsSwitch.vue'
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Switch',
|
|
4
|
+
component: PsSwitch,
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const Template = (args, { argTypes }) => ({
|
|
8
|
+
props: Object.keys(argTypes),
|
|
9
|
+
components: { PsSwitch },
|
|
10
|
+
template: `
|
|
11
|
+
<div style='display: flex; gap:10px;'>
|
|
12
|
+
<div style='display: flex; gap: 10px; flex-direction: column; margin-right: 10px;'>
|
|
13
|
+
<span>Size</span>
|
|
14
|
+
<span>BIG</span>
|
|
15
|
+
<span>SMALL</span>
|
|
16
|
+
</div>
|
|
17
|
+
<div style='display: flex; gap: 10px; flex-direction: column;'>
|
|
18
|
+
<span>Disable</span>
|
|
19
|
+
<PsSwitch v-bind="$props" label='Switch1' :value="${false}" size='big'/>
|
|
20
|
+
<PsSwitch v-bind="$props" label='Switch2' :value="${false}" size='small'/>
|
|
21
|
+
</div>
|
|
22
|
+
<div style='display: flex; gap: 10px; flex-direction: column;'>
|
|
23
|
+
<span>Enable</span>
|
|
24
|
+
<PsSwitch v-bind="$props" label='Switch3' value size='big'/>
|
|
25
|
+
<PsSwitch v-bind="$props" label='Switch4' value size='small'/>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
`
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
export const Default = Template.bind({})
|
|
32
|
+
|
|
33
|
+
|
|
@@ -1,58 +1,52 @@
|
|
|
1
|
-
import PsToast
|
|
1
|
+
import PsToast from '../components/notifications/PsToast.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Components/Toast',
|
|
4
4
|
component: PsToast,
|
|
5
|
-
argTypes: {
|
|
6
|
-
type: { control: { type: 'select', options: typeOptions } },
|
|
7
|
-
fill: { control: { type: 'select', options: fillOptions } }
|
|
8
|
-
},
|
|
9
5
|
}
|
|
10
6
|
|
|
11
7
|
const Template = (args, { argTypes }) => ({
|
|
12
8
|
props: Object.keys(argTypes),
|
|
13
9
|
components: { PsToast },
|
|
14
|
-
methods: {
|
|
15
|
-
teste(message) {
|
|
16
|
-
alert(message)
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
10
|
template: `
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
<div style="display: flex; gap: 30px;">
|
|
12
|
+
<div style="display: flex; flex-direction: column; gap: 5px; width:500px;">
|
|
13
|
+
<PsToast v-bind="$props" message="This is a info alert" layout="info" icon="info" fill="intense" >
|
|
14
|
+
<p>Action 1</p>
|
|
15
|
+
<p>Action 2</p>
|
|
16
|
+
</PsToast>
|
|
17
|
+
<PsToast v-bind="$props" message="This is a success alert" layout="success" icon="check_circle" >
|
|
18
|
+
<p>Action 1</p>
|
|
19
|
+
<p>Action 2</p>
|
|
20
|
+
</PsToast>
|
|
21
|
+
<PsToast v-bind="$props" message="This is a warning alert" layout="warning" icon="warning">
|
|
22
|
+
<p>Action 1</p>
|
|
23
|
+
<p>Action 2</p>
|
|
24
|
+
</PsToast>
|
|
25
|
+
<PsToast v-bind="$props" message="This is a an error alert" layout="error" icon="warning" >
|
|
26
|
+
<p>Action 1</p>
|
|
27
|
+
<p>Action 2</p>
|
|
28
|
+
</PsToast>
|
|
29
|
+
</div>
|
|
30
|
+
<div style="display: flex; flex-direction: column; gap: 5px; width:500px;">
|
|
31
|
+
<PsToast v-bind="$props" message="This is a info alert" layout="info" icon="info" fill="soft" >
|
|
32
|
+
<p>Action 1</p>
|
|
33
|
+
<p>Action 2</p>
|
|
34
|
+
</PsToast>
|
|
35
|
+
<PsToast v-bind="$props" message="This is a success alert" layout="success" icon="check_circle" fill="soft">
|
|
36
|
+
<p>Action 1</p>
|
|
37
|
+
<p>Action 2</p>
|
|
38
|
+
</PsToast>
|
|
39
|
+
<PsToast v-bind="$props" message="This is a warning alert" layout="warning" icon="warning" fill="soft">
|
|
40
|
+
<p>Action 1</p>
|
|
41
|
+
<p>Action 2</p>
|
|
42
|
+
</PsToast>
|
|
43
|
+
<PsToast v-bind="$props" message="This is a an error alert" layout="error" icon="warning" fill="soft">
|
|
44
|
+
<p>Action 1</p>
|
|
45
|
+
<p>Action 2</p>
|
|
46
|
+
</PsToast>
|
|
47
|
+
</div>
|
|
48
|
+
<div>
|
|
23
49
|
`
|
|
24
50
|
})
|
|
25
51
|
|
|
26
|
-
export const
|
|
27
|
-
Info.args = {
|
|
28
|
-
type: 'info',
|
|
29
|
-
message: 'This is an info alert',
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const Success = Template.bind({})
|
|
33
|
-
Success.args = {
|
|
34
|
-
type: 'success',
|
|
35
|
-
message: 'This is a success alert',
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const Warning = Template.bind({})
|
|
39
|
-
Warning.args = {
|
|
40
|
-
type: 'warning',
|
|
41
|
-
message: 'This is a warning alert',
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const Error = Template.bind({})
|
|
45
|
-
Error.args = {
|
|
46
|
-
type: 'error',
|
|
47
|
-
message: 'This is an error alert',
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export const Actions = Template.bind({})
|
|
51
|
-
Actions.args = {
|
|
52
|
-
type: 'info',
|
|
53
|
-
message: 'This is an info alert with actions',
|
|
54
|
-
default: `
|
|
55
|
-
<span class="psui-cursor-pointer" @click="teste('Callback Action 1')">ACTION1</span>
|
|
56
|
-
<span class="psui-cursor-pointer" @click="teste('Callback Action 2')">ACTION2</span>
|
|
57
|
-
`
|
|
58
|
-
}
|
|
52
|
+
export const Default = Template.bind({})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PsTooltip from '../components/tooltip/PsTooltip.vue'
|
|
2
2
|
import PsRichTooltip from '../components/tooltip/PsRichTooltip.vue'
|
|
3
|
-
import PsDialogTooltip
|
|
3
|
+
import PsDialogTooltip from '../components/tooltip/PsDialogTooltip.vue'
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Components/Tooltip',
|
|
@@ -12,103 +12,103 @@ const TemplateDialog = (args, {argTypes}) => ({
|
|
|
12
12
|
props: Object.keys(argTypes),
|
|
13
13
|
components: {PsDialogTooltip},
|
|
14
14
|
template: `
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
<div style='display: flex; justify-content: space-between;'>
|
|
16
|
+
<PsDialogTooltip v-bind='$props' layout='white' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
|
|
17
|
+
<template v-slot:trigger>
|
|
18
|
+
<p>Trigger</p>
|
|
19
|
+
</template>
|
|
20
|
+
<template v-slot:content>
|
|
21
|
+
<p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
|
|
22
|
+
</template>
|
|
23
|
+
</PsDialogTooltip>
|
|
24
|
+
<PsDialogTooltip v-bind='$props' layout='dark' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
|
|
25
|
+
<template v-slot:trigger>
|
|
26
|
+
<p>Trigger</p>
|
|
27
|
+
</template>
|
|
28
|
+
<template v-slot:content>
|
|
29
|
+
<p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
|
|
30
|
+
</template>
|
|
31
|
+
</PsDialogTooltip>
|
|
32
|
+
<PsDialogTooltip v-bind='$props' layout='color' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
|
|
33
|
+
<template v-slot:trigger>
|
|
34
|
+
<p>Trigger</p>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-slot:content>
|
|
37
|
+
<p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
|
|
38
|
+
</template>
|
|
39
|
+
</PsDialogTooltip>
|
|
40
|
+
</div>
|
|
20
41
|
`,
|
|
21
|
-
argTypes:{
|
|
22
|
-
type: { control : { type: 'select', options: CSSCOLORS}}
|
|
23
|
-
}
|
|
24
42
|
})
|
|
25
43
|
|
|
26
44
|
const TemplateRich = (args,{argTypes})=>({
|
|
27
45
|
props: Object.keys(argTypes),
|
|
28
46
|
components: {PsRichTooltip},
|
|
29
47
|
template: `
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</
|
|
34
|
-
</
|
|
35
|
-
|
|
48
|
+
<div style='display: flex; justify-content: space-between;'>
|
|
49
|
+
<PsRichTooltip v-bind='$props' layout='red' title='Measures that are not cost-effective cannot be added to a combination' cssClass='psui-w-48'>
|
|
50
|
+
<template v-slot:trigger>
|
|
51
|
+
<p>Trigger</p>
|
|
52
|
+
</template>
|
|
53
|
+
<template v-slot:content>
|
|
54
|
+
<p>Here you can add an optional supporting text</p>
|
|
55
|
+
</template>
|
|
56
|
+
</PsRichTooltip>
|
|
57
|
+
<PsRichTooltip v-bind='$props' layout='blue' title='Select to create a combination of measures for your Policy' cssClass='psui-w-48'>
|
|
58
|
+
<template v-slot:trigger>
|
|
59
|
+
<p>Trigger</p>
|
|
60
|
+
</template>
|
|
61
|
+
<template v-slot:content>
|
|
62
|
+
<p>Here you can add an optional supporting text</p>
|
|
63
|
+
</template>
|
|
64
|
+
</PsRichTooltip>
|
|
65
|
+
<PsRichTooltip v-bind='$props' layout='gray' title='Did not account for the cost of combustion safety testing' cssClass='psui-w-48'>
|
|
66
|
+
<template v-slot:trigger>
|
|
67
|
+
<p>Trigger</p>
|
|
68
|
+
</template>
|
|
69
|
+
<template v-slot:content>
|
|
70
|
+
<p>Here you can add an optional supporting text</p>
|
|
71
|
+
</template>
|
|
72
|
+
</PsRichTooltip>
|
|
73
|
+
</div>
|
|
74
|
+
`
|
|
36
75
|
})
|
|
37
76
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
components: {PsTooltip},
|
|
70
|
-
template: `
|
|
71
|
-
<div style='display: flex; justify-content: flex-start;'>
|
|
72
|
-
<PsTooltip v-bind='$props'>
|
|
73
|
-
<template v-slot:trigger>
|
|
74
|
-
Trigger
|
|
75
|
-
</template>
|
|
76
|
-
</PsTooltip>
|
|
77
|
-
</div>
|
|
78
|
-
`
|
|
77
|
+
const TemplateDefault = (args, {argTypes}) => ({
|
|
78
|
+
props: Object.keys(argTypes),
|
|
79
|
+
components: {PsTooltip},
|
|
80
|
+
template: `
|
|
81
|
+
<div style='display: flex; justify-content: space-between;'>
|
|
82
|
+
<PsTooltip v-bind='$props'>
|
|
83
|
+
<template v-slot:trigger>
|
|
84
|
+
Trigger
|
|
85
|
+
</template>
|
|
86
|
+
<template v-slot:content>
|
|
87
|
+
Basic Tooltip
|
|
88
|
+
</template>
|
|
89
|
+
</PsTooltip>
|
|
90
|
+
<PsTooltip v-bind='$props'>
|
|
91
|
+
<template v-slot:trigger>
|
|
92
|
+
Trigger
|
|
93
|
+
</template>
|
|
94
|
+
<template v-slot:content>
|
|
95
|
+
Basic Tooltip
|
|
96
|
+
</template>
|
|
97
|
+
</PsTooltip>
|
|
98
|
+
<PsTooltip v-bind='$props'>
|
|
99
|
+
<template v-slot:trigger>
|
|
100
|
+
Trigger
|
|
101
|
+
</template>
|
|
102
|
+
<template v-slot:content>
|
|
103
|
+
Basic Tooltip
|
|
104
|
+
</template>
|
|
105
|
+
</PsTooltip>
|
|
106
|
+
</div>
|
|
107
|
+
`
|
|
79
108
|
})
|
|
80
109
|
|
|
81
110
|
export const Dialog = TemplateDialog.bind({})
|
|
82
|
-
Dialog.args = {
|
|
83
|
-
text: 'Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.',
|
|
84
|
-
title: 'Duct Sealing',
|
|
85
|
-
buttonText: 'More info',
|
|
86
|
-
cssClass: 'psui-w-32',
|
|
87
|
-
type: 'color'
|
|
88
|
-
}
|
|
89
111
|
|
|
90
112
|
export const Rich = TemplateRich.bind({})
|
|
91
|
-
Rich.args = {
|
|
92
|
-
type: 'blue',
|
|
93
|
-
title: 'This is a test!!',
|
|
94
|
-
text: 'Here goes your text',
|
|
95
|
-
cssClass: 'psui-w-32'
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export const RightSide = TemplateRight.bind({})
|
|
99
|
-
RightSide.args = {
|
|
100
|
-
title: 'This is a test!!!',
|
|
101
|
-
type: 'red',
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export const Middle = TemplateMiddle.bind({})
|
|
105
|
-
Middle.args = {
|
|
106
|
-
title: 'This is a test!!!',
|
|
107
|
-
type: 'blue',
|
|
108
|
-
}
|
|
109
113
|
|
|
110
|
-
export const
|
|
111
|
-
Left.args = {
|
|
112
|
-
title: 'This is a test!!!',
|
|
113
|
-
type: 'gray',
|
|
114
|
-
}
|
|
114
|
+
export const Default = TemplateDefault.bind({})
|
package/tailwind.config.js
CHANGED
|
@@ -33,6 +33,7 @@ module.exports = {
|
|
|
33
33
|
'yellow-80': '#834C0D',
|
|
34
34
|
|
|
35
35
|
'red-10': '#FCEBEB',
|
|
36
|
+
'red-15': '#EAC5C5',
|
|
36
37
|
'red-20': '#D65C5A',
|
|
37
38
|
'red-70': '#AA3937',
|
|
38
39
|
'red-80': '#832F2E',
|
|
@@ -112,6 +113,7 @@ module.exports = {
|
|
|
112
113
|
'even',
|
|
113
114
|
'first',
|
|
114
115
|
'disabled',
|
|
116
|
+
'checked',
|
|
115
117
|
],
|
|
116
118
|
textColor: [
|
|
117
119
|
'responsive',
|
|
@@ -121,8 +123,13 @@ module.exports = {
|
|
|
121
123
|
'group-hover',
|
|
122
124
|
'first',
|
|
123
125
|
'disabled',
|
|
126
|
+
'checked',
|
|
127
|
+
],
|
|
128
|
+
borderColor: [
|
|
129
|
+
'disabled',
|
|
130
|
+
'hover',
|
|
131
|
+
'checked'
|
|
124
132
|
],
|
|
125
|
-
borderColor: ['disabled'],
|
|
126
133
|
extend: {},
|
|
127
134
|
},
|
|
128
135
|
plugins: [],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 24 24" width="16px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#64b5ce"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/><circle cx="12" cy="12" r="5"/></svg>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import PsSwitch, { sizes } from '../components/controls/PsSwitch.vue'
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Components/Switch',
|
|
4
|
-
component: PsSwitch,
|
|
5
|
-
argTypes: {
|
|
6
|
-
size: { control: { type: 'select', options: sizes } }
|
|
7
|
-
},
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const Template = (args, { argTypes }) => ({
|
|
11
|
-
props: Object.keys(argTypes),
|
|
12
|
-
components: { PsSwitch },
|
|
13
|
-
data: () => {
|
|
14
|
-
return {
|
|
15
|
-
model: true
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
template: `
|
|
19
|
-
<div>
|
|
20
|
-
<PsSwitch v-bind="$props" v-model="model" />
|
|
21
|
-
<p>{{ model }}</p>
|
|
22
|
-
</div>
|
|
23
|
-
`
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
export const Big = Template.bind({})
|
|
27
|
-
Big.args = {
|
|
28
|
-
size: 'big',
|
|
29
|
-
label: 'Switch Big',
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const Small = Template.bind({})
|
|
33
|
-
Small.args = {
|
|
34
|
-
size: 'small',
|
|
35
|
-
label: 'Switch Small',
|
|
36
|
-
small: true
|
|
37
|
-
}
|
|
38
|
-
|