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

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 (231) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.github/workflows/deploy-storybook.yml +4 -4
  3. package/.nvmrc +1 -0
  4. package/dist/css/psui_styles_output.css +6986 -0
  5. package/dist/index.d.ts +50 -0
  6. package/dist/index.js +53 -63
  7. package/dist/index.js.map +1 -1
  8. package/dist/util/GeneralFunctions.d.ts +3 -0
  9. package/dist/util/GeneralFunctions.js.map +1 -1
  10. package/dist/util/directives.d.ts +1 -0
  11. package/dist/util/directives.js +22 -0
  12. package/dist/util/directives.js.map +1 -0
  13. package/dist/util/eventBus.d.ts +7 -0
  14. package/dist/util/eventBus.js +8 -0
  15. package/dist/util/eventBus.js.map +1 -0
  16. package/dist/util/imageLoader.d.ts +6 -0
  17. package/dist/util/imageLoader.js.map +1 -1
  18. package/package.json +9 -23
  19. package/src/assets/scss/components/PsDataTable.scss +1 -1
  20. package/src/components/accordion/PsAccordionItem.vue +75 -75
  21. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
  22. package/src/components/badges-and-tags/PsCardInfos.vue +40 -41
  23. package/src/components/badges-and-tags/PsChartLegend.vue +47 -51
  24. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +14 -19
  25. package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
  26. package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
  27. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
  28. package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
  29. package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
  30. package/src/components/badges-and-tags/PsTagScope.vue +17 -22
  31. package/src/components/badges-and-tags/PsTestimonialCard.vue +20 -26
  32. package/src/components/buttons/PsButton.vue +61 -62
  33. package/src/components/chips/PsChips.vue +98 -101
  34. package/src/components/controls/PsCheckbox.vue +84 -84
  35. package/src/components/controls/PsCheckboxSimple.vue +95 -95
  36. package/src/components/controls/PsDraggable.vue +53 -55
  37. package/src/components/controls/PsInlineSelector.vue +99 -99
  38. package/src/components/controls/PsRadioButton.vue +59 -58
  39. package/src/components/controls/PsRadioButtonSimple.vue +79 -75
  40. package/src/components/controls/PsSlider.vue +185 -176
  41. package/src/components/controls/PsSwitch.vue +51 -52
  42. package/src/components/controls/PsToggle.vue +53 -50
  43. package/src/components/data-graphics/PsBarChart.vue +19 -21
  44. package/src/components/datatable/PsDataTable.vue +56 -60
  45. package/src/components/datatable/PsDataTableItem.vue +14 -28
  46. package/src/components/forms/PsDropdown.vue +164 -162
  47. package/src/components/forms/PsDropdownList.vue +132 -129
  48. package/src/components/forms/PsInput.vue +155 -153
  49. package/src/components/forms/PsInputSelect.vue +91 -92
  50. package/src/components/forms/PsInputTextArea.vue +71 -71
  51. package/src/components/navigations/PsBreadcrumb.vue +26 -34
  52. package/src/components/notifications/PsDialog.vue +57 -56
  53. package/src/components/notifications/PsSimpleAlert.vue +28 -29
  54. package/src/components/notifications/PsToast.vue +40 -39
  55. package/src/components/table-results/PsTableResults.vue +452 -458
  56. package/src/components/table-results/PsTableResultsBody.vue +66 -67
  57. package/src/components/table-results/PsTableResultsHead.vue +62 -56
  58. package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
  59. package/src/components/table-results/PsTableResultsHeadFlexible.vue +63 -56
  60. package/src/components/table-results/PsTableResultsRow.vue +55 -56
  61. package/src/components/tabs/PsTabHeader.vue +106 -100
  62. package/src/components/tooltip/PsDialogTooltip.vue +96 -101
  63. package/src/components/tooltip/PsRichTooltip.vue +42 -45
  64. package/src/components/tooltip/PsTooltip.vue +111 -116
  65. package/src/components/ui/PsDotLoader.vue +1 -5
  66. package/src/components/ui/PsIcon.vue +126 -129
  67. package/src/index.ts +57 -71
  68. package/src/tsconfig.json +12 -0
  69. package/src/{shims-vue.d.ts → types/index.d.ts} +0 -5
  70. package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +0 -3
  71. package/src/util/directives.ts +24 -0
  72. package/src/util/eventBus.js +10 -0
  73. package/src/util/{imageLoader.ts → imageLoader.js} +7 -8
  74. package/tailwind.config.js +1 -1
  75. package/tsconfig.json +15 -17
  76. package/.storybook/PolicyStudio.ts +0 -11
  77. package/.storybook/eventBus.ts +0 -26
  78. package/.storybook/main.ts +0 -21
  79. package/.storybook/manager.ts +0 -7
  80. package/.storybook/preview.ts +0 -17
  81. package/dist/contents/ComparisonData.js +0 -376
  82. package/dist/contents/ComparisonData.js.map +0 -1
  83. package/dist/contents/FlexibleData.js +0 -501
  84. package/dist/contents/FlexibleData.js.map +0 -1
  85. package/dist/contents/ResultsData.js +0 -530
  86. package/dist/contents/ResultsData.js.map +0 -1
  87. package/dist/css/psui_styles.css +0 -4647
  88. package/dist/stories/Accordion.stories.js +0 -56
  89. package/dist/stories/Accordion.stories.js.map +0 -1
  90. package/dist/stories/BadgeWithIcon.stories.js +0 -28
  91. package/dist/stories/BadgeWithIcon.stories.js.map +0 -1
  92. package/dist/stories/BarChart.stories.js +0 -16
  93. package/dist/stories/BarChart.stories.js.map +0 -1
  94. package/dist/stories/Breadcrumb.stories.js +0 -21
  95. package/dist/stories/Breadcrumb.stories.js.map +0 -1
  96. package/dist/stories/Button.stories.js +0 -44
  97. package/dist/stories/Button.stories.js.map +0 -1
  98. package/dist/stories/CardInfos.stories.js +0 -13
  99. package/dist/stories/CardInfos.stories.js.map +0 -1
  100. package/dist/stories/ChartLegend.stories.js +0 -13
  101. package/dist/stories/ChartLegend.stories.js.map +0 -1
  102. package/dist/stories/Checkbox.stories.js +0 -44
  103. package/dist/stories/Checkbox.stories.js.map +0 -1
  104. package/dist/stories/CheckboxSimple.stories.js +0 -48
  105. package/dist/stories/CheckboxSimple.stories.js.map +0 -1
  106. package/dist/stories/Chips.stories.js +0 -27
  107. package/dist/stories/Chips.stories.js.map +0 -1
  108. package/dist/stories/ClimateZoneBadge.stories.js +0 -15
  109. package/dist/stories/ClimateZoneBadge.stories.js.map +0 -1
  110. package/dist/stories/CostEffectBar.stories.js +0 -21
  111. package/dist/stories/CostEffectBar.stories.js.map +0 -1
  112. package/dist/stories/Datatable.stories.js +0 -45
  113. package/dist/stories/Datatable.stories.js.map +0 -1
  114. package/dist/stories/DateCardInfo.stories.js +0 -18
  115. package/dist/stories/DateCardInfo.stories.js.map +0 -1
  116. package/dist/stories/Dialog.stories.js +0 -127
  117. package/dist/stories/Dialog.stories.js.map +0 -1
  118. package/dist/stories/Draggable.stories.js +0 -20
  119. package/dist/stories/Draggable.stories.js.map +0 -1
  120. package/dist/stories/Dropdown.stories.js +0 -98
  121. package/dist/stories/Dropdown.stories.js.map +0 -1
  122. package/dist/stories/DropdownList.stories.js +0 -208
  123. package/dist/stories/DropdownList.stories.js.map +0 -1
  124. package/dist/stories/Header.stories.js +0 -39
  125. package/dist/stories/Header.stories.js.map +0 -1
  126. package/dist/stories/HighlightRippleDot.stories.js +0 -13
  127. package/dist/stories/HighlightRippleDot.stories.js.map +0 -1
  128. package/dist/stories/Icon.stories.js +0 -19
  129. package/dist/stories/Icon.stories.js.map +0 -1
  130. package/dist/stories/InlineSelector.stories.js +0 -16
  131. package/dist/stories/InlineSelector.stories.js.map +0 -1
  132. package/dist/stories/Input.stories.js +0 -235
  133. package/dist/stories/Input.stories.js.map +0 -1
  134. package/dist/stories/InputSelect.stories.js +0 -28
  135. package/dist/stories/InputSelect.stories.js.map +0 -1
  136. package/dist/stories/InputTextArea.stories.js +0 -23
  137. package/dist/stories/InputTextArea.stories.js.map +0 -1
  138. package/dist/stories/MiniTag.stories.js +0 -44
  139. package/dist/stories/MiniTag.stories.js.map +0 -1
  140. package/dist/stories/Playground.stories.js +0 -14
  141. package/dist/stories/Playground.stories.js.map +0 -1
  142. package/dist/stories/ProgressBar.stories.js +0 -21
  143. package/dist/stories/ProgressBar.stories.js.map +0 -1
  144. package/dist/stories/RadioButton.stories.js +0 -36
  145. package/dist/stories/RadioButton.stories.js.map +0 -1
  146. package/dist/stories/RadioButtonSimple.stories.js +0 -40
  147. package/dist/stories/RadioButtonSimple.stories.js.map +0 -1
  148. package/dist/stories/SimpleAlert.stories.js +0 -19
  149. package/dist/stories/SimpleAlert.stories.js.map +0 -1
  150. package/dist/stories/Slider.stories.js +0 -70
  151. package/dist/stories/Slider.stories.js.map +0 -1
  152. package/dist/stories/Switch.stories.js +0 -35
  153. package/dist/stories/Switch.stories.js.map +0 -1
  154. package/dist/stories/TabHeader.stories.js +0 -48
  155. package/dist/stories/TabHeader.stories.js.map +0 -1
  156. package/dist/stories/TableResults.stories.js +0 -717
  157. package/dist/stories/TableResults.stories.js.map +0 -1
  158. package/dist/stories/TagScope.stories.js +0 -16
  159. package/dist/stories/TagScope.stories.js.map +0 -1
  160. package/dist/stories/TestimonialCard.stories.js +0 -24
  161. package/dist/stories/TestimonialCard.stories.js.map +0 -1
  162. package/dist/stories/Toast.stories.js +0 -51
  163. package/dist/stories/Toast.stories.js.map +0 -1
  164. package/dist/stories/Toggle.stories.js +0 -42
  165. package/dist/stories/Toggle.stories.js.map +0 -1
  166. package/dist/stories/Tooltip.stories.js +0 -108
  167. package/dist/stories/Tooltip.stories.js.map +0 -1
  168. package/postcss.config.js +0 -8
  169. package/src/assets/images/multifamily-units.svg +0 -10
  170. package/src/assets/images/policy-studio.svg +0 -15
  171. package/src/components/playground/PsScrollBar.vue +0 -320
  172. package/src/contents/ComparisonData.ts +0 -378
  173. package/src/contents/FlexibleData.ts +0 -502
  174. package/src/contents/ResultsData.ts +0 -531
  175. package/src/stories/Accordion.stories.ts +0 -59
  176. package/src/stories/BadgeWithIcon.stories.ts +0 -31
  177. package/src/stories/BarChart.stories.ts +0 -17
  178. package/src/stories/Breadcrumb.stories.ts +0 -22
  179. package/src/stories/Button.stories.ts +0 -48
  180. package/src/stories/Button.vue +0 -59
  181. package/src/stories/CardInfos.stories.ts +0 -15
  182. package/src/stories/ChartLegend.stories.ts +0 -15
  183. package/src/stories/Checkbox.stories.ts +0 -45
  184. package/src/stories/CheckboxSimple.stories.ts +0 -49
  185. package/src/stories/Chips.stories.ts +0 -33
  186. package/src/stories/ClimateZoneBadge.stories.ts +0 -18
  187. package/src/stories/Colors.mdx +0 -70
  188. package/src/stories/CostEffectBar.stories.ts +0 -24
  189. package/src/stories/Datatable.stories.ts +0 -53
  190. package/src/stories/DateCardInfo.stories.ts +0 -20
  191. package/src/stories/Dialog.stories.ts +0 -131
  192. package/src/stories/Draggable.stories.ts +0 -23
  193. package/src/stories/Dropdown.stories.ts +0 -100
  194. package/src/stories/DropdownList.stories.ts +0 -213
  195. package/src/stories/ElevationSystem.mdx +0 -41
  196. package/src/stories/Header.stories.ts +0 -42
  197. package/src/stories/Header.vue +0 -77
  198. package/src/stories/HighlightRippleDot.stories.ts +0 -16
  199. package/src/stories/Icon.stories.ts +0 -23
  200. package/src/stories/InlineSelector.stories.ts +0 -18
  201. package/src/stories/Input.stories.ts +0 -243
  202. package/src/stories/InputSelect.stories.ts +0 -31
  203. package/src/stories/InputTextArea.stories.ts +0 -25
  204. package/src/stories/Introduction.mdx +0 -211
  205. package/src/stories/MiniTag.stories.ts +0 -59
  206. package/src/stories/Playground.stories.ts +0 -16
  207. package/src/stories/ProgressBar.stories.ts +0 -24
  208. package/src/stories/RadioButton.stories.ts +0 -40
  209. package/src/stories/RadioButtonSimple.stories.ts +0 -43
  210. package/src/stories/SimpleAlert.stories.ts +0 -22
  211. package/src/stories/Slider.stories.ts +0 -79
  212. package/src/stories/Switch.stories.ts +0 -39
  213. package/src/stories/TabHeader.stories.ts +0 -57
  214. package/src/stories/TableResults.stories.ts +0 -728
  215. package/src/stories/TagScope.stories.ts +0 -17
  216. package/src/stories/TestimonialCard.stories.ts +0 -27
  217. package/src/stories/Toast.stories.ts +0 -52
  218. package/src/stories/Toggle.stories.ts +0 -48
  219. package/src/stories/Tooltip.stories.ts +0 -114
  220. package/src/stories/Typography.mdx +0 -212
  221. package/src/stories/assets/code-brackets.svg +0 -1
  222. package/src/stories/assets/colors.svg +0 -1
  223. package/src/stories/assets/comments.svg +0 -1
  224. package/src/stories/assets/direction.svg +0 -1
  225. package/src/stories/assets/flow.svg +0 -1
  226. package/src/stories/assets/plugin.svg +0 -1
  227. package/src/stories/assets/repo.svg +0 -1
  228. package/src/stories/assets/stackalt.svg +0 -1
  229. package/src/stories/button.css +0 -30
  230. package/src/stories/header.css +0 -32
  231. package/webpack.config.js +0 -36
package/src/index.ts CHANGED
@@ -1,57 +1,57 @@
1
1
  /**
2
2
  * General Components
3
3
  */
4
+ import { directives } from './util/directives'
4
5
 
5
- import PsButton from './components/buttons/PsButton.vue'
6
- import PsCheckbox from './components/controls/PsCheckbox.vue'
7
- import PsRadioButton from './components/controls/PsRadioButton.vue'
8
- import PsSlider from './components/controls/PsSlider.vue'
9
- import PsSwitch from './components/controls/PsSwitch.vue'
10
- import PsToggle from './components/controls/PsToggle.vue'
11
- import PsInput from './components/forms/PsInput.vue'
12
- import PsDropdown from './components/forms/PsDropdown.vue'
13
- import PsDropdownList from './components/forms/PsDropdownList.vue'
14
- import PsInputTextArea from './components/forms/PsInputTextArea.vue'
15
- import PsInputSelect from './components/forms/PsInputSelect.vue'
16
- import PsDialog from './components/notifications/PsDialog.vue'
17
- import PsToast from './components/notifications/PsToast.vue'
18
- import PsTabHeader from './components/tabs/PsTabHeader.vue'
19
- import PsAccordion from './components/accordion/PsAccordion.vue'
20
- import PsAccordionItem from './components/accordion/PsAccordionItem.vue'
21
- import PsChips from './components/chips/PsChips.vue'
22
- import PsDataTable from './components/datatable/PsDataTable.vue'
23
- import PsDataTableItem from './components/datatable/PsDataTableItem.vue'
24
- import PsTableResults from './components/table-results/PsTableResults.vue'
25
- import PsTableResultsBody from './components/table-results/PsTableResultsBody.vue'
26
- import PsTableResultsHead from './components/table-results/PsTableResultsHead.vue'
27
- import PsTableResultsHeadComparison from './components/table-results/PsTableResultsHeadComparison.vue'
28
- import PsTableResultsHeadFlexible from './components/table-results/PsTableResultsHeadFlexible.vue'
29
- import PsIcon from './components/ui/PsIcon.vue'
30
- import PsDotLoader from './components/ui/PsDotLoader.vue'
31
- import PsTooltip from './components/tooltip/PsTooltip.vue'
32
- import PsRichTooltip from './components/tooltip/PsRichTooltip.vue'
33
- import PsDialogTooltip from './components/tooltip/PsDialogTooltip.vue'
34
- import PsDraggable from './components/controls/PsDraggable.vue'
35
- import PsCardInfos from './components/badges-and-tags/PsCardInfos.vue'
36
- import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
37
- import PsInlineSelector from './components/controls/PsInlineSelector.vue'
38
- import PsScrollBar from './components/playground/PsScrollBar.vue'
39
- import PsMiniTag from './components/badges-and-tags/PsMiniTag.vue'
40
- import PsCheckboxSimple from './components/controls/PsCheckboxSimple.vue'
41
- import PsBadgeWithIcon from './components/badges-and-tags/PsBadgeWithIcon.vue'
42
- import PsProgressBar from './components/badges-and-tags/PsProgressBar.vue'
43
- import PsRadioButtonSimple from './components/controls/PsRadioButtonSimple.vue'
44
- import PsTestimonialCard from './components/badges-and-tags/PsTestimonialCard.vue'
45
- import PsDateCardInfo from './components/badges-and-tags/PsDateCardInfo.vue'
46
- import PsTagScope from './components/badges-and-tags/PsTagScope.vue'
47
- import PsBarChart from './components/data-graphics/PsBarChart.vue'
48
- import PsSimpleAlert from './components/notifications/PsSimpleAlert.vue'
49
- import PsBreadcrumb from './components/navigations/PsBreadcrumb.vue'
6
+ import PsButton from '../src/components/buttons/PsButton.vue'
7
+ import PsCheckbox from '../src/components/controls/PsCheckbox.vue'
8
+ import PsRadioButton from '../src/components/controls/PsRadioButton.vue'
9
+ import PsSlider from '../src/components/controls/PsSlider.vue'
10
+ import PsSwitch from '../src/components/controls/PsSwitch.vue'
11
+ import PsToggle from '../src/components/controls/PsToggle.vue'
12
+ import PsInput from '../src/components/forms/PsInput.vue'
13
+ import PsDropdown from '../src/components/forms/PsDropdown.vue'
14
+ import PsDropdownList from '../src/components/forms/PsDropdownList.vue'
15
+ import PsInputTextArea from '../src/components/forms/PsInputTextArea.vue'
16
+ import PsInputSelect from '../src/components/forms/PsInputSelect.vue'
17
+ import PsDialog from '../src/components/notifications/PsDialog.vue'
18
+ import PsToast from '../src/components/notifications/PsToast.vue'
19
+ import PsTabHeader from '../src/components/tabs/PsTabHeader.vue'
20
+ import PsAccordion from '../src/components/accordion/PsAccordion.vue'
21
+ import PsAccordionItem from '../src/components/accordion/PsAccordionItem.vue'
22
+ import PsChips from '../src/components/chips/PsChips.vue'
23
+ import PsDataTable from '../src/components/datatable/PsDataTable.vue'
24
+ import PsDataTableItem from '../src/components/datatable/PsDataTableItem.vue'
25
+ import PsTableResults from '../src/components/table-results/PsTableResults.vue'
26
+ import PsTableResultsBody from '../src/components/table-results/PsTableResultsBody.vue'
27
+ import PsTableResultsHead from '../src/components/table-results/PsTableResultsHead.vue'
28
+ import PsTableResultsHeadComparison from '../src/components/table-results/PsTableResultsHeadComparison.vue'
29
+ import PsTableResultsHeadFlexible from '../src/components/table-results/PsTableResultsHeadFlexible.vue'
30
+ import PsTableResultsRow from '../src/components/table-results/PsTableResultsRow.vue'
31
+ import PsIcon from '../src/components/ui/PsIcon.vue'
32
+ import PsDotLoader from '../src/components/ui/PsDotLoader.vue'
33
+ import PsTooltip from '../src/components/tooltip/PsTooltip.vue'
34
+ import PsRichTooltip from '../src/components/tooltip/PsRichTooltip.vue'
35
+ import PsDialogTooltip from '../src/components/tooltip/PsDialogTooltip.vue'
36
+ import PsDraggable from '../src/components/controls/PsDraggable.vue'
37
+ import PsCardInfos from '../src/components/badges-and-tags/PsCardInfos.vue'
38
+ import PsChartLegend from '../src/components/badges-and-tags/PsChartLegend.vue'
39
+ import PsInlineSelector from '../src/components/controls/PsInlineSelector.vue'
40
+ import PsMiniTag from '../src/components/badges-and-tags/PsMiniTag.vue'
41
+ import PsCheckboxSimple from '../src/components/controls/PsCheckboxSimple.vue'
42
+ import PsBadgeWithIcon from '../src/components/badges-and-tags/PsBadgeWithIcon.vue'
43
+ import PsProgressBar from '../src/components/badges-and-tags/PsProgressBar.vue'
44
+ import PsRadioButtonSimple from '../src/components/controls/PsRadioButtonSimple.vue'
45
+ import PsTestimonialCard from '../src/components/badges-and-tags/PsTestimonialCard.vue'
46
+ import PsDateCardInfo from '../src/components/badges-and-tags/PsDateCardInfo.vue'
47
+ import PsTagScope from '../src/components/badges-and-tags/PsTagScope.vue'
48
+ import PsBarChart from '../src/components/data-graphics/PsBarChart.vue'
49
+ import PsSimpleAlert from '../src/components/notifications/PsSimpleAlert.vue'
50
+ import PsBreadcrumb from '../src/components/navigations/PsBreadcrumb.vue'
50
51
 
51
52
 
52
53
  export default {
53
- // @ts-ignore
54
- install(Vue) {
54
+ install(Vue:any) {
55
55
  Vue.component('PsButton', PsButton)
56
56
  Vue.component('PsCheckbox', PsCheckbox)
57
57
  Vue.component('PsDialog', PsDialog)
@@ -67,9 +67,10 @@ export default {
67
67
  Vue.component('PsChips', PsChips)
68
68
  Vue.component('PsDataTable', PsDataTable)
69
69
  Vue.component('PsDataTableItem', PsDataTableItem)
70
- Vue.component('PsTableResults', PsTableResults)
71
70
  Vue.component('PsTableResultsHead', PsTableResultsHead)
72
71
  Vue.component('PsTableResultsHeadComparison', PsTableResultsHeadComparison)
72
+ Vue.component('PsTableResults', PsTableResults)
73
+ Vue.component('PsTableResultsRow', PsTableResultsRow)
73
74
  Vue.component('PsTableResultsBody', PsTableResultsBody)
74
75
  Vue.component('PsTableResultsHeadFlexible',PsTableResultsHeadFlexible)
75
76
  Vue.component('PsIcon', PsIcon)
@@ -85,7 +86,6 @@ export default {
85
86
  Vue.component('PsInputSelect', PsInputSelect)
86
87
  Vue.component('PsDropdown',PsDropdown)
87
88
  Vue.component('PsDropdownList', PsDropdownList)
88
- Vue.component('PsScrollBar', PsScrollBar)
89
89
  Vue.component('PsMiniTag', PsMiniTag)
90
90
  Vue.component('PsCheckboxSimple', PsCheckboxSimple)
91
91
  Vue.component('PsBadgeWithIcon', PsBadgeWithIcon)
@@ -98,25 +98,11 @@ export default {
98
98
  Vue.component('PsSimpleAlert',PsSimpleAlert)
99
99
  Vue.component('PsBreadcrumb', PsBreadcrumb)
100
100
 
101
-
102
- Vue.directive('click-outside', {
103
- // @ts-ignore
104
- bind: function (el, binding, vnode) {
105
- // @ts-ignore
106
- el.clickOutsideEvent = function (event) {
107
- // here I check that click was outside the el and his children
108
- if (!(el == event.target || el.contains(event.target))) {
109
- // and if it did, call method provided in attribute value
110
- vnode.context[binding.expression](event)
111
- }
112
- }
113
- document.body.addEventListener('click', el.clickOutsideEvent)
114
- },
115
- // @ts-ignore
116
- unbind: function (el) {
117
- document.body.removeEventListener('click', el.clickOutsideEvent)
118
- },
119
- })
101
+ /**
102
+ * Initialize directives
103
+ */
104
+ directives(Vue)
105
+
120
106
  },
121
107
  }
122
108
 
@@ -136,7 +122,6 @@ export {
136
122
  PsChips,
137
123
  PsDataTable,
138
124
  PsDataTableItem,
139
- PsTableResults,
140
125
  PsTableResultsHead,
141
126
  PsTableResultsBody,
142
127
  PsTableResultsHeadFlexible,
@@ -154,7 +139,6 @@ export {
154
139
  PsInputSelect,
155
140
  PsDropdown,
156
141
  PsDropdownList,
157
- PsScrollBar,
158
142
  PsMiniTag,
159
143
  PsCheckboxSimple,
160
144
  PsBadgeWithIcon,
@@ -165,6 +149,8 @@ export {
165
149
  PsTagScope,
166
150
  PsBarChart,
167
151
  PsSimpleAlert,
168
- PsBreadcrumb
152
+ PsBreadcrumb,
153
+ PsTableResults,
154
+ PsTableResultsRow
169
155
  }
170
156
 
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "rootDir": "../",
4
+ "strict": true,
5
+ "outDir": "../dist",
6
+ "resolveJsonModule": true,
7
+ "allowJs": true
8
+ },
9
+ "references": [
10
+ {"path": "../"}
11
+ ]
12
+ }
@@ -4,8 +4,3 @@ declare module '*.vue' {
4
4
  const component: DefineComponent<{}, {}, any>
5
5
  export default component
6
6
  }
7
-
8
- declare module '*.svg' {
9
- const content: string;
10
- export default content;
11
- }
@@ -1,4 +1,3 @@
1
- // @ts-ignore
2
1
  export const randomString = (length) => {
3
2
  let result = ''
4
3
  const characters =
@@ -9,7 +8,6 @@ export const randomString = (length) => {
9
8
  }
10
9
  return result
11
10
  }
12
- // @ts-ignore
13
11
  export const getParentScrollableEl = (node) => {
14
12
  if (node == null) {
15
13
  return null
@@ -21,7 +19,6 @@ export const getParentScrollableEl = (node) => {
21
19
  return getParentScrollableEl(node.parentNode)
22
20
  }
23
21
  }
24
- // @ts-ignore
25
22
  export const getParentVueComponentByName = (comp, name) => {
26
23
  if (comp.$options.name === name) {
27
24
  return comp
@@ -0,0 +1,24 @@
1
+
2
+ export const directives = (Vue: any) => {
3
+ Vue.directive('click-outside', {
4
+ bind(el: any, binding: any, vnode: any) {
5
+ // Define a function to handle click events outside the element
6
+ const handler = (event: any) => {
7
+ if (binding?.value && !(el === event.target || el.contains(event.target))) {
8
+ // Call the method provided in the directive value
9
+ binding.value(event)
10
+ }
11
+ }
12
+
13
+ // Store the handler function on the element
14
+ el.__clickOutsideHandler__ = handler
15
+
16
+ // Add a click event listener to the body
17
+ document.body.addEventListener('click', handler)
18
+ },
19
+ unbind(el: any) {
20
+ // Remove the click event listener when the element is unbound
21
+ document.body.removeEventListener('click', el.__clickOutsideHandler__)
22
+ },
23
+ })
24
+ }
@@ -0,0 +1,10 @@
1
+ import emitter from 'tiny-emitter/instance'
2
+
3
+ export default {
4
+ $on: (...args) => emitter.on(...args),
5
+ $once: (...args) => emitter.once(...args),
6
+ $off: (...args) => emitter.off(...args),
7
+ $emit: (...args) => emitter.emit(...args)
8
+ }
9
+
10
+
@@ -1,4 +1,3 @@
1
- // @ts-ignore
2
1
  export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
3
2
  return new Promise((resolve, reject) => {
4
3
  const xhr = new XMLHttpRequest()
@@ -9,14 +8,14 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
9
8
 
10
9
  xhr.onprogress = (ev) => {
11
10
  if (ev.lengthComputable) {
12
- // @ts-ignore
11
+
13
12
  const progress = parseInt((ev.loaded / ev.total) * 100)
14
- // @ts-ignore
13
+
15
14
  if(onProgress) onProgress(progress)
16
15
  } else {
17
16
  if (!notifiedNotComputable) {
18
17
  notifiedNotComputable = true
19
- // @ts-ignore
18
+
20
19
  if(onProgress) onProgress(-1)
21
20
  }
22
21
  }
@@ -24,23 +23,23 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
24
23
 
25
24
  xhr.onloadend = () => {
26
25
  const contentType = xhr.getResponseHeader('Content-Type')
27
- // @ts-ignore
26
+
28
27
  if (!contentType.includes('image')) {
29
28
  reject(xhr)
30
29
  } else {
31
30
  if (!notifiedNotComputable) {
32
- // @ts-ignore
31
+
33
32
  if(onProgress) onProgress(100)
34
33
  }
35
34
 
36
35
  if(!returnsBase64) {
37
- // @ts-ignore
36
+
38
37
  resolve()
39
38
  } else {
40
39
  const options = {}
41
40
  const headers = xhr.getAllResponseHeaders()
42
41
  const mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
43
- // @ts-ignore
42
+
44
43
  if (mime && mime[1]) options.type = mime[1]
45
44
  const blob = new Blob([xhr.response], options)
46
45
  resolve(window.URL.createObjectURL(blob))
@@ -1,6 +1,6 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
2
 
3
- module.exports = {
3
+ export default {
4
4
  prefix: 'psui-',
5
5
  content: [
6
6
  './index.html',
package/tsconfig.json CHANGED
@@ -3,45 +3,43 @@
3
3
  "target": "esnext",
4
4
  "module": "esnext",
5
5
  "strict": true,
6
+ "strictNullChecks": true,
6
7
  "jsx": "preserve",
8
+ "declaration": true,
7
9
  "moduleResolution": "node",
8
- "allowJs": true,
10
+ "composite": true,
9
11
  "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
12
+ "outDir": "dist",
13
+ "rootDir": "src",
14
+ "skipLibCheck": false,
15
+ "skipDefaultLibCheck": true,
15
16
  "esModuleInterop": true,
16
17
  "allowSyntheticDefaultImports": true,
17
18
  "forceConsistentCasingInFileNames": true,
18
19
  "useDefineForClassFields": true,
19
20
  "sourceMap": true,
20
- "baseUrl": ".",
21
+ "allowJs": true,
22
+ "baseUrl": "",
23
+
21
24
  "types": [
22
- "webpack-env"
25
+ "webpack-env",
23
26
  ],
24
- "paths": {
25
- "@/*": [
26
- "src/*"
27
- ]
28
- },
29
27
  "lib": [
30
28
  "esnext",
31
- "dom",
29
+ "dom",
32
30
  "dom.iterable",
33
31
  "scripthost"
34
32
  ]
35
33
  },
36
34
  "include": [
37
35
  "src/**/*.ts",
38
- "src/**/*.stories.ts",
39
36
  "src/**/*.d.ts",
40
37
  "src/**/*.vue",
41
38
  "tests/**/*.ts",
42
- "tests/**/*.tsx",
39
+ "tests/**/*.tsx", "src/util/eventBus.js", "src/util/GeneralFunctions.js", "src/util/imageLoader.js",
43
40
  ],
44
41
  "exclude": [
45
- "node_modules"
42
+ "node_modules",
43
+ "doc"
46
44
  ]
47
45
  }
@@ -1,11 +0,0 @@
1
- import { create } from '@storybook/theming'
2
- import PolicyStudioUiLogo from '../src/assets/images/policy-studio.svg'
3
-
4
-
5
- export default create({
6
- base: 'light',
7
- brandTitle: 'Policy Studio UI Vue',
8
- brandUrl: 'https://policystudio.co/',
9
- brandImage: PolicyStudioUiLogo,
10
- brandTarget: '_blank',
11
- });
@@ -1,26 +0,0 @@
1
- // this was a vue2 syntax
2
- // import Vue from 'vue';
3
- // export const eventBus = new Vue();
4
-
5
- // import { createApp } from 'vue';
6
-
7
- // export const app = createApp({});
8
- // const emitter = app.config.globalProperties.$emitter = {};
9
-
10
- // export const eventBus = {
11
- // on(event, callback) {
12
- // if (!emitter[event]) {
13
- // emitter[event] = [];
14
- // }
15
- // emitter[event].push(callback);
16
- // },
17
- // emit(event, ...args) {
18
- // if (emitter[event]) {
19
- // emitter[event].forEach(callback => {
20
- // callback(...args);
21
- // });
22
- // }
23
- // },
24
- // };
25
-
26
- // app.mount('#app');
@@ -1,21 +0,0 @@
1
- /** @type { import('@storybook/vue3-webpack5').StorybookConfig } */
2
- const config = {
3
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
4
- addons: [
5
- "@storybook/addon-links",
6
- "@storybook/addon-essentials",
7
- "@storybook/addon-interactions",
8
- ],
9
- framework: {
10
- name: "@storybook/vue3-webpack5",
11
- options: {
12
- builder: {
13
- useSWC: true,
14
- },
15
- },
16
- },
17
- docs: {
18
- autodocs: "tag",
19
- },
20
- };
21
- export default config;
@@ -1,7 +0,0 @@
1
- import { addons } from '@storybook/manager-api'
2
-
3
- import PolicyStudio from './PolicyStudio'
4
-
5
- addons.setConfig({
6
- theme: PolicyStudio,
7
- });
@@ -1,17 +0,0 @@
1
-
2
- /**
3
- * Import tailwind css file (bundle) based on environment
4
- */
5
- const cssEnvFolder = (process.env.STORYBOOK_ENV === 'production') ? 'dist' : 'temp'
6
- require( `../${cssEnvFolder}/css/psui_styles.css`)
7
- console.warn(`Using tailwind css file(bundle) from: ../${cssEnvFolder}/css/psui_styles.css`)
8
-
9
- export const parameters = {
10
- actions: { argTypesRegex: "^on[A-Z].*" },
11
- controls: {
12
- matchers: {
13
- color: /(background|color)$/i,
14
- date: /Date$/,
15
- },
16
- },
17
- }