@policystudio/policy-studio-ui-vue 1.0.29 → 1.0.32

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 (84) hide show
  1. package/.eslintrc.js +36 -35
  2. package/.storybook/preview.js +7 -1
  3. package/README.md +6 -2
  4. package/babel.config.js +1 -1
  5. package/dist/css/psui_styles.css +1580 -185
  6. package/package.json +16 -5
  7. package/postcss.config.js +1 -1
  8. package/src/assets/scss/base.scss +3 -0
  9. package/src/assets/scss/components/PsAccordion.scss +28 -11
  10. package/src/assets/scss/components/PsButton.scss +39 -18
  11. package/src/assets/scss/components/PsCardInfos.scss +1 -1
  12. package/src/assets/scss/components/PsCheckbox.scss +4 -5
  13. package/src/assets/scss/components/PsChips.scss +13 -8
  14. package/src/assets/scss/components/PsClimateZoneBadge.scss +1 -1
  15. package/src/assets/scss/components/PsCostEffectBar.scss +22 -27
  16. package/src/assets/scss/components/PsDataTable.scss +17 -0
  17. package/src/assets/scss/components/PsDialog.scss +5 -2
  18. package/src/assets/scss/components/PsDotLoader.scss +45 -0
  19. package/src/assets/scss/components/PsDraggable.scss +64 -0
  20. package/src/assets/scss/components/PsDropdown.scss +9 -24
  21. package/src/assets/scss/components/PsDropdownList.scss +19 -0
  22. package/src/assets/scss/components/PsInlineSelector.scss +40 -25
  23. package/src/assets/scss/components/PsInput.scss +8 -3
  24. package/src/assets/scss/components/PsInputSelect.scss +6 -3
  25. package/src/assets/scss/components/PsInputTextArea.scss +5 -2
  26. package/src/assets/scss/components/PsMiniTag.scss +3 -3
  27. package/src/assets/scss/components/PsRadioButton.scss +5 -5
  28. package/src/assets/scss/components/PsSwitch.scss +4 -4
  29. package/src/assets/scss/components/PsTabHeader.scss +14 -0
  30. package/src/assets/scss/components/PsToast.scss +3 -3
  31. package/src/assets/scss/components/PsToggle.scss +6 -2
  32. package/src/assets/scss/components/PsTooltip.scss +50 -18
  33. package/src/components/accordion/PsAccordion.vue +7 -23
  34. package/src/components/accordion/PsAccordionItem.vue +42 -26
  35. package/src/components/badges-and-tags/PsCardInfos.vue +12 -0
  36. package/src/components/badges-and-tags/PsChartLegend.vue +13 -0
  37. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +7 -0
  38. package/src/components/badges-and-tags/PsCostEffectBar.vue +6 -0
  39. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -1
  40. package/src/components/badges-and-tags/PsMiniTag.vue +6 -0
  41. package/src/components/badges-and-tags/PsProgressBar.vue +17 -9
  42. package/src/components/buttons/PsButton.vue +27 -2
  43. package/src/components/chips/PsChips.vue +33 -13
  44. package/src/components/controls/PsCheckbox.vue +32 -16
  45. package/src/components/controls/PsDraggable.vue +39 -150
  46. package/src/components/controls/PsInlineSelector.vue +34 -16
  47. package/src/components/controls/PsRadioButton.vue +28 -15
  48. package/src/components/controls/PsSlider.vue +1 -1
  49. package/src/components/controls/PsSwitch.vue +20 -11
  50. package/src/components/controls/PsToggle.vue +33 -12
  51. package/src/components/datatable/PsDataTable.vue +21 -1
  52. package/src/components/datatable/PsDataTableItem.vue +1 -1
  53. package/src/components/forms/PsDropdown.vue +73 -101
  54. package/src/components/forms/PsDropdownList.vue +82 -0
  55. package/src/components/forms/PsInput.vue +28 -1
  56. package/src/components/forms/PsInputSelect.vue +21 -0
  57. package/src/components/forms/PsInputTextArea.vue +54 -41
  58. package/src/components/notifications/PsDialog.vue +15 -0
  59. package/src/components/notifications/PsToast.vue +12 -0
  60. package/src/components/playground/PsScrollBar.vue +54 -0
  61. package/src/components/tabs/PsTabHeader.vue +31 -5
  62. package/src/components/tooltip/PsDialogTooltip.vue +107 -24
  63. package/src/components/tooltip/PsRichTooltip.vue +12 -9
  64. package/src/components/tooltip/PsTooltip.vue +27 -11
  65. package/src/components/ui/PsDotLoader.vue +15 -0
  66. package/src/components/ui/PsIcon.vue +30 -0
  67. package/src/index.js +39 -7
  68. package/src/stories/Accordion.stories.js +12 -48
  69. package/src/stories/Button.stories.js +30 -7
  70. package/src/stories/Chips.stories.js +16 -4
  71. package/src/stories/Colors.stories.mdx +1 -0
  72. package/src/stories/Dropdown.stories.js +81 -14
  73. package/src/stories/InlineSelector.stories.js +1 -1
  74. package/src/stories/Playground.stories.js +16 -0
  75. package/src/stories/Switch.stories.js +8 -2
  76. package/src/stories/Toast.stories.js +16 -16
  77. package/src/stories/Tooltip.stories.js +6 -6
  78. package/src/stories/Typography.stories.mdx +22 -18
  79. package/src/util/GeneralFunctions.js +8 -0
  80. package/src/util/imageLoader.js +1 -1
  81. package/tailwind.config.js +8 -3
  82. package/vetur/attributes.json +1376 -0
  83. package/vetur/tags.json +632 -0
  84. package/src/components/forms/PsDropdownCopy.vue +0 -212
@@ -6,12 +6,12 @@ export default {
6
6
  argTypes: {
7
7
  size: { control: { type: 'select', options: sizes } },
8
8
  disabled: { control: 'boolean' },
9
- icon: { control: { type: 'select', options: icons} },
10
- iconRight: { control: { type: 'select', options: icons} }
9
+ icon: { control: { type: 'select', options: icons } },
10
+ iconRight: { control: { type: 'select', options: icons } },
11
11
  },
12
12
  }
13
13
 
14
- const TemplateDefault = (args, {argTypes}) => ({
14
+ const TemplateDefault = (args, { argTypes }) => ({
15
15
  props: Object.keys(argTypes),
16
16
  components: { PsButton },
17
17
  template: `
@@ -19,7 +19,7 @@ const TemplateDefault = (args, {argTypes}) => ({
19
19
  <p>Size: Big</p>
20
20
  <div style="display: flex; flex-direction: column; gap: 10px;">
21
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>
22
+ <span style="text-align: center; color: black;">Solid Style</span>
23
23
  <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left'/>
24
24
  <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right'/>
25
25
  <PsButton label='Text Only' layout='solid' />
@@ -46,11 +46,20 @@ const TemplateDefault = (args, {argTypes}) => ({
46
46
  <PsButton label='Text Only' layout='onlytext'/>
47
47
  <PsButton label='Disabled' layout='onlytext' icon='verified' iconPosition='left' disabled/>
48
48
  </div>
49
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
50
+ <span style="text-align: center; color: red;">Caution Button</span>
51
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left'/>
52
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right'/>
53
+ <PsButton label='Text Only' layout='caution' />
54
+ <PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled/>
55
+ </div>
56
+
57
+
49
58
  </div>
50
59
  <p>Size: Medium</p>
51
60
  <div style="display: flex; flex-direction: column; gap: 10px;">
52
61
  <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>
62
+ <span style="text-align: center; color: black;">Solid Style</span>
54
63
  <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='medium'/>
55
64
  <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='medium'/>
56
65
  <PsButton label='Text Only' layout='solid' size='medium'/>
@@ -77,11 +86,18 @@ const TemplateDefault = (args, {argTypes}) => ({
77
86
  <PsButton label='Text Only' layout='onlytext' size='medium'/>
78
87
  <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='medium'/>
79
88
  </div>
89
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
90
+ <span style="text-align: center; color: red;">Caution Button</span>
91
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='medium'/>
92
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='medium'/>
93
+ <PsButton label='Text Only' layout='caution' size='medium'/>
94
+ <PsButton label='Disabled' layout='caution' icon='verified' iconPosition='left' disabled size='medium'/>
95
+ </div>
80
96
  </div>
81
97
  <p>Size: Small</p>
82
98
  <div style="display: flex; flex-direction: column; gap: 10px;">
83
99
  <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>
100
+ <span style="text-align: center; color: black;">Solid Style</span>
85
101
  <PsButton label='Left Icon' layout='solid' icon='verified' iconPosition='left' size='small'/>
86
102
  <PsButton label='Right Icon' layout='solid' icon='verified' iconPosition='right' size='small'/>
87
103
  <PsButton label='Text Only' layout='solid' size='small'/>
@@ -94,9 +110,16 @@ const TemplateDefault = (args, {argTypes}) => ({
94
110
  <PsButton label='Text Only' layout='onlytext' size='small'/>
95
111
  <PsButton label='Disabled' layout='onlytext' disabled icon='verified' iconPosition='left' size='small'/>
96
112
  </div>
113
+ <div style="display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; justify-items: center; align-items: center;" >
114
+ <span style="text-align: center; color: red;">Caution Button</span>
115
+ <PsButton label='Left Icon' layout='caution' icon='verified' iconPosition='left' size='small'/>
116
+ <PsButton label='Right Icon' layout='caution' icon='verified' iconPosition='right' size='small'/>
117
+ <PsButton label='Text Only' layout='caution' size='small'/>
118
+ <PsButton label='Disabled' layout='caution' disabled icon='verified' iconPosition='left' size='small'/>
119
+ </div>
97
120
  </div>
98
121
  </div>
99
- `
122
+ `,
100
123
  })
101
124
 
102
125
  export const Default = TemplateDefault.bind({})
@@ -1,4 +1,4 @@
1
- import PsChips from "../components/chips/PsChips.vue"
1
+ import PsChips from '../components/chips/PsChips.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/Chips',
@@ -13,8 +13,12 @@ const Template = (args, { argTypes }) => ({
13
13
  isChecked: null,
14
14
  }
15
15
  },
16
- template: `<div >
17
- <PsChips v-bind='$props' @update:checked='isChecked = $event' :checked='isChecked'/>
16
+ template: `<div style="display:flex; gap: 10px;">
17
+ <PsChips v-bind='$props' type="button" @update:checked='isChecked = $event' :checked='isChecked'/>
18
+ <PsChips v-bind='$props' label="Simple chips with icons" type="button" layout="with-icon" icon="home" @update:checked='isChecked = $event' :checked='isChecked'/>
19
+ <PsChips v-bind='$props' label="Radio chips" type="radio" @update:checked='isChecked = $event' :checked='isChecked'/>
20
+ <PsChips v-bind='$props' label="Checkbox chips" type="checkbox" @update:checked='isChecked = $event' :checked='isChecked'/>
21
+ <PsChips v-bind='$props' label="Rich chips" type="button" layout="rich" icon="text_snippet" @update:checked='isChecked = $event' :checked='isChecked'/>
18
22
  </div>
19
23
  `
20
24
  })
@@ -22,7 +26,7 @@ const Template = (args, { argTypes }) => ({
22
26
  export const Simple = Template.bind({})
23
27
  Simple.args = {
24
28
  label: 'Simple Chip',
25
- icon:"",
29
+ icon:'',
26
30
  }
27
31
 
28
32
  export const SimpleWithIcon = Template.bind({})
@@ -41,4 +45,12 @@ export const Checkbox = Template.bind({})
41
45
  Checkbox.args = {
42
46
  label: 'Checkbox Chip',
43
47
  type: 'checkbox'
48
+ }
49
+
50
+ export const Rich = Template.bind({})
51
+ Rich.args = {
52
+ label: 'Rich Chip',
53
+ type: 'button',
54
+ icon: 'text_snippet',
55
+ layout: 'rich'
44
56
  }
@@ -54,6 +54,7 @@ Out colors are designed to be harmonious, ensure accessible text, and distinguis
54
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
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
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-15 click-to-copy" data-to-copy="psui-bg-red-15">Red 15 <div>#EAC5C5</div></div>
57
58
  <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
59
  </div>
59
60
 
@@ -1,32 +1,99 @@
1
1
  import PsDropdown from '../components/forms/PsDropdown.vue'
2
+ import PsDropdownList from '../components/forms/PsDropdownList.vue'
2
3
  export default {
3
4
  title: 'Components/Dropdown',
4
- component: PsDropdown,
5
- argTypes: {},
5
+ component: { PsDropdown, PsDropdownList },
6
6
  }
7
7
 
8
8
  const Template = (args, { argTypes }) => ({
9
9
  props: Object.keys(argTypes),
10
- components: { PsDropdown },
10
+ components: { PsDropdown, PsDropdownList },
11
11
  template: `
12
- <div>
13
- <PsDropdown
14
- buttonClasses="psui-p-3 "
15
- >
16
- <template v-slot:dropdownTrigger>
17
- <div>Custom Trigger</div>
12
+ <div style='background: #E6ECF2; width:1200px; height: 700px; padding: 20px;' class='psui-flex psui-gap-64 psui-bg-gray-20 '>
13
+ <PsDropdown>
14
+ <template #dropdownTrigger>
15
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
18
16
  </template>
19
- <template v-slot:items>
17
+ <template #items>
18
+ <div class='psui-pb-5'>
19
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 20px 8px 20px;'>divider label</p>
20
+
20
21
  <ul>
21
- <li>Small list of the drop down</li>
22
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 01</li>
23
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 02</li>
24
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 03</li>
25
+
26
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
27
+
28
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 04</li>
29
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 05</li>
30
+ <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 06</li>
22
31
  </ul>
32
+ </div>
23
33
  </template>
24
34
  </PsDropdown>
35
+
36
+ <PsDropdown>
37
+ <template #dropdownTrigger>
38
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
39
+ </template>
40
+ <template #items>
41
+ <div class='psui-pb-5'>
42
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
43
+
44
+ <ul>
45
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
46
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
47
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
48
+
49
+ <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
50
+
51
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
52
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
53
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
54
+ </ul>
55
+ </div>
56
+ </template>
57
+ </PsDropdown>
58
+
59
+ <PsDropdown>
60
+ <template #dropdownTrigger>
61
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
62
+ </template>
63
+ <template #items>
64
+ <PsDropdownList v-bind='$props'></PsDropdownList>
65
+ </template>
66
+ </PsDropdown>
67
+
68
+ <PsDropdown>
69
+ <template #dropdownTrigger>
70
+ <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
71
+ </template>
72
+ <template #items>
73
+ <div class='psui-my-3'>
74
+ <ul>
75
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
76
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
77
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
78
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
79
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
80
+ <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
81
+ </ul>
82
+ </div>
83
+ </template>
84
+ </PsDropdown>
25
85
  </div>
26
86
  `,
27
87
  })
28
88
 
29
- export const CustomTrigger = Template.bind({})
30
- CustomTrigger.args = {
31
- title: 'Custom trigger',
89
+ export const DropdownMenu = Template.bind({})
90
+ DropdownMenu.args = {
91
+ items: [
92
+ 'Selectable option 01',
93
+ 'Selectable option 02',
94
+ 'Selectable option 03',
95
+ 'Selectable option 04',
96
+ 'Selectable option 05',
97
+ 'Selectable option 06',
98
+ ],
32
99
  }
@@ -1,4 +1,4 @@
1
- import PsInlineSelector from "../components/controls/PsInlineSelector.vue"
1
+ import PsInlineSelector from '../components/controls/PsInlineSelector.vue'
2
2
 
3
3
  export default {
4
4
  title: 'Components/InlineSelector',
@@ -0,0 +1,16 @@
1
+ import PsScrollBar from '../components/playground/PsScrollBar.vue'
2
+
3
+ export default {
4
+ title: 'Components/Playground',
5
+ component: PsScrollBar
6
+ }
7
+
8
+ const Template = (args, {argTypes}) => ({
9
+ props: Object.keys(argTypes),
10
+ components: { PsScrollBar},
11
+ template: `
12
+ <PsScrollBar v-bind='$props' thumbColor="blue"></PsScrollbar>
13
+ `
14
+ })
15
+
16
+ export const ScrollBar = Template.bind({})
@@ -7,6 +7,12 @@ export default {
7
7
  const Template = (args, { argTypes }) => ({
8
8
  props: Object.keys(argTypes),
9
9
  components: { PsSwitch },
10
+ data(){
11
+ return {
12
+ dt: false
13
+
14
+ }
15
+ },
10
16
  template: `
11
17
  <div style='display: flex; gap:10px;'>
12
18
  <div style='display: flex; gap: 10px; flex-direction: column; margin-right: 10px;'>
@@ -16,8 +22,8 @@ const Template = (args, { argTypes }) => ({
16
22
  </div>
17
23
  <div style='display: flex; gap: 10px; flex-direction: column;'>
18
24
  <span>Disable</span>
19
- <PsSwitch v-bind="$props" label='Switch1' :value="${false}" size='big'/>
20
- <PsSwitch v-bind="$props" label='Switch2' :value="${false}" size='small'/>
25
+ <PsSwitch v-bind="$props" v-model="dt" label='Switch1' size='big'/>
26
+ <PsSwitch v-bind="$props" v-model="dt" label='Switch2' size='small'/>
21
27
  </div>
22
28
  <div style='display: flex; gap: 10px; flex-direction: column;'>
23
29
  <span>Enable</span>
@@ -11,38 +11,38 @@ const Template = (args, { argTypes }) => ({
11
11
  <div style="display: flex; gap: 30px;">
12
12
  <div style="display: flex; flex-direction: column; gap: 5px; width:500px;">
13
13
  <PsToast v-bind="$props" message="This is a info alert" layout="info" icon="info" fill="intense" >
14
- <p>Action 1</p>
15
- <p>Action 2</p>
14
+ <p class="hover:psui-underline">Action 1</p>
15
+ <p class="hover:psui-underline">Action 2</p>
16
16
  </PsToast>
17
17
  <PsToast v-bind="$props" message="This is a success alert" layout="success" icon="check_circle" >
18
- <p>Action 1</p>
19
- <p>Action 2</p>
18
+ <p class="hover:psui-underline">Action 1</p>
19
+ <p class="hover:psui-underline">Action 2</p>
20
20
  </PsToast>
21
21
  <PsToast v-bind="$props" message="This is a warning alert" layout="warning" icon="warning">
22
- <p>Action 1</p>
23
- <p>Action 2</p>
22
+ <p class="hover:psui-underline">Action 1</p>
23
+ <p class="hover:psui-underline">Action 2</p>
24
24
  </PsToast>
25
25
  <PsToast v-bind="$props" message="This is a an error alert" layout="error" icon="warning" >
26
- <p>Action 1</p>
27
- <p>Action 2</p>
26
+ <p class="hover:psui-underline">Action 1</p>
27
+ <p class="hover:psui-underline">Action 2</p>
28
28
  </PsToast>
29
29
  </div>
30
30
  <div style="display: flex; flex-direction: column; gap: 5px; width:500px;">
31
31
  <PsToast v-bind="$props" message="This is a info alert" layout="info" icon="info" fill="soft" >
32
- <p>Action 1</p>
33
- <p>Action 2</p>
32
+ <p class="hover:psui-underline">Action 1</p>
33
+ <p class="hover:psui-underline">Action 2</p>
34
34
  </PsToast>
35
35
  <PsToast v-bind="$props" message="This is a success alert" layout="success" icon="check_circle" fill="soft">
36
- <p>Action 1</p>
37
- <p>Action 2</p>
36
+ <p class="hover:psui-underline">Action 1</p>
37
+ <p class="hover:psui-underline">Action 2</p>
38
38
  </PsToast>
39
39
  <PsToast v-bind="$props" message="This is a warning alert" layout="warning" icon="warning" fill="soft">
40
- <p>Action 1</p>
41
- <p>Action 2</p>
40
+ <p class="hover:psui-underline">Action 1</p>
41
+ <p class="hover:psui-underline">Action 2</p>
42
42
  </PsToast>
43
43
  <PsToast v-bind="$props" message="This is a an error alert" layout="error" icon="warning" fill="soft">
44
- <p>Action 1</p>
45
- <p>Action 2</p>
44
+ <p class="hover:psui-underline">Action 1</p>
45
+ <p class="hover:psui-underline">Action 2</p>
46
46
  </PsToast>
47
47
  </div>
48
48
  <div>
@@ -13,7 +13,7 @@ const TemplateDialog = (args, {argTypes}) => ({
13
13
  components: {PsDialogTooltip},
14
14
  template: `
15
15
  <div style='display: flex; justify-content: space-between;'>
16
- <PsDialogTooltip v-bind='$props' layout='white' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
16
+ <PsDialogTooltip v-bind='$props' layout='white' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-64'>
17
17
  <template v-slot:trigger>
18
18
  <p>Trigger</p>
19
19
  </template>
@@ -21,7 +21,7 @@ const TemplateDialog = (args, {argTypes}) => ({
21
21
  <p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
22
22
  </template>
23
23
  </PsDialogTooltip>
24
- <PsDialogTooltip v-bind='$props' layout='dark' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
24
+ <PsDialogTooltip v-bind='$props' layout='dark' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-64'>
25
25
  <template v-slot:trigger>
26
26
  <p>Trigger</p>
27
27
  </template>
@@ -29,7 +29,7 @@ const TemplateDialog = (args, {argTypes}) => ({
29
29
  <p>Air seal all ductwork to a final duct leakage value of 10% of nominal airflow.</p>
30
30
  </template>
31
31
  </PsDialogTooltip>
32
- <PsDialogTooltip v-bind='$props' layout='color' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-48'>
32
+ <PsDialogTooltip v-bind='$props' layout='color' title='Duct Sealing' buttonText='More Info' cssClass='psui-w-64'>
33
33
  <template v-slot:trigger>
34
34
  <p>Trigger</p>
35
35
  </template>
@@ -46,7 +46,7 @@ const TemplateRich = (args,{argTypes})=>({
46
46
  components: {PsRichTooltip},
47
47
  template: `
48
48
  <div style='display: flex; justify-content: space-between;'>
49
- <PsRichTooltip v-bind='$props' layout='red' title='Measures that are not cost-effective cannot be added to a combination' cssClass='psui-w-48'>
49
+ <PsRichTooltip v-bind='$props' layout='red' title='Measures that are not cost-effective cannot be added to a combination' cssClass='psui-w-64'>
50
50
  <template v-slot:trigger>
51
51
  <p>Trigger</p>
52
52
  </template>
@@ -54,7 +54,7 @@ const TemplateRich = (args,{argTypes})=>({
54
54
  <p>Here you can add an optional supporting text</p>
55
55
  </template>
56
56
  </PsRichTooltip>
57
- <PsRichTooltip v-bind='$props' layout='blue' title='Select to create a combination of measures for your Policy' cssClass='psui-w-48'>
57
+ <PsRichTooltip v-bind='$props' layout='blue' title='Select to create a combination of measures for your Policy' cssClass='psui-w-64'>
58
58
  <template v-slot:trigger>
59
59
  <p>Trigger</p>
60
60
  </template>
@@ -62,7 +62,7 @@ const TemplateRich = (args,{argTypes})=>({
62
62
  <p>Here you can add an optional supporting text</p>
63
63
  </template>
64
64
  </PsRichTooltip>
65
- <PsRichTooltip v-bind='$props' layout='gray' title='Did not account for the cost of combustion safety testing' cssClass='psui-w-48'>
65
+ <PsRichTooltip v-bind='$props' layout='gray' title='Did not account for the cost of combustion safety testing' cssClass='psui-w-64'>
66
66
  <template v-slot:trigger>
67
67
  <p>Trigger</p>
68
68
  </template>
@@ -124,49 +124,49 @@ Keeping typography consistent and sticking to logical hierarchies ensures that e
124
124
  <p class="psui-font-bold">Headline 1</p>
125
125
  psui-text-h1
126
126
  </td>
127
- <td class="psui-text-h1">The lazy fox jumped overthe brown dog</td>
127
+ <td class="psui-text-h1 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h1">The lazy fox jumped over the brown dog</td>
128
128
  </tr>
129
129
  <tr>
130
130
  <td>
131
131
  <p class="psui-font-bold">Headline 2</p>
132
132
  psui-text-h2
133
133
  </td>
134
- <td class="psui-text-h2">The lazy fox jumped over the brown dog</td>
134
+ <td class="psui-text-h2 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h2">The lazy fox jumped over the brown dog</td>
135
135
  </tr>
136
136
  <tr>
137
137
  <td>
138
138
  <p class="psui-font-bold">Headline 3</p>
139
139
  psui-text-h3
140
140
  </td>
141
- <td class="psui-text-h3">The lazy fox jumped over the brown dog</td>
141
+ <td class="psui-text-h3 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h3">The lazy fox jumped over the brown dog</td>
142
142
  </tr>
143
143
  <tr>
144
144
  <td>
145
145
  <p class="psui-font-bold">Headline 4</p>
146
146
  psui-text-h4
147
147
  </td>
148
- <td class="psui-text-h4">The lazy fox jumped over the brown dog</td>
148
+ <td class="psui-text-h4 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h4">The lazy fox jumped over the brown dog</td>
149
149
  </tr>
150
150
  <tr>
151
151
  <td>
152
152
  <p class="psui-font-bold">Headline 5</p>
153
153
  psui-text-h5
154
154
  </td>
155
- <td class="psui-text-h5">The lazy fox jumped over the brown dog</td>
155
+ <td class="psui-text-h5 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h5">The lazy fox jumped over the brown dog</td>
156
156
  </tr>
157
157
  <tr>
158
158
  <td>
159
- <p class="psui-font-bold">Headline 6</p>
159
+ <p class="psui-font-bold" >Headline 6</p>
160
160
  psui-text-h6
161
161
  </td>
162
- <td class="psui-text-h6">The lazy fox jumped over the brown dog</td>
162
+ <td class="psui-text-h6 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h6">The lazy fox jumped over the brown dog</td>
163
163
  </tr>
164
164
  <tr>
165
165
  <td>
166
166
  <p class="psui-font-bold">Paragraph</p>
167
167
  psui-text-p
168
168
  </td>
169
- <td class="psui-text-p">
169
+ <td class="psui-text-p psui-cursor-pointer click-to-copy" data-to-copy="psui-text-p">
170
170
  This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
171
171
  </td>
172
172
  </tr>
@@ -175,7 +175,7 @@ Keeping typography consistent and sticking to logical hierarchies ensures that e
175
175
  <p class="psui-font-bold">Small</p>
176
176
  psui-text-small
177
177
  </td>
178
- <td class="psui-text-small">
178
+ <td class="psui-text-small psui-cursor-pointer click-to-copy" data-to-copy="psui-text-small">
179
179
  This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
180
180
  </td>
181
181
  </tr>
@@ -184,23 +184,27 @@ Keeping typography consistent and sticking to logical hierarchies ensures that e
184
184
  <p class="psui-font-bold">XSmall</p>
185
185
  psui-text-xsmall
186
186
  </td>
187
- <td class="psui-text-xsmall">
187
+ <td class="psui-text-xsmall psui-cursor-pointer click-to-copy" data-to-copy="psui-text-xsmall">
188
188
  This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
189
189
  </td>
190
190
  </tr>
191
191
  <tr>
192
- <td>
193
- <p class="psui-font-bold">Accent</p>
194
- psui-text-accent
192
+ <td class="psui-flex psui-flex-col">
193
+ <span class="psui-font-bold">Accent</span>
194
+ <span>psui-text-accent</span>
195
+ <span>psui-uppercase</span>
196
+ <span>psui-font-bold</span>
195
197
  </td>
196
- <td class="psui-text-accent">UPPERCASE THE LAZY FOX JUNPED OVER THE BROWN DOG</td>
198
+ <td class="psui-text-accent psui-uppercase psui-font-bold psui-cursor-pointer click-to-copy" data-to-copy="psui-text-accent psui-uppercase psui-font-bold">The lazy fox jumped over the brown dog</td>
197
199
  </tr>
198
200
  <tr>
199
- <td>
200
- <p class="psui-font-bold">Accent Small</p>
201
- psui-text-accent-small
201
+ <td class="psui-flex psui-flex-col">
202
+ <span class="psui-font-bold">Accent Small</span>
203
+ <span>psui-text-accentSmall</span>
204
+ <span>psui-uppercase</span>
205
+ <span>psui-font-bold</span>
202
206
  </td>
203
- <td class="psui-text-accent-small">UPPERCASE THE LAZY FOX JUNPED OVER THE BROWN DOG</td>
207
+ <td class="psui-text-accentSmall psui-uppercase psui-font-bold psui-cursor-pointer click-to-copy" data-to-copy="psui-text-accentSmall psui-uppercase psui-font-bold">The lazy fox jumped over the brown dog</td>
204
208
  </tr>
205
209
  </table>
206
210
 
@@ -20,3 +20,11 @@ export const getParentScrollableEl = (node) => {
20
20
  return getParentScrollableEl(node.parentNode)
21
21
  }
22
22
  }
23
+
24
+ export const getParentVueComponentByName = (comp, name) => {
25
+ if (comp.$options.name === name) {
26
+ return comp
27
+ } else {
28
+ return getParentVueComponentByName(comp.$parent, name)
29
+ }
30
+ }
@@ -19,7 +19,7 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
19
19
  }
20
20
 
21
21
  xhr.onloadend = () => {
22
- const contentType = xhr.getResponseHeader("Content-Type")
22
+ const contentType = xhr.getResponseHeader('Content-Type')
23
23
  if (!contentType.includes('image')) {
24
24
  reject(xhr)
25
25
  } else {
@@ -33,6 +33,7 @@ module.exports = {
33
33
  'yellow-80': '#834C0D',
34
34
 
35
35
  'red-10': '#FCEBEB',
36
+ 'red-15': '#EAC5C5',
36
37
  'red-20': '#D65C5A',
37
38
  'red-70': '#AA3937',
38
39
  'red-80': '#832F2E',
@@ -55,9 +56,9 @@ module.exports = {
55
56
  xsmall: ['12px', '130%'],
56
57
  accent: ['14px', '130%', { letterSpacing: '0.6px' }],
57
58
  accentSmall: ['12px', '130%', { letterSpacing: '0.6px' }],
58
- p: ['16px', '120%'],
59
- h1: ['28px', '120%'],
60
- h2: ['24px', '120%'],
59
+ p: ['16px', '130%'],
60
+ h1: ['28px', '130%'],
61
+ h2: ['24px', '130%'],
61
62
  h3: ['22px', '120%'],
62
63
  h4: ['20px', '120%'],
63
64
  h5: ['18px', '120%'],
@@ -98,6 +99,10 @@ module.exports = {
98
99
  20: '0.2',
99
100
  95: '0.95',
100
101
  },
102
+ cursor: {
103
+ 'grab': 'grab',
104
+ 'grabbing': 'grabbing'
105
+ }
101
106
  },
102
107
  },
103
108
  variants: {