@policystudio/policy-studio-ui-vue 1.0.30 → 1.0.33

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 (78) 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 +483 -143
  6. package/package.json +16 -5
  7. package/postcss.config.js +1 -1
  8. package/src/assets/images/multifamily-units.svg +10 -0
  9. package/src/assets/scss/base.scss +2 -0
  10. package/src/assets/scss/components/PsAccordion.scss +28 -11
  11. package/src/assets/scss/components/PsButton.scss +21 -4
  12. package/src/assets/scss/components/PsCardInfos.scss +1 -1
  13. package/src/assets/scss/components/PsCheckbox.scss +4 -5
  14. package/src/assets/scss/components/PsChips.scss +17 -12
  15. package/src/assets/scss/components/PsDataTable.scss +17 -0
  16. package/src/assets/scss/components/PsDialog.scss +5 -2
  17. package/src/assets/scss/components/PsDraggable.scss +64 -0
  18. package/src/assets/scss/components/PsDropdown.scss +9 -24
  19. package/src/assets/scss/components/PsDropdownList.scss +19 -0
  20. package/src/assets/scss/components/PsInput.scss +8 -3
  21. package/src/assets/scss/components/PsInputSelect.scss +6 -3
  22. package/src/assets/scss/components/PsInputTextArea.scss +5 -2
  23. package/src/assets/scss/components/PsRadioButton.scss +5 -5
  24. package/src/assets/scss/components/PsSwitch.scss +4 -4
  25. package/src/assets/scss/components/PsTabHeader.scss +14 -0
  26. package/src/assets/scss/components/PsToast.scss +3 -3
  27. package/src/assets/scss/components/PsToggle.scss +6 -2
  28. package/src/assets/scss/components/PsTooltip.scss +50 -18
  29. package/src/components/accordion/PsAccordion.vue +7 -23
  30. package/src/components/accordion/PsAccordionItem.vue +42 -26
  31. package/src/components/badges-and-tags/PsCardInfos.vue +12 -0
  32. package/src/components/badges-and-tags/PsChartLegend.vue +13 -0
  33. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +7 -0
  34. package/src/components/badges-and-tags/PsCostEffectBar.vue +6 -0
  35. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -1
  36. package/src/components/badges-and-tags/PsMiniTag.vue +6 -0
  37. package/src/components/badges-and-tags/PsProgressBar.vue +17 -9
  38. package/src/components/buttons/PsButton.vue +22 -1
  39. package/src/components/chips/PsChips.vue +33 -12
  40. package/src/components/controls/PsCheckbox.vue +32 -16
  41. package/src/components/controls/PsDraggable.vue +39 -150
  42. package/src/components/controls/PsInlineSelector.vue +30 -0
  43. package/src/components/controls/PsRadioButton.vue +28 -15
  44. package/src/components/controls/PsSwitch.vue +17 -11
  45. package/src/components/controls/PsToggle.vue +33 -12
  46. package/src/components/datatable/PsDataTable.vue +21 -1
  47. package/src/components/datatable/PsDataTableItem.vue +1 -1
  48. package/src/components/forms/PsDropdown.vue +73 -101
  49. package/src/components/forms/PsDropdownList.vue +82 -0
  50. package/src/components/forms/PsInput.vue +28 -1
  51. package/src/components/forms/PsInputSelect.vue +21 -0
  52. package/src/components/forms/PsInputTextArea.vue +54 -41
  53. package/src/components/notifications/PsDialog.vue +15 -0
  54. package/src/components/notifications/PsToast.vue +12 -0
  55. package/src/components/playground/PsScrollBar.vue +248 -0
  56. package/src/components/tabs/PsTabHeader.vue +31 -5
  57. package/src/components/tooltip/PsDialogTooltip.vue +107 -24
  58. package/src/components/tooltip/PsRichTooltip.vue +12 -9
  59. package/src/components/tooltip/PsTooltip.vue +27 -11
  60. package/src/components/ui/PsIcon.vue +30 -0
  61. package/src/index.js +30 -2
  62. package/src/stories/Accordion.stories.js +12 -48
  63. package/src/stories/Button.stories.js +30 -7
  64. package/src/stories/Chips.stories.js +11 -24
  65. package/src/stories/Dropdown.stories.js +81 -14
  66. package/src/stories/Icon.stories.js +21 -0
  67. package/src/stories/InlineSelector.stories.js +1 -1
  68. package/src/stories/Playground.stories.js +16 -0
  69. package/src/stories/Switch.stories.js +8 -2
  70. package/src/stories/Toast.stories.js +16 -16
  71. package/src/stories/Tooltip.stories.js +6 -6
  72. package/src/stories/Typography.stories.mdx +22 -18
  73. package/src/util/GeneralFunctions.js +8 -0
  74. package/src/util/imageLoader.js +1 -1
  75. package/tailwind.config.js +7 -3
  76. package/vetur/attributes.json +1376 -0
  77. package/vetur/tags.json +632 -0
  78. package/src/components/forms/PsDropdownCopy.vue +0 -212
@@ -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 {
@@ -56,9 +56,9 @@ module.exports = {
56
56
  xsmall: ['12px', '130%'],
57
57
  accent: ['14px', '130%', { letterSpacing: '0.6px' }],
58
58
  accentSmall: ['12px', '130%', { letterSpacing: '0.6px' }],
59
- p: ['16px', '120%'],
60
- h1: ['28px', '120%'],
61
- h2: ['24px', '120%'],
59
+ p: ['16px', '130%'],
60
+ h1: ['28px', '130%'],
61
+ h2: ['24px', '130%'],
62
62
  h3: ['22px', '120%'],
63
63
  h4: ['20px', '120%'],
64
64
  h5: ['18px', '120%'],
@@ -99,6 +99,10 @@ module.exports = {
99
99
  20: '0.2',
100
100
  95: '0.95',
101
101
  },
102
+ cursor: {
103
+ 'grab': 'grab',
104
+ 'grabbing': 'grabbing'
105
+ }
102
106
  },
103
107
  },
104
108
  variants: {