@policystudio/policy-studio-ui-vue 1.0.16 → 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 +67 -0
- package/.storybook/main.js +2 -1
- 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/{src/assets/scss/tailwind.css → dist/css/psui_styles.css} +2213 -2735
- package/package.json +29 -19
- package/src/assets/images/check-checkbox-button.svg +1 -0
- package/src/assets/images/radio-checked-button.svg +1 -0
- package/src/assets/scss/base.scss +1 -1
- package/src/components/accordion/PsAccordion.vue +44 -0
- package/src/components/accordion/PsAccordionItem.vue +102 -0
- package/src/components/buttons/PsButton.vue +36 -13
- package/src/components/chips/PsChips.vue +164 -0
- package/src/components/controls/PsCheckbox.vue +3 -3
- package/src/components/controls/PsDraggable.vue +27 -2
- package/src/components/controls/PsRadioButton.vue +58 -57
- package/src/components/controls/PsSlider.vue +13 -12
- package/src/components/controls/PsSwitch.vue +76 -76
- package/src/components/datatable/PsDataTable.vue +89 -0
- package/src/components/datatable/PsDataTableItem.vue +57 -0
- package/src/components/forms/PsDropdown.vue +196 -0
- package/src/components/forms/PsInput.vue +9 -6
- package/src/components/tabs/PsTabHeader.vue +20 -21
- 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 +128 -0
- package/src/index.js +51 -22
- package/src/stories/Accordion.stories.js +35 -0
- package/src/stories/Button.stories.js +11 -11
- package/src/stories/Checkbox.stories.js +21 -14
- package/src/stories/Chips.stories.js +49 -0
- package/src/stories/Colors.stories.mdx +36 -35
- package/src/stories/Datatable.stories.js +50 -0
- package/src/stories/Dialog.stories.js +9 -9
- package/src/stories/Draggable.stories.js +24 -0
- package/src/stories/Dropdown.stories.js +34 -0
- package/src/stories/Input.stories.js +10 -10
- package/src/stories/RadioButton.stories.js +24 -8
- 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 +29 -5
- package/src/stories/Tooltip.stories.js +113 -0
- package/src/util/GeneralFunctions.js +23 -0
- package/src/util/imageLoader.js +50 -0
- package/tailwind.config.js +19 -4
- package/src/assets/scss/tailwind.scss +0 -61088
package/src/index.js
CHANGED
|
@@ -1,28 +1,48 @@
|
|
|
1
|
-
import PsButton from './components/buttons/PsButton.vue'
|
|
2
|
-
import PsCheckbox from './components/controls/PsCheckbox.vue'
|
|
3
|
-
import PsRadioButton from './components/controls/PsRadioButton.vue'
|
|
4
|
-
import PsSlider from './components/controls/PsSlider.vue'
|
|
5
|
-
import PsSwitch from './components/controls/PsSwitch.vue'
|
|
6
|
-
import PsToggle from './components/controls/PsToggle.vue'
|
|
7
|
-
import PsInput from './components/forms/PsInput.vue'
|
|
8
|
-
import PsDialog from './components/notifications/PsDialog.vue'
|
|
9
|
-
import PsToast from './components/notifications/PsToast.vue'
|
|
10
|
-
import PsTabHeader from './components/tabs/PsTabHeader.vue'
|
|
1
|
+
import PsButton from './components/buttons/PsButton.vue'
|
|
2
|
+
import PsCheckbox from './components/controls/PsCheckbox.vue'
|
|
3
|
+
import PsRadioButton from './components/controls/PsRadioButton.vue'
|
|
4
|
+
import PsSlider from './components/controls/PsSlider.vue'
|
|
5
|
+
import PsSwitch from './components/controls/PsSwitch.vue'
|
|
6
|
+
import PsToggle from './components/controls/PsToggle.vue'
|
|
7
|
+
import PsInput from './components/forms/PsInput.vue'
|
|
8
|
+
import PsDialog from './components/notifications/PsDialog.vue'
|
|
9
|
+
import PsToast from './components/notifications/PsToast.vue'
|
|
10
|
+
import PsTabHeader from './components/tabs/PsTabHeader.vue'
|
|
11
|
+
import PsAccordion from './components/accordion/PsAccordion.vue'
|
|
12
|
+
import PsAccordionItem from './components/accordion/PsAccordionItem.vue'
|
|
13
|
+
import PsChips from './components/chips/PsChips.vue'
|
|
14
|
+
import PsDataTable from './components/datatable/PsDataTable.vue'
|
|
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'
|
|
11
21
|
|
|
12
22
|
export default {
|
|
13
23
|
install(Vue) {
|
|
14
|
-
Vue.component('PsButton', PsButton)
|
|
15
|
-
Vue.component('PsCheckbox', PsCheckbox)
|
|
16
|
-
Vue.component('PsDialog', PsDialog)
|
|
17
|
-
Vue.component('PsToast', PsToast)
|
|
18
|
-
Vue.component('PsTabHeader', PsTabHeader)
|
|
19
|
-
Vue.component('PsRadioButton', PsRadioButton)
|
|
20
|
-
Vue.component('PsSlider', PsSlider)
|
|
21
|
-
Vue.component('PsSwitch', PsSwitch)
|
|
22
|
-
Vue.component('PsInput', PsInput)
|
|
23
|
-
Vue.component('PsToggle', PsToggle)
|
|
24
|
+
Vue.component('PsButton', PsButton)
|
|
25
|
+
Vue.component('PsCheckbox', PsCheckbox)
|
|
26
|
+
Vue.component('PsDialog', PsDialog)
|
|
27
|
+
Vue.component('PsToast', PsToast)
|
|
28
|
+
Vue.component('PsTabHeader', PsTabHeader)
|
|
29
|
+
Vue.component('PsRadioButton', PsRadioButton)
|
|
30
|
+
Vue.component('PsSlider', PsSlider)
|
|
31
|
+
Vue.component('PsSwitch', PsSwitch)
|
|
32
|
+
Vue.component('PsInput', PsInput)
|
|
33
|
+
Vue.component('PsToggle', PsToggle)
|
|
34
|
+
Vue.component('PsAccordion', PsAccordion)
|
|
35
|
+
Vue.component('PsAccordionItem', PsAccordionItem)
|
|
36
|
+
Vue.component('PsChips', PsChips)
|
|
37
|
+
Vue.component('PsDataTable', PsDataTable)
|
|
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)
|
|
24
44
|
}
|
|
25
|
-
}
|
|
45
|
+
}
|
|
26
46
|
|
|
27
47
|
export {
|
|
28
48
|
PsButton,
|
|
@@ -34,5 +54,14 @@ export {
|
|
|
34
54
|
PsSlider,
|
|
35
55
|
PsSwitch,
|
|
36
56
|
PsInput,
|
|
37
|
-
PsToggle
|
|
57
|
+
PsToggle,
|
|
58
|
+
PsAccordion,
|
|
59
|
+
PsAccordionItem,
|
|
60
|
+
PsChips,
|
|
61
|
+
PsDataTable,
|
|
62
|
+
PsDataTableItem,
|
|
63
|
+
PsTooltip,
|
|
64
|
+
PsRichTooltip,
|
|
65
|
+
PsDialogTooltip,
|
|
66
|
+
PsDraggable
|
|
38
67
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import PsAccordionItem, {iconTypes, fontCss} from "../components/accordion/PsAccordionItem.vue"
|
|
2
|
+
import PsAccordion, {sizes} from "../components/accordion/PsAccordion.vue"
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Accordion',
|
|
6
|
+
component: PsAccordion,
|
|
7
|
+
subcomponents: { PsAccordionItem },
|
|
8
|
+
argTypes:{
|
|
9
|
+
size: { control: { type: 'select', options: sizes } },
|
|
10
|
+
iconType: {control : {type: 'select', options: iconTypes}},
|
|
11
|
+
fontCss: {control : { type: 'select', options: fontCss}}
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
title: 'Section 1',
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const AccordionItem = (args, { argTypes }) => ({
|
|
19
|
+
props: Object.keys(argTypes, args),
|
|
20
|
+
components: { PsAccordionItem },
|
|
21
|
+
template: '<PsAccordionItem v-bind="$props"><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p></PsAccordionItem>',
|
|
22
|
+
})
|
|
23
|
+
AccordionItem.parameters = {
|
|
24
|
+
controls: {
|
|
25
|
+
include: ['title', 'iconType', 'fontCss']
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const Accordion = (args, { argTypes }) => ({
|
|
30
|
+
props: Object.keys(argTypes, args),
|
|
31
|
+
components: { PsAccordion, PsAccordionItem },
|
|
32
|
+
template: '<PsAccordion v-bind="$props"><PsAccordionItem v-bind="$props"><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, illum.</p></PsAccordionItem><PsAccordionItem v-bind="$props"/></PsAccordion>',
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
|
|
@@ -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,41 +1,48 @@
|
|
|
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),
|
|
13
13
|
components: { PsCheckbox },
|
|
14
14
|
data: () => {
|
|
15
15
|
return {
|
|
16
|
-
items:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
items: {
|
|
17
|
+
BUILDING_TYPE: {
|
|
18
|
+
label: 'Building Type',
|
|
19
|
+
key: 'BUILDING_TYPE'
|
|
20
|
+
},
|
|
21
|
+
CLIMATE_ZONE: {
|
|
22
|
+
label: 'Climate Zone',
|
|
23
|
+
key: 'CLIMATE_ZONE'
|
|
24
|
+
},
|
|
25
|
+
YEAR: {
|
|
26
|
+
label: "Year",
|
|
27
|
+
key: "YEAR"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
21
30
|
selected: []
|
|
22
31
|
}
|
|
23
32
|
},
|
|
24
33
|
template: `
|
|
25
34
|
<div>
|
|
26
|
-
<PsCheckbox v-bind="$props"
|
|
27
|
-
<PsCheckbox v-bind="$props" label="Label 2" inputValue="2" v-model="selected" />
|
|
28
|
-
<PsCheckbox v-bind="$props" label="Label 3" inputValue="3" v-model="selected" />
|
|
35
|
+
<PsCheckbox v-bind="$props" v-for="(item, key) in items" :label="item.label" :inputValue="item.key" v-model="selected" />
|
|
29
36
|
<p>Checked: {{ selected }}</p>
|
|
30
37
|
</div>
|
|
31
38
|
`
|
|
32
|
-
})
|
|
39
|
+
})
|
|
33
40
|
|
|
34
|
-
export const Default = Template.bind({})
|
|
41
|
+
export const Default = Template.bind({})
|
|
35
42
|
Default.args = {
|
|
36
43
|
size: 18,
|
|
37
44
|
disabled: false,
|
|
38
45
|
label: 'Label',
|
|
39
46
|
labelClasses: '',
|
|
40
|
-
}
|
|
47
|
+
}
|
|
41
48
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import PsChips from "../components/chips/PsChips.vue"
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Chips',
|
|
5
|
+
component: PsChips,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const Template = (args, { argTypes }) => ({
|
|
9
|
+
props: Object.keys(argTypes),
|
|
10
|
+
components: { PsChips },
|
|
11
|
+
template: `<div >
|
|
12
|
+
<PsChips v-bind='$props'/>
|
|
13
|
+
</div>
|
|
14
|
+
`
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
export const Simple = Template.bind({})
|
|
18
|
+
Simple.args = {
|
|
19
|
+
title: 'Simple Chip',
|
|
20
|
+
icon:"",
|
|
21
|
+
type: 'text'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const SimpleWithIcon = Template.bind({})
|
|
25
|
+
SimpleWithIcon.args = {
|
|
26
|
+
title: 'Simple With Icon',
|
|
27
|
+
icon: 'home',
|
|
28
|
+
type: 'text'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Radio = Template.bind({})
|
|
32
|
+
Radio.args = {
|
|
33
|
+
title: 'Radio Chip',
|
|
34
|
+
type:'radio'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Checkbox = Template.bind({})
|
|
38
|
+
Checkbox.args = {
|
|
39
|
+
title: 'Checkbox Chip',
|
|
40
|
+
type: 'checkbox'
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const Rich = Template.bind({})
|
|
44
|
+
Rich.args = {
|
|
45
|
+
title: 'Rich chips',
|
|
46
|
+
type: 'text',
|
|
47
|
+
icon: 'description',
|
|
48
|
+
rich: true
|
|
49
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Meta } from '@storybook/addon-docs';
|
|
2
2
|
|
|
3
3
|
<Meta title="Colors" />
|
|
4
4
|
|
|
@@ -11,58 +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="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-
|
|
15
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-
|
|
16
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-
|
|
17
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-blue-
|
|
18
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-blue-
|
|
19
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-blue-
|
|
20
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-blue-70 psui-bg-
|
|
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>
|
|
21
22
|
</div>
|
|
22
23
|
|
|
23
24
|
## Gray
|
|
24
25
|
<div class="psui-flex">
|
|
25
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-80">Gray 80</div>
|
|
26
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-70">Gray 70</div>
|
|
27
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-60">Gray 60</div>
|
|
28
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-50">Gray 50</div>
|
|
29
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-gray-40">Gray 40</div>
|
|
30
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-30">Gray 30</div>
|
|
31
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-20">Gray 20</div>
|
|
32
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-gray-50 psui-bg-gray-10">Gray 10</div>
|
|
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>
|
|
33
34
|
</div>
|
|
34
35
|
|
|
35
36
|
## Yellow
|
|
36
37
|
<div class="psui-flex">
|
|
37
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-80">Yellow 80</div>
|
|
38
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-70">Yellow 70</div>
|
|
39
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-yellow-20">Yellow 20</div>
|
|
40
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-yellow-20 psui-bg-yellow-10">Yellow 10</div>
|
|
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>
|
|
41
42
|
</div>
|
|
42
43
|
|
|
43
44
|
## Green
|
|
44
45
|
<div class="psui-flex">
|
|
45
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-80">Green 80</div>
|
|
46
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-70">Green 70</div>
|
|
47
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-green-20">Green 20</div>
|
|
48
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-green-20 psui-bg-green-10">Green 10</div>
|
|
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>
|
|
49
50
|
</div>
|
|
50
51
|
|
|
51
52
|
## Red
|
|
52
53
|
<div class="psui-flex">
|
|
53
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-80">Red 80</div>
|
|
54
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-70">Red 70</div>
|
|
55
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-red-20">Red 20</div>
|
|
56
|
-
<div class="psui-p-2 psui-h-24 psui-w-32 psui-text-red-20 psui-bg-red-10">Red 10</div>
|
|
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>
|
|
57
58
|
</div>
|
|
58
59
|
|
|
59
60
|
## Chart colors
|
|
60
61
|
<div class="psui-flex">
|
|
61
|
-
<div class="psui-float-left psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-sky">Sky</div>
|
|
62
|
-
<div class="psui-float-left psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-teal">Teal</div>
|
|
63
|
-
<div class="psui-float-left psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-emerald">Emerald</div>
|
|
64
|
-
<div class="psui-float-left psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-mustard">Mustard</div>
|
|
65
|
-
<div class="psui-float-left psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-orange">Orange</div>
|
|
66
|
-
<div class="psui-float-left psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-pink">Pink</div>
|
|
67
|
-
<div class="psui-float-left psui-p-2 psui-h-24 psui-w-32 psui-text-white psui-bg-purple">Purple</div>
|
|
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>
|
|
68
69
|
</div>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import PsDataTable, { alignment } from '../components/datatable/PsDataTable.vue'
|
|
2
|
+
import PsDataTableItem from '../components/datatable/PsDataTableItem.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/DataTable',
|
|
6
|
+
component: PsDataTable,
|
|
7
|
+
subcomponents: { PsDataTableItem },
|
|
8
|
+
argTypes: {
|
|
9
|
+
align: { control: { type: 'select', options: alignment } },
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const Template = (args, { argTypes }) => ({
|
|
14
|
+
props: Object.keys(argTypes),
|
|
15
|
+
components: {PsDataTable},
|
|
16
|
+
template: `
|
|
17
|
+
<div style="width:400px;">
|
|
18
|
+
<PsDataTable v-bind="$props" />
|
|
19
|
+
</div>
|
|
20
|
+
`
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const RichTemplate = (args, { argTypes } ) => ({
|
|
24
|
+
props: Object.keys(argTypes),
|
|
25
|
+
components: {PsDataTable, PsDataTableItem},
|
|
26
|
+
template: `
|
|
27
|
+
<div style="width:400px">
|
|
28
|
+
<PsDataTable v-bind="$props">
|
|
29
|
+
<PsDataTableItem v-bind="$props"/>
|
|
30
|
+
</PsDataTable>
|
|
31
|
+
</div>
|
|
32
|
+
`
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export const Simple = Template.bind({})
|
|
37
|
+
Simple.args = {
|
|
38
|
+
header: ['year', 'month', 'sale'],
|
|
39
|
+
data: [{ year: '1992', month: '12', sale: '1000.00' }, { year: '1989', month: '02', sale: '1200.00' }],
|
|
40
|
+
footer: ['Footer 1', 'Footer 2', 'Footer 3'],
|
|
41
|
+
type: 'simple',
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const Rich = RichTemplate.bind({})
|
|
45
|
+
Rich.args = {
|
|
46
|
+
header: ['header 1', 'header 2', 'header 3'],
|
|
47
|
+
data:[[ [ 20, -3], [ 20, 2], [ 20, 2] ], { header4: { value: 20, delta: 2}, header5: { value: 20, delta: 2}, header6: { value: 20, delta: 2} }],
|
|
48
|
+
footer: ['Footer 1', 'Footer 2', 'Footer 3'],
|
|
49
|
+
type: 'rich'
|
|
50
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import PsDropdown from '../components/forms/PsDropdown.vue'
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Dropdown',
|
|
4
|
+
component: PsDropdown,
|
|
5
|
+
argTypes: {
|
|
6
|
+
},
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Template = (args, { argTypes }) => ({
|
|
10
|
+
props: Object.keys(argTypes),
|
|
11
|
+
components: { PsDropdown },
|
|
12
|
+
template: `
|
|
13
|
+
<div>
|
|
14
|
+
<PsDropdown
|
|
15
|
+
buttonClasses="psui-p-3 "
|
|
16
|
+
>
|
|
17
|
+
<template v-slot:dropdownTrigger>
|
|
18
|
+
<div>Custom Trigger</div>
|
|
19
|
+
</template>
|
|
20
|
+
<template v-slot:items>
|
|
21
|
+
<ul>
|
|
22
|
+
<li>Small list of the drop down</li>
|
|
23
|
+
</ul>
|
|
24
|
+
</template>
|
|
25
|
+
</PsDropdown>
|
|
26
|
+
</div>
|
|
27
|
+
`
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export const CustomTrigger = Template.bind({})
|
|
31
|
+
CustomTrigger.args = {
|
|
32
|
+
title: 'Custom trigger'
|
|
33
|
+
}
|
|
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
|
+
}
|