@policystudio/policy-studio-ui-vue 1.0.18 → 1.0.22

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 (66) hide show
  1. package/.eslintrc.js +67 -0
  2. package/.storybook/main.js +11 -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/{src/assets/scss/tailwind.css → dist/css/psui_styles.css} +16720 -17120
  8. package/package.json +32 -19
  9. package/postcss.config.js +2 -0
  10. package/src/assets/images/check-checkbox-button.svg +1 -0
  11. package/src/assets/images/radio-checked-button.svg +1 -0
  12. package/src/assets/scss/base.scss +6 -5
  13. package/src/assets/scss/components/PsInput.scss +89 -0
  14. package/src/components/accordion/PsAccordion.vue +40 -0
  15. package/src/components/accordion/PsAccordionItem.vue +102 -0
  16. package/src/components/badges-and-tags/PsChartLegend.vue +128 -0
  17. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +18 -0
  18. package/src/components/badges-and-tags/PsCostEffectBar.vue +114 -0
  19. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +78 -0
  20. package/src/components/badges-and-tags/PsMiniTag.vue +46 -0
  21. package/src/components/badges-and-tags/PsProgressBar.vue +0 -0
  22. package/src/components/buttons/PsButton.vue +36 -13
  23. package/src/components/chips/PsChips.vue +154 -0
  24. package/src/components/controls/PsCheckbox.vue +30 -17
  25. package/src/components/controls/PsDraggable.vue +174 -3
  26. package/src/components/controls/PsRadioButton.vue +67 -60
  27. package/src/components/controls/PsSlider.vue +13 -12
  28. package/src/components/controls/PsSwitch.vue +76 -76
  29. package/src/components/datatable/PsDataTable.vue +89 -0
  30. package/src/components/datatable/PsDataTableItem.vue +57 -0
  31. package/src/components/forms/PsDropdown.vue +196 -0
  32. package/src/components/forms/PsInput.vue +122 -99
  33. package/src/components/notifications/PsDialog.vue +37 -18
  34. package/src/components/tabs/PsTabHeader.vue +20 -21
  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 +128 -0
  39. package/src/index.js +53 -24
  40. package/src/stories/Accordion.stories.js +41 -0
  41. package/src/stories/Button.stories.js +11 -11
  42. package/src/stories/ChartLegend.stories.js +16 -0
  43. package/src/stories/Checkbox.stories.js +21 -14
  44. package/src/stories/Chips.stories.js +55 -0
  45. package/src/stories/ClimateZoneBadge.stories.js +24 -0
  46. package/src/stories/Colors.stories.mdx +35 -35
  47. package/src/stories/CostEffectBar.stories.js +23 -0
  48. package/src/stories/Datatable.stories.js +50 -0
  49. package/src/stories/Dialog.stories.js +150 -17
  50. package/src/stories/Draggable.stories.js +22 -0
  51. package/src/stories/Dropdown.stories.js +32 -0
  52. package/src/stories/HighlightRippleDot.stories.js +16 -0
  53. package/src/stories/Input.stories.js +46 -15
  54. package/src/stories/MiniTag.stories.js +46 -0
  55. package/src/stories/ProgressBar.stories.js +23 -0
  56. package/src/stories/RadioButton.stories.js +25 -9
  57. package/src/stories/Slider.stories.js +9 -9
  58. package/src/stories/Swith.stories.js +10 -10
  59. package/src/stories/TabHeader.stories.js +9 -9
  60. package/src/stories/Toast.stories.js +13 -13
  61. package/src/stories/Toggle.stories.js +12 -13
  62. package/src/stories/Tooltip.stories.js +114 -0
  63. package/src/util/GeneralFunctions.js +22 -0
  64. package/src/util/imageLoader.js +50 -0
  65. package/tailwind.config.js +82 -45
  66. package/src/assets/scss/tailwind.scss +0 -61088
@@ -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 = {}
@@ -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,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
+ }
@@ -0,0 +1,32 @@
1
+ import PsDropdown from '../components/forms/PsDropdown.vue'
2
+ export default {
3
+ title: 'Components/Dropdown',
4
+ component: PsDropdown,
5
+ argTypes: {},
6
+ }
7
+
8
+ const Template = (args, { argTypes }) => ({
9
+ props: Object.keys(argTypes),
10
+ components: { PsDropdown },
11
+ template: `
12
+ <div>
13
+ <PsDropdown
14
+ buttonClasses="psui-p-3 "
15
+ >
16
+ <template v-slot:dropdownTrigger>
17
+ <div>Custom Trigger</div>
18
+ </template>
19
+ <template v-slot:items>
20
+ <ul>
21
+ <li>Small list of the drop down</li>
22
+ </ul>
23
+ </template>
24
+ </PsDropdown>
25
+ </div>
26
+ `,
27
+ })
28
+
29
+ export const CustomTrigger = Template.bind({})
30
+ CustomTrigger.args = {
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 = {}
@@ -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),
@@ -19,13 +19,44 @@ const TemplateDefault = (args, { argTypes }) => ({
19
19
  }
20
20
  }
21
21
  },
22
- template: `
23
- <div class="psui-p-8 psui-bg-gray-10">
24
- <PsInput v-bind="$props" />
25
- <PsInput v-bind="$props" class="psui-mt-8" :validator="validator" />
22
+ template: `
23
+ <div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-3 psui-gap-6">
24
+
25
+ <PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '' }" />
26
+
27
+ <PsInput label="Resting without hint" />
28
+
29
+ <PsInput label="Resting with Placeholder" placeholder="This is a placeholder" />
30
+
31
+
32
+ <PsInput v-bind="{...$props, label: 'Focus'}" />
33
+
34
+ <PsInput label="Typing" placeholder="Type to see the effect..." />
35
+
36
+ <PsInput v-bind="{...$props, label: 'Active', active: true }" />
37
+
38
+
39
+ <PsInput v-bind="{...$props, label: 'Error', hasError: true }" />
40
+
41
+ <PsInput v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
42
+
43
+ <PsInput v-bind="{...$props, label: 'Prepend / Append ' }" >
44
+ <template v-slot:append>
45
+ Append
46
+ </template>
47
+ <template v-slot:prepend>
48
+ Prepend
49
+ </template>
50
+ </PsInput>
51
+
52
+
53
+ <PsInput label="Disabled" :disabled="true" value="100,000" />
54
+ <PsInput v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }" />
55
+ <PsInput v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" />
56
+
26
57
  </div>
27
58
  `
28
- });
59
+ })
29
60
 
30
61
  const TemplateSlots = (args, { argTypes }) => ({
31
62
  props: Object.keys(argTypes),
@@ -52,20 +83,20 @@ const TemplateSlots = (args, { argTypes }) => ({
52
83
  </PsInput>
53
84
  </div>
54
85
  `
55
- });
86
+ })
56
87
 
57
- export const InputText = TemplateDefault.bind({});
88
+ export const InputText = TemplateDefault.bind({})
58
89
  InputText.args = {
59
- label: 'Label',
90
+ label: 'Input Text',
60
91
  placeholder: 'Placeholder',
61
92
  hint: 'Optional Assistive text',
62
93
  disabled: false,
63
94
  required: false,
64
95
  mini: false,
65
96
  value: 10,
66
- };
97
+ }
67
98
 
68
- export const InputPassword = TemplateDefault.bind({});
99
+ export const InputPassword = TemplateDefault.bind({})
69
100
  InputPassword.args = {
70
101
  type: 'password',
71
102
  label: 'Password',
@@ -73,9 +104,9 @@ InputPassword.args = {
73
104
  disabled: false,
74
105
  required: false,
75
106
  mini: false,
76
- };
107
+ }
77
108
 
78
- export const InputSlots = TemplateSlots.bind({});
109
+ export const InputSlots = TemplateSlots.bind({})
79
110
  InputSlots.args = {
80
111
  label: 'Label',
81
112
  placeholder: 'Placeholder',
@@ -83,4 +114,4 @@ InputSlots.args = {
83
114
  disabled: false,
84
115
  required: false,
85
116
  mini: false,
86
- };
117
+ }
@@ -0,0 +1,46 @@
1
+ import PsMiniTag, {
2
+ typeOptions,
3
+ } from '../components/badges-and-tags/PsMiniTag.vue'
4
+
5
+ export default {
6
+ title: 'Components/MiniTag',
7
+ component: PsMiniTag,
8
+ argTypes: {
9
+ type: {
10
+ control: {
11
+ type: 'select',
12
+ options: typeOptions,
13
+ },
14
+ },
15
+ },
16
+ }
17
+
18
+ const Template = (args, { argTypes }) => ({
19
+ props: Object.keys(argTypes),
20
+ components: { PsMiniTag },
21
+ template: '<PsMiniTag v-bind="$props" />',
22
+ })
23
+
24
+ export const Informative = Template.bind({})
25
+ Informative.args = {
26
+ type: 'informative',
27
+ message: 'This is an info alert',
28
+ }
29
+
30
+ export const Success = Template.bind({})
31
+ Success.args = {
32
+ type: 'success',
33
+ message: 'This is a success alert',
34
+ }
35
+
36
+ export const Warning = Template.bind({})
37
+ Warning.args = {
38
+ type: 'warning',
39
+ message: 'This is a warning alert',
40
+ }
41
+
42
+ export const Error = Template.bind({})
43
+ Error.args = {
44
+ type: 'error',
45
+ message: 'This is an error alert',
46
+ }
@@ -0,0 +1,23 @@
1
+ import PsProgressBar from '../components/badges-and-tags/PsProgressBar.vue'
2
+
3
+ export default {
4
+ title: 'Components/ProgressBar',
5
+ component: PsProgressBar,
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: { PsProgressBar },
19
+ template: '<PsProgressBar v-bind="$props" />',
20
+ })
21
+
22
+ export const ProgressBar = Template.bind({})
23
+ ProgressBar.args = {}