@policystudio/policy-studio-ui-vue 1.0.24 → 1.0.28

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.
Files changed (72) hide show
  1. package/dist/css/psui_styles.css +4822 -383
  2. package/package.json +1 -1
  3. package/src/assets/scss/base.scss +39 -2
  4. package/src/assets/scss/components/PsAccordion.scss +6 -2
  5. package/src/assets/scss/components/PsButton.scss +114 -118
  6. package/src/assets/scss/components/PsCardInfos.scss +26 -0
  7. package/src/assets/scss/components/PsChartLegend.scss +25 -0
  8. package/src/assets/scss/components/PsCheckbox.scss +96 -0
  9. package/src/assets/scss/components/PsChips.scss +155 -0
  10. package/src/assets/scss/components/PsClimateZoneBadge.scss +26 -0
  11. package/src/assets/scss/components/PsCostEffectBar.scss +31 -0
  12. package/src/assets/scss/components/PsDataTable.scss +50 -0
  13. package/src/assets/scss/components/PsDialog.scss +80 -0
  14. package/src/assets/scss/components/PsDropdown.scss +44 -0
  15. package/src/assets/scss/components/PsHighlightRippleDot.scss +48 -0
  16. package/src/assets/scss/components/PsInlineSelector.scss +5 -0
  17. package/src/assets/scss/components/PsInputSelect.scss +62 -0
  18. package/src/assets/scss/components/PsInputTextArea.scss +49 -0
  19. package/src/assets/scss/components/PsProgressBar.scss +24 -0
  20. package/src/assets/scss/components/PsRadioButton.scss +78 -0
  21. package/src/assets/scss/components/PsSlider.scss +11 -0
  22. package/src/assets/scss/components/PsSwitch.scss +66 -0
  23. package/src/assets/scss/components/PsTabHeader.scss +105 -0
  24. package/src/assets/scss/components/PsToast.scss +52 -0
  25. package/src/assets/scss/components/PsToggle.scss +23 -0
  26. package/src/assets/scss/components/PsTooltip.scss +118 -0
  27. package/src/components/accordion/PsAccordion.vue +0 -1
  28. package/src/components/accordion/PsAccordionItem.vue +9 -2
  29. package/src/components/badges-and-tags/PsCardInfos.vue +14 -7
  30. package/src/components/badges-and-tags/PsChartLegend.vue +12 -18
  31. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +15 -6
  32. package/src/components/badges-and-tags/PsCostEffectBar.Copy.vue +72 -0
  33. package/src/components/badges-and-tags/PsCostEffectBar.vue +33 -70
  34. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -69
  35. package/src/components/badges-and-tags/PsProgressBar.vue +42 -0
  36. package/src/components/buttons/PsButton.vue +74 -77
  37. package/src/components/chips/PsChips.vue +46 -87
  38. package/src/components/controls/PsCheckbox.vue +58 -134
  39. package/src/components/controls/PsInlineSelector.vue +15 -0
  40. package/src/components/controls/PsRadioButton.vue +33 -88
  41. package/src/components/controls/PsSlider.vue +4 -5
  42. package/src/components/controls/PsSwitch.vue +29 -81
  43. package/src/components/controls/PsToggle.vue +45 -39
  44. package/src/components/datatable/PsDataTable.vue +3 -15
  45. package/src/components/forms/PsDropdown.vue +27 -11
  46. package/src/components/forms/PsInputSelect.vue +80 -0
  47. package/src/components/forms/PsInputTextArea.vue +80 -0
  48. package/src/components/notifications/PsDialog.vue +32 -23
  49. package/src/components/notifications/PsToast.vue +13 -28
  50. package/src/components/tabs/PsTabHeader.vue +53 -41
  51. package/src/components/tooltip/PsDialogTooltip.vue +6 -31
  52. package/src/components/tooltip/PsRichTooltip.vue +37 -44
  53. package/src/components/tooltip/PsTooltip.vue +18 -28
  54. package/src/components/ui/PsIcon.vue +9 -9
  55. package/src/index.js +12 -3
  56. package/src/stories/Button.stories.js +102 -102
  57. package/src/stories/Checkbox.stories.js +34 -37
  58. package/src/stories/Chips.stories.js +43 -54
  59. package/src/stories/ClimateZoneBadge.stories.js +0 -7
  60. package/src/stories/Dialog.stories.js +15 -51
  61. package/src/stories/InlineSelector.stories.js +16 -0
  62. package/src/stories/InputSelect.stories.js +22 -0
  63. package/src/stories/InputTextArea.stories.js +25 -0
  64. package/src/stories/RadioButton.stories.js +32 -29
  65. package/src/stories/Switch.stories.js +33 -0
  66. package/src/stories/TabHeader.stories.js +6 -6
  67. package/src/stories/Toast.stories.js +40 -46
  68. package/src/stories/Tooltip.stories.js +86 -86
  69. package/tailwind.config.js +7 -1
  70. package/src/assets/images/check-checkbox-button.svg +0 -1
  71. package/src/assets/images/radio-checked-button.svg +0 -1
  72. package/src/stories/Swith.stories.js +0 -38
@@ -1,102 +1,102 @@
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(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
22
- <span style="text-align: center; color: red;">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
- </div>
28
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
29
- <span style="text-align: center; color: blue;">Outline Style</span>
30
- <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
31
- <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
32
- <PsButton label='Text Only' layout='outline'/>
33
- <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
34
- </div>
35
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
36
- <span style="text-align: center; color: brown;">Ghost Style</span>
37
- <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
38
- <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
39
- <PsButton label='Text Only' layout='ghost' />
40
- <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
41
- </div>
42
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
43
- <span style="text-align: center; color: green;">Only-Text Style</span>
44
- <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
45
- <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
46
- <PsButton label='Text Only' layout='onlytext'/>
47
- <PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
48
- </div>
49
- </div>
50
- <p>Size: Medium</p>
51
- <div style="display: flex; flex-direction: column; gap: 10px;">
52
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
53
- <span style="text-align: center; color: red;">Solid Style</span>
54
- <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
55
- <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
56
- <PsButton label='Text Only' layout='solid' size='medium'/>
57
- <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
58
- </div>
59
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
60
- <span style="text-align: center; color: blue;">Outline Style</span>
61
- <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
62
- <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
63
- <PsButton label='Text Only' layout='outline' size='medium'/>
64
- <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
65
- </div>
66
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
67
- <span style="text-align: center; color: brown;">Ghost Style</span>
68
- <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
69
- <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
70
- <PsButton label='Text Only' layout='ghost' size='medium'/>
71
- <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
72
- </div>
73
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
74
- <span style="text-align: center; color: green;">Only-Text Style</span>
75
- <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
76
- <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
77
- <PsButton label='Text Only' layout='onlytext' size='medium'/>
78
- <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left'size='medium'/>
79
- </div>
80
- </div>
81
- <p>Size: Small</p>
82
- <div style="display: flex; flex-direction: column; gap: 10px;">
83
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
84
- <span style="text-align: center; color: red;">Solid Style</span>
85
- <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
86
- <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
87
- <PsButton label='Text Only' layout='solid' size='small'/>
88
- <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
89
- </div>
90
- <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
91
- <span style="text-align: center; color: green;">Only-Text Style</span>
92
- <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
93
- <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
94
- <PsButton label='Text Only' layout='onlytext' size='small'/>
95
- <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left'size='small'/>
96
- </div>
97
- </div>
98
- </div>
99
- `
100
- })
101
-
102
- export const Default = TemplateDefault.bind({})
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(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;">
22
+ <span style="text-align: center; color: red;">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
+ </div>
28
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
29
+ <span style="text-align: center; color: blue;">Outline Style</span>
30
+ <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left'/>
31
+ <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right'/>
32
+ <PsButton label='Text Only' layout='outline'/>
33
+ <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled/>
34
+ </div>
35
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
36
+ <span style="text-align: center; color: brown;">Ghost Style</span>
37
+ <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left'/>
38
+ <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right'/>
39
+ <PsButton label='Text Only' layout='ghost' />
40
+ <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled/>
41
+ </div>
42
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
43
+ <span style="text-align: center; color: green;">Only-Text Style</span>
44
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left'/>
45
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right'/>
46
+ <PsButton label='Text Only' layout='onlytext'/>
47
+ <PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
48
+ </div>
49
+ </div>
50
+ <p>Size: Medium</p>
51
+ <div style="display: flex; flex-direction: column; gap: 10px;">
52
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
53
+ <span style="text-align: center; color: red;">Solid Style</span>
54
+ <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
55
+ <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
56
+ <PsButton label='Text Only' layout='solid' size='medium'/>
57
+ <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='medium'/>
58
+ </div>
59
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
60
+ <span style="text-align: center; color: blue;">Outline Style</span>
61
+ <PsButton label='Left Icon' layout='outline' icon='verified' iconPosition='left' size='medium'/>
62
+ <PsButton label='Right Icon' layout='outline' icon='verified' iconPosition='right' size='medium'/>
63
+ <PsButton label='Text Only' layout='outline' size='medium'/>
64
+ <PsButton label='Disabled' layout='outline' icon='verified' iconPosition='left' disabled size='medium'/>
65
+ </div>
66
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
67
+ <span style="text-align: center; color: brown;">Ghost Style</span>
68
+ <PsButton label='Left Icon' layout='ghost' icon='verified' iconPosition='left' size='medium'/>
69
+ <PsButton label='Right Icon' layout='ghost' icon='verified' iconPosition='right' size='medium'/>
70
+ <PsButton label='Text Only' layout='ghost' size='medium'/>
71
+ <PsButton label='Disabled' layout='ghost' icon='verified' iconPosition='left' disabled size='medium'/>
72
+ </div>
73
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
74
+ <span style="text-align: center; color: green;">Only-Text Style</span>
75
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='medium'/>
76
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='medium'/>
77
+ <PsButton label='Text Only' layout='onlytext' size='medium'/>
78
+ <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
79
+ </div>
80
+ </div>
81
+ <p>Size: Small</p>
82
+ <div style="display: flex; flex-direction: column; gap: 10px;">
83
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
84
+ <span style="text-align: center; color: red;">Solid Style</span>
85
+ <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
86
+ <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
87
+ <PsButton label='Text Only' layout='solid' size='small'/>
88
+ <PsButton label='Disabled' layout='solid' icon='verified' iconPosition='left' disabled size='small'/>
89
+ </div>
90
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
91
+ <span style="text-align: center; color: green;">Only-Text Style</span>
92
+ <PsButton label='Left Icon' layout='onlytext' icon='verified' iconPosition='left' size='small'/>
93
+ <PsButton label='Right Icon' layout='onlytext' icon='verified' iconPosition='right' size='small'/>
94
+ <PsButton label='Text Only' layout='onlytext' size='small'/>
95
+ <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
96
+ </div>
97
+ </div>
98
+ </div>
99
+ `
100
+ })
101
+
102
+ export const Default = TemplateDefault.bind({})
@@ -3,46 +3,43 @@ import PsCheckbox from '../components/controls/PsCheckbox.vue'
3
3
  export default {
4
4
  title: 'Components/Checkbox',
5
5
  component: PsCheckbox,
6
- argTypes: {
7
- disabled: { control: 'boolean' },
8
- },
9
6
  }
10
7
 
11
- const Template = (args, { argTypes }) => ({
8
+ const defaultTemplate = (args, {argTypes}) => ({
12
9
  props: Object.keys(argTypes),
13
- components: { PsCheckbox },
14
- data: () => {
15
- return {
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
- },
30
- selected: []
31
- }
32
- },
10
+ components: { PsCheckbox},
33
11
  template: `
34
- <div>
35
- <PsCheckbox v-bind="$props" v-for="(item, key) in items" :label="item.label" :inputValue="item.key" v-model="selected" />
36
- <p>Checked: {{ selected }}</p>
37
- </div>
38
- `
12
+ <div style='display:flex; gap: 20px;'>
13
+ <div style='display:flex; flex-direction:column; gap:5px;'>
14
+ <p>Resting</p>
15
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
16
+ <PsCheckbox v-bind="$props" label='Label 1' />
17
+ <PsCheckbox v-bind="$props" label='Label 2' size='small' />
18
+ </div>
19
+ </div>
20
+ <div style='display:flex; flex-direction:column; gap:5px;'>
21
+ <p>Active</p>
22
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
23
+ <PsCheckbox v-bind="$props" label='Label 3' checked />
24
+ <PsCheckbox v-bind="$props" label='Label 4' checked size='small'/>
25
+ </div>
26
+ </div>
27
+ <div style='display:flex; flex-direction:column; gap:5px;'>
28
+ <p>Mixed</p>
29
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
30
+ <PsCheckbox v-bind="$props" label='Label 5' layout='mixed' checked />
31
+ <PsCheckbox v-bind="$props" label='Label 6' layout='mixed' size='small' checked />
32
+ </div>
33
+ </div>
34
+ <div style='display:flex; flex-direction:column; gap:5px;'>
35
+ <p>Disabled</p>
36
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
37
+ <PsCheckbox v-bind="$props" label='Label 7' disabled/>
38
+ <PsCheckbox v-bind="$props" label='Label 8' size='small' disabled/>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ `
39
43
  })
40
44
 
41
- export const Default = Template.bind({})
42
- Default.args = {
43
- size: 18,
44
- disabled: false,
45
- label: 'Label',
46
- labelClasses: '',
47
- }
48
-
45
+ export const Default = defaultTemplate.bind({})
@@ -1,55 +1,44 @@
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
- data: ()=>{
12
- return{
13
- isChecked: null,
14
- }
15
- },
16
- template: `<div >
17
- <PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
18
- <pre>{{isChecked}}</pre>
19
- </div>
20
- `
21
- })
22
-
23
- export const Simple = Template.bind({})
24
- Simple.args = {
25
- title: 'Simple Chip',
26
- icon:"",
27
- type: 'text'
28
- }
29
-
30
- export const SimpleWithIcon = Template.bind({})
31
- SimpleWithIcon.args = {
32
- title: 'Simple With Icon',
33
- icon: 'home',
34
- type: 'text'
35
- }
36
-
37
- export const Radio = Template.bind({})
38
- Radio.args = {
39
- title: 'Radio Chip',
40
- type:'radio'
41
- }
42
-
43
- export const Checkbox = Template.bind({})
44
- Checkbox.args = {
45
- title: 'Checkbox Chip',
46
- type: 'checkbox'
47
- }
48
-
49
- export const Rich = Template.bind({})
50
- Rich.args = {
51
- title: 'Rich chips',
52
- type: 'text',
53
- icon: 'description',
54
- rich: true
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
+ data: ()=>{
12
+ return{
13
+ isChecked: null,
14
+ }
15
+ },
16
+ template: `<div >
17
+ <PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
18
+ </div>
19
+ `
20
+ })
21
+
22
+ export const Simple = Template.bind({})
23
+ Simple.args = {
24
+ label: 'Simple Chip',
25
+ icon:"",
26
+ }
27
+
28
+ export const SimpleWithIcon = Template.bind({})
29
+ SimpleWithIcon.args = {
30
+ label: 'Simple With Icon',
31
+ icon: 'home',
32
+ }
33
+
34
+ export const Radio = Template.bind({})
35
+ Radio.args = {
36
+ label: 'Radio Chip',
37
+ type:'radio'
38
+ }
39
+
40
+ export const Checkbox = Template.bind({})
41
+ Checkbox.args = {
42
+ label: 'Checkbox Chip',
43
+ type: 'checkbox'
55
44
  }
@@ -1,15 +1,8 @@
1
1
  import PsClimateZoneBadge from '../components/badges-and-tags/PsClimateZoneBadge.vue'
2
2
 
3
- // const icons = ["area_chart"];
4
-
5
3
  export default {
6
4
  title: 'Components/ClimateZoneBadge',
7
5
  component: PsClimateZoneBadge,
8
- argTypes: {
9
- type: {
10
- // icon: { control: { type: "select", options: icons } },
11
- },
12
- },
13
6
  }
14
7
 
15
8
  const Template = (args, { argTypes }) => ({
@@ -5,21 +5,6 @@ export default {
5
5
  component: PsDialog,
6
6
  }
7
7
 
8
- const Template = (args, { argTypes }) => ({
9
- props: Object.keys(argTypes),
10
- components: { PsDialog },
11
- template: `
12
- <PsDialog v-bind="$props">
13
- <template v-slot:content>
14
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
15
- </template>
16
- <template v-slot:action>
17
- <p style='font-weight: 700;'>Action</p>
18
- </template>
19
- </PsDialog>
20
- `,
21
- })
22
-
23
8
  const TemplateExamples = (args, { argTypes }) => ({
24
9
  props: Object.keys(argTypes),
25
10
  components: { PsDialog },
@@ -32,10 +17,7 @@ const TemplateExamples = (args, { argTypes }) => ({
32
17
 
33
18
  <div>
34
19
  <h2>Informative</h2>
35
- <PsDialog status="informative" layout="horizontal">
36
- <template v-slot:content>
37
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
38
- </template>
20
+ <PsDialog theme="informative" layout="horizontal" message="teste">
39
21
  <template v-slot:action>
40
22
  <p style='font-weight: 700;'>Action</p>
41
23
  </template>
@@ -44,8 +26,8 @@ const TemplateExamples = (args, { argTypes }) => ({
44
26
 
45
27
  <div>
46
28
  <h2>Success</h2>
47
- <PsDialog status="success" layout="horizontal">
48
- <template v-slot:content>
29
+ <PsDialog theme="success" layout="horizontal" :hasClose="false">
30
+ <template>
49
31
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
50
32
  </template>
51
33
  <template v-slot:action>
@@ -56,8 +38,8 @@ const TemplateExamples = (args, { argTypes }) => ({
56
38
 
57
39
  <div>
58
40
  <h2>Alert</h2>
59
- <PsDialog status="alert" layout="horizontal">
60
- <template v-slot:content>
41
+ <PsDialog theme="alert" layout="horizontal">
42
+ <template>
61
43
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
62
44
  </template>
63
45
  <template v-slot:action>
@@ -72,8 +54,8 @@ const TemplateExamples = (args, { argTypes }) => ({
72
54
 
73
55
  <div>
74
56
  <h2>Informative</h2>
75
- <PsDialog status="informative" layout="vertical">
76
- <template v-slot:content>
57
+ <PsDialog theme="informative" layout="vertical">
58
+ <template>
77
59
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
78
60
  </template>
79
61
  <template v-slot:action>
@@ -82,10 +64,10 @@ const TemplateExamples = (args, { argTypes }) => ({
82
64
  </PsDialog>
83
65
  </div>
84
66
 
85
- <div>
67
+ <div class="psui-text-red">
86
68
  <h2>Success</h2>
87
- <PsDialog status="success" layout="vertical">
88
- <template v-slot:content>
69
+ <PsDialog theme="success" layout="vertical" :hasClose="false">
70
+ <template>
89
71
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
90
72
  </template>
91
73
  <template v-slot:action>
@@ -96,8 +78,8 @@ const TemplateExamples = (args, { argTypes }) => ({
96
78
 
97
79
  <div>
98
80
  <h2>Alert</h2>
99
- <PsDialog status="alert" layout="vertical">
100
- <template v-slot:content>
81
+ <PsDialog theme="alert" layout="vertical">
82
+ <template>
101
83
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
102
84
  </template>
103
85
  <template v-slot:action>
@@ -115,7 +97,7 @@ const TemplateExamples = (args, { argTypes }) => ({
115
97
 
116
98
  <div>
117
99
  <h2>Informative</h2>
118
- <PsDialog status="informative" layout="vertical" message="This component uses only the props message!">
100
+ <PsDialog theme="informative" layout="vertical" message="This component uses only the props message!">
119
101
  <template v-slot:action>
120
102
  <p style='font-weight: 700;'>Action</p>
121
103
  </template>
@@ -124,7 +106,7 @@ const TemplateExamples = (args, { argTypes }) => ({
124
106
 
125
107
  <div>
126
108
  <h2>Success</h2>
127
- <PsDialog status="success" layout="vertical" message="This component uses only the props message!">
109
+ <PsDialog theme="success" layout="vertical" message="This component uses only the props message!" :hasClose="false">
128
110
  <template v-slot:action>
129
111
  <p style='font-weight: 700;'>Action</p>
130
112
  </template>
@@ -133,7 +115,7 @@ const TemplateExamples = (args, { argTypes }) => ({
133
115
 
134
116
  <div>
135
117
  <h2>Alert</h2>
136
- <PsDialog status="alert" layout="vertical" message="This component uses only the props message!">
118
+ <PsDialog theme="alert" layout="vertical" message="This component uses only the props message!">
137
119
  <template v-slot:action>
138
120
  <p style='font-weight: 700;'>Action</p>
139
121
  </template>
@@ -146,22 +128,4 @@ const TemplateExamples = (args, { argTypes }) => ({
146
128
 
147
129
  export const Examples = TemplateExamples.bind({})
148
130
 
149
- export const Informative = Template.bind({})
150
- Informative.args = {
151
- status: 'informative',
152
- layout: 'vertical',
153
- cssClass: 'psui-w-2/3'
154
- }
155
-
156
- export const Success = Template.bind({})
157
- Success.args = {
158
- status: 'success',
159
- message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
160
- }
161
-
162
- export const Warning = Template.bind({})
163
- Warning.args = {
164
- status: 'alert',
165
- message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
166
- }
167
131
 
@@ -0,0 +1,16 @@
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
+ <PsInlineSelector v-bind="$props"></PsInlineSelector>
13
+ `
14
+ })
15
+
16
+ export const Default = TemplateDefault.bind({})
@@ -0,0 +1,22 @@
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='width:300px; display:flex; flex-direction: column; gap:20px;'>
13
+ <PsInputSelect v-bind="$props" label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
14
+ <PsInputSelect v-bind="$props" disabled label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
15
+ </div>
16
+ `
17
+ })
18
+
19
+ export const Default = TemplateDefault.bind({})
20
+ Default.args = {
21
+ items: [{title:'Text 1', value:'Value 1'}, {title:'Text 2', value:'Value 2'}]
22
+ }
@@ -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({})