@policystudio/policy-studio-ui-vue 1.0.19 → 1.0.23

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 (68) hide show
  1. package/.eslintrc.js +1 -2
  2. package/.storybook/main.js +10 -2
  3. package/.storybook/preview.js +1 -1
  4. package/README.md +8 -0
  5. package/babel.config.js +3 -0
  6. package/backup-package-lock.json +37194 -0
  7. package/dist/css/psui_styles.css +15709 -14658
  8. package/package.json +32 -21
  9. package/postcss.config.js +2 -0
  10. package/src/assets/scss/base.scss +9 -29
  11. package/src/assets/scss/components/PsAccordion.scss +63 -0
  12. package/src/assets/scss/components/PsButton.scss +145 -0
  13. package/src/assets/scss/components/PsInput.scss +104 -0
  14. package/src/components/accordion/PsAccordion.vue +30 -21
  15. package/src/components/accordion/PsAccordionItem.vue +29 -67
  16. package/src/components/badges-and-tags/PsCardInfos.vue +38 -0
  17. package/src/components/badges-and-tags/PsChartLegend.vue +43 -0
  18. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +18 -0
  19. package/src/components/badges-and-tags/PsCostEffectBar.vue +114 -0
  20. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +78 -0
  21. package/src/components/badges-and-tags/PsMiniTag.vue +46 -0
  22. package/src/components/badges-and-tags/PsProgressBar.vue +0 -0
  23. package/src/components/buttons/PsButton.vue +43 -75
  24. package/src/components/chips/PsChips.vue +46 -38
  25. package/src/components/controls/PsCheckbox.vue +29 -16
  26. package/src/components/controls/PsDraggable.vue +174 -3
  27. package/src/components/controls/PsRadioButton.vue +74 -43
  28. package/src/components/controls/PsSwitch.vue +75 -76
  29. package/src/components/controls/PsToggle.vue +1 -1
  30. package/src/components/datatable/PsDataTable.vue +25 -29
  31. package/src/components/datatable/PsDataTableItem.vue +2 -2
  32. package/src/components/forms/PsInput.vue +122 -102
  33. package/src/components/notifications/PsDialog.vue +37 -18
  34. package/src/components/tabs/PsTabHeader.vue +3 -2
  35. package/src/components/tooltip/PsDialogTooltip.vue +79 -0
  36. package/src/components/tooltip/PsRichTooltip.vue +44 -0
  37. package/src/components/tooltip/PsTooltip.vue +118 -0
  38. package/src/components/ui/PsIcon.vue +87 -24
  39. package/src/index.js +29 -9
  40. package/src/stories/Accordion.stories.js +88 -28
  41. package/src/stories/Button.stories.js +86 -38
  42. package/src/stories/CardInfos.stories.js +16 -0
  43. package/src/stories/ChartLegend.stories.js +16 -0
  44. package/src/stories/Checkbox.stories.js +6 -6
  45. package/src/stories/Chips.stories.js +14 -8
  46. package/src/stories/ClimateZoneBadge.stories.js +24 -0
  47. package/src/stories/Colors.stories.mdx +35 -35
  48. package/src/stories/CostEffectBar.stories.js +23 -0
  49. package/src/stories/Datatable.stories.js +15 -8
  50. package/src/stories/Dialog.stories.js +150 -17
  51. package/src/stories/Draggable.stories.js +22 -0
  52. package/src/stories/Dropdown.stories.js +8 -10
  53. package/src/stories/HighlightRippleDot.stories.js +16 -0
  54. package/src/stories/Input.stories.js +71 -19
  55. package/src/stories/MiniTag.stories.js +46 -0
  56. package/src/stories/ProgressBar.stories.js +23 -0
  57. package/src/stories/RadioButton.stories.js +15 -15
  58. package/src/stories/Slider.stories.js +9 -9
  59. package/src/stories/Swith.stories.js +10 -10
  60. package/src/stories/TabHeader.stories.js +9 -9
  61. package/src/stories/Toast.stories.js +13 -13
  62. package/src/stories/Toggle.stories.js +12 -13
  63. package/src/stories/Tooltip.stories.js +114 -0
  64. package/src/util/GeneralFunctions.js +11 -12
  65. package/src/util/imageLoader.js +50 -0
  66. package/tailwind.config.js +71 -47
  67. package/src/assets/scss/tailwind.css +0 -70643
  68. package/src/assets/scss/tailwind.scss +0 -61088
@@ -1,4 +1,4 @@
1
- import PsChips, { type } from "../components/chips/PsChips.vue";
1
+ import PsChips from "../components/chips/PsChips.vue"
2
2
 
3
3
  export default {
4
4
  title: 'Components/Chips',
@@ -8,42 +8,48 @@ export default {
8
8
  const Template = (args, { argTypes }) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsChips },
11
+ data: ()=>{
12
+ return{
13
+ isChecked: null,
14
+ }
15
+ },
11
16
  template: `<div >
12
- <PsChips v-bind='$props'/>
17
+ <PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
18
+ <pre>{{isChecked}}</pre>
13
19
  </div>
14
20
  `
15
21
  })
16
22
 
17
- export const Simple = Template.bind({});
23
+ export const Simple = Template.bind({})
18
24
  Simple.args = {
19
25
  title: 'Simple Chip',
20
26
  icon:"",
21
27
  type: 'text'
22
28
  }
23
29
 
24
- export const SimpleWithIcon = Template.bind({});
30
+ export const SimpleWithIcon = Template.bind({})
25
31
  SimpleWithIcon.args = {
26
32
  title: 'Simple With Icon',
27
33
  icon: 'home',
28
34
  type: 'text'
29
35
  }
30
36
 
31
- export const Radio = Template.bind({});
37
+ export const Radio = Template.bind({})
32
38
  Radio.args = {
33
39
  title: 'Radio Chip',
34
40
  type:'radio'
35
41
  }
36
42
 
37
- export const Checkbox = Template.bind({});
43
+ export const Checkbox = Template.bind({})
38
44
  Checkbox.args = {
39
45
  title: 'Checkbox Chip',
40
46
  type: 'checkbox'
41
47
  }
42
48
 
43
- export const Rich = Template.bind({});
49
+ export const Rich = Template.bind({})
44
50
  Rich.args = {
45
51
  title: 'Rich chips',
46
52
  type: 'text',
47
53
  icon: 'description',
48
- rich: 'true'
54
+ rich: true
49
55
  }
@@ -0,0 +1,24 @@
1
+ import PsClimateZoneBadge from '../components/badges-and-tags/PsClimateZoneBadge.vue'
2
+
3
+ // const icons = ["area_chart"];
4
+
5
+ export default {
6
+ title: 'Components/ClimateZoneBadge',
7
+ component: PsClimateZoneBadge,
8
+ argTypes: {
9
+ type: {
10
+ // icon: { control: { type: "select", options: icons } },
11
+ },
12
+ },
13
+ }
14
+
15
+ const Template = (args, { argTypes }) => ({
16
+ props: Object.keys(argTypes),
17
+ components: { PsClimateZoneBadge },
18
+ template: '<PsClimateZoneBadge v-bind="$props" />',
19
+ })
20
+
21
+ export const ClimateZoneBadge = Template.bind({})
22
+ ClimateZoneBadge.args = {
23
+ icon: 'area_chart',
24
+ }
@@ -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="#5094D3">Blue #5094D3</div>
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="#002A3A">Blue 80 #002A3A</div>
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="#00465F">Blue 70 #00465F</div>
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="#318FAC">Blue 60 #318FAC</div>
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="#64B5CE">Blue 50 #64B5CE</div>
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="#E0EFF6">Blue 20 #E0EFF6</div>
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="#ECF7FB">Blue 10 #ECF7FB</div>
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="#ffffff">White #ffffff</div>
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 <div>#5094D3</div></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="#28323B">Gray 80 #28323B</div>
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="#34404A">Gray 70 #34404A</div>
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="#515E6A">Gray 60 #515E6A</div>
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="#798490">Gray 50 #798490</div>
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="#A2ACB7">Gray 40 #A2ACB7</div>
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="#D6DDE5">Gray 30 #D6DDE5</div>
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="#E6ECF2">Gray 20 #E6ECF2</div>
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="#F3F6F9">Gray 10 #F3F6F9</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>
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="#834C0D">Yellow 80 #834C0D</div>
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="#B87305">Yellow 70 #B87305</div>
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="#EDAB3E">Yellow 20 #EDAB3E</div>
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="#FDF3E3">Yellow 10 #FDF3E3</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>
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="#286943">Green 80 #286943</div>
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="#44A06A">Green 70 #44A06A</div>
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="#5DB883">Green 20 #5DB883</div>
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="#DEF8E8">Green 10 #DEF8E8</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>
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="#832F2E">Red 80 #832F2E</div>
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="#AA3937">Red 70 #AA3937</div>
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="#D65C5A">Red 20 #D65C5A</div>
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="#FCEBEB">Red 10 #FCEBEB</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>
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="#518BE2">Sky #518BE2</div>
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="#57C0BA">Teal #57C0BA</div>
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="#8CCA82">Emerald #8CCA82</div>
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="#E9CF74">Mustard #E9CF74</div>
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="#FF906D">Orange #FF906D</div>
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="#FF77B8">Pink #FF77B8</div>
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="#9278C9">Purple #9278C9</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>
69
69
  </div>
@@ -0,0 +1,23 @@
1
+ import PsCostEffectBar from '../components/badges-and-tags/PsCostEffectBar.vue'
2
+
3
+ export default {
4
+ title: 'Components/CostEffectBar',
5
+ component: PsCostEffectBar,
6
+ argTypes: {
7
+ value: {
8
+ control: { type: 'number', min: 0, max: 100 },
9
+ },
10
+ breakEven: {
11
+ control: { type: 'number', min: 0, max: 100 },
12
+ },
13
+ },
14
+ }
15
+
16
+ const Template = (args, { argTypes }) => ({
17
+ props: Object.keys(argTypes),
18
+ components: { PsCostEffectBar },
19
+ template: '<PsCostEffectBar v-bind="$props" />',
20
+ })
21
+
22
+ export const SimpleProgressBar = Template.bind({})
23
+ SimpleProgressBar.args = {}
@@ -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: `<PsDataTable v-bind="$props" />`
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: `<PsDataTable v-bind="$props">
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,34 +1,167 @@
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',
5
5
  component: PsDialog,
6
- argTypes: {
7
- type: { control: { type: 'select', options: ['informative', 'success', 'alert'] } },
8
- },
9
- };
6
+ }
10
7
 
11
8
  const Template = (args, { argTypes }) => ({
12
9
  props: Object.keys(argTypes),
13
10
  components: { PsDialog },
14
- template: '<PsDialog v-bind="$props" />',
15
- });
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
+ })
16
22
 
17
- export const Informative = Template.bind({});
23
+ const TemplateExamples = (args, { argTypes }) => ({
24
+ props: Object.keys(argTypes),
25
+ components: { PsDialog },
26
+ template: `
27
+ <div class="psui-grid psui-grid-cols-3 psui-gap-4">
28
+
29
+ <div class="psui-col-span-3 psui-mt-8">
30
+ <h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Horizontal</h1>
31
+ </div>
32
+
33
+ <div>
34
+ <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>
39
+ <template v-slot:action>
40
+ <p style='font-weight: 700;'>Action</p>
41
+ </template>
42
+ </PsDialog>
43
+ </div>
44
+
45
+ <div>
46
+ <h2>Success</h2>
47
+ <PsDialog status="success" layout="horizontal">
48
+ <template v-slot:content>
49
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
50
+ </template>
51
+ <template v-slot:action>
52
+ <p style='font-weight: 700;'>Action</p>
53
+ </template>
54
+ </PsDialog>
55
+ </div>
56
+
57
+ <div>
58
+ <h2>Alert</h2>
59
+ <PsDialog status="alert" layout="horizontal">
60
+ <template v-slot:content>
61
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
62
+ </template>
63
+ <template v-slot:action>
64
+ <p style='font-weight: 700;'>Action</p>
65
+ </template>
66
+ </PsDialog>
67
+ </div>
68
+
69
+ <div class="psui-col-span-3 psui-mt-8">
70
+ <h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Vertical</h1>
71
+ </div>
72
+
73
+ <div>
74
+ <h2>Informative</h2>
75
+ <PsDialog status="informative" layout="vertical">
76
+ <template v-slot:content>
77
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
78
+ </template>
79
+ <template v-slot:action>
80
+ <p style='font-weight: 700;'>Action</p>
81
+ </template>
82
+ </PsDialog>
83
+ </div>
84
+
85
+ <div>
86
+ <h2>Success</h2>
87
+ <PsDialog status="success" layout="vertical">
88
+ <template v-slot:content>
89
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
90
+ </template>
91
+ <template v-slot:action>
92
+ <p style='font-weight: 700;'>Action</p>
93
+ </template>
94
+ </PsDialog>
95
+ </div>
96
+
97
+ <div>
98
+ <h2>Alert</h2>
99
+ <PsDialog status="alert" layout="vertical">
100
+ <template v-slot:content>
101
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
102
+ </template>
103
+ <template v-slot:action>
104
+ <p style='font-weight: 700;'>Action</p>
105
+ </template>
106
+ </PsDialog>
107
+ </div>
108
+
109
+
110
+
111
+ <!-- PSDialog Vertical -->
112
+ <div class="psui-col-span-3 psui-mt-8">
113
+ <h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSDialog Vertical Props Message</h1>
114
+ </div>
115
+
116
+ <div>
117
+ <h2>Informative</h2>
118
+ <PsDialog status="informative" layout="vertical" message="This component uses only the props message!">
119
+ <template v-slot:action>
120
+ <p style='font-weight: 700;'>Action</p>
121
+ </template>
122
+ </PsDialog>
123
+ </div>
124
+
125
+ <div>
126
+ <h2>Success</h2>
127
+ <PsDialog status="success" layout="vertical" message="This component uses only the props message!">
128
+ <template v-slot:action>
129
+ <p style='font-weight: 700;'>Action</p>
130
+ </template>
131
+ </PsDialog>
132
+ </div>
133
+
134
+ <div>
135
+ <h2>Alert</h2>
136
+ <PsDialog status="alert" layout="vertical" message="This component uses only the props message!">
137
+ <template v-slot:action>
138
+ <p style='font-weight: 700;'>Action</p>
139
+ </template>
140
+ </PsDialog>
141
+ </div>
142
+
143
+ </div>
144
+ `,
145
+ })
146
+
147
+ export const Examples = TemplateExamples.bind({})
148
+
149
+ export const Informative = Template.bind({})
18
150
  Informative.args = {
19
- type: 'informative',
20
- message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
21
- };
151
+ status: 'informative',
152
+ layout: 'vertical',
153
+ cssClass: 'psui-w-2/3'
154
+ }
22
155
 
23
- export const Success = Template.bind({});
156
+ export const Success = Template.bind({})
24
157
  Success.args = {
25
- type: 'success',
158
+ status: 'success',
26
159
  message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
27
- };
160
+ }
28
161
 
29
- export const Warning = Template.bind({});
162
+ export const Warning = Template.bind({})
30
163
  Warning.args = {
31
- type: 'alert',
164
+ status: 'alert',
32
165
  message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
33
- };
166
+ }
34
167
 
@@ -0,0 +1,22 @@
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: 300px; font-family: "Lato", sans-serif; font-size: 12px;'>
13
+ <PsDraggable v-bind='$props'/>
14
+ </div>
15
+ `
16
+ })
17
+
18
+ export const Component = Template.bind({})
19
+ Component.args = {
20
+ getColumns: {columnGroups:[{title: 'COST EFFECTIVENESS', columns: [ 'Teste1' , 'Teste2' , 'Teste3', 'Teste4']}, {title: 'PER HOME RESULTS', columns: [ 'Teste5' , 'Teste6' , 'Teste7', 'Teste8']}]},
21
+ module: 'comparison'
22
+ }
@@ -1,10 +1,9 @@
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
- argTypes: {
6
- },
7
- };
5
+ argTypes: {},
6
+ }
8
7
 
9
8
  const Template = (args, { argTypes }) => ({
10
9
  props: Object.keys(argTypes),
@@ -24,11 +23,10 @@ const Template = (args, { argTypes }) => ({
24
23
  </template>
25
24
  </PsDropdown>
26
25
  </div>
27
- `
28
- });
26
+ `,
27
+ })
29
28
 
30
- export const CustomTrigger = Template.bind({});
29
+ export const CustomTrigger = Template.bind({})
31
30
  CustomTrigger.args = {
32
- title: 'Custom trigger'
33
- };
34
-
31
+ title: 'Custom trigger',
32
+ }
@@ -0,0 +1,16 @@
1
+ import PsHighlightRippleDot from '../components/badges-and-tags/PsHighlightRippleDot.vue'
2
+
3
+ export default {
4
+ title: 'Components/HighlightRippleDot',
5
+ component: PsHighlightRippleDot,
6
+ argTypes: {},
7
+ }
8
+
9
+ const Template = (args, { argTypes }) => ({
10
+ props: Object.keys(argTypes),
11
+ components: { PsHighlightRippleDot },
12
+ template: '<PsHighlightRippleDot v-bind="$props" />',
13
+ })
14
+
15
+ export const HighlightRippleDot = Template.bind({})
16
+ HighlightRippleDot.args = {}