@policystudio/policy-studio-ui-vue 1.0.19 → 1.0.20
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 +1 -2
- package/.storybook/main.js +3 -3
- package/.storybook/preview.js +1 -1
- package/README.md +8 -0
- package/babel.config.js +3 -0
- package/backup-package-lock.json +37194 -0
- package/dist/css/psui_styles.css +31 -50
- package/package.json +28 -22
- package/src/assets/scss/base.scss +1 -28
- package/src/components/accordion/PsAccordion.vue +9 -1
- package/src/components/accordion/PsAccordionItem.vue +1 -1
- package/src/components/buttons/PsButton.vue +32 -12
- package/src/components/chips/PsChips.vue +46 -28
- package/src/components/controls/PsDraggable.vue +27 -2
- package/src/components/controls/PsRadioButton.vue +63 -38
- package/src/components/controls/PsSwitch.vue +75 -76
- package/src/components/datatable/PsDataTable.vue +25 -29
- package/src/components/datatable/PsDataTableItem.vue +2 -2
- package/src/components/tooltip/PsDialogTooltip.vue +79 -0
- package/src/components/tooltip/PsRichTooltip.vue +38 -0
- package/src/components/tooltip/PsTooltip.vue +120 -0
- package/src/components/ui/PsIcon.vue +87 -24
- package/src/index.js +15 -1
- package/src/stories/Accordion.stories.js +2 -2
- package/src/stories/Button.stories.js +11 -11
- package/src/stories/Checkbox.stories.js +6 -6
- package/src/stories/Chips.stories.js +7 -7
- package/src/stories/Colors.stories.mdx +35 -35
- package/src/stories/Datatable.stories.js +15 -8
- package/src/stories/Dialog.stories.js +9 -9
- package/src/stories/Draggable.stories.js +24 -0
- package/src/stories/Dropdown.stories.js +5 -5
- package/src/stories/Input.stories.js +10 -10
- package/src/stories/RadioButton.stories.js +14 -14
- package/src/stories/Slider.stories.js +9 -9
- package/src/stories/Swith.stories.js +10 -10
- package/src/stories/TabHeader.stories.js +9 -9
- package/src/stories/Toast.stories.js +13 -13
- package/src/stories/Toggle.stories.js +5 -5
- package/src/stories/Tooltip.stories.js +113 -0
- package/src/util/GeneralFunctions.js +8 -8
- package/src/util/imageLoader.js +50 -0
- package/tailwind.config.js +1 -0
- package/src/assets/scss/tailwind.css +0 -70643
- package/src/assets/scss/tailwind.scss +0 -61088
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="display: contents">
|
|
3
|
-
<
|
|
4
|
-
v-if="
|
|
3
|
+
<span
|
|
4
|
+
v-if="getIconType === 'material-icons'"
|
|
5
|
+
class="material-icons-round"
|
|
5
6
|
:class="[getIconClasses]"
|
|
6
7
|
>
|
|
7
|
-
|
|
8
|
-
</
|
|
9
|
-
<img v-else-if="
|
|
8
|
+
{{ getIcon }}
|
|
9
|
+
</span>
|
|
10
|
+
<img v-else-if="getIconType === 'url'" :src="icon" :class="[iconClasses]" />
|
|
10
11
|
<inline-svg
|
|
11
12
|
v-else
|
|
12
|
-
:src="
|
|
13
|
-
width="
|
|
14
|
-
height="
|
|
15
|
-
stroke="
|
|
13
|
+
:src="icon"
|
|
14
|
+
:width="getWidth"
|
|
15
|
+
:height="getHeight"
|
|
16
|
+
:stroke="getColor"
|
|
17
|
+
:fill="getColor"
|
|
16
18
|
></inline-svg>
|
|
17
19
|
</div>
|
|
18
20
|
</template>
|
|
19
21
|
|
|
20
22
|
<script>
|
|
23
|
+
import tailwindConfig from '../../../tailwind.config'
|
|
24
|
+
import imageLoader from '../../util/imageLoader'
|
|
21
25
|
export default {
|
|
22
|
-
name: '
|
|
26
|
+
name: 'AppIcon',
|
|
23
27
|
props: {
|
|
24
28
|
icon: {
|
|
25
29
|
type: String,
|
|
@@ -27,39 +31,98 @@ export default {
|
|
|
27
31
|
},
|
|
28
32
|
type: {
|
|
29
33
|
type: String,
|
|
30
|
-
default: 'material-icons'
|
|
31
34
|
},
|
|
32
35
|
iconClasses: {
|
|
33
36
|
type: String
|
|
34
37
|
},
|
|
35
38
|
size: {
|
|
36
|
-
type: [Number, String]
|
|
39
|
+
type: [Number, String],
|
|
37
40
|
},
|
|
38
41
|
width: {
|
|
39
|
-
type: Number
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 24
|
|
40
44
|
},
|
|
41
45
|
height: {
|
|
42
|
-
type: Number
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 24
|
|
43
48
|
},
|
|
44
49
|
stroke: {
|
|
45
50
|
type: String,
|
|
51
|
+
default: null
|
|
46
52
|
},
|
|
47
53
|
color: {
|
|
48
|
-
type: String
|
|
54
|
+
type: String,
|
|
55
|
+
default: null,
|
|
56
|
+
validator: value => {
|
|
57
|
+
return value.includes('psui-text-') &&
|
|
58
|
+
typeof(tailwindConfig.theme.colors[value.replace('psui-text-', '')]) != 'undefined' ||
|
|
59
|
+
typeof(tailwindConfig.theme.colors[value]) != 'undefined'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
loaderIcon: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: 'hourglass_top'
|
|
65
|
+
},
|
|
66
|
+
loaderErrorIcon: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: 'more_horiz'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
data() {
|
|
72
|
+
return {
|
|
73
|
+
finishedImageLoad: false,
|
|
74
|
+
imageLoadError: false
|
|
49
75
|
}
|
|
50
|
-
|
|
51
76
|
},
|
|
52
77
|
computed: {
|
|
78
|
+
getIconType() {
|
|
79
|
+
if(this.imageLoadError || !this.finishedImageLoad) return 'material-icons'
|
|
80
|
+
if(this.type) return this.type
|
|
81
|
+
if(!this.icon.includes('/')) return 'material-icons'
|
|
82
|
+
if(!this.icon.includes('.svg')) return 'url'
|
|
83
|
+
return 'svg'
|
|
84
|
+
},
|
|
85
|
+
getIcon() {
|
|
86
|
+
if(!this.icon.includes('/')) return this.icon
|
|
87
|
+
if(!this.finishedImageLoad && !this.imageLoadError && this.loaderIcon) return this.loaderIcon
|
|
88
|
+
if(this.imageLoadError) return this.loaderErrorIcon
|
|
89
|
+
return this.icon ? this.icon : ''
|
|
90
|
+
},
|
|
53
91
|
getIconClasses() {
|
|
54
92
|
if(this.iconClasses) return this.iconClasses
|
|
55
|
-
|
|
56
|
-
const color = this.iconColor.length > 0 ? `psui-text-${this.iconColor}` : ''
|
|
57
|
-
return `psui-mr-2 psui-my-auto material-icons ${size} ${color}`
|
|
93
|
+
return `${this.size} ${this.color}`
|
|
58
94
|
},
|
|
95
|
+
getWidth() {
|
|
96
|
+
if(this.size) return this.size
|
|
97
|
+
return this.width
|
|
98
|
+
},
|
|
99
|
+
getHeight() {
|
|
100
|
+
if(this.size) return this.size
|
|
101
|
+
return this.height
|
|
102
|
+
},
|
|
103
|
+
getColor() {
|
|
104
|
+
if(this.getIconType === 'material-icons') return this.color
|
|
105
|
+
return tailwindConfig.theme.colors[this.color.replace('psui-text-', '')] || tailwindConfig.theme.colors[this.color]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
watch: {
|
|
109
|
+
'icon': function() {
|
|
110
|
+
this.loadImage()
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
mounted() {
|
|
114
|
+
if(this.icon.includes('/')) this.loadImage()
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
loadImage() {
|
|
118
|
+
imageLoader({ imageUrl: this.icon, returnsBase64: false })
|
|
119
|
+
.then(() => {
|
|
120
|
+
this.finishedImageLoad = true
|
|
121
|
+
})
|
|
122
|
+
.catch(() => {
|
|
123
|
+
this.imageLoadError = true
|
|
124
|
+
})
|
|
125
|
+
}
|
|
59
126
|
}
|
|
60
127
|
}
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<style>
|
|
64
|
-
|
|
65
|
-
</style>
|
|
128
|
+
</script>
|
package/src/index.js
CHANGED
|
@@ -13,6 +13,11 @@ import PsAccordionItem from './components/accordion/PsAccordionItem.vue'
|
|
|
13
13
|
import PsChips from './components/chips/PsChips.vue'
|
|
14
14
|
import PsDataTable from './components/datatable/PsDataTable.vue'
|
|
15
15
|
import PsDataTableItem from './components/datatable/PsDataTableItem.vue'
|
|
16
|
+
import PsIcon from './components/ui/PsIcon.vue'
|
|
17
|
+
import PsTooltip from './components/tooltip/PsTooltip.vue'
|
|
18
|
+
import PsRichTooltip from './components/tooltip/PsRichTooltip.vue'
|
|
19
|
+
import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
|
|
20
|
+
import PsDraggable from './components/controls/PsDraggable.vue'
|
|
16
21
|
|
|
17
22
|
export default {
|
|
18
23
|
install(Vue) {
|
|
@@ -31,6 +36,11 @@ export default {
|
|
|
31
36
|
Vue.component('PsChips', PsChips)
|
|
32
37
|
Vue.component('PsDataTable', PsDataTable)
|
|
33
38
|
Vue.component('PsDataTableItem', PsDataTableItem)
|
|
39
|
+
Vue.component('PsIcon', PsIcon)
|
|
40
|
+
Vue.component('PsTooltip', PsTooltip)
|
|
41
|
+
Vue.component('PsRichTooltip', PsRichTooltip)
|
|
42
|
+
Vue.component('PsDialogTooltip', PsDialogTooltip)
|
|
43
|
+
Vue.component('PsDraggable', PsDraggable)
|
|
34
44
|
}
|
|
35
45
|
}
|
|
36
46
|
|
|
@@ -49,5 +59,9 @@ export {
|
|
|
49
59
|
PsAccordionItem,
|
|
50
60
|
PsChips,
|
|
51
61
|
PsDataTable,
|
|
52
|
-
PsDataTableItem
|
|
62
|
+
PsDataTableItem,
|
|
63
|
+
PsTooltip,
|
|
64
|
+
PsRichTooltip,
|
|
65
|
+
PsDialogTooltip,
|
|
66
|
+
PsDraggable
|
|
53
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PsAccordionItem, {iconTypes, fontCss} from "../components/accordion/PsAccordionItem.vue"
|
|
2
|
-
import PsAccordion, {sizes} from "../components/accordion/PsAccordion.vue"
|
|
1
|
+
import PsAccordionItem, {iconTypes, fontCss} from "../components/accordion/PsAccordionItem.vue"
|
|
2
|
+
import PsAccordion, {sizes} from "../components/accordion/PsAccordion.vue"
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/Accordion',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsButton, { sizes } from '../components/buttons/PsButton.vue'
|
|
1
|
+
import PsButton, { sizes } from '../components/buttons/PsButton.vue'
|
|
2
2
|
const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Button',
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
icon: { control: { type: 'select', options: icons} },
|
|
10
10
|
iconRight: { control: { type: 'select', options: icons} }
|
|
11
11
|
},
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
|
|
14
14
|
const Template = (args, { argTypes }) => ({
|
|
15
15
|
props: Object.keys(argTypes),
|
|
@@ -17,38 +17,38 @@ const Template = (args, { argTypes }) => ({
|
|
|
17
17
|
template: `
|
|
18
18
|
<PsButton v-bind="$props" />
|
|
19
19
|
`
|
|
20
|
-
})
|
|
20
|
+
})
|
|
21
21
|
|
|
22
|
-
export const Solid = Template.bind({})
|
|
22
|
+
export const Solid = Template.bind({})
|
|
23
23
|
Solid.args = {
|
|
24
24
|
label: 'Solid button',
|
|
25
25
|
size: 'big',
|
|
26
26
|
disabled: false,
|
|
27
27
|
iconRight: 'add_circle'
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
|
|
30
|
-
export const Outline = Template.bind({})
|
|
30
|
+
export const Outline = Template.bind({})
|
|
31
31
|
Outline.args = {
|
|
32
32
|
label: 'Outline button',
|
|
33
33
|
size: 'big',
|
|
34
34
|
disabled: false,
|
|
35
35
|
icon: 'add_circle',
|
|
36
36
|
outline: true
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
38
|
|
|
39
|
-
export const Ghost = Template.bind({})
|
|
39
|
+
export const Ghost = Template.bind({})
|
|
40
40
|
Ghost.args = {
|
|
41
41
|
label: 'Ghost button',
|
|
42
42
|
size: 'big',
|
|
43
43
|
disabled: false,
|
|
44
44
|
ghost: true
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
|
|
47
|
-
export const TextOnly = Template.bind({})
|
|
47
|
+
export const TextOnly = Template.bind({})
|
|
48
48
|
TextOnly.args = {
|
|
49
49
|
label: 'TextOnly button',
|
|
50
50
|
disabled: false,
|
|
51
51
|
icon: 'add_circle',
|
|
52
52
|
size: 'big',
|
|
53
53
|
textOnly: true,
|
|
54
|
-
}
|
|
54
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import PsCheckbox
|
|
2
|
-
const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
1
|
+
import PsCheckbox from '../components/controls/PsCheckbox.vue'
|
|
2
|
+
// const icons = ['add_circle', 'delete', 'done', 'info', 'send']
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Checkbox',
|
|
5
5
|
component: PsCheckbox,
|
|
6
6
|
argTypes: {
|
|
7
7
|
disabled: { control: 'boolean' },
|
|
8
8
|
},
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
|
|
11
11
|
const Template = (args, { argTypes }) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
@@ -36,13 +36,13 @@ const Template = (args, { argTypes }) => ({
|
|
|
36
36
|
<p>Checked: {{ selected }}</p>
|
|
37
37
|
</div>
|
|
38
38
|
`
|
|
39
|
-
})
|
|
39
|
+
})
|
|
40
40
|
|
|
41
|
-
export const Default = Template.bind({})
|
|
41
|
+
export const Default = Template.bind({})
|
|
42
42
|
Default.args = {
|
|
43
43
|
size: 18,
|
|
44
44
|
disabled: false,
|
|
45
45
|
label: 'Label',
|
|
46
46
|
labelClasses: '',
|
|
47
|
-
}
|
|
47
|
+
}
|
|
48
48
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsChips
|
|
1
|
+
import PsChips from "../components/chips/PsChips.vue"
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Chips',
|
|
@@ -14,36 +14,36 @@ const Template = (args, { argTypes }) => ({
|
|
|
14
14
|
`
|
|
15
15
|
})
|
|
16
16
|
|
|
17
|
-
export const Simple = Template.bind({})
|
|
17
|
+
export const Simple = Template.bind({})
|
|
18
18
|
Simple.args = {
|
|
19
19
|
title: 'Simple Chip',
|
|
20
20
|
icon:"",
|
|
21
21
|
type: 'text'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export const SimpleWithIcon = Template.bind({})
|
|
24
|
+
export const SimpleWithIcon = Template.bind({})
|
|
25
25
|
SimpleWithIcon.args = {
|
|
26
26
|
title: 'Simple With Icon',
|
|
27
27
|
icon: 'home',
|
|
28
28
|
type: 'text'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export const Radio = Template.bind({})
|
|
31
|
+
export const Radio = Template.bind({})
|
|
32
32
|
Radio.args = {
|
|
33
33
|
title: 'Radio Chip',
|
|
34
34
|
type:'radio'
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export const Checkbox = Template.bind({})
|
|
37
|
+
export const Checkbox = Template.bind({})
|
|
38
38
|
Checkbox.args = {
|
|
39
39
|
title: 'Checkbox Chip',
|
|
40
40
|
type: 'checkbox'
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export const Rich = Template.bind({})
|
|
43
|
+
export const Rich = Template.bind({})
|
|
44
44
|
Rich.args = {
|
|
45
45
|
title: 'Rich chips',
|
|
46
46
|
type: 'text',
|
|
47
47
|
icon: 'description',
|
|
48
|
-
rich:
|
|
48
|
+
rich: true
|
|
49
49
|
}
|
|
@@ -11,59 +11,59 @@ Out colors are designed to be harmonious, ensure accessible text, and distinguis
|
|
|
11
11
|
|
|
12
12
|
## Blue
|
|
13
13
|
<div class="psui-flex">
|
|
14
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue click-to-copy" data-to-copy="
|
|
15
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-80 click-to-copy" data-to-copy="
|
|
16
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-70 click-to-copy" data-to-copy="
|
|
17
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-60 click-to-copy" data-to-copy="
|
|
18
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-50 click-to-copy" data-to-copy="
|
|
19
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-blue-20 click-to-copy" data-to-copy="
|
|
20
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-blue-10 click-to-copy" data-to-copy="
|
|
21
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-white click-to-copy" data-to-copy="
|
|
14
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue click-to-copy" data-to-copy="psui-bg-blue">Blue #5094D3</div>
|
|
15
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-80 click-to-copy" data-to-copy="psui-bg-blue-80">Blue 80 <div>#002A3A</div></div>
|
|
16
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-70 click-to-copy" data-to-copy="psui-bg-blue-70">Blue 70 <div>#00465F</div></div>
|
|
17
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-60 click-to-copy" data-to-copy="psui-bg-blue-60">Blue 60 <div>#318FAC</div></div>
|
|
18
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-50 click-to-copy" data-to-copy="psui-bg-blue-50">Blue 50 <div>#64B5CE</div></div>
|
|
19
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-blue-20 click-to-copy" data-to-copy="psui-bg-blue-20">Blue 20 <div>#E0EFF6</div></div>
|
|
20
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-blue-10 click-to-copy" data-to-copy="psui-bg-blue-10">Blue 10 <div>#ECF7FB</div></div>
|
|
21
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-white click-to-copy" data-to-copy="psui-bg-white">White <div>#FFFFFF</div></div>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
## Gray
|
|
25
25
|
<div class="psui-flex">
|
|
26
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-80 click-to-copy" data-to-copy="
|
|
27
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-70 click-to-copy" data-to-copy="
|
|
28
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-60 click-to-copy" data-to-copy="
|
|
29
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-50 click-to-copy" data-to-copy="
|
|
30
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-40 click-to-copy" data-to-copy="
|
|
31
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-30 click-to-copy" data-to-copy="
|
|
32
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-20 click-to-copy" data-to-copy="
|
|
33
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-10 click-to-copy" data-to-copy="
|
|
26
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-80 click-to-copy" data-to-copy="psui-bg-gray-80">Gray 80 <div>#28323B</div></div>
|
|
27
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-70 click-to-copy" data-to-copy="psui-bg-gray-70">Gray 70 <div>#34404A</div></div>
|
|
28
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-60 click-to-copy" data-to-copy="psui-bg-gray-60">Gray 60 <div>#515E6A</div></div>
|
|
29
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-50 click-to-copy" data-to-copy="psui-bg-gray-50">Gray 50 <div>#798490</div></div>
|
|
30
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-40 click-to-copy" data-to-copy="psui-bg-gray-40">Gray 40 <div>#A2ACB7</div></div>
|
|
31
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-30 click-to-copy" data-to-copy="psui-bg-gray-30">Gray 30 <div>#D6DDE5</div></div>
|
|
32
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-20 click-to-copy" data-to-copy="psui-bg-gray-20">Gray 20 <div>#E6ECF2</div></div>
|
|
33
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-10 click-to-copy" data-to-copy="psui-bg-gray-10">Gray 10 <div>#F3F6F9</div></div>
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
36
|
## Yellow
|
|
37
37
|
<div class="psui-flex">
|
|
38
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-80 click-to-copy" data-to-copy="
|
|
39
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-70 click-to-copy" data-to-copy="
|
|
40
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-20 click-to-copy" data-to-copy="
|
|
41
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-yellow-20 psui-bg-yellow-10 click-to-copy" data-to-copy="
|
|
38
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-80 click-to-copy" data-to-copy="psui-bg-yellow-80">Yellow 80 <div>#834C0D</div></div>
|
|
39
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-70 click-to-copy" data-to-copy="psui-bg-yellow-70">Yellow 70 <div>#B87305</div></div>
|
|
40
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-20 click-to-copy" data-to-copy="psui-bg-yellow-20">Yellow 20 <div>#EDAB3E</div></div>
|
|
41
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-yellow-20 psui-bg-yellow-10 click-to-copy" data-to-copy="psui-bg-yellow-10">Yellow 10 <div>#FDF3E3</div></div>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
44
|
## Green
|
|
45
45
|
<div class="psui-flex">
|
|
46
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-80 click-to-copy" data-to-copy="
|
|
47
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-70 click-to-copy" data-to-copy="
|
|
48
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-20 click-to-copy" data-to-copy="
|
|
49
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-green-20 psui-bg-green-10 click-to-copy" data-to-copy="
|
|
46
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-80 click-to-copy" data-to-copy="psui-bg-green-80">Green 80 <div>#286943</div></div>
|
|
47
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-70 click-to-copy" data-to-copy="psui-bg-green-70">Green 70 <div>#44A06A</div></div>
|
|
48
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-20 click-to-copy" data-to-copy="psui-bg-green-20">Green 20 <div>#5DB883</div></div>
|
|
49
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-green-20 psui-bg-green-10 click-to-copy" data-to-copy="psui-bg-green-10">Green 10 <div>#DEF8E8</div></div>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
## Red
|
|
53
53
|
<div class="psui-flex">
|
|
54
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-80 click-to-copy" data-to-copy="
|
|
55
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-70 click-to-copy" data-to-copy="
|
|
56
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-20 click-to-copy" data-to-copy="
|
|
57
|
-
<div class="cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-red-20 psui-bg-red-10 click-to-copy" data-to-copy="
|
|
54
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-80 click-to-copy" data-to-copy="psui-bg-red-80">Red 80 <div>#832F2E</div></div>
|
|
55
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-70 click-to-copy" data-to-copy="psui-bg-red-70">Red 70 <div>#AA3937</div></div>
|
|
56
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-20 click-to-copy" data-to-copy="psui-bg-red-20">Red 20 <div>#D65C5A</div></div>
|
|
57
|
+
<div class="psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-red-20 psui-bg-red-10 click-to-copy" data-to-copy="psui-bg-red-10">Red 10 <div>#FCEBEB</div></div>
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
60
|
## Chart colors
|
|
61
61
|
<div class="psui-flex">
|
|
62
|
-
<div class="psui-float-left cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-sky click-to-copy" data-to-copy="
|
|
63
|
-
<div class="psui-float-left cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-teal click-to-copy" data-to-copy="
|
|
64
|
-
<div class="psui-float-left cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-emerald click-to-copy" data-to-copy="
|
|
65
|
-
<div class="psui-float-left cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-mustard click-to-copy" data-to-copy="
|
|
66
|
-
<div class="psui-float-left cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-orange click-to-copy" data-to-copy="
|
|
67
|
-
<div class="psui-float-left cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-pink click-to-copy" data-to-copy="
|
|
68
|
-
<div class="psui-float-left cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-purple click-to-copy" data-to-copy="
|
|
62
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-sky click-to-copy" data-to-copy="psui-bg-sky">Sky <div>#518BE2</div></div>
|
|
63
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-teal click-to-copy" data-to-copy="psui-bg-teal">Teal <div>#57C0BA</div></div>
|
|
64
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-emerald click-to-copy" data-to-copy="psui-bg-emerald">Emerald <div>#8CCA82</div></div>
|
|
65
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-mustard click-to-copy" data-to-copy="psui-bg-mustard">Mustard <div>#E9CF74</div></div>
|
|
66
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-orange click-to-copy" data-to-copy="psui-bg-orange">Orange <div>#FF906D</div></div>
|
|
67
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-pink click-to-copy" data-to-copy="psui-bg-pink">Pink <div>#FF77B8</div></div>
|
|
68
|
+
<div class="psui-float-left psui-cursor-pointer psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-purple click-to-copy" data-to-copy="psui-bg-purple">Purple <div>#9278C9</div></div>
|
|
69
69
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PsDataTable, { alignment } from '../components/datatable/PsDataTable.vue'
|
|
2
|
-
import PsDataTableItem from '../components/datatable/PsDataTableItem.vue'
|
|
1
|
+
import PsDataTable, { alignment } from '../components/datatable/PsDataTable.vue'
|
|
2
|
+
import PsDataTableItem from '../components/datatable/PsDataTableItem.vue'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/DataTable',
|
|
@@ -12,29 +12,36 @@ export default {
|
|
|
12
12
|
|
|
13
13
|
const Template = (args, { argTypes }) => ({
|
|
14
14
|
props: Object.keys(argTypes),
|
|
15
|
-
components: {PsDataTable}
|
|
16
|
-
template:
|
|
15
|
+
components: {PsDataTable},
|
|
16
|
+
template: `
|
|
17
|
+
<div style="width:400px;">
|
|
18
|
+
<PsDataTable v-bind="$props" />
|
|
19
|
+
</div>
|
|
20
|
+
`
|
|
17
21
|
})
|
|
18
22
|
|
|
19
23
|
const RichTemplate = (args, { argTypes } ) => ({
|
|
20
24
|
props: Object.keys(argTypes),
|
|
21
25
|
components: {PsDataTable, PsDataTableItem},
|
|
22
|
-
template:
|
|
26
|
+
template: `
|
|
27
|
+
<div style="width:400px">
|
|
28
|
+
<PsDataTable v-bind="$props">
|
|
23
29
|
<PsDataTableItem v-bind="$props"/>
|
|
24
30
|
</PsDataTable>
|
|
31
|
+
</div>
|
|
25
32
|
`
|
|
26
33
|
})
|
|
27
34
|
|
|
28
35
|
|
|
29
|
-
export const Simple = Template.bind({})
|
|
36
|
+
export const Simple = Template.bind({})
|
|
30
37
|
Simple.args = {
|
|
31
38
|
header: ['year', 'month', 'sale'],
|
|
32
39
|
data: [{ year: '1992', month: '12', sale: '1000.00' }, { year: '1989', month: '02', sale: '1200.00' }],
|
|
33
40
|
footer: ['Footer 1', 'Footer 2', 'Footer 3'],
|
|
34
|
-
type: 'simple'
|
|
41
|
+
type: 'simple',
|
|
35
42
|
}
|
|
36
43
|
|
|
37
|
-
export const Rich = RichTemplate.bind({})
|
|
44
|
+
export const Rich = RichTemplate.bind({})
|
|
38
45
|
Rich.args = {
|
|
39
46
|
header: ['header 1', 'header 2', 'header 3'],
|
|
40
47
|
data:[[ [ 20, -3], [ 20, 2], [ 20, 2] ], { header4: { value: 20, delta: 2}, header5: { value: 20, delta: 2}, header6: { value: 20, delta: 2} }],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsDialog from '../components/notifications/PsDialog.vue'
|
|
1
|
+
import PsDialog from '../components/notifications/PsDialog.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Dialog',
|
|
@@ -6,29 +6,29 @@ export default {
|
|
|
6
6
|
argTypes: {
|
|
7
7
|
type: { control: { type: 'select', options: ['informative', 'success', 'alert'] } },
|
|
8
8
|
},
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
|
|
11
11
|
const Template = (args, { argTypes }) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
13
13
|
components: { PsDialog },
|
|
14
14
|
template: '<PsDialog v-bind="$props" />',
|
|
15
|
-
})
|
|
15
|
+
})
|
|
16
16
|
|
|
17
|
-
export const Informative = Template.bind({})
|
|
17
|
+
export const Informative = Template.bind({})
|
|
18
18
|
Informative.args = {
|
|
19
19
|
type: 'informative',
|
|
20
20
|
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
|
|
23
|
-
export const Success = Template.bind({})
|
|
23
|
+
export const Success = Template.bind({})
|
|
24
24
|
Success.args = {
|
|
25
25
|
type: 'success',
|
|
26
26
|
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
|
|
29
|
-
export const Warning = Template.bind({})
|
|
29
|
+
export const Warning = Template.bind({})
|
|
30
30
|
Warning.args = {
|
|
31
31
|
type: 'alert',
|
|
32
32
|
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
34
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PsDraggable from '../components/controls/PsDraggable.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Draggable',
|
|
5
|
+
component: PsDraggable
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const Template = (args, {argTypes}) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsDraggable },
|
|
11
|
+
template: `
|
|
12
|
+
<div style='width: 200px'>
|
|
13
|
+
<PsDraggable v-bind='$props'>
|
|
14
|
+
<button>Teste 1</button>
|
|
15
|
+
<button>Teste 2</button>
|
|
16
|
+
</PSDraggable>
|
|
17
|
+
</div>
|
|
18
|
+
`
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
export const Component = Template.bind({})
|
|
22
|
+
Component.args = {
|
|
23
|
+
data: [{title: 'Teste 1', columns: [ 1 , 2 , 3, 4]}]
|
|
24
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PsDropdown from '../components/forms/PsDropdown.vue'
|
|
1
|
+
import PsDropdown from '../components/forms/PsDropdown.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Components/Dropdown',
|
|
4
4
|
component: PsDropdown,
|
|
5
5
|
argTypes: {
|
|
6
6
|
},
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
|
|
9
9
|
const Template = (args, { argTypes }) => ({
|
|
10
10
|
props: Object.keys(argTypes),
|
|
@@ -25,10 +25,10 @@ const Template = (args, { argTypes }) => ({
|
|
|
25
25
|
</PsDropdown>
|
|
26
26
|
</div>
|
|
27
27
|
`
|
|
28
|
-
})
|
|
28
|
+
})
|
|
29
29
|
|
|
30
|
-
export const CustomTrigger = Template.bind({})
|
|
30
|
+
export const CustomTrigger = Template.bind({})
|
|
31
31
|
CustomTrigger.args = {
|
|
32
32
|
title: 'Custom trigger'
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
34
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PsInput from '../components/forms/PsInput.vue'
|
|
1
|
+
import PsInput from '../components/forms/PsInput.vue'
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Components/Input',
|
|
4
4
|
component: PsInput,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
disabled: { control: 'boolean' },
|
|
7
7
|
required: { control: 'boolean' },
|
|
8
8
|
},
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
|
|
11
11
|
const TemplateDefault = (args, { argTypes }) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
@@ -25,7 +25,7 @@ const TemplateDefault = (args, { argTypes }) => ({
|
|
|
25
25
|
<PsInput v-bind="$props" class="psui-mt-8" :validator="validator" />
|
|
26
26
|
</div>
|
|
27
27
|
`
|
|
28
|
-
})
|
|
28
|
+
})
|
|
29
29
|
|
|
30
30
|
const TemplateSlots = (args, { argTypes }) => ({
|
|
31
31
|
props: Object.keys(argTypes),
|
|
@@ -52,9 +52,9 @@ const TemplateSlots = (args, { argTypes }) => ({
|
|
|
52
52
|
</PsInput>
|
|
53
53
|
</div>
|
|
54
54
|
`
|
|
55
|
-
})
|
|
55
|
+
})
|
|
56
56
|
|
|
57
|
-
export const InputText = TemplateDefault.bind({})
|
|
57
|
+
export const InputText = TemplateDefault.bind({})
|
|
58
58
|
InputText.args = {
|
|
59
59
|
label: 'Label',
|
|
60
60
|
placeholder: 'Placeholder',
|
|
@@ -63,9 +63,9 @@ InputText.args = {
|
|
|
63
63
|
required: false,
|
|
64
64
|
mini: false,
|
|
65
65
|
value: 10,
|
|
66
|
-
}
|
|
66
|
+
}
|
|
67
67
|
|
|
68
|
-
export const InputPassword = TemplateDefault.bind({})
|
|
68
|
+
export const InputPassword = TemplateDefault.bind({})
|
|
69
69
|
InputPassword.args = {
|
|
70
70
|
type: 'password',
|
|
71
71
|
label: 'Password',
|
|
@@ -73,9 +73,9 @@ InputPassword.args = {
|
|
|
73
73
|
disabled: false,
|
|
74
74
|
required: false,
|
|
75
75
|
mini: false,
|
|
76
|
-
}
|
|
76
|
+
}
|
|
77
77
|
|
|
78
|
-
export const InputSlots = TemplateSlots.bind({})
|
|
78
|
+
export const InputSlots = TemplateSlots.bind({})
|
|
79
79
|
InputSlots.args = {
|
|
80
80
|
label: 'Label',
|
|
81
81
|
placeholder: 'Placeholder',
|
|
@@ -83,4 +83,4 @@ InputSlots.args = {
|
|
|
83
83
|
disabled: false,
|
|
84
84
|
required: false,
|
|
85
85
|
mini: false,
|
|
86
|
-
}
|
|
86
|
+
}
|