@policystudio/policy-studio-ui-vue 1.1.90-beta.0 → 1.1.90-beta.12

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 (166) hide show
  1. package/.eslintrc.js +12 -8
  2. package/.storybook/PolicyStudio.ts +11 -0
  3. package/.storybook/manager.ts +7 -0
  4. package/dist/contents/ComparisonData.js +376 -0
  5. package/dist/contents/ComparisonData.js.map +1 -0
  6. package/dist/contents/FlexibleData.js +501 -0
  7. package/dist/contents/FlexibleData.js.map +1 -0
  8. package/dist/contents/ResultsData.js +530 -0
  9. package/dist/contents/ResultsData.js.map +1 -0
  10. package/dist/css/psui_styles.css +4035 -110277
  11. package/dist/index.js +114 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/stories/Accordion.stories.js +56 -0
  14. package/dist/stories/Accordion.stories.js.map +1 -0
  15. package/dist/stories/BadgeWithIcon.stories.js +28 -0
  16. package/dist/stories/BadgeWithIcon.stories.js.map +1 -0
  17. package/dist/stories/BarChart.stories.js +16 -0
  18. package/dist/stories/BarChart.stories.js.map +1 -0
  19. package/dist/stories/Breadcrumb.stories.js +21 -0
  20. package/dist/stories/Breadcrumb.stories.js.map +1 -0
  21. package/dist/stories/Button.stories.js +44 -0
  22. package/dist/stories/Button.stories.js.map +1 -0
  23. package/dist/stories/CardInfos.stories.js +13 -0
  24. package/dist/stories/CardInfos.stories.js.map +1 -0
  25. package/dist/stories/ChartLegend.stories.js +13 -0
  26. package/dist/stories/ChartLegend.stories.js.map +1 -0
  27. package/dist/stories/Checkbox.stories.js +44 -0
  28. package/dist/stories/Checkbox.stories.js.map +1 -0
  29. package/dist/stories/CheckboxSimple.stories.js +48 -0
  30. package/dist/stories/CheckboxSimple.stories.js.map +1 -0
  31. package/dist/stories/Chips.stories.js +27 -0
  32. package/dist/stories/Chips.stories.js.map +1 -0
  33. package/dist/stories/ClimateZoneBadge.stories.js +15 -0
  34. package/dist/stories/ClimateZoneBadge.stories.js.map +1 -0
  35. package/dist/stories/CostEffectBar.stories.js +21 -0
  36. package/dist/stories/CostEffectBar.stories.js.map +1 -0
  37. package/dist/stories/Datatable.stories.js +45 -0
  38. package/dist/stories/Datatable.stories.js.map +1 -0
  39. package/dist/stories/DateCardInfo.stories.js +18 -0
  40. package/dist/stories/DateCardInfo.stories.js.map +1 -0
  41. package/dist/stories/Dialog.stories.js +127 -0
  42. package/dist/stories/Dialog.stories.js.map +1 -0
  43. package/dist/stories/Draggable.stories.js +20 -0
  44. package/dist/stories/Draggable.stories.js.map +1 -0
  45. package/dist/stories/Dropdown.stories.js +98 -0
  46. package/dist/stories/Dropdown.stories.js.map +1 -0
  47. package/dist/stories/DropdownList.stories.js +208 -0
  48. package/dist/stories/DropdownList.stories.js.map +1 -0
  49. package/dist/stories/Header.stories.js +39 -0
  50. package/dist/stories/Header.stories.js.map +1 -0
  51. package/dist/stories/HighlightRippleDot.stories.js +13 -0
  52. package/dist/stories/HighlightRippleDot.stories.js.map +1 -0
  53. package/dist/stories/Icon.stories.js +19 -0
  54. package/dist/stories/Icon.stories.js.map +1 -0
  55. package/dist/stories/InlineSelector.stories.js +16 -0
  56. package/dist/stories/InlineSelector.stories.js.map +1 -0
  57. package/dist/stories/Input.stories.js +235 -0
  58. package/dist/stories/Input.stories.js.map +1 -0
  59. package/dist/stories/InputSelect.stories.js +28 -0
  60. package/dist/stories/InputSelect.stories.js.map +1 -0
  61. package/dist/stories/InputTextArea.stories.js +23 -0
  62. package/dist/stories/InputTextArea.stories.js.map +1 -0
  63. package/dist/stories/MiniTag.stories.js +44 -0
  64. package/dist/stories/MiniTag.stories.js.map +1 -0
  65. package/dist/stories/Playground.stories.js +14 -0
  66. package/dist/stories/Playground.stories.js.map +1 -0
  67. package/dist/stories/ProgressBar.stories.js +21 -0
  68. package/dist/stories/ProgressBar.stories.js.map +1 -0
  69. package/dist/stories/RadioButton.stories.js +36 -0
  70. package/dist/stories/RadioButton.stories.js.map +1 -0
  71. package/dist/stories/RadioButtonSimple.stories.js +40 -0
  72. package/dist/stories/RadioButtonSimple.stories.js.map +1 -0
  73. package/dist/stories/SimpleAlert.stories.js +19 -0
  74. package/dist/stories/SimpleAlert.stories.js.map +1 -0
  75. package/dist/stories/Slider.stories.js +70 -0
  76. package/dist/stories/Slider.stories.js.map +1 -0
  77. package/dist/stories/Switch.stories.js +35 -0
  78. package/dist/stories/Switch.stories.js.map +1 -0
  79. package/dist/stories/TabHeader.stories.js +48 -0
  80. package/dist/stories/TabHeader.stories.js.map +1 -0
  81. package/dist/stories/TableResults.stories.js +717 -0
  82. package/dist/stories/TableResults.stories.js.map +1 -0
  83. package/dist/stories/TagScope.stories.js +16 -0
  84. package/dist/stories/TagScope.stories.js.map +1 -0
  85. package/dist/stories/TestimonialCard.stories.js +24 -0
  86. package/dist/stories/TestimonialCard.stories.js.map +1 -0
  87. package/dist/stories/Toast.stories.js +51 -0
  88. package/dist/stories/Toast.stories.js.map +1 -0
  89. package/dist/stories/Toggle.stories.js +42 -0
  90. package/dist/stories/Toggle.stories.js.map +1 -0
  91. package/dist/stories/Tooltip.stories.js +108 -0
  92. package/dist/stories/Tooltip.stories.js.map +1 -0
  93. package/dist/util/GeneralFunctions.js +29 -0
  94. package/dist/util/GeneralFunctions.js.map +1 -0
  95. package/dist/util/imageLoader.js +52 -0
  96. package/dist/util/imageLoader.js.map +1 -0
  97. package/package.json +25 -22
  98. package/postcss.config.js +1 -1
  99. package/src/App.vue +30 -0
  100. package/src/assets/scss/base.scss +27 -23
  101. package/src/assets/scss/components/PsAccordion.scss +1 -1
  102. package/src/assets/scss/components/PsChips.scss +3 -3
  103. package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
  104. package/src/assets/scss/components/PsProgressBar.scss +4 -4
  105. package/src/assets/scss/components/PsTabHeader.scss +1 -1
  106. package/src/assets/scss/components/PsTableResults.scss +1 -1
  107. package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
  108. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +2 -1
  109. package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
  110. package/src/components/buttons/PsButton.vue +74 -96
  111. package/src/{index.js → index.ts} +4 -0
  112. package/src/shims-vue.d.ts +11 -0
  113. package/src/stories/{Accordion.stories.js → Accordion.stories.ts} +2 -2
  114. package/src/stories/{BadgeWithIcon.stories.js → BadgeWithIcon.stories.ts} +1 -1
  115. package/src/stories/{BarChart.stories.js → BarChart.stories.ts} +1 -1
  116. package/src/stories/{Breadcrumb.stories.js → Breadcrumb.stories.ts} +1 -4
  117. package/src/stories/{CardInfos.stories.js → CardInfos.stories.ts} +1 -2
  118. package/src/stories/{ChartLegend.stories.js → ChartLegend.stories.ts} +1 -2
  119. package/src/stories/{Checkbox.stories.js → Checkbox.stories.ts} +1 -1
  120. package/src/stories/{CheckboxSimple.stories.js → CheckboxSimple.stories.ts} +1 -1
  121. package/src/stories/{Chips.stories.js → Chips.stories.ts} +24 -22
  122. package/src/stories/{ClimateZoneBadge.stories.js → ClimateZoneBadge.stories.ts} +2 -1
  123. package/src/stories/{CostEffectBar.stories.js → CostEffectBar.stories.ts} +2 -1
  124. package/src/stories/{Datatable.stories.js → Datatable.stories.ts} +5 -2
  125. package/src/stories/{DateCardInfo.stories.js → DateCardInfo.stories.ts} +1 -5
  126. package/src/stories/{Dialog.stories.js → Dialog.stories.ts} +1 -1
  127. package/src/stories/{Draggable.stories.js → Draggable.stories.ts} +2 -1
  128. package/src/stories/{Dropdown.stories.js → Dropdown.stories.ts} +2 -1
  129. package/src/stories/{DropdownList.stories.js → DropdownList.stories.ts} +3 -1
  130. package/src/stories/{Header.stories.js → Header.stories.ts} +1 -0
  131. package/src/stories/{HighlightRippleDot.stories.js → HighlightRippleDot.stories.ts} +2 -1
  132. package/src/stories/{Icon.stories.js → Icon.stories.ts} +2 -0
  133. package/src/stories/{InlineSelector.stories.js → InlineSelector.stories.ts} +1 -1
  134. package/src/stories/{Input.stories.js → Input.stories.ts} +6 -3
  135. package/src/stories/{InputSelect.stories.js → InputSelect.stories.ts} +2 -1
  136. package/src/stories/{InputTextArea.stories.js → InputTextArea.stories.ts} +1 -1
  137. package/src/stories/{MiniTag.stories.js → MiniTag.stories.ts} +8 -1
  138. package/src/stories/{Playground.stories.js → Playground.stories.ts} +1 -1
  139. package/src/stories/{ProgressBar.stories.js → ProgressBar.stories.ts} +2 -1
  140. package/src/stories/{RadioButton.stories.js → RadioButton.stories.ts} +1 -1
  141. package/src/stories/{RadioButtonSimple.stories.js → RadioButtonSimple.stories.ts} +1 -1
  142. package/src/stories/{SimpleAlert.stories.js → SimpleAlert.stories.ts} +2 -1
  143. package/src/stories/{Slider.stories.js → Slider.stories.ts} +5 -1
  144. package/src/stories/{Switch.stories.js → Switch.stories.ts} +1 -1
  145. package/src/stories/{TabHeader.stories.js → TabHeader.stories.ts} +5 -0
  146. package/src/stories/{TableResults.stories.js → TableResults.stories.ts} +5 -1
  147. package/src/stories/{TagScope.stories.js → TagScope.stories.ts} +1 -1
  148. package/src/stories/{TestimonialCard.stories.js → TestimonialCard.stories.ts} +2 -2
  149. package/src/stories/{Toast.stories.js → Toast.stories.ts} +1 -1
  150. package/src/stories/{Toggle.stories.js → Toggle.stories.ts} +6 -3
  151. package/src/stories/{Tooltip.stories.js → Tooltip.stories.ts} +3 -3
  152. package/src/util/{GeneralFunctions.js → GeneralFunctions.ts} +7 -6
  153. package/src/util/{imageLoader.js → imageLoader.ts} +15 -7
  154. package/tailwind.config.js +11 -2
  155. package/tsconfig.json +47 -0
  156. package/webpack.config.js +17 -3
  157. package/.storybook/PolicyStudio.js +0 -10
  158. package/.storybook/manager.js +0 -6
  159. package/babel.config.js +0 -17
  160. /package/.storybook/{eventBus.js → eventBus.ts} +0 -0
  161. /package/.storybook/{main.js → main.ts} +0 -0
  162. /package/.storybook/{preview.js → preview.ts} +0 -0
  163. /package/src/contents/{ComparisonData.js → ComparisonData.ts} +0 -0
  164. /package/src/contents/{FlexibleData.js → FlexibleData.ts} +0 -0
  165. /package/src/contents/{ResultsData.js → ResultsData.ts} +0 -0
  166. /package/src/stories/{Button.stories.js → Button.stories.ts} +0 -0
@@ -6,6 +6,7 @@ export default {
6
6
  argTypes: {},
7
7
  }
8
8
 
9
+ // @ts-ignore
9
10
  const Template = (args, { argTypes }) => ({
10
11
  props: Object.keys(argTypes),
11
12
  components: { PsIcon },
@@ -18,4 +19,5 @@ export default {
18
19
  })
19
20
 
20
21
  export const IconSimple = Template.bind({})
22
+ // @ts-ignore
21
23
  IconSimple.args = {}
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsInlineSelector,
6
6
  }
7
7
 
8
- const TemplateDefault = (args, {argTypes}) => ({
8
+ const TemplateDefault = (args:any, {argTypes}:{argTypes:any}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: {PsInlineSelector},
11
11
  template: `
@@ -7,7 +7,7 @@ export default {
7
7
  required: { control: 'boolean' },
8
8
  },
9
9
  }
10
-
10
+ // @ts-ignore
11
11
  const TemplateInputText = (args, { argTypes }) => ({
12
12
  props: Object.keys(argTypes),
13
13
  components: { PsInput },
@@ -79,7 +79,7 @@ const TemplateInputText = (args, { argTypes }) => ({
79
79
  </div>
80
80
  `
81
81
  })
82
-
82
+ // @ts-ignore
83
83
  const TemplateInputPassword = (args, { argTypes }) => ({
84
84
  props: Object.keys(argTypes),
85
85
  components: { PsInput },
@@ -183,7 +183,7 @@ const TemplateInputPassword = (args, { argTypes }) => ({
183
183
  </div>
184
184
  `
185
185
  })
186
-
186
+ // @ts-ignore
187
187
  const TemplateSlots = (args, { argTypes }) => ({
188
188
  props: Object.keys(argTypes),
189
189
  components: { PsInput },
@@ -212,6 +212,7 @@ const TemplateSlots = (args, { argTypes }) => ({
212
212
  })
213
213
 
214
214
  export const InputText = TemplateInputText.bind({})
215
+ // @ts-ignore
215
216
  InputText.args = {
216
217
  label: 'Input Text',
217
218
  placeholder: 'Placeholder',
@@ -222,6 +223,7 @@ InputText.args = {
222
223
  }
223
224
 
224
225
  export const InputPassword = TemplateInputPassword.bind({})
226
+ // @ts-ignore
225
227
  InputPassword.args = {
226
228
  type: 'password',
227
229
  label: 'Password',
@@ -231,6 +233,7 @@ InputPassword.args = {
231
233
  }
232
234
 
233
235
  export const InputSlots = TemplateSlots.bind({})
236
+ // @ts-ignore
234
237
  InputSlots.args = {
235
238
  label: 'Label',
236
239
  placeholder: 'Placeholder',
@@ -4,7 +4,7 @@ export default {
4
4
  title: 'Text fields & Forms/InputSelect',
5
5
  component: PsInputSelect
6
6
  }
7
-
7
+ // @ts-ignore
8
8
  const TemplateDefault = (args, {argTypes})=> ({
9
9
  props: Object.keys(argTypes),
10
10
  components: {PsInputSelect},
@@ -25,6 +25,7 @@ const TemplateDefault = (args, {argTypes})=> ({
25
25
  })
26
26
 
27
27
  export const Default = TemplateDefault.bind({})
28
+ // @ts-ignore
28
29
  Default.args = {
29
30
  items: [{title:'Text 1', value:'Value 1'}, {title:'Text 2', value:'Value 2'}]
30
31
  }
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsInputTextArea,
6
6
  }
7
7
 
8
- const Template = (args, {argTypes}) => ({
8
+ const Template = (args:any, {argTypes}:{argTypes:any}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: {PsInputTextArea},
11
11
  template: `
@@ -1,4 +1,6 @@
1
+
1
2
  import PsMiniTag, {
3
+ // @ts-ignore
2
4
  typeOptions,
3
5
  } from '../components/badges-and-tags/PsMiniTag.vue'
4
6
 
@@ -14,7 +16,7 @@ export default {
14
16
  },
15
17
  },
16
18
  }
17
-
19
+ // @ts-ignore
18
20
  const Template = (args, { argTypes }) => ({
19
21
  props: Object.keys(argTypes),
20
22
  components: { PsMiniTag },
@@ -22,30 +24,35 @@ const Template = (args, { argTypes }) => ({
22
24
  })
23
25
 
24
26
  export const Info = Template.bind({})
27
+ // @ts-ignore
25
28
  Info.args = {
26
29
  layout: 'info',
27
30
  message: 'This is an info alert',
28
31
  }
29
32
 
30
33
  export const Success = Template.bind({})
34
+ // @ts-ignore
31
35
  Success.args = {
32
36
  layout: 'success',
33
37
  message: 'This is a success alert',
34
38
  }
35
39
 
36
40
  export const Warning = Template.bind({})
41
+ // @ts-ignore
37
42
  Warning.args = {
38
43
  layout: 'warning',
39
44
  message: 'This is a warning alert',
40
45
  }
41
46
 
42
47
  export const Error = Template.bind({})
48
+ // @ts-ignore
43
49
  Error.args = {
44
50
  layout: 'error',
45
51
  message: 'This is an error alert',
46
52
  }
47
53
 
48
54
  export const Default = Template.bind({})
55
+ // @ts-ignore
49
56
  Default.args = {
50
57
  layout: 'default',
51
58
  message: 'This is a default color',
@@ -4,7 +4,7 @@ export default {
4
4
  title: 'Components/Playground',
5
5
  component: PsScrollBar
6
6
  }
7
-
7
+ // @ts-ignore
8
8
  const Template = (args, {argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsScrollBar},
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  },
14
14
  }
15
-
15
+ // @ts-ignore
16
16
  const TemplateDefault = (args, { argTypes }) => ({
17
17
  props: Object.keys(argTypes),
18
18
  components: { PsProgressBar },
@@ -20,4 +20,5 @@ const TemplateDefault = (args, { argTypes }) => ({
20
20
  })
21
21
 
22
22
  export const Default = TemplateDefault.bind({})
23
+ // @ts-ignore
23
24
  Default.args = {}
@@ -4,7 +4,7 @@ export default {
4
4
  title: 'Controls & Selectors/Radio Button',
5
5
  component: PsRadioButton,
6
6
  }
7
-
7
+ // @ts-ignore
8
8
  const DefaultTemplate = (args,{ argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsRadioButton},
@@ -5,7 +5,7 @@ export default {
5
5
  component: PsRadioButtonSimple,
6
6
  }
7
7
 
8
- const defaultTemplate = (args, {argTypes}) => ({
8
+ const defaultTemplate = (args:any, {argTypes}:{argTypes:any}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsRadioButtonSimple },
11
11
  data: () => ({
@@ -4,7 +4,7 @@ export default {
4
4
  title: 'Notifications/Simple Alert',
5
5
  component: PsSimpleAlert,
6
6
  }
7
-
7
+ // @ts-ignore
8
8
  const TemplateDefault = (args, { argTypes }) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components: { PsSimpleAlert },
@@ -16,6 +16,7 @@ export default {
16
16
  })
17
17
 
18
18
  export const Default = TemplateDefault.bind({})
19
+ // @ts-ignore
19
20
  Default.args = {
20
21
  message:'lorem'
21
22
  }
@@ -7,7 +7,7 @@ export default {
7
7
  // layout: { control: { type: 'inline-radio', options: sliderLayout } },
8
8
  // },
9
9
  }
10
-
10
+ // @ts-ignore
11
11
  const Template = (args, { argTypes }) => ({
12
12
  props: Object.keys(argTypes),
13
13
  components: { PsSlider },
@@ -29,6 +29,7 @@ const Template = (args, { argTypes }) => ({
29
29
  })
30
30
 
31
31
  export const Label = Template.bind({})
32
+ // @ts-ignore
32
33
  Label.args = {
33
34
  min: 0,
34
35
  max: 200,
@@ -39,6 +40,7 @@ Label.args = {
39
40
  }
40
41
 
41
42
  export const NoLabel = Template.bind({})
43
+ // @ts-ignore
42
44
  NoLabel.args = {
43
45
  min: 0,
44
46
  max: 200,
@@ -48,6 +50,7 @@ NoLabel.args = {
48
50
  }
49
51
 
50
52
  export const Bubble = Template.bind({})
53
+ // @ts-ignore
51
54
  Bubble.args = {
52
55
  min: 0,
53
56
  max: 200,
@@ -62,6 +65,7 @@ const sliderColors = [
62
65
  { start: 170, end: 200, bgColor: '#D65C5A' },
63
66
  ]
64
67
  export const Rich = Template.bind({})
68
+ // @ts-ignore
65
69
  Rich.args = {
66
70
  min: 0,
67
71
  max: 200,
@@ -3,7 +3,7 @@ export default {
3
3
  title: 'Controls & Selectors/Switch',
4
4
  component: PsSwitch,
5
5
  }
6
-
6
+ // @ts-ignore
7
7
  const Template = (args, { argTypes }) => ({
8
8
  props: Object.keys(argTypes),
9
9
  components: { PsSwitch },
@@ -7,6 +7,8 @@ export default {
7
7
  component: PsTabHeader,
8
8
  argTypes: {}
9
9
  }
10
+
11
+ // @ts-ignore
10
12
  const Template = (args, { argTypes }) => ({
11
13
  props: Object.keys(argTypes),
12
14
  components: { PsTabHeader },
@@ -31,6 +33,7 @@ const Template = (args, { argTypes }) => ({
31
33
  })
32
34
 
33
35
  export const Standard = Template.bind({})
36
+ // @ts-ignore
34
37
  Standard.args = {
35
38
  layout: 'standard',
36
39
  items: items,
@@ -38,6 +41,7 @@ Standard.args = {
38
41
  }
39
42
 
40
43
  export const Underline = Template.bind({})
44
+ // @ts-ignore
41
45
  Underline.args = {
42
46
  layout: 'underline',
43
47
  items: items,
@@ -45,6 +49,7 @@ Underline.args = {
45
49
  }
46
50
 
47
51
  export const Folder = Template.bind({})
52
+ // @ts-ignore
48
53
  Folder.args = {
49
54
  layout: 'folder',
50
55
  items: items,
@@ -1,3 +1,4 @@
1
+ // @ts-ignore
1
2
  import PsTableResults, { tableLayout } from '../components/table-results/PsTableResults.vue'
2
3
  import PsTableResultsHead from '../components/table-results/PsTableResultsHead.vue'
3
4
  import PsTableResultsHeadFlexible from '../components/table-results/PsTableResultsHeadFlexible.vue'
@@ -18,7 +19,7 @@ export default {
18
19
  onCollapse: { action: 'clicked' },
19
20
  },
20
21
  }
21
-
22
+ // @ts-ignore
22
23
  const TableResults = (args, { argTypes }) => ({
23
24
  props: Object.keys(argTypes),
24
25
  components: { PsTableResults, PsTableResultsHead, PsTableResultsHeadComparison, PsTableResultsHeadFlexible },
@@ -54,6 +55,7 @@ const TableResults = (args, { argTypes }) => ({
54
55
  })
55
56
 
56
57
  export const Results = TableResults.bind({})
58
+ // @ts-ignore
57
59
  Results.args = {
58
60
  layout: 'results',
59
61
  header: resultsDataHeader,
@@ -64,6 +66,7 @@ Results.args = {
64
66
  }
65
67
 
66
68
  export const Comparison = TableResults.bind({})
69
+ // @ts-ignore
67
70
  Comparison.args = {
68
71
  layout: 'comparison',
69
72
  header: comparisonDataHeader,
@@ -74,6 +77,7 @@ Comparison.args = {
74
77
  }
75
78
 
76
79
  export const Flexible = TableResults.bind({})
80
+ // @ts-ignore
77
81
  Flexible.args = {
78
82
  layout: 'flexible',
79
83
  header: flexibleDataHeader,
@@ -3,7 +3,7 @@ export default {
3
3
  title: 'Badges & Tags/Tags/Tag Scope',
4
4
  component: PsTagScope,
5
5
  }
6
-
6
+ // @ts-ignore
7
7
  const defaultTemplate = (args, {argTypes}) => ({
8
8
  props: Object.keys(argTypes),
9
9
  components: { PsTagScope },
@@ -4,7 +4,7 @@ export default {
4
4
  title: 'Components/TestimonialCard',
5
5
  component: PsTestimonialCard,
6
6
  }
7
-
7
+ // @ts-ignore
8
8
  const Template = (args,{argTypes}) => ({
9
9
  props: Object.keys(argTypes),
10
10
  components:{PsTestimonialCard},
@@ -18,7 +18,7 @@ export default {
18
18
  })
19
19
 
20
20
  export const Default = Template.bind({})
21
-
21
+ // @ts-ignore
22
22
  Default.args = {
23
23
  testimonial: 'I used to spend most of my time helping California cities make reach codes. Now, i just show them the Explorer and get to focus on helping cities in other states.',
24
24
  user:'Amy Rider',
@@ -3,7 +3,7 @@ export default {
3
3
  title: 'Notifications/Toast',
4
4
  component: PsToast,
5
5
  }
6
-
6
+ // @ts-ignore
7
7
  const Template = (args, { argTypes }) => ({
8
8
  props: Object.keys(argTypes),
9
9
  components: { PsToast },
@@ -6,7 +6,7 @@ export default {
6
6
  }
7
7
  const items = ['Option 1', 'Option 2', 'Option 3']
8
8
  const selected = 'Option 2'
9
-
9
+ // @ts-ignore
10
10
  const Template = (args, { argTypes }) => ({
11
11
  props: Object.keys(argTypes),
12
12
  components: { PsToggle },
@@ -16,6 +16,7 @@ const Template = (args, { argTypes }) => ({
16
16
  })
17
17
 
18
18
  export const Default = Template.bind({})
19
+ // @ts-ignore
19
20
  Default.args = {
20
21
  items: items,
21
22
  selected: selected,
@@ -28,13 +29,15 @@ Default.args = {
28
29
  * Se quiser dar uma melhorada nessa parte, fique a vontade meu chegado! TMJ
29
30
  */
30
31
  window.addEventListener('click', (ev) => {
32
+ // @ts-ignore
31
33
  if (ev.target.classList.contains('click-to-copy')) {
34
+ // @ts-ignore
32
35
  copyText(ev.target.dataset.toCopy)
33
36
  }
34
37
  })
35
-
38
+ // @ts-ignore
36
39
  function copyText(textToCopy) {
37
- var myTemporaryInputElement = document.createElement('input')
40
+ const myTemporaryInputElement = document.createElement('input')
38
41
  myTemporaryInputElement.type = 'text'
39
42
  myTemporaryInputElement.value = textToCopy
40
43
  document.body.appendChild(myTemporaryInputElement)
@@ -8,7 +8,7 @@ export default {
8
8
  subcomponents: {PsRichTooltip, PsDialogTooltip}
9
9
  }
10
10
 
11
- const TemplateDialog = (args, {argTypes}) => ({
11
+ const TemplateDialog = (args:any, {argTypes}:{argTypes:any}) => ({
12
12
  props: Object.keys(argTypes),
13
13
  components: {PsDialogTooltip},
14
14
  template: `
@@ -41,7 +41,7 @@ const TemplateDialog = (args, {argTypes}) => ({
41
41
  `,
42
42
  })
43
43
 
44
- const TemplateRich = (args,{argTypes})=>({
44
+ const TemplateRich = (args:any, {argTypes}:{argTypes:any})=>({
45
45
  props: Object.keys(argTypes),
46
46
  components: {PsRichTooltip},
47
47
  template: `
@@ -74,7 +74,7 @@ const TemplateRich = (args,{argTypes})=>({
74
74
  `
75
75
  })
76
76
 
77
- const TemplateDefault = (args, {argTypes}) => ({
77
+ const TemplateDefault = (args:any, {argTypes}:{argTypes:any}) => ({
78
78
  props: Object.keys(argTypes),
79
79
  components: {PsTooltip},
80
80
  template: `
@@ -1,14 +1,15 @@
1
+ // @ts-ignore
1
2
  export const randomString = (length) => {
2
- var result = ''
3
- var characters =
3
+ let result = ''
4
+ const characters =
4
5
  'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
5
- var charactersLength = characters.length
6
- for (var i = 0; i < length; i++) {
6
+ const charactersLength = characters.length
7
+ for (let i = 0; i < length; i++) {
7
8
  result += characters.charAt(Math.floor(Math.random() * charactersLength))
8
9
  }
9
10
  return result
10
11
  }
11
-
12
+ // @ts-ignore
12
13
  export const getParentScrollableEl = (node) => {
13
14
  if (node == null) {
14
15
  return null
@@ -20,7 +21,7 @@ export const getParentScrollableEl = (node) => {
20
21
  return getParentScrollableEl(node.parentNode)
21
22
  }
22
23
  }
23
-
24
+ // @ts-ignore
24
25
  export const getParentVueComponentByName = (comp, name) => {
25
26
  if (comp.$options.name === name) {
26
27
  return comp
@@ -1,18 +1,22 @@
1
+ // @ts-ignore
1
2
  export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
2
3
  return new Promise((resolve, reject) => {
3
- var xhr = new XMLHttpRequest()
4
- var notifiedNotComputable = false
4
+ const xhr = new XMLHttpRequest()
5
+ let notifiedNotComputable = false
5
6
 
6
7
  xhr.open('GET', imageUrl, true)
7
8
  xhr.responseType = 'arraybuffer'
8
9
 
9
10
  xhr.onprogress = (ev) => {
10
11
  if (ev.lengthComputable) {
11
- let progress = parseInt((ev.loaded / ev.total) * 100)
12
+ // @ts-ignore
13
+ const progress = parseInt((ev.loaded / ev.total) * 100)
14
+ // @ts-ignore
12
15
  if(onProgress) onProgress(progress)
13
16
  } else {
14
17
  if (!notifiedNotComputable) {
15
18
  notifiedNotComputable = true
19
+ // @ts-ignore
16
20
  if(onProgress) onProgress(-1)
17
21
  }
18
22
  }
@@ -20,21 +24,25 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
20
24
 
21
25
  xhr.onloadend = () => {
22
26
  const contentType = xhr.getResponseHeader('Content-Type')
27
+ // @ts-ignore
23
28
  if (!contentType.includes('image')) {
24
29
  reject(xhr)
25
30
  } else {
26
31
  if (!notifiedNotComputable) {
32
+ // @ts-ignore
27
33
  if(onProgress) onProgress(100)
28
34
  }
29
35
 
30
36
  if(!returnsBase64) {
37
+ // @ts-ignore
31
38
  resolve()
32
39
  } else {
33
- var options = {}
34
- var headers = xhr.getAllResponseHeaders()
35
- var mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
40
+ const options = {}
41
+ const headers = xhr.getAllResponseHeaders()
42
+ const mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
43
+ // @ts-ignore
36
44
  if (mime && mime[1]) options.type = mime[1]
37
- var blob = new Blob([xhr.response], options)
45
+ const blob = new Blob([xhr.response], options)
38
46
  resolve(window.URL.createObjectURL(blob))
39
47
  }
40
48
  }
@@ -1,7 +1,16 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+
1
3
  module.exports = {
2
4
  prefix: 'psui-',
3
- purge: ['./index.html', './src/**/*.vue,js,ts,jsx,tsx}'],
4
- darkMode: false, // or 'media' or 'class'
5
+ content: [
6
+ './index.html',
7
+ './src/**/*.vue',
8
+ './src/**/*.js',
9
+ './src/**/*.ts',
10
+ './src/**/*.jsx',
11
+ './src/**/*.tsx',
12
+ ],
13
+ darkMode: 'media', // or 'media' or 'class'
5
14
  theme: {
6
15
  colors: {
7
16
  'white': '#ffffff ',
package/tsconfig.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "module": "esnext",
5
+ "strict": true,
6
+ "jsx": "preserve",
7
+ "moduleResolution": "node",
8
+ "allowJs": true,
9
+ "noEmitOnError": false,
10
+ "outDir": "./dist",
11
+ "rootDir": "./src",
12
+ "skipLibCheck": true, //this make ts ignore error
13
+ "skipDefaultLibCheck": true, //this make ts ignore error
14
+ "noEmit": true, //this make ts ignore error
15
+ "esModuleInterop": true,
16
+ "allowSyntheticDefaultImports": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "useDefineForClassFields": true,
19
+ "sourceMap": true,
20
+ "baseUrl": ".",
21
+ "types": [
22
+ "webpack-env"
23
+ ],
24
+ "paths": {
25
+ "@/*": [
26
+ "src/*"
27
+ ]
28
+ },
29
+ "lib": [
30
+ "esnext",
31
+ "dom",
32
+ "dom.iterable",
33
+ "scripthost"
34
+ ]
35
+ },
36
+ "include": [
37
+ "src/**/*.ts",
38
+ "src/**/*.stories.ts",
39
+ "src/**/*.d.ts",
40
+ "src/**/*.vue",
41
+ "tests/**/*.ts",
42
+ "tests/**/*.tsx",
43
+ ],
44
+ "exclude": [
45
+ "node_modules"
46
+ ]
47
+ }
package/webpack.config.js CHANGED
@@ -1,8 +1,11 @@
1
+ const { VueLoaderPlugin} = require('vue-loader')
2
+
1
3
  module.exports = {
2
4
  resolve: {
3
5
  alias: {
4
6
  vue: '@vue/compat'
5
- }
7
+ },
8
+ extensions: ['.js','.ts','.vue']
6
9
  },
7
10
  module: {
8
11
  rules: [
@@ -16,7 +19,18 @@ module.exports = {
16
19
  }
17
20
  }
18
21
  }
19
- }
22
+ },
23
+ {
24
+ test: /\.tsx?$/,
25
+ loader: 'ts-loader',
26
+ options: {
27
+ appendTsSuffixTo: [/\.vue$/],
28
+ },
29
+ exclude: /node_modules/,
30
+ },
20
31
  ]
21
- }
32
+ },
33
+ plugins:[
34
+ new VueLoaderPlugin()
35
+ ]
22
36
  }
@@ -1,10 +0,0 @@
1
- import { create } from '@storybook/theming';
2
- import logo from '../src/assets/images/policy-studio.svg';
3
-
4
- export default create({
5
- base: 'light',
6
- brandTitle: 'Policy Studio UI Vue',
7
- brandUrl: 'https://policystudio.co/',
8
- brandImage: logo,
9
- brandTarget: '_blank',
10
- });
@@ -1,6 +0,0 @@
1
- import { addons } from '@storybook/addons';
2
- import PolicyStudio from './PolicyStudio';
3
-
4
- addons.setConfig({
5
- theme: PolicyStudio,
6
- });
package/babel.config.js DELETED
@@ -1,17 +0,0 @@
1
- const presets = [
2
- [
3
- '@babel/preset-env',
4
- {
5
- targets: {
6
- edge: '17',
7
- firefox: '60',
8
- chrome: '67',
9
- safari: '11.1',
10
- },
11
- useBuiltIns: 'usage',
12
- corejs: '3.6.4',
13
- },
14
- ],
15
- ]
16
-
17
- module.exports = { presets }
File without changes
File without changes
File without changes